| 1 |
- var Q=Object.defineProperty,Z=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var B=(n,o,t)=>o in n?Q(n,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[o]=t,R=(n,o)=>{for(var t in o||(o={}))G.call(o,t)&&B(n,t,o[t]);if(S)for(var t of S(o))H.call(o,t)&&B(n,t,o[t]);return n},x=(n,o)=>Z(n,j(o));var c=(n,o,t)=>new Promise((y,m)=>{var h=r=>{try{u(t.next(r))}catch(i){m(i)}},b=r=>{try{u(t.throw(r))}catch(i){m(i)}},u=r=>r.done?y(r.value):Promise.resolve(r.value).then(h,b);u((t=t.apply(n,o)).next())});import{d as J,al as L,r as X,k as Y,aZ as I,o as d,m as U,g as k,y as p,F as ee,v as w,w as F,t as _,q as g,f as l,ao as T,dh as V,as as te,bz as oe}from"./index-d3600154.js";import{u as ne,B as re}from"./useTable-f2c6d443.js";import{T as ae}from"./index-2e69b74a.js";import{_ as ie}from"./formDrawer.vue_vue_type_script_setup_true_lang-0e126e8a.js";import{_ as se}from"./viewDrawer.vue_vue_type_script_setup_true_lang-d2a82097.js";import{c as N,e as ce,f as le,g as ue}from"./storageRecordApi-ab6bed4a.js";import{u as $}from"./index-670a4efc.js";import{a as de,g as me}from"./index-89c06ea2.js";import{a as pe}from"./download-c8c6e0d3.js";import"./useForm-d916f71d.js";import"./index-87d6eb60.js";import"./useWindowSizeFn-89902ab2.js";import"./index-ad3d032c.js";import"./XTUpload.vue_vue_type_style_index_0_scoped_61a00cd1_lang-e5e6c9c7.js";import"./uniqBy-2d445bc4.js";import"./index-fa5e3d7c.js";import"./useContentViewHeight-ee38db3f.js";import"./componentMap-e709b4e7.js";import"./clickOutside-53868c41.js";import"./uuid-98bbe2a6.js";import"./sortable.esm-4ae27e0b.js";import"./SettingOutlined-22b7deed.js";import"./RedoOutlined-8977b36a.js";import"./index-06ce4386.js";import"./index-b06c40a8.js";import"./index-9b854704.js";import"./infraStorageConfigApi-c42ae1c7.js";const We=J({__name:"index",setup(n){L(()=>c(this,null,function*(){}));const{createConfirm:o,createMessage:t}=oe(),[y,{openDrawer:m}]=$(),[h,{openDrawer:b}]=$(),u=X([{field:"create_time",direction:"DESC"}]),[r,{reload:i,getSelectRowKeys:E}]=ne({title:" ",api:ce,rowKey:"id",columns:le,showIndexColumn:!0,rowSelection:{type:"checkbox"},formConfig:{labelWidth:120,schemas:ue,autoSubmitOnEnter:!0,baseColProps:{xs:24,sm:12,md:12,lg:8},resetButtonOptions:{preIcon:"icon-delete|iconfont"},submitButtonOptions:{preIcon:"icon-search|iconfont"}},useSearchForm:!0,bordered:!0,actionColumn:{width:200,title:"操作",dataIndex:"action"},beforeFetch:M,sortFn:A});function K(e){b(!0,{record:e})}function O(){m(!0,{isUpdate:!1})}function P(e){m(!0,{record:e,isUpdate:!0})}function C(e){return c(this,null,function*(){e?(yield N([e.id]),t.success("删除成功!"),yield i()):o({content:"你确定要删除?",iconType:"warning",onOk:()=>c(this,null,function*(){const a=E();yield N(a),t.success("删除成功!"),yield i()})})})}function q(e){return c(this,null,function*(){const a=yield de(e.id);te(a,{target:"_blank"})})}function z(e){return c(this,null,function*(){const a=yield me(e.id);yield pe({url:a})})}function A(e){e!=null&&e.order&&(e!=null&&e.columnKey)&&(u.value=[{field:e.columnKey,direction:e.order.replace(/(\w+)(end)/g,"$1").toUpperCase()}])}function M(e){return x(R({},e),{orders:u.value})}function v(W){return c(this,arguments,function*({isUpdate:e,values:a}){yield i()})}return(e,a)=>{const W=Y("router-link"),D=I("auth");return d(),U("div",null,[k(l(re),{onRegister:l(r)},{bodyCell:p(({column:f,record:s})=>[f.key==="size"?(d(),U(ee,{key:0},[w(F(s.size)+" kb ",1)],64)):_("",!0),f.key==="realName"?(d(),g(W,{key:1,title:"点击预览",to:"",onClick:fe=>q(s)},{default:p(()=>[w(F(s.realName),1)]),_:2},1032,["onClick"])):_("",!0),f.key==="action"?(d(),g(l(ae),{key:2,actions:[{auth:"storage:record:query",icon:"icon-eye|iconfont",tooltip:"查看",label:"查看",onClick:K.bind(null,s)},{auth:"storage:record:edit",icon:"icon-edit|iconfont",tooltip:"编辑",label:"编辑",onClick:P.bind(null,s)}],dropDownActions:[{auth:"storage:record:remove",icon:"icon-delete|iconfont",tooltip:"删除",label:"删除",color:"error",popConfirm:{title:"是否确认删除",placement:"left",confirm:C.bind(null,s)}},{auth:"storage:record:query",icon:"icon-cloud-download|iconfont",tooltip:"下载",label:"下载",onClick:z.bind(null,s)}]},null,8,["actions","dropDownActions"])):_("",!0)]),toolbar:p(()=>[T((d(),g(l(V),{type:"primary",onClick:O,preIcon:"icon-plus|iconfont"},{default:p(()=>[w(" 新增 ")]),_:1})),[[D,["storage:record:add"]]]),T((d(),g(l(V),{type:"primary",danger:"",onClick:a[0]||(a[0]=f=>C(null)),preIcon:"icon-delete|iconfont"},{default:p(()=>[w(" 批量删除 ")]),_:1})),[[D,["storage:record:remove"]]])]),_:1},8,["onRegister"]),k(ie,{onRegister:l(y),onSuccess:v},null,8,["onRegister"]),k(se,{onRegister:l(h),onSuccess:v},null,8,["onRegister"])])}}});export{We as default};
|