index.vue 206 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5" v-loading="loading">
  3. <div class="pb_content_body" style="position: relative; margin: 0">
  4. <div class="right">
  5. <div class="courseTop" v-if="gotype && !disableBack && !peopleId">
  6. <div
  7. class="r_pub_button_retrun"
  8. @click="retrunCourse"
  9. >
  10. 返回
  11. </div>
  12. </div>
  13. <div class="courseTop" v-else>
  14. <div class="stepsNav" v-if="!examineId && !disableBack">
  15. <el-breadcrumb separator-class="el-icon-arrow-right">
  16. <el-breadcrumb-item
  17. v-if="!back"
  18. :to="{
  19. path:
  20. '/test?userid=' +
  21. userid +
  22. '&oid=' +
  23. oid +
  24. '&org=' +
  25. org +
  26. '&role=' +
  27. role,
  28. }"
  29. >表单管理</el-breadcrumb-item
  30. >
  31. <el-breadcrumb-item v-else-if="back=='sass'" :to="{
  32. path:
  33. '/sassPlatform?userid=' +
  34. userid +
  35. '&oid=' +
  36. oid +
  37. '&org=' +
  38. org +
  39. '&role=' +
  40. role,
  41. }">sass平台</el-breadcrumb-item>
  42. <el-breadcrumb-item>
  43. <span style="color: rgb(15, 126, 255)">查看表单</span>
  44. </el-breadcrumb-item>
  45. </el-breadcrumb>
  46. </div>
  47. <div
  48. v-if="!peopleId && !disableBack"
  49. class="r_pub_button_retrun"
  50. @click="retrunCourse"
  51. >
  52. 返回
  53. </div>
  54. </div>
  55. <div class="step_box" ref="stepBox" v-loading="pdfLoading">
  56. <div class="boxSticky" ref="boxSticky">
  57. <div
  58. class="test_title"
  59. :style="!isDesktop ? 'justify-content: center;' : ''"
  60. >
  61. <div class="left">
  62. <div class="title">{{ testJson.title }}</div>
  63. <div class="info" v-if="isDesktop">
  64. <div class="info_box" v-if="testJson.typeN">
  65. <span>类型:</span>
  66. <span>{{ testJson.typeN }}</span>
  67. </div>
  68. <div class="info_box">
  69. <span>填写范围:</span>
  70. <span>{{
  71. testJson.juriP ? testJson.juriP : "所有人"
  72. }}</span>
  73. </div>
  74. <div class="info_box" v-if="testJson.overtime">
  75. <span>截止时间:</span>
  76. <span>{{ testJson.overtime }}</span>
  77. </div>
  78. </div>
  79. </div>
  80. <div v-if="!peopleId">
  81. <div class="right" v-if="isDesktop">
  82. <div class="data_box">
  83. <span>提交数量</span>
  84. <!-- <span><span class="big">{{ works.length }}</span>份</span> -->
  85. <span
  86. ><span class="big">{{ worksArray.length }}</span
  87. >份</span
  88. >
  89. </div>
  90. <div class="data_box" v-if="testJson.juriP">
  91. <span>表单完成率</span>
  92. <span
  93. ><span class="big">{{
  94. ((iscount / pcount) * 100).toFixed(0)
  95. }}</span
  96. >%</span
  97. >
  98. </div>
  99. <div class="data_box" v-if="testJson.juriP">
  100. <span>未完成人数</span>
  101. <span
  102. ><span class="big">{{ pcount - iscount }}</span></span
  103. >
  104. </div>
  105. <div class="btn_box" @click="dialogVisibleShare = true">
  106. <span></span>
  107. <span>提醒</span>
  108. </div>
  109. </div>
  110. </div>
  111. <div class="right" v-if="review==='1'">
  112. <div class="score_box">总分:<span>{{ scoList2.reduce((acc, curr) => acc + curr.sco, 0) }}</span></div>
  113. </div>
  114. </div>
  115. <!-- pc端 查看切换 isDesktop-->
  116. <div class="search_nav" v-if="isDesktop">
  117. <div class="right">
  118. <span
  119. :class="{ active: stype == 1 }"
  120. @click="checkDataType(1)"
  121. v-if="!peopleId"
  122. >按题目查看</span
  123. >
  124. <span :class="{ active: stype == 2 }" @click="checkDataType(2)"
  125. >按人员查看</span
  126. >
  127. <span
  128. :class="{ active: stype == 3 }"
  129. @click="checkDataType(3)"
  130. v-show="false"
  131. >按数量查看</span
  132. >
  133. </div>
  134. <div class="left" v-if="isDesktop">
  135. <!-- <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3"> -->
  136. <!-- <div style="margin-right: 10px;position: relative;">
  137. <el-select v-model="TeachingValue" @change="searchCourse" placeholder="按教研室">
  138. <el-option
  139. label="全部"
  140. value="">
  141. </el-option>
  142. <el-option
  143. v-for="item in TeachingOptions"
  144. :key="item.id"
  145. :label="item.name"
  146. :value="item.id">
  147. </el-option>
  148. </el-select>
  149. </div> -->
  150. <div
  151. style="margin-right: 10px; position: relative"
  152. v-if="stype == 2 || stype == 3"
  153. >
  154. <!-- <el-date-picker
  155. v-model="SubmitTime"
  156. type="date"
  157. @change="searchCourse"
  158. value-format="yyyy-MM-dd"
  159. placeholder="选择日期"
  160. >
  161. </el-date-picker> -->
  162. <!-- <el-select v-model="SubmitTime" placeholder="按提交时间筛选">
  163. <el-option
  164. label="全部"
  165. value="">
  166. </el-option>
  167. <el-option
  168. v-for="item in SubmitTimeOptions"
  169. :key="item.id"
  170. :label="item.name"
  171. :value="item.id">
  172. </el-option>
  173. </el-select> -->
  174. </div>
  175. <div
  176. style="margin-right: 10px; position: relative"
  177. v-if="stype == 2 || stype == 3"
  178. >
  179. <el-input
  180. v-model="courseName"
  181. class="student_input"
  182. :disabled="!!peopleId"
  183. placeholder="请输入需要搜索的姓名"
  184. ></el-input>
  185. <span class="serach_icon" @click="searchCourse"></span>
  186. </div>
  187. <div
  188. class="btnA"
  189. v-if="stype == 1 && !pdfLoading"
  190. @click="exportPDF"
  191. >
  192. 导出PDF
  193. </div>
  194. <div
  195. class="btnA"
  196. v-if="stype == 2"
  197. @mouseenter="btnDisplay = true"
  198. @mouseleave="btnDisplay = false"
  199. >
  200. 导出数据
  201. <div v-show="btnDisplay" class="buttonBox">
  202. <div type="primary" @click="exportExcel">下载汇总表格</div>
  203. <div type="primary" @click="exportAllWord">
  204. 导出人员数据
  205. </div>
  206. <div
  207. type="primary"
  208. v-if="stype == 2"
  209. @click="exportWordData"
  210. >
  211. word导出
  212. </div>
  213. </div>
  214. </div>
  215. <div class="btnA" v-if="stype == 3" @click="exportAllWord2">
  216. 导出人员数据
  217. </div>
  218. <div
  219. class="btnA"
  220. @click="openChat"
  221. v-if="this.worksArray.length && !peopleId"
  222. >
  223. AI分析
  224. </div>
  225. <el-popover
  226. v-if="stype == 2 && ((peopleId && review==1) || (!peopleId && !review))"
  227. placement="top-start"
  228. width="320"
  229. ref="popover1"
  230. :visible-arrow="false"
  231. trigger="click"
  232. >
  233. <div class="openCeBox">
  234. <div v-if="aiscoLoading" class="openCeBoxLoading">
  235. 小可努力生成中,请稍等片刻<img style="width: 50px;" src="../../../../assets/KekeLoading.gif" alt="">
  236. </div>
  237. <div style="display: flex;justify-content: space-between;align-items: center;">
  238. <div class="TopTit">智能评分</div>
  239. <el-popover
  240. placement="bottom"
  241. @click.native.stop
  242. :visible-arrow="false"
  243. width="300"
  244. ref="popover2"
  245. v-model="opQvisible"
  246. trigger="click">
  247. <div>
  248. <div style="display: flex;align-items: center;margin-bottom: 10px;">
  249. <img src="../../../../assets/delicon.svg" alt="">是否确认清空
  250. </div>
  251. <div style="padding: 0 20px;box-sizing: border-box;">清空会删除所有配置信息,并同步删除已经生成完成的数据列。请谨慎操作!</div>
  252. <div style="display: flex;justify-content: flex-end;margin-top: 10px;">
  253. <el-button class="BtnOPC" @click="opQvisible = false"> 取消</el-button>
  254. <el-button class="BtnOPC" @click="cleancueWord" style="background: #1456F0;" type="primary">确定</el-button>
  255. </div>
  256. </div>
  257. <div class="Topkong" slot="reference">
  258. <img src="../../../../assets/clear.svg" alt="">
  259. 清空
  260. </div>
  261. </el-popover>
  262. </div>
  263. <div style="font-size: 12px;color: #6E6B6B;">标题</div>
  264. <div>
  265. <el-input v-model="cueWord.openCeTit" placeholder="输入列标题"></el-input>
  266. </div>
  267. <div style="font-size: 12px;color: #6E6B6B;">配置</div>
  268. <div style="background: #F5F6F7;padding: 10px;box-sizing: border-box;border-radius: 5px;">
  269. <div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 5px;">
  270. <div style="font-size: 12px;color: #6E6B6B;">输入指令*</div>
  271. <div style="position: relative;font-size: 12px;color: #3992EA;" >
  272. <div style="cursor: pointer;" @click="quoteShow">
  273. <i class="el-icon-circle-plus-outline"></i>
  274. 引用字段
  275. </div>
  276. <div class="quoteBlock" v-if="quoteV">
  277. <el-input v-model="opcInp" placeholder="请输入内容">
  278. <i slot="prefix" class="el-input__icon el-icon-search"></i>
  279. </el-input>
  280. <div class="quoteBlockCon">
  281. <div v-if="!opcInp.trim() ? true : '序号'.includes(opcInp)" :class="[cueWord.fieldList.indexOf('序号') != -1 ? 'selCss' :'']"
  282. @click="addfield('序号')">序号</div>
  283. <div v-if="!opcInp.trim() ? true :'提交人'.includes(opcInp)" :class="[cueWord.fieldList.indexOf('提交人') != -1 ? 'selCss' :'']"
  284. @click="addfield('提交人')">提交人</div>
  285. <template v-for="(i,index) in teaType">
  286. <div v-if="!opcInp.trim() ? true : i.name.includes(opcInp)" :class="[cueWord.fieldList.indexOf(i.name) != -1 ? 'selCss' :'']"
  287. @click="addfield(i.name)" :key="index+'a'">
  288. <el-tooltip class="item" effect="dark" :content="i.name" placement="top">
  289. <div style="
  290. white-space: nowrap;
  291. overflow: hidden;
  292. text-overflow: ellipsis;">
  293. {{ i.name }}</div>
  294. </el-tooltip>
  295. </div>
  296. </template>
  297. <div v-if="!opcInp.trim() ? true : '提交时间'.includes(opcInp)" :class="[cueWord.fieldList.indexOf('提交时间') != -1 ? 'selCss' :'']"
  298. @click="addfield('提交时间')">提交时间</div>
  299. <template v-for="(i,index) in fie(chapters)">
  300. <div :class="[cueWord.fieldList.indexOf(i.json.title) != -1 ? 'selCss' :'']"
  301. v-if="!opcInp.trim() ? true :i.json.title.includes(opcInp)" @click="addfield(i.json.title)"
  302. :key="index+'b'">
  303. <el-tooltip class="item" effect="dark" :content="i.json.title" placement="top">
  304. <div style="
  305. white-space: nowrap;
  306. overflow: hidden;
  307. text-overflow: ellipsis;">
  308. {{ i.json.title }}</div>
  309. </el-tooltip>
  310. </div>
  311. </template>
  312. </div>
  313. </div>
  314. <div class="maskCss" v-if="quoteV" @click.stop="quoteV = false,opcInp=''"></div>
  315. </div>
  316. </div>
  317. <div style="display: flex;gap: 8px;margin-bottom: 5px;flex-wrap: wrap;">
  318. <span class="SPCE" v-for="(i,index) in cueWord.fieldList" :key="index+'c'">
  319. {{ i }} <i @click="addfield(i)" class="el-icon-close" style="cursor: pointer;"></i>
  320. </span>
  321. </div>
  322. <div>
  323. <el-input
  324. resize="none"
  325. type="textarea"
  326. :rows="8"
  327. placeholder="请输入内容"
  328. v-model="cueWord.openCeCon">
  329. </el-input>
  330. </div>
  331. </div>
  332. <!-- <div style="display: flex;justify-content: flex-start;align-items: center;gap: 5px;">
  333. <el-switch
  334. v-model="openCeVal"
  335. >
  336. </el-switch>
  337. <span>自动更新
  338. <el-tooltip class="item" effect="dark" content="开启后,当前字段将跟随配置内容的变化同步更新" placement="top">
  339. <i class="el-icon-warning-outline"></i>
  340. </el-tooltip>
  341. </span>
  342. </div> -->
  343. <div style="margin-top: 10px;display: flex;justify-content: flex-end;">
  344. <el-button @click="opQvisible0 = false">取消</el-button>
  345. <el-button style="background: #1456F0;" @click="markScoAuto()" type="primary">自动评分</el-button>
  346. <el-button style="background: #1456F0;" @click="markSco()" type="primary">运行</el-button>
  347. </div>
  348. </div>
  349. <div
  350. slot="reference"
  351. class="btnA"
  352. >
  353. 智能评分
  354. </div>
  355. </el-popover>
  356. <!--v-if="this.worksArray.length"-->
  357. </div>
  358. </div>
  359. <!-- 手机端 查看切换 isDesktop-->
  360. <div
  361. class="search_nav"
  362. style="display: flex; justify-content: space-evenly; border: none"
  363. v-if="!isDesktop"
  364. >
  365. <div class="right">
  366. <span :class="{ active2: stype == 1 }" @click="checkDataType(1)"
  367. >按题目查看</span
  368. >
  369. <span :class="{ active2: stype == 2 }" @click="checkDataType(2)"
  370. >按人员查看</span
  371. >
  372. <span
  373. :class="{ active2: stype == 3 }"
  374. @click="checkDataType(3)"
  375. v-show="false"
  376. >按数量查看</span
  377. >
  378. </div>
  379. </div>
  380. </div>
  381. <!-- 按题目pc端 isDesktop-->
  382. <div
  383. class="title_content"
  384. v-if="stype == 1 && isDesktop"
  385. v-loading="isLoading"
  386. >
  387. <div
  388. class="title_box"
  389. v-if="!testArray.length"
  390. style="
  391. display: flex;
  392. align-items: center;
  393. justify-content: center;
  394. height: 500px;
  395. "
  396. >
  397. 暂无内容
  398. </div>
  399. <div
  400. class="title_box"
  401. v-for="(item, index) in testArray"
  402. :key="index"
  403. >
  404. <div class="title">
  405. <el-tooltip
  406. :content="selectType(item)"
  407. placement="top"
  408. effect="dark"
  409. >
  410. <span
  411. class="test_icon"
  412. :class="{
  413. test_icon_check: item.type == 1 && item.atype == 2,
  414. test_icon_checkO: item.type == 1 && item.atype == 1,
  415. test_icon_gap: item.type == 3,
  416. test_icon_file: item.type == 5,
  417. test_course_file: item.type == 6 || item.type == 11,
  418. test_eva_file: item.type == 7,
  419. test_icon_time: item.type == 8,
  420. test_icon_sweep:item.type == 12,
  421. test_icon_number:item.type == 13,
  422. test_icon_clockIn:item.type == 14
  423. }"
  424. ></span>
  425. </el-tooltip>
  426. <span style="line-height: 25px">{{ item.title }}</span>
  427. <el-button
  428. v-if="item.type == 5 && item.array.length > 0"
  429. class="title_downBtn"
  430. type="primary"
  431. size="small"
  432. @click.stop="downloadFileType5(item.array, item.title, index)"
  433. >批量下载附件</el-button
  434. >
  435. <div v-if="item.type == 7" style="right: 0; position: absolute">
  436. 平均分:{{ getAverageScore(index) }}
  437. </div>
  438. </div>
  439. <div class="detail" v-if="item.detail">{{ item.detail }}</div>
  440. <div class="content1" v-if="item.type == 1">
  441. <div class="left">
  442. <div class="title">
  443. <span>选项</span>
  444. <span>小计</span>
  445. <span>比例</span>
  446. </div>
  447. <div
  448. class="data"
  449. v-for="(data, index2) in item.array"
  450. :key="index + '-' + index2"
  451. >
  452. <span>
  453. <el-tooltip
  454. :content="data.name"
  455. placement="top"
  456. effect="dark"
  457. >
  458. <!-- content to trigger tooltip here -->
  459. <span>{{ data.name }}</span>
  460. </el-tooltip>
  461. </span>
  462. <span>{{ data.count }}</span>
  463. <span>
  464. <el-progress
  465. style="display: flex; align-items: center"
  466. :stroke-width="12"
  467. color="#3681fc"
  468. :percentage="
  469. data.count
  470. ? parseFloat(
  471. ((data.count / item.count) * 100).toFixed(2)
  472. )
  473. : 0
  474. "
  475. ></el-progress>
  476. </span>
  477. </div>
  478. </div>
  479. <div class="right">
  480. <checkPie :dataJ="item.array"></checkPie>
  481. </div>
  482. </div>
  483. <div class="content2" v-if="item.type == 3">
  484. <div class="left" style="min-height: 482px;">
  485. <div class="title">
  486. <span>序号</span>
  487. <span>词频</span>
  488. <span>答案文本</span>
  489. </div>
  490. <div
  491. class="data"
  492. v-for="(data, index3) in item.showArray"
  493. :key="index + '-' + index3"
  494. >
  495. <span>{{ index3 + 1 }}</span>
  496. <span>{{ data.count }}次</span>
  497. <el-tooltip
  498. :content="data.name"
  499. placement="top"
  500. effect="dark"
  501. >
  502. <!-- content to trigger tooltip here -->
  503. <span>{{ data.name }}</span>
  504. </el-tooltip>
  505. </div>
  506. <div class="paging" v-if="item.limit">
  507. <el-pagination
  508. background
  509. :hide-on-single-page="true"
  510. :page-size="item.limit"
  511. @current-change="textPagingChange($event,item,index)"
  512. :current-page="item.nowPage"
  513. layout="prev, pager, next"
  514. :total="item.total">
  515. </el-pagination>
  516. </div>
  517. </div>
  518. <div class="right">
  519. <div class="noWordCloud" v-if="!item.wordCloutData">
  520. <el-button v-if="!item.loadingWordCloud" type="primary" @click="getWordCloutData(item,index)">生成词云图</el-button>
  521. <div v-else>
  522. <span>小可努力生成中,请稍等片刻</span>
  523. <img src="../../../../assets/KekeLoading.gif">
  524. </div>
  525. </div>
  526. <wordcloud
  527. v-else
  528. :data="item.wordCloutData"
  529. nameKey="name"
  530. valueKey="count"
  531. :showTooltip="false"
  532. :wordClick="wordClickHandler"
  533. >
  534. </wordcloud>
  535. </div>
  536. </div>
  537. <div
  538. class="content3"
  539. :style="{
  540. position: 'relative',
  541. overflow: fileLoading[index].bool ? 'hidden' : 'auto',
  542. }"
  543. v-if="item.type == 5"
  544. >
  545. <div
  546. class="file"
  547. v-for="(file, index2) in item.array"
  548. :key="index + '-' + index2"
  549. @click.stop="checkFile(file)"
  550. >
  551. <img
  552. class="download"
  553. src="../../../../assets/icon/fileIcon/download.png"
  554. @click.stop="downloadFile(file)"
  555. :style="{ right: '10px' }"
  556. />
  557. <img
  558. class="img"
  559. :src="wordIcon"
  560. alt=""
  561. v-if="file.type == 1"
  562. />
  563. <img
  564. class="img"
  565. :src="videoIcon"
  566. alt=""
  567. v-if="file.type == 2"
  568. />
  569. <img
  570. class="img"
  571. :src="file.url"
  572. alt=""
  573. v-if="file.type == 3"
  574. />
  575. <img
  576. class="img"
  577. :src="wordIcon"
  578. alt=""
  579. v-if="file.type == 4"
  580. />
  581. <img
  582. class="img"
  583. :src="fileIcon"
  584. alt=""
  585. v-if="file.type == 5"
  586. />
  587. <div class="name">
  588. <el-tooltip
  589. :content="file.name"
  590. placement="top"
  591. effect="dark"
  592. >
  593. <span>{{ file.name }}</span>
  594. </el-tooltip>
  595. </div>
  596. </div>
  597. <div v-if="fileLoading[index].bool" class="mask">
  598. <div class="progressBox">
  599. <div class="lbox">
  600. <img src="../../../../assets/loading.gif" />打包中,请稍后
  601. </div>
  602. <div style="margin-bottom: 10px">
  603. <span>{{ fileLoading[index].load }}</span>
  604. /
  605. <span>{{ fileLoading[index].count }}</span>
  606. </div>
  607. <el-progress
  608. :text-inside="true"
  609. :stroke-width="20"
  610. :percentage="
  611. fileLoading[index].progress
  612. ? fileLoading[index].progress
  613. : 0
  614. "
  615. style="width: 80%"
  616. ></el-progress>
  617. </div>
  618. </div>
  619. </div>
  620. <div class="content4" v-if="item.type == 6">
  621. <div
  622. class="out_box"
  623. v-for="(item, index) in item.courseArray"
  624. :key="index + '-' + index2"
  625. >
  626. <div class="tup">
  627. <img
  628. :src="
  629. item.cover != null && item.cover != ''
  630. ? JSON.parse(item.cover).length > 0
  631. ? JSON.parse(item.cover)[0].url
  632. : mr
  633. : mr
  634. "
  635. alt
  636. />
  637. <div class="bottom_box">
  638. <div>
  639. <el-tooltip
  640. :content="item.title"
  641. popper-class="text_tooltip"
  642. placement="top"
  643. effect="dark"
  644. >
  645. <span>{{ item.title }}</span>
  646. </el-tooltip>
  647. </div>
  648. <div class="kc_t">
  649. <span>{{ item.username }}</span>
  650. <span>{{
  651. item.state == 1
  652. ? "阶段模式"
  653. : item.state == 2
  654. ? "任务模式"
  655. : "极简模式"
  656. }}</span>
  657. </div>
  658. <div class="kc_time">
  659. <span style="color: #717c8d">创建日期:</span
  660. >{{ item.time }}
  661. </div>
  662. <div class="kc_time">
  663. <span style="color: #717c8d">修改日期:</span
  664. >{{ item.update_at }}
  665. </div>
  666. </div>
  667. </div>
  668. </div>
  669. <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
  670. {{ courses }}
  671. </div> -->
  672. </div>
  673. <div class="content1" v-if="item.type == 7">
  674. <div class="left">
  675. <div class="title">
  676. <span>评分</span>
  677. <span>小计</span>
  678. <span>比例</span>
  679. </div>
  680. <div
  681. class="data"
  682. v-for="(data, index2) in item.array"
  683. :key="index + '-' + index2"
  684. >
  685. <span>
  686. <span>{{ data.name }}</span>
  687. </span>
  688. <span>{{ data.count }}</span>
  689. <span>
  690. <el-progress
  691. style="display: flex; align-items: center"
  692. :stroke-width="12"
  693. color="#3681fc"
  694. :percentage="
  695. data.count
  696. ? parseFloat(
  697. ((data.count / item.count) * 100).toFixed(2)
  698. )
  699. : 0
  700. "
  701. ></el-progress>
  702. </span>
  703. </div>
  704. </div>
  705. <div class="right">
  706. <checkPie :dataJ="item.array"></checkPie>
  707. </div>
  708. </div>
  709. <div class="content2" v-if="item.type == 8">
  710. <div class="left">
  711. <div class="title">
  712. <span>序号</span>
  713. <span>词频</span>
  714. <span>日期</span>
  715. </div>
  716. <div
  717. class="data"
  718. v-for="(data, index2) in item.array"
  719. :key="index + '-' + index2"
  720. >
  721. <span>{{ index2 + 1 }}</span>
  722. <span>{{ data.count }}次</span>
  723. <el-tooltip
  724. :content="data.name"
  725. placement="top"
  726. effect="dark"
  727. >
  728. <!-- content to trigger tooltip here -->
  729. <span>{{ data.name }}</span>
  730. </el-tooltip>
  731. </div>
  732. </div>
  733. <div class="right">
  734. <wordcloud
  735. :data="item.array"
  736. nameKey="name"
  737. valueKey="count"
  738. :showTooltip="false"
  739. :wordClick="wordClickHandler"
  740. >
  741. </wordcloud>
  742. </div>
  743. </div>
  744. <div class="content4" v-if="item.type == 11">
  745. <div
  746. class="out_box"
  747. v-for="(item, index) in item.courseArray"
  748. :key="index + '-' + index2"
  749. >
  750. <div class="tup">
  751. <img
  752. :src="
  753. item.cover != null && item.cover != ''
  754. ? JSON.parse(item.cover).length > 0
  755. ? JSON.parse(item.cover)[0].url
  756. : mr
  757. : mr
  758. "
  759. alt
  760. />
  761. <div class="bottom_box">
  762. <div>
  763. <el-tooltip
  764. :content="item.title"
  765. popper-class="text_tooltip"
  766. placement="top"
  767. effect="dark"
  768. >
  769. <span>{{ item.title }}</span>
  770. </el-tooltip>
  771. </div>
  772. <div class="kc_t">
  773. <span>{{ item.username }}</span>
  774. <span>{{
  775. item.state == 1
  776. ? "阶段模式"
  777. : item.state == 2
  778. ? "任务模式"
  779. : "极简模式"
  780. }}</span>
  781. </div>
  782. <div class="kc_time">
  783. <span style="color: #717c8d">创建日期:</span
  784. >{{ item.time }}
  785. </div>
  786. <div class="kc_time">
  787. <span style="color: #717c8d">修改日期:</span
  788. >{{ item.update_at }}
  789. </div>
  790. </div>
  791. </div>
  792. </div>
  793. <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
  794. {{ courses }}
  795. </div> -->
  796. </div>
  797. <div class="content1" v-if="item.type == 13">
  798. <div class="left">
  799. <div class="title">
  800. <span>数字</span>
  801. <span>次数</span>
  802. <span>比例</span>
  803. </div>
  804. <div
  805. class="data"
  806. v-for="(data, index2) in item.array"
  807. :key="index + '-' + index2"
  808. >
  809. <span>
  810. <span>{{ data.name }}</span>
  811. </span>
  812. <span>{{ data.count }}</span>
  813. <span>
  814. <el-progress
  815. style="display: flex; align-items: center"
  816. :stroke-width="12"
  817. color="#3681fc"
  818. :percentage="
  819. data.count
  820. ? parseFloat(
  821. ((data.count / item.count) * 100).toFixed(2)
  822. )
  823. : 0
  824. "
  825. ></el-progress>
  826. </span>
  827. </div>
  828. </div>
  829. <div class="right">
  830. <checkPie :dataJ="item.array"></checkPie>
  831. </div>
  832. </div>
  833. </div>
  834. </div>
  835. <!-- 按题目手机端 !isDesktop-->
  836. <div
  837. class="title_content"
  838. v-if="stype == 1 && !isDesktop"
  839. v-loading="isLoading"
  840. >
  841. <div
  842. class="title_box"
  843. v-if="!testArray.length"
  844. style="
  845. display: flex;
  846. align-items: center;
  847. justify-content: center;
  848. height: 500px;
  849. "
  850. >
  851. 暂无内容
  852. </div>
  853. <div
  854. class="title_box"
  855. v-for="(item, index) in testArray"
  856. :key="index"
  857. >
  858. <div
  859. class="title"
  860. style="
  861. font-size: 16px;
  862. display: flex;
  863. justify-content: space-between;
  864. align-items: center;
  865. "
  866. >
  867. <!-- <el-tooltip :content="selectType(item)" placement="top" effect="dark">
  868. <span class="test_icon"
  869. :class="{ test_icon_check: item.type == 1 && item.atype == 2, test_icon_checkO: item.type == 1 && item.atype == 1, test_icon_gap: item.type == 3, test_icon_file: item.type == 5, test_course_file: item.type == 6, test_eva_file: item.type == 7,test_icon_time: item.type == 8 }"></span>
  870. </el-tooltip> -->
  871. <div style="display: flex">
  872. <div class="topicTitCss">第{{ index + 1 }}题:</div>
  873. <el-tooltip
  874. :content="item.title"
  875. placement="top"
  876. effect="dark"
  877. >
  878. <div
  879. style="
  880. width: 100px;
  881. overflow: hidden;
  882. white-space: nowrap;
  883. text-overflow: ellipsis;
  884. "
  885. >
  886. {{ item.title }}
  887. </div>
  888. </el-tooltip>
  889. </div>
  890. <div style="display: flex">
  891. <!-- <div v-if="item.type==7" style="right:0;position: absolute;">平均分:{{ getAverageScore(index) }}</div> -->
  892. <div
  893. style="
  894. color: rgba(0, 0, 0, 0.4);
  895. display: flex;
  896. align-items: center;
  897. "
  898. >
  899. [{{ selectType(item) }}]
  900. </div>
  901. <!-- <el-button style="padding: 5px;" v-if="item.type == 5 && item.array.length>0" class="title_downBtn" type="primary" size="small" @click.stop="downloadFileType5(item.array,item.title)">批量下载附件</el-button> -->
  902. </div>
  903. </div>
  904. <div class="detail" v-if="item.detail">{{ item.detail }}</div>
  905. <div
  906. class="content1"
  907. style="width: 100%; display: block"
  908. v-if="item.type == 1"
  909. >
  910. <div class="left" style="width: 100%" v-if="!item.cut">
  911. <div class="isDesktopTitle">
  912. <div>选项</div>
  913. <div>小计</div>
  914. <div>比例</div>
  915. </div>
  916. <div
  917. class="isDesktopTitle"
  918. v-for="(data, index2) in item.array"
  919. :key="index + '-' + index2"
  920. >
  921. <!-- <span> -->
  922. <el-tooltip
  923. :content="data.name"
  924. placement="top"
  925. effect="dark"
  926. >
  927. <!-- content to trigger tooltip here -->
  928. <div>{{ data.name }}</div>
  929. </el-tooltip>
  930. <!-- </span> -->
  931. <div>{{ data.count }}</div>
  932. <div>
  933. {{
  934. data.count
  935. ? parseFloat(
  936. ((data.count / item.count) * 100).toFixed(2)
  937. )
  938. : 0
  939. }}
  940. <!-- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
  941. :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress> -->
  942. </div>
  943. </div>
  944. </div>
  945. <div class="right isDesktopRight" v-if="item.cut">
  946. <checkPie :dataJ="item.array"></checkPie>
  947. </div>
  948. <div class="cutBtnBlockCss">
  949. <div class="cutBtnCss" @click="item.cut = !item.cut">
  950. {{ item.cut ? "查看详情" : "查看视图" }}
  951. </div>
  952. </div>
  953. </div>
  954. <div
  955. class="content2"
  956. style="width: 100%; display: block"
  957. v-if="item.type == 3"
  958. >
  959. <div class="left" style="width: 100%" v-if="!item.cut">
  960. <div class="title">
  961. <span>序号</span>
  962. <span>词频</span>
  963. <span>答案文本</span>
  964. </div>
  965. <div
  966. class="data"
  967. v-for="(data, index2) in item.array"
  968. :key="index + '-' + index2"
  969. >
  970. <span>{{ index2 + 1 }}</span>
  971. <span>{{ data.count }}次</span>
  972. <el-tooltip
  973. :content="data.name"
  974. placement="top"
  975. effect="dark"
  976. >
  977. <!-- content to trigger tooltip here -->
  978. <span>{{ data.name }}</span>
  979. </el-tooltip>
  980. </div>
  981. </div>
  982. <div class="right isDesktopRight" v-if="item.cut">
  983. <wordcloud
  984. :data="item.array"
  985. nameKey="name"
  986. valueKey="count"
  987. :showTooltip="false"
  988. :wordClick="wordClickHandler"
  989. >
  990. </wordcloud>
  991. </div>
  992. <div class="cutBtnBlockCss">
  993. <div class="cutBtnCss" @click="item.cut = !item.cut">
  994. {{ item.cut ? "查看详情" : "查看视图" }}
  995. </div>
  996. </div>
  997. </div>
  998. <div class="content3" v-if="item.type == 5">
  999. <div
  1000. class="file"
  1001. v-for="(file, index2) in item.array"
  1002. :key="index + '-' + index2"
  1003. @click.stop="checkFile(file)"
  1004. >
  1005. <img
  1006. class="download"
  1007. src="../../../../assets/icon/fileIcon/download.png"
  1008. @click.stop="downloadFile(file)"
  1009. :style="{ right: '10px' }"
  1010. />
  1011. <img
  1012. class="img"
  1013. :src="wordIcon"
  1014. alt=""
  1015. v-if="file.type == 1"
  1016. />
  1017. <img
  1018. class="img"
  1019. :src="videoIcon"
  1020. alt=""
  1021. v-if="file.type == 2"
  1022. />
  1023. <img
  1024. class="img"
  1025. :src="file.url"
  1026. alt=""
  1027. v-if="file.type == 3"
  1028. />
  1029. <img
  1030. class="img"
  1031. :src="wordIcon"
  1032. alt=""
  1033. v-if="file.type == 4"
  1034. />
  1035. <img
  1036. class="img"
  1037. :src="fileIcon"
  1038. alt=""
  1039. v-if="file.type == 5"
  1040. />
  1041. <div class="name">
  1042. <el-tooltip
  1043. :content="file.name"
  1044. placement="top"
  1045. effect="dark"
  1046. >
  1047. <span>{{ file.name }}</span>
  1048. </el-tooltip>
  1049. </div>
  1050. </div>
  1051. </div>
  1052. <div class="content4" v-if="item.type == 6">
  1053. <div
  1054. class="out_box"
  1055. v-for="(item, index) in item.courseArray"
  1056. :key="index + '-' + index2"
  1057. >
  1058. <div class="tup">
  1059. <img
  1060. :src="
  1061. item.cover != null && item.cover != ''
  1062. ? JSON.parse(item.cover).length > 0
  1063. ? JSON.parse(item.cover)[0].url
  1064. : mr
  1065. : mr
  1066. "
  1067. alt
  1068. />
  1069. <div class="bottom_box">
  1070. <div>
  1071. <el-tooltip
  1072. :content="item.title"
  1073. popper-class="text_tooltip"
  1074. placement="top"
  1075. effect="dark"
  1076. >
  1077. <span>{{ item.title }}</span>
  1078. </el-tooltip>
  1079. </div>
  1080. <div class="kc_t">
  1081. <span>{{ item.username }}</span>
  1082. <span>{{
  1083. item.state == 1
  1084. ? "阶段模式"
  1085. : item.state == 2
  1086. ? "任务模式"
  1087. : "极简模式"
  1088. }}</span>
  1089. </div>
  1090. <div class="kc_time">
  1091. <span style="color: #717c8d">创建日期:</span
  1092. >{{ item.time }}
  1093. </div>
  1094. <div class="kc_time">
  1095. <span style="color: #717c8d">修改日期:</span
  1096. >{{ item.update_at }}
  1097. </div>
  1098. </div>
  1099. </div>
  1100. </div>
  1101. <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
  1102. {{ courses }}
  1103. </div> -->
  1104. </div>
  1105. <div
  1106. class="content1"
  1107. style="width: 100%; display: block"
  1108. v-if="item.type == 7"
  1109. >
  1110. <div class="left" style="width: 100%" v-if="!item.cut">
  1111. <div class="isDesktopTitle">
  1112. <div>评分</div>
  1113. <div>小计</div>
  1114. <div style="width: 120px">比例</div>
  1115. </div>
  1116. <div
  1117. class="isDesktopTitle"
  1118. v-for="(data, index2) in item.array"
  1119. :key="index + '-' + index2"
  1120. >
  1121. <!-- <span> -->
  1122. <div>{{ data.name }}</div>
  1123. <!-- </span> -->
  1124. <div>{{ data.count }}</div>
  1125. <div style="width: 120px">
  1126. {{
  1127. data.count
  1128. ? parseFloat(
  1129. ((data.count / item.count) * 100).toFixed(2)
  1130. )
  1131. : 0
  1132. }}
  1133. <!-- <el-progress style="display: flex;align-items: center;" :stroke-width="12" color="#3681fc"
  1134. :percentage="data.count ? parseFloat(((data.count / item.count) * 100).toFixed(2)) : 0"></el-progress> -->
  1135. </div>
  1136. </div>
  1137. </div>
  1138. <div class="right isDesktopRight" v-if="item.cut">
  1139. <checkPie :dataJ="item.array"></checkPie>
  1140. </div>
  1141. <div class="cutBtnBlockCss">
  1142. <div class="cutBtnCss" @click="item.cut = !item.cut">
  1143. {{ item.cut ? "查看详情" : "查看视图" }}
  1144. </div>
  1145. </div>
  1146. </div>
  1147. <div
  1148. class="content2"
  1149. style="width: 100%; display: block"
  1150. v-if="item.type == 8"
  1151. >
  1152. <div class="left" style="width: 100%" v-if="!item.cut">
  1153. <div class="title">
  1154. <span>序号</span>
  1155. <span>词频</span>
  1156. <span>日期</span>
  1157. </div>
  1158. <div
  1159. class="data"
  1160. v-for="(data, index2) in item.array"
  1161. :key="index + '-' + index2"
  1162. >
  1163. <span>{{ index2 + 1 }}</span>
  1164. <span>{{ data.count }}次</span>
  1165. <el-tooltip
  1166. :content="data.name"
  1167. placement="top"
  1168. effect="dark"
  1169. >
  1170. <!-- content to trigger tooltip here -->
  1171. <span>{{ data.name }}</span>
  1172. </el-tooltip>
  1173. </div>
  1174. </div>
  1175. <div class="right isDesktopRight" v-if="item.cut">
  1176. <wordcloud
  1177. :data="item.array"
  1178. nameKey="name"
  1179. valueKey="count"
  1180. :showTooltip="false"
  1181. :wordClick="wordClickHandler"
  1182. >
  1183. </wordcloud>
  1184. </div>
  1185. <div class="cutBtnBlockCss">
  1186. <div class="cutBtnCss" @click="item.cut = !item.cut">
  1187. {{ item.cut ? "查看详情" : "查看视图" }}
  1188. </div>
  1189. </div>
  1190. </div>
  1191. <div class="content4" v-if="item.type == 11">
  1192. <div
  1193. class="out_box"
  1194. v-for="(item, index) in item.courseArray"
  1195. :key="index + '-' + index2"
  1196. >
  1197. <div class="tup">
  1198. <img
  1199. :src="
  1200. item.cover != null && item.cover != ''
  1201. ? JSON.parse(item.cover).length > 0
  1202. ? JSON.parse(item.cover)[0].url
  1203. : mr
  1204. : mr
  1205. "
  1206. alt
  1207. />
  1208. <div class="bottom_box">
  1209. <div>
  1210. <el-tooltip
  1211. :content="item.title"
  1212. popper-class="text_tooltip"
  1213. placement="top"
  1214. effect="dark"
  1215. >
  1216. <span>{{ item.title }}</span>
  1217. </el-tooltip>
  1218. </div>
  1219. <div class="kc_t">
  1220. <span>{{ item.username }}</span>
  1221. <span>{{
  1222. item.state == 1
  1223. ? "阶段模式"
  1224. : item.state == 2
  1225. ? "任务模式"
  1226. : "极简模式"
  1227. }}</span>
  1228. </div>
  1229. <div class="kc_time">
  1230. <span style="color: #717c8d">创建日期:</span
  1231. >{{ item.time }}
  1232. </div>
  1233. <div class="kc_time">
  1234. <span style="color: #717c8d">修改日期:</span
  1235. >{{ item.update_at }}
  1236. </div>
  1237. </div>
  1238. </div>
  1239. </div>
  1240. <!-- <div class="courses" v-for="(courses, index2) in item.array" :key="index + '-' + index2">
  1241. {{ courses }}
  1242. </div> -->
  1243. </div>
  1244. </div>
  1245. </div>
  1246. <div
  1247. class="aiBoxRight"
  1248. ref="aiBoxRightDivRef"
  1249. v-show="aiChatV && isDesktop"
  1250. v-if="!peopleId"
  1251. >
  1252. <aiBoxRight
  1253. :courseId="cid"
  1254. :worksArray="[{ name: testJson.title, worksArray: worksArray }]"
  1255. ref="aiChat"
  1256. ></aiBoxRight>
  1257. </div>
  1258. <!-- 按人员pc端 isDesktop-->
  1259. <div class="table_content" v-if="stype == 2 && isDesktop">
  1260. <el-table
  1261. class="el-table"
  1262. ref="table"
  1263. :data="tableWorksArray"
  1264. border
  1265. :fit="true"
  1266. :key="2"
  1267. v-loading="isLoading"
  1268. style="width: 100%"
  1269. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
  1270. @filter-change="handleFilterChange"
  1271. @selection-change="handleSelectionChange"
  1272. >
  1273. <el-table-column label="序号" type="selection" width="55">
  1274. </el-table-column>
  1275. <el-table-column fixed label="序号" width="80px" align="left">
  1276. <template slot-scope="scope">
  1277. {{ scope.$index + 1 }}
  1278. </template>
  1279. </el-table-column>
  1280. <el-table-column
  1281. fixed
  1282. prop="name"
  1283. label="提交人"
  1284. width="120px"
  1285. align="left"
  1286. >
  1287. </el-table-column>
  1288. <el-table-column
  1289. v-for="item in teaType"
  1290. :key="item.id"
  1291. :label="item.name"
  1292. width="120px"
  1293. align="left"
  1294. :filters="getNameTTypeFiler(item)"
  1295. :filter-method="getNameTTypeFiler(item) ? (value, row) => {
  1296. return filterTType(value, row, index);
  1297. } : null"
  1298. >
  1299. <template slot-scope="scope">
  1300. {{ getTType(item.id, scope.row.cclassid) }}
  1301. </template>
  1302. </el-table-column>
  1303. <el-table-column
  1304. prop="time"
  1305. label="提交时间"
  1306. width="170px"
  1307. align="left"
  1308. >
  1309. <template slot="header">
  1310. <div
  1311. style="display: flex; align-items: center"
  1312. >
  1313. <span :class="{timePickerActive:(submissionTimePicker && submissionTimePicker.length>0)}">提交时间</span>
  1314. <div class="tableDatePicker">
  1315. <el-date-picker
  1316. v-model="submissionTimePicker"
  1317. @change="submissionTimePickerChange"
  1318. type="daterange"
  1319. range-separator="▼"
  1320. :picker-options="pickerOptions([])"
  1321. >
  1322. </el-date-picker>
  1323. </div>
  1324. </div>
  1325. </template>
  1326. <template slot-scope="scope">
  1327. <span
  1328. :style="`${
  1329. testJson.overtime &&
  1330. new Date(testJson.overtime) < new Date(scope.row.time)
  1331. ? 'color:#d12920'
  1332. : ''
  1333. }`"
  1334. >{{ scope.row.time }}</span
  1335. >
  1336. </template>
  1337. </el-table-column>
  1338. <el-table-column
  1339. v-for="(item, index) in chapters"
  1340. :key="index"
  1341. :label="item.json.title"
  1342. :min-width="item.type == 5 ? 200 : 150"
  1343. align="left"
  1344. :filters="
  1345. item.type == 1
  1346. ? item.nameFilters
  1347. : item.type == 6 || item.type == 11
  1348. ? item.nameFilters
  1349. : null
  1350. "
  1351. :filter-method="
  1352. item.type == 1
  1353. ? (value, row) => {
  1354. return filterName(value, row, index);
  1355. }
  1356. : item.type == 6 || item.type == 11
  1357. ? (value, row) => {
  1358. return filterCourse(value, row, index);
  1359. }
  1360. : null
  1361. "
  1362. :filter-placement="
  1363. item.type == 1 || item.type == 6 || item.type == 11
  1364. ? filterPlacement
  1365. : null
  1366. "
  1367. >
  1368. <!-- item.type==8?getTimeFilterText(item,index): item.type==8?(value,row)=>{return filterTime(value,row,index)}: item.type == 8 ||-->
  1369. <template slot="header">
  1370. <div
  1371. v-if="item.type == 8"
  1372. style="display: flex; align-items: center"
  1373. >
  1374. <span :class="{timePickerActive:(tableDatePicker[index] && tableDatePicker[index].length>0)}">{{ item.json.title }}</span>
  1375. <div class="tableDatePicker">
  1376. <el-date-picker
  1377. v-model="tableDatePicker[index]"
  1378. @blur="tableDataPickerChange"
  1379. type="daterange"
  1380. range-separator="▼"
  1381. :picker-options="pickerOptions(item.json.timeSort)"
  1382. >
  1383. </el-date-picker>
  1384. </div>
  1385. </div>
  1386. <div v-else style="float: left">
  1387. {{ item.json.title }}
  1388. </div>
  1389. </template>
  1390. <template slot-scope="scope">
  1391. <div
  1392. v-if="scope.row.array[index].type == 1"
  1393. style="display: flex; flex-wrap: wrap"
  1394. >
  1395. <span
  1396. class="answer_type"
  1397. v-for="(answer2, index2) in scope.row.array[index].json
  1398. .answer2"
  1399. :key="index + '-' + index2"
  1400. >{{
  1401. scope.row.array[index].json.array[answer2].option
  1402. }}</span
  1403. >
  1404. </div>
  1405. <div
  1406. v-if="
  1407. scope.row.array[index].type == 3 ||
  1408. scope.row.array[index].type == 8
  1409. "
  1410. style="display: flex; flex-wrap: wrap"
  1411. >
  1412. {{ scope.row.array[index].json.answer2 }}
  1413. </div>
  1414. <div
  1415. v-if="scope.row.array[index].type == 5"
  1416. style="display: flex; flex-wrap: wrap"
  1417. class="table_file"
  1418. >
  1419. <template v-if="scope.row.array[index].json.file">
  1420. <template v-for="(file, index2) in scope.row.array[index].json.file">
  1421. <div
  1422. class="file"
  1423. v-if="index2 < 3"
  1424. :key="index + '-' + index2"
  1425. @click.stop="checkFile(file)"
  1426. >
  1427. <img
  1428. class="download"
  1429. src="../../../../assets/icon/fileIcon/download.png"
  1430. @click.stop="downloadFile(file)"
  1431. :style="{ right: '10px' }"
  1432. />
  1433. <img
  1434. class="img"
  1435. :src="wordIcon"
  1436. alt=""
  1437. v-if="file.type == 1"
  1438. />
  1439. <img
  1440. class="img"
  1441. :src="videoIcon"
  1442. alt=""
  1443. v-if="file.type == 2"
  1444. />
  1445. <img
  1446. class="img"
  1447. :src="file.url"
  1448. alt=""
  1449. v-if="file.type == 3"
  1450. />
  1451. <img
  1452. class="img"
  1453. :src="wordIcon"
  1454. alt=""
  1455. v-if="file.type == 4"
  1456. />
  1457. <img
  1458. class="img"
  1459. :src="fileIcon"
  1460. alt=""
  1461. v-if="file.type == 5"
  1462. />
  1463. <div class="name">
  1464. <el-tooltip
  1465. :content="file.name"
  1466. placement="top"
  1467. effect="dark"
  1468. >
  1469. <span>{{ file.name }}</span>
  1470. </el-tooltip>
  1471. </div>
  1472. </div>
  1473. </template>
  1474. </template>
  1475. <template v-if="scope.row.array[index].json.file">
  1476. <div class="file_more" v-if="scope.row.array[index].json.file.length>3">
  1477. <el-tooltip class="item" effect="light" content="查看更多" placement="top-start">
  1478. <svg t="1753409620948" @click="checkFileListOpen(scope.row.array[index].json.file)" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4403" width="200" height="200"><path d="M134.26141867 386.08713955c-69.25213392 0-125.91286045 56.66072652-125.91286045 125.91286045s56.66072652 125.91286045 125.91286045 125.91286045S260.17427911 581.25213392 260.17427911 512s-56.66072652-125.91286045-125.91286044-125.91286045z m755.47716266 0c-69.25213392 0-125.91286045 56.66072652-125.91286044 125.91286045s56.66072652 125.91286045 125.91286044 125.91286045S1015.65144178 581.25213392 1015.65144178 512s-56.66072652-125.91286045-125.91286045-125.91286045z m-377.73858133 0c-69.25213392 0-125.91286045 56.66072652-125.91286045 125.91286045S442.74786608 637.91286045 512 637.91286045 637.91286045 581.25213392 637.91286045 512 581.25213392 386.08713955 512 386.08713955z" fill="#515151" p-id="4404"></path></svg>
  1479. </el-tooltip>
  1480. </div>
  1481. </template>
  1482. </div>
  1483. <div
  1484. v-if="scope.row.array[index].type == 6"
  1485. style="display: flex; flex-wrap: wrap"
  1486. >
  1487. {{ scope.row.array[index].json.answer2 }}
  1488. </div>
  1489. <div
  1490. v-if="scope.row.array[index].type == 7"
  1491. style="display: flex; flex-wrap: wrap"
  1492. >
  1493. {{ getScore(scope.row.array[index].json) }}
  1494. </div>
  1495. <div
  1496. v-if="scope.row.array[index].type == 11"
  1497. style="display: flex; flex-wrap: wrap"
  1498. >
  1499. {{ scope.row.array[index].json.answer2 }}
  1500. </div>
  1501. <div
  1502. v-if="scope.row.array[index].type == 12"
  1503. style="display: flex; flex-wrap: wrap"
  1504. >
  1505. {{ scope.row.array[index].json.answer2 }}
  1506. </div>
  1507. <div
  1508. v-if="scope.row.array[index].type == 13"
  1509. style="display: flex; flex-wrap: wrap"
  1510. >
  1511. {{ scope.row.array[index].json.answer2 }}<span>{{ scope.row.array[index].json.type=='4'?'%':'' }}</span>
  1512. </div>
  1513. <div
  1514. v-if="scope.row.array[index].type == 14"
  1515. style="display: flex; flex-wrap: wrap"
  1516. >
  1517. {{ scope.row.array[index].json.answer2 }}
  1518. </div>
  1519. </template>
  1520. </el-table-column>
  1521. <el-table-column
  1522. label="dee"
  1523. width="150px"
  1524. fixed="right"
  1525. v-if="scoListCopy.length"
  1526. >
  1527. <template #header>
  1528. <div>
  1529. <span>{{ cueWordCopy.openCeTit }} <span class="proBar" v-if="aiscoLoading">AI生成中</span></span>
  1530. </div>
  1531. </template>
  1532. <template slot-scope="scope">
  1533. <span>{{ userSco(scope.row.id) }}</span>
  1534. </template>
  1535. </el-table-column>
  1536. <el-table-column
  1537. label="操作"
  1538. :width="review=='1'?'180px':'280px'"
  1539. fixed="right"
  1540. v-if="isN != 1"
  1541. >
  1542. <template slot-scope="scope">
  1543. <el-button
  1544. @click="getTest(scope.row)"
  1545. type="primary"
  1546. v-if="(examineData && examineData.type == 1) || !examineData"
  1547. size="small"
  1548. >查看</el-button
  1549. >
  1550. <el-button
  1551. @click="editTest(scope.row)"
  1552. type="primary"
  1553. v-if="((examineData && examineData.type == 1) || !examineData) && review !='1'"
  1554. size="small"
  1555. >编辑</el-button
  1556. >
  1557. <el-button
  1558. @click="returnTest(scope.row)"
  1559. type="primary"
  1560. size="small"
  1561. v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'"
  1562. >退回</el-button
  1563. >
  1564. <!-- v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'" -->
  1565. <!-- <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
  1566. <el-button @click="setWordTemplate(scope.row)" type="primary" size="small">word导出</el-button> -->
  1567. <el-button
  1568. @click="deleteTest(scope.row.id)"
  1569. type="primary"
  1570. size="small"
  1571. v-if="((examineData && examineData.type == 1) || !examineData) && review !='1'"
  1572. >删除</el-button
  1573. >
  1574. </template>
  1575. </el-table-column>
  1576. <el-table-column
  1577. label="状态"
  1578. width="100px"
  1579. fixed="right"
  1580. align="center"
  1581. v-if="!review && peopleId"
  1582. >
  1583. <template slot-scope="scope">
  1584. <!-- v-if="review==='1'" -->
  1585. <span :class="`typeStatus typeStatus_${scope.row.type}`">{{ typeStatusList[scope.row.type] }}</span>
  1586. </template>
  1587. </el-table-column>
  1588. <el-table-column
  1589. label="审核状态"
  1590. width="120px"
  1591. fixed="right"
  1592. v-if="review==='1'"
  1593. >
  1594. <template slot-scope="scope">
  1595. <el-checkbox @change="reviewChange(scope.row)" true-label="1" false-label="0" v-model="scope.row.isReview">审核通过</el-checkbox>
  1596. </template>
  1597. </el-table-column>
  1598. </el-table>
  1599. </div>
  1600. <!-- 按人员手机端 !isDesktop-->
  1601. <div class="table_content" v-if="stype == 2 && !isDesktop">
  1602. <div
  1603. v-for="(i, index) in worksArray"
  1604. :key="i.id"
  1605. class="isDesktopTable_content"
  1606. >
  1607. <div class="isDTitle CutCss">
  1608. <div style="font-size: 16px; font-weight: 600">
  1609. {{ i.name }}
  1610. </div>
  1611. <div
  1612. :style="
  1613. 'font-size: 14px' + i.cut
  1614. ? 'color:rgba(54, 129, 252, 1)'
  1615. : 'color: rgba(0, 0, 0, 0.6);'
  1616. "
  1617. >
  1618. {{ i.time }}
  1619. </div>
  1620. <div @click="i.cut = !i.cut">
  1621. <img
  1622. v-if="!i.cut"
  1623. src="../../../../assets/icon/fileIcon/downImg.png"
  1624. alt=""
  1625. />
  1626. <img
  1627. v-else
  1628. src="../../../../assets/icon/fileIcon/upImg.png"
  1629. alt=""
  1630. />
  1631. </div>
  1632. </div>
  1633. <div v-if="i.cut">
  1634. <div class="isDBri">
  1635. <div>序号:{{ i.time }}</div>
  1636. <div>提交时间:{{ i.time }}</div>
  1637. <div>评课人:{{ i.uteaName }}</div>
  1638. </div>
  1639. <div
  1640. style="
  1641. height: 1px;
  1642. background-color: #717c8d;
  1643. width: 100%;
  1644. margin-bottom: 10px;
  1645. "
  1646. ></div>
  1647. <div>
  1648. <div
  1649. v-for="(k, kin) in chapters"
  1650. :key="k.id"
  1651. class="isCTiBlc"
  1652. >
  1653. <div v-if="k.type == 1">
  1654. <div class="isDTitle2">
  1655. <div
  1656. style="display: flex; justify-content: space-between"
  1657. >
  1658. <div style="display: flex">
  1659. <span class="topicTitCss">第{{ kin + 1 }}题:</span>
  1660. <div class="isDTitle2JsonTit">
  1661. {{ k.json.title }}
  1662. </div>
  1663. </div>
  1664. <div style="color: rgba(0, 0, 0, 0.4)">
  1665. [{{ selectType2(k.type, k.json.type) }}]
  1666. </div>
  1667. </div>
  1668. <div class="IsDAnswer">
  1669. <div
  1670. v-for="(r, index2) in i.array[kin].json.answer2"
  1671. :key="index + '-' + index2"
  1672. >
  1673. {{ i.array[kin].json.array[r].option }}
  1674. </div>
  1675. </div>
  1676. </div>
  1677. </div>
  1678. <div v-if="k.type == 3 || k.type == 8">
  1679. <div class="isDTitle2">
  1680. <div
  1681. style="display: flex; justify-content: space-between"
  1682. >
  1683. <div style="display: flex">
  1684. <span class="topicTitCss">第{{ kin + 1 }}题:</span>
  1685. <div class="isDTitle2JsonTit">
  1686. {{ k.json.title }}
  1687. </div>
  1688. </div>
  1689. <div style="color: rgba(0, 0, 0, 0.4)">
  1690. [{{ selectType2(k.type, k.json.type) }}]
  1691. </div>
  1692. </div>
  1693. <div class="IsDAnswer">
  1694. {{ i.array[kin].json.answer2 }}
  1695. </div>
  1696. </div>
  1697. </div>
  1698. <div v-if="k.type == 5">
  1699. <div class="isDTitle2">
  1700. <div
  1701. style="display: flex; justify-content: space-between"
  1702. >
  1703. <div style="display: flex">
  1704. <span class="topicTitCss">第{{ kin + 1 }}题:</span>
  1705. <div class="isDTitle2JsonTit">
  1706. {{ k.json.title }}
  1707. </div>
  1708. </div>
  1709. <div style="color: rgba(0, 0, 0, 0.4)">
  1710. [{{ selectType2(k.type, k.json.type) }}]
  1711. </div>
  1712. </div>
  1713. <div class="IsDAnswer">
  1714. <div
  1715. class="IsDFile"
  1716. v-for="(file, index2) in i.array[kin].json.file"
  1717. :key="index + '-' + index2"
  1718. @click.stop="checkFile(file)"
  1719. >
  1720. <img
  1721. class="IsDownload"
  1722. src="../../../../assets/icon/fileIcon/download.png"
  1723. @click.stop="downloadFile(file)"
  1724. :style="{ right: '10px' }"
  1725. />
  1726. <img
  1727. class="IsDImg"
  1728. :src="wordIcon"
  1729. alt=""
  1730. v-if="file.type == 1"
  1731. />
  1732. <img
  1733. class="IsDImg"
  1734. :src="videoIcon"
  1735. alt=""
  1736. v-if="file.type == 2"
  1737. />
  1738. <img
  1739. class="IsDImg"
  1740. :src="file.url"
  1741. alt=""
  1742. v-if="file.type == 3"
  1743. />
  1744. <img
  1745. class="IsDImg"
  1746. :src="wordIcon"
  1747. alt=""
  1748. v-if="file.type == 4"
  1749. />
  1750. <img
  1751. class="IsDImg"
  1752. :src="fileIcon"
  1753. alt=""
  1754. v-if="file.type == 5"
  1755. />
  1756. <div
  1757. class="name"
  1758. style="
  1759. height: 30px;
  1760. background-color: #f9f9f9;
  1761. overflow: hidden;
  1762. white-space: nowrap;
  1763. text-overflow: ellipsis;
  1764. "
  1765. >
  1766. <!-- <el-tooltip :content="file.name" placement="top" effect="dark"> -->
  1767. {{ file.name }}
  1768. <!-- </el-tooltip> -->
  1769. </div>
  1770. </div>
  1771. </div>
  1772. </div>
  1773. </div>
  1774. <div v-if="k.type.type == 6">
  1775. <div class="isDTitle2">
  1776. <div
  1777. style="display: flex; justify-content: space-between"
  1778. >
  1779. <div style="display: flex">
  1780. <span class="topicTitCss">第{{ kin + 1 }}题:</span>
  1781. <div class="isDTitle2JsonTit">
  1782. {{ k.json.title }}
  1783. </div>
  1784. </div>
  1785. <div style="color: rgba(0, 0, 0, 0.4)">
  1786. [{{ selectType2(k.type, k.json.type) }}]
  1787. </div>
  1788. </div>
  1789. <div class="IsDAnswer">
  1790. {{ i.array[kin].json.answer2 }}
  1791. </div>
  1792. </div>
  1793. </div>
  1794. <div v-if="k.type == 7">
  1795. <div class="isDTitle2">
  1796. <div
  1797. style="display: flex; justify-content: space-between"
  1798. >
  1799. <div style="display: flex">
  1800. <span class="topicTitCss">第{{ kin + 1 }}题:</span>
  1801. <div class="isDTitle2JsonTit">
  1802. {{ k.json.title }}
  1803. </div>
  1804. </div>
  1805. <div style="color: rgba(0, 0, 0, 0.4)">
  1806. [{{ selectType2(k.type, k.json.type) }}]
  1807. </div>
  1808. </div>
  1809. <div class="IsDAnswer">
  1810. {{ getScore(i.array[index].json) }}
  1811. </div>
  1812. </div>
  1813. </div>
  1814. <div v-if="k.type.type == 11">
  1815. <div class="isDTitle2">
  1816. <div
  1817. style="display: flex; justify-content: space-between"
  1818. >
  1819. <div style="display: flex">
  1820. <span class="topicTitCss">第{{ kin + 1 }}题:</span>
  1821. <div class="isDTitle2JsonTit">
  1822. {{ k.json.title }}
  1823. </div>
  1824. </div>
  1825. <div style="color: rgba(0, 0, 0, 0.4)">
  1826. [{{ selectType2(k.type, k.json.type) }}]
  1827. </div>
  1828. </div>
  1829. <div class="IsDAnswer">
  1830. {{ i.array[kin].json.answer2 }}
  1831. </div>
  1832. </div>
  1833. </div>
  1834. </div>
  1835. </div>
  1836. <div style="width: 100%; display: flex; justify-content: end">
  1837. <div
  1838. @click="i.cut = !i.cut"
  1839. style="
  1840. display: flex;
  1841. flex-direction: column;
  1842. align-items: center;
  1843. "
  1844. >
  1845. <img
  1846. src="../../../../assets/icon/fileIcon/retractImg.png"
  1847. alt=""
  1848. />
  1849. <div style="color: rgba(0, 0, 0, 0.4); font-size: 16px">
  1850. 收起
  1851. </div>
  1852. </div>
  1853. </div>
  1854. </div>
  1855. <div
  1856. style="
  1857. height: 1px;
  1858. background-color: #717c8d;
  1859. width: 100%;
  1860. margin-bottom: 10px;
  1861. "
  1862. ></div>
  1863. </div>
  1864. <!-- <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
  1865. style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
  1866. @filter-change="handleFilterChange">
  1867. <el-table-column fixed label="序号" width="80px" align="left">
  1868. <template slot-scope="scope">
  1869. {{ scope.$index + 1 }}
  1870. </template>
  1871. </el-table-column>
  1872. <el-table-column fixed prop="name" label="提交人" width="120px" align="left">
  1873. </el-table-column>
  1874. <el-table-column prop="time" label="提交时间" width="170px" align="left">
  1875. <template slot-scope="scope">
  1876. <span :style="`${testJson.overtime&&new Date(testJson.overtime)<new Date(scope.row.time)?'color:#d12920':''}`">{{ scope.row.time }}</span>
  1877. </template>
  1878. </el-table-column>
  1879. <el-table-column v-for="(item, index) in chapters" :key="index" :label="item.json.title"
  1880. :min-width="item.type == 5 ? 200 : 150" align="left" :filters="item.type == 1 ? item.nameFilters : item.type == 6? item.nameFilters : null"
  1881. :filter-method="item.type == 1 ? (value, row) => { return filterName(value, row, index) } : item.type == 6?(value, row) => { return filterCourse(value, row, index)}:null"
  1882. :filter-placement="item.type == 1 || item.type ==6 ? filterPlacement : null">
  1883. <template slot-scope="scope">
  1884. <div v-if="scope.row.array[index].type == 1" style="display: flex; flex-wrap: wrap;">
  1885. <span class="answer_type" v-for="(answer2, index2) in scope.row.array[index].json.answer2"
  1886. :key="index + '-' + index2">{{ scope.row.array[index].json.array[answer2].option }}</span>
  1887. </div>
  1888. <div v-if="scope.row.array[index].type == 3 || scope.row.array[index].type == 8" style="display: flex; flex-wrap: wrap;">
  1889. {{ scope.row.array[index].json.answer2 }}
  1890. </div>
  1891. <div v-if="scope.row.array[index].type == 5" style="display: flex; flex-wrap: wrap;"
  1892. class="table_file">
  1893. <div class="file" v-for="(file, index2) in scope.row.array[index].json.file"
  1894. :key="index + '-' + index2" @click.stop="checkFile(file)">
  1895. <img class="download" src="../../../../assets/icon/fileIcon/download.png"
  1896. @click.stop="downloadFile(file)" :style="{ right: '10px' }" />
  1897. <img class="img" :src="wordIcon" alt="" v-if="file.type == 1" />
  1898. <img class="img" :src="videoIcon" alt="" v-if="file.type == 2" />
  1899. <img class="img" :src="file.url" alt="" v-if="file.type == 3" />
  1900. <img class="img" :src="wordIcon" alt="" v-if="file.type == 4" />
  1901. <img class="img" :src="fileIcon" alt="" v-if="file.type == 5" />
  1902. <div class="name">
  1903. <el-tooltip :content="file.name" placement="top" effect="dark">
  1904. <span>{{ file.name }}</span>
  1905. </el-tooltip>
  1906. </div>
  1907. </div>
  1908. </div>
  1909. <div v-if="scope.row.array[index].type == 6" style="display: flex; flex-wrap: wrap;">
  1910. {{ scope.row.array[index].json.answer2}}
  1911. </div>
  1912. <div v-if="scope.row.array[index].type == 7" style="display: flex; flex-wrap: wrap;">
  1913. {{ getScore(scope.row.array[index].json) }}
  1914. </div>
  1915. </template>
  1916. </el-table-column>
  1917. <el-table-column label="操作" width="300px" fixed="right" v-if="isN!=1">
  1918. <template slot-scope="scope">
  1919. <el-button @click="getTest(scope.row)" type="primary" size="small">查看</el-button>
  1920. <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
  1921. <el-button @click="deleteTest(scope.row.id)" type="primary" size="small">删除</el-button>
  1922. </template>
  1923. </el-table-column>
  1924. </el-table> -->
  1925. </div>
  1926. <div class="table_content" v-if="stype == 3">
  1927. <div class="student_table">
  1928. <el-table
  1929. ref="table"
  1930. :data="tableData"
  1931. border
  1932. :fit="true"
  1933. v-loading="isLoading"
  1934. style="width: 100%"
  1935. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
  1936. :row-class-name="tableRowClassName"
  1937. >
  1938. <el-table-column
  1939. prop="username"
  1940. label="提交人"
  1941. min-width="15"
  1942. align="center"
  1943. >
  1944. </el-table-column>
  1945. <el-table-column
  1946. prop="time"
  1947. label="提交时间"
  1948. min-width="15"
  1949. align="center"
  1950. >
  1951. </el-table-column>
  1952. <el-table-column label="是否批改" min-width="15" align="center">
  1953. <template slot-scope="scope">
  1954. <div>{{ scope.row.type == 3 ? "是" : "否" }}</div>
  1955. </template>
  1956. </el-table-column>
  1957. <el-table-column label="操作" width="300px" v-if="isDesktop">
  1958. <template slot-scope="scope">
  1959. <el-button
  1960. @click="getTest(scope.row)"
  1961. type="primary"
  1962. size="small"
  1963. >查看</el-button
  1964. >
  1965. <el-button
  1966. @click="setWordHtml2(scope.row)"
  1967. type="primary"
  1968. size="small"
  1969. >导出答题信息</el-button
  1970. >
  1971. <el-button
  1972. @click="deleteTest(scope.row.id)"
  1973. type="primary"
  1974. size="small"
  1975. >删除</el-button
  1976. >
  1977. </template>
  1978. </el-table-column>
  1979. </el-table>
  1980. </div>
  1981. <div class="student_page">
  1982. <el-pagination
  1983. background
  1984. layout="prev, pager, next"
  1985. :page-size="pageSize"
  1986. :total="total"
  1987. @current-change="handleCurrentChange"
  1988. >
  1989. </el-pagination>
  1990. </div>
  1991. </div>
  1992. </div>
  1993. </div>
  1994. </div>
  1995. <share-box
  1996. :testJson="testJson"
  1997. :TeachingValue="TeachingValue"
  1998. :TeachName="TeachNameCpt"
  1999. :dialogVisibleShare.sync="dialogVisibleShare"
  2000. ></share-box>
  2001. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  2002. <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
  2003. <wOffice
  2004. :dialogVisibleOffice.sync="dialogVisibleOffice"
  2005. :url="wurl"
  2006. ></wOffice>
  2007. <docxTemplateDialog
  2008. ref="docxTemplateDialogRef"
  2009. @changeCover="changeCover"
  2010. />
  2011. <checkFileListDialog ref="checkFileListDialogRef" @checkFile="checkFile" @downloadFile="downloadFile"/>
  2012. </div>
  2013. </template>
  2014. <script>
  2015. import shareBox from "../shareBox/index.vue";
  2016. import videoIcon from "../../../../assets/icon/fileIcon/isVideo.png";
  2017. import wordIcon from "../../../../assets/icon/fileIcon/isWord.png";
  2018. import fileIcon from "../../../../assets/icon/fileIcon/word2.png";
  2019. import wVideo from "../file/wVideo.vue";
  2020. import wpdf from "../file/wPdf2.vue";
  2021. import wOffice from "../file/wOffice.vue";
  2022. import wordcloud from "vue-wordcloud";
  2023. import checkPie from "../data/checkPie.vue";
  2024. import { downloadPDF } from "../../../tools/pdf";
  2025. import JSZip from "jszip";
  2026. import FileSaver from "file-saver";
  2027. import XLSX from "xlsx-js-style";
  2028. import aiBoxRight from "./aiBoxRight.vue";
  2029. import { v4 as uuidv4 } from "uuid";
  2030. // word模板
  2031. import docxTemplateDialog from "./docxTemplateDialog";
  2032. //查看文件
  2033. import checkFileListDialog from "./checkFileListDialog.vue";
  2034. const getFile = (url) => {
  2035. return new Promise((resolve, reject) => {
  2036. var credentials = {
  2037. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  2038. secretAccessKey: "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",
  2039. }; //秘钥形式的登录上传
  2040. window.AWS.config.update(credentials);
  2041. window.AWS.config.region = "cn-northwest-1"; //设置区域
  2042. let url2 = url;
  2043. let _url2 = "";
  2044. if (
  2045. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  2046. ) {
  2047. _url2 = url2.split(
  2048. "https://view.officeapps.live.com/op/view.aspx?src="
  2049. )[1];
  2050. } else {
  2051. _url2 = url2;
  2052. }
  2053. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  2054. let name = decodeURIComponent(
  2055. _url2
  2056. .split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
  2057. .replace(/\+/g, " ")
  2058. );
  2059. var params = {
  2060. Bucket: "ccrb",
  2061. Key: name,
  2062. };
  2063. s3.getObject(params, function (err, data) {
  2064. if (err) {
  2065. console.log(err, err.stack);
  2066. resolve({ data: 1 });
  2067. } else {
  2068. if(data.Body.byteLength <= 85 * 1024 * 1024){
  2069. resolve({ data: data.Body });
  2070. }else{
  2071. resolve({ data: 1 });
  2072. }
  2073. console.log(data);
  2074. } // sxuccessful response
  2075. });
  2076. // axios({
  2077. });
  2078. };
  2079. export default {
  2080. components: {
  2081. shareBox,
  2082. wVideo,
  2083. wpdf,
  2084. wOffice,
  2085. checkPie,
  2086. wordcloud,
  2087. aiBoxRight,
  2088. docxTemplateDialog,
  2089. checkFileListDialog
  2090. },
  2091. data() {
  2092. return {
  2093. gotype:sessionStorage.getItem('gotype'),
  2094. aiscoId:'',
  2095. aiscoLoading:true,
  2096. cueWord:{
  2097. openCeCon:'', //指令
  2098. openCeTit:'', //标题
  2099. fieldList:[]
  2100. },
  2101. cueWordCopy:{
  2102. openCeCon:'', //指令
  2103. openCeTit:'', //标题
  2104. fieldList:[]
  2105. },
  2106. scoList:[],
  2107. scoListCopy:[], //没有什么别的用处只是为了展示用,让表单在评分的过程中不清零
  2108. quoteV:false,
  2109. openCeVal:false,
  2110. opQvisible:false,
  2111. opQvisible2:false,
  2112. opcInp:'',
  2113. languageSetting: 0,
  2114. userid: this.$route.query.userid,
  2115. oid: this.$route.query.oid,
  2116. org: this.$route.query.org,
  2117. role: this.$route.query.role,
  2118. cid: this.$route.query.cid,
  2119. isN: this.$route.query.isN,
  2120. peopleId: this.$route.query.peopleId,
  2121. back:this.$route.query.back,
  2122. screenWidth: window.innerWidth,
  2123. examineId: this.$route.query.examineId,
  2124. tType: this.$route.query.tType,
  2125. isDesktop: false,
  2126. aiChatV: false,
  2127. title: "",
  2128. testType: [],
  2129. see: false,
  2130. cJson: [],
  2131. loading: false,
  2132. look: "",
  2133. TeachingOptions: [],
  2134. TeachingValue: "",
  2135. SubmitTimeOptions: [],
  2136. SubmitTime: "",
  2137. tableHeight: 500,
  2138. isLoading: false,
  2139. pageSize: 10,
  2140. total: 0,
  2141. page: 1,
  2142. tableData: [],
  2143. testJson: {},
  2144. works: [],
  2145. iscount: 0,
  2146. pcount: 0,
  2147. stype: 1,
  2148. courseName: "",
  2149. dialogVisibleShare: false,
  2150. worksArray: [],
  2151. tableWorksArray: [],
  2152. testArray: [],
  2153. options2: {
  2154. 1: "选择题",
  2155. // 2: "问答题",
  2156. 3: "问答题",
  2157. 4: "添加文档",
  2158. 5: "附件",
  2159. },
  2160. videoIcon: videoIcon,
  2161. wordIcon: wordIcon,
  2162. fileIcon: fileIcon,
  2163. dialogVisiblePdf: false,
  2164. dialogVisibleVideo: false,
  2165. dialogVisibleOffice: false,
  2166. wurl: "",
  2167. chapters: [],
  2168. filterPlacement: "bottom-end",
  2169. pdfLoading: false,
  2170. btnDisplay: false,
  2171. fileLoading: [],
  2172. selectWorkList: [],
  2173. tableDatePicker: [],
  2174. submissionTimePicker:[],
  2175. // fileLoadCount: [],
  2176. // fileLoadNum: [],
  2177. // infoprogress: [],
  2178. teaType: [],
  2179. examineData:null,
  2180. disableBack: this.$route.query.disableBack === 'true',
  2181. timeLimit:this.$route.query.timeLimit,
  2182. sortTime:[],
  2183. review:this.$route.query.review,
  2184. defaultTimeLimit:[],
  2185. typeStatusList:["","未提交","已提交","","已退回"]
  2186. };
  2187. },
  2188. watch: {},
  2189. computed: {
  2190. // 去除不能评分的指令
  2191. fie(){
  2192. return function (val) {
  2193. console.log('fie',val);
  2194. const con = val.filter(e => [12,11,6,14].indexOf(e.type) == -1)
  2195. return con
  2196. }
  2197. },
  2198. // ai评分分数
  2199. userSco(){
  2200. return function (val) {
  2201. const con = this.scoListCopy.find(u => u.id === val);
  2202. // console.log('con',con);
  2203. return con ? con.sco : '';
  2204. }
  2205. },
  2206. TeachNameCpt: function () {
  2207. // `this` 指向 vm 实例
  2208. return this.TeachingOptions.filter((i) => {
  2209. return i.id == this.TeachingValue;
  2210. });
  2211. },
  2212. // vcWords() {
  2213. // return function (array) {
  2214. // let _array = [];
  2215. // if (array.length) {
  2216. // for (var i = 0; i < array.length; i++) {
  2217. // _array.push(
  2218. // {
  2219. // text: array[i].name,
  2220. // weight: array[i].count,
  2221. // }
  2222. // )
  2223. // }
  2224. // }
  2225. // console.log(_array);
  2226. // return array.length ? _array : [];
  2227. // };
  2228. // },
  2229. getScore() {
  2230. return function (item) {
  2231. let array = [];
  2232. for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
  2233. array.push(i);
  2234. }
  2235. return item.answer2 ? array[item.answer2] : "";
  2236. };
  2237. },
  2238. selectType() {
  2239. return function (item) {
  2240. if (item.type == 1 && item.atype == 2) {
  2241. return "多选题";
  2242. } else if (item.type == 1 && item.atype == 1) {
  2243. return "单选题";
  2244. } else if (item.type == 3) {
  2245. return "问答题";
  2246. } else if (item.type == 5) {
  2247. return "附件";
  2248. } else if (item.type == 6 || item.type == 11) {
  2249. return "课程";
  2250. } else if (item.type == 7) {
  2251. return "评分";
  2252. } else if (item.type == 8) {
  2253. return "日期";
  2254. }
  2255. };
  2256. },
  2257. selectType2() {
  2258. return function (val1, val2) {
  2259. if (val1 == 1 && val2 == 2) {
  2260. return "多选题";
  2261. } else if (val1 == 1 && val2 == 1) {
  2262. return "单选题";
  2263. } else if (val1 == 3) {
  2264. return "问答题";
  2265. } else if (val1 == 5) {
  2266. return "附件";
  2267. } else if (val1 == 6) {
  2268. return "课程";
  2269. } else if (val1 == 7) {
  2270. return "评分";
  2271. } else if (val1 == 8) {
  2272. return "日期";
  2273. }
  2274. };
  2275. },
  2276. // 获取评分的平均分
  2277. getAverageScore() {
  2278. return (_index) => {
  2279. let _result = 0;
  2280. let _sum = 0;
  2281. this.worksArray.forEach((i1) => {
  2282. _result += i1.array[_index].json.answer2;
  2283. _sum += 1;
  2284. });
  2285. _result = _sum ? (_result / _sum).toFixed(2) : 0;
  2286. return _result ? _result : 0;
  2287. };
  2288. },
  2289. getTimeFilterText() {
  2290. return (item, index) => {
  2291. let _result = [];
  2292. if (item.type == 8) {
  2293. let array = [];
  2294. this.worksArray.forEach((i) => {
  2295. if (i.array[index].type == 8) {
  2296. let _data = i.array[index].json.answer2;
  2297. if (!array.map((r) => r.value).includes(_data)) {
  2298. array.push({ text: _data, value: _data });
  2299. }
  2300. }
  2301. });
  2302. array.sort((a, b) => {
  2303. const dateA = new Date(
  2304. a.value.replace(/年|月/g, "-").replace(/日/g, "")
  2305. );
  2306. const dateB = new Date(
  2307. b.value.replace(/年|月/g, "-").replace(/日/g, "")
  2308. );
  2309. return dateB - dateA; // 从小到大排序
  2310. });
  2311. console.log("👉排序:", array);
  2312. _result = array;
  2313. }
  2314. return _result;
  2315. };
  2316. },
  2317. getTType() {
  2318. return function (pid, cclassid) {
  2319. if(cclassid){
  2320. let string = [];
  2321. this.teaType.forEach((e) => {
  2322. if (e.id == pid) {
  2323. for (var i = 0; i < e.child.length; i++) {
  2324. if (cclassid.includes(e.child[i].id)) {
  2325. string.push(e.child[i].name);
  2326. }
  2327. }
  2328. }
  2329. });
  2330. return string.length ? string.join(",") : "-";
  2331. }else{
  2332. return "-";
  2333. }
  2334. };
  2335. },
  2336. getNameTTypeFiler() {
  2337. return (item) => {
  2338. return item.child.length ? item.child.map(child => ({
  2339. text: child.name,
  2340. value: child.id
  2341. })) : null;
  2342. };
  2343. },
  2344. pickerOptions(){
  2345. return (dataList)=>{
  2346. let _result = {
  2347. shortcuts:[]
  2348. }
  2349. if(dataList && dataList.length>0){
  2350. for(let i = 0;i<dataList.length;i++){
  2351. if(dataList[i].time.length<=0)continue;
  2352. _result.shortcuts.push({
  2353. text:dataList[i].title?dataList[i].title:"-",
  2354. onClick(picker){
  2355. let startTime = dataList[i].time[0];
  2356. let endTime = dataList[i].time[1]
  2357. picker.$emit('pick', [startTime, endTime]);
  2358. }
  2359. })
  2360. }
  2361. }
  2362. if(this.sortTime.length>0){
  2363. this.sortTime.forEach(i=>{
  2364. _result.shortcuts.push({
  2365. text:i.title?i.title:"-",
  2366. onClick(picker){
  2367. picker.$emit('pick', [new Date(i.time[0]), new Date(i.time[1])]);
  2368. }
  2369. })
  2370. })
  2371. }
  2372. return _result;
  2373. }
  2374. },
  2375. scoList2(){
  2376. let result = [];
  2377. if(this.peopleId){
  2378. result = this.scoList.filter(i=>this.tableWorksArray.map(i=>i.id).indexOf(i.id) != -1)
  2379. }else{
  2380. result = this.scoList;
  2381. }
  2382. return result
  2383. }
  2384. },
  2385. methods: {
  2386. // 清除分数
  2387. cleancueWord(){
  2388. if (!this.aiscoId) return
  2389. let params = [{
  2390. tid:this.cid
  2391. }]
  2392. console.log('params',params);
  2393. this.ajax
  2394. .post(this.$store.state.api + "deltestAisco", params)
  2395. .then((res) => {
  2396. console.log(res);
  2397. this.$message({
  2398. message: "删除成功",
  2399. type: "success"
  2400. });
  2401. this.getAiSco()
  2402. })
  2403. .catch((err) => {
  2404. this.$message({
  2405. message: "删除失败",
  2406. type: "error"
  2407. });
  2408. console.error(err);
  2409. });
  2410. this.opQvisible = false
  2411. },
  2412. // 点击开始评分(全部进行评分)
  2413. async markSco(){
  2414. if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
  2415. if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
  2416. if (this.cueWord.fieldList.length == 0) return this.$message.error('请选择引用字段')
  2417. this.aiscoLoading = true
  2418. let forAllList = [];
  2419. this.scoList = []
  2420. for (let kin = 0; kin < this.tableWorksArray.length; kin++) {
  2421. let userWork = []
  2422. let _fileid = []
  2423. let kpl = this.tableWorksArray[kin].array
  2424. // console.log('kpl',this.tableWorksArray[kin]);
  2425. for (let index = 0; index < kpl.length; index++) {
  2426. if (kpl[index].type == 3 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2427. userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)
  2428. }
  2429. if (kpl[index].type == 5 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2430. if (kpl[index].json.file && kpl[index].json.file[0].url) {
  2431. _fileid.push(kpl[index].json.file[0].url)
  2432. }
  2433. userWork.push(kpl[index].json.title+':' + _fileid.join('、'))
  2434. }
  2435. if (kpl[index].type == 7 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2436. userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
  2437. }
  2438. if (kpl[index].type == 1 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2439. let kk = []
  2440. kpl[index].json.answer2.forEach((e)=>{
  2441. kk.push(kpl[index].json.array[e].option)
  2442. })
  2443. userWork.push(kpl[index].json.title+':' +kk.join(','))
  2444. }
  2445. }
  2446. let info = [
  2447. this.cueWord.fieldList.includes('序号') ? '序号' + (kin + 1) : '',
  2448. this.cueWord.fieldList.includes('提交人') ? '提交人:' + this.tableWorksArray[kin].name : '',
  2449. this.cueWord.fieldList.includes('学段') ? '学段:' + this.getTType(this.teaType[0].id, this.tableWorksArray[kin].cclassid) : '',
  2450. this.cueWord.fieldList.includes('年级') ? '年级:' + this.getTType(this.teaType[1].id, this.tableWorksArray[kin].cclassid) : '',
  2451. this.cueWord.fieldList.includes('学科') ? '学科:' + this.getTType(this.teaType[2].id, this.tableWorksArray[kin].cclassid) : '',
  2452. this.cueWord.fieldList.includes('职务') ? '职务:' + this.getTType(this.teaType[3].id, this.tableWorksArray[kin].cclassid) : '',
  2453. this.cueWord.fieldList.includes('教龄') ? '教龄:' + this.getTType(this.teaType[4].id, this.tableWorksArray[kin].cclassid) : '',
  2454. this.cueWord.fieldList.includes('提交时间') ? '提交时间:' + this.tableWorksArray[kin].time : '',
  2455. userWork.filter(Boolean).join('\n')
  2456. ].filter(Boolean).join('\n');
  2457. forAllList.push({id:this.tableWorksArray[kin].id,data:info})
  2458. // console.log('info',info);
  2459. }
  2460. // console.log('forAllList',forAllList);
  2461. let messages = `
  2462. NOTICE
  2463. Role: 你是一个高级数据处理师。
  2464. - 深入理解各种数据处理标准,确保处理流程的准确性。
  2465. - 熟练掌握数据结构知识,能快速解析“字段名称:具体内容”结构的文本。
  2466. - 具备强大的逻辑分析能力,以便制定合理的数据处理流程。
  2467. - 有丰富的数据处理经验,能应对多种类型的数据操作。
  2468. - 拥有精准的数据分析能力,准确得出处理结果。
  2469. - 擅长根据不同评价标准进行数据评价,保证结果符合要求。
  2470. - 能够高效地处理大量数据,保证工作的时效性。
  2471. Language: ${this.getLang()}
  2472. ## 上下文
  2473. 在数据处理任务缺乏合适工具或人力时,如数据分析项目、数据审核任务场景下,存在多组特定结构的文本数据,需数据处理大师理解标准和内容,制定流程并处理数据,按要求输出结果。
  2474. ## 数据处理标准
  2475. ${this.cueWord.openCeCon}
  2476. ## 数据内容
  2477. ${JSON.stringify(forAllList)}
  2478. ## 任务
  2479. 1. 数据标准理解:详细了解{数据处理标准}(如准确性、完整性、一致性等要求)
  2480. 2. 数据内容理解: 阅读并理解{数据内容}包括多组“字段名称:具体内容”结构的文本数据。
  2481. 3. 处理流程制定:根据所理解的{数据处理标准},制定详细的数据处理流程,包括数据分析(如统计分析、关联分析等)、数据评价(根据标准打分或分类等)等步骤。
  2482. 4. 数据处理操作:按照制定的流程对数据进行分析、处理和评价等操作。
  2483. 5. 结果输出:仅输出按照用户要求处理后的结果,确保结果清晰、准确且易于理解。
  2484. ### 理论框架
  2485. ### 数据生命周期管理理论
  2486. 1. 基本原理:
  2487. - 数据生命周期涵盖数据的创建、存储、使用、共享、归档和销毁等阶段,每个阶段有不同的管理要求。
  2488. - 明确各阶段的数据特征与管理重点有助于确保数据质量和合规性。
  2489. 2. 具体应用:
  2490. - 确定处理阶段:根据数据处理任务确定数据处于生命周期的哪个阶段进行针对性处理。
  2491. - 遵循管理规范:按照各阶段的管理要求,如存储安全规范,在处理中保障数据。
  2492. - 规划流程:基于数据生命周期各阶段顺序规划合理的数据处理流程。
  2493. ### ETL(Extract,Transform,Load)理论
  2494. 1. 基本原理:
  2495. - ETL是数据仓库中的一种数据处理过程,包括抽取、转换和加载三个主要步骤。
  2496. - 用于将不同来源的数据整合到数据仓库中,保证数据的一致性和准确性。
  2497. 2. 具体应用:
  2498. - 数据抽取:从多组文本数据中提取所需的字段和内容。
  2499. - 数据转换:对抽取的数据按照标准进行格式转换、清洗等操作。
  2500. - 数据加载:将处理好的数据加载到合适的存储或输出结构中。
  2501. ### 数据质量评估理论
  2502. 1. 基本原理:
  2503. - 从准确性、完整性、一致性等多方面评估数据质量,以确保数据可靠。
  2504. - 不同的数据用途有不同的质量要求,需建立相应评估指标。
  2505. 2. 具体应用:
  2506. - 质量指标确定:根据处理标准确定数据质量评估指标。
  2507. - 数据检查:按照指标对处理过程中的数据进行检查。
  2508. - 结果验证:依据评估结果验证最终输出的数据是否符合要求。
  2509. ##响应
  2510. 严格按照用户的需求进行输出,不要输出多余的内容
  2511. ## 要求
  2512. - 以清晰的逻辑构建处理流程,步骤分明。
  2513. - 对数据内容进行全面分析,不遗漏任何关键信息。
  2514. - 根据评价标准严格进行评价操作,保证结果的公正性。
  2515. - 处理结果输出简洁明了,仅包含符合要求的内容。
  2516. - 考虑到可能存在的多种数据结构,保持处理方法的通用性。
  2517. - 针对数据处理过程中的特殊情况提供应对措施。
  2518. - 以专业的态度对待数据,确保数据的安全性与完整性。
  2519. - 输出格式[{id:数据id,sco:评分}]。
  2520. - 不输出分析过程,直接输出最后计算结果。
  2521. ## 限制
  2522. - 不应包含未经定义的数据处理术语,以免造成混淆。
  2523. - 避免输出与数据处理标准无关的内容。
  2524. - 不应包含模糊不清的处理步骤或操作。
  2525. - 避免提及无法获取的外部工具或资源,除非有替代方案。
  2526. - 不应包含未经证实的数据处理假设。
  2527. - 不要回复你不知道的内容
  2528. - 不要直接回复<demo>的内容
  2529. - 所输出的内容必须按照给定的格式进行组织,不能偏离框架要求。
  2530. - 请使用准确可靠的信息来源,确保规划的可行性和实用性。
  2531. - 如果查询信息不是真实信息,如 xxx 等占位字符,不要采纳或使用。
  2532. - 不要给用户提供任何虚假信息!不要给用户提供任何虚假信息!不要给用户提供任何虚假信息`;
  2533. // console.log('messages',messages);
  2534. let params = {
  2535. assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
  2536. message: [
  2537. {
  2538. type: "text",
  2539. text: messages.replaceAll("\n", " ").replaceAll("*", "")
  2540. }
  2541. ],
  2542. session_name: uuidv4(),
  2543. userId: this.userid,
  2544. file_ids: '',
  2545. model: "gpt-4o-2024-11-20"
  2546. };
  2547. this.ajax
  2548. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
  2549. .then(response => {
  2550. let data = response.data.FunctionResponse;
  2551. // console.log("data", data.message);
  2552. // console.log('kkkk',JSON.parse(data.message));
  2553. this.scoList = JSON.parse(data.message)
  2554. this.aiscoLoading = false
  2555. this.uploadSCo()
  2556. })
  2557. .catch(error => {
  2558. this.aiscoLoading = false
  2559. this.$message.error('评分失败')
  2560. reject(error)
  2561. console.log(error);
  2562. });
  2563. },
  2564. // 点击开始自动评分(未评分得数据进行评分)
  2565. async markScoAuto(){
  2566. let scoid = this.scoList.map(e=> e.id);
  2567. console.log('scoid',scoid);
  2568. let TabArr = this.tableWorksArray.filter(e=> scoid.indexOf(e.id) == -1)
  2569. console.log('this.TabArr',TabArr);
  2570. if (!TabArr.length) return this.$message.error('已全部评分')
  2571. if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
  2572. if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
  2573. if (this.cueWord.fieldList.length == 0) return this.$message.error('请选择引用字段')
  2574. this.aiscoLoading = true
  2575. let forAllList = [];
  2576. this.scoList = []
  2577. // 进行整理数据,将用户回答都存在一个数组里
  2578. for (let kin = 0; kin < TabArr.length; kin++) {
  2579. let userWork = []
  2580. let _fileid = []
  2581. let kpl = TabArr[kin].array
  2582. // console.log('kpl',this.TabArr[kin]);
  2583. for (let index = 0; index < kpl.length; index++) {
  2584. if (kpl[index].type == 3 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2585. userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)
  2586. }
  2587. if (kpl[index].type == 5 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2588. if (kpl[index].json.file && kpl[index].json.file[0].url) {
  2589. _fileid.push(kpl[index].json.file[0].url)
  2590. }
  2591. userWork.push(kpl[index].json.title+':' + _fileid.join('、'))
  2592. }
  2593. if (kpl[index].type == 7 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2594. userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
  2595. }
  2596. if (kpl[index].type == 1 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2597. let kk = []
  2598. kpl[index].json.answer2.forEach((e)=>{
  2599. kk.push(kpl[index].json.array[e].option)
  2600. })
  2601. userWork.push(kpl[index].json.title+':' +kk.join(','))
  2602. }
  2603. }
  2604. let info = [
  2605. this.cueWord.fieldList.includes('序号') ? '序号' + (kin + 1) : '',
  2606. this.cueWord.fieldList.includes('提交人') ? '提交人:' + TabArr[kin].name : '',
  2607. this.cueWord.fieldList.includes('学段') ? '学段:' + this.getTType(this.teaType[0].id, TabArr[kin].cclassid) : '',
  2608. this.cueWord.fieldList.includes('年级') ? '年级:' + this.getTType(this.teaType[1].id, TabArr[kin].cclassid) : '',
  2609. this.cueWord.fieldList.includes('学科') ? '学科:' + this.getTType(this.teaType[2].id, TabArr[kin].cclassid) : '',
  2610. this.cueWord.fieldList.includes('职务') ? '职务:' + this.getTType(this.teaType[3].id, TabArr[kin].cclassid) : '',
  2611. this.cueWord.fieldList.includes('教龄') ? '教龄:' + this.getTType(this.teaType[4].id, TabArr[kin].cclassid) : '',
  2612. this.cueWord.fieldList.includes('提交时间') ? '提交时间:' + TabArr[kin].time : '',
  2613. userWork.filter(Boolean).join('\n')
  2614. ].filter(Boolean).join('\n');
  2615. forAllList.push({id:TabArr[kin].id,data:info})
  2616. // console.log('info',info);
  2617. }
  2618. // console.log('forAllList',forAllList);
  2619. let messages = `
  2620. NOTICE
  2621. Role: 你是一个高级数据处理师。
  2622. - 深入理解各种数据处理标准,确保处理流程的准确性。
  2623. - 熟练掌握数据结构知识,能快速解析“字段名称:具体内容”结构的文本。
  2624. - 具备强大的逻辑分析能力,以便制定合理的数据处理流程。
  2625. - 有丰富的数据处理经验,能应对多种类型的数据操作。
  2626. - 拥有精准的数据分析能力,准确得出处理结果。
  2627. - 擅长根据不同评价标准进行数据评价,保证结果符合要求。
  2628. - 能够高效地处理大量数据,保证工作的时效性。
  2629. Language: ${this.getLang()}
  2630. ## 上下文
  2631. 在数据处理任务缺乏合适工具或人力时,如数据分析项目、数据审核任务场景下,存在多组特定结构的文本数据,需数据处理大师理解标准和内容,制定流程并处理数据,按要求输出结果。
  2632. ## 数据处理标准
  2633. ${this.cueWord.openCeCon}
  2634. ## 数据内容
  2635. ${JSON.stringify(forAllList)}
  2636. ## 任务
  2637. 1. 数据标准理解:详细了解{数据处理标准}(如准确性、完整性、一致性等要求)
  2638. 2. 数据内容理解: 阅读并理解{数据内容}包括多组“字段名称:具体内容”结构的文本数据。
  2639. 3. 处理流程制定:根据所理解的{数据处理标准},制定详细的数据处理流程,包括数据分析(如统计分析、关联分析等)、数据评价(根据标准打分或分类等)等步骤。
  2640. 4. 数据处理操作:按照制定的流程对数据进行分析、处理和评价等操作。
  2641. 5. 结果输出:仅输出按照用户要求处理后的结果,确保结果清晰、准确且易于理解。
  2642. ### 理论框架
  2643. ### 数据生命周期管理理论
  2644. 1. 基本原理:
  2645. - 数据生命周期涵盖数据的创建、存储、使用、共享、归档和销毁等阶段,每个阶段有不同的管理要求。
  2646. - 明确各阶段的数据特征与管理重点有助于确保数据质量和合规性。
  2647. 2. 具体应用:
  2648. - 确定处理阶段:根据数据处理任务确定数据处于生命周期的哪个阶段进行针对性处理。
  2649. - 遵循管理规范:按照各阶段的管理要求,如存储安全规范,在处理中保障数据。
  2650. - 规划流程:基于数据生命周期各阶段顺序规划合理的数据处理流程。
  2651. ### ETL(Extract,Transform,Load)理论
  2652. 1. 基本原理:
  2653. - ETL是数据仓库中的一种数据处理过程,包括抽取、转换和加载三个主要步骤。
  2654. - 用于将不同来源的数据整合到数据仓库中,保证数据的一致性和准确性。
  2655. 2. 具体应用:
  2656. - 数据抽取:从多组文本数据中提取所需的字段和内容。
  2657. - 数据转换:对抽取的数据按照标准进行格式转换、清洗等操作。
  2658. - 数据加载:将处理好的数据加载到合适的存储或输出结构中。
  2659. ### 数据质量评估理论
  2660. 1. 基本原理:
  2661. - 从准确性、完整性、一致性等多方面评估数据质量,以确保数据可靠。
  2662. - 不同的数据用途有不同的质量要求,需建立相应评估指标。
  2663. 2. 具体应用:
  2664. - 质量指标确定:根据处理标准确定数据质量评估指标。
  2665. - 数据检查:按照指标对处理过程中的数据进行检查。
  2666. - 结果验证:依据评估结果验证最终输出的数据是否符合要求。
  2667. ##响应
  2668. 严格按照用户的需求进行输出,不要输出多余的内容
  2669. ## 要求
  2670. - 以清晰的逻辑构建处理流程,步骤分明。
  2671. - 对数据内容进行全面分析,不遗漏任何关键信息。
  2672. - 根据评价标准严格进行评价操作,保证结果的公正性。
  2673. - 处理结果输出简洁明了,仅包含符合要求的内容。
  2674. - 考虑到可能存在的多种数据结构,保持处理方法的通用性。
  2675. - 针对数据处理过程中的特殊情况提供应对措施。
  2676. - 以专业的态度对待数据,确保数据的安全性与完整性。
  2677. - 输出格式[{id:数据id,sco:评分}]。
  2678. - 不输出分析过程,直接输出最后计算结果。
  2679. ## 限制
  2680. - 不应包含未经定义的数据处理术语,以免造成混淆。
  2681. - 避免输出与数据处理标准无关的内容。
  2682. - 不应包含模糊不清的处理步骤或操作。
  2683. - 避免提及无法获取的外部工具或资源,除非有替代方案。
  2684. - 不应包含未经证实的数据处理假设。
  2685. - 不要回复你不知道的内容
  2686. - 不要直接回复<demo>的内容
  2687. - 所输出的内容必须按照给定的格式进行组织,不能偏离框架要求。
  2688. - 请使用准确可靠的信息来源,确保规划的可行性和实用性。
  2689. - 如果查询信息不是真实信息,如 xxx 等占位字符,不要采纳或使用。
  2690. - 不要给用户提供任何虚假信息!不要给用户提供任何虚假信息!不要给用户提供任何虚假信息`;
  2691. // console.log('messages',messages);
  2692. let params = {
  2693. assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
  2694. message: [
  2695. {
  2696. type: "text",
  2697. text: messages.replaceAll("\n", " ").replaceAll("*", "")
  2698. }
  2699. ],
  2700. session_name: uuidv4(),
  2701. userId: this.userid,
  2702. file_ids: '',
  2703. model: "gpt-4o-2024-11-20"
  2704. };
  2705. this.ajax
  2706. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
  2707. .then(response => {
  2708. let data = response.data.FunctionResponse;
  2709. this.scoList = JSON.parse(data.message)
  2710. this.aiscoLoading = false
  2711. this.uploadSCo(1)
  2712. })
  2713. .catch(error => {
  2714. this.aiscoLoading = false
  2715. this.$message.error('评分失败')
  2716. reject(error)
  2717. console.log(error);
  2718. });
  2719. },
  2720. // 获取评分
  2721. async getAiSco(){
  2722. return new Promise((resolve, reject) => {
  2723. this.aiscoLoading = true
  2724. let params = {
  2725. tid: this.cid,
  2726. };
  2727. this.ajax
  2728. .get(this.$store.state.api + "getTestAiSco", params)
  2729. .then((res) => {
  2730. if (res.data[0].length) {
  2731. this.aiscoId = res.data[0][0].id
  2732. this.cueWord = JSON.parse(res.data[0][0].cueWord)
  2733. this.cueWordCopy = JSON.parse(res.data[0][0].cueWord)
  2734. this.scoList = JSON.parse(res.data[0][0].json)
  2735. this.scoListCopy = JSON.parse(res.data[0][0].json)
  2736. }else{
  2737. this.cueWord={
  2738. openCeCon:'', //指令
  2739. openCeTit:'', //标题
  2740. fieldList:[]
  2741. }
  2742. this.cueWordCopy={
  2743. openCeCon:'', //指令
  2744. openCeTit:'', //标题
  2745. fieldList:[]
  2746. }
  2747. this.scoList=[]
  2748. this.scoListCopy=[]
  2749. }
  2750. this.aiscoLoading = false
  2751. // console.log('8888888888',res.data[0]);
  2752. resolve(1)
  2753. })
  2754. .catch((err) => {
  2755. reject(err)
  2756. this.aiscoLoading = false
  2757. console.error(err);
  2758. });
  2759. })
  2760. },
  2761. // 上传评分
  2762. uploadSCo(val){
  2763. this.aiscoLoading = true
  2764. // val有数据就是自动评分把将新老数据结合在一起
  2765. let scoArr = []
  2766. if (val) {
  2767. scoArr = [...this.scoList,...this.scoListCopy]
  2768. }else{
  2769. scoArr = this.scoList
  2770. }
  2771. let params = [{
  2772. tid:this.cid,
  2773. uid:this.userid,
  2774. json:JSON.stringify(scoArr),
  2775. cw: JSON.stringify(this.cueWord)
  2776. }]
  2777. // console.log('params',params);
  2778. this.ajax
  2779. .post(this.$store.state.api + "addtestAiSco", params)
  2780. .then((res) => {
  2781. // console.log(res);
  2782. this.$message({
  2783. message: "评价成功",
  2784. type: "success"
  2785. });
  2786. this.getAiSco()
  2787. })
  2788. .catch((err) => {
  2789. this.aiscoLoading = false
  2790. this.$message({
  2791. message: "评价失败",
  2792. type: "error"
  2793. });
  2794. console.error(err);
  2795. });
  2796. },
  2797. // 获取文档id
  2798. createFileid(url) {
  2799. let _this = this;
  2800. return new Promise((resolve, reject) => {
  2801. try {
  2802. _this.ajax
  2803. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  2804. url: url
  2805. })
  2806. .then(res => {
  2807. let _data = res.data.FunctionResponse;
  2808. if (_data.result && _data.result.id) {
  2809. resolve(_data.result.id);
  2810. } else {
  2811. resolve(1);
  2812. }
  2813. })
  2814. .catch(function(error) {
  2815. resolve(1);
  2816. });
  2817. } catch (e) {
  2818. resolve(1);
  2819. }
  2820. });
  2821. },
  2822. getLang() {
  2823. let lang = "";
  2824. if (this.languageSetting == 0) {
  2825. lang = "Chinese.";
  2826. } else if (this.languageSetting == 1) {
  2827. lang = "Traditional Chinese.";
  2828. } else if (this.languageSetting == 2) {
  2829. lang = "English.";
  2830. }
  2831. return lang;
  2832. },
  2833. // 打开引用字段弹框
  2834. quoteShow(){
  2835. this.quoteV = !this.quoteV
  2836. },
  2837. // 添加指令字段
  2838. addfield(val){
  2839. if (this.cueWord.fieldList.indexOf(val) != -1) {
  2840. const index = this.cueWord.fieldList.indexOf(val)
  2841. this.cueWord.fieldList.splice(index, 1)
  2842. }else{
  2843. this.cueWord.fieldList.push(val)
  2844. }
  2845. },
  2846. openChat() {
  2847. this.aiChatV = !this.aiChatV;
  2848. this.$nextTick(() => {
  2849. const boxStickyHeight = this.$refs.boxSticky
  2850. ? this.$refs.boxSticky.offsetHeight
  2851. : 0;
  2852. const chatHeight = `calc(100% - ${boxStickyHeight}px - 46px)`;
  2853. // this.$refs.aiChat.$el.style.height = chatHeight;
  2854. this.$refs.aiBoxRightDivRef.style.height = chatHeight;
  2855. });
  2856. },
  2857. fileClose(done) {
  2858. done();
  2859. },
  2860. //获取教研室列表
  2861. getClass2() {
  2862. let params = {
  2863. oid: this.oid,
  2864. };
  2865. this.ajax
  2866. .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
  2867. .then((res) => {
  2868. console.log("this.TeachingOptions", this.TeachingOptions);
  2869. console.log(res.data);
  2870. let data = res.data[0];
  2871. this.TeachingOptions.forEach((e) => {
  2872. data.forEach((i) => {
  2873. if (e.id == i.id) {
  2874. e.name = i.name;
  2875. }
  2876. });
  2877. });
  2878. })
  2879. .catch((err) => {
  2880. this.isLoading = false;
  2881. console.error(err);
  2882. });
  2883. },
  2884. getClass3() {
  2885. let params = {
  2886. oid: this.oid,
  2887. };
  2888. this.ajax
  2889. .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
  2890. .then((res) => {
  2891. console.log(res.data);
  2892. this.TeachingOptions = res.data[0].filter((item) => {
  2893. return item.parentid == "6";
  2894. });
  2895. // console.log('this.TeachingOptions',this.TeachingOptions);
  2896. })
  2897. .catch((err) => {
  2898. this.isLoading = false;
  2899. console.error(err);
  2900. });
  2901. },
  2902. filterName(value, row, index) {
  2903. let name = [];
  2904. for (var i = 0; i < row.array[index].json.answer2.length; i++) {
  2905. name.push(
  2906. row.array[index].json.array[row.array[index].json.answer2[i]].option
  2907. );
  2908. }
  2909. console.log(name.indexOf(value) != -1);
  2910. return name.indexOf(value) != -1;
  2911. },
  2912. // 筛选课程
  2913. filterCourse(value, row, index) {
  2914. return row.array[index].json.answer2.indexOf(value) != -1;
  2915. },
  2916. //筛选日期
  2917. filterTime(value, row, index) {
  2918. return row.array[index].json.answer2.indexOf(value) != -1;
  2919. },
  2920. filterTType(value, row, index) {
  2921. return row.cclassid && row.cclassid.indexOf(value) != -1;
  2922. },
  2923. wordClickHandler(name, value) {
  2924. // this.$notify({
  2925. // title: name,
  2926. // message: "数量:"+value
  2927. // });
  2928. },
  2929. retrunCourse() {
  2930. if(!this.back){
  2931. this.goTo(
  2932. "/test?userid=" +
  2933. this.userid +
  2934. "&oid=" +
  2935. this.oid +
  2936. "&org=" +
  2937. this.org +
  2938. "&role=" +
  2939. this.role
  2940. );
  2941. }else if(this.back=="sass"){
  2942. this.goTo(
  2943. "/sassPlatform?userid=" +
  2944. this.userid +
  2945. "&oid=" +
  2946. this.oid +
  2947. "&org=" +
  2948. this.org +
  2949. "&role=" +
  2950. this.role
  2951. );
  2952. }
  2953. },
  2954. goTo(path) {
  2955. this.$router.push(path);
  2956. },
  2957. tableRowClassName({ row, rowIndex }) {
  2958. if ((rowIndex + 1) % 2 === 0) {
  2959. return "even_row";
  2960. } else {
  2961. return "";
  2962. }
  2963. },
  2964. changeHeight() {
  2965. if (this.stype == 1) {
  2966. return;
  2967. }
  2968. this.tableHeight = this.$refs.stepBox.offsetHeight - 120;
  2969. if (this.tableHeight <= 530) {
  2970. this.tableHeight = 530;
  2971. }
  2972. // 监听窗口大小变化
  2973. let self = this;
  2974. window.onresize = function () {
  2975. if (self.stype == 1) {
  2976. return;
  2977. }
  2978. self.tableHeight = this.$refs.stepBox.offsetHeight - 120;
  2979. if (self.tableHeight <= 530) {
  2980. self.tableHeight = 530;
  2981. }
  2982. };
  2983. // this.$refs.table.$el.offsetTop:表格距离浏览器的高度 //200表示你想要调整的表格距离底部的高度(你可以自己随意调整),因为我们一般都有放分页组件的,所以需要给它留一个高度
  2984. },
  2985. handleCurrentChange(val) {
  2986. this.page = val;
  2987. this.getData2();
  2988. },
  2989. getTest(row) {
  2990. this.$router.push(
  2991. "/checkTest2?cid=" +
  2992. row.courseid +
  2993. "&userid=" +
  2994. this.userid +
  2995. "&userid2=" +
  2996. row.userid +
  2997. "&tid=" +
  2998. row.id +
  2999. "&oid=" +
  3000. this.oid +
  3001. "&org=" +
  3002. this.org +
  3003. "&type=2" +
  3004. "&role=" +
  3005. this.role
  3006. );
  3007. },
  3008. editTest(row){
  3009. this.$router.push(
  3010. "/doTest?cid=" +
  3011. row.courseid +
  3012. "&userid=" +
  3013. this.userid +
  3014. "&userid2=" +
  3015. row.userid +
  3016. "&tid=" +
  3017. row.id +
  3018. "&oid=" +
  3019. this.oid +
  3020. "&org=" +
  3021. this.org +
  3022. "&type=3" +
  3023. "&role=" +
  3024. this.role +
  3025. "&back=1"
  3026. );
  3027. // doTest?cid=721eadc1-087c-11f0-b508-005056924926&tid=66db0a89-0a11-11f0-9261-005056924926&userid=6c56ec0e-2c74-11ef-bee5-005056b86db5&oid=414f2361-ad04-11ed-b13d-005056b86db5&org=0fec3a8a-ad04-11ed-b13d-005056b86db5&type=3&role=0
  3028. console.log("编辑",row)
  3029. },
  3030. checkDataType(type) {
  3031. this.TeachingValue = "";
  3032. if (this.stype != type) {
  3033. this.stype = type;
  3034. this.courseName = "";
  3035. if (type == 3) {
  3036. this.getData2();
  3037. } else {
  3038. this.getData();
  3039. }
  3040. this.changeHeight();
  3041. }
  3042. },
  3043. searchCourse() {
  3044. if (this.stype == 3) {
  3045. this.getData2();
  3046. } else {
  3047. this.getData();
  3048. }
  3049. },
  3050. async getData() {
  3051. this.isLoading = true;
  3052. await this.getAiSco()
  3053. let params = [
  3054. {
  3055. cid: this.cid,
  3056. cn: this.courseName,
  3057. tim: !this.SubmitTime ? "" : this.SubmitTime,
  3058. tea: this.TeachingValue,
  3059. },
  3060. ];
  3061. this.ajax
  3062. .post(this.$store.state.api + "getTestWorksNoPageCopy2", params)
  3063. .then(async (res) => {
  3064. this.testJson = res.data[0][0];
  3065. console.log(
  3066. "this.testJson",
  3067. JSON.parse(JSON.stringify(this.testJson))
  3068. );
  3069. let a = "";
  3070. if (this.testJson.juriP) {
  3071. a = this.testJson.juriP;
  3072. }
  3073. if (this.testJson.juriP2) {
  3074. if (a) {
  3075. a = this.testJson.juriP + "," + this.testJson.juriP2;
  3076. } else {
  3077. a = this.testJson.juriP2;
  3078. }
  3079. }
  3080. this.testJson.juriP = a;
  3081. if (this.testJson.juriP) {
  3082. let ajuri2 = this.testJson.juri2.split(",");
  3083. this.TeachingOptions = ajuri2.map((key, index) => ({
  3084. id: key,
  3085. name: "",
  3086. }));
  3087. this.getClass2();
  3088. } else {
  3089. this.getClass3();
  3090. }
  3091. // console.log('dddd',this.TeachingOptions);
  3092. let _worksData = res.data[1];
  3093. // if(this.timeLimit){
  3094. // console.log("timeLimit", this.timeLimit)
  3095. // // 2024-12-31T16:00:00.000Z,2025-12-31T16:00:00.000Z
  3096. // // 根据 timeLimit 筛选 _worksData
  3097. // let [startStr, endStr] = this.timeLimit.split(',');
  3098. // let startDate = startStr ? new Date(startStr) : null;
  3099. // let endDate = endStr ? new Date(endStr) : null;
  3100. // _worksData = _worksData.filter(i => {
  3101. // if (!i.time) return false;
  3102. // // i.time 例子:2025年02月25日 10:17:46
  3103. // let match = i.time.match(/^(\d{4})年(\d{2})月(\d{2})日/);
  3104. // if (!match) return false;
  3105. // let year = parseInt(match[1]);
  3106. // let month = parseInt(match[2]);
  3107. // let day = parseInt(match[3]);
  3108. // // 构造当前数据的日期对象
  3109. // let curDate = new Date(year, month - 1, day, 0, 0, 0);
  3110. // // 判断是否在区间内(包含等于)
  3111. // if (startDate && endDate) {
  3112. // return curDate >= startDate && curDate <= endDate;
  3113. // } else if (startDate) {
  3114. // return curDate >= startDate;
  3115. // } else if (endDate) {
  3116. // return curDate <= endDate;
  3117. // }
  3118. // return true;
  3119. // });
  3120. // }
  3121. // if(this.timeLimit){
  3122. // if(_worksData[0]){
  3123. // let _data = JSON.parse(_worksData[0].courseJson)
  3124. // let _flag = false;
  3125. // _data.forEach((item,index)=>{
  3126. // if(item.type == 8 && item.json.title == "获奖时间"){
  3127. // _flag = true
  3128. // let time = this.timeLimit.split(",");
  3129. // this.tableDatePicker[index] = [new Date(time[0]),new Date(time[1])]
  3130. // }
  3131. // })
  3132. // if(!_flag){
  3133. // let time = this.timeLimit.split(",");
  3134. // this.submissionTimePicker = [new Date(time[0]),new Date(time[1])];
  3135. // }
  3136. // this.tableDataPickerChange();
  3137. // this.submissionTimePickerChange()
  3138. // }
  3139. // }
  3140. this.works = _worksData;
  3141. this.iscount = res.data[2][0].count;
  3142. this.pcount = res.data[3][0].count;
  3143. let chapters = this.setJSON(
  3144. this.setJson2(
  3145. JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))
  3146. )
  3147. );
  3148. this.chapters = this.setFilter(
  3149. this.JSONSetting(
  3150. JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))
  3151. )
  3152. );
  3153. let courseCount11 = [];
  3154. let testArray = [];
  3155. let array = [];
  3156. let courseIds = []; // 初始化一个空数组来存储所有的courseId
  3157. for (let i = 0; i < this.works.length; i++) {
  3158. let cJson = this.setJSON(
  3159. JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
  3160. );
  3161. if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
  3162. let _json = this.JSONSetting(
  3163. JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
  3164. );
  3165. for (var ja = 0; ja < _json.length; ja++) {
  3166. let _json2 = _json[ja].json;
  3167. if (_json[ja].type == 6) {
  3168. let courseId = _json2.answer2;
  3169. courseIds.push(courseId); // 将type为6的courseId添加到数组中
  3170. }
  3171. if (_json[ja].type == 11) {
  3172. let _answer = _json2.answer2;
  3173. _answer.length
  3174. ? (courseCount11 = courseCount11.concat(_answer))
  3175. : "";
  3176. _json[ja].json.courseId = _answer ? _answer : [];
  3177. courseIds = courseIds.concat(_answer); // 将type为11的courseId添加到数组中
  3178. }
  3179. }
  3180. }
  3181. }
  3182. // 将所有的courseId去重
  3183. courseIds = Array.from(new Set(courseIds));
  3184. // 使用一个数组来存储所有的courseId后,执行getCourseInfoTestAll
  3185. let courseTitles = {}; // 初始化一个空对象来存储所有的courseTitles
  3186. let params2 = [
  3187. {
  3188. cid: courseIds.join(","),
  3189. },
  3190. ];
  3191. let data2 = await this.ajax.post(
  3192. this.$store.state.api + "getCourseInfoTestAll2",
  3193. params2
  3194. );
  3195. let result2 = data2.data[0];
  3196. result2.forEach((i) => {
  3197. // _title.push(i.title);
  3198. courseTitles[i.courseId] = i.title;
  3199. });
  3200. for (let i = 0; i < this.works.length; i++) {
  3201. let cJson = this.setJSON(
  3202. JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
  3203. );
  3204. console.log(cJson,'===',chapters)
  3205. // if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
  3206. let _json = this.JSONSetting(
  3207. JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
  3208. );
  3209. let _json2 = this.JSONSetting(
  3210. JSON.parse(JSON.stringify(JSON.parse(JSON.stringify(chapters))))
  3211. );
  3212. // console.log("json2",_json2)
  3213. // _json.forEach((item) => {
  3214. // console.log('_jsonItem',item)
  3215. // if(){
  3216. // }
  3217. // if (item.type == 11) {
  3218. // let cid = item.json.answer2;
  3219. // let _title = [];
  3220. // for (var i = 0; i < cid.length; i++) {
  3221. // _title.push(courseTitles[cid[i]]);
  3222. // }
  3223. // item.json.answer2 = _title.length ? _title.join(",") : "";
  3224. // }
  3225. // if (item.type == 6) {
  3226. // let courseId = item.json.answer2;
  3227. // item.json.answer2 = courseTitles[courseId] || "";
  3228. // }
  3229. // });
  3230. _json2.forEach(item=>{
  3231. let _index = _json.findIndex(i=>(i.type==item.type && i.ttype==item.ttype && i.json.title==item.json.title))
  3232. if(_index!=-1){
  3233. item.json = _json[_index].json;
  3234. if (item.type == 11) {
  3235. let cid = item.json.answer2;
  3236. let _title = [];
  3237. for (var i = 0; i < cid.length; i++) {
  3238. _title.push(courseTitles[cid[i]]);
  3239. }
  3240. item.json.answer2 = _title.length ? _title.join(",") : "";
  3241. }
  3242. if (item.type == 6) {
  3243. let courseId = item.json.answer2;
  3244. item.json.answer2 = courseTitles[courseId] || "";
  3245. }
  3246. }
  3247. })
  3248. if(JSON.stringify(_json2)==JSON.stringify(this.JSONSetting(JSON.parse(JSON.stringify(chapters)))))continue
  3249. // 更新对应的_json对象的answer2
  3250. array.push({
  3251. courseid: this.works[i].courseid,
  3252. cclassid: this.works[i].cclassid,
  3253. id: this.works[i].id,
  3254. userid: this.works[i].userid,
  3255. name: this.works[i].username ? this.works[i].username : "匿名",
  3256. time: this.works[i].time,
  3257. array: _json2,
  3258. isReview:this.works[i].isReview,
  3259. cut: 0,
  3260. uteaName: this.works[i].uteaName,
  3261. courseJson: JSON.parse(this.works[i].courseJson),
  3262. type:this.works[i].type
  3263. });
  3264. // }
  3265. }
  3266. let allCourseIds = [];
  3267. for (var i = 0; i < this.chapters.length; i++) {
  3268. let el = this.chapters[i];
  3269. let topic = {
  3270. type: el.type,
  3271. cut: 0,
  3272. title: el.json ? el.json.title : "",
  3273. detail: el.json ? el.json.detail : "",
  3274. atype: el.json ? el.json.type : "",
  3275. choice: el.json ? el.json.array : "",
  3276. array: [],
  3277. answer: el.json ? el.json.answer : "",
  3278. answer2: "",
  3279. count: 0,
  3280. courses: el.json ? el.json.courses : [],
  3281. small: el.json ? el.json.small : "",
  3282. big: el.json ? el.json.big : "",
  3283. };
  3284. if (topic.type == 1) {
  3285. for (var t = 0; t < topic.choice.length; t++) {
  3286. topic.array.push({
  3287. name: topic.choice[t].option,
  3288. count: 0,
  3289. });
  3290. }
  3291. } else if (topic.type == 3) {
  3292. } else if (topic.type == 5) {
  3293. } else if (topic.type == 6) {
  3294. let _answer = topic.array;
  3295. allCourseIds = allCourseIds.concat(_answer);
  3296. } else if (topic.type == 7) {
  3297. for (
  3298. var t = parseInt(topic.small);
  3299. t <= parseInt(topic.big);
  3300. t++
  3301. ) {
  3302. topic.array.push({
  3303. name: t,
  3304. count: 0,
  3305. });
  3306. }
  3307. } else if (topic.type == 11) {
  3308. const uniqueArray = courseCount11.filter(
  3309. (item, index) => courseCount11.indexOf(item) === index
  3310. );
  3311. let _answer = uniqueArray;
  3312. allCourseIds = allCourseIds.concat(_answer);
  3313. }
  3314. for (var j = 0; j < array.length; j++) {
  3315. let el2 = array[j];
  3316. console.log("==>",el2)
  3317. if (topic.type == 1) {
  3318. let _answer = el2.array[i].json.answer2;
  3319. if(!_answer)continue;
  3320. for (var k = 0; k < _answer.length; k++) {
  3321. topic.array[_answer[k]].count++;
  3322. topic.count++;
  3323. }
  3324. } else if (topic.type == 3 || topic.type == 8) {
  3325. let type3 = 1;
  3326. let _answer = el2.array[i].json.answer2;
  3327. if (_answer) {
  3328. for (var k = 0; k < topic.array.length; k++) {
  3329. if (topic.array[k].name == _answer) {
  3330. topic.array[k].count++;
  3331. type3 = 2;
  3332. topic.count++;
  3333. break;
  3334. }
  3335. }
  3336. if (type3 == 1) {
  3337. topic.array.push({
  3338. name: _answer,
  3339. count: 1,
  3340. });
  3341. }
  3342. let limit = 10;
  3343. if(topic.array.length>limit){
  3344. topic.showArray = topic.array.slice(0,limit)
  3345. topic.nowPage = 1;
  3346. topic.total = topic.array.length;
  3347. topic.limit = limit;
  3348. }else{
  3349. topic.showArray = topic.array;
  3350. }
  3351. topic.loadingWordCloud = false;
  3352. topic.wordCloutData = null;
  3353. }
  3354. } else if (topic.type == 5) {
  3355. let _answer = el2.array[i].json.file
  3356. ? el2.array[i].json.file
  3357. : [];
  3358. let _user = { userid: el2.userid, username: el2.name };
  3359. for (var k = 0; k < _answer.length; k++) {
  3360. topic.array.push({ ..._answer[k], ..._user });
  3361. }
  3362. } else if (topic.type == 7) {
  3363. if (el2.array[i].json.answer2) {
  3364. let _answer = el2.array[i].json.answer2;
  3365. topic.array[_answer].count++;
  3366. topic.count++;
  3367. }
  3368. } else if (topic.type == 6) {
  3369. if (el2.array[i].json.courses) {
  3370. let _answer = el2.array[i].json.courses.length
  3371. ? el2.array[i].json.courses.join(",")
  3372. : "";
  3373. topic.answer2 = _answer;
  3374. }
  3375. } else if (topic.type == 11) {
  3376. const uniqueArray = courseCount11.filter(
  3377. (item, index) => courseCount11.indexOf(item) === index
  3378. );
  3379. let _answer = uniqueArray;
  3380. topic.answer2 = _answer;
  3381. }else if(topic.type == 13){
  3382. if (el2.array[i].json.answer2!=='') {
  3383. let _answer = String(el2.array[i].json.answer2);
  3384. let _type = el2.array[i].json.type;
  3385. console.log("👉",el2.array[i].json)
  3386. if(_type=='4')_answer+='%';
  3387. if(!topic.array)topic.array=[];
  3388. if(topic.array.findIndex(i=>i.name==_answer)!=-1){
  3389. topic.array.find(i=>i.name==_answer).count++;
  3390. }else{
  3391. topic.array.push({
  3392. name:_answer,
  3393. count:1
  3394. })
  3395. }
  3396. topic.count++;
  3397. }
  3398. }else if(topic.type==14){
  3399. console.log("===",el2)
  3400. }
  3401. }
  3402. console.log("topictopictopictopic", topic);
  3403. testArray.push(topic);
  3404. this.fileLoading.push({
  3405. bool: false,
  3406. count: 0,
  3407. load: 0,
  3408. progress: 0,
  3409. });
  3410. }
  3411. // 去重courseId
  3412. allCourseIds = Array.from(new Set(allCourseIds));
  3413. let params = [
  3414. {
  3415. cid: allCourseIds.join(","),
  3416. },
  3417. ];
  3418. let data = await this.ajax.post(
  3419. this.$store.state.api + "getCourseInfoTestAll2",
  3420. params
  3421. );
  3422. let result = data.data[0];
  3423. for (var i = 0; i < this.chapters.length; i++) {
  3424. let el = this.chapters[i];
  3425. let topic = testArray[i];
  3426. if (topic.type == 6 || topic.type == 11) {
  3427. result.forEach((i) => {
  3428. i.update_at = new Date(i.update_at)
  3429. .toLocaleString("zh-CN", {
  3430. year: "numeric",
  3431. month: "2-digit",
  3432. day: "2-digit",
  3433. hour: "2-digit",
  3434. minute: "2-digit",
  3435. second: "2-digit",
  3436. hour12: false,
  3437. })
  3438. .replace(/\//g, "-");
  3439. });
  3440. if (topic.type == 6) {
  3441. result.forEach((elc) => {
  3442. if (
  3443. this.chapters
  3444. .find((f) => f.type == 6)
  3445. .nameFilters.find((c) => c.value == elc.title) ==
  3446. undefined &&
  3447. topic.answer2.includes(elc.courseId)
  3448. ) {
  3449. this.chapters
  3450. .find((c) => c.type == 6)
  3451. .nameFilters.push({ text: elc.title, value: elc.title });
  3452. }
  3453. });
  3454. } else if (topic.type == 11) {
  3455. result.forEach((elc) => {
  3456. if (
  3457. this.chapters
  3458. .find((f, index) => index == i)
  3459. .nameFilters.find((c) => c.value == elc.title) ==
  3460. undefined &&
  3461. topic.answer2.includes(elc.courseId)
  3462. ) {
  3463. this.chapters
  3464. .find((c, index) => index == i)
  3465. .nameFilters.push({ text: elc.title, value: elc.title });
  3466. }
  3467. });
  3468. }
  3469. // this.chapters.find(i=>i.type==6 || i.type==11).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
  3470. if (topic.answer2.length) {
  3471. let _answer = topic.answer2;
  3472. topic.courseArray = result.filter((el) => {
  3473. return _answer.includes(el.courseId);
  3474. });
  3475. } else {
  3476. topic.courseArray = [];
  3477. }
  3478. // topic.courseArray = result
  3479. }
  3480. }
  3481. this.testArray = testArray;
  3482. this.worksArray = array;
  3483. this.tableWorksArray = array;
  3484. this.isLoading = false;
  3485. this.teaType = res.data[5];
  3486. let typeInfo = res.data[6];
  3487. this.teaType.forEach((e) => {
  3488. e.child = [];
  3489. e.value = [];
  3490. typeInfo.forEach((i) => {
  3491. if (e.id == i.parentid) {
  3492. e.child.push({ id: i.id, name: i.name });
  3493. }
  3494. });
  3495. });
  3496. console.log(this.teaType, "teaType");
  3497. if(this.timeLimit){
  3498. if(this.works[0]){
  3499. let _data = JSON.parse(this.works[0].courseJson)
  3500. let _flag = false;
  3501. _data.forEach((item,index)=>{
  3502. if(item.type == 8 && item.json.title == "获奖时间"){
  3503. _flag = true
  3504. let time = this.timeLimit.split(",");
  3505. this.tableDatePicker[index] = [new Date(time[0]),new Date(time[1])]
  3506. }
  3507. })
  3508. if(!_flag){
  3509. let time = this.timeLimit.split(",");
  3510. this.submissionTimePicker = [new Date(time[0]),new Date(time[1])];
  3511. this.submissionTimePickerChange()
  3512. }else{
  3513. this.tableDataPickerChange();
  3514. }
  3515. this.$forceUpdate();
  3516. }
  3517. }
  3518. })
  3519. .catch((err) => {
  3520. console.error(err);
  3521. });
  3522. },
  3523. getData2() {
  3524. this.isLoading = true;
  3525. let params = {
  3526. cid: this.cid,
  3527. page: this.page,
  3528. pageSize: this.pageSize,
  3529. cn: this.courseName,
  3530. };
  3531. this.ajax
  3532. .get(this.$store.state.api + "getTestWorksPage3", params)
  3533. .then((res) => {
  3534. this.isLoading = false;
  3535. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  3536. this.tableData = res.data[0];
  3537. })
  3538. .catch((err) => {
  3539. console.error(err);
  3540. });
  3541. },
  3542. setJSON(json) {
  3543. return json.filter((item) => {
  3544. if (item.array) {
  3545. item.array = item.array.filter((item2) => {
  3546. if (item2.ttype == 1 && item2.json) {
  3547. delete item2.json.answer2;
  3548. delete item2.json.score2;
  3549. delete item2.json.file;
  3550. delete item2.json.codeScanningTime;
  3551. delete item2.json.timeSort;
  3552. }
  3553. if (item2.array) {
  3554. item2.array = item2.array.filter((item3) => {
  3555. if (item3.ttype == 1 && item3.json) {
  3556. delete item3.json.answer2;
  3557. delete item3.json.score2;
  3558. delete item3.json.file;
  3559. delete item3.json.codeScanningTime;
  3560. delete item3.json.timeSort;
  3561. }
  3562. return item3;
  3563. });
  3564. }
  3565. return item2;
  3566. });
  3567. } else if (item.ttype == 1 && item.json) {
  3568. delete item.json.answer2;
  3569. delete item.json.score2;
  3570. delete item.json.file;
  3571. delete item.json.codeScanningTime;
  3572. delete item.json.timeSort;
  3573. }
  3574. return item;
  3575. console.log(item.array);
  3576. });
  3577. },
  3578. setJson2(json) {
  3579. let _json = json;
  3580. // this.type = _json[0].ttype;
  3581. let checkArray = _json.filter((item) => {
  3582. if (item.array) {
  3583. item.array = item.array.filter((item2) => {
  3584. if (item2.ttype == 1 && item2.json && !item2.json.answer2) {
  3585. item2.json.answer2 = [];
  3586. }
  3587. if (item2.array) {
  3588. item2.array = item2.array.filter((item3) => {
  3589. if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
  3590. item3.json.answer2 = [];
  3591. }
  3592. return item3;
  3593. });
  3594. }
  3595. return (
  3596. (item2.ttype != 1 && item2.array.length > 0) || item2.ttype == 1
  3597. );
  3598. });
  3599. }
  3600. if (item.ttype == 1 && item.json && !item.json.answer2) {
  3601. item.json.answer2 = [];
  3602. }
  3603. console.log(item.array);
  3604. return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
  3605. });
  3606. console.log(checkArray);
  3607. return checkArray;
  3608. },
  3609. JSONSetting(json) {
  3610. let _json = json;
  3611. let array = [];
  3612. _json.filter((item) => {
  3613. if (item.array) {
  3614. item.array = item.array.filter((item2) => {
  3615. if (item2.ttype == 1 && item2.json) {
  3616. array.push(item2);
  3617. }
  3618. if (item2.array) {
  3619. item2.array = item2.array.filter((item3) => {
  3620. if (item3.ttype == 1 && item3.json) {
  3621. array.push(item3);
  3622. }
  3623. return item3;
  3624. });
  3625. }
  3626. return item2;
  3627. });
  3628. }
  3629. if (item.ttype == 1 && item.json) {
  3630. array.push(item);
  3631. }
  3632. console.log(item.array);
  3633. return item;
  3634. });
  3635. console.log(array);
  3636. return array;
  3637. },
  3638. setFilter(json) {
  3639. let _json = json;
  3640. let array = [];
  3641. _json.filter((item) => {
  3642. (item.nameFilters = []),
  3643. (item.filterParams = {
  3644. name: [],
  3645. });
  3646. if (item.type == 1) {
  3647. for (var i = 0; i < item.json.array.length; i++) {
  3648. item.nameFilters.push({
  3649. text: item.json.array[i].option,
  3650. value: item.json.array[i].option,
  3651. });
  3652. }
  3653. }
  3654. array.push(item);
  3655. return item;
  3656. });
  3657. return array;
  3658. },
  3659. checkFile(item) {
  3660. if (item.type == 3) {
  3661. this.$hevueImgPreview(item.url);
  3662. } else if (item.type == 5) {
  3663. this.downloadFile(item);
  3664. } else if (item.type == 1) {
  3665. this.dialogVisibleOffice = true;
  3666. this.wurl = item.url;
  3667. } else if (item.type == 2) {
  3668. this.dialogVisibleVideo = true;
  3669. this.wurl = item.url;
  3670. } else if (item.type == 4) {
  3671. this.dialogVisiblePdf = true;
  3672. this.wurl = item.url;
  3673. }
  3674. },
  3675. downloadFile(f) {
  3676. var credentials = {
  3677. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  3678. secretAccessKey: "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",
  3679. }; //秘钥形式的登录上传
  3680. window.AWS.config.update(credentials);
  3681. window.AWS.config.region = "cn-northwest-1"; //设置区域
  3682. let url2 = f.url;
  3683. let _url2 = "";
  3684. if (
  3685. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  3686. ) {
  3687. _url2 = url2.split(
  3688. "https://view.officeapps.live.com/op/view.aspx?src="
  3689. )[1];
  3690. } else {
  3691. _url2 = url2;
  3692. }
  3693. let _this = this;
  3694. _this.downLoading = _url2;
  3695. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  3696. let name = decodeURIComponent(
  3697. _url2
  3698. .split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
  3699. .replace(/\+/g, " ")
  3700. );
  3701. var params = {
  3702. Bucket: "ccrb",
  3703. Key: name,
  3704. };
  3705. s3.getObject(params, function (err, data) {
  3706. _this.downLoading = "";
  3707. if (err) console.log(err, err.stack); // an error occurred
  3708. else {
  3709. let url = window.URL.createObjectURL(new Blob([data.Body]));
  3710. let a = document.createElement("a");
  3711. a.name = f.name;
  3712. a.href = url;
  3713. a.download = f.name;
  3714. a.click();
  3715. console.log(data);
  3716. } // sxuccessful response
  3717. });
  3718. },
  3719. deleteTest(tid) {
  3720. let _this = this;
  3721. _this
  3722. .$confirm("确定删除此提交的表单么?", "提示", {
  3723. confirmButtonText: "确定",
  3724. cancelButtonText: "取消",
  3725. type: "warning",
  3726. })
  3727. .then(() => {
  3728. let params = [
  3729. {
  3730. tid: tid,
  3731. },
  3732. ];
  3733. _this.ajax
  3734. .post(_this.$store.state.api + "deleteTestCourseWorks", params)
  3735. .then((res) => {
  3736. _this.$message.success("删除成功");
  3737. if (_this.stype == 3) {
  3738. _this.getData2();
  3739. } else {
  3740. _this.getData();
  3741. }
  3742. })
  3743. .catch((err) => {
  3744. console.error(err);
  3745. });
  3746. })
  3747. .catch(() => {
  3748. return;
  3749. });
  3750. },
  3751. exportPDF() {
  3752. this.pdfLoading = true;
  3753. var a = document.getElementsByTagName("img");
  3754. for (var i = 0; i < a.length; i++) {
  3755. a[i].crossOrigin = "*";
  3756. }
  3757. downloadPDF(this.$refs.stepBox, this.testJson.title, () => {
  3758. var _a = document.getElementsByTagName("img");
  3759. for (var i = 0; i < _a.length; i++) {
  3760. _a[i].removeAttribute("crossorigin");
  3761. }
  3762. setTimeout(() => {
  3763. this.pdfLoading = false;
  3764. }, 2000);
  3765. });
  3766. },
  3767. score(json) {
  3768. let score = 0;
  3769. json.forEach((el) => {
  3770. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  3771. el.array.forEach((item) => {
  3772. if (item.ttype == 2 && item.array.length > 0) {
  3773. item.array.forEach((item2) => {
  3774. if (item2.ttype == 1 && item2.json) {
  3775. score += item2.json.score ? parseFloat(item2.json.score) : 0;
  3776. }
  3777. });
  3778. } else if (item.ttype == 1 && item.json) {
  3779. score += item.json.score ? parseFloat(item.json.score) : 0;
  3780. }
  3781. });
  3782. } else if (el.ttype == 1 && el.json) {
  3783. score += el.json.score ? parseFloat(el.json.score) : 0;
  3784. }
  3785. });
  3786. return score > 0 ? score + "分" : "";
  3787. },
  3788. score2(json) {
  3789. let score = 0;
  3790. // let type = 1
  3791. json.forEach((el) => {
  3792. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  3793. el.array.forEach((item) => {
  3794. if (item.ttype == 2 && item.array.length > 0) {
  3795. item.array.forEach((item2) => {
  3796. if (item2.ttype == 1 && item2.json) {
  3797. score += item2.json.score2
  3798. ? parseFloat(item2.json.score2)
  3799. : 0;
  3800. }
  3801. });
  3802. } else if (item.ttype == 1 && item.json) {
  3803. score += item.json.score2 ? parseFloat(item.json.score2) : 0;
  3804. }
  3805. });
  3806. } else if (el.ttype == 1 && el.json) {
  3807. score += el.json.score2 ? parseFloat(el.json.score2) : 0;
  3808. }
  3809. });
  3810. return score + "分";
  3811. },
  3812. setWordHtml(data) {
  3813. let _data = data;
  3814. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  3815. let score = this.score(data.courseJson);
  3816. let isScore = this.score2(data.courseJson);
  3817. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
  3818. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
  3819. _data.name
  3820. }</b>${scoreContent}(填写范围)${
  3821. this.testJson.juriP ? this.testJson.juriP : "所有人"
  3822. }(提交时间)${_data.time}</div>`;
  3823. let _detail = this.testJson.brief
  3824. ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
  3825. : "";
  3826. let _test = `<div style='margin-top:40px;'>`;
  3827. for (let i = 0; i < _data.array.length; i++) {
  3828. let item = _data.array[i];
  3829. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
  3830. item.json.title
  3831. }</div>`;
  3832. _test += _div;
  3833. if (item.type == 1) {
  3834. for (let j = 0; j < item.json.array.length; j++) {
  3835. let check = item.json.array[j];
  3836. let _option = `<div style='margin:10px 0 0 40px;'>${
  3837. item.json.answer2 && item.json.answer2.indexOf(j) !== -1
  3838. ? "☑"
  3839. : "☐"
  3840. } ${check.option}</div>`;
  3841. _test += _option;
  3842. }
  3843. } else if (item.type == 3 && item.json.answer2) {
  3844. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  3845. _test += _option;
  3846. } else if (item.type == 5 && item.json.file) {
  3847. for (let j = 0; j < item.json.file.length; j++) {
  3848. let check = item.json.file[j];
  3849. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
  3850. _test += _option;
  3851. }
  3852. } else if (item.type == 6 && item.json.answer2) {
  3853. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  3854. _test += _option;
  3855. } else if (item.type == 7 && item.json.answer2) {
  3856. let _score = this.getScore2(item.json);
  3857. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
  3858. _test += _option;
  3859. } else if (item.type == 8 && item.json.answer2) {
  3860. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  3861. _test += _option;
  3862. } else if (item.type == 11 && item.json.answer2) {
  3863. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  3864. _test += _option;
  3865. }
  3866. }
  3867. _test += `</div>`;
  3868. let _html = _title + _content + _detail + _test;
  3869. this.exportToWord(_data.name + "-" + _data.time, _html);
  3870. },
  3871. setWordHtml2(data) {
  3872. let _data = data;
  3873. _data.array = this.JSONSetting(
  3874. JSON.parse(JSON.stringify(JSON.parse(data.courseJson)))
  3875. );
  3876. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  3877. let score = this.score(JSON.parse(data.courseJson));
  3878. let isScore = this.score2(JSON.parse(data.courseJson));
  3879. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
  3880. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
  3881. _data.username ? _data.username : "匿名"
  3882. }</b>${scoreContent}(填写范围)${
  3883. this.testJson.juriP ? this.testJson.juriP : "所有人"
  3884. }(提交时间)${_data.time}</div>`;
  3885. let _detail = this.testJson.brief
  3886. ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
  3887. : "";
  3888. let _test = `<div style='margin-top:40px;'>`;
  3889. for (let i = 0; i < _data.array.length; i++) {
  3890. let item = _data.array[i];
  3891. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
  3892. item.json.title
  3893. }</div>`;
  3894. _test += _div;
  3895. if (item.type == 1) {
  3896. for (let j = 0; j < item.json.array.length; j++) {
  3897. let check = item.json.array[j];
  3898. let _option = `<div style='margin:10px 0 0 40px;'>${
  3899. item.json.answer2 && item.json.answer2.indexOf(j) !== -1
  3900. ? "☑"
  3901. : "☐"
  3902. } ${check.option}</div>`;
  3903. _test += _option;
  3904. }
  3905. } else if (item.type == 3 && item.json.answer2) {
  3906. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  3907. _test += _option;
  3908. } else if (item.type == 5 && item.json.file) {
  3909. for (let j = 0; j < item.json.file.length; j++) {
  3910. let check = item.json.file[j];
  3911. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
  3912. _test += _option;
  3913. }
  3914. } else if (item.type == 6 && item.json.answer2) {
  3915. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  3916. _test += _option;
  3917. } else if (item.type == 7 && item.json.answer2) {
  3918. let _score = this.getScore2(item.json);
  3919. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
  3920. _test += _option;
  3921. } else if (item.type == 8 && item.json.answer2) {
  3922. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  3923. _test += _option;
  3924. } else if (item.type == 11 && item.json.answer2) {
  3925. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  3926. _test += _option;
  3927. }
  3928. }
  3929. _test += `</div>`;
  3930. let _html = _title + _content + _detail + _test;
  3931. this.exportToWord(
  3932. _data.username ? _data.username : "匿名" + "-" + _data.time,
  3933. _html
  3934. );
  3935. },
  3936. async exportToWord(a, html) {
  3937. // 将html文件中需要用到的数据挂载到store上
  3938. const content = `<!DOCTYPE html>
  3939. <html lang="en">
  3940. <head>
  3941. <meta charset="UTF-8">
  3942. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  3943. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  3944. <title>${a}</title>
  3945. <style>
  3946. </style>
  3947. </head>
  3948. <body>
  3949. ${html}
  3950. </body>
  3951. </html>`;
  3952. // debugger
  3953. // 生成报告
  3954. const link = document.createElement("a");
  3955. let dname = a + ".doc";
  3956. // link.download = "报告.html"; // 文件名
  3957. link.download = dname; // 文件名
  3958. link.style.display = "none";
  3959. // 创建文件流
  3960. // 创建bolb实例时,内容一定要放在[]中
  3961. const blob = new Blob([content], {
  3962. type: "text/plain;charset='utf-8'",
  3963. });
  3964. link.href = window.URL.createObjectURL(blob);
  3965. document.body.appendChild(link);
  3966. link.click();
  3967. document.body.removeChild(link);
  3968. },
  3969. setWordHtmlAll(data) {
  3970. let _data = data;
  3971. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  3972. let score = this.score(data.courseJson);
  3973. let isScore = this.score2(data.courseJson);
  3974. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
  3975. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
  3976. _data.name
  3977. }</b>${scoreContent}(填写范围)${
  3978. this.testJson.juriP ? this.testJson.juriP : "所有人"
  3979. }(提交时间)${_data.time}</div>`;
  3980. let _detail = this.testJson.brief
  3981. ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
  3982. : "";
  3983. let _test = `<div style='margin-top:40px;'>`;
  3984. for (let i = 0; i < _data.array.length; i++) {
  3985. let item = _data.array[i];
  3986. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
  3987. item.json.title
  3988. }</div>`;
  3989. _test += _div;
  3990. if (item.type == 1) {
  3991. for (let j = 0; j < item.json.array.length; j++) {
  3992. let check = item.json.array[j];
  3993. let _option = `<div style='margin:10px 0 0 40px;'>${
  3994. item.json.answer2 && item.json.answer2.indexOf(j) !== -1
  3995. ? "☑"
  3996. : "☐"
  3997. } ${check.option}</div>`;
  3998. _test += _option;
  3999. }
  4000. } else if (item.type == 3 && item.json.answer2) {
  4001. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  4002. _test += _option;
  4003. } else if (item.type == 5 && item.json.file) {
  4004. for (let j = 0; j < item.json.file.length; j++) {
  4005. let check = item.json.file[j];
  4006. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
  4007. _test += _option;
  4008. }
  4009. } else if (item.type == 6 && item.json.answer2) {
  4010. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  4011. _test += _option;
  4012. } else if (item.type == 7 && item.json.answer2) {
  4013. let _score = this.getScore2(item.json);
  4014. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
  4015. _test += _option;
  4016. } else if (item.type == 8 && item.json.answer2) {
  4017. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  4018. _test += _option;
  4019. } else if (item.type == 11 && item.json.answer2) {
  4020. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  4021. _test += _option;
  4022. }
  4023. }
  4024. _test += `</div>`;
  4025. let _html = _title + _content + _detail + _test;
  4026. return this.exportToWordAll(_data.name + "-" + _data.time, _html);
  4027. },
  4028. async setWordHtmlAll2(data) {
  4029. let _data = data;
  4030. _data.array = this.JSONSetting(
  4031. JSON.parse(JSON.stringify(JSON.parse(data.courseJson)))
  4032. );
  4033. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  4034. let score = this.score(JSON.parse(data.courseJson));
  4035. let isScore = this.score2(JSON.parse(data.courseJson));
  4036. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
  4037. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
  4038. _data.username ? _data.username : "匿名"
  4039. }</b>${scoreContent}(填写范围)${
  4040. this.testJson.juriP ? this.testJson.juriP : "所有人"
  4041. }(提交时间)${_data.time}</div>`;
  4042. let _detail = this.testJson.brief
  4043. ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
  4044. : "";
  4045. let _test = `<div style='margin-top:40px;'>`;
  4046. for (let i = 0; i < _data.array.length; i++) {
  4047. let item = _data.array[i];
  4048. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
  4049. item.json.title
  4050. }</div>`;
  4051. _test += _div;
  4052. if (item.type == 1) {
  4053. for (let j = 0; j < item.json.array.length; j++) {
  4054. let check = item.json.array[j];
  4055. let _option = `<div style='margin:10px 0 0 40px;'>${
  4056. item.json.answer2 && item.json.answer2.indexOf(j) !== -1
  4057. ? "☑"
  4058. : "☐"
  4059. } ${check.option}</div>`;
  4060. _test += _option;
  4061. }
  4062. } else if (item.type == 3 && item.json.answer2) {
  4063. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  4064. _test += _option;
  4065. } else if (item.type == 5 && item.json.file) {
  4066. for (let j = 0; j < item.json.file.length; j++) {
  4067. let check = item.json.file[j];
  4068. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
  4069. _test += _option;
  4070. }
  4071. } else if (item.type == 6 && item.json.answer2) {
  4072. let _cjson = await this.getCourse(item.json.answer2);
  4073. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${
  4074. _cjson ? _cjson.title : ""
  4075. }</div>`;
  4076. _test += _option;
  4077. } else if (item.type == 7 && item.json.answer2) {
  4078. let _score = this.getScore2(item.json);
  4079. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
  4080. _test += _option;
  4081. } else if (item.type == 8 && item.json.answer2) {
  4082. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  4083. _test += _option;
  4084. } else if (
  4085. item.type == 11 &&
  4086. item.json.answer2 &&
  4087. item.json.answer2.length
  4088. ) {
  4089. let _answer = item.json.answer2;
  4090. _answer.length ? (courseCount11 = courseCount11.concat(_answer)) : "";
  4091. _json[ja].json.courseId = _answer ? _answer : [];
  4092. let params = [
  4093. {
  4094. cid: _answer.length ? _answer.join(",") : "",
  4095. },
  4096. ];
  4097. let data = await this.ajax.post(
  4098. this.$store.state.api + "getCourseInfoTestAll2",
  4099. params
  4100. );
  4101. let result = data.data[0];
  4102. let _title = [];
  4103. // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
  4104. result.forEach((i) => {
  4105. _title.push(i.title);
  4106. });
  4107. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${
  4108. _title.length ? _title.join(",") : ""
  4109. }</div>`;
  4110. _test += _option;
  4111. }
  4112. }
  4113. _test += `</div>`;
  4114. let _html = _title + _content + _detail + _test;
  4115. return this.exportToWordAll(
  4116. _data.username ? _data.username : "匿名" + "-" + _data.time,
  4117. _html
  4118. );
  4119. },
  4120. async exportToWordAll(a, html) {
  4121. // 将html文件中需要用到的数据挂载到store上
  4122. const content = `<!DOCTYPE html>
  4123. <html lang="en">
  4124. <head>
  4125. <meta charset="UTF-8">
  4126. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  4127. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  4128. <title>${a}</title>
  4129. <style>
  4130. </style>
  4131. </head>
  4132. <body>
  4133. ${html}
  4134. </body>
  4135. </html>`;
  4136. // debugger
  4137. // 生成报告
  4138. const link = document.createElement("a");
  4139. let dname = a + ".doc";
  4140. // link.download = "报告.html"; // 文件名
  4141. link.download = dname; // 文件名
  4142. link.style.display = "none";
  4143. // 创建文件流
  4144. // 创建bolb实例时,内容一定要放在[]中
  4145. const blob = new Blob([content], {
  4146. type: "text/plain;charset='utf-8'",
  4147. });
  4148. return blob;
  4149. },
  4150. exportAllWord() {
  4151. if (this.selectWorkList.length <= 0)
  4152. return this.$message.info("请先选择需要导出的表单数据");
  4153. this.pdfLoading = true;
  4154. const _chapInfo = this.selectWorkList; //this.worksArray
  4155. let url = [];
  4156. for (let i = 0; i < _chapInfo.length; i++) {
  4157. url.push({
  4158. name: _chapInfo[i].name + "-" + _chapInfo[i].time,
  4159. blob: this.setWordHtmlAll(_chapInfo[i]),
  4160. });
  4161. }
  4162. console.log(url);
  4163. this.downLoadAll(url);
  4164. },
  4165. exportAllWord2() {
  4166. this.pdfLoading = true;
  4167. let params = {
  4168. cid: this.cid,
  4169. page: 1,
  4170. pageSize: 999,
  4171. cn: this.courseName,
  4172. };
  4173. this.ajax
  4174. .get(this.$store.state.api + "getTestWorksPage3", params)
  4175. .then((res) => {
  4176. const _chapInfo = res.data[0];
  4177. let url = [];
  4178. for (let i = 0; i < _chapInfo.length; i++) {
  4179. url.push({
  4180. name: _chapInfo[i].username + "-" + _chapInfo[i].time,
  4181. blob: this.setWordHtmlAll2(_chapInfo[i]),
  4182. });
  4183. }
  4184. console.log(url);
  4185. this.downLoadAll(url);
  4186. })
  4187. .catch((err) => {
  4188. console.error(err);
  4189. });
  4190. },
  4191. downLoadAll(url) {
  4192. const data = url; // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
  4193. const zip = new JSZip();
  4194. const cache = {};
  4195. data.forEach((item) => {
  4196. // 下载文件, 并存成ArrayBuffer对象
  4197. const file_name = item.name; // 获取文件名
  4198. zip.file(file_name + ".doc", item.blob, { binary: true }); // 逐个添加文件
  4199. cache[file_name] = item.blob;
  4200. });
  4201. zip.generateAsync({ type: "blob" }).then((content) => {
  4202. // 生成二进制流
  4203. FileSaver.saveAs(content, this.testJson.title + ".zip"); // 利用file-saver保存文件 自定义文件名
  4204. setTimeout(() => {
  4205. this.pdfLoading = false;
  4206. }, 2000);
  4207. });
  4208. },
  4209. handleFilterChange() {
  4210. console.log(this.$refs.table.store.states.data);
  4211. },
  4212. exportExcel() {
  4213. let res = this.$refs.table.store.states.data;
  4214. if (!res.length) {
  4215. this.$message.error("无导出数据");
  4216. return;
  4217. }
  4218. this.isLoading = true;
  4219. let chapters = this.chapters;
  4220. var array = [];
  4221. for (var i = 0; i < res.length; i++) {
  4222. var _json = {};
  4223. _json["序号"] = i + 1;
  4224. _json["提交人"] = res[i].name ? res[i].name : "匿名";
  4225. _json["提交时间"] = res[i].time;
  4226. for (var j = 0; j < chapters.length; j++) {
  4227. _json[j + 1 + "." + chapters[j].json.title] = "";
  4228. if (res[i].array[j].type == 1 && res[i].array[j].json.answer2) {
  4229. let a = [];
  4230. for (
  4231. var answer2 = 0;
  4232. answer2 < res[i].array[j].json.answer2.length;
  4233. answer2++
  4234. ) {
  4235. a.push(
  4236. res[i].array[j].json.array[
  4237. res[i].array[j].json.answer2[answer2]
  4238. ].option
  4239. );
  4240. }
  4241. _json[j + 1 + "." + chapters[j].json.title] = a.join("、");
  4242. } else if (
  4243. res[i].array[j].type == 3 &&
  4244. res[i].array[j].json.answer2
  4245. ) {
  4246. _json[j + 1 + "." + chapters[j].json.title] =
  4247. res[i].array[j].json.answer2;
  4248. } else if (res[i].array[j].type == 5 && res[i].array[j].json.file) {
  4249. let files = [];
  4250. for (
  4251. let file = 0;
  4252. file < res[i].array[j].json.file.length;
  4253. file++
  4254. ) {
  4255. let check = res[i].array[j].json.file[file];
  4256. files.push(file + 1 + "." + check.name + "----" + check.url);
  4257. }
  4258. _json[j + 1 + "." + chapters[j].json.title] = files.join("\n");
  4259. } else if (
  4260. res[i].array[j].type == 6 &&
  4261. res[i].array[j].json.answer2
  4262. ) {
  4263. _json[j + 1 + "." + chapters[j].json.title] =
  4264. res[i].array[j].json.answer2;
  4265. } else if (
  4266. res[i].array[j].type == 7 &&
  4267. res[i].array[j].json.answer2
  4268. ) {
  4269. let _score = this.getScore2(res[i].array[j].json);
  4270. _json[j + 1 + "." + chapters[j].json.title] = _score;
  4271. } else if (
  4272. res[i].array[j].type == 8 &&
  4273. res[i].array[j].json.answer2
  4274. ) {
  4275. _json[j + 1 + "." + chapters[j].json.title] =
  4276. res[i].array[j].json.answer2;
  4277. } else if (
  4278. res[i].array[j].type == 11 &&
  4279. res[i].array[j].json.answer2
  4280. ) {
  4281. _json[j + 1 + "." + chapters[j].json.title] =
  4282. res[i].array[j].json.answer2;
  4283. }
  4284. }
  4285. array.push(_json);
  4286. }
  4287. let widthJson = [];
  4288. let widthArray = Object.keys(array[0]);
  4289. for (let i = 0; i < widthArray.length; i++) {
  4290. if (i == 0) {
  4291. widthJson.push({ wch: 5 });
  4292. } else {
  4293. widthJson.push({ wch: 30 });
  4294. }
  4295. }
  4296. const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
  4297. let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
  4298. ws["!cols"] = widthJson;
  4299. const styleObj = {
  4300. alignment: {
  4301. horizontal: "center",
  4302. vertical: "center", // 设置垂直居中
  4303. },
  4304. }; // 设置居中对齐和加粗样式
  4305. for (let cell in ws) {
  4306. if (!cell[0].startsWith("!")) {
  4307. ws[cell]["s"] = styleObj;
  4308. }
  4309. }
  4310. XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
  4311. XLSX.writeFile(workbook, this.testJson.title + ".xlsx");
  4312. this.isLoading = false;
  4313. this.$message({
  4314. message: "导出成功",
  4315. type: "success",
  4316. });
  4317. },
  4318. async getCourse(id) {
  4319. let params = {
  4320. cid: id,
  4321. };
  4322. let res = await this.ajax.get(
  4323. this.$store.state.api + "getCourseInfoTest",
  4324. params
  4325. );
  4326. return res.data[0][0];
  4327. },
  4328. getScore2(item) {
  4329. let array = [];
  4330. for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
  4331. array.push(i);
  4332. }
  4333. return item.answer2 ? array[item.answer2] : "";
  4334. },
  4335. checkScreenSize() {
  4336. this.screenWidth = window.innerWidth;
  4337. this.isDesktop = this.screenWidth > 750; // 你可以根据需要调整这个阈值
  4338. },
  4339. downloadFileType5(fileData, title = "附件", index) {
  4340. this.fileLoading[index].bool = true;
  4341. this.fileLoading[index].count = 0;
  4342. this.fileLoading[index].load = 0;
  4343. this.fileLoading[index].progress = 0;
  4344. let data = fileData;
  4345. const zip = new JSZip();
  4346. let downFileArray = [];
  4347. let uniqueArr = data.filter(
  4348. (v, i, a) => a.map((mb) => mb.userid).indexOf(v.userid) == i
  4349. );
  4350. uniqueArr.forEach((i) => {
  4351. downFileArray.push({
  4352. userid: i.userid,
  4353. username: i.username ? i.username : "匿名",
  4354. urlList: data.filter((d) => d.userid == i.userid).map((m) => m),
  4355. });
  4356. });
  4357. let promises = [];
  4358. console.log("downFileArray", downFileArray);
  4359. downFileArray.forEach((e) => {
  4360. this.fileLoading[index].count += e.urlList.length;
  4361. });
  4362. if (downFileArray.length == 1) {
  4363. //只有一位老师的情况
  4364. if (downFileArray[0].urlList.length > 1) {
  4365. //多个文件的情况
  4366. const folder = zip.folder(`${downFileArray[0].username}`);
  4367. downFileArray[0].urlList.forEach((i) => {
  4368. const promise = getFile(i.url).then((data) => {
  4369. if (data.data != 1) {
  4370. // 下载文件, 并存成ArrayBuffer对象
  4371. const file_name = i.name; // 获取文件名
  4372. folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
  4373. }
  4374. this.fileLoading[index].load += 1;
  4375. this.fileLoading[index].progress = parseInt(
  4376. (this.fileLoading[index].load / this.fileLoading[index].count) *
  4377. 100
  4378. );
  4379. if (
  4380. this.fileLoading[index].load == this.fileLoading[index].count
  4381. ) {
  4382. this.fileLoading[index].bool = false;
  4383. }
  4384. });
  4385. promises.push(promise);
  4386. });
  4387. } else {
  4388. //只有一个文件的情况
  4389. promises.push(
  4390. getFile(downFileArray[0].urlList[0].url).then((data) => {
  4391. if (data.data != 1) {
  4392. // 下载文件, 并存成ArrayBuffer对象
  4393. const file_name = `${downFileArray[0].username}-${downFileArray[0].urlList[0].name}`; // 获取文件名
  4394. zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
  4395. }
  4396. this.fileLoading[index].load += 1;
  4397. this.fileLoading[index].progress = parseInt(
  4398. (this.fileLoading[index].load / this.fileLoading[index].count) *
  4399. 100
  4400. );
  4401. if (
  4402. this.fileLoading[index].load == this.fileLoading[index].count
  4403. ) {
  4404. this.fileLoading[index].bool = false;
  4405. }
  4406. })
  4407. );
  4408. }
  4409. } else if (downFileArray.length > 1) {
  4410. //有多位老师的情况
  4411. downFileArray.forEach((i) => {
  4412. if (i.urlList.length == 1) {
  4413. //只有一个文件的情况
  4414. promises.push(
  4415. getFile(i.urlList[0].url).then((data) => {
  4416. if (data.data != 1) {
  4417. // 下载文件, 并存成ArrayBuffer对象
  4418. const file_name = `${i.username ? i.username : "匿名"}-${
  4419. i.urlList[0].name
  4420. }`; // 获取文件名
  4421. zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
  4422. }
  4423. this.fileLoading[index].load += 1;
  4424. this.fileLoading[index].progress = parseInt(
  4425. (this.fileLoading[index].load /
  4426. this.fileLoading[index].count) *
  4427. 100
  4428. );
  4429. if (
  4430. this.fileLoading[index].load == this.fileLoading[index].count
  4431. ) {
  4432. this.fileLoading[index].bool = false;
  4433. }
  4434. })
  4435. );
  4436. } else if (i.urlList.length > 1) {
  4437. //有多个文件的
  4438. const folder = zip.folder(`${i.username ? i.username : "匿名"}`);
  4439. i.urlList.forEach((ui) => {
  4440. const promise = getFile(ui.url).then((data) => {
  4441. if (data.data != 1) {
  4442. // 下载文件, 并存成ArrayBuffer对象
  4443. const file_name = ui.name; // 获取文件名
  4444. folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
  4445. }
  4446. this.fileLoading[index].load += 1;
  4447. this.fileLoading[index].progress = parseInt(
  4448. (this.fileLoading[index].load /
  4449. this.fileLoading[index].count) *
  4450. 100
  4451. );
  4452. if (
  4453. this.fileLoading[index].load == this.fileLoading[index].count
  4454. ) {
  4455. this.fileLoading[index].bool = false;
  4456. }
  4457. });
  4458. promises.push(promise);
  4459. });
  4460. }
  4461. });
  4462. }
  4463. Promise.all(promises).then(() => {
  4464. console.log("开始下载")
  4465. this.fileLoading[index].bool = true;
  4466. zip.generateAsync({ type: "blob" }).then((content) => {
  4467. // 生成二进制流
  4468. FileSaver.saveAs(content, `${this.testJson.title}-${title}.zip`); // 利用file-saver保存文件 自定义文件名
  4469. this.fileLoading[index].bool = false;
  4470. });
  4471. });
  4472. },
  4473. getUserInfo() {
  4474. let params = {
  4475. uid: this.peopleId,
  4476. };
  4477. this.ajax
  4478. .get(this.$store.state.api + "selectTestUser", params)
  4479. .then((res) => {
  4480. console.log("111111111111111111111", res.data[0][0]);
  4481. // 用于存储归类后的数据的对象
  4482. // this.checkDataType(2)
  4483. this.stype = 2;
  4484. this.courseName = res.data[0][0].name;
  4485. this.searchCourse();
  4486. })
  4487. .catch((err) => {
  4488. console.error(err);
  4489. });
  4490. },
  4491. setWordTemplate(item) {
  4492. this.$refs.docxTemplateDialogRef.open({
  4493. fileData: this.testJson.cover ? JSON.parse(this.testJson.cover) : null,
  4494. testJson: this.testJson,
  4495. courseId: this.testJson.courseId,
  4496. formData: [item],
  4497. }); //这里可以传数据
  4498. },
  4499. changeCover(data) {
  4500. this.testJson.cover = data;
  4501. },
  4502. exportWordData() {
  4503. if (this.selectWorkList.length <= 0)
  4504. return this.$message.info("请先选择需要导出的表单数据");
  4505. this.$refs.docxTemplateDialogRef.open({
  4506. fileData: this.testJson.cover ? JSON.parse(this.testJson.cover) : null,
  4507. testJson: this.testJson,
  4508. courseId: this.testJson.courseId,
  4509. formData: this.selectWorkList,
  4510. }); //这里可以传数据this.worksArray
  4511. },
  4512. handleSelectionChange(value) {
  4513. this.selectWorkList = value;
  4514. },
  4515. tableDataPickerChange() {
  4516. console.log(this.tableDatePicker)
  4517. let _copyData = JSON.parse(JSON.stringify(this.worksArray));
  4518. this.tableDatePicker.forEach((i, index) => {
  4519. /*[null,["2024-12-05T00:00:00.000","2025-01-12T00:00:00.000"],["2024-12-04T00:00:00.000","2025-01-24T00:00:00.000"]] */
  4520. if (i && i.length > 0) {
  4521. let _startDate = new Date(i[0]);
  4522. let _endDate = new Date(i[1]);
  4523. _copyData = _copyData.filter((f) => {
  4524. let _answer = f.array[index].json.answer2
  4525. .replace(/日/g, "")
  4526. .replace(/年|月/g, "-");
  4527. let _answerDate = new Date(_answer);
  4528. return _answerDate >= _startDate && _answerDate <= _endDate;
  4529. });
  4530. }
  4531. });
  4532. this.tableWorksArray = _copyData;
  4533. this.$forceUpdate()
  4534. },
  4535. submissionTimePickerChange(){
  4536. let _copyData = JSON.parse(JSON.stringify(this.worksArray));
  4537. console.log(this.submissionTimePicker)
  4538. if(!this.submissionTimePicker)return this.tableWorksArray = _copyData;
  4539. _copyData = _copyData.filter(i=>{
  4540. let _startDate = new Date(this.submissionTimePicker[0]);
  4541. let _endDate = new Date(this.submissionTimePicker[1]);
  4542. let time = i.time.replace(/日/g, "").replace(/年|月/g, "-");
  4543. let _answerDate = new Date(time);
  4544. return _answerDate >= _startDate && _answerDate <= _endDate;
  4545. })
  4546. this.tableWorksArray = _copyData;
  4547. this.$forceUpdate();
  4548. // this.submissionTimePicker.forEach((i, index) => {
  4549. // /*[null,["2024-12-05T00:00:00.000","2025-01-12T00:00:00.000"],["2024-12-04T00:00:00.000","2025-01-24T00:00:00.000"]] */
  4550. // if (i && i.length > 0) {
  4551. // let _startDate = new Date(i[0]);
  4552. // let _endDate = new Date(i[1]);
  4553. // _copyData = _copyData.filter((f) => {
  4554. // let _answer = f.array[index].json.answer2
  4555. // .replace(/日/g, "")
  4556. // .replace(/年|月/g, "-");
  4557. // let _answerDate = new Date(_answer);
  4558. // return _answerDate >= _startDate && _answerDate <= _endDate;
  4559. // });
  4560. // }
  4561. // });
  4562. },
  4563. textPagingChange(event,item,index){
  4564. this.testArray[index].nowPage = event;
  4565. let _nowPage = this.testArray[index].nowPage;
  4566. let _limit = this.testArray[index].limit;
  4567. this.testArray[index].showArray = this.testArray[index].array.slice(((_nowPage==0?1:_nowPage)-1)*_limit,((_nowPage==0?1:_nowPage)-1)*_limit+_limit);
  4568. },
  4569. getWordCloutData(item,index){
  4570. console.log(item,index);
  4571. this.testArray[index].loadingWordCloud = true;
  4572. const _msg = `NOTICE
  4573. Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
  4574. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  4575. Instruction: Based on the context, follow "Format example", write content.
  4576. ## 任务
  4577. 请基于以下表单文本,提炼出多个关键词,用于绘制词云图。请给出相应的关键词,关键词出现的频次。请确保输出的关键字准确反映表单文本的主要内容和主题。
  4578. ## 要求
  4579. 1. **提取关键词**:从提供的课堂实录文本中提取出多个最具代表性的关键字。关键词应该涵盖表单文本中的主要概念、重要术语和核心主题。尽量选择多样化的关键词,避免过于集中在某一个主题或概念上。
  4580. 2. **词频统计**:计算每个关键字在文本中出现的频率。
  4581. 3. **输出格式**:输出结果应包含每个关键字、对应的词频数量。
  4582. ## 输出格式
  4583. ### 输出格式
  4584. [
  4585. {"count":1,"name":"氯化钠"},
  4586. {"count":2,"name":"溶液"},
  4587. {"count":1,"name":"实验"},
  4588. {"count":3,"name":"质量分数"},
  4589. {"count":1,"name":"溶质"},
  4590. {"count":2,"name":"氢氧化钠"},
  4591. {"count":1,"name":"溶解度"},
  4592. {"count":4,"name":"饱和溶液"}
  4593. ]
  4594. 请仅仅输出表头,输出关键词和相应的内容,无需其它任何说明文字。
  4595. 冒号、逗号等符号均使用英文字符。
  4596. ### Format example
  4597. [
  4598. {"count":1,"name":"氯化钠"},
  4599. {"count":2,"name":"溶液"},
  4600. {"count":1,"name":"实验"},
  4601. {"count":3,"name":"质量分数"},
  4602. {"count":1,"name":"溶质"},
  4603. {"count":2,"name":"氢氧化钠"},
  4604. {"count":1,"name":"溶解度"},
  4605. {"count":4,"name":"饱和溶液"}
  4606. ]
  4607. ## 表单文本
  4608. ${JSON.stringify(item.array)}
  4609. `;
  4610. const _uuid = uuidv4();
  4611. let params = {
  4612. // model: "gpt-3.5-turbo",
  4613. temperature: 0,
  4614. max_tokens: 4096,
  4615. top_p: 1,
  4616. frequency_penalty: 0,
  4617. presence_penalty: 0,
  4618. messages: [{ role: "user", content: _msg }],
  4619. uid: _uuid,
  4620. mind_map_question: "",
  4621. stream: false,
  4622. model: "gpt-4o-2024-11-20",
  4623. };
  4624. this.ajax
  4625. .post("https://gpt4.cocorobo.cn/chat", params)
  4626. .then((res) => {
  4627. let _data = res.data.FunctionResponse.choices[0];
  4628. let _jsonData = _data.message.content;
  4629. _jsonData = _jsonData.replaceAll("```json", "").replaceAll("```", "");
  4630. let _result = JSON.parse(_jsonData);
  4631. this.testArray[index].wordCloutData = _result;
  4632. this.testArray[index].loadingWordCloud = false;
  4633. console.log(_result);
  4634. }).catch(e=>{
  4635. console.log(e);
  4636. this.testArray[index].loadingWordCloud = false;
  4637. this.testArray[index].wordCloutData = null;
  4638. this.$message.error("生成词云图失败")
  4639. })
  4640. },
  4641. getExamineData(){
  4642. let params = {
  4643. uid: this.peopleId,
  4644. type:this.tType,
  4645. tid:this.examineId,
  4646. }
  4647. this.ajax.get(this.$store.state.api +"getTestExamineByUserId2",params).then(res=>{
  4648. // this.examineData = res.data[0][0];
  4649. if(res.data[0].length>0){
  4650. this.examineData = res.data[0][0];
  4651. }
  4652. }).catch(e=>{
  4653. console.log(e);
  4654. this.examineData = null;
  4655. })
  4656. },
  4657. //查看文件列表
  4658. checkFileListOpen(list){
  4659. this.$refs.checkFileListDialogRef.open(list);
  4660. },
  4661. getClassSortTime(){
  4662. let params = {
  4663. pid:"11"
  4664. }
  4665. this.ajax.get(this.$store.state.api+"select_ClassByParentid",params).then(res=>{
  4666. let _data = res.data[0];
  4667. if(_data.length>0){
  4668. _data.forEach(i=>{
  4669. if(i.value){
  4670. this.sortTime.push(JSON.parse(i.value))
  4671. }
  4672. })
  4673. }
  4674. }).catch(e=>{
  4675. console.log(e);
  4676. })
  4677. },
  4678. reviewChange(row){
  4679. console.log(row);
  4680. let params = [{
  4681. id:row.id,
  4682. isReview:row.isReview
  4683. }]
  4684. this.ajax.post(this.$store.state.api+"update_testCourseWorks_isReviewById",params).then(res=>{
  4685. console.log(res);
  4686. }).catch(e=>{
  4687. console.log(e);
  4688. })
  4689. // console.log(row);
  4690. // this.tableWorksArray.find(i=>i.id===row.id).isReview = "1";
  4691. // this.$forceUpdate()
  4692. },
  4693. //退回表单
  4694. returnTest(row){
  4695. if(row.type=='1')return this.$message.info("该表单未提交")
  4696. if(row.type=='4')return this.$message.info("该表单已退回")
  4697. let params = [{
  4698. id:row.id,
  4699. type:"4"
  4700. }];
  4701. this.ajax.post(this.$store.state.api+"update_testCourseWorks_typeById",params).then(res=>{
  4702. if(res.data==1){
  4703. this.tableWorksArray.find(i=>i.id==row.id).type = "4";
  4704. this.$message.success("表单退回成功");
  4705. }
  4706. }).catch(e=>{
  4707. console.log(e);
  4708. })
  4709. },
  4710. },
  4711. beforeDestroy() {
  4712. document.getElementsByTagName("html")[0].style.overflow = "";
  4713. window.removeEventListener("resize", this.checkScreenSize);
  4714. },
  4715. mounted() {
  4716. this.checkScreenSize();
  4717. window.addEventListener("resize", this.checkScreenSize);
  4718. document.getElementsByTagName("html")[0].scrollTop = 0;
  4719. document.getElementsByTagName("html")[0].style.overflow = "hidden";
  4720. this.$nextTick(function () {
  4721. if (this.peopleId) {
  4722. this.getUserInfo();
  4723. } else {
  4724. this.getData();
  4725. }
  4726. if(this.examineId){
  4727. this.getExamineData();
  4728. }
  4729. // this.getClass2()
  4730. this.changeHeight();
  4731. });
  4732. this.getClassSortTime();
  4733. },
  4734. };
  4735. </script>
  4736. <style scoped>
  4737. .pb_content {
  4738. height: 100% !important;
  4739. /* margin: 0 20px 0 20px; */
  4740. }
  4741. .cutBtnBlockCss {
  4742. width: 100%;
  4743. display: flex;
  4744. justify-content: end;
  4745. }
  4746. .cutBtnCss {
  4747. width: 68px;
  4748. height: 27px;
  4749. font-size: 14px;
  4750. border-radius: 5px;
  4751. display: flex;
  4752. color: rgba(54, 129, 252, 1);
  4753. justify-content: center;
  4754. align-items: center;
  4755. margin-top: 10px;
  4756. border: 1px rgba(54, 129, 252, 1) solid;
  4757. }
  4758. .isDesktopRight {
  4759. width: 100% !important;
  4760. margin: 0 !important;
  4761. height: 300px !important;
  4762. border: none !important;
  4763. }
  4764. .isDTitle2JsonTit {
  4765. width: 130px;
  4766. color: rgba(0, 0, 0, 0.9);
  4767. overflow: hidden;
  4768. white-space: nowrap;
  4769. text-overflow: ellipsis;
  4770. }
  4771. .IsDAnswer {
  4772. margin: 20px 0 30px;
  4773. color: rgba(0, 0, 0, 0.6);
  4774. }
  4775. .CutCss {
  4776. height: 60px;
  4777. line-height: 60px;
  4778. }
  4779. .topicTitCss {
  4780. color: rgba(0, 0, 0, 0.9);
  4781. font-weight: 600;
  4782. margin-right: 5px;
  4783. }
  4784. .IsDFile {
  4785. width: 150px;
  4786. height: 120px;
  4787. border-radius: 10px;
  4788. position: relative;
  4789. display: flex;
  4790. flex-direction: column;
  4791. overflow: hidden;
  4792. margin-bottom: 5px;
  4793. }
  4794. .IsDownload {
  4795. position: absolute;
  4796. width: 30px;
  4797. top: 5px;
  4798. right: 5px;
  4799. }
  4800. .IsDImg {
  4801. width: 100%;
  4802. height: 70px;
  4803. flex: 1;
  4804. }
  4805. .pb_content_body {
  4806. width: 100% !important;
  4807. height: 100%;
  4808. }
  4809. .pb_content_body > .right {
  4810. height: 100%;
  4811. width: 100%;
  4812. display: flex;
  4813. overflow: hidden;
  4814. flex-direction: column;
  4815. }
  4816. .basic_box {
  4817. margin: 0 auto;
  4818. position: relative;
  4819. padding: 0 20px 0 20px;
  4820. }
  4821. .courseTop {
  4822. display: flex;
  4823. flex-direction: row;
  4824. justify-content: space-between;
  4825. align-items: center;
  4826. width: calc(100% - 40px);
  4827. margin: 0 auto;
  4828. padding: 10px 0;
  4829. }
  4830. .stepsNav {
  4831. display: flex;
  4832. flex-direction: row;
  4833. justify-content: flex-start;
  4834. align-items: center;
  4835. }
  4836. .step_box {
  4837. width: calc(100% - 40px);
  4838. margin: 0 auto;
  4839. height: calc(100% - 50px);
  4840. overflow: auto;
  4841. background: #ffff;
  4842. border-radius: 5px;
  4843. }
  4844. .el-table >>> .even_row {
  4845. background-color: #f1f1f1 !important;
  4846. }
  4847. .student_page {
  4848. margin-top: 10px;
  4849. }
  4850. .test_title {
  4851. display: flex;
  4852. padding: 15px 15px;
  4853. width: 100%;
  4854. box-sizing: border-box;
  4855. justify-content: space-between;
  4856. align-items: center;
  4857. flex-wrap: wrap;
  4858. margin-bottom: 10px;
  4859. }
  4860. .test_title .left {
  4861. max-width: 100%;
  4862. margin-top: 10px;
  4863. }
  4864. .test_title .left .title {
  4865. width: 100%;
  4866. font-size: 24px;
  4867. font-weight: 700;
  4868. overflow: hidden;
  4869. text-overflow: ellipsis;
  4870. white-space: nowrap;
  4871. }
  4872. .test_title .left .info {
  4873. display: flex;
  4874. margin-top: 15px;
  4875. }
  4876. .test_title .left .info .info_box {
  4877. font-size: 14px;
  4878. }
  4879. .test_title .left .info .info_box + .info_box {
  4880. margin-left: 20px;
  4881. padding-left: 20px;
  4882. border-left: 1px solid #e7e7e7;
  4883. }
  4884. .test_title .left .info .info_box span:nth-child(1) {
  4885. color: #00000099;
  4886. }
  4887. /* .test_title .left .info .info_box span:nth-child(2) {
  4888. } */
  4889. .test_title .right {
  4890. display: flex;
  4891. align-items: center;
  4892. margin-top: 10px;
  4893. max-width: 100%;
  4894. }
  4895. .test_title .right .data_box {
  4896. margin-right: 15px;
  4897. width: 150px;
  4898. border: 1px solid #e7e7e7;
  4899. border-radius: 5px;
  4900. padding: 0 10px;
  4901. height: 57px;
  4902. font-size: 14px;
  4903. color: #00000099;
  4904. display: flex;
  4905. justify-content: space-between;
  4906. align-items: center;
  4907. }
  4908. /* .test_title .right .data_box span:nth-child(1) {
  4909. }
  4910. .test_title .right .data_box span:nth-child(2) {
  4911. } */
  4912. .test_title .right .data_box span:nth-child(2) .big {
  4913. font-size: 22px;
  4914. }
  4915. .test_title .right .btn_box {
  4916. display: flex;
  4917. flex-direction: column;
  4918. width: 57px;
  4919. height: 57px;
  4920. background: #3681fc;
  4921. border-radius: 5px;
  4922. font-size: 14px;
  4923. cursor: pointer;
  4924. align-items: center;
  4925. justify-content: center;
  4926. color: #fff;
  4927. }
  4928. .test_title .right .btn_box span:nth-child(1) {
  4929. display: block;
  4930. width: 12px;
  4931. height: 14px;
  4932. margin-bottom: 5px;
  4933. background-image: url("../../../../assets/icon/test/icon_share.png");
  4934. background-size: 100% 100%;
  4935. }
  4936. /* .test_title .right .btn_box span:nth-child(2) {
  4937. } */
  4938. .search_nav {
  4939. border-bottom: 1px solid #e7e7e7;
  4940. width: 100%;
  4941. box-sizing: border-box;
  4942. padding: 0 15px 10px;
  4943. display: flex;
  4944. align-items: flex-end;
  4945. height: 50px;
  4946. }
  4947. .search_nav > .right {
  4948. display: flex;
  4949. align-items: center;
  4950. }
  4951. .search_nav > .right > span {
  4952. height: 24px;
  4953. font-size: 14px;
  4954. color: #000;
  4955. cursor: pointer;
  4956. position: relative;
  4957. }
  4958. .search_nav > .isDesktopRightCut {
  4959. display: flex;
  4960. justify-content: space-between;
  4961. width: 60%;
  4962. }
  4963. .search_nav > .right > span + span {
  4964. margin-left: 35px;
  4965. }
  4966. .search_nav > .right > span.active {
  4967. color: #3681fc;
  4968. font-weight: 600;
  4969. }
  4970. .search_nav > .right > span.active::before {
  4971. content: "";
  4972. position: absolute;
  4973. bottom: -10px;
  4974. width: 15px;
  4975. height: 3px;
  4976. background: #3681fc;
  4977. left: 50%;
  4978. transform: translateX(-50%);
  4979. }
  4980. .search_nav > .left {
  4981. display: flex;
  4982. align-items: center;
  4983. margin-left: auto;
  4984. }
  4985. .search_nav > .right > span.active2 {
  4986. color: #3681fc;
  4987. font-weight: 600;
  4988. }
  4989. .search_nav > .right > span.active2::before {
  4990. content: "";
  4991. position: absolute;
  4992. bottom: -10px;
  4993. width: 100%;
  4994. height: 3px;
  4995. background: #3681fc;
  4996. left: 50%;
  4997. transform: translateX(-50%);
  4998. }
  4999. .student_input >>> .el-input__inner {
  5000. height: 40px;
  5001. width: 190px;
  5002. font-size: 13px;
  5003. padding: 0 35px 0 10px;
  5004. }
  5005. .serach_icon {
  5006. position: absolute;
  5007. right: 12px;
  5008. top: 50%;
  5009. transform: translateY(-50%);
  5010. width: 13px;
  5011. height: 13px;
  5012. background: url("../../../../assets/icon/test/test_search.png") no-repeat;
  5013. background-size: 100% 100%;
  5014. cursor: pointer;
  5015. }
  5016. .title_content {
  5017. padding-bottom: 10px;
  5018. }
  5019. .title_content > .title_box {
  5020. width: calc(100% - 48px);
  5021. margin: 20px auto 0;
  5022. }
  5023. .title_content > .title_box > .title {
  5024. font-size: 18px;
  5025. display: flex;
  5026. min-height: 35px;
  5027. white-space: pre-line;
  5028. position: relative;
  5029. }
  5030. .title_content > .title_box > .title > .test_icon {
  5031. min-width: 20px;
  5032. height: 20px;
  5033. }
  5034. .title_content > .title_box > .detail {
  5035. font-size: 14px;
  5036. color: #00000099;
  5037. margin-top: 8px;
  5038. white-space: pre-line;
  5039. }
  5040. .title_content > .title_box > .content1 {
  5041. display: flex;
  5042. width: 100%;
  5043. margin-top: 10px;
  5044. }
  5045. .title_content > .title_box > .content1 >>> .el-progress__text {
  5046. color: #3681fc;
  5047. min-width: 55px;
  5048. font-size: 16px !important;
  5049. }
  5050. .title_content > .title_box > .content1 > .left {
  5051. width: calc(100% - 620px);
  5052. border: 1px solid #e7e7e7;
  5053. }
  5054. .title_content > .title_box > .content1 > .left > div + div {
  5055. border-top: 1px solid #e7e7e7;
  5056. }
  5057. .title_content > .title_box > .content1 > .left > .title,
  5058. .title_content > .title_box > .content1 > .left > .data {
  5059. display: flex;
  5060. height: 40px;
  5061. align-items: center;
  5062. width: 100%;
  5063. padding: 0 15px;
  5064. box-sizing: border-box;
  5065. line-height: 16px;
  5066. }
  5067. .title_content > .title_box > .content1 > .left > .title > span,
  5068. .title_content > .title_box > .content1 > .left > .data > span {
  5069. overflow: hidden;
  5070. text-overflow: ellipsis;
  5071. white-space: nowrap;
  5072. }
  5073. .title_content > .title_box > .content1 > .left > .title > span:nth-child(1),
  5074. .title_content > .title_box > .content1 > .left > .data > span:nth-child(1) {
  5075. width: calc(100% - 320px - 110px);
  5076. }
  5077. .title_content > .title_box > .content1 > .left > .title > span:nth-child(2),
  5078. .title_content > .title_box > .content1 > .left > .data > span:nth-child(2) {
  5079. width: 110px;
  5080. }
  5081. .title_content > .title_box > .content1 > .left > .title > span:nth-child(3),
  5082. .title_content > .title_box > .content1 > .left > .data > span:nth-child(3) {
  5083. width: 320px;
  5084. }
  5085. .isDesktopTitle {
  5086. display: flex;
  5087. justify-content: space-around;
  5088. }
  5089. .isDesktopTitle > div {
  5090. width: 60px;
  5091. height: 30px;
  5092. line-height: 30px;
  5093. overflow: hidden;
  5094. white-space: nowrap;
  5095. text-overflow: ellipsis;
  5096. }
  5097. /* .isDesktopTitle:nth-child(1){
  5098. width: 60px;
  5099. }
  5100. .isDesktopTitle:nth-child(2){
  5101. width: 60px;
  5102. }
  5103. .isDesktopTitle:nth-child(3){
  5104. flex: 1;
  5105. } */
  5106. .title_content > .title_box > .content1 > .left > .title {
  5107. font-weight: 700;
  5108. background: #f9fafb;
  5109. }
  5110. .title_content > .title_box > .content1 > .right {
  5111. width: 600px;
  5112. margin-left: 20px;
  5113. border: 1px solid #e7e7e7;
  5114. min-height: 300px;
  5115. box-sizing: border-box;
  5116. }
  5117. .title_content > .title_box > .content2 {
  5118. display: flex;
  5119. width: 100%;
  5120. margin-top: 10px;
  5121. }
  5122. .title_content > .title_box > .content2 > .left {
  5123. width: calc(100% - 620px);
  5124. border: 1px solid #e7e7e7;
  5125. box-sizing: border-box;
  5126. }
  5127. .title_content > .title_box > .content2 > .left > div + div {
  5128. border-top: 1px solid #e7e7e7;
  5129. }
  5130. .title_content > .title_box > .content2 > .left > .title,
  5131. .title_content > .title_box > .content2 > .left > .data {
  5132. display: flex;
  5133. height: 40px;
  5134. align-items: center;
  5135. width: 100%;
  5136. padding: 0 15px;
  5137. box-sizing: border-box;
  5138. line-height: 16px;
  5139. }
  5140. .title_content > .title_box > .content2 > .left > .title > span,
  5141. .title_content > .title_box > .content2 > .left > .data > span {
  5142. overflow: hidden;
  5143. text-overflow: ellipsis;
  5144. white-space: nowrap;
  5145. }
  5146. .title_content > .title_box > .content2 > .left > .title > span:nth-child(1),
  5147. .title_content > .title_box > .content2 > .left > .data > span:nth-child(1) {
  5148. width: 55px;
  5149. }
  5150. .title_content > .title_box > .content2 > .left > .title > span:nth-child(2),
  5151. .title_content > .title_box > .content2 > .left > .data > span:nth-child(2) {
  5152. width: 110px;
  5153. }
  5154. .title_content > .title_box > .content2 > .left > .title > span:nth-child(3),
  5155. .title_content > .title_box > .content2 > .left > .data > span:nth-child(3) {
  5156. max-width: calc(100% - 110px - 55px);
  5157. }
  5158. .title_content > .title_box > .content2 > .left > .title {
  5159. font-weight: 700;
  5160. background: #f9fafb;
  5161. }
  5162. .title_content > .title_box > .content2 > .right {
  5163. width: 600px;
  5164. margin-left: 20px;
  5165. border: 1px solid #e7e7e7;
  5166. box-sizing: border-box;
  5167. }
  5168. .title_content > .title_box > .content2 > .right >>> .wordCloud {
  5169. height: auto;
  5170. min-height: 300px;
  5171. }
  5172. .title_content > .title_box > .content3 {
  5173. display: flex;
  5174. width: 100%;
  5175. overflow: auto;
  5176. }
  5177. .title_content > .title_box > .content3 > .file {
  5178. min-width: 200px;
  5179. width: 200px;
  5180. height: 140px;
  5181. margin: 10px 10px 10px 0px;
  5182. border-radius: 15px;
  5183. box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
  5184. overflow: hidden;
  5185. margin-right: 15px;
  5186. position: relative;
  5187. display: flex;
  5188. flex-direction: column;
  5189. }
  5190. .title_content > .title_box > .content3 > .file > .img {
  5191. width: 100%;
  5192. height: calc(100% - 35px);
  5193. object-fit: cover;
  5194. cursor: pointer;
  5195. }
  5196. .title_content > .title_box > .content3 > .file > .del {
  5197. position: absolute;
  5198. width: 25px;
  5199. top: 10px;
  5200. right: 10px;
  5201. cursor: pointer;
  5202. }
  5203. .title_content > .title_box > .content3 > .file > .download {
  5204. position: absolute;
  5205. width: 25px;
  5206. top: 10px;
  5207. right: 35px;
  5208. cursor: pointer;
  5209. opacity: 0.8;
  5210. }
  5211. .title_content > .title_box > .content3 > .file > .name {
  5212. height: 35px;
  5213. width: 100%;
  5214. background: #f9f9f9;
  5215. display: flex;
  5216. align-items: center;
  5217. padding: 0 10px;
  5218. box-sizing: border-box;
  5219. }
  5220. .title_content > .title_box > .content3 > .file > .name > span {
  5221. display: block;
  5222. text-overflow: ellipsis;
  5223. max-width: 100%;
  5224. white-space: nowrap;
  5225. overflow: hidden;
  5226. }
  5227. .table_content {
  5228. /* width: calc(100% - 48px);
  5229. margin: 20px auto 0; */
  5230. padding: 20px 24px;
  5231. width: 100%;
  5232. box-sizing: border-box;
  5233. }
  5234. .table_content >>> .el-table td {
  5235. padding: 5px 0;
  5236. }
  5237. .isDesktopTable_content {
  5238. width: 100%;
  5239. }
  5240. .isDTitle {
  5241. display: flex;
  5242. justify-content: space-between;
  5243. }
  5244. .isDBri {
  5245. display: flex;
  5246. padding: 15px 0;
  5247. font-size: 14px;
  5248. color: rgba(0, 0, 0, 0.4);
  5249. flex-direction: column;
  5250. height: 80px;
  5251. justify-content: space-between;
  5252. }
  5253. .answer_type {
  5254. background: #f0f2f5;
  5255. padding: 5px 10px;
  5256. display: block;
  5257. border-radius: 3px;
  5258. margin: 5px;
  5259. }
  5260. .table_file{
  5261. max-height: 250px;
  5262. overflow-x:hidden ;
  5263. }
  5264. .table_file > .file {
  5265. min-width: 100px;
  5266. width: 100px;
  5267. height: 70px;
  5268. margin: 10px 10px 10px 0px;
  5269. border-radius: 5px;
  5270. box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
  5271. overflow: hidden;
  5272. margin-right: 15px;
  5273. position: relative;
  5274. display: flex;
  5275. flex-direction: column;
  5276. }
  5277. .table_file > .file > .img {
  5278. width: 100%;
  5279. height: calc(100% - 20px);
  5280. object-fit: cover;
  5281. cursor: pointer;
  5282. }
  5283. .table_file > .file > .del {
  5284. position: absolute;
  5285. width: 25px;
  5286. top: 10px;
  5287. right: 10px;
  5288. cursor: pointer;
  5289. }
  5290. .table_file > .file > .download {
  5291. position: absolute;
  5292. width: 25px;
  5293. top: 10px;
  5294. right: 35px;
  5295. cursor: pointer;
  5296. opacity: 0.8;
  5297. }
  5298. .table_file > .file > .name {
  5299. height: 20px;
  5300. width: 100%;
  5301. background: #f9f9f9;
  5302. display: flex;
  5303. align-items: center;
  5304. padding: 0 10px;
  5305. box-sizing: border-box;
  5306. font-size: 12px;
  5307. }
  5308. .table_file > .file > .name > span {
  5309. display: block;
  5310. text-overflow: ellipsis;
  5311. max-width: 100%;
  5312. white-space: nowrap;
  5313. overflow: hidden;
  5314. }
  5315. .btnA {
  5316. color: #fff;
  5317. background-color: #0061ff;
  5318. padding: 0 24px;
  5319. font-size: 14px;
  5320. min-width: 64px;
  5321. font-weight: 500;
  5322. border-radius: 4px;
  5323. box-sizing: border-box;
  5324. border: none;
  5325. cursor: pointer;
  5326. transition: all 0.2s ease-in-out;
  5327. height: 36px;
  5328. display: flex;
  5329. align-items: center;
  5330. justify-content: center;
  5331. line-height: 1;
  5332. margin-right: 10px;
  5333. position: relative;
  5334. }
  5335. .buttonBox {
  5336. position: absolute;
  5337. bottom: -0;
  5338. transform: translateY(100%);
  5339. background: #fff;
  5340. border-radius: 5px;
  5341. box-shadow: 0 0 3px 1px #e3e3e3;
  5342. width: 100%;
  5343. z-index: 999;
  5344. }
  5345. .buttonBox > div {
  5346. height: 40px;
  5347. line-height: 40px;
  5348. width: 100%;
  5349. text-align: center;
  5350. color: #000;
  5351. box-sizing: border-box;
  5352. }
  5353. .buttonBox > div + div {
  5354. border-top: 1px solid #e0e0e0;
  5355. }
  5356. .buttonBox > div:hover {
  5357. background: #f6f8ff;
  5358. }
  5359. .content4 {
  5360. width: 100%;
  5361. height: auto;
  5362. display: flex;
  5363. flex-wrap: nowrap;
  5364. overflow: auto;
  5365. }
  5366. .out_box {
  5367. display: flex;
  5368. flex-direction: column;
  5369. flex-wrap: nowrap;
  5370. /* width: 200px; */
  5371. min-width: 280px;
  5372. width: 280px;
  5373. background: #fff;
  5374. /* background-color: white; */
  5375. margin-right: 15px;
  5376. /* border: 1px solid #ccc; */
  5377. height: fit-content;
  5378. box-sizing: border-box;
  5379. border-radius: 0px 0px 5px 5px;
  5380. /* overflow: hidden; */
  5381. margin-bottom: 15px;
  5382. position: relative;
  5383. border-radius: 8px;
  5384. box-sizing: border-box;
  5385. overflow: hidden;
  5386. border: 1px solid #3682fc00;
  5387. cursor: pointer;
  5388. border: 1px solid #6a9ff5;
  5389. height: auto;
  5390. }
  5391. .out_boxActive {
  5392. box-sizing: border-box;
  5393. border: 3px solid #3681fc !important;
  5394. }
  5395. .out_box:hover {
  5396. border: 1px solid #3681fc;
  5397. }
  5398. .bottom_box {
  5399. width: 100%;
  5400. display: flex;
  5401. padding: 10px;
  5402. flex-direction: column;
  5403. box-sizing: border-box;
  5404. height: 121px;
  5405. flex-wrap: nowrap;
  5406. justify-content: space-evenly;
  5407. }
  5408. .bottom_box > div:nth-child(1) {
  5409. width: 100%;
  5410. /* overflow: hidden;
  5411. text-overflow: ellipsis;
  5412. white-space: nowrap;
  5413. font-weight: bold; */
  5414. display: flex;
  5415. align-items: center;
  5416. justify-content: space-between;
  5417. }
  5418. .bottom_box > div:nth-child(1) > span:nth-child(1) {
  5419. max-width: 100%;
  5420. overflow: hidden;
  5421. text-overflow: ellipsis;
  5422. white-space: nowrap;
  5423. font-weight: bold;
  5424. }
  5425. .bottom_box > div:nth-child(1) > span:nth-child(2) {
  5426. min-width: fit-content;
  5427. font-size: 14px;
  5428. color: #8c8c8c;
  5429. }
  5430. .tup {
  5431. width: 100%;
  5432. height: auto;
  5433. margin: 0 auto;
  5434. overflow: hidden;
  5435. display: flex;
  5436. flex-direction: column;
  5437. align-items: center;
  5438. padding: 10px;
  5439. box-sizing: border-box;
  5440. }
  5441. .tup > img {
  5442. width: 100%;
  5443. /* height: 100%; */
  5444. height: 150px;
  5445. /* object-fit: cover; */
  5446. object-fit: contain;
  5447. }
  5448. .kc_time {
  5449. margin-top: 8px;
  5450. font-size: 14px;
  5451. color: #717c8d;
  5452. }
  5453. .kc_time + .kc_time {
  5454. margin-top: 0;
  5455. }
  5456. .kc_t {
  5457. margin-top: 5px;
  5458. width: 100%;
  5459. white-space: nowrap;
  5460. overflow: hidden;
  5461. text-overflow: ellipsis;
  5462. display: flex;
  5463. align-items: center;
  5464. justify-content: space-between;
  5465. }
  5466. .kc_t > span:nth-child(1) {
  5467. max-width: 100%;
  5468. overflow: hidden;
  5469. text-overflow: ellipsis;
  5470. white-space: nowrap;
  5471. }
  5472. .kc_t > span:nth-child(2) {
  5473. min-width: fit-content;
  5474. font-size: 14px;
  5475. color: #8c8c8c;
  5476. }
  5477. .title_box > .title > .title_downBtn {
  5478. position: absolute;
  5479. right: 10px;
  5480. top: 0;
  5481. }
  5482. .fileLoadDiv >>> .el-dialog__header {
  5483. display: none;
  5484. }
  5485. .fileLoadDiv >>> .el-dialog__body {
  5486. display: flex;
  5487. justify-content: center;
  5488. }
  5489. .fileLoadDiv >>> .el-dialog {
  5490. margin-top: 60vh !important;
  5491. width: 200px !important;
  5492. height: 80px;
  5493. display: flex;
  5494. justify-content: center;
  5495. align-items: center;
  5496. border-radius: 15px;
  5497. }
  5498. .mask {
  5499. background-color: rgb(0 0 0 / 30%);
  5500. /* position: fixed; */
  5501. position: absolute;
  5502. top: 0;
  5503. left: 0;
  5504. width: 100%;
  5505. height: 100%;
  5506. z-index: 90;
  5507. display: flex;
  5508. align-items: center;
  5509. justify-content: center;
  5510. }
  5511. .progressBox {
  5512. width: 300px;
  5513. height: 150px;
  5514. background: #fff;
  5515. border-radius: 10px;
  5516. box-shadow: 0 0 6px 1px #bfbfbf;
  5517. display: flex;
  5518. align-items: center;
  5519. justify-content: center;
  5520. flex-direction: column;
  5521. position: relative;
  5522. color: #6c6c6c;
  5523. }
  5524. .progressBox >>> .el-progress-bar__outer {
  5525. background-color: #d1dfff !important;
  5526. }
  5527. .progressBox .lbox {
  5528. height: 50px;
  5529. font-size: 19px;
  5530. display: flex;
  5531. align-items: center;
  5532. color: #747474;
  5533. }
  5534. .progressBox .lbox img {
  5535. width: 40px;
  5536. margin-right: 20px;
  5537. }
  5538. .boxSticky {
  5539. position: sticky;
  5540. top: 0;
  5541. z-index: 999;
  5542. background: #fff;
  5543. }
  5544. .aiBoxRight {
  5545. height: calc(100% - 158px - 46px);
  5546. width: 500px;
  5547. margin: 0 auto;
  5548. position: fixed;
  5549. z-index: 999;
  5550. right: 30px;
  5551. bottom: 10px;
  5552. box-shadow: 0 0 5px 2px #00000045;
  5553. border-radius: 5px;
  5554. overflow: hidden;
  5555. }
  5556. .tableDatePicker {
  5557. width: 20px;
  5558. height: 20px;
  5559. margin-left: 5px;
  5560. }
  5561. .tableDatePicker >>> .el-date-editor {
  5562. width: 100% !important;
  5563. height: 100% !important;
  5564. padding: 0 !important;
  5565. cursor: pointer;
  5566. background: none;
  5567. border: none;
  5568. }
  5569. .tableDatePicker >>> .el-date-editor > i {
  5570. display: none;
  5571. }
  5572. .tableDatePicker >>> .el-date-editor > input {
  5573. display: none;
  5574. }
  5575. .tableDatePicker >>> .el-date-editor > span {
  5576. width: 100%;
  5577. height: 100%;
  5578. display: flex;
  5579. justify-content: center;
  5580. align-items: center;
  5581. color: #9095a7;
  5582. }
  5583. .tableDatePicker >>> .el-date-editor > .el-range__close-icon {
  5584. display: block;
  5585. position: relative;
  5586. top: -6px;
  5587. color: red;
  5588. }
  5589. .paging{
  5590. width: 100%;
  5591. height: 40px;
  5592. display: flex;
  5593. justify-content: flex-end;
  5594. align-items: center;
  5595. margin-top:auto ;
  5596. }
  5597. .noWordCloud{
  5598. width: 100%;
  5599. height: 100%;
  5600. min-height: 300px;
  5601. display: flex;
  5602. justify-content: center;
  5603. align-items: center;
  5604. }
  5605. .noWordCloud>div{
  5606. display: flex;
  5607. align-items: center;
  5608. }
  5609. .noWordCloud>div>img{
  5610. width: 40px;
  5611. height: 40px;
  5612. margin-left: 5px;
  5613. }
  5614. .timePickerActive{
  5615. color: #409EFF;
  5616. }
  5617. .openCeBox{
  5618. width: 320px;
  5619. display: flex;
  5620. flex-direction: column;
  5621. gap: 10px;
  5622. font-size: 14px !important;
  5623. padding: 10px;
  5624. box-sizing: border-box;
  5625. position: relative;
  5626. }
  5627. .openCeBoxLoading{
  5628. position: absolute;
  5629. left: 0;
  5630. top: 0;
  5631. width: 100%;
  5632. height: 100%;
  5633. z-index: 10;
  5634. background: #fff;
  5635. opacity: .8;
  5636. display: flex;
  5637. align-items: center;
  5638. justify-content: center;
  5639. color: #000;
  5640. }
  5641. .TopTit{
  5642. font-family: PingFang SC;
  5643. font-weight: 600;
  5644. font-size: 16px;
  5645. line-height: 24px;
  5646. color: #000;
  5647. }
  5648. .Topkong{
  5649. font-family: PingFang SC;
  5650. font-weight: 400;
  5651. font-size: 12px;
  5652. color: #000;
  5653. display: flex;
  5654. align-items: center;
  5655. gap: 5px;
  5656. cursor: pointer;
  5657. }
  5658. .BtnOPC{
  5659. width: 50px;height: 30px;font-size: 14px;display: flex;
  5660. justify-content: center;
  5661. align-items: center;
  5662. background: #E7E7E7;
  5663. }
  5664. .quoteBlock{
  5665. position: absolute;
  5666. right: 0;
  5667. width: 220px;
  5668. background: #fff;
  5669. border-radius: 10px;
  5670. color: #000;
  5671. z-index: 100001;
  5672. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 浅灰色阴影 */
  5673. border-radius: 5px;overflow: hidden;
  5674. }
  5675. .quoteBlock >>> .el-input__inner{
  5676. border-radius: 0 !important;
  5677. border: none !important;
  5678. box-shadow: none !important;
  5679. resize: none !important;
  5680. border-bottom: 1px #DCDFE6 solid !important;
  5681. }
  5682. .quoteBlockCon{
  5683. padding: 10px 10px;box-sizing: border-box;
  5684. display: flex;
  5685. flex-direction: column;
  5686. gap: 8px;
  5687. font-size: 14px;
  5688. height: 200px;
  5689. overflow: auto;
  5690. }
  5691. .quoteBlockCon > div{
  5692. height: 25px;line-height: 25px;
  5693. cursor: pointer;
  5694. padding: 0 5px;
  5695. box-sizing: border-box;
  5696. border-radius: 5px;
  5697. }
  5698. .maskCss{
  5699. /* background: #000; */
  5700. position: fixed;
  5701. top: 0;
  5702. left: 0;
  5703. width: 100%;
  5704. height: 100%;
  5705. z-index: 10000;
  5706. opacity: .5;
  5707. }
  5708. .SPCE{
  5709. font-size: 12px;
  5710. background: #fff;
  5711. padding: 2px 5px;box-sizing: border-box;
  5712. border-radius: 3px;
  5713. }
  5714. .selCss{
  5715. background: #e7e7e7;
  5716. color:#0061ff;
  5717. }
  5718. .proBar{
  5719. background: #dae0f0;
  5720. font-size: 14px;
  5721. font-weight: normal;
  5722. color: #6f93ea;
  5723. padding: 4px;
  5724. border-radius: 3px;
  5725. }
  5726. .file_more{
  5727. width:20px;
  5728. height:20px;
  5729. margin-left: 10px;
  5730. margin-top: auto;
  5731. margin-bottom: 10px;
  5732. }
  5733. .file_more>svg{
  5734. width: 100%;
  5735. height:100%;
  5736. cursor: pointer;
  5737. }
  5738. .el-checkbox{
  5739. display: flex;
  5740. align-items: center;
  5741. }
  5742. .score_box{
  5743. font-size: 22px;
  5744. margin-right: 20px;
  5745. font-weight:bold;
  5746. }
  5747. .typeStatus{
  5748. padding: 4px 8px;
  5749. border-radius: 4px;
  5750. border: solid 1px gray;
  5751. display: flex;
  5752. align-items: center;
  5753. justify-content: center;
  5754. font-size: 12px;
  5755. }
  5756. .typeStatus_2{
  5757. background:#F0F9F2;
  5758. border-color: #B5E3BF;
  5759. color:#5FC875;
  5760. }
  5761. .typeStatus_4{
  5762. background:#FEF5EC;
  5763. border-color: #FAD0A1;
  5764. color:#F7933B;
  5765. }
  5766. .typeStatus_1{
  5767. background:#EEF3FC;
  5768. border-color: #0F40F5;
  5769. color:#0F40F5;
  5770. }
  5771. </style>