|
|
|
var z=Object.defineProperty,W=Object.defineProperties;var $=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var E=(l,s,e)=>s in l?z(l,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[s]=e,L=(l,s)=>{for(var e in s||(s={}))A.call(s,e)&&E(l,e,s[e]);if(V)for(var e of V(s))H.call(s,e)&&E(l,e,s[e]);return l},O=(l,s)=>W(l,$(s));var P=(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 J,d as K,G as Q,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.1d4c20f4.js";import{e as oe}from"./index.ca79dfa9.js";const ne={class:"flex"},re=K({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=Q(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,I({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([]),S=d(0),U=[{type:"selection"},{label:"\u4E1A\u52A1\u540D\u79F0",prop:"matterName",key:"matterName"},{label:"\u6240\u5C5E\u5355\u4F4D",prop:"orgName",key:"orgName"}],y=d(!1),I=(..._)=>P(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(O(L({},i),{businessName:h.businessName,orgCode:(r==null?void 0:r.join(","))||""}));k.value=v.data.data,S.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)})}),F=()=>{I()},j=d(),G=i=>{j.value=i},h=Y({businessName:void 0}),M=()=>{h.businessName=""},q=()=>{o.value.coreBusiness=j.value,y.value=!1},R=d();return s({formRef:D,formData:o}),Z(()=>e.detail,i=>{var c,n,_;i&&(e.isSupplemented&&(R.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=R.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:F},{default:t(()=>[N("\u67E5\u8BE2")]),_:1}),a(n,{onClick:M},{default:t(()=>[N("\u91CD\u7F6E")]),_:1})])]),_:1})]),_:1}),a(r,{ref_key:"tableListRef",ref:m,column:U,data:k.value,total:S.value,onSelectionChange:G,onGetTableData:I},null,8,["data","total"])]),_:1},8,["before-close","model-value"])],64)}}}),pe=J(ue,[["__file","/Users/shenkun/WorkSpace/ningda/ls-project-v2.0/src/pages/projectCollection/projectCollectionEnter/components/coreBusiness.vue"]]);export{pe as default}; |