pdfZyb.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002
  1. <template>
  2. <view class="page-wrappe">
  3. <cus-header title=' ' bgColor="transparent"></cus-header>
  4. <view id="pdfContainer" class="pdf-container" :style="{'transform':'scale('+scale+')', 'height': containerScaledHeight + 'px'}" v-if="reportData">
  5. <!-- 封面 -->
  6. <div class="cd_box fm2 adffc" style="border: none;margin-top: 20px;height: 868px;">
  7. <img class="fm2-logo" src="https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/fm_logo.png">
  8. <img class="fm2-logo2" src="https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/fm_logo2.png">
  9. <img class="fm2-perill" src="https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/fm_perill.png">
  10. <div class="fm2-line"></div>
  11. <div class="fm2-p" style="margin-top: 4px;font-size: 38px;">团队发展动态评估报告(团队版)</div>
  12. <div class="fm2-texts adf">
  13. <div class="fm2-texts-pre adf" style="margin-top: 6px;">
  14. <div class="fm2-texts-pre-span">客户名称:</div>
  15. <div class="fm2-texts-pre-val">{{ reportData.teamInfo.enterpriseName||'' }}</div>
  16. </div>
  17. <div class="fm2-texts-pre adf" style="margin-top: 6px;">
  18. <div class="fm2-texts-pre-span">团队名称:</div>
  19. <div class="fm2-texts-pre-val">{{ reportData.teamInfo.teamName||'' }}</div>
  20. </div>
  21. <div class="fm2-texts-pre adf" style="margin-top: 6px;">
  22. <div class="fm2-texts-pre-span">团队职能类型:</div>
  23. <div class="fm2-texts-pre-val">{{ reportData.teamInfo.functionName||'' }}</div>
  24. </div>
  25. <div class="fm2-texts-pre adf" style="margin-top: 6px;">
  26. <div class="fm2-texts-pre-span">团队模式类型:</div>
  27. <div class="fm2-texts-pre-val">{{ reportData.teamInfo.organizationName||'' }}</div>
  28. </div>
  29. <div class="fm2-texts-pre adf" style="margin-top: 6px;">
  30. <div class="fm2-texts-pre-span">评估发起人:</div>
  31. <div class="fm2-texts-pre-val">{{ reportData.teamInfo.initiator||'' }}</div>
  32. </div>
  33. <div class="fm2-texts-pre adf" style="margin-top: 6px;">
  34. <div class="fm2-texts-pre-span">报告生成时间:</div>
  35. <div class="fm2-texts-pre-val">{{ reportData.teamInfo.reportDate||'' }}</div>
  36. </div>
  37. </div>
  38. <div class="fm2-tip" style="margin-top: 12px;">免责声明:本团队测评报告基于您方团队填写的测评数据及相关信息生成,深圳创衡管理顾问有限公司不对报告内容的真实性、准确性和完整性负责。本报告仅供您了解团队情况、优化管理决策提供参考。报告结论不构成任何法律、商业或投资建议,亦不替代专业咨询意见。我方不对因使用本报告内容而产生的任何直接或间接损失承担责任。</div>
  39. </div>
  40. <!-- 介绍 -->
  41. <div class="cd_box" style="border: none">
  42. <div class="v2-top adfacjb" :style="{'background-image':'url(https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_title_bg.png)'}">
  43. <div class="vt-left" style="color: #FFFFFF;">介绍<span>PERILL模型简介</span></div>
  44. <div class="vt-right">团队发展动态评估报告(团队版) </div>
  45. </div>
  46. <div class="v2-box" style="border: 1px solid #33A7A7;">
  47. <img class="vb-img1" :src="'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_box_img1.png'">
  48. <div class="v2-p">PERILL团队发展动态评估源于团队教练辅导领域的先驱、管理思维与团队绩效领域的权威、全球顶尖团队教练David Clutterbuck教授及其团队通过深入研究,提炼出影响团队绩效的140多个基于实证的因素,整合而成的团队评估和提升工具-PERILL模型。</div>
  49. <div class="v2-p" style="margin-top: 8px;">创衡国际基于10多年来在全球与200多家具有前瞻性的国际公司以及国内具有行业代表性公司的合作经验,结合CCMI的PERILL评估工具,在中国推出的团队发展动态评估系统,旨在帮助团队更全面、更有效地从六个维度评估团队的发展现状,为支持团队成为高价值创造团队提供全景式的客观评估。</div>
  50. <div class="v2-p" style="margin-top: 8px;">PERILL团队发展动态评估(团队版)的主体内容由<span>{{ reportData.teamInfo.questionCount||0 }}</span>个关于团队的描述组成。</div>
  51. </div>
  52. <div class="v2-six">
  53. <div class="vsix-title">PERILL六大纬度</div>
  54. <div class="vsix-p">PERILL评估提供了一个复杂的团队系统概览,它并非针对孤立的问题,也不是简单的优缺点,而是着眼于团队系统的复杂性。它通过6个影响因素(如下所述)提出问题,以揭示团队系统各要素之间的联系,以及这些联系如何影响团队的高效运作能力。</div>
  55. <div class="vsix-boxs">
  56. <div class="vsb adfac" v-for="(item,index) in sixWd" :key="index">
  57. <img class="vsb-img" :src="item.img"/>
  58. <div class="vsb-right">
  59. <div class="vsbr-top adfac">
  60. <div class="vsbrt-type" :style="{'background':item.color}">{{ item.type }}</div>
  61. <div class="vsbrt-title" :style="{'color':item.color}">{{ item.title }}</div>
  62. </div>
  63. <div class="vsbr-desc">{{ item.desc }}</div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. <!-- 总体评估分析 -->
  70. <div class="cd_box adffc" style="border: none;">
  71. <div class="v2-top adfacjb" :style="{'background-image':'url(https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_top_title_bg2.png)'}">
  72. <div class="vt-left">总体评估分析</div>
  73. <div class="vt-right">团队发展动态评估报告(团队版) </div>
  74. </div>
  75. <div class="v2-box" style="border: 1px solid #33A7A7;">
  76. <img class="vb-img1" :src="'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_box_img1.png'">
  77. <div class="v2-p2">报告的核心是PERILL评估分析下的整体团队表现。这包括团队在PERILL模型每个关键要素上的综合得分,通过结合得分和置信指数,我们能够展示出高功能和低功能领域。</div>
  78. <div class="v2-p2" style="margin-top: 10px;font-weight: 400;color: #002846;font-size: 10px;">下面图中的位置标记显示了团队按影响力划分的总分。</div>
  79. <div class="vb-category">
  80. <div class="vbc-pre adfac">
  81. <div class="vbcp-yuan y1"></div>
  82. <div class="vbcp-text">团队领导者 Team Leader</div>
  83. </div>
  84. <div class="vbc-pre adfac">
  85. <div class="vbcp-yuan y2"></div>
  86. <div class="vbcp-text">团队成员 Team Member</div>
  87. </div>
  88. <div class="vbc-pre adfac">
  89. <div class="vbcp-yuan y3"></div>
  90. <div class="vbcp-text">利益相关方 Stakeholder</div>
  91. </div>
  92. <div class="vbc-pre adfac">
  93. <div class="vbcp-yuan y4"></div>
  94. <div class="vbcp-text">赞助人/出资人 Sponsor</div>
  95. </div>
  96. </div>
  97. <view style="width:360px;height:360px;margin: 0 auto;" class="pdfEchart">
  98. <l-echart ref="ztzdfxRef" :canvas2d="true" @finished="initZtzdfxChart" style="width: 100%;height: 100%;"></l-echart>
  99. </view>
  100. <div class="v2b-tip-title" style="color: #199C9C;">注: 关于认同度、重要性分、影响力分的定义</div>
  101. <div class="v2b-tip-memo">
  102. a.“认同度分”,指标逻辑为团队全体对当前主题所对应各问卷题目认同度评分的均值,用来表征团队对这一主题问卷所陈述内容与团队情况的相符合程度的平均认知,最高分:5分,最低分:0分;<br>
  103. b.“重要分”,指标逻辑为根据团队全体对当前主题所对应各问卷题目重要性评分的均值,用来表征团队对这一主题问卷所陈述内容对于团队重要性的平均认知,最高分:5分,最低分:0分;<br>
  104. c.“影响力分”,指标逻辑为团队全体对当前主题所对应各问卷题目的认同度评分与重要性评分乘积的均值,用来表征团队对这一主题问卷所陈述内容对于团队的影响力水平,最高分:25分,最低分:0分;
  105. </div>
  106. <div class="v2b-title">评估结果</div>
  107. <div class="v2b-p" v-html="(reportData.totalDiagnosticOutput||'').replaceAll('\n\n','<br>')"></div>
  108. <div class="v2b-title">评估建议</div>
  109. <div class="v2b-p" v-html="(reportData.totalDiagnosisSuggest||'').replaceAll('\n\n','<br>')"></div>
  110. </div>
  111. </div>
  112. <!-- 多维度 -->
  113. <canvas type="2d" canvas-id="score-canvas" id="score-canvas" class="offscreen-canvas"></canvas>
  114. <template v-if="reportData&&reportData.dimensionAnalysis&&reportData.dimensionAnalysis.length">
  115. <div class="cd_box adffc" style="border: none;"
  116. v-for="(item,index) in reportData.dimensionAnalysis" :key="index">
  117. <div class="v2-top adfacjb":style="{'background-image':'url('+'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/'+typeDict[item.title]+'_title_bg.png)'}">
  118. <div class="vt-left" :class="{'black':(item.title=='人际关系'||item.title=='学习')}">{{ item.title }}</div>
  119. <div class="vt-right">团队发展动态评估报告(团队版) </div>
  120. </div>
  121. <div class="v2-box" :style="{'border':'none','padding':0}">
  122. <div class="v2-p2">{{ item.desc }}</div>
  123. <div class="v2-subp">主题均分</div>
  124. <div class="vb-table adf" :style="{'border':'1px solid #E6EAED','margin-top':'12px'}">
  125. <div class="vbt2-left">
  126. <div class="vbt2l-th adf" :style="{'background':item.thbgcolor,'color':item.thtextcolor}">
  127. <div class="vbt2l-th-title adfac">主题</div>
  128. <div class="vbt2l-th-score adfacjc">影响力分</div>
  129. </div>
  130. <div class="vbt2l-pre" v-for="(ss,si) in item.scoreSpreads" :key="si">
  131. <div class="vbt2l-pre-l">
  132. <div class="vbt2l-pre-l-title" :style="{'color':item.titlecolor}">{{ ss.theme||'' }}</div>
  133. <div class="vbt2l-pre-l-tip">{{ ss.question||'' }}</div>
  134. </div>
  135. <div class="vbt2l-pre-r adfacjc">{{ ss.regular.avgScore||0 }}</div>
  136. </div>
  137. </div>
  138. <div class="vbt2-right adffc">
  139. <div class="vbt2r-th adf" :style="{'background':item.thbgcolor,'color':item.thtextcolor}">
  140. <div class="vbt2r-pre adfacjc">认同度分</div>
  141. <div class="vbt2r-pre adfacjc">重要性分</div>
  142. </div>
  143. <div class="vbt2r-tb adf">
  144. <div class="vbt2r-tb-lines adf">
  145. <div class="vbt2r-tb-lines-pre" v-for="item in 12" :key="item"></div>
  146. </div>
  147. <div class="vbt2r-tb-l adffc">
  148. <div class="vbt2r-tb-l-pre red adfac" v-for="(ss,si) in item.scoreSpreads" :key="si">
  149. <div class="vbt2r-tb-l-pre-zzt red" :style="{'width':(ss.regular.avgAgreement/6*100)+'%'}"></div>
  150. </div>
  151. </div>
  152. <div class="vbt2r-tb-l">
  153. <div class="vbt2r-tb-l-pre green adfac" v-for="(ss,si) in item.scoreSpreads" :key="si">
  154. <div class="vbt2r-tb-l-pre-zzt green" :style="{'width':(ss.regular.avgVital/6*100)+'%'}"></div>
  155. </div>
  156. </div>
  157. <div class="vbt2r-num adf">
  158. <div class="vbt2r-num-pre" v-for="(item,index) in [5,4,3,2,1,0,1,2,3,4,5]" :key="index">{{ item }}</div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. <div class="v2-subp">评估结果</div>
  164. <div class="v2-p" style="margin-top: 6px;" v-html="(item.diagnosisOutput||'').replaceAll('\n\n','<br>')"></div>
  165. </div>
  166. </div>
  167. </template>
  168. <!-- 封底页 -->
  169. <div class="cd_box fdy" style="border: none;">
  170. <div class="v2-top adfacjb" :style="{'background-image':'url(https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/fdy_title_bg.png)'}"></div>
  171. <div class="fdy-title">致团队:从评估到行动,开启团队进化跃迁之旅</div>
  172. <div class="fdy-p">当您阅读至此,首先恭喜您和团队伙伴共同完成了一次完整、专业的团队评估!这标志着团队发展旅程中一个充满可能性的新起点。</div>
  173. <div class="fdy-p">作为团队教练,我们希望与您分享PERILL评估的科学价值,并为您描绘从系统诊断到协同进化的路径。 </div>
  174. <div class="fdy-subtitle">一、这份报告为团队带来了什么? </div>
  175. <div class="fdy-p" style="margin-top: 6px;">这份报告整合了团队内部(如:团队领导者与成员)与外部(如:客户、合作伙伴、赞助人)的多方视角,为您呈现团队作为一个“系统”的真实状态。它帮助团队:</div>
  176. <div class="fdy-p" style="margin-top: 0px;text-indent: 24px;">· 看见惯性模式与盲点——那些日常被忽略的协作断点、沟通落差与共识偏差。</div>
  177. <div class="fdy-p" style="margin-top: 0px;text-indent: 24px;">· 获得立体画像而非主观印象——基于数据而非直觉,客观定位团队在六大维度的表现。</div>
  178. <div class="fdy-p" style="margin-top: 0px;text-indent: 24px;">· 识别高杠杆改进区——不只列出问题,更揭示“从哪里改变,能带动全局提升”。</div>
  179. <div class="fdy-subtitle">二、PERILL 评估的科学洞察:不只是分数,更是系统思维</div>
  180. <div class="fdy-p" style="margin-top: 6px;">PERILL源自David Clutterbuck教授数十年的实证研究,其价值远超过一份评分报告。它帮助团队实现:</div>
  181. <div class="fdy-subtitle2">从“凭感觉管理”到“系统诊断”</div>
  182. <div class="fdy-p" style="margin-top: 6px;text-indent: 24px;">传统团队讨论容易陷入“我觉得”“你认为”的主观争论。PERILL提供共同语言与结构框架,让对话基于事实,聚焦系统障碍而非个人指责。</div>
  183. <div class="fdy-subtitle2">揭示“维度关联”,避免单一解药</div>
  184. <div class="fdy-p" style="margin-top: 6px;text-indent: 24px;">PERILL 揭示六大维度间的动态关联,例如:</div>
  185. <div class="fdy-p" style="margin-top: 0px;text-indent: 24px;">· 人际关系(R)紧张 → 抑制信息共享 → 影响学习(L)与创新 → 动摇宗旨认同(P)。</div>
  186. <div class="fdy-p" style="margin-top: 0px;text-indent: 24px;">· 改进关键点:可能只需提升心理安全(R),即可激活学习(L)与协同(I)。</div>
  187. <div class="fdy-subtitle2">赋能团队成为“自我进化系统”</div>
  188. <div class="fdy-p" style="margin-top: 6px;text-indent: 24px;">评估过程本身就是一次深度对话与反思。通过共同诊断、共同制定行动,团队主人翁意识被激发,变革可持续性远高于外部强加的“方案”。</div>
  189. <div class="fdy-subtitle">三、接下来,团队可以如何行动?</div>
  190. <div class="fdy-p" style="margin-top: 8px;">报告只是开始,真正的进化发生在对话与实践中。可以依照团队的需求去安排以下内容</div>
  191. <div class="fdy-subtitle2">1. 召开一次“报告解读与共识工作坊”</div>
  192. <div class="fdy-p" style="margin-top: 6px;text-indent: 24px;">邀请专业团队教练与团队一起开放地探讨评估结果,理解数据背后的含义,并就<span style="font-weight: bold;">“我们接下来共同聚焦哪1-2个维度?”</span>达成共识。这个过程本身,就是一次强有力的团队对话与承诺建立。</div>
  193. <div class="fdy-subtitle2">2. 针对关键挑战,设计专题行动实验</div>
  194. <div class="fdy-subtitle2">3. 如需深度支持,可考虑引入团队教练辅导助力团队发展</div>
  195. <div class="fdy-p">每一支高价值团队,都始于对现状清醒的认知与共同进化的勇气。PERILL为团队提供了导航仪与路线图——下一步,行动在您们手中。</div>
  196. <div class="fdy-p">PERILL不止于评估,更在于赋能。期待与您和团队同行,见证未来的更多可能。</div>
  197. <div class="fdy-p" style="margin-top: 41px;">具体需求可联系您的团队教练 或 扫码联系“⼤衡同学”。</div>
  198. <div class="fdy-code adfacjc"><img class="fdy-code-team" :src="'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/fdy_code.png'"></div>
  199. </div>
  200. </view>
  201. <view class="pdf_btn" @click="createPdf">生成PDF</view>
  202. <view class="loading adffcacjc" v-if="isLoading">
  203. <u-loading-icon text="数据加载中,请耐心等待" :vertical="true" size="72" color="#FFFFFF" textSize="32" textColor="#FFFFFF"></u-loading-icon>
  204. </view>
  205. </view>
  206. </template>
  207. <script name="">
  208. import { BaseApi } from '@/http/baseApi.js';
  209. import * as echarts from '@/pagesHome/components/lime-echart/static/echarts.min.js'
  210. import lEchart from '@/pagesHome/components/lime-echart/components/l-echart/l-echart.vue'
  211. export default {
  212. name: 'ZtzdfxChart',
  213. components:{ lEchart },
  214. data() {
  215. return {
  216. isLoading: true,
  217. reportId:'',
  218. reportData: null,
  219. isChartReady: false,
  220. scale:1,
  221. originalContainerHeight: 0,
  222. containerScaledHeight: 'auto',
  223. typeDict: {
  224. '宗旨与动机':'zzdj',
  225. '外部流程、系统与结构':'wbjg',
  226. '人际关系':'rjgx',
  227. '内部流程、系统与结构':'nbjg',
  228. '学习':'xx',
  229. '领导力':'ldl'
  230. },
  231. sixWd: [
  232. {
  233. img:'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_img_p.png',
  234. type:'P',
  235. title:'宗旨与动机',
  236. desc:'指团队共享的目的和存在的意义, 包含对共同的愿景,目标和优先级的清晰度。',
  237. color:'#761E6A'
  238. },
  239. {
  240. img:'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_img_e.png',
  241. type:'E',
  242. title:'外部流程、系统与结构',
  243. desc:'指团队与其外部利益相关者 - 客户,供应商,股东,组织内的上级及其他团队的互动关系和协作机制。',
  244. color:'#009191'
  245. },
  246. {
  247. img:'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_img_r.png',
  248. type:'R',
  249. title:'人际关系',
  250. desc:'指团队成员共同工作时的关系状态–他们是否相互尊重和信任对方的能力,是否足够心理安全以能够坦诚沟通,是否真正关心彼此的幸福感等。',
  251. color:'#FFD750'
  252. },
  253. {
  254. img:'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_img_i.png',
  255. type:'I',
  256. title:'内部流程、系统与结构',
  257. desc:'指团队如何管理工作任务和流程(包括但不限于会议、任务分配和团队情绪等),互相支持以及高质量的沟通和决策。',
  258. color:'#4EB2B2'
  259. },
  260. {
  261. img:'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_img_l.png',
  262. type:'L',
  263. title:'学习',
  264. desc:'指团队如何应对多变的环境和保持持续的进步和成⻓,能够从经验中反思、提炼并应用知识的能力。',
  265. color:'#AFCDF5'
  266. },
  267. {
  268. img:'https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/master/versionTwo/intro_img_l2.png',
  269. type:'L',
  270. title:'领导力',
  271. desc:'指团队认为需要怎样的领导行为能够让他们,作为个人或者团队做到最好。团队可以和他们的领导者讨论他们的责任及承担方式,以帮助领导者成为他们需要的领导者。',
  272. color:'#002846'
  273. }
  274. ],
  275. pdfImages:[],
  276. };
  277. },
  278. onLoad(options) {
  279. this.reportId = options.reportId;
  280. this.getReportData();
  281. },
  282. mounted() {
  283. this.calculateScaleAndPosition();
  284. uni.onWindowResize(() => {
  285. this.calculateScaleAndPosition();
  286. });
  287. },
  288. methods: {
  289. getReportData(){
  290. this.$api.get(`/core/report/previewReport/${this.reportId}`).then(async ({data:res})=>{
  291. if(res.code!==0) return this.$showToast(res.msg)
  292. this.reportData = res.data;
  293. const tempDimensionAnalysis = [
  294. {
  295. title:'宗旨与动机',thbgcolor:'#761E6A',thtextcolor:'#FFFFFF',titlecolor:'#761E6A',dimensionCode:"purpose",
  296. desc:`「宗旨与动机」维度,我们旨在探究团队是否有清晰的存在理由和明确的方向,能够激发团队成员的动力并吸引他们的想象力,以及个人与集体的身份认同是否围绕共同的目标,并在实现目标的优先次序上达成一致。`
  297. },
  298. {
  299. title:'外部流程、系统与结构',thbgcolor:'#009191',thtextcolor:'#FFFFFF',titlecolor:'#009191',dimensionCode:"external",
  300. desc:`「外部流程、系统与结构」维度,我们旨在探究团队如何与各种利益相关者互动,他们与团队的利益相关方各自如何寻求了解对方,以及现有系统和流程的有效性,以帮助管理不同利益相关者的期望和需求。`
  301. },
  302. {
  303. title:'人际关系',thbgcolor:'#FFD750',thtextcolor:'#002846',titlecolor:'#002846',dimensionCode:"relationship",
  304. desc:`「人际关系」维度,我们旨在探究团队成员相互沟通交流的状态,团队成员的信任程度、尊重和关心的程度、心理安全度,以及团队成员之间的关系如何促进(或破坏)协作。`
  305. },
  306. {
  307. title:'内部流程、系统与结构',thbgcolor:'#4EB2B2',thtextcolor:'#FFFFFF',titlecolor:'#33A7A7',dimensionCode:"internal",
  308. desc:`「内部流程、系统与结构」维度,我们旨在探究团队在管理工作任务和流程中如何平衡责任与自主权进行协作。主要关注团队应对变化时的敏捷程度、日常沟通方式以及内部决策过程的有效性。`
  309. },
  310. {
  311. title:'学习',thbgcolor:'#AFCDF5',thtextcolor:'#002846',titlecolor:'#002846',dimensionCode:"learning",
  312. desc:`「学习」维度,我们旨在探究团队如何提高其绩效(完成当下的任务)、能力(提高技能和资源以处理明天的任务)和容量(⻓期的愿景,用更少的资源做更多的事情)以应对当前和未来的任务。同时还关注团队如何管理这些能力和提高效率。`
  313. },
  314. {
  315. title:'领导力',thbgcolor:'#002846',thtextcolor:'#FFFFFF',titlecolor:'#002846',dimensionCode:"leadership",
  316. desc:`「领导力」维度,我们旨在探究团队领导者的素质和行为(包括但不限于正式与非正式的引导、赋能与责任承担方式)如何对团队功能和其他因素产生影响,以及这是积极的还是消极的。`
  317. }
  318. ]
  319. this.reportData.dimensionAnalysis.forEach((d,i)=>{
  320. d.scoreSpreads.forEach(s=>{
  321. s.theme = s.theme.replaceAll(',',' ').replaceAll(',','');
  322. })
  323. let temp = tempDimensionAnalysis.find(t=>t.dimensionCode === d.dimensionCode)||{};
  324. this.reportData.dimensionAnalysis[i] = {...d,...temp}
  325. })
  326. // 【关键逻辑】在数据渲染后,开始预加载图片
  327. await this.$nextTick(); // 确保DOM更新完毕
  328. try {
  329. const imageUrls = this.collectImageUrls();
  330. const results = await this.preloadAllImages(imageUrls);
  331. // (可选) 检查加载结果并上报或提示
  332. const failedImages = results
  333. .filter(result => result.status === 'rejected')
  334. .map(result => result.reason.url); // 获取加载失败的图片URL
  335. if (failedImages.length > 0) {
  336. console.error(`加载失败的图片 (重试3次后):`, failedImages);
  337. this.$showToast('部分图片资源加载失败');
  338. } else {
  339. console.log('所有依赖的图片已加载完成!');
  340. }
  341. } catch (error) {
  342. // Promise.allSettled 本身不应该抛出错误,这里作为保险
  343. console.error('预加载过程中发生意外错误:', error);
  344. } finally {
  345. // 无论成功或失败,最后都隐藏loading
  346. this.isLoading = false;
  347. }
  348. }).catch(err => {
  349. // 网络请求失败等情况
  350. console.error('获取报告数据失败:', err);
  351. this.isLoading = false;
  352. this.$showToast('获取报告数据失败,请检查网络');
  353. });
  354. },
  355. /**
  356. * @description 新增:收集页面上所有需要预加载的图片URL
  357. * @returns {Array<string>} 包含所有图片URL的数组
  358. */
  359. collectImageUrls() {
  360. // 使用 Set 来自动去重
  361. const imageUrls = new Set();
  362. const baseUrl = 'https://oss.familydaf.cn/sxsnfile/';
  363. // 1. 静态图片 (封面、介绍等)
  364. imageUrls.add(baseUrl + '20251230/b70c19716d86452aaa0c9808a2851e8b.png');
  365. console.log(`[Preload] 收集到 ${imageUrls.size} 个待加载的图片URL`);
  366. return Array.from(imageUrls); // 将 Set 转换为数组
  367. },
  368. /**
  369. * @description 【新增】带重试逻辑的单个图片加载器
  370. * @param {string} url 图片URL
  371. * @param {number} maxRetries 最大重试次数
  372. * @returns {Promise} 成功时 resolve, 彻底失败时 reject
  373. */
  374. loadImageWithRetry(url, maxRetries = 5) {
  375. return new Promise((resolve, reject) => {
  376. let attempts = 0;
  377. const tryLoad = () => {
  378. attempts++;
  379. uni.getImageInfo({
  380. src: url,
  381. success: (res) => {
  382. // console.log(`图片加载成功: ${url} (尝试次数: ${attempts})`);
  383. resolve(res);
  384. },
  385. fail: (err) => {
  386. console.warn(`图片加载失败: ${url} (尝试次数: ${attempts}/${maxRetries})`);
  387. if (attempts < maxRetries) {
  388. // 稍作延迟后重试,避免立即请求导致服务器压力
  389. setTimeout(tryLoad, 300);
  390. } else {
  391. // 达到最大重试次数,彻底失败
  392. console.error(`图片彻底加载失败: ${url}`);
  393. reject({ url, error: err }); // reject时返回包含url的对象,方便追踪
  394. }
  395. }
  396. });
  397. };
  398. tryLoad();
  399. });
  400. },
  401. /**
  402. * @description 【优化】预加载所有图片,并处理重试逻辑
  403. * @param {Array<string>} urls 图片URL数组
  404. * @returns {Promise<Array<Object>>} 返回 Promise.allSettled 的结果数组
  405. */
  406. preloadAllImages(urls) {
  407. const promises = urls.map(url => this.loadImageWithRetry(url, 5));
  408. // 使用 Promise.allSettled
  409. // 它会等待所有 Promise 完成(无论是 resolve还是reject)
  410. // 这样即使有图片加载失败,也不会中断整个过程
  411. return Promise.allSettled(promises);
  412. },
  413. async createPdf(){
  414. uni.showLoading({
  415. title:'正在生成PDF所需的图片...'
  416. })
  417. try {
  418. const ztzdfxImgPromise = this.downloadZtzdfxImg();
  419. const dimensionImagePromises = this.reportData.dimensionAnalysis.map(d => {
  420. return this.generateScoreImage(d,d.scoreSpreads);
  421. });
  422. const allImageUrls = await Promise.all([
  423. ztzdfxImgPromise,
  424. ...dimensionImagePromises
  425. ]);
  426. this.pdfImages = allImageUrls;
  427. console.log(allImageUrls);
  428. return
  429. this.$api.post('/core/report/reportToPdf',{
  430. images:this.pdfImages,
  431. reportId:this.reportId
  432. }).then(({data:res})=>{
  433. if(res.code!==0) return this.$showToast(res.msg)
  434. uni.hideLoading();
  435. this.$showToast('生成成功');
  436. setTimeout(()=>{
  437. uni.redirectTo({
  438. url:'/pagesHome/report'
  439. })
  440. },1500)
  441. })
  442. } catch (error) {
  443. uni.hideLoading();
  444. console.error('生成图片过程中发生错误:', error);
  445. uni.showToast({ title: '生成图片失败,请重试', icon: 'none' });
  446. }
  447. },
  448. // 绘制主函数
  449. async generateScoreImage(dimensionData, scoreData) {
  450. return new Promise(resolve => {
  451. console.log('开始生成图片...');
  452. // --- 1. 定义尺寸和样式 ---
  453. const canvasWidth = 588;
  454. const headerHeight = 26;
  455. const rowHeight = 54;
  456. const totalHeight = headerHeight + rowHeight * scoreData.length;
  457. const leftColWidth = 280;
  458. const rightColWidth = 308;
  459. // --- 2. 获取 Canvas 节点 ---
  460. const query = uni.createSelectorQuery().in(this);
  461. query.select('#score-canvas')
  462. .fields({
  463. node: true,
  464. size: true
  465. })
  466. .exec(async (res) => {
  467. if (!res || !res[0] || !res[0].node) {
  468. console.error('获取 Canvas 节点失败,请检查 canvas-id 和 type="2d" 是否正确设置。');
  469. uni.showToast({
  470. title: '组件初始化失败',
  471. icon: 'none'
  472. });
  473. return;
  474. }
  475. const canvasNode = res[0].node;
  476. const ctx = canvasNode.getContext('2d');
  477. const dpr = uni.getSystemInfoSync().pixelRatio;
  478. // --- 3. 设置画布尺寸和缩放以适应高分屏 ---
  479. canvasNode.width = canvasWidth * dpr;
  480. canvasNode.height = totalHeight * dpr;
  481. ctx.scale(dpr, dpr);
  482. // --- 4. 开始绘制 ---
  483. // 绘制大背景
  484. ctx.fillStyle = '#FFFFFF';
  485. ctx.fillRect(0, 0, canvasWidth, totalHeight);
  486. // --- 5. 绘制表头 ---
  487. // 左侧表头背景
  488. ctx.fillStyle = dimensionData.thbgcolor;
  489. ctx.fillRect(0, 0, leftColWidth, headerHeight);
  490. // 右侧表头背景
  491. ctx.fillRect(leftColWidth, 0, rightColWidth, headerHeight);
  492. // 左侧表头文字
  493. ctx.fillStyle = dimensionData.thtextcolor;
  494. ctx.font = 'bold 9px sans-serif';
  495. ctx.textBaseline = 'middle';
  496. ctx.textAlign = 'left';
  497. ctx.fillText('主题', 15, headerHeight / 2);
  498. // 左侧表头分割线
  499. ctx.strokeStyle = 'rgba(255,255,255,0.24)';
  500. ctx.lineWidth = 1;
  501. ctx.beginPath();
  502. ctx.moveTo(leftColWidth - 54, 0);
  503. ctx.lineTo(leftColWidth - 54, headerHeight);
  504. ctx.stroke();
  505. // 影响力分右侧分割线 (Header)
  506. ctx.beginPath();
  507. ctx.moveTo(leftColWidth, 0);
  508. ctx.lineTo(leftColWidth, headerHeight);
  509. ctx.stroke();
  510. ctx.textAlign = 'center';
  511. ctx.fillText('影响力分', leftColWidth - 27, headerHeight / 2);
  512. // 右侧表头分割线
  513. ctx.beginPath();
  514. ctx.moveTo(leftColWidth + rightColWidth / 2, 0);
  515. ctx.lineTo(leftColWidth + rightColWidth / 2, headerHeight);
  516. ctx.stroke();
  517. // 右侧表头文字
  518. ctx.fillText('认同度分', leftColWidth + rightColWidth / 4, headerHeight / 2);
  519. ctx.fillText('重要性分', leftColWidth + rightColWidth * 0.75, headerHeight / 2);
  520. // --- 6. 循环绘制每一行 ---
  521. for (let i = 0; i < scoreData.length; i++) {
  522. const item = scoreData[i];
  523. const yPos = headerHeight + i * rowHeight;
  524. this.drawTableItem(ctx, item, yPos, leftColWidth, rightColWidth, rowHeight, dimensionData);
  525. }
  526. // --- 7. 绘制右侧底部的刻度 (绘制在最上层) ---
  527. // 先绘制白色背景遮挡网格线
  528. ctx.fillStyle = '#FFFFFF';
  529. const axisHeight = 20; // 底部文字区域高度
  530. ctx.fillRect(leftColWidth, totalHeight - axisHeight, rightColWidth, axisHeight);
  531. ctx.fillStyle = '#002846';
  532. ctx.font = 'bold 10px sans-serif';
  533. ctx.textAlign = 'center';
  534. ctx.textBaseline = 'bottom';
  535. const centerX = leftColWidth + rightColWidth / 2;
  536. const colWidth = rightColWidth / 12;
  537. // 刻度 0-5
  538. for (let k = 0; k <= 5; k++) {
  539. let xR = centerX + k * colWidth;
  540. let xL = centerX - k * colWidth;
  541. let yTxt = totalHeight - 5; // 距离底部一点距离
  542. if (k === 0) {
  543. ctx.fillText(0, centerX, yTxt);
  544. } else {
  545. ctx.fillText(k, xR, yTxt);
  546. ctx.fillText(k, xL, yTxt);
  547. }
  548. }
  549. // --- 8. 绘制最外层边框 ---
  550. ctx.strokeStyle = '#E6EAED';
  551. ctx.lineWidth = 1;
  552. ctx.strokeRect(0, 0, canvasWidth, totalHeight);
  553. // --- 9. 生成图片 ---
  554. uni.hideLoading();
  555. uni.canvasToTempFilePath({
  556. canvas: canvasNode,
  557. x: 0,
  558. y: 0,
  559. width: canvasWidth,
  560. height: totalHeight,
  561. destWidth: canvasWidth * dpr,
  562. destHeight: totalHeight * dpr,
  563. success: async (result) => {
  564. console.log('图片生成成功!', result.tempFilePath);
  565. const fileurl = await this.uploadFilePromise(result.tempFilePath);
  566. console.log(fileurl, 'fileurl');
  567. resolve(fileurl)
  568. },
  569. fail: (err) => {
  570. console.error('图片生成失败', err);
  571. uni.showToast({
  572. title: '图片生成失败',
  573. icon: 'none'
  574. });
  575. }
  576. }, this);
  577. });
  578. })
  579. },
  580. drawTableItem(ctx, item, y, leftW, rightW, h, dimensionData) {
  581. // 1. 左侧
  582. // 边框
  583. ctx.strokeStyle = '#E6EAED';
  584. ctx.lineWidth = 1;
  585. // 左侧整体边框
  586. ctx.strokeRect(0, y, leftW, h);
  587. // 竖线分割 Theme/Question 和 Score
  588. ctx.beginPath();
  589. ctx.moveTo(leftW - 54, y);
  590. ctx.lineTo(leftW - 54, y + h);
  591. ctx.stroke();
  592. // --- 计算高度 ---
  593. // 必须先设置字体,否则 measureText 计算不准确
  594. ctx.font = 'bold 9px sans-serif';
  595. let themeHeight = this.calculateWrappedTextHeight(ctx, item.theme, 14, leftW - 54 - 20);
  596. ctx.font = '8px sans-serif';
  597. let questionHeight = this.calculateWrappedTextHeight(ctx, item.question, 10, leftW - 54 - 20);
  598. let totalTextHeight = themeHeight + 4 + questionHeight; // 4 is spacing
  599. let startY = y + (h - totalTextHeight) / 2;
  600. // --- 绘制左侧文字 ---
  601. // Theme Title
  602. ctx.fillStyle = dimensionData.titlecolor;
  603. ctx.font = 'bold 9px sans-serif';
  604. ctx.textAlign = 'left';
  605. ctx.textBaseline = 'top';
  606. this.drawWrappedTextTop(ctx, item.theme, 10, startY, 14, leftW - 54 - 20);
  607. // Question Tip
  608. ctx.fillStyle = '#002846';
  609. ctx.font = '8px sans-serif';
  610. this.drawWrappedTextTop(ctx, item.question, 10, startY + themeHeight + 4, 10, leftW - 54 - 20);
  611. // Score
  612. ctx.fillStyle = '#002846';
  613. ctx.font = 'bold 12px DIN, sans-serif';
  614. ctx.textAlign = 'center';
  615. ctx.textBaseline = 'middle';
  616. ctx.fillText((item.regular && item.regular.avgScore) || 0, leftW - 27, y + h / 2);
  617. // 2. 右侧
  618. const rightX = leftW;
  619. // 裁剪右侧区域,防止内容溢出
  620. ctx.save();
  621. ctx.beginPath();
  622. ctx.rect(rightX, y, rightW, h);
  623. ctx.clip();
  624. // 右侧不需要横向分割线,只绘制竖向网格线
  625. // 绘制背景网格线 (竖向,贯穿整个高度)
  626. ctx.strokeStyle = '#F0F2F8';
  627. ctx.lineWidth = 1;
  628. const colWidth = rightW / 12;
  629. for (let k = 1; k < 12; k++) {
  630. ctx.beginPath();
  631. ctx.moveTo(rightX + k * colWidth, y);
  632. ctx.lineTo(rightX + k * colWidth, y + h);
  633. ctx.stroke();
  634. }
  635. // 绘制中间线
  636. const centerX = rightX + rightW / 2;
  637. // Bar Charts
  638. const barHeight = 10;
  639. const barY = y + (h - barHeight) / 2;
  640. // Agreement (Left, Red/Purple)
  641. // Width = avgAgreement / 6 * 100% of half width?
  642. const maxVal = 6;
  643. const halfW = rightW / 2;
  644. const avgAgreement = (item.regular && item.regular.avgAgreement) || 0;
  645. const avgVital = (item.regular && item.regular.avgVital) || 0;
  646. const agreeW = (avgAgreement / maxVal) * halfW;
  647. const vitalW = (avgVital / maxVal) * halfW;
  648. // Draw Agreement Bar (grows from center to left)
  649. ctx.fillStyle = '#BA8EB4';
  650. ctx.fillRect(centerX - agreeW, barY, agreeW, barHeight);
  651. // Draw Vital Bar (grows from center to right)
  652. ctx.fillStyle = '#80C8C8';
  653. ctx.fillRect(centerX, barY, vitalW, barHeight);
  654. // 恢复裁剪
  655. ctx.restore();
  656. },
  657. // 辅助函数:计算自动换行文字的总高度
  658. calculateWrappedTextHeight(ctx, text, lineHeight, maxWidth) {
  659. if (!text) return 0;
  660. let words = text.split('');
  661. let line = '';
  662. let height = lineHeight; // 至少有一行
  663. for (let n = 0; n < words.length; n++) {
  664. let testLine = line + words[n];
  665. let metrics = ctx.measureText(testLine);
  666. let testWidth = metrics.width;
  667. if (testWidth > maxWidth && n > 0) {
  668. line = words[n];
  669. height += lineHeight;
  670. } else {
  671. line = testLine;
  672. }
  673. }
  674. return height;
  675. },
  676. // 辅助函数:绘制自动换行文字 (从顶部开始)
  677. drawWrappedTextTop(ctx, text, x, y, lineHeight, maxWidth) {
  678. if (!text) return;
  679. let words = text.split('');
  680. let line = '';
  681. let currentY = y;
  682. for (let n = 0; n < words.length; n++) {
  683. let testLine = line + words[n];
  684. let metrics = ctx.measureText(testLine);
  685. let testWidth = metrics.width;
  686. if (testWidth > maxWidth && n > 0) {
  687. ctx.fillText(line, x, currentY); // 使用 currentY 作为顶部基线
  688. line = words[n];
  689. currentY += lineHeight;
  690. } else {
  691. line = testLine;
  692. }
  693. }
  694. ctx.fillText(line, x, currentY);
  695. },
  696. calculateScaleAndPosition() {
  697. uni.getSystemInfo({
  698. success: (res) => {
  699. const screenWidth = res.windowWidth; // 手机屏幕的宽度
  700. const pcContentWidth = 630; // PC端内容的原始宽度
  701. this.scale = screenWidth / pcContentWidth;
  702. this.$nextTick(() => {
  703. if (this.$refs.ztzdfxRef) {
  704. this.initZtzdfxChart();
  705. }
  706. });
  707. }
  708. });
  709. },
  710. calculatePdfContainerHeight() {
  711. uni.createSelectorQuery().in(this).select('#pdfContainer').boundingClientRect(rect => {
  712. if (rect) {
  713. this.originalContainerHeight = rect.height;
  714. this.containerScaledHeight = this.originalContainerHeight * this.scale;
  715. // console.log('原始高度:', this.originalContainerHeight, '缩放比例:', this.scale, '缩放后高度:', this.containerScaledHeight);
  716. }
  717. }).exec();
  718. },
  719. downloadZtzdfxImg(){
  720. return new Promise(resolve=>{
  721. if (!this.isChartReady) return console.log('图表尚未准备好');
  722. const chartRef = this.$refs.ztzdfxRef;
  723. if (!chartRef) return console.log('无法找到图表组件');
  724. chartRef.canvasToTempFilePath({
  725. success: async (res) => {
  726. const imgUrl = await this.uploadFilePromise(res.tempFilePath);
  727. console.log(imgUrl,'imgUrl');
  728. resolve(imgUrl)
  729. },
  730. fail: (err) => {
  731. console.log('生成图片失败:', err);
  732. }
  733. });
  734. })
  735. },
  736. uploadFilePromise(url) {
  737. return new Promise((resolve, reject) => {
  738. let a = uni.uploadFile({
  739. url: BaseApi+'/uploadFile',
  740. filePath: url,
  741. name: 'file',
  742. success: (res) => {
  743. setTimeout(() => {
  744. let data = JSON.parse(res.data)
  745. if(data&&data.code===0){
  746. resolve(data.data);
  747. }else this.$showToast(data?.msg)
  748. }, 1000);
  749. },
  750. fail: err =>{
  751. resolve('');
  752. }
  753. });
  754. });
  755. },
  756. async initZtzdfxChart() {
  757. let dataSum = this.reportData.overall.length*this.reportData.overall[0].themeTotalSpreads.length;
  758. const leaderData = [],memberData = [],stakeholderData=[],sponsorData=[];
  759. const overall = this.reportData.overall||[];
  760. overall.forEach(o=>{
  761. let themeTotalSpreads = o.themeTotalSpreads||[];
  762. if(['内部流程、系统与结构','学习','领导力'].includes(o.dimension)) themeTotalSpreads = o.themeTotalSpreads.reverse()||[];
  763. themeTotalSpreads.forEach(t=>{
  764. leaderData.push(t.scoreLeader||0);
  765. memberData.push(t.scoreMember||0);
  766. stakeholderData.push(t.scoreStakeholder||0);
  767. sponsorData.push(t.scoreSponsor||0);
  768. })
  769. })
  770. const sumArr = leaderData.concat(memberData).concat(stakeholderData).concat(sponsorData);
  771. const maxValue = sumArr.reduce((a,b)=>Math.max(a,b));
  772. const minValue = sumArr.reduce((a,b)=>Math.min(a,b));
  773. const chart = await this.$refs.ztzdfxRef.init(echarts);
  774. let option = {
  775. graphic: [
  776. {
  777. type: 'image',
  778. id: 'radar-bg',
  779. z: -1,
  780. bounding: 'raw',
  781. left: 'center',
  782. top: 'center',
  783. style: {
  784. image:'https://oss.familydaf.cn/sxsnfile/20251230/b70c19716d86452aaa0c9808a2851e8b.png',
  785. width: 360*this.scale-20,
  786. height: 360*this.scale-20,
  787. opacity: 1
  788. }
  789. },
  790. {
  791. type: 'circle',
  792. z: 100, // 设置一个较高的 z 值,确保它在最顶层
  793. left: 'center', // 水平居中
  794. top: 'center', // 垂直居中
  795. shape: {
  796. r: 12*this.scale // 圆形的半径,您可以根据需要调整大小
  797. },
  798. style: {
  799. fill: '#FFFFFF', // 填充色为白色
  800. shadowBlur: 20*this.scale, // 阴影的模糊范围
  801. shadowColor: 'rgba(0, 0, 0, 0.15)', // 阴影颜色
  802. shadowOffsetY: 4*this.scale // 向下的阴影偏移,产生悬浮效果
  803. }
  804. }
  805. ],
  806. radar: {
  807. // shape: 'circle',
  808. indicator: new Array(dataSum).fill({ max:maxValue, min:minValue }),
  809. axisName: {
  810. show: false
  811. },
  812. splitArea:{
  813. show:false
  814. },
  815. splitLine: {
  816. show: false
  817. },
  818. axisLine: {
  819. show: false
  820. },
  821. startAngle: 95
  822. },
  823. series: [
  824. {
  825. type: 'radar',
  826. data: [
  827. {
  828. value: sponsorData,
  829. itemStyle: {
  830. color: '#012846'
  831. },
  832. lineStyle: {
  833. color: '#012846',
  834. width:1.5
  835. },
  836. areaStyle: {
  837. color: 'rgba(255, 255, 255, 0.4)'
  838. },
  839. symbolSize: 3
  840. },
  841. {
  842. value: stakeholderData,
  843. itemStyle: {
  844. color: '#FFD650'
  845. },
  846. lineStyle: {
  847. color: '#FFD650',
  848. width:1.5
  849. },
  850. areaStyle: {
  851. color: 'rgba(255, 255, 255, 0.4)'
  852. },
  853. symbolSize: 3
  854. },
  855. {
  856. value: memberData,
  857. itemStyle: {
  858. color: '#AFCDF5'
  859. },
  860. lineStyle: {
  861. color: '#AFCDF5',
  862. width:1.5
  863. },
  864. areaStyle: {
  865. color: 'rgba(255, 255, 255, 0.4)'
  866. },
  867. symbolSize: 3
  868. },
  869. {
  870. value: leaderData,
  871. itemStyle: {
  872. color: '#9F6196'
  873. },
  874. lineStyle: {
  875. color: '#9F6196',
  876. width:1.5
  877. },
  878. areaStyle: {
  879. color: 'rgba(255, 255, 255, 0.4)'
  880. },
  881. symbolSize: 3
  882. }
  883. ]
  884. }
  885. ]
  886. };
  887. chart.setOption(option);
  888. this.isChartReady = true;
  889. this.$nextTick(() => {
  890. this.calculatePdfContainerHeight();
  891. });
  892. },
  893. }
  894. };
  895. </script>
  896. <style scoped lang="scss">
  897. .loading{
  898. position: fixed;
  899. left: 0;
  900. right: 0;
  901. top: 0;
  902. bottom: 0;
  903. background: rgba(0,0,0,.4);
  904. z-index: 1001;
  905. }
  906. .page-wrappe{
  907. width: 100%;
  908. background: #FFFFFF;
  909. overflow-x: hidden;
  910. overflow-y: auto;
  911. .pdf-container{
  912. width: 630px;
  913. padding: 0 20rpx;
  914. box-sizing: border-box;
  915. transform-origin: top left;
  916. }
  917. }
  918. .offscreen-canvas {
  919. position: fixed;
  920. top: -9999px;
  921. left: -9999px;
  922. }
  923. .pdf_btn{
  924. padding: 15rpx 20rpx;
  925. border-radius: 20rpx;
  926. font-size: 28rpx;
  927. color: #FFFFFF;
  928. background: #189B9B;
  929. position: fixed;
  930. right: 30rpx;
  931. bottom: 100rpx;
  932. z-index: 1000;
  933. }
  934. @import '../static/pdf.scss';
  935. </style>