fuyang-jieshou/dist/assets/index-DwxNDYe5.js

2 lines
3.2 KiB
JavaScript

import{_ as M,a as N}from"./reset-C9wGeSio.js";import{B as L,_ as q,v as G,a as v,r as m,o as W,b as d,c as f,d as y,e as t,f as e,w as l,g as I,F as $,n as j,t as A,H,i as R,I as U,p as J,j as K,z as O,E as C,q as Q}from"./index-B9cYO4uo.js";const X=s=>L("/api/GetLogList",s),Y=s=>L("/api/DeleteLog",s),u=s=>(J("data-v-0dbc9791"),s=s(),K(),s),Z={class:"PageContent"},ee={class:"WebToolbar"},te={class:"FormComponent"},ae={class:"ButtonAssembly"},oe=u(()=>t("img",{src:M,alt:""},null,-1)),ne=u(()=>t("span",null,"查询",-1)),le=u(()=>t("img",{src:N,alt:""},null,-1)),se=u(()=>t("span",null,"重置",-1)),ce={class:"Tabulation"},ie=u(()=>t("div",{class:"actionBar"},[t("h1",null,"日志列表"),t("div",{class:"Worktop"})],-1)),re={class:"ExaminationForm"},de={__name:"index",setup(s){G();const r=v({}),n=v({PageIndex:1,PageSize:10}),b=m(0),P=m([{label:"新增"},{label:"编辑"},{label:"删除"},{label:"登录"}]),h=m([]);function T(a){if(a!=-1)return(n.PageIndex-1)*n.PageSize+a+1}function z(){n.PageIndex=1,_()}function S(){r.PageIndex=1,r.PageSize=10,r.LogType="",_()}const B=a=>{n.PageSize=a,_()},k=a=>{n.PageIndex=a,_()};function _(){let a={PageIndex:n.PageIndex,PageSize:n.PageSize,LogType:r.LogType};X(a).then(o=>{o.code==0&&(h.value=o.data.data,b.value=o.data.total)}).catch(o=>{console.log(o)})}function w(a){let o={LogId:a.LogId};O.confirm("确定要删除吗?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Y(o).then(c=>{c.code==0?(C({message:"删除成功",type:"success"}),_()):C.error((c==null?void 0:c.data)||"删除失败")}).catch(c=>{console.log(c)})})}return W(()=>{_()}),(a,o)=>{const c=d("el-option"),D=d("el-select"),E=d("el-form-item"),F=d("el-form"),g=d("el-button"),p=d("el-table-column"),V=d("el-pagination");return f(),y("div",Z,[t("div",ee,[t("div",te,[e(F,{inline:!0,model:r,class:"demo-form-inline"},{default:l(()=>[e(E,{label:"通知类型"},{default:l(()=>[e(D,{modelValue:r.LogType,"onUpdate:modelValue":o[0]||(o[0]=i=>r.LogType=i),placeholder:"请选择通知类型",clearable:""},{default:l(()=>[(f(!0),y($,null,j(P.value,(i,x)=>(f(),Q(c,{label:i.label,value:i.label,key:x},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),t("div",ae,[e(g,{style:{color:"#fff"},onClick:z},{default:l(()=>[oe,ne]),_:1}),e(g,{style:{color:"#1d2129"},onClick:S},{default:l(()=>[le,se]),_:1})])]),t("div",ce,[ie,t("div",re,[e(I(U),{ref:"multipleTableRef",data:h.value,style:{width:"100%"}},{default:l(()=>[e(p,{label:"序号",width:"80px",align:"center"},{default:l(i=>[t("span",null,A(T(i.$index)),1)]),_:1}),e(p,{property:"LogType",label:"通知类型",align:"center"}),e(p,{property:"CreateTime",label:"产生时间",align:"center"}),e(p,{property:"Content",label:"内容",align:"center"}),e(p,{property:"",label:"操作",align:"center"},{default:l(i=>[e(g,{size:"mini",type:"text",icon:I(H),onClick:x=>w(i.row)},{default:l(()=>[R("删除")]),_:2},1032,["icon","onClick"])]),_:1})]),_:1},8,["data"]),e(V,{"current-page":n.PageIndex,"page-size":n.PageSize,small:a.small,layout:"total, prev, pager, next",total:b.value,onSizeChange:B,onCurrentChange:k},null,8,["current-page","page-size","small","total"])])])])}}},ue=q(de,[["__scopeId","data-v-0dbc9791"]]);export{ue as default};