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 lines
2.8KB

  1. import{b as T}from"./unitManage-104cfe86.js";import{E as P}from"./index-29b4120c.js";import{g as p,a as U}from"./getIsShowRegionTree-21a24141.js";import{y as O,a as v,r as _,o as S,b as o,c as C,L as h,h as e,u as m,f as a,j as V,e as u,i as R,k as D}from"./index-dd5fae99.js";const L=["onClick"],j=D({name:"unitManage"}),H=Object.assign(j,{setup(B){const y=O(),n=v({orgName:void 0,isCompetentUnit:void 0,isSuperiorLineCompetentUnit:void 0}),l=_(),f=_(0),E=v([{label:"序号",type:"index",width:"80"},{label:"单位名称",key:"orgName",prop:"orgName",minWidth:200,showOverflowTooltip:!0},{label:"浙政钉编码",key:"orgCode",prop:"orgCode",showOverflowTooltip:!0,minWidth:200},{label:"财政编码",key:"financialCode",prop:"financialCode",width:"150"},{label:"所属区域",key:"regionName",prop:"regionName",width:"120"},{label:"操作",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()},x=s=>{n.regionId=s.regionLevel===3?s.regionCode:void 0,l.value.pageParams.pageNumber=1,r()};return S(()=>{p(["SUPER_ADMIN","REGION_MANAGER"])||r()}),(s,t)=>{const i=o("el-col"),G=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:x},null,8,["params"])]),_:1})):V("",!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:"单位名称"},{default:e(()=>[a(G,{modelValue:n.orgName,"onUpdate:modelValue":t[0]||(t[0]=d=>n.orgName=d),maxlength:"10",placeholder:"请输入"},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("查询")])),_:1}),a(N,{onClick:A},{default:e(()=>t[2]||(t[2]=[R("重置")])),_: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,"单位列表")],-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}})},"单位配置",8,L)]),_:1},8,["column","data","total"])]),_:1})])]),_:1},8,["span"])]),_:1})}}});export{H as default};