|
- import{r as x,B as F,C as M,b as m,c as u,L as d,a4 as O,h as l,e as f,f as t,i as r,N as T,t as p,d as R,F as w,j as q,k as L,s as z}from"./index-dd5fae99.js";import{j as A,b as G}from"./expertStore-7d1ebc1f.js";const H={class:"dialog-footer"},J=L({name:"evaluateDialog"}),Q=Object.assign(J,{props:{visible:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},isEdit:{type:Boolean,default:!0}},emits:["close"],setup(s,{expose:B,emit:U}){const{proxy:j}=z(),b=s,E=U,a=x({}),y=x(),D={score:[{required:!0,message:"请输入"}],attended:[{required:!0,message:"请选择"}],performance:[{required:!0,message:"请选择"}],advised:[{required:!0,message:"请选择"}],leaveEarly:[{required:!0,message:"请选择"}],brokeRule:[{required:!0,message:"请选择"}],brokeRuleContent:[{required:!0,message:"请选择"}]},g=x(!1),I=async v=>{v&&await v.validate(async e=>{if(e){g.value=!0;try{const V={...a.value};await A(V),j.$message.success("提交成功!"),g.value=!1,E("close",!0)}catch{g.value=!1}}})},N=async()=>{const v=await G(b.data.meetingExpertId);a.value={...v.data}};return F(()=>b.visible,async v=>{v&&(await M(),y.value.clearValidate(),a.value={meetingExpertId:b.data.meetingExpertId,meetingId:b.data.meetingId},b.isEdit||N())}),B({formRef:y}),(v,e)=>{const V=m("el-input-number"),n=m("el-form-item"),i=m("el-radio"),k=m("el-radio-group"),_=m("el-input"),$=m("el-form"),C=m("el-button"),S=m("el-dialog");return u(),d(S,{"model-value":s.visible,title:s.isEdit?"履职评价":"查看评价",onClose:e[10]||(e[10]=o=>E("close"))},O({default:l(()=>[t($,{ref_key:"formRef",ref:y,model:a.value,rules:D,"label-suffix":":"},{default:l(()=>[s.isEdit?(u(),d(n,{key:0,label:"评分",prop:"score"},{default:l(()=>[t(V,{modelValue:a.value.score,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value.score=o),placeholder:"请对该专家在本次会议的表现进行评分,最低0分,满分10分",min:0,max:10,controls:!1,onMousewheel:e[1]||(e[1]=T(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1})):(u(),d(n,{key:1,label:"评分"},{default:l(()=>[f("span",null,p(a.value.score),1)]),_:1})),s.isEdit?(u(),d(n,{key:2,label:"专家是否参加",prop:"attended"},{default:l(()=>[t(k,{modelValue:a.value.attended,"onUpdate:modelValue":e[2]||(e[2]=o=>a.value.attended=o)},{default:l(()=>[t(i,{label:1},{default:l(()=>e[11]||(e[11]=[r("准时参加")])),_:1}),t(i,{label:2},{default:l(()=>e[12]||(e[12]=[r("迟到")])),_:1}),t(i,{label:3},{default:l(()=>e[13]||(e[13]=[r("缺席")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:3,label:"专家是否参加"},{default:l(()=>[f("span",null,p(a.value.attended===1?"准时参加":a.value.attended===2?"迟到":"缺席"),1)]),_:1})),a.value.attended!==3?(u(),R(w,{key:4},[s.isEdit?(u(),d(n,{key:0,label:"专家参与程度",prop:"performance"},{default:l(()=>[t(k,{modelValue:a.value.performance,"onUpdate:modelValue":e[3]||(e[3]=o=>a.value.performance=o)},{default:l(()=>[t(i,{label:1},{default:l(()=>e[14]||(e[14]=[r("积极")])),_:1}),t(i,{label:2},{default:l(()=>e[15]||(e[15]=[r("消极")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:1,label:"专家参与程度"},{default:l(()=>[f("span",null,p(a.value.performance===1?"积极":a.value.performance===2?"消极":"-"),1)]),_:1})),s.isEdit?(u(),d(n,{key:2,label:"专家是否提出专业建议",prop:"advised"},{default:l(()=>[t(k,{modelValue:a.value.advised,"onUpdate:modelValue":e[4]||(e[4]=o=>a.value.advised=o)},{default:l(()=>[t(i,{label:!0},{default:l(()=>e[16]||(e[16]=[r("有提出")])),_:1}),t(i,{label:!1},{default:l(()=>e[17]||(e[17]=[r("未提出")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:3,label:"专家是否提出专业建议"},{default:l(()=>[f("span",null,p(a.value.advised?"有提出":"未提出"),1)]),_:1})),s.isEdit?(u(),d(n,{key:4,label:" 专家是否早退",prop:"leaveEarly"},{default:l(()=>[t(k,{modelValue:a.value.leaveEarly,"onUpdate:modelValue":e[5]||(e[5]=o=>a.value.leaveEarly=o)},{default:l(()=>[t(i,{label:!1},{default:l(()=>e[18]||(e[18]=[r("未早退")])),_:1}),t(i,{label:!0},{default:l(()=>e[19]||(e[19]=[r("早退")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:5,label:"专家是否早退"},{default:l(()=>[f("span",null,p(a.value.leaveEarly?"早退":"未早退"),1)]),_:1})),s.isEdit?(u(),d(n,{key:6,label:"专家有无违规行为",prop:"brokeRule"},{default:l(()=>[t(k,{modelValue:a.value.brokeRule,"onUpdate:modelValue":e[6]||(e[6]=o=>a.value.brokeRule=o)},{default:l(()=>[t(i,{label:!1},{default:l(()=>e[20]||(e[20]=[r("无")])),_:1}),t(i,{label:!0},{default:l(()=>e[21]||(e[21]=[r("有")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:7,label:"专家有无违规行为"},{default:l(()=>[f("span",null,p(a.value.brokeRule?"有":"无"),1)]),_:1})),a.value.brokeRule?(u(),R(w,{key:8},[s.isEdit?(u(),d(n,{key:0,label:"违规行为",prop:"brokeRuleContent"},{default:l(()=>[t(_,{modelValue:a.value.brokeRuleContent,"onUpdate:modelValue":e[7]||(e[7]=o=>a.value.brokeRuleContent=o),placeholder:"请填写",type:"textarea",maxlength:200,"show-word-limit":""},null,8,["modelValue"])]),_:1})):(u(),d(n,{key:1,label:"违规行为"},{default:l(()=>[f("span",null,p(a.value.brokeRuleContent),1)]),_:1}))],64)):q("",!0)],64)):q("",!0)]),_:1},8,["model"])]),_:2},[s.isEdit?{name:"footer",fn:l(()=>[f("span",H,[t(C,{type:"primary",loading:g.value,onClick:e[8]||(e[8]=o=>I(y.value))},{default:l(()=>e[22]||(e[22]=[r("提交")])),_:1},8,["loading"]),t(C,{onClick:e[9]||(e[9]=o=>E("close"))},{default:l(()=>e[23]||(e[23]=[r("关闭")])),_:1})])]),key:"0"}:void 0]),1032,["model-value","title"])}}});export{Q as default};
|