index.249f3b.js 3.4 KB

1
  1. import{aU as l,ac as k,am as g,aR as _,ae as D,_ as w,d as R,x as h,y as S,r as s,o as y,G as C,D as m,l as B,m as f,J as P,a as M,bd as I}from"./index.js";import{u as H}from"./use-page-modal.6af4f02b.js";const{VITE_PROXY_DOMAIN_REAL:J,VITE_PROXY_USER_REAL:L}=k(),r=L+"/admin/",Y=e=>l.request("post",`${r}execstatlogadd`,{data:{...e,type:5}}),q=e=>l.request("post",`${r}execstatloglist`,{data:{...e,type:5}}),z=e=>l.request("post",`${r}execlogdel`,{data:{...e}}),N=e=>l.request("post",`${r}execstatall`,{data:{...e,type:4}}),b=[{value:"1",label:"\u5F85\u6267\u884C",type:"warning"},{value:"2",label:"\u6267\u884C\u5B8C\u6210",type:"success"},{value:"3",label:"\u6267\u884C\u5931\u8D25",type:"error"},{value:"4",label:"\u6267\u884C\u4E2D",type:""}],O=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",width:70,hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u62A5\u8868\u540D\u79F0",prop:"name"},{label:"\u6267\u884C\u7C7B\u578B",prop:"type",cellRenderer:({row:e,props:t})=>g(_,{size:t.size,type:String(e.type)==="1"?"":"success"},{default:()=>"\u7ACB\u5373\u6267\u884C"})},{label:"\u72B6\u6001",prop:"status",cellRenderer:({row:e,props:t})=>{const{type:u,label:n}=b.find(c=>String(e.status)===c.value);return g(_,{size:t.size,type:u},{default:()=>n})}},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",formatter:({addtime:e})=>D(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],V={title:"\u62A5\u8868\u7533\u8BF7\u8BB0\u5F55",columns:O,showDelete:e=>String(e.status)=="1"||String(e.status)==="3",apis:{httpList:q,httpAdd:Y,httpDelete:z}},F={colLayout:{xl:3,lg:4,md:6,sm:8,xs:12},formItems:[{field:"status",type:"select",placeholder:"\u6267\u884C\u72B6\u6001",options:b},{field:"name",type:"input",placeholder:"\u62A5\u8868\u540D\u79F0"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},$={title:"\u62A5\u8868\u7533\u8BF7",colLayout:{span:24},itemStyle:{},formItems:[{field:"id",type:"select",label:"\u62A5\u8868",labelWidth:"120px",placeholder:"\u8BF7\u9009\u62E9\u62A5\u8868",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u62A5\u8868"}],options:[],otherOptions:{disabled:!0}}]},T=R({__name:"index",setup(e){const t="warehouseRecords",u=h($),n=h([]);async function c(){const a=[],{code:i,data:p}=await N({});i===0&&p.forEach(o=>{const d={value:o.id,label:o.name,disabled:String(o.status)=="0"};a.push(d)}),n.value=a,u.value.formItems[0].options=n.value}const v={pageSearchHook:function(){return I(void 0,void 0,F)},pageModalHook:function(a){return H({pageContentRef:a,confirmCallback:({create_timer:i})=>({})})}};return S(()=>c()),(a,i)=>{const p=s("ElButton"),o=s("el-link"),d=s("PageContainer"),A=s("PageAuth");return y(),C(A,{pageName:t},{default:m(()=>[B(d,{hooks:v,"content-config":f(V),"search-config":f(F),"modal-config":u.value},{content_action:m(({status:E,down_url:x})=>[String(E)==="2"?(y(),C(o,{key:0,href:x,target:"_blank",underline:!1},{default:m(()=>[B(p,{link:"",size:"small",type:"primary",icon:f(P)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):M("v-if",!0)]),_:1},8,["content-config","search-config","modal-config"])]),_:1})}}});var W=w(T,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/reportForm/warehouseRecords/index.vue"]]);export{W as default};