1 |
- import{r as o,m as c,d as E}from"./index.lP_uh0LI.js";import{a as r}from"./authFunction.z5AMEiSQ.js";import"./vue.BxlDVA1H.js";const a=`${c.system}VIEWSETNAME/`;function l(t){return o({url:a,method:"get",params:t})}function m(t){return o({url:a,method:"post",data:t})}function h(t){return o({url:a+t.id+"/",method:"put",data:t})}function y(t){return o({url:a+t+"/",method:"delete",data:{id:t}})}function w(t){return E({url:a+"export_data/",params:t,method:"get"})}function A({crudExpose:t}){const i=async e=>await l(e),u=async({form:e,row:n})=>(n.id&&(e.id=n.id),await h(e)),s=async({row:e})=>await y(e.id),d=async({form:e})=>await m(e),p=async e=>await w(e);return{crudOptions:{request:{pageRequest:i,addRequest:d,editRequest:u,delRequest:s},actionbar:{buttons:{export:{show:r("VIEWSETNAME:Export"),text:"导出",title:"导出",click(){return p(t.getSearchFormData())}},add:{show:r("VIEWSETNAME:Create")}}},rowHandle:{fixed:"right",width:200,buttons:{view:{type:"primary",link:!0,order:1,show:r("VIEWSETNAME:Retrieve")},edit:{type:"primary",link:!0,order:2,show:r("VIEWSETNAME:Update")},copy:{type:"primary",link:!0,order:3,show:r("VIEWSETNAME:Copy")},remove:{type:"primary",link:!0,order:4,show:r("VIEWSETNAME:Delete")}}},columns:{}}}}export{A as default};
|