index.vue 189 KB

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