choiceQuestionDetailDialog.vue 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060
  1. <template>
  2. <div class="choiceQuestionDetailDialog">
  3. <div class="content" :style="{
  4. width: slideWidth + 'px',
  5. height: slideHeight + 'px',
  6. }">
  7. <span v-show="false" class="closeIcon" @click="closeSlideIndex()">
  8. <img src="../../../assets/img/close.png" />
  9. </span>
  10. <!-- 选择题 -->
  11. <div class="c_t45" v-if="workDetail && workDetail.type === '45' && props.showData">
  12. <div class="c_t45_title">
  13. <div v-if="props.showData.choiceQuestionListData[props.showData.workIndex]">{{
  14. props.showData.choiceQuestionListData[props.showData.workIndex]
  15. .teststitle
  16. }}</div>
  17. <div class="c_t45_msg">
  18. <div>{{ lang.ssAnswerCount }} {{ props.showData.workArray.length }}<span
  19. v-if="props.showData.unsubmittedStudents.length > 0">/{{ props.showData.unsubmittedStudents.length
  20. }}</span></div>
  21. <span v-if="props.showData.unsubmittedStudents.length > 0" @click="viewUnsubmittedStudents()">{{
  22. lang.ssViewUnsubmittedStudents }}</span>
  23. </div>
  24. <!--<span class="c_t45_t_btn" :class="{'c_t45_t_btn_noActive': props.showData.workIndex <= 0}" @click="changeWorkIndex(0)">{{ lang.ssPrevQ }}</span>-->
  25. <!--<span class="c_t45_t_btn" :class="{'c_t45_t_btn_noActive': props.showData.workIndex >= props.showData.choiceQuestionListData.length - 1}" @click="changeWorkIndex(1)">{{ lang.ssNextQ }}</span>-->
  26. </div>
  27. <img class="c_t45_img" :src="props.showData.choiceQuestionListData[props.showData.workIndex]
  28. .timuList[0].src
  29. " v-if="props.showData.choiceQuestionListData[props.showData.workIndex] &&
  30. props.showData.choiceQuestionListData[props.showData.workIndex]
  31. .timuList.length > 0
  32. " @click="previewImageToolRef.previewImage(props.showData.choiceQuestionListData[props.showData.workIndex]
  33. .timuList[0].src)" />
  34. <!-- <span class="c_t45_type" v-if="
  35. props.showData.choiceQuestionListData[props.showData.workIndex]
  36. .type === '1'
  37. ">{{ lang.ssSingleSel }}</span>
  38. <span class="c_t45_type" v-if="
  39. props.showData.choiceQuestionListData[props.showData.workIndex]
  40. .type === '2'
  41. ">{{ lang.ssMultiOpt }}</span> -->
  42. <!-- <span class="c_t45_type">{{ lang.ssChoiceQuestion }}</span> -->
  43. <div class="c_t45_echarts" :style="{
  44. width: slideWidth - 40 + 'px',
  45. }">
  46. <div id="echartsArea1" ref="echartsArea1"></div>
  47. </div>
  48. <div class="aiAnalysis" v-if="props.workArray.length > 0">
  49. <div class="ai_header">
  50. <div class="ai_title">
  51. <svg viewBox="0 0 1024 1024" width="200" height="200">
  52. <path
  53. d="M512 170.666667C323.477333 170.666667 170.666667 323.477333 170.666667 512s152.810667 341.333333 341.333333 341.333333 341.333333-152.810667 341.333333-341.333333S700.522667 170.666667 512 170.666667zM85.333333 512C85.333333 276.352 276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512z">
  54. </path>
  55. <path
  56. d="M693.013333 330.986667a42.666667 42.666667 0 0 1 10.304 43.648l-75.413333 226.282666a42.666667 42.666667 0 0 1-26.986667 26.986667l-226.282666 75.413333a42.666667 42.666667 0 0 1-53.973334-53.973333l75.434667-226.261333a42.666667 42.666667 0 0 1 26.986667-26.986667l226.282666-75.413333a42.666667 42.666667 0 0 1 43.648 10.304z m-222.72 139.306666l-41.685333 125.098667 125.077333-41.706667 41.706667-125.077333-125.077333 41.706667z">
  57. </path>
  58. </svg>{{ lang.ssAnalysis }}
  59. </div>
  60. <div class="ai_refresh" :class="{ 'disabled': currentAnalysis && currentAnalysis.loading }"
  61. @click="aiAnalysisRefresh45()">
  62. {{ lang.ssAIGenerate }}
  63. <svg viewBox="0 0 1024 1024" width="200" height="200">
  64. <path
  65. d="M875 483c-33.4 0-60.5 27.1-60.5 60.5v0.1C814.4 710.3 678.8 846 512 846S209.5 710.3 209.5 543.5 345.2 241 512 241c36.8 0 71.7 7.6 104.4 19.7-32 3-57.4 29.1-57.4 61.9 0 34.8 28.2 63 63 63h201.9c34.8 0 63-28.2 63-63V120c0-34.8-28.2-63-63-63s-63 28.2-63 63v81.4C691 150.5 605.2 120 512 120 278.1 120 88.5 309.6 88.5 543.5S278.1 967 512 967s423.5-189.6 423.5-423.5c0-33.4-27.1-60.5-60.5-60.5z">
  66. </path>
  67. </svg>
  68. </div>
  69. </div>
  70. <div class="ai_content" v-if="currentAnalysis && currentAnalysis.json">
  71. {{ currentAnalysis.json.text }}
  72. </div>
  73. <div class="ai_echartsData" v-if="currentAnalysis && currentAnalysis.json.keyword">
  74. {{ currentAnalysis.json.keyword }}
  75. </div>
  76. <div class="generatingContent" v-if="currentAnalysis && currentAnalysis.loading">{{lang.ssGeneratingContent}}...</div>
  77. <div class="ai_updateTime" v-if="currentAnalysis">{{ lang.ssUpdateTime }}:{{ currentAnalysis.update_at }}
  78. </div>
  79. </div>
  80. <div class="cq_changeBtn" v-if="props.showData.choiceQuestionListData.length > 1">
  81. <div :class="{ cq_cb_disabled: props.showData.workIndex <= 0 }" @click="changeWorkIndex(0)">
  82. <svg style="transform: rotate(-90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  83. <path
  84. d="M512 330.666667c14.933333 0 29.866667 4.266667 40.533333 14.933333l277.33333399 234.666667c27.733333 23.466667 29.866667 64 8.53333301 89.6-23.466667 27.733333-64 29.866667-89.6 8.53333299L512 477.866667l-236.8 200.53333299c-27.733333 23.466667-68.266667 19.19999999-89.6-8.53333299-23.466667-27.733333-19.19999999-68.266667 8.53333301-89.6l277.33333399-234.666667c10.666667-10.666667 25.6-14.933333 40.533333-14.933333z"
  85. fill=""></path>
  86. </svg>
  87. </div>
  88. <span>{{ props.showData.workIndex + 1 }}/{{ props.showData.choiceQuestionListData.length }}</span>
  89. <div :class="{ cq_cb_disabled: props.showData.workIndex >= props.showData.choiceQuestionListData.length - 1 }"
  90. @click="changeWorkIndex(1)">
  91. <svg style="transform: rotate(90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  92. <path
  93. d="M512 330.666667c14.933333 0 29.866667 4.266667 40.533333 14.933333l277.33333399 234.666667c27.733333 23.466667 29.866667 64 8.53333301 89.6-23.466667 27.733333-64 29.866667-89.6 8.53333299L512 477.866667l-236.8 200.53333299c-27.733333 23.466667-68.266667 19.19999999-89.6-8.53333299-23.466667-27.733333-19.19999999-68.266667 8.53333301-89.6l277.33333399-234.666667c10.666667-10.666667 25.6-14.933333 40.533333-14.933333z"
  94. fill=""></path>
  95. </svg>
  96. </div>
  97. </div>
  98. </div>
  99. <!-- 问答题 -->
  100. <div class="c_t15" v-if="workDetail && workDetail.type === '15' && props.showData">
  101. <div class="c_t15_title">{{ workDetail.json.answerQ }}</div>
  102. <span class="c_t15_type">{{ lang.ssQATest }}</span>
  103. <div class="c_t15_content" v-show="!lookWorkData">
  104. <div class="c_t15_c_item" v-for="item in processedWorkArray" :key="item.id" @click="lookWork(item.id)">
  105. <div class="c_t15_c_i_top">
  106. <span>S</span>
  107. <div>{{ item.name }}</div>
  108. </div>
  109. <div class="c_t15_c_i_bottom">
  110. <span v-html="item.content.answer"></span>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="aiAnalysis" style="margin-top:1rem ;"
  115. v-if="processedWorkArray.length > 0 && lookWorkData === null && workDetail.type === '15'">
  116. <div class="ai_header">
  117. <div class="ai_title">
  118. <svg viewBox="0 0 1024 1024" width="200" height="200">
  119. <path
  120. d="M512 170.666667C323.477333 170.666667 170.666667 323.477333 170.666667 512s152.810667 341.333333 341.333333 341.333333 341.333333-152.810667 341.333333-341.333333S700.522667 170.666667 512 170.666667zM85.333333 512C85.333333 276.352 276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512z">
  121. </path>
  122. <path
  123. d="M693.013333 330.986667a42.666667 42.666667 0 0 1 10.304 43.648l-75.413333 226.282666a42.666667 42.666667 0 0 1-26.986667 26.986667l-226.282666 75.413333a42.666667 42.666667 0 0 1-53.973334-53.973333l75.434667-226.261333a42.666667 42.666667 0 0 1 26.986667-26.986667l226.282666-75.413333a42.666667 42.666667 0 0 1 43.648 10.304z m-222.72 139.306666l-41.685333 125.098667 125.077333-41.706667 41.706667-125.077333-125.077333 41.706667z">
  124. </path>
  125. </svg>{{ lang.ssAnalysis }}
  126. </div>
  127. <div class="ai_refresh" :class="{ 'disabled': currentAnalysis && currentAnalysis.loading }"
  128. @click="aiAnalysisRefresh15()">
  129. {{ lang.ssAIGenerate }}
  130. <svg viewBox="0 0 1024 1024" width="200" height="200">
  131. <path
  132. d="M875 483c-33.4 0-60.5 27.1-60.5 60.5v0.1C814.4 710.3 678.8 846 512 846S209.5 710.3 209.5 543.5 345.2 241 512 241c36.8 0 71.7 7.6 104.4 19.7-32 3-57.4 29.1-57.4 61.9 0 34.8 28.2 63 63 63h201.9c34.8 0 63-28.2 63-63V120c0-34.8-28.2-63-63-63s-63 28.2-63 63v81.4C691 150.5 605.2 120 512 120 278.1 120 88.5 309.6 88.5 543.5S278.1 967 512 967s423.5-189.6 423.5-423.5c0-33.4-27.1-60.5-60.5-60.5z">
  133. </path>
  134. </svg>
  135. </div>
  136. </div>
  137. <div class="ai_content" v-if="currentAnalysis && currentAnalysis.json">
  138. {{ currentAnalysis.json.text }}
  139. </div>
  140. <div class="ai_echartsData" v-if="currentAnalysis && currentAnalysis.json.keyword">
  141. <div class="title">{{ lang.ssKeyword }}:</div>
  142. <span v-for="(item,index) in currentAnalysis.json.keyword" :key="index">{{ item }}</span>
  143. <div class="btn" @click="openEchatsDialog()">{{ lang.ssViewKeywordCloud }}</div>
  144. </div>
  145. <div class="generatingContent" v-if="currentAnalysis && currentAnalysis.generatingContent">{{ lang.ssGeneratingContent }}...</div>
  146. <div class="ai_updateTime" v-if="currentAnalysis">{{ lang.ssUpdateTime }}:{{ currentAnalysis.update_at }}
  147. </div>
  148. </div>
  149. <div class="c_t15_workDetail" v-if="lookWorkData">
  150. <div class="c_t15_wd_top">
  151. <img src="../../../assets/img/arrow_left.png" @click="lookWork('')" />
  152. <span>S</span>
  153. <div>{{ lookWorkData.name }}</div>
  154. </div>
  155. <div class="c_t15_wd_content">
  156. <span v-html="lookWorkData.content.answer"></span>
  157. <div class="c_t15_wd_c_imageList" v-if="lookWorkData.content.fileList.length > 0">
  158. <img v-for="item in lookWorkData.content.fileList" :src="item.url" :key="item.uploadTime"
  159. @click="lookImage(item.url)" />
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. <!-- AI应用 -->
  165. <div class="c_t72" v-if="props.showData && props.showData.toolType === 72">
  166. <div class="c_t72_title">{{ lang.ssAiApp }}</div>
  167. <span class="c_t72_type">{{ lang.ssAiApp }}</span>
  168. <div class="c_t72_content" v-show="!lookWorkData">
  169. <div class="c_t72_c_item" v-for="item in processedWorkArray" :key="item.id" @click="lookWork(item.id)">
  170. <div class="c_t72_c_i_top">
  171. <span>S</span>
  172. <div>{{ item.name }}</div>
  173. </div>
  174. </div>
  175. </div>
  176. <div class="aiAnalysis" style="margin-top:1rem ;"
  177. v-if="processedWorkArray.length > 0 && lookWorkData === null && props.showData.toolType === 72">
  178. <div class="ai_header">
  179. <div class="ai_title">
  180. <svg viewBox="0 0 1024 1024" width="200" height="200">
  181. <path
  182. d="M512 170.666667C323.477333 170.666667 170.666667 323.477333 170.666667 512s152.810667 341.333333 341.333333 341.333333 341.333333-152.810667 341.333333-341.333333S700.522667 170.666667 512 170.666667zM85.333333 512C85.333333 276.352 276.352 85.333333 512 85.333333s426.666667 191.018667 426.666667 426.666667-191.018667 426.666667-426.666667 426.666667S85.333333 747.648 85.333333 512z">
  183. </path>
  184. <path
  185. d="M693.013333 330.986667a42.666667 42.666667 0 0 1 10.304 43.648l-75.413333 226.282666a42.666667 42.666667 0 0 1-26.986667 26.986667l-226.282666 75.413333a42.666667 42.666667 0 0 1-53.973334-53.973333l75.434667-226.261333a42.666667 42.666667 0 0 1 26.986667-26.986667l226.282666-75.413333a42.666667 42.666667 0 0 1 43.648 10.304z m-222.72 139.306666l-41.685333 125.098667 125.077333-41.706667 41.706667-125.077333-125.077333 41.706667z">
  186. </path>
  187. </svg>{{ lang.ssAnalysis }}
  188. </div>
  189. <div class="ai_refresh" :class="{ 'disabled': currentAnalysis && currentAnalysis.loading }"
  190. @click="aiAnalysisRefresh72()">
  191. {{ lang.ssAIGenerate }}
  192. <svg viewBox="0 0 1024 1024" width="200" height="200">
  193. <path
  194. d="M875 483c-33.4 0-60.5 27.1-60.5 60.5v0.1C814.4 710.3 678.8 846 512 846S209.5 710.3 209.5 543.5 345.2 241 512 241c36.8 0 71.7 7.6 104.4 19.7-32 3-57.4 29.1-57.4 61.9 0 34.8 28.2 63 63 63h201.9c34.8 0 63-28.2 63-63V120c0-34.8-28.2-63-63-63s-63 28.2-63 63v81.4C691 150.5 605.2 120 512 120 278.1 120 88.5 309.6 88.5 543.5S278.1 967 512 967s423.5-189.6 423.5-423.5c0-33.4-27.1-60.5-60.5-60.5z">
  195. </path>
  196. </svg>
  197. </div>
  198. </div>
  199. <div class="ai_content" v-if="currentAnalysis && currentAnalysis.json">
  200. {{ currentAnalysis.json.text }}
  201. </div>
  202. <div class="ai_updateTime" v-if="currentAnalysis">{{ lang.ssUpdateTime }}:{{ currentAnalysis.update_at }}
  203. </div>
  204. </div>
  205. <div class="c_t72_workDetail" v-if="lookWorkData">
  206. <div class="c_t72_wd_top">
  207. <img src="../../../assets/img/arrow_left.png" @click="lookWork('')" />
  208. <span>S</span>
  209. <div>{{ lookWorkData.name }}</div>
  210. </div>
  211. <div class="c_t72_wd_content">
  212. <template v-for="(item, index) in lookWorkData.content" :key="item.id">
  213. <div class="messageNodeArea" v-if="item.messages || item.imageUrls">
  214. <div class="messageNode">
  215. <div class="mn_title">{{ lang.ssNodeTitle.replace(/\*/g, String(index + 1)) }}</div>
  216. <div class="mn_content">
  217. <template v-for="(item2, index2) in item.messages" :key="`${index}-${index2}`">
  218. <div>
  219. <div class="na_m_item" v-if="item2.role == 'user' && item2.content">
  220. <div class="na_m_i_name">
  221. {{ item2.sender }}
  222. </div>
  223. <div class="na_m_i_content" v-html="item2.content"></div>
  224. </div>
  225. <div class="na_m_item" v-if="item2.role == 'assistant' && item2.content">
  226. <div class="na_m_i_name aiName">
  227. {{ item2.sender }}
  228. </div>
  229. <div class="na_m_i_content" v-html="item2.content"></div>
  230. </div>
  231. </div>
  232. </template>
  233. <template v-if="item.imageUrls" v-for="(item3, index3) in item.imageUrls"
  234. :key="`${index}-${index3}`">
  235. <div class="na_m_item">
  236. <div class="na_m_i_name">
  237. {{ item.type }}
  238. </div>
  239. <div class="na_m_i_content">
  240. <img style="height: 100px;width: auto;" :src="item3" />
  241. </div>
  242. </div>
  243. </template>
  244. </div>
  245. </div>
  246. </div>
  247. </template>
  248. </div>
  249. </div>
  250. </div>
  251. <!-- H5页面 -->
  252. <div class="c_t73" v-if="props.showData && props.showData.toolType === 73">
  253. <div class="c_t73_title">{{ lang.ssPageImage }}</div>
  254. <span class="c_t73_type">{{ lang.ssHPage }}</span>
  255. <div class="c_t73_content" v-show="!lookWorkData">
  256. <div class="c_t73_c_item" v-for="item in processedWorkArray" :key="item.id" @click="lookWork(item.id)">
  257. <div class="c_t73_c_i_top">
  258. <span>S</span>
  259. <div>{{ item.name }}</div>
  260. </div>
  261. <div class="c_t73_c_i_bottom">
  262. <img :src="item.content" />
  263. </div>
  264. </div>
  265. </div>
  266. <div class="c_t73_workDetail" v-if="lookWorkData">
  267. <div class="c_t73_wd_top">
  268. <img src="../../../assets/img/arrow_left.png" @click="lookWork('')" />
  269. <span>S</span>
  270. <div>{{ lookWorkData.name }}</div>
  271. </div>
  272. <div class="c_t73_wd_content">
  273. <img :src="lookWorkData.content" />
  274. </div>
  275. </div>
  276. </div>
  277. </div>
  278. <previewImageTool ref="previewImageToolRef" />
  279. <selectUserDialog ref="selectUserDialogRef" />
  280. <echartsDialog ref="echartsDialogRef" />
  281. </div>
  282. </template>
  283. <script setup lang="ts">
  284. import { computed, ref, watch, onUnmounted, nextTick, onMounted } from 'vue'
  285. import * as echarts from 'echarts'
  286. import previewImageTool from '../../components/tool/previewImageTool.vue'
  287. import MarkdownIt from 'markdown-it'
  288. import useImport from '@/hooks/useImport'
  289. import { lang } from '@/main'
  290. import selectUserDialog from './selectUserDialog.vue'
  291. import echartsDialog from './echartsDialog.vue'
  292. import { chat_stream, chat_no_stream } from '@/tools/aiChat'
  293. import axios from '@/services/config'
  294. const props = defineProps<{
  295. visible: number[];
  296. workIndex: number;
  297. slideWidth: number;
  298. slideHeight: number;
  299. slideIndex: number;
  300. showData: any;
  301. workArray: any[];
  302. courseDetail: any;
  303. userId: string;
  304. workId: string;
  305. cid: string;
  306. }>()
  307. const emit = defineEmits<{
  308. (e: 'update:visible', v: number[]): void;
  309. (e: 'changeWorkIndex', v: number): void;
  310. }>()
  311. const visible = computed({
  312. get: () => props.visible,
  313. set: (v: number[]) => emit('update:visible', v),
  314. })
  315. const workDetail = computed(() => {
  316. if (props.showData) {
  317. return props.showData.workDetail
  318. }
  319. return null
  320. })
  321. // 预览图片组件
  322. const previewImageToolRef = ref<any>(null)
  323. // 选择用户组件
  324. const selectUserDialogRef = ref<any>(null)
  325. // 词云图组件
  326. const echartsDialogRef = ref<any>(null)
  327. // ai分析数据
  328. const aiAnalysisData = ref<Array<any>>([])
  329. const md = new MarkdownIt()
  330. const { getFile } = useImport()
  331. // 判断是否是 URL 链接
  332. const isUrl = (str: string): boolean => {
  333. try {
  334. const url = new URL(str)
  335. return (url.protocol === 'http:' || url.protocol === 'https:') && str.includes('json')
  336. }
  337. catch {
  338. return false
  339. }
  340. }
  341. // 从链接获取文件内容
  342. const loadContentFromUrl = async (url: string): Promise<string> => {
  343. try {
  344. const fileData = await getFile(url)
  345. if (fileData && fileData.data) {
  346. // 将 ArrayBuffer 转为字符串
  347. const uint8Array = new Uint8Array(fileData.data)
  348. const jsonStr = new TextDecoder('utf-8').decode(uint8Array)
  349. return jsonStr
  350. }
  351. return ''
  352. }
  353. catch (error) {
  354. console.error('获取文件内容失败:', error)
  355. return ''
  356. }
  357. }
  358. // 处理单个作业内容
  359. const processWorkContent = async (content: string, toolType: number): Promise<any> => {
  360. let contentToParse = content
  361. // 如果是链接,先获取文件内容
  362. if (isUrl(content)) {
  363. contentToParse = await loadContentFromUrl(content)
  364. }
  365. if (!contentToParse) {
  366. return null
  367. }
  368. try {
  369. if ([45, 15].includes(toolType)) {
  370. return JSON.parse(decodeURIComponent(contentToParse))
  371. }
  372. else if (toolType === 72) {
  373. const parsed = JSON.parse(contentToParse)
  374. if (Array.isArray(parsed)) {
  375. parsed.forEach((item: any) => {
  376. if (item.messages && item.messages.length) {
  377. item.messages.forEach((item2: any) => {
  378. // 如果已经包含html标签则不再渲染
  379. if (
  380. !/^(\s*<[^>]+>.*<\/[^>]+>\s*|<[^>]+\/>\s*)$/s.test(
  381. item2.content.trim()
  382. )
  383. ) {
  384. item2.content = item2.content.replace(/&lt;/g, '<').replace(/&quot;/g, '"').replace(/&gt;/g, '>')
  385. item2.content = md.render(item2.content)
  386. }
  387. })
  388. }
  389. })
  390. }
  391. return parsed
  392. }
  393. return contentToParse
  394. }
  395. catch (error) {
  396. console.error('解析内容失败:', error)
  397. return null
  398. }
  399. }
  400. const processedWorkArray = ref<any[]>([])
  401. // 监听 workArray 和 showData 变化
  402. watch(
  403. () => [props.workArray, props.showData?.toolType],
  404. async () => {
  405. if (props.workArray && props.showData) {
  406. const _workArray = JSON.parse(JSON.stringify(props.workArray))
  407. // 处理每个作业内容
  408. for (const i of _workArray) {
  409. if (i.content) {
  410. const processedContent = await processWorkContent(i.content, props.showData.toolType)
  411. if (processedContent !== null) {
  412. i.content = processedContent
  413. }
  414. }
  415. }
  416. processedWorkArray.value = _workArray
  417. }
  418. else {
  419. processedWorkArray.value = []
  420. }
  421. },
  422. { immediate: true, deep: true }
  423. )
  424. // 关闭对应的作业详细页面
  425. const closeSlideIndex = () => {
  426. visible.value = visible.value.filter((v) => v !== props.slideIndex)
  427. }
  428. // 切换题目
  429. const changeWorkIndex = (type: number) => {
  430. emit('changeWorkIndex', type)
  431. // console.log(props.workIndex, props.showData.choiceQuestionListData.length)
  432. // if (type === 0 && props.workIndex > 0) {
  433. // emit('changeWorkIndex', 0)
  434. // }
  435. // else if (type === 1 && props.workIndex < props.showData.choiceQuestionListData.length) {
  436. // emit('changeWorkIndex', props.workIndex + 1)
  437. // }
  438. }
  439. // 选择题图表div
  440. const echartsArea1 = ref<any>(null)
  441. // 查看的作业详细id
  442. const lookWorkDetail = ref<string>('')
  443. // 查看作业详细的数据
  444. const lookWorkData = computed(() => {
  445. let _result = null
  446. if (lookWorkDetail.value && processedWorkArray.value.length > 0) {
  447. const _workFind = processedWorkArray.value.find(
  448. (i: any) => i.id === lookWorkDetail.value
  449. )
  450. if (_workFind) {
  451. _result = _workFind
  452. }
  453. }
  454. return _result
  455. })
  456. // 查看图片
  457. const lookImage = (url: string) => {
  458. if (previewImageToolRef.value) {
  459. previewImageToolRef.value.previewImage(url)
  460. }
  461. }
  462. // 查看作业
  463. const lookWork = (id: string) => {
  464. lookWorkDetail.value = id
  465. }
  466. // 选择题图表实例
  467. const myChart = ref<any>(null)
  468. // resize防抖定时器
  469. let resizeTimer: ReturnType<typeof setTimeout> | null = null
  470. // 处理ECharts resize
  471. const handleChartResize = () => {
  472. // 清除之前的定时器
  473. if (resizeTimer) {
  474. clearTimeout(resizeTimer)
  475. }
  476. resizeTimer = setTimeout(() => {
  477. nextTick(() => {
  478. if (
  479. myChart.value &&
  480. typeof myChart.value.resize === 'function' &&
  481. !myChart.value.isDisposed()
  482. ) {
  483. try {
  484. myChart.value.resize()
  485. }
  486. catch (e) {
  487. // console.error('myChart resize error:', e)
  488. // 如果resize失败,重新初始化图表
  489. if (
  490. props.showData &&
  491. props.showData.workDetail &&
  492. props.showData.workDetail.type === '45'
  493. ) {
  494. setEchartsArea1()
  495. }
  496. }
  497. }
  498. })
  499. }, 200) // 防抖延迟200ms
  500. }
  501. // 设置选择题图表
  502. const setEchartsArea1 = () => {
  503. // 如果已有实例且未销毁,先销毁
  504. if (myChart.value && !myChart.value.isDisposed()) {
  505. myChart.value.dispose()
  506. }
  507. if (echartsArea1.value) {
  508. myChart.value = echarts.init(echartsArea1.value)
  509. }
  510. else {
  511. myChart.value = null
  512. }
  513. if (myChart.value) {
  514. const _work =
  515. props.showData.choiceQuestionListData[props.showData.workIndex]
  516. console.log('_work', _work)
  517. // 修正版,处理xAxis.data内为图片对象的case,formatter始终只拿到src或自定义label,保证无[object Object]问题
  518. const option = {
  519. tooltip: {
  520. show: false, // 禁用鼠标移动到柱体时的内容显示
  521. },
  522. yAxis: {
  523. show: false, // 不显示最左边的y轴
  524. },
  525. xAxis: {
  526. data: [],
  527. axisLabel: {
  528. color: 'rgba(0, 0, 0, 0.9)',
  529. fontWeight: 600,
  530. fontSize: 17,
  531. lineHeight: 20,
  532. interval: 0,
  533. formatter: function (value: any, idx: number) {
  534. // 如果是字符串且格式为JSON(图片),则解析处理
  535. if (typeof value === 'string') {
  536. try {
  537. const obj = JSON.parse(value)
  538. if (obj && typeof obj === 'object' && obj.imgType && obj.src) {
  539. return '{img' + idx + '|}'
  540. }
  541. }
  542. catch (e) {
  543. // 非JSON字符串,直接返回
  544. // 如果文本文字超过8个字,换行
  545. if (typeof value === 'string') {
  546. // 判断value是否全是英文
  547. const isAllEnglish = /^[a-zA-Z0-9\s\p{P}]+$/u.test(value)
  548. let displayValue = value
  549. const maxLength = isAllEnglish ? 30 : 20
  550. const lineLength = isAllEnglish ? 16 : 8
  551. if (value.length > maxLength) {
  552. displayValue = value.substr(0, maxLength) + '...'
  553. }
  554. // 换行处理
  555. let output = ''
  556. for (let i = 0; i < displayValue.length; i += lineLength) {
  557. output += displayValue.substr(i, lineLength)
  558. if (i + lineLength < displayValue.length) {
  559. output += '\n'
  560. }
  561. }
  562. return output
  563. }
  564. return value
  565. }
  566. return value
  567. }
  568. // 兼容老格式(容错):value本身是对象,并有图片信息
  569. if (
  570. value &&
  571. typeof value === 'object' &&
  572. value.imgType &&
  573. value.src
  574. ) {
  575. return '{img' + idx + '|}'
  576. }
  577. // 其他类型直接空
  578. return ''
  579. },
  580. rich: (() => {
  581. // 动态生成所有图片的 rich 格式
  582. const richObj: any = {}
  583. _work.choiceUser.forEach((op: any, idx: number) => {
  584. if (
  585. op.option &&
  586. typeof op.option === 'object' &&
  587. op.option.imgType &&
  588. op.option.src
  589. ) {
  590. richObj['img' + idx] = {
  591. height: 40,
  592. width: 40,
  593. align: 'center',
  594. backgroundColor: {
  595. image: op.option.src,
  596. },
  597. }
  598. }
  599. })
  600. return richObj
  601. })(),
  602. },
  603. },
  604. series: [
  605. {
  606. name: '',
  607. type: 'bar',
  608. data: [],
  609. barMaxWidth: 80, // 柱体最宽80px,数量多则自适应
  610. itemStyle: {
  611. color: 'rgba(252, 207, 0, 1)',
  612. },
  613. label: {
  614. show: true,
  615. position: 'top',
  616. color: 'rgba(116, 139, 115, 1)',
  617. fontSize: 22,
  618. fontWeight: 500,
  619. lineHeight: 24,
  620. },
  621. },
  622. ],
  623. }
  624. _work.choiceUser.forEach((i: any, idx: number) => {
  625. // 如果是图片,存src对象,否则为字符串
  626. if (
  627. i.option &&
  628. typeof i.option === 'object' &&
  629. i.option.imgType &&
  630. i.option.src
  631. ) {
  632. (option.xAxis.data as any[]).push(
  633. JSON.stringify({ imgType: i.option.imgType, src: i.option.src })
  634. ) // 仅保留相关字段
  635. }
  636. else if (typeof i.option === 'string') {
  637. (option.xAxis.data as any[]).push(i.option)
  638. }
  639. else {
  640. (option.xAxis.data as any[]).push('')
  641. }
  642. (option.series[0].data as any[]).push(i.user.length)
  643. })
  644. // console.log(option)
  645. // {
  646. // title: {
  647. // text: 'ECharts 入门示例'
  648. // },
  649. // tooltip: {},
  650. // xAxis: {
  651. // data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
  652. // },
  653. // yAxis: {},
  654. // series: [
  655. // {
  656. // name: '销量',
  657. // type: 'bar',
  658. // data: [5, 20, 36, 10, 10, 20]
  659. // }
  660. // ]
  661. // }
  662. myChart.value.setOption(option)
  663. myChart.value.off('click')
  664. myChart.value.on('click', (params: any) => {
  665. const idx = params.dataIndex
  666. const selectedOption = _work.choiceUser[idx]
  667. if (selectedOption && selectUserDialogRef.value) {
  668. // console.log(selectedOption)
  669. console.log('selectedOption', selectedOption)
  670. selectUserDialogRef.value.open(`${lang.ssSelectUser.replace('{a}', '<span>' + selectedOption.index + '</span>')}`, selectedOption)
  671. }
  672. })
  673. }
  674. }
  675. // 获取分析
  676. const getAnalysis = () => {
  677. if (!props.workId) {
  678. return
  679. }
  680. console.log('props.workId', props.workId)
  681. const params = {
  682. pid: props.workId+(props.cid?','+props.cid:''),
  683. }
  684. axios.get('https://pbl.cocorobo.cn/api/pbl/select_pptAnalysisByPid?pid=' + params.pid).then(res => {
  685. const data = res[0]
  686. if (data.length) {
  687. data.forEach((item: any) => {
  688. try {
  689. item.json = JSON.parse(item.json)
  690. }
  691. catch (error) {
  692. item.json = { text: item.json, echartsData: '' }
  693. }
  694. })
  695. aiAnalysisData.value = data
  696. }
  697. else {
  698. aiAnalysisData.value = []
  699. }
  700. }).catch(err => {
  701. console.log('get_pptAnalysis_err', err)
  702. })
  703. }
  704. // 监听选择题数据变化
  705. watch(
  706. () => props.showData,
  707. (newVal, oldVal) => {
  708. console.log('发生变化,showData')
  709. if (
  710. newVal &&
  711. newVal.choiceQuestionListData[newVal.workIndex] &&
  712. props.showData.workDetail.type === '45'
  713. ) {
  714. if (
  715. oldVal &&
  716. newVal.choiceQuestionListData[newVal.workIndex] &&
  717. oldVal.choiceQuestionListData[oldVal.workIndex]
  718. ) {
  719. if (
  720. JSON.stringify(newVal.choiceQuestionListData[newVal.workIndex]) !==
  721. JSON.stringify(oldVal.choiceQuestionListData[oldVal.workIndex])
  722. ) {
  723. setEchartsArea1()
  724. }
  725. }
  726. }
  727. else {
  728. myChart.value = null
  729. }
  730. // console.log('newVal', newVal)
  731. // if(newVal && newVal.workDetail && newVal.workDetail.id){
  732. // getAnalysis()
  733. // }
  734. // getAnalysis()
  735. },
  736. { immediate: true, deep: true }
  737. )
  738. // 监听作业变化
  739. watch(
  740. () => props.showData?.choiceQuestionListData,
  741. (newVal, oldVal) => {
  742. console.log('choiceQuestionListData变化了')
  743. if (
  744. (newVal || newVal === 0) &&
  745. props.showData.workDetail &&
  746. props.showData.workDetail.type === '45'
  747. ) {
  748. if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
  749. setEchartsArea1()
  750. }
  751. else {
  752. console.log('choiceQuestionListData没有变化')
  753. }
  754. }
  755. else {
  756. myChart.value = null
  757. }
  758. },
  759. { deep: true }
  760. )
  761. // 监听作业变化
  762. watch(
  763. () => props.showData?.workIndex,
  764. (newVal) => {
  765. if (
  766. (newVal || newVal === 0) &&
  767. props.showData.workDetail &&
  768. props.showData.workDetail.type === '45'
  769. ) {
  770. setEchartsArea1()
  771. }
  772. else {
  773. myChart.value = null
  774. }
  775. }
  776. )
  777. // 监听echartsArea1变化
  778. watch(
  779. () => echartsArea1.value,
  780. (newVal) => {
  781. if (
  782. newVal &&
  783. props.showData &&
  784. props.showData.workDetail &&
  785. props.showData.workDetail.type === '45'
  786. ) {
  787. setEchartsArea1()
  788. }
  789. else {
  790. myChart.value = null
  791. }
  792. }
  793. )
  794. // 监听页面宽度变化
  795. watch(
  796. () => props.slideWidth,
  797. (newVal) => {
  798. if (
  799. newVal &&
  800. props.showData &&
  801. props.showData.workDetail &&
  802. props.showData.workDetail.type === '45'
  803. ) {
  804. handleChartResize()
  805. }
  806. }
  807. )
  808. // 查看未提交学生
  809. const viewUnsubmittedStudents = () => {
  810. selectUserDialogRef.value.open(lang.ssUnsubmittedStudents, { user: props.showData.unsubmittedStudents.map((item: any) => item.name) })
  811. // if (props.unsubmittedStudents.length > 0) {
  812. // unsubmittedStudentsDialogRef.value.open(props.unsubmittedStudents)
  813. // }
  814. }
  815. // ai生成选择题分析 选择题
  816. const aiAnalysisRefresh45 = () => {
  817. const _work = props.showData.choiceQuestionListData[props.showData.workIndex]
  818. const msg = `# CONTEXT #
  819. 你是K-12阶段的AI教育课堂分析助手,基于上传的课件、逐字稿,以及当页的学生答题数据(选择题/问答题/智能体对话)进行智能分析。
  820. # OBJECTIVE #
  821. 输出当前学生答题的分析报告:整体表现、核心发现(共性问题/误区)、教学优化(改进方向),为教师提供教学策略的建议和支持。
  822. #INPUT#
  823. 课程数据:
  824. - 课程名称:${props.courseDetail.title}
  825. - 课程学科:${props.courseDetail.name}
  826. 当前页面答题数据(选择题):【分析重点】
  827. - 选择题题目:${_work.teststitle}
  828. - 选项数据:${JSON.stringify(_work.choiceUser)}
  829. - 题目图片:${_work.timuList.lenght ? _work.timuList[0].src : ''}
  830. - 未提交学生:${JSON.stringify(props.showData.unsubmittedStudents.map((item: any) => item.name))}
  831. # ANALYSIS RULES #
  832. 1. **问题定位**:明确指出哪个知识点/概念/步骤掌握不佳
  833. 2. **建议具体**:给出可执行的教学动作(如“增加XX实例演练”“补充XX对比图”)
  834. # RESPONSE #
  835. 采用段落叙述,数据量化呈现,突出可操作建议,严格控制输出为80词内。采用三段式论述:
  836. 1. 整体表现-1句话
  837. 2. 核心发现-1-2句,指出共性问题+典型案例
  838. 3. 改进建议-1句话,提出具体教学动作
  839. # EXAMPLES #
  840. 样例:
  841. 选择题正确率62%,核心概念“机器学习三步骤”(输入数据→训练模型→预测结果)掌握尚可,但“训练与预测区分”混淆率达38%;建议强化训练vs预测对比教学。`
  842. if (!currentAnalysis.value) {
  843. aiAnalysisData.value.push({
  844. pid: props.workId,
  845. index: props.showData.workIndex,
  846. loading: true,
  847. generatingContent: true,
  848. json: { text: '', echartsData: '' },
  849. noEnd: true,
  850. update_at: '',
  851. create_at: '',
  852. })
  853. }
  854. else {
  855. aiAnalysisData.value.find((item: any) => {
  856. return item.pid === props.workId && item.index === props.showData.workIndex
  857. }).loading = true
  858. aiAnalysisData.value.find((item: any) => {
  859. return item.pid === props.workId && item.index === props.showData.workIndex
  860. }).json = { text: '', echartsData: '' }
  861. }
  862. chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
  863. if (event.type === 'message') {
  864. aiAnalysisData.value.find((item: any) => {
  865. return item.pid === props.workId && item.index === props.showData.workIndex
  866. }).json.text = event.data
  867. aiAnalysisData.value.find((item: any) => {
  868. return item.pid === props.workId && item.index === props.showData.workIndex
  869. }).loading = false
  870. }
  871. else if (event.type === 'messageEnd') {
  872. aiAnalysisData.value.find((item: any) => {
  873. return item.pid === props.workId && item.index === props.showData.workIndex
  874. }).json.text = event.data
  875. aiAnalysisData.value.find((item: any) => {
  876. return item.pid === props.workId && item.index === props.showData.workIndex
  877. }).noEnd = false
  878. aiAnalysisData.value.find((item: any) => {
  879. return item.pid === props.workId && item.index === props.showData.workIndex
  880. }).update_at = new Date().toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }).replace(/\//g, '-')
  881. saveAnalysis()
  882. }
  883. }).catch(err => {
  884. console.log('err', err)
  885. })
  886. }
  887. // 问答题
  888. const aiAnalysisRefresh15 = () => {
  889. let flag = 0
  890. const msg = `# CONTEXT #
  891. 你是K-12阶段的AI教育课堂分析助手,基于上传的课件、逐字稿,以及当页的学生答题数据(选择题/问答题/智能体对话)进行智能分析。
  892. # OBJECTIVE #
  893. 输出当前学生答题的分析报告:整体表现、核心发现(共性问题/误区)、教学优化(改进方向),为教师提供教学策略的建议和支持。
  894. #INPUT#
  895. 课程数据:
  896. - 课程名称:${props.courseDetail.title}
  897. - 课程学科:${props.courseDetail.name}
  898. 当前页面答题数据(问答题):【分析重点】
  899. - 问答题题目:${props.showData.workDetail.json.answerQ}
  900. - 回答数据:${JSON.stringify(processedWorkArray.value.map((i) => ({ user: i.name, answer: i.content.answer })))}
  901. - 未提交学生:${JSON.stringify(props.showData.unsubmittedStudents.map((item: any) => item.name))}
  902. # ANALYSIS RULES #
  903. 1. **问题定位**:明确指出哪个知识点/概念/步骤掌握不佳
  904. 2. **建议具体**:给出可执行的教学动作(如“增加XX实例演练”“补充XX对比图”)
  905. # RESPONSE #
  906. 采用段落叙述,数据量化呈现,突出可操作建议,严格控制输出为80词内。采用三段式论述:
  907. 1. 整体表现-1句话
  908. 2. 核心发现-1-2句,指出共性问题+典型案例
  909. 3. 改进建议-1句话,提出具体教学动作
  910. # EXAMPLES #
  911. 样例:
  912. 30人中15人提交问答题(参与率50%),核心概念“同理心地图”掌握薄弱。发现学生13在智能体对话中6次答“不知道”,需单独辅导设计思维基础概念。建议课程增加POV框架实例演练,强化痛点识别能力训练。`
  913. if (!currentAnalysis.value) {
  914. aiAnalysisData.value.push({
  915. pid: props.workId,
  916. index: props.showData.workIndex,
  917. loading: true,
  918. generatingContent: true,
  919. json: { text: '', echartsData: '' },
  920. noEnd: true,
  921. update_at: '',
  922. create_at: '',
  923. })
  924. }
  925. else {
  926. aiAnalysisData.value.find((item: any) => {
  927. return item.pid === props.workId && item.index === props.showData.workIndex
  928. }).loading = true
  929. aiAnalysisData.value.find((item: any) => {
  930. return item.pid === props.workId && item.index === props.showData.workIndex
  931. }).json = { text: '', echartsData: '' }
  932. aiAnalysisData.value.find((item: any) => {
  933. return item.pid === props.workId && item.index === props.showData.workIndex
  934. }).generatingContent = true
  935. }
  936. getWordCloud15().then((res) => {
  937. flag += 1
  938. aiAnalysisData.value.find((item: any) => {
  939. return item.pid === props.workId && item.index === props.showData.workIndex
  940. }).generatingContent = false
  941. if (flag == 2) {
  942. saveAnalysis()
  943. }
  944. })
  945. chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
  946. console.log(event)
  947. if (event.type === 'message') {
  948. aiAnalysisData.value.find((item: any) => {
  949. return item.pid === props.workId && item.index === props.showData.workIndex
  950. }).json.text = event.data
  951. aiAnalysisData.value.find((item: any) => {
  952. return item.pid === props.workId && item.index === props.showData.workIndex
  953. }).loading = false
  954. }
  955. else if (event.type === 'messageEnd') {
  956. aiAnalysisData.value.find((item: any) => {
  957. return item.pid === props.workId && item.index === props.showData.workIndex
  958. }).json.text = event.data
  959. aiAnalysisData.value.find((item: any) => {
  960. return item.pid === props.workId && item.index === props.showData.workIndex
  961. }).noEnd = false
  962. aiAnalysisData.value.find((item: any) => {
  963. return item.pid === props.workId && item.index === props.showData.workIndex
  964. }).update_at = new Date().toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }).replace(/\//g, '-')
  965. flag += 1
  966. if (flag == 2) {
  967. saveAnalysis()
  968. }
  969. }
  970. }).catch(err => {
  971. console.log('err', err)
  972. })
  973. }
  974. // 打开词云图弹窗
  975. const openEchatsDialog = () => {
  976. if (echartsDialogRef.value && currentAnalysis.value.json.echartsData) {
  977. echartsDialogRef.value.open(lang.ssKeywordCloud,currentAnalysis.value.json.echartsData)
  978. }
  979. }
  980. //问答题获取词云图与关键词
  981. const getWordCloud15 = () => {
  982. return new Promise((resolve,) => {
  983. const msg = `## 任务
  984. 请针对文本中学生提交的问答题回答内容进行深度分析,提炼出 10 - 30 个核心关键词,用于绘制词云图。
  985. ## 提取准则
  986. 1. 聚焦内容主体:仅从学生的具体回答文本中提取关键词。
  987. 2. 严格排除杂质:禁止提取任何属于系统元数据或固定格式的词汇,包括但不限于:“课程数据”、“学生姓名”、“回答结果”、“课程标题”、“提交时间”、“作业名称”、“分数”等。
  988. 3. 语义去重:将意思相近的词进行合并(例如“高效”与“效率高”),保留最具代表性的词条。
  989. 4. 涵盖核心:关键词应准确反映学生回答中的核心观点、关键知识点、高频论据或情感倾向。
  990. ## 任务要求
  991. 1. 词频统计:计算每个有效关键字在回答内容中出现的频率。
  992. 2. 词汇大小:根据词频,确定每个关键字在词云中的权重。词频越高,数值越大,范围 1 - 100。
  993. 3. 输出格式:请严格按照 JSON 格式输出,包含关键词、词频及对应的词汇大小。
  994. ## 文本
  995. 课程数据:
  996. - 课程名称:${props.courseDetail.title}
  997. - 课程学科:${props.courseDetail.name}
  998. 当前页面答题数据(问答题):【分析重点】
  999. - 问答题题目:${props.showData.workDetail.json.answerQ}
  1000. - 回答数据:${JSON.stringify(processedWorkArray.value.map((i) => ({ answer: i.content.answer })))}
  1001. ## 输出示例
  1002. {"tooltip":{"show":false},"series":[{"type":"wordCloud","sizeRange":[14,38],"rotationRange":[0,0],"keepAspect":false,"shape":"circle","left":"center","top":"center","right":null,"bottom":null,"width":"100%","height":"100%","rotationStep":20,"data":[{"value":"词汇大小,数值范围1-100","name":"词汇","textStyle":{"color":"词汇颜色(16进制)"}},{"value":"词汇大小,数值范围1-100","name":"词汇","textStyle":{"color":"(16进制)"}}]}]}`
  1003. chat_no_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang).promise.then((res) => {
  1004. aiAnalysisData.value.find((item: any) => {
  1005. return item.pid === props.workId && item.index === props.showData.workIndex
  1006. }).json.echartsData = JSON.parse(res)
  1007. resolve(1)
  1008. }).catch(err => {
  1009. console.log('err', err)
  1010. resolve(0)
  1011. })
  1012. })
  1013. }
  1014. // ai应用
  1015. const aiAnalysisRefresh72 = async () => {
  1016. let chatMsg = ``
  1017. processedWorkArray.value.forEach((i) => {
  1018. i.content.forEach(j => {
  1019. j.messages.forEach((a) => {
  1020. chatMsg += `\n${a.sender}:
  1021. ${a.content}\n`
  1022. })
  1023. })
  1024. })
  1025. // - 未提交学生:${JSON.stringify(props.showData.unsubmittedStudents.map((item: any) => item.name))}
  1026. const msg = `# CONTEXT #
  1027. 你是K-12阶段的AI教育课堂分析助手,基于上传的课件、逐字稿,以及当页的学生答题数据(选择题/问答题/智能体对话)进行智能分析。
  1028. # OBJECTIVE #
  1029. 输出当前学生答题的分析报告:整体表现、核心发现(共性问题/误区)、教学优化(改进方向),为教师提供教学策略的建议和支持。
  1030. #INPUT#
  1031. 课程数据:
  1032. - 课程名称:${props.courseDetail.title}
  1033. - 课程学科:${props.courseDetail.name}
  1034. 当前页面答题数据(问答题):【分析重点】
  1035. - AI应用
  1036. - 对话数据:${chatMsg}
  1037. # ANALYSIS RULES #
  1038. 1. **问题定位**:明确指出哪个知识点/概念/步骤掌握不佳
  1039. 2. **建议具体**:给出可执行的教学动作(如“增加XX实例演练”“补充XX对比图”)
  1040. # RESPONSE #
  1041. 采用段落叙述,数据量化呈现,突出可操作建议,严格控制输出为80词内。采用三段式论述:
  1042. 1. 整体表现-1句话
  1043. 2. 核心发现-1-2句,指出共性问题+典型案例
  1044. 3. 改进建议-1句话,提出具体教学动作
  1045. # EXAMPLES #
  1046. 样例:
  1047. 智能体对话显示学生对“模型训练”概念模糊,多次询问“为什么不能直接告诉机器答案”。针对概念混淆学生,补充“人类学习类比”相关解释,巩固“从数据中学习规律”核心认知。`
  1048. console.log("cs", msg)
  1049. if (!currentAnalysis.value) {
  1050. aiAnalysisData.value.push({
  1051. pid: props.workId,
  1052. index: props.showData.workIndex,
  1053. loading: true,
  1054. json: { text: '', echartsData: '' },
  1055. noEnd: true,
  1056. update_at: '',
  1057. create_at: '',
  1058. })
  1059. }
  1060. else {
  1061. aiAnalysisData.value.find((item: any) => {
  1062. return item.pid === props.workId && item.index === props.showData.workIndex
  1063. }).loading = true
  1064. aiAnalysisData.value.find((item: any) => {
  1065. return item.pid === props.workId && item.index === props.showData.workIndex
  1066. }).json = { text: '', echartsData: '' }
  1067. }
  1068. chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
  1069. if (event.type === 'message') {
  1070. aiAnalysisData.value.find((item: any) => {
  1071. return item.pid === props.workId && item.index === props.showData.workIndex
  1072. }).json.text = event.data
  1073. aiAnalysisData.value.find((item: any) => {
  1074. return item.pid === props.workId && item.index === props.showData.workIndex
  1075. }).loading = false
  1076. }
  1077. else if (event.type === 'messageEnd') {
  1078. aiAnalysisData.value.find((item: any) => {
  1079. return item.pid === props.workId && item.index === props.showData.workIndex
  1080. }).json.text = event.data
  1081. aiAnalysisData.value.find((item: any) => {
  1082. return item.pid === props.workId && item.index === props.showData.workIndex
  1083. }).noEnd = false
  1084. aiAnalysisData.value.find((item: any) => {
  1085. return item.pid === props.workId && item.index === props.showData.workIndex
  1086. }).update_at = new Date().toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }).replace(/\//g, '-')
  1087. saveAnalysis()
  1088. }
  1089. }).catch(err => {
  1090. console.log('err', err)
  1091. })
  1092. }
  1093. // 当前分析
  1094. const currentAnalysis = computed(() => {
  1095. let _result = aiAnalysisData.value.find((item: any) => {
  1096. return item.pid === props.workId && item.index === props.showData.workIndex
  1097. })
  1098. if (_result?.json?.echartsData) {
  1099. _result.json.keyword = _result.json.echartsData?.series?.[0]?.data?.slice(0, 5).map((item: any) => item.name)
  1100. }
  1101. if (_result) {
  1102. return _result
  1103. }
  1104. else {
  1105. return null
  1106. }
  1107. })
  1108. // 保存分析
  1109. const saveAnalysis = () => {
  1110. if (!currentAnalysis.value) {
  1111. return
  1112. }
  1113. const params = [{
  1114. pid: props.workId+(props.cid?','+props.cid:''),
  1115. idx: props.showData.workIndex,
  1116. json: JSON.stringify(currentAnalysis.value.json),
  1117. }]
  1118. console.log(params)
  1119. axios.post('https://pbl.cocorobo.cn/api/pbl/insert_pptAnalysis', params).then(res => {
  1120. if (res == 1) {
  1121. console.log('保存成功')
  1122. }
  1123. }).catch(err => {
  1124. console.log('insert_pptAnalysis_err', err)
  1125. })
  1126. }
  1127. // 监听 props.showData.workDetail.id 变化
  1128. watch(
  1129. () => props.showData?.workDetail,
  1130. (newId, oldId) => {
  1131. if (newId && newId !== oldId) {
  1132. getAnalysis()
  1133. }
  1134. },
  1135. { immediate: true }
  1136. )
  1137. // onMounted(()=>{
  1138. // getAnalysis()
  1139. // })
  1140. // 组件卸载时清理ECharts实例
  1141. onUnmounted(() => {
  1142. // 清除定时器
  1143. if (resizeTimer) {
  1144. clearTimeout(resizeTimer)
  1145. resizeTimer = null
  1146. }
  1147. // 销毁ECharts实例
  1148. if (myChart.value && !myChart.value.isDisposed()) {
  1149. myChart.value.dispose()
  1150. myChart.value = null
  1151. }
  1152. })
  1153. </script>
  1154. <style lang="scss" scoped>
  1155. .choiceQuestionDetailDialog {
  1156. background: none;
  1157. position: relative;
  1158. width: 100%;
  1159. height: 100%;
  1160. z-index: 1;
  1161. .content {
  1162. width: 100%;
  1163. height: 100%;
  1164. position: relative;
  1165. background: #fff;
  1166. box-sizing: border-box;
  1167. padding: 40px;
  1168. overflow: auto;
  1169. .closeIcon {
  1170. position: absolute;
  1171. right: 20px;
  1172. top: 20px;
  1173. cursor: pointer;
  1174. width: 20px;
  1175. height: 20px;
  1176. img {
  1177. width: 100%;
  1178. height: 100%;
  1179. }
  1180. }
  1181. .c_t45 {
  1182. width: 100%;
  1183. min-height: 100%;
  1184. display: flex;
  1185. // align-items: center;
  1186. flex-direction: column;
  1187. height: auto;
  1188. .c_t45_title {
  1189. color: rgba(0, 0, 0, 0.9);
  1190. font-weight: 600;
  1191. font-size: 24px;
  1192. line-height: 24px;
  1193. position: relative;
  1194. width: 100%;
  1195. display: flex;
  1196. flex-direction: column;
  1197. // align-items: center;
  1198. // justify-content: center;
  1199. user-select: none;
  1200. gap: .4rem;
  1201. &>div {
  1202. max-width: calc(100%);
  1203. }
  1204. &>span {
  1205. position: absolute;
  1206. top: 20px;
  1207. cursor: pointer;
  1208. &:nth-of-type(1) {
  1209. left: 0;
  1210. }
  1211. &:nth-of-type(2) {
  1212. right: 0;
  1213. }
  1214. }
  1215. .c_t45_t_btn_noActive {
  1216. color: #CCCCCC;
  1217. }
  1218. .c_t45_msg {
  1219. display: flex;
  1220. align-items: center;
  1221. font-size: .9rem;
  1222. font-weight: 400;
  1223. gap: 1rem;
  1224. &>span {
  1225. text-decoration: underline;
  1226. cursor: pointer;
  1227. }
  1228. }
  1229. }
  1230. .c_t45_img {
  1231. max-width: 200px;
  1232. max-height: 200px;
  1233. object-fit: cover;
  1234. margin-top: 20px;
  1235. }
  1236. .c_t45_type {
  1237. font-weight: 400;
  1238. font-size: 15px;
  1239. line-height: 21px;
  1240. letter-spacing: 0.5px;
  1241. color: rgba(0, 0, 0, 1);
  1242. opacity: 0.5;
  1243. margin-top: 20px;
  1244. }
  1245. .c_t45_echarts {
  1246. width: 100%;
  1247. max-width: 100%;
  1248. flex: 1;
  1249. min-height: 400px;
  1250. display: flex;
  1251. align-items: center;
  1252. box-sizing: border-box;
  1253. &>div {
  1254. width: 100%;
  1255. height: 400px;
  1256. }
  1257. }
  1258. .cq_changeBtn {
  1259. display: flex;
  1260. align-items: center;
  1261. gap: 1.5rem;
  1262. margin: 1rem auto;
  1263. &>div {
  1264. padding: .6rem;
  1265. border-radius: .5rem;
  1266. border: solid 2px #F6C82B;
  1267. display: flex;
  1268. justify-content: center;
  1269. align-items: center;
  1270. cursor: pointer;
  1271. &>svg {
  1272. fill: #F6C82D;
  1273. width: 1rem;
  1274. height: 1rem;
  1275. }
  1276. &.cq_cb_disabled {
  1277. cursor: not-allowed !important;
  1278. border-color: #FEF8E9 !important;
  1279. }
  1280. &.cq_cb_disabled>svg {
  1281. fill: #A3A3A3 !important;
  1282. }
  1283. }
  1284. &>span {
  1285. font-weight: 500;
  1286. }
  1287. }
  1288. }
  1289. .c_t15 {
  1290. width: 100%;
  1291. min-height: 100%;
  1292. display: flex;
  1293. align-items: center;
  1294. flex-direction: column;
  1295. height: auto;
  1296. padding: 40px;
  1297. .c_t15_title {
  1298. color: rgba(0, 0, 0, 0.9);
  1299. font-weight: 600;
  1300. font-size: 24px;
  1301. line-height: 24px;
  1302. }
  1303. .c_t15_type {
  1304. font-weight: 400;
  1305. font-size: 15px;
  1306. line-height: 21px;
  1307. letter-spacing: 0.5px;
  1308. color: rgba(0, 0, 0, 1);
  1309. opacity: 0.5;
  1310. margin-top: 20px;
  1311. }
  1312. .c_t15_content {
  1313. width: 100%;
  1314. height: auto;
  1315. display: grid;
  1316. grid-template-columns: repeat(3, 1fr);
  1317. gap: 20px;
  1318. margin-top: 40px;
  1319. .c_t15_c_item {
  1320. width: 100%;
  1321. height: auto;
  1322. box-shadow: 2px 4px 20px 0px rgba(0, 0, 0, 0.2);
  1323. box-sizing: border-box;
  1324. border-radius: 12px;
  1325. padding: 16px;
  1326. background: rgba(255, 255, 255, 0.6);
  1327. transition: 0.3s;
  1328. cursor: pointer;
  1329. &:hover {
  1330. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  1331. background: rgba(255, 255, 255, 0.6);
  1332. }
  1333. .c_t15_c_i_top {
  1334. display: flex;
  1335. align-items: center;
  1336. gap: 10px;
  1337. &>span {
  1338. display: block;
  1339. width: 25px;
  1340. height: 25px;
  1341. display: flex;
  1342. align-items: center;
  1343. justify-content: center;
  1344. background: rgba(252, 207, 0, 1);
  1345. border-radius: 4px;
  1346. color: rgba(255, 255, 255, 1);
  1347. font-weight: bold;
  1348. font-size: 14px;
  1349. }
  1350. &>div {
  1351. color: rgba(0, 0, 0, 0.7);
  1352. font-weight: 800;
  1353. }
  1354. }
  1355. .c_t15_c_i_bottom {
  1356. margin-top: 15px;
  1357. font-weight: 300;
  1358. font-size: 14px;
  1359. height: 40px;
  1360. max-width: 100%;
  1361. overflow: hidden;
  1362. text-overflow: ellipsis;
  1363. display: -webkit-box;
  1364. -webkit-line-clamp: 2;
  1365. -webkit-box-orient: vertical;
  1366. }
  1367. }
  1368. }
  1369. .c_t15_workDetail {
  1370. width: 100%;
  1371. height: auto;
  1372. margin-top: 40px;
  1373. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  1374. box-sizing: border-box;
  1375. padding: 16px;
  1376. border-radius: 12px;
  1377. display: flex;
  1378. flex-direction: column;
  1379. .c_t15_wd_top {
  1380. width: 100%;
  1381. display: flex;
  1382. align-items: center;
  1383. gap: 15px;
  1384. &>img {
  1385. width: 25px;
  1386. height: 25px;
  1387. cursor: pointer;
  1388. }
  1389. &>span {
  1390. display: block;
  1391. width: 30px;
  1392. height: 30px;
  1393. display: flex;
  1394. align-items: center;
  1395. justify-content: center;
  1396. background: rgba(252, 207, 0, 1);
  1397. border-radius: 4px;
  1398. color: rgba(255, 255, 255, 1);
  1399. font-weight: bold;
  1400. font-size: 16px;
  1401. }
  1402. &>div {
  1403. color: rgba(0, 0, 0, 0.7);
  1404. font-weight: 800;
  1405. font-size: 18px;
  1406. }
  1407. }
  1408. .c_t15_wd_content {
  1409. width: 100%;
  1410. margin-top: 20px;
  1411. max-height: 100%;
  1412. overflow: auto;
  1413. flex-wrap: wrap;
  1414. .c_t15_wd_c_imageList {
  1415. width: 100%;
  1416. gap: 20px;
  1417. margin-top: 20px;
  1418. &>img {
  1419. width: 100px;
  1420. height: auto;
  1421. cursor: pointer;
  1422. margin-right: 20px;
  1423. object-fit: cover;
  1424. }
  1425. }
  1426. }
  1427. }
  1428. }
  1429. .c_t72 {
  1430. width: 100%;
  1431. min-height: 100%;
  1432. display: flex;
  1433. align-items: center;
  1434. flex-direction: column;
  1435. height: auto;
  1436. padding: 40px;
  1437. .c_t72_title {
  1438. color: rgba(0, 0, 0, 0.9);
  1439. font-weight: 600;
  1440. font-size: 24px;
  1441. line-height: 24px;
  1442. }
  1443. .c_t72_type {
  1444. font-weight: 400;
  1445. font-size: 15px;
  1446. line-height: 21px;
  1447. letter-spacing: 0.5px;
  1448. color: rgba(0, 0, 0, 1);
  1449. opacity: 0.5;
  1450. margin-top: 20px;
  1451. }
  1452. .c_t72_content {
  1453. width: 100%;
  1454. height: auto;
  1455. display: grid;
  1456. grid-template-columns: repeat(4, 1fr);
  1457. gap: 20px;
  1458. margin-top: 40px;
  1459. .c_t72_c_item {
  1460. width: 100%;
  1461. height: auto;
  1462. box-shadow: 2px 4px 20px 0px rgba(0, 0, 0, 0.2);
  1463. box-sizing: border-box;
  1464. border-radius: 12px;
  1465. padding: 16px;
  1466. background: rgba(255, 255, 255, 0.6);
  1467. transition: 0.3s;
  1468. cursor: pointer;
  1469. &:hover {
  1470. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  1471. background: rgba(255, 255, 255, 0.6);
  1472. }
  1473. .c_t72_c_i_top {
  1474. display: flex;
  1475. align-items: center;
  1476. gap: 10px;
  1477. &>span {
  1478. display: block;
  1479. width: 25px;
  1480. height: 25px;
  1481. display: flex;
  1482. align-items: center;
  1483. justify-content: center;
  1484. background: rgba(252, 207, 0, 1);
  1485. border-radius: 4px;
  1486. color: rgba(255, 255, 255, 1);
  1487. font-weight: bold;
  1488. font-size: 14px;
  1489. }
  1490. &>div {
  1491. color: rgba(0, 0, 0, 0.7);
  1492. font-weight: 800;
  1493. }
  1494. }
  1495. .c_t72_c_i_bottom {
  1496. margin-top: 15px;
  1497. font-weight: 300;
  1498. font-size: 14px;
  1499. // height: 40px;
  1500. max-width: 100%;
  1501. overflow: hidden;
  1502. text-overflow: ellipsis;
  1503. display: -webkit-box;
  1504. -webkit-line-clamp: 2;
  1505. -webkit-box-orient: vertical;
  1506. img {
  1507. width: 100%;
  1508. max-height: 200px;
  1509. object-fit: cover;
  1510. }
  1511. }
  1512. }
  1513. }
  1514. .c_t72_workDetail {
  1515. width: 100%;
  1516. height: auto;
  1517. margin-top: 40px;
  1518. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  1519. box-sizing: border-box;
  1520. padding: 16px;
  1521. border-radius: 12px;
  1522. display: flex;
  1523. flex-direction: column;
  1524. .c_t72_wd_top {
  1525. width: 100%;
  1526. display: flex;
  1527. align-items: center;
  1528. gap: 15px;
  1529. &>img {
  1530. width: 25px;
  1531. height: 25px;
  1532. cursor: pointer;
  1533. }
  1534. &>span {
  1535. display: block;
  1536. width: 30px;
  1537. height: 30px;
  1538. display: flex;
  1539. align-items: center;
  1540. justify-content: center;
  1541. background: rgba(252, 207, 0, 1);
  1542. border-radius: 4px;
  1543. color: rgba(255, 255, 255, 1);
  1544. font-weight: bold;
  1545. font-size: 16px;
  1546. }
  1547. &>div {
  1548. color: rgba(0, 0, 0, 0.7);
  1549. font-weight: 800;
  1550. font-size: 18px;
  1551. }
  1552. }
  1553. .c_t72_wd_content {
  1554. width: 100%;
  1555. margin-top: 20px;
  1556. max-height: 100%;
  1557. overflow: auto;
  1558. flex-wrap: wrap;
  1559. display: flex;
  1560. align-items: center;
  1561. justify-content: center;
  1562. .na_m_item {
  1563. width: 100%;
  1564. height: auto;
  1565. margin: 10px 0;
  1566. }
  1567. .na_m_i_name {
  1568. width: fit-content;
  1569. max-width: 100%;
  1570. height: auto;
  1571. box-sizing: border-box;
  1572. padding: 10px 10px;
  1573. display: flex;
  1574. align-items: center;
  1575. border-radius: 10px 10px 0 0;
  1576. background-color: #9747ff;
  1577. color: #fff;
  1578. text-overflow: ellipsis;
  1579. overflow: hidden;
  1580. white-space: nowrap;
  1581. }
  1582. .aiName {
  1583. background-color: #0560fc;
  1584. }
  1585. .na_m_i_content {
  1586. padding: 10px;
  1587. border: solid 1px #e7e7e7;
  1588. box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
  1589. border-radius: 0 0 12px 12px;
  1590. background-color: #fff;
  1591. :deep(img) {
  1592. max-width: 100%;
  1593. }
  1594. }
  1595. .messageNode {
  1596. width: 100%;
  1597. height: auto;
  1598. box-sizing: border-box;
  1599. padding: 10px 10px;
  1600. border: 0.5px solid #e7e7e7;
  1601. border-radius: 12px;
  1602. gap: 10px;
  1603. margin-top: 20px;
  1604. }
  1605. .messageNodeArea {
  1606. width: 100%;
  1607. height: auto;
  1608. }
  1609. }
  1610. }
  1611. }
  1612. .c_t73 {
  1613. width: 100%;
  1614. min-height: 100%;
  1615. display: flex;
  1616. align-items: center;
  1617. flex-direction: column;
  1618. height: auto;
  1619. padding: 40px;
  1620. .c_t73_title {
  1621. color: rgba(0, 0, 0, 0.9);
  1622. font-weight: 600;
  1623. font-size: 24px;
  1624. line-height: 24px;
  1625. }
  1626. .c_t73_type {
  1627. font-weight: 400;
  1628. font-size: 15px;
  1629. line-height: 21px;
  1630. letter-spacing: 0.5px;
  1631. color: rgba(0, 0, 0, 1);
  1632. opacity: 0.5;
  1633. margin-top: 20px;
  1634. }
  1635. .c_t73_content {
  1636. width: 100%;
  1637. height: auto;
  1638. display: grid;
  1639. grid-template-columns: repeat(4, 1fr);
  1640. gap: 20px;
  1641. margin-top: 40px;
  1642. .c_t73_c_item {
  1643. width: 100%;
  1644. height: auto;
  1645. box-shadow: 2px 4px 20px 0px rgba(0, 0, 0, 0.2);
  1646. box-sizing: border-box;
  1647. border-radius: 12px;
  1648. padding: 16px;
  1649. background: rgba(255, 255, 255, 0.6);
  1650. transition: 0.3s;
  1651. cursor: pointer;
  1652. &:hover {
  1653. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  1654. background: rgba(255, 255, 255, 0.6);
  1655. }
  1656. .c_t73_c_i_top {
  1657. display: flex;
  1658. width: 100%;
  1659. align-items: center;
  1660. gap: 10px;
  1661. &>span {
  1662. display: block;
  1663. width: 25px;
  1664. height: 25px;
  1665. display: flex;
  1666. align-items: center;
  1667. justify-content: center;
  1668. background: rgba(252, 207, 0, 1);
  1669. border-radius: 4px;
  1670. color: rgba(255, 255, 255, 1);
  1671. font-weight: bold;
  1672. font-size: 14px;
  1673. }
  1674. &>div {
  1675. color: rgba(0, 0, 0, 0.7);
  1676. font-weight: 800;
  1677. }
  1678. }
  1679. .c_t73_c_i_bottom {
  1680. margin-top: 15px;
  1681. font-weight: 300;
  1682. font-size: 14px;
  1683. // height: 40px;
  1684. max-width: 100%;
  1685. overflow: hidden;
  1686. text-overflow: ellipsis;
  1687. display: -webkit-box;
  1688. -webkit-line-clamp: 2;
  1689. -webkit-box-orient: vertical;
  1690. img {
  1691. width: 100%;
  1692. max-height: 200px;
  1693. object-fit: cover;
  1694. }
  1695. }
  1696. }
  1697. }
  1698. .c_t73_workDetail {
  1699. width: 100%;
  1700. height: auto;
  1701. margin-top: 40px;
  1702. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  1703. box-sizing: border-box;
  1704. padding: 16px;
  1705. border-radius: 12px;
  1706. display: flex;
  1707. flex-direction: column;
  1708. .c_t73_wd_top {
  1709. width: 100%;
  1710. display: flex;
  1711. align-items: center;
  1712. gap: 15px;
  1713. &>img {
  1714. width: 25px;
  1715. height: 25px;
  1716. cursor: pointer;
  1717. }
  1718. &>span {
  1719. display: block;
  1720. width: 30px;
  1721. height: 30px;
  1722. display: flex;
  1723. align-items: center;
  1724. justify-content: center;
  1725. background: rgba(252, 207, 0, 1);
  1726. border-radius: 4px;
  1727. color: rgba(255, 255, 255, 1);
  1728. font-weight: bold;
  1729. font-size: 16px;
  1730. }
  1731. &>div {
  1732. color: rgba(0, 0, 0, 0.7);
  1733. font-weight: 800;
  1734. font-size: 18px;
  1735. }
  1736. }
  1737. .c_t73_wd_content {
  1738. width: 100%;
  1739. margin-top: 20px;
  1740. max-height: 100%;
  1741. overflow: auto;
  1742. flex-wrap: wrap;
  1743. display: flex;
  1744. align-items: center;
  1745. justify-content: center;
  1746. &>img {
  1747. max-width: 100%;
  1748. object-fit: cover;
  1749. }
  1750. }
  1751. }
  1752. }
  1753. }
  1754. }
  1755. .aiAnalysis {
  1756. width: 100%;
  1757. height: auto;
  1758. display: flex;
  1759. flex-direction: column;
  1760. padding: 1rem;
  1761. border: solid 1px #F6C82B;
  1762. border-left-width: 4px;
  1763. border-radius: 1rem;
  1764. gap: 1rem;
  1765. &>.ai_header {
  1766. display: flex;
  1767. align-items: center;
  1768. justify-content: space-between;
  1769. gap: 1rem;
  1770. &>div {
  1771. display: flex;
  1772. align-items: center;
  1773. gap: .5rem;
  1774. &>svg {
  1775. width: 1rem;
  1776. height: 1rem;
  1777. }
  1778. }
  1779. &>.ai_title {
  1780. color: #F7CD49;
  1781. font-weight: 500;
  1782. &>svg {
  1783. fill: #F7CD49;
  1784. width: 1.2rem;
  1785. height: 1.2rem;
  1786. }
  1787. }
  1788. &>.ai_refresh {
  1789. padding: .5rem 1rem;
  1790. border-radius: .5rem;
  1791. background: #F6C82B;
  1792. display: flex;
  1793. justify-content: center;
  1794. align-items: center;
  1795. cursor: pointer;
  1796. color: #000;
  1797. font-weight: bold;
  1798. font-size: .8rem;
  1799. gap: .5rem;
  1800. &>svg {
  1801. fill: #000;
  1802. width: .8rem;
  1803. height: .8rem;
  1804. }
  1805. &.disabled {
  1806. cursor: not-allowed !important;
  1807. background: #FEF8E9 !important;
  1808. }
  1809. }
  1810. }
  1811. &>.ai_content {
  1812. font-size: 1rem;
  1813. font-weight: 500;
  1814. }
  1815. &>.ai_echartsData{
  1816. display: flex;
  1817. flex-wrap: wrap;
  1818. gap: .5rem;
  1819. &>span{
  1820. padding: .2rem .5rem;
  1821. border-radius: .25rem;
  1822. background: #E6F4FF;
  1823. display: flex;
  1824. justify-content: center;
  1825. align-items: center;
  1826. color: #141517;
  1827. font-size: .75rem;
  1828. }
  1829. &>.title{
  1830. font-weight: 600;
  1831. }
  1832. &>.btn{
  1833. font-size: .9rem;
  1834. text-decoration: underline;
  1835. color: #F6C82B;
  1836. cursor: pointer;
  1837. }
  1838. }
  1839. &>.ai_updateTime {
  1840. font-size: .8rem;
  1841. font-weight: 500;
  1842. }
  1843. }
  1844. </style>