choiceQuestionDetailDialog.vue 168 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780
  1. <template>
  2. <div class="choiceQuestionDetailDialog">
  3. <div class="content" @click="clickContent(true)" :style="{
  4. width: slideWidth + 'px',
  5. height: slideHeight + 'px',
  6. }">
  7. <span v-show="false" class="closeIcon" @click.stop="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 class="c_title" v-if="props.showData.choiceQuestionListData[props.showData.workIndex]">
  14. <span>{{
  15. props.showData.choiceQuestionListData[props.showData.workIndex]
  16. .teststitle
  17. }}</span>
  18. </div>
  19. <div class="c_t45_msg" v-if="props.roleType == 1">
  20. <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
  21. v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
  22. props.unsubmittedStudents.length
  23. }}</span></div>
  24. <div v-if="correctRate !== null" class="c_t45_correct_rate">{{ lang.ssAccuracy2 }} {{ correctRate }}%</div>
  25. <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
  26. lang.ssViewSubmitStatus2 }}</span>
  27. <div class="switch_btn" v-if="props.isCreator && props.roleType == 1">
  28. <div class="switch">
  29. <Switch :value="canValue" @update:value="handleCanChange" />
  30. <span>{{ lang.ssShowResult }}</span>
  31. </div>
  32. <!-- <div class="switch">
  33. <Switch :value="answerValue" @update:value="handleAnswerChange" />
  34. <span>{{ lang.ssShowAnswer }}</span>
  35. </div> -->
  36. </div>
  37. </div>
  38. <!--<span class="c_t45_t_btn" :class="{'c_t45_t_btn_noActive': props.showData.workIndex <= 0}" @click="changeWorkIndex(0)">{{ lang.ssPrevQ }}</span>-->
  39. <!--<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>-->
  40. </div>
  41. <img class="c_t45_img" :src="props.showData.choiceQuestionListData[props.showData.workIndex]
  42. .timuList[0].src
  43. " v-if="props.showData.choiceQuestionListData[props.showData.workIndex] &&
  44. props.showData.choiceQuestionListData[props.showData.workIndex]
  45. .timuList.length > 0
  46. " @click.stop="previewImageToolRef.previewImage(props.showData.choiceQuestionListData[props.showData.workIndex]
  47. .timuList[0].src)" />
  48. <!-- <span class="c_t45_type" v-if="
  49. props.showData.choiceQuestionListData[props.showData.workIndex]
  50. .type === '1'
  51. ">{{ lang.ssSingleSel }}</span>
  52. <span class="c_t45_type" v-if="
  53. props.showData.choiceQuestionListData[props.showData.workIndex]
  54. .type === '2'
  55. ">{{ lang.ssMultiOpt }}</span> -->
  56. <!-- <span class="c_t45_type">{{ lang.ssChoiceQuestion }}</span> -->
  57. <div class="c_t45_echarts" :style="{
  58. width: slideWidth - 40 + 'px',
  59. }">
  60. <div id="echartsArea1" ref="echartsArea1"></div>
  61. </div>
  62. <div class="aiAnalysis" v-if="props.workArray.length > 0 && props.roleType == 1">
  63. <div class="ai_header">
  64. <div class="ai_title">
  65. <svg viewBox="0 0 1024 1024" width="200" height="200">
  66. <path
  67. 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">
  68. </path>
  69. <path
  70. 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">
  71. </path>
  72. </svg>{{ lang.ssAnalysis }}
  73. </div>
  74. <div class="ai_refresh" :class="{ 'disabled': currentAnalysis && currentAnalysis.loading }"
  75. @click.stop="aiAnalysisRefresh45()">
  76. {{ lang.ssAIGenerate }}
  77. <svg viewBox="0 0 1024 1024" width="200" height="200">
  78. <path
  79. 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">
  80. </path>
  81. </svg>
  82. </div>
  83. </div>
  84. <div class="ai_content" v-if="currentAnalysis && currentAnalysis.json">
  85. {{ currentAnalysis.json.text }}
  86. </div>
  87. <div class="ai_echartsData" v-if="currentAnalysis && currentAnalysis.json.keyword">
  88. {{ currentAnalysis.json.keyword }}
  89. </div>
  90. <div class="generatingContent" v-if="currentAnalysis && currentAnalysis.loading">
  91. {{ lang.ssGeneratingContent }}...</div>
  92. <div class="ai_updateTime" v-if="currentAnalysis">{{ lang.ssUpdateTime }}:{{ currentAnalysis.update_at }}
  93. </div>
  94. </div>
  95. <div class="cq_changeBtn" v-if="props.showData.choiceQuestionListData.length > 1">
  96. <div :class="{ cq_cb_disabled: props.showData.workIndex <= 0 }" @click.stop="changeWorkIndex(0)">
  97. <svg style="transform: rotate(-90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  98. <path
  99. 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"
  100. fill=""></path>
  101. </svg>
  102. </div>
  103. <span>{{ props.showData.workIndex + 1 }}/{{ props.showData.choiceQuestionListData.length }}</span>
  104. <div :class="{ cq_cb_disabled: props.showData.workIndex >= props.showData.choiceQuestionListData.length - 1 }"
  105. @click.stop="changeWorkIndex(1)">
  106. <svg style="transform: rotate(90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  107. <path
  108. 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"
  109. fill=""></path>
  110. </svg>
  111. </div>
  112. </div>
  113. </div>
  114. <!-- 投票 -->
  115. <div class="c_t45" v-if="workDetail && workDetail.type === '78' && props.showData">
  116. <div class="c_t45_title">
  117. <div class="c_title" v-if="props.showData.choiceQuestionListData[props.showData.workIndex]">
  118. <span>{{
  119. props.showData.choiceQuestionListData[props.showData.workIndex]
  120. .teststitle
  121. }}</span>
  122. </div>
  123. <div class="c_t45_msg" v-if="props.roleType == 1">
  124. <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
  125. v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
  126. props.unsubmittedStudents.length
  127. }}</span></div>
  128. <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
  129. lang.ssViewSubmitStatus2 }}</span>
  130. <div class="switch_btn" v-if="props.isCreator && props.roleType == 1">
  131. <div class="switch">
  132. <Switch :value="canValue" @update:value="handleCanChange" />
  133. <span>{{ lang.ssShowResult }}</span>
  134. </div>
  135. <div class="switch">
  136. <Switch :value="anonymousValue" @update:value="handleAnonymousChange" />
  137. <span>{{ anonymousValue ? lang.ssAnonymous : lang.ssRealName }}</span>
  138. </div>
  139. </div>
  140. </div>
  141. <!--<span class="c_t45_t_btn" :class="{'c_t45_t_btn_noActive': props.showData.workIndex <= 0}" @click="changeWorkIndex(0)">{{ lang.ssPrevQ }}</span>-->
  142. <!--<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>-->
  143. </div>
  144. <img class="c_t45_img" :src="props.showData.choiceQuestionListData[props.showData.workIndex]
  145. .timuList[0].src
  146. " v-if="props.showData.choiceQuestionListData[props.showData.workIndex] &&
  147. props.showData.choiceQuestionListData[props.showData.workIndex]
  148. .timuList.length > 0
  149. " @click.stop="previewImageToolRef.previewImage(props.showData.choiceQuestionListData[props.showData.workIndex]
  150. .timuList[0].src)" />
  151. <!-- <span class="c_t45_type" v-if="
  152. props.showData.choiceQuestionListData[props.showData.workIndex]
  153. .type === '1'
  154. ">{{ lang.ssSingleSel }}</span>
  155. <span class="c_t45_type" v-if="
  156. props.showData.choiceQuestionListData[props.showData.workIndex]
  157. .type === '2'
  158. ">{{ lang.ssMultiOpt }}</span> -->
  159. <!-- <span class="c_t45_type">{{ lang.ssChoiceQuestion }}</span> -->
  160. <div class="c_t45_echarts" :style="{
  161. width: slideWidth - 40 + 'px',
  162. }">
  163. <div id="echartsArea1" ref="echartsArea1"></div>
  164. </div>
  165. <!-- v-if="props.workArray.length > 0" -->
  166. <div class="aiAnalysis" v-if="false">
  167. <div class="ai_header">
  168. <div class="ai_title">
  169. <svg viewBox="0 0 1024 1024" width="200" height="200">
  170. <path
  171. 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">
  172. </path>
  173. <path
  174. 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">
  175. </path>
  176. </svg>{{ lang.ssAnalysis }}
  177. </div>
  178. <div class="ai_refresh" :class="{ 'disabled': currentAnalysis && currentAnalysis.loading }"
  179. @click.stop="aiAnalysisRefresh78()">
  180. {{ lang.ssAIGenerate }}
  181. <svg viewBox="0 0 1024 1024" width="200" height="200">
  182. <path
  183. 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">
  184. </path>
  185. </svg>
  186. </div>
  187. </div>
  188. <div class="ai_content" v-if="currentAnalysis && currentAnalysis.json">
  189. {{ currentAnalysis.json.text }}
  190. </div>
  191. <div class="ai_echartsData" v-if="currentAnalysis && currentAnalysis.json.keyword">
  192. {{ currentAnalysis.json.keyword }}
  193. </div>
  194. <div class="generatingContent" v-if="currentAnalysis && currentAnalysis.loading">
  195. {{ lang.ssGeneratingContent }}...</div>
  196. <div class="ai_updateTime" v-if="currentAnalysis">{{ lang.ssUpdateTime }}:{{ currentAnalysis.update_at }}
  197. </div>
  198. </div>
  199. <div class="cq_changeBtn" v-if="props.showData.choiceQuestionListData.length > 1">
  200. <div :class="{ cq_cb_disabled: props.showData.workIndex <= 0 }" @click.stop="changeWorkIndex(0)">
  201. <svg style="transform: rotate(-90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  202. <path
  203. 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"
  204. fill=""></path>
  205. </svg>
  206. </div>
  207. <span>{{ props.showData.workIndex + 1 }}/{{ props.showData.choiceQuestionListData.length }}</span>
  208. <div :class="{ cq_cb_disabled: props.showData.workIndex >= props.showData.choiceQuestionListData.length - 1 }"
  209. @click.stop="changeWorkIndex(1)">
  210. <svg style="transform: rotate(90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  211. <path
  212. 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"
  213. fill=""></path>
  214. </svg>
  215. </div>
  216. </div>
  217. </div>
  218. <!-- 问答题 -->
  219. <div class="c_t15" v-if="workDetail && workDetail.type === '15' && props.showData">
  220. <div class="c_t15_title">
  221. <div class="c_title">
  222. <span>{{ workDetail.json.answerQ }}</span>
  223. </div>
  224. </div>
  225. <span class="c_t15_type">{{ lang.ssQATest }}</span>
  226. <div class="c_t15_msg" v-if="props.roleType == 1">
  227. <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
  228. v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
  229. props.unsubmittedStudents.length
  230. }}</span></div>
  231. <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
  232. lang.ssViewSubmitStatus2 }}</span>
  233. <div class="switch_btn" v-if="props.isCreator && props.roleType == 1">
  234. <div class="switch">
  235. <Switch :value="canValue" @update:value="handleCanChange" />
  236. <span>{{ lang.ssShowResult }}</span>
  237. </div>
  238. <div class="switch">
  239. <Switch :value="likeValue" @update:value="handleLikeChange" />
  240. <span>{{ lang.ssLike }}</span>
  241. </div>
  242. </div>
  243. </div>
  244. <div class="c_t15_content" v-show="!lookWorkData">
  245. <div class="c_t15_c_item" v-for="item in processedWorkArray" :key="item.id" @click.stop="lookWork(item.id)">
  246. <div class="c_t15_c_i_top">
  247. <span>{{ item.name.charAt(0) }}</span>
  248. <div>{{ item.name }}</div>
  249. <div class="cast_sreen_btn" @click.stop="castScreen(item)"
  250. v-if="props.isCreator && props.roleType == 1 && isFollowModeActive && canValue">
  251. <IconCastScreen />
  252. {{ lang.ssCastScreen }}
  253. </div>
  254. </div>
  255. <div class="c_t15_c_i_bottom">
  256. <span v-html="item.content.answer"></span>
  257. </div>
  258. <div class="bottom_btn" v-if="likeValue">
  259. <div class="bottom_like" :class="{ 'active': item.isLikes }" @click.stop="handleLikeClick(item)">
  260. <IconThumbsUp />
  261. <span>{{ item.likesCount }}</span>
  262. </div>
  263. </div>
  264. </div>
  265. </div>
  266. <div class="aiAnalysis" style="margin-top:1rem ;"
  267. v-if="processedWorkArray.length > 0 && lookWorkData === null && workDetail.type === '15' && props.roleType == 1"
  268. @click.stop="clickContent(false)">
  269. <div class="ai_header">
  270. <div class="ai_title">
  271. <svg viewBox="0 0 1024 1024" width="200" height="200">
  272. <path
  273. 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">
  274. </path>
  275. <path
  276. 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">
  277. </path>
  278. </svg>{{ lang.ssAnalysis }}
  279. </div>
  280. <div class="ai_refresh" :class="{ 'disabled': currentAnalysis && currentAnalysis.loading }"
  281. @click.stop="aiAnalysisRefresh15()">
  282. {{ lang.ssAIGenerate }}
  283. <svg viewBox="0 0 1024 1024" width="200" height="200">
  284. <path
  285. 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">
  286. </path>
  287. </svg>
  288. </div>
  289. </div>
  290. <div class="ai_content" v-if="currentAnalysis && currentAnalysis.json">
  291. {{ currentAnalysis.json.text }}
  292. </div>
  293. <div class="ai_echartsData" v-if="currentAnalysis && currentAnalysis.json.keyword">
  294. <div class="title">{{ lang.ssKeyword }}:</div>
  295. <span v-for="(item, index) in currentAnalysis.json.keyword" :key="index">{{ item }}</span>
  296. <div class="btn" @click.stop="openEchatsDialog()">{{ lang.ssViewKeywordCloud }}</div>
  297. </div>
  298. <div class="generatingContent" v-if="currentAnalysis && currentAnalysis.generatingContent">{{
  299. lang.ssGeneratingContent }}...</div>
  300. <div class="ai_updateTime" v-if="currentAnalysis">{{ lang.ssUpdateTime }}:{{ currentAnalysis.update_at }}
  301. </div>
  302. </div>
  303. <div class="c_t15_workDetail" v-if="lookWorkData" @click.stop="clickContent(false)">
  304. <div class="c_t15_wd_top">
  305. <img src="../../../assets/img/arrow_left.png" @click.stop="lookWork('')" v-if="!isCastScreen" />
  306. <span>{{ lookWorkData.name.charAt(0) }}</span>
  307. <div>{{ lookWorkData.name }}</div>
  308. <div class="cast_sreen_btn" @click.stop="exitCastScreen"
  309. v-if="(props.isCreator && props.roleType == 1 && isCastScreen) || (!isFollowModeActive && isCastScreen)">
  310. <IconCastScreen />
  311. {{ lang.ssExitCastScreen }}
  312. </div>
  313. </div>
  314. <div class="c_t15_wd_content">
  315. <span v-html="lookWorkData.content.answer"></span>
  316. <div class="c_t15_wd_c_imageList" v-if="lookWorkData.content.fileList.length > 0">
  317. <img v-for="item in lookWorkData.content.fileList" :src="item.url" :key="item.uploadTime"
  318. @click.stop="lookImage(item.url)" />
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. <!-- 拍照 -->
  324. <div class="c_t15" v-if="workDetail && workDetail.type === '79' && props.showData">
  325. <div class="c_t15_title">
  326. <div class="c_title">
  327. <span>{{ workDetail.json.answerQ }}</span>
  328. </div>
  329. </div>
  330. <span class="c_t15_type">{{ lang.ssPhoto }}</span>
  331. <div class="c_t15_msg" v-if="props.roleType == 1">
  332. <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
  333. v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
  334. props.unsubmittedStudents.length
  335. }}</span></div>
  336. <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
  337. lang.ssViewSubmitStatus2 }}</span>
  338. <div class="switch_btn" v-if="props.isCreator && props.roleType == 1">
  339. <div class="switch">
  340. <Switch :value="canValue" @update:value="handleCanChange" />
  341. <span>{{ lang.ssShowResult }}</span>
  342. </div>
  343. <div class="switch">
  344. <Switch :value="likeValue" @update:value="handleLikeChange" />
  345. <span>{{ lang.ssLike }}</span>
  346. </div>
  347. </div>
  348. </div>
  349. <div class="downloadBtn" @click.stop="downloadAll" :class="{ disabled: downloadLoading }"
  350. v-if="props.roleType == 1">
  351. <IconDownload />
  352. <span>{{ downloadLoading ? lang.ssDownloadLoading : lang.ssBatchDownload }}</span>
  353. </div>
  354. <div class="c_t15_content" v-show="!lookWorkData">
  355. <div class="c_t15_c_item" v-for="item in processedWorkArray" :key="item.id"
  356. @click.stop="item.content && item.content.fileList.length > 0 ? lookWork(item.id) : ''">
  357. <div class="c_t15_c_i_top">
  358. <span>{{ item.name.charAt(0) }}</span>
  359. <div>{{ item.name }}</div>
  360. <div class="cast_sreen_btn" @click.stop="castScreen(item)"
  361. v-if="props.isCreator && props.roleType == 1 && isFollowModeActive && canValue">
  362. <IconCastScreen />
  363. {{ lang.ssCastScreen }}
  364. </div>
  365. </div>
  366. <div class="c_t73_c_i_bottom" v-if="item.content && item.content.fileList.length > 0">
  367. <img :src="item.content.fileList[0].url" />
  368. </div>
  369. <div class="c_t73_c_i_bottom" v-else>
  370. <span>{{ lang.ssNoPhoto }}</span>
  371. </div>
  372. <div class="bottom_btn" v-if="likeValue">
  373. <div class="bottom_like" :class="{ 'active': item.isLikes }" @click.stop="handleLikeClick(item)">
  374. <IconThumbsUp />
  375. <span>{{ item.likesCount }}</span>
  376. </div>
  377. </div>
  378. </div>
  379. </div>
  380. <div class="c_t79_workDetail" v-if="lookWorkData" @click.stop="clickContent(false)">
  381. <div class="c_t79_wd_top">
  382. <img src="../../../assets/img/arrow_left.png" @click.stop="lookWork('')" v-if="!isCastScreen" />
  383. <span>{{ lookWorkData.name.charAt(0) }}</span>
  384. <div>{{ lookWorkData.name }}</div>
  385. <div class="cast_sreen_btn" @click.stop="exitCastScreen"
  386. v-if="(props.isCreator && props.roleType == 1 && isCastScreen) || (!isFollowModeActive && isCastScreen)">
  387. <IconCastScreen />
  388. {{ lang.ssExitCastScreen }}
  389. </div>
  390. </div>
  391. <div class="c_t79_wd_content">
  392. <img :src="lookWorkData.content.fileList[lookWorkIndex].url"
  393. @click.stop="lookImage(lookWorkData.content.fileList[lookWorkIndex].url)" />
  394. </div>
  395. <!-- <div class="nextAndUpBtn" v-if="lookWorkData.content.fileList.length>1">
  396. <span :class="{no_active:lookWorkIndex==0}" @click="changelookWorkIndex(0)">{{ lang.ssPrevP }}</span>
  397. <span :class="{no_active:lookWorkData.content.fileList.length-1<=lookWorkIndex}" @click="changelookWorkIndex(1)">{{ lang.ssNextP }}</span>
  398. </div> -->
  399. <div class="cq_changeBtn" v-if="lookWorkData.content.fileList.length > 1">
  400. <div :class="{ cq_cb_disabled: lookWorkIndex <= 0 }" @click.stop="changelookWorkIndex(0)">
  401. <svg style="transform: rotate(-90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  402. <path
  403. 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"
  404. fill=""></path>
  405. </svg>
  406. </div>
  407. <span>{{ lookWorkIndex + 1 }}/{{ lookWorkData.content.fileList.length }}</span>
  408. <div :class="{ cq_cb_disabled: lookWorkIndex >= lookWorkData.content.fileList.length - 1 }"
  409. @click.stop="changelookWorkIndex(1)">
  410. <svg style="transform: rotate(90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  411. <path
  412. 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"
  413. fill=""></path>
  414. </svg>
  415. </div>
  416. </div>
  417. </div>
  418. </div>
  419. <!-- 文件上传 -->
  420. <div class="c_t15" v-if="workDetail && workDetail.type === '84' && props.showData">
  421. <div class="c_t15_title">
  422. <div class="c_title">
  423. <span>{{ workDetail.json.answerQ }}</span>
  424. </div>
  425. </div>
  426. <span class="c_t15_type">{{ lang.ssFile }}</span>
  427. <div class="c_t15_msg" v-if="props.roleType == 1">
  428. <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
  429. v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
  430. props.unsubmittedStudents.length
  431. }}</span></div>
  432. <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
  433. lang.ssViewSubmitStatus2 }}</span>
  434. <div class="switch_btn" v-if="props.isCreator && props.roleType == 1">
  435. <div class="switch">
  436. <Switch :value="canValue" @update:value="handleCanChange" />
  437. <span>{{ lang.ssShowResult }}</span>
  438. </div>
  439. <div class="switch">
  440. <Switch :value="likeValue" @update:value="handleLikeChange" />
  441. <span>{{ lang.ssLike }}</span>
  442. </div>
  443. </div>
  444. </div>
  445. <div class="downloadBtn" @click.stop="downloadAll" :class="{ disabled: downloadLoading }"
  446. v-if="props.roleType == 1">
  447. <IconDownload />
  448. <span>{{ downloadLoading ? lang.ssDownloadLoading : lang.ssBatchDownload }}</span>
  449. </div>
  450. <div class="c_t15_content" v-show="!lookWorkData">
  451. <div class="c_t15_c_item" v-for="item in processedWorkArray" :key="item.id"
  452. @click.stop="item.content && item.content.fileList.length > 0 ? lookWork(item.id) : ''">
  453. <div class="c_t15_c_i_top">
  454. <span>{{ item.name.charAt(0) }}</span>
  455. <div>{{ item.name }}</div>
  456. <div class="cast_sreen_btn" @click.stop="castScreen(item)"
  457. v-if="props.isCreator && props.roleType == 1 && isFollowModeActive && canValue">
  458. <IconCastScreen />
  459. {{ lang.ssCastScreen }}
  460. </div>
  461. </div>
  462. <div class="bottom_btn" v-if="likeValue">
  463. <div class="bottom_like" :class="{ 'active': item.isLikes }" @click.stop="handleLikeClick(item)">
  464. <IconThumbsUp />
  465. <span>{{ item.likesCount }}</span>
  466. </div>
  467. </div>
  468. </div>
  469. </div>
  470. <div class="c_t79_workDetail" v-if="lookWorkData" @click.stop="clickContent(false)">
  471. <div class="c_t79_wd_top">
  472. <img src="../../../assets/img/arrow_left.png" @click.stop="lookWork('')" v-if="!isCastScreen" />
  473. <span>{{ lookWorkData.name.charAt(0) }}</span>
  474. <div>{{ lookWorkData.name }}</div>
  475. <div class="cast_sreen_btn" @click.stop="exitCastScreen"
  476. v-if="(props.isCreator && props.roleType == 1 && isCastScreen) || (!isFollowModeActive && isCastScreen)">
  477. <IconCastScreen />
  478. {{ lang.ssExitCastScreen }}
  479. </div>
  480. </div>
  481. <div class="c_t79_wd_content">
  482. <!-- 图片 -->
  483. <img v-if="getFileType(lookWorkData.content.fileList[lookWorkIndex].url) === 'image'"
  484. :src="lookWorkData.content.fileList[lookWorkIndex].url"
  485. @click.stop="lookImage(lookWorkData.content.fileList[lookWorkIndex])" />
  486. <!-- 视频 -->
  487. <video v-else-if="getFileType(lookWorkData.content.fileList[lookWorkIndex].url) === 'video'"
  488. :src="lookWorkData.content.fileList[lookWorkIndex].url" controls
  489. @click.stop="lookImage(lookWorkData.content.fileList[lookWorkIndex])" />
  490. <!-- 文档/PDF/Office -->
  491. <div v-else class="file-preview-card" @click.stop="lookImage(lookWorkData.content.fileList[lookWorkIndex])">
  492. <div class="file-preview-icon">
  493. {{ getFileIcon(getFileType(lookWorkData.content.fileList[lookWorkIndex].url)) }}
  494. </div>
  495. <div class="file-preview-name">
  496. {{ lookWorkData.content.fileList[lookWorkIndex].name || '文件' }}
  497. </div>
  498. <div class="file-preview-action">{{ lang.ssClickToPreview }}</div>
  499. </div>
  500. </div>
  501. <!-- <div class="nextAndUpBtn" v-if="lookWorkData.content.fileList.length>1">
  502. <span :class="{no_active:lookWorkIndex==0}" @click="changelookWorkIndex(0)">{{ lang.ssPrevP }}</span>
  503. <span :class="{no_active:lookWorkData.content.fileList.length-1<=lookWorkIndex}" @click="changelookWorkIndex(1)">{{ lang.ssNextP }}</span>
  504. </div> -->
  505. <div class="cq_changeBtn" v-if="lookWorkData.content.fileList.length > 1">
  506. <div :class="{ cq_cb_disabled: lookWorkIndex <= 0 }" @click.stop="changelookWorkIndex(0)">
  507. <svg style="transform: rotate(-90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  508. <path
  509. 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"
  510. fill=""></path>
  511. </svg>
  512. </div>
  513. <span>{{ lookWorkIndex + 1 }}/{{ lookWorkData.content.fileList.length }}</span>
  514. <div :class="{ cq_cb_disabled: lookWorkIndex >= lookWorkData.content.fileList.length - 1 }"
  515. @click.stop="changelookWorkIndex(1)">
  516. <svg style="transform: rotate(90deg);" viewBox="0 0 1024 1024" version="1.1" width="200" height="200">
  517. <path
  518. 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"
  519. fill=""></path>
  520. </svg>
  521. </div>
  522. </div>
  523. </div>
  524. </div>
  525. <!-- AI应用 -->
  526. <div class="c_t72" v-if="props.showData && props.showData.toolType === 72">
  527. <div class="c_t72_title">
  528. <div class="c_title">
  529. <span>{{ lang.ssAiApp }}</span>
  530. </div>
  531. </div>
  532. <span class="c_t72_type">{{ lang.ssAiApp }}</span>
  533. <div class="c_t72_msg" v-if="props.roleType == 1">
  534. <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
  535. v-if="props.unsubmittedStudents.length > 0">/{{ props.workArray.length +
  536. props.unsubmittedStudents.length
  537. }}</span></div>
  538. <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
  539. lang.ssViewSubmitStatus2 }}</span>
  540. <div class="switch_btn" v-if="props.isCreator && props.roleType == 1">
  541. <div class="switch">
  542. <Switch :value="canValue" @update:value="handleCanChange" />
  543. <span>{{ lang.ssShowResult }}</span>
  544. </div>
  545. <div class="switch">
  546. <Switch :value="likeValue" @update:value="handleLikeChange" />
  547. <span>{{ lang.ssLike }}</span>
  548. </div>
  549. </div>
  550. </div>
  551. <div class="c_t72_content" v-show="!lookWorkData">
  552. <div class="c_t72_c_item" v-for="item in processedWorkArray" :key="item.id" @click.stop="lookWork(item.id)">
  553. <div class="c_t72_c_i_top">
  554. <span>{{ item.name.charAt(0) }}</span>
  555. <div>{{ item.name }}</div>
  556. <div class="cast_sreen_btn" @click.stop="castScreen(item)"
  557. v-if="props.isCreator && props.roleType == 1 && isFollowModeActive && canValue">
  558. <IconCastScreen />
  559. {{ lang.ssCastScreen }}
  560. </div>
  561. </div>
  562. <div class="bottom_btn" v-if="likeValue">
  563. <div class="bottom_like" :class="{ 'active': item.isLikes }" @click.stop="handleLikeClick(item)">
  564. <IconThumbsUp />
  565. <span>{{ item.likesCount }}</span>
  566. </div>
  567. </div>
  568. </div>
  569. </div>
  570. <div class="aiAnalysis" style="margin-top:1rem ;"
  571. v-if="processedWorkArray.length > 0 && lookWorkData === null && props.showData.toolType === 72 && props.roleType == 1"
  572. @click.stop="clickContent(false)">
  573. <div class="ai_header">
  574. <div class="ai_title">
  575. <svg viewBox="0 0 1024 1024" width="200" height="200">
  576. <path
  577. 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">
  578. </path>
  579. <path
  580. 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">
  581. </path>
  582. </svg>{{ lang.ssAnalysis }}
  583. </div>
  584. <div class="ai_refresh" :class="{ 'disabled': currentAnalysis && currentAnalysis.loading }"
  585. @click.stop="aiAnalysisRefresh72()">
  586. {{ lang.ssAIGenerate }}
  587. <svg viewBox="0 0 1024 1024" width="200" height="200">
  588. <path
  589. 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">
  590. </path>
  591. </svg>
  592. </div>
  593. </div>
  594. <div class="ai_content" v-if="currentAnalysis && currentAnalysis.json" v-html="currentAnalysis.json.text">
  595. </div>
  596. <div class="ai_updateTime" v-if="currentAnalysis">{{ lang.ssUpdateTime }}:{{ currentAnalysis.update_at }}
  597. </div>
  598. </div>
  599. <div class="c_t72_workDetail" v-if="lookWorkData" @click.stop="clickContent(false)">
  600. <div class="c_t72_wd_top">
  601. <img src="../../../assets/img/arrow_left.png" @click.stop="lookWork('')" v-if="!isCastScreen" />
  602. <span>{{ lookWorkData.name.charAt(0) }}</span>
  603. <div>{{ lookWorkData.name }}</div>
  604. <div class="cast_sreen_btn" @click.stop="exitCastScreen"
  605. v-if="(props.isCreator && props.roleType == 1 && isCastScreen) || (!isFollowModeActive && isCastScreen)">
  606. <IconCastScreen />
  607. {{ lang.ssExitCastScreen }}
  608. </div>
  609. </div>
  610. <div class="c_t72_wd_content">
  611. <template v-for="(item, index) in lookWorkData.content" :key="item.id">
  612. <div class="messageNodeArea" v-if="item.messages || item.imageUrls">
  613. <div class="messageNode">
  614. <div class="mn_title">{{ lang.ssNodeTitle.replace(/\*/g, String(index + 1)) }}</div>
  615. <div class="mn_content">
  616. <template v-for="(item2, index2) in item.messages" :key="`${index}-${index2}`">
  617. <div>
  618. <div class="na_m_item" v-if="item2.role == 'user' && item2.content">
  619. <div class="na_m_i_name">
  620. {{ item2.sender }}
  621. </div>
  622. <div class="na_m_i_content" v-html="item2.content"></div>
  623. </div>
  624. <div class="na_m_item" v-if="item2.role == 'assistant' && item2.content">
  625. <div class="na_m_i_name aiName">
  626. {{ item2.sender }}
  627. </div>
  628. <div class="na_m_i_content" v-html="item2.content"></div>
  629. </div>
  630. </div>
  631. </template>
  632. <template v-if="item.imageUrls" v-for="(item3, index3) in item.imageUrls"
  633. :key="`${index}-${index3}`">
  634. <div class="na_m_item">
  635. <div class="na_m_i_name">
  636. {{ item.type }}
  637. </div>
  638. <div class="na_m_i_content">
  639. <img @click.stop="lookImage(item3)" style="height: 100px;width: auto;cursor: pointer;"
  640. :src="item3" />
  641. </div>
  642. </div>
  643. </template>
  644. </div>
  645. </div>
  646. </div>
  647. </template>
  648. </div>
  649. </div>
  650. </div>
  651. <!-- H5页面 -->
  652. <div class="c_t73" v-if="props.showData && props.showData.toolType === 73">
  653. <div class="c_t73_title">
  654. <div class="c_title">
  655. <span>{{ lang.ssPageImage }}</span>
  656. </div>
  657. </div>
  658. <span class="c_t73_type">{{ lang.ssHPage }}</span>
  659. <div class="c_t73_msg" v-if="props.roleType == 1">
  660. <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
  661. v-if="props.unsubmittedStudents.length > 0">/{{
  662. props.workArray.length +
  663. props.unsubmittedStudents.length
  664. }}</span></div>
  665. <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
  666. lang.ssViewSubmitStatus2 }}</span>
  667. <div class="switch_btn" v-if="props.isCreator && props.roleType == 1">
  668. <div class="switch">
  669. <Switch :value="canValue" @update:value="handleCanChange" />
  670. <span>{{ lang.ssShowResult }}</span>
  671. </div>
  672. <div class="switch">
  673. <Switch :value="likeValue" @update:value="handleLikeChange" />
  674. <span>{{ lang.ssLike }}</span>
  675. </div>
  676. </div>
  677. </div>
  678. <div class="c_t73_content" v-show="!lookWorkData">
  679. <div class="c_t73_c_item" v-for="item in processedWorkArray" :key="item.id" @click.stop="lookWork(item.id)">
  680. <div class="c_t73_c_i_top">
  681. <span>{{ item.name.charAt(0) }}</span>
  682. <div>{{ item.name }}</div>
  683. <div class="cast_sreen_btn" @click.stop="castScreen(item)"
  684. v-if="props.isCreator && props.roleType == 1 && isFollowModeActive && canValue">
  685. <IconCastScreen />
  686. {{ lang.ssCastScreen }}
  687. </div>
  688. </div>
  689. <div class="c_t73_c_i_bottom">
  690. <img :src="item.content" />
  691. </div>
  692. <div class="bottom_btn" v-if="likeValue">
  693. <div class="bottom_like" :class="{ 'active': item.isLikes }" @click.stop="handleLikeClick(item)">
  694. <IconThumbsUp />
  695. <span>{{ item.likesCount }}</span>
  696. </div>
  697. </div>
  698. </div>
  699. </div>
  700. <div class="c_t73_workDetail" v-if="lookWorkData" @click.stop="clickContent(false)">
  701. <div class="c_t73_wd_top">
  702. <img src="../../../assets/img/arrow_left.png" @click.stop="lookWork('')" v-if="!isCastScreen" />
  703. <span>{{ lookWorkData.name.charAt(0) }}</span>
  704. <div>{{ lookWorkData.name }}</div>
  705. <div class="cast_sreen_btn" @click.stop="exitCastScreen"
  706. v-if="(props.isCreator && props.roleType == 1 && isCastScreen) || (!isFollowModeActive && isCastScreen)">
  707. <IconCastScreen />
  708. {{ lang.ssExitCastScreen }}
  709. </div>
  710. </div>
  711. <div class="c_t73_wd_content">
  712. <img :src="lookWorkData.content" />
  713. </div>
  714. </div>
  715. </div>
  716. <!-- kwl表格 -->
  717. <div class="c_t72" v-if="props.showData && props.showData.toolType === 831">
  718. <div class="c_t72_title">
  719. <div class="c_title">
  720. <span>{{ lang.ssKwlTitle }}</span>
  721. </div>
  722. </div>
  723. <span class="c_t72_type">{{ lang.ssKwlTitle }}</span>
  724. <div class="c_t72_msg" v-if="props.roleType == 1">
  725. <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
  726. v-if="props.unsubmittedStudents.length > 0">/{{
  727. props.workArray.length +
  728. props.unsubmittedStudents.length
  729. }}</span></div>
  730. <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
  731. lang.ssViewSubmitStatus2 }}</span>
  732. </div>
  733. <div class="c_t72_content" v-show="!lookWorkData">
  734. <div class="c_t72_c_item" v-for="item in processedWorkArray" :key="item.id" @click.stop="lookWork(item.id)">
  735. <div class="c_t72_c_i_top">
  736. <span>{{ item.name.charAt(0) }}</span>
  737. <div>{{ item.name }}</div>
  738. <div class="cast_sreen_btn" @click.stop="castScreen(item)"
  739. v-if="props.isCreator && props.roleType == 1 && isFollowModeActive && canValue">
  740. <IconCastScreen />
  741. {{ lang.ssCastScreen }}
  742. </div>
  743. </div>
  744. <div class="bottom_btn" v-if="likeValue">
  745. <div class="bottom_like" :class="{ 'active': item.isLikes }" @click.stop="handleLikeClick(item)">
  746. <IconThumbsUp />
  747. <span>{{ item.likesCount }}</span>
  748. </div>
  749. </div>
  750. </div>
  751. </div>
  752. <div class="aiAnalysis" style="margin-top:1rem ;"
  753. v-if="processedWorkArray.length > 0 && lookWorkData === null && props.showData.toolType == '831' && props.roleType == 1"
  754. @click.stop="clickContent(false)">
  755. <div class="ai_header">
  756. <div class="ai_title">
  757. <svg viewBox="0 0 1024 1024" width="200" height="200">
  758. <path
  759. 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">
  760. </path>
  761. <path
  762. 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">
  763. </path>
  764. </svg>{{ lang.ssAnalysis }}
  765. </div>
  766. <div class="ai_refresh" :class="{ 'disabled': currentAnalysis && currentAnalysis.loading }"
  767. @click.stop="aiAnalysisRefresh831()">
  768. {{ lang.ssAIGenerate }}
  769. <svg viewBox="0 0 1024 1024" width="200" height="200">
  770. <path
  771. 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">
  772. </path>
  773. </svg>
  774. </div>
  775. </div>
  776. <div class="ai_content" v-if="currentAnalysis && currentAnalysis.json" v-html="currentAnalysis.json.text">
  777. </div>
  778. <div class="ai_updateTime" v-if="currentAnalysis">{{ lang.ssUpdateTime }}:{{ currentAnalysis.update_at }}
  779. </div>
  780. </div>
  781. <div class="c_t72_workDetail" v-if="lookWorkData" @click.stop="clickContent(false)">
  782. <div class="c_t72_wd_top">
  783. <img src="../../../assets/img/arrow_left.png" @click.stop="lookWork('')" v-if="!isCastScreen" />
  784. <span>{{ lookWorkData.name.charAt(0) }}</span>
  785. <div>{{ lookWorkData.name }}</div>
  786. <div class="cast_sreen_btn" @click.stop="exitCastScreen"
  787. v-if="(props.isCreator && props.roleType == 1 && isCastScreen) || (!isFollowModeActive && isCastScreen)">
  788. <IconCastScreen />
  789. {{ lang.ssExitCastScreen }}
  790. </div>
  791. </div>
  792. <div class="c_t831_wd_content">
  793. <!-- KWL 三栏 -->
  794. <div class="kwl-grid" v-if="lookWorkData.content">
  795. <!-- K - 已知 -->
  796. <div class="kwl-col kwl-col--k">
  797. <div class="kwl-col__header">
  798. <span class="kwl-col__badge">K</span>
  799. <span class="kwl-col__label">{{ lang.ssKwlKnown }}</span>
  800. </div>
  801. <div class="kwl-col__body">
  802. <template v-if="lookWorkData.content.know.length">
  803. <div v-for="(item, idx) in lookWorkData.content.know" :key="'k-' + idx" class="kwl-item">{{ item }}
  804. </div>
  805. </template>
  806. <div v-else class="kwl-empty">{{ lang.ssNone }}</div>
  807. </div>
  808. </div>
  809. <!-- W - 想知 -->
  810. <div class="kwl-col kwl-col--w">
  811. <div class="kwl-col__header">
  812. <span class="kwl-col__badge">W</span>
  813. <span class="kwl-col__label">{{ lang.ssKwlWant }}</span>
  814. </div>
  815. <div class="kwl-col__body">
  816. <template v-if="lookWorkData.content.want.length">
  817. <div v-for="(item, idx) in lookWorkData.content.want" :key="'w-' + idx" class="kwl-item">{{ item }}
  818. </div>
  819. </template>
  820. <div v-else class="kwl-empty">{{ lang.ssNone }}</div>
  821. </div>
  822. </div>
  823. <!-- L - 已学 -->
  824. <div class="kwl-col kwl-col--l">
  825. <div class="kwl-col__header">
  826. <span class="kwl-col__badge">L</span>
  827. <span class="kwl-col__label">{{ lang.ssKwlLearned }}</span>
  828. </div>
  829. <div class="kwl-col__body">
  830. <template v-if="lookWorkData.content.learned.length">
  831. <div v-for="(item, idx) in lookWorkData.content.learned" :key="'l-' + idx" class="kwl-item">{{ item
  832. }}
  833. </div>
  834. </template>
  835. <div v-else class="kwl-empty">{{ lang.ssNone }}</div>
  836. </div>
  837. </div>
  838. </div>
  839. <!-- 学习反思 -->
  840. <div class="kwl-reflection">
  841. <div class="kwl-reflection__header">
  842. <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  843. <path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" />
  844. </svg>
  845. <span>{{ lang.ssKwlReflection }}</span>
  846. </div>
  847. <div class="kwl-reflection__body">
  848. {{ lookWorkData.content.reflection ? lookWorkData.content.reflection : lang.ssNone }}
  849. </div>
  850. </div>
  851. </div>
  852. </div>
  853. </div>
  854. <!-- 六顶思考帽 -->
  855. <div class="c_t72" v-if="props.showData && props.showData.toolType === 832">
  856. <div class="c_t72_title">
  857. <div class="c_title">
  858. <span>{{ lang.ssSixHatTitle }}</span>
  859. </div>
  860. </div>
  861. <span class="c_t72_type">{{ lang.ssSixHatTitle }}</span>
  862. <div class="c_t72_msg" v-if="props.roleType == 1">
  863. <div>{{ lang.ssAnswerCount }} {{ props.workArray.length }}<span
  864. v-if="props.unsubmittedStudents.length > 0">/{{
  865. props.workArray.length +
  866. props.unsubmittedStudents.length
  867. }}</span></div>
  868. <span v-if="props.unsubmittedStudents.length > 0" @click.stop="viewUnsubmittedStudents()">{{
  869. lang.ssViewSubmitStatus2 }}</span>
  870. </div>
  871. <div class="c_t72_content" v-show="!lookWorkData">
  872. <div class="c_t72_c_item" v-for="item in processedWorkArray" :key="item.id" @click.stop="lookWork(item.id)">
  873. <div class="c_t72_c_i_top">
  874. <span>{{ item.name.charAt(0) }}</span>
  875. <div>{{ item.name }}</div>
  876. <div class="cast_sreen_btn" @click.stop="castScreen(item)"
  877. v-if="props.isCreator && props.roleType == 1 && isFollowModeActive && canValue">
  878. <IconCastScreen />
  879. {{ lang.ssCastScreen }}
  880. </div>
  881. </div>
  882. <div class="bottom_btn" v-if="likeValue">
  883. <div class="bottom_like" :class="{ 'active': item.isLikes }" @click.stop="handleLikeClick(item)">
  884. <IconThumbsUp />
  885. <span>{{ item.likesCount }}</span>
  886. </div>
  887. </div>
  888. </div>
  889. </div>
  890. <!-- processedWorkArray.length > 0 && lookWorkData === null && props.showData.toolType == '832' && props.roleType == 1 -->
  891. <div class="aiAnalysis" style="margin-top:1rem ;"
  892. v-if="processedWorkArray.length > 0 && lookWorkData === null && props.showData.toolType == '832' && props.roleType == 1"
  893. @click.stop="clickContent(false)">
  894. <div class="ai_header">
  895. <div class="ai_title">
  896. <svg viewBox="0 0 1024 1024" width="200" height="200">
  897. <path
  898. 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">
  899. </path>
  900. <path
  901. 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">
  902. </path>
  903. </svg>{{ lang.ssAnalysis }}
  904. </div>
  905. <div class="ai_refresh" :class="{ 'disabled': currentAnalysis && currentAnalysis.loading }"
  906. @click.stop="aiAnalysisRefresh832()">
  907. {{ lang.ssAIGenerate }}
  908. <svg viewBox="0 0 1024 1024" width="200" height="200">
  909. <path
  910. 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">
  911. </path>
  912. </svg>
  913. </div>
  914. </div>
  915. <div class="ai_content" v-if="currentAnalysis && currentAnalysis.json" v-html="currentAnalysis.json.text">
  916. </div>
  917. <div class="ai_updateTime" v-if="currentAnalysis">{{ lang.ssUpdateTime }}:{{ currentAnalysis.update_at }}
  918. </div>
  919. </div>
  920. <div class="c_t72_workDetail" v-if="lookWorkData" @click.stop="clickContent(false)">
  921. <div class="c_t72_wd_top">
  922. <img src="../../../assets/img/arrow_left.png" @click.stop="lookWork('')" v-if="!isCastScreen" />
  923. <span>{{ lookWorkData.name.charAt(0) }}</span>
  924. <div>{{ lookWorkData.name }}</div>
  925. <div class="cast_sreen_btn" @click.stop="exitCastScreen"
  926. v-if="(props.isCreator && props.roleType == 1 && isCastScreen) || (!isFollowModeActive && isCastScreen)">
  927. <IconCastScreen />
  928. {{ lang.ssExitCastScreen }}
  929. </div>
  930. </div>
  931. <div class="c_t832_wd_content" v-if="lookWorkData.content">
  932. <!-- 成员列表 -->
  933. <div class="sixhat-members" v-if="lookWorkData.content.members && lookWorkData.content.members.length">
  934. <div class="sixhat-members__header">
  935. <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  936. <path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" />
  937. <circle cx="9" cy="7" r="4" />
  938. <path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" />
  939. </svg>
  940. <span>{{ lang.ssSixHatGroupWork }}</span>
  941. </div>
  942. <div class="sixhat-members__list">
  943. <span v-for="(m, idx) in lookWorkData.content.members" :key="'m-' + idx" class="sixhat-member-chip">{{ m.name }}</span>
  944. </div>
  945. </div>
  946. <!-- 场景描述 -->
  947. <div class="sixhat-scenario" v-if="lookWorkData.content.scenario">
  948. <div class="sixhat-scenario__text">{{ lookWorkData.content.scenario }}</div>
  949. </div>
  950. <!-- 六顶思考帽内容 -->
  951. <div class="sixhat-grid">
  952. <div v-for="hat in sixHatList" :key="hat.key" class="sixhat-col" :class="'sixhat-col--' + hat.key">
  953. <div class="sixhat-col__header">
  954. <span class="sixhat-col__dot"></span>
  955. <span class="sixhat-col__label">{{ hat.label }}</span>
  956. </div>
  957. <div class="sixhat-col__body">
  958. <div v-if="hat.content" class="sixhat-item">{{ hat.content }}</div>
  959. <div v-else class="kwl-empty">{{ lang.ssNone }}</div>
  960. </div>
  961. </div>
  962. </div>
  963. </div>
  964. </div>
  965. </div>
  966. </div>
  967. <previewImageTool ref="previewImageToolRef" />
  968. <!-- 视频预览弹窗 -->
  969. <Teleport to="body">
  970. <div v-if="videoPreviewVisible" class="file-preview-modal" @click.self="closeVideoPreview">
  971. <div class="file-preview-close" @click="closeVideoPreview">
  972. <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  973. <line x1="18" y1="6" x2="6" y2="18" />
  974. <line x1="6" y1="6" x2="18" y2="18" />
  975. </svg>
  976. </div>
  977. <video :src="videoPreviewUrl" controls autoplay class="file-preview-video"></video>
  978. </div>
  979. </Teleport>
  980. <!-- 文档预览弹窗 -->
  981. <Teleport to="body">
  982. <div v-if="docPreviewVisible" class="file-preview-modal" @click.self="closeDocPreview">
  983. <div class="file-preview-close" @click="closeDocPreview">
  984. <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
  985. <line x1="18" y1="6" x2="6" y2="18" />
  986. <line x1="6" y1="6" x2="18" y2="18" />
  987. </svg>
  988. </div>
  989. <iframe v-if="docPreviewType === 'pdf' || docPreviewType === 'office'"
  990. :src="getDocPreviewUrl(docPreviewType, docPreviewUrl)" class="file-preview-frame" frameborder="0"></iframe>
  991. <div v-else class="file-preview-office">
  992. <div class="file-preview-office-icon">📎</div>
  993. <div class="file-preview-office-name">{{ docPreviewUrl.split('/').pop() }}</div>
  994. <a :href="docPreviewUrl" target="_blank" class="file-preview-office-link">
  995. {{ lang.ssClickToOpen }}
  996. </a>
  997. </div>
  998. </div>
  999. </Teleport>
  1000. <selectUserDialog ref="selectUserDialogRef" />
  1001. <echartsDialog ref="echartsDialogRef" />
  1002. </div>
  1003. </template>
  1004. <script setup lang="ts">
  1005. import { computed, ref, watch, onUnmounted, nextTick, onMounted } from 'vue'
  1006. import * as echarts from 'echarts'
  1007. import previewImageTool from '../../components/tool/previewImageTool.vue'
  1008. import MarkdownIt from 'markdown-it'
  1009. import useImport from '@/hooks/useImport'
  1010. import { lang } from '@/main'
  1011. import selectUserDialog from './selectUserDialog.vue'
  1012. import echartsDialog from './echartsDialog.vue'
  1013. import { chat_stream, chat_no_stream } from '@/tools/aiChat'
  1014. import axios from '@/services/config'
  1015. import Switch from '@/components/Switch.vue'
  1016. import { likeWork, addPPTOp2 } from '@/services/course'
  1017. const props = defineProps<{
  1018. visible: number[];
  1019. workIndex: number;
  1020. slideWidth: number;
  1021. slideHeight: number;
  1022. slideIndex: number;
  1023. showData: any;
  1024. workArray: any[];
  1025. unsubmittedStudents: any[];
  1026. courseDetail: any;
  1027. userId: string;
  1028. workId: string;
  1029. cid: string;
  1030. workUrl: string;
  1031. roleType: number;
  1032. resultArray: { [key: string]: any };
  1033. isCreator: boolean;
  1034. isFollowModeActive: boolean;
  1035. courseid: string;
  1036. }>()
  1037. const emit = defineEmits<{
  1038. (e: 'update:visible', v: number[]): void;
  1039. (e: 'changeWorkIndex', v: number): void;
  1040. (e: 'setIsResultArray', v: boolean, key: string): void;
  1041. (e: 'successLike'): void;
  1042. (e: 'sendMessage', v: any): void;
  1043. }>()
  1044. const visible = computed({
  1045. get: () => props.visible,
  1046. set: (v: number[]) => emit('update:visible', v),
  1047. })
  1048. const workDetail = computed(() => {
  1049. if (props.showData) {
  1050. return props.showData.workDetail
  1051. }
  1052. return null
  1053. })
  1054. const canValue = ref(props.resultArray?.can ?? false)
  1055. // 选择题正确率
  1056. const correctRate = computed(() => {
  1057. if (!props.showData?.choiceQuestionListData?.length) return null
  1058. const _work = props.showData.choiceQuestionListData[props.showData.workIndex]
  1059. if (!_work?.choiceUser?.length) return null
  1060. let total = 0
  1061. let correct = 0
  1062. _work.choiceUser.forEach((op: any) => {
  1063. total += (op.user?.length || 0)
  1064. if (op.isAnswer) correct += (op.user?.length || 0)
  1065. })
  1066. if (total === 0) return null
  1067. return Math.round((correct / total) * 100)
  1068. })
  1069. watch(() => props.resultArray?.can, (newVal) => {
  1070. canValue.value = newVal
  1071. })
  1072. const likeValue = ref(props.resultArray?.like ?? false)
  1073. watch(() => props.resultArray?.like, (newVal) => {
  1074. likeValue.value = newVal
  1075. })
  1076. const anonymousValue = ref(props.resultArray?.anonymous ?? false)
  1077. watch(() => props.resultArray?.anonymous, (newVal) => {
  1078. anonymousValue.value = newVal
  1079. })
  1080. const answerValue = ref(props.resultArray?.answer ?? false)
  1081. watch(() => props.resultArray?.answer, (newVal) => {
  1082. answerValue.value = newVal
  1083. setEchartsArea1()
  1084. })
  1085. const handleCanChange = (value: boolean) => {
  1086. console.log(value)
  1087. console.log(props.resultArray)
  1088. if (workDetail.value.type === '45') {
  1089. handleAnswerChange(value)
  1090. }
  1091. emit('setIsResultArray', value, 'can')
  1092. }
  1093. const handleLikeChange = (value: boolean) => {
  1094. if (value && !canValue.value) {
  1095. emit('setIsResultArray', true, 'can')
  1096. }
  1097. console.log(value)
  1098. console.log(props.resultArray)
  1099. emit('setIsResultArray', value, 'like')
  1100. }
  1101. const handleAnonymousChange = (value: boolean) => {
  1102. console.log(value)
  1103. console.log(props.resultArray)
  1104. emit('setIsResultArray', value, 'anonymous')
  1105. }
  1106. const handleAnswerChange = (value: boolean) => {
  1107. console.log(value)
  1108. console.log(props.resultArray)
  1109. emit('setIsResultArray', value, 'answer')
  1110. }
  1111. import _ from 'lodash'
  1112. import type { workerData } from 'worker_threads'
  1113. const handleLikeClick = _.debounce((item: any) => {
  1114. likeWork({
  1115. wid: item.id,
  1116. lid: props.userId,
  1117. t: 1,
  1118. c: ''
  1119. })
  1120. emit('successLike')
  1121. }, 300)
  1122. // 预览图片组件
  1123. const previewImageToolRef = ref<any>(null)
  1124. // 选择用户组件
  1125. const selectUserDialogRef = ref<any>(null)
  1126. // 词云图组件
  1127. const echartsDialogRef = ref<any>(null)
  1128. // ai分析数据
  1129. const aiAnalysisData = ref<Array<any>>([])
  1130. const md = new MarkdownIt({
  1131. html: true,
  1132. })
  1133. const { getFile } = useImport()
  1134. // 判断是否是 URL 链接
  1135. const isUrl = (str: string): boolean => {
  1136. try {
  1137. const url = new URL(str)
  1138. return (url.protocol === 'http:' || url.protocol === 'https:') && str.includes('json')
  1139. }
  1140. catch {
  1141. return false
  1142. }
  1143. }
  1144. // 从链接获取文件内容
  1145. const loadContentFromUrl = async (url: string): Promise<string> => {
  1146. try {
  1147. const fileData = await getFile(url)
  1148. if (fileData && fileData.data) {
  1149. // 将 ArrayBuffer 转为字符串
  1150. const uint8Array = new Uint8Array(fileData.data)
  1151. const jsonStr = new TextDecoder('utf-8').decode(uint8Array)
  1152. return jsonStr
  1153. }
  1154. return ''
  1155. }
  1156. catch (error) {
  1157. console.error('获取文件内容失败:', error)
  1158. return ''
  1159. }
  1160. }
  1161. // 处理单个作业内容
  1162. const processWorkContent = async (content: string, toolType: number): Promise<any> => {
  1163. let contentToParse = content
  1164. // 如果是链接,先获取文件内容
  1165. if (isUrl(content)) {
  1166. contentToParse = await loadContentFromUrl(content)
  1167. }
  1168. if (!contentToParse) {
  1169. return null
  1170. }
  1171. try {
  1172. if ([45, 15, 78, 79, 84, 831, 832].includes(toolType)) {
  1173. return JSON.parse(decodeURIComponent(contentToParse))
  1174. }
  1175. else if (toolType === 72) {
  1176. const parsed = JSON.parse(contentToParse)
  1177. if (Array.isArray(parsed)) {
  1178. parsed.forEach((item: any) => {
  1179. if (item.messages && item.messages.length) {
  1180. item.messages.forEach((item2: any) => {
  1181. // 如果已经包含html标签则不再渲染
  1182. if (
  1183. !/^(\s*<[^>]+>.*<\/[^>]+>\s*|<[^>]+\/>\s*)$/s.test(
  1184. item2.content.trim()
  1185. )
  1186. ) {
  1187. item2.content = item2.content.replace(/&lt;/g, '<').replace(/&quot;/g, '"').replace(/&gt;/g, '>')
  1188. item2.content = md.render(item2.content)
  1189. }
  1190. })
  1191. }
  1192. })
  1193. }
  1194. return parsed
  1195. }
  1196. return contentToParse
  1197. }
  1198. catch (error) {
  1199. console.error('解析内容失败:', error)
  1200. return null
  1201. }
  1202. }
  1203. const processedWorkArray = ref<any[]>([])
  1204. // 监听 workArray 和 showData 变化
  1205. watch(
  1206. () => [props.workArray, props.showData?.toolType],
  1207. async () => {
  1208. if (props.workArray && props.showData) {
  1209. const _workArray = JSON.parse(JSON.stringify(props.workArray))
  1210. // 处理每个作业内容
  1211. for (const i of _workArray) {
  1212. if (i.content) {
  1213. const processedContent = await processWorkContent(i.content, props.showData.toolType)
  1214. if (processedContent !== null) {
  1215. i.content = processedContent
  1216. }
  1217. }
  1218. }
  1219. processedWorkArray.value = _workArray
  1220. handleChartResize()
  1221. }
  1222. else {
  1223. processedWorkArray.value = []
  1224. }
  1225. },
  1226. { immediate: true, deep: true }
  1227. )
  1228. // 关闭对应的作业详细页面
  1229. const closeSlideIndex = () => {
  1230. visible.value = visible.value.filter((v) => v !== props.slideIndex)
  1231. }
  1232. // 切换题目
  1233. const changeWorkIndex = (type: number) => {
  1234. emit('changeWorkIndex', type)
  1235. // console.log(props.workIndex, props.showData.choiceQuestionListData.length)
  1236. // if (type === 0 && props.workIndex > 0) {
  1237. // emit('changeWorkIndex', 0)
  1238. // }
  1239. // else if (type === 1 && props.workIndex < props.showData.choiceQuestionListData.length) {
  1240. // emit('changeWorkIndex', props.workIndex + 1)
  1241. // }
  1242. }
  1243. // 选择题图表div
  1244. const echartsArea1 = ref<any>(null)
  1245. // 查看的作业详细id
  1246. const lookWorkDetail = ref<string>('')
  1247. // 下载加载状态
  1248. const downloadLoading = ref(false)
  1249. // 查看作业详细的数据
  1250. const lookWorkData = computed(() => {
  1251. let _result = null
  1252. if (lookWorkDetail.value && processedWorkArray.value.length > 0) {
  1253. const _workFind = processedWorkArray.value.find(
  1254. (i: any) => i.id === lookWorkDetail.value
  1255. )
  1256. if (_workFind) {
  1257. _result = _workFind
  1258. }
  1259. }
  1260. console.log(_result)
  1261. return _result
  1262. })
  1263. // 六顶思考帽配置
  1264. const hatConfig = [
  1265. { key: 'white', label: lang.ssSixHatWhite, color: '#9ca3af', bg: '#f3f4f6' },
  1266. { key: 'red', label: lang.ssSixHatRed, color: '#ef4444', bg: '#fef2f2' },
  1267. { key: 'black', label: lang.ssSixHatBlack, color: '#1f2937', bg: '#374151' },
  1268. { key: 'yellow', label: lang.ssSixHatYellow, color: '#f59e0b', bg: '#fffbeb' },
  1269. { key: 'green', label: lang.ssSixHatGreen, color: '#22c55e', bg: '#f0fdf4' },
  1270. { key: 'blue', label: lang.ssSixHatBlue, color: '#3b82f6', bg: '#eff6ff' },
  1271. ]
  1272. // 六顶思考帽内容列表(根据学生选择 hats 过滤)
  1273. const sixHatList = computed(() => {
  1274. if (!lookWorkData.value?.content) return []
  1275. const hats = lookWorkData.value.content.hats || []
  1276. const c = lookWorkData.value.content.hatContent || {}
  1277. return hatConfig
  1278. .filter(h => hats.includes(h.key))
  1279. .map(h => ({ ...h, content: c[h.key] || '' }))
  1280. })
  1281. // 判断文件类型
  1282. const getFileType = (url: string): 'image' | 'video' | 'pdf' | 'office' | 'other' => {
  1283. if (!url) return 'other'
  1284. const lower = url.toLowerCase().split('?')[0]
  1285. if (/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/.test(lower)) return 'image'
  1286. if (/\.(mp4|webm|ogg|mov|avi)$/.test(lower)) return 'video'
  1287. if (/\.(pdf)$/.test(lower)) return 'pdf'
  1288. if (/\.(doc|docx|xls|xlsx|ppt|pptx)$/.test(lower)) return 'office'
  1289. return 'other'
  1290. }
  1291. const getFileIcon = (type: string) => {
  1292. switch (type) {
  1293. case 'pdf': return '📄'
  1294. case 'office': return '📝'
  1295. case 'video': return '🎬'
  1296. default: return '📎'
  1297. }
  1298. }
  1299. // 查看文件(图片/视频/文档)
  1300. const videoPreviewVisible = ref(false)
  1301. const videoPreviewUrl = ref('')
  1302. const docPreviewVisible = ref(false)
  1303. const docPreviewUrl = ref('')
  1304. const docPreviewType = ref('')
  1305. // 文档预览(PDF / Office 均使用 Microsoft Office Online Viewer)
  1306. const getDocPreviewUrl = (type: string, url: string) => {
  1307. if (type === 'office') {
  1308. return `https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(url)}&time=${new Date().getTime()}`
  1309. }
  1310. else if (type === 'pdf') {
  1311. return `https://cloud.cocorobo.cn/pdf.js/web/viewer.html?file=${encodeURIComponent(url)}&time=${new Date().getTime()}`
  1312. }
  1313. return url
  1314. }
  1315. const lookImage = (file: any) => {
  1316. const url = typeof file === 'string' ? file : file?.url
  1317. if (!url) return
  1318. const type = getFileType(url)
  1319. if (type === 'image') {
  1320. if (previewImageToolRef.value) {
  1321. previewImageToolRef.value.previewImage(url)
  1322. }
  1323. }
  1324. else if (type === 'video') {
  1325. videoPreviewUrl.value = url
  1326. videoPreviewVisible.value = true
  1327. document.body.style.overflow = 'hidden'
  1328. }
  1329. else if (type === 'pdf' || type === 'office') {
  1330. docPreviewUrl.value = url
  1331. docPreviewType.value = type
  1332. docPreviewVisible.value = true
  1333. document.body.style.overflow = 'hidden'
  1334. }
  1335. else {
  1336. window.open(url, '_blank')
  1337. }
  1338. }
  1339. const closeVideoPreview = () => {
  1340. videoPreviewVisible.value = false
  1341. document.body.style.overflow = ''
  1342. }
  1343. const closeDocPreview = () => {
  1344. docPreviewVisible.value = false
  1345. document.body.style.overflow = ''
  1346. }
  1347. const lookWorkIndex = ref<number>(0)
  1348. // 查看作业
  1349. const lookWork = (id: string) => {
  1350. lookWorkIndex.value = 0
  1351. lookWorkDetail.value = id
  1352. if (isCastScreen.value && !id) {
  1353. emit('sendMessage', {
  1354. type: 'exit_cast_screen',
  1355. courseid: props.courseid,
  1356. })
  1357. isCastScreen.value = false
  1358. }
  1359. }
  1360. const isCastScreen = ref<boolean>(false)
  1361. // 投屏
  1362. const castScreen = (item: any) => {
  1363. lookWorkIndex.value = 0
  1364. lookWorkDetail.value = item.id
  1365. isCastScreen.value = true
  1366. addPPTOp2({
  1367. id: props.courseid,
  1368. userid: props.userid || '',
  1369. type: '5',
  1370. index: item.id, // 获取当前ppt页面iframe的id
  1371. data: item.id, // 进入作业页面到提交的耗时(秒)
  1372. }).then(res => {
  1373. console.log('res', res)
  1374. })
  1375. emit('sendMessage', {
  1376. type: 'cast_screen',
  1377. courseid: props.courseid,
  1378. workerData: item
  1379. })
  1380. console.log(item)
  1381. }
  1382. // 退出投屏
  1383. const exitCastScreen = () => {
  1384. if (props.roleType != 1) {
  1385. isCastScreen.value = false
  1386. }
  1387. lookWork('')
  1388. }
  1389. // 暴露给父级(Student/index.vue)用 ref 调用
  1390. defineExpose({ castScreen, exitCastScreen })
  1391. // 切换查看作业图片
  1392. const changelookWorkIndex = (type: number) => {
  1393. if (type === 0 && lookWorkIndex.value > 0) {
  1394. lookWorkIndex.value = lookWorkIndex.value - 1
  1395. }
  1396. else if (type === 1 && lookWorkIndex.value < lookWorkData.value.content.fileList.length - 1) {
  1397. lookWorkIndex.value = lookWorkIndex.value + 1
  1398. }
  1399. }
  1400. // 选择题图表实例
  1401. const myChart = ref<any>(null)
  1402. // resize防抖定时器
  1403. let resizeTimer: ReturnType<typeof setTimeout> | null = null
  1404. // 处理ECharts resize
  1405. const handleChartResize = () => {
  1406. // 清除之前的定时器
  1407. if (resizeTimer) {
  1408. clearTimeout(resizeTimer)
  1409. }
  1410. resizeTimer = setTimeout(() => {
  1411. nextTick(() => {
  1412. if (
  1413. myChart.value &&
  1414. typeof myChart.value.resize === 'function' &&
  1415. !myChart.value.isDisposed()
  1416. ) {
  1417. try {
  1418. myChart.value.resize()
  1419. }
  1420. catch (e) {
  1421. // console.error('myChart resize error:', e)
  1422. // 如果resize失败,重新初始化图表
  1423. if (
  1424. props.showData &&
  1425. props.showData.workDetail &&
  1426. (props.showData.workDetail.type === '45' || props.showData.workDetail.type === '78')
  1427. ) {
  1428. setEchartsArea1()
  1429. }
  1430. }
  1431. }
  1432. })
  1433. }, 200) // 防抖延迟200ms
  1434. }
  1435. // 设置选择题图表
  1436. const setEchartsArea1 = () => {
  1437. // 如果已有实例且未销毁,先销毁
  1438. if (myChart.value && !myChart.value.isDisposed()) {
  1439. myChart.value.dispose()
  1440. }
  1441. if (echartsArea1.value) {
  1442. myChart.value = echarts.init(echartsArea1.value)
  1443. }
  1444. else {
  1445. myChart.value = null
  1446. }
  1447. if (myChart.value) {
  1448. const _work =
  1449. props.showData.choiceQuestionListData[props.showData.workIndex]
  1450. console.log('_work', _work)
  1451. // 修正版,处理xAxis.data内为图片对象的case,formatter始终只拿到src或自定义label,保证无[object Object]问题
  1452. const option = {
  1453. tooltip: {
  1454. show: false, // 禁用鼠标移动到柱体时的内容显示
  1455. },
  1456. yAxis: {
  1457. show: false, // 不显示最左边的y轴
  1458. },
  1459. xAxis: {
  1460. data: [],
  1461. axisLabel: {
  1462. color: function(option: string, idx: number) {
  1463. console.log(option)
  1464. console.log('answerValue.value', answerValue.value)
  1465. const item = _work.choiceUser[idx]
  1466. if (item && item.isAnswer && answerValue.value) {
  1467. // return '#21ee21'
  1468. return '#29AE2B'
  1469. }
  1470. return 'rgba(0, 0, 0, 0.9)'
  1471. },
  1472. fontWeight: 600,
  1473. fontSize: 17,
  1474. lineHeight: 20,
  1475. interval: 0,
  1476. formatter: function(value: any, idx: number) {
  1477. // 如果是字符串且格式为JSON(图片),则解析处理
  1478. if (typeof value === 'string') {
  1479. try {
  1480. const obj = JSON.parse(value)
  1481. if (obj && typeof obj === 'object' && obj.imgType && obj.src) {
  1482. return '{img' + idx + '|}'
  1483. }
  1484. }
  1485. catch (e) {
  1486. // 非JSON字符串,直接返回
  1487. // 如果文本文字超过8个字,换行
  1488. if (typeof value === 'string') {
  1489. // 判断value是否全是英文
  1490. const isAllEnglish = /^[a-zA-Z0-9\s\p{P}]+$/u.test(value)
  1491. let displayValue = value
  1492. const maxLength = isAllEnglish ? 30 : 20
  1493. const lineLength = isAllEnglish ? 16 : 8
  1494. if (value.length > maxLength) {
  1495. displayValue = value.substr(0, maxLength) + '...'
  1496. }
  1497. // 换行处理
  1498. let output = ''
  1499. for (let i = 0; i < displayValue.length; i += lineLength) {
  1500. output += displayValue.substr(i, lineLength)
  1501. if (i + lineLength < displayValue.length) {
  1502. output += '\n'
  1503. }
  1504. }
  1505. return output
  1506. }
  1507. return value
  1508. }
  1509. return value
  1510. }
  1511. // 兼容老格式(容错):value本身是对象,并有图片信息
  1512. if (
  1513. value &&
  1514. typeof value === 'object' &&
  1515. value.imgType &&
  1516. value.src
  1517. ) {
  1518. return '{img' + idx + '|}'
  1519. }
  1520. // 其他类型直接空
  1521. return ''
  1522. },
  1523. rich: (() => {
  1524. // 动态生成所有图片的 rich 格式
  1525. const richObj: any = {}
  1526. _work.choiceUser.forEach((op: any, idx: number) => {
  1527. if (
  1528. op.option &&
  1529. typeof op.option === 'object' &&
  1530. op.option.imgType &&
  1531. op.option.src
  1532. ) {
  1533. richObj['img' + idx] = {
  1534. height: 40,
  1535. width: 40,
  1536. align: 'center',
  1537. backgroundColor: {
  1538. image: op.option.src,
  1539. },
  1540. }
  1541. }
  1542. })
  1543. return richObj
  1544. })(),
  1545. },
  1546. },
  1547. series: [
  1548. {
  1549. name: '',
  1550. type: 'bar',
  1551. data: [],
  1552. barMaxWidth: 80, // 柱体最宽80px,数量多则自适应
  1553. itemStyle: {
  1554. color: 'rgba(252, 207, 0, 1)',
  1555. },
  1556. label: {
  1557. show: true,
  1558. position: 'top',
  1559. color: 'rgba(116, 139, 115, 1)',
  1560. fontSize: 22,
  1561. fontWeight: 500,
  1562. lineHeight: 24,
  1563. },
  1564. },
  1565. ],
  1566. }
  1567. _work.choiceUser.forEach((i: any, idx: number) => {
  1568. // 如果是图片,存src对象,否则为字符串
  1569. if (
  1570. i.option &&
  1571. typeof i.option === 'object' &&
  1572. i.option.imgType &&
  1573. i.option.src
  1574. ) {
  1575. (option.xAxis.data as any[]).push(
  1576. JSON.stringify({ imgType: i.option.imgType, src: i.option.src })
  1577. ) // 仅保留相关字段
  1578. }
  1579. else if (typeof i.option === 'string') {
  1580. (option.xAxis.data as any[]).push(i.option)
  1581. }
  1582. else {
  1583. (option.xAxis.data as any[]).push('')
  1584. }
  1585. const isCorrect = i.isAnswer && answerValue.value
  1586. ; (option.series[0].data as any[]).push({
  1587. value: i.user.length,
  1588. itemStyle: {
  1589. color: isCorrect ? '#29AE2B' : 'rgba(252, 207, 0, 1)',
  1590. },
  1591. label: {
  1592. show: true,
  1593. position: 'top',
  1594. color: isCorrect ? '#29AE2B' : 'rgba(116, 139, 115, 1)',
  1595. fontSize: 22,
  1596. fontWeight: 500,
  1597. lineHeight: 24,
  1598. },
  1599. })
  1600. })
  1601. // console.log(option)
  1602. // {
  1603. // title: {
  1604. // text: 'ECharts 入门示例'
  1605. // },
  1606. // tooltip: {},
  1607. // xAxis: {
  1608. // data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
  1609. // },
  1610. // yAxis: {},
  1611. // series: [
  1612. // {
  1613. // name: '销量',
  1614. // type: 'bar',
  1615. // data: [5, 20, 36, 10, 10, 20]
  1616. // }
  1617. // ]
  1618. // }
  1619. myChart.value.setOption(option)
  1620. myChart.value.off('click')
  1621. myChart.value.on('click', (params: any) => {
  1622. const idx = params.dataIndex
  1623. const selectedOption = _work.choiceUser[idx]
  1624. if (selectedOption && selectUserDialogRef.value) {
  1625. // console.log(selectedOption)
  1626. console.log('selectedOption', selectedOption)
  1627. const selectedOption2 = { ...selectedOption }
  1628. if (anonymousValue.value) {
  1629. selectedOption2.user = selectedOption2.user.map((item: any, index: number) => lang.ssAnonymousUser + (index + 1))
  1630. }
  1631. selectUserDialogRef.value.open(`${lang.ssSelectUser.replace('{a}', '<span>' + selectedOption2.index + '</span>')}`, selectedOption2)
  1632. }
  1633. })
  1634. }
  1635. }
  1636. // 获取分析
  1637. const getAnalysis = () => {
  1638. if (!props.workId) {
  1639. return
  1640. }
  1641. console.log('props.workId', props.workId)
  1642. const params = {
  1643. pid: props.workId + (props.cid ? ',' + props.cid : ''),
  1644. }
  1645. axios.get('https://pbl.cocorobo.cn/api/pbl/select_pptAnalysisByPid?pid=' + params.pid).then(res => {
  1646. const data = res[0]
  1647. if (data.length) {
  1648. data.forEach((item: any) => {
  1649. try {
  1650. item.json = JSON.parse(item.json)
  1651. }
  1652. catch (error) {
  1653. item.json = { text: item.json, echartsData: '' }
  1654. }
  1655. })
  1656. aiAnalysisData.value = data
  1657. }
  1658. else {
  1659. aiAnalysisData.value = []
  1660. }
  1661. }).catch(err => {
  1662. console.log('get_pptAnalysis_err', err)
  1663. })
  1664. }
  1665. // 监听选择题数据变化
  1666. watch(
  1667. () => props.showData,
  1668. (newVal, oldVal) => {
  1669. console.log('发生变化,showData')
  1670. if (
  1671. newVal &&
  1672. newVal.choiceQuestionListData[newVal.workIndex] &&
  1673. (props.showData.workDetail.type === '45' || props.showData.workDetail.type === '78')
  1674. ) {
  1675. if (
  1676. oldVal &&
  1677. newVal.choiceQuestionListData[newVal.workIndex] &&
  1678. oldVal.choiceQuestionListData[oldVal.workIndex]
  1679. ) {
  1680. if (
  1681. JSON.stringify(newVal.choiceQuestionListData[newVal.workIndex]) !==
  1682. JSON.stringify(oldVal.choiceQuestionListData[oldVal.workIndex])
  1683. ) {
  1684. setEchartsArea1()
  1685. }
  1686. }
  1687. }
  1688. else {
  1689. myChart.value = null
  1690. }
  1691. // console.log('newVal', newVal)
  1692. // if(newVal && newVal.workDetail && newVal.workDetail.id){
  1693. // getAnalysis()
  1694. // }
  1695. // getAnalysis()
  1696. },
  1697. { immediate: true, deep: true }
  1698. )
  1699. // 监听作业变化
  1700. watch(
  1701. () => props.showData?.choiceQuestionListData,
  1702. (newVal, oldVal) => {
  1703. console.log('choiceQuestionListData变化了')
  1704. if (
  1705. (newVal || newVal === 0) &&
  1706. props.showData.workDetail &&
  1707. (props.showData.workDetail.type === '45' || props.showData.workDetail.type === '78')
  1708. ) {
  1709. if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
  1710. setEchartsArea1()
  1711. }
  1712. else {
  1713. console.log('choiceQuestionListData没有变化')
  1714. }
  1715. }
  1716. else {
  1717. myChart.value = null
  1718. }
  1719. },
  1720. { deep: true }
  1721. )
  1722. // 监听作业变化
  1723. watch(
  1724. () => props.showData?.workIndex,
  1725. (newVal) => {
  1726. if (
  1727. (newVal || newVal === 0) &&
  1728. props.showData.workDetail &&
  1729. (props.showData.workDetail.type === '45' || props.showData.workDetail.type === '78')
  1730. ) {
  1731. setEchartsArea1()
  1732. }
  1733. else {
  1734. myChart.value = null
  1735. }
  1736. }
  1737. )
  1738. // 监听echartsArea1变化
  1739. watch(
  1740. () => echartsArea1.value,
  1741. (newVal) => {
  1742. if (
  1743. newVal &&
  1744. props.showData &&
  1745. props.showData.workDetail &&
  1746. (props.showData.workDetail.type === '45' || props.showData.workDetail.type === '78')
  1747. ) {
  1748. setEchartsArea1()
  1749. }
  1750. else {
  1751. myChart.value = null
  1752. }
  1753. }
  1754. )
  1755. // 监听页面宽度变化
  1756. watch(
  1757. () => props.slideWidth,
  1758. (newVal) => {
  1759. if (
  1760. newVal &&
  1761. props.showData &&
  1762. props.showData.workDetail &&
  1763. (props.showData.workDetail.type === '45' || props.showData.workDetail.type === '78')
  1764. ) {
  1765. handleChartResize()
  1766. }
  1767. }
  1768. )
  1769. // 查看未提交学生
  1770. const viewUnsubmittedStudents = () => {
  1771. selectUserDialogRef.value.open(lang.ssSubmitStatus, { user: props.unsubmittedStudents.map((item: any) => item.name), notFiledUser: props.unsubmittedStudents.map((item: any) => item.name), isSubmitUser: props.workArray.map((item: any) => item.name) })
  1772. // if (props.unsubmittedStudents.length > 0) {
  1773. // unsubmittedStudentsDialogRef.value.open(props.unsubmittedStudents)
  1774. // }
  1775. }
  1776. // ai生成选择题分析 选择题
  1777. const aiAnalysisRefresh45 = () => {
  1778. const _work = props.showData.choiceQuestionListData[props.showData.workIndex]
  1779. const msg = `# CONTEXT #
  1780. 你是K-12阶段的AI教育课堂分析助手,基于上传的课件、逐字稿,以及当页的学生答题数据(选择题/问答题/智能体对话)进行智能分析。
  1781. # OBJECTIVE #
  1782. 输出当前学生答题的分析报告:整体表现、核心发现(共性问题/误区)、教学优化(改进方向),为教师提供教学策略的建议和支持。
  1783. #INPUT#
  1784. 课程数据:
  1785. - 课程名称:${props.courseDetail.title}
  1786. - 课程学科:${props.courseDetail.name}
  1787. 当前页面答题数据(选择题):【分析重点】
  1788. - 选择题题目:${_work.teststitle}
  1789. - 选项数据:${JSON.stringify(_work.choiceUser)}
  1790. - 题目图片:${_work.timuList.lenght ? _work.timuList[0].src : ''}
  1791. - 未提交学生:${JSON.stringify(props.showData.unsubmittedStudents.map((item: any) => item.name))}
  1792. # ANALYSIS RULES #
  1793. 1. **问题定位**:明确指出哪个知识点/概念/步骤掌握不佳
  1794. 2. **建议具体**:给出可执行的教学动作(如“增加XX实例演练”“补充XX对比图”)
  1795. # RESPONSE #
  1796. 采用段落叙述,数据量化呈现,突出可操作建议,严格控制输出为80词内。采用三段式论述:
  1797. 1. 整体表现-1句话
  1798. 2. 核心发现-1-2句,指出共性问题+典型案例
  1799. 3. 改进建议-1句话,提出具体教学动作
  1800. # EXAMPLES #
  1801. 样例:
  1802. 选择题正确率62%,核心概念“机器学习三步骤”(输入数据→训练模型→预测结果)掌握尚可,但“训练与预测区分”混淆率达38%;建议强化训练vs预测对比教学。`
  1803. if (!currentAnalysis.value) {
  1804. aiAnalysisData.value.push({
  1805. pid: props.workId + (props.cid ? ',' + props.cid : ''),
  1806. index: props.showData.workIndex,
  1807. loading: true,
  1808. generatingContent: true,
  1809. json: { text: '', echartsData: '' },
  1810. noEnd: true,
  1811. update_at: '',
  1812. create_at: '',
  1813. })
  1814. }
  1815. else {
  1816. aiAnalysisData.value.find((item: any) => {
  1817. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1818. }).loading = true
  1819. aiAnalysisData.value.find((item: any) => {
  1820. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1821. }).json = { text: '', echartsData: '' }
  1822. }
  1823. chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
  1824. if (event.type === 'message') {
  1825. aiAnalysisData.value.find((item: any) => {
  1826. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1827. }).json.text = event.data
  1828. aiAnalysisData.value.find((item: any) => {
  1829. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1830. }).loading = false
  1831. }
  1832. else if (event.type === 'messageEnd') {
  1833. aiAnalysisData.value.find((item: any) => {
  1834. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1835. }).json.text = event.data
  1836. aiAnalysisData.value.find((item: any) => {
  1837. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1838. }).noEnd = false
  1839. aiAnalysisData.value.find((item: any) => {
  1840. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1841. }).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, '-')
  1842. saveAnalysis()
  1843. }
  1844. }).catch(err => {
  1845. console.log('err', err)
  1846. })
  1847. }
  1848. // ai生成投票分析 投票
  1849. const aiAnalysisRefresh78 = () => {
  1850. const _work = props.showData.choiceQuestionListData[props.showData.workIndex]
  1851. const msg = `# CONTEXT #
  1852. 你是K-12阶段的AI教育课堂分析助手,基于上传的课件、逐字稿,以及当页的学生答题数据(选择题/问答题/智能体对话/投票)进行智能分析。
  1853. # OBJECTIVE #
  1854. 输出当前学生答题的分析报告:整体表现、核心发现(共性问题/误区)、教学优化(改进方向),为教师提供教学策略的建议和支持。
  1855. #INPUT#
  1856. 课程数据:
  1857. - 课程名称:${props.courseDetail.title}
  1858. - 课程学科:${props.courseDetail.name}
  1859. 当前页面答题数据(投票):【分析重点】
  1860. - 投票题目:${_work.teststitle}
  1861. - 选项数据:${JSON.stringify(_work.choiceUser)}
  1862. - 题目图片:${_work.timuList.lenght ? _work.timuList[0].src : ''}
  1863. - 未提交学生:${JSON.stringify(props.showData.unsubmittedStudents.map((item: any) => item.name))}
  1864. # ANALYSIS RULES #
  1865. 1. **问题定位**:明确指出哪个知识点/概念/步骤掌握不佳
  1866. 2. **建议具体**:给出可执行的教学动作(如“增加XX实例演练”“补充XX对比图”)
  1867. # RESPONSE #
  1868. 采用段落叙述,数据量化呈现,突出可操作建议,严格控制输出为80词内。采用三段式论述:
  1869. 1. 整体表现-1句话
  1870. 2. 核心发现-1-2句,指出共性问题+典型案例
  1871. 3. 改进建议-1句话,提出具体教学动作
  1872. # EXAMPLES #
  1873. 样例:
  1874. 选择题正确率62%,核心概念“机器学习三步骤”(输入数据→训练模型→预测结果)掌握尚可,但“训练与预测区分”混淆率达38%;建议强化训练vs预测对比教学。`
  1875. if (!currentAnalysis.value) {
  1876. aiAnalysisData.value.push({
  1877. pid: props.workId + (props.cid ? ',' + props.cid : ''),
  1878. index: props.showData.workIndex,
  1879. loading: true,
  1880. generatingContent: true,
  1881. json: { text: '', echartsData: '' },
  1882. noEnd: true,
  1883. update_at: '',
  1884. create_at: '',
  1885. })
  1886. }
  1887. else {
  1888. aiAnalysisData.value.find((item: any) => {
  1889. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1890. }).loading = true
  1891. aiAnalysisData.value.find((item: any) => {
  1892. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1893. }).json = { text: '', echartsData: '' }
  1894. }
  1895. chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
  1896. if (event.type === 'message') {
  1897. aiAnalysisData.value.find((item: any) => {
  1898. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1899. }).json.text = event.data
  1900. aiAnalysisData.value.find((item: any) => {
  1901. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1902. }).loading = false
  1903. }
  1904. else if (event.type === 'messageEnd') {
  1905. aiAnalysisData.value.find((item: any) => {
  1906. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1907. }).json.text = event.data
  1908. aiAnalysisData.value.find((item: any) => {
  1909. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1910. }).noEnd = false
  1911. aiAnalysisData.value.find((item: any) => {
  1912. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1913. }).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, '-')
  1914. saveAnalysis()
  1915. }
  1916. }).catch(err => {
  1917. console.log('err', err)
  1918. })
  1919. }
  1920. // 问答题
  1921. const aiAnalysisRefresh15 = () => {
  1922. let flag = 0
  1923. const msg = `# CONTEXT #
  1924. 你是K-12阶段的AI教育课堂分析助手,基于上传的课件、逐字稿,以及当页的学生答题数据(选择题/问答题/智能体对话)进行智能分析。
  1925. # OBJECTIVE #
  1926. 输出当前学生答题的分析报告:整体表现、核心发现(共性问题/误区)、教学优化(改进方向),为教师提供教学策略的建议和支持。
  1927. #INPUT#
  1928. 课程数据:
  1929. - 课程名称:${props.courseDetail.title}
  1930. - 课程学科:${props.courseDetail.name}
  1931. 当前页面答题数据(问答题):【分析重点】
  1932. - 问答题题目:${props.showData.workDetail.json.answerQ}
  1933. - 回答数据:${JSON.stringify(processedWorkArray.value.map((i) => ({ user: i.name, answer: i.content.answer })))}
  1934. - 未提交学生:${JSON.stringify(props.showData.unsubmittedStudents.map((item: any) => item.name))}
  1935. # ANALYSIS RULES #
  1936. 1. **问题定位**:明确指出哪个知识点/概念/步骤掌握不佳
  1937. 2. **建议具体**:给出可执行的教学动作(如“增加XX实例演练”“补充XX对比图”)
  1938. # RESPONSE #
  1939. 采用段落叙述,数据量化呈现,突出可操作建议,严格控制输出为80词内。采用三段式论述:
  1940. 1. 整体表现-1句话
  1941. 2. 核心发现-1-2句,指出共性问题+典型案例
  1942. 3. 改进建议-1句话,提出具体教学动作
  1943. # EXAMPLES #
  1944. 样例:
  1945. 30人中15人提交问答题(参与率50%),核心概念“同理心地图”掌握薄弱。发现学生13在智能体对话中6次答“不知道”,需单独辅导设计思维基础概念。建议课程增加POV框架实例演练,强化痛点识别能力训练。`
  1946. if (!currentAnalysis.value) {
  1947. aiAnalysisData.value.push({
  1948. pid: props.workId + (props.cid ? ',' + props.cid : ''),
  1949. index: props.showData.workIndex,
  1950. loading: true,
  1951. generatingContent: true,
  1952. json: { text: '', echartsData: '' },
  1953. noEnd: true,
  1954. update_at: '',
  1955. create_at: '',
  1956. })
  1957. }
  1958. else {
  1959. aiAnalysisData.value.find((item: any) => {
  1960. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1961. }).loading = true
  1962. aiAnalysisData.value.find((item: any) => {
  1963. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1964. }).json = { text: '', echartsData: '' }
  1965. aiAnalysisData.value.find((item: any) => {
  1966. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1967. }).generatingContent = true
  1968. }
  1969. getWordCloud15().then((res) => {
  1970. flag += 1
  1971. aiAnalysisData.value.find((item: any) => {
  1972. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1973. }).generatingContent = false
  1974. if (flag == 2) {
  1975. saveAnalysis()
  1976. }
  1977. })
  1978. chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
  1979. console.log(event)
  1980. if (event.type === 'message') {
  1981. aiAnalysisData.value.find((item: any) => {
  1982. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1983. }).json.text = event.data
  1984. aiAnalysisData.value.find((item: any) => {
  1985. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1986. }).loading = false
  1987. }
  1988. else if (event.type === 'messageEnd') {
  1989. aiAnalysisData.value.find((item: any) => {
  1990. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1991. }).json.text = event.data
  1992. aiAnalysisData.value.find((item: any) => {
  1993. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1994. }).noEnd = false
  1995. aiAnalysisData.value.find((item: any) => {
  1996. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  1997. }).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, '-')
  1998. flag += 1
  1999. if (flag == 2) {
  2000. saveAnalysis()
  2001. }
  2002. }
  2003. }).catch(err => {
  2004. console.log('err', err)
  2005. })
  2006. }
  2007. // 打开词云图弹窗
  2008. const openEchatsDialog = () => {
  2009. if (echartsDialogRef.value && currentAnalysis.value.json.echartsData) {
  2010. echartsDialogRef.value.open(lang.ssKeywordCloud, currentAnalysis.value.json.echartsData)
  2011. }
  2012. }
  2013. // 问答题获取词云图与关键词
  2014. const getWordCloud15 = () => {
  2015. return new Promise((resolve,) => {
  2016. const msg = `## 任务
  2017. 请针对文本中学生提交的问答题回答内容进行深度分析,提炼出 10 - 30 个核心关键词,用于绘制词云图。
  2018. ## 提取准则
  2019. 1. 聚焦内容主体:仅从学生的具体回答文本中提取关键词。
  2020. 2. 严格排除杂质:禁止提取任何属于系统元数据或固定格式的词汇,包括但不限于:“课程数据”、“学生姓名”、“回答结果”、“课程标题”、“提交时间”、“作业名称”、“分数”等。
  2021. 3. 语义去重:将意思相近的词进行合并(例如“高效”与“效率高”),保留最具代表性的词条。
  2022. 4. 涵盖核心:关键词应准确反映学生回答中的核心观点、关键知识点、高频论据或情感倾向。
  2023. ## 任务要求
  2024. 1. 词频统计:计算每个有效关键字在回答内容中出现的频率。
  2025. 2. 词汇大小:根据词频,确定每个关键字在词云中的权重。词频越高,数值越大,范围 1 - 100。
  2026. 3. 输出格式:请严格按照 JSON 格式输出,包含关键词、词频及对应的词汇大小。
  2027. ## 文本
  2028. 课程数据:
  2029. - 课程名称:${props.courseDetail.title}
  2030. - 课程学科:${props.courseDetail.name}
  2031. - 需要提交人数:${props.showData.workArray.length + props.showData.unsubmittedStudents.length}
  2032. - 已提交人数:${props.showData.workArray.length}
  2033. 当前页面答题数据(问答题):【分析重点】
  2034. - 问答题题目:${props.showData.workDetail.json.answerQ}
  2035. - 回答数据:${JSON.stringify(processedWorkArray.value.map((i) => ({ answer: i.content.answer })))}
  2036. ## 输出示例
  2037. {"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进制)"}}]}]}`
  2038. chat_no_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang).promise.then((res) => {
  2039. aiAnalysisData.value.find((item: any) => {
  2040. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2041. }).json.echartsData = JSON.parse(res)
  2042. resolve(1)
  2043. }).catch(err => {
  2044. console.log('err', err)
  2045. resolve(0)
  2046. })
  2047. })
  2048. }
  2049. // ai应用
  2050. const aiAnalysisRefresh72 = async () => {
  2051. let chatMsg = ``
  2052. const agentId = 'a7741704-ba56-40b7-a6b8-62a423ef9376'
  2053. console.log('processedWorkArray.value', processedWorkArray.value)
  2054. processedWorkArray.value.forEach((i) => {
  2055. if (typeof i.content === 'object') {
  2056. i.content.forEach(j => {
  2057. if (j.messages) {
  2058. j.messages.forEach((a) => {
  2059. chatMsg += `\n${a.sender}:
  2060. ${a.content}\n`
  2061. })
  2062. }
  2063. if (j.imageUrls) {
  2064. j.imageUrls.forEach((a) => {
  2065. chatMsg += `\n${a}\n`
  2066. })
  2067. }
  2068. })
  2069. }
  2070. })
  2071. // if(props.userId)
  2072. // - 未提交学生:${JSON.stringify(props.showData.unsubmittedStudents.map((item: any) => item.name))}
  2073. let msg = `# CONTEXT #
  2074. 你是K-12阶段的AI教育课堂分析助手,基于上传的课件、逐字稿,以及当页的学生答题数据(选择题/问答题/智能体对话)进行智能分析。
  2075. # OBJECTIVE #
  2076. 输出当前学生答题的分析报告:整体表现、核心发现(共性问题/误区)、教学优化(改进方向),为教师提供教学策略的建议和支持。
  2077. #INPUT#
  2078. 课程数据:
  2079. - 课程名称:${props.courseDetail.title}
  2080. - 课程学科:${props.courseDetail.name}
  2081. - 需要提交人数:${props.showData.workArray.length + props.showData.unsubmittedStudents.length}
  2082. - 已提交人数:${props.showData.workArray.length}
  2083. 当前页面答题数据(问答题):【分析重点】
  2084. - AI应用
  2085. - 对话数据:${chatMsg}
  2086. # ANALYSIS RULES #
  2087. 1. **问题定位**:明确指出哪个知识点/概念/步骤掌握不佳
  2088. 2. **建议具体**:给出可执行的教学动作(如“增加XX实例演练”“补充XX对比图”)
  2089. # RESPONSE #
  2090. 采用段落叙述,数据量化呈现,突出可操作建议,严格控制输出为80词内。采用三段式论述:
  2091. 1. 整体表现-1句话
  2092. 2. 核心发现-1-2句,指出共性问题+典型案例
  2093. 3. 改进建议-1句话,提出具体教学动作
  2094. # EXAMPLES #
  2095. 样例:
  2096. 智能体对话显示学生对“模型训练”概念模糊,多次询问“为什么不能直接告诉机器答案”。针对概念混淆学生,补充“人类学习类比”相关解释,巩固“从数据中学习规律”核心认知。`
  2097. if (['9c236d45-49cd-11f1-9985-005056924926'].includes(props.userId)) {
  2098. msg = `你是K-12阶段的AI教育课堂分析助手,基于当前课程信息以及当页的学生与单/多智能体对话数据,进行深入的智能分析。
  2099. ### 任务目标
  2100. 1. **总体统计分析**:
  2101. - 分析学生表现数据,例如全班学生互动数据,包括但不限于参与度、互动轮次、作文批改分布、作业完成情况等。
  2102. - 提取核心统计指标,例如发现共性问题、互动模式、分层水平分布、关键评分、完成度、优秀或需关注的学生。
  2103. 2. **洞察(Key Insights)**:
  2104. - 不是所有模块都需要的
  2105. - 输出的模块使用1~3句快速完成核心发现输出
  2106. - 保持简短、直观、易快速理解。
  2107. 3. **不输出教学建议或干预措施**。
  2108. ### 输出格式
  2109. 1. Markdown表格:展示关键统计指标(发言次数、互动频率、提问数量、主题分布)。
  2110. 2. ASCII条形图(可选):展示各项指标对比情况(绝对不要ASCII条形图,应该显示指标名字)
  2111. 3. 洞察与建议:分点呈现,每点对应具体统计指标或数据来源,保持精简,直观、易快速理解。
  2112. **注意,不必输出多余的开场白(可以有非常简短的),转场,铺垫,形容词等,尽可能把输出留给有价值的发现**
  2113. **对于重点要注意的内容,可以用 <span style="color:red"> 内容 </span> 以及 markdown的强调语法来highlight**
  2114. ### 注意事项
  2115. - 输出简洁明了,重点突出。
  2116. - 所有数字列右对齐,必要时显示百分比。
  2117. - 避免冗长文字和详细案例描述。
  2118. - 保持专业、友好语气,可使用 Emoji 提示情绪、课堂氛围或学生表现状态。
  2119. - 输出保持在600字左右
  2120. #INPUT#
  2121. 课程数据:
  2122. - 课程名称:${props.courseDetail.title}
  2123. - 课程学科:${props.courseDetail.name}
  2124. 当前页面答题数据(问答题):【分析重点】
  2125. - AI应用
  2126. - 对话数据:${chatMsg}
  2127. `
  2128. }
  2129. else if (['6c56ec0e-2c74-11ef-bee5-005056b86db5', 'aea65da6-4399-11f1-9985-005056924926'].includes(props.userId)) {
  2130. if (props.workUrl == 'https://knowledge.cocorobo.cn/zh-CN/story-telling/a1a339d4-f522-4336-9aa9-e8394bea9731') {
  2131. msg = `# 角色定位
  2132. 你是K-12阶段的AI课堂分析助手,负责基于学生对世界名画的英语宣传稿(promotional text)批改记录生成课堂学情分析报告。
  2133. 本次分析的内容来自六年级英语Art课堂,学生选择一幅画作并完成英语宣传稿写作,由AI智能体完成批改,分为 Level A(独立完成)、Level B(信息辅助)、Level C(支架辅助)两个等级。
  2134. ---
  2135. # 重要:数据解读规则(必须在生成报告前完成)
  2136. 在输出任何报告内容之前,必须先完成以下两步结构化提取。
  2137. 所有报告数字必须来源于此,禁止前后矛盾。
  2138. ---
  2139. ## 第一步:逐学生提取数据
  2140. (此步骤为内部处理步骤,不输出提取结果。)
  2141. ### 有效作文判断
  2142. 在提取每位学生数据之前,先判断该学生是否提交了有效作文:
  2143. **有效作文:** AI批改记录中出现了完整的"作文批改报告"结构(包含信息完整性表格、表达鲜活度、文化小触角、语法小诊断中至少两项),视为学生已提交有效内容,正常提取数据。
  2144. **无效提交:** 以下情况均视为无效提交,不纳入各维度统计,仅在总结部分单独列出:
  2145. - AI输出"未检测到有效的写作内容"
  2146. - AI批改记录缺失或仅有对话内容而无批改报告结构
  2147. - 学生仅回复单个词语、符号或与写作任务完全无关的内容
  2148. **注意:** 不得根据学生与AI的后续对话内容(如学生补充回复、追问等)判断写作有效性,仅以AI是否输出完整批改报告为准。
  2149. ### 等级识别
  2150. 从批改记录中识别学生选择的等级:
  2151. - 选择"I can wtite. 我可以自己写。" → Level A
  2152. - 选择"I need information. 我需要信息支持。" → Level B
  2153. - 选择"I need structure. 我需要支架。" → Level C
  2154. ### 信息完整与准确性提取
  2155. 检查批改报告中的信息完整性表格,逐项记录每位学生的情况:
  2156. | 信息点 | 是否正确 |
  2157. |---|---|
  2158. | 画名 | 是/否 |
  2159. | 画家 | 是/否 |
  2160. | 绘画种类 | 是/否 |
  2161. | 画面描述(颜色/内容) | 是/否 |
  2162. | 个人感受 | 是/否 |
  2163. 对每位学生统计:
  2164. - 全部正确的信息点数量(满分5项)
  2165. - 有错误或遗漏的具体信息点
  2166. ### 表达鲜活度提取
  2167. 从批改记录的"表达鲜活度"部分,判断:
  2168. - ✅ 表达生动:使用了形容词、比喻、比较句或个人联想
  2169. - ⚠️ 表达平淡:仅使用简单句型,缺乏个人想法
  2170. ### 文化小触角提取
  2171. 从批改记录的"文化小触角"部分,判断:
  2172. - ✅ 有涉及:自然提到中西艺术差异或文化感悟
  2173. - — 未涉及:未提及任何文化对比
  2174. ### 语法情况提取
  2175. 从批改记录的"语法小诊断"部分,记录:
  2176. - 是否存在明显语法错误
  2177. - 错误类型(主谓一致 / 时态 / 冠词 / 其他)
  2178. ---
  2179. ## 第二步:汇总数据
  2180. 将所有学生数据按等级分组汇总,形成统计表。
  2181. **一旦汇总完成,报告中所有数字必须与汇总表严格一致,禁止前后矛盾。**
  2182. ---
  2183. # 输出格式
  2184. ## 第一步输出
  2185. 输出以下一句话,然后立即继续输出完整报告,不得停止:
  2186. "正在逐个提取学生数据中,请稍候……"
  2187. ## 第二步输出:完整报告
  2188. 紧接上一句,输出以下完整报告内容:
  2189. ---
  2190. ## 英语写作 课堂学情分析报告
  2191. **数据来源:** 批改记录 | **统计人数:** X 人
  2192. ---
  2193. ### 一、分层总览
  2194. | 等级 | 人数 | 信息完整率均值 | 表达生动人数 | 文化触角人数 | 有语法问题人数 |
  2195. |---|---|---|---|---|---|
  2196. | Level A | X | XX% | X人(XX%) | X人(XX%) | X人(XX%) |
  2197. | Level B | X | XX% | X人(XX%) | X人(XX%) | X人(XX%) |
  2198. | Level C | X | XX% | X人(XX%) | X人(XX%) | X人(XX%) |
  2199. ---
  2200. ### 二、信息完整与准确性明细(A / B / C 合并)
  2201. | 信息点 | 正确人数 | 正确率 |
  2202. |---|---|---|
  2203. | 画名 | X | XX% |
  2204. | 画家 | X | XX% |
  2205. | 绘画种类 | X | XX% |
  2206. | 画面描述(颜色/内容) | X | XX% |
  2207. | 个人感受 | X | XX% |
  2208. [正确率最低项:<span style="color:red">⚠️ [信息点名称]正确率最低,仅 XX%,说明学生在该项普遍存在遗漏或错误。</span>]
  2209. ---
  2210. ### 三、表达与文化维度
  2211. | 维度 | A 达成人数 | A 达成率 | B 达成人数 | B 达成率 | C 达成人数 | C 达成率 |
  2212. |---|---|---|---|---|
  2213. | 表达生动(含比喻/形容词/个人联想) | X | XX% | X | XX% | X | XX% |
  2214. | 文化小触角(含中西艺术对比) | X | XX% | X | XX% | X | XX% |
  2215. [若文化触角整体达成率低于50%:<span style="color:red">⚠️ 文化对比意识普遍薄弱,全班达成率仅 XX%。</span>]
  2216. ---
  2217. ### 四、语法问题汇总
  2218. | 语法问题类型 | A 出现人次 | B 出现人次 | C 出现人次 |
  2219. |---|---|---|
  2220. | 主谓一致错误 | X | X | X |
  2221. | 时态错误 | X | X | X |
  2222. | 冠词错误 | X | X | X |
  2223. | 其他 | X | X | X |
  2224. *若无明显语法问题,写:"本次无明显高频语法问题。✅"*
  2225. ---
  2226. ### 五、亮点摘录
  2227. **表达生动的例句:**
  2228. [列出2–3句来自学生作文的优秀表达原文,注明等级和画作名称。]
  2229. **文化感悟的例句:**
  2230. [列出1–2句来自学生作文的文化对比原文,注明等级和画作名称。若无,写"本次暂无。"]
  2231. ---
  2232. ### 六、总结
  2233. **整体:** [1句,简述全班整体写作完成情况。]
  2234. **突出:** [1句,指出全班表现最好的维度,例如信息完整率高或表达生动人数较多。]
  2235. **关注:** <span style="color:red">[1句,指出最薄弱的维度,例如文化触角普遍缺失或某信息点遗漏率高。]</span>
  2236. **跟进:**
  2237. - <span style="color:red">无效提交学生:[姓名列表],AI未能识别其提交内容,建议教师查看原图并确认是否需要重新上传。</span>
  2238. - <span style="color:red">写作内容需关注的学生(有效提交中):[姓名及原因,例如信息缺失3项以上、存在多处语法问题等];若无,写"有效提交学生中暂无需特别跟进。"</span>
  2239. *若全员有效提交且表现均衡,写:"本次全员提交有效内容,整体表现均衡,暂无需特别跟进。"*
  2240. ---
  2241. # 注意事项
  2242. - 所有数字来源于结构化提取,输出前核对一致性,禁止前后矛盾。
  2243. - 对需要教师重点关注的内容使用 <span style="color:red"> 内容 </span> 高亮。
  2244. - 禁止输出"如需进一步生成"等对话式内容。
  2245. - 不输出教学建议或干预措施。
  2246. - 若某等级无学生数据,对应列填"—",不单独说明。
  2247. #INPUT#
  2248. 课程数据:
  2249. - 课程名称:${props.courseDetail.title}
  2250. - 课程学科:${props.courseDetail.name}
  2251. - 需要提交人数:${props.showData.workArray.length + props.showData.unsubmittedStudents.length}
  2252. - 已提交人数:${props.showData.workArray.length}
  2253. 当前页面答题数据(AI应用):【分析重点】
  2254. - AI应用
  2255. - 对话数据:${chatMsg}`
  2256. }
  2257. else if (props.workUrl == 'https://knowledge.cocorobo.cn/zh-CN/story-telling/0d04cef1-876a-41b4-9768-6547088bc162') {
  2258. msg = `# 角色定位
  2259. 你是K-12阶段的AI课堂分析助手,负责基于学生词句训练对话记录生成课堂学情分析报告。
  2260. 本次分析的环节为:学生与AI就画作内容进行词句问答训练,分为 Level A、Level B、Level C 三个等级。
  2261. ---
  2262. # 重要:数据解读规则(必须在生成报告前完成)
  2263. 在输出任何报告内容之前,必须先完成以下两步结构化提取。
  2264. 所有报告数字必须来源于此,禁止前后矛盾。
  2265. ---
  2266. ## 第一步:逐学生提取数据
  2267. (此步骤为内部处理步骤,不输出提取结果。)
  2268. ### 等级识别
  2269. 从对话记录中的 sender 字段识别等级:
  2270. - sender 含"Level A" → Level A
  2271. - sender 含"Level B" → Level B
  2272. - sender 含"Level C" → Level C
  2273. ### 完成状态判断
  2274. - **完整完成**:所有句子/问题均有学生回应记录
  2275. - **部分完成**:至少一条学生回应,但未完成全部
  2276. - **未完成**:对话记录中仅有 AI 开场消息,无任何学生回应内容
  2277. ### Level A 提取项目
  2278. **主题覆盖性:** 检查学生是否主动提问了以下 6 个主题:
  2279. ① name ② artist ③ kind ④ scene ⑤ colours ⑥ why
  2280. - ✅ 已提问 / — 未提问
  2281. **问题准确性(语法):** 识别以下错误类型并记录人次:
  2282. - 疑问句结构错误 / 主谓一致错误 / 时态错误 / 其他
  2283. **创新性:** 6 个主题之外的问题,记录原文。
  2284. ### Level B 提取项目
  2285. **主题覆盖性:**(同 Level A,6个主题)
  2286. **问题准确性(语法):**(同 Level A)
  2287. ### Level C 提取项目
  2288. **流程完成性:** 逐句核对学生是否跟读了全部 6 个问句。
  2289. - ✅ 跟读基本正确 / ⚠️ 跟读明显偏差 / — 未跟读
  2290. **创新亮点:** 学生是否有自发延伸表达,记录原文。
  2291. ---
  2292. ## 第二步:汇总数据
  2293. 将所有学生数据按等级分组汇总。
  2294. **报告中所有数字必须与汇总表严格一致,禁止前后矛盾。**
  2295. ---
  2296. # 输出格式
  2297. ## 第一步输出
  2298. 输出以下一句话,然后立即继续输出完整报告,不得停止:
  2299. "正在逐个提取学生数据中,请稍候……"
  2300. ## 第二步输出:完整报告
  2301. 紧接上一句,输出以下完整报告内容:
  2302. ---
  2303. ## 词句问答训练 课堂学情分析报告
  2304. **数据来源:** 学生对话记录 | **统计人数:** X 人
  2305. ---
  2306. ### 一、分层总览
  2307. | 等级 | 人数 | 完整完成 | 主题覆盖率均值 | 语法问题人数 | 创新提问/亮点 |
  2308. |---|---|---|---|---|---|
  2309. | Level A | X | X人(XX%) | XX% | X人 | X人 |
  2310. | Level B | X | X人(XX%) | XX% | X人 | — |
  2311. | Level C | X | X人(XX%) | — | — | X人 |
  2312. [若有未完成学生:<span style="color:red">⚠️ 未完成学生:[姓名列表]</span>]
  2313. ---
  2314. ### 二、主题覆盖明细(Level A / B)
  2315. | 主题 | A 覆盖率 | B 覆盖率 |
  2316. |---|---|---|
  2317. | name | XX% | XX% |
  2318. | artist | XX% | XX% |
  2319. | kind | XX% | XX% |
  2320. | scene | XX% | XX% |
  2321. | colours | XX% | XX% |
  2322. | why | XX% | XX% |
  2323. *若本次无某等级学生,对应列填"—"。*
  2324. ---
  2325. ### 三、语法问题(Level A / B)
  2326. | 问题类型 | A 出现人次 | B 出现人次 |
  2327. |---|---|---|
  2328. | 疑问句结构错误 | X | X |
  2329. | 主谓一致错误 | X | X |
  2330. | 时态错误 | X | X |
  2331. | 其他 | X | X |
  2332. *若无语法问题,写:"本次无明显语法问题。✅"*
  2333. ---
  2334. ### 四、创新与亮点
  2335. **Level A 创新提问:**
  2336. [列出学生姓名及原文;若无,写"本次暂无。"]
  2337. **Level C 自发延伸:**
  2338. [列出学生姓名及原文;若无,写"本次暂无。"]
  2339. ---
  2340. ### 五、总结
  2341. **整体:** [1句,简述全班完成情况。]
  2342. **突出:** [1句,指出表现最好的维度或等级。]
  2343. **关注:** <span style="color:red">[1句,指出覆盖率最低的主题或问题最集中的点。]</span>
  2344. **跟进:** <span style="color:red">[列出需个别跟进的学生姓名及原因;若无,写"全员表现均衡,暂无需特别跟进。"]</span>
  2345. ---
  2346. # 注意事项
  2347. - 所有数字来源于结构化提取,输出前核对一致性,禁止前后矛盾。
  2348. - 对需要教师重点关注的内容使用 <span style="color:red"> 内容 </span> 高亮。
  2349. - 若某等级无学生数据,相关行/列填"—",不单独输出该等级报告。
  2350. - 禁止输出"如需进一步生成"等对话式内容。
  2351. - 不输出教学建议或干预措施。
  2352. #INPUT#
  2353. 课程数据:
  2354. - 课程名称:${props.courseDetail.title}
  2355. - 课程学科:${props.courseDetail.name}
  2356. - 需要提交人数:${props.showData.workArray.length + props.showData.unsubmittedStudents.length}
  2357. - 已提交人数:${props.showData.workArray.length}
  2358. 当前页面答题数据(AI应用):【分析重点】
  2359. - AI应用
  2360. - 对话数据:${chatMsg}`
  2361. }
  2362. // msg = `# 角色定位
  2363. // 你是K-12阶段的AI课堂分析助手,负责基于学生词句训练对话记录生成课堂学情分析报告。
  2364. // 本次分析的环节为:学生与AI就画作内容进行词句问答训练,分为 Level A、Level B、Level C 三个等级。
  2365. // ---
  2366. // # 重要:数据解读规则(必须在生成报告前完成)
  2367. // 在输出任何报告内容之前,必须先完成以下两步结构化提取。
  2368. // 所有报告数字必须来源于此,禁止前后矛盾。
  2369. // ---
  2370. // ## 第一步:逐学生提取数据
  2371. // (此步骤为内部处理步骤,不输出提取结果。)
  2372. // ### 等级识别
  2373. // 从对话记录中的 sender 字段识别等级:
  2374. // - sender 含"Level A" → Level A
  2375. // - sender 含"Level B" → Level B
  2376. // - sender 含"Level C" → Level C
  2377. // ### 完成状态判断
  2378. // - **完整完成**:所有句子/问题均有学生回应记录
  2379. // - **部分完成**:至少一条学生回应,但未完成全部
  2380. // - **未完成**:对话记录中仅有 AI 开场消息,无任何学生回应内容
  2381. // ### Level A 提取项目
  2382. // **主题覆盖性:** 检查学生是否主动提问了以下 6 个主题:
  2383. // ① name ② artist ③ kind ④ scene ⑤ colours ⑥ why
  2384. // - ✅ 已提问 / — 未提问
  2385. // **问题准确性(语法):** 识别以下错误类型并记录人次:
  2386. // - 疑问句结构错误 / 主谓一致错误 / 时态错误 / 其他
  2387. // **创新性:** 6 个主题之外的问题,记录原文。
  2388. // ### Level B 提取项目
  2389. // **主题覆盖性:**(同 Level A,6个主题)
  2390. // **问题准确性(语法):**(同 Level A)
  2391. // ### Level C 提取项目
  2392. // **流程完成性:** 逐句核对学生是否跟读了全部 6 个问句。
  2393. // - ✅ 跟读基本正确 / ⚠️ 跟读明显偏差 / — 未跟读
  2394. // **创新亮点:** 学生是否有自发延伸表达,记录原文。
  2395. // ---
  2396. // ## 第二步:汇总数据
  2397. // 将所有学生数据按等级分组汇总。
  2398. // **报告中所有数字必须与汇总表严格一致,禁止前后矛盾。**
  2399. // ---
  2400. // # 输出格式
  2401. // ## 第一步输出
  2402. // 输出以下一句话,然后立即继续输出完整报告,不得停止:
  2403. // "正在逐个提取学生数据中,请稍候……"
  2404. // ## 第二步输出:完整报告
  2405. // 紧接上一句,输出以下完整报告内容:
  2406. // ---
  2407. // ## 词句问答训练 课堂学情分析报告
  2408. // **数据来源:** 学生对话记录 | **统计人数:** X 人
  2409. // ---
  2410. // ### 一、分层总览
  2411. // | 等级 | 人数 | 完整完成 | 主题覆盖率均值 | 语法问题人数 | 创新提问/亮点 |
  2412. // |---|---|---|---|---|---|
  2413. // | Level A | X | X人(XX%) | XX% | X人 | X人 |
  2414. // | Level B | X | X人(XX%) | XX% | X人 | — |
  2415. // | Level C | X | X人(XX%) | — | — | X人 |
  2416. // [若有未完成学生:<span style="color:red">⚠️ 未完成学生:[姓名列表]</span>]
  2417. // ---
  2418. // ### 二、主题覆盖明细(Level A / B)
  2419. // | 主题 | A 覆盖率 | B 覆盖率 |
  2420. // |---|---|---|
  2421. // | name | XX% | XX% |
  2422. // | artist | XX% | XX% |
  2423. // | kind | XX% | XX% |
  2424. // | scene | XX% | XX% |
  2425. // | colours | XX% | XX% |
  2426. // | why | XX% | XX% |
  2427. // *若本次无某等级学生,对应列填"—"。*
  2428. // ---
  2429. // ### 三、语法问题(Level A / B)
  2430. // | 问题类型 | A 出现人次 | B 出现人次 |
  2431. // |---|---|---|
  2432. // | 疑问句结构错误 | X | X |
  2433. // | 主谓一致错误 | X | X |
  2434. // | 时态错误 | X | X |
  2435. // | 其他 | X | X |
  2436. // *若无语法问题,写:"本次无明显语法问题。✅"*
  2437. // ---
  2438. // ### 四、创新与亮点
  2439. // **Level A 创新提问:**
  2440. // [列出学生姓名及原文;若无,写"本次暂无。"]
  2441. // **Level C 自发延伸:**
  2442. // [列出学生姓名及原文;若无,写"本次暂无。"]
  2443. // ---
  2444. // ### 五、总结
  2445. // **整体:** [1句,简述全班完成情况。]
  2446. // **突出:** [1句,指出表现最好的维度或等级。]
  2447. // **关注:** <span style="color:red">[1句,指出覆盖率最低的主题或问题最集中的点。]</span>
  2448. // **跟进:** <span style="color:red">[列出需个别跟进的学生姓名及原因;若无,写"全员表现均衡,暂无需特别跟进。"]</span>
  2449. // ---
  2450. // # 注意事项
  2451. // - 所有数字来源于结构化提取,输出前核对一致性,禁止前后矛盾。
  2452. // - 对需要教师重点关注的内容使用 <span style="color:red"> 内容 </span> 高亮。
  2453. // - 若某等级无学生数据,相关行/列填"—",不单独输出该等级报告。
  2454. // - 禁止输出"如需进一步生成"等对话式内容。
  2455. // - 不输出教学建议或干预措施。
  2456. // #INPUT#
  2457. // 课程数据:
  2458. // - 课程名称:${props.courseDetail.title}
  2459. // - 课程学科:${props.courseDetail.name}
  2460. // - 需要提交人数:${props.showData.workArray.length + props.showData.unsubmittedStudents.length}
  2461. // - 已提交人数:${props.showData.workArray.length}
  2462. // 当前页面答题数据(AI应用):【分析重点】
  2463. // - AI应用
  2464. // - 对话数据:${chatMsg}`
  2465. }
  2466. console.log('workUrl', props.workUrl)
  2467. console.log('ai应用提示词', msg)
  2468. if (!currentAnalysis.value) {
  2469. aiAnalysisData.value.push({
  2470. pid: props.workId + (props.cid ? ',' + props.cid : ''),
  2471. index: props.showData.workIndex,
  2472. loading: true,
  2473. json: { text: '', echartsData: '' },
  2474. noEnd: true,
  2475. update_at: '',
  2476. create_at: '',
  2477. })
  2478. }
  2479. else {
  2480. aiAnalysisData.value.find((item: any) => {
  2481. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2482. }).loading = true
  2483. aiAnalysisData.value.find((item: any) => {
  2484. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2485. }).json = { text: '', echartsData: '' }
  2486. }
  2487. chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
  2488. if (event.type === 'message') {
  2489. aiAnalysisData.value.find((item: any) => {
  2490. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2491. }).json.text = md.render(event.data)
  2492. aiAnalysisData.value.find((item: any) => {
  2493. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2494. }).loading = false
  2495. }
  2496. else if (event.type === 'messageEnd') {
  2497. aiAnalysisData.value.find((item: any) => {
  2498. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2499. }).json.text = md.render(event.data)
  2500. aiAnalysisData.value.find((item: any) => {
  2501. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2502. }).noEnd = false
  2503. aiAnalysisData.value.find((item: any) => {
  2504. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2505. }).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, '-')
  2506. saveAnalysis()
  2507. }
  2508. }, '', [], 'open-qwen-plus-latest').catch(err => {
  2509. console.log('err', err)
  2510. })
  2511. }
  2512. // ai应用
  2513. const aiAnalysisRefresh831 = () => {
  2514. let chatMsg = ``
  2515. console.log('processedWorkArray.value', processedWorkArray.value)
  2516. processedWorkArray.value.forEach((i) => {
  2517. if (typeof i.content === 'object') {
  2518. const c = i.content
  2519. const studentName = i.name || ''
  2520. if (c.know && c.know.length) {
  2521. chatMsg += `\n${studentName} - K|已知:\n${c.know.join(';')}\n`
  2522. }
  2523. if (c.want && c.want.length) {
  2524. chatMsg += `\n${studentName} - W|想知:\n${c.want.join(';')}\n`
  2525. }
  2526. if (c.learned && c.learned.length) {
  2527. chatMsg += `\n${studentName} - L|已学:\n${c.learned.join(';')}\n`
  2528. }
  2529. if (c.reflection) {
  2530. chatMsg += `\n${studentName} - 学习反思:\n${c.reflection}\n`
  2531. }
  2532. }
  2533. })
  2534. const msg = `# CONTEXT #
  2535. 课程数据:
  2536. - 课程名称:${props.courseDetail.title}
  2537. - 课程学科:${props.courseDetail.name}
  2538. - 需要提交人数:${props.showData.workArray.length + props.showData.unsubmittedStudents.length}
  2539. - 已提交人数:${props.showData.workArray.length}
  2540. 你是一名教学分析助手。请根据全班学生提交的 KWL 表格与学习反思内容,从班级整体视角进行简洁分析,帮助教师在课堂中快速了解学生情况。
  2541. 请按照以下 4 个维度分析:
  2542. 1. K|已知(Know)
  2543. 2. W|想知(Want to know)
  2544. 3. L|已学(Learned)
  2545. 4. 学习反思
  2546. 分析要求:
  2547. - 每个维度先统计实际有效作答人数及占全班比例。
  2548. - 只分析实际有学生填写的维度;如果某个维度无人填写,则不要输出该维度。
  2549. - 学生未填写某个维度,不代表“不知道”“没学会”或“没有反思”,禁止据此推断。
  2550. - 将意思相近的回答合并归纳,优先呈现班级共性。
  2551. - 如存在明显误解、集中困惑或值得教师关注的问题,可简短指出。
  2552. - 不逐个学生罗列,不评价个人,不排名。
  2553. - 不要为了填满表格而强行生成结论;没有明显发现的内容可以省略。
  2554. - 输出必须简洁,每个单元格尽量控制在 1–2 句话。
  2555. 请仅使用以下表格格式输出:
  2556. | 维度 | 填写情况 | 班级主要情况 | 教师可关注 |
  2557. |---|---|---|---|
  2558. | K|已知 | X人,X% | 概括学生主要已有认知,最多2点 | 如有明显误解或差异则指出,否则写“-” |
  2559. | W|想知 | X人,X% | 概括学生最集中的问题或兴趣,最多2点 | 值得后续回应的问题,最多1点 |
  2560. | L|已学 | X人,X% | 概括学生主要学习收获,最多2点 | 未充分理解或存在混淆的内容,最多1点 |
  2561. | 学习反思 | X人,X% | 概括主要收获、困难或学习感受,最多2点 | 后续教学可调整或跟进的重点,最多1点 |
  2562. 注意:
  2563. - 无人填写的维度整行删除。
  2564. - 避免空泛表达,例如“学生学习情况较好”“总体表现不错”。
  2565. - 尽量使用具体主题、概念或问题名称。
  2566. # 学生提交数据 #
  2567. ${chatMsg}`
  2568. console.log('workUrl', props.workUrl)
  2569. console.log('ai应用提示词', msg)
  2570. if (!currentAnalysis.value) {
  2571. aiAnalysisData.value.push({
  2572. pid: props.workId + (props.cid ? ',' + props.cid : ''),
  2573. index: props.showData.workIndex,
  2574. loading: true,
  2575. json: { text: '', echartsData: '' },
  2576. noEnd: true,
  2577. update_at: '',
  2578. create_at: '',
  2579. })
  2580. }
  2581. else {
  2582. aiAnalysisData.value.find((item: any) => {
  2583. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2584. }).loading = true
  2585. aiAnalysisData.value.find((item: any) => {
  2586. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2587. }).json = { text: '', echartsData: '' }
  2588. }
  2589. chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
  2590. if (event.type === 'message') {
  2591. aiAnalysisData.value.find((item: any) => {
  2592. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2593. }).json.text = md.render(event.data)
  2594. aiAnalysisData.value.find((item: any) => {
  2595. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2596. }).loading = false
  2597. }
  2598. else if (event.type === 'messageEnd') {
  2599. aiAnalysisData.value.find((item: any) => {
  2600. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2601. }).json.text = md.render(event.data)
  2602. aiAnalysisData.value.find((item: any) => {
  2603. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2604. }).noEnd = false
  2605. aiAnalysisData.value.find((item: any) => {
  2606. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2607. }).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, '-')
  2608. saveAnalysis()
  2609. }
  2610. }, '', [], 'open-qwen-plus-latest').catch(err => {
  2611. console.log('err', err)
  2612. })
  2613. }
  2614. // ai应用
  2615. const aiAnalysisRefresh832 = () => {
  2616. let chatMsg = ``
  2617. console.log('processedWorkArray.value', processedWorkArray.value)
  2618. const hatNames: Record<string, string> = {
  2619. white: '白帽|事实与信息',
  2620. red: '红帽|感受与直觉',
  2621. black: '黑帽|风险与问题',
  2622. yellow: '黄帽|价值与机会',
  2623. green: '绿帽|创意与可能性',
  2624. blue: '蓝帽|总结与推进',
  2625. }
  2626. processedWorkArray.value.forEach((i) => {
  2627. if (typeof i.content === 'object') {
  2628. const c = i.content
  2629. const studentName = i.name || ''
  2630. const isGroup = c.members && c.members.length > 0
  2631. const memberNames = isGroup ? c.members.map((m: any) => typeof m === 'object' ? (m.name || '') : m) : []
  2632. const submitter = isGroup ? `${studentName}(小组成员:${memberNames.join('、')})` : studentName
  2633. if (c.scenario) {
  2634. chatMsg += `\n${submitter} - 讨论场景:\n${c.scenario}\n`
  2635. }
  2636. const hats = c.hats || []
  2637. const hatContent = c.hatContent || {}
  2638. hats.forEach((hat: string) => {
  2639. const label = hatNames[hat] || hat
  2640. const content = hatContent[hat] || ''
  2641. if (content) {
  2642. chatMsg += `\n${submitter} - ${label}:\n${content}\n`
  2643. }
  2644. })
  2645. }
  2646. })
  2647. const msg = `# CONTEXT #
  2648. 课程数据:
  2649. - 课程名称:${props.courseDetail.title}
  2650. - 课程学科:${props.courseDetail.name}
  2651. - 需要提交人数:${props.showData.workArray.length + props.showData.unsubmittedStudents.length}
  2652. - 已提交人数:${props.showData.workArray.length}
  2653. 你是一名教学分析助手。请根据全班学生或各小组提交的「六顶思考帽」讨论内容,从班级整体视角进行简洁分析,帮助教师快速了解学生在不同思考方式下的主要观点、分歧与值得继续讨论的问题。
  2654. 本次活动不一定使用完整的六顶思考帽。教师可能只配置其中 3 顶、4 顶或其他组合。
  2655. 你必须以本次活动实际配置和学生实际提交的思考帽为准,只分析本次活动中启用的思考帽,不要自行补充未启用的帽子。
  2656. 提交内容可能有两种形式:
  2657. 个人提交:每名学生分别填写本次活动配置的一个或多个思考帽。
  2658. 小组提交:以小组为单位提交,内容中可能包含小组成员姓名、每位成员负责的思考帽,以及对应讨论内容。
  2659. 六顶思考帽的含义如下,仅用于识别和分析本次实际启用的帽子:
  2660. 白帽|事实与信息
  2661. 关注学生提出的事实、数据、已知信息,以及认为仍需补充的信息。
  2662. 红帽|感受与直觉
  2663. 关注学生表达的感受、直觉、第一反应、喜欢或担忧。
  2664. 黑帽|风险与问题
  2665. 关注学生发现的问题、限制、风险、困难或可能失败的原因。
  2666. 黄帽|价值与机会
  2667. 关注学生发现的优点、价值、机会、积极影响或可行之处。
  2668. 绿帽|创意与可能性
  2669. 关注学生提出的新想法、替代方案、改进方式或不同可能性。
  2670. 蓝帽|总结与推进
  2671. 关注学生对讨论的总结、观点整合、下一步行动、需要进一步解决的问题。
  2672. 分析要求:
  2673. 只分析本次活动实际配置的思考帽。
  2674. 未配置的思考帽不要输出,也不要视为“缺失”“未作答”或“思考不足”。
  2675. 对于已经配置的思考帽,统计实际有效参与情况。
  2676. 如果是个人提交,统计有效作答人数及占全班比例,例如“18人,75%”。
  2677. 如果是小组提交,优先统计有效参与小组数及占全部提交小组比例,例如“5/6组,83%”;如数据中可以明确判断参与该帽子的学生人数,可补充人数,例如“5/6组,8人参与”。
  2678. 如果某顶帽子已配置,但无人或无小组实际提交有效内容,则不要输出该帽子。
  2679. 学生或小组未填写某顶已配置的帽子,不代表缺乏这种思维能力,禁止据此推断。
  2680. 将意思相近的观点合并归纳,优先呈现班级或多个小组反复出现的共性观点。
  2681. 如果不同学生或小组之间存在明显不同观点,可简短呈现主要分歧,不必强行形成统一结论。
  2682. 区分“学生明确提出的内容”和你的推断,不要补充学生没有表达过的理由、风险、优势、情绪或创意。
  2683. 不逐个学生罗列,不评价个人,不排名。
  2684. 如果提交内容包含“小组成员—负责帽子—贡献内容”等信息,只用于判断参与情况和思考分工,不对个人能力进行评价。
  2685. 如果不同已配置帽子的参与程度或内容丰富度存在明显差异,可以客观描述,但不要解释为学生“不会”某种思考。
  2686. 不要为了让分析看起来完整而强行生成结论;没有明显发现的内容可以省略。
  2687. 输出必须简洁,每个单元格尽量控制在 1–2 句话。
  2688. 请仅使用以下表格格式输出:
  2689. 思考帽
  2690. 参与情况
  2691. 班级 / 小组主要观点
  2692. 教师可关注
  2693. ⚪ 白帽|事实与信息
  2694. X人,X% / X组,X%
  2695. 概括反复出现的事实、信息或信息缺口,最多2点
  2696. 如有事实混淆、证据不足或集中缺失的信息则指出,否则写“-”
  2697. 🔴 红帽|感受与直觉
  2698. X人,X% / X组,X%
  2699. 概括主要感受、直觉或态度,最多2点
  2700. 如存在明显情绪分化或值得进一步了解的感受则指出,否则写“-”
  2701. ⚫ 黑帽|风险与问题
  2702. X人,X% / X组,X%
  2703. 概括最集中的问题、风险或限制,最多2点
  2704. 值得后续讨论或验证的问题,最多1点
  2705. 🟡 黄帽|价值与机会
  2706. X人,X% / X组,X%
  2707. 概括主要优势、价值或机会,最多2点
  2708. 如有值得进一步验证的价值判断则指出,否则写“-”
  2709. 🟢 绿帽|创意与可能性
  2710. X人,X% / X组,X%
  2711. 概括主要创意、方案或不同可能性,最多2点
  2712. 值得继续展开或比较的想法,最多1点
  2713. 🔵 蓝帽|总结与推进
  2714. X人,X% / X组,X%
  2715. 概括主要结论、共识或下一步行动,最多2点
  2716. 尚未解决、需要继续讨论的问题,最多1点
  2717. 注意:
  2718. 表格只保留“本次活动已配置 + 实际有有效提交”的思考帽。
  2719. 例如教师本次只配置白帽、黑帽、绿帽,则最终最多只输出这 3 行,不要出现红帽、黄帽、蓝帽。
  2720. 如果已配置的某顶帽子无人有效填写,则该行也删除。
  2721. 如果同一学生或小组提交了多个帽子,应分别计入对应帽子的参与统计。
  2722. 同一帽子下重复表达相同观点时,应合并统计和概括,不重复罗列。
  2723. 如果存在明显的多数观点与少数不同观点,可以表达为“多数小组认为……;另有少数组提出……”,不要逐组列举。
  2724. 对小组任务,不要因为某位成员负责某一顶帽子,就推断该成员个人更擅长这种思考方式。
  2725. 避免空泛表达,例如“学生思考比较全面”“大家讨论得很好”“学生参与积极”。
  2726. 尽量直接使用学生实际讨论中的主题、方案、问题、证据或观点名称。
  2727. # 学生提交数据 #
  2728. ${chatMsg}`
  2729. console.log('workUrl', props.workUrl)
  2730. console.log('ai应用提示词', msg)
  2731. if (!currentAnalysis.value) {
  2732. aiAnalysisData.value.push({
  2733. pid: props.workId + (props.cid ? ',' + props.cid : ''),
  2734. index: props.showData.workIndex,
  2735. loading: true,
  2736. json: { text: '', echartsData: '' },
  2737. noEnd: true,
  2738. update_at: '',
  2739. create_at: '',
  2740. })
  2741. }
  2742. else {
  2743. aiAnalysisData.value.find((item: any) => {
  2744. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2745. }).loading = true
  2746. aiAnalysisData.value.find((item: any) => {
  2747. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2748. }).json = { text: '', echartsData: '' }
  2749. }
  2750. chat_stream(msg, 'a7741704-ba56-40b7-a6b8-62a423ef9376', props.userId, lang.lang, (event) => {
  2751. if (event.type === 'message') {
  2752. aiAnalysisData.value.find((item: any) => {
  2753. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2754. }).json.text = md.render(event.data)
  2755. aiAnalysisData.value.find((item: any) => {
  2756. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2757. }).loading = false
  2758. }
  2759. else if (event.type === 'messageEnd') {
  2760. aiAnalysisData.value.find((item: any) => {
  2761. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2762. }).json.text = md.render(event.data)
  2763. aiAnalysisData.value.find((item: any) => {
  2764. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2765. }).noEnd = false
  2766. aiAnalysisData.value.find((item: any) => {
  2767. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2768. }).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, '-')
  2769. saveAnalysis()
  2770. }
  2771. }, '', [], 'open-qwen-plus-latest').catch(err => {
  2772. console.log('err', err)
  2773. })
  2774. }
  2775. // 当前分析
  2776. const currentAnalysis = computed(() => {
  2777. const _result = aiAnalysisData.value.find((item: any) => {
  2778. return item.pid === props.workId + (props.cid ? ',' + props.cid : '') && item.index === props.showData.workIndex
  2779. })
  2780. if (_result?.json?.echartsData) {
  2781. _result.json.keyword = _result.json.echartsData?.series?.[0]?.data?.slice(0, 5).map((item: any) => item.name)
  2782. }
  2783. if (_result) {
  2784. return _result
  2785. }
  2786. return null
  2787. })
  2788. // 保存分析
  2789. const saveAnalysis = () => {
  2790. if (!currentAnalysis.value) {
  2791. return
  2792. }
  2793. const params = [{
  2794. pid: props.workId + (props.cid ? ',' + props.cid : ''),
  2795. idx: props.showData.workIndex,
  2796. json: JSON.stringify(currentAnalysis.value.json),
  2797. }]
  2798. console.log(params)
  2799. axios.post('https://pbl.cocorobo.cn/api/pbl/insert_pptAnalysis', params).then(res => {
  2800. if (res == 1) {
  2801. console.log('保存成功')
  2802. }
  2803. }).catch(err => {
  2804. console.log('insert_pptAnalysis_err', err)
  2805. })
  2806. }
  2807. // 点击边框
  2808. const clickContent = (flag: boolean) => {
  2809. if (flag && lookWorkDetail.value && workDetail.value?.type !== '45' && workDetail.value?.type !== '78') {
  2810. if (props.roleType != 1 && isCastScreen.value) {
  2811. return
  2812. }
  2813. lookWork('')
  2814. }
  2815. }
  2816. // 监听 props.showData.workDetail.id 变化
  2817. watch(
  2818. () => props.showData?.workDetail,
  2819. (newId, oldId) => {
  2820. getAnalysis()
  2821. },
  2822. { immediate: true }
  2823. )
  2824. // 批量下载
  2825. const downloadAll = async () => {
  2826. if (!processedWorkArray.value || processedWorkArray.value.length === 0) {
  2827. return
  2828. }
  2829. if (downloadLoading.value) {
  2830. return
  2831. }
  2832. // 设置加载状态
  2833. downloadLoading.value = true
  2834. try {
  2835. // 动态导入 JSZip
  2836. const JSZip = (await import('jszip')).default
  2837. const { saveAs } = await import('file-saver')
  2838. const zip = new JSZip()
  2839. // 遍历所有学生
  2840. for (const student of processedWorkArray.value) {
  2841. if (!student.content || !student.content.fileList || student.content.fileList.length === 0) {
  2842. continue
  2843. }
  2844. // 遍历学生的所有照片
  2845. for (let i = 0; i < student.content.fileList.length; i++) {
  2846. const file = student.content.fileList[i]
  2847. const ext = (file.url.split('?')[0].split('.').pop() || 'jpg').toLowerCase()
  2848. const fileName = student.content.fileList.length > 1
  2849. ? `${student.name}${String(i + 1).padStart(2, '0')}.${ext}`
  2850. : `${student.name}.${ext}`
  2851. try {
  2852. // 获取图片数据
  2853. const response = await fetch(file.url)
  2854. const blob = await response.blob()
  2855. zip.file(fileName, blob)
  2856. }
  2857. catch (error) {
  2858. console.error(`下载 ${fileName} 失败:`, error)
  2859. }
  2860. }
  2861. }
  2862. // 生成压缩包并下载
  2863. const content = await zip.generateAsync({ type: 'blob' })
  2864. saveAs(content, `${lang.ssBatchDownload}.zip`)
  2865. }
  2866. catch (error) {
  2867. console.error('批量下载失败:', error)
  2868. }
  2869. finally {
  2870. // 重置加载状态
  2871. downloadLoading.value = false
  2872. }
  2873. }
  2874. // 组件卸载时清理ECharts实例
  2875. onUnmounted(() => {
  2876. // 清除定时器
  2877. if (resizeTimer) {
  2878. clearTimeout(resizeTimer)
  2879. resizeTimer = null
  2880. }
  2881. // 销毁ECharts实例
  2882. if (myChart.value && !myChart.value.isDisposed()) {
  2883. myChart.value.dispose()
  2884. myChart.value = null
  2885. }
  2886. })
  2887. </script>
  2888. <style lang="scss" scoped>
  2889. .choiceQuestionDetailDialog {
  2890. background: none;
  2891. position: relative;
  2892. width: 100%;
  2893. height: 100%;
  2894. z-index: 1;
  2895. .content {
  2896. width: 100%;
  2897. height: 100%;
  2898. position: relative;
  2899. background: #fff;
  2900. box-sizing: border-box;
  2901. padding: 40px;
  2902. overflow: auto;
  2903. .closeIcon {
  2904. position: absolute;
  2905. right: 20px;
  2906. top: 20px;
  2907. cursor: pointer;
  2908. width: 20px;
  2909. height: 20px;
  2910. img {
  2911. width: 100%;
  2912. height: 100%;
  2913. }
  2914. }
  2915. .c_t45 {
  2916. width: 100%;
  2917. min-height: 100%;
  2918. display: flex;
  2919. // align-items: center;
  2920. flex-direction: column;
  2921. height: auto;
  2922. .c_t45_title {
  2923. color: rgba(0, 0, 0, 0.9);
  2924. font-weight: 600;
  2925. font-size: 24px;
  2926. line-height: 24px;
  2927. position: relative;
  2928. width: 100%;
  2929. display: flex;
  2930. flex-direction: column;
  2931. // align-items: center;
  2932. // justify-content: center;
  2933. user-select: none;
  2934. gap: .4rem;
  2935. &>div {
  2936. max-width: calc(100%);
  2937. }
  2938. &>span {
  2939. position: absolute;
  2940. top: 20px;
  2941. cursor: pointer;
  2942. &:nth-of-type(1) {
  2943. left: 0;
  2944. }
  2945. &:nth-of-type(2) {
  2946. right: 0;
  2947. }
  2948. }
  2949. .c_t45_t_btn_noActive {
  2950. color: #CCCCCC;
  2951. }
  2952. .c_t45_msg {
  2953. display: flex;
  2954. align-items: center;
  2955. font-size: .9rem;
  2956. font-weight: 400;
  2957. gap: 1rem;
  2958. &>span {
  2959. text-decoration: underline;
  2960. cursor: pointer;
  2961. }
  2962. .c_t45_correct_rate {
  2963. color: #29AE2B;
  2964. font-weight: 600;
  2965. }
  2966. }
  2967. }
  2968. .c_t45_img {
  2969. max-width: 200px;
  2970. max-height: 200px;
  2971. object-fit: cover;
  2972. margin-top: 20px;
  2973. }
  2974. .c_t45_type {
  2975. font-weight: 400;
  2976. font-size: 15px;
  2977. line-height: 21px;
  2978. letter-spacing: 0.5px;
  2979. color: rgba(0, 0, 0, 1);
  2980. opacity: 0.5;
  2981. margin-top: 20px;
  2982. }
  2983. .c_t45_echarts {
  2984. width: 100%;
  2985. max-width: 100%;
  2986. flex: 1;
  2987. min-height: 400px;
  2988. display: flex;
  2989. align-items: center;
  2990. box-sizing: border-box;
  2991. &>div {
  2992. width: 100%;
  2993. height: 400px;
  2994. }
  2995. }
  2996. .cq_changeBtn {
  2997. display: flex;
  2998. align-items: center;
  2999. gap: 1.5rem;
  3000. margin: 1rem auto;
  3001. &>div {
  3002. padding: .6rem;
  3003. border-radius: .5rem;
  3004. border: solid 2px #F6C82B;
  3005. display: flex;
  3006. justify-content: center;
  3007. align-items: center;
  3008. cursor: pointer;
  3009. &>svg {
  3010. fill: #F6C82D;
  3011. width: 1rem;
  3012. height: 1rem;
  3013. }
  3014. &.cq_cb_disabled {
  3015. cursor: not-allowed !important;
  3016. border-color: #FEF8E9 !important;
  3017. }
  3018. &.cq_cb_disabled>svg {
  3019. fill: #A3A3A3 !important;
  3020. }
  3021. }
  3022. &>span {
  3023. font-weight: 500;
  3024. }
  3025. }
  3026. }
  3027. .c_t15 {
  3028. width: 100%;
  3029. min-height: 100%;
  3030. display: flex;
  3031. // align-items: center;
  3032. flex-direction: column;
  3033. height: auto;
  3034. padding: 40px;
  3035. .c_t15_title {
  3036. color: rgba(0, 0, 0, 0.9);
  3037. font-weight: 600;
  3038. font-size: 24px;
  3039. line-height: 24px;
  3040. }
  3041. .c_t15_msg {
  3042. display: flex;
  3043. align-items: center;
  3044. font-size: .9rem;
  3045. font-weight: 400;
  3046. gap: 1rem;
  3047. &>span {
  3048. text-decoration: underline;
  3049. cursor: pointer;
  3050. }
  3051. }
  3052. .c_t15_type {
  3053. font-weight: 400;
  3054. font-size: 15px;
  3055. line-height: 21px;
  3056. letter-spacing: 0.5px;
  3057. color: rgba(0, 0, 0, 1);
  3058. opacity: 0.5;
  3059. margin: 10px 0;
  3060. }
  3061. .c_t15_content {
  3062. width: 100%;
  3063. height: auto;
  3064. display: grid;
  3065. grid-template-columns: repeat(3, 1fr);
  3066. gap: 20px;
  3067. margin-top: 40px;
  3068. .c_t15_c_item {
  3069. width: 100%;
  3070. height: auto;
  3071. box-shadow: 2px 4px 20px 0px rgba(0, 0, 0, 0.2);
  3072. box-sizing: border-box;
  3073. border-radius: 12px;
  3074. padding: 16px;
  3075. background: rgba(255, 255, 255, 0.6);
  3076. transition: 0.3s;
  3077. cursor: pointer;
  3078. overflow: hidden;
  3079. &:hover {
  3080. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  3081. background: rgba(255, 255, 255, 0.6);
  3082. }
  3083. .c_t15_c_i_top {
  3084. display: flex;
  3085. align-items: center;
  3086. gap: 10px;
  3087. width: 100%;
  3088. overflow: hidden;
  3089. &>span {
  3090. min-width: 25px;
  3091. height: 25px;
  3092. display: flex;
  3093. align-items: center;
  3094. justify-content: center;
  3095. background: rgba(252, 207, 0, 1);
  3096. border-radius: 4px;
  3097. color: rgba(255, 255, 255, 1);
  3098. font-weight: bold;
  3099. font-size: 14px;
  3100. }
  3101. &>div {
  3102. color: rgba(0, 0, 0, 0.7);
  3103. font-weight: 800;
  3104. overflow: hidden;
  3105. text-overflow: ellipsis;
  3106. white-space: nowrap;
  3107. }
  3108. }
  3109. .c_t15_c_i_bottom {
  3110. margin-top: 15px;
  3111. font-weight: 300;
  3112. font-size: 14px;
  3113. height: 40px;
  3114. max-width: 100%;
  3115. overflow: hidden;
  3116. text-overflow: ellipsis;
  3117. display: -webkit-box;
  3118. -webkit-line-clamp: 2;
  3119. -webkit-box-orient: vertical;
  3120. }
  3121. .c_t73_c_i_bottom {
  3122. margin-top: 15px;
  3123. font-weight: 300;
  3124. font-size: 14px;
  3125. // height: 40px;
  3126. max-width: 100%;
  3127. overflow: hidden;
  3128. text-overflow: ellipsis;
  3129. display: -webkit-box;
  3130. -webkit-line-clamp: 2;
  3131. -webkit-box-orient: vertical;
  3132. img {
  3133. width: 100%;
  3134. height: 200px;
  3135. object-fit: cover;
  3136. }
  3137. span {
  3138. width: 100%;
  3139. height: 200px;
  3140. display: flex;
  3141. align-items: center;
  3142. justify-content: center;
  3143. }
  3144. }
  3145. }
  3146. }
  3147. .c_t15_workDetail {
  3148. width: 100%;
  3149. height: auto;
  3150. margin-top: 40px;
  3151. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  3152. box-sizing: border-box;
  3153. padding: 16px;
  3154. border-radius: 12px;
  3155. display: flex;
  3156. flex-direction: column;
  3157. .c_t15_wd_top {
  3158. width: 100%;
  3159. display: flex;
  3160. align-items: center;
  3161. gap: 15px;
  3162. &>img {
  3163. width: 25px;
  3164. height: 25px;
  3165. cursor: pointer;
  3166. }
  3167. &>span {
  3168. display: block;
  3169. width: 30px;
  3170. height: 30px;
  3171. display: flex;
  3172. align-items: center;
  3173. justify-content: center;
  3174. background: rgba(252, 207, 0, 1);
  3175. border-radius: 4px;
  3176. color: rgba(255, 255, 255, 1);
  3177. font-weight: bold;
  3178. font-size: 16px;
  3179. }
  3180. &>div {
  3181. color: rgba(0, 0, 0, 0.7);
  3182. font-weight: 800;
  3183. font-size: 18px;
  3184. }
  3185. }
  3186. .c_t15_wd_content {
  3187. width: 100%;
  3188. margin-top: 20px;
  3189. max-height: 100%;
  3190. overflow: auto;
  3191. flex-wrap: wrap;
  3192. .c_t15_wd_c_imageList {
  3193. width: 100%;
  3194. gap: 20px;
  3195. margin-top: 20px;
  3196. &>img {
  3197. width: 100px;
  3198. height: auto;
  3199. cursor: pointer;
  3200. margin-right: 20px;
  3201. object-fit: cover;
  3202. }
  3203. }
  3204. }
  3205. }
  3206. .c_t79_workDetail {
  3207. width: 100%;
  3208. height: auto;
  3209. margin-top: 40px;
  3210. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  3211. box-sizing: border-box;
  3212. padding: 16px;
  3213. border-radius: 12px;
  3214. display: flex;
  3215. flex-direction: column;
  3216. .c_t79_wd_top {
  3217. width: 100%;
  3218. display: flex;
  3219. align-items: center;
  3220. gap: 15px;
  3221. &>img {
  3222. width: 25px;
  3223. height: 25px;
  3224. cursor: pointer;
  3225. }
  3226. &>span {
  3227. display: block;
  3228. width: 30px;
  3229. height: 30px;
  3230. display: flex;
  3231. align-items: center;
  3232. justify-content: center;
  3233. background: rgba(252, 207, 0, 1);
  3234. border-radius: 4px;
  3235. color: rgba(255, 255, 255, 1);
  3236. font-weight: bold;
  3237. font-size: 16px;
  3238. }
  3239. &>div {
  3240. color: rgba(0, 0, 0, 0.7);
  3241. font-weight: 800;
  3242. font-size: 18px;
  3243. }
  3244. }
  3245. .c_t79_wd_content {
  3246. width: 100%;
  3247. margin-top: 20px;
  3248. max-height: 100%;
  3249. overflow: auto;
  3250. flex-wrap: wrap;
  3251. display: flex;
  3252. align-items: center;
  3253. justify-content: center;
  3254. &>img {
  3255. max-width: 100%;
  3256. height: 300px;
  3257. object-fit: cover;
  3258. }
  3259. }
  3260. }
  3261. .cq_changeBtn {
  3262. display: flex;
  3263. align-items: center;
  3264. gap: 1.5rem;
  3265. margin: 1rem auto;
  3266. &>div {
  3267. padding: .6rem;
  3268. border-radius: .5rem;
  3269. border: solid 2px #F6C82B;
  3270. display: flex;
  3271. justify-content: center;
  3272. align-items: center;
  3273. cursor: pointer;
  3274. &>svg {
  3275. fill: #F6C82D;
  3276. width: 1rem;
  3277. height: 1rem;
  3278. }
  3279. &.cq_cb_disabled {
  3280. cursor: not-allowed !important;
  3281. border-color: #FEF8E9 !important;
  3282. }
  3283. &.cq_cb_disabled>svg {
  3284. fill: #A3A3A3 !important;
  3285. }
  3286. }
  3287. &>span {
  3288. font-weight: 500;
  3289. }
  3290. }
  3291. }
  3292. .c_t72 {
  3293. width: 100%;
  3294. min-height: 100%;
  3295. display: flex;
  3296. // align-items: center;
  3297. flex-direction: column;
  3298. height: auto;
  3299. padding: 40px;
  3300. .c_t72_title {
  3301. color: rgba(0, 0, 0, 0.9);
  3302. font-weight: 600;
  3303. font-size: 24px;
  3304. line-height: 24px;
  3305. }
  3306. .c_t72_type {
  3307. font-weight: 400;
  3308. font-size: 15px;
  3309. line-height: 21px;
  3310. letter-spacing: 0.5px;
  3311. color: rgba(0, 0, 0, 1);
  3312. opacity: 0.5;
  3313. margin: 10px 0;
  3314. }
  3315. .c_t72_msg {
  3316. display: flex;
  3317. align-items: center;
  3318. font-size: .9rem;
  3319. font-weight: 400;
  3320. gap: 1rem;
  3321. &>span {
  3322. text-decoration: underline;
  3323. cursor: pointer;
  3324. }
  3325. }
  3326. .c_t72_content {
  3327. width: 100%;
  3328. height: auto;
  3329. display: grid;
  3330. grid-template-columns: repeat(4, 1fr);
  3331. gap: 20px;
  3332. margin-top: 40px;
  3333. .c_t72_c_item {
  3334. width: 100%;
  3335. height: auto;
  3336. box-shadow: 2px 4px 20px 0px rgba(0, 0, 0, 0.2);
  3337. box-sizing: border-box;
  3338. border-radius: 12px;
  3339. padding: 16px;
  3340. background: rgba(255, 255, 255, 0.6);
  3341. transition: 0.3s;
  3342. cursor: pointer;
  3343. overflow: hidden;
  3344. &:hover {
  3345. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  3346. background: rgba(255, 255, 255, 0.6);
  3347. }
  3348. .c_t72_c_i_top {
  3349. display: flex;
  3350. align-items: center;
  3351. gap: 10px;
  3352. width: 100%;
  3353. overflow: hidden;
  3354. &>span {
  3355. min-width: 25px;
  3356. height: 25px;
  3357. display: flex;
  3358. align-items: center;
  3359. justify-content: center;
  3360. background: rgba(252, 207, 0, 1);
  3361. border-radius: 4px;
  3362. color: rgba(255, 255, 255, 1);
  3363. font-weight: bold;
  3364. font-size: 14px;
  3365. }
  3366. &>div {
  3367. color: rgba(0, 0, 0, 0.7);
  3368. font-weight: 800;
  3369. }
  3370. }
  3371. .c_t72_c_i_bottom {
  3372. margin-top: 15px;
  3373. font-weight: 300;
  3374. font-size: 14px;
  3375. // height: 40px;
  3376. max-width: 100%;
  3377. overflow: hidden;
  3378. text-overflow: ellipsis;
  3379. display: -webkit-box;
  3380. -webkit-line-clamp: 2;
  3381. -webkit-box-orient: vertical;
  3382. img {
  3383. width: 100%;
  3384. max-height: 200px;
  3385. object-fit: cover;
  3386. }
  3387. }
  3388. }
  3389. }
  3390. .c_t72_workDetail {
  3391. width: 100%;
  3392. height: auto;
  3393. margin-top: 40px;
  3394. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  3395. box-sizing: border-box;
  3396. padding: 16px;
  3397. border-radius: 12px;
  3398. display: flex;
  3399. flex-direction: column;
  3400. .c_t72_wd_top {
  3401. width: 100%;
  3402. display: flex;
  3403. align-items: center;
  3404. gap: 15px;
  3405. &>img {
  3406. width: 25px;
  3407. height: 25px;
  3408. cursor: pointer;
  3409. }
  3410. &>span {
  3411. display: block;
  3412. width: 30px;
  3413. height: 30px;
  3414. display: flex;
  3415. align-items: center;
  3416. justify-content: center;
  3417. background: rgba(252, 207, 0, 1);
  3418. border-radius: 4px;
  3419. color: rgba(255, 255, 255, 1);
  3420. font-weight: bold;
  3421. font-size: 16px;
  3422. }
  3423. &>div {
  3424. color: rgba(0, 0, 0, 0.7);
  3425. font-weight: 800;
  3426. font-size: 18px;
  3427. }
  3428. }
  3429. .c_t72_wd_content {
  3430. width: 100%;
  3431. margin-top: 20px;
  3432. max-height: 100%;
  3433. overflow: auto;
  3434. flex-wrap: wrap;
  3435. display: flex;
  3436. align-items: center;
  3437. justify-content: center;
  3438. .na_m_item {
  3439. width: 100%;
  3440. height: auto;
  3441. margin: 10px 0;
  3442. }
  3443. .na_m_i_name {
  3444. width: fit-content;
  3445. max-width: 100%;
  3446. height: auto;
  3447. box-sizing: border-box;
  3448. padding: 10px 10px;
  3449. display: flex;
  3450. align-items: center;
  3451. border-radius: 10px 10px 0 0;
  3452. background-color: #9747ff;
  3453. color: #fff;
  3454. text-overflow: ellipsis;
  3455. overflow: hidden;
  3456. white-space: nowrap;
  3457. }
  3458. .aiName {
  3459. background-color: #0560fc;
  3460. }
  3461. .na_m_i_content {
  3462. padding: 10px;
  3463. border: solid 1px #e7e7e7;
  3464. box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
  3465. border-radius: 0 0 12px 12px;
  3466. background-color: #fff;
  3467. :deep(img) {
  3468. max-width: 100%;
  3469. }
  3470. }
  3471. .messageNode {
  3472. width: 100%;
  3473. height: auto;
  3474. box-sizing: border-box;
  3475. padding: 10px 10px;
  3476. border: 0.5px solid #e7e7e7;
  3477. border-radius: 12px;
  3478. gap: 10px;
  3479. margin-top: 20px;
  3480. }
  3481. .messageNodeArea {
  3482. width: 100%;
  3483. height: auto;
  3484. }
  3485. }
  3486. }
  3487. }
  3488. .c_t73 {
  3489. width: 100%;
  3490. min-height: 100%;
  3491. display: flex;
  3492. // align-items: center;
  3493. flex-direction: column;
  3494. height: auto;
  3495. padding: 40px;
  3496. .c_t73_title {
  3497. color: rgba(0, 0, 0, 0.9);
  3498. font-weight: 600;
  3499. font-size: 24px;
  3500. line-height: 24px;
  3501. }
  3502. .c_t73_type {
  3503. font-weight: 400;
  3504. font-size: 15px;
  3505. line-height: 21px;
  3506. letter-spacing: 0.5px;
  3507. color: rgba(0, 0, 0, 1);
  3508. opacity: 0.5;
  3509. margin: 10px 0;
  3510. }
  3511. .c_t73_msg {
  3512. display: flex;
  3513. align-items: center;
  3514. font-size: .9rem;
  3515. font-weight: 400;
  3516. gap: 1rem;
  3517. &>span {
  3518. text-decoration: underline;
  3519. cursor: pointer;
  3520. }
  3521. }
  3522. .c_t73_content {
  3523. width: 100%;
  3524. height: auto;
  3525. display: grid;
  3526. grid-template-columns: repeat(3, 1fr);
  3527. gap: 20px;
  3528. margin-top: 40px;
  3529. .c_t73_c_item {
  3530. width: 100%;
  3531. height: auto;
  3532. box-shadow: 2px 4px 20px 0px rgba(0, 0, 0, 0.2);
  3533. box-sizing: border-box;
  3534. border-radius: 12px;
  3535. padding: 16px;
  3536. background: rgba(255, 255, 255, 0.6);
  3537. transition: 0.3s;
  3538. cursor: pointer;
  3539. overflow: hidden;
  3540. &:hover {
  3541. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  3542. background: rgba(255, 255, 255, 0.6);
  3543. }
  3544. .c_t73_c_i_top {
  3545. display: flex;
  3546. align-items: center;
  3547. gap: 10px;
  3548. width: 100%;
  3549. overflow: hidden;
  3550. &>span {
  3551. min-width: 25px;
  3552. height: 25px;
  3553. display: flex;
  3554. align-items: center;
  3555. justify-content: center;
  3556. background: rgba(252, 207, 0, 1);
  3557. border-radius: 4px;
  3558. color: rgba(255, 255, 255, 1);
  3559. font-weight: bold;
  3560. font-size: 14px;
  3561. }
  3562. &>div {
  3563. color: rgba(0, 0, 0, 0.7);
  3564. font-weight: 800;
  3565. }
  3566. }
  3567. .c_t73_c_i_bottom {
  3568. margin-top: 15px;
  3569. font-weight: 300;
  3570. font-size: 14px;
  3571. // height: 40px;
  3572. max-width: 100%;
  3573. overflow: hidden;
  3574. text-overflow: ellipsis;
  3575. display: -webkit-box;
  3576. -webkit-line-clamp: 2;
  3577. -webkit-box-orient: vertical;
  3578. img {
  3579. width: 100%;
  3580. max-height: 200px;
  3581. object-fit: cover;
  3582. }
  3583. }
  3584. }
  3585. }
  3586. .c_t73_workDetail {
  3587. width: 100%;
  3588. height: auto;
  3589. margin-top: 40px;
  3590. box-shadow: 4px 4px 14px 0px rgba(252, 207, 0, 0.5);
  3591. box-sizing: border-box;
  3592. padding: 16px;
  3593. border-radius: 12px;
  3594. display: flex;
  3595. flex-direction: column;
  3596. .c_t73_wd_top {
  3597. width: 100%;
  3598. display: flex;
  3599. align-items: center;
  3600. gap: 15px;
  3601. &>img {
  3602. width: 25px;
  3603. height: 25px;
  3604. cursor: pointer;
  3605. }
  3606. &>span {
  3607. display: block;
  3608. width: 30px;
  3609. height: 30px;
  3610. display: flex;
  3611. align-items: center;
  3612. justify-content: center;
  3613. background: rgba(252, 207, 0, 1);
  3614. border-radius: 4px;
  3615. color: rgba(255, 255, 255, 1);
  3616. font-weight: bold;
  3617. font-size: 16px;
  3618. }
  3619. &>div {
  3620. color: rgba(0, 0, 0, 0.7);
  3621. font-weight: 800;
  3622. font-size: 18px;
  3623. }
  3624. }
  3625. .c_t73_wd_content {
  3626. width: 100%;
  3627. margin-top: 20px;
  3628. max-height: 100%;
  3629. overflow: auto;
  3630. flex-wrap: wrap;
  3631. display: flex;
  3632. align-items: center;
  3633. justify-content: center;
  3634. &>img {
  3635. max-width: 100%;
  3636. object-fit: cover;
  3637. }
  3638. }
  3639. }
  3640. }
  3641. }
  3642. }
  3643. .aiAnalysis {
  3644. width: 100%;
  3645. height: auto;
  3646. display: flex;
  3647. flex-direction: column;
  3648. padding: 1rem;
  3649. border: solid 1px #F6C82B;
  3650. border-left-width: 4px;
  3651. border-radius: 1rem;
  3652. gap: 1rem;
  3653. &>.ai_header {
  3654. display: flex;
  3655. align-items: center;
  3656. justify-content: space-between;
  3657. gap: 1rem;
  3658. &>div {
  3659. display: flex;
  3660. align-items: center;
  3661. gap: .5rem;
  3662. &>svg {
  3663. width: 1rem;
  3664. height: 1rem;
  3665. }
  3666. }
  3667. &>.ai_title {
  3668. color: #F7CD49;
  3669. font-weight: 500;
  3670. &>svg {
  3671. fill: #F7CD49;
  3672. width: 1.2rem;
  3673. height: 1.2rem;
  3674. }
  3675. }
  3676. &>.ai_refresh {
  3677. padding: .5rem 1rem;
  3678. border-radius: .5rem;
  3679. background: #F6C82B;
  3680. display: flex;
  3681. justify-content: center;
  3682. align-items: center;
  3683. cursor: pointer;
  3684. color: #000;
  3685. font-weight: bold;
  3686. font-size: .8rem;
  3687. gap: .5rem;
  3688. &>svg {
  3689. fill: #000;
  3690. width: .8rem;
  3691. height: .8rem;
  3692. }
  3693. &.disabled {
  3694. cursor: not-allowed !important;
  3695. background: #FEF8E9 !important;
  3696. }
  3697. }
  3698. }
  3699. &>.ai_content {
  3700. font-size: 1rem;
  3701. font-weight: 500;
  3702. :deep(table) {
  3703. border-collapse: collapse;
  3704. width: 100%;
  3705. margin: 0.5rem 0;
  3706. th,
  3707. td {
  3708. border: 1px solid #ddd;
  3709. padding: 0.5rem;
  3710. text-align: left;
  3711. }
  3712. th {
  3713. background: #f5f5f5;
  3714. }
  3715. }
  3716. }
  3717. &>.ai_echartsData {
  3718. display: flex;
  3719. flex-wrap: wrap;
  3720. gap: .5rem;
  3721. &>span {
  3722. padding: .2rem .5rem;
  3723. border-radius: .25rem;
  3724. background: #E6F4FF;
  3725. display: flex;
  3726. justify-content: center;
  3727. align-items: center;
  3728. color: #141517;
  3729. font-size: .75rem;
  3730. }
  3731. &>.title {
  3732. font-weight: 600;
  3733. }
  3734. &>.btn {
  3735. font-size: .9rem;
  3736. text-decoration: underline;
  3737. color: #F6C82B;
  3738. cursor: pointer;
  3739. }
  3740. }
  3741. &>.ai_updateTime {
  3742. font-size: .8rem;
  3743. font-weight: 500;
  3744. }
  3745. }
  3746. .nextAndUpBtn {
  3747. width: 100%;
  3748. height: auto;
  3749. display: grid;
  3750. grid-template-columns: 1fr 1fr;
  3751. margin-top: 20px;
  3752. gap: 15px;
  3753. &>span {
  3754. display: flex;
  3755. justify-content: center;
  3756. align-items: center;
  3757. width: 100%;
  3758. height: 40px;
  3759. border-radius: 5px;
  3760. font-size: 14px;
  3761. font-weight: 500;
  3762. color: #fff;
  3763. background: #f6c82b;
  3764. cursor: pointer;
  3765. }
  3766. &>.no_active {
  3767. background: #cccccc !important;
  3768. color: #999999 !important;
  3769. cursor: not-allowed !important;
  3770. pointer-events: none !important;
  3771. }
  3772. }
  3773. .c_title {
  3774. display: flex;
  3775. &>span {
  3776. flex: 1;
  3777. word-break: break-all;
  3778. }
  3779. }
  3780. .switch_btn {
  3781. display: flex;
  3782. align-items: center;
  3783. gap: .5rem;
  3784. margin-left: auto;
  3785. &>.switch {
  3786. display: flex;
  3787. align-items: center;
  3788. gap: .5rem;
  3789. font-size: .8rem;
  3790. color: #141517;
  3791. +.switch {
  3792. margin-left: .5rem;
  3793. }
  3794. }
  3795. }
  3796. .bottom_btn {
  3797. display: flex;
  3798. align-items: center;
  3799. gap: 5px;
  3800. font-weight: 300;
  3801. font-size: 14px;
  3802. color: rgba(0, 0, 0, 0.7);
  3803. .bottom_like {
  3804. margin-left: auto;
  3805. cursor: pointer;
  3806. display: flex;
  3807. align-items: center;
  3808. gap: 5px;
  3809. color: rgba(0, 0, 0, 0.7);
  3810. &.active {
  3811. color: rgba(252, 207, 0, 1);
  3812. }
  3813. }
  3814. }
  3815. .cast_sreen_btn {
  3816. display: flex;
  3817. align-items: center;
  3818. gap: 5px;
  3819. font-weight: 300;
  3820. font-size: 14px;
  3821. color: rgba(0, 0, 0, 0.7);
  3822. cursor: pointer;
  3823. margin-left: auto;
  3824. border-radius: 5px;
  3825. border: solid 1px rgba(252, 207, 0, .7);
  3826. padding: .5rem 0.6rem;
  3827. min-width: 65px;
  3828. justify-content: center;
  3829. }
  3830. .downloadBtn {
  3831. display: flex;
  3832. align-items: center;
  3833. gap: 5px;
  3834. font-weight: 300;
  3835. font-size: 14px;
  3836. color: rgba(0, 0, 0, 0.7);
  3837. cursor: pointer;
  3838. margin-left: auto;
  3839. border-radius: 5px;
  3840. border: solid 1px rgba(252, 207, 0, .7);
  3841. padding: .5rem 0.6rem;
  3842. min-width: 65px;
  3843. justify-content: center;
  3844. margin-top: 15px;
  3845. }
  3846. /* KWL 展示样式 */
  3847. .c_t831_wd_content {
  3848. margin-top: 16px;
  3849. display: flex;
  3850. flex-direction: column;
  3851. gap: 16px;
  3852. }
  3853. .kwl-grid {
  3854. display: grid;
  3855. grid-template-columns: repeat(3, 1fr);
  3856. gap: 12px;
  3857. }
  3858. .kwl-col {
  3859. border-radius: 12px;
  3860. overflow: hidden;
  3861. border: 1px solid #e5e7eb;
  3862. background: #fff;
  3863. display: flex;
  3864. flex-direction: column;
  3865. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  3866. transition: box-shadow 0.2s ease;
  3867. &:hover {
  3868. box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  3869. }
  3870. &__header {
  3871. display: flex;
  3872. align-items: center;
  3873. gap: 8px;
  3874. padding: 10px 12px;
  3875. color: #fff;
  3876. font-weight: 600;
  3877. font-size: 14px;
  3878. }
  3879. &__badge {
  3880. width: 24px;
  3881. height: 24px;
  3882. border-radius: 6px;
  3883. display: flex;
  3884. align-items: center;
  3885. justify-content: center;
  3886. background: rgba(255, 255, 255, 0.25);
  3887. font-size: 13px;
  3888. font-weight: 700;
  3889. }
  3890. &__label {
  3891. font-size: 14px;
  3892. }
  3893. &__body {
  3894. padding: 12px;
  3895. flex: 1;
  3896. min-height: 80px;
  3897. max-height: 220px;
  3898. overflow-y: auto;
  3899. }
  3900. }
  3901. .kwl-col--k {
  3902. .kwl-col__header {
  3903. background: linear-gradient(135deg, #3b82f6, #2563eb);
  3904. }
  3905. }
  3906. .kwl-col--w {
  3907. .kwl-col__header {
  3908. background: linear-gradient(135deg, #f59e0b, #d97706);
  3909. }
  3910. }
  3911. .kwl-col--l {
  3912. .kwl-col__header {
  3913. background: linear-gradient(135deg, #10b981, #059669);
  3914. }
  3915. }
  3916. .kwl-item {
  3917. position: relative;
  3918. padding: 6px 10px 6px 22px;
  3919. margin-bottom: 6px;
  3920. font-size: 13px;
  3921. color: #374151;
  3922. line-height: 1.5;
  3923. background: #f9fafb;
  3924. border-radius: 6px;
  3925. transition: background 0.2s ease;
  3926. word-break: break-word;
  3927. &:last-child {
  3928. margin-bottom: 0;
  3929. }
  3930. &::before {
  3931. content: '';
  3932. position: absolute;
  3933. left: 10px;
  3934. top: 13px;
  3935. width: 5px;
  3936. height: 5px;
  3937. border-radius: 50%;
  3938. background: #d1d5db;
  3939. }
  3940. &:hover {
  3941. background: #f3f4f6;
  3942. }
  3943. }
  3944. .kwl-col--k .kwl-item::before {
  3945. background: #3b82f6;
  3946. }
  3947. .kwl-col--w .kwl-item::before {
  3948. background: #f59e0b;
  3949. }
  3950. .kwl-col--l .kwl-item::before {
  3951. background: #10b981;
  3952. }
  3953. .kwl-empty {
  3954. text-align: center;
  3955. color: #9ca3af;
  3956. font-size: 13px;
  3957. padding: 20px 0;
  3958. font-style: italic;
  3959. }
  3960. /* 学习反思 */
  3961. .kwl-reflection {
  3962. border-radius: 12px;
  3963. background: linear-gradient(135deg, #fef3c7, #fde68a);
  3964. border: 1px solid #fcd34d;
  3965. overflow: hidden;
  3966. &__header {
  3967. display: flex;
  3968. align-items: center;
  3969. gap: 6px;
  3970. padding: 10px 14px;
  3971. color: #92400e;
  3972. font-weight: 600;
  3973. font-size: 14px;
  3974. background: rgba(255, 255, 255, 0.5);
  3975. svg {
  3976. color: #f59e0b;
  3977. }
  3978. }
  3979. &__body {
  3980. padding: 12px 14px;
  3981. font-size: 13px;
  3982. color: #78350f;
  3983. line-height: 1.7;
  3984. white-space: pre-wrap;
  3985. }
  3986. }
  3987. /* 响应式:移动端单列 */
  3988. @media (max-width: 480px) {
  3989. .kwl-grid {
  3990. grid-template-columns: 1fr;
  3991. }
  3992. .sixhat-grid {
  3993. grid-template-columns: 1fr;
  3994. }
  3995. }
  3996. /* 六顶思考帽内容 */
  3997. .c_t832_wd_content {
  3998. margin-top: 16px;
  3999. display: flex;
  4000. flex-direction: column;
  4001. gap: 16px;
  4002. }
  4003. .sixhat-members {
  4004. &__header {
  4005. display: flex;
  4006. align-items: center;
  4007. gap: 6px;
  4008. font-size: 14px;
  4009. font-weight: 600;
  4010. color: #374151;
  4011. margin-bottom: 8px;
  4012. svg {
  4013. color: #6b7280;
  4014. }
  4015. }
  4016. &__list {
  4017. display: flex;
  4018. flex-wrap: wrap;
  4019. gap: 8px;
  4020. }
  4021. }
  4022. .sixhat-member-chip {
  4023. padding: 4px 12px;
  4024. background: #f3f4f6;
  4025. border: 1px solid #e5e7eb;
  4026. border-radius: 999px;
  4027. font-size: 12px;
  4028. color: #4b5563;
  4029. }
  4030. .sixhat-scenario {
  4031. padding: 12px 16px;
  4032. background: #fffbeb;
  4033. border: 1px solid #fde68a;
  4034. border-radius: 10px;
  4035. &__text {
  4036. font-size: 13px;
  4037. color: #78350f;
  4038. line-height: 1.6;
  4039. }
  4040. }
  4041. .sixhat-grid {
  4042. display: grid;
  4043. grid-template-columns: repeat(2, 1fr);
  4044. gap: 12px;
  4045. }
  4046. .sixhat-col {
  4047. border-radius: 12px;
  4048. overflow: hidden;
  4049. border: 1px solid #e5e7eb;
  4050. background: #fff;
  4051. display: flex;
  4052. flex-direction: column;
  4053. &__header {
  4054. display: flex;
  4055. align-items: center;
  4056. gap: 8px;
  4057. padding: 10px 14px;
  4058. font-size: 14px;
  4059. font-weight: 600;
  4060. color: #fff;
  4061. }
  4062. &__dot {
  4063. width: 12px;
  4064. height: 12px;
  4065. border-radius: 50%;
  4066. flex-shrink: 0;
  4067. }
  4068. &__body {
  4069. padding: 12px 14px;
  4070. flex: 1;
  4071. min-height: 60px;
  4072. }
  4073. }
  4074. .sixhat-item {
  4075. font-size: 13px;
  4076. color: #374151;
  4077. line-height: 1.7;
  4078. white-space: pre-wrap;
  4079. }
  4080. /* 各帽子主题色 */
  4081. .sixhat-col--white {
  4082. .sixhat-col__header { background: linear-gradient(135deg, #d1d5db, #9ca3af); }
  4083. .sixhat-col__dot { background: #fff; border: 1px solid #d1d5db; }
  4084. }
  4085. .sixhat-col--red {
  4086. .sixhat-col__header { background: linear-gradient(135deg, #ef4444, #dc2626); }
  4087. .sixhat-col__dot { background: #fca5a5; }
  4088. }
  4089. .sixhat-col--black {
  4090. .sixhat-col__header { background: linear-gradient(135deg, #374151, #1f2937); }
  4091. .sixhat-col__dot { background: #9ca3af; }
  4092. }
  4093. .sixhat-col--yellow {
  4094. .sixhat-col__header { background: linear-gradient(135deg, #f59e0b, #d97706); }
  4095. .sixhat-col__dot { background: #fde68a; }
  4096. }
  4097. .sixhat-col--green {
  4098. .sixhat-col__header { background: linear-gradient(135deg, #22c55e, #16a34a); }
  4099. .sixhat-col__dot { background: #bbf7d0; }
  4100. }
  4101. .sixhat-col--blue {
  4102. .sixhat-col__header { background: linear-gradient(135deg, #3b82f6, #2563eb); }
  4103. .sixhat-col__dot { background: #bfdbfe; }
  4104. }
  4105. /* 文件预览卡片 */
  4106. .file-preview-card {
  4107. display: flex;
  4108. flex-direction: column;
  4109. align-items: center;
  4110. justify-content: center;
  4111. gap: 8px;
  4112. padding: 24px;
  4113. min-height: 200px;
  4114. background: #f9fafb;
  4115. border: 2px dashed #d1d5db;
  4116. border-radius: 12px;
  4117. cursor: pointer;
  4118. transition: all 0.2s ease;
  4119. &:hover {
  4120. border-color: #FF9300;
  4121. background: #fffbeb;
  4122. }
  4123. &--mini {
  4124. width: 80px;
  4125. height: 80px;
  4126. padding: 0;
  4127. min-height: unset;
  4128. gap: 0;
  4129. border-style: solid;
  4130. flex-shrink: 0;
  4131. }
  4132. }
  4133. .file-preview-icon {
  4134. font-size: 48px;
  4135. line-height: 1;
  4136. }
  4137. .file-preview-card--mini .file-preview-icon {
  4138. font-size: 32px;
  4139. }
  4140. .file-preview-name {
  4141. font-size: 13px;
  4142. color: #374151;
  4143. max-width: 200px;
  4144. overflow: hidden;
  4145. text-overflow: ellipsis;
  4146. white-space: nowrap;
  4147. text-align: center;
  4148. }
  4149. .file-preview-action {
  4150. font-size: 12px;
  4151. color: #3b82f6;
  4152. font-weight: 500;
  4153. }
  4154. /* 文件预览弹窗 */
  4155. .file-preview-modal {
  4156. position: fixed;
  4157. inset: 0;
  4158. background: rgba(0, 0, 0, 0.85);
  4159. display: flex;
  4160. align-items: center;
  4161. justify-content: center;
  4162. z-index: 9999;
  4163. }
  4164. .file-preview-close {
  4165. position: absolute;
  4166. top: 20px;
  4167. right: 20px;
  4168. width: 40px;
  4169. height: 40px;
  4170. border-radius: 50%;
  4171. background: rgba(255, 255, 255, 0.15);
  4172. display: flex;
  4173. align-items: center;
  4174. justify-content: center;
  4175. color: #fff;
  4176. cursor: pointer;
  4177. transition: background 0.2s ease;
  4178. &:hover {
  4179. background: rgba(255, 255, 255, 0.25);
  4180. }
  4181. }
  4182. .file-preview-video {
  4183. max-width: 90vw;
  4184. max-height: 85vh;
  4185. border-radius: 8px;
  4186. object-fit: contain;
  4187. }
  4188. .file-preview-frame {
  4189. width: 90vw;
  4190. height: 85vh;
  4191. border-radius: 8px;
  4192. border: none;
  4193. background: #fff;
  4194. }
  4195. .file-preview-office {
  4196. display: flex;
  4197. flex-direction: column;
  4198. align-items: center;
  4199. gap: 16px;
  4200. padding: 40px;
  4201. background: #fff;
  4202. border-radius: 12px;
  4203. min-width: 300px;
  4204. }
  4205. .file-preview-office-icon {
  4206. font-size: 64px;
  4207. }
  4208. .file-preview-office-name {
  4209. font-size: 16px;
  4210. font-weight: 600;
  4211. color: #374151;
  4212. max-width: 300px;
  4213. overflow: hidden;
  4214. text-overflow: ellipsis;
  4215. white-space: nowrap;
  4216. }
  4217. .file-preview-office-link {
  4218. display: inline-block;
  4219. padding: 10px 24px;
  4220. background: #3b82f6;
  4221. color: #fff;
  4222. border-radius: 8px;
  4223. text-decoration: none;
  4224. font-size: 14px;
  4225. font-weight: 500;
  4226. transition: background 0.2s ease;
  4227. &:hover {
  4228. background: #2563eb;
  4229. }
  4230. }
  4231. </style>