index.vue 210 KB

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