choiceQuestionDetailDialog.vue 64 KB

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