report.vue 112 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914
  1. <template>
  2. <div class="outer-container" :class="{'mobile': isMobile}">
  3. <!-- 添加加载状态和错误提示 -->
  4. <div v-if="loading" class="loading-state">
  5. 加载中...
  6. </div>
  7. <div v-else-if="error" class="error-state">
  8. {{ error }}
  9. </div>
  10. <div v-else class="report-container">
  11. <!-- 添加顶部标识栏 -->
  12. <div class="report-header">
  13. <div class="header-left">
  14. <img src="/@/assets/qcLogo.png" class="cc-icon" alt="cc icon">
  15. AI面试结果检验报告
  16. </div>
  17. <div class="header-right">
  18. <div>报告生成时间:{{ reportTime }}</div>
  19. <div class="report-id">报告ID:{{ reportId }}</div>
  20. <!-- 添加导出按钮 -->
  21. </div>
  22. </div>
  23. <!-- 头部信息 -->
  24. <div class="header">
  25. <!-- 头像部分 -->
  26. <div class="header-left">
  27. <img class="avatar" :src="userInfo.avatar" alt="用户头像">
  28. </div>
  29. <!-- 信息部分 -->
  30. <div class="header-right">
  31. <!-- 左侧信息 -->
  32. <div class="left-section">
  33. <div class="info-row">
  34. <span class="label">姓名:</span>
  35. <span class="value">{{ userInfo.name }}</span>
  36. </div>
  37. <div class="info-row">
  38. <span class="label">面试时间:</span>
  39. <span class="value">{{ userInfo.interviewTime }}</span>
  40. </div>
  41. <div class="info-row">
  42. <span class="label">面试时长:</span>
  43. <span class="value">{{ userInfo.duration }}</span>
  44. </div>
  45. </div>
  46. <!-- 右侧信息 -->
  47. <div class="right-section">
  48. <div class="info-row">
  49. <span class="label">实名认证:</span>
  50. <span class="value verified">已核验</span>
  51. </div>
  52. <div class="info-row">
  53. <span class="label">身份证号:</span>
  54. <span class="value">{{ userInfo.idNumber }}</span>
  55. </div>
  56. <div class="info-row">
  57. <span class="label">手机号码:</span>
  58. <span class="value">{{ userInfo.phone }}</span>
  59. </div>
  60. </div>
  61. <!-- 印章 -->
  62. <div class="stamp">
  63. <img v-if="userInfo.pass < 60" src="/@/assets/notPass.png" alt="不通过印章">
  64. <img v-else src="/@/assets/pass.png" alt="通过印章">
  65. </div>
  66. </div>
  67. </div>
  68. <!-- 修改导航选项卡部分 -->
  69. <div
  70. class="nav-tabs"
  71. :class="{ 'fixed': isNavFixed }"
  72. ref="navTabs"
  73. >
  74. <div
  75. v-for="tab in tabs"
  76. :key="tab.id"
  77. class="tab-item"
  78. :class="{
  79. 'active': activeTab === tab.id,
  80. 'link-tab': tab.isLink,
  81. 'info-tab': tab.isInfo
  82. }"
  83. @click="handleTabClick(tab)"
  84. >
  85. {{ tab.name }}
  86. <!-- 添加链接图标 -->
  87. <i v-if="tab.isLink" class="el-icon-link"></i>
  88. <!-- 添加信息图标 -->
  89. <i v-if="tab.isInfo" class="el-icon-info"></i>
  90. </div>
  91. </div>
  92. <!-- 修改占位元素 -->
  93. <div
  94. class="nav-placeholder"
  95. v-if="isNavFixed"
  96. :style="{ height: navHeight + 'px' }"
  97. ></div>
  98. <!-- 各个内容区域添加ref标识 -->
  99. <div ref="comprehensive" class="evaluation-result pdfRef">
  100. <div class="score-section">
  101. <div class="score-section-left">
  102. <div class="score-title">综合评价</div>
  103. <div class="score-value">
  104. <span class="number">{{userInfo.pass}}</span>
  105. <span class="unit">分</span>
  106. <p class="status-tag" v-if="userInfo.pass < 60">不通过</p>
  107. <p class="status-tag" style='background:#67C23A;' v-else>通过</p>
  108. </div>
  109. <div class="detection-results">
  110. <span class="detection-item">
  111. 身份认证
  112. <span :class="userInfo.idNumber ? 'status-normal' : 'status-warning'">
  113. {{ userInfo.idNumber ? '无异常' : '有异常' }}
  114. </span>
  115. </span>
  116. <span class="separator">/</span>
  117. <span class="detection-item">
  118. 手机号实名认证
  119. <span :class="userInfo.phone ? 'status-normal' : 'status-warning'">
  120. {{ userInfo.phone ? '无异常' : '有异常' }}
  121. </span>
  122. </span>
  123. <span class="separator">/</span>
  124. <span class="detection-item">
  125. 手部综合检测 <span class="status-normal" :style="userInfo.visual_analysis_done ? '':'color:#f56c6c;'"> {{ userInfo.visual_analysis_done ? '无异常' : '有异常' }}</span>
  126. </span>
  127. </div>
  128. </div>
  129. <div class="fail-reason">
  130. <div class="reason-header">
  131. <!-- <i class="el-icon-warning"></i> -->
  132. <span>录用建议:{{ hireRecommendation || '正在分析中' }}</span>
  133. </div>
  134. <div class="reason-content">
  135. {{ failReason }}
  136. </div>
  137. </div>
  138. <div class="reason-content redline-section">
  139. <div class="redline-header">
  140. <span class="redline-title">红线题检测结果</span>
  141. <span :class="{
  142. 'status-normal': redLineQuestions.allCorrect,
  143. 'status-warning': !redLineQuestions.allCorrect
  144. }">
  145. {{ redLineQuestions.allCorrect ? '全部正确' : '存在错误,建议不录用' }}
  146. </span>
  147. </div>
  148. <!-- 添加未通过题目的详细信息 -->
  149. <div v-if="!redLineQuestions.allCorrect && redLineQuestions.failedQuestions.length > 0"
  150. class="failed-questions">
  151. <div class="failed-title">未通过的红线题:</div>
  152. <div class="failed-list">
  153. <div v-for="(question, index) in redLineQuestions.failedQuestions"
  154. :key="'failed-'+index"
  155. class="failed-item">
  156. <span class="bullet">•</span>
  157. <span class="question-text">{{ question.question_text || `问题 ${index + 1}` }}</span>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. <!-- 能力雷达图 -->
  164. <div class="radar-chart">
  165. <v-chart
  166. ref="radarChart"
  167. class="radar"
  168. :option="radarOption"
  169. autoresize
  170. />
  171. </div>
  172. </div>
  173. <div ref="ability" class="ability-quality pdfRef">
  174. <h3 style="font-size: 16px; font-weight: bold;">能力素质 <span style="font-size: 14px; font-weight: normal;">综合得分<span class="score-text">{{ totalScore || '正在分析中' }}</span>{{ totalScore ? '/100 分' : '' }}</span> </h3>
  175. <div class="quality-details">
  176. <div class="quality-item">
  177. <div class="quality-left">
  178. <div class="icon-box">
  179. <div class="icon advantage-icon">
  180. <img src="/@/assets/yous.png" alt="优势展现">
  181. </div>
  182. <h5>优势展现</h5>
  183. </div>
  184. <div class="content">
  185. <template v-if="qualityDetails.strengths && qualityDetails.strengths.length">
  186. <p v-for="(strength, index) in qualityDetails.strengths"
  187. :key="index"
  188. v-html="formatTextWithBrackets(getChineseAnalysis(strength))">
  189. </p>
  190. </template>
  191. <p v-else>正在分析中</p>
  192. </div>
  193. </div>
  194. <div class="quality-right">
  195. <div class="icon-box">
  196. <div class="icon suggestion-icon" style="position: relative;">
  197. <img src="/@/assets/que.png" alt="发展建议">
  198. <img style="width: 10px; height: 10px; position: absolute; top: 32%; left: 5px;" src="/@/assets/info.png" alt="">
  199. </div>
  200. <h5>发展建议</h5>
  201. </div>
  202. <div class="content">
  203. <template v-if="qualityDetails.weaknesses && qualityDetails.weaknesses.length">
  204. <p v-for="(weakness, index) in qualityDetails.weaknesses"
  205. :key="index"
  206. v-html="formatTextWithBrackets2(getChineseAnalysis(weakness))">
  207. </p>
  208. </template>
  209. <p v-else>正在分析中</p>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. <div>
  216. <div class="detailed-evaluation">
  217. <div class="line-info">
  218. <div class="line-info-left">低</div>
  219. <div class="line-info-center">中</div>
  220. <div class="line-info-right">高</div>
  221. </div>
  222. <div class="line-chart">
  223. <div class="line-chart-left"></div>
  224. <div class="line_left"></div>
  225. <div class="line_center"></div>
  226. <div class="line_right"></div>
  227. </div>
  228. <div class="ability-scores">
  229. <div v-for="(item, index) in abilityItems" :key="index" class="ability-item">
  230. <span class="ability-name">{{ item.tag_name }}</span>
  231. <div class="bar-chart-container">
  232. <v-chart
  233. :option="getBarChartOption(item)"
  234. :autoresize="true"
  235. style="width: 100%; height: 30px;"
  236. />
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. <div ref="cheat" class="detection-section">
  243. <div class="detection-section-header">
  244. <div class="section-title">作弊检测</div>
  245. <div class="status-tag normal">无异常</div>
  246. </div>
  247. <div class="detection-section-content">
  248. <div class="detection-items">
  249. <div class="item">
  250. <span class="status normal">无风险</span>
  251. <span class="separator">/</span>
  252. <span class="desc">转移、替考:检测无异常</span>
  253. </div>
  254. <div class="item">
  255. <span class="status normal">无风险</span>
  256. <span class="separator">/</span>
  257. <span class="desc">读稿:检测无异常</span>
  258. </div>
  259. <div class="item">
  260. <span class="status normal">无风险</span>
  261. <span class="separator">/</span>
  262. <span class="desc">录屏/切屏:检测无异常</span>
  263. </div>
  264. </div>
  265. <div class="risk-standards">
  266. <div class="standards-title">风险等级标准</div>
  267. <div class="standards-content">
  268. <div class="standard-item">
  269. <span class="level">无异常:</span>
  270. <span class="desc">候选人提供的信息真实/无切屏录屏行为/无互联网查询行为/无互联网传行为</span>
  271. </div>
  272. <div class="standard-item">
  273. <span class="level">低风险:</span>
  274. <span class="desc">候选人提供信息真实/可切屏录屏行为/可互联网查询行为/无互联网传行为</span>
  275. </div>
  276. <div class="standard-item">
  277. <span class="level">高风险:</span>
  278. <span class="desc">面试者与候选人为一不同人/可切屏录屏行为/可互联网查询行为/过程存在传输行为</span>
  279. </div>
  280. </div>
  281. </div>
  282. </div>
  283. </div>
  284. <div ref="psychology" class="psychology-section">
  285. <div class="section-title">心理检测</div>
  286. <!-- -->
  287. <div class="psychology_box">
  288. <div class="psychology_body">
  289. <div class="psychology-desc">
  290. {{ psychologyData.description }}
  291. </div>
  292. <div class="psychology-recommendation">
  293. <span class="label">录用建议:</span>
  294. <span class="value">{{ psychologyData.recommendation }}</span>
  295. </div>
  296. </div>
  297. <div class="duv-score">
  298. <!-- <span class="score" :class="getPsychologyScoreClass">{{ psychologyData.score }}</span>
  299. <span>分</span> -->
  300. <span class="risk-level" :class="getPsychologyScoreClass">{{ getPsychologyRiskLevel }}</span>
  301. </div>
  302. </div>
  303. </div>
  304. <div ref="body" class="body-detection-section">
  305. <div class="detection-section-header">
  306. <div class="section-title">肢体检测</div>
  307. <el-button
  308. type="primary"
  309. link
  310. @click="showBodyVerification = true"
  311. >
  312. 查看肢体核验结果
  313. </el-button>
  314. </div>
  315. <!-- 手部检测结果说明 -->
  316. <div class="detection-results mt-6">
  317. <div class="grid grid-cols-2 gap-4">
  318. <!-- 左手检测结果 -->
  319. <template v-for="(photo, index) in getHandPhotos('left')" :key="'left-'+index">
  320. <div class="detection-item" style="background-color: #f8f8f8;">
  321. <span class="position" style="color: #6c6c6c;">{{ getPositionLabel('left', index) }}</span>
  322. <span class="status" :class="{
  323. 'status-normal': photo.part_verification?.is_correct_part,
  324. 'status-error': !photo.part_verification?.is_correct_part
  325. }">
  326. {{ photo.part_verification?.is_correct_part ? '动作检测无异常' : '动作检测异常' }}
  327. </span>
  328. <span class="description text-gray-500 text-sm">
  329. {{ photo.part_verification?.is_correct_part ? getDefaultDescription('left', index) : photo.part_verification?.explanation || '检测未通过' }}
  330. </span>
  331. </div>
  332. </template>
  333. <!-- 右手检测结果 -->
  334. <template v-for="(photo, index) in getHandPhotos('right')" :key="'right-'+index">
  335. <div class="detection-item" style="background-color: #f8f8f8;">
  336. <span class="position" style="color: #6c6c6c;">{{ getPositionLabel('right', index) }}</span>
  337. <span class="status" :class="{
  338. 'status-normal': photo.part_verification?.is_correct_part,
  339. 'status-error': !photo.part_verification?.is_correct_part
  340. }">
  341. {{ photo.part_verification?.is_correct_part ? '动作检测无异常' : '动作检测异常' }}
  342. </span>
  343. <span class="description text-gray-500 text-sm">
  344. {{ photo.part_verification?.is_correct_part ? getDefaultDescription('right', index) : photo.part_verification?.explanation || '检测未通过' }}
  345. </span>
  346. </div>
  347. </template>
  348. </div>
  349. </div>
  350. </div>
  351. <div ref="answers" class="report-footer">
  352. <!-- 添加问答记录展示区域 -->
  353. <div class="qa-section">
  354. <h3 class="section-title">问答记录</h3>
  355. <div class="qa-content">
  356. <div class="space-y-4">
  357. <div v-for="(record, index) in interviewRecords" :key="index" class=" rounded-lg p-4" v-show="record.question_form === 0">
  358. <!-- 题目标题部分 -->
  359. <div class="mb-4" v-if="record.question_form === 0">
  360. <div class="flex items-start space-x-2 w-2/3" >
  361. <div class="px-2 py-1 rounded text-sm" style="font-size: 14px; font-weight: 600; font-family: 微软雅黑;">第{{ index + 1 }}题:</div>
  362. <!-- <div class="bg-gray-100 text-gray-800 px-2 py-1 rounded text-sm">{{ getQuestionTypeName(record.question_form || 0) }}</div> -->
  363. <div class="flex-1">
  364. <span class="text-gray-800 color-black " style="font-size: 14px;">{{ record.question }}</span>
  365. </div>
  366. </div>
  367. <!-- 视频问答题布局 || record.question_form === 5-->
  368. <div v-if="record.question_form === 0" class="mt-4">
  369. <!-- 原有的视频问答题布局 -->
  370. <div class="flex space-x-4">
  371. <!-- 右侧答案和评分 -->
  372. <div class="w-2/3">
  373. <div class="bg-white p-4 rounded-xl">
  374. <div class="">
  375. <div class="flex flex-col space-x-2">
  376. <div class="px-2 py-1 rounded text-sm" id="candidate-answer" style="font-size: 14px;">候选人回答:</div>
  377. <div class="flex-1">
  378. <p class="text-gray-700 mb-0" style="font-size: 14px; line-height: 20px; color: #808080;">{{ getAnswerText(record.answer) }}</p>
  379. </div>
  380. </div>
  381. </div>
  382. <div>
  383. </div>
  384. </div>
  385. </div>
  386. <!-- 左侧视频播放器 -->
  387. <div class="w-1/3">
  388. <div class="video-container">
  389. <video
  390. class="w-full h-full object-cover rounded-lg"
  391. controls
  392. :src="record.video_url"
  393. preload="metadata"
  394. :poster="fallbackImageBase64Ref"
  395. @loadeddata="handleVideoLoaded"
  396. @error="handleVideoError"
  397. >
  398. 您的浏览器不支持视频播放。
  399. </video>
  400. </div>
  401. </div>
  402. </div>
  403. <!-- 追问题列表 -->
  404. <div v-if="record.follow_up_questions && record.follow_up_questions.length > 0"
  405. class="mt-2 border-gray-200">
  406. <div v-for="(followUp, fIndex) in record.follow_up_questions.slice(-1)"
  407. :key="fIndex"
  408. class="">
  409. <div class="flex items-start space-x-2">
  410. <div class="flex-1">
  411. <!-- 追问题的视频和答案布局 -->
  412. <div class="mt-2">
  413. <div class="flex space-x-4">
  414. <!-- 右侧答案和评分 -->
  415. <div class="w-2/3">
  416. <div class=" p-4 rounded-xl bg-white">
  417. <div class="">
  418. <div class="flex items-start space-x-2">
  419. <div class="bg-purple-100 text-purple-800 px-2 py-1 rounded text-sm" style="font-size: 14px;background-color: #fdd3bd; color:#f7681d;">追问题</div>
  420. <!-- <div class="bg-green-100 text-green-800 px-2 py-1 rounded text-sm">候选人</div> -->
  421. <div class="flex-1">
  422. <span class="font-medium text-gray-800" style="font-size: 14px;">{{ followUp.question }}</span>
  423. <p class="text-gray-700 mb-0" style="font-size: 14px; line-height: 20px; color: #808080;">{{ followUp.answer }}</p>
  424. </div>
  425. </div>
  426. </div>
  427. <div>
  428. <!-- <div class="flex items-start space-x-2">
  429. <div class="bg-yellow-100 text-yellow-800 px-2 py-1 rounded text-sm">AI评分</div>
  430. <div class="flex-1">
  431. <p class="text-gray-600 m-0">{{ followUp.analysis }}</p>
  432. <div class="mt-1 text-blue-500">得分:{{ followUp.score }}</div>
  433. </div>
  434. </div> -->
  435. </div>
  436. </div>
  437. </div>
  438. <!-- 左侧视频播放器 -->
  439. <div v-if="followUp.video_url" class="w-1/3">
  440. <div class="video-container">
  441. <video
  442. class="w-full h-full object-cover rounded-lg"
  443. controls
  444. :src="followUp.video_url"
  445. preload="metadata"
  446. :poster="fallbackImageBase64Ref"
  447. @loadeddata="handleVideoLoaded"
  448. @error="handleVideoError"
  449. >
  450. 您的浏览器不支持视频播放。
  451. </video>
  452. </div>
  453. </div>
  454. </div>
  455. </div>
  456. </div>
  457. </div>
  458. </div>
  459. </div>
  460. <!-- ai评分 -->
  461. <div class="flex flex-col items-start bg-[#f8f8f8] p-4 rounded-lg">
  462. <div class="flex items-center">
  463. <div class="text-[14px] text-[#000] mr-2">本题评分:</div>
  464. <div class="text-[#409EFF] font-medium">{{ record.score }}分</div>
  465. </div>
  466. <div class="flex ml-0">
  467. <div class="text-[14px] text-[#f7681d] mr-2">整体分析:</div>
  468. <div class="analysis-content flex-1">
  469. <p class="text-[14px] text-[#666666] m-0 ml-4 analysis-text">
  470. {{ formatAnalysis(record.analysis) }}
  471. </p>
  472. </div>
  473. </div>
  474. <div class="flex items-center">
  475. <div class="text-[14px] text-[#666666] mr-2">考核点:</div>
  476. <div class="analysis-content flex-1">
  477. <div class="assessment-points">
  478. <!-- 从分析文本中提取的考核点 -->
  479. <template v-for="(point, index) in extractAssessmentPoints(record.analysis)" :key="index">
  480. <div class="assessment-item">
  481. <span class="point-name">{{ point.name }}</span>
  482. <!-- <span class="point-score" :class="getScoreClass(point.score)">{{ point.score }}</span> -->
  483. </div>
  484. <!-- 添加分隔符,除了最后一项 -->
  485. <span v-if="index < extractAssessmentPoints(record.analysis).length - 1" class="separator">/</span>
  486. </template>
  487. </div>
  488. </div>
  489. <div class="progress-bar" style="margin-left: 20px;width: 180px; font-size: 12px;color: #808080;">
  490. <el-progress
  491. :percentage="Number(record.score)"
  492. :stroke-width="6"
  493. :format="formats"
  494. :color="getProgressColor(record.score)"
  495. class="custom-progress"
  496. style="font-size: 12px;color: #808080;"
  497. />
  498. </div>
  499. </div>
  500. </div>
  501. </div>
  502. </div>
  503. </div>
  504. </div>
  505. <!-- 追问题列表 -->
  506. <div v-if="followUpQuestions && followUpQuestions.length > 0"
  507. class="mt-2 border-gray-200">
  508. <div v-for="(followUp, fIndex) in [followUpQuestions[followUpQuestions.length - 1]]"
  509. :key="fIndex"
  510. class="">
  511. <div class="flex items-start space-x-2 pb-4" >
  512. <!-- {{ JSON.stringify(followUp.user_text) }} -->
  513. <div class="px-2 py-1 rounded text-sm" style="font-size: 14px; font-weight: 600; font-family: 微软雅黑;">候选人提问:</div>
  514. <div class="flex-1">
  515. <span class="text-gray-800 color-black " style="font-size: 14px;">{{ followUp.user_text }}</span>
  516. </div>
  517. </div>
  518. <div class="bg-white p-4 rounded-xl mb-4">
  519. <div class="">
  520. <div class="flex flex-col space-x-2">
  521. <div class="px-2 py-1 rounded text-sm" id="candidate-answer" style="font-size: 14px;">智能体回答:</div>
  522. <div class="flex-1">
  523. <p class="text-gray-700 mb-0" style="font-size: 14px; line-height: 20px; color: #808080;">{{ followUp.ai_reply }}</p>
  524. </div>
  525. </div>
  526. </div>
  527. <div>
  528. </div>
  529. </div>
  530. <!-- <div class="flex-1">
  531. <span class="text-gray-800 color-black " style="font-size: 14px;">{{ followUp.ai_reply }}</span>
  532. </div> -->
  533. </div>
  534. </div>
  535. </div>
  536. </div>
  537. </div>
  538. <!-- 将导出按钮移到这里,添加fixed-btn类 -->
  539. <el-button
  540. type="primary"
  541. circle
  542. class="export-btn fixed-btn"
  543. :loading="exporting"
  544. @click="exportPDF"
  545. >
  546. <el-icon><Download /></el-icon>
  547. </el-button>
  548. <!-- <el-button
  549. type="primary"
  550. size="small"
  551. @click="exportPDF"
  552. :loading="exporting"
  553. class="export-btn fixed-btn"
  554. >
  555. <i class="el-icon-download"></i>
  556. {{ exporting ? '导出中...' : '导出PDF' }}
  557. </el-button> -->
  558. </div>
  559. <!-- 添加个人详细信息弹窗 -->
  560. <el-dialog
  561. title="个人详细信息"
  562. v-model="showInfoDialog"
  563. width="60%"
  564. :before-close="handleDialogClose"
  565. class="info-dialog"
  566. >
  567. <div class="info-content">
  568. <div class="info-section">
  569. <h4>基本信息</h4>
  570. <div class="info-grid">
  571. <div class="info-item">
  572. <span class="label">姓名:</span>
  573. <span class="value">{{ userProfile.name }}</span>
  574. </div>
  575. <div class="info-item">
  576. <span class="label">性别:</span>
  577. <span class="value">{{ userProfile.gender }}</span>
  578. </div>
  579. <div class="info-item">
  580. <span class="label">年龄:</span>
  581. <span class="value">{{ userProfile.age }}岁</span>
  582. </div>
  583. <div class="info-item">
  584. <span class="label">身份证:</span>
  585. <span class="value">{{ userProfile.idCard }}</span>
  586. </div>
  587. <div class="info-item">
  588. <span class="label">民族:</span>
  589. <span class="value">{{ userProfile.ethnicity }}</span>
  590. </div>
  591. <div class="info-item">
  592. <span class="label">政治面貌:</span>
  593. <span class="value">{{ userProfile.politicalStatus }}</span>
  594. </div>
  595. <div class="info-item">
  596. <span class="label">婚姻状况:</span>
  597. <span class="value">{{ userProfile.maritalStatus }}</span>
  598. </div>
  599. <div class="info-item">
  600. <span class="label">身高:</span>
  601. <span class="value">{{ userProfile.height }}</span>
  602. </div>
  603. <div class="info-item">
  604. <span class="label">体重:</span>
  605. <span class="value">{{ userProfile.weight }}</span>
  606. </div>
  607. </div>
  608. </div>
  609. <div class="info-section">
  610. <h4>联系方式</h4>
  611. <div class="info-grid">
  612. <div class="info-item">
  613. <span class="label">手机号码:</span>
  614. <span class="value">{{ userProfile.phone }}</span>
  615. </div>
  616. <div class="info-item">
  617. <span class="label">籍贯:</span>
  618. <span class="value">{{ userProfile.nativePlace }}</span>
  619. </div>
  620. <div class="info-item">
  621. <span class="label">现居地址:</span>
  622. <span class="value">{{ userProfile.address }}</span>
  623. </div>
  624. </div>
  625. </div>
  626. <div class="info-section">
  627. <h4>教育背景</h4>
  628. <div class="info-grid">
  629. <div class="info-item">
  630. <span class="label">学历:</span>
  631. <span class="value">{{ userProfile.education }}</span>
  632. </div>
  633. <div class="info-item">
  634. <span class="label">毕业院校:</span>
  635. <span class="value">{{ userProfile.schoolName }}</span>
  636. </div>
  637. <div class="info-item">
  638. <span class="label">专业:</span>
  639. <span class="value">{{ userProfile.major }}</span>
  640. </div>
  641. <div class="info-item">
  642. <span class="label">毕业时间:</span>
  643. <span class="value">{{ userProfile.graduationDate }}</span>
  644. </div>
  645. </div>
  646. </div>
  647. <div class="info-section">
  648. <h4>工作信息</h4>
  649. <div class="info-grid">
  650. <div class="info-item">
  651. <span class="label">当前公司:</span>
  652. <span class="value">{{ userProfile.currentCompany }}</span>
  653. </div>
  654. <div class="info-item">
  655. <span class="label">所在部门:</span>
  656. <span class="value">{{ userProfile.department }}</span>
  657. </div>
  658. <div class="info-item">
  659. <span class="label">当前职位:</span>
  660. <span class="value">{{ userProfile.position }}</span>
  661. </div>
  662. <div class="info-item">
  663. <span class="label">工作经验:</span>
  664. <span class="value">{{ userProfile.experience }}</span>
  665. </div>
  666. <div class="info-item">
  667. <span class="label">期望薪资:</span>
  668. <span class="value">{{ userProfile.expectedSalary }}</span>
  669. </div>
  670. </div>
  671. </div>
  672. <div class="info-section">
  673. <h4>其他信息</h4>
  674. <div class="info-grid">
  675. <div class="info-item">
  676. <span class="label">特长爱好:</span>
  677. <span class="value">{{ userProfile.specialties }}</span>
  678. </div>
  679. </div>
  680. </div>
  681. </div>
  682. </el-dialog>
  683. <!-- 添加肢体核验结果弹窗 -->
  684. <el-dialog
  685. title="肢体核验结果"
  686. v-model="showBodyVerification"
  687. width="80%"
  688. :before-close="handleBodyVerificationClose"
  689. class="body-verification-dialog"
  690. >
  691. <!-- 将原来的手势验证内容移到这里 -->
  692. <div class="hand-verification">
  693. <div class="grid grid-cols-2 gap-8">
  694. <!-- 左手验证结果 -->
  695. <div>
  696. <h4 class="text-gray-600 mb-2">左手手势验证</h4>
  697. <div class="grid grid-cols-3 gap-2">
  698. <div v-for="(photo, index) in getHandPhotos('left')"
  699. :key="index"
  700. class="relative aspect-square rounded-lg overflow-hidden bg-gray-100"
  701. :class="{'border-2': photo.part_verification,
  702. 'border-green-500': photo.part_verification?.is_correct_part,
  703. 'border-red-500': photo.part_verification && !photo.part_verification.is_correct_part}"
  704. >
  705. <!-- 使用 el-tooltip 包裹内容 -->
  706. <el-tooltip
  707. v-if="photo.part_verification && !photo.part_verification.is_correct_part"
  708. :content="photo.part_verification.explanation || '未提供失败原因'"
  709. placement="top"
  710. effect="dark"
  711. :show-after="200"
  712. >
  713. <div class="w-full h-full">
  714. <img :src="photo.url"
  715. :alt="photo.description"
  716. class="w-full h-full object-cover"
  717. @error="handleImageError">
  718. <!-- 底部状态显示 -->
  719. <div class="absolute bottom-0 left-0 right-0 py-1 px-2 text-xs text-center text-white z-10"
  720. :class="{
  721. 'bg-green-500 bg-opacity-90': photo.part_verification?.is_correct_part,
  722. 'bg-red-500 bg-opacity-90': photo.part_verification && !photo.part_verification.is_correct_part
  723. }">
  724. {{ photo.part_verification?.is_correct_part ? '通过' : '未通过' }}
  725. </div>
  726. </div>
  727. </el-tooltip>
  728. <template v-else>
  729. <img :src="photo.url"
  730. :alt="photo.description"
  731. class="w-full h-full object-cover"
  732. @error="handleImageError">
  733. <!-- 底部状态显示 -->
  734. <div v-if="photo.part_verification"
  735. class="absolute bottom-0 left-0 right-0 py-1 px-2 text-xs text-center text-white z-10"
  736. :class="{
  737. 'bg-green-500 bg-opacity-90': photo.part_verification.is_correct_part,
  738. 'bg-red-500 bg-opacity-90': !photo.part_verification.is_correct_part
  739. }">
  740. {{ photo.part_verification.is_correct_part ? '通过' : '未通过' }}
  741. </div>
  742. </template>
  743. </div>
  744. </div>
  745. </div>
  746. <!-- 右手验证结果 -->
  747. <div>
  748. <h4 class="text-gray-600 mb-2">右手手势验证</h4>
  749. <div class="grid grid-cols-3 gap-2">
  750. <div v-for="(photo, index) in getHandPhotos('right')"
  751. :key="index"
  752. class="relative aspect-square rounded-lg overflow-hidden bg-gray-100"
  753. :class="{'border-2': photo.part_verification,
  754. 'border-green-500': photo.part_verification?.is_correct_part,
  755. 'border-red-500': photo.part_verification && !photo.part_verification.is_correct_part}"
  756. >
  757. <!-- 使用 el-tooltip 包裹内容 -->
  758. <el-tooltip
  759. v-if="photo.part_verification && !photo.part_verification.is_correct_part"
  760. :content="photo.part_verification.explanation || '未提供失败原因'"
  761. placement="top"
  762. effect="dark"
  763. :show-after="200"
  764. >
  765. <div class="w-full h-full">
  766. <img :src="photo.url"
  767. :alt="photo.description"
  768. class="w-full h-full object-cover"
  769. @error="handleImageError">
  770. <!-- 底部状态显示 -->
  771. <div class="absolute bottom-0 left-0 right-0 py-1 px-2 text-xs text-center text-white z-10"
  772. :class="{
  773. 'bg-green-500 bg-opacity-90': photo.part_verification?.is_correct_part,
  774. 'bg-red-500 bg-opacity-90': photo.part_verification && !photo.part_verification.is_correct_part
  775. }">
  776. {{ photo.part_verification?.is_correct_part ? '通过' : '未通过' }}
  777. </div>
  778. </div>
  779. </el-tooltip>
  780. <template v-else>
  781. <img :src="photo.url"
  782. :alt="photo.description"
  783. class="w-full h-full object-cover"
  784. @error="handleImageError">
  785. <!-- 底部状态显示 -->
  786. <div v-if="photo.part_verification"
  787. class="absolute bottom-0 left-0 right-0 py-1 px-2 text-xs text-center text-white z-10"
  788. :class="{
  789. 'bg-green-500 bg-opacity-90': photo.part_verification.is_correct_part,
  790. 'bg-red-500 bg-opacity-90': !photo.part_verification.is_correct_part
  791. }">
  792. {{ photo.part_verification.is_correct_part ? '通过' : '未通过' }}
  793. </div>
  794. </template>
  795. </div>
  796. </div>
  797. </div>
  798. </div>
  799. </div>
  800. </el-dialog>
  801. </div>
  802. </template>
  803. <script>
  804. import { use } from 'echarts/core'
  805. import { CanvasRenderer } from 'echarts/renderers'
  806. import { RadarChart } from 'echarts/charts'
  807. import { TitleComponent, TooltipComponent, LegendComponent } from 'echarts/components'
  808. import VChart from 'vue-echarts'
  809. import { BarChart } from 'echarts/charts'
  810. import { GridComponent } from 'echarts/components'
  811. // 引入html2canvas和jspdf
  812. import html2canvas from 'html2canvas'
  813. import jsPDF from 'jspdf'
  814. import { Share, Download, Printer, ArrowUp, User } from '@element-plus/icons-vue'
  815. import { ElMessage } from 'element-plus'
  816. use([
  817. CanvasRenderer,
  818. RadarChart,
  819. TitleComponent,
  820. TooltipComponent,
  821. LegendComponent,
  822. BarChart,
  823. GridComponent
  824. ])
  825. export default {
  826. name: 'JobApplicationReport',
  827. components: {
  828. VChart
  829. },
  830. data() {
  831. return {
  832. userInfo: {
  833. avatar: '/@/assets/default-avatar.png',
  834. name: '张某三',
  835. interviewTime: '2021-06-30 18:00',
  836. duration: '18分 12秒',
  837. idNumber: '24893119999999999',
  838. phone: '14893725981',
  839. pass: 60,
  840. visual_analysis_done:false
  841. },
  842. totalScore: 52.0,
  843. abilityItems: [],
  844. isPassed: false,
  845. hireRecommendation:'',
  846. failReason: '候选人答题过程中存在非正常表现和应答,同时,可行性较为不足,候选人表现出来的综合能力也不符合岗位要求的行为和动机表现,在特定学习方面,候选人未能呈现出明显的优势和发展潜质。',
  847. qualityDetails: {
  848. strengths: [],
  849. weaknesses: []
  850. },
  851. activeTab: 'comprehensive',
  852. tabs: [
  853. { id: 'comprehensive', name: '综合评价' },
  854. { id: 'ability', name: '能力素质' },
  855. { id: 'cheat', name: '作弊检测' },
  856. { id: 'psychology', name: '心理检测' },
  857. { id: 'body', name: '肢体检测' },
  858. { id: 'personal-info', name: '个人详细信息', isInfo: true },
  859. { id: 'answers', name: '问答记录' },
  860. { id: 'other-answers', name: '其余答题详情', isLink: true }
  861. ],
  862. isNavFixed: false,
  863. navHeight: 0,
  864. navOffsetTop: 0,
  865. loading: false,
  866. error: null,
  867. // 分析结果中英文对照表
  868. analysisMap: {
  869. 'clear_expression': '表达清晰',
  870. 'logical_thinking': '逻辑思维能力强',
  871. 'professional_knowledge': '专业知识扎实',
  872. 'communication_skills': '沟通能力出色',
  873. 'problem_solving': '问题解决能力强',
  874. 'team_collaboration': '团队协作意识好',
  875. 'learning_ability': '学习能力强',
  876. 'lack_experience': '经验不足',
  877. 'weak_professional': '专业知识有待提升',
  878. 'poor_expression': '表达能力需要提高',
  879. 'weak_logic': '逻辑思维需要加强',
  880. 'weak_communication': '沟通技巧需要改进',
  881. 'weak_teamwork': '团队协作意识不足',
  882. 'weak_learning': '学习能力有待提升'
  883. },
  884. psychologyData: {
  885. score: 35,
  886. description: '轻微焦虑或负面情绪,仍具备岗位适应力。候选人在某些方面可能存在轻微的心理压力,但总体上仍保持稳定,基本符合岗位要求。',
  887. recommendation: '可考虑录取'
  888. },
  889. redLineQuestions: {
  890. allCorrect: false,
  891. failedQuestions: []
  892. },
  893. // 修改手势验证数据结构
  894. handVerificationData: {
  895. left: [],
  896. right: []
  897. },
  898. // 添加新的数据属性
  899. reportTime: '2025.5.19',
  900. reportId: '2489372598',
  901. isMobile: false,
  902. showInfoDialog: false,
  903. userProfile: {
  904. name: '',
  905. gender: '',
  906. age: '',
  907. education: '',
  908. phone: '',
  909. email: '',
  910. address: '',
  911. position: '',
  912. experience: '',
  913. expectedSalary: '',
  914. idCard: '',
  915. height: '',
  916. weight: '',
  917. nativePlace: '',
  918. politicalStatus: '',
  919. ethnicity: '',
  920. maritalStatus: '',
  921. specialties: '',
  922. schoolName: '',
  923. major: '',
  924. graduationDate: '',
  925. currentCompany: '',
  926. department: '',
  927. },
  928. showBodyVerification: false, // 添加控制弹窗显示的数据
  929. competencyMap: {
  930. 'communication_cooperation': '团队协作能力',
  931. 'learning_ability': '应变能力',
  932. 'service_awareness': '服务意识',
  933. 'customer_insight': '客户需求洞察力',
  934. 'position_matching': '应变能力',
  935. 'communication_expression': '沟通表达能力'
  936. },
  937. // 修改雷达图数据结构
  938. radarData: {
  939. indicator: [
  940. { name: '团队协作能力', value: 50, max: 100 },
  941. { name: '应变能力', value: 50, max: 100 },
  942. { name: '服务意识', value: 50, max: 100 },
  943. { name: '客户需求洞察力', value: 50, max: 100 },
  944. { name: '应变能力', value: 50, max: 100 },
  945. { name: '沟通表达能力', value: 50, max: 100 }
  946. ],
  947. values: [50, 50, 50, 50, 50, 50] // 初始值设为0
  948. },
  949. exporting: false, // 添加导出状态控制
  950. radarChartInstance: null,
  951. interviewRecords: [], // 存储问答记录
  952. followUpQuestions: [], // 存储追问题
  953. noTableHeight: 0
  954. }
  955. },
  956. async created() {
  957. await this.fetchApplicationDetail()
  958. },
  959. mounted() {
  960. // 获取导航栏的初始位置和高度
  961. this.$nextTick(() => {
  962. const navElement = this.$refs.navTabs
  963. if (navElement) {
  964. this.navHeight = navElement.offsetHeight
  965. this.navOffsetTop = navElement.offsetTop
  966. // 添加滚动监听
  967. window.addEventListener('scroll', this.handleScroll)
  968. }
  969. })
  970. // 检测设备类型
  971. this.checkDevice();
  972. // 监听窗口大小变化
  973. window.addEventListener('resize', this.checkDevice);
  974. // 添加获取图表实例的ref
  975. this.$nextTick(() => {
  976. // 保存图表实例的引用
  977. this.radarChartInstance = this.$refs.radarChart
  978. })
  979. // 等待组件渲染完成后保存图表实例
  980. this.$nextTick(() => {
  981. if (this.$refs.radarChart) {
  982. this.radarChartInstance = this.$refs.radarChart
  983. }
  984. })
  985. },
  986. beforeDestroy() {
  987. // 移除滚动监听
  988. window.removeEventListener('scroll', this.handleScroll)
  989. // 移除监听器
  990. window.removeEventListener('resize', this.checkDevice);
  991. },
  992. computed: {
  993. radarOption() {
  994. return {
  995. radar: {
  996. indicator: this.radarData.indicator,
  997. center: ['50%', '50%'],
  998. radius: '65%',
  999. splitNumber: 4,
  1000. shape: 'circle',
  1001. axisName: {
  1002. color: '#666',
  1003. fontSize: 12,
  1004. formatter: (name) => {
  1005. const index = this.radarData.indicator.findIndex(item => item.name === name);
  1006. const value = this.radarData.values[index];
  1007. // 添加中文释义
  1008. const nameMappings = {
  1009. '团队协作能力': '团队协作',
  1010. '应变能力': '应变能力',
  1011. '服务意识': '服务意识',
  1012. '客户需求洞察力': '需求洞察',
  1013. '沟通表达能力': '沟通表达'
  1014. };
  1015. const displayName = nameMappings[name] || name;
  1016. return `${value}\n${displayName}`;
  1017. }
  1018. },
  1019. nameGap: 15,
  1020. axisLabel: {
  1021. show: false
  1022. },
  1023. splitArea: {
  1024. show: true,
  1025. areaStyle: {
  1026. color: ['#fff']
  1027. }
  1028. },
  1029. splitLine: {
  1030. show: true,
  1031. lineStyle: {
  1032. color: '#E7E9ED',
  1033. type: 'solid',
  1034. width: 1
  1035. }
  1036. },
  1037. axisLine: {
  1038. show: true,
  1039. lineStyle: {
  1040. color: '#E7E9ED',
  1041. width: 1
  1042. }
  1043. }
  1044. },
  1045. series: [{
  1046. type: 'radar',
  1047. symbol: 'none',
  1048. itemStyle: {
  1049. normal: {
  1050. lineStyle: {
  1051. color: '#c1dafc',
  1052. width: 2
  1053. },
  1054. areaStyle: {
  1055. type: 'default',
  1056. color: 'rgba(193, 218, 252, 0.6)',
  1057. shadowBlur: 10,
  1058. shadowColor: 'rgba(193, 218, 252, 0.5)',
  1059. shadowOffsetY: 5
  1060. }
  1061. }
  1062. },
  1063. data: [{
  1064. value: this.radarData.values
  1065. }]
  1066. }]
  1067. }
  1068. },
  1069. // 添加新的计算属性
  1070. getPsychologyScoreClass() {
  1071. const score = this.psychologyData.score;
  1072. if (score <= 20) return 'low-risk';
  1073. if (score <= 55) return 'medium-risk';
  1074. return 'high-risk';
  1075. },
  1076. getPsychologyRiskLevel() {
  1077. const score = this.psychologyData.score;
  1078. if (score <= 20) return '低风险';
  1079. if (score <= 55) return '中风险';
  1080. return '高风险';
  1081. }
  1082. },
  1083. methods: {
  1084. async fetchApplicationDetail() {
  1085. try {
  1086. const application_id = this.$route.query.id || this.$route.params.id
  1087. console.log(application_id)
  1088. this.loading = true
  1089. const response = await fetch(
  1090. `${import.meta.env.VITE_API_URL}/api/job/application_detail?tenant_id=${1}&application_id=${application_id}`
  1091. )
  1092. if (!response.ok) {
  1093. throw new Error('获取数据失败')
  1094. }
  1095. const data = await response.json()
  1096. if (data.code === 2000) {
  1097. // 添加数据安全检查
  1098. const applicationData = data.data || {}
  1099. this.reportTime = applicationData.application?.update_datetime || ''
  1100. // 更新用户信息
  1101. this.userInfo = {
  1102. avatar: this.getFacePhoto(applicationData.posture_photos) || '/@/assets/default-avatar.png',
  1103. name: applicationData.applicant?.name || '未知',
  1104. interviewTime: applicationData.application?.interview_completion_time || '-',
  1105. duration: applicationData.application?.interview_duration_formatted || '-',
  1106. idNumber: applicationData.applicant?.id_card || '-',
  1107. phone: applicationData.applicant?.phone || '-',
  1108. pass: applicationData.application?.comprehensive_score || 0,
  1109. visual_analysis_done:applicationData.application.analysis_status.visual_analysis_done
  1110. }
  1111. this.reportId = applicationData.application?.report_id || ''
  1112. // 处理手势验证照片数据
  1113. if (applicationData.posture_photos && Array.isArray(applicationData.posture_photos)) {
  1114. // 分类处理左右手照片
  1115. const leftHandPhotos = applicationData.posture_photos.filter(photo =>
  1116. photo?.description?.includes('left_') || photo?.description?.includes('左手')
  1117. ) || []
  1118. const rightHandPhotos = applicationData.posture_photos.filter(photo =>
  1119. photo?.description?.includes('right_') || photo?.description?.includes('右手')
  1120. ) || []
  1121. // 更新左手照片数据
  1122. this.handVerificationData.left = leftHandPhotos.map(photo => ({
  1123. url: photo?.photo_url || '/@/assets/default-image.png',
  1124. description: this.getPhotoDescription(photo?.description || ''),
  1125. part_verification: {
  1126. is_correct_part: photo?.part_verification?.is_correct_part ?? true,
  1127. explanation: photo?.part_verification?.explanation || '手势验证通过'
  1128. }
  1129. }))
  1130. // 更新右手照片数据
  1131. this.handVerificationData.right = rightHandPhotos.map(photo => ({
  1132. url: photo?.photo_url || '/@/assets/default-image.png',
  1133. description: this.getPhotoDescription(photo?.description || ''),
  1134. part_verification: {
  1135. is_correct_part: photo?.part_verification?.is_correct_part ?? true,
  1136. explanation: photo?.part_verification?.explanation || '手势验证通过'
  1137. }
  1138. }))
  1139. }
  1140. // 更新其他数据,添加空值检查
  1141. if (applicationData.application) {
  1142. this.totalScore = applicationData.application.comprehensive_score || 0
  1143. this.hireRecommendation = applicationData.application.hire_recommendation || ''
  1144. this.failReason = applicationData.application.hire_reason || ''
  1145. }
  1146. // 更新能力标签得分数据,添加空值检查
  1147. const videoAnalysisData = applicationData.application?.comprehensive_analysis?.video_analysis_data
  1148. if (videoAnalysisData?.competency_scores) {
  1149. this.abilityItems = Object.entries(videoAnalysisData.competency_scores)
  1150. .map(([key, item]) => ({
  1151. tag_name: this.getCompetencyName(key) || item.tag_name || key,
  1152. weighted_score: Math.round(item.weighted_score || 0)
  1153. }))
  1154. } else {
  1155. // 设置默认的能力项
  1156. this.abilityItems = [
  1157. { tag_name: '团队协作能力', weighted_score: 0 },
  1158. { tag_name: '应变能力', weighted_score: 0 },
  1159. { tag_name: '服务意识', weighted_score: 0 },
  1160. { tag_name: '客户需求洞察力', weighted_score: 0 },
  1161. { tag_name: '沟通表达能力', weighted_score: 0 }
  1162. ]
  1163. }
  1164. // 更新优势和劣势数据,添加空值检查
  1165. if (videoAnalysisData) {
  1166. this.qualityDetails = {
  1167. strengths: videoAnalysisData.strengths || [],
  1168. weaknesses: videoAnalysisData.weaknesses || []
  1169. }
  1170. } else {
  1171. this.qualityDetails = {
  1172. strengths: [],
  1173. weaknesses: []
  1174. }
  1175. }
  1176. // 更新红线题数据
  1177. if (applicationData.required_questions_summary) {
  1178. this.redLineQuestions = {
  1179. allCorrect: applicationData.required_questions_summary.all_correct || false,
  1180. failedQuestions: applicationData.required_questions_summary.failed_questions_details || []
  1181. }
  1182. }
  1183. // 获取心理测评分数
  1184. const psychologyScore = applicationData.scoring_summary?.total_score_obtained
  1185. // 更新心理检测组件数据
  1186. this.psychologyData = {
  1187. score: psychologyScore || 0,
  1188. description: this.getPsychologyDescription(psychologyScore),
  1189. recommendation: this.getHireRecommendation(psychologyScore)
  1190. }
  1191. // 更新雷达图数据,添加空值检查
  1192. if (videoAnalysisData?.competency_scores) {
  1193. this.updateRadarData(videoAnalysisData.competency_scores)
  1194. } else {
  1195. // 设置默认的雷达图数据
  1196. this.radarData = {
  1197. indicator: [
  1198. { name: '团队协作能力', max: 100 },
  1199. { name: '应变能力', max: 100 },
  1200. { name: '服务意识', max: 100 },
  1201. { name: '客户需求洞察力', max: 100 },
  1202. { name: '沟通表达能力', max: 100 }
  1203. ],
  1204. values: [0, 0, 0, 0, 0]
  1205. }
  1206. }
  1207. // 更新追问题列表
  1208. this.followUpQuestions = applicationData.follow_up_records.map(item => {
  1209. let parsedUserText = null;
  1210. try {
  1211. // 尝试解析user_text字符串为对象
  1212. parsedUserText = JSON.parse(item.user_text.replace(/'/g, '"'));
  1213. console.log(parsedUserText)
  1214. } catch (error) {
  1215. console.error('Failed to parse user_text:', error);
  1216. }
  1217. // 获取text值并去除双引号
  1218. const textValue = parsedUserText?.text || '暂无提问';
  1219. const cleanText = textValue.replace(/^"|"$/g, ''); // 去除开头和结尾的双引号
  1220. return {
  1221. ...item,
  1222. user_text: cleanText
  1223. }
  1224. });
  1225. console.log(this.followUpQuestions)
  1226. // 添加获取问答记录的逻辑
  1227. if (data.data?.interview_progress) {
  1228. this.interviewRecords = this.processInterviewRecords(data.data.interview_progress)
  1229. console.log(this.interviewRecords)
  1230. }
  1231. }
  1232. } catch (error) {
  1233. console.error('获取应用详情失败:', error)
  1234. this.error = error.message
  1235. } finally {
  1236. this.loading = false
  1237. }
  1238. },
  1239. formats(percentage) {
  1240. console.log(percentage)
  1241. return `${percentage}分`
  1242. },
  1243. format(percentage) {
  1244. return `${percentage}分`
  1245. },
  1246. scrollToSection(tabId) {
  1247. // 如果是答题记录标签,则进行路由跳转
  1248. if (tabId === 'other-answers') {
  1249. // 假设当前路由中有 applicationId 参数
  1250. const applicationId = this.$route.query.id || this.$route.params.id
  1251. const baseUrl = window.location.origin;
  1252. // 使用window.open在新标签页打开
  1253. window.open(`${baseUrl}/#/topic?applicationId=${applicationId}`, '_blank')
  1254. return
  1255. }
  1256. // 其他标签的原有滚动逻辑
  1257. this.activeTab = tabId
  1258. const element = this.$refs[tabId]
  1259. if (element) {
  1260. element.scrollIntoView({ behavior: 'smooth' })
  1261. }
  1262. },
  1263. handleScroll() {
  1264. const scrollTop = window.pageYOffset || document.documentElement.scrollTop
  1265. // 更新固定状态
  1266. this.isNavFixed = scrollTop > this.navOffsetTop
  1267. // 更新当前激活的标签
  1268. this.updateActiveTab(scrollTop)
  1269. },
  1270. updateActiveTab(scrollTop) {
  1271. const navHeight = this.navHeight
  1272. // 获取所有section的位置
  1273. const sections = this.tabs.map(tab => {
  1274. const element = this.$refs[tab.id]
  1275. return {
  1276. id: tab.id,
  1277. top: element.getBoundingClientRect().top + window.pageYOffset - navHeight - 20
  1278. }
  1279. })
  1280. // 找到当前滚动位置对应的section
  1281. for (let i = sections.length - 1; i >= 0; i--) {
  1282. if (scrollTop >= sections[i].top) {
  1283. this.activeTab = sections[i].id
  1284. break
  1285. }
  1286. }
  1287. },
  1288. // 获取分析结果的中文释义
  1289. getChineseAnalysis(key) {
  1290. return this.analysisMap[key] || key
  1291. },
  1292. // 添加获取心理状态描述的方法
  1293. getPsychologyDescription(score) {
  1294. if (score === undefined) return '未进行心理测评或数据缺失'
  1295. if (score <= 20) {
  1296. return '心理状态健康,情绪稳定、认知正常。候选人在心理测评中表现出稳定的情绪状态和健康的心理特质,适合岗位要求。'
  1297. } else if (score <= 35) {
  1298. return '轻微焦虑或负面情绪,仍具备岗位适应力。候选人在某些方面可能存在轻微的心理压力,但总体上仍保持稳定,基本符合岗位要求。'
  1299. } else if (score <= 55) {
  1300. return '存在一定情绪波动或压力反应。候选人在测评中表现出一定程度的心理压力或情绪波动,建议进一步面谈评估。'
  1301. } else if (score <= 70) {
  1302. return '心理压力较大,可能影响工作稳定性。候选人在测评中表现出较明显的心理压力或情绪不稳定性,建议慎重录用或考虑调岗。'
  1303. } else {
  1304. return '可能存在较严重心理或精神问题。候选人在测评中表现出明显的心理或情绪问题,不建议录用。'
  1305. }
  1306. },
  1307. // 添加获取录用建议的方法
  1308. getHireRecommendation(score) {
  1309. if (score === undefined) return '无法给出建议'
  1310. if (score <= 20) {
  1311. return '建议优先录取'
  1312. } else if (score <= 35) {
  1313. return '可考虑录取'
  1314. } else if (score <= 55) {
  1315. return '建议进一步面谈评估'
  1316. } else if (score <= 70) {
  1317. return '慎重录用或建议调岗'
  1318. } else {
  1319. return '不建议录用'
  1320. }
  1321. },
  1322. // 添加照片描述转换方法
  1323. getPhotoDescription(description) {
  1324. const descriptionMap = {
  1325. 'left_palm': '左手手心',
  1326. 'left_back': '左手手背',
  1327. 'left_fist': '左手腕拳',
  1328. 'right_palm': '右手手心',
  1329. 'right_back': '右手手背',
  1330. 'right_fist': '右手腕拳',
  1331. // 添加中文描述的映射
  1332. '左手手心': '左手手心',
  1333. '左手手背': '左手手背',
  1334. '左手腕拳': '左手腕拳',
  1335. '右手手心': '右手手心',
  1336. '右手手背': '右手手背',
  1337. '右手腕拳': '右手腕拳'
  1338. }
  1339. return descriptionMap[description] || description
  1340. },
  1341. // 修改获取手部照片的方法
  1342. getHandPhotos(hand) {
  1343. const photos = this.handVerificationData[hand] || []
  1344. return photos.map(photo => ({
  1345. url: photo.url,
  1346. status: 'normal',
  1347. photo_id: 1,
  1348. detections: [],
  1349. description: photo.description,
  1350. photo_index: 1,
  1351. analysis_model: '',
  1352. part_verification: photo.part_verification,
  1353. analysis_timestamp: '',
  1354. overall_assessment: '正常'
  1355. }))
  1356. },
  1357. // 图片错误处理函数保持不变
  1358. handleImageError(event) {
  1359. const imgElement = event.target
  1360. if (imgElement) {
  1361. imgElement.src = '/@/assets/default-image.png'
  1362. }
  1363. },
  1364. checkDevice() {
  1365. this.isMobile = window.innerWidth <= 768;
  1366. },
  1367. async handleTabClick(tab) {
  1368. if (tab.isInfo) {
  1369. // 打开弹窗前获取最新的用户信息
  1370. await this.fetchUserProfile();
  1371. this.showInfoDialog = true;
  1372. } else if (tab.isLink) {
  1373. this.scrollToSection(tab.id);
  1374. } else {
  1375. this.scrollToSection(tab.id);
  1376. }
  1377. },
  1378. handleDialogClose() {
  1379. this.showInfoDialog = false;
  1380. },
  1381. async fetchUserProfile() {
  1382. try {
  1383. const userId = this.$route.query.application_id;
  1384. const tenantId = 1;
  1385. const response = await fetch(
  1386. `${import.meta.env.VITE_API_URL}/api/system/wechat/user/profile/get?user_id=${userId}&tenant_id=${tenantId}`
  1387. );
  1388. if (!response.ok) {
  1389. throw new Error('获取用户信息失败');
  1390. }
  1391. const data = await response.json();
  1392. if (data.success && data.profile) {
  1393. const basicInfo = data.profile.basic_info;
  1394. const education = data.profile.educations[0] || {};
  1395. const workExp = data.profile.work_experiences[0] || {};
  1396. // 更新用户详细信息
  1397. this.userProfile = {
  1398. name: basicInfo.name || this.userInfo.name,
  1399. gender: basicInfo.gender === 1 ? '男' : '女',
  1400. age: basicInfo.age || '',
  1401. education: this.getEducationLevel(education.degree),
  1402. phone: basicInfo.phone || this.userInfo.phone,
  1403. email: '', // API中没有邮箱字段
  1404. address: basicInfo.current_address || '',
  1405. position: workExp.position || '',
  1406. experience: this.formatWorkExperience(workExp),
  1407. expectedSalary: basicInfo.expected_salary ? `${basicInfo.expected_salary}元/月` : '',
  1408. idCard: basicInfo.id_card || '',
  1409. height: basicInfo.height ? `${basicInfo.height}cm` : '',
  1410. weight: basicInfo.weight ? `${basicInfo.weight}kg` : '',
  1411. nativePlace: basicInfo.native_place || '',
  1412. politicalStatus: basicInfo.political_status || '',
  1413. ethnicity: basicInfo.ethnicity || '',
  1414. maritalStatus: this.getMaritalStatus(basicInfo.marital_status),
  1415. specialties: basicInfo.specialties || '',
  1416. schoolName: education.school_name || '',
  1417. major: education.major || '',
  1418. graduationDate: education.end_date || '',
  1419. currentCompany: workExp.company_name || '',
  1420. department: workExp.department || '',
  1421. }
  1422. }
  1423. } catch (error) {
  1424. console.error('获取用户详细信息失败:', error);
  1425. }
  1426. },
  1427. getEducationLevel(degree) {
  1428. const degrees = {
  1429. 1: '专科',
  1430. 2: '本科',
  1431. 3: '硕士',
  1432. 4: '博士'
  1433. };
  1434. return degrees[degree] || '未知';
  1435. },
  1436. formatWorkExperience(workExp) {
  1437. if (!workExp.start_date) return '无工作经验';
  1438. const start = new Date(workExp.start_date);
  1439. const end = workExp.end_date ? new Date(workExp.end_date) : new Date();
  1440. const years = Math.floor((end - start) / (365 * 24 * 60 * 60 * 1000));
  1441. return `${years}年`;
  1442. },
  1443. getMaritalStatus(status) {
  1444. return status === 0 ? '未婚' : '已婚';
  1445. },
  1446. getPositionLabel(hand, index) {
  1447. // 根据照片的类型来确定位置标签
  1448. const photoType = this.getPhotoType(hand, index);
  1449. const positions = {
  1450. left: {
  1451. palm: '①左手手心',
  1452. back: '②左手手背',
  1453. fist: '③左手腕拳'
  1454. },
  1455. right: {
  1456. palm: '④右手手心',
  1457. back: '⑤右手手背',
  1458. fist: '⑥右手腕拳'
  1459. }
  1460. };
  1461. return positions[hand]?.[photoType] || `${hand === 'left' ? '左' : '右'}手部位${index + 1}`;
  1462. },
  1463. getDefaultDescription(hand, index) {
  1464. // 根据照片的类型来确定描述
  1465. const photoType = this.getPhotoType(hand, index);
  1466. const descriptions = {
  1467. left: {
  1468. palm: '手掌纹理清晰,活动自然',
  1469. back: '手背皮肤正常,关节灵活',
  1470. fist: '腕关节活动度正常'
  1471. },
  1472. right: {
  1473. palm: '手掌纹理清晰,活动自然',
  1474. back: '手背皮肤正常,关节灵活',
  1475. fist: '腕关节活动度正常'
  1476. }
  1477. };
  1478. return descriptions[hand]?.[photoType] || '手部动作正常';
  1479. },
  1480. // 新增方法:根据照片信息确定类型
  1481. getPhotoType(hand, index) {
  1482. const photo = this.handVerificationData[hand]?.[index];
  1483. if (!photo) return null;
  1484. // 从照片描述中提取类型
  1485. const description = photo.description?.toLowerCase() || '';
  1486. if (description.includes('palm') || description.includes('手心')) {
  1487. return 'palm';
  1488. } else if (description.includes('back') || description.includes('手背')) {
  1489. return 'back';
  1490. } else if (description.includes('fist') || description.includes('腕拳')) {
  1491. return 'fist';
  1492. }
  1493. // 如果无法从描述中确定类型,尝试从验证结果中获取
  1494. if (photo.part_verification?.part_type) {
  1495. return photo.part_verification.part_type;
  1496. }
  1497. // 根据索引返回默认类型
  1498. const defaultTypes = ['palm', 'back', 'fist'];
  1499. return defaultTypes[index] || 'unknown';
  1500. },
  1501. // 添加关闭弹窗的方法
  1502. handleBodyVerificationClose() {
  1503. this.showBodyVerification = false
  1504. },
  1505. // 添加新方法:获取能力名称的中文释义
  1506. getCompetencyName(key) {
  1507. const competencyMap = {
  1508. 'communication_cooperation': '团队协作能力',
  1509. 'learning_ability': '应变能力',
  1510. 'service_awareness': '服务意识',
  1511. 'customer_insight': '客户需求洞察力',
  1512. 'position_matching': '岗位匹配度',
  1513. 'communication_expression': '沟通表达能力',
  1514. // 可以根据需要添加更多映射
  1515. }
  1516. return competencyMap[key]
  1517. },
  1518. // 修改更新雷达图数据的方法
  1519. updateRadarData(competencyScores) {
  1520. if (!competencyScores) return
  1521. const processedData = Object.entries(competencyScores)
  1522. .map(([key, item]) => ({
  1523. name: this.getCompetencyName(key) || item.tag_name || key,
  1524. score: Math.round(item.weighted_score || 0)
  1525. }))
  1526. .sort((a, b) => b.score - a.score)
  1527. .slice(0, 6)
  1528. this.radarData = {
  1529. indicator: processedData.map(item => ({
  1530. name: item.name,
  1531. max: 100
  1532. })),
  1533. values: processedData.map(item => item.score)
  1534. }
  1535. },
  1536. // 添加检查图表实例的方法
  1537. async ensureChartRendered() {
  1538. let attempts = 0
  1539. const maxAttempts = 5
  1540. while (!this.$refs.radarChart?.chart && attempts < maxAttempts) {
  1541. await new Promise(resolve => setTimeout(resolve, 200))
  1542. attempts++
  1543. }
  1544. return this.$refs.radarChart?.chart
  1545. },
  1546. getFacePhoto(photos) {
  1547. if (!photos || !Array.isArray(photos)) {
  1548. return null;
  1549. }
  1550. // 定义面部照片的中文和英文关键词
  1551. const faceKeywords = ['face', 'facial', '面部', '人脸', '头像'];
  1552. // 查找包含面部关键词的照片
  1553. const facePhoto = photos.find(photo => {
  1554. const description = (photo?.description || '').toLowerCase();
  1555. return faceKeywords.some(keyword => description.includes(keyword));
  1556. });
  1557. // 如果找到面部照片则返回URL,否则返回数组第一张照片的URL
  1558. return facePhoto?.photo_url || photos[0]?.photo_url;
  1559. },
  1560. // 获取题型名称
  1561. getQuestionTypeName(questionForm) {
  1562. const typeMap = {
  1563. 0: '视频问答题',
  1564. 1: '单选题',
  1565. 2: '多选题',
  1566. 3: '图片选择题',
  1567. 4: '问卷题',
  1568. 5: '开放问答题'
  1569. }
  1570. return typeMap[questionForm] || '未知题型'
  1571. },
  1572. // 处理问答记录数据
  1573. processInterviewRecords(records) {
  1574. if (!records || !Array.isArray(records)) return []
  1575. // 过滤并处理记录,只保留 question_form 为 0 或 5 的记录
  1576. const mainQuestions = records
  1577. .filter(q => (q.question_form === 0 || q.question_form === 5) && (q.video_answer || q.answer_data))
  1578. .map(q => ({
  1579. question: q.question_text || '未提供问题',
  1580. answer: q.video_answer?.transcript || q.answer_data?.text_answer || '',
  1581. analysis: q.video_answer?.ai_analysis?.comment || '',
  1582. score: q.video_answer?.ai_score ? `${q.video_answer.ai_score}` : '',
  1583. question_form: q.question_form,
  1584. question_id: q.question_id,
  1585. parent_question_id: q.parent_question_id,
  1586. follow_up_questions: [],
  1587. video_url: q.video_answer?.video_url || ''
  1588. }))
  1589. // 处理追问题,仍然只处理 question_form 为 5 的追问
  1590. records
  1591. .filter(q => q.question_form === 5 && q.parent_question_id)
  1592. .forEach(followUp => {
  1593. const parentQuestion = mainQuestions.find(
  1594. q => q.question_id === followUp.parent_question_id
  1595. )
  1596. if (parentQuestion) {
  1597. parentQuestion.follow_up_questions.push({
  1598. question: followUp.question_text || '未提供问题',
  1599. answer: followUp.video_answer?.transcript || '',
  1600. analysis: followUp.video_answer?.ai_analysis?.comment || '',
  1601. score: followUp.video_answer?.ai_score ? `${followUp.video_answer.ai_score}分` : '',
  1602. question_form: followUp.question_form,
  1603. question_id: followUp.question_id,
  1604. parent_question_id: followUp.parent_question_id,
  1605. follow_up_questions: [],
  1606. video_url: followUp.video_answer?.video_url || ''
  1607. })
  1608. }
  1609. })
  1610. return mainQuestions
  1611. },
  1612. getProgressColor(score) {
  1613. if (score >= 80) {
  1614. return [{
  1615. color: '#00b050', // 深绿色起点
  1616. percentage: 0
  1617. }, {
  1618. color: '#6aff05', // 浅绿色终点
  1619. percentage: 100
  1620. }]
  1621. } else {
  1622. return [{
  1623. color: '#f7681d', // 橙色起点
  1624. percentage: 0
  1625. }, {
  1626. color: '#fdd1bb', // 浅橙色终点
  1627. percentage: 100
  1628. }]
  1629. }
  1630. },
  1631. // 添加格式化分析文本的方法
  1632. formatAnalysis(analysis) {
  1633. if (!analysis) return '';
  1634. // 移除开头的换行符,并确保每个评价项之间只有一个换行
  1635. return analysis
  1636. .replace(/^\s+/, '') // 移除开头的空白
  1637. .replace(/【/g, '\n【') // 在评价项前添加换行
  1638. .replace(/^\n/, ''); // 移除第一个换行符
  1639. },
  1640. extractAssessmentPoints(analysis) {
  1641. if (!analysis) return [];
  1642. // 改进的正则表达式,更精确地匹配考核点格式
  1643. const pointsRegex = /【([^】]+)】评价:([^【]+)(?=【|$)/g;
  1644. const points = [];
  1645. let match;
  1646. while ((match = pointsRegex.exec(analysis)) !== null) {
  1647. const name = match[1].trim();
  1648. const fullDetail = match[2].trim();
  1649. // 提取评分等级,保持原有逻辑
  1650. let score = '';
  1651. if (fullDetail.includes('优秀')) score = '优秀';
  1652. else if (fullDetail.includes('良好')) score = '良好';
  1653. else if (fullDetail.includes('一般')) score = '一般';
  1654. else if (fullDetail.includes('较差')) score = '较差';
  1655. else score = '一般';
  1656. // 去掉评分等级,保留详细描述
  1657. const detail = fullDetail.replace(/(优秀|良好|一般|较差),/, '').trim();
  1658. points.push({
  1659. name,
  1660. score,
  1661. detail
  1662. });
  1663. }
  1664. return points;
  1665. },
  1666. getScoreClass(score) {
  1667. switch (score) {
  1668. case '优秀':
  1669. return 'score-excellent';
  1670. case '良好':
  1671. return 'score-good';
  1672. case '一般':
  1673. return 'score-average';
  1674. case '较差':
  1675. return 'score-poor';
  1676. default:
  1677. return 'score-average';
  1678. }
  1679. },
  1680. // 添加新的计算属性
  1681. getPsychologyScoreClass() {
  1682. const score = this.psychologyData.score;
  1683. if (score <= 20) return 'low-risk';
  1684. if (score <= 55) return 'medium-risk';
  1685. return 'high-risk';
  1686. },
  1687. getPsychologyRiskLevel() {
  1688. const score = this.psychologyData.score;
  1689. if (score <= 20) return '低风险';
  1690. if (score <= 55) return '中风险';
  1691. return '高风险';
  1692. },
  1693. async exportPDF() {
  1694. try {
  1695. this.exporting = true
  1696. // 获取要导出的内容区域
  1697. const element = document.querySelector('.report-container')
  1698. if (!element) {
  1699. throw new Error('未找到要导出的内容')
  1700. }
  1701. // 设置导出选项
  1702. const options = {
  1703. allowTaint: false,
  1704. useCORS: true,
  1705. scale: 2,
  1706. logging: false,
  1707. backgroundColor: '#ffffff',
  1708. height: element.scrollHeight,
  1709. windowHeight: element.scrollHeight,
  1710. imageTimeout: 0,
  1711. onclone: (doc) => {
  1712. // 添加打印样式
  1713. const style = doc.createElement('style')
  1714. style.innerHTML = `
  1715. @media print {
  1716. body {
  1717. -webkit-print-color-adjust: exact !important;
  1718. print-color-adjust: exact !important;
  1719. }
  1720. .report-container {
  1721. width: 100% !important;
  1722. margin: 0 !important;
  1723. padding: 20px !important;
  1724. display: block !important;
  1725. }
  1726. .report-header {
  1727. display: flex !important;
  1728. justify-content: space-between !important;
  1729. align-items: flex-end !important;
  1730. height: 80px !important;
  1731. margin-bottom: 30px !important;
  1732. }
  1733. :v-deep(.status-tag),
  1734. .status-tag[style*="background"],
  1735. span[class="status-tag"] {
  1736. background: none !important;
  1737. background-color: transparent !important;
  1738. -webkit-print-color-adjust: exact !important;
  1739. print-color-adjust: exact !important;
  1740. color: #000000 !important;
  1741. border: 1px solid #000000 !important;
  1742. }
  1743. /* 确保内联样式不会覆盖我们的设置 */
  1744. span[style*="background"].status-tag {
  1745. background: none !important;
  1746. background-color: transparent !important;
  1747. }
  1748. .header {
  1749. display: flex !important;
  1750. gap: 20px !important;
  1751. }
  1752. .header-right {
  1753. display: flex !important;
  1754. position: relative !important;
  1755. }
  1756. .nav-tabs {
  1757. display: flex !important;
  1758. gap: 32px !important;
  1759. justify-content: flex-start !important;
  1760. align-items: center !important;
  1761. }
  1762. .evaluation-result {
  1763. display: flex !important;
  1764. justify-content: space-between !important;
  1765. align-items: flex-start !important;
  1766. }
  1767. .score-section {
  1768. display: flex !important;
  1769. flex-direction: column !important;
  1770. gap: 24px !important;
  1771. }
  1772. .score-section-left {
  1773. display: flex !important;
  1774. justify-content: flex-start !important;
  1775. align-items: center !important;
  1776. gap: 16px !important;
  1777. }
  1778. .detection-results {
  1779. display: flex !important;
  1780. align-items: center !important;
  1781. gap: 8px !important;
  1782. }
  1783. .ability-quality {
  1784. display: block !important;
  1785. }
  1786. .quality-details {
  1787. display: block !important;
  1788. }
  1789. .quality-item {
  1790. display: flex !important;
  1791. gap: 24px !important;
  1792. }
  1793. .psychology_box {
  1794. display: flex !important;
  1795. flex-direction: row !important;
  1796. gap: 16px !important;
  1797. justify-content: space-between !important;
  1798. align-items: center !important;
  1799. }
  1800. .detection-section-content {
  1801. display: flex !important;
  1802. justify-content: space-between !important;
  1803. gap: 16px !important;
  1804. }
  1805. .fixed-btn {
  1806. display: none !important;
  1807. }
  1808. /* 确保所有flex容器在打印时保持flex布局 */
  1809. [class*="flex"] {
  1810. display: flex !important;
  1811. }
  1812. /* 确保图表容器保持正确的尺寸 */
  1813. .radar-chart {
  1814. width: 500px !important;
  1815. height: 350px !important;
  1816. }
  1817. /* 确保进度条样式正确 */
  1818. .el-progress-bar__outer {
  1819. height: 8px !important;
  1820. background-color: #EBEEF5 !important;
  1821. }
  1822. .el-progress-bar__inner {
  1823. transition: none !important;
  1824. }
  1825. :v-deep(.el-progress__text){
  1826. display: none !important;
  1827. }
  1828. /* 确保文字样式正确
  1829. .text-[14px] {
  1830. font-size: 14px !important;
  1831. line-height: 16px !important;
  1832. }*/
  1833. /* 确保边距和间距正确 */
  1834. .mt-6 { margin-top: 1.5rem !important; }
  1835. .mb-4 { margin-bottom: 1rem !important; }
  1836. .p-4 { padding: 1rem !important; }
  1837. /* 确保圆角样式正确 */
  1838. .rounded-lg { border-radius: 0.5rem !important; }
  1839. /* 确保背景色正确 */
  1840. .bg-white { background-color: #ffffff !important; }
  1841. .bg-gray-50 { background-color: #F9FAFB !important; }
  1842. }
  1843. `
  1844. doc.head.appendChild(style)
  1845. const allElements = doc.querySelectorAll('*')
  1846. allElements.forEach(el => {
  1847. el.style.visibility = 'visible'
  1848. el.style.opacity = '1'
  1849. })
  1850. }
  1851. }
  1852. // 生成画布
  1853. const canvas = await html2canvas(element, options)
  1854. // 计算PDF尺寸(使用A4比例)
  1855. const imgWidth = 595.28
  1856. const imgHeight = 841.89
  1857. const pageHeight = imgHeight
  1858. const imgData = canvas.toDataURL('image/jpeg', 1.0)
  1859. // 创建PDF
  1860. const pdf = new jsPDF({
  1861. orientation: 'p',
  1862. unit: 'pt',
  1863. format: 'a4',
  1864. compress: true
  1865. })
  1866. // 计算页数
  1867. const pageCount = Math.ceil(canvas.height * imgWidth / canvas.width / pageHeight)
  1868. // 逐页添加内容
  1869. for (let i = 0; i < pageCount; i++) {
  1870. if (i > 0) {
  1871. pdf.addPage()
  1872. }
  1873. const position = -i * pageHeight
  1874. pdf.addImage(
  1875. imgData,
  1876. 'JPEG',
  1877. 0,
  1878. position,
  1879. imgWidth,
  1880. canvas.height * imgWidth / canvas.width,
  1881. '',
  1882. 'FAST'
  1883. )
  1884. }
  1885. // 保存文件
  1886. pdf.save(`AI面试结果检验报告_${this.userInfo.name || '未知'}_${this.reportId}.pdf`)
  1887. } catch (error) {
  1888. console.error('导出PDF失败:', error)
  1889. ElMessage.error('导出PDF失败,请稍后重试')
  1890. } finally {
  1891. this.exporting = false
  1892. }
  1893. },
  1894. // 添加辅助方法
  1895. getFooterElement(remainingHeight, fillingHeight = 0) {
  1896. const newNode = document.createElement('div')
  1897. newNode.style.background = '#ffffff'
  1898. newNode.style.width = 'calc(100% + 8px)'
  1899. newNode.style.marginLeft = '-4px'
  1900. newNode.style.marginBottom = '0px'
  1901. newNode.classList.add('divRemove')
  1902. newNode.style.height = (remainingHeight + fillingHeight) + 'px'
  1903. return newNode
  1904. },
  1905. isSplit(nodes, index, pageHeight) {
  1906. if (!nodes[index + 1]) return false
  1907. if (nodes[index].localName !== 'tr') {
  1908. this.noTableHeight += nodes[index].clientHeight
  1909. }
  1910. if (nodes[index].localName !== 'tr') {
  1911. return nodes[index].offsetTop + nodes[index].offsetHeight < pageHeight &&
  1912. nodes[index + 1] &&
  1913. nodes[index + 1].offsetTop + nodes[index + 1].offsetHeight > pageHeight
  1914. } else {
  1915. return nodes[index].offsetTop + nodes[index].offsetHeight + this.noTableHeight < pageHeight &&
  1916. nodes[index + 1] &&
  1917. nodes[index + 1].offsetTop + nodes[index + 1].offsetHeight + this.noTableHeight > pageHeight
  1918. }
  1919. },
  1920. getBarChartOption(item) {
  1921. const color = item.weighted_score >= 80 ?
  1922. [{
  1923. offset: 0,
  1924. color: '#00b050'
  1925. }, {
  1926. offset: 1,
  1927. color: '#6aff05'
  1928. }] :
  1929. [{
  1930. offset: 0,
  1931. color: '#f7681d'
  1932. }, {
  1933. offset: 1,
  1934. color: '#fdd1bb'
  1935. }];
  1936. return {
  1937. grid: {
  1938. left: 0,
  1939. right: 40,
  1940. top: 0,
  1941. bottom: 0,
  1942. containLabel: false
  1943. },
  1944. xAxis: {
  1945. type: 'value',
  1946. show: false,
  1947. max: 100
  1948. },
  1949. yAxis: {
  1950. type: 'category',
  1951. show: false
  1952. },
  1953. series: [{
  1954. type: 'bar',
  1955. data: [item.weighted_score],
  1956. barWidth: 8,
  1957. label: {
  1958. show: true,
  1959. position: 'right',
  1960. formatter: '{c}分',
  1961. fontSize: 12,
  1962. color: '#808080'
  1963. },
  1964. itemStyle: {
  1965. borderRadius: [0, 4, 4, 0],
  1966. color: {
  1967. type: 'linear',
  1968. x: 0,
  1969. y: 0,
  1970. x2: 1,
  1971. y2: 0,
  1972. colorStops: color
  1973. }
  1974. }
  1975. }]
  1976. };
  1977. },
  1978. formatTextWithBrackets(text) {
  1979. if (!text) return '';
  1980. return text.replace(/【(.*?)】/g, '<span style="color:#81b337; font-weight: 500;">【$1】</span>');
  1981. },
  1982. formatTextWithBrackets2(text) {
  1983. if (!text) return '';
  1984. return text.replace(/【(.*?)】/g, '<span style="color:#fb752f; font-weight: 500;">【$1】</span>');
  1985. },
  1986. // 添加处理答案文本的方法
  1987. getAnswerText(answer) {
  1988. if (!answer) return '暂无回答';
  1989. // 如果是字符串,直接返回
  1990. if (typeof answer === 'string') {
  1991. return answer;
  1992. }
  1993. console.log(answer);
  1994. // 如果是数组,尝试获取第一个元素的text
  1995. if (Array.isArray(answer) && answer.length > 0) {
  1996. const firstItem = answer[0];
  1997. if (firstItem && firstItem.text) {
  1998. return firstItem.text;
  1999. }
  2000. }
  2001. // 如果是对象,尝试获取text属性
  2002. if (typeof answer === 'object' && answer.text) {
  2003. return answer.text;
  2004. }
  2005. // 其他情况返回默认文本
  2006. return '暂无回答';
  2007. },
  2008. }
  2009. }
  2010. </script>
  2011. <style lang="scss" scoped>
  2012. .outer-container {
  2013. position: relative;
  2014. width: 100%;
  2015. height: 100vh;
  2016. overflow-y: auto;
  2017. background: #fff;
  2018. }
  2019. .report-container {
  2020. /* padding: 30px; */
  2021. margin: 0 auto 30px;
  2022. width: 1200px;
  2023. background: #fff;
  2024. .header {
  2025. display: flex;
  2026. gap: 20px;
  2027. background: #fff;
  2028. border-radius: 8px;
  2029. .header-left {
  2030. .avatar {
  2031. width: 150px;
  2032. height: 150px;
  2033. border-radius: 50%;
  2034. object-fit: cover;
  2035. }
  2036. }
  2037. .header-right {
  2038. flex: 1;
  2039. display: flex;
  2040. position: relative;
  2041. background: #f8f8f8;
  2042. padding: 20px;
  2043. border-radius: 8px;
  2044. .left-section,
  2045. .right-section {
  2046. flex: 1;
  2047. .info-row {
  2048. margin-bottom: 12px;
  2049. display: flex;
  2050. align-items: center;
  2051. &:last-child {
  2052. margin-bottom: 0;
  2053. }
  2054. .label {
  2055. width: 80px;
  2056. color: #666;
  2057. font-size: 14px;
  2058. }
  2059. .value {
  2060. color: #333;
  2061. font-size: 14px;
  2062. &.verified {
  2063. color: #67C23A;
  2064. }
  2065. }
  2066. }
  2067. }
  2068. .stamp {
  2069. position: absolute;
  2070. right: 20px;
  2071. top: 50%;
  2072. transform: translateY(-50%);
  2073. img {
  2074. width: 150px;
  2075. height: 150px;
  2076. opacity: 0.8;
  2077. }
  2078. }
  2079. }
  2080. }
  2081. .evaluation-result {
  2082. border-radius: 8px;
  2083. display: flex;
  2084. justify-content: space-between;
  2085. align-items: center;
  2086. margin-top: 20px;
  2087. background: #f8f8f8;
  2088. .score-section {
  2089. width: 65%;
  2090. display: flex;
  2091. flex-direction: column;
  2092. gap: 24px;
  2093. padding: 24px;
  2094. background: #f8f8f8;
  2095. border-radius: 4px;
  2096. .score-section-left {
  2097. flex: 1;
  2098. display: flex;
  2099. justify-content: flex-start;
  2100. align-items: center;
  2101. gap: 16px;
  2102. white-space: nowrap; // 添加此行防止换行
  2103. .score-title {
  2104. font-size: 16px;
  2105. font-weight: bold;
  2106. color: #333;
  2107. min-width: fit-content; // 添加此行确保标题不会被压缩
  2108. }
  2109. .score-value {
  2110. display: flex;
  2111. align-items: baseline;
  2112. min-width: fit-content; // 添加此行确保分数部分不会被压缩
  2113. .number {
  2114. font-size: 14px;
  2115. font-weight: bold;
  2116. color: #F56C6C;
  2117. }
  2118. .unit {
  2119. margin: 0 8px;
  2120. font-size: 14px;
  2121. color: #333;
  2122. }
  2123. .status-tag {
  2124. //padding: 2px 8px;
  2125. font-size: 12px;
  2126. color: #fff;
  2127. background: #F56C6C; // 默认背景色
  2128. border-radius: 2px;
  2129. // 添加打印时的特殊样式
  2130. @media print {
  2131. background: none !important; // 移除打印时的背景色
  2132. color: #F56C6C !important; // 使用对应的文字颜色
  2133. border: 1px solid #F56C6C; // 添加边框来区分
  2134. &[style*="background:#67C23A"] {
  2135. background: none !important;
  2136. color: #67C23A !important;
  2137. border: 1px solid #67C23A;
  2138. }
  2139. }
  2140. }
  2141. }
  2142. .detection-results {
  2143. display: flex;
  2144. align-items: center;
  2145. gap: 8px;
  2146. font-size: 14px;
  2147. color: #333;
  2148. min-width: fit-content; // 添加此行确保检测结果不会被压缩
  2149. .detection-item {
  2150. display: flex;
  2151. align-items: center;
  2152. gap: 4px;
  2153. white-space: nowrap; // 添加此行防止换行
  2154. .status-normal {
  2155. color: #67C23A;
  2156. }
  2157. .status-warning {
  2158. color: #F56C6C;
  2159. }
  2160. }
  2161. .separator {
  2162. color: #DCDFE6;
  2163. }
  2164. }
  2165. }
  2166. .fail-reason {
  2167. flex: 1;
  2168. text-align: left;
  2169. padding: 16px;
  2170. border-radius: 4px;
  2171. .reason-header {
  2172. display: flex;
  2173. align-items: center;
  2174. gap: 8px;
  2175. margin-bottom: 12px;
  2176. color: #F56C6C;
  2177. font-size: 14px;
  2178. i {
  2179. font-size: 16px;
  2180. }
  2181. }
  2182. .reason-content {
  2183. margin-top: 16px;
  2184. font-size: 14px;
  2185. .label {
  2186. color: #333;
  2187. font-weight: 500;
  2188. }
  2189. .status-normal {
  2190. color: #67C23A;
  2191. }
  2192. .status-warning {
  2193. color: #F56C6C;
  2194. }
  2195. .failed-questions {
  2196. margin-top: 12px;
  2197. padding: 12px;
  2198. background-color: #FEF0F0;
  2199. border-radius: 4px;
  2200. border-left: 4px solid #F56C6C;
  2201. .failed-title {
  2202. color: #F56C6C;
  2203. font-weight: 500;
  2204. margin-bottom: 8px;
  2205. }
  2206. .failed-list {
  2207. text-align: left;
  2208. list-style-type: disc;
  2209. padding-left: 20px;
  2210. color: #606266;
  2211. li {
  2212. margin-bottom: 4px;
  2213. &:last-child {
  2214. margin-bottom: 0;
  2215. }
  2216. }
  2217. }
  2218. }
  2219. }
  2220. }
  2221. }
  2222. .radar-chart {
  2223. width: 500px;
  2224. height: 350px;
  2225. /* background: #fff; */
  2226. border-radius: 8px;
  2227. /* border: 1px solid #EBEEF5; */
  2228. padding: 20px;
  2229. /* margin-right: 20px; */
  2230. .radar {
  2231. width: 100%;
  2232. height: 100%;
  2233. }
  2234. :deep(.echarts-tooltip) {
  2235. display: none; // 隐藏tooltip
  2236. }
  2237. }
  2238. }
  2239. .ability-quality {
  2240. margin-top: 30px;
  2241. background: #f8f8f8;
  2242. padding: 20px;
  2243. border-radius: 8px;
  2244. h3 {
  2245. font-size: 16px;
  2246. color: #333;
  2247. margin: 0;
  2248. padding-bottom: 16px;
  2249. /* border-bottom: 1px solid #eee; */
  2250. .score-text {
  2251. font-size: 14px;
  2252. color: #f56c6c;
  2253. font-weight: normal;
  2254. margin-left: 10px;
  2255. }
  2256. }
  2257. .quality-details {
  2258. margin-top: 20px;
  2259. .quality-item {
  2260. display: flex;
  2261. gap: 24px;
  2262. .quality-left, .quality-right {
  2263. .icon-box{
  2264. display: flex;
  2265. align-items: center;
  2266. .icon {
  2267. width: 32px;
  2268. height: 32px;
  2269. border-radius: 4px;
  2270. flex-shrink: 0;
  2271. margin-right: 12px;
  2272. }
  2273. h5{
  2274. margin-bottom: 0;
  2275. }
  2276. }
  2277. .content{
  2278. p{
  2279. .bracket-content {
  2280. color: #409EFF;
  2281. font-weight: 500;
  2282. }
  2283. }
  2284. }
  2285. flex: 1;
  2286. display: flex;
  2287. align-items: center;
  2288. gap: 12px;
  2289. .advantage-icon {
  2290. /* background: #67C23A; */
  2291. }
  2292. .suggestion-icon {
  2293. /* background: #E6A23C; */
  2294. }
  2295. .content {
  2296. flex: 1;
  2297. h4 {
  2298. margin: 0 0 12px 0;
  2299. font-size: 14px;
  2300. color: #333;
  2301. }
  2302. p {
  2303. margin: 0;
  2304. font-size: 12px;
  2305. line-height: 1.6;
  2306. color: #666;
  2307. }
  2308. }
  2309. }
  2310. }
  2311. }
  2312. }
  2313. .detailed-evaluation {
  2314. padding: 20px;
  2315. border-radius: 8px;
  2316. margin-top: 30px;
  2317. background: #f8f8f8;
  2318. position: relative;
  2319. .line-info {
  2320. color: #9b9b9b;
  2321. .line-info-left {
  2322. position: absolute;
  2323. left: 36%;
  2324. top: 0;
  2325. }
  2326. .line-info-center {
  2327. position: absolute;
  2328. left: 63%;
  2329. top: 0;
  2330. }
  2331. .line-info-right {
  2332. position: absolute;
  2333. left: 72%;
  2334. top: 0;
  2335. }
  2336. }
  2337. .line-chart {
  2338. .line-chart-left {
  2339. width: 1px;
  2340. height: 91%;
  2341. border-left: 1px solid #e1e1e1;
  2342. position: absolute;
  2343. left: 12%;
  2344. margin-left: 16px;
  2345. }
  2346. .line_left {
  2347. width: 1px;
  2348. height: 90%;
  2349. border-left: 1px dashed #e1e1e1;
  2350. position: absolute;
  2351. left: 59%;
  2352. margin-left: 7px;
  2353. /* top: 0; */
  2354. }
  2355. .line_center {
  2356. width: 1px;
  2357. height: 90%;
  2358. border-left: 1px dashed #e1e1e1;
  2359. position: absolute;
  2360. left: 69%;
  2361. margin-left: -7px;
  2362. }
  2363. .line_right {
  2364. width: 1px;
  2365. height: 90%;
  2366. border-left: 1px dashed #e1e1e1;
  2367. position: absolute;
  2368. left: 76%;
  2369. margin-left: -6px;
  2370. }
  2371. }
  2372. .ability-scores {
  2373. .ability-item {
  2374. display: flex;
  2375. align-items: center;
  2376. margin-bottom: 20px;
  2377. position: relative;
  2378. min-height: 30px;
  2379. .ability-name {
  2380. min-width: 120px;
  2381. margin-right: 20px;
  2382. font-size: 14px;
  2383. color: #333;
  2384. white-space: nowrap;
  2385. display: flex;
  2386. align-items: center;
  2387. height: 30px; // 固定高度以确保垂直居中
  2388. }
  2389. .bar-chart-container {
  2390. flex: 1;
  2391. margin-right: 45px;
  2392. display: flex;
  2393. align-items: center;
  2394. height: 30px; // 固定高度以确保垂直居中
  2395. :deep(.echarts) {
  2396. height: 100% !important;
  2397. }
  2398. }
  2399. }
  2400. }
  2401. }
  2402. .detection-section,
  2403. .psychology-section,
  2404. .body-detection-section {
  2405. .detection-section-header{
  2406. display: flex;
  2407. align-items: flex-start;
  2408. justify-content: space-between;
  2409. }
  2410. margin-top: 20px;
  2411. background: #f8f8f8;
  2412. padding: 20px;
  2413. border-radius: 8px;
  2414. .section-title {
  2415. font-size: 16px;
  2416. font-weight: bold;
  2417. color: #333;
  2418. margin-bottom: 16px;
  2419. }
  2420. .status-tag {
  2421. display: inline-block;
  2422. padding: 2px 8px;
  2423. border-radius: 2px;
  2424. font-size: 12px;
  2425. &.normal {
  2426. font-size: 14px;
  2427. /* background: #67C23A; */
  2428. color: #67C23A;
  2429. }
  2430. }
  2431. }
  2432. .detection-section-content{
  2433. display: flex;
  2434. justify-content: space-between;
  2435. gap: 16px;
  2436. .detection-items {
  2437. margin: 16px 0;
  2438. .item {
  2439. margin-bottom: 8px;
  2440. font-size: 14px;
  2441. .status {
  2442. &.normal {
  2443. color: #67C23A;
  2444. }
  2445. }
  2446. .separator {
  2447. margin: 0 8px;
  2448. color: #DCDFE6;
  2449. }
  2450. .desc {
  2451. color: #606266;
  2452. }
  2453. }
  2454. }
  2455. .risk-standards {
  2456. margin-top: 16px;
  2457. .standards-title {
  2458. font-size: 14px;
  2459. color: #333;
  2460. margin-bottom: 12px;
  2461. }
  2462. .standard-item {
  2463. margin-bottom: 8px;
  2464. font-size: 14px;
  2465. .level {
  2466. color: #333;
  2467. }
  2468. .desc {
  2469. color: #606266;
  2470. }
  2471. }
  2472. }
  2473. }
  2474. .psychology-section {
  2475. .psychology_box{
  2476. display: flex;
  2477. flex-direction: row;
  2478. gap: 16px;
  2479. justify-content: space-between;
  2480. align-items: center;
  2481. }
  2482. .duv-score {
  2483. position: relative;
  2484. .score {
  2485. font-size: 48px;
  2486. font-weight: bold;
  2487. &.low-risk {
  2488. color: #67C23A;
  2489. }
  2490. &.medium-risk {
  2491. color: #E6A23C;
  2492. }
  2493. &.high-risk {
  2494. color: #F56C6C;
  2495. }
  2496. }
  2497. .risk-level {
  2498. margin-top: 0 !important;
  2499. border-radius: 12px;
  2500. font-size: 12px;
  2501. font-weight: normal;
  2502. &.low-risk {
  2503. color: #67C23A;
  2504. }
  2505. &.medium-risk {
  2506. color: #E6A23C;
  2507. }
  2508. &.high-risk {
  2509. color: #F56C6C;
  2510. }
  2511. }
  2512. }
  2513. .psychology-desc {
  2514. font-size: 14px;
  2515. color: #606266;
  2516. line-height: 1.6;
  2517. }
  2518. .psychology-recommendation {
  2519. margin-top: 16px;
  2520. font-size: 14px;
  2521. .label {
  2522. color: #333;
  2523. font-weight: 500;
  2524. }
  2525. .value {
  2526. color: #409EFF;
  2527. }
  2528. }
  2529. }
  2530. .body-detection-section {
  2531. .hand-verification {
  2532. .grid {
  2533. @apply gap-4;
  2534. }
  2535. .aspect-square {
  2536. @apply relative;
  2537. padding-top: 100%;
  2538. img {
  2539. @apply absolute inset-0 w-full h-full object-cover;
  2540. }
  2541. }
  2542. }
  2543. .detection-results {
  2544. .detection-item {
  2545. @apply p-4 bg-gray-50 rounded-lg;
  2546. .position {
  2547. @apply font-medium text-gray-700 mr-2;
  2548. }
  2549. .status {
  2550. font-weight: 500;
  2551. &.status-normal {
  2552. color: #67C23A; // 绿色
  2553. }
  2554. &.status-error {
  2555. color: #F56C6C; // 红色
  2556. }
  2557. }
  2558. .description {
  2559. @apply block mt-1;
  2560. }
  2561. }
  2562. }
  2563. }
  2564. .nav-tabs {
  2565. position: sticky;
  2566. top: 0;
  2567. display: flex;
  2568. gap: 32px;
  2569. margin: 20px 0;
  2570. padding: 0 20px;
  2571. border: none;
  2572. margin-bottom: 2px;
  2573. /* border-bottom: 1px solid #EBEEF5; */
  2574. background: #fff;
  2575. z-index: 100;
  2576. width: 100%;
  2577. box-sizing: border-box;
  2578. transition: all 0.3s ease;
  2579. &.fixed {
  2580. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  2581. }
  2582. .tab-item {
  2583. position: relative;
  2584. padding: 5px 22px;
  2585. font-size: 14px;
  2586. color: #606266;
  2587. cursor: pointer;
  2588. transition: all 0.3s;
  2589. border-radius: 15px;
  2590. &:hover {
  2591. color: #409EFF;
  2592. background: #f2f3f8;
  2593. }
  2594. &.active {
  2595. color: #409EFF;
  2596. font-weight: 500;
  2597. background: #f2f3f8;
  2598. &::after {
  2599. display: none;
  2600. }
  2601. }
  2602. &.link-tab {
  2603. display: flex;
  2604. align-items: center;
  2605. gap: 4px;
  2606. i {
  2607. font-size: 12px;
  2608. }
  2609. &:hover {
  2610. color: #409EFF;
  2611. text-decoration: underline;
  2612. }
  2613. }
  2614. &.info-tab {
  2615. display: flex;
  2616. align-items: center;
  2617. gap: 4px;
  2618. i {
  2619. font-size: 14px;
  2620. }
  2621. &:hover {
  2622. color: #409EFF;
  2623. }
  2624. }
  2625. }
  2626. }
  2627. // 修改占位元素样式
  2628. .nav-placeholder {
  2629. margin: 20px 0;
  2630. transition: height 0.3s ease;
  2631. }
  2632. }
  2633. .loading-state,
  2634. .error-state {
  2635. text-align: center;
  2636. padding: 20px;
  2637. color: #666;
  2638. }
  2639. .error-state {
  2640. color: #F56C6C;
  2641. }
  2642. .redline-section {
  2643. margin-top: 16px;
  2644. padding: 16px;
  2645. background-color: #FFF6F6;
  2646. border-radius: 4px;
  2647. .redline-header {
  2648. display: flex;
  2649. justify-content: space-between;
  2650. align-items: center;
  2651. margin-bottom: 12px;
  2652. .redline-title {
  2653. color: #F56C6C;
  2654. font-size: 14px;
  2655. font-weight: 500;
  2656. }
  2657. .status-normal {
  2658. color: #67C23A;
  2659. font-size: 14px;
  2660. }
  2661. .status-warning {
  2662. color: #F56C6C;
  2663. font-size: 14px;
  2664. }
  2665. }
  2666. .failed-questions {
  2667. text-align: left !important;
  2668. .failed-title {
  2669. text-align: left;
  2670. color: #606266;
  2671. font-size: 14px;
  2672. margin-bottom: 8px;
  2673. }
  2674. .failed-list {
  2675. text-align: left;
  2676. padding-left: 8px;
  2677. .failed-item {
  2678. display: flex;
  2679. align-items: flex-start;
  2680. margin-bottom: 8px;
  2681. color: #606266;
  2682. font-size: 14px;
  2683. line-height: 1.5;
  2684. text-align: left;
  2685. &:last-child {
  2686. margin-bottom: 0;
  2687. }
  2688. .bullet {
  2689. color: #F56C6C;
  2690. margin-right: 8px;
  2691. font-size: 16px;
  2692. line-height: 1;
  2693. }
  2694. .question-text {
  2695. flex: 1;
  2696. }
  2697. }
  2698. }
  2699. }
  2700. }
  2701. .hand-verification {
  2702. .grid {
  2703. @apply gap-4;
  2704. }
  2705. .aspect-square {
  2706. @apply relative;
  2707. padding-top: 100%;
  2708. img {
  2709. @apply absolute inset-0 w-full h-full object-cover;
  2710. }
  2711. }
  2712. }
  2713. .detection-results {
  2714. .detection-item {
  2715. @apply p-4 rounded-lg;
  2716. .position {
  2717. @apply font-medium text-gray-700 mr-2;
  2718. }
  2719. .status {
  2720. font-weight: 500;
  2721. &.status-normal {
  2722. color: #67C23A; // 绿色
  2723. }
  2724. &.status-error {
  2725. color: #F56C6C; // 红色
  2726. }
  2727. }
  2728. .description {
  2729. @apply block mt-1;
  2730. }
  2731. }
  2732. }
  2733. // 添加一些额外的样式来处理图片加载失败的情况
  2734. .aspect-square {
  2735. background: #f5f5f5;
  2736. img {
  2737. &[src="/@/assets/default-image.png"] {
  2738. object-fit: contain;
  2739. padding: 20%;
  2740. }
  2741. }
  2742. }
  2743. // 添加顶部标识栏样式
  2744. .report-header {
  2745. display: flex;
  2746. justify-content: space-between;
  2747. align-items: flex-end;
  2748. height: 80px;
  2749. padding: 5px 24px;
  2750. background: url("/@/assets/report.png") no-repeat center center;
  2751. background-size: 100% 100%;
  2752. color: #fff;
  2753. position: relative;
  2754. width: 1200px;
  2755. margin: 0 auto;
  2756. margin-bottom: 30px;
  2757. border-radius: 5px;
  2758. .header-left {
  2759. position: absolute;
  2760. left: 0;
  2761. bottom: 0;
  2762. display: flex;
  2763. color: #000;
  2764. padding: 5px 40px;
  2765. background-color: #fff;
  2766. align-items: center;
  2767. font-size: 16px;
  2768. font-weight: 500;
  2769. border-top-right-radius: 60px;
  2770. .cc-icon {
  2771. width: 21px;
  2772. height: 12px;
  2773. margin-right: 8px;
  2774. }
  2775. }
  2776. .header-right {
  2777. display: flex;
  2778. align-items: center;
  2779. justify-content: space-between;
  2780. width: 100%;
  2781. gap: 24px;
  2782. font-size: 14px;
  2783. opacity: 0.8;
  2784. margin-left: 260px;
  2785. span {
  2786. white-space: nowrap;
  2787. }
  2788. .report-id {
  2789. opacity: 0.8;
  2790. }
  2791. }
  2792. }
  2793. // 添加媒体查询和响应式样式
  2794. @media screen and (max-width: 768px) {
  2795. .outer-container {
  2796. padding: 0;
  2797. }
  2798. .report-header {
  2799. height: auto;
  2800. padding: 12px 16px;
  2801. flex-direction: column;
  2802. align-items: flex-start;
  2803. gap: 8px;
  2804. .header-right {
  2805. flex-direction: column;
  2806. gap: 4px;
  2807. width: 100%;
  2808. }
  2809. }
  2810. .report-container {
  2811. padding: 16px;
  2812. .header {
  2813. flex-direction: column;
  2814. gap: 16px;
  2815. .header-left {
  2816. .avatar {
  2817. width: 100px;
  2818. height: 100px;
  2819. margin: 0 auto;
  2820. display: block;
  2821. }
  2822. }
  2823. .header-right {
  2824. flex-direction: column;
  2825. padding: 16px;
  2826. .left-section,
  2827. .right-section {
  2828. width: 100%;
  2829. }
  2830. .stamp {
  2831. position: static;
  2832. transform: none;
  2833. margin-top: 16px;
  2834. text-align: center;
  2835. img {
  2836. width: 80px;
  2837. height: 80px;
  2838. }
  2839. }
  2840. }
  2841. }
  2842. .nav-tabs {
  2843. gap: 16px;
  2844. padding: 0 12px;
  2845. overflow-x: auto;
  2846. white-space: nowrap;
  2847. -webkit-overflow-scrolling: touch;
  2848. &::-webkit-scrollbar {
  2849. display: none;
  2850. }
  2851. .tab-item {
  2852. padding: 8px 0;
  2853. font-size: 13px;
  2854. }
  2855. }
  2856. .evaluation-result {
  2857. .score-section {
  2858. padding: 16px;
  2859. .score-section-left {
  2860. flex-direction: column;
  2861. align-items: flex-start;
  2862. gap: 12px;
  2863. .detection-results {
  2864. flex-direction: column;
  2865. gap: 8px;
  2866. .separator {
  2867. display: none;
  2868. }
  2869. }
  2870. }
  2871. }
  2872. }
  2873. .ability-quality {
  2874. .quality-details {
  2875. .quality-item {
  2876. flex-direction: column;
  2877. gap: 20px;
  2878. }
  2879. }
  2880. }
  2881. .detailed-evaluation {
  2882. .ability-scores {
  2883. .ability-item {
  2884. flex-direction: column;
  2885. gap: 8px;
  2886. margin-bottom: 16px;
  2887. .ability-name {
  2888. width: 100%;
  2889. }
  2890. }
  2891. }
  2892. }
  2893. .detection-section-content {
  2894. flex-direction: column;
  2895. gap: 20px;
  2896. }
  2897. // 手势验证部分响应式处理
  2898. .hand-verification {
  2899. .grid {
  2900. grid-template-columns: 1fr !important;
  2901. gap: 16px;
  2902. h4 {
  2903. margin-top: 16px;
  2904. }
  2905. }
  2906. }
  2907. }
  2908. // 修改心理检测部分在移动端的样式
  2909. .psychology-section {
  2910. .duv-score {
  2911. flex-wrap: wrap;
  2912. .score {
  2913. font-size: 20px;
  2914. }
  2915. }
  2916. }
  2917. // 修改红线题部分在移动端的样式
  2918. .redline-section {
  2919. padding: 12px;
  2920. .failed-questions {
  2921. .failed-list {
  2922. .failed-item {
  2923. margin-bottom: 12px;
  2924. }
  2925. }
  2926. }
  2927. }
  2928. }
  2929. // 添加暗黑模式支持1
  2930. /* @media (prefers-color-scheme: dark) {
  2931. .report-container {
  2932. background: #1a1a1a;
  2933. color: #e5e5e5;
  2934. .header-right {
  2935. background: #2a2a2a;
  2936. }
  2937. .nav-tabs {
  2938. background: #1a1a1a;
  2939. border-bottom-color: #333;
  2940. .tab-item {
  2941. color: #e5e5e5;
  2942. &:hover,
  2943. &.active {
  2944. color: #409EFF;
  2945. }
  2946. }
  2947. }
  2948. .evaluation-result,
  2949. .ability-quality,
  2950. .detailed-evaluation,
  2951. .detection-section,
  2952. .psychology-section,
  2953. .body-detection-section {
  2954. background: #2a2a2a;
  2955. }
  2956. .status-normal {
  2957. color: #95d475;
  2958. }
  2959. .status-warning {
  2960. color: #ff7875;
  2961. }
  2962. }
  2963. } */
  2964. .info-dialog {
  2965. :deep(.el-dialog__header) {
  2966. padding: 20px;
  2967. border-bottom: 1px solid #EBEEF5;
  2968. }
  2969. :deep(.el-dialog__body) {
  2970. padding: 24px;
  2971. }
  2972. .info-content {
  2973. .info-section {
  2974. margin-bottom: 24px;
  2975. &:last-child {
  2976. margin-bottom: 0;
  2977. }
  2978. h4 {
  2979. font-size: 16px;
  2980. color: #333;
  2981. margin: 0 0 16px 0;
  2982. padding-left: 10px;
  2983. border-left: 3px solid #409EFF;
  2984. }
  2985. .info-grid {
  2986. display: grid;
  2987. grid-template-columns: repeat(2, 1fr);
  2988. gap: 16px;
  2989. .info-item {
  2990. display: flex;
  2991. align-items: center;
  2992. .label {
  2993. width: 80px;
  2994. color: #666;
  2995. font-size: 14px;
  2996. }
  2997. .value {
  2998. flex: 1;
  2999. color: #333;
  3000. font-size: 14px;
  3001. }
  3002. }
  3003. }
  3004. }
  3005. }
  3006. }
  3007. // 添加移动端适配
  3008. @media screen and (max-width: 768px) {
  3009. .info-dialog {
  3010. :deep(.el-dialog) {
  3011. width: 90% !important;
  3012. margin: 20px auto !important;
  3013. }
  3014. .info-content {
  3015. .info-section {
  3016. .info-grid {
  3017. grid-template-columns: 1fr;
  3018. }
  3019. }
  3020. }
  3021. }
  3022. }
  3023. // 添加弹窗相关样式
  3024. .body-verification-dialog {
  3025. :deep(.el-dialog__header) {
  3026. padding: 20px;
  3027. border-bottom: 1px solid #EBEEF5;
  3028. }
  3029. :deep(.el-dialog__body) {
  3030. padding: 24px;
  3031. }
  3032. // 在弹窗中保持原有的手势验证样式
  3033. .hand-verification {
  3034. .grid {
  3035. @apply gap-4;
  3036. }
  3037. .aspect-square {
  3038. @apply relative;
  3039. padding-top: 100%;
  3040. img {
  3041. @apply absolute inset-0 w-full h-full object-cover;
  3042. }
  3043. }
  3044. }
  3045. .detection-results {
  3046. .detection-item {
  3047. @apply p-4 bg-gray-50 rounded-lg;
  3048. .position {
  3049. @apply font-medium text-gray-700 mr-2;
  3050. }
  3051. .status {
  3052. @apply text-green-500;
  3053. }
  3054. .description {
  3055. @apply block mt-1;
  3056. }
  3057. }
  3058. }
  3059. }
  3060. // 添加移动端适配
  3061. @media screen and (max-width: 768px) {
  3062. .body-verification-dialog {
  3063. :deep(.el-dialog) {
  3064. width: 95% !important;
  3065. margin: 10px auto !important;
  3066. }
  3067. .hand-verification {
  3068. .grid {
  3069. grid-template-columns: 1fr !important;
  3070. gap: 16px;
  3071. }
  3072. }
  3073. .detection-results {
  3074. .grid {
  3075. grid-template-columns: 1fr !important;
  3076. }
  3077. }
  3078. }
  3079. }
  3080. // 确保在移动端也能正常显示
  3081. @media screen and (max-width: 768px) {
  3082. .radar-chart {
  3083. width: 100%;
  3084. margin-right: 0;
  3085. margin-top: 20px;
  3086. }
  3087. }
  3088. // 修改心理测评部分的样式
  3089. .psychology-section {
  3090. .psychology_box {
  3091. display: flex;
  3092. flex-direction: row;
  3093. gap: 16px;
  3094. justify-content: space-between;
  3095. align-items: center;
  3096. .psychology_body {
  3097. flex: 1;
  3098. }
  3099. .duv-score {
  3100. display: flex;
  3101. align-items: center;
  3102. justify-content: center;
  3103. width: 100px;
  3104. height: 100px;
  3105. background: #fff;
  3106. border-radius: 50%;
  3107. color: #81b337;
  3108. gap: 8px;
  3109. span {
  3110. &:first-child {
  3111. font-size: 14px;
  3112. color: #666;
  3113. }
  3114. &.score {
  3115. font-size: 48px;
  3116. font-weight: bold;
  3117. color: #81b337;
  3118. }
  3119. &:last-child {
  3120. margin-top: 20px;
  3121. font-weight: bold;
  3122. font-size: 20px;
  3123. color: #81b337;
  3124. }
  3125. }
  3126. }
  3127. }
  3128. .psychology-desc {
  3129. font-size: 14px;
  3130. color: #606266;
  3131. line-height: 1.6;
  3132. margin-bottom: 16px;
  3133. }
  3134. .psychology-recommendation {
  3135. font-size: 14px;
  3136. .label {
  3137. color: #333;
  3138. font-weight: 500;
  3139. }
  3140. .value {
  3141. color: #409EFF;
  3142. }
  3143. }
  3144. }
  3145. // 添加移动端适配
  3146. @media screen and (max-width: 768px) {
  3147. .psychology-section {
  3148. .psychology_box {
  3149. flex-direction: column;
  3150. .duv-score {
  3151. width: 100%;
  3152. padding: 16px;
  3153. }
  3154. }
  3155. }
  3156. }
  3157. // 修改导出按钮样式
  3158. .export-btn.fixed-btn {
  3159. position: fixed;
  3160. right: 40px;
  3161. bottom: 40px;
  3162. z-index: 999;
  3163. padding: 12px; // 修改为固定的padding值
  3164. width: 40px; // 添加固定宽度
  3165. height: 40px; // 添加固定高度
  3166. border-radius: 50%; // 改为圆形
  3167. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  3168. transition: all 0.3s ease;
  3169. display: flex;
  3170. align-items: center;
  3171. justify-content: center;
  3172. // 修改图标样式
  3173. :deep(.el-icon) {
  3174. display: flex;
  3175. align-items: center;
  3176. justify-content: center;
  3177. font-size: 16px;
  3178. }
  3179. &:hover {
  3180. transform: translateY(-2px);
  3181. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  3182. }
  3183. &:active {
  3184. transform: translateY(0);
  3185. }
  3186. }
  3187. // 移动端适配
  3188. @media screen and (max-width: 768px) {
  3189. .export-btn.fixed-btn {
  3190. right: 20px;
  3191. bottom: 20px;
  3192. width: 36px; // 移动端稍微小一点
  3193. height: 36px;
  3194. padding: 8px;
  3195. }
  3196. }
  3197. // 修改header-right样式以适应新增按钮
  3198. .report-header {
  3199. .header-right {
  3200. display: flex;
  3201. align-items: center;
  3202. gap: 16px;
  3203. .export-btn {
  3204. margin-left: auto; // 将按钮推到最右侧
  3205. }
  3206. }
  3207. }
  3208. // 添加移动端适配
  3209. @media screen and (max-width: 768px) {
  3210. .report-header {
  3211. .header-right {
  3212. flex-wrap: wrap;
  3213. .export-btn {
  3214. margin-left: 0;
  3215. margin-top: 8px;
  3216. width: 100%;
  3217. }
  3218. }
  3219. }
  3220. }
  3221. // 添加问答记录相关样式
  3222. .qa-section {
  3223. margin-top: 30px;
  3224. padding: 20px;
  3225. background: #f8f8f8;
  3226. border-radius: 8px;
  3227. .section-title {
  3228. font-size: 16px;
  3229. font-weight: bold;
  3230. color: #333;
  3231. margin-bottom: 20px;
  3232. }
  3233. .qa-content {
  3234. .qa-item {
  3235. margin-bottom: 24px;
  3236. &:last-child {
  3237. margin-bottom: 0;
  3238. }
  3239. }
  3240. .question-block {
  3241. background: #fff;
  3242. border-radius: 8px;
  3243. padding: 16px;
  3244. margin-bottom: 16px;
  3245. .question-header {
  3246. display: flex;
  3247. gap: 8px;
  3248. margin-bottom: 12px;
  3249. .question-tag {
  3250. padding: 2px 8px;
  3251. background: #e6f7ff;
  3252. color: #1890ff;
  3253. border-radius: 4px;
  3254. font-size: 12px;
  3255. }
  3256. .question-type {
  3257. padding: 2px 8px;
  3258. background: #f5f5f5;
  3259. color: #666;
  3260. border-radius: 4px;
  3261. font-size: 12px;
  3262. }
  3263. }
  3264. h4 {
  3265. font-size: 14px;
  3266. color: #333;
  3267. margin-bottom: 12px;
  3268. }
  3269. }
  3270. .answer-content {
  3271. p {
  3272. color: #666;
  3273. font-size: 14px;
  3274. line-height: 1.6;
  3275. margin-bottom: 8px;
  3276. }
  3277. .score-info {
  3278. color: #1890ff;
  3279. font-size: 14px;
  3280. .analysis {
  3281. color: #666;
  3282. margin-top: 4px;
  3283. }
  3284. }
  3285. }
  3286. .follow-up-questions {
  3287. padding-left: 24px;
  3288. border-left: 2px solid #e8e8e8;
  3289. .follow-up-item {
  3290. background: #fff;
  3291. border-radius: 8px;
  3292. padding: 16px;
  3293. margin-bottom: 12px;
  3294. &:last-child {
  3295. margin-bottom: 0;
  3296. }
  3297. .follow-up-header {
  3298. margin-bottom: 12px;
  3299. .follow-up-tag {
  3300. padding: 2px 8px;
  3301. background: #f6f3ff;
  3302. color: #722ed1;
  3303. border-radius: 4px;
  3304. font-size: 12px;
  3305. }
  3306. }
  3307. h4 {
  3308. font-size: 14px;
  3309. color: #333;
  3310. margin-bottom: 12px;
  3311. }
  3312. }
  3313. }
  3314. }
  3315. }
  3316. .video-container {
  3317. position: relative;
  3318. width: 100%;
  3319. max-width: 126px;
  3320. /* aspect-ratio: 3/4; */
  3321. height: 150px;
  3322. margin: 0 auto;
  3323. background: #000;
  3324. border-radius: 12px;
  3325. overflow: hidden;
  3326. }
  3327. // 移动端适配
  3328. @media screen and (max-width: 768px) {
  3329. .qa-section {
  3330. padding: 16px;
  3331. .qa-content {
  3332. .follow-up-questions {
  3333. padding-left: 16px;
  3334. }
  3335. }
  3336. }
  3337. }
  3338. #candidate-answer{
  3339. margin-left: 15px;
  3340. position: relative;
  3341. padding-left: 12px; // 为竖条留出空间
  3342. &::before {
  3343. content: '';
  3344. position: absolute;
  3345. left: -7px;
  3346. top: 50%;
  3347. transform: translateY(-50%);
  3348. width: 3px;
  3349. height: 16px;
  3350. background: #2a3dae; // 竖条颜色
  3351. border-radius: 2px;
  3352. }
  3353. }
  3354. // 添加媒体查询以处理移动端显示
  3355. @media screen and (max-width: 768px) {
  3356. .score-section-left {
  3357. flex-wrap: wrap; // 在移动端允许换行
  3358. white-space: normal; // 在移动端允许换行
  3359. .detection-results {
  3360. width: 100%;
  3361. flex-wrap: wrap;
  3362. .detection-item {
  3363. width: 100%;
  3364. justify-content: flex-start;
  3365. }
  3366. .separator {
  3367. display: none; // 在移动端隐藏分隔符
  3368. }
  3369. }
  3370. }
  3371. }
  3372. // 添加自定义进度条样式
  3373. :deep(.custom-progress) {
  3374. .el-progress-bar__outer {
  3375. border-radius: 3px;
  3376. overflow: hidden;
  3377. }
  3378. .el-progress__text {
  3379. font-size: 12px !important;
  3380. color: #808080 !important;
  3381. margin-left: 5px !important;
  3382. }
  3383. .el-progress-bar__inner {
  3384. border-radius: 3px;
  3385. position: relative;
  3386. &::after {
  3387. content: '';
  3388. position: absolute;
  3389. right: 0;
  3390. top: 0;
  3391. height: 100%;
  3392. width: 6px;
  3393. background: inherit;
  3394. filter: brightness(115%);
  3395. border-radius: 0 3px 3px 0;
  3396. }
  3397. }
  3398. }
  3399. // 修改分析文本的样式
  3400. /* .text-[14px] {
  3401. white-space: pre-wrap; // 保留换行和空格
  3402. word-wrap: break-word; // 允许长单词换行
  3403. word-break: break-all; // 在任意字符间换行
  3404. line-height: 1.6; // 增加行高
  3405. padding: 8px 0; // 增加上下内边距
  3406. } */
  3407. .analysis-content {
  3408. .analysis-text {
  3409. white-space: pre-line; // 只保留换行符
  3410. line-height: 1.6;
  3411. margin: 0;
  3412. padding: 0;
  3413. }
  3414. }
  3415. .assessment-points {
  3416. display: flex;
  3417. flex-wrap: wrap;
  3418. gap: 8px;
  3419. align-items: center;
  3420. .assessment-item {
  3421. display: flex;
  3422. align-items: center;
  3423. gap: 4px;
  3424. .point-name {
  3425. color: #333;
  3426. font-weight: 500;
  3427. }
  3428. .point-score {
  3429. font-size: 12px;
  3430. padding: 2px 6px;
  3431. border-radius: 4px;
  3432. &.score-excellent {
  3433. background-color: #e6f7ff;
  3434. color: #1890ff;
  3435. }
  3436. &.score-good {
  3437. background-color: #f6ffed;
  3438. color: #52c41a;
  3439. }
  3440. &.score-average {
  3441. background-color: #fff7e6;
  3442. color: #fa8c16;
  3443. }
  3444. &.score-poor {
  3445. background-color: #fff1f0;
  3446. color: #f5222d;
  3447. }
  3448. }
  3449. }
  3450. .separator {
  3451. color: #666666;
  3452. margin: 0 4px;
  3453. }
  3454. }
  3455. .bar-chart-container {
  3456. flex: 1;
  3457. margin-right: 45px;
  3458. }
  3459. .ability-scores {
  3460. .ability-item {
  3461. display: flex;
  3462. align-items: center;
  3463. margin-bottom: 20px;
  3464. position: relative;
  3465. min-height: 30px;
  3466. .ability-name {
  3467. min-width: 120px;
  3468. margin-right: 20px;
  3469. font-size: 14px;
  3470. color: #333;
  3471. white-space: nowrap;
  3472. display: flex;
  3473. align-items: center;
  3474. height: 30px; // 固定高度以确保垂直居中
  3475. }
  3476. .bar-chart-container {
  3477. flex: 1;
  3478. margin-right: 45px;
  3479. display: flex;
  3480. align-items: center;
  3481. height: 30px; // 固定高度以确保垂直居中
  3482. :deep(.echarts) {
  3483. height: 100% !important;
  3484. }
  3485. }
  3486. }
  3487. }
  3488. // 修改导出PDF时的样式处理
  3489. .detailed-evaluation {
  3490. .ability-scores {
  3491. .ability-item {
  3492. @media print {
  3493. display: flex !important;
  3494. align-items: center !important;
  3495. min-height: 30px !important;
  3496. .ability-name {
  3497. display: flex !important;
  3498. align-items: center !important;
  3499. height: 30px !important;
  3500. }
  3501. .bar-chart-container {
  3502. display: flex !important;
  3503. align-items: center !important;
  3504. height: 30px !important;
  3505. }
  3506. }
  3507. }
  3508. }
  3509. }
  3510. // 确保在导出时保持样式
  3511. :deep(.custom-progress) {
  3512. @media print {
  3513. .el-progress-bar__outer {
  3514. height: 8px !important;
  3515. }
  3516. .el-progress__text {
  3517. position: absolute !important;
  3518. right: -45px !important;
  3519. top: 50% !important;
  3520. transform: translateY(-50%) !important;
  3521. line-height: 1 !important;
  3522. }
  3523. }
  3524. }
  3525. </style>