index.vue 209 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179
  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" v-if="review ==='1'">
  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'?'150px':'250px'"
  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' && scope.row.isReview!=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' && scope.row.isReview!=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. <returnTestDialog ref="returnTestDialogRef" :title="testJson.title" @success="getData"/>
  2013. </div>
  2014. </template>
  2015. <script>
  2016. import shareBox from "../shareBox/index.vue";
  2017. import videoIcon from "../../../../assets/icon/fileIcon/isVideo.png";
  2018. import wordIcon from "../../../../assets/icon/fileIcon/isWord.png";
  2019. import fileIcon from "../../../../assets/icon/fileIcon/word2.png";
  2020. import wVideo from "../file/wVideo.vue";
  2021. import wpdf from "../file/wPdf2.vue";
  2022. import wOffice from "../file/wOffice.vue";
  2023. import wordcloud from "vue-wordcloud";
  2024. import checkPie from "../data/checkPie.vue";
  2025. import { downloadPDF } from "../../../tools/pdf";
  2026. import JSZip from "jszip";
  2027. import FileSaver from "file-saver";
  2028. import XLSX from "xlsx-js-style";
  2029. import aiBoxRight from "./aiBoxRight.vue";
  2030. import { v4 as uuidv4 } from "uuid";
  2031. // word模板
  2032. import docxTemplateDialog from "./docxTemplateDialog";
  2033. //查看文件
  2034. import checkFileListDialog from "./checkFileListDialog.vue";
  2035. //退回弹窗
  2036. import returnTestDialog from "./returnTestDialog.vue";
  2037. const getFile = (url) => {
  2038. return new Promise((resolve, reject) => {
  2039. var credentials = {
  2040. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  2041. secretAccessKey: "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",
  2042. }; //秘钥形式的登录上传
  2043. window.AWS.config.update(credentials);
  2044. window.AWS.config.region = "cn-northwest-1"; //设置区域
  2045. let url2 = url;
  2046. let _url2 = "";
  2047. if (
  2048. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  2049. ) {
  2050. _url2 = url2.split(
  2051. "https://view.officeapps.live.com/op/view.aspx?src="
  2052. )[1];
  2053. } else {
  2054. _url2 = url2;
  2055. }
  2056. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  2057. let name = decodeURIComponent(
  2058. _url2
  2059. .split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
  2060. .replace(/\+/g, " ")
  2061. );
  2062. var params = {
  2063. Bucket: "ccrb",
  2064. Key: name,
  2065. };
  2066. s3.getObject(params, function (err, data) {
  2067. if (err) {
  2068. console.log(err, err.stack);
  2069. resolve({ data: 1 });
  2070. } else {
  2071. if(data.Body.byteLength <= 85 * 1024 * 1024){
  2072. resolve({ data: data.Body });
  2073. }else{
  2074. resolve({ data: 1 });
  2075. }
  2076. console.log(data);
  2077. } // sxuccessful response
  2078. });
  2079. // axios({
  2080. });
  2081. };
  2082. export default {
  2083. components: {
  2084. shareBox,
  2085. wVideo,
  2086. wpdf,
  2087. wOffice,
  2088. checkPie,
  2089. wordcloud,
  2090. aiBoxRight,
  2091. docxTemplateDialog,
  2092. checkFileListDialog,
  2093. returnTestDialog
  2094. },
  2095. data() {
  2096. return {
  2097. gotype:(window.topU && window.topU.gotype) ? window.topU.gotype : '',
  2098. aiscoId:'',
  2099. aiscoLoading:true,
  2100. cueWord:{
  2101. openCeCon:'', //指令
  2102. openCeTit:'', //标题
  2103. fieldList:[]
  2104. },
  2105. cueWordCopy:{
  2106. openCeCon:'', //指令
  2107. openCeTit:'', //标题
  2108. fieldList:[]
  2109. },
  2110. scoList:[],
  2111. scoListCopy:[], //没有什么别的用处只是为了展示用,让表单在评分的过程中不清零
  2112. quoteV:false,
  2113. openCeVal:false,
  2114. opQvisible:false,
  2115. opQvisible2:false,
  2116. opcInp:'',
  2117. languageSetting: 0,
  2118. userid: this.$route.query.userid,
  2119. oid: this.$route.query.oid,
  2120. org: this.$route.query.org,
  2121. role: this.$route.query.role,
  2122. cid: this.$route.query.cid,
  2123. isN: this.$route.query.isN,
  2124. peopleId: this.$route.query.peopleId,
  2125. back:this.$route.query.back,
  2126. screenWidth: window.innerWidth,
  2127. examineId: this.$route.query.examineId,
  2128. tType: this.$route.query.tType,
  2129. isDesktop: false,
  2130. aiChatV: false,
  2131. title: "",
  2132. testType: [],
  2133. see: false,
  2134. cJson: [],
  2135. loading: false,
  2136. look: "",
  2137. TeachingOptions: [],
  2138. TeachingValue: "",
  2139. SubmitTimeOptions: [],
  2140. SubmitTime: "",
  2141. tableHeight: 500,
  2142. isLoading: false,
  2143. pageSize: 10,
  2144. total: 0,
  2145. page: 1,
  2146. tableData: [],
  2147. testJson: {},
  2148. works: [],
  2149. iscount: 0,
  2150. pcount: 0,
  2151. stype: 1,
  2152. courseName: "",
  2153. dialogVisibleShare: false,
  2154. worksArray: [],
  2155. tableWorksArray: [],
  2156. testArray: [],
  2157. options2: {
  2158. 1: "选择题",
  2159. // 2: "问答题",
  2160. 3: "问答题",
  2161. 4: "添加文档",
  2162. 5: "附件",
  2163. },
  2164. videoIcon: videoIcon,
  2165. wordIcon: wordIcon,
  2166. fileIcon: fileIcon,
  2167. dialogVisiblePdf: false,
  2168. dialogVisibleVideo: false,
  2169. dialogVisibleOffice: false,
  2170. wurl: "",
  2171. chapters: [],
  2172. filterPlacement: "bottom-end",
  2173. pdfLoading: false,
  2174. btnDisplay: false,
  2175. fileLoading: [],
  2176. selectWorkList: [],
  2177. tableDatePicker: [],
  2178. submissionTimePicker:[],
  2179. // fileLoadCount: [],
  2180. // fileLoadNum: [],
  2181. // infoprogress: [],
  2182. teaType: [],
  2183. examineData:null,
  2184. disableBack: this.$route.query.disableBack === 'true',
  2185. timeLimit:this.$route.query.timeLimit,
  2186. sortTime:[],
  2187. review:this.$route.query.review,
  2188. defaultTimeLimit:[],
  2189. typeStatusList:["","未提交","已提交","","已退回"]
  2190. };
  2191. },
  2192. watch: {},
  2193. computed: {
  2194. // 去除不能评分的指令
  2195. fie(){
  2196. return function (val) {
  2197. console.log('fie',val);
  2198. const con = val.filter(e => [12,11,6,14].indexOf(e.type) == -1)
  2199. return con
  2200. }
  2201. },
  2202. // ai评分分数
  2203. userSco(){
  2204. return function (val) {
  2205. const con = this.scoListCopy.find(u => u.id === val);
  2206. // console.log('con',con);
  2207. return con ? con.sco : '';
  2208. }
  2209. },
  2210. TeachNameCpt: function () {
  2211. // `this` 指向 vm 实例
  2212. return this.TeachingOptions.filter((i) => {
  2213. return i.id == this.TeachingValue;
  2214. });
  2215. },
  2216. // vcWords() {
  2217. // return function (array) {
  2218. // let _array = [];
  2219. // if (array.length) {
  2220. // for (var i = 0; i < array.length; i++) {
  2221. // _array.push(
  2222. // {
  2223. // text: array[i].name,
  2224. // weight: array[i].count,
  2225. // }
  2226. // )
  2227. // }
  2228. // }
  2229. // console.log(_array);
  2230. // return array.length ? _array : [];
  2231. // };
  2232. // },
  2233. getScore() {
  2234. return function (item) {
  2235. let array = [];
  2236. for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
  2237. array.push(i);
  2238. }
  2239. return item.answer2 ? array[item.answer2] : "";
  2240. };
  2241. },
  2242. selectType() {
  2243. return function (item) {
  2244. if (item.type == 1 && item.atype == 2) {
  2245. return "多选题";
  2246. } else if (item.type == 1 && item.atype == 1) {
  2247. return "单选题";
  2248. } else if (item.type == 3) {
  2249. return "问答题";
  2250. } else if (item.type == 5) {
  2251. return "附件";
  2252. } else if (item.type == 6 || item.type == 11) {
  2253. return "课程";
  2254. } else if (item.type == 7) {
  2255. return "评分";
  2256. } else if (item.type == 8) {
  2257. return "日期";
  2258. }
  2259. };
  2260. },
  2261. selectType2() {
  2262. return function (val1, val2) {
  2263. if (val1 == 1 && val2 == 2) {
  2264. return "多选题";
  2265. } else if (val1 == 1 && val2 == 1) {
  2266. return "单选题";
  2267. } else if (val1 == 3) {
  2268. return "问答题";
  2269. } else if (val1 == 5) {
  2270. return "附件";
  2271. } else if (val1 == 6) {
  2272. return "课程";
  2273. } else if (val1 == 7) {
  2274. return "评分";
  2275. } else if (val1 == 8) {
  2276. return "日期";
  2277. }
  2278. };
  2279. },
  2280. // 获取评分的平均分
  2281. getAverageScore() {
  2282. return (_index) => {
  2283. let _result = 0;
  2284. let _sum = 0;
  2285. this.worksArray.forEach((i1) => {
  2286. _result += i1.array[_index].json.answer2;
  2287. _sum += 1;
  2288. });
  2289. _result = _sum ? (_result / _sum).toFixed(2) : 0;
  2290. return _result ? _result : 0;
  2291. };
  2292. },
  2293. getTimeFilterText() {
  2294. return (item, index) => {
  2295. let _result = [];
  2296. if (item.type == 8) {
  2297. let array = [];
  2298. this.worksArray.forEach((i) => {
  2299. if (i.array[index].type == 8) {
  2300. let _data = i.array[index].json.answer2;
  2301. if (!array.map((r) => r.value).includes(_data)) {
  2302. array.push({ text: _data, value: _data });
  2303. }
  2304. }
  2305. });
  2306. array.sort((a, b) => {
  2307. const dateA = new Date(
  2308. a.value.replace(/年|月/g, "-").replace(/日/g, "")
  2309. );
  2310. const dateB = new Date(
  2311. b.value.replace(/年|月/g, "-").replace(/日/g, "")
  2312. );
  2313. return dateB - dateA; // 从小到大排序
  2314. });
  2315. console.log("👉排序:", array);
  2316. _result = array;
  2317. }
  2318. return _result;
  2319. };
  2320. },
  2321. getTType() {
  2322. return function (pid, cclassid) {
  2323. if(cclassid){
  2324. let string = [];
  2325. this.teaType.forEach((e) => {
  2326. if (e.id == pid) {
  2327. for (var i = 0; i < e.child.length; i++) {
  2328. if (cclassid.includes(e.child[i].id)) {
  2329. string.push(e.child[i].name);
  2330. }
  2331. }
  2332. }
  2333. });
  2334. return string.length ? string.join(",") : "-";
  2335. }else{
  2336. return "-";
  2337. }
  2338. };
  2339. },
  2340. getNameTTypeFiler() {
  2341. return (item) => {
  2342. return item.child.length ? item.child.map(child => ({
  2343. text: child.name,
  2344. value: child.id
  2345. })) : null;
  2346. };
  2347. },
  2348. pickerOptions(){
  2349. return (dataList)=>{
  2350. let _result = {
  2351. shortcuts:[]
  2352. }
  2353. if(dataList && dataList.length>0){
  2354. for(let i = 0;i<dataList.length;i++){
  2355. if(dataList[i].time.length<=0)continue;
  2356. _result.shortcuts.push({
  2357. text:dataList[i].title?dataList[i].title:"-",
  2358. onClick(picker){
  2359. let startTime = dataList[i].time[0];
  2360. let endTime = dataList[i].time[1]
  2361. picker.$emit('pick', [startTime, endTime]);
  2362. }
  2363. })
  2364. }
  2365. }
  2366. if(this.sortTime.length>0){
  2367. this.sortTime.forEach(i=>{
  2368. _result.shortcuts.push({
  2369. text:i.title?i.title:"-",
  2370. onClick(picker){
  2371. picker.$emit('pick', [new Date(i.time[0]), new Date(i.time[1])]);
  2372. }
  2373. })
  2374. })
  2375. }
  2376. return _result;
  2377. }
  2378. },
  2379. scoList2(){
  2380. let result = [];
  2381. if(this.peopleId){
  2382. result = this.scoList.filter(i=>this.tableWorksArray.map(i=>i.id).indexOf(i.id) != -1)
  2383. }else{
  2384. result = this.scoList;
  2385. }
  2386. return result
  2387. }
  2388. },
  2389. methods: {
  2390. // 清除分数
  2391. cleancueWord(){
  2392. if (!this.aiscoId) return
  2393. let params = [{
  2394. tid:this.cid
  2395. }]
  2396. console.log('params',params);
  2397. this.ajax
  2398. .post(this.$store.state.api + "deltestAisco", params)
  2399. .then((res) => {
  2400. console.log(res);
  2401. this.$message({
  2402. message: "删除成功",
  2403. type: "success"
  2404. });
  2405. this.getAiSco()
  2406. })
  2407. .catch((err) => {
  2408. this.$message({
  2409. message: "删除失败",
  2410. type: "error"
  2411. });
  2412. console.error(err);
  2413. });
  2414. this.opQvisible = false
  2415. },
  2416. // 点击开始评分(全部进行评分)
  2417. async markSco(){
  2418. if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
  2419. if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
  2420. if (this.cueWord.fieldList.length == 0) return this.$message.error('请选择引用字段')
  2421. this.aiscoLoading = true
  2422. let forAllList = [];
  2423. this.scoList = []
  2424. for (let kin = 0; kin < this.tableWorksArray.length; kin++) {
  2425. let userWork = []
  2426. let _fileid = []
  2427. let kpl = this.tableWorksArray[kin].array
  2428. // console.log('kpl',this.tableWorksArray[kin]);
  2429. for (let index = 0; index < kpl.length; index++) {
  2430. if ((kpl[index].type == 3 || kpl[index].type == 13 || kpl[index].type ==8) && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2431. if (kpl[index].json.answer2) {
  2432. userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)
  2433. }else{
  2434. userWork.push(kpl[index].json.title +':'+ '')
  2435. }
  2436. }
  2437. if (kpl[index].type == 5 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2438. if (kpl[index].json.file && kpl[index].json.file[0].url) {
  2439. _fileid.push(kpl[index].json.file[0].url)
  2440. }
  2441. userWork.push(kpl[index].json.title+':' + _fileid.join('、'))
  2442. }
  2443. if (kpl[index].type == 7 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2444. if (kpl[index].json.answer2) {
  2445. userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
  2446. }else{
  2447. userWork.push(kpl[index].json.title+':'+'')
  2448. }
  2449. }
  2450. if (kpl[index].type == 1 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2451. let kk = []
  2452. if (kpl[index].json && kpl[index].json.answer2 && kpl[index].json.answer2.length) {
  2453. kpl[index].json.answer2.forEach((e)=>{
  2454. kk.push(kpl[index].json.array[e].option)
  2455. })
  2456. }
  2457. userWork.push(kpl[index].json.title+':' +kk.join(','))
  2458. }
  2459. }
  2460. let info = [
  2461. this.cueWord.fieldList.includes('序号') ? '序号:' + (kin + 1) : '',
  2462. this.cueWord.fieldList.includes('提交人') ? '提交人:' + this.tableWorksArray[kin].name : '',
  2463. this.cueWord.fieldList.includes('学段') ? '学段:' + this.getTType(this.teaType[0].id, this.tableWorksArray[kin].cclassid) : '',
  2464. this.cueWord.fieldList.includes('年级') ? '年级:' + this.getTType(this.teaType[1].id, this.tableWorksArray[kin].cclassid) : '',
  2465. this.cueWord.fieldList.includes('学科') ? '学科:' + this.getTType(this.teaType[2].id, this.tableWorksArray[kin].cclassid) : '',
  2466. this.cueWord.fieldList.includes('职务') ? '职务:' + this.getTType(this.teaType[3].id, this.tableWorksArray[kin].cclassid) : '',
  2467. this.cueWord.fieldList.includes('教龄') ? '教龄:' + this.getTType(this.teaType[4].id, this.tableWorksArray[kin].cclassid) : '',
  2468. this.cueWord.fieldList.includes('提交时间') ? '提交时间:' + this.tableWorksArray[kin].time : '',
  2469. userWork.filter(Boolean).join('\n')
  2470. ].filter(Boolean).join('\n');
  2471. forAllList.push({id:this.tableWorksArray[kin].id,data:info})
  2472. // console.log('info',info);
  2473. }
  2474. // console.log('forAllList',forAllList);
  2475. let messages = `
  2476. NOTICE
  2477. Role: 你是一个高级数据处理师。
  2478. - 深入理解各种数据处理标准,确保处理流程的准确性。
  2479. - 熟练掌握数据结构知识,能快速解析“字段名称:具体内容”结构的文本。
  2480. - 具备强大的逻辑分析能力,以便制定合理的数据处理流程。
  2481. - 有丰富的数据处理经验,能应对多种类型的数据操作。
  2482. - 拥有精准的数据分析能力,准确得出处理结果。
  2483. - 擅长根据不同评价标准进行数据评价,保证结果符合要求。
  2484. - 能够高效地处理大量数据,保证工作的时效性。
  2485. Language: ${this.getLang()}
  2486. ## 上下文
  2487. 在数据处理任务缺乏合适工具或人力时,如数据分析项目、数据审核任务场景下,存在多组特定结构的文本数据,需数据处理大师理解标准和内容,制定流程并处理数据,按要求输出结果。
  2488. ## 数据处理标准
  2489. ${this.cueWord.openCeCon}
  2490. ## 数据内容
  2491. ${JSON.stringify(forAllList)}
  2492. ## 任务
  2493. 1. 数据标准理解:详细了解{数据处理标准}(如准确性、完整性、一致性等要求)
  2494. 2. 数据内容理解: 阅读并理解{数据内容}包括多组“字段名称:具体内容”结构的文本数据。
  2495. 3. 处理流程制定:根据所理解的{数据处理标准},制定详细的数据处理流程,包括数据分析(如统计分析、关联分析等)、数据评价(根据标准打分或分类等)等步骤。
  2496. 4. 数据处理操作:按照制定的流程对数据进行分析、处理和评价等操作。
  2497. 5. 结果输出:仅输出按照用户要求处理后的结果,确保结果清晰、准确且易于理解。
  2498. ### 理论框架
  2499. ### 数据生命周期管理理论
  2500. 1. 基本原理:
  2501. - 数据生命周期涵盖数据的创建、存储、使用、共享、归档和销毁等阶段,每个阶段有不同的管理要求。
  2502. - 明确各阶段的数据特征与管理重点有助于确保数据质量和合规性。
  2503. 2. 具体应用:
  2504. - 确定处理阶段:根据数据处理任务确定数据处于生命周期的哪个阶段进行针对性处理。
  2505. - 遵循管理规范:按照各阶段的管理要求,如存储安全规范,在处理中保障数据。
  2506. - 规划流程:基于数据生命周期各阶段顺序规划合理的数据处理流程。
  2507. ### ETL(Extract,Transform,Load)理论
  2508. 1. 基本原理:
  2509. - ETL是数据仓库中的一种数据处理过程,包括抽取、转换和加载三个主要步骤。
  2510. - 用于将不同来源的数据整合到数据仓库中,保证数据的一致性和准确性。
  2511. 2. 具体应用:
  2512. - 数据抽取:从多组文本数据中提取所需的字段和内容。
  2513. - 数据转换:对抽取的数据按照标准进行格式转换、清洗等操作。
  2514. - 数据加载:将处理好的数据加载到合适的存储或输出结构中。
  2515. ### 数据质量评估理论
  2516. 1. 基本原理:
  2517. - 从准确性、完整性、一致性等多方面评估数据质量,以确保数据可靠。
  2518. - 不同的数据用途有不同的质量要求,需建立相应评估指标。
  2519. 2. 具体应用:
  2520. - 质量指标确定:根据处理标准确定数据质量评估指标。
  2521. - 数据检查:按照指标对处理过程中的数据进行检查。
  2522. - 结果验证:依据评估结果验证最终输出的数据是否符合要求。
  2523. ##响应
  2524. 严格按照用户的需求进行输出,不要输出多余的内容
  2525. ## 要求
  2526. - 以清晰的逻辑构建处理流程,步骤分明。
  2527. - 对数据内容进行全面分析,不遗漏任何关键信息。
  2528. - 根据评价标准严格进行评价操作,保证结果的公正性。
  2529. - 处理结果输出简洁明了,仅包含符合要求的内容。
  2530. - 考虑到可能存在的多种数据结构,保持处理方法的通用性。
  2531. - 针对数据处理过程中的特殊情况提供应对措施。
  2532. - 以专业的态度对待数据,确保数据的安全性与完整性。
  2533. - 输出格式[{id:数据id,sco:评分}]。
  2534. - 不输出分析过程,直接输出最后计算结果。
  2535. ## 限制
  2536. - 不应包含未经定义的数据处理术语,以免造成混淆。
  2537. - 避免输出与数据处理标准无关的内容。
  2538. - 不应包含模糊不清的处理步骤或操作。
  2539. - 避免提及无法获取的外部工具或资源,除非有替代方案。
  2540. - 不应包含未经证实的数据处理假设。
  2541. - 不要回复你不知道的内容
  2542. - 不要直接回复<demo>的内容
  2543. - 所输出的内容必须按照给定的格式进行组织,不能偏离框架要求。
  2544. - 请使用准确可靠的信息来源,确保规划的可行性和实用性。
  2545. - 如果查询信息不是真实信息,如 xxx 等占位字符,不要采纳或使用。
  2546. - 不要给用户提供任何虚假信息!不要给用户提供任何虚假信息!不要给用户提供任何虚假信息`;
  2547. // console.log('messages',messages);
  2548. let params = {
  2549. id: '978252d7-a26e-4e70-8d75-3336497abac1',
  2550. message: [
  2551. {
  2552. type: "text",
  2553. text: messages.replaceAll("\n", " ").replaceAll("*", "")
  2554. }
  2555. ],
  2556. userId: this.userid,
  2557. model: 'open-gpt-4.1',
  2558. file_ids: [],
  2559. sound_url: '',
  2560. temperature: 0.2,
  2561. top_p: 1,
  2562. max_completion_tokens: 100000,
  2563. // uid: _uid,
  2564. session_name: uuidv4(),
  2565. // assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
  2566. // message: [
  2567. // {
  2568. // type: "text",
  2569. // text: messages.replaceAll("\n", " ").replaceAll("*", "")
  2570. // }
  2571. // ],
  2572. // session_name: uuidv4(),
  2573. // userId: this.userid,
  2574. // file_ids: '',
  2575. // model: "gpt-4o-2024-11-20"
  2576. };
  2577. this.ajax
  2578. .post("https://appapi.cocorobo.cn/api/agentchats/ai_agent_chat", params)
  2579. .then(response => {
  2580. let data = response.data;
  2581. // console.log("data", data.message);
  2582. // console.log('kkkk',JSON.parse(data.message));
  2583. this.scoList = JSON.parse(data.message)
  2584. this.aiscoLoading = false
  2585. this.uploadSCo()
  2586. })
  2587. .catch(error => {
  2588. this.aiscoLoading = false
  2589. this.$message.error('评分失败')
  2590. reject(error)
  2591. console.log(error);
  2592. });
  2593. },
  2594. // 点击开始自动评分(未评分得数据进行评分)
  2595. async markScoAuto(){
  2596. let scoid = this.scoList.map(e=> e.id);
  2597. console.log('scoid',scoid);
  2598. let TabArr = this.tableWorksArray.filter(e=> scoid.indexOf(e.id) == -1)
  2599. console.log('this.TabArr',TabArr);
  2600. if (!TabArr.length) return this.$message.error('已全部评分')
  2601. if (!this.cueWord.openCeTit.trim()) return this.$message.error('请输入标题')
  2602. if (!this.cueWord.openCeCon.trim()) return this.$message.error('请输入指令')
  2603. if (this.cueWord.fieldList.length == 0) return this.$message.error('请选择引用字段')
  2604. this.aiscoLoading = true
  2605. let forAllList = [];
  2606. this.scoList = []
  2607. // 进行整理数据,将用户回答都存在一个数组里
  2608. for (let kin = 0; kin < TabArr.length; kin++) {
  2609. let userWork = []
  2610. let _fileid = []
  2611. let kpl = TabArr[kin].array
  2612. // console.log('kpl',this.TabArr[kin]);
  2613. for (let index = 0; index < kpl.length; index++) {
  2614. if ((kpl[index].type == 3 || kpl[index].type == 13 || kpl[index].type ==8) && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2615. if (kpl[index].json.answer2) {
  2616. userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)
  2617. }else{
  2618. userWork.push(kpl[index].json.title +':'+ '')
  2619. }
  2620. }
  2621. if (kpl[index].type == 5 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2622. if (kpl[index].json.file && kpl[index].json.file[0].url) {
  2623. _fileid.push(kpl[index].json.file[0].url)
  2624. }
  2625. userWork.push(kpl[index].json.title+':' + _fileid.join('、'))
  2626. }
  2627. if (kpl[index].type == 7 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2628. if (kpl[index].json.answer2) {
  2629. userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
  2630. }else{
  2631. userWork.push(kpl[index].json.title+':'+'')
  2632. }
  2633. }
  2634. if (kpl[index].type == 1 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
  2635. let kk = []
  2636. if (kpl[index].json && kpl[index].json.answer2 && kpl[index].json.answer2.length) {
  2637. kpl[index].json.answer2.forEach((e)=>{
  2638. kk.push(kpl[index].json.array[e].option)
  2639. })
  2640. }
  2641. userWork.push(kpl[index].json.title+':' +kk.join(','))
  2642. }
  2643. }
  2644. let info = [
  2645. this.cueWord.fieldList.includes('序号') ? '序号:' + (kin + 1) : '',
  2646. this.cueWord.fieldList.includes('提交人') ? '提交人:' + TabArr[kin].name : '',
  2647. this.cueWord.fieldList.includes('学段') ? '学段:' + this.getTType(this.teaType[0].id, TabArr[kin].cclassid) : '',
  2648. this.cueWord.fieldList.includes('年级') ? '年级:' + this.getTType(this.teaType[1].id, TabArr[kin].cclassid) : '',
  2649. this.cueWord.fieldList.includes('学科') ? '学科:' + this.getTType(this.teaType[2].id, TabArr[kin].cclassid) : '',
  2650. this.cueWord.fieldList.includes('职务') ? '职务:' + this.getTType(this.teaType[3].id, TabArr[kin].cclassid) : '',
  2651. this.cueWord.fieldList.includes('教龄') ? '教龄:' + this.getTType(this.teaType[4].id, TabArr[kin].cclassid) : '',
  2652. this.cueWord.fieldList.includes('提交时间') ? '提交时间:' + TabArr[kin].time : '',
  2653. userWork.filter(Boolean).join('\n')
  2654. ].filter(Boolean).join('\n');
  2655. forAllList.push({id:TabArr[kin].id,data:info})
  2656. // console.log('info',info);
  2657. }
  2658. // console.log('forAllList',forAllList);
  2659. let messages = `
  2660. NOTICE
  2661. Role: 你是一个高级数据处理师。
  2662. - 深入理解各种数据处理标准,确保处理流程的准确性。
  2663. - 熟练掌握数据结构知识,能快速解析“字段名称:具体内容”结构的文本。
  2664. - 具备强大的逻辑分析能力,以便制定合理的数据处理流程。
  2665. - 有丰富的数据处理经验,能应对多种类型的数据操作。
  2666. - 拥有精准的数据分析能力,准确得出处理结果。
  2667. - 擅长根据不同评价标准进行数据评价,保证结果符合要求。
  2668. - 能够高效地处理大量数据,保证工作的时效性。
  2669. Language: ${this.getLang()}
  2670. ## 上下文
  2671. 在数据处理任务缺乏合适工具或人力时,如数据分析项目、数据审核任务场景下,存在多组特定结构的文本数据,需数据处理大师理解标准和内容,制定流程并处理数据,按要求输出结果。
  2672. ## 数据处理标准
  2673. ${this.cueWord.openCeCon}
  2674. ## 数据内容
  2675. ${JSON.stringify(forAllList)}
  2676. ## 任务
  2677. 1. 数据标准理解:详细了解{数据处理标准}(如准确性、完整性、一致性等要求)
  2678. 2. 数据内容理解: 阅读并理解{数据内容}包括多组“字段名称:具体内容”结构的文本数据。
  2679. 3. 处理流程制定:根据所理解的{数据处理标准},制定详细的数据处理流程,包括数据分析(如统计分析、关联分析等)、数据评价(根据标准打分或分类等)等步骤。
  2680. 4. 数据处理操作:按照制定的流程对数据进行分析、处理和评价等操作。
  2681. 5. 结果输出:仅输出按照用户要求处理后的结果,确保结果清晰、准确且易于理解。
  2682. ### 理论框架
  2683. ### 数据生命周期管理理论
  2684. 1. 基本原理:
  2685. - 数据生命周期涵盖数据的创建、存储、使用、共享、归档和销毁等阶段,每个阶段有不同的管理要求。
  2686. - 明确各阶段的数据特征与管理重点有助于确保数据质量和合规性。
  2687. 2. 具体应用:
  2688. - 确定处理阶段:根据数据处理任务确定数据处于生命周期的哪个阶段进行针对性处理。
  2689. - 遵循管理规范:按照各阶段的管理要求,如存储安全规范,在处理中保障数据。
  2690. - 规划流程:基于数据生命周期各阶段顺序规划合理的数据处理流程。
  2691. ### ETL(Extract,Transform,Load)理论
  2692. 1. 基本原理:
  2693. - ETL是数据仓库中的一种数据处理过程,包括抽取、转换和加载三个主要步骤。
  2694. - 用于将不同来源的数据整合到数据仓库中,保证数据的一致性和准确性。
  2695. 2. 具体应用:
  2696. - 数据抽取:从多组文本数据中提取所需的字段和内容。
  2697. - 数据转换:对抽取的数据按照标准进行格式转换、清洗等操作。
  2698. - 数据加载:将处理好的数据加载到合适的存储或输出结构中。
  2699. ### 数据质量评估理论
  2700. 1. 基本原理:
  2701. - 从准确性、完整性、一致性等多方面评估数据质量,以确保数据可靠。
  2702. - 不同的数据用途有不同的质量要求,需建立相应评估指标。
  2703. 2. 具体应用:
  2704. - 质量指标确定:根据处理标准确定数据质量评估指标。
  2705. - 数据检查:按照指标对处理过程中的数据进行检查。
  2706. - 结果验证:依据评估结果验证最终输出的数据是否符合要求。
  2707. ##响应
  2708. 严格按照用户的需求进行输出,不要输出多余的内容
  2709. ## 要求
  2710. - 以清晰的逻辑构建处理流程,步骤分明。
  2711. - 对数据内容进行全面分析,不遗漏任何关键信息。
  2712. - 根据评价标准严格进行评价操作,保证结果的公正性。
  2713. - 处理结果输出简洁明了,仅包含符合要求的内容。
  2714. - 考虑到可能存在的多种数据结构,保持处理方法的通用性。
  2715. - 针对数据处理过程中的特殊情况提供应对措施。
  2716. - 以专业的态度对待数据,确保数据的安全性与完整性。
  2717. - 输出格式[{id:数据id,sco:评分}]。
  2718. - 不输出分析过程,直接输出最后计算结果。
  2719. ## 限制
  2720. - 不应包含未经定义的数据处理术语,以免造成混淆。
  2721. - 避免输出与数据处理标准无关的内容。
  2722. - 不应包含模糊不清的处理步骤或操作。
  2723. - 避免提及无法获取的外部工具或资源,除非有替代方案。
  2724. - 不应包含未经证实的数据处理假设。
  2725. - 不要回复你不知道的内容
  2726. - 不要直接回复<demo>的内容
  2727. - 所输出的内容必须按照给定的格式进行组织,不能偏离框架要求。
  2728. - 请使用准确可靠的信息来源,确保规划的可行性和实用性。
  2729. - 如果查询信息不是真实信息,如 xxx 等占位字符,不要采纳或使用。
  2730. - 不要给用户提供任何虚假信息!不要给用户提供任何虚假信息!不要给用户提供任何虚假信息`;
  2731. // console.log('messages',messages);
  2732. let params = {
  2733. id: '978252d7-a26e-4e70-8d75-3336497abac1',
  2734. message: [
  2735. {
  2736. type: "text",
  2737. text: messages.replaceAll("\n", " ").replaceAll("*", "")
  2738. }
  2739. ],
  2740. userId: this.userid,
  2741. model: 'open-gpt-4.1',
  2742. file_ids: [],
  2743. sound_url: '',
  2744. temperature: 0.2,
  2745. top_p: 1,
  2746. max_completion_tokens: 100000,
  2747. // uid: _uid,
  2748. session_name: uuidv4(),
  2749. // assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
  2750. // message: [
  2751. // {
  2752. // type: "text",
  2753. // text: messages.replaceAll("\n", " ").replaceAll("*", "")
  2754. // }
  2755. // ],
  2756. // session_name: uuidv4(),
  2757. // userId: this.userid,
  2758. // file_ids: '',
  2759. // model: "gpt-4o-2024-11-20"
  2760. };
  2761. this.ajax
  2762. .post("https://appapi.cocorobo.cn/api/agentchats/ai_agent_chat", params)
  2763. .then(response => {
  2764. let data = response.data;
  2765. this.scoList = JSON.parse(data.message)
  2766. this.aiscoLoading = false
  2767. this.uploadSCo()
  2768. })
  2769. .catch(error => {
  2770. this.aiscoLoading = false
  2771. this.$message.error('评分失败')
  2772. reject(error)
  2773. console.log(error);
  2774. });
  2775. },
  2776. // 获取评分
  2777. async getAiSco(){
  2778. return new Promise((resolve, reject) => {
  2779. this.aiscoLoading = true
  2780. let params = {
  2781. tid: this.cid,
  2782. };
  2783. this.ajax
  2784. .get(this.$store.state.api + "getTestAiSco", params)
  2785. .then((res) => {
  2786. if (res.data[0].length) {
  2787. this.aiscoId = res.data[0][0].id
  2788. this.cueWord = JSON.parse(res.data[0][0].cueWord)
  2789. this.cueWordCopy = JSON.parse(res.data[0][0].cueWord)
  2790. this.scoList = JSON.parse(res.data[0][0].json)
  2791. this.scoListCopy = JSON.parse(res.data[0][0].json)
  2792. }else{
  2793. this.cueWord={
  2794. openCeCon:'', //指令
  2795. openCeTit:'', //标题
  2796. fieldList:[]
  2797. }
  2798. this.cueWordCopy={
  2799. openCeCon:'', //指令
  2800. openCeTit:'', //标题
  2801. fieldList:[]
  2802. }
  2803. this.scoList=[]
  2804. this.scoListCopy=[]
  2805. }
  2806. this.aiscoLoading = false
  2807. // console.log('8888888888',res.data[0]);
  2808. resolve(1)
  2809. })
  2810. .catch((err) => {
  2811. reject(err)
  2812. this.aiscoLoading = false
  2813. console.error(err);
  2814. });
  2815. })
  2816. },
  2817. // 上传评分
  2818. uploadSCo(){
  2819. this.aiscoLoading = true
  2820. // val有数据就是自动评分把将新老数据结合在一起
  2821. let scoArr = []
  2822. // 新添加的评分
  2823. const ids1 = this.scoList.map(item => item.id);
  2824. // console.log('ids1',ids1);
  2825. // jiu评分
  2826. scoArr = this.scoListCopy.filter(item => !ids1.includes(item.id));
  2827. // console.log('scoArr',JSON.parse(JSON.stringify('scoArr')));
  2828. scoArr = [...this.scoList,...scoArr]
  2829. let params = [{
  2830. tid:this.cid,
  2831. uid:this.userid,
  2832. json:JSON.stringify(scoArr),
  2833. cw: JSON.stringify(this.cueWord)
  2834. }]
  2835. // console.log('params',params);
  2836. this.ajax
  2837. .post(this.$store.state.api + "addtestAiSco", params)
  2838. .then((res) => {
  2839. // console.log(res);
  2840. this.$message({
  2841. message: "评价成功",
  2842. type: "success"
  2843. });
  2844. this.getAiSco()
  2845. })
  2846. .catch((err) => {
  2847. this.aiscoLoading = false
  2848. this.$message({
  2849. message: "评价失败",
  2850. type: "error"
  2851. });
  2852. console.error(err);
  2853. });
  2854. },
  2855. // 获取文档id
  2856. createFileid(url) {
  2857. let _this = this;
  2858. return new Promise((resolve, reject) => {
  2859. try {
  2860. _this.ajax
  2861. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  2862. url: url
  2863. })
  2864. .then(res => {
  2865. let _data = res.data.FunctionResponse;
  2866. if (_data.result && _data.result.id) {
  2867. resolve(_data.result.id);
  2868. } else {
  2869. resolve(1);
  2870. }
  2871. })
  2872. .catch(function(error) {
  2873. resolve(1);
  2874. });
  2875. } catch (e) {
  2876. resolve(1);
  2877. }
  2878. });
  2879. },
  2880. getLang() {
  2881. let lang = "";
  2882. if (this.languageSetting == 0) {
  2883. lang = "Chinese.";
  2884. } else if (this.languageSetting == 1) {
  2885. lang = "Traditional Chinese.";
  2886. } else if (this.languageSetting == 2) {
  2887. lang = "English.";
  2888. }
  2889. return lang;
  2890. },
  2891. // 打开引用字段弹框
  2892. quoteShow(){
  2893. this.quoteV = !this.quoteV
  2894. },
  2895. // 添加指令字段
  2896. addfield(val){
  2897. if (this.cueWord.fieldList.indexOf(val) != -1) {
  2898. const index = this.cueWord.fieldList.indexOf(val)
  2899. this.cueWord.fieldList.splice(index, 1)
  2900. }else{
  2901. this.cueWord.fieldList.push(val)
  2902. }
  2903. },
  2904. openChat() {
  2905. this.aiChatV = !this.aiChatV;
  2906. this.$nextTick(() => {
  2907. const boxStickyHeight = this.$refs.boxSticky
  2908. ? this.$refs.boxSticky.offsetHeight
  2909. : 0;
  2910. const chatHeight = `calc(100% - ${boxStickyHeight}px - 46px)`;
  2911. // this.$refs.aiChat.$el.style.height = chatHeight;
  2912. this.$refs.aiBoxRightDivRef.style.height = chatHeight;
  2913. });
  2914. },
  2915. fileClose(done) {
  2916. done();
  2917. },
  2918. //获取教研室列表
  2919. getClass2() {
  2920. let params = {
  2921. oid: this.oid,
  2922. };
  2923. this.ajax
  2924. .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
  2925. .then((res) => {
  2926. console.log("this.TeachingOptions", this.TeachingOptions);
  2927. console.log(res.data);
  2928. let data = res.data[0];
  2929. this.TeachingOptions.forEach((e) => {
  2930. data.forEach((i) => {
  2931. if (e.id == i.id) {
  2932. e.name = i.name;
  2933. }
  2934. });
  2935. });
  2936. })
  2937. .catch((err) => {
  2938. this.isLoading = false;
  2939. console.error(err);
  2940. });
  2941. },
  2942. getClass3() {
  2943. let params = {
  2944. oid: this.oid,
  2945. };
  2946. this.ajax
  2947. .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
  2948. .then((res) => {
  2949. console.log(res.data);
  2950. this.TeachingOptions = res.data[0].filter((item) => {
  2951. return item.parentid == "6";
  2952. });
  2953. // console.log('this.TeachingOptions',this.TeachingOptions);
  2954. })
  2955. .catch((err) => {
  2956. this.isLoading = false;
  2957. console.error(err);
  2958. });
  2959. },
  2960. filterName(value, row, index) {
  2961. let name = [];
  2962. for (var i = 0; i < row.array[index].json.answer2.length; i++) {
  2963. name.push(
  2964. row.array[index].json.array[row.array[index].json.answer2[i]].option
  2965. );
  2966. }
  2967. console.log(name.indexOf(value) != -1);
  2968. return name.indexOf(value) != -1;
  2969. },
  2970. // 筛选课程
  2971. filterCourse(value, row, index) {
  2972. return row.array[index].json.answer2.indexOf(value) != -1;
  2973. },
  2974. //筛选日期
  2975. filterTime(value, row, index) {
  2976. return row.array[index].json.answer2.indexOf(value) != -1;
  2977. },
  2978. filterTType(value, row, index) {
  2979. return row.cclassid && row.cclassid.indexOf(value) != -1;
  2980. },
  2981. wordClickHandler(name, value) {
  2982. // this.$notify({
  2983. // title: name,
  2984. // message: "数量:"+value
  2985. // });
  2986. },
  2987. retrunCourse() {
  2988. if(!this.back){
  2989. this.goTo(
  2990. "/test?userid=" +
  2991. this.userid +
  2992. "&oid=" +
  2993. this.oid +
  2994. "&org=" +
  2995. this.org +
  2996. "&role=" +
  2997. this.role
  2998. );
  2999. }else if(this.back=="sass"){
  3000. this.goTo(
  3001. "/sassPlatform?userid=" +
  3002. this.userid +
  3003. "&oid=" +
  3004. this.oid +
  3005. "&org=" +
  3006. this.org +
  3007. "&role=" +
  3008. this.role
  3009. );
  3010. }
  3011. },
  3012. goTo(path) {
  3013. this.$router.push(path);
  3014. },
  3015. tableRowClassName({ row, rowIndex }) {
  3016. if ((rowIndex + 1) % 2 === 0) {
  3017. return "even_row";
  3018. } else {
  3019. return "";
  3020. }
  3021. },
  3022. changeHeight() {
  3023. if (this.stype == 1) {
  3024. return;
  3025. }
  3026. this.tableHeight = this.$refs.stepBox.offsetHeight - 120;
  3027. if (this.tableHeight <= 530) {
  3028. this.tableHeight = 530;
  3029. }
  3030. // 监听窗口大小变化
  3031. let self = this;
  3032. window.onresize = function () {
  3033. if (self.stype == 1) {
  3034. return;
  3035. }
  3036. self.tableHeight = this.$refs.stepBox.offsetHeight - 120;
  3037. if (self.tableHeight <= 530) {
  3038. self.tableHeight = 530;
  3039. }
  3040. };
  3041. // this.$refs.table.$el.offsetTop:表格距离浏览器的高度 //200表示你想要调整的表格距离底部的高度(你可以自己随意调整),因为我们一般都有放分页组件的,所以需要给它留一个高度
  3042. },
  3043. handleCurrentChange(val) {
  3044. this.page = val;
  3045. this.getData2();
  3046. },
  3047. getTest(row) {
  3048. this.$router.push(
  3049. "/checkTest2?cid=" +
  3050. row.courseid +
  3051. "&userid=" +
  3052. this.userid +
  3053. "&userid2=" +
  3054. row.userid +
  3055. "&tid=" +
  3056. row.id +
  3057. "&oid=" +
  3058. this.oid +
  3059. "&org=" +
  3060. this.org +
  3061. "&type=2" +
  3062. "&role=" +
  3063. this.role+
  3064. "&back=1"
  3065. );
  3066. },
  3067. editTest(row){
  3068. this.$router.push(
  3069. "/doTest?cid=" +
  3070. row.courseid +
  3071. "&userid=" +
  3072. this.userid +
  3073. "&userid2=" +
  3074. row.userid +
  3075. "&tid=" +
  3076. row.id +
  3077. "&oid=" +
  3078. this.oid +
  3079. "&org=" +
  3080. this.org +
  3081. "&type=2" +
  3082. "&role=" +
  3083. this.role +
  3084. "&back=1"
  3085. );
  3086. // 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
  3087. console.log("编辑",row)
  3088. },
  3089. checkDataType(type) {
  3090. this.TeachingValue = "";
  3091. if (this.stype != type) {
  3092. this.stype = type;
  3093. this.courseName = "";
  3094. if (type == 3) {
  3095. this.getData2();
  3096. } else {
  3097. this.getData();
  3098. }
  3099. this.changeHeight();
  3100. }
  3101. },
  3102. searchCourse() {
  3103. if (this.stype == 3) {
  3104. this.getData2();
  3105. } else {
  3106. this.getData();
  3107. }
  3108. },
  3109. async getData() {
  3110. this.isLoading = true;
  3111. await this.getAiSco()
  3112. let params = [
  3113. {
  3114. cid: this.cid,
  3115. cn: this.courseName,
  3116. tim: !this.SubmitTime ? "" : this.SubmitTime,
  3117. tea: this.TeachingValue,
  3118. },
  3119. ];
  3120. this.ajax
  3121. .post(this.$store.state.api + "getTestWorksNoPageCopy2", params)
  3122. .then(async (res) => {
  3123. this.testJson = res.data[0][0];
  3124. console.log(
  3125. "this.testJson",
  3126. JSON.parse(JSON.stringify(this.testJson))
  3127. );
  3128. let a = "";
  3129. if (this.testJson.juriP) {
  3130. a = this.testJson.juriP;
  3131. }
  3132. if (this.testJson.juriP2) {
  3133. if (a) {
  3134. a = this.testJson.juriP + "," + this.testJson.juriP2;
  3135. } else {
  3136. a = this.testJson.juriP2;
  3137. }
  3138. }
  3139. this.testJson.juriP = a;
  3140. if (this.testJson.juriP) {
  3141. let ajuri2 = this.testJson.juri2.split(",");
  3142. this.TeachingOptions = ajuri2.map((key, index) => ({
  3143. id: key,
  3144. name: "",
  3145. }));
  3146. this.getClass2();
  3147. } else {
  3148. this.getClass3();
  3149. }
  3150. // console.log('dddd',this.TeachingOptions);
  3151. let _worksData = res.data[1];
  3152. console.log("_worksData",_worksData)
  3153. if(this.peopleId){
  3154. _worksData = _worksData.filter(i=>i.userid === this.peopleId)
  3155. }
  3156. // if(this.timeLimit){
  3157. // console.log("timeLimit", this.timeLimit)
  3158. // // 2024-12-31T16:00:00.000Z,2025-12-31T16:00:00.000Z
  3159. // // 根据 timeLimit 筛选 _worksData
  3160. // let [startStr, endStr] = this.timeLimit.split(',');
  3161. // let startDate = startStr ? new Date(startStr) : null;
  3162. // let endDate = endStr ? new Date(endStr) : null;
  3163. // _worksData = _worksData.filter(i => {
  3164. // if (!i.time) return false;
  3165. // // i.time 例子:2025年02月25日 10:17:46
  3166. // let match = i.time.match(/^(\d{4})年(\d{2})月(\d{2})日/);
  3167. // if (!match) return false;
  3168. // let year = parseInt(match[1]);
  3169. // let month = parseInt(match[2]);
  3170. // let day = parseInt(match[3]);
  3171. // // 构造当前数据的日期对象
  3172. // let curDate = new Date(year, month - 1, day, 0, 0, 0);
  3173. // // 判断是否在区间内(包含等于)
  3174. // if (startDate && endDate) {
  3175. // return curDate >= startDate && curDate <= endDate;
  3176. // } else if (startDate) {
  3177. // return curDate >= startDate;
  3178. // } else if (endDate) {
  3179. // return curDate <= endDate;
  3180. // }
  3181. // return true;
  3182. // });
  3183. // }
  3184. // if(this.timeLimit){
  3185. // if(_worksData[0]){
  3186. // let _data = JSON.parse(_worksData[0].courseJson)
  3187. // let _flag = false;
  3188. // _data.forEach((item,index)=>{
  3189. // if(item.type == 8 && item.json.title == "获奖时间"){
  3190. // _flag = true
  3191. // let time = this.timeLimit.split(",");
  3192. // this.tableDatePicker[index] = [new Date(time[0]),new Date(time[1])]
  3193. // }
  3194. // })
  3195. // if(!_flag){
  3196. // let time = this.timeLimit.split(",");
  3197. // this.submissionTimePicker = [new Date(time[0]),new Date(time[1])];
  3198. // }
  3199. // this.tableDataPickerChange();
  3200. // this.submissionTimePickerChange()
  3201. // }
  3202. // }
  3203. this.works = _worksData;
  3204. this.iscount = res.data[2][0].count;
  3205. this.pcount = res.data[3][0].count;
  3206. let chapters = this.setJSON(
  3207. this.setJson2(
  3208. JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))
  3209. )
  3210. );
  3211. this.chapters = this.setFilter(
  3212. this.JSONSetting(
  3213. JSON.parse(JSON.stringify(JSON.parse(res.data[0][0].chapters)))
  3214. )
  3215. );
  3216. let courseCount11 = [];
  3217. let testArray = [];
  3218. let array = [];
  3219. let courseIds = []; // 初始化一个空数组来存储所有的courseId
  3220. for (let i = 0; i < this.works.length; i++) {
  3221. let cJson = this.setJSON(
  3222. JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
  3223. );
  3224. if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
  3225. let _json = this.JSONSetting(
  3226. JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
  3227. );
  3228. for (var ja = 0; ja < _json.length; ja++) {
  3229. let _json2 = _json[ja].json;
  3230. if (_json[ja].type == 6) {
  3231. let courseId = _json2.answer2;
  3232. courseIds.push(courseId); // 将type为6的courseId添加到数组中
  3233. }
  3234. if (_json[ja].type == 11) {
  3235. let _answer = _json2.answer2;
  3236. _answer.length
  3237. ? (courseCount11 = courseCount11.concat(_answer))
  3238. : "";
  3239. _json[ja].json.courseId = _answer ? _answer : [];
  3240. courseIds = courseIds.concat(_answer); // 将type为11的courseId添加到数组中
  3241. }
  3242. }
  3243. }
  3244. }
  3245. // 将所有的courseId去重
  3246. courseIds = Array.from(new Set(courseIds));
  3247. // 使用一个数组来存储所有的courseId后,执行getCourseInfoTestAll
  3248. let courseTitles = {}; // 初始化一个空对象来存储所有的courseTitles
  3249. let params2 = [
  3250. {
  3251. cid: courseIds.join(","),
  3252. },
  3253. ];
  3254. let data2 = await this.ajax.post(
  3255. this.$store.state.api + "getCourseInfoTestAll2",
  3256. params2
  3257. );
  3258. let result2 = data2.data[0];
  3259. result2.forEach((i) => {
  3260. // _title.push(i.title);
  3261. courseTitles[i.courseId] = i.title;
  3262. });
  3263. for (let i = 0; i < this.works.length; i++) {
  3264. let cJson = this.setJSON(
  3265. JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
  3266. );
  3267. console.log(cJson,'===',chapters)
  3268. // if (JSON.stringify(cJson) == JSON.stringify(chapters)) {
  3269. let _json = this.JSONSetting(
  3270. JSON.parse(JSON.stringify(JSON.parse(this.works[i].courseJson)))
  3271. );
  3272. let _json2 = this.JSONSetting(
  3273. JSON.parse(JSON.stringify(JSON.parse(JSON.stringify(chapters))))
  3274. );
  3275. // console.log("json2",_json2)
  3276. // _json.forEach((item) => {
  3277. // console.log('_jsonItem',item)
  3278. // if(){
  3279. // }
  3280. // if (item.type == 11) {
  3281. // let cid = item.json.answer2;
  3282. // let _title = [];
  3283. // for (var i = 0; i < cid.length; i++) {
  3284. // _title.push(courseTitles[cid[i]]);
  3285. // }
  3286. // item.json.answer2 = _title.length ? _title.join(",") : "";
  3287. // }
  3288. // if (item.type == 6) {
  3289. // let courseId = item.json.answer2;
  3290. // item.json.answer2 = courseTitles[courseId] || "";
  3291. // }
  3292. // });
  3293. _json2.forEach(item=>{
  3294. let _index = _json.findIndex(i=>(i.type==item.type && i.ttype==item.ttype && i.json.title==item.json.title))
  3295. if(_index!=-1){
  3296. item.json = _json[_index].json;
  3297. if (item.type == 11) {
  3298. let cid = item.json.answer2;
  3299. let _title = [];
  3300. for (var i = 0; i < cid.length; i++) {
  3301. _title.push(courseTitles[cid[i]]);
  3302. }
  3303. item.json.answer2 = _title.length ? _title.join(",") : "";
  3304. }
  3305. if (item.type == 6) {
  3306. let courseId = item.json.answer2;
  3307. item.json.answer2 = courseTitles[courseId] || "";
  3308. }
  3309. }
  3310. })
  3311. if(JSON.stringify(_json2)==JSON.stringify(this.JSONSetting(JSON.parse(JSON.stringify(chapters)))))continue
  3312. // 更新对应的_json对象的answer2
  3313. array.push({
  3314. courseid: this.works[i].courseid,
  3315. cclassid: this.works[i].cclassid,
  3316. id: this.works[i].id,
  3317. userid: this.works[i].userid,
  3318. name: this.works[i].username ? this.works[i].username : "匿名",
  3319. time: this.works[i].time,
  3320. array: _json2,
  3321. testName:this.works[i].testName,
  3322. isReview:this.works[i].isReview,
  3323. cut: 0,
  3324. uteaName: this.works[i].uteaName,
  3325. courseJson: JSON.parse(this.works[i].courseJson),
  3326. type:this.works[i].type
  3327. });
  3328. // }
  3329. }
  3330. let allCourseIds = [];
  3331. for (var i = 0; i < this.chapters.length; i++) {
  3332. let el = this.chapters[i];
  3333. let topic = {
  3334. type: el.type,
  3335. cut: 0,
  3336. title: el.json ? el.json.title : "",
  3337. detail: el.json ? el.json.detail : "",
  3338. atype: el.json ? el.json.type : "",
  3339. choice: el.json ? el.json.array : "",
  3340. array: [],
  3341. answer: el.json ? el.json.answer : "",
  3342. answer2: "",
  3343. count: 0,
  3344. courses: el.json ? el.json.courses : [],
  3345. small: el.json ? el.json.small : "",
  3346. big: el.json ? el.json.big : "",
  3347. };
  3348. if (topic.type == 1) {
  3349. for (var t = 0; t < topic.choice.length; t++) {
  3350. topic.array.push({
  3351. name: topic.choice[t].option,
  3352. count: 0,
  3353. });
  3354. }
  3355. } else if (topic.type == 3) {
  3356. } else if (topic.type == 5) {
  3357. } else if (topic.type == 6) {
  3358. let _answer = topic.array;
  3359. allCourseIds = allCourseIds.concat(_answer);
  3360. } else if (topic.type == 7) {
  3361. for (
  3362. var t = parseInt(topic.small);
  3363. t <= parseInt(topic.big);
  3364. t++
  3365. ) {
  3366. topic.array.push({
  3367. name: t,
  3368. count: 0,
  3369. });
  3370. }
  3371. } else if (topic.type == 11) {
  3372. const uniqueArray = courseCount11.filter(
  3373. (item, index) => courseCount11.indexOf(item) === index
  3374. );
  3375. let _answer = uniqueArray;
  3376. allCourseIds = allCourseIds.concat(_answer);
  3377. }
  3378. for (var j = 0; j < array.length; j++) {
  3379. let el2 = array[j];
  3380. console.log("==>",el2)
  3381. if (topic.type == 1) {
  3382. let _answer = el2.array[i].json.answer2;
  3383. if(!_answer)continue;
  3384. for (var k = 0; k < _answer.length; k++) {
  3385. topic.array[_answer[k]].count++;
  3386. topic.count++;
  3387. }
  3388. } else if (topic.type == 3 || topic.type == 8) {
  3389. let type3 = 1;
  3390. let _answer = el2.array[i].json.answer2;
  3391. if (_answer) {
  3392. for (var k = 0; k < topic.array.length; k++) {
  3393. if (topic.array[k].name == _answer) {
  3394. topic.array[k].count++;
  3395. type3 = 2;
  3396. topic.count++;
  3397. break;
  3398. }
  3399. }
  3400. if (type3 == 1) {
  3401. topic.array.push({
  3402. name: _answer,
  3403. count: 1,
  3404. });
  3405. }
  3406. let limit = 10;
  3407. if(topic.array.length>limit){
  3408. topic.showArray = topic.array.slice(0,limit)
  3409. topic.nowPage = 1;
  3410. topic.total = topic.array.length;
  3411. topic.limit = limit;
  3412. }else{
  3413. topic.showArray = topic.array;
  3414. }
  3415. topic.loadingWordCloud = false;
  3416. topic.wordCloutData = null;
  3417. }
  3418. } else if (topic.type == 5) {
  3419. let _answer = el2.array[i].json.file
  3420. ? el2.array[i].json.file
  3421. : [];
  3422. let _user = { userid: el2.userid, username: el2.name };
  3423. for (var k = 0; k < _answer.length; k++) {
  3424. topic.array.push({ ..._answer[k], ..._user });
  3425. }
  3426. } else if (topic.type == 7) {
  3427. if (el2.array[i].json.answer2) {
  3428. let _answer = el2.array[i].json.answer2;
  3429. topic.array[_answer].count++;
  3430. topic.count++;
  3431. }
  3432. } else if (topic.type == 6) {
  3433. if (el2.array[i].json.courses) {
  3434. let _answer = el2.array[i].json.courses.length
  3435. ? el2.array[i].json.courses.join(",")
  3436. : "";
  3437. topic.answer2 = _answer;
  3438. }
  3439. } else if (topic.type == 11) {
  3440. const uniqueArray = courseCount11.filter(
  3441. (item, index) => courseCount11.indexOf(item) === index
  3442. );
  3443. let _answer = uniqueArray;
  3444. topic.answer2 = _answer;
  3445. }else if(topic.type == 13){
  3446. if (el2.array[i].json.answer2!=='') {
  3447. let _answer = String(el2.array[i].json.answer2);
  3448. let _type = el2.array[i].json.type;
  3449. console.log("👉",el2.array[i].json)
  3450. if(_type=='4')_answer+='%';
  3451. if(!topic.array)topic.array=[];
  3452. if(topic.array.findIndex(i=>i.name==_answer)!=-1){
  3453. topic.array.find(i=>i.name==_answer).count++;
  3454. }else{
  3455. topic.array.push({
  3456. name:_answer,
  3457. count:1
  3458. })
  3459. }
  3460. topic.count++;
  3461. }
  3462. }else if(topic.type==14){
  3463. console.log("===",el2)
  3464. }
  3465. }
  3466. console.log("topictopictopictopic", topic);
  3467. testArray.push(topic);
  3468. this.fileLoading.push({
  3469. bool: false,
  3470. count: 0,
  3471. load: 0,
  3472. progress: 0,
  3473. });
  3474. }
  3475. // 去重courseId
  3476. allCourseIds = Array.from(new Set(allCourseIds));
  3477. let params = [
  3478. {
  3479. cid: allCourseIds.join(","),
  3480. },
  3481. ];
  3482. let data = await this.ajax.post(
  3483. this.$store.state.api + "getCourseInfoTestAll2",
  3484. params
  3485. );
  3486. let result = data.data[0];
  3487. for (var i = 0; i < this.chapters.length; i++) {
  3488. let el = this.chapters[i];
  3489. let topic = testArray[i];
  3490. if (topic.type == 6 || topic.type == 11) {
  3491. result.forEach((i) => {
  3492. i.update_at = new Date(i.update_at)
  3493. .toLocaleString("zh-CN", {
  3494. year: "numeric",
  3495. month: "2-digit",
  3496. day: "2-digit",
  3497. hour: "2-digit",
  3498. minute: "2-digit",
  3499. second: "2-digit",
  3500. hour12: false,
  3501. })
  3502. .replace(/\//g, "-");
  3503. });
  3504. if (topic.type == 6) {
  3505. result.forEach((elc) => {
  3506. if (
  3507. this.chapters
  3508. .find((f) => f.type == 6)
  3509. .nameFilters.find((c) => c.value == elc.title) ==
  3510. undefined &&
  3511. topic.answer2.includes(elc.courseId)
  3512. ) {
  3513. this.chapters
  3514. .find((c) => c.type == 6)
  3515. .nameFilters.push({ text: elc.title, value: elc.title });
  3516. }
  3517. });
  3518. } else if (topic.type == 11) {
  3519. result.forEach((elc) => {
  3520. if (
  3521. this.chapters
  3522. .find((f, index) => index == i)
  3523. .nameFilters.find((c) => c.value == elc.title) ==
  3524. undefined &&
  3525. topic.answer2.includes(elc.courseId)
  3526. ) {
  3527. this.chapters
  3528. .find((c, index) => index == i)
  3529. .nameFilters.push({ text: elc.title, value: elc.title });
  3530. }
  3531. });
  3532. }
  3533. // this.chapters.find(i=>i.type==6 || i.type==11).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
  3534. if (topic.answer2.length) {
  3535. let _answer = topic.answer2;
  3536. topic.courseArray = result.filter((el) => {
  3537. return _answer.includes(el.courseId);
  3538. });
  3539. } else {
  3540. topic.courseArray = [];
  3541. }
  3542. // topic.courseArray = result
  3543. }
  3544. }
  3545. this.testArray = testArray;
  3546. this.worksArray = array;
  3547. this.tableWorksArray = array;
  3548. this.isLoading = false;
  3549. this.teaType = res.data[5];
  3550. let typeInfo = res.data[6];
  3551. this.teaType.forEach((e) => {
  3552. e.child = [];
  3553. e.value = [];
  3554. typeInfo.forEach((i) => {
  3555. if (e.id == i.parentid) {
  3556. e.child.push({ id: i.id, name: i.name });
  3557. }
  3558. });
  3559. });
  3560. console.log(this.teaType, "teaType");
  3561. if(this.timeLimit){
  3562. if(this.works[0]){
  3563. let _data = JSON.parse(this.works[0].courseJson)
  3564. console.log("this.works",this.works)
  3565. _data.forEach((item,index)=>{
  3566. if(item.type == 8){
  3567. let time = this.timeLimit.split(",");
  3568. this.tableDatePicker[index] = [new Date(time[0]),new Date(time[1])]
  3569. }
  3570. })
  3571. // if(!_flag){
  3572. // let time = this.timeLimit.split(",");
  3573. // this.submissionTimePicker = [new Date(time[0]),new Date(time[1])];
  3574. // this.submissionTimePickerChange()
  3575. // }else{
  3576. this.tableDataPickerChange();
  3577. // }
  3578. this.$forceUpdate();
  3579. }
  3580. }
  3581. })
  3582. .catch((err) => {
  3583. console.error(err);
  3584. });
  3585. },
  3586. getData2() {
  3587. this.isLoading = true;
  3588. let params = {
  3589. cid: this.cid,
  3590. page: this.page,
  3591. pageSize: this.pageSize,
  3592. cn: this.courseName,
  3593. };
  3594. this.ajax
  3595. .get(this.$store.state.api + "getTestWorksPage3", params)
  3596. .then((res) => {
  3597. this.isLoading = false;
  3598. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  3599. this.tableData = res.data[0];
  3600. })
  3601. .catch((err) => {
  3602. console.error(err);
  3603. });
  3604. },
  3605. setJSON(json) {
  3606. return json.filter((item) => {
  3607. if (item.array) {
  3608. item.array = item.array.filter((item2) => {
  3609. if (item2.ttype == 1 && item2.json) {
  3610. delete item2.json.answer2;
  3611. delete item2.json.score2;
  3612. delete item2.json.file;
  3613. delete item2.json.codeScanningTime;
  3614. delete item2.json.timeSort;
  3615. }
  3616. if (item2.array) {
  3617. item2.array = item2.array.filter((item3) => {
  3618. if (item3.ttype == 1 && item3.json) {
  3619. delete item3.json.answer2;
  3620. delete item3.json.score2;
  3621. delete item3.json.file;
  3622. delete item3.json.codeScanningTime;
  3623. delete item3.json.timeSort;
  3624. }
  3625. return item3;
  3626. });
  3627. }
  3628. return item2;
  3629. });
  3630. } else if (item.ttype == 1 && item.json) {
  3631. delete item.json.answer2;
  3632. delete item.json.score2;
  3633. delete item.json.file;
  3634. delete item.json.codeScanningTime;
  3635. delete item.json.timeSort;
  3636. }
  3637. return item;
  3638. console.log(item.array);
  3639. });
  3640. },
  3641. setJson2(json) {
  3642. let _json = json;
  3643. // this.type = _json[0].ttype;
  3644. let checkArray = _json.filter((item) => {
  3645. if (item.array) {
  3646. item.array = item.array.filter((item2) => {
  3647. if (item2.ttype == 1 && item2.json && !item2.json.answer2) {
  3648. item2.json.answer2 = [];
  3649. }
  3650. if (item2.array) {
  3651. item2.array = item2.array.filter((item3) => {
  3652. if (item3.ttype == 1 && item3.json && !item3.json.answer2) {
  3653. item3.json.answer2 = [];
  3654. }
  3655. return item3;
  3656. });
  3657. }
  3658. return (
  3659. (item2.ttype != 1 && item2.array.length > 0) || item2.ttype == 1
  3660. );
  3661. });
  3662. }
  3663. if (item.ttype == 1 && item.json && !item.json.answer2) {
  3664. item.json.answer2 = [];
  3665. }
  3666. console.log(item.array);
  3667. return (item.ttype != 1 && item.array.length > 0) || item.ttype == 1;
  3668. });
  3669. console.log(checkArray);
  3670. return checkArray;
  3671. },
  3672. JSONSetting(json) {
  3673. let _json = json;
  3674. let array = [];
  3675. _json.filter((item) => {
  3676. if (item.array) {
  3677. item.array = item.array.filter((item2) => {
  3678. if (item2.ttype == 1 && item2.json) {
  3679. array.push(item2);
  3680. }
  3681. if (item2.array) {
  3682. item2.array = item2.array.filter((item3) => {
  3683. if (item3.ttype == 1 && item3.json) {
  3684. array.push(item3);
  3685. }
  3686. return item3;
  3687. });
  3688. }
  3689. return item2;
  3690. });
  3691. }
  3692. if (item.ttype == 1 && item.json) {
  3693. array.push(item);
  3694. }
  3695. console.log(item.array);
  3696. return item;
  3697. });
  3698. console.log(array);
  3699. return array;
  3700. },
  3701. setFilter(json) {
  3702. let _json = json;
  3703. let array = [];
  3704. _json.filter((item) => {
  3705. (item.nameFilters = []),
  3706. (item.filterParams = {
  3707. name: [],
  3708. });
  3709. if (item.type == 1) {
  3710. for (var i = 0; i < item.json.array.length; i++) {
  3711. item.nameFilters.push({
  3712. text: item.json.array[i].option,
  3713. value: item.json.array[i].option,
  3714. });
  3715. }
  3716. }
  3717. array.push(item);
  3718. return item;
  3719. });
  3720. return array;
  3721. },
  3722. checkFile(item) {
  3723. if (item.type == 3) {
  3724. this.$hevueImgPreview(item.url);
  3725. } else if (item.type == 5) {
  3726. this.downloadFile(item);
  3727. } else if (item.type == 1) {
  3728. this.dialogVisibleOffice = true;
  3729. this.wurl = item.url;
  3730. } else if (item.type == 2) {
  3731. this.dialogVisibleVideo = true;
  3732. this.wurl = item.url;
  3733. } else if (item.type == 4) {
  3734. this.dialogVisiblePdf = true;
  3735. this.wurl = item.url;
  3736. }
  3737. },
  3738. downloadFile(f) {
  3739. var credentials = {
  3740. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  3741. secretAccessKey: "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",
  3742. }; //秘钥形式的登录上传
  3743. window.AWS.config.update(credentials);
  3744. window.AWS.config.region = "cn-northwest-1"; //设置区域
  3745. let url2 = f.url;
  3746. let _url2 = "";
  3747. if (
  3748. url2.indexOf("https://view.officeapps.live.com/op/view.aspx?src=") != -1
  3749. ) {
  3750. _url2 = url2.split(
  3751. "https://view.officeapps.live.com/op/view.aspx?src="
  3752. )[1];
  3753. } else {
  3754. _url2 = url2;
  3755. }
  3756. let _this = this;
  3757. _this.downLoading = _url2;
  3758. var s3 = new window.AWS.S3({ params: { Bucket: "ccrb" } });
  3759. let name = decodeURIComponent(
  3760. _url2
  3761. .split("https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/")[1]
  3762. .replace(/\+/g, " ")
  3763. );
  3764. var params = {
  3765. Bucket: "ccrb",
  3766. Key: name,
  3767. };
  3768. s3.getObject(params, function (err, data) {
  3769. _this.downLoading = "";
  3770. if (err) console.log(err, err.stack); // an error occurred
  3771. else {
  3772. let url = window.URL.createObjectURL(new Blob([data.Body]));
  3773. let a = document.createElement("a");
  3774. a.name = f.name;
  3775. a.href = url;
  3776. a.download = f.name;
  3777. a.click();
  3778. console.log(data);
  3779. } // sxuccessful response
  3780. });
  3781. },
  3782. deleteTest(tid) {
  3783. let _this = this;
  3784. _this
  3785. .$confirm("确定删除此提交的表单么?", "提示", {
  3786. confirmButtonText: "确定",
  3787. cancelButtonText: "取消",
  3788. type: "warning",
  3789. })
  3790. .then(() => {
  3791. let params = [
  3792. {
  3793. tid: tid,
  3794. },
  3795. ];
  3796. _this.ajax
  3797. .post(_this.$store.state.api + "deleteTestCourseWorks", params)
  3798. .then((res) => {
  3799. _this.$message.success("删除成功");
  3800. if (_this.stype == 3) {
  3801. _this.getData2();
  3802. } else {
  3803. _this.getData();
  3804. }
  3805. })
  3806. .catch((err) => {
  3807. console.error(err);
  3808. });
  3809. })
  3810. .catch(() => {
  3811. return;
  3812. });
  3813. },
  3814. exportPDF() {
  3815. this.pdfLoading = true;
  3816. var a = document.getElementsByTagName("img");
  3817. for (var i = 0; i < a.length; i++) {
  3818. a[i].crossOrigin = "*";
  3819. }
  3820. downloadPDF(this.$refs.stepBox, this.testJson.title, () => {
  3821. var _a = document.getElementsByTagName("img");
  3822. for (var i = 0; i < _a.length; i++) {
  3823. _a[i].removeAttribute("crossorigin");
  3824. }
  3825. setTimeout(() => {
  3826. this.pdfLoading = false;
  3827. }, 2000);
  3828. });
  3829. },
  3830. score(json) {
  3831. let score = 0;
  3832. json.forEach((el) => {
  3833. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  3834. el.array.forEach((item) => {
  3835. if (item.ttype == 2 && item.array.length > 0) {
  3836. item.array.forEach((item2) => {
  3837. if (item2.ttype == 1 && item2.json) {
  3838. score += item2.json.score ? parseFloat(item2.json.score) : 0;
  3839. }
  3840. });
  3841. } else if (item.ttype == 1 && item.json) {
  3842. score += item.json.score ? parseFloat(item.json.score) : 0;
  3843. }
  3844. });
  3845. } else if (el.ttype == 1 && el.json) {
  3846. score += el.json.score ? parseFloat(el.json.score) : 0;
  3847. }
  3848. });
  3849. return score > 0 ? score + "分" : "";
  3850. },
  3851. score2(json) {
  3852. let score = 0;
  3853. // let type = 1
  3854. json.forEach((el) => {
  3855. if ((el.ttype == 3 || el.ttype == 2) && el.array.length > 0) {
  3856. el.array.forEach((item) => {
  3857. if (item.ttype == 2 && item.array.length > 0) {
  3858. item.array.forEach((item2) => {
  3859. if (item2.ttype == 1 && item2.json) {
  3860. score += item2.json.score2
  3861. ? parseFloat(item2.json.score2)
  3862. : 0;
  3863. }
  3864. });
  3865. } else if (item.ttype == 1 && item.json) {
  3866. score += item.json.score2 ? parseFloat(item.json.score2) : 0;
  3867. }
  3868. });
  3869. } else if (el.ttype == 1 && el.json) {
  3870. score += el.json.score2 ? parseFloat(el.json.score2) : 0;
  3871. }
  3872. });
  3873. return score + "分";
  3874. },
  3875. setWordHtml(data) {
  3876. let _data = data;
  3877. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  3878. let score = this.score(data.courseJson);
  3879. let isScore = this.score2(data.courseJson);
  3880. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
  3881. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
  3882. _data.name
  3883. }</b>${scoreContent}(填写范围)${
  3884. this.testJson.juriP ? this.testJson.juriP : "所有人"
  3885. }(提交时间)${_data.time}</div>`;
  3886. let _detail = this.testJson.brief
  3887. ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
  3888. : "";
  3889. let _test = `<div style='margin-top:40px;'>`;
  3890. for (let i = 0; i < _data.array.length; i++) {
  3891. let item = _data.array[i];
  3892. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
  3893. item.json.title
  3894. }</div>`;
  3895. _test += _div;
  3896. if (item.type == 1) {
  3897. for (let j = 0; j < item.json.array.length; j++) {
  3898. let check = item.json.array[j];
  3899. let _option = `<div style='margin:10px 0 0 40px;'>${
  3900. item.json.answer2 && item.json.answer2.indexOf(j) !== -1
  3901. ? "☑"
  3902. : "☐"
  3903. } ${check.option}</div>`;
  3904. _test += _option;
  3905. }
  3906. } else if (item.type == 3 && item.json.answer2) {
  3907. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  3908. _test += _option;
  3909. } else if (item.type == 5 && item.json.file) {
  3910. for (let j = 0; j < item.json.file.length; j++) {
  3911. let check = item.json.file[j];
  3912. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
  3913. _test += _option;
  3914. }
  3915. } else if (item.type == 6 && item.json.answer2) {
  3916. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  3917. _test += _option;
  3918. } else if (item.type == 7 && item.json.answer2) {
  3919. let _score = this.getScore2(item.json);
  3920. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
  3921. _test += _option;
  3922. } else if (item.type == 8 && item.json.answer2) {
  3923. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  3924. _test += _option;
  3925. } else if (item.type == 11 && item.json.answer2) {
  3926. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  3927. _test += _option;
  3928. }
  3929. }
  3930. _test += `</div>`;
  3931. let _html = _title + _content + _detail + _test;
  3932. this.exportToWord(_data.name + "-" + _data.time, _html);
  3933. },
  3934. setWordHtml2(data) {
  3935. let _data = data;
  3936. _data.array = this.JSONSetting(
  3937. JSON.parse(JSON.stringify(JSON.parse(data.courseJson)))
  3938. );
  3939. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  3940. let score = this.score(JSON.parse(data.courseJson));
  3941. let isScore = this.score2(JSON.parse(data.courseJson));
  3942. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
  3943. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
  3944. _data.username ? _data.username : "匿名"
  3945. }</b>${scoreContent}(填写范围)${
  3946. this.testJson.juriP ? this.testJson.juriP : "所有人"
  3947. }(提交时间)${_data.time}</div>`;
  3948. let _detail = this.testJson.brief
  3949. ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
  3950. : "";
  3951. let _test = `<div style='margin-top:40px;'>`;
  3952. for (let i = 0; i < _data.array.length; i++) {
  3953. let item = _data.array[i];
  3954. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
  3955. item.json.title
  3956. }</div>`;
  3957. _test += _div;
  3958. if (item.type == 1) {
  3959. for (let j = 0; j < item.json.array.length; j++) {
  3960. let check = item.json.array[j];
  3961. let _option = `<div style='margin:10px 0 0 40px;'>${
  3962. item.json.answer2 && item.json.answer2.indexOf(j) !== -1
  3963. ? "☑"
  3964. : "☐"
  3965. } ${check.option}</div>`;
  3966. _test += _option;
  3967. }
  3968. } else if (item.type == 3 && item.json.answer2) {
  3969. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  3970. _test += _option;
  3971. } else if (item.type == 5 && item.json.file) {
  3972. for (let j = 0; j < item.json.file.length; j++) {
  3973. let check = item.json.file[j];
  3974. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
  3975. _test += _option;
  3976. }
  3977. } else if (item.type == 6 && item.json.answer2) {
  3978. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  3979. _test += _option;
  3980. } else if (item.type == 7 && item.json.answer2) {
  3981. let _score = this.getScore2(item.json);
  3982. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
  3983. _test += _option;
  3984. } else if (item.type == 8 && item.json.answer2) {
  3985. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  3986. _test += _option;
  3987. } else if (item.type == 11 && item.json.answer2) {
  3988. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  3989. _test += _option;
  3990. }
  3991. }
  3992. _test += `</div>`;
  3993. let _html = _title + _content + _detail + _test;
  3994. this.exportToWord(
  3995. _data.username ? _data.username : "匿名" + "-" + _data.time,
  3996. _html
  3997. );
  3998. },
  3999. async exportToWord(a, html) {
  4000. // 将html文件中需要用到的数据挂载到store上
  4001. const content = `<!DOCTYPE html>
  4002. <html lang="en">
  4003. <head>
  4004. <meta charset="UTF-8">
  4005. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  4006. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  4007. <title>${a}</title>
  4008. <style>
  4009. </style>
  4010. </head>
  4011. <body>
  4012. ${html}
  4013. </body>
  4014. </html>`;
  4015. // debugger
  4016. // 生成报告
  4017. const link = document.createElement("a");
  4018. let dname = a + ".doc";
  4019. // link.download = "报告.html"; // 文件名
  4020. link.download = dname; // 文件名
  4021. link.style.display = "none";
  4022. // 创建文件流
  4023. // 创建bolb实例时,内容一定要放在[]中
  4024. const blob = new Blob([content], {
  4025. type: "text/plain;charset='utf-8'",
  4026. });
  4027. link.href = window.URL.createObjectURL(blob);
  4028. document.body.appendChild(link);
  4029. link.click();
  4030. document.body.removeChild(link);
  4031. },
  4032. setWordHtmlAll(data) {
  4033. let _data = data;
  4034. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  4035. let score = this.score(data.courseJson);
  4036. let isScore = this.score2(data.courseJson);
  4037. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
  4038. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
  4039. _data.name
  4040. }</b>${scoreContent}(填写范围)${
  4041. this.testJson.juriP ? this.testJson.juriP : "所有人"
  4042. }(提交时间)${_data.time}</div>`;
  4043. let _detail = this.testJson.brief
  4044. ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
  4045. : "";
  4046. let _test = `<div style='margin-top:40px;'>`;
  4047. for (let i = 0; i < _data.array.length; i++) {
  4048. let item = _data.array[i];
  4049. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
  4050. item.json.title
  4051. }</div>`;
  4052. _test += _div;
  4053. if (item.type == 1) {
  4054. for (let j = 0; j < item.json.array.length; j++) {
  4055. let check = item.json.array[j];
  4056. let _option = `<div style='margin:10px 0 0 40px;'>${
  4057. item.json.answer2 && item.json.answer2.indexOf(j) !== -1
  4058. ? "☑"
  4059. : "☐"
  4060. } ${check.option}</div>`;
  4061. _test += _option;
  4062. }
  4063. } else if (item.type == 3 && item.json.answer2) {
  4064. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  4065. _test += _option;
  4066. } else if (item.type == 5 && item.json.file) {
  4067. for (let j = 0; j < item.json.file.length; j++) {
  4068. let check = item.json.file[j];
  4069. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
  4070. _test += _option;
  4071. }
  4072. } else if (item.type == 6 && item.json.answer2) {
  4073. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  4074. _test += _option;
  4075. } else if (item.type == 7 && item.json.answer2) {
  4076. let _score = this.getScore2(item.json);
  4077. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
  4078. _test += _option;
  4079. } else if (item.type == 8 && item.json.answer2) {
  4080. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  4081. _test += _option;
  4082. } else if (item.type == 11 && item.json.answer2) {
  4083. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${item.json.answer2}</div>`;
  4084. _test += _option;
  4085. }
  4086. }
  4087. _test += `</div>`;
  4088. let _html = _title + _content + _detail + _test;
  4089. return this.exportToWordAll(_data.name + "-" + _data.time, _html);
  4090. },
  4091. async setWordHtmlAll2(data) {
  4092. let _data = data;
  4093. _data.array = this.JSONSetting(
  4094. JSON.parse(JSON.stringify(JSON.parse(data.courseJson)))
  4095. );
  4096. let _title = `<div style="font-size:30px;font-weight:bold;text-align:center;">${this.testJson.title}</div>`;
  4097. let score = this.score(JSON.parse(data.courseJson));
  4098. let isScore = this.score2(JSON.parse(data.courseJson));
  4099. let scoreContent = score ? `<b>(得分/总分)${isScore}/${score}</b>` : "";
  4100. let _content = `<div style="text-align:center;margin-top: 20px;"><b style="margin-right:40px">(答题人)${
  4101. _data.username ? _data.username : "匿名"
  4102. }</b>${scoreContent}(填写范围)${
  4103. this.testJson.juriP ? this.testJson.juriP : "所有人"
  4104. }(提交时间)${_data.time}</div>`;
  4105. let _detail = this.testJson.brief
  4106. ? `<div style="text-align:center;margin-top: 20px;">${this.testJson.brief}</div>`
  4107. : "";
  4108. let _test = `<div style='margin-top:40px;'>`;
  4109. for (let i = 0; i < _data.array.length; i++) {
  4110. let item = _data.array[i];
  4111. let _div = `<div style='margin-top:20px;font-weight:bold;'>${i + 1}、${
  4112. item.json.title
  4113. }</div>`;
  4114. _test += _div;
  4115. if (item.type == 1) {
  4116. for (let j = 0; j < item.json.array.length; j++) {
  4117. let check = item.json.array[j];
  4118. let _option = `<div style='margin:10px 0 0 40px;'>${
  4119. item.json.answer2 && item.json.answer2.indexOf(j) !== -1
  4120. ? "☑"
  4121. : "☐"
  4122. } ${check.option}</div>`;
  4123. _test += _option;
  4124. }
  4125. } else if (item.type == 3 && item.json.answer2) {
  4126. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  4127. _test += _option;
  4128. } else if (item.type == 5 && item.json.file) {
  4129. for (let j = 0; j < item.json.file.length; j++) {
  4130. let check = item.json.file[j];
  4131. let _option = `<div style='margin:10px 0 0 40px;'>${check.name} <a href='${check.url}'>${check.url}</a></div>`;
  4132. _test += _option;
  4133. }
  4134. } else if (item.type == 6 && item.json.answer2) {
  4135. let _cjson = await this.getCourse(item.json.answer2);
  4136. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${
  4137. _cjson ? _cjson.title : ""
  4138. }</div>`;
  4139. _test += _option;
  4140. } else if (item.type == 7 && item.json.answer2) {
  4141. let _score = this.getScore2(item.json);
  4142. let _option = `<div style='margin:10px 0 0 40px;'>打分:${_score}分</div>`;
  4143. _test += _option;
  4144. } else if (item.type == 8 && item.json.answer2) {
  4145. let _option = `<div style='margin:10px 0 0 40px;'>${item.json.answer2}</div>`;
  4146. _test += _option;
  4147. } else if (
  4148. item.type == 11 &&
  4149. item.json.answer2 &&
  4150. item.json.answer2.length
  4151. ) {
  4152. let _answer = item.json.answer2;
  4153. _answer.length ? (courseCount11 = courseCount11.concat(_answer)) : "";
  4154. _json[ja].json.courseId = _answer ? _answer : [];
  4155. let params = [
  4156. {
  4157. cid: _answer.length ? _answer.join(",") : "",
  4158. },
  4159. ];
  4160. let data = await this.ajax.post(
  4161. this.$store.state.api + "getCourseInfoTestAll2",
  4162. params
  4163. );
  4164. let result = data.data[0];
  4165. let _title = [];
  4166. // this.chapters.find(i=>i.type==6).nameFilters = result.map(r=>{return{text:r.title,value:r.courseId}})
  4167. result.forEach((i) => {
  4168. _title.push(i.title);
  4169. });
  4170. let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${
  4171. _title.length ? _title.join(",") : ""
  4172. }</div>`;
  4173. _test += _option;
  4174. }
  4175. }
  4176. _test += `</div>`;
  4177. let _html = _title + _content + _detail + _test;
  4178. return this.exportToWordAll(
  4179. _data.username ? _data.username : "匿名" + "-" + _data.time,
  4180. _html
  4181. );
  4182. },
  4183. async exportToWordAll(a, html) {
  4184. // 将html文件中需要用到的数据挂载到store上
  4185. const content = `<!DOCTYPE html>
  4186. <html lang="en">
  4187. <head>
  4188. <meta charset="UTF-8">
  4189. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  4190. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  4191. <title>${a}</title>
  4192. <style>
  4193. </style>
  4194. </head>
  4195. <body>
  4196. ${html}
  4197. </body>
  4198. </html>`;
  4199. // debugger
  4200. // 生成报告
  4201. const link = document.createElement("a");
  4202. let dname = a + ".doc";
  4203. // link.download = "报告.html"; // 文件名
  4204. link.download = dname; // 文件名
  4205. link.style.display = "none";
  4206. // 创建文件流
  4207. // 创建bolb实例时,内容一定要放在[]中
  4208. const blob = new Blob([content], {
  4209. type: "text/plain;charset='utf-8'",
  4210. });
  4211. return blob;
  4212. },
  4213. exportAllWord() {
  4214. if (this.selectWorkList.length <= 0)
  4215. return this.$message.info("请先选择需要导出的表单数据");
  4216. this.pdfLoading = true;
  4217. const _chapInfo = this.selectWorkList; //this.worksArray
  4218. let url = [];
  4219. for (let i = 0; i < _chapInfo.length; i++) {
  4220. url.push({
  4221. name: _chapInfo[i].name + "-" + _chapInfo[i].time,
  4222. blob: this.setWordHtmlAll(_chapInfo[i]),
  4223. });
  4224. }
  4225. console.log(url);
  4226. this.downLoadAll(url);
  4227. },
  4228. exportAllWord2() {
  4229. this.pdfLoading = true;
  4230. let params = {
  4231. cid: this.cid,
  4232. page: 1,
  4233. pageSize: 999,
  4234. cn: this.courseName,
  4235. };
  4236. this.ajax
  4237. .get(this.$store.state.api + "getTestWorksPage3", params)
  4238. .then((res) => {
  4239. const _chapInfo = res.data[0];
  4240. let url = [];
  4241. for (let i = 0; i < _chapInfo.length; i++) {
  4242. url.push({
  4243. name: _chapInfo[i].username + "-" + _chapInfo[i].time,
  4244. blob: this.setWordHtmlAll2(_chapInfo[i]),
  4245. });
  4246. }
  4247. console.log(url);
  4248. this.downLoadAll(url);
  4249. })
  4250. .catch((err) => {
  4251. console.error(err);
  4252. });
  4253. },
  4254. downLoadAll(url) {
  4255. const data = url; // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
  4256. const zip = new JSZip();
  4257. const cache = {};
  4258. data.forEach((item) => {
  4259. // 下载文件, 并存成ArrayBuffer对象
  4260. const file_name = item.name; // 获取文件名
  4261. zip.file(file_name + ".doc", item.blob, { binary: true }); // 逐个添加文件
  4262. cache[file_name] = item.blob;
  4263. });
  4264. zip.generateAsync({ type: "blob" }).then((content) => {
  4265. // 生成二进制流
  4266. FileSaver.saveAs(content, this.testJson.title + ".zip"); // 利用file-saver保存文件 自定义文件名
  4267. setTimeout(() => {
  4268. this.pdfLoading = false;
  4269. }, 2000);
  4270. });
  4271. },
  4272. handleFilterChange() {
  4273. console.log(this.$refs.table.store.states.data);
  4274. },
  4275. exportExcel() {
  4276. let res = this.$refs.table.store.states.data;
  4277. if (!res.length) {
  4278. this.$message.error("无导出数据");
  4279. return;
  4280. }
  4281. this.isLoading = true;
  4282. let chapters = this.chapters;
  4283. var array = [];
  4284. for (var i = 0; i < res.length; i++) {
  4285. var _json = {};
  4286. _json["序号"] = i + 1;
  4287. _json["提交人"] = res[i].name ? res[i].name : "匿名";
  4288. _json["提交时间"] = res[i].time;
  4289. for (var j = 0; j < chapters.length; j++) {
  4290. _json[j + 1 + "." + chapters[j].json.title] = "";
  4291. if (res[i].array[j].type == 1 && res[i].array[j].json.answer2) {
  4292. let a = [];
  4293. for (
  4294. var answer2 = 0;
  4295. answer2 < res[i].array[j].json.answer2.length;
  4296. answer2++
  4297. ) {
  4298. a.push(
  4299. res[i].array[j].json.array[
  4300. res[i].array[j].json.answer2[answer2]
  4301. ].option
  4302. );
  4303. }
  4304. _json[j + 1 + "." + chapters[j].json.title] = a.join("、");
  4305. } else if (
  4306. res[i].array[j].type == 3 &&
  4307. res[i].array[j].json.answer2
  4308. ) {
  4309. _json[j + 1 + "." + chapters[j].json.title] =
  4310. res[i].array[j].json.answer2;
  4311. } else if (res[i].array[j].type == 5 && res[i].array[j].json.file) {
  4312. let files = [];
  4313. for (
  4314. let file = 0;
  4315. file < res[i].array[j].json.file.length;
  4316. file++
  4317. ) {
  4318. let check = res[i].array[j].json.file[file];
  4319. files.push(file + 1 + "." + check.name + "----" + check.url);
  4320. }
  4321. _json[j + 1 + "." + chapters[j].json.title] = files.join("\n");
  4322. } else if (
  4323. res[i].array[j].type == 6 &&
  4324. res[i].array[j].json.answer2
  4325. ) {
  4326. _json[j + 1 + "." + chapters[j].json.title] =
  4327. res[i].array[j].json.answer2;
  4328. } else if (
  4329. res[i].array[j].type == 7 &&
  4330. res[i].array[j].json.answer2
  4331. ) {
  4332. let _score = this.getScore2(res[i].array[j].json);
  4333. _json[j + 1 + "." + chapters[j].json.title] = _score;
  4334. } else if (
  4335. res[i].array[j].type == 8 &&
  4336. res[i].array[j].json.answer2
  4337. ) {
  4338. _json[j + 1 + "." + chapters[j].json.title] =
  4339. res[i].array[j].json.answer2;
  4340. } else if (
  4341. res[i].array[j].type == 11 &&
  4342. res[i].array[j].json.answer2
  4343. ) {
  4344. _json[j + 1 + "." + chapters[j].json.title] =
  4345. res[i].array[j].json.answer2;
  4346. }
  4347. }
  4348. array.push(_json);
  4349. }
  4350. let widthJson = [];
  4351. let widthArray = Object.keys(array[0]);
  4352. for (let i = 0; i < widthArray.length; i++) {
  4353. if (i == 0) {
  4354. widthJson.push({ wch: 5 });
  4355. } else {
  4356. widthJson.push({ wch: 30 });
  4357. }
  4358. }
  4359. const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
  4360. let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
  4361. ws["!cols"] = widthJson;
  4362. const styleObj = {
  4363. alignment: {
  4364. horizontal: "center",
  4365. vertical: "center", // 设置垂直居中
  4366. },
  4367. }; // 设置居中对齐和加粗样式
  4368. for (let cell in ws) {
  4369. if (!cell[0].startsWith("!")) {
  4370. ws[cell]["s"] = styleObj;
  4371. }
  4372. }
  4373. XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
  4374. XLSX.writeFile(workbook, this.testJson.title + ".xlsx");
  4375. this.isLoading = false;
  4376. this.$message({
  4377. message: "导出成功",
  4378. type: "success",
  4379. });
  4380. },
  4381. async getCourse(id) {
  4382. let params = {
  4383. cid: id,
  4384. };
  4385. let res = await this.ajax.get(
  4386. this.$store.state.api + "getCourseInfoTest",
  4387. params
  4388. );
  4389. return res.data[0][0];
  4390. },
  4391. getScore2(item) {
  4392. let array = [];
  4393. for (var i = parseInt(item.small); i <= parseInt(item.big); i++) {
  4394. array.push(i);
  4395. }
  4396. return item.answer2 ? array[item.answer2] : "";
  4397. },
  4398. checkScreenSize() {
  4399. this.screenWidth = window.innerWidth;
  4400. this.isDesktop = this.screenWidth > 750; // 你可以根据需要调整这个阈值
  4401. },
  4402. downloadFileType5(fileData, title = "附件", index) {
  4403. this.fileLoading[index].bool = true;
  4404. this.fileLoading[index].count = 0;
  4405. this.fileLoading[index].load = 0;
  4406. this.fileLoading[index].progress = 0;
  4407. let data = fileData;
  4408. const zip = new JSZip();
  4409. let downFileArray = [];
  4410. let uniqueArr = data.filter(
  4411. (v, i, a) => a.map((mb) => mb.userid).indexOf(v.userid) == i
  4412. );
  4413. uniqueArr.forEach((i) => {
  4414. downFileArray.push({
  4415. userid: i.userid,
  4416. username: i.username ? i.username : "匿名",
  4417. urlList: data.filter((d) => d.userid == i.userid).map((m) => m),
  4418. });
  4419. });
  4420. let promises = [];
  4421. console.log("downFileArray", downFileArray);
  4422. downFileArray.forEach((e) => {
  4423. this.fileLoading[index].count += e.urlList.length;
  4424. });
  4425. if (downFileArray.length == 1) {
  4426. //只有一位老师的情况
  4427. if (downFileArray[0].urlList.length > 1) {
  4428. //多个文件的情况
  4429. const folder = zip.folder(`${downFileArray[0].username}`);
  4430. downFileArray[0].urlList.forEach((i) => {
  4431. const promise = getFile(i.url).then((data) => {
  4432. if (data.data != 1) {
  4433. // 下载文件, 并存成ArrayBuffer对象
  4434. const file_name = i.name; // 获取文件名
  4435. folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
  4436. }
  4437. this.fileLoading[index].load += 1;
  4438. this.fileLoading[index].progress = parseInt(
  4439. (this.fileLoading[index].load / this.fileLoading[index].count) *
  4440. 100
  4441. );
  4442. if (
  4443. this.fileLoading[index].load == this.fileLoading[index].count
  4444. ) {
  4445. this.fileLoading[index].bool = false;
  4446. }
  4447. });
  4448. promises.push(promise);
  4449. });
  4450. } else {
  4451. //只有一个文件的情况
  4452. promises.push(
  4453. getFile(downFileArray[0].urlList[0].url).then((data) => {
  4454. if (data.data != 1) {
  4455. // 下载文件, 并存成ArrayBuffer对象
  4456. const file_name = `${downFileArray[0].username}-${downFileArray[0].urlList[0].name}`; // 获取文件名
  4457. zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
  4458. }
  4459. this.fileLoading[index].load += 1;
  4460. this.fileLoading[index].progress = parseInt(
  4461. (this.fileLoading[index].load / this.fileLoading[index].count) *
  4462. 100
  4463. );
  4464. if (
  4465. this.fileLoading[index].load == this.fileLoading[index].count
  4466. ) {
  4467. this.fileLoading[index].bool = false;
  4468. }
  4469. })
  4470. );
  4471. }
  4472. } else if (downFileArray.length > 1) {
  4473. //有多位老师的情况
  4474. downFileArray.forEach((i) => {
  4475. if (i.urlList.length == 1) {
  4476. //只有一个文件的情况
  4477. promises.push(
  4478. getFile(i.urlList[0].url).then((data) => {
  4479. if (data.data != 1) {
  4480. // 下载文件, 并存成ArrayBuffer对象
  4481. const file_name = `${i.username ? i.username : "匿名"}-${
  4482. i.urlList[0].name
  4483. }`; // 获取文件名
  4484. zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
  4485. }
  4486. this.fileLoading[index].load += 1;
  4487. this.fileLoading[index].progress = parseInt(
  4488. (this.fileLoading[index].load /
  4489. this.fileLoading[index].count) *
  4490. 100
  4491. );
  4492. if (
  4493. this.fileLoading[index].load == this.fileLoading[index].count
  4494. ) {
  4495. this.fileLoading[index].bool = false;
  4496. }
  4497. })
  4498. );
  4499. } else if (i.urlList.length > 1) {
  4500. //有多个文件的
  4501. const folder = zip.folder(`${i.username ? i.username : "匿名"}`);
  4502. i.urlList.forEach((ui) => {
  4503. const promise = getFile(ui.url).then((data) => {
  4504. if (data.data != 1) {
  4505. // 下载文件, 并存成ArrayBuffer对象
  4506. const file_name = ui.name; // 获取文件名
  4507. folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
  4508. }
  4509. this.fileLoading[index].load += 1;
  4510. this.fileLoading[index].progress = parseInt(
  4511. (this.fileLoading[index].load /
  4512. this.fileLoading[index].count) *
  4513. 100
  4514. );
  4515. if (
  4516. this.fileLoading[index].load == this.fileLoading[index].count
  4517. ) {
  4518. this.fileLoading[index].bool = false;
  4519. }
  4520. });
  4521. promises.push(promise);
  4522. });
  4523. }
  4524. });
  4525. }
  4526. Promise.all(promises).then(() => {
  4527. console.log("开始下载")
  4528. this.fileLoading[index].bool = true;
  4529. zip.generateAsync({ type: "blob" }).then((content) => {
  4530. // 生成二进制流
  4531. FileSaver.saveAs(content, `${this.testJson.title}-${title}.zip`); // 利用file-saver保存文件 自定义文件名
  4532. this.fileLoading[index].bool = false;
  4533. });
  4534. });
  4535. },
  4536. getUserInfo() {
  4537. let params = {
  4538. uid: this.peopleId,
  4539. };
  4540. this.ajax
  4541. .get(this.$store.state.api + "selectTestUser", params)
  4542. .then((res) => {
  4543. console.log("111111111111111111111", res.data[0][0]);
  4544. // 用于存储归类后的数据的对象
  4545. // this.checkDataType(2)
  4546. this.stype = 2;
  4547. this.courseName = res.data[0][0].name;
  4548. this.searchCourse();
  4549. })
  4550. .catch((err) => {
  4551. console.error(err);
  4552. });
  4553. },
  4554. setWordTemplate(item) {
  4555. this.$refs.docxTemplateDialogRef.open({
  4556. fileData: this.testJson.cover ? JSON.parse(this.testJson.cover) : null,
  4557. testJson: this.testJson,
  4558. courseId: this.testJson.courseId,
  4559. formData: [item],
  4560. }); //这里可以传数据
  4561. },
  4562. changeCover(data) {
  4563. this.testJson.cover = data;
  4564. },
  4565. exportWordData() {
  4566. if (this.selectWorkList.length <= 0)
  4567. return this.$message.info("请先选择需要导出的表单数据");
  4568. this.$refs.docxTemplateDialogRef.open({
  4569. fileData: this.testJson.cover ? JSON.parse(this.testJson.cover) : null,
  4570. testJson: this.testJson,
  4571. courseId: this.testJson.courseId,
  4572. formData: this.selectWorkList,
  4573. }); //这里可以传数据this.worksArray
  4574. },
  4575. handleSelectionChange(value) {
  4576. this.selectWorkList = value;
  4577. },
  4578. tableDataPickerChange() {
  4579. console.log(this.tableDatePicker)
  4580. let _copyData = JSON.parse(JSON.stringify(this.worksArray));
  4581. this.tableDatePicker.forEach((i, index) => {
  4582. /*[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"]] */
  4583. if (i && i.length > 0) {
  4584. let _startDate = new Date(i[0]);
  4585. let _endDate = new Date(i[1]);
  4586. _copyData = _copyData.filter((f) => {
  4587. let _answer = f.array[index].json.answer2
  4588. .replace(/日/g, "")
  4589. .replace(/年|月/g, "-");
  4590. let _answerDate = new Date(_answer);
  4591. return _answerDate >= _startDate && _answerDate <= _endDate;
  4592. });
  4593. }
  4594. });
  4595. this.tableWorksArray = _copyData;
  4596. this.$forceUpdate()
  4597. },
  4598. submissionTimePickerChange(){
  4599. let _copyData = JSON.parse(JSON.stringify(this.worksArray));
  4600. console.log(this.submissionTimePicker)
  4601. if(!this.submissionTimePicker)return this.tableWorksArray = _copyData;
  4602. _copyData = _copyData.filter(i=>{
  4603. let _startDate = new Date(this.submissionTimePicker[0]);
  4604. let _endDate = new Date(this.submissionTimePicker[1]);
  4605. let time = i.time.replace(/日/g, "").replace(/年|月/g, "-");
  4606. let _answerDate = new Date(time);
  4607. return _answerDate >= _startDate && _answerDate <= _endDate;
  4608. })
  4609. this.tableWorksArray = _copyData;
  4610. this.$forceUpdate();
  4611. // this.submissionTimePicker.forEach((i, index) => {
  4612. // /*[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"]] */
  4613. // if (i && i.length > 0) {
  4614. // let _startDate = new Date(i[0]);
  4615. // let _endDate = new Date(i[1]);
  4616. // _copyData = _copyData.filter((f) => {
  4617. // let _answer = f.array[index].json.answer2
  4618. // .replace(/日/g, "")
  4619. // .replace(/年|月/g, "-");
  4620. // let _answerDate = new Date(_answer);
  4621. // return _answerDate >= _startDate && _answerDate <= _endDate;
  4622. // });
  4623. // }
  4624. // });
  4625. },
  4626. textPagingChange(event,item,index){
  4627. this.testArray[index].nowPage = event;
  4628. let _nowPage = this.testArray[index].nowPage;
  4629. let _limit = this.testArray[index].limit;
  4630. this.testArray[index].showArray = this.testArray[index].array.slice(((_nowPage==0?1:_nowPage)-1)*_limit,((_nowPage==0?1:_nowPage)-1)*_limit+_limit);
  4631. },
  4632. getWordCloutData(item,index){
  4633. console.log(item,index);
  4634. this.testArray[index].loadingWordCloud = true;
  4635. const _msg = `NOTICE
  4636. 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.
  4637. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  4638. Instruction: Based on the context, follow "Format example", write content.
  4639. ## 任务
  4640. 请基于以下表单文本,提炼出多个关键词,用于绘制词云图。请给出相应的关键词,关键词出现的频次。请确保输出的关键字准确反映表单文本的主要内容和主题。
  4641. ## 要求
  4642. 1. **提取关键词**:从提供的课堂实录文本中提取出多个最具代表性的关键字。关键词应该涵盖表单文本中的主要概念、重要术语和核心主题。尽量选择多样化的关键词,避免过于集中在某一个主题或概念上。
  4643. 2. **词频统计**:计算每个关键字在文本中出现的频率。
  4644. 3. **输出格式**:输出结果应包含每个关键字、对应的词频数量。
  4645. ## 输出格式
  4646. ### 输出格式
  4647. [
  4648. {"count":1,"name":"氯化钠"},
  4649. {"count":2,"name":"溶液"},
  4650. {"count":1,"name":"实验"},
  4651. {"count":3,"name":"质量分数"},
  4652. {"count":1,"name":"溶质"},
  4653. {"count":2,"name":"氢氧化钠"},
  4654. {"count":1,"name":"溶解度"},
  4655. {"count":4,"name":"饱和溶液"}
  4656. ]
  4657. 请仅仅输出表头,输出关键词和相应的内容,无需其它任何说明文字。
  4658. 冒号、逗号等符号均使用英文字符。
  4659. ### Format example
  4660. [
  4661. {"count":1,"name":"氯化钠"},
  4662. {"count":2,"name":"溶液"},
  4663. {"count":1,"name":"实验"},
  4664. {"count":3,"name":"质量分数"},
  4665. {"count":1,"name":"溶质"},
  4666. {"count":2,"name":"氢氧化钠"},
  4667. {"count":1,"name":"溶解度"},
  4668. {"count":4,"name":"饱和溶液"}
  4669. ]
  4670. ## 表单文本
  4671. ${JSON.stringify(item.array)}
  4672. `;
  4673. const _uuid = uuidv4();
  4674. let params = {
  4675. // model: "gpt-3.5-turbo",
  4676. temperature: 0,
  4677. max_tokens: 4096,
  4678. top_p: 1,
  4679. frequency_penalty: 0,
  4680. presence_penalty: 0,
  4681. messages: [{ role: "user", content: _msg }],
  4682. uid: _uuid,
  4683. mind_map_question: "",
  4684. stream: false,
  4685. model: "gpt-4o-2024-11-20",
  4686. };
  4687. this.ajax
  4688. .post("https://gpt4.cocorobo.cn/chat", params)
  4689. .then((res) => {
  4690. let _data = res.data.FunctionResponse.choices[0];
  4691. let _jsonData = _data.message.content;
  4692. _jsonData = _jsonData.replaceAll("```json", "").replaceAll("```", "");
  4693. let _result = JSON.parse(_jsonData);
  4694. this.testArray[index].wordCloutData = _result;
  4695. this.testArray[index].loadingWordCloud = false;
  4696. console.log(_result);
  4697. }).catch(e=>{
  4698. console.log(e);
  4699. this.testArray[index].loadingWordCloud = false;
  4700. this.testArray[index].wordCloutData = null;
  4701. this.$message.error("生成词云图失败")
  4702. })
  4703. },
  4704. getExamineData(){
  4705. let params = {
  4706. uid: this.peopleId,
  4707. type:this.tType,
  4708. tid:this.examineId,
  4709. }
  4710. this.ajax.get(this.$store.state.api +"getTestExamineByUserId2",params).then(res=>{
  4711. // this.examineData = res.data[0][0];
  4712. if(res.data[0].length>0){
  4713. this.examineData = res.data[0][0];
  4714. }
  4715. }).catch(e=>{
  4716. console.log(e);
  4717. this.examineData = null;
  4718. })
  4719. },
  4720. //查看文件列表
  4721. checkFileListOpen(list){
  4722. this.$refs.checkFileListDialogRef.open(list);
  4723. },
  4724. getClassSortTime(){
  4725. let params = {
  4726. pid:"11"
  4727. }
  4728. this.ajax.get(this.$store.state.api+"select_ClassByParentid",params).then(res=>{
  4729. let _data = res.data[0];
  4730. if(_data.length>0){
  4731. _data.forEach(i=>{
  4732. if(i.value){
  4733. this.sortTime.push(JSON.parse(i.value))
  4734. }
  4735. })
  4736. }
  4737. }).catch(e=>{
  4738. console.log(e);
  4739. })
  4740. },
  4741. reviewChange(row){
  4742. console.log(row);
  4743. let params = [{
  4744. id:row.id,
  4745. isReview:row.isReview
  4746. }]
  4747. this.ajax.post(this.$store.state.api+"update_testCourseWorks_isReviewById",params).then(res=>{
  4748. console.log(res);
  4749. }).catch(e=>{
  4750. console.log(e);
  4751. })
  4752. // console.log(row);
  4753. // this.tableWorksArray.find(i=>i.id===row.id).isReview = "1";
  4754. // this.$forceUpdate()
  4755. },
  4756. //退回表单
  4757. returnTest(row){
  4758. if(row.type=='1')return this.$message.info("该表单未提交")
  4759. if(row.type=='4')return this.$message.info("该表单已退回")
  4760. // this.$refs.returnTestDialogRef.open(row)
  4761. let params = [{
  4762. id:row.id,
  4763. type:"4"
  4764. }];
  4765. this.ajax.post(this.$store.state.api+"update_testCourseWorks_typeById",params).then(res=>{
  4766. if(res.data==1){
  4767. this.reviewChangeFn(row.id)
  4768. this.getData();
  4769. // this.tableWorksArray = this.tableWorksArray.filter(i=>i.id!==row.id);
  4770. this.$message.success("表单退回成功");
  4771. }
  4772. }).catch(e=>{
  4773. console.log(e);
  4774. })
  4775. },
  4776. reviewChangeFn(id){
  4777. let params = [{
  4778. id:id,
  4779. isReview:0
  4780. }]
  4781. this.ajax.post(this.$store.state.api+"update_testCourseWorks_isReviewById",params).then(res=>{
  4782. console.log(res);
  4783. }).catch(e=>{
  4784. console.log(e);
  4785. })
  4786. // console.log(row);
  4787. // this.tableWorksArray.find(i=>i.id===row.id).isReview = "1";
  4788. // this.$forceUpdate()
  4789. },
  4790. },
  4791. beforeDestroy() {
  4792. document.getElementsByTagName("html")[0].style.overflow = "";
  4793. window.removeEventListener("resize", this.checkScreenSize);
  4794. },
  4795. mounted() {
  4796. this.checkScreenSize();
  4797. window.addEventListener("resize", this.checkScreenSize);
  4798. document.getElementsByTagName("html")[0].scrollTop = 0;
  4799. document.getElementsByTagName("html")[0].style.overflow = "hidden";
  4800. this.$nextTick(function () {
  4801. if (this.peopleId) {
  4802. this.getUserInfo();
  4803. } else {
  4804. this.getData();
  4805. }
  4806. if(this.examineId){
  4807. this.getExamineData();
  4808. }
  4809. // this.getClass2()
  4810. this.changeHeight();
  4811. });
  4812. this.getClassSortTime();
  4813. },
  4814. };
  4815. </script>
  4816. <style scoped>
  4817. .pb_content {
  4818. height: 100% !important;
  4819. /* margin: 0 20px 0 20px; */
  4820. }
  4821. .cutBtnBlockCss {
  4822. width: 100%;
  4823. display: flex;
  4824. justify-content: end;
  4825. }
  4826. .cutBtnCss {
  4827. width: 68px;
  4828. height: 27px;
  4829. font-size: 14px;
  4830. border-radius: 5px;
  4831. display: flex;
  4832. color: rgba(54, 129, 252, 1);
  4833. justify-content: center;
  4834. align-items: center;
  4835. margin-top: 10px;
  4836. border: 1px rgba(54, 129, 252, 1) solid;
  4837. }
  4838. .isDesktopRight {
  4839. width: 100% !important;
  4840. margin: 0 !important;
  4841. height: 300px !important;
  4842. border: none !important;
  4843. }
  4844. .isDTitle2JsonTit {
  4845. width: 130px;
  4846. color: rgba(0, 0, 0, 0.9);
  4847. overflow: hidden;
  4848. white-space: nowrap;
  4849. text-overflow: ellipsis;
  4850. }
  4851. .IsDAnswer {
  4852. margin: 20px 0 30px;
  4853. color: rgba(0, 0, 0, 0.6);
  4854. }
  4855. .CutCss {
  4856. height: 60px;
  4857. line-height: 60px;
  4858. }
  4859. .topicTitCss {
  4860. color: rgba(0, 0, 0, 0.9);
  4861. font-weight: 600;
  4862. margin-right: 5px;
  4863. }
  4864. .IsDFile {
  4865. width: 150px;
  4866. height: 120px;
  4867. border-radius: 10px;
  4868. position: relative;
  4869. display: flex;
  4870. flex-direction: column;
  4871. overflow: hidden;
  4872. margin-bottom: 5px;
  4873. }
  4874. .IsDownload {
  4875. position: absolute;
  4876. width: 30px;
  4877. top: 5px;
  4878. right: 5px;
  4879. }
  4880. .IsDImg {
  4881. width: 100%;
  4882. height: 70px;
  4883. flex: 1;
  4884. }
  4885. .pb_content_body {
  4886. width: 100% !important;
  4887. height: 100%;
  4888. }
  4889. .pb_content_body > .right {
  4890. height: 100%;
  4891. width: 100%;
  4892. display: flex;
  4893. overflow: hidden;
  4894. flex-direction: column;
  4895. }
  4896. .basic_box {
  4897. margin: 0 auto;
  4898. position: relative;
  4899. padding: 0 20px 0 20px;
  4900. }
  4901. .courseTop {
  4902. display: flex;
  4903. flex-direction: row;
  4904. justify-content: space-between;
  4905. align-items: center;
  4906. width: calc(100% - 40px);
  4907. margin: 0 auto;
  4908. padding: 10px 0;
  4909. }
  4910. .stepsNav {
  4911. display: flex;
  4912. flex-direction: row;
  4913. justify-content: flex-start;
  4914. align-items: center;
  4915. }
  4916. .step_box {
  4917. width: calc(100% - 40px);
  4918. margin: 0 auto;
  4919. height: calc(100% - 50px);
  4920. overflow: auto;
  4921. background: #ffff;
  4922. border-radius: 5px;
  4923. }
  4924. .el-table >>> .even_row {
  4925. background-color: #f1f1f1 !important;
  4926. }
  4927. .student_page {
  4928. margin-top: 10px;
  4929. }
  4930. .test_title {
  4931. display: flex;
  4932. padding: 15px 15px;
  4933. width: 100%;
  4934. box-sizing: border-box;
  4935. justify-content: space-between;
  4936. align-items: center;
  4937. flex-wrap: wrap;
  4938. margin-bottom: 10px;
  4939. }
  4940. .test_title .left {
  4941. max-width: 100%;
  4942. margin-top: 10px;
  4943. }
  4944. .test_title .left .title {
  4945. width: 100%;
  4946. font-size: 24px;
  4947. font-weight: 700;
  4948. overflow: hidden;
  4949. text-overflow: ellipsis;
  4950. white-space: nowrap;
  4951. }
  4952. .test_title .left .info {
  4953. display: flex;
  4954. margin-top: 15px;
  4955. }
  4956. .test_title .left .info .info_box {
  4957. font-size: 14px;
  4958. }
  4959. .test_title .left .info .info_box + .info_box {
  4960. margin-left: 20px;
  4961. padding-left: 20px;
  4962. border-left: 1px solid #e7e7e7;
  4963. }
  4964. .test_title .left .info .info_box span:nth-child(1) {
  4965. color: #00000099;
  4966. }
  4967. /* .test_title .left .info .info_box span:nth-child(2) {
  4968. } */
  4969. .test_title .right {
  4970. display: flex;
  4971. align-items: center;
  4972. margin-top: 10px;
  4973. max-width: 100%;
  4974. }
  4975. .test_title .right .data_box {
  4976. margin-right: 15px;
  4977. width: 150px;
  4978. border: 1px solid #e7e7e7;
  4979. border-radius: 5px;
  4980. padding: 0 10px;
  4981. height: 57px;
  4982. font-size: 14px;
  4983. color: #00000099;
  4984. display: flex;
  4985. justify-content: space-between;
  4986. align-items: center;
  4987. }
  4988. /* .test_title .right .data_box span:nth-child(1) {
  4989. }
  4990. .test_title .right .data_box span:nth-child(2) {
  4991. } */
  4992. .test_title .right .data_box span:nth-child(2) .big {
  4993. font-size: 22px;
  4994. }
  4995. .test_title .right .btn_box {
  4996. display: flex;
  4997. flex-direction: column;
  4998. width: 57px;
  4999. height: 57px;
  5000. background: #3681fc;
  5001. border-radius: 5px;
  5002. font-size: 14px;
  5003. cursor: pointer;
  5004. align-items: center;
  5005. justify-content: center;
  5006. color: #fff;
  5007. }
  5008. .test_title .right .btn_box span:nth-child(1) {
  5009. display: block;
  5010. width: 12px;
  5011. height: 14px;
  5012. margin-bottom: 5px;
  5013. background-image: url("../../../../assets/icon/test/icon_share.png");
  5014. background-size: 100% 100%;
  5015. }
  5016. /* .test_title .right .btn_box span:nth-child(2) {
  5017. } */
  5018. .search_nav {
  5019. border-bottom: 1px solid #e7e7e7;
  5020. width: 100%;
  5021. box-sizing: border-box;
  5022. padding: 0 15px 10px;
  5023. display: flex;
  5024. align-items: flex-end;
  5025. height: 50px;
  5026. }
  5027. .search_nav > .right {
  5028. display: flex;
  5029. align-items: center;
  5030. }
  5031. .search_nav > .right > span {
  5032. height: 24px;
  5033. font-size: 14px;
  5034. color: #000;
  5035. cursor: pointer;
  5036. position: relative;
  5037. }
  5038. .search_nav > .isDesktopRightCut {
  5039. display: flex;
  5040. justify-content: space-between;
  5041. width: 60%;
  5042. }
  5043. .search_nav > .right > span + span {
  5044. margin-left: 35px;
  5045. }
  5046. .search_nav > .right > span.active {
  5047. color: #3681fc;
  5048. font-weight: 600;
  5049. }
  5050. .search_nav > .right > span.active::before {
  5051. content: "";
  5052. position: absolute;
  5053. bottom: -10px;
  5054. width: 15px;
  5055. height: 3px;
  5056. background: #3681fc;
  5057. left: 50%;
  5058. transform: translateX(-50%);
  5059. }
  5060. .search_nav > .left {
  5061. display: flex;
  5062. align-items: center;
  5063. margin-left: auto;
  5064. }
  5065. .search_nav > .right > span.active2 {
  5066. color: #3681fc;
  5067. font-weight: 600;
  5068. }
  5069. .search_nav > .right > span.active2::before {
  5070. content: "";
  5071. position: absolute;
  5072. bottom: -10px;
  5073. width: 100%;
  5074. height: 3px;
  5075. background: #3681fc;
  5076. left: 50%;
  5077. transform: translateX(-50%);
  5078. }
  5079. .student_input >>> .el-input__inner {
  5080. height: 40px;
  5081. width: 190px;
  5082. font-size: 13px;
  5083. padding: 0 35px 0 10px;
  5084. }
  5085. .serach_icon {
  5086. position: absolute;
  5087. right: 12px;
  5088. top: 50%;
  5089. transform: translateY(-50%);
  5090. width: 13px;
  5091. height: 13px;
  5092. background: url("../../../../assets/icon/test/test_search.png") no-repeat;
  5093. background-size: 100% 100%;
  5094. cursor: pointer;
  5095. }
  5096. .title_content {
  5097. padding-bottom: 10px;
  5098. }
  5099. .title_content > .title_box {
  5100. width: calc(100% - 48px);
  5101. margin: 20px auto 0;
  5102. }
  5103. .title_content > .title_box > .title {
  5104. font-size: 18px;
  5105. display: flex;
  5106. min-height: 35px;
  5107. white-space: pre-line;
  5108. position: relative;
  5109. }
  5110. .title_content > .title_box > .title > .test_icon {
  5111. min-width: 20px;
  5112. height: 20px;
  5113. }
  5114. .title_content > .title_box > .detail {
  5115. font-size: 14px;
  5116. color: #00000099;
  5117. margin-top: 8px;
  5118. white-space: pre-line;
  5119. }
  5120. .title_content > .title_box > .content1 {
  5121. display: flex;
  5122. width: 100%;
  5123. margin-top: 10px;
  5124. }
  5125. .title_content > .title_box > .content1 >>> .el-progress__text {
  5126. color: #3681fc;
  5127. min-width: 55px;
  5128. font-size: 16px !important;
  5129. }
  5130. .title_content > .title_box > .content1 > .left {
  5131. width: calc(100% - 620px);
  5132. border: 1px solid #e7e7e7;
  5133. }
  5134. .title_content > .title_box > .content1 > .left > div + div {
  5135. border-top: 1px solid #e7e7e7;
  5136. }
  5137. .title_content > .title_box > .content1 > .left > .title,
  5138. .title_content > .title_box > .content1 > .left > .data {
  5139. display: flex;
  5140. height: 40px;
  5141. align-items: center;
  5142. width: 100%;
  5143. padding: 0 15px;
  5144. box-sizing: border-box;
  5145. line-height: 16px;
  5146. }
  5147. .title_content > .title_box > .content1 > .left > .title > span,
  5148. .title_content > .title_box > .content1 > .left > .data > span {
  5149. overflow: hidden;
  5150. text-overflow: ellipsis;
  5151. white-space: nowrap;
  5152. }
  5153. .title_content > .title_box > .content1 > .left > .title > span:nth-child(1),
  5154. .title_content > .title_box > .content1 > .left > .data > span:nth-child(1) {
  5155. width: calc(100% - 320px - 110px);
  5156. }
  5157. .title_content > .title_box > .content1 > .left > .title > span:nth-child(2),
  5158. .title_content > .title_box > .content1 > .left > .data > span:nth-child(2) {
  5159. width: 110px;
  5160. }
  5161. .title_content > .title_box > .content1 > .left > .title > span:nth-child(3),
  5162. .title_content > .title_box > .content1 > .left > .data > span:nth-child(3) {
  5163. width: 320px;
  5164. }
  5165. .isDesktopTitle {
  5166. display: flex;
  5167. justify-content: space-around;
  5168. }
  5169. .isDesktopTitle > div {
  5170. width: 60px;
  5171. height: 30px;
  5172. line-height: 30px;
  5173. overflow: hidden;
  5174. white-space: nowrap;
  5175. text-overflow: ellipsis;
  5176. }
  5177. /* .isDesktopTitle:nth-child(1){
  5178. width: 60px;
  5179. }
  5180. .isDesktopTitle:nth-child(2){
  5181. width: 60px;
  5182. }
  5183. .isDesktopTitle:nth-child(3){
  5184. flex: 1;
  5185. } */
  5186. .title_content > .title_box > .content1 > .left > .title {
  5187. font-weight: 700;
  5188. background: #f9fafb;
  5189. }
  5190. .title_content > .title_box > .content1 > .right {
  5191. width: 600px;
  5192. margin-left: 20px;
  5193. border: 1px solid #e7e7e7;
  5194. min-height: 300px;
  5195. box-sizing: border-box;
  5196. }
  5197. .title_content > .title_box > .content2 {
  5198. display: flex;
  5199. width: 100%;
  5200. margin-top: 10px;
  5201. }
  5202. .title_content > .title_box > .content2 > .left {
  5203. width: calc(100% - 620px);
  5204. border: 1px solid #e7e7e7;
  5205. box-sizing: border-box;
  5206. }
  5207. .title_content > .title_box > .content2 > .left > div + div {
  5208. border-top: 1px solid #e7e7e7;
  5209. }
  5210. .title_content > .title_box > .content2 > .left > .title,
  5211. .title_content > .title_box > .content2 > .left > .data {
  5212. display: flex;
  5213. height: 40px;
  5214. align-items: center;
  5215. width: 100%;
  5216. padding: 0 15px;
  5217. box-sizing: border-box;
  5218. line-height: 16px;
  5219. }
  5220. .title_content > .title_box > .content2 > .left > .title > span,
  5221. .title_content > .title_box > .content2 > .left > .data > span {
  5222. overflow: hidden;
  5223. text-overflow: ellipsis;
  5224. white-space: nowrap;
  5225. }
  5226. .title_content > .title_box > .content2 > .left > .title > span:nth-child(1),
  5227. .title_content > .title_box > .content2 > .left > .data > span:nth-child(1) {
  5228. width: 55px;
  5229. }
  5230. .title_content > .title_box > .content2 > .left > .title > span:nth-child(2),
  5231. .title_content > .title_box > .content2 > .left > .data > span:nth-child(2) {
  5232. width: 110px;
  5233. }
  5234. .title_content > .title_box > .content2 > .left > .title > span:nth-child(3),
  5235. .title_content > .title_box > .content2 > .left > .data > span:nth-child(3) {
  5236. max-width: calc(100% - 110px - 55px);
  5237. }
  5238. .title_content > .title_box > .content2 > .left > .title {
  5239. font-weight: 700;
  5240. background: #f9fafb;
  5241. }
  5242. .title_content > .title_box > .content2 > .right {
  5243. width: 600px;
  5244. margin-left: 20px;
  5245. border: 1px solid #e7e7e7;
  5246. box-sizing: border-box;
  5247. }
  5248. .title_content > .title_box > .content2 > .right >>> .wordCloud {
  5249. height: auto;
  5250. min-height: 300px;
  5251. }
  5252. .title_content > .title_box > .content3 {
  5253. display: flex;
  5254. width: 100%;
  5255. overflow: auto;
  5256. }
  5257. .title_content > .title_box > .content3 > .file {
  5258. min-width: 200px;
  5259. width: 200px;
  5260. height: 140px;
  5261. margin: 10px 10px 10px 0px;
  5262. border-radius: 15px;
  5263. box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
  5264. overflow: hidden;
  5265. margin-right: 15px;
  5266. position: relative;
  5267. display: flex;
  5268. flex-direction: column;
  5269. }
  5270. .title_content > .title_box > .content3 > .file > .img {
  5271. width: 100%;
  5272. height: calc(100% - 35px);
  5273. object-fit: cover;
  5274. cursor: pointer;
  5275. }
  5276. .title_content > .title_box > .content3 > .file > .del {
  5277. position: absolute;
  5278. width: 25px;
  5279. top: 10px;
  5280. right: 10px;
  5281. cursor: pointer;
  5282. }
  5283. .title_content > .title_box > .content3 > .file > .download {
  5284. position: absolute;
  5285. width: 25px;
  5286. top: 10px;
  5287. right: 35px;
  5288. cursor: pointer;
  5289. opacity: 0.8;
  5290. }
  5291. .title_content > .title_box > .content3 > .file > .name {
  5292. height: 35px;
  5293. width: 100%;
  5294. background: #f9f9f9;
  5295. display: flex;
  5296. align-items: center;
  5297. padding: 0 10px;
  5298. box-sizing: border-box;
  5299. }
  5300. .title_content > .title_box > .content3 > .file > .name > span {
  5301. display: block;
  5302. text-overflow: ellipsis;
  5303. max-width: 100%;
  5304. white-space: nowrap;
  5305. overflow: hidden;
  5306. }
  5307. .table_content {
  5308. /* width: calc(100% - 48px);
  5309. margin: 20px auto 0; */
  5310. padding: 20px 24px;
  5311. width: 100%;
  5312. box-sizing: border-box;
  5313. }
  5314. .table_content >>> .el-table td {
  5315. padding: 5px 0;
  5316. }
  5317. .isDesktopTable_content {
  5318. width: 100%;
  5319. }
  5320. .isDTitle {
  5321. display: flex;
  5322. justify-content: space-between;
  5323. }
  5324. .isDBri {
  5325. display: flex;
  5326. padding: 15px 0;
  5327. font-size: 14px;
  5328. color: rgba(0, 0, 0, 0.4);
  5329. flex-direction: column;
  5330. height: 80px;
  5331. justify-content: space-between;
  5332. }
  5333. .answer_type {
  5334. background: #f0f2f5;
  5335. padding: 5px 10px;
  5336. display: block;
  5337. border-radius: 3px;
  5338. margin: 5px;
  5339. }
  5340. .table_file{
  5341. max-height: 250px;
  5342. overflow-x:hidden ;
  5343. }
  5344. .table_file > .file {
  5345. min-width: 100px;
  5346. width: 100px;
  5347. height: 70px;
  5348. margin: 10px 10px 10px 0px;
  5349. border-radius: 5px;
  5350. box-shadow: rgb(223, 218, 218) 0px 0px 6px 1px;
  5351. overflow: hidden;
  5352. margin-right: 15px;
  5353. position: relative;
  5354. display: flex;
  5355. flex-direction: column;
  5356. }
  5357. .table_file > .file > .img {
  5358. width: 100%;
  5359. height: calc(100% - 20px);
  5360. object-fit: cover;
  5361. cursor: pointer;
  5362. }
  5363. .table_file > .file > .del {
  5364. position: absolute;
  5365. width: 25px;
  5366. top: 10px;
  5367. right: 10px;
  5368. cursor: pointer;
  5369. }
  5370. .table_file > .file > .download {
  5371. position: absolute;
  5372. width: 25px;
  5373. top: 10px;
  5374. right: 35px;
  5375. cursor: pointer;
  5376. opacity: 0.8;
  5377. }
  5378. .table_file > .file > .name {
  5379. height: 20px;
  5380. width: 100%;
  5381. background: #f9f9f9;
  5382. display: flex;
  5383. align-items: center;
  5384. padding: 0 10px;
  5385. box-sizing: border-box;
  5386. font-size: 12px;
  5387. }
  5388. .table_file > .file > .name > span {
  5389. display: block;
  5390. text-overflow: ellipsis;
  5391. max-width: 100%;
  5392. white-space: nowrap;
  5393. overflow: hidden;
  5394. }
  5395. .btnA {
  5396. color: #fff;
  5397. background-color: #0061ff;
  5398. padding: 0 24px;
  5399. font-size: 14px;
  5400. min-width: 64px;
  5401. font-weight: 500;
  5402. border-radius: 4px;
  5403. box-sizing: border-box;
  5404. border: none;
  5405. cursor: pointer;
  5406. transition: all 0.2s ease-in-out;
  5407. height: 36px;
  5408. display: flex;
  5409. align-items: center;
  5410. justify-content: center;
  5411. line-height: 1;
  5412. margin-right: 10px;
  5413. position: relative;
  5414. }
  5415. .buttonBox {
  5416. position: absolute;
  5417. bottom: -0;
  5418. transform: translateY(100%);
  5419. background: #fff;
  5420. border-radius: 5px;
  5421. box-shadow: 0 0 3px 1px #e3e3e3;
  5422. width: 100%;
  5423. z-index: 999;
  5424. }
  5425. .buttonBox > div {
  5426. height: 40px;
  5427. line-height: 40px;
  5428. width: 100%;
  5429. text-align: center;
  5430. color: #000;
  5431. box-sizing: border-box;
  5432. }
  5433. .buttonBox > div + div {
  5434. border-top: 1px solid #e0e0e0;
  5435. }
  5436. .buttonBox > div:hover {
  5437. background: #f6f8ff;
  5438. }
  5439. .content4 {
  5440. width: 100%;
  5441. height: auto;
  5442. display: flex;
  5443. flex-wrap: nowrap;
  5444. overflow: auto;
  5445. }
  5446. .out_box {
  5447. display: flex;
  5448. flex-direction: column;
  5449. flex-wrap: nowrap;
  5450. /* width: 200px; */
  5451. min-width: 280px;
  5452. width: 280px;
  5453. background: #fff;
  5454. /* background-color: white; */
  5455. margin-right: 15px;
  5456. /* border: 1px solid #ccc; */
  5457. height: fit-content;
  5458. box-sizing: border-box;
  5459. border-radius: 0px 0px 5px 5px;
  5460. /* overflow: hidden; */
  5461. margin-bottom: 15px;
  5462. position: relative;
  5463. border-radius: 8px;
  5464. box-sizing: border-box;
  5465. overflow: hidden;
  5466. border: 1px solid #3682fc00;
  5467. cursor: pointer;
  5468. border: 1px solid #6a9ff5;
  5469. height: auto;
  5470. }
  5471. .out_boxActive {
  5472. box-sizing: border-box;
  5473. border: 3px solid #3681fc !important;
  5474. }
  5475. .out_box:hover {
  5476. border: 1px solid #3681fc;
  5477. }
  5478. .bottom_box {
  5479. width: 100%;
  5480. display: flex;
  5481. padding: 10px;
  5482. flex-direction: column;
  5483. box-sizing: border-box;
  5484. height: 121px;
  5485. flex-wrap: nowrap;
  5486. justify-content: space-evenly;
  5487. }
  5488. .bottom_box > div:nth-child(1) {
  5489. width: 100%;
  5490. /* overflow: hidden;
  5491. text-overflow: ellipsis;
  5492. white-space: nowrap;
  5493. font-weight: bold; */
  5494. display: flex;
  5495. align-items: center;
  5496. justify-content: space-between;
  5497. }
  5498. .bottom_box > div:nth-child(1) > span:nth-child(1) {
  5499. max-width: 100%;
  5500. overflow: hidden;
  5501. text-overflow: ellipsis;
  5502. white-space: nowrap;
  5503. font-weight: bold;
  5504. }
  5505. .bottom_box > div:nth-child(1) > span:nth-child(2) {
  5506. min-width: fit-content;
  5507. font-size: 14px;
  5508. color: #8c8c8c;
  5509. }
  5510. .tup {
  5511. width: 100%;
  5512. height: auto;
  5513. margin: 0 auto;
  5514. overflow: hidden;
  5515. display: flex;
  5516. flex-direction: column;
  5517. align-items: center;
  5518. padding: 10px;
  5519. box-sizing: border-box;
  5520. }
  5521. .tup > img {
  5522. width: 100%;
  5523. /* height: 100%; */
  5524. height: 150px;
  5525. /* object-fit: cover; */
  5526. object-fit: contain;
  5527. }
  5528. .kc_time {
  5529. margin-top: 8px;
  5530. font-size: 14px;
  5531. color: #717c8d;
  5532. }
  5533. .kc_time + .kc_time {
  5534. margin-top: 0;
  5535. }
  5536. .kc_t {
  5537. margin-top: 5px;
  5538. width: 100%;
  5539. white-space: nowrap;
  5540. overflow: hidden;
  5541. text-overflow: ellipsis;
  5542. display: flex;
  5543. align-items: center;
  5544. justify-content: space-between;
  5545. }
  5546. .kc_t > span:nth-child(1) {
  5547. max-width: 100%;
  5548. overflow: hidden;
  5549. text-overflow: ellipsis;
  5550. white-space: nowrap;
  5551. }
  5552. .kc_t > span:nth-child(2) {
  5553. min-width: fit-content;
  5554. font-size: 14px;
  5555. color: #8c8c8c;
  5556. }
  5557. .title_box > .title > .title_downBtn {
  5558. position: absolute;
  5559. right: 10px;
  5560. top: 0;
  5561. }
  5562. .fileLoadDiv >>> .el-dialog__header {
  5563. display: none;
  5564. }
  5565. .fileLoadDiv >>> .el-dialog__body {
  5566. display: flex;
  5567. justify-content: center;
  5568. }
  5569. .fileLoadDiv >>> .el-dialog {
  5570. margin-top: 60vh !important;
  5571. width: 200px !important;
  5572. height: 80px;
  5573. display: flex;
  5574. justify-content: center;
  5575. align-items: center;
  5576. border-radius: 15px;
  5577. }
  5578. .mask {
  5579. background-color: rgb(0 0 0 / 30%);
  5580. /* position: fixed; */
  5581. position: absolute;
  5582. top: 0;
  5583. left: 0;
  5584. width: 100%;
  5585. height: 100%;
  5586. z-index: 90;
  5587. display: flex;
  5588. align-items: center;
  5589. justify-content: center;
  5590. }
  5591. .progressBox {
  5592. width: 300px;
  5593. height: 150px;
  5594. background: #fff;
  5595. border-radius: 10px;
  5596. box-shadow: 0 0 6px 1px #bfbfbf;
  5597. display: flex;
  5598. align-items: center;
  5599. justify-content: center;
  5600. flex-direction: column;
  5601. position: relative;
  5602. color: #6c6c6c;
  5603. }
  5604. .progressBox >>> .el-progress-bar__outer {
  5605. background-color: #d1dfff !important;
  5606. }
  5607. .progressBox .lbox {
  5608. height: 50px;
  5609. font-size: 19px;
  5610. display: flex;
  5611. align-items: center;
  5612. color: #747474;
  5613. }
  5614. .progressBox .lbox img {
  5615. width: 40px;
  5616. margin-right: 20px;
  5617. }
  5618. .boxSticky {
  5619. position: sticky;
  5620. top: 0;
  5621. z-index: 999;
  5622. background: #fff;
  5623. }
  5624. .aiBoxRight {
  5625. height: calc(100% - 158px - 46px);
  5626. width: 500px;
  5627. margin: 0 auto;
  5628. position: fixed;
  5629. z-index: 999;
  5630. right: 30px;
  5631. bottom: 10px;
  5632. box-shadow: 0 0 5px 2px #00000045;
  5633. border-radius: 5px;
  5634. overflow: hidden;
  5635. }
  5636. .tableDatePicker {
  5637. width: 20px;
  5638. height: 20px;
  5639. margin-left: 5px;
  5640. }
  5641. .tableDatePicker >>> .el-date-editor {
  5642. width: 100% !important;
  5643. height: 100% !important;
  5644. padding: 0 !important;
  5645. cursor: pointer;
  5646. background: none;
  5647. border: none;
  5648. }
  5649. .tableDatePicker >>> .el-date-editor > i {
  5650. display: none;
  5651. }
  5652. .tableDatePicker >>> .el-date-editor > input {
  5653. display: none;
  5654. }
  5655. .tableDatePicker >>> .el-date-editor > span {
  5656. width: 100%;
  5657. height: 100%;
  5658. display: flex;
  5659. justify-content: center;
  5660. align-items: center;
  5661. color: #9095a7;
  5662. }
  5663. .tableDatePicker >>> .el-date-editor > .el-range__close-icon {
  5664. display: block;
  5665. position: relative;
  5666. top: -6px;
  5667. color: red;
  5668. }
  5669. .paging{
  5670. width: 100%;
  5671. height: 40px;
  5672. display: flex;
  5673. justify-content: flex-end;
  5674. align-items: center;
  5675. margin-top:auto ;
  5676. }
  5677. .noWordCloud{
  5678. width: 100%;
  5679. height: 100%;
  5680. min-height: 300px;
  5681. display: flex;
  5682. justify-content: center;
  5683. align-items: center;
  5684. }
  5685. .noWordCloud>div{
  5686. display: flex;
  5687. align-items: center;
  5688. }
  5689. .noWordCloud>div>img{
  5690. width: 40px;
  5691. height: 40px;
  5692. margin-left: 5px;
  5693. }
  5694. .timePickerActive{
  5695. color: #409EFF;
  5696. }
  5697. .openCeBox{
  5698. width: 320px;
  5699. display: flex;
  5700. flex-direction: column;
  5701. gap: 10px;
  5702. font-size: 14px !important;
  5703. padding: 10px;
  5704. box-sizing: border-box;
  5705. position: relative;
  5706. }
  5707. .openCeBoxLoading{
  5708. position: absolute;
  5709. left: 0;
  5710. top: 0;
  5711. width: 100%;
  5712. height: 100%;
  5713. z-index: 10;
  5714. background: #fff;
  5715. opacity: .8;
  5716. display: flex;
  5717. align-items: center;
  5718. justify-content: center;
  5719. color: #000;
  5720. }
  5721. .TopTit{
  5722. font-family: PingFang SC;
  5723. font-weight: 600;
  5724. font-size: 16px;
  5725. line-height: 24px;
  5726. color: #000;
  5727. }
  5728. .Topkong{
  5729. font-family: PingFang SC;
  5730. font-weight: 400;
  5731. font-size: 12px;
  5732. color: #000;
  5733. display: flex;
  5734. align-items: center;
  5735. gap: 5px;
  5736. cursor: pointer;
  5737. }
  5738. .BtnOPC{
  5739. width: 50px;height: 30px;font-size: 14px;display: flex;
  5740. justify-content: center;
  5741. align-items: center;
  5742. background: #E7E7E7;
  5743. }
  5744. .quoteBlock{
  5745. position: absolute;
  5746. right: 0;
  5747. width: 220px;
  5748. background: #fff;
  5749. border-radius: 10px;
  5750. color: #000;
  5751. z-index: 100001;
  5752. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 浅灰色阴影 */
  5753. border-radius: 5px;overflow: hidden;
  5754. }
  5755. .quoteBlock >>> .el-input__inner{
  5756. border-radius: 0 !important;
  5757. border: none !important;
  5758. box-shadow: none !important;
  5759. resize: none !important;
  5760. border-bottom: 1px #DCDFE6 solid !important;
  5761. }
  5762. .quoteBlockCon{
  5763. padding: 10px 10px;box-sizing: border-box;
  5764. display: flex;
  5765. flex-direction: column;
  5766. gap: 8px;
  5767. font-size: 14px;
  5768. height: 200px;
  5769. overflow: auto;
  5770. }
  5771. .quoteBlockCon > div{
  5772. height: 25px;line-height: 25px;
  5773. cursor: pointer;
  5774. padding: 0 5px;
  5775. box-sizing: border-box;
  5776. border-radius: 5px;
  5777. }
  5778. .maskCss{
  5779. /* background: #000; */
  5780. position: fixed;
  5781. top: 0;
  5782. left: 0;
  5783. width: 100%;
  5784. height: 100%;
  5785. z-index: 10000;
  5786. opacity: .5;
  5787. }
  5788. .SPCE{
  5789. font-size: 12px;
  5790. background: #fff;
  5791. padding: 2px 5px;box-sizing: border-box;
  5792. border-radius: 3px;
  5793. }
  5794. .selCss{
  5795. background: #e7e7e7;
  5796. color:#0061ff;
  5797. }
  5798. .proBar{
  5799. background: #dae0f0;
  5800. font-size: 14px;
  5801. font-weight: normal;
  5802. color: #6f93ea;
  5803. padding: 4px;
  5804. border-radius: 3px;
  5805. }
  5806. .file_more{
  5807. width:20px;
  5808. height:20px;
  5809. margin-left: 10px;
  5810. margin-top: auto;
  5811. margin-bottom: 10px;
  5812. }
  5813. .file_more>svg{
  5814. width: 100%;
  5815. height:100%;
  5816. cursor: pointer;
  5817. }
  5818. .el-checkbox{
  5819. display: flex;
  5820. align-items: center;
  5821. }
  5822. .score_box{
  5823. font-size: 22px;
  5824. margin-right: 20px;
  5825. font-weight:bold;
  5826. }
  5827. .typeStatus{
  5828. padding: 4px 8px;
  5829. border-radius: 4px;
  5830. border: solid 1px gray;
  5831. display: flex;
  5832. align-items: center;
  5833. justify-content: center;
  5834. font-size: 12px;
  5835. }
  5836. .typeStatus_2{
  5837. background:#F0F9F2;
  5838. border-color: #B5E3BF;
  5839. color:#5FC875;
  5840. }
  5841. .typeStatus_4{
  5842. background:#FEF5EC;
  5843. border-color: #FAD0A1;
  5844. color:#F7933B;
  5845. }
  5846. .typeStatus_1{
  5847. background:#EEF3FC;
  5848. border-color: #0F40F5;
  5849. color:#0F40F5;
  5850. }
  5851. </style>