You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
6.1KB

  1. import{d as T,r as x,J as F,L as M,c as m,e as u,G as d,a3 as O,i as l,g as f,h as t,j as r,T as G,t as p,f as R,F as w,k as q,q as J}from"./index.88314652.js";import{j as L,b as z}from"./expertStore.71b9aeda.js";const A={class:"dialog-footer"},H=T({name:"evaluateDialog"}),Q=Object.assign(H,{props:{visible:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},isEdit:{type:Boolean,default:!0}},emits:["close"],setup(s,{expose:U,emit:j}){const{proxy:B}=J(),b=s,E=j,a=x({}),y=x(),D={score:[{required:!0,message:"\u8BF7\u8F93\u5165"}],attended:[{required:!0,message:"\u8BF7\u9009\u62E9"}],performance:[{required:!0,message:"\u8BF7\u9009\u62E9"}],advised:[{required:!0,message:"\u8BF7\u9009\u62E9"}],leaveEarly:[{required:!0,message:"\u8BF7\u9009\u62E9"}],brokeRule:[{required:!0,message:"\u8BF7\u9009\u62E9"}],brokeRuleContent:[{required:!0,message:"\u8BF7\u9009\u62E9"}]},g=x(!1),I=async v=>{!v||await v.validate(async e=>{if(e){g.value=!0;try{const V={...a.value};await L(V),B.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),g.value=!1,E("close",!0)}catch{g.value=!1}}})},N=async()=>{const v=await z(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())}),U({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?"\u5C65\u804C\u8BC4\u4EF7":"\u67E5\u770B\u8BC4\u4EF7",onClose:e[10]||(e[10]=o=>E("close"))},O({default:l(()=>[t($,{ref_key:"formRef",ref:y,model:a.value,rules:D,"label-suffix":"\uFF1A"},{default:l(()=>[s.isEdit?(u(),d(n,{key:0,label:"\u8BC4\u5206",prop:"score"},{default:l(()=>[t(V,{modelValue:a.value.score,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value.score=o),placeholder:"\u8BF7\u5BF9\u8BE5\u4E13\u5BB6\u5728\u672C\u6B21\u4F1A\u8BAE\u7684\u8868\u73B0\u8FDB\u884C\u8BC4\u5206\uFF0C\u6700\u4F4E0\u5206\uFF0C\u6EE1\u520610\u5206",min:0,max:10,controls:!1,onMousewheel:e[1]||(e[1]=G(()=>{},["prevent"]))},null,8,["modelValue"])]),_:1})):(u(),d(n,{key:1,label:"\u8BC4\u5206"},{default:l(()=>[f("span",null,p(a.value.score),1)]),_:1})),s.isEdit?(u(),d(n,{key:2,label:"\u4E13\u5BB6\u662F\u5426\u53C2\u52A0",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("\u51C6\u65F6\u53C2\u52A0")])),_:1}),t(i,{label:2},{default:l(()=>e[12]||(e[12]=[r("\u8FDF\u5230")])),_:1}),t(i,{label:3},{default:l(()=>e[13]||(e[13]=[r("\u7F3A\u5E2D")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:3,label:"\u4E13\u5BB6\u662F\u5426\u53C2\u52A0"},{default:l(()=>[f("span",null,p(a.value.attended===1?"\u51C6\u65F6\u53C2\u52A0":a.value.attended===2?"\u8FDF\u5230":"\u7F3A\u5E2D"),1)]),_:1})),a.value.attended!==3?(u(),R(w,{key:4},[s.isEdit?(u(),d(n,{key:0,label:"\u4E13\u5BB6\u53C2\u4E0E\u7A0B\u5EA6",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("\u79EF\u6781")])),_:1}),t(i,{label:2},{default:l(()=>e[15]||(e[15]=[r("\u6D88\u6781")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:1,label:"\u4E13\u5BB6\u53C2\u4E0E\u7A0B\u5EA6"},{default:l(()=>[f("span",null,p(a.value.performance===1?"\u79EF\u6781":a.value.performance===2?"\u6D88\u6781":"-"),1)]),_:1})),s.isEdit?(u(),d(n,{key:2,label:"\u4E13\u5BB6\u662F\u5426\u63D0\u51FA\u4E13\u4E1A\u5EFA\u8BAE",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("\u6709\u63D0\u51FA")])),_:1}),t(i,{label:!1},{default:l(()=>e[17]||(e[17]=[r("\u672A\u63D0\u51FA")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:3,label:"\u4E13\u5BB6\u662F\u5426\u63D0\u51FA\u4E13\u4E1A\u5EFA\u8BAE"},{default:l(()=>[f("span",null,p(a.value.advised?"\u6709\u63D0\u51FA":"\u672A\u63D0\u51FA"),1)]),_:1})),s.isEdit?(u(),d(n,{key:4,label:" \u4E13\u5BB6\u662F\u5426\u65E9\u9000",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("\u672A\u65E9\u9000")])),_:1}),t(i,{label:!0},{default:l(()=>e[19]||(e[19]=[r("\u65E9\u9000")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:5,label:"\u4E13\u5BB6\u662F\u5426\u65E9\u9000"},{default:l(()=>[f("span",null,p(a.value.leaveEarly?"\u65E9\u9000":"\u672A\u65E9\u9000"),1)]),_:1})),s.isEdit?(u(),d(n,{key:6,label:"\u4E13\u5BB6\u6709\u65E0\u8FDD\u89C4\u884C\u4E3A",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("\u65E0")])),_:1}),t(i,{label:!0},{default:l(()=>e[21]||(e[21]=[r("\u6709")])),_:1})]),_:1},8,["modelValue"])]),_:1})):(u(),d(n,{key:7,label:"\u4E13\u5BB6\u6709\u65E0\u8FDD\u89C4\u884C\u4E3A"},{default:l(()=>[f("span",null,p(a.value.brokeRule?"\u6709":"\u65E0"),1)]),_:1})),a.value.brokeRule?(u(),R(w,{key:8},[s.isEdit?(u(),d(n,{key:0,label:"\u8FDD\u89C4\u884C\u4E3A",prop:"brokeRuleContent"},{default:l(()=>[t(_,{modelValue:a.value.brokeRuleContent,"onUpdate:modelValue":e[7]||(e[7]=o=>a.value.brokeRuleContent=o),placeholder:"\u8BF7\u586B\u5199",type:"textarea",maxlength:200,"show-word-limit":""},null,8,["modelValue"])]),_:1})):(u(),d(n,{key:1,label:"\u8FDD\u89C4\u884C\u4E3A"},{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",A,[t(C,{type:"primary",loading:g.value,onClick:e[8]||(e[8]=o=>I(y.value))},{default:l(()=>e[22]||(e[22]=[r("\u63D0\u4EA4")])),_:1},8,["loading"]),t(C,{onClick:e[9]||(e[9]=o=>E("close"))},{default:l(()=>e[23]||(e[23]=[r("\u5173\u95ED")])),_:1})])]),key:"0"}:void 0]),1032,["model-value","title"])}}});export{Q as default};