import{B as E}from"./Table-0PViRYCf.js";import{_ as B}from"./TableAction.vue_vue_type_script_setup_true_lang-Bj_Y4LtN.js";import{d as M,_ as S,g as P}from"./CreateModal.vue_vue_type_script_setup_true_lang-BlfrntGR.js";import{V as d,d as R,u as V,r as a,a as I,Z as c,ac as O,h as A,o as $,j as n,w as i,l as u,H as j,aI as q,p as z,B as F,i as H,W as L}from"./index-9PRMimni.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"./BasicForm-dL_oCSPM.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";import"./useForm-CKmgcynv.js";const{t:l}=d(),W=[{title:"No.",key:"num",width:60,render:(_,e)=>e+1},{title:l("sysDoc.doc.chineseName"),key:"companyNameCn",width:200},{title:l("sysDoc.doc.englishName"),key:"companyNameEn",width:200},{title:l("sysDoc.doc.shortName"),key:"companyNameShort",width:140},{title:l("sysDoc.doc.createTime"),width:140,key:"createTime",align:"center"}],Et=R({__name:"index",setup(_){const{t:e}=d(),f=V(),m=a(),o=a(),y=a(),r=a(!1),g=a(""),b=I({width:140,title:e("common.optionsText"),key:"action",fixed:"right",align:"center",render(t){return c(B,{style:"text",actions:[{label:e("common.optionsEditText"),labelShow:!1,icon:c("i",{class:"iconfont icon-a-Frame28"}),onClick:k.bind(null,t)},{label:e("common.optionsDelText"),onPositiveClick:()=>{T(t.id)},labelShow:!1,icon:c("i",{class:"iconfont icon-Delete red"}),onNegativeClick:()=>{},isConfirm:!0,confirmContent:e("common.delPop.cont")}]})}}),v=async()=>{const t=await P();return y.value=t,{list:t}};function p(){m.value.reload()}function k(t){t.mobile=parseInt(t.mobile),o.value.openModal(),O(()=>{r.value=!0,o.value.setProps({title:e("common.optionsEditText")+" DOC"}),o.value.getData(t)})}function D(){r.value=!1,o.value.setProps({title:e("common.addText")+" DOC"}),o.value.getData(null),o.value.openModal()}async function T(t){await M(t),f.success(e("common.optionsDelSuccessText")),p()}return(t,s)=>{const h=F,w=q,x=j,C=L;return $(),A("div",null,[n(C,{bordered:!1,class:"proCard"},{default:i(()=>[n(u(E),{columns:u(W),request:v,"row-key":N=>N.id,ref_key:"basicTableRef",ref:m,actionColumn:b,autoScrollX:!0,"virtual-scroll":"",pagination:!1},{tableTitle:i(()=>[n(x,null,{default:i(()=>[n(w,{trigger:"hover"},{trigger:i(()=>[n(h,{type:"primary",strong:"",bordered:"",secondary:"",class:"size-7",onClick:D},{icon:i(()=>s[0]||(s[0]=[H("i",{class:"iconfont icon-ADD"},null,-1)])),_:1})]),default:i(()=>[s[1]||(s[1]=z(" Add "))]),_:1})]),_:1})]),_:1},8,["columns","row-key","actionColumn"])]),_:1}),n(S,{ref_key:"createModalRef",ref:o,title:g.value,isEdit:r.value,onSuccess:p},null,8,["title","isEdit"])])}}});export{Et as default};
