Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

2 lignes
3.8KB

  1. import{d as O,C as H,B as N,b as J,r as b,J as Y,c as s,e as p,G as k,i as l,h as t,j as f,g as K,f as h,F as x,H as S,u as M,t as Q,Y as W,q as X}from"./index.b0d60c48.js";const Z={class:"search mb-16"},ee=O({name:"driverDialog"}),te=Object.assign(ee,{props:{visible:{type:Boolean,default:!1,required:!0},data:{type:Array,default:void 0},orgCode:{type:String,default:""}},emits:["close","getUserData"],setup(L,{emit:B}){const{proxy:D}=X(),u=L,I=H(N.userStore).roleList||{},v=B,o=J({userRoleList:void 0,name:void 0,phoneNo:void 0}),d=b(),R=b(0),T=[{type:"selection",reserveSelection:!0,width:"55"},{label:"\u59D3\u540D",key:"name",prop:"name"},{label:"\u6240\u5C5E\u5355\u4F4D\uFF08\u4E3B\u804C\uFF09",key:"orgName",prop:"orgName",showOverflowTooltip:!0,width:250},{label:"\u6240\u5C5E\u533A\u57DF",key:"regionId",prop:"regionId",width:"150"},{label:"\u7528\u6237\u89D2\u8272",slot:"userRoleList",width:200}],c=b([]),_=async(n=(e=>(e=d.value)==null?void 0:e.pageParams)())=>{const i=await W({...n,...o,orgCode:u.orgCode,status:"ENABLE"});R.value=i.data.total,c.value=i.data.records||[],u.data&&u.data.length&&c.value&&c.value.forEach(r=>{u.data.map(w=>w.id*1).includes(r.userId)&&d.value.toggleRowSelect(r,!0)})},U=()=>{_()},z=()=>{o.userRoleList=void 0,o.name=void 0,o.phoneNo=void 0,d.value.pageParams.pageNumber=1,d.value.pageParams.pageSize=10,_()},y=b([]),E=n=>{y.value=n},F=()=>{var n;((n=y.value)==null?void 0:n.length)>10?D.$messageBox.warning("\u6700\u591A\u9009\u62E910\u4F4D\u4EBA\u5458"):v("getUserData",y.value)};return Y(()=>u.visible,async n=>{n&&(_(),N.userStore.setRoleStore())}),(n,e)=>{const i=s("el-input"),r=s("el-form-item"),m=s("el-col"),w=s("el-option"),P=s("el-select"),V=s("el-row"),g=s("el-button"),$=s("el-form"),j=s("el-tag"),q=s("table-list"),A=s("el-dialog");return p(),k(A,{"model-value":L.visible,title:"\u9009\u62E9\u4EBA\u5458",width:"840px","destroy-on-close":"",onClose:e[4]||(e[4]=a=>v("close"))},{footer:l(()=>[t(g,{type:"primary",size:"small",onClick:F},{default:l(()=>e[7]||(e[7]=[f(" \u786E\u5B9A ")])),_:1}),t(g,{size:"small",onClick:e[3]||(e[3]=a=>v("close"))},{default:l(()=>e[8]||(e[8]=[f(" \u5173\u95ED ")])),_:1})]),default:l(()=>[K("div",Z,[t($,{"label-suffix":":",model:o,size:"small"},{default:l(()=>[t(V,{gutter:16,class:"mb-16"},{default:l(()=>[t(m,{span:8},{default:l(()=>[t(r,{label:"\u7528\u6237\u59D3\u540D"},{default:l(()=>[t(i,{modelValue:o.name,"onUpdate:modelValue":e[0]||(e[0]=a=>o.name=a),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(m,{span:8},{default:l(()=>[t(r,{label:"\u624B\u673A\u53F7\u7801"},{default:l(()=>[t(i,{modelValue:o.phoneNo,"onUpdate:modelValue":e[1]||(e[1]=a=>o.phoneNo=a),maxlength:"11",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(m,{span:8},{default:l(()=>[t(r,{label:"\u7528\u6237\u89D2\u8272"},{default:l(()=>[t(P,{modelValue:o.userRoleList,"onUpdate:modelValue":e[2]||(e[2]=a=>o.userRoleList=a),style:{width:"100%"},clearable:"",placeholder:"\u8BF7\u9009\u62E9"},{default:l(()=>[(p(!0),h(x,null,S(M(I),(a,C)=>(p(),k(w,{key:C,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(V,null,{default:l(()=>[t(m,{span:24},{default:l(()=>[t(r,{class:"btn"},{default:l(()=>[t(g,{type:"primary",onClick:U},{default:l(()=>e[5]||(e[5]=[f("\u67E5\u8BE2")])),_:1}),t(g,{type:"info",onClick:z},{default:l(()=>e[6]||(e[6]=[f("\u91CD\u7F6E")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),t(q,{ref_key:"tableListRef",ref:d,column:T,data:c.value,total:R.value,"row-key":"userId",onSelectionChange:E,onGetTableData:_},{userRoleList:l(({scope:a})=>[(p(!0),h(x,null,S(a.row.userRoleList,(C,G)=>(p(),k(j,{key:G,type:"info",class:"mr-4"},{default:l(()=>[f(Q(C.name),1)]),_:2},1024))),128))]),_:1},8,["data","total"])]),_:1},8,["model-value"])}}});export{te as default};