index.vue 191 KB

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