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-oK_hln-O.js";import{B as F,u as S}from"./useTable-CDqjUv9a.js";import{T as v}from"./useForm-S2-4SPyv.js";import{ao as I,v as R,_ as $}from"./entry/index-BFpON5wd-1719886843165.js";import{u as E}from"./index-D8-pH9_c.js";import{C as A,c as M,s as N}from"./CloudFileTagDrawer-DIqdY1x6.js";import{g as V,d as b}from"./cloudFileTag-BkLoOMkR.js";import{M as L}from"./antd-V2f1Ijkg.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-B3Yl1XMW.js";import"./ExclamationCircleOutlined-CvjJlgYP.js";import"./index-eZbZN8hc.js";import"./index-Cx3rMS0Q.js";import"./useWindowSizeFn-IiF7s4QS.js";import"./plugin-DHZ68pLH.js";import"./onMountedOrActivated-Cz7FEpZo.js";import"./sortable.esm-CnNXHMH-.js";import"./index-D--g-WIs.js";import"./tree-Dcz2GpQj.js";import"./copyTextToClipboard-TytJuPBe.js";import"./useSortable-Dipa7Xkv.js";import"./index-BN89L_L8.js";import"./index-DBtUZ0LU.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 me=$(j,[["render",G]]);export{me as default};
|