choiceQuestionDetailDialog.vue 53 KB

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