<template>
    <div>
        <!-- 封面 -->
        <div class="cd_box fm" style="border: none;margin-top: 20px;height: 868px;">
            <div class="cb_db adf">
                <div class="cb_db_l">{{ datetime }}</div>
            </div>
            <img class="fm_img" src="@/assets/images/agent/logo4.png">
            <div class="fm_title">
                <div class="pt_p" style="font-size: 60px;">PERILL</div>
                <div class="pt_name" style="font-size: 50px;">团队诊断报告-个人版</div>
                <div class="pt_tip">{{ useCommonStore()?.$state?.userRealName }}</div>
            </div>
            <div class="fm_pre adfac" style="margin-top: 165px;">
                <div class="fmp_l">报告撰写人:</div>
                <div class="fmp_r">创衡AI教练助手</div>
            </div>
            <div class="fm_pre adfac">
                <div class="fmp_l">项目名称:</div>
                <div class="fmp_r">{{ reportData?.cover?.programName }}</div>
            </div>
            <div class="fm_pre adfac">
                <div class="fmp_l">客户名称:</div>
                <div class="fmp_r">{{ reportData?.cover?.enterpriseName }}</div>
            </div>
            <div class="fm_pre adfac">
                <div class="fmp_l">团队名称:</div>
                <div class="fmp_r">{{ reportData?.cover?.teamName }}</div>
            </div>
            <div class="fm_pre adfac">
                <div class="fmp_l">成员人数:</div>
                <div class="fmp_r">{{ reportData?.cover?.userNum }}</div>
            </div>
            <div class="fm_pre adfac">
                <div class="fmp_l">报告时间:</div>
                <div class="fmp_r">{{ reportData?.cover?.genDate }}</div>
            </div>
            <div class="cd_page" style="color: #FFFFFF;">1/{{ pageNum }}</div>
        </div>
        <!-- 介绍 -->
        <div class="cd_box js" style="border: none;">
            <div class="cb_db adf">
                <div class="cb_db_l cdl">{{ datetime }}</div>
            </div>
            <div class="cb_content">
                <div class="mddj_title adfac">
                    <img src="@/assets/images/agent/pdf_title.png">
                    <span>介绍</span>
                </div>
                <p>PERILL模型由发展辅导领域的先驱、全球顶尖教练以及管理思维与团队绩效领域的权威David Clutterbuck教授研发。该模型运用复杂、适应性思维，通过 PERILL 六大支柱对团队进行分析。这六大支柱概括了相互作用、推动或阻碍团队绩效的六大关键影响因素。</p>
                <p>以下报告提取了参与 PERILL 诊断问卷的团队成员提供的评分，并将其应用于 PERILL 模型。报告旨在总结团队的高绩效领域与潜在功能失调领域，以助力提升团队整体绩效。</p>
                <p>这份 PERILL 报告的结果可帮助企业与团队更好地了解自身优势、存在的问题、差距或需要克服的潜在挑战，从而提升团队绩效、声誉与协作能力。</p>
                <div class="big_title">PERILL的六大支柱</div>
                <p>PERILL 诊断提供了一个复杂的团队系统概览，它并非针对孤立的问题，也不是简单的优缺点，而是着眼于团队系统的复杂性。它通过 6 个影响因素（如下所述）提出问题，以揭示团队系统各要素之间的联系，以及这些联系如何影响团队的高效运作能力。</p>
                <div class="js_boxs">
                    <div class="jb_pre jp1">
                        <div class="jbp_zm">P</div>
                        <img src="@/assets/images/agent/pdf_img_p.png">
                        <div class="jbp_title" style="line-height: 30px;">目的与动机</div>
                        <p style="margin-top: 0;">是否存在一个明确的存在理由和清晰的方向，能够激发团队成员的动力并抓住他们的想象力？</p>
                        <p>个人身份和集体身份是否围绕共同目标达成一致？</p>
                    </div>
                    <div class="jb_pre jp2">
                        <div class="jbp_zm">E</div>
                        <img src="@/assets/images/agent/pdf_img_e.png">
                        <div class="jbp_title" style="line-height: 12px;">外部流程及系统与架构</div>
                        <p style="margin-top: 0;">团队如何与其各类利益相关者互动？</p>
                        <p>团队如何理解这些利益相关者以及利益相关者如何理解团队？此外，团队又该如何管理相互冲突的期望、获取资源等？</p>
                    </div>
                    <div class="jb_pre jp3">
                        <div class="jbp_zm">R</div>
                        <img src="@/assets/images/agent/pdf_img_r.png">
                        <div class="jbp_title" style="line-height: 30px;">关系</div>
                        <p style="margin-top: 0;">团队成员之间是否相互信任和尊重？</p>
                        <p>团队成员之间是否相互信任和尊重？</p>
                        <p>团队成员之间的关系是否有助于实现真正紧密的协作？</p>
                    </div>
                    <div class="jb_pre jp4">
                        <div class="jbp_zm">I</div>
                        <img src="@/assets/images/agent/pdf_img_i.png">
                        <div class="jbp_title" style="line-height: 12px;">内部流程及系统与架构</div>
                        <p style="margin-top: 0;">团队在平衡责任与自主权方面是如何实现功能性协作的？</p>
                        <p>它的敏捷性如何，沟通方式怎样，决策流程的运作效果有多好？</p>
                    </div>
                    <div class="jb_pre jp5">
                        <div class="jbp_zm">L</div>
                        <img src="@/assets/images/agent/pdf_img_l.png">
                        <div class="jbp_title" style="line-height: 30px;">学习</div>
                        <p style="margin-top: 0;">团队如何提高绩效，提高技能和资源，以应对当前和未来的任务？</p>
                        <p>它如何管理能力和提高效率？</p>
                    </div>
                </div>
                <div class="js_single_box adf">
                    <div class="jsb_zm">L</div>
                    <div class="jsb_l adffcacjc">
                        <img src="@/assets/images/agent/pdf_img_l.png">
                        <p>领导力</p>
                    </div>
                    <div class="jsb_r adffcacjc">
                        领导力的特质与行为如何对团队运作及其他因素产生调节影响，且这种影响是正向还是负向的？
                    </div>
                </div>
            </div>
            <div class="cd_page">2/{{ pageNum }}</div>
        </div>
        <!-- 总体诊断分析 -->
        <div class="cd_box">
            <div class="cb_db adf">
                <div class="cb_db_l cdl">{{ datetime }}</div>
            </div>
            <div class="cb_content">
                <div class="mddj_title adfac">
                    <img src="@/assets/images/agent/pdf_title.png">
                    <span>总体诊断分析</span>
                </div>
                <p class="p2" style="margin-top: 43px;">{{ reportData?.overall?.diagResult }}</p>
                <div class="pdfEchart" id="zttdznRef" ref="zttdznRef" style="width: 100%; height: 350px;margin-top: 20px;"></div>
                <div class="bp" style="margin-top: 40px;">诊断结果</div>
                <p style="margin-top: 10px;">{{ reportData?.overall?.overall_analysis }}</p>
            </div>
            <div class="cd_page">3/{{ pageNum }}</div>
        </div>
        <!-- 多维度 -->
        <template v-if="reportData?.dimensionAnalysis?.length">
            <div v-for="(rd,ridx) in reportData.dimensionAnalysis" :key="ridx">
                <!-- 第四页 目的与动机 -->
                <div class="cd_box">
                    <div class="cb_db adf">
                        <div class="cb_db_l cdl">{{ datetime }}</div>
                    </div>
                    <div class="cb_content">
                        <div class="mddj_title adfac">
                            <img src="@/assets/images/agent/pdf_title.png">
                            <span>{{ rd?.performanceRatings?.title }}</span>
                        </div>
                        <p class="p2" style="margin-top: 43px;">在目标与动机支柱中，我们旨在探究是否存在一个清晰的存在理由和明确的方向，能够激发团队成员的动力并吸引他们的想象力，以及个人与集体的身份认同是否围绕共同目标达成一致。</p>
                        <p class="p3" style="margin-top: 42px;">为了帮助我们理解这一点，我们将从 5 个关键主题的角度审视团队的运作情况，具体如下：</p>
                        <div class="mddj_boxs" v-if="rd?.performanceRatings?.title=='目的和动机'">
                            <div class="mb_item" style="border-top: 1px dotted #833478;">
                                <div class="mbi_title">一致性：</div>
                                <div class="mbi_text">存在共同的目标和使命意识。个人目标与集体目标之间具有凝聚力。团队成员共享价值观，且集体议程优先于个人议程。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">清晰度：</div>
                                <div class="mbi_text">团队对个人及集体的角色和职责有高度清晰的认知。他们清楚地理解自身未来的方向、目标和使命。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">热情与贡献：</div>
                                <div class="mbi_text">团队对自身的工作目的有强烈的认同感，并展现出高昂的热情，以应对既定的挑战和目标。他们认为自己的工作富有意义，并感觉正在为世界贡献特殊的价值。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">愉悦感：</div>
                                <div class="mbi_text">团队从工作角色中获得快乐和 / 或满足感，欣赏并与团队中的同事保持联结。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">支持与协作：</div>
                                <div class="mbi_text">团队成员拥有团结感和高度的同志情谊。他们对团队目标有着共同的承诺，并愿意相互支持以实现这些目标。</div>
                            </div>
                        </div>
                        <div class="mddj_boxs" v-else-if="rd?.performanceRatings?.title=='外部流程及系统与架构'">
                            <div class="mb_item" style="border-top: 1px dotted #833478;">
                                <div class="mbi_title">环境意识：</div>
                                <div class="mbi_text">该团队拥有环境扫描和竞争对手监控的流程，并对相关情况有强烈的意识。在更广泛的环境中正在发生的事情。他们对更广泛市场背景下的宏观和微观趋势有所了解，这有助于团队做出明智、合理且富有成效的商业决策。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">利益相关者与客户协同：</div>
                                <div class="mbi_text">该团队拥有良好的系统，使他们能够与客户保持良好且定期的互动利益相关者，并确保他们的优先事项、目标和价值观保持一致。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">人才与资源获取：</div>
                                <div class="mbi_text">团队在需要时能够获取额外或替代的人才和资源，并且他们了解这一流程他们需要遵循这些规则才能获得成功。这有助于团队实现平稳高效的运营。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">利益相关者与客户沟通：</div>
                                <div class="mbi_text">该团队建立了强大的系统，以便随时向利益相关者和客户通报其工作进展，以及为什么。他们愿意倾听并从利益相关者和客户那里学习，以支持他们实现目标目标并提升绩效。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">关系中的信任与诚信：</div>
                                <div class="mbi_text">利益相关者对团队及其能力充满信心，团队也因其行事方式而受到尊重他们自己的行为。</div>
                            </div>
                        </div>
                        <div class="mddj_boxs" v-else-if="rd?.performanceRatings?.title=='关系'">
                            <div class="mb_item" style="border-top: 1px dotted #833478;">
                                <div class="mbi_title">技能和专业知识：</div>
                                <div class="mbi_text">团队具备恰当的技能与专业能力平衡，以实现团队目标。成员彼此信任，认为各自具备互补的优势与劣势，能支持目标达成。<br/>尊重与信任团队成员无论在私下还是公开场合都高度尊重彼此。他们信任对方会言行一致，并相互欣赏。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">情谊与凝聚力</div>
                                <div class="mbi_text">团队成员彼此关怀，情谊深厚。任何冲突或挑战都具有建设性，成员期望彼此获得成功。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">人才与资源获取：</div>
                                <div class="mbi_text">团队在需要时能够获取额外或替代的人才和资源，并且他们了解这一流程他们需要遵循这些规则才能获得成功。这有助于团队实现平稳高效的运营。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">安全沟通环境：</div>
                                <div class="mbi_text">团队内部具备高度的心理安全感。成员之间能坦诚相待、善于倾听，敢于暴露自身脆弱之处并承认错误。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">重视多样性与包容性：</div>
                                <div class="mbi_text">团队高度重视多样性与包容性。所有成员都认为自己的声音被倾听与尊重，可自由提问与质疑，并在适当情况下欣然认同彼此的技能、价值观与经验。</div>
                            </div>
                        </div>
                        <div class="mddj_boxs" v-else-if="rd?.performanceRatings?.title=='内部流程及系统与架构'">
                            <div class="mb_item" style="border-top: 1px dotted #833478;">
                                <div class="mbi_title">合理资源配置：</div>
                                <div class="mbi_text">团队拥有实现目标所需的合理资源配置，具备恰当的能力与知识平衡，并能在必要时补充额外技能。<br/>尊重与信任团队成员无论在私下还是公开场合都高度尊重彼此。他们信任对方会言行一致，并相互欣赏。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">团队敏捷性：</div>
                                <div class="mbi_text">团队能够高效且迅速地响应外部变化，并实现快速创新。必要时，团队可分担责任，相互支持以减轻任务负担。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">问责机制：</div>
                                <div class="mbi_text">团队内部在问责制与自主权之间实现了良好平衡。成员可在自身专业领域承担领导角色，并负责相互同步信息（而非依赖团队领导者）。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">系统效能：</div>
                                <div class="mbi_text">团队建立了完善的系统，并定期审视系统背后的假设及其有效性。团队通过可靠的流程支持科学决策，避免决策偏差。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">团队保护：</div>
                                <div class="mbi_text">团队领导者助力成员专注于工作，确保将外部干扰降至最低，团队韧性较强。</div>
                            </div>
                        </div>
                        <div class="mddj_boxs" v-else-if="rd?.performanceRatings?.title=='学习'">
                            <div class="mb_item" style="border-top: 1px dotted #833478;">
                                <div class="mbi_title">发展规划：</div>
                                <div class="mbi_text">团队认识到学习与成长的重要性，所有成员均制定了个人发展计划。团队还制定了全员认同的团队发展计划，聚焦团队在未来 12-24 个月需实现的整体进化方向。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">学习相关性：</div>
                                <div class="mbi_text">团队重视根据环境变化的需求持续提升技能和重新学习技能。发展方向反映了市场和业务战略的演变。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">嵌入式学习：</div>
                                <div class="mbi_text">团队内部拥有根深蒂固的学习文化，并高度重视持续学习。他们开展相互辅导，并将学习作为团队会议议程的常规议题。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">发展导向：</div>
                                <div class="mbi_text">团队频繁挑战自身假设，并主动邀请外部挑战。他们专注于效能与创新，并投资构建支持这一目标的网络。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">反思性学习：</div>
                                <div class="mbi_text">团队分配时间进行反思性学习，拥有完善的流程和实践，可对错误和挫折进行回顾、反思与学习，并利用所学主动实施积极变革。</div>
                            </div>
                        </div>
                        <div class="mddj_boxs" v-else-if="rd?.performanceRatings?.title=='领导力'">
                            <div class="mb_item" style="border-top: 1px dotted #833478;">
                                <div class="mbi_title">愿景与背景：</div>
                                <div class="mbi_text">团队明确自身的发展方向及原因。团队领导者专注于阐释目标背后的背景，并帮助每位成员理解自身目标。协作赋能型领导力团队与领导者就合适的管理风格达成共识。成员被赋予自主权与问责制，且在需要时可承担领导角色。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">协作赋能型领导力：</div>
                                <div class="mbi_text">团队与领导者就合适的管理风格达成共识。成员被赋予自主权与问责制，且在需要时可承担领导角色。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">人际领导力：</div>
                                <div class="mbi_text">团队成员与领导者沟通时感到自在，他们关心并尊重领导者，而领导者也展现出对成员的关怀。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">领导勇气：</div>
                                <div class="mbi_text">领导者展现出勇气，具备即便面临个人风险也坚持做正确之事的能力。他们保护团队免受外部过度干扰，专注于提升团队声誉与公信力。</div>
                            </div>
                            <div class="mb_item">
                                <div class="mbi_title">启发性领导力：</div>
                                <div class="mbi_text">团队领导者是成员的榜样，以身作则践行团队的价值观与行为准则。领导者关注团队的使命与目标，其经验与才智深受成员尊敬与重视。</div>
                            </div>
                        </div>
                    </div>
                    <div class="cd_page">{{ridx*7+4}}/{{ pageNum }}</div>
                </div>
                <!-- 第五页 绩效评级目的与动机 -->
                <div class="cd_box">
                    <div class="cb_db adf">
                        <div class="cb_db_l cdl">{{ datetime }}</div>
                    </div>
                    <div class="cb_content jxpjmddj">
                        <div class="mddj_title adfac">
                            <img src="@/assets/images/agent/pdf_title.png">
                            <span>{{ rd?.performanceRatings?.title }}</span>
                        </div>
                        <div class="bp" style="margin-top: 24px;">评分总体分布</div>
                        <div :id="'pfztfbRef'+ridx" style="width: 100%; height: 200px;" class="pdfEchart"></div>
                        <div class="bp" style="margin-top: 7px;">均分及差异分析</div>
                        <div class="cyfx_boxs">
                            <div class="cyfxb_box" style="border-left: none;">
                                <div class="cbb_top">均分前五</div>
                                <div class="cbb_bottom">
                                    <div class="cbbb_item" v-for="rph in rd?.performanceRatings?.highestMeanScores">
                                        <div class="ci_l">{{ rph?.question }}</div>
                                        <div class="ci_r">
                                            <div class="circle">
                                                <div class="semi-circle" :style="{'--percentage': rph?.score}"></div>
                                                <div class="number">{{ rph?.score }}</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="cyfxb_box">
                                <div class="cbb_top red">均分后五</div>
                                <div class="cbb_bottom">
                                    <div class="cbbb_item" v-for="rph in rd?.performanceRatings?.lowestMeanScores">
                                        <div class="ci_l">{{ rph?.question }}</div>
                                        <div class="ci_r">
                                            <div class="circle">
                                                <div class="semi-circle red" :style="{'--percentage': rph?.score}"></div>
                                                <div class="number red">{{ rph?.score }}</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="cyfxb_box">
                                <div class="cbb_top">方差前五</div>
                                <div class="cbb_bottom">
                                    <div class="cbbb_item" v-for="rph in rd?.performanceRatings?.highestVarianceScores">
                                        <div class="ci_l">{{ rph?.question }}</div>
                                        <div class="ci_r">
                                            <div class="circle">
                                                <div class="semi-circle" :style="{'--percentage': rph?.score}"></div>
                                                <div class="number">{{ rph?.score }}</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="cyfxb_box">
                                <div class="cbb_top red">方差后五</div>
                                <div class="cbb_bottom">
                                    <div class="cbbb_item" v-for="rph in rd?.performanceRatings?.lowestVarianceScores">
                                        <div class="ci_l">{{ rph?.question }}</div>
                                        <div class="ci_r">
                                            <div class="circle">
                                                <div class="semi-circle red" :style="{'--percentage': rph?.score}"></div>
                                                <div class="number red">{{ rph?.score }}</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="cd_page">{{ridx*7+5}}/{{ pageNum }}</div>
                </div>
                <!-- 第六页 绩效评级目的与动机 -->
                <div class="cd_box">
                    <div class="cb_db adf">
                        <div class="cb_db_l cdl">{{ datetime }}</div>
                    </div>
                    <div class="cb_content">
                        <div class="mddj_title adfac">
                            <img src="@/assets/images/agent/pdf_title.png">
                            <span>{{ rd?.performanceRatings?.title }}</span>
                        </div>
                        <div class="bp" style="margin-top: 44px;">诊断分析</div>
                        <p style="margin-top: 17px;">{{ rd?.diagAnalysis?.summary }}</p>
                        <div class="jxpjmddj_box">
                            <div class="jb_title">主题：纬度评价分：{{ rd?.diagAnalysis?.avgScore }}<span style="margin-left: 17px;">标准方差：{{ rd?.diagAnalysis?.variance }}</span></div>
                        </div>
                        <div class="jxpjmddj_box">
                            <div class="jb_title2">诊断结果：</div>
                            <div class="jb_text" v-html="rd?.diagAnalysis?.diagResult.replace(/(\r\n|\n|\r)+/g, '<br>')"></div>
                        </div>
                        <div class="jxpjmddj_box">
                            <div class="jb_title2">建议：</div>
                            <div class="jb_text" v-for="(t,i) in rd?.diagAnalysis?.suggestion" :key="i">{{ t }}</div><br>
                        </div>
                    </div>
                    <div class="cd_page">{{ridx*7+6}}/{{ pageNum }}</div>
                </div>
                <!-- 第七页 问卷题目详细分析 -->
                <div class="cd_box">
                    <div class="cb_db adf">
                        <div class="cb_db_l cdl">{{ datetime }}</div>
                    </div>
                    <div class="cb_content">
                        <div class="mddj_title adfac">
                            <img src="@/assets/images/agent/pdf_title.png">
                            <span>{{ rd?.performanceRatings?.title }}</span>
                        </div>
                        <div class="bp" style="margin-top: 20px;">问卷题目详细分析</div>
                        <p class="p2" style="margin-top: 21px;padding-left: 8px;">以下问题均与 “{{rd?.performanceRatings?.title}}” 这一核心支柱以及上述分析中强调的主题紧密相关。</p>
                        <p class="p3" style="margin-top: 10px;padding-left: 8px;">此处的线性图示将从总体上展示团队的绩效得分情况、得分之间的差异百分比，同时以可视化方式呈现这些分数及其范围。</p>
                        <div class="xxfx_title adfac">
                            <div class="xt_pre">问题</div>
                            <div class="xt_pre">平均分</div>
                            <div class="xt_pre">方差</div>
                        </div>
                        <div class="xxfx_list">
                            <div class="xl_item adfac" v-for="(rda,index) in rd?.dataAnalysis?.slice(0,9)" :key="index">
                                <div class="xli_l adfac">
                                    <div class="xl_pre">{{ index+1 }}</div>
                                    <div class="xl_pre red">{{ rda?.avgScore }}</div>
                                    <div class="xl_pre">{{ rda?.variance }}</div>
                                </div>
                                <div class="xli_r">
                                    <div class="xr_p">{{ rda?.question }}</div>
                                    <div class="xr_tb adfac">
                                        <div class="xt_pre p1"></div>
                                        <div class="xt_pre p2"></div>
                                        <div class="xt_pre p3"></div>
                                        <div class="xt_score adfac" :style="{'left':rda?.lowestScore==50?'calc(100% - 63px)':rda?.lowestScore*2+'%','width':((rda?.highestScore-rda?.lowestScore)*2)+'%'}">
                                            <div class="xts_num red">{{ rda?.lowestScore }}</div>
                                            <div class="xts_box"></div>
                                            <div class="xts_num green">{{ rda?.highestScore }}</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="cd_page">{{ridx*7+7}}/{{ pageNum }}</div>
                </div>
                <!-- 第八页 问卷题目详细分析 -->
                <div class="cd_box">
                    <div class="cb_db adf">
                        <div class="cb_db_l cdl">{{ datetime }}</div>
                    </div>
                    <div class="cb_content">
                        <div class="xxfx_list">
                            <div class="xl_item adfac" v-for="(rda,index) in rd?.dataAnalysis?.slice(9,rd?.dataAnalysis?.length)" :key="index">
                                <div class="xli_l adfac">
                                    <div class="xl_pre">{{ index+10 }}</div>
                                    <div class="xl_pre red">{{ rda?.avgScore }}</div>
                                    <div class="xl_pre">{{ rda?.variance }}</div>
                                </div>
                                <div class="xli_r">
                                    <div class="xr_p">{{ rda?.question }}</div>
                                    <div class="xr_tb adfac">
                                        <div class="xt_pre p1"></div>
                                        <div class="xt_pre p2"></div>
                                        <div class="xt_pre p3"></div>
                                        <div class="xt_score adfac" :style="{'left':rda?.lowestScore==50?'calc(100% - 63px)':rda?.lowestScore*2+'%','width':((rda?.highestScore-rda?.lowestScore)*2)+'%'}">
                                            <div class="xts_num red">{{ rda?.lowestScore }}</div>
                                            <div class="xts_box"></div>
                                            <div class="xts_num green">{{ rda?.highestScore }}</div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="cd_page">{{ridx*7+8}}/{{ pageNum }}</div>
                </div>
                <!-- 第九页 团队成员回答分数 -->
                <div class="cd_box">
                    <div class="cb_db adf">
                        <div class="cb_db_l cdl">{{ datetime }}</div>
                    </div>
                    <div class="cb_content">
                        <div class="mddj_title adfac">
                            <img src="@/assets/images/agent/pdf_title.png">
                            <span>{{ rd?.performanceRatings?.title }}</span>
                        </div>
                        <div class="bp" style="margin-top: 20px;">团队成员回答分数</div>
                        <p style="margin-top: 28px;font-size: 14px;font-weight: bold;" >下表向您展示了每位团队成员在每个问题上的得分情况，以及由此得出的总分和方差。</p>
                        <div class="mddj_top adf">
                            <div class="tt_pre adf">
                                <div class="ttp_l tl1"></div>
                                <div class="ttp_r">在个人得分和总分方面，这表明功能得分为低。在方差方面，这表明个人得分之间的方差较高。</div>
                            </div>
                            <div class="tt_pre adf">
                                <div class="ttp_l tl2"></div>
                                <div class="ttp_r">在个人得分和总分方面，这表明功能得分为中等。在方差方面，这表明个人得分之间的方差为中等。</div>
                            </div>
                            <div class="tt_pre adf">
                                <div class="ttp_l tl3"></div>
                                <div class="ttp_r">在个人得分和总分方面，这表明功能得分为高。在方差方面，这表明个人得分之间的方差较低。</div>
                            </div>
                        </div>
                        <div class="mddj_table">
                            <div class="mt_top adf">
                                <div class="mt_l adfac">问题</div>
                                <div class="mt_r adf">
                                    <div class="mr_pre">均分</div>
                                    <div class="mr_pre">方差</div>
                                </div>
                            </div>
                            <div class="mt_list">
                                <div class="ml_pre adf" v-for="(tms,index) in rd?.teamMemberScores?.slice(0,9)" :key="index">
                                    <div class="mt_l adfac">{{ tms.question }}</div>
                                    <div class="mt_r adfac">
                                        <div class="mp_pre adffcacjc" :class="{'mp1':score<16,'mp2':(score<36&&score>=15),'mp3':score>35}" v-for="(score,idx) in tms.scores" :key="idx">{{ score }}</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="cd_page">{{ridx*7+9}}/{{ pageNum }}</div>
                </div>
                <!-- 第十页 团队成员回答分数 -->
                <div class="cd_box">
                    <div class="cb_db adf">
                        <div class="cb_db_l cdl">{{ datetime }}</div>
                    </div>
                    <div class="cb_content">
                        <div class="mddj_table" style="margin-top: 0;">
                            <div class="mt_top adf">
                                <div class="mt_l adfac">问题</div>
                                <div class="mt_r adf">
                                    <div class="mr_pre">均分</div>
                                    <div class="mr_pre">方差</div>
                                </div>
                            </div>
                            <div class="mt_list">
                                <div class="ml_pre adf" v-for="(tms,index) in rd?.teamMemberScores?.slice(9,rd?.teamMemberScores?.length)" :key="index">
                                    <div class="mt_l adfac">{{ tms.question }}</div>
                                    <div class="mt_r adfac">
                                        <div class="mp_pre adffcacjc" :class="{'mp1':score<16,'mp2':(score<36&&score>=15),'mp3':score>35}" v-for="(score,idx) in tms.scores" :key="idx">{{ score }}</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="cd_page">{{ridx*7+10}}/{{ pageNum }}</div>
                </div>
            </div>
        </template>
        <!-- 团队情况概述 -->
        <div class="cd_box">
            <div class="cb_db adf">
                <div class="cb_db_l cdl">{{ datetime }}</div>
            </div>
            <div class="cb_content">
                <div class="mddj_title adfac">
                    <img src="@/assets/images/agent/pdf_title.png">
                    <span>团队情况概述</span>
                </div>
                <div class="team_title">公司名称：</div>
                <div class="team_p">{{ reportData?.nextSteps?.teamInfo?.company }}</div>
                <div class="team_title">公司背景：</div>
                <div class="team_p" style="min-height: 60px;">{{ reportData?.nextSteps?.teamInfo?.company_brief }}</div>
                <div class="team_title">团队类型：</div>
                <div class="team_p">{{ reportData?.nextSteps?.teamInfo?.team }}</div>
                <div class="team_title">团队故事：</div>
                <div class="team_p" style="min-height: 180px;">{{ reportData?.nextSteps?.teamInfo?.teamStory }}</div>
                <div class="team_title">团队诊断总结：</div>
                <div class="team_p" style="min-height: 80px;">{{ reportData?.nextSteps?.teamInfo?.overall_analysis }}</div>
                <!-- <div class="team_title">团队教练：</div>
                <div class="team_p">{{ '' }}</div> -->
            </div>
            <div class="cd_page">{{(((reportData?.dimensionAnalysis?.length)*7)||0)+4}}/{{ pageNum }}</div>
        </div>
        <!-- 团队情况概述2 -->
        <div class="cd_box">
            <div class="cb_db adf">
                <div class="cb_db_l cdl">{{ datetime }}</div>
            </div>
            <div class="cb_content">
                <div class="bp">团队成员</div>
                <div class="team_table">
                    <table>
                        <tr class="th">
                            <td>姓名</td>
                            <td>类型</td>
                            <td>人物简介</td>
                            <td>人物故事</td>
                        </tr>
                        <tr v-for="(item,index) in reportData?.nextSteps?.teamInfo?.team_info?.slice(0,4)" :key="index">
                            <td class="mw">{{ item.name }}</td>
                            <td class="mw">{{ UserCategory.find(u=>u.value==item.type)?.label }}</td>
                            <td class="tc">{{item.brief}}</td>
                            <td class="tc">{{item.story}}</td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="cd_page">{{(((reportData?.dimensionAnalysis?.length)*7)||0)+5}}/{{ pageNum }}</div>
        </div>
        <template v-if="membersPageCount>1">
            <div class="cd_box" v-for="(n,i) in membersPageCount-1" :key="i">
                <div class="cb_db adf">
                    <div class="cb_db_l cdl">{{ datetime }}</div>
                </div>
                <div class="cb_content">
                    <div class="bp">团队成员</div>
                    <div class="team_table">
                        <table>
                            <tr class="th">
                                <td>姓名</td>
                                <td>类型</td>
                                <td>人物简介</td>
                                <td>人物故事</td>
                            </tr>
                            <tr v-for="(item,index) in reportData?.nextSteps?.teamInfo?.team_info?.slice(4*n,4*(n+1))" :key="index">
                                <td class="mw">{{ item.name }}</td>
                                <td class="mw">{{ UserCategory.find(u=>u.value==item.type)?.label }}</td>
                                <td class="tc">{{item.brief}}</td>
                                <td class="tc">{{item.story}}</td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div class="cd_page">{{(((reportData?.dimensionAnalysis?.length)*7)||0)+5+n}}/{{ pageNum }}</div>
            </div>
        </template>
    </div>
</template>

<script setup name="">
    const props = defineProps({
        reportData:{
            type: Object,
            default: () => {}
        }
    })
    import * as echarts from "echarts";
    import { ref, getCurrentInstance, onMounted, nextTick } from 'vue'
    const { proxy } = getCurrentInstance();
    import useCommonStore from "@/store_v3/modules/common";
    const reportData = ref(null);
    const zttdznRef = ref(null)
    const pjgxRef = ref(null);
    const pageNum = ref('');
    const membersPageCount = ref(0);
    const optionsMap = new Map();
    const datetime = proxy.parseTime(new Date(), '{yy}-{mm}-{dd} {hh}:{ii}');
    const { UserCategory} = proxy.useDict("UserCategory");
    const emits = defineEmits(['optionsMaps']);

    const initZttdznChart = () => {
        let myChart = echarts.init(zttdznRef.value);
        let option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                type: 'shadow'
                }
            },
            legend: {},
            grid: {
                left: '3%',
                right: '8%',
                bottom: '1%',
                containLabel: true
            },
            xAxis: {
                type: 'value',
                boundaryGap: [0, 0.01]
            },
            yAxis: {
                type: 'category',
                data: reportData.value?.overall?.aggregateTeamScore.map(d=>d.dimension)||[]
            },
            series: [
                {
                name: '团队总分',
                type: 'bar',
                data: reportData.value?.overall?.aggregateTeamScore.map(d=>d.score)||[],
                itemStyle:{
                    color: function(params) {
                        var colorList = ['#484EAE','#B6C38D', '#61B7C8', '#5D7EE5', '#8C95DC','#9374B5'];
                        return colorList[params.dataIndex]
                    }
                }
                }
            ]
        };
        optionsMap.set("zttdznRef_copy", option);
        myChart.setOption(option)
    }
    
    const initPfztfbChart = (dom,report,id) => {
        let myChart = echarts.init(dom);
        let option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                type: 'shadow'
                }
            },
            legend: {},
            grid: {
                left: '8%',
                right: '13%',
                bottom: '5%',
                top: '10%',
                containLabel: true
            },
            xAxis: {
                type: 'value',
                boundaryGap: [0, 0.01]
            },
            yAxis: {
                type: 'category',
                data: report?.performanceRatings?.avgByTheme.map(d=>d.theme)||[]
            },
            series: [
                {
                name: '',
                type: 'bar',
                data: report?.performanceRatings?.avgByTheme.map(d=>d.score)||[],
                itemStyle:{
                    color: function(params) {
                        var colorList = ['#484EAE','#B6C38D', '#61B7C8', '#5D7EE5', '#8C95DC'];
                        return colorList[params.dataIndex]
                    }
                }
                }
            ]
        };
        optionsMap.set(id+'_copy', option);
        myChart.setOption(option)
    }

    onMounted(() => {
        reportData.value = props.reportData;
        membersPageCount.value = Math.ceil(reportData.value?.nextSteps?.teamInfo?.team_info?.length/4);
        pageNum.value = reportData.value?.dimensionAnalysis?.length*7+4+(membersPageCount.value);
        reportData.value?.dimensionAnalysis?.forEach(item=>{
            item.userNames = item?.teamMemberScores[0]?.memberScores?.map(d=>d.realName)||[];
            item?.teamMemberScores.forEach((tms,idx)=>{
                tms.scores = [tms.avgScore,tms.variance]
            })
        })
        initZttdznChart();
        if(reportData.value?.dimensionAnalysis?.length){
            nextTick(()=>{
                reportData.value?.dimensionAnalysis?.forEach((item,index)=>{
                    let dom = document.getElementById(`pfztfbRef${index}`)
                    initPfztfbChart(dom,item,`pfztfbRef${index}`);
                    if(index===reportData.value?.dimensionAnalysis?.length-1){
                        emits('optionsMaps', optionsMap);
                    }
                })
            })
        } 
    })
</script>

<style scoped lang="scss">
    @import url(./pdf.scss);

    .cd_box{
        width: 100%;
        height: 891px;
        color: #A1A1A1;
    }
</style>