1 |
- var c=(e,s,t)=>new Promise((d,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?d(o.value):Promise.resolve(o.value).then(p,n);i((t=t.apply(e,s)).next())});import{i as D}from"./index-BQgPd3bX.js";import{B as F,u as S}from"./useTable-B6PunZL5.js";import{T as v}from"./index-BIj58_Cj.js";import{ao as I,v as R,_ as $}from"./entry/index-DJx93RYF-1731481145019.js";import{u as E}from"./index-CzIUqxsa.js";import{C as A,c as M,s as N}from"./CloudFileTagDrawer-BN4yow97.js";import{g as V,d as b}from"./cloudFileTag-DFmYgOBa.js";import{M as L}from"./antd-CBeLo_oO.js";import{d as O,f as w,k as f,a9 as m,_ as h,$ as U,a7 as u,a6 as k,G as _,a2 as y,a0 as B}from"./vue-B5pbXMv7.js";import"./ExclamationCircleOutlined-Ca0mYuiu.js";import"./useForm-pwHPrILC.js";import"./index-D_SNX-7K.js";import"./tree-BtJaOqz0.js";import"./copyTextToClipboard-Dngb1Nn3.js";import"./index-BDsRYE32.js";import"./index-wDJjh9Os.js";import"./index-BzfGKMh3.js";import"./index-DkGmfgEA.js";import"./index-Cuu0w1HY.js";import"./useWindowSizeFn-BxA6-zLj.js";import"./plugin-C2XGVjF6.js";import"./uuid-BUBnBT7J.js";import"./onMountedOrActivated-C3HH8-CK.js";import"./sortable.esm-BEDva30o.js";import"./useSortable-lvT7rWOs.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),[d,{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 C(){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 g(){return c(this,null,function*(){yield n()})}return{t:e,registerTable:p,registerDrawer:d,handleCreate:i,handleEdit:o,handleDelete:l,handleSuccess:g,handleBatchDelete:C,showDeleteButton:t}}});function G(e,s,t,d,r,p){const n=m("Button"),i=m("a-button"),o=m("TableAction"),l=m("BasicTable"),C=m("CloudFileTagDrawer");return h(),U("div",null,[f(l,{onRegister:e.registerTable},{tableTitle:u(()=>[e.showDeleteButton?(h(),k(n,{key:0,type:"primary",danger:"",preIcon:"ant-design:delete-outlined",onClick:e.handleBatchDelete},{default:u(()=>[_(y(e.t("common.delete")),1)]),_:1},8,["onClick"])):B("",!0)]),toolbar:u(()=>[f(i,{type:"primary",onClick:e.handleCreate},{default:u(()=>[_(y(e.t("fms.cloudFileTag.addCloudFileTag")),1)]),_:1},8,["onClick"])]),bodyCell:u(({column:g,record:a})=>[g.key==="action"?(h(),k(o,{key:0,actions:[{label:"编辑",onClick:e.handleEdit.bind(null,a)},{label:"删除",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(C,{onRegister:e.registerDrawer,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])])}const fe=$(j,[["render",G]]);export{fe as default};
|