import{V as f,d as D,u as R,r as u,a as P,Z as c,ac as M,c as N,o as O,w as n,j as o,W as V,l as s,H as A,B as E,i as W,X as q}from"./index-9PRMimni.js";import{B as I}from"./BasicForm-dL_oCSPM.js";import{u as X}from"./useForm-CKmgcynv.js";import{B as $}from"./Table-0PViRYCf.js";import{_ as j}from"./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";import{aO as z,aP as G}from"./template-rpthWlT9.js";import{_ as H}from"./Modal.vue_vue_type_script_setup_true_lang-CIoauAKb.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"./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"./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"./Flex-CTSf12gq.js";const L=[{field:"tel",component:"NInput",componentProps:{}}],{t:i}=f(),Z=[{title:i("mdm.flagState.flag"),key:"flag",width:140},{title:i("mdm.flagState.location"),key:"location",width:140},{title:i("mdm.flagState.portOfFlag"),key:"portOfFlag",width:140},{title:i("mdm.flagState.address"),key:"address",width:140},{title:i("mdm.flagState.tel"),key:"tel",width:140},{title:i("mdm.flagState.reportTemplate"),key:"reportTemplate",width:140}],Nt=D({__name:"index",setup(J){const _=R(),{t:e}=f(),p=u(),[g,{getFieldsValue:b}]=X({gridProps:{cols:"4",xGap:"15"},labelWidth:80,schemas:L,showAdvancedButton:!1}),h=P({width:170,title:e("common.optionsText"),key:"action",fixed:"right",align:"center",render(t){return c(j,{style:"text",actions:[{label:e("common.optionsDelText"),labelShow:!1,icon:c("i",{class:"iconfont icon-Delete red"}),onPositiveClick:()=>{T(t.id)},onNegativeClick:()=>{},isConfirm:!0,confirmContent:e("mdm.flagState.delTips")+t.flag+"?"},{label:e("common.optionsEditText"),labelShow:!1,icon:c("i",{class:"iconfont icon-a-Frame28"}),onClick:x.bind(null,t)}]})}});function k(t){l()}function w(t){l()}const a=u();function y(){a.value?.showModal(),a.value.getData(null)}async function S(t,r){return G({...t,...r})}async function T(t){await z(t),_.success(e("common.optionsDelSuccessText")),l()}function l(){p.value.reload()}function x(t){a.value?.showModal(),M(()=>{a.value.setProps({title:e("common.optionsEditText")}),a.value.getData(t)})}return(t,r)=>{const C=I,d=V,v=E,B=A,F=q;return O(),N(F,null,{default:n(()=>[o(d,{bordered:!1,class:"mb-3 proCard"},{default:n(()=>[o(C,{onRegister:s(g),onSubmit:k,onReset:w},null,8,["onRegister"])]),_:1}),o(d,{bordered:!1,class:"proCard"},{default:n(()=>[o(s($),{columns:s(Z),request:m=>S(m,s(b)()),"row-key":m=>m.id,ref_key:"basicTableRef",ref:p,autoScrollX:!0,"virtual-scroll":"",actionColumn:s(h)},{tableTitle:n(()=>[o(B,null,{default:n(()=>[o(v,{type:"primary",strong:"",bordered:"",secondary:"",class:"size-7",onClick:y},{icon:n(()=>r[0]||(r[0]=[W("i",{class:"iconfont icon-ADD"},null,-1)])),_:1})]),_:1})]),_:1},8,["columns","request","row-key","actionColumn"])]),_:1}),o(H,{ref_key:"modalRef",ref:a,onSuccess:l},null,512)]),_:1})}}});export{Nt as default};
