Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

2 lines
2.9KB

  1. import{b as T}from"./unitManage.f69733da.js";import{E as P}from"./index.311d4c6f.js";import{g as _,a as U}from"./getIsShowRegionTree.711795cd.js";import{d as O,A as S,b as w,r as c,o as V,c as t,e as v,I as C,i as e,u as m,h as a,k as D,g as u,j as R}from"./index.121be81f.js";const L=u("div",{class:"flex justify-between items-center"},[u("span",null,"\u5355\u4F4D\u5217\u8868")],-1),j=["onClick"],B=O({name:"unitManage"}),J=Object.assign(B,{setup(z){const y=S(),o=w({orgName:void 0,isCompetentUnit:void 0,isSuperiorLineCompetentUnit:void 0}),n=c(),p=c(0),E=w([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u5355\u4F4D\u540D\u79F0",key:"orgName",prop:"orgName",minWidth:200,showOverflowTooltip:!0},{label:"\u6D59\u653F\u9489\u7F16\u7801",key:"orgCode",prop:"orgCode",showOverflowTooltip:!0,minWidth:200},{label:"\u8D22\u653F\u7F16\u7801",key:"financialCode",prop:"financialCode",width:"150"},{label:"\u6240\u5C5E\u533A\u57DF",key:"regionName",prop:"regionName",width:"120"},{label:"\u64CD\u4F5C",slot:"action",width:"150",fixed:"right"}]),f=c([]),l=async(r=n.value.pageParams)=>{const s=await T({...r,...o,onlyUnit:!0});f.value=s.data.records,p.value=s.data.total},k=()=>{l()},A=()=>{o.orgName=void 0,n.value.pageParams.pageNumber=1,n.value.pageParams.pageSize=10,l()},I=r=>{o.regionId=r.regionLevel===3?r.regionCode:void 0,n.value.pageParams.pageNumber=1,l()};return V(()=>{_(["SUPER_ADMIN","REGION_MANAGER"])||l()}),(r,s)=>{const i=t("el-col"),x=t("el-input"),g=t("el-form-item"),N=t("el-button"),b=t("el-row"),G=t("el-form"),h=t("el-card"),M=t("table-list");return v(),C(b,{gutter:16},{default:e(()=>[m(_)(["SUPER_ADMIN","REGION_MANAGER"])?(v(),C(i,{key:0,style:{"padding-right":"16px"},span:4},{default:e(()=>[a(P,{params:m(U)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:I},null,8,["params"])]),_:1})):D("",!0),a(i,{span:m(_)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:e(()=>[u("div",null,[a(h,{shadow:"never",class:"search mb-16"},{default:e(()=>[a(G,{"label-suffix":":",model:o,size:"small"},{default:e(()=>[a(b,{gutter:16},{default:e(()=>[a(i,{span:8},{default:e(()=>[a(g,{label:"\u5355\u4F4D\u540D\u79F0"},{default:e(()=>[a(x,{modelValue:o.orgName,"onUpdate:modelValue":s[0]||(s[0]=d=>o.orgName=d),maxlength:"10",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),a(i,{span:16},{default:e(()=>[a(g,{class:"btn"},{default:e(()=>[a(N,{type:"primary",onClick:k},{default:e(()=>[R("\u67E5\u8BE2")]),_:1}),a(N,{onClick:A},{default:e(()=>[R("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(h,{shadow:"never"},{header:e(()=>[L]),default:e(()=>[a(M,{ref_key:"tableListRef",ref:n,column:E,data:f.value,total:p.value,onGetTableData:l},{action:e(({scope:d})=>[u("a",{onClick:W=>m(y).push({name:"unitConfiguration",query:{orgName:d.row.orgName,id:d.row.orgCode}})},"\u5355\u4F4D\u914D\u7F6E",8,j)]),_:1},8,["column","data","total"])]),_:1})])]),_:1},8,["span"])]),_:1})}}});export{J as default};