company-modal.2d0ed9ba.js 2.6 KB

1
  1. import{_ as A,d as E,E as s,a6 as U,a7 as N,x as r,aA as L,o as b,N as w,K as p,b as c,y as t,O,u as x,b5 as R,W as v}from"./index.1417328f.js";import{h as j}from"./index.2abffb79.js";const H={flex:"","mb-2":""},M={flex:"","flex-1":"",gap:"5",pr:"20px"},T={flex:"",width:"120px"},q=v("\u641C\u7D22"),I=v("\u91CD\u7F6E"),K={flex:"","justify-between":"","mt-2":""},W=v("\u786E\u5B9A"),G=E({__name:"company-modal",emits:["choose"],setup(J,{expose:z,emit:h}){const g=s([]),C=s([]),u=s({name:""}),m=s(!1),d=s(!1),F=s(null),V=U(),o=N({currentPage:1,pageSize:10,total:0});async function _(){const{pageSize:l,currentPage:e}=o;m.value=!0;const{code:f,message:i,data:a}=await j({...u.value,size:l,page:e});V({code:f,message:i,handler:()=>{o.total=a.count,g.value=a.list}}),m.value=!1}function k(){d.value=!1,h("choose",x(C))}function D(l){C.value=l}function y(l=!1){l&&(u.value={name:""}),o.currentPage=1,_()}return z({onDisplay:()=>{d.value=!0}}),(l,e)=>{const f=r("el-input"),i=r("el-button"),a=r("el-table-column"),P=r("el-pagination"),S=r("el-dialog"),B=L("loading");return b(),w(S,{modelValue:d.value,"onUpdate:modelValue":e[5]||(e[5]=n=>d.value=n),title:"\u4E1A\u52A1\u516C\u53F8",center:"",width:"1040px",onOpen:e[6]||(e[6]=()=>_()),onClose:e[7]||(e[7]=()=>u.value.name="")},{default:p(()=>[c("div",H,[c("div",M,[t(f,{placeholder:"\u516C\u53F8\u540D\u79F0",size:"small",modelValue:u.value.name,"onUpdate:modelValue":e[0]||(e[0]=n=>u.value.name=n)},null,8,["modelValue"])]),c("div",T,[t(i,{size:"small",type:"primary",onClick:e[1]||(e[1]=()=>y())},{default:p(()=>[q]),_:1}),t(i,{size:"small",onClick:e[2]||(e[2]=()=>y(!0))},{default:p(()=>[I]),_:1})])]),O((b(),w(x(R),{border:"",ref_key:"tableRef",ref:F,data:g.value,size:"small","row-key":"id",onSelectionChange:D},{default:p(()=>[t(a,{type:"selection",width:"55"}),t(a,{label:"\u516C\u53F8\u7F16\u53F7",prop:"code","show-overflow-tooltip":""}),t(a,{label:"\u516C\u53F8\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),t(a,{label:"\u516C\u53F8\u7C7B\u578B",prop:"nature","show-overflow-tooltip":""})]),_:1},8,["data"])),[[B,m.value]]),c("div",K,[t(P,{"current-page":o.currentPage,"onUpdate:current-page":e[3]||(e[3]=n=>o.currentPage=n),"page-size":o.pageSize,"onUpdate:page-size":e[4]||(e[4]=n=>o.pageSize=n),total:o.total,onCurrentChange:_},null,8,["current-page","page-size","total"]),t(i,{type:"primary",size:"small",onClick:k},{default:p(()=>[W]),_:1})])]),_:1},8,["modelValue"])}}});var Y=A(G,[["__scopeId","data-v-53d4b798"],["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/interest/companyAccount/components/company-modal.vue"]]);export{Y as default};