|
- import{x as B,y as U,r as g,o as R,b as r,c as i,d as b,f as s,h as l,e as n,t as u,i as m,L as y,j as T,k as j,$ as x,s as L}from"./index-dd5fae99.js";import{d as O,s as A}from"./applicationEvaluate-e84d818e.js";const P={class:"footerPage"},z={class:"card-header"},E={class:"flex justify-between items-center"},F={class:"flex-1"},G={class:"font-bold"},H={class:"mt-8 search"},J={key:1},K={key:1},Q={key:1},W={class:"footer"},X=j({name:"applicationMark"}),ae=Object.assign(X,{setup(Y){const f=B(),h=U(),{proxy:C}=L(),v=[{type:"index",label:"序号",width:60},{label:"指标名称",key:"indexName",prop:"indexName",width:120},{label:"单位",key:"unit",prop:"unit",width:80,render:e=>x("span",e.unit||"-")},{label:"指标定义",key:"indexDef",prop:"indexDef",render:e=>x("span",e.indexDef||"-")},{label:"分值",key:"indexScore",prop:"indexScore",width:80},{label:"得分",key:"appraisalScore",slot:"appraisalScore",width:100}],N=[{type:"index",label:"序号",width:60},{label:"指标名称",key:"businessIndicatorName",prop:"businessIndicatorName",width:100},{label:"指标描述",key:"businessIndicatorDescription",prop:"businessIndicatorDescription",render:e=>x("span",e.businessIndicatorDescription||"-")},{label:"设计依据",key:"indexDesignBasis",prop:"indexDesignBasis",render:e=>x("span",e.indexDesignBasis||"-")},{label:"计算方法",key:"indexCalculationMethod",prop:"indexCalculationMethod",render:e=>x("span",e.indexCalculationMethod||"-")},{label:"分值",key:"score",prop:"score",width:80},{label:"得分",key:"appraisalScore",slot:"appraisalScore",width:100}],t=g({commonIndexDetails:[],auxIndexDetails:[],businessIndexDetails:[]}),S=g(),M=async()=>{const e=await O(f.query.appId,f.query.appraisalId);t.value={...e.data,commonIndexDetails:e.data.commonIndexDetails||[],auxIndexDetails:e.data.auxIndexDetails||[],businessIndexDetails:e.data.businessIndexDetails||[]}},$=g(!1),q=async e=>{e&&await e.validate(async(o,d)=>{if(o){$.value=!0;const _=[...t.value.commonIndexDetails,...t.value.auxIndexDetails,...t.value.businessIndexDetails].map(p=>({indexId:p.id,score:p.appraisalScore,indexType:p.indexType})),D={applicationId:f.query.appId,appraisalId:f.query.appraisalId,appAppraisalInfoList:_};await A(D),C.$message.success("提交成功"),h.go(-1)}else console.log(t.value),console.log(d)})};return R(()=>{M()}),(e,o)=>{const d=r("el-form-item"),_=r("el-col"),D=r("el-row"),p=r("el-form"),I=r("el-button"),V=r("el-card"),k=r("el-input-number"),w=r("table-list");return i(),b("div",P,[s(V,{class:"mb-16"},{default:l(()=>[n("div",z,[n("div",E,[n("div",F,[n("p",G,u(t.value.applicationName),1),n("div",H,[s(p,{"label-suffix":":"},{default:l(()=>[s(D,{gutter:24},{default:l(()=>[s(_,{span:6},{default:l(()=>[s(d,{label:"建设单位"},{default:l(()=>[m(u(t.value.buildOrgName),1)]),_:1})]),_:1}),s(_,{span:6},{default:l(()=>[s(d,{label:"应用状态"},{default:l(()=>[m(u(t.value.applicationStatus),1)]),_:1})]),_:1})]),_:1})]),_:1})])]),e.$route.name==="applicationMarkDetail"?(i(),y(I,{key:0,type:"primary",icon:"Download"},{default:l(()=>o[2]||(o[2]=[m("下载分析报告")])),_:1})):T("",!0)])])]),_:1}),s(V,null,{header:l(()=>o[3]||(o[3]=[m("应用指标")])),default:l(()=>[s(p,{ref_key:"formRef",ref:S,model:t.value,"scroll-to-error":""},{default:l(()=>[o[4]||(o[4]=n("p",{class:"mb-8"},"通用指标",-1)),s(w,{column:v,data:t.value.commonIndexDetails,pagination:!1,class:"mb-16"},{appraisalScore:l(({scope:a})=>[e.$route.name==="applicationMark"&&a.$index>=0?(i(),y(d,{key:0,prop:`commonIndexDetails[${a.$index}].appraisalScore`,rules:[{required:!0,message:"请输入"}],style:{"margin-bottom":"0"}},{default:l(()=>[s(k,{modelValue:a.row.appraisalScore,"onUpdate:modelValue":c=>a.row.appraisalScore=c,min:0,max:a.row.indexScore,placeholder:"请输入",precision:2,controls:!1},null,8,["modelValue","onUpdate:modelValue","max"])]),_:2},1032,["prop"])):(i(),b("span",J,u(a.row.appraisalScore),1))]),_:1},8,["data"]),o[5]||(o[5]=n("p",{class:"mb-8"},"辅助指标",-1)),s(w,{column:v,data:t.value.auxIndexDetails,pagination:!1,class:"mb-16"},{appraisalScore:l(({scope:a})=>[e.$route.name==="applicationMark"&&a.$index>=0?(i(),y(d,{key:0,style:{"margin-bottom":"0"},prop:`auxIndexDetails[${a.$index}].appraisalScore`,rules:[{required:!0,message:"请输入"}]},{default:l(()=>[s(k,{modelValue:a.row.appraisalScore,"onUpdate:modelValue":c=>a.row.appraisalScore=c,min:0,max:a.row.indexScore,placeholder:"请输入",precision:2,controls:!1},null,8,["modelValue","onUpdate:modelValue","max"])]),_:2},1032,["prop"])):(i(),b("span",K,u(a.row.appraisalScore),1))]),_:1},8,["data"]),o[6]||(o[6]=n("p",{class:"mb-8"},"业务指标",-1)),s(w,{column:N,data:t.value.businessIndexDetails,pagination:!1},{appraisalScore:l(({scope:a})=>[e.$route.name==="applicationMark"&&a.$index>=0?(i(),y(d,{key:0,style:{"margin-bottom":"0"},prop:`businessIndexDetails[${a.$index}].appraisalScore`,rules:[{required:!0,message:"请输入"}]},{default:l(()=>[s(k,{modelValue:a.row.appraisalScore,"onUpdate:modelValue":c=>a.row.appraisalScore=c,min:1e-6,max:a.row.score,placeholder:"请输入",precision:2,controls:!1},null,8,["modelValue","onUpdate:modelValue","max"])]),_:2},1032,["prop"])):(i(),b("span",Q,u(a.row.appraisalScore),1))]),_:1},8,["data"])]),_:1},8,["model"])]),_:1}),n("div",W,[s(I,{type:"primary",loading:$.value,onClick:o[0]||(o[0]=a=>q(S.value))},{default:l(()=>o[7]||(o[7]=[m(" 提交 ")])),_:1},8,["loading"]),s(I,{onClick:o[1]||(o[1]=a=>e.$router.go(-1))},{default:l(()=>o[8]||(o[8]=[m("返回")])),_:1})])])}}});export{ae as default};
|