|
1 |
- import{t as L}from"./unitSelfEvaluation.7a24f1d5.js";import{d as T,x as B,b as N,r as _,o as E,c as F,a2 as R,w as A,e as i,G as O,i as I,f as n,t as b,F as v,g as j,H as C,h as M}from"./index.e8b71da7.js";import{_ as V}from"./index.4cb63fa6.js";const q={key:0},G={key:1},H={key:1},J=T({name:"sureScore"}),Q=Object.assign(J,{props:{appraisalInfoList:{type:Array,default:()=>[]}},setup(h){const k=h,g=B(),x=N([{label:"\u4E00\u7EA7\u6307\u6807",key:"oneName",prop:"oneName"},{label:"\u4E8C\u7EA7\u6307\u6807",key:"twoName",prop:"twoName"},{label:"\u4E09\u7EA7\u6307\u6807",key:"name",prop:"name"},{label:"\u6307\u6807\u7EC6\u5219",key:"indexDetail",prop:"indexDetail"},{label:"\u8BC4\u5206\u7EC6\u5219",key:"gradeDetail",prop:"gradeDetail"},{label:"\u4F50\u8BC1\u6750\u6599",key:"supportMaterial",prop:"supportMaterial"},{label:"\u6307\u6807\u5206\u503C",key:"indexScore",prop:"indexScore",width:85},{label:"\u590D\u6838\u5F97\u5206",key:"selfScore",slot:"selfScore",width:85},{label:"\u590D\u6838\u8BF4\u660E",key:"selfBasis",slot:"selfBasis",width:200}]),S=({row:a,column:l,rowIndex:o,columnIndex:r})=>{if(r===0)return a.isFirstOne?{rowspan:a.oneRows,colspan:1}:{rowspan:0,colspan:0};if(r===1)return a.isFirstTwo?{rowspan:a.twoRows,colspan:1}:{rowspan:0,colspan:0}},c=_([]),f=_(!1),D=async()=>{f.value=!0,c.value=[];const a=await L(g.query.projectCode),l=y(a.data.templateDetails),o=y(a.data.additionalIndexDetails);c.value=[...l,...o],k.appraisalInfoList.forEach((r,e)=>{c.value[e].appraisalType4List=r}),console.log(c.value),f.value=!1},y=a=>{const l=[];return a.forEach((o,r)=>{let e=0;o.children.forEach((s,u)=>{let p=0;s.children.forEach((t,$)=>{var w;l.push({oneId:o.templateId,oneName:o.name,twoId:s.templateId,twoName:s.name,isFirstOne:e===0,isFirstTwo:p===0,appraisalType1List:((w=t.selfAppraisalScoreInfo)==null?void 0:w.filter(d=>d.appraisalType===1))||[],appraisalType2List:t.reAppraisalScoreInfo&&Object.values(t.reAppraisalScoreInfo).reduce((d,m)=>d.concat(m,[]))||[],appraisalType3List:t.verifyScoreInfo&&Object.values(t.verifyScoreInfo).reduce((d,m)=>d.concat(m,[]))||[],oneRows:e,twoRows:p,...t,threeId:t.templateId}),e++,p++}),l.forEach(t=>{t.twoId===s.templateId&&(t.twoRows=p)})}),l.forEach(s=>{s.oneId===o.templateId&&(s.oneRows=e)})}),l};return E(()=>{D()}),(a,l)=>{const o=F("table-list"),r=R("loading");return A((i(),O(o,{stripe:!1,border:!0,pagination:!1,data:c.value,"span-method":S,column:x},{selfScore:I(({scope:e})=>[e.row.appraisalType4List?(i(),n("div",q,b(e.row.appraisalType4List.score),1)):(i(),n("span",G,"-"))]),selfBasis:I(({scope:e})=>{var s;return[e.row.appraisalType4List?(i(),n(v,{key:0},[j("p",null,b(e.row.appraisalType4List.appraisalBasis||"-"),1),(i(!0),n(v,null,C(((s=e.row.appraisalType4List)==null?void 0:s.appraisalBasisAppendix)&&JSON.parse(e.row.appraisalType4List.appraisalBasisAppendix),(u,p)=>(i(),n("p",{key:p,class:"mb-4"},[M(V,{"file-name":u.originalFileName,"file-id":u.id},null,8,["file-name","file-id"])]))),128))],64)):(i(),n("span",H,"-"))]}),_:1},8,["data","column"])),[[r,f.value]])}}});export{Q as default};
|