1 |
- import{_ as te,d as ae,l as ne,m as g,a8 as B,n as oe,R as le,r as u,o as _,c as I,B as $,E as P,b as se,h as e,x as a,F as ue,y as ie,u as c,A as y,D as h,H as V,a as C,cU as ce,cR as T}from"./index.56449854.js";import{useColumns as re}from"./columns.0ba3281d.js";import{a as me,h as de,b as pe,c as _e}from"./addEdit.f961703d.js";import{a as fe}from"./status.3ccd5ebb.js";const ve={class:"main"},ge={name:"Account"},he=ae({...ge,setup(ye){const{logout:A}=ne(),r=g([]),l=B({action_name:"",status:"",page:1,size:15}),D=g([]),k=g(!0),{columns:U}=re(),F=g(!1),R=g(""),E=g("add"),S=B({id:"",action_name:""}),L=g(),b=B({total:0,pageSize:15,currentPage:1,background:!0});async function H(t){const{id:n,status:f}=t,{code:d,message:p}=await de({id:n,status:f+""=="1"?"0":"1"});T({code:d,message:p,logout:A,handler:()=>m()})}async function M(t){l.page=t,await m()}async function j(t){l.size=t,l.page=1,await m()}async function O(t){const{code:n}=await pe({id:t.id});n===1&&m()}function q(t){}async function m(){k.value=!0;const{code:t,data:n,message:f}=await _e({...l,noRela:!0});T({code:t,message:f,logout:A,handler:()=>{const{list:d,count:p}=n;D.value=d!=null?d:[],b.total=p!=null?p:0,b.pageSize=l.size,b.currentPage=l.page}}),k.value=!1}async function G(){l.page=1,await m()}function w(t,n,f){R.value=t,E.value=n;const{action_name:d}=f;S.action_name=d,S.id=t,F.value=!0}const J=()=>{F.value=!1,m()},K=()=>{F.value=!1},Q=t=>{!t||(t.resetFields(),l.page=1,m())};return oe(()=>{r.value=le().getMenuActions("action"),m()}),(t,n)=>{const f=u("el-option"),d=u("el-select"),p=u("el-form-item"),z=u("el-col"),W=u("el-input"),v=u("el-button"),X=u("el-row"),Y=u("el-form"),N=u("el-popconfirm"),Z=u("PureTable"),ee=u("NoAuth");return _(),I("div",ve,[$(se("div",null,[e(Y,{ref_key:"formRef",ref:L,model:l,size:"small","label-width":0,class:"bg-white pl-8 pt-4"},{default:a(()=>[e(X,{gutter:12},{default:a(()=>[e(z,{span:6},{default:a(()=>[e(p,{prop:"status"},{default:a(()=>[e(d,{modelValue:l.status,"onUpdate:modelValue":n[0]||(n[0]=o=>l.status=o),style:{width:"100%"},placeholder:"\u529F\u80FD\u6743\u9650\u72B6\u6001",clearable:""},{default:a(()=>[(_(!0),I(ue,null,ie(c(fe),(o,x)=>(_(),y(f,{key:"status"+o.value+x,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e(z,{span:6},{default:a(()=>[e(p,{prop:"action_name"},{default:a(()=>[e(W,{modelValue:l.action_name,"onUpdate:modelValue":n[1]||(n[1]=o=>l.action_name=o),placeholder:"\u529F\u80FD\u6743\u9650\u540D\u79F0",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),e(z,{span:6},{default:a(()=>[e(p,null,{default:a(()=>[e(v,{type:"primary",icon:c(h)("search"),loading:k.value,onClick:G},{default:a(()=>[V(" \u641C\u7D22 ")]),_:1},8,["icon","loading"]),e(v,{icon:c(h)("refresh"),onClick:n[2]||(n[2]=o=>Q(L.value))},{default:a(()=>[V(" \u91CD\u7F6E ")]),_:1},8,["icon"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),e(c(ce),{title:"\u8FD0\u8425\u8D26\u53F7\u7BA1\u7406",loading:k.value,size:"small",dataList:D.value,onRefresh:m},{buttons:a(()=>[r.value.includes("2")?(_(),y(v,{key:0,type:"primary",size:"small",icon:c(h)("add"),onClick:n[3]||(n[3]=o=>w("","add",{}))},{default:a(()=>[V(" \u65B0\u589E ")]),_:1},8,["icon"])):C("v-if",!0)]),default:a(({size:o,checkList:x})=>[e(Z,{border:"",align:"left",showOverflowTooltip:"","table-layout":"auto",size:"small",data:D.value,columns:c(U),checkList:x,pagination:b,paginationSmall:o==="small","header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:q,onSizeChange:j,onCurrentChange:M},{operation:a(({row:i})=>[r.value.some(s=>s=="5")?(_(),y(v,{key:0,class:"reset-margin",link:"",type:"primary",size:"small",onClick:s=>w(i.id,"view",i),icon:c(h)("eye-view")},null,8,["onClick","icon"])):C("v-if",!0),r.value.some(s=>s=="4")?(_(),y(v,{key:1,class:"reset-margin",link:"",type:"primary",size:"small",onClick:s=>w(i.id,"edit",i),icon:c(h)("edits")},null,8,["onClick","icon"])):C("v-if",!0),e(N,{title:"\u786E\u8BA4\u5220\u9664\u8BE5\u529F\u80FD\u6743\u9650\uFF1F",onConfirm:s=>O(i)},{reference:a(()=>[r.value.some(s=>s=="8")?(_(),y(v,{key:0,class:"reset-margin",link:"",type:"primary",size:"small",icon:c(h)("delete")},null,8,["icon"])):C("v-if",!0)]),_:2},1032,["onConfirm"]),r.value.some(s=>s=="7")&&i.status+""=="1"||r.value.some(s=>s=="6")&&i.status+""=="0"?(_(),y(N,{key:2,title:String(i.status)==="1"?"\u6539\u4E3A\u7981\u7528\uFF1F":"\u6539\u4E3A\u542F\u7528\uFF1F",onConfirm:s=>H(i)},{reference:a(()=>[e(v,{class:"reset-margin",link:"",type:"primary",size:o,icon:c(h)(String(i.status)==="1"?"close-circle-line":"checkbox-circle-line")},null,8,["size","icon"])]),_:2},1032,["title","onConfirm"])):C("v-if",!0)]),_:2},1032,["data","columns","checkList","pagination","paginationSmall"])]),_:1},8,["loading","dataList"]),e(me,{itemId:R.value,isDetails:E.value,"show-model":F.value,onRefresh:J,onCancel:K,sitem:S},null,8,["itemId","isDetails","show-model","sitem"])],512),[[P,r.value.some(o=>o=="3")]]),$(e(ee,null,null,512),[[P,!r.value.some(o=>o=="3")]])])}}});var De=te(he,[["__scopeId","data-v-aa718622"],["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/system/action/index.vue"]]);export{De as default};
|