No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

2 líneas
9.4KB

  1. import{i as ue,j as de,h as me,k as fe}from"./evaluationPlan.61fc1073.js";import{d as ve,B as ce,r as v,b as D,x as ye,Z as T,o as _e,c as d,e as u,f as k,h as t,i as a,j as m,g as _,G as b,t as f,k as U,F as V,H as O,q as ge}from"./index.a2494fc2.js";import be from"./userListDialog.6738a08f.js";import ke from"./planProjectDialog.ca101333.js";import{t as Ue}from"./indicatorTemplate.6dbb281e.js";const je={class:"flex justify-between"},Ce=["onClick"],we=["onClick"],Ne=["onClick"],Le={key:1},xe=["onClick"],De={class:"dialog-footer"},Te=ve({name:"projectGroup"}),qe=Object.assign(Te,{setup(Ve){const{proxy:$}=ge(),{projectTypeOptions:X}=ce.dictStore.globalDicts||{},s=v({name:"",reAppraisalUsers:[],verificationUsers:[],projects:[],verifyLeader:void 0}),j=D({name:void 0}),G=v(),z=ye(),C=v(),Z=D([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u5206\u7EC4\u540D\u79F0",key:"name",prop:"name",minWidth:"120",showOverflowTooltip:!0},{label:"\u590D\u8BC4\u4EBA\u5458",key:"reAppraisalUsers",prop:"reAppraisalUsers",render:l=>{var e;return T("span",(e=l.reAppraisalUsers)==null?void 0:e.map(n=>n==null?void 0:n.username).join("\u3001"))}},{label:"\u6838\u67E5\u4EBA\u5458",key:"verificationUsers",prop:"verificationUsers",render:l=>{var e;return T("span",(e=l.verificationUsers)==null?void 0:e.map(n=>n==null?void 0:n.username).join("\u3001"))}},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"150"},{label:"\u64CD\u4F5C",slot:"action",width:"200",fixed:"right"}]),J={name:[{required:!0,message:"\u8BF7\u586B\u5199",trigger:"blur"}],projects:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],reAppraisalUsers:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],verificationUsers:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],verifyLeader:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}]},K=D([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:80},{label:"\u9879\u76EE\u91D1\u989D",key:"declareAmount",prop:"declareAmount"},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrgName",prop:"buildOrgName"},{label:"\u9879\u76EE\u7C7B\u578B",key:"projectType",prop:"projectType",render:l=>T("span",X[l.projectType]||"-"),width:80},{label:"\u6A21\u677F\u7C7B\u578B",key:"templateType",prop:"templateType",render:l=>{var e,n;return T("span",((n=(e=R.value)==null?void 0:e.find(o=>o.id===l.templateType))==null?void 0:n.name)||"-")}},{label:"\u64CD\u4F5C",slot:"action",width:"80",fixed:"right"}]),A=v([]),w=async(l=C.value.pageParams)=>{const e=await ue(z.query.appraisalId,{...j});A.value=e.data,console.log(A)},Q=l=>{$.$messageBox.confirm(`\u786E\u5B9A\u8981\u5220\u9664\u8BE5${l.name}\u5417?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await de(l.id),w(),$.$message.success("\u5220\u9664\u6210\u529F")})},ee=()=>{w()},B=()=>{j.name=void 0,C.value.pageParams.pageNumber=1,C.value.pageParams.pageSize=10,w()},N=v(!1),P=v(""),c=v(!0),h=async(l,e)=>{var n;if(P.value="\u65B0\u589E\u5206\u7EC4",c.value=!0,l!=null&&l.id){c.value=e,P.value=e?"\u7F16\u8F91\u5206\u7EC4":"\u5206\u7EC4\u8BE6\u60C5";const o=await me(l.id);s.value={...o.data,reAppraisalUsers:o.data.reAppraisalUsers.map(i=>({...i,name:i.username,phoneNo:i.mobile,orgName:i.empPosUnitName})),verificationUsers:o.data.verificationUsers.map(i=>({...i,name:i.username,phoneNo:i.mobile,orgName:i.empPosUnitName})),verifyLeader:((n=o.data.verifyLeader)==null?void 0:n.employeeCode)||""}}else s.value={};N.value=!0},E=v(""),g=D({visible:!1,data:void 0,params:{userRoleList:[]}}),I=l=>{var e;g.data=((e=s.value)==null?void 0:e[l])||[],g.params.roleCode=l==="reAppraisalUsers"?"REVIEWER":"EXPERT",E.value=l,g.visible=!0},F=()=>{g.visible=!1},ae=l=>{s.value[E.value]=l.map(e=>({...e})),F()},L=D({visible:!1,data:void 0}),le=()=>{var l;L.visible=!0,L.data=((l=s.value)==null?void 0:l.projects)||[]},S=()=>{L.visible=!1},te=l=>{s.value.projects=l.map(e=>({...e})),S()},re=(l,e)=>{s.value[l].splice(e,1)},se=async l=>{!l||await l.validate(async e=>{if(e){const n={...s.value,appraisalId:z.query.appraisalId,projectCodes:s.value.projects.map(o=>o.projectCode),reAppraisalUsers:s.value.reAppraisalUsers.map(o=>o.employeeCode),verificationUsers:s.value.verificationUsers.map(o=>o.employeeCode),projects:void 0};await fe(n),$.$message.success("\u63D0\u4EA4\u6210\u529F"),N.value=!1,s.value={},B()}})},R=v(),oe=async()=>{const l=await Ue();R.value=l.data};return _e(()=>{oe(),w()}),(l,e)=>{const n=d("el-input"),o=d("el-form-item"),i=d("el-col"),y=d("el-button"),x=d("el-row"),W=d("el-form"),Y=d("el-card"),H=d("table-list"),M=d("el-tag"),ne=d("el-option"),ie=d("el-select"),pe=d("el-dialog");return u(),k(V,null,[t(Y,{class:"search mb-16"},{default:a(()=>[t(W,{"label-suffix":":",model:j,size:"small"},{default:a(()=>[t(x,{gutter:16},{default:a(()=>[t(i,{span:8},{default:a(()=>[t(o,{label:"\u5206\u7EC4\u540D\u79F0"},{default:a(()=>[t(n,{modelValue:j.name,"onUpdate:modelValue":e[0]||(e[0]=r=>j.name=r),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(i,{span:16},{default:a(()=>[t(o,{class:"btn"},{default:a(()=>[t(y,{type:"primary",onClick:ee},{default:a(()=>e[8]||(e[8]=[m("\u67E5\u8BE2")])),_:1}),t(y,{onClick:B},{default:a(()=>e[9]||(e[9]=[m("\u91CD\u7F6E")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(Y,null,{header:a(()=>[_("div",je,[e[11]||(e[11]=_("span",null,"\u5217\u8868",-1)),_("div",null,[t(y,{type:"primary",size:"small",icon:"plus",onClick:h},{default:a(()=>e[10]||(e[10]=[m("\u65B0\u5EFA\u5206\u7EC4")])),_:1})])])]),default:a(()=>[t(H,{ref_key:"tableListRef",ref:C,column:Z,data:A.value,pagination:!1,onGetTableData:w},{action:a(({scope:r})=>[_("a",{onClick:p=>h(r.row,!0)},"\u7F16\u8F91",8,Ce),_("a",{onClick:p=>h(r.row)},"\u8BE6\u60C5",8,we),_("a",{class:"text-danger",onClick:p=>Q(r.row)},"\u5220\u9664",8,Ne)]),_:1},8,["column","data"])]),_:1}),t(pe,{modelValue:N.value,"onUpdate:modelValue":e[7]||(e[7]=r=>N.value=r),title:P.value,width:"59%"},{footer:a(()=>[_("span",De,[t(y,{onClick:e[5]||(e[5]=r=>N.value=!1)},{default:a(()=>e[15]||(e[15]=[m("\u5173\u95ED")])),_:1}),t(y,{type:"primary",onClick:e[6]||(e[6]=r=>se(G.value))},{default:a(()=>e[16]||(e[16]=[m(" \u63D0\u4EA4 ")])),_:1})])]),default:a(()=>[t(W,{ref_key:"formRef",ref:G,model:s.value,rules:J,"label-position":"right","label-width":"","label-suffix":":"},{default:a(()=>[t(x,{gutter:4},{default:a(()=>[t(i,{span:12},{default:a(()=>[t(o,{label:"\u5206\u7EC4\u540D\u79F0",prop:"name"},{default:a(()=>[c.value?(u(),b(n,{key:0,modelValue:s.value.name,"onUpdate:modelValue":e[1]||(e[1]=r=>s.value.name=r),maxlength:"50",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])):(u(),k("span",Le,f(s.value.name),1))]),_:1})]),_:1})]),_:1}),t(x,{gutter:4},{default:a(()=>[t(i,{span:24},{default:a(()=>[t(o,{label:"\u8BC4\u4EF7\u9879\u76EE",prop:"projects"},{default:a(()=>[t(H,{ref_key:"tableListRef",ref:C,column:K,pagination:!1,data:s.value.projects,class:"w-full","empty-temp":!1},{action:a(({scope:r})=>[c.value?(u(),k("a",{key:0,class:"text-danger",onClick:p=>re("projects",r.$index)},"\u5220\u9664",8,xe)):U("",!0)]),_:1},8,["column","data"]),_("div",null,[c.value?(u(),b(y,{key:0,icon:"plus",plain:"",type:"primary",class:"mt-16",size:"small",onClick:le},{default:a(()=>e[12]||(e[12]=[m("\u6DFB\u52A0\u9879\u76EE")])),_:1})):U("",!0)])]),_:1})]),_:1})]),_:1}),t(x,{gutter:4},{default:a(()=>[t(i,{span:12},{default:a(()=>[t(o,{label:"\u590D\u8BC4\u4EBA\u5458",prop:"reAppraisalUsers"},{default:a(()=>{var r;return[(r=s.value.reAppraisalUsers)!=null&&r.length?(u(!0),k(V,{key:0},O(s.value.reAppraisalUsers,(p,q)=>(u(),b(M,{key:q,class:"mr-4 mb-8"},{default:a(()=>[m(f(p.name)+" | "+f(p.orgName)+" | "+f(p.phoneNo),1)]),_:2},1024))),128)):U("",!0),c.value?(u(),b(y,{key:1,icon:"plus",plain:"",type:"primary",size:"small",onClick:e[2]||(e[2]=p=>I("reAppraisalUsers"))},{default:a(()=>e[13]||(e[13]=[m("\u6DFB\u52A0\u590D\u8BC4\u4EBA\u5458")])),_:1})):U("",!0)]}),_:1})]),_:1})]),_:1}),t(x,{gutter:4},{default:a(()=>[t(i,{span:12},{default:a(()=>[t(o,{label:"\u6838\u67E5\u4EBA\u5458",prop:"verificationUsers"},{default:a(()=>{var r;return[(r=s.value.verificationUsers)!=null&&r.length?(u(!0),k(V,{key:0},O(s.value.verificationUsers,(p,q)=>(u(),b(M,{key:q,class:"mr-4 mb-8"},{default:a(()=>[m(f(p.name)+" | "+f(p.orgName)+" | "+f(p.phoneNo),1)]),_:2},1024))),128)):U("",!0),c.value?(u(),b(y,{key:1,icon:"plus",plain:"",type:"primary",size:"small",onClick:e[3]||(e[3]=p=>I("verificationUsers"))},{default:a(()=>e[14]||(e[14]=[m("\u6DFB\u52A0\u6838\u67E5\u4EBA\u5458")])),_:1})):U("",!0)]}),_:1})]),_:1}),t(i,{span:12},{default:a(()=>[t(o,{label:"\u6838\u67E5\u7EC4\u957F",prop:"verifyLeader"},{default:a(()=>[t(ie,{modelValue:s.value.verifyLeader,"onUpdate:modelValue":e[4]||(e[4]=r=>s.value.verifyLeader=r),class:"w-full",disabled:!c.value},{default:a(()=>[(u(!0),k(V,null,O(s.value.verificationUsers,(r,p)=>(u(),b(ne,{key:p,value:r.employeeCode,label:`${r.name} | ${r.orgName} | ${r.phoneNo}`},{default:a(()=>[m(f(r.name)+" | "+f(r.orgName)+" | "+f(r.phoneNo),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),t(be,{visible:g.visible,data:g.data,params:g.params,onClose:F,onGetProjectData:ae},null,8,["visible","data","params"]),t(ke,{visible:L.visible,data:L.data,"template-type-list-data":R.value,onClose:S,onGetProjectData:te},null,8,["visible","data","template-type-list-data"])],64)}}});export{qe as default};