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.3KB

  1. import{i as ue,j as de,h as me,k as ce}from"./evaluationPlan.30d181aa.js";import{d as fe,D as ve,r as f,b as D,z as _e,a0 as x,o as ye,c as d,e as u,f as k,h as t,i as a,j as m,g as y,I as b,t as c,k as U,F as T,J as q,x as ge}from"./index.ce13ff81.js";import be from"./userListDialog.79b82491.js";import ke from"./planProjectDialog.3454e50c.js";import{t as Ue}from"./indicatorTemplate.b9bfb258.js";const je={class:"flex justify-between"},Ce=y("span",null,"\u5217\u8868",-1),he=["onClick"],we=["onClick"],Ne=["onClick"],Le={key:1},De=["onClick"],xe={class:"dialog-footer"},Te=fe({name:"projectGroup"}),qe=Object.assign(Te,{setup(Ve){const{proxy:V}=ge(),{projectTypeOptions:X}=ve.dictStore.globalDicts||{},s=f({name:"",reAppraisalUsers:[],verificationUsers:[],projects:[],verifyLeader:void 0}),j=D({name:void 0}),z=f(),E=_e(),C=f(),H=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 x("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 x("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"}]),K={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"}]},Q=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=>x("span",X[l.projectType]||"-"),width:80},{label:"\u6A21\u677F\u7C7B\u578B",key:"templateType",prop:"templateType",render:l=>{var e,n;return x("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"}]),$=f([]),h=async(l=C.value.pageParams)=>{const e=await ue(E.query.appraisalId,{...j});$.value=e.data,console.log($)},Z=l=>{V.$messageBox.confirm(`\u786E\u5B9A\u8981\u5220\u9664\u8BE5${l.name}\u5417?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await de(l.id),h(),V.$message.success("\u5220\u9664\u6210\u529F")})},ee=()=>{h()},G=()=>{j.name=void 0,C.value.pageParams.pageNumber=1,C.value.pageParams.pageSize=10,h()},w=f(!1),A=f(""),v=f(!0),P=async(l,e)=>{var n;if(A.value="\u65B0\u589E\u5206\u7EC4",v.value=!0,l!=null&&l.id){v.value=e,A.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={};w.value=!0},I=f(""),g=D({visible:!1,data:void 0,params:{userRoleList:[]}}),B=l=>{var e;g.data=((e=s.value)==null?void 0:e[l])||[],g.params.roleCode=l==="reAppraisalUsers"?"REVIEWER":"EXPERT",I.value=l,g.visible=!0},F=()=>{g.visible=!1},ae=l=>{s.value[I.value]=l.map(e=>({...e})),F()},N=D({visible:!1,data:void 0}),le=()=>{var l;N.visible=!0,N.data=((l=s.value)==null?void 0:l.projects)||[]},S=()=>{N.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:E.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 ce(n),V.$message.success("\u63D0\u4EA4\u6210\u529F"),w.value=!1,s.value={},G()}})},R=f(),oe=async()=>{const l=await Ue();R.value=l.data};return ye(()=>{oe(),h()}),(l,e)=>{const n=d("el-input"),o=d("el-form-item"),i=d("el-col"),_=d("el-button"),L=d("el-row"),W=d("el-form"),Y=d("el-card"),J=d("table-list"),M=d("el-tag"),ne=d("el-option"),ie=d("el-select"),pe=d("el-dialog");return u(),k(T,null,[t(Y,{class:"search mb-16"},{default:a(()=>[t(W,{"label-suffix":":",model:j,size:"small"},{default:a(()=>[t(L,{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(_,{type:"primary",onClick:ee},{default:a(()=>[m("\u67E5\u8BE2")]),_:1}),t(_,{onClick:G},{default:a(()=>[m("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(Y,null,{header:a(()=>[y("div",je,[Ce,y("div",null,[t(_,{type:"primary",size:"small",icon:"plus",onClick:P},{default:a(()=>[m("\u65B0\u5EFA\u5206\u7EC4")]),_:1})])])]),default:a(()=>[t(J,{ref_key:"tableListRef",ref:C,column:H,data:$.value,pagination:!1,onGetTableData:h},{action:a(({scope:r})=>[y("a",{onClick:p=>P(r.row,!0)},"\u7F16\u8F91",8,he),y("a",{onClick:p=>P(r.row)},"\u8BE6\u60C5",8,we),y("a",{class:"text-danger",onClick:p=>Z(r.row)},"\u5220\u9664",8,Ne)]),_:1},8,["column","data"])]),_:1}),t(pe,{modelValue:w.value,"onUpdate:modelValue":e[7]||(e[7]=r=>w.value=r),title:A.value,width:"59%"},{footer:a(()=>[y("span",xe,[t(_,{onClick:e[5]||(e[5]=r=>w.value=!1)},{default:a(()=>[m("\u5173\u95ED")]),_:1}),t(_,{type:"primary",onClick:e[6]||(e[6]=r=>se(z.value))},{default:a(()=>[m(" \u63D0\u4EA4 ")]),_:1})])]),default:a(()=>[t(W,{ref_key:"formRef",ref:z,model:s.value,rules:K,"label-position":"right","label-width":"","label-suffix":":"},{default:a(()=>[t(L,{gutter:4},{default:a(()=>[t(i,{span:12},{default:a(()=>[t(o,{label:"\u5206\u7EC4\u540D\u79F0",prop:"name"},{default:a(()=>[v.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,c(s.value.name),1))]),_:1})]),_:1})]),_:1}),t(L,{gutter:4},{default:a(()=>[t(i,{span:24},{default:a(()=>[t(o,{label:"\u8BC4\u4EF7\u9879\u76EE",prop:"projects"},{default:a(()=>[t(J,{ref_key:"tableListRef",ref:C,column:Q,pagination:!1,data:s.value.projects,class:"w-full","empty-temp":!1},{action:a(({scope:r})=>[v.value?(u(),k("a",{key:0,class:"text-danger",onClick:p=>re("projects",r.$index)},"\u5220\u9664",8,De)):U("",!0)]),_:1},8,["column","data"]),y("div",null,[v.value?(u(),b(_,{key:0,icon:"plus",plain:"",type:"primary",class:"mt-16",size:"small",onClick:le},{default:a(()=>[m("\u6DFB\u52A0\u9879\u76EE")]),_:1})):U("",!0)])]),_:1})]),_:1})]),_:1}),t(L,{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(T,{key:0},q(s.value.reAppraisalUsers,(p,O)=>(u(),b(M,{key:O,class:"mr-4 mb-8"},{default:a(()=>[m(c(p.name)+" | "+c(p.orgName)+" | "+c(p.phoneNo),1)]),_:2},1024))),128)):U("",!0),v.value?(u(),b(_,{key:1,icon:"plus",plain:"",type:"primary",size:"small",onClick:e[2]||(e[2]=p=>B("reAppraisalUsers"))},{default:a(()=>[m("\u6DFB\u52A0\u590D\u8BC4\u4EBA\u5458")]),_:1})):U("",!0)]}),_:1})]),_:1})]),_:1}),t(L,{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(T,{key:0},q(s.value.verificationUsers,(p,O)=>(u(),b(M,{key:O,class:"mr-4 mb-8"},{default:a(()=>[m(c(p.name)+" | "+c(p.orgName)+" | "+c(p.phoneNo),1)]),_:2},1024))),128)):U("",!0),v.value?(u(),b(_,{key:1,icon:"plus",plain:"",type:"primary",size:"small",onClick:e[3]||(e[3]=p=>B("verificationUsers"))},{default:a(()=>[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:!v.value},{default:a(()=>[(u(!0),k(T,null,q(s.value.verificationUsers,(r,p)=>(u(),b(ne,{key:p,value:r.employeeCode,label:`${r.name} | ${r.orgName} | ${r.phoneNo}`},{default:a(()=>[m(c(r.name)+" | "+c(r.orgName)+" | "+c(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:N.visible,data:N.data,"template-type-list-data":R.value,onClose:S,onGetProjectData:te},null,8,["visible","data","template-type-list-data"])],64)}}});export{qe as default};