index.vue 185 KB

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