1 |
- import{_ as te,d as ae,v as ne,w as g,ae as B,x as oe,X as le,r as u,o as _,c as I,H as $,K as P,b as se,l as e,C as a,F as ue,D as ie,u as c,G as y,J as h,M as V,a as C,b6 as ce,b3 as T}from"./index.ab2ff1c1.js";import{useColumns as re}from"./columns.c0b7edf4.js";import{a as me,h as de,b as pe,c as _e}from"./addEdit.68b1533f.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:M}=re(),b=g(!1),E=g(""),L=g("add"),S=B({id:"",action_name:""}),N=g(),F=B({total:0,pageSize:15,currentPage:1,background:!0});async function U(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 H(t){l.page=t,await m()}async function j(t){l.size=t,l.page=1,await m()}async function G(t){const{code:n}=await pe({id:t.id});n===1&&m()}function J(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:[],F.total=p!=null?p:0,F.pageSize=l.size,F.currentPage=l.page}}),k.value=!1}async function K(){l.page=1,await m()}function w(t,n,f){E.value=t,L.value=n;const{action_name:d}=f;S.action_name=d,S.id=t,b.value=!0}const O=()=>{b.value=!1,m()},X=()=>{b.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"),Q=u("el-input"),v=u("el-button"),W=u("el-row"),Y=u("el-form"),R=u("el-popconfirm"),Z=u("PureTable"),ee=u("NoAuth");return _(),I("div",ve,[$(se("div",null,[e(Y,{ref_key:"formRef",ref:N,model:l,size:"small","label-width":0,class:"bg-white pl-8 pt-4"},{default:a(()=>[e(W,{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(Q,{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:K},{default:a(()=>[V(" \u641C\u7D22 ")]),_:1},8,["icon","loading"]),e(v,{icon:c(h)("refresh"),onClick:n[2]||(n[2]=o=>q(N.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(M),checkList:x,pagination:F,paginationSmall:o==="small","header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:J,onSizeChange:j,onCurrentChange:H},{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(R,{title:"\u786E\u8BA4\u5220\u9664\u8BE5\u529F\u80FD\u6743\u9650\uFF1F",onConfirm:s=>G(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(R,{key:2,title:String(i.status)==="1"?"\u6539\u4E3A\u7981\u7528\uFF1F":"\u6539\u4E3A\u542F\u7528\uFF1F",onConfirm:s=>U(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:E.value,isDetails:L.value,"show-model":b.value,onRefresh:O,onCancel:X,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/a/Desktop/projects/report-v3/src/views/system/action/index.vue"]]);export{De as default};
|