index-BdghIGTN.js 3.4 KB

1
  1. var c=(e,s,t)=>new Promise((u,r)=>{var p=o=>{try{i(t.next(o))}catch(l){r(l)}},n=o=>{try{i(t.throw(o))}catch(l){r(l)}},i=o=>o.done?u(o.value):Promise.resolve(o.value).then(p,n);i((t=t.apply(e,s)).next())});import{i as D}from"./index-CWIMkCyU.js";import{B as F,u as S}from"./useTable-yjRWbRcT.js";import{T as v}from"./index-Ctq9WGad.js";import{ao as I,v as R,_ as $}from"./entry/index-BR4aaozk-1722999832476.js";import{u as E}from"./index-C2pYGHuD.js";import{C as A,c as M,s as N}from"./CloudFileTagDrawer-GgJVQ1UL.js";import{g as V,d as b}from"./cloudFileTag-ChTVMI7m.js";import{M as L}from"./antd-BQ3qV6bI.js";import{d as O,f as w,k as f,a7 as d,_ as h,$ as U,a9 as m,a8 as k,G as y,a1 as _,ab as B}from"./vue-BNCny8i2.js";import"./ExclamationCircleOutlined-OYz2z3Y1.js";import"./useForm-BPs-bGop.js";import"./index-bMIGtX2N.js";import"./tree-Bzlcl2-1.js";import"./copyTextToClipboard-ohAWhynX.js";import"./index-CCbSIA2Z.js";import"./index-D0xvMl_A.js";import"./index-94nmOQ7g.js";import"./index-CotF8ozl.js";import"./index-Bm3tDEoh.js";import"./useWindowSizeFn-BpJljGvW.js";import"./plugin-DCXEoXS2.js";import"./onMountedOrActivated-DUkWHYas.js";import"./sortable.esm-CnNXHMH-.js";import"./useSortable-DWA54z3F.js";const j=O({name:"CloudFileTagManagement",components:{BasicTable:F,CloudFileTagDrawer:A,TableAction:v,Button:I},setup(){const{t:e}=R.useI18n(),s=w(),t=w(!1),[u,{openDrawer:r}]=E(),[p,{reload:n}]=S({title:e("fms.cloudFileTag.cloudFileTagList"),api:V,columns:M,formConfig:{labelWidth:120,schemas:N},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!1,clickToRowSelect:!1,actionColumn:{width:30,title:e("common.action"),dataIndex:"action",fixed:void 0},rowKey:"id",rowSelection:{type:"checkbox",onChange:(a,T)=>{s.value=a,t.value=a.length>0}}});function i(){r(!0,{isUpdate:!1})}function o(a){r(!0,{record:a,isUpdate:!0})}function l(a){return c(this,null,function*(){(yield b({ids:[a.id]})).code===0&&(yield n())})}function g(){return c(this,null,function*(){L.confirm({title:e("common.deleteConfirm"),icon:f(D.ExclamationCircleOutlined),onOk(){return c(this,null,function*(){(yield b({ids:s.value})).code===0&&(t.value=!1,yield n())})},onCancel(){}})})}function C(){return c(this,null,function*(){yield n()})}return{t:e,registerTable:p,registerDrawer:u,handleCreate:i,handleEdit:o,handleDelete:l,handleSuccess:C,handleBatchDelete:g,showDeleteButton:t}}});function G(e,s,t,u,r,p){const n=d("Button"),i=d("a-button"),o=d("TableAction"),l=d("BasicTable"),g=d("CloudFileTagDrawer");return h(),U("div",null,[f(l,{onRegister:e.registerTable},{tableTitle:m(()=>[e.showDeleteButton?(h(),k(n,{key:0,type:"primary",danger:"",preIcon:"ant-design:delete-outlined",onClick:e.handleBatchDelete},{default:m(()=>[y(_(e.t("common.delete")),1)]),_:1},8,["onClick"])):B("",!0)]),toolbar:m(()=>[f(i,{type:"primary",onClick:e.handleCreate},{default:m(()=>[y(_(e.t("fms.cloudFileTag.addCloudFileTag")),1)]),_:1},8,["onClick"])]),bodyCell:m(({column:C,record:a})=>[C.key==="action"?(h(),k(o,{key:0,actions:[{icon:"clarity:note-edit-line",onClick:e.handleEdit.bind(null,a)},{icon:"ant-design:delete-outlined",color:"error",popConfirm:{title:e.t("common.deleteConfirm"),placement:"left",confirm:e.handleDelete.bind(null,a)}}]},null,8,["actions"])):B("",!0)]),_:1},8,["onRegister"]),f(g,{onRegister:e.registerDrawer,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])])}const pe=$(j,[["render",G]]);export{pe as default};