You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 line
2.9KB

  1. import{b as T}from"./unitManage.b63f6406.js";import{E as P}from"./index.532625b6.js";import{g as p,a as U}from"./getIsShowRegionTree.34dea6e8.js";import{d as O,y as S,b as v,r as _,o as V,c as o,e as C,G as h,i as e,u as m,h as a,k as D,g as u,j as R}from"./index.b0d60c48.js";const L=["onClick"],j=O({name:"unitManage"}),H=Object.assign(j,{setup(B){const y=S(),n=v({orgName:void 0,isCompetentUnit:void 0,isSuperiorLineCompetentUnit:void 0}),l=_(),f=_(0),E=v([{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"}]),c=_([]),r=async(s=l.value.pageParams)=>{const t=await T({...s,...n,onlyUnit:!0});c.value=t.data.records,f.value=t.data.total},k=()=>{r()},A=()=>{n.orgName=void 0,l.value.pageParams.pageNumber=1,l.value.pageParams.pageSize=10,r()},G=s=>{n.regionId=s.regionLevel===3?s.regionCode:void 0,l.value.pageParams.pageNumber=1,r()};return V(()=>{p(["SUPER_ADMIN","REGION_MANAGER"])||r()}),(s,t)=>{const i=o("el-col"),x=o("el-input"),g=o("el-form-item"),N=o("el-button"),b=o("el-row"),I=o("el-form"),w=o("el-card"),M=o("table-list");return C(),h(b,{gutter:16},{default:e(()=>[m(p)(["SUPER_ADMIN","REGION_MANAGER"])?(C(),h(i,{key:0,style:{"padding-right":"16px"},span:4},{default:e(()=>[a(P,{params:m(U)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:G},null,8,["params"])]),_:1})):D("",!0),a(i,{span:m(p)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:e(()=>[u("div",null,[a(w,{shadow:"never",class:"search mb-16"},{default:e(()=>[a(I,{"label-suffix":":",model:n,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:n.orgName,"onUpdate:modelValue":t[0]||(t[0]=d=>n.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(()=>t[1]||(t[1]=[R("\u67E5\u8BE2")])),_:1}),a(N,{onClick:A},{default:e(()=>t[2]||(t[2]=[R("\u91CD\u7F6E")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(w,{shadow:"never"},{header:e(()=>t[3]||(t[3]=[u("div",{class:"flex justify-between items-center"},[u("span",null,"\u5355\u4F4D\u5217\u8868")],-1)])),default:e(()=>[a(M,{ref_key:"tableListRef",ref:l,column:E,data:c.value,total:f.value,onGetTableData:r},{action:e(({scope:d})=>[u("a",{onClick:z=>m(y).push({name:"unitConfiguration",query:{orgName:d.row.orgName,id:d.row.orgCode}})},"\u5355\u4F4D\u914D\u7F6E",8,L)]),_:1},8,["column","data","total"])]),_:1})])]),_:1},8,["span"])]),_:1})}}});export{H as default};