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
3.3KB

  1. import{c as j}from"./index-b6aa4cff.js";import{r as i,a as E,b as n,c as B,d as L,f as a,h as t,e as S,i as g,F as O,k as I,C as W}from"./index-dd5fae99.js";const $={class:"flex"},q={class:"dialog-footer"},z=I({name:"provincialExamine"}),J=Object.assign(z,{setup(G,{expose:U}){const l=i({}),C=i(),w={operationManageUnitName:[{required:!0,message:"请选择业务主管部门"}]},k=o=>{C.value.validate(e=>{o(e)})},x=o=>{l.value={operationManageUnit:o.operationManageUnit,operationManageUnitName:""},o.operationManageUnit&&p(!0)},r=i(!1),y=i(),u=E({businessStripName:void 0}),M=async()=>{r.value=!0,p()},V=[{type:"selection",key:"businessStripCode",width:"60"},{label:"单位名称",key:"businessStripName",prop:"businessStripName",minWidth:"150",showOverflowTooltip:!0},{label:"单位编码",key:"businessStripCode",prop:"businessStripCode",minWidth:"150",showOverflowTooltip:!0}],v=i(),p=async o=>{const e=await j({...u});v.value=e.data,await W();const d=[];v.value&&v.value.forEach(s=>{var m,f;(((f=(m=l.value)==null?void 0:m.operationManageUnit)==null?void 0:f.split(","))||[]).includes(s.businessStripCode)&&(o?d.push(s.businessStripName):y.value.toggleRowSelect(s,!0))}),o&&(l.value.operationManageUnitName=d.join(",")||"")},h=()=>{u.businessStripName=void 0,p()},N=i([]),D=o=>{N.value=o},T=()=>{r.value=!1,l.value.operationManageUnitName=N.value.map(o=>o.businessStripName).join(","),l.value.operationManageUnit=N.value.map(o=>o.businessStripCode).join(",")};return U({validForm:k,formData:l,setFormData:x}),(o,e)=>{const d=n("el-input"),s=n("el-form-item"),b=n("el-col"),m=n("el-row"),f=n("el-form"),c=n("el-button"),F=n("table-list"),R=n("el-dialog");return B(),L(O,null,[a(f,{ref_key:"formRef",ref:C,model:l.value,rules:w,"label-position":"right","label-width":"180px","label-suffix":":","scroll-to-error":""},{default:t(()=>[a(m,{gutter:40},{default:t(()=>[a(b,{span:24},{default:t(()=>[a(s,{label:"业务主管部门(省级)",prop:"operationManageUnitName"},{default:t(()=>[a(d,{modelValue:l.value.operationManageUnitName,"onUpdate:modelValue":e[0]||(e[0]=_=>l.value.operationManageUnitName=_),placeholder:"请选择",readonly:"",onClick:M},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),a(R,{"model-value":r.value,title:"上级条线主管单位",width:"60%",onClose:e[3]||(e[3]=_=>r.value=!1)},{footer:t(()=>[S("span",q,[a(c,{onClick:e[2]||(e[2]=_=>r.value=!1)},{default:t(()=>e[6]||(e[6]=[g("关闭")])),_:1}),a(c,{type:"primary",onClick:T},{default:t(()=>e[7]||(e[7]=[g(" 提交 ")])),_:1})])]),default:t(()=>[a(f,{model:u,size:"small","label-suffix":":"},{default:t(()=>[a(m,{gutter:16,class:"mb-16"},{default:t(()=>[a(b,{span:8},{default:t(()=>[a(s,{label:"单位名称"},{default:t(()=>[a(d,{modelValue:u.businessStripName,"onUpdate:modelValue":e[1]||(e[1]=_=>u.businessStripName=_),placeholder:"请输入"},null,8,["modelValue"])]),_:1})]),_:1}),a(b,{span:16},{default:t(()=>[a(s,{class:"btn"},{default:t(()=>[S("div",$,[a(c,{type:"primary",onClick:p},{default:t(()=>e[4]||(e[4]=[g("查询")])),_:1}),a(c,{onClick:h},{default:t(()=>e[5]||(e[5]=[g("重置")])),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),a(F,{ref_key:"tableListRef",ref:y,column:V,data:v.value,pagination:!1,style:{height:"600px",overflow:"auto"},onGetTableData:p,onSelectionChange:D},null,8,["data"])]),_:1},8,["model-value"])],64)}}});export{J as default};