1 |
- import{_ as te,d as ae,v as ne,w as g,ad 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,b5 as ce,b2 as T}from"./index.1d5f2f42.js";import{useColumns as re}from"./columns.57ccc4f2.js";import{a as de,h as me,b as pe,c as _e}from"./addEdit.4ebd21f6.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}),w=g([]),k=g(!0),{columns:M}=re(),b=g(!1),E=g(""),L=g("add"),D=B({id:"",action_name:""}),N=g(),F=B({total:0,pageSize:15,currentPage:1,background:!0});async function H(t){const{id:n,status:f}=t,{code:m,message:p}=await me({id:n,status:f+""=="1"?"0":"1"});T({code:m,message:p,logout:A,handler:()=>d()})}async function U(t){l.page=t,await d()}async function G(t){l.size=t,l.page=1,await d()}async function J(t){const{code:n}=await pe({id:t.id});n===1&&d()}function K(t){}async function d(){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:m,count:p}=n;w.value=m!=null?m:[],F.total=p!=null?p:0,F.pageSize=l.size,F.currentPage=l.page}}),k.value=!1}async function O(){l.page=1,await d()}function S(t,n,f){E.value=t,L.value=n;const{action_name:m}=f;D.action_name=m,D.id=t,b.value=!0}const X=()=>{b.value=!1,d()},j=()=>{b.value=!1},q=t=>{!t||(t.resetFields(),l.page=1,d())};return oe(()=>{r.value=le().getMenuActions("action"),d()}),(t,n)=>{const f=u("el-option"),m=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(m,{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:O},{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:w.value,onRefresh:d},{buttons:a(()=>[r.value.includes("2")?(_(),y(v,{key:0,type:"primary",size:"small",icon:c(h)("add"),onClick:n[3]||(n[3]=o=>S("","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:w.value,columns:c(M),checkList:x,pagination:F,paginationSmall:o==="small","header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:K,onSizeChange:G,onCurrentChange:U},{operation:a(({row:i})=>[r.value.some(s=>s=="5")?(_(),y(v,{key:0,class:"reset-margin",link:"",type:"primary",size:"small",onClick:s=>S(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=>S(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=>J(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=>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(de,{itemId:E.value,isDetails:L.value,"show-model":b.value,onRefresh:X,onCancel:j,sitem:D},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 we=te(he,[["__scopeId","data-v-aa718622"],["__file","D:/work/rep-v3/report-v3/src/views/system/action/index.vue"]]);export{we as default};
|