|
|
|
|
|
var z=Object.defineProperty,J=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var P=(l,s,e)=>s in l?z(l,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[s]=e,E=(l,s)=>{for(var e in s||(s={}))$.call(s,e)&&P(l,e,s[e]);if(V)for(var e of V(s))A.call(s,e)&&P(l,e,s[e]);return l},L=(l,s)=>J(l,K(s));var M=(l,s,e)=>new Promise((x,o)=>{var D=u=>{try{B(e.next(u))}catch(m){o(m)}},w=u=>{try{B(e.throw(u))}catch(m){o(m)}},B=u=>u.done?x(u.value):Promise.resolve(u.value).then(D,w);B((e=e.apply(l,s)).next())});import{_ as H,d as Q,G as W,D as X,r as d,b as Y,L as Z,c as f,e as ee,f as ae,i as a,j as t,k as N,g as se,F as te,N as le}from"./index.40636307.js";import{e as oe}from"./index.f7e8519e.js";const ne={class:"flex"},re=Q({name:"coreBusiness"}),ue=Object.assign(re,{props:{detail:{type:Object},basicInfoData:{type:Object},isSupplemented:{type:Boolean,default:!1}},setup(l,{expose:s}){const e=l,x=W(X.userStore).userInfo||{},o=d({}),D=d(),w={coreBusiness:[{required:!1,message:"\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u6838\u5FC3\u4E1A\u52A1"}]},B=()=>{y.value=!0,j({pageNumber:1,pageSize:10},!0)},u=[{type:"index",label:"\u5E8F\u53F7",width:60},{label:"\u4E1A\u52A1\u540D\u79F0",key:"matterName",prop:"matterName"},{label:"\u6240\u5C5E\u5355\u4F4D",key:"orgName",prop:"orgName"}],m=d(),k=d([]),I=d(0),O=[{type:"selection"},{label:"\u4E1A\u52A1\u540D\u79F0",prop:"matterName",key:"matterName"},{label:"\u6240\u5C5E\u5355\u4F4D",prop:"orgName",key:"orgName"}],y=d(!1),j=(..._)=>M(this,[..._],function*(i=(n=>(n=m.value)==null?void 0:n.pageParams)(),c){var p,b;var r=[];(p=e==null?void 0:e.basicInfoData)!=null&&p.baseManDeprtDing&&r.push(e.basicInfoData.baseManDeprtDing),(b=e==null?void 0:e.basicInfoData)!=null&&b.baseBuildDeprtDing&&r.push(e.basicInfoData.baseBuildDeprtDing);const v=yield oe(L(E({},i),{businessName:h.businessName,orgCode:(r==null?void 0:r.join(","))||""}));k.value=v.data.data,I.value=v.data.total,yield le(),c&&k.value&&k.value.forEach(C=>{(o.value.coreBusiness&&o.value.coreBusiness.map(g=>g.id*1)||[]).includes(C.id)?m.value.toggleRowSelect(C,!0):m.value.toggleRowSelect(C,!1)})}),U=()=>{j()},R=d(),F=i=>{R.value=i},h=Y({businessName:void 0}),G=()=>{h.businessName=""},q=()=>{o.value.coreBusiness=R.value,y.value=!1},S=d();return s({formRef:D,formData:o}),Z(()=>e.detail,i=>{var c,n,_;i&&(e.isSupplemented&&(S.value=i.apply),o.value={coreBusiness:((_=(n=(c=i.apply)==null?void 0:c.baseCoreBusinessCode)==null?void 0:n.split("\uFF1B"))==null?void 0:_.map((r,v)=>{var p,b;return{id:r,matterName:(b=(p=i.apply)==null?void 0:p.baseCoreBusiness)==null?void 0:b.split("\uFF1B")[v],orgName:x.value.empPosUnitName}}))||[]})}),(i,c)=>{const n=f("el-button"),_=f("el-col"),r=f("table-list"),v=f("el-form-item"),p=f("el-row"),b=f("el-form"),C=f("el-input"),T=f("el-dialog");return ee(),ae(te,null,[a(b,{ref_key:"formRef",ref:D,model:o.value,rules:w,"label-position":"right","label-width":"0","label-suffix":":","scroll-to-error":""},{default:t(()=>[a(p,{gutter:40},{default:t(()=>[a(_,{span:24,class:"mb-16"},{default:t(()=>{var g;return[a(n,{type:"primary",class:"float-right",disabled:((g=S.value)==null?void 0:g.baseCoreBusinessCode)&&l.isSupplemented,onClick:B},{default:t(()=>[N(" \u9009\u62E9\u6838\u5FC3\u4E1A\u52A1 ")]),_:1},8,["disabled"])]}),_:1}),a(_,{span:24},{default:t(()=>[a(v,null,{default:t(()=>[a(r,{pagination:!1,style:{width:"100%"},column:u,data:o.value.coreBusiness,"empty-temp":!1},null,8,["data"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),a(T,{title:"\u9009\u62E9\u6838\u5FC3\u4E1A\u52A1","close-on-click-modal":!1,"before-close":()=>y.value=!1,"model-value":y.value,width:"700px"},{footer:t(()=>[a(n,{type:"primary",onClick:q},{default:t(()=>[N(" \u63D0\u4EA4 ")]),_:1}),a(n,{onClick:c[1]||(c[1]=g=>y.value=!1)},{default:t(()=>[N(" \u5173\u95ED ")]),_:1})]),default:t(()=>[a(p,{style:{"margin-bottom":"16px"},gutter:20},{default:t(()=>[a(_,{span:12},{default:t(()=>[a(C,{modelValue:h.businessName,"onUpdate:modelValue":c[0]||(c[0]=g=>h.businessName=g),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1}),a(_,{span:12},{default:t(()=>[se("div",ne,[a(n,{type:"primary",onClick:U},{default:t(()=>[N("\u67E5\u8BE2")]),_:1}),a(n,{onClick:G},{default:t(()=>[N("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1}),a(r,{ref_key:"tableListRef",ref:m,column:O,data:k.value,total:I.value,onSelectionChange:F,onGetTableData:j},null,8,["data","total"])]),_:1},8,["before-close","model-value"])],64)}}}),pe=H(ue,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/projectCollection/projectCollectionEnter/components/coreBusiness.vue"]]);export{pe as default}; |