addCourse3.vue 932 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="pb_content_body" style="position: relative; margin: 0">
  4. <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  5. <div class="courseTop">
  6. <div class="stepsNav">
  7. <el-breadcrumb separator-class="el-icon-arrow-right">
  8. <el-breadcrumb-item :to="{
  9. path:
  10. '/course?userid=' +
  11. userid +
  12. '&oid=' +
  13. oid +
  14. '&org=' +
  15. org +
  16. '&role=' +
  17. role,
  18. }">课程管理</el-breadcrumb-item>
  19. <el-breadcrumb-item>
  20. <span style="color: rgb(15, 126, 255)">添加课程</span>
  21. </el-breadcrumb-item>
  22. </el-breadcrumb>
  23. </div>
  24. <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  25. </div>
  26. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  27. <!-- @mouseenter="stepDisplay(true)"
  28. @mouseleave="stepDisplay(false)" -->
  29. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  30. <div class="stepBg" v-if="false">
  31. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  32. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  33. <div>
  34. <img src="../../../assets/icon/first.png" alt />
  35. </div>
  36. <div>填写基本信息</div>
  37. </div>
  38. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  39. <div>
  40. <img src="../../../assets/icon/firstNo.png" alt />
  41. </div>
  42. <div>填写基本信息</div>
  43. </div>
  44. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  45. </div>
  46. <!-- <div
  47. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  48. class="second"
  49. @click="navSteps(2)"
  50. >
  51. <div style="margin: 5px 10px 0 0; width: 2rem">
  52. <img src="../../../assets/icon/second.png" alt />
  53. </div>
  54. <div>选择课程模板</div>
  55. </div>
  56. <div
  57. v-else-if="cidType === 0 && isStepDisplay"
  58. class="secondNo"
  59. @click="navSteps(2)"
  60. >
  61. <div>
  62. <img src="../../../assets/icon/secondNo.png" alt />
  63. </div>
  64. <div>选择课程模板</div>
  65. </div> -->
  66. <!-- <div
  67. v-if="isStepDisplay"
  68. class="stepBorder"
  69. :class="{ 'border-active': steps > 2 }"
  70. ></div> -->
  71. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  72. <div>
  73. <img src="../../../assets/icon/third.png" alt />
  74. </div>
  75. <div>上传课程内容</div>
  76. </div>
  77. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  78. <div>
  79. <img src="../../../assets/icon/thirdNo.png" alt />
  80. </div>
  81. <div>上传课程内容</div>
  82. </div>
  83. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  84. <div v-if="steps > 3 && isStepDisplay" class="four">
  85. <div>
  86. <img src="../../../assets/icon/four.png" alt />
  87. </div>
  88. <div>上传完成</div>
  89. </div>
  90. <div v-else-if="isStepDisplay" class="fourNo">
  91. <div>
  92. <img src="../../../assets/icon/fourNo.png" alt />
  93. </div>
  94. <div>上传完成</div>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  99. style="padding: 0" :style="{
  100. height:
  101. !isStepDisplay && !isBtnDisplay
  102. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  103. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  104. }">
  105. <div class="updateMask" :style="{
  106. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  107. }" v-if="cid && userid != courseUserid && role != '1'"></div>
  108. <div class="whiteBg" style="background: unset; padding: 0">
  109. <div>
  110. <div class="basic_box" style="padding: 0">
  111. <div class="big_box">
  112. <div class="left_first">
  113. <div :class="{
  114. updateTips:
  115. cid && userid != courseUserid && role != '1',
  116. }">
  117. <div style="width: 100%">
  118. <div class="course_input_box">
  119. <div class="bb_courseIcon">
  120. <img src="../../../assets/icon/new/course.png" />
  121. </div>
  122. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" style="
  123. border: 1.5px solid rgb(202, 209, 220);
  124. margin: 0px 10px 0px 0px;
  125. border-radius: 5px;
  126. font-weight: 600;
  127. padding: 12px 14px 12px 71px;
  128. " @change="setCover" />
  129. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  130. style="justify-content: center; min-width: 150px"></el-switch>
  131. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  132. style="justify-content: center; min-width: 175px"></el-switch>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  137. <span>类型</span>
  138. <!-- 学科+ 主题+ 未来+ -->
  139. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  140. style="display: flex; align-items: center">
  141. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  142. :key="index">
  143. <el-radio :label="item.name">{{
  144. item.name
  145. }}</el-radio>
  146. </div>
  147. </el-radio-group>
  148. </div>
  149. <div class="both">
  150. <div class="choose">
  151. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  152. <span v-if="
  153. CourseTypeJson[item.id].length > 0 &&
  154. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  155. ? pTypeCheck.indexOf(item.id) != -1
  156. : true)
  157. ">{{ item.name }}:</span>
  158. <el-checkbox-group v-model="courseTypeId" v-if="
  159. CourseTypeJson[item.id].length > 0 &&
  160. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  161. ? pTypeCheck.indexOf(item.id) != -1
  162. : true)
  163. ">
  164. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  165. item1.name }}</el-checkbox>
  166. </el-checkbox-group>
  167. <!-- <div
  168. v-else
  169. style="font-size: 14px; margin-left: -8px"
  170. >
  171. 暂无
  172. </div> -->
  173. </div>
  174. </div>
  175. </div>
  176. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  177. <div class="info_box_t_box">
  178. <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  179. style="justify-content: center; min-width: 175px"></el-switch>
  180. </div>
  181. <div class="info_box_t_box">
  182. <span>AI生成模式:</span>
  183. <div class="mode_box">
  184. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  185. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  186. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  187. </div>
  188. </div>
  189. </div>
  190. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  191. <div class="info_box_t_box">
  192. <span>课程节数:</span>
  193. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  194. <span>节</span>
  195. </div>
  196. <div class="info_box_t_box">
  197. <span>课程时长:</span>
  198. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  199. <span>min</span>
  200. </div>
  201. </div> -->
  202. </div>
  203. <div class="right_first" v-loading="imageloading2">
  204. <!-- <div class="ai_box">
  205. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  206. </div> -->
  207. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  208. 上传封面
  209. </div>
  210. <div style="width: 100%">
  211. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  212. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  213. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  214. <div v-if="cover.length == 0">点击添加封面</div>
  215. <div class="cover_mask">
  216. <img src="../../../assets/icon/new/cover_update.png" /><span
  217. style="margin-top: 5px">修改封面</span>
  218. </div>
  219. </div>
  220. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  221. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  222. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  223. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  224. <i class="el-icon-plus"></i>
  225. </el-upload> -->
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  233. <div class="whiteBg" style="border-radius: 0">
  234. <div class="c_info_title">
  235. 课程权限设置
  236. </div>
  237. <div class="wb_j_box">
  238. <div class="wb_j_box_content">
  239. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  240. (dialogVisibleClass = true),
  241. (classSearch = ''),
  242. (gradeId = ''),
  243. getClass()
  244. ">添加班级</button>
  245. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  246. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  247. getClassC(tc) }}</span>
  248. </div> -->
  249. <div class="wb_j_box_btn" @click="
  250. (dialogVisibleClass = true),
  251. (classSearch = ''),
  252. (gradeId = ''),
  253. getClass()
  254. ">
  255. <div class="wb_j_box_title">授课班级</div>
  256. <div class="wb_j_box_btn_c">
  257. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  258. v-if="checkboxList2.length" popper-class="text_tooltip2">
  259. <div class="wb_j_box_span">
  260. {{ getListClassC(checkboxList2) }}
  261. </div>
  262. </el-tooltip>
  263. <div v-else class="wb_j_box_span">请选择授课班级</div>
  264. <div class="wb_j_box_arrow"></div>
  265. </div>
  266. </div>
  267. </div>
  268. <div class="wb_j_box_content">
  269. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  270. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  271. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  272. checkBoolean
  273. ? checkboxList3
  274. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  275. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  276. </div> -->
  277. <div class="wb_j_box_btn" @click="openMember">
  278. <div class="wb_j_box_title">协同人员</div>
  279. <div class="wb_j_box_btn_c">
  280. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  281. v-if="checkboxList3.length" popper-class="text_tooltip2">
  282. <div class="wb_j_box_span">
  283. {{ getListMan2(checkboxList3) }}
  284. </div>
  285. </el-tooltip>
  286. <div v-else class="wb_j_box_span">请选择协同人员</div>
  287. <div class="wb_j_box_arrow"></div>
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  294. <div class="c_info_title">目标管理</div>
  295. <div style="margin: 0 auto; padding: 0 20px">
  296. <div style="
  297. width: 95%;
  298. min-height: 200px;
  299. border: 1px solid #cad1dc;
  300. border-radius: 4px;
  301. position: relative;
  302. ">
  303. <div class="e_add_top">
  304. <div class="e_add_title">
  305. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  306. 清除
  307. </button>
  308. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  309. 添加
  310. </button>
  311. <!-- <span>当前使用目标管理</span>
  312. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  313. <img
  314. src="../../../assets/line.png"
  315. class="cru_line"
  316. style="
  317. width: 125px;
  318. height: 20px;
  319. bottom: -10px;
  320. left: 155px;
  321. "
  322. /> -->
  323. </div>
  324. <div style="
  325. display: flex;
  326. flex-direction: row;
  327. align-items: center;
  328. ">
  329. <!-- <el-button
  330. type="primary"
  331. size="small"
  332. @click="dialogVisiblemb = true"
  333. >添加目标管理</el-button
  334. >
  335. <el-button
  336. type="primary"
  337. size="small"
  338. @click="deleteEva()"
  339. >清除内容</el-button
  340. > -->
  341. <!-- <div class="e_add_delete" @click="deleteEva()">
  342. <img src="../../../assets/icon/delete.png" alt="" />
  343. </div> -->
  344. </div>
  345. </div>
  346. <div v-if="evalua == ''">
  347. <div class="noneBox">
  348. <img src="../../../assets/icon/new/eva_none.png" />
  349. <span>请添加目标管理</span>
  350. </div>
  351. </div>
  352. <div class="e_add_content" v-else>
  353. <div class="e_add_list_pbox">
  354. <div class="e_add_list_pbox_title">
  355. <span class="type_title">切换模式</span>
  356. <div class="type_content">
  357. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  358. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  359. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  360. </div>
  361. </div>
  362. <div class="e_add_list_pbox_content">
  363. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  364. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  365. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  366. v-if="typeMode == 3">
  367. </SeeBoard>
  368. </div>
  369. </div>
  370. </div>
  371. </div>
  372. </div>
  373. </div>
  374. </div>
  375. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  376. <div style="position: relative;
  377. background: #fff;
  378. box-sizing: border-box;
  379. padding: 1px 20px 10px;
  380. width: 100%;
  381. border-radius: 10px;">
  382. <div style="
  383. display: flex;
  384. flex-direction: row;
  385. justify-content: space-between;
  386. align-items: center;
  387. " :style="{
  388. margin: true
  389. ? '20px 0 10px'
  390. : '20px 0 0',
  391. }">
  392. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  393. 已有教案
  394. <div class="add_info_box" style="margin: 0 0 0 auto">
  395. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  396. 上传已有教案
  397. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  398. beforeUploadInfo2(
  399. $event,
  400. 14
  401. )
  402. " />
  403. </button>
  404. <button class="c_pub_button_add" @click="clickGenTT">
  405. 一键智能总结生成
  406. </button>
  407. </div>
  408. </div>
  409. </div>
  410. <div>
  411. <div class="add_chapters_box add_c_none" v-if="
  412. teacherInfoData &&
  413. teacherInfoData.length == 0
  414. ">
  415. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  416. </div>
  417. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  418. <div @dragstart="
  419. dragStart(item1, index1, 0)
  420. " @dragover.prevent="
  421. dragOver(index1, 0)
  422. " @dragend="dragEnd()" :draggable="isdrag ==
  423. 'chapter-' + 0 + '-' + index1
  424. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  425. getChapterData(
  426. $event,
  427. index1,
  428. item1.type
  429. )
  430. " :class="{
  431. dragOverTop2:
  432. newIndex === index1 &&
  433. typeIndex ==
  434. 'chapter-' +
  435. 0 +
  436. '-' +
  437. index1 &&
  438. oldIndex > index1 &&
  439. dragType == 'drag',
  440. dragOverBottom2:
  441. newIndex === index1 &&
  442. typeIndex ==
  443. 'chapter-' +
  444. 0 +
  445. '-' +
  446. index1 &&
  447. oldIndex < index1 &&
  448. dragType == 'drag',
  449. }">
  450. <div class="chapter_upload_o" style="
  451. position: relative;
  452. display: flex;
  453. align-items: center;
  454. ">
  455. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  456. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  457. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  458. </div>
  459. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  460. </div>
  461. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  462. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  463. </div>
  464. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  465. </div>
  466. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  467. </div>
  468. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  469. </div>
  470. </div>
  471. <div class="chapter_upload_n">
  472. <input readonly="true" v-if="
  473. item1.type == 2 ||
  474. item1.type == 3 ||
  475. item1.type == 12 ||
  476. item1.type == 13 ||
  477. item1.type == 7
  478. " :placeholder="item1.name" style="
  479. border: none;
  480. outline: none;
  481. width: 80%;
  482. minwidth: 215px;
  483. z-index: 99;
  484. font-size: 14px;
  485. white-space: nowrap;
  486. overflow: hidden;
  487. text-overflow: ellipsis;
  488. " />
  489. </div>
  490. <div class="chapter_upload_ic">
  491. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  492. <div class="chapter_upload_ic_r" @click.stop="
  493. deleteTeacherInfoData(
  494. $event,
  495. index1
  496. )
  497. ">
  498. <div></div>
  499. </div>
  500. </div>
  501. </div>
  502. </div>
  503. </div>
  504. </div>
  505. <div v-if="
  506. teacherinfoproVisible
  507. " class="mask">
  508. <div class="progressBox">
  509. <div class="lbox">
  510. <img src="../../../assets/loading.gif" />上传中,请稍后
  511. </div>
  512. <div style="margin-bottom: 10px">
  513. <span>{{
  514. teacherinfoisFinishSize
  515. }}M</span>
  516. /
  517. <span>{{
  518. teacherinfoisAllSize
  519. }}M</span>
  520. </div>
  521. <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  522. ? teacherinfoprogress
  523. : 0
  524. " style="width: 80%"></el-progress>
  525. </div>
  526. </div>
  527. </div>
  528. </div>
  529. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  530. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  531. <div class="c_info_title">
  532. 已有教案摘要
  533. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  534. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  535. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1)"
  536. @click="openAiDialog(2, 'aiteacherTextDetail',1)">提取摘要</button>
  537. </el-tooltip>
  538. </div>
  539. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  540. <div style="width: calc(100%);" class='op_task_box'>
  541. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  542. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  543. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  544. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  545. <div class="op_box">
  546. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  547. <div style="display: flex;">
  548. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  549. <div class="r_pub_button_op"
  550. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
  551. @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
  552. </el-tooltip>
  553. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  554. </div>
  555. </div>
  556. </div>
  557. </div>
  558. </div>
  559. </div>
  560. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  561. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  562. <div class="c_info_title">
  563. 课程目标
  564. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  565. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  566. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1)"
  567. @click="openAiDialog(2, 'aitargetTextDetail',1)">提取目标</button>
  568.                   </el-tooltip>
  569. </div>
  570. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  571. <div style="width: calc(100%);" class='op_task_box'>
  572. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  573. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  574. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  575. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  576. <div class="op_box">
  577. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  578. <div style="display: flex;">
  579. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  580. <div class="r_pub_button_op"
  581. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
  582. @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
  583. </el-tooltip>
  584. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  585. </div>
  586. </div>
  587. </div>
  588. </div>
  589. </div>
  590. </div>
  591. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  592. <div style="position: relative;
  593. background: #fff;
  594. box-sizing: border-box;
  595. padding: 1px 20px 10px;
  596. width: 100%;
  597. border-radius: 10px;">
  598. <div style="
  599. display: flex;
  600. flex-direction: row;
  601. justify-content: space-between;
  602. align-items: center;
  603. " :style="{
  604. margin: true
  605. ? '20px 0 10px'
  606. : '20px 0 0',
  607. }">
  608. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  609. 系统推荐参考资料
  610. <div class="add_info_box" style="margin: 0 0 0 auto">
  611. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  612. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  613. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  614. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  615.  </el-tooltip>
  616. </div>
  617. </div>
  618. </div>
  619. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  620. <div class="add_chapters_box add_c_none" v-if="
  621. cankaoInfoData &&
  622. cankaoInfoData.length == 0
  623. ">
  624. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  625. </div>
  626. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  627. <div @dragstart="
  628. dragStart(item1, index1, 0)
  629. " @dragover.prevent="
  630. dragOver(index1, 0)
  631. " @dragend="dragEnd()" :draggable="isdrag ==
  632. 'chapter-' + 0 + '-' + index1
  633. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  634. getChapterData(
  635. $event,
  636. index1,
  637. item1.type
  638. )
  639. " :class="{
  640. dragOverTop2:
  641. newIndex === index1 &&
  642. typeIndex ==
  643. 'chapter-' +
  644. 0 +
  645. '-' +
  646. index1 &&
  647. oldIndex > index1 &&
  648. dragType == 'drag',
  649. dragOverBottom2:
  650. newIndex === index1 &&
  651. typeIndex ==
  652. 'chapter-' +
  653. 0 +
  654. '-' +
  655. index1 &&
  656. oldIndex < index1 &&
  657. dragType == 'drag',
  658. }">
  659. <div class="chapter_upload_o" style="
  660. position: relative;
  661. display: flex;
  662. align-items: center;
  663. ">
  664. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  665. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  666. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  667. </div>
  668. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  669. </div>
  670. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  671. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  672. </div>
  673. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  674. </div>
  675. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  676. </div>
  677. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  678. </div>
  679. </div>
  680. <div class="chapter_upload_n">
  681. <input readonly="true" v-if="
  682. item1.type == 2 ||
  683. item1.type == 3 ||
  684. item1.type == 12 ||
  685. item1.type == 13 ||
  686. item1.type == 7
  687. " :placeholder="item1.name" style="
  688. border: none;
  689. outline: none;
  690. width: 80%;
  691. minwidth: 215px;
  692. z-index: 99;
  693. font-size: 14px;
  694. white-space: nowrap;
  695. overflow: hidden;
  696. text-overflow: ellipsis;
  697. " />
  698. </div>
  699. <div class="chapter_upload_ic">
  700. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  701. <div class="chapter_upload_ic_r" @click.stop="
  702. deleteCankaoInfoData(
  703. $event,
  704. index1
  705. )
  706. ">
  707. <div></div>
  708. </div>
  709. </div>
  710. </div>
  711. </div>
  712. </div>
  713. </div>
  714. </div>
  715. </div>
  716. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  717. <div style="position: relative;
  718. background: #fff;
  719. box-sizing: border-box;
  720. padding: 1px 20px 10px;
  721. width: 100%;
  722. border-radius: 10px;">
  723. <div style="
  724. display: flex;
  725. flex-direction: row;
  726. justify-content: space-between;
  727. align-items: center;
  728. " :style="{
  729. margin: true
  730. ? '20px 0 10px'
  731. : '20px 0 0',
  732. }">
  733. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  734. 知识库
  735. <div class="add_info_box" style="margin: 0 0 0 auto">
  736. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  737. 上传补充资料
  738. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  739. beforeUploadInfo2(
  740. $event,
  741. 15
  742. )
  743. " />
  744. </button>
  745. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  746. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  747. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  748. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  749.  </el-tooltip>
  750. </div>
  751. </div>
  752. </div>
  753. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  754. <div class="add_chapters_box add_c_none" v-if="
  755. infoData2 &&
  756. infoData2.length == 0
  757. ">
  758. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  759. </div>
  760. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  761. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  762. getChapterData(
  763. $event,
  764. index1,
  765. item1.type
  766. )
  767. " >
  768. <div class="chapter_upload_o" style="
  769. position: relative;
  770. display: flex;
  771. align-items: center;
  772. ">
  773. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  774. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  775. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  776. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  777. </div>
  778. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  779. </div>
  780. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  781. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  782. </div>
  783. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  784. </div>
  785. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  786. </div>
  787. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  788. </div>
  789. </div>
  790. <div class="chapter_upload_n">
  791. <input readonly="true" v-if="
  792. item1.type == 2 ||
  793. item1.type == 3 ||
  794. item1.type == 12 ||
  795. item1.type == 13 ||
  796. item1.type == 7
  797. " :placeholder="item1.name" @click.stop="
  798. checkChpater2($event, index1 )
  799. " style="
  800. border: none;
  801. outline: none;
  802. width: 80%;
  803. minwidth: 215px;
  804. z-index: 99;
  805. font-size: 14px;
  806. white-space: nowrap;
  807. overflow: hidden;
  808. text-overflow: ellipsis;
  809. " />
  810. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  811. border: none;
  812. outline: none;
  813. width: 80%;
  814. white-space: nowrap;
  815. overflow: hidden;
  816. text-overflow: ellipsis;
  817. " readonly="true" @click="
  818. selectAttText(index1)
  819. " />
  820. <input :placeholder="item1.title ? item1.title : '链接'
  821. " v-if="item1.type == 8" style="
  822. border: none;
  823. outline: none;
  824. width: 80%;
  825. white-space: nowrap;
  826. overflow: hidden;
  827. text-overflow: ellipsis;
  828. " readonly="true" @click="selectLine(index1)" />
  829. <input :placeholder="item1.title ? item1.title : '链接'
  830. " v-if="item1.type == 14" style="
  831. border: none;
  832. outline: none;
  833. width: 80%;
  834. white-space: nowrap;
  835. overflow: hidden;
  836. text-overflow: ellipsis;
  837. " readonly="true" @click="
  838. openUpdateSource(index1)
  839. " />
  840. </div>
  841. <div class="chapter_upload_ic">
  842. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  843. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  844. checkChpater2($event, index1 )
  845. ">
  846. <div></div>
  847. </div>
  848. <div class="chapter_upload_ic_r" @click.stop="
  849. deleteInfoData2(
  850. $event,
  851. index1
  852. )
  853. ">
  854. <div></div>
  855. </div>
  856. </div>
  857. </div>
  858. </div>
  859. </div>
  860. </div>
  861. <div v-if="
  862. infoproVisible
  863. " class="mask">
  864. <div class="progressBox">
  865. <div class="lbox">
  866. <img src="../../../assets/loading.gif" />上传中,请稍后
  867. </div>
  868. <div style="margin-bottom: 10px">
  869. <span>{{
  870. infoisFinishSize
  871. }}M</span>
  872. /
  873. <span>{{
  874. infoisAllSize
  875. }}M</span>
  876. </div>
  877. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  878. ? infoprogress
  879. : 0
  880. " style="width: 80%"></el-progress>
  881. </div>
  882. </div>
  883. </div>
  884. </div>
  885. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!isuseT && (!yiKeTemplateArray.includes(templateid))) || (isuseT && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid))">
  886. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  887. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  888. 课程简要描述
  889. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  890. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  891. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
  892. @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
  893. </el-tooltip>
  894. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;">生成概况和目标</button>
  895. </div>
  896. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  897. <div style="width: calc(100%);" class='op_task_box'>
  898. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  899. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  900. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  901. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  902. <div class="op_box">
  903. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  904. <div style="display: flex;">
  905. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  906. <div class="r_pub_button_op"
  907. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  908. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  909. </el-tooltip>
  910. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB">{{ courseTextB ? '确定' : '编辑'}}</div>
  911. </div>
  912. </div>
  913. </div>
  914. </div>
  915. </div>
  916. </div>
  917. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!isuseT && (!yiKeTemplateArray.includes(templateid))) || (isuseT && (!yiKeTemplateArray.includes(templateid)) && courseTextBool)">
  918. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  919. <div class="c_info_title">
  920. 课程目标
  921. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  922. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  923. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  924. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标</button>
  925.                   </el-tooltip>
  926. </div>
  927. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  928. <div style="width: calc(100%);" class='op_task_box'>
  929. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  930. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  931. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  932. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  933. <div class="op_box">
  934. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  935. <div style="display: flex;">
  936. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  937. <div class="r_pub_button_op"
  938. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
  939. @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
  940. </el-tooltip>
  941. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  942. </div>
  943. </div>
  944. </div>
  945. </div>
  946. </div>
  947. </div>
  948. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  949. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  950. <div class="c_info_title">
  951. 补充资料
  952. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  953. </div>
  954. <div class="buchong_box">
  955. <span>暂时还没有内容,快去添加吧~</span>
  956. </div>
  957. </div> -->
  958. <div style="position: relative;
  959. background: #fff;
  960. box-sizing: border-box;
  961. padding: 1px 20px 10px;
  962. width: 100%;
  963. border-radius: 10px;">
  964. <div style="
  965. display: flex;
  966. flex-direction: row;
  967. justify-content: space-between;
  968. align-items: center;
  969. " :style="{
  970. margin: true
  971. ? '20px 0 10px'
  972. : '20px 0 0',
  973. }">
  974. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  975. 补充资料
  976. <div class="add_info_box" style="margin: 0 0 0 auto">
  977. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  978. 上传补充资料
  979. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  980. beforeUploadInfo2(
  981. $event,
  982. 13
  983. )
  984. " />
  985. </button>
  986. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  987. 图文
  988. </button>
  989. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  990. 链接
  991. </button>
  992. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  993. 代码
  994. </button>
  995. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  996. 资源
  997. </button> -->
  998. </div>
  999. </div>
  1000. </div>
  1001. <div>
  1002. <div class="add_chapters_box add_c_none" v-if="
  1003. infoData &&
  1004. infoData.length == 0
  1005. ">
  1006. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  1007. </div>
  1008. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1009. <div @dragstart="
  1010. dragStart(item1, index1, 0)
  1011. " @dragover.prevent="
  1012. dragOver(index1, 0)
  1013. " @dragend="dragEnd()" :draggable="isdrag ==
  1014. 'chapter-' + 0 + '-' + index1
  1015. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1016. getChapterData(
  1017. $event,
  1018. index1,
  1019. item1.type
  1020. )
  1021. " :class="{
  1022. dragOverTop2:
  1023. newIndex === index1 &&
  1024. typeIndex ==
  1025. 'chapter-' +
  1026. 0 +
  1027. '-' +
  1028. index1 &&
  1029. oldIndex > index1 &&
  1030. dragType == 'drag',
  1031. dragOverBottom2:
  1032. newIndex === index1 &&
  1033. typeIndex ==
  1034. 'chapter-' +
  1035. 0 +
  1036. '-' +
  1037. index1 &&
  1038. oldIndex < index1 &&
  1039. dragType == 'drag',
  1040. }">
  1041. <!-- <div @mousedown="
  1042. isdrag =
  1043. 'chapter-' + 0 + '-' + index1
  1044. " @mouseup="isdrag = ''" @touchstart="
  1045. isdrag =
  1046. 'chapter-' + 0 + '-' + index1
  1047. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1048. <div class="chapter_upload_o" style="
  1049. position: relative;
  1050. display: flex;
  1051. align-items: center;
  1052. ">
  1053. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1054. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1055. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1056. </div>
  1057. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1058. </div>
  1059. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1060. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1061. </div>
  1062. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1063. </div>
  1064. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1065. </div>
  1066. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1067. </div>
  1068. </div>
  1069. <div class="chapter_upload_n">
  1070. <input readonly="true" v-if="
  1071. item1.type == 2 ||
  1072. item1.type == 3 ||
  1073. item1.type == 12 ||
  1074. item1.type == 13 ||
  1075. item1.type == 7
  1076. " :placeholder="item1.name" @click="
  1077. updataVideoT(
  1078. $event,
  1079. index1
  1080. )
  1081. " style="
  1082. border: none;
  1083. outline: none;
  1084. width: 80%;
  1085. minwidth: 215px;
  1086. z-index: 99;
  1087. font-size: 14px;
  1088. white-space: nowrap;
  1089. overflow: hidden;
  1090. text-overflow: ellipsis;
  1091. " />
  1092. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1093. border: none;
  1094. outline: none;
  1095. width: 80%;
  1096. white-space: nowrap;
  1097. overflow: hidden;
  1098. text-overflow: ellipsis;
  1099. " readonly="true" @click="
  1100. selectAttText(index1)
  1101. " />
  1102. <input :placeholder="item1.title ? item1.title : '链接'
  1103. " v-if="item1.type == 8" style="
  1104. border: none;
  1105. outline: none;
  1106. width: 80%;
  1107. white-space: nowrap;
  1108. overflow: hidden;
  1109. text-overflow: ellipsis;
  1110. " readonly="true" @click="selectLine(index1)" />
  1111. <input :placeholder="item1.title ? item1.title : '链接'
  1112. " v-if="item1.type == 14" style="
  1113. border: none;
  1114. outline: none;
  1115. width: 80%;
  1116. white-space: nowrap;
  1117. overflow: hidden;
  1118. text-overflow: ellipsis;
  1119. " readonly="true" @click="
  1120. openUpdateSource(index1)
  1121. " />
  1122. </div>
  1123. <div class="chapter_upload_ic">
  1124. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1125. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1126. <div class="chapter_upload_up" @click="
  1127. upCd(
  1128. $event,
  1129. index1
  1130. )
  1131. "></div>
  1132. <div class="chapter_upload_down" @click="
  1133. downCd(
  1134. $event,
  1135. index1
  1136. )
  1137. "></div>
  1138. </div>
  1139. <div class="chapter_upload_ic_edit" v-if="
  1140. item1.type == 2 ||
  1141. item1.type == 3 ||
  1142. item1.type == 12 ||
  1143. item1.type == 13 ||
  1144. item1.type == 7
  1145. " @click.stop="
  1146. updataVideoT(
  1147. $event,
  1148. index1
  1149. )
  1150. ">
  1151. <div></div>
  1152. </div>
  1153. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1154. selectAttText(index1)
  1155. ">
  1156. <div></div>
  1157. </div>
  1158. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1159. @click="selectLine(index1)">
  1160. <div></div>
  1161. </div>
  1162. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1163. openUpdateSource(index1)
  1164. ">
  1165. <div></div>
  1166. </div> -->
  1167. <div class="chapter_upload_ic_r" @click.stop="
  1168. deleteInfoData(
  1169. $event,
  1170. index1
  1171. )
  1172. ">
  1173. <div></div>
  1174. </div>
  1175. </div>
  1176. </div>
  1177. </div>
  1178. </div>
  1179. </div>
  1180. <div v-if="
  1181. infoproVisible
  1182. " class="mask">
  1183. <div class="progressBox">
  1184. <!-- <div id="closePro" class="closeCss">
  1185. <img src="../../../../assets/icon/close.png" alt />
  1186. </div> -->
  1187. <div class="lbox">
  1188. <img src="../../../assets/loading.gif" />上传中,请稍后
  1189. </div>
  1190. <div style="margin-bottom: 10px">
  1191. <span>{{
  1192. infoisFinishSize
  1193. }}M</span>
  1194. /
  1195. <span>{{
  1196. infoisAllSize
  1197. }}M</span>
  1198. </div>
  1199. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1200. ? infoprogress
  1201. : 0
  1202. " style="width: 80%"></el-progress>
  1203. </div>
  1204. </div>
  1205. </div>
  1206. </div>
  1207. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1208. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1209. <div class="c_info_title">
  1210. 补充描述
  1211. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1212. </div>
  1213. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1214. <div style="width: calc(100%)">
  1215. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1216. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1217. </div>
  1218. </div>
  1219. </div>
  1220. </div>
  1221. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  1222. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1223. <div class="c_info_title">
  1224. 课程大纲
  1225. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1226. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1227. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1228. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1229. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1230. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1231. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1232. </el-tooltip>
  1233. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1234. @click="openAiDialog2(2, 'aiOutline')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1235. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1236. @click="openAiDialog2(2, 'aiOutline2')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1237. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1238. </div>
  1239. <div class="task_outline">
  1240. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1241. <div class="outline_task">
  1242. <div class="title">任务{{ index + 1 }}</div>
  1243. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1244. v-model="item.task" />
  1245. <div class="outline_btn">
  1246. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1247. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)" @click="openAiDialog(2, 'aiOutlineDetail2', index)">{{ item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  1248. </el-tooltip>
  1249. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index)">在上面加入一个任务</button>
  1250. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index)">在下面加入一个任务</button>
  1251. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="deleteTask2(index)" v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  1252. </div>
  1253. </div>
  1254. <div class="outline_detail" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1255. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1256. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1257. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1258. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1259. <div class="op_box">
  1260. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1261. <div style="display: flex;">
  1262. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1263. <div class="r_pub_button_op"
  1264. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  1265. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  1266. </el-tooltip>
  1267. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index)">{{
  1268. item.isTask3 ? '确定' : '编辑'}}</div>
  1269. </div>
  1270. </div>
  1271. </div>
  1272. </div>
  1273. </div>
  1274. </div>
  1275. </div>
  1276. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  1277. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1278. <div class="c_info_title">
  1279. 概念群
  1280. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1281. @click="openAiDialog2(2, 'aiCpote1')">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1282. </div>
  1283. <div class="task_outline">
  1284. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1285. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1286. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1287. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1288. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1289. <div class="op_box">
  1290. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1291. <div style="display: flex;">
  1292. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1293. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  1294. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1295. </el-tooltip>
  1296. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  1297. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1298. </div>
  1299. </div>
  1300. </div>
  1301. </div>
  1302. </div>
  1303. </div>
  1304. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  1305. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1306. <div class="c_info_title">
  1307. 问题链
  1308. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1309. @click="openAiDialog2(2, 'aiCpote2')">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1310. </div>
  1311. <div class="task_outline">
  1312. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1313. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1314. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1315. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1316. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1317. <div class="op_box">
  1318. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1319. <div style="display: flex;">
  1320. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1321. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  1322. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1323. </el-tooltip>
  1324. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  1325. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1326. </div>
  1327. </div>
  1328. </div>
  1329. </div>
  1330. </div>
  1331. </div>
  1332. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  1333. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1334. <div class="c_info_title">
  1335. 目标层
  1336. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1337. @click="openAiDialog2(2, 'aiCpote3')">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1338. </div>
  1339. <div class="task_outline">
  1340. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1341. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1342. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1343. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1344. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1345. <div class="op_box">
  1346. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1347. <div style="display: flex;">
  1348. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1349. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  1350. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  1351. </el-tooltip>
  1352. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  1353. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1354. </div>
  1355. </div>
  1356. </div>
  1357. </div>
  1358. </div>
  1359. </div>
  1360. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  1361. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1362. <div class="c_info_title">
  1363. 任务簇
  1364. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1365. @click="openAiDialog2(2, 'aiCpote4')">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1366. </div>
  1367. <div class="task_outline">
  1368. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1369. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1370. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1371. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1372. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1373. <div class="op_box">
  1374. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1375. <div style="display: flex;">
  1376. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1377. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  1378. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  1379. </el-tooltip>
  1380. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  1381. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1382. </div>
  1383. </div>
  1384. </div>
  1385. </div>
  1386. </div>
  1387. </div>
  1388. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1389. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1390. <div class="c_info_title">
  1391. 教案
  1392. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1393. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1394. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1395. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1396. </el-tooltip>
  1397. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1398. @click="openAiDialog2(2, 'aiTeacher2')" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1399. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="panTeacher() == 0 && istemplate == 1 && templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1400. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1401. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1402. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1403. </el-tooltip>
  1404. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1405. </div>
  1406. <div class="task_outline">
  1407. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1408. <div class="outline_task">
  1409. <div class="title">任务{{ index + 1 }}</div>
  1410. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1411. v-model="item.task" />
  1412. </div>
  1413. <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1414. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1415. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1416. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1417. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1418. <div class="op_box">
  1419. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1420. <div style="display: flex;">
  1421. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1422. <div class="r_pub_button_op"
  1423. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  1424. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  1425. </el-tooltip>
  1426. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1427. item.isTask3 ? '确定' : '编辑'}}</div>
  1428. </div>
  1429. </div>
  1430. </div>
  1431. </div>
  1432. </div>
  1433. </div>
  1434. </div>
  1435. <div class="info_btnBox3" v-if="istemplate != 1">
  1436. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1437. goTo(
  1438. '/course?userid=' +
  1439. userid +
  1440. '&oid=' +
  1441. oid +
  1442. '&org=' +
  1443. org +
  1444. '&role=' +
  1445. role
  1446. )
  1447. ">
  1448. 返回课程
  1449. </button>
  1450. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1451. {{ steps == 4 ? "返回课程" : "上一步" }}
  1452. </button>
  1453. <button class="c_pub_button_confirm" v-if="isuseT && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  1454. {{isuseT ? "重新生成概况和目标" : "生成概况和目标"}}
  1455. </button>
  1456. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  1457. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="steps < 4">
  1458. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  1459. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  1460. pub_btn_next_img: steps != 3,
  1461. pub_btn_finish_img: steps == 3,
  1462. }">
  1463. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  1464. </button>
  1465. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  1466. @contextmenu.prevent="nextSteps(1)" :class="{
  1467. pub_btn_next_img: steps != 3,
  1468. pub_btn_finish_img: steps == 3,
  1469. }">
  1470. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  1471. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  1472. : "下一步" }}
  1473. </button>
  1474. </el-tooltip>
  1475. </div>
  1476. </div>
  1477. <div class="rightBox" v-if="steps == 2" :style="{
  1478. height:
  1479. !isStepDisplay && !isBtnDisplay
  1480. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1481. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1482. }">
  1483. <div class="basic_box" style="
  1484. padding: 20px 30px 0px !important;
  1485. box-sizing: border-box;
  1486. height: calc(100% - 80px);
  1487. overflow: auto;
  1488. background: #fff;
  1489. ">
  1490. <!-- <div
  1491. style="
  1492. color: #b8b8b8;
  1493. background: #fff;
  1494. width: 26%;
  1495. height: 40px;
  1496. border-radius: 15px;
  1497. padding-left: 20px;
  1498. line-height: 40px;
  1499. font-size: 17px;
  1500. box-shadow: 0px 1px 2px 2px #e0e0e0;
  1501. "
  1502. >-->
  1503. <div class="right_title" style="border: none; margin: 0; padding: 0">
  1504. 请选择合适的课程模板
  1505. </div>
  1506. <div class="wordbox">
  1507. <div class="wordTeacher" @click="checkTemplate2()">
  1508. <div class="wordPic">
  1509. <img src="../../../assets/icon/new/template_none.png" alt />
  1510. </div>
  1511. <div style="
  1512. margin-top: 10px;
  1513. line-height: 19px;
  1514. overflow: hidden;
  1515. text-overflow: ellipsis;
  1516. white-space: nowrap;
  1517. padding: 0 20px;
  1518. ">
  1519. 空白模板
  1520. </div>
  1521. </div>
  1522. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  1523. <div class="wordPic">
  1524. <img src="../../../assets/icon/new/template.png" alt />
  1525. </div>
  1526. <div style="
  1527. margin-top: 10px;
  1528. line-height: 19px;
  1529. overflow: hidden;
  1530. text-overflow: ellipsis;
  1531. white-space: nowrap;
  1532. padding: 0 20px;
  1533. ">
  1534. {{ aa.title }}
  1535. </div>
  1536. </div>
  1537. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  1538. <div class="wordPic">
  1539. <img src="../../../assets/icon/new/template.png" alt />
  1540. </div>
  1541. <div style="
  1542. margin-top: 10px;
  1543. line-height: 19px;
  1544. overflow: hidden;
  1545. text-overflow: ellipsis;
  1546. white-space: nowrap;
  1547. padding: 0 20px;
  1548. ">
  1549. 简易模板
  1550. </div>
  1551. </div>
  1552. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  1553. <div class="wordPic">
  1554. <img src="../../../assets/icon/new/template.png" alt />
  1555. </div>
  1556. <div style="
  1557. margin-top: 10px;
  1558. line-height: 19px;
  1559. overflow: hidden;
  1560. text-overflow: ellipsis;
  1561. white-space: nowrap;
  1562. padding: 0 20px;
  1563. ">
  1564. 智能粘贴模式
  1565. </div>
  1566. </div>
  1567. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  1568. <div class="wordPic">
  1569. <img src="../../../assets/icon/wordMub.png" alt />
  1570. </div>
  1571. <div style="
  1572. margin-top: 10px;
  1573. line-height: 19px;
  1574. overflow: hidden;
  1575. text-overflow: ellipsis;
  1576. white-space: nowrap;
  1577. padding: 0 20px;
  1578. ">
  1579. 未来小学课程设计
  1580. </div>
  1581. </div> -->
  1582. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  1583. <div class="wordPic">
  1584. <img src="../../../assets/icon/wordMub.png" alt />
  1585. </div>
  1586. <div style="
  1587. margin-top: 10px;
  1588. line-height: 19px;
  1589. overflow: hidden;
  1590. text-overflow: ellipsis;
  1591. white-space: nowrap;
  1592. padding: 0 20px;
  1593. ">
  1594. 我的课程
  1595. </div>
  1596. </div> -->
  1597. </div>
  1598. </div>
  1599. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  1600. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1601. goTo(
  1602. '/course?userid=' +
  1603. userid +
  1604. '&oid=' +
  1605. oid +
  1606. '&org=' +
  1607. org +
  1608. '&role=' +
  1609. role
  1610. )
  1611. ">
  1612. 返回课程
  1613. </button>
  1614. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1615. {{ steps == 4 ? "返回课程" : "上一步" }}
  1616. </button>
  1617. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1618. pub_btn_next_img: steps != 3,
  1619. pub_btn_finish_img: steps == 3,
  1620. }">
  1621. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1622. </button>
  1623. </div>
  1624. </div>
  1625. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1626. height:
  1627. !isStepDisplay && !isBtnDisplay
  1628. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1629. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1630. }">
  1631. <div class="rb_c_box">
  1632. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1633. <div class="rb_c_nav">
  1634. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1635. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1636. </div>
  1637. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1638. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1639. position: istemplate == 1 ? 'sticky' : 'unset',
  1640. top: istemplate == 1 ? '0' : 'unset'
  1641. }">
  1642. <!-- <div class="navTop">辅助导航</div> -->
  1643. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  1644. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1645. <div class="nt_taskBox" style="width: 100%;">
  1646. <div class="nt_taskTitle"
  1647. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1648. unitIndex + 1 }}</div>
  1649. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1650. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1651. <span>{{ unitJson[unitIndex].dyName }}</span>
  1652. </el-tooltip>
  1653. </div>
  1654. </div>
  1655. </div> -->
  1656. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1657. .taskJson" :key="tIndex" :class="{
  1658. dragOverTop:
  1659. newIndex === tIndex &&
  1660. typeIndex == 'task-' + tIndex &&
  1661. oldIndex > tIndex &&
  1662. dragType == 'task',
  1663. dragOverBottom:
  1664. newIndex === tIndex &&
  1665. typeIndex == 'task-' + tIndex &&
  1666. oldIndex < tIndex &&
  1667. dragType == 'task',
  1668. }">
  1669. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1670. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1671. class="navTask" :class="{
  1672. isNavTask:
  1673. isClickColor > 0 && isClickColor == tIndex + 1,
  1674. isNavOpen: t.toolOpen,
  1675. }">
  1676. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1677. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1678. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1679. class="chapter_upload_drag"></div>
  1680. <div class="nt_taskBox">
  1681. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1682. <div class="nt_taskName">
  1683. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1684. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1685. </el-tooltip>
  1686. </div>
  1687. </div>
  1688. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1689. 1
  1690. ">
  1691. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1692. @click.stop="taskMove(1, tIndex)"></div>
  1693. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1694. @click.stop="taskMove(2, tIndex)"></div>
  1695. </div> -->
  1696. </div>
  1697. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1698. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1699. @click="jumpGj(tIndex, toolIndex2)">
  1700. <div class="gjCss" :class="{
  1701. isGjCss:
  1702. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1703. }">
  1704. <div>工具{{ toolIndex2 + 1 }}:</div>
  1705. <div>
  1706. {{
  1707. toolsData[tool.tool[0]] &&
  1708. toolsData[tool.tool[0]].name
  1709. }}
  1710. </div>
  1711. </div>
  1712. </div>
  1713. </div>
  1714. </div>
  1715. </div>
  1716. <div class="navBottom" v-if="courseState == 1">
  1717. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1718. dragOverTop:
  1719. newIndex === stageIndex &&
  1720. typeIndex == 'Unit-' + stageIndex &&
  1721. oldIndex > stageIndex &&
  1722. dragType == 'Unit',
  1723. dragOverBottom:
  1724. newIndex === stageIndex &&
  1725. typeIndex == 'Unit-' + stageIndex &&
  1726. oldIndex < stageIndex &&
  1727. dragType == 'Unit',
  1728. }">
  1729. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1730. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1731. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1732. isNavStage: stageIndex == unitIndex,
  1733. isNavStageOpen: stage.toolOpen,
  1734. }">
  1735. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1736. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1737. class="chapter_upload_drag"></div>
  1738. <div class="nt_taskBox">
  1739. <div class="nt_taskTitle">
  1740. 第{{ stageIndex + 1 }}阶段:
  1741. </div>
  1742. <div class="nt_taskName">
  1743. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1744. " placement="top">
  1745. <span>{{
  1746. stage.dyName ? stage.dyName : "未命名阶段"
  1747. }}</span>
  1748. </el-tooltip>
  1749. </div>
  1750. </div>
  1751. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1752. </div>
  1753. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1754. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1755. dragOverTop:
  1756. newIndex === tIndex &&
  1757. typeIndex == 'task-' + tIndex &&
  1758. ((oldIndex > tIndex &&
  1759. stageIndex == checkUnitIndex) ||
  1760. (oldIndex == tIndex &&
  1761. stageIndex == checkUnitIndex &&
  1762. checkUnitIndex != oldUnitIndex)) &&
  1763. dragType == 'task',
  1764. dragOverBottom:
  1765. newIndex === tIndex &&
  1766. typeIndex == 'task-' + tIndex &&
  1767. oldIndex < tIndex &&
  1768. stageIndex == checkUnitIndex &&
  1769. dragType == 'task',
  1770. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  1771. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  1772. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  1773. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  1774. isNavTask:
  1775. isClickColor > 0 &&
  1776. isClickColor == tIndex + 1 &&
  1777. stageIndex == unitIndex,
  1778. isNavOpen: t.toolOpen,
  1779. }">
  1780. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  1781. <div @mousedown="
  1782. isdrag = 'task-' + stageIndex + '-' + tIndex
  1783. " @mouseup="isdrag = ''" @touchstart="
  1784. isdrag = 'task-' + stageIndex + '-' + tIndex
  1785. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  1786. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  1787. <div class="nt_taskTitle">
  1788. 任务{{ tIndex + 1 }}:
  1789. </div>
  1790. <div class="nt_taskName">
  1791. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1792. <span>{{
  1793. t.task ? t.task : "未命名任务"
  1794. }}</span>
  1795. </el-tooltip>
  1796. </div>
  1797. </div>
  1798. </div>
  1799. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1800. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1801. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  1802. <div class="gjCss" :class="{
  1803. isGjCss:
  1804. toolIndexType ==
  1805. `gj${tIndex}${toolIndex2}${stageIndex}`,
  1806. }">
  1807. <div>工具{{ toolIndex2 + 1 }}:</div>
  1808. <div>
  1809. {{
  1810. toolsData[tool.tool[0]] &&
  1811. toolsData[tool.tool[0]].name
  1812. }}
  1813. </div>
  1814. </div>
  1815. </div>
  1816. </div>
  1817. </div>
  1818. </div>
  1819. </div>
  1820. </div>
  1821. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  1822. <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
  1823. </div>
  1824. </div>
  1825. <div class="rb_c_box_right">
  1826. <!-- <div class="rb_c_box_btn">
  1827. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  1828. </div> -->
  1829. <div class="basic_box" ref="unitBox">
  1830. <div v-if="false" style="
  1831. display: flex;
  1832. flex-direction: row;
  1833. align-items: center;
  1834. position: sticky;
  1835. top: 0;
  1836. z-index: 99;
  1837. width: 100%;
  1838. padding: 0 20px 0 20px;
  1839. box-sizing: border-box;
  1840. background: #fff;
  1841. border-radius: 8px;
  1842. ">
  1843. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  1844. <div class="cru_selectBox" :style="{
  1845. maxWidth: isPasteTask
  1846. ? 'calc(100% - 335px)'
  1847. : 'calc(100% - 190px)',
  1848. }" v-if="courseState == 1">
  1849. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  1850. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  1851. <!-- item.dyName ? item.dyName : -->
  1852. <span v-if="
  1853. unitJson[unitJson.length - 1].easy == 4 ||
  1854. unitJson[unitJson.length - 1].easy == 6
  1855. ">{{
  1856. item.dyName
  1857. ? item.dyName
  1858. : "第" + (index + 1) + "阶段"
  1859. }}</span>
  1860. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  1861. </div>
  1862. <div class="cru_line" :style="{
  1863. left: offsetLetfPx + 'px',
  1864. }"></div>
  1865. </div>
  1866. <div class="addStageImg" @click="addunit()" v-if="
  1867. !(unitJson[unitJson.length - 1].easy == 4) &&
  1868. !(unitJson[unitJson.length - 1].easy == 6) &&
  1869. courseState == 1
  1870. ">
  1871. <img src="../../../assets/icon/new/addStage.png" alt />
  1872. </div>
  1873. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  1874. v-if="courseState == 2" style="margin: 15px 0">
  1875. 新建阶段
  1876. </button>
  1877. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  1878. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  1879. 阶段顺序
  1880. </button>
  1881. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  1882. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  1883. 智能粘贴
  1884. </button>
  1885. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  1886. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  1887. }" style="padding: 0 12px">
  1888. 选择课程模板
  1889. </button>
  1890. </div>
  1891. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  1892. :key="index">
  1893. <div v-if="courseState == 4" style="position: relative;
  1894. background: #fff;
  1895. box-sizing: border-box;
  1896. padding: 1px 20px 10px;
  1897. width: 100%;
  1898. border-radius: 10px;">
  1899. <div style="
  1900. display: flex;
  1901. flex-direction: row;
  1902. justify-content: space-between;
  1903. align-items: center;
  1904. " :style="{
  1905. margin: !item.taskJson[0].isFoldchapter
  1906. ? '20px 0 10px'
  1907. : '20px 0 0',
  1908. }">
  1909. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  1910. 学习内容
  1911. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1912. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1913. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  1914. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  1915. </el-tooltip>
  1916. </div>
  1917. </div>
  1918. <div>
  1919. <div class="add_chapters_box add_c_none" v-if="
  1920. item.taskJson[0].chapterData &&
  1921. item.taskJson[0].chapterData.length == 0
  1922. ">
  1923. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  1924. </div>
  1925. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1926. <div @dragstart="
  1927. dragStart(item1, index1, 0)
  1928. " @dragover.prevent="
  1929. dragOver(index1, 0)
  1930. " @dragend="dragEnd()" :draggable="isdrag ==
  1931. 'chapter-' + 0 + '-' + index1
  1932. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  1933. :key="item1.id" @click="
  1934. getChapterData(
  1935. $event,
  1936. unitIndex,
  1937. index,
  1938. index1,
  1939. item1.type
  1940. )
  1941. " :class="{
  1942. dragOverTop2:
  1943. newIndex === index1 &&
  1944. typeIndex ==
  1945. 'chapter-' +
  1946. 0 +
  1947. '-' +
  1948. index1 &&
  1949. oldIndex > index1 &&
  1950. dragType == 'drag',
  1951. dragOverBottom2:
  1952. newIndex === index1 &&
  1953. typeIndex ==
  1954. 'chapter-' +
  1955. 0 +
  1956. '-' +
  1957. index1 &&
  1958. oldIndex < index1 &&
  1959. dragType == 'drag',
  1960. }">
  1961. <div @mousedown="
  1962. isdrag =
  1963. 'chapter-' + 0 + '-' + index1
  1964. " @mouseup="isdrag = ''" @touchstart="
  1965. isdrag =
  1966. 'chapter-' + 0 + '-' + index1
  1967. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  1968. <div class="chapter_upload_o" style="
  1969. position: relative;
  1970. display: flex;
  1971. align-items: center;
  1972. ">
  1973. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1974. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1975. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1976. </div>
  1977. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1978. </div>
  1979. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1980. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1981. </div>
  1982. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1983. </div>
  1984. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1985. </div>
  1986. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1987. </div>
  1988. </div>
  1989. <div class="chapter_upload_n">
  1990. <input readonly="true" v-if="
  1991. item1.type == 2 ||
  1992. item1.type == 3 ||
  1993. item1.type == 12 ||
  1994. item1.type == 13 ||
  1995. item1.type == 7
  1996. " :placeholder="item1.name" @click="
  1997. updataVideoT(
  1998. $event,
  1999. unitIndex,
  2000. 0,
  2001. index1
  2002. )
  2003. " style="
  2004. border: none;
  2005. outline: none;
  2006. width: 80%;
  2007. minwidth: 215px;
  2008. z-index: 99;
  2009. font-size: 14px;
  2010. white-space: nowrap;
  2011. overflow: hidden;
  2012. text-overflow: ellipsis;
  2013. " />
  2014. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2015. border: none;
  2016. outline: none;
  2017. width: 80%;
  2018. white-space: nowrap;
  2019. overflow: hidden;
  2020. text-overflow: ellipsis;
  2021. " readonly="true" @click="
  2022. selectAttText(0, index1)
  2023. " />
  2024. <input :placeholder="item1.title ? item1.title : '链接'
  2025. " v-if="item1.type == 8" style="
  2026. border: none;
  2027. outline: none;
  2028. width: 80%;
  2029. white-space: nowrap;
  2030. overflow: hidden;
  2031. text-overflow: ellipsis;
  2032. " readonly="true" @click="selectLine(0, index1)" />
  2033. <input :placeholder="item1.title ? item1.title : '链接'
  2034. " v-if="item1.type == 14" style="
  2035. border: none;
  2036. outline: none;
  2037. width: 80%;
  2038. white-space: nowrap;
  2039. overflow: hidden;
  2040. text-overflow: ellipsis;
  2041. " readonly="true" @click="
  2042. openUpdateSource(0, index1)
  2043. " />
  2044. </div>
  2045. <div class="chapter_upload_ic">
  2046. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2047. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2048. checkChpater( $event, unitIndex, 0, index1 )
  2049. ">
  2050. <div></div>
  2051. </div>
  2052. <div class="chapter_upload_ud" style="z-index: 99">
  2053. <div class="chapter_upload_up" @click="
  2054. upCd(
  2055. $event,
  2056. unitIndex,
  2057. index,
  2058. 0,
  2059. index1
  2060. )
  2061. "></div>
  2062. <div class="chapter_upload_down" @click="
  2063. downCd(
  2064. $event,
  2065. unitIndex,
  2066. index,
  2067. 0,
  2068. index1
  2069. )
  2070. "></div>
  2071. </div>
  2072. <div class="chapter_upload_ic_edit" v-if="
  2073. item1.type == 2 ||
  2074. item1.type == 3 ||
  2075. item1.type == 12 ||
  2076. item1.type == 13 ||
  2077. item1.type == 7
  2078. " @click.stop="
  2079. updataVideoT(
  2080. $event,
  2081. unitIndex,
  2082. 0,
  2083. index1
  2084. )
  2085. ">
  2086. <div></div>
  2087. </div>
  2088. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2089. selectAttText(0, index1)
  2090. ">
  2091. <div></div>
  2092. </div>
  2093. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2094. @click="selectLine(0, index1)">
  2095. <div></div>
  2096. </div>
  2097. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2098. openUpdateSource(0, index1)
  2099. ">
  2100. <div></div>
  2101. </div>
  2102. <div class="chapter_upload_ic_r" @click.stop="
  2103. deleteChapterData(
  2104. $event,
  2105. unitIndex,
  2106. index,
  2107. index1,
  2108. 0
  2109. )
  2110. ">
  2111. <div></div>
  2112. </div>
  2113. </div>
  2114. </div>
  2115. </div>
  2116. </div>
  2117. </div>
  2118. <div class="add_info_box" style="margin: 10px 0 0">
  2119. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2120. 文件
  2121. <input type="file" accept="*" style="display: none" v-if="inputShow" @change="
  2122. beforeUpload2(
  2123. $event,
  2124. unitIndex,
  2125. 13,
  2126. 0
  2127. )
  2128. " />
  2129. </button>
  2130. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2131. 图文
  2132. </button>
  2133. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2134. 链接
  2135. </button>
  2136. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2137. 代码
  2138. </button>
  2139. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2140. 资源
  2141. </button>
  2142. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2143. AI生成PPT
  2144. </button>
  2145. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2146. AI生成教案
  2147. </button>
  2148. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2149. 智能检索视频
  2150. </button>
  2151. </div>
  2152. <div v-if="
  2153. unitJson[unitIndex].chapterInfo[0].taskJson[
  2154. 0
  2155. ].proVisible
  2156. " class="mask">
  2157. <div class="progressBox">
  2158. <!-- <div id="closePro" class="closeCss">
  2159. <img src="../../../../assets/icon/close.png" alt />
  2160. </div> -->
  2161. <div class="lbox">
  2162. <img src="../../../assets/loading.gif" />上传中,请稍后
  2163. </div>
  2164. <div style="margin-bottom: 10px">
  2165. <span>{{
  2166. unitJson[unitIndex].chapterInfo[0].taskJson[
  2167. 0
  2168. ].isFinishSize
  2169. }}M</span>
  2170. /
  2171. <span>{{
  2172. unitJson[unitIndex].chapterInfo[0].taskJson[
  2173. 0
  2174. ].isAllSize
  2175. }}M</span>
  2176. </div>
  2177. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2178. 0
  2179. ].progress
  2180. ? unitJson[unitIndex].chapterInfo[0]
  2181. .taskJson[0].progress
  2182. : 0
  2183. " style="width: 80%"></el-progress>
  2184. </div>
  2185. </div>
  2186. </div>
  2187. <div class="chapter_box" v-if="courseState == 1">
  2188. <div class="chapter_contentbox">
  2189. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2190. <div class="cc_input">
  2191. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2192. v-model="unitJson[unitIndex].dyName" />
  2193. </div>
  2194. <div class="remove" v-if="
  2195. (unitJson.length > 1 || courseState != 2) &&
  2196. !(unitJson[unitJson.length - 1].easy == 4) &&
  2197. !(unitJson[unitJson.length - 1].easy == 6)
  2198. " @click="deleteUnit(unitIndex)"></div>
  2199. </div>
  2200. </div>
  2201. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2202. margin: 50px 0px 10px;
  2203. font-size: 1.5em;
  2204. font-weight: 700;
  2205. color: #0f7eff;
  2206. ">
  2207. 添加任务
  2208. </div> -->
  2209. <div class="taskBorder" :style="{
  2210. minHeight: unitJson[unitIndex].easy && 'unset',
  2211. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2212. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2213. <div style="background: #fff; border-radius: 5px">
  2214. <div class="taskTitle">
  2215. <div style="display: flex;width: 100%;justify-content: space-between;">
  2216. <span>任务{{ itemTaskIndex + 1 }}</span>
  2217. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2218. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2219. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2220. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2221. </el-tooltip>
  2222. </div>
  2223. </div>
  2224. <!-- padding: 20px; -->
  2225. <div v-if="unitJson[unitIndex].easy != 1">
  2226. <div :style="{
  2227. marginBottom:
  2228. unitJson[unitIndex].easy == 3 ||
  2229. (unitJson[unitIndex].easy == 5 &&
  2230. itemTask.taskType == 1)
  2231. ? '75px'
  2232. : '0',
  2233. }">
  2234. <div style="
  2235. display: flex;
  2236. margin: 0px 0 20px;
  2237. flex-direction: row;
  2238. justify-content: flex-start;
  2239. align-items: center;
  2240. ">
  2241. <div class="lineTitle">任务概述</div>
  2242. </div>
  2243. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2244. flex-direction: row;
  2245. justify-content: flex-start;
  2246. align-items: center;
  2247. margin: 0;
  2248. ">
  2249. <!-- <div class="cc_title">
  2250. 任务{{ itemTaskIndex + 1 }}
  2251. </div> -->
  2252. <div class="cc_input">
  2253. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2254. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2255. itemTaskIndex
  2256. ].task
  2257. " />
  2258. </div>
  2259. <div class="remove" v-if="
  2260. item.taskJson.length > 1 &&
  2261. (!unitJson[unitIndex].easy ||
  2262. unitJson[unitIndex].easy == 6)
  2263. " @click="deleteTask(itemTaskIndex)"></div>
  2264. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2265. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2266. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2267. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2268. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2269. </div> -->
  2270. </div>
  2271. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2272. display: flex;
  2273. margin: 20px 0;
  2274. flex-direction: row;
  2275. justify-content: flex-start;
  2276. align-items: center;
  2277. ">
  2278. <div class="lineTitle">任务描述</div>
  2279. </div> && !itemTask.isFold2-->
  2280. <div v-if="
  2281. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2282. -1
  2283. " style="margin-top: 20px" class="op_task_box"
  2284. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2285. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2286. itemTaskIndex
  2287. ].taskDetail
  2288. " @change="change"></editor-bar> -->
  2289. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2290. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2291. itemTaskIndex
  2292. ].taskDetail
  2293. "></textarea>
  2294. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2295. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2296. itemTaskIndex
  2297. ].taskDetail
  2298. "></textarea> -->
  2299. <div class="op_box">
  2300. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2301. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2302. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2303. itemTaskIndex
  2304. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2305. itemTaskIndex
  2306. ], itemTaskIndex)">智能优化</div>
  2307. </el-tooltip>
  2308. </div>
  2309. </div>
  2310. </div>
  2311. </div>
  2312. <div
  2313. style="position: relative"
  2314. v-if="courseState == 5"
  2315. >
  2316. <div
  2317. style="
  2318. display: flex;
  2319. flex-direction: row;
  2320. justify-content: space-between;
  2321. align-items: center;
  2322. "
  2323. :style="{
  2324. margin: !itemTask.isFoldchapter
  2325. ? '20px 0 10px'
  2326. : '20px 0 0',
  2327. }"
  2328. >
  2329. <div
  2330. style="margin-bottom: 10px"
  2331. class="lineTitle clineTitle"
  2332. >
  2333. 学习内容
  2334. </div>
  2335. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2336. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2337. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2338. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2339. <!-- <div class="line"></div> -->
  2340. </div>
  2341. <!-- v-if="!itemTask.isFoldchapter" -->
  2342. <div>
  2343. <div
  2344. class="add_chapters_box add_c_none"
  2345. v-if="
  2346. itemTask.chapterData &&
  2347. itemTask.chapterData.length == 0
  2348. "
  2349. >
  2350. <img
  2351. src="../../../assets/icon/new/c_none.png"
  2352. alt
  2353. /><span>请添加学习内容</span>
  2354. </div>
  2355. <div
  2356. v-else
  2357. class="add_chapters_box"
  2358. style="display: flex; flex-direction: column"
  2359. >
  2360. <div
  2361. @dragstart="
  2362. dragStart(item1, index1, itemTaskIndex)
  2363. "
  2364. @dragover.prevent="
  2365. dragOver(index1, itemTaskIndex)
  2366. "
  2367. @dragend="dragEnd()"
  2368. :draggable="
  2369. isdrag ==
  2370. 'chapter-' + itemTaskIndex + '-' + index1
  2371. "
  2372. class="chapter_upload"
  2373. v-for="(item1, index1) in itemTask.chapterData"
  2374. :key="item1.id"
  2375. @click="
  2376. getChapterData(
  2377. $event,
  2378. unitIndex,
  2379. index,
  2380. index1,
  2381. item1.type
  2382. )
  2383. "
  2384. :class="{
  2385. dragOverTop2:
  2386. newIndex === index1 &&
  2387. typeIndex ==
  2388. 'chapter-' +
  2389. itemTaskIndex +
  2390. '-' +
  2391. index1 &&
  2392. oldIndex > index1 &&
  2393. dragType == 'drag',
  2394. dragOverBottom2:
  2395. newIndex === index1 &&
  2396. typeIndex ==
  2397. 'chapter-' +
  2398. itemTaskIndex +
  2399. '-' +
  2400. index1 &&
  2401. oldIndex < index1 &&
  2402. dragType == 'drag',
  2403. }"
  2404. >
  2405. <div
  2406. @mousedown="
  2407. isdrag =
  2408. 'chapter-' + itemTaskIndex + '-' + index1
  2409. "
  2410. @mouseup="isdrag = ''"
  2411. @touchstart="
  2412. isdrag =
  2413. 'chapter-' + itemTaskIndex + '-' + index1
  2414. "
  2415. @touchend="isdrag = ''"
  2416. class="chapter_upload_drag"
  2417. ></div>
  2418. <div
  2419. class="chapter_upload_o"
  2420. style="
  2421. position: relative;
  2422. display: flex;
  2423. align-items: center;
  2424. "
  2425. >
  2426. <div
  2427. class="chapter_upload_l"
  2428. style="padding: 1px 0 0 10px"
  2429. >
  2430. <div
  2431. v-if="item1.type == 2"
  2432. class="chapter_upload_l_i2"
  2433. ></div>
  2434. <div
  2435. v-if="item1.type == 3"
  2436. class="chapter_upload_l_i3"
  2437. style="margin-left: 1px"
  2438. ></div>
  2439. <div
  2440. v-if="item1.type == 6"
  2441. class="chapter_upload_l_i6"
  2442. style="margin-left: 1px"
  2443. ></div>
  2444. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2445. <div
  2446. v-if="item1.type == 8"
  2447. class="chapter_upload_l_i8"
  2448. style="margin-left: 1px"
  2449. ></div>
  2450. <div
  2451. v-if="item1.type == 14"
  2452. class="chapter_upload_l_i14"
  2453. style="margin-left: 1px"
  2454. ></div>
  2455. <div
  2456. v-if="item1.type == 12"
  2457. class="chapter_upload_l_i12"
  2458. style="margin-left: 1px"
  2459. ></div>
  2460. <div
  2461. v-if="item1.type == 13"
  2462. class="chapter_upload_l_i13"
  2463. style="margin-left: 1px"
  2464. ></div>
  2465. </div>
  2466. <div class="chapter_upload_n">
  2467. <input
  2468. readonly="true"
  2469. v-if="
  2470. item1.type == 2 ||
  2471. item1.type == 3 ||
  2472. item1.type == 12 ||
  2473. item1.type == 13 ||
  2474. item1.type == 7
  2475. "
  2476. :placeholder="item1.name"
  2477. @click="
  2478. updataVideoT(
  2479. $event,
  2480. unitIndex,
  2481. itemTaskIndex,
  2482. index1
  2483. )
  2484. "
  2485. style="
  2486. border: none;
  2487. outline: none;
  2488. width: 80%;
  2489. minwidth: 215px;
  2490. z-index: 99;
  2491. font-size: 14px;
  2492. white-space: nowrap;
  2493. overflow: hidden;
  2494. text-overflow: ellipsis;
  2495. "
  2496. />
  2497. <input
  2498. :placeholder="item1.name"
  2499. v-if="item1.type == 6"
  2500. style="
  2501. border: none;
  2502. outline: none;
  2503. width: 80%;
  2504. white-space: nowrap;
  2505. overflow: hidden;
  2506. text-overflow: ellipsis;
  2507. "
  2508. readonly="true"
  2509. @click="
  2510. selectAttText(itemTaskIndex, index1)
  2511. "
  2512. />
  2513. <input
  2514. :placeholder="
  2515. item1.title ? item1.title : '链接'
  2516. "
  2517. v-if="item1.type == 8"
  2518. style="
  2519. border: none;
  2520. outline: none;
  2521. width: 80%;
  2522. white-space: nowrap;
  2523. overflow: hidden;
  2524. text-overflow: ellipsis;
  2525. "
  2526. readonly="true"
  2527. @click="selectLine(itemTaskIndex, index1)"
  2528. />
  2529. <input
  2530. :placeholder="
  2531. item1.title ? item1.title : '链接'
  2532. "
  2533. v-if="item1.type == 14"
  2534. style="
  2535. border: none;
  2536. outline: none;
  2537. width: 80%;
  2538. white-space: nowrap;
  2539. overflow: hidden;
  2540. text-overflow: ellipsis;
  2541. "
  2542. readonly="true"
  2543. @click="
  2544. openUpdateSource(itemTaskIndex, index1)
  2545. "
  2546. />
  2547. </div>
  2548. <div class="chapter_upload_ic">
  2549. <div
  2550. class="chapter_upload_noSee"
  2551. v-if="item1.type == 12"
  2552. ></div>
  2553. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2554. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  2555. ">
  2556. <div></div>
  2557. </div>
  2558. <div
  2559. class="chapter_upload_ud"
  2560. style="z-index: 99"
  2561. >
  2562. <div
  2563. class="chapter_upload_up"
  2564. @click="
  2565. upCd(
  2566. $event,
  2567. unitIndex,
  2568. index,
  2569. itemTaskIndex,
  2570. index1
  2571. )
  2572. "
  2573. ></div>
  2574. <div
  2575. class="chapter_upload_down"
  2576. @click="
  2577. downCd(
  2578. $event,
  2579. unitIndex,
  2580. index,
  2581. itemTaskIndex,
  2582. index1
  2583. )
  2584. "
  2585. ></div>
  2586. </div>
  2587. <div
  2588. class="chapter_upload_ic_edit"
  2589. v-if="
  2590. item1.type == 2 ||
  2591. item1.type == 3 ||
  2592. item1.type == 12 ||
  2593. item1.type == 13 ||
  2594. item1.type == 7
  2595. "
  2596. @click.stop="
  2597. updataVideoT(
  2598. $event,
  2599. unitIndex,
  2600. itemTaskIndex,
  2601. index1
  2602. )
  2603. "
  2604. >
  2605. <div></div>
  2606. </div>
  2607. <div
  2608. class="chapter_upload_ic_edit"
  2609. v-if="item1.type == 6"
  2610. @click="
  2611. selectAttText(itemTaskIndex, index1)
  2612. "
  2613. >
  2614. <div></div>
  2615. </div>
  2616. <div
  2617. class="chapter_upload_ic_edit"
  2618. v-if="item1.type == 8"
  2619. @click="selectLine(itemTaskIndex, index1)"
  2620. >
  2621. <div></div>
  2622. </div>
  2623. <div
  2624. class="chapter_upload_ic_edit"
  2625. v-if="item1.type == 14"
  2626. @click="
  2627. openUpdateSource(itemTaskIndex, index1)
  2628. "
  2629. >
  2630. <div></div>
  2631. </div>
  2632. <div
  2633. class="chapter_upload_ic_r"
  2634. @click.stop="
  2635. deleteChapterData(
  2636. $event,
  2637. unitIndex,
  2638. index,
  2639. index1,
  2640. itemTaskIndex
  2641. )
  2642. "
  2643. >
  2644. <div></div>
  2645. </div>
  2646. </div>
  2647. </div>
  2648. </div>
  2649. </div>
  2650. </div>
  2651. <!-- v-if="!itemTask.isFoldchapter" -->
  2652. <div class="add_info_box" style="margin: 10px 0 0">
  2653. <button
  2654. class="c_pub_button_add pub_btn_add_img"
  2655. @click="addImg($event)"
  2656. >
  2657. 文件
  2658. <input
  2659. type="file"
  2660. accept="*"
  2661. style="display: none"
  2662. v-if="inputShow"
  2663. @change="
  2664. beforeUpload2(
  2665. $event,
  2666. unitIndex,
  2667. 13,
  2668. itemTaskIndex
  2669. )
  2670. "
  2671. />
  2672. </button>
  2673. <button
  2674. class="c_pub_button_add pub_btn_add_img"
  2675. @click="addAttText(itemTaskIndex)"
  2676. >
  2677. 图文
  2678. </button>
  2679. <button
  2680. class="c_pub_button_add pub_btn_add_img"
  2681. @click="openLine(itemTaskIndex)"
  2682. >
  2683. 链接
  2684. </button>
  2685. <button
  2686. class="c_pub_button_add pub_btn_add_img"
  2687. @click="pasteLine(itemTaskIndex)"
  2688. >
  2689. 代码
  2690. </button>
  2691. <button
  2692. class="c_pub_button_add pub_btn_add_img"
  2693. @click="openSource(itemTaskIndex)"
  2694. >
  2695. 资源
  2696. </button>
  2697. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  2698. AI生成PPT
  2699. </button>
  2700. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  2701. AI生成教案
  2702. </button>
  2703. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  2704. 智能检索视频
  2705. </button>
  2706. </div>
  2707. <div
  2708. v-if="
  2709. unitJson[unitIndex].chapterInfo[0].taskJson[
  2710. itemTaskIndex
  2711. ].proVisible
  2712. "
  2713. class="mask"
  2714. >
  2715. <div class="progressBox">
  2716. <!-- <div id="closePro" class="closeCss">
  2717. <img src="../../../../assets/icon/close.png" alt />
  2718. </div> -->
  2719. <div class="lbox">
  2720. <img
  2721. src="../../../assets/loading.gif"
  2722. />上传中,请稍后
  2723. </div>
  2724. <div style="margin-bottom: 10px">
  2725. <span
  2726. >{{
  2727. unitJson[unitIndex].chapterInfo[0].taskJson[
  2728. itemTaskIndex
  2729. ].isFinishSize
  2730. }}M</span
  2731. >
  2732. /
  2733. <span
  2734. >{{
  2735. unitJson[unitIndex].chapterInfo[0].taskJson[
  2736. itemTaskIndex
  2737. ].isAllSize
  2738. }}M</span
  2739. >
  2740. </div>
  2741. <el-progress
  2742. :text-inside="true"
  2743. :stroke-width="20"
  2744. :percentage="
  2745. unitJson[unitIndex].chapterInfo[0].taskJson[
  2746. itemTaskIndex
  2747. ].progress
  2748. ? unitJson[unitIndex].chapterInfo[0]
  2749. .taskJson[itemTaskIndex].progress
  2750. : 0
  2751. "
  2752. style="width: 80%"
  2753. ></el-progress>
  2754. </div>
  2755. </div>
  2756. </div>
  2757. <div v-if="
  2758. unitJson[unitIndex].easy == 1 ||
  2759. (unitJson[unitIndex].easy == 5 &&
  2760. itemTask.taskType == 2)
  2761. ">
  2762. <div>
  2763. <div class="add_chapters_box add_c_none" v-if="
  2764. itemTask.chapterData &&
  2765. itemTask.chapterData.length == 0
  2766. ">
  2767. <img src="../../../assets/icon/new/c_none.png" alt />
  2768. </div>
  2769. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2770. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  2771. dragOver(index1, itemTaskIndex)
  2772. " @dragend="dragEnd()" :draggable="isdrag ==
  2773. 'chapter-' + itemTaskIndex + '-' + index1
  2774. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  2775. :key="item1.id" @click="
  2776. getChapterData(
  2777. $event,
  2778. unitIndex,
  2779. index,
  2780. index1,
  2781. item1.type
  2782. )
  2783. " :class="{
  2784. dragOverTop2:
  2785. newIndex === index1 &&
  2786. typeIndex ==
  2787. 'chapter-' +
  2788. itemTaskIndex +
  2789. '-' +
  2790. index1 &&
  2791. oldIndex > index1,
  2792. dragOverBottom2:
  2793. newIndex === index1 &&
  2794. typeIndex ==
  2795. 'chapter-' +
  2796. itemTaskIndex +
  2797. '-' +
  2798. index1 &&
  2799. oldIndex < index1,
  2800. }">
  2801. <div @mousedown="
  2802. isdrag =
  2803. 'chapter-' + itemTaskIndex + '-' + index1
  2804. " @mouseup="isdrag = ''" @touchstart="
  2805. isdrag =
  2806. 'chapter-' + itemTaskIndex + '-' + index1
  2807. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2808. <div class="chapter_upload_t" style="width: 100%"></div>
  2809. <div class="chapter_upload_o" style="
  2810. position: relative;
  2811. display: flex;
  2812. align-items: center;
  2813. ">
  2814. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2815. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2816. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2817. </div>
  2818. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2819. </div>
  2820. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2821. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2822. </div>
  2823. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2824. </div>
  2825. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2826. </div>
  2827. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2828. </div>
  2829. </div>
  2830. <div class="chapter_upload_n">
  2831. <span style="
  2832. font-size: 14px;
  2833. color: rgb(109, 109, 109);
  2834. height: 14px;
  2835. line-height: 14px;
  2836. " v-if="
  2837. item1.type == 2 ||
  2838. item1.type == 3 ||
  2839. item1.type == 7
  2840. ">{{ item1.text }}-</span>
  2841. <input readonly="true" v-if="
  2842. item1.type == 2 ||
  2843. item1.type == 3 ||
  2844. item1.type == 7
  2845. " :placeholder="item1.name" @click="
  2846. updataVideoT(
  2847. $event,
  2848. unitIndex,
  2849. itemTaskIndex,
  2850. index1
  2851. )
  2852. " style="
  2853. border: none;
  2854. outline: none;
  2855. width: 80%;
  2856. minwidth: 215px;
  2857. z-index: 99;
  2858. font-size: 14px;
  2859. white-space: nowrap;
  2860. overflow: hidden;
  2861. text-overflow: ellipsis;
  2862. " />
  2863. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2864. border: none;
  2865. outline: none;
  2866. width: 80%;
  2867. white-space: nowrap;
  2868. overflow: hidden;
  2869. text-overflow: ellipsis;
  2870. " readonly="true" @click="
  2871. selectAttText(itemTaskIndex, index1)
  2872. " />
  2873. <input :placeholder="item1.title ? item1.title : '链接'
  2874. " v-if="item1.type == 8 || item1.type == 14" style="
  2875. border: none;
  2876. outline: none;
  2877. width: 80%;
  2878. white-space: nowrap;
  2879. overflow: hidden;
  2880. text-overflow: ellipsis;
  2881. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  2882. </div>
  2883. <div class="chapter_upload_ic">
  2884. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2885. <div class="chapter_upload_ud" style="z-index: 99">
  2886. <div class="chapter_upload_up" @click="
  2887. upCd(
  2888. $event,
  2889. unitIndex,
  2890. index,
  2891. itemTaskIndex,
  2892. index1
  2893. )
  2894. "></div>
  2895. <div class="chapter_upload_down" @click="
  2896. downCd(
  2897. $event,
  2898. unitIndex,
  2899. index,
  2900. itemTaskIndex,
  2901. index1
  2902. )
  2903. "></div>
  2904. </div>
  2905. <div class="chapter_upload_ic_edit" v-if="
  2906. item1.type == 2 ||
  2907. item1.type == 3 ||
  2908. item1.type == 12 ||
  2909. item1.type == 13 ||
  2910. item1.type == 7
  2911. " @click.stop="
  2912. updataVideoT(
  2913. $event,
  2914. unitIndex,
  2915. itemTaskIndex,
  2916. index1
  2917. )
  2918. ">
  2919. <div></div>
  2920. </div>
  2921. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2922. selectAttText(itemTaskIndex, index1)
  2923. ">
  2924. <div></div>
  2925. </div>
  2926. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2927. @click="selectLine(itemTaskIndex, index1)">
  2928. <div></div>
  2929. </div>
  2930. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2931. openUpdateSource(itemTaskIndex, index1)
  2932. ">
  2933. <div></div>
  2934. </div>
  2935. <div class="chapter_upload_ic_r" @click.stop="
  2936. deleteChapterData(
  2937. $event,
  2938. unitIndex,
  2939. index,
  2940. index1,
  2941. itemTaskIndex
  2942. )
  2943. ">
  2944. <div></div>
  2945. </div>
  2946. </div>
  2947. </div>
  2948. </div>
  2949. </div>
  2950. </div>
  2951. <div class="add_info_box" style="margin: 10px 0 0">
  2952. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2953. <span style="color: red">*</span>
  2954. 教学设计
  2955. <input type="file"
  2956. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  2957. style="display: none" v-if="inputShow" @change="
  2958. beforeUpload3(
  2959. $event,
  2960. unitIndex,
  2961. 3,
  2962. itemTaskIndex,
  2963. '教学设计'
  2964. )
  2965. " />
  2966. </button>
  2967. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2968. <span style="color: red">*</span>
  2969. 教学课件
  2970. <input type="file"
  2971. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  2972. style="display: none" v-if="inputShow" @change="
  2973. beforeUpload3(
  2974. $event,
  2975. unitIndex,
  2976. 3,
  2977. itemTaskIndex,
  2978. '教学课件'
  2979. )
  2980. " />
  2981. </button>
  2982. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2983. 教学视频
  2984. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  2985. style="display: none" v-if="inputShow" @change="
  2986. beforeUpload3(
  2987. $event,
  2988. unitIndex,
  2989. 2,
  2990. itemTaskIndex,
  2991. '教学视频'
  2992. )
  2993. " />
  2994. </button>
  2995. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2996. 教学音频
  2997. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  2998. beforeUpload3(
  2999. $event,
  3000. unitIndex,
  3001. 2,
  3002. itemTaskIndex,
  3003. '教学音频'
  3004. )
  3005. " />
  3006. </button>
  3007. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3008. 学习单
  3009. <input type="file"
  3010. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3011. style="display: none" v-if="inputShow" @change="
  3012. beforeUpload3(
  3013. $event,
  3014. unitIndex,
  3015. 3,
  3016. itemTaskIndex,
  3017. '学习单'
  3018. )
  3019. " />
  3020. </button>
  3021. </div>
  3022. <div v-if="
  3023. unitJson[unitIndex].chapterInfo[0].taskJson[
  3024. itemTaskIndex
  3025. ].proVisible
  3026. " class="mask">
  3027. <div class="progressBox">
  3028. <!-- <div id="closePro" class="closeCss">
  3029. <img src="../../../../assets/icon/close.png" alt />
  3030. </div> -->
  3031. <div class="lbox">
  3032. <img src="../../../assets/loading.gif" />上传中,请稍后
  3033. </div>
  3034. <div style="margin-bottom: 10px">
  3035. <span>{{
  3036. unitJson[unitIndex].chapterInfo[0].taskJson[
  3037. itemTaskIndex
  3038. ].isFinishSize
  3039. }}M</span>
  3040. /
  3041. <span>{{
  3042. unitJson[unitIndex].chapterInfo[0].taskJson[
  3043. itemTaskIndex
  3044. ].isAllSize
  3045. }}M</span>
  3046. </div>
  3047. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3048. itemTaskIndex
  3049. ].progress
  3050. ? unitJson[unitIndex].chapterInfo[0]
  3051. .taskJson[itemTaskIndex].progress
  3052. : 0
  3053. " style="width: 80%"></el-progress>
  3054. </div>
  3055. </div>
  3056. </div>
  3057. </div>
  3058. <!-- padding: 20px; -->
  3059. <div style="
  3060. background: #fff;
  3061. border-radius: 5px;
  3062. margin-top: 15px;
  3063. ">
  3064. <div v-if="
  3065. unitJson[unitIndex].easy != 3 &&
  3066. !(
  3067. unitJson[unitIndex].easy == 5 &&
  3068. itemTask.taskType == 1
  3069. )
  3070. " style="
  3071. flex-direction: row;
  3072. justify-content: flex-start;
  3073. align-items: center;
  3074. ">
  3075. <div style="
  3076. display: flex;
  3077. flex-direction: row;
  3078. align-items: center;
  3079. margin: 5px 0 20px;
  3080. ">
  3081. <div class="lineTitle clineTitle">
  3082. {{
  3083. !unitJson[unitIndex].easy ||
  3084. unitJson[unitIndex].easy == 6 ||
  3085. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3086. -1
  3087. ? "练习内容"
  3088. : "评价内容"
  3089. }}
  3090. </div>
  3091. <!-- <div class="line" style="width: 90%"></div> -->
  3092. </div>
  3093. </div>
  3094. <div v-if="
  3095. unitJson[unitIndex].easy == 6 ||
  3096. !unitJson[unitIndex].easy
  3097. " class="toolChoose">
  3098. <div class="tools">
  3099. <div class="leftTools" style="width: 100%" v-for="(
  3100. itemTool, toolIndex
  3101. ) in itemTask.toolChoose" :key="toolIndex">
  3102. <div style="
  3103. display: flex;
  3104. flex-direction: row;
  3105. align-items: baseline;
  3106. flex-wrap: nowrap;
  3107. justify-content: flex-start;
  3108. position: relative;
  3109. ">
  3110. <div style="margin-right: 20px; font-weight: bold"
  3111. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3112. 工具 {{ toolIndex + 1 }} :
  3113. </div>
  3114. <div class="chooseWho">
  3115. <div :class="itemTool.toolType == 0
  3116. ? 'isChooseActive'
  3117. : ''
  3118. " @click="
  3119. (itemTool.toolType = 0),
  3120. (itemTool.isFold3 = false),
  3121. $forceUpdate()
  3122. ">
  3123. 互动类
  3124. </div>
  3125. <div :class="itemTool.toolType == 1
  3126. ? 'isChooseActive'
  3127. : ''
  3128. " @click="
  3129. (itemTool.toolType = 1),
  3130. (itemTool.isFold3 = false),
  3131. $forceUpdate()
  3132. ">
  3133. 思维类
  3134. </div>
  3135. <div :class="itemTool.toolType == 6
  3136. ? 'isChooseActive'
  3137. : ''
  3138. " @click="
  3139. (itemTool.toolType = 6),
  3140. (itemTool.isFold3 = false),
  3141. $forceUpdate()
  3142. ">
  3143. 协作类
  3144. </div>
  3145. <div :class="itemTool.toolType == 2
  3146. ? 'isChooseActive'
  3147. : ''
  3148. " @click="
  3149. (itemTool.toolType = 2),
  3150. (itemTool.isFold3 = false),
  3151. $forceUpdate()
  3152. ">
  3153. 测评类
  3154. </div>
  3155. <div :class="itemTool.toolType == 7
  3156. ? 'isChooseActive'
  3157. : ''
  3158. " @click="
  3159. (itemTool.toolType = 7),
  3160. (itemTool.isFold3 = false),
  3161. $forceUpdate()
  3162. ">
  3163. 评价类
  3164. </div>
  3165. <div :class="itemTool.toolType == 3
  3166. ? 'isChooseActive'
  3167. : ''
  3168. " @click="
  3169. (itemTool.toolType = 3),
  3170. (itemTool.isFold3 = false),
  3171. $forceUpdate()
  3172. ">
  3173. 编程类
  3174. </div>
  3175. <div :class="itemTool.toolType == 5
  3176. ? 'isChooseActive'
  3177. : ''
  3178. " @click="
  3179. (itemTool.toolType = 5),
  3180. (itemTool.isFold3 = false),
  3181. $forceUpdate()
  3182. ">
  3183. 学科类
  3184. </div>
  3185. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3186. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3187. 其他
  3188. </div> -->
  3189. </div>
  3190. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3191. margin:
  3192. itemTask.toolChoose.length > 1
  3193. ? '0px 35px 0px auto'
  3194. : '0 0 0 auto',
  3195. }" v-if="itemTask.toolChoose.length > 1">
  3196. <div class="chapter_upload_up2" @click.stop="
  3197. upTool(
  3198. $event,
  3199. unitIndex,
  3200. itemTaskIndex,
  3201. toolIndex
  3202. )
  3203. ">
  3204. 上移
  3205. </div>
  3206. <div class="chapter_upload_down2" @click.stop="
  3207. downTool(
  3208. $event,
  3209. unitIndex,
  3210. itemTaskIndex,
  3211. toolIndex
  3212. )
  3213. ">
  3214. 下移
  3215. </div>
  3216. </div>
  3217. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3218. @click="fold3(itemTaskIndex, toolIndex)"
  3219. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3220. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3221. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3222. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3223. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3224. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3225. v-if="itemTask.toolChoose.length > 1" style="
  3226. position: absolute;
  3227. right: 0;
  3228. top: -5px;
  3229. "></div>
  3230. </div>
  3231. <!-- v-show="!itemTool.isFold3" -->
  3232. <div style="min-height: 163px">
  3233. <div class="toolSort" v-if="itemTool.toolType == 0">
  3234. <!-- <div class="tool">
  3235. <div
  3236. class="whiteBIcon"
  3237. @click="addTools(8, itemTaskIndex, toolIndex)"
  3238. >
  3239. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3240. <div style="margin: 5px 0">素材库</div>
  3241. </div>
  3242. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3243. <img
  3244. src="../../../assets/icon/checkNo.png"
  3245. alt
  3246. v-if="itemTool.tool.indexOf(8) == -1"
  3247. />
  3248. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3249. alt /><span>已选择</span></div>
  3250. </div>
  3251. </div>-->
  3252. <!-- <div class="tool">
  3253. <div
  3254. class="whiteBIcon"
  3255. @click="addTools(17, itemTaskIndex, toolIndex)"
  3256. >
  3257. <img
  3258. src="../../../assets/icon/secondToolList/library.png"
  3259. alt
  3260. />
  3261. <div style="margin: 5px 0">学习资料</div>
  3262. </div>
  3263. <div
  3264. class="check"
  3265. @click="addTools(17, itemTaskIndex, toolIndex)"
  3266. >
  3267. <img
  3268. src="../../../assets/icon/checkNo.png"
  3269. alt
  3270. v-if="itemTool.tool.indexOf(17) == -1"
  3271. />
  3272. <img
  3273. src="../../../assets/icon/checkedIs.png"
  3274. alt
  3275. v-else
  3276. />
  3277. </div>10
  3278. </div> -->
  3279. <div class="tool" :class="{
  3280. isToolChoose:
  3281. itemTool.tool.indexOf(10) != -1,
  3282. }" @click="
  3283. addTools(10, itemTaskIndex, toolIndex)
  3284. ">
  3285. <div class="whiteBIcon" @click.stop="
  3286. openTools(itemTaskIndex, 10, toolIndex)
  3287. ">
  3288. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3289. <div style="margin: 5px 0">倒计时</div>
  3290. </div>
  3291. <div class="noCTool">
  3292. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3293. </div>
  3294. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3295. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3296. </div>
  3297. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3298. <img src="../../../assets/icon/checkNo.png" alt
  3299. v-if="itemTool.tool.indexOf(10) == -1" />
  3300. <div class="checkDiv" v-else>
  3301. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3302. </div>
  3303. </div> -->
  3304. </div>
  3305. <div class="tool" :class="{
  3306. isToolChoose:
  3307. itemTool.tool.indexOf(65) != -1,
  3308. }" @click="
  3309. addTools(65, itemTaskIndex, toolIndex)
  3310. ">
  3311. <div class="whiteBIcon" @click.stop="
  3312. addTools(65, itemTaskIndex, toolIndex)
  3313. ">
  3314. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3315. <div style="margin: 5px 0">挑人</div>
  3316. </div>
  3317. <div class="noCTool">
  3318. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3319. </div>
  3320. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3321. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3322. </div>
  3323. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3324. <img src="../../../assets/icon/checkNo.png" alt
  3325. v-if="itemTool.tool.indexOf(65) == -1" />
  3326. <div class="checkDiv" v-else>
  3327. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3328. </div>
  3329. </div> -->
  3330. </div>
  3331. <!-- <div class="tool">
  3332. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3333. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3334. <div style="margin: 5px 0">学生分组</div>
  3335. </div>
  3336. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3337. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3338. <div class="checkDiv" v-else>
  3339. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3340. </div>
  3341. </div>
  3342. </div> -->
  3343. <!-- <div class="tool">
  3344. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3345. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3346. <div style="margin: 5px 0">交互视频</div>
  3347. </div>
  3348. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3349. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3350. <div class="checkDiv" v-else>
  3351. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3352. </div>
  3353. </div>
  3354. </div> -->
  3355. </div>
  3356. <div class="toolSort" v-if="itemTool.toolType == 1">
  3357. <div class="tool" :class="{
  3358. isToolChoose:
  3359. itemTool.tool.indexOf(7) != -1,
  3360. }" @click="
  3361. addTools(7, itemTaskIndex, toolIndex)
  3362. ">
  3363. <div class="whiteBIcon" @click.stop="
  3364. addTools(7, itemTaskIndex, toolIndex)
  3365. ">
  3366. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3367. <div style="margin: 5px 0">思维网格</div>
  3368. </div>
  3369. <div class="noCTool">
  3370. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3371. </div>
  3372. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3373. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3374. </div>
  3375. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3376. <img src="../../../assets/icon/checkNo.png" alt
  3377. v-if="itemTool.tool.indexOf(7) == -1" />
  3378. <div class="checkDiv" v-else>
  3379. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3380. </div>
  3381. </div> -->
  3382. </div>
  3383. <div class="tool" :class="{
  3384. isToolChoose:
  3385. itemTool.tool.indexOf(1) != -1,
  3386. }" @click="
  3387. addTools(1, itemTaskIndex, toolIndex)
  3388. ">
  3389. <div class="whiteBIcon" @click.stop="
  3390. openTools(itemTaskIndex, 1, toolIndex)
  3391. ">
  3392. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3393. <div style="margin: 5px 0">电子白板</div>
  3394. </div>
  3395. <div class="noCTool">
  3396. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3397. </div>
  3398. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3399. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3400. </div>
  3401. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  3402. <img src="../../../assets/icon/checkNo.png" alt
  3403. v-if="itemTool.tool.indexOf(1) == -1" />
  3404. <div class="checkDiv" v-else>
  3405. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3406. </div>
  3407. </div> -->
  3408. </div>
  3409. <!-- <div class="tool">
  3410. <div
  3411. class="whiteBIcon"
  3412. @click="addTools(2, itemTaskIndex, toolIndex)"
  3413. >
  3414. <img
  3415. src="../../../assets/icon/secondToolList/note.png"
  3416. alt
  3417. />
  3418. <div style="margin: 5px 0">便签</div>
  3419. </div>
  3420. <div
  3421. class="check"
  3422. @click="addTools(2, itemTaskIndex, toolIndex)"
  3423. >
  3424. <img
  3425. src="../../../assets/icon/checkNo.png"
  3426. alt
  3427. v-if="itemTool.tool.indexOf(2) == -1"
  3428. />
  3429. <div class="checkDiv" v-else>
  3430. <img
  3431. src="../../../assets/icon/checkedIs.png"
  3432. alt
  3433. /><span>已选择</span>
  3434. </div>
  3435. </div>
  3436. </div> -->
  3437. <!-- <div class="tool">
  3438. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  3439. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  3440. <div style="margin: 5px 0">协同文档</div>
  3441. </div>
  3442. <div
  3443. class="check"
  3444. @click="addTools(6, itemTaskIndex, toolIndex)"
  3445. >
  3446. <img
  3447. src="../../../assets/icon/checkNo.png"
  3448. alt
  3449. v-if="itemTool.tool.indexOf(6) == -1"
  3450. />
  3451. <div class="checkDiv" v-else>
  3452. <img
  3453. src="../../../assets/icon/checkedIs.png"
  3454. alt
  3455. /><span>已选择</span>
  3456. </div>
  3457. </div>
  3458. </div> -->
  3459. <div class="tool" :class="{
  3460. isToolChoose:
  3461. itemTool.tool.indexOf(52) != -1,
  3462. }" @click="
  3463. addTools(52, itemTaskIndex, toolIndex)
  3464. ">
  3465. <div class="whiteBIcon" @click.stop="
  3466. openTools(itemTaskIndex, 52, toolIndex)
  3467. ">
  3468. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3469. <div style="margin: 5px 0">文档</div>
  3470. </div>
  3471. <div class="noCTool">
  3472. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3473. </div>
  3474. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  3475. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3476. </div>
  3477. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  3478. <img src="../../../assets/icon/checkNo.png" alt
  3479. v-if="itemTool.tool.indexOf(52) == -1" />
  3480. <div class="checkDiv" v-else>
  3481. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3482. </div>
  3483. </div> -->
  3484. </div>
  3485. <div class="tool" :class="{
  3486. isToolChoose:
  3487. itemTool.tool.indexOf(3) != -1,
  3488. }" @click="
  3489. addTools(3, itemTaskIndex, toolIndex)
  3490. ">
  3491. <div class="whiteBIcon" @click.stop="
  3492. openTools(itemTaskIndex, 3, toolIndex)
  3493. ">
  3494. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3495. <div style="margin: 5px 0">思维导图</div>
  3496. </div>
  3497. <div class="noCTool">
  3498. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3499. </div>
  3500. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  3501. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3502. </div>
  3503. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  3504. <img src="../../../assets/icon/checkNo.png" alt
  3505. v-if="itemTool.tool.indexOf(3) == -1" />
  3506. <div class="checkDiv" v-else>
  3507. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3508. </div>
  3509. </div> -->
  3510. </div>
  3511. <div class="tool" :class="{
  3512. isToolChoose:
  3513. itemTool.tool.indexOf(48) != -1,
  3514. }" @click="
  3515. addTools(48, itemTaskIndex, toolIndex)
  3516. ">
  3517. <div class="whiteBIcon" @click.stop="
  3518. openTools(itemTaskIndex, 48, toolIndex)
  3519. ">
  3520. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3521. <div style="margin: 5px 0">表格</div>
  3522. </div>
  3523. <div class="noCTool">
  3524. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3525. </div>
  3526. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  3527. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3528. </div>
  3529. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  3530. <img src="../../../assets/icon/checkNo.png" alt
  3531. v-if="itemTool.tool.indexOf(48) == -1" />
  3532. <div class="checkDiv" v-else>
  3533. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3534. </div>
  3535. </div> -->
  3536. </div>
  3537. </div>
  3538. <div class="toolSort" v-if="itemTool.toolType == 6">
  3539. <div class="tool" :class="{
  3540. isToolChoose:
  3541. itemTool.tool.indexOf(49) != -1,
  3542. }" @click="
  3543. addTools(49, itemTaskIndex, toolIndex)
  3544. ">
  3545. <div class="whiteBIcon" @click.stop="
  3546. openTools(itemTaskIndex, 49, toolIndex)
  3547. ">
  3548. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3549. <div style="margin: 5px 0">学生分组</div>
  3550. </div>
  3551. <div class="noCTool">
  3552. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3553. </div>
  3554. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  3555. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3556. </div>
  3557. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3558. <img src="../../../assets/icon/checkNo.png" alt
  3559. v-if="itemTool.tool.indexOf(49) == -1" />
  3560. <div class="checkDiv" v-else>
  3561. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3562. </div>
  3563. </div> -->
  3564. </div>
  3565. </div>
  3566. <div class="toolSort" v-if="itemTool.toolType == 2">
  3567. <!-- <div class="tool">
  3568. <div
  3569. class="whiteBIcon"
  3570. @click="addTools(5, itemTaskIndex, toolIndex)"
  3571. >
  3572. <img
  3573. src="../../../assets/icon/thirdToolList/score.png"
  3574. alt
  3575. />
  3576. <div style="margin: 5px 0">量规评分</div>
  3577. </div>
  3578. <div
  3579. class="check"
  3580. @click="addTools(5, itemTaskIndex, toolIndex)"
  3581. >
  3582. <img
  3583. src="../../../assets/icon/checkNo.png"
  3584. alt
  3585. v-if="itemTool.tool.indexOf(5) == -1"
  3586. />
  3587. <img
  3588. src="../../../assets/icon/checkedIs.png"
  3589. alt
  3590. v-else
  3591. />
  3592. </div>
  3593. </div>-->
  3594. <div class="tool" :class="{
  3595. isToolChoose:
  3596. itemTool.tool.indexOf(4) != -1,
  3597. }" @click="
  3598. addTools(4, itemTaskIndex, toolIndex)
  3599. ">
  3600. <div class="whiteBIcon" @click.stop="
  3601. openTools(itemTaskIndex, 4, toolIndex)
  3602. ">
  3603. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3604. <div style="margin: 5px 0">问卷调查</div>
  3605. </div>
  3606. <div class="noCTool">
  3607. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3608. </div>
  3609. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  3610. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3611. </div>
  3612. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3613. <img src="../../../assets/icon/checkNo.png" alt
  3614. v-if="itemTool.tool.indexOf(4) == -1" />
  3615. <div class="checkDiv" v-else>
  3616. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3617. </div>
  3618. </div> -->
  3619. </div>
  3620. <div class="tool" :class="{
  3621. isToolChoose:
  3622. itemTool.tool.indexOf(45) != -1,
  3623. }" @click="
  3624. addTools(45, itemTaskIndex, toolIndex)
  3625. ">
  3626. <div class="whiteBIcon" @click="
  3627. openTools(itemTaskIndex, 45, toolIndex)
  3628. ">
  3629. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3630. <div style="margin: 5px 0">选择题</div>
  3631. </div>
  3632. <div class="noCTool">
  3633. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3634. </div>
  3635. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  3636. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3637. </div>
  3638. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  3639. <img src="../../../assets/icon/checkNo.png" alt
  3640. v-if="itemTool.tool.indexOf(45) == -1" />
  3641. <div class="checkDiv" v-else>
  3642. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3643. </div>
  3644. </div> -->
  3645. </div>
  3646. <div class="tool" :class="{
  3647. isToolChoose:
  3648. itemTool.tool.indexOf(15) != -1,
  3649. }" @click="
  3650. addTools(15, itemTaskIndex, toolIndex)
  3651. ">
  3652. <div class="whiteBIcon" @click.stop="
  3653. openTools(itemTaskIndex, 15, toolIndex)
  3654. ">
  3655. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3656. <div style="margin: 5px 0">问答</div>
  3657. </div>
  3658. <div class="noCTool">
  3659. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3660. </div>
  3661. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  3662. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3663. </div>
  3664. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  3665. <img src="../../../assets/icon/checkNo.png" alt
  3666. v-if="itemTool.tool.indexOf(15) == -1" />
  3667. <div class="checkDiv" v-else>
  3668. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3669. </div>
  3670. </div> -->
  3671. </div>
  3672. <div class="tool" :class="{
  3673. isToolChoose:
  3674. itemTool.tool.indexOf(16) != -1,
  3675. }" @click="
  3676. addTools(16, itemTaskIndex, toolIndex)
  3677. ">
  3678. <div class="whiteBIcon" @click.stop="
  3679. addTools(16, itemTaskIndex, toolIndex)
  3680. ">
  3681. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3682. <div style="margin: 5px 0">作业提交</div>
  3683. </div>
  3684. <div class="noCTool">
  3685. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3686. </div>
  3687. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  3688. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3689. </div>
  3690. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  3691. <img src="../../../assets/icon/checkNo.png" alt
  3692. v-if="itemTool.tool.indexOf(16) == -1" />
  3693. <div class="checkDiv" v-else>
  3694. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3695. </div>
  3696. </div> -->
  3697. </div>
  3698. <div class="tool" :class="{
  3699. isToolChoose:
  3700. itemTool.tool.indexOf(50) != -1,
  3701. }" @click="
  3702. addTools(50, itemTaskIndex, toolIndex)
  3703. ">
  3704. <div class="whiteBIcon" @click.stop="
  3705. addTools(50, itemTaskIndex, toolIndex)
  3706. ">
  3707. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3708. <div style="margin: 5px 0">批量上传</div>
  3709. </div>
  3710. <div class="noCTool">
  3711. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3712. </div>
  3713. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  3714. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3715. </div>
  3716. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  3717. <img src="../../../assets/icon/checkNo.png" alt
  3718. v-if="itemTool.tool.indexOf(50) == -1" />
  3719. <div class="checkDiv" v-else>
  3720. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3721. </div>
  3722. </div> -->
  3723. </div>
  3724. <!-- <div class="tool">
  3725. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  3726. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  3727. <div style="margin: 5px 0">个人评价</div>
  3728. </div>
  3729. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  3730. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  3731. <div class="checkDiv" v-else>
  3732. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3733. </div>
  3734. </div>
  3735. </div> -->
  3736. <div class="tool" :class="{
  3737. isToolChoose:
  3738. itemTool.tool.indexOf(41) != -1,
  3739. }" @click="
  3740. addTools(41, itemTaskIndex, toolIndex)
  3741. ">
  3742. <div class="whiteBIcon" @click.stop="
  3743. openTools(itemTaskIndex, 41, toolIndex)
  3744. ">
  3745. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3746. <div style="margin: 5px 0">选择匹配</div>
  3747. </div>
  3748. <div class="noCTool">
  3749. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3750. </div>
  3751. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  3752. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3753. </div>
  3754. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  3755. <img src="../../../assets/icon/checkNo.png" alt
  3756. v-if="itemTool.tool.indexOf(41) == -1" />
  3757. <div class="checkDiv" v-else>
  3758. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3759. </div>
  3760. </div> -->
  3761. </div>
  3762. <div class="tool" :class="{
  3763. isToolChoose:
  3764. itemTool.tool.indexOf(47) != -1,
  3765. }" @click="
  3766. addTools(47, itemTaskIndex, toolIndex)
  3767. ">
  3768. <div class="whiteBIcon" @click.stop="
  3769. openTools(itemTaskIndex, 47, toolIndex)
  3770. ">
  3771. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  3772. <div style="margin: 5px 0">排序</div>
  3773. </div>
  3774. <div class="noCTool">
  3775. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3776. </div>
  3777. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  3778. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3779. </div>
  3780. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  3781. <img src="../../../assets/icon/checkNo.png" alt
  3782. v-if="itemTool.tool.indexOf(47) == -1" />
  3783. <div class="checkDiv" v-else>
  3784. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3785. </div>
  3786. </div> -->
  3787. </div>
  3788. <!-- <div class="tool">
  3789. <div
  3790. class="whiteBIcon"
  3791. @click="openTools(itemTaskIndex, 42, toolIndex)"
  3792. >
  3793. <img
  3794. src="../../../assets/icon/thirdToolList/mp3.png"
  3795. alt
  3796. />
  3797. <div style="margin: 5px 0">上传音频</div>
  3798. </div>
  3799. <div
  3800. class="check"
  3801. @click="addTools(42, itemTaskIndex, toolIndex)"
  3802. >
  3803. <img
  3804. src="../../../assets/icon/checkNo.png"
  3805. alt
  3806. v-if="itemTool.tool.indexOf(42) == -1"
  3807. />
  3808. <img
  3809. src="../../../assets/icon/checkedIs.png"
  3810. alt
  3811. v-else
  3812. />
  3813. </div>
  3814. </div> -->
  3815. </div>
  3816. <div class="toolSort" v-if="itemTool.toolType == 3">
  3817. <div class="tool" :class="{
  3818. isToolChoose:
  3819. itemTool.tool.indexOf(18) != -1,
  3820. }" @click="
  3821. addTools(18, itemTaskIndex, toolIndex)
  3822. ">
  3823. <div class="whiteBIcon" @click.stop="
  3824. addTools(18, itemTaskIndex, toolIndex)
  3825. ">
  3826. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  3827. <div style="margin: 5px 0">训练平台</div>
  3828. </div>
  3829. <div class="noCTool">
  3830. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3831. </div>
  3832. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  3833. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3834. </div>
  3835. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  3836. <img src="../../../assets/icon/checkNo.png" alt
  3837. v-if="itemTool.tool.indexOf(18) == -1" />
  3838. <div class="checkDiv" v-else>
  3839. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3840. </div>
  3841. </div> -->
  3842. </div>
  3843. <div class="tool" :class="{
  3844. isToolChoose:
  3845. itemTool.tool.indexOf(21) != -1,
  3846. }" @click="
  3847. addTools(21, itemTaskIndex, toolIndex)
  3848. ">
  3849. <div class="whiteBIcon" @click.stop="
  3850. addTools(21, itemTaskIndex, toolIndex)
  3851. ">
  3852. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  3853. <div style="margin: 5px 0">
  3854. AIoT Blockly
  3855. </div>
  3856. </div>
  3857. <div class="noCTool">
  3858. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3859. </div>
  3860. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  3861. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3862. </div>
  3863. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  3864. <img src="../../../assets/icon/checkNo.png" alt
  3865. v-if="itemTool.tool.indexOf(21) == -1" />
  3866. <div class="checkDiv" v-else>
  3867. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3868. </div>
  3869. </div> -->
  3870. </div>
  3871. <!-- <div class="tool">
  3872. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  3873. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  3874. <div style="margin: 5px 0">AI体验</div>
  3875. </div>
  3876. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  3877. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  3878. <div class="checkDiv" v-else>
  3879. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3880. </div>
  3881. </div>
  3882. </div> -->
  3883. <div class="tool" :class="{
  3884. isToolChoose:
  3885. itemTool.tool.indexOf(23) != -1,
  3886. }" @click="
  3887. addTools(23, itemTaskIndex, toolIndex)
  3888. ">
  3889. <div class="whiteBIcon" @click.stop="
  3890. addTools(23, itemTaskIndex, toolIndex)
  3891. ">
  3892. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  3893. <div style="margin: 5px 0">AI Python</div>
  3894. </div>
  3895. <div class="noCTool">
  3896. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3897. </div>
  3898. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  3899. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3900. </div>
  3901. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  3902. <img src="../../../assets/icon/checkNo.png" alt
  3903. v-if="itemTool.tool.indexOf(23) == -1" />
  3904. <div class="checkDiv" v-else>
  3905. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3906. </div>
  3907. </div> -->
  3908. </div>
  3909. <div class="tool" :class="{
  3910. isToolChoose:
  3911. itemTool.tool.indexOf(24) != -1,
  3912. }" @click="
  3913. addTools(24, itemTaskIndex, toolIndex)
  3914. ">
  3915. <div class="whiteBIcon" @click.stop="
  3916. addTools(24, itemTaskIndex, toolIndex)
  3917. ">
  3918. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  3919. <div style="margin: 5px 0">
  3920. AI Blockly
  3921. </div>
  3922. </div>
  3923. <div class="noCTool">
  3924. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3925. </div>
  3926. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  3927. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3928. </div>
  3929. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  3930. <img src="../../../assets/icon/checkNo.png" alt
  3931. v-if="itemTool.tool.indexOf(24) == -1" />
  3932. <div class="checkDiv" v-else>
  3933. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3934. </div>
  3935. </div> -->
  3936. </div>
  3937. <div class="tool" :class="{
  3938. isToolChoose:
  3939. itemTool.tool.indexOf(32) != -1,
  3940. }" @click="
  3941. addTools(32, itemTaskIndex, toolIndex)
  3942. ">
  3943. <div class="whiteBIcon" @click.stop="
  3944. addTools(32, itemTaskIndex, toolIndex)
  3945. ">
  3946. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  3947. <div style="margin: 5px 0">源码编辑</div>
  3948. </div>
  3949. <div class="noCTool">
  3950. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3951. </div>
  3952. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  3953. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3954. </div>
  3955. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  3956. <img src="../../../assets/icon/checkNo.png" alt
  3957. v-if="itemTool.tool.indexOf(32) == -1" />
  3958. <div class="checkDiv" v-else>
  3959. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3960. </div>
  3961. </div> -->
  3962. </div>
  3963. <div class="tool" :class="{
  3964. isToolChoose:
  3965. itemTool.tool.indexOf(57) != -1,
  3966. }" @click="
  3967. addTools(57, itemTaskIndex, toolIndex)
  3968. ">
  3969. <div class="whiteBIcon" @click.stop="
  3970. openTools(itemTaskIndex, 57, toolIndex)
  3971. ">
  3972. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  3973. <div style="margin: 5px 0">CocoPi</div>
  3974. </div>
  3975. <div class="noCTool">
  3976. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3977. </div>
  3978. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  3979. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3980. </div>
  3981. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  3982. <img src="../../../assets/icon/checkNo.png" alt
  3983. v-if="itemTool.tool.indexOf(57) == -1" />
  3984. <div class="checkDiv" v-else>
  3985. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3986. </div>
  3987. </div> -->
  3988. </div>
  3989. <div class="tool" :class="{
  3990. isToolChoose:
  3991. itemTool.tool.indexOf(63) != -1,
  3992. }" @click="
  3993. addTools(63, itemTaskIndex, toolIndex)
  3994. ">
  3995. <div class="whiteBIcon" @click.stop="
  3996. addTools(63, itemTaskIndex, toolIndex)
  3997. ">
  3998. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  3999. <div style="margin: 5px 0">海龟编程</div>
  4000. </div>
  4001. <div class="noCTool">
  4002. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4003. </div>
  4004. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4005. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4006. </div>
  4007. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4008. <img src="../../../assets/icon/checkNo.png" alt
  4009. v-if="itemTool.tool.indexOf(63) == -1" />
  4010. <div class="checkDiv" v-else>
  4011. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4012. </div>
  4013. </div> -->
  4014. </div>
  4015. <div class="tool" :class="{
  4016. isToolChoose:
  4017. itemTool.tool.indexOf(71) != -1,
  4018. }" @click="
  4019. addTools(71, itemTaskIndex, toolIndex)
  4020. ">
  4021. <div class="whiteBIcon" @click.stop="
  4022. addTools(71, itemTaskIndex, toolIndex)
  4023. ">
  4024. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4025. <div style="margin: 5px 0">AI智能体</div>
  4026. </div>
  4027. <div class="noCTool">
  4028. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4029. </div>
  4030. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4031. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4032. </div>
  4033. </div>
  4034. </div>
  4035. <div class="toolSort" v-if="itemTool.toolType == 7">
  4036. <div class="tool" :class="{
  4037. isToolChoose:
  4038. itemTool.tool.indexOf(40) != -1,
  4039. }" @click.stop="
  4040. addTools(40, itemTaskIndex, toolIndex)
  4041. ">
  4042. <div class="whiteBIcon" @click.stop="
  4043. openTools(itemTaskIndex, 40, toolIndex)
  4044. ">
  4045. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4046. <div style="margin: 5px 0">个人评价</div>
  4047. </div>
  4048. <div class="noCTool">
  4049. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4050. </div>
  4051. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4052. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4053. </div>
  4054. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4055. <img src="../../../assets/icon/checkNo.png" alt
  4056. v-if="itemTool.tool.indexOf(40) == -1" />
  4057. <div class="checkDiv" v-else>
  4058. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4059. </div>
  4060. </div> -->
  4061. </div>
  4062. </div>
  4063. <div class="toolSort" v-if="itemTool.toolType == 5">
  4064. <div class="tool" :class="{
  4065. isToolChoose:
  4066. itemTool.tool.indexOf(28) != -1,
  4067. }" @click="
  4068. addTools(28, itemTaskIndex, toolIndex)
  4069. ">
  4070. <div class="whiteBIcon" @click.stop="
  4071. addTools(28, itemTaskIndex, toolIndex)
  4072. ">
  4073. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4074. <div style="margin: 5px 0">翻译</div>
  4075. </div>
  4076. <div class="noCTool">
  4077. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4078. </div>
  4079. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4080. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4081. </div>
  4082. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4083. <img src="../../../assets/icon/checkNo.png" alt
  4084. v-if="itemTool.tool.indexOf(28) == -1" />
  4085. <div class="checkDiv" v-else>
  4086. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4087. </div>
  4088. </div> -->
  4089. </div>
  4090. <div class="tool" :class="{
  4091. isToolChoose:
  4092. itemTool.tool.indexOf(31) != -1,
  4093. }" @click="
  4094. addTools(31, itemTaskIndex, toolIndex)
  4095. ">
  4096. <div class="whiteBIcon" @click.stop="
  4097. addTools(31, itemTaskIndex, toolIndex)
  4098. ">
  4099. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4100. <div style="margin: 5px 0">数字画板</div>
  4101. </div>
  4102. <div class="noCTool">
  4103. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4104. </div>
  4105. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4106. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4107. </div>
  4108. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4109. <img src="../../../assets/icon/checkNo.png" alt
  4110. v-if="itemTool.tool.indexOf(31) == -1" />
  4111. <div class="checkDiv" v-else>
  4112. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4113. </div>
  4114. </div> -->
  4115. </div>
  4116. <div class="tool" :class="{
  4117. isToolChoose:
  4118. itemTool.tool.indexOf(39) != -1,
  4119. }" @click="
  4120. addTools(39, itemTaskIndex, toolIndex)
  4121. ">
  4122. <div class="whiteBIcon" @click.stop="
  4123. addTools(39, itemTaskIndex, toolIndex)
  4124. ">
  4125. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4126. <div style="margin: 5px 0">GeoGebra</div>
  4127. </div>
  4128. <div class="noCTool">
  4129. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4130. </div>
  4131. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4132. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4133. </div>
  4134. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4135. <img src="../../../assets/icon/checkNo.png" alt
  4136. v-if="itemTool.tool.indexOf(39) == -1" />
  4137. <div class="checkDiv" v-else>
  4138. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4139. </div>
  4140. </div> -->
  4141. </div>
  4142. <div class="tool" :class="{
  4143. isToolChoose:
  4144. itemTool.tool.indexOf(66) != -1,
  4145. }" @click="
  4146. addTools(66, itemTaskIndex, toolIndex)
  4147. ">
  4148. <div class="whiteBIcon" @click.stop="
  4149. addTools(66, itemTaskIndex, toolIndex)
  4150. ">
  4151. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4152. <div style="margin: 5px 0">公式编辑</div>
  4153. </div>
  4154. <div class="noCTool">
  4155. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4156. </div>
  4157. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4158. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4159. </div>
  4160. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4161. <img src="../../../assets/icon/checkNo.png" alt
  4162. v-if="itemTool.tool.indexOf(66) == -1" />
  4163. <div class="checkDiv" v-else>
  4164. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4165. </div>
  4166. </div> -->
  4167. </div>
  4168. <!-- <div class="tool">
  4169. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4170. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4171. <div style="margin: 5px 0">分子结构</div>
  4172. </div>
  4173. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4174. <img src="../../../assets/icon/checkNo.png" alt
  4175. v-if="itemTool.tool.indexOf(67) == -1" />
  4176. <div class="checkDiv" v-else>
  4177. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4178. </div>
  4179. </div>
  4180. </div> -->
  4181. <div class="tool" :class="{
  4182. isToolChoose:
  4183. itemTool.tool.indexOf(68) != -1,
  4184. }" @click="
  4185. addTools(68, itemTaskIndex, toolIndex)
  4186. ">
  4187. <div class="whiteBIcon" @click.stop="
  4188. addTools(68, itemTaskIndex, toolIndex)
  4189. ">
  4190. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4191. <div style="margin: 5px 0">时间轴</div>
  4192. </div>
  4193. <div class="noCTool">
  4194. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4195. </div>
  4196. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4197. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4198. </div>
  4199. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4200. <img src="../../../assets/icon/checkNo.png" alt
  4201. v-if="itemTool.tool.indexOf(68) == -1" />
  4202. <div class="checkDiv" v-else>
  4203. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4204. </div>
  4205. </div> -->
  4206. </div>
  4207. <div class="tool" :class="{
  4208. isToolChoose:
  4209. itemTool.tool.indexOf(69) != -1,
  4210. }" @click="
  4211. addTools(69, itemTaskIndex, toolIndex)
  4212. ">
  4213. <div class="whiteBIcon" @click.stop="
  4214. openTools(itemTaskIndex, 69, toolIndex)
  4215. ">
  4216. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4217. <div style="margin: 5px 0">英语写作</div>
  4218. </div>
  4219. <div class="noCTool">
  4220. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4221. </div>
  4222. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4223. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4224. </div>
  4225. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4226. <img src="../../../assets/icon/checkNo.png" alt
  4227. v-if="itemTool.tool.indexOf(4) == -1" />
  4228. <div class="checkDiv" v-else>
  4229. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4230. </div>
  4231. </div> -->
  4232. </div>
  4233. <div class="tool" :class="{
  4234. isToolChoose:
  4235. itemTool.tool.indexOf(70) != -1,
  4236. }" @click="
  4237. addTools(70, itemTaskIndex, toolIndex)
  4238. ">
  4239. <div class="whiteBIcon" @click.stop="
  4240. openTools(itemTaskIndex, 70, toolIndex)
  4241. ">
  4242. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4243. <div style="margin: 5px 0">英语口语</div>
  4244. </div>
  4245. <div class="noCTool">
  4246. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4247. </div>
  4248. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4249. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4250. </div>
  4251. </div>
  4252. <!-- <div class="tool">
  4253. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4254. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4255. <div style="margin: 5px 0">翻译</div>
  4256. </div>
  4257. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4258. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4259. <div class="checkDiv" v-else>
  4260. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4261. </div>
  4262. </div>
  4263. </div>
  4264. <div class="tool">
  4265. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4266. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4267. <div style="margin: 5px 0">魔盒识字</div>
  4268. </div>
  4269. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4270. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4271. <div class="checkDiv" v-else>
  4272. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4273. </div>
  4274. </div>
  4275. </div>
  4276. <div class="tool">
  4277. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4278. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4279. <div style="margin: 5px 0">24点</div>
  4280. </div>
  4281. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4282. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4283. <div class="checkDiv" v-else>
  4284. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4285. </div>
  4286. </div>
  4287. </div>
  4288. <div class="tool">
  4289. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4290. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4291. <div style="margin: 5px 0">数学画板</div>
  4292. </div>
  4293. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4294. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4295. <div class="checkDiv" v-else>
  4296. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4297. </div>
  4298. </div>
  4299. </div>
  4300. <div class="tool">
  4301. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4302. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4303. <div style="margin: 5px 0">GeoGebra</div>
  4304. </div>
  4305. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4306. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4307. <div class="checkDiv" v-else>
  4308. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4309. </div>
  4310. </div>
  4311. </div>
  4312. <div class="tool">
  4313. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4314. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4315. <div style="margin: 5px 0">模拟驾驶</div>
  4316. </div>
  4317. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4318. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4319. <div class="checkDiv" v-else>
  4320. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4321. </div>
  4322. </div>
  4323. </div>
  4324. <div class="tool">
  4325. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4326. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4327. <div style="margin: 5px 0">路径搜索</div>
  4328. </div>
  4329. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4330. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4331. <div class="checkDiv" v-else>
  4332. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4333. </div>
  4334. </div>
  4335. </div>
  4336. <div class="tool">
  4337. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4338. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4339. <div style="margin: 5px 0">深度学习</div>
  4340. </div>
  4341. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4342. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4343. <div class="checkDiv" v-else>
  4344. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4345. </div>
  4346. </div>
  4347. </div>
  4348. <div class="tool">
  4349. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4350. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4351. <div style="margin: 5px 0">全历史</div>
  4352. </div>
  4353. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4354. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4355. <div class="checkDiv" v-else>
  4356. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4357. </div>
  4358. </div>
  4359. </div>
  4360. </div>
  4361. <div class="toolSort" v-if="itemTool.toolType == 4">
  4362. <div class="tool">
  4363. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4364. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4365. <div style="margin: 5px 0">课程设计</div>
  4366. </div>
  4367. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4368. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4369. <div class="checkDiv" v-else>
  4370. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4371. </div>
  4372. </div>
  4373. </div>
  4374. <div class="tool">
  4375. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4376. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4377. <div style="margin: 5px 0">目标管理</div>
  4378. </div>
  4379. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4380. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4381. <div class="checkDiv" v-else>
  4382. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4383. </div>
  4384. </div>
  4385. </div> -->
  4386. <!-- <div class="tool">
  4387. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4388. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4389. <div style="margin: 5px 0">汉字宫</div>
  4390. </div>
  4391. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4392. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4393. <div class="checkDiv" v-else>
  4394. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4395. </div>
  4396. </div>
  4397. </div> -->
  4398. </div>
  4399. </div>
  4400. <!-- v-show="!itemTool.isFold3" -->
  4401. <div class="op_tool_box"
  4402. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4403. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  4404. class="binfo_input" style="
  4405. margin: 0 0 20px 0;
  4406. width: 100% !important;
  4407. " v-model="itemTool.toolDetail"></textarea>
  4408. <div class="op_box">
  4409. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  4410. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4411. <div class="r_pub_button_op"
  4412. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  4413. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  4414. 智能优化</div>
  4415.                              
  4416. </el-tooltip>
  4417. </div>
  4418. </div>
  4419. </div>
  4420. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  4421. <div class="addToolImg">
  4422. <img src="../../../assets/icon/add.png" alt />
  4423. </div>
  4424. <div>添加工具</div>
  4425. </div> -->
  4426. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  4427. margin: 0 auto;
  4428. padding: 0 30px;
  4429. height: 45px;
  4430. ">
  4431. 添加工具
  4432. </button>
  4433. </div>
  4434. </div>
  4435. <div v-else-if="
  4436. unitJson[unitIndex].easy == 2 ||
  4437. unitJson[unitIndex].easy == 4
  4438. " class="toolChoose" style="padding: 0 0 40px">
  4439. <div class="tools">
  4440. <div class="leftTools" style="width: 100%" v-for="(
  4441. itemTool, toolIndex
  4442. ) in itemTask.toolChoose" :key="toolIndex">
  4443. <div>
  4444. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  4445. margin: 0 0 20px 0;
  4446. width: 100% !important;
  4447. " v-model="itemTool.toolDetail"></textarea>
  4448. </div>
  4449. <div style="
  4450. display: flex;
  4451. flex-direction: row;
  4452. align-items: baseline;
  4453. flex-wrap: nowrap;
  4454. justify-content: flex-start;
  4455. position: relative;
  4456. ">
  4457. <div style="margin-right: 20px; font-weight: bold"
  4458. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4459. 工具 {{ toolIndex + 1 }} :
  4460. </div>
  4461. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4462. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  4463. </div>
  4464. <div style="min-height: 163px">
  4465. <div class="toolSort">
  4466. <div class="tool">
  4467. <div class="whiteBIcon" @click="
  4468. openTools(itemTaskIndex, 1, toolIndex)
  4469. ">
  4470. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4471. <div style="margin: 5px 0">电子白板</div>
  4472. </div>
  4473. <div class="check" @click="
  4474. addTools(1, itemTaskIndex, toolIndex)
  4475. ">
  4476. <img src="../../../assets/icon/checkNo.png" alt
  4477. v-if="itemTool.tool.indexOf(1) == -1" />
  4478. <div class="checkDiv" v-else>
  4479. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4480. </div>
  4481. </div>
  4482. </div>
  4483. <div class="tool">
  4484. <div class="whiteBIcon" @click="
  4485. openTools(itemTaskIndex, 52, toolIndex)
  4486. ">
  4487. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4488. <div style="margin: 5px 0">文档</div>
  4489. </div>
  4490. <div class="check" @click="
  4491. addTools(52, itemTaskIndex, toolIndex)
  4492. ">
  4493. <img src="../../../assets/icon/checkNo.png" alt
  4494. v-if="itemTool.tool.indexOf(52) == -1" />
  4495. <div class="checkDiv" v-else>
  4496. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4497. </div>
  4498. </div>
  4499. </div>
  4500. <div class="tool">
  4501. <div class="whiteBIcon" @click="
  4502. openTools(itemTaskIndex, 3, toolIndex)
  4503. ">
  4504. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4505. <div style="margin: 5px 0">思维导图</div>
  4506. </div>
  4507. <div class="check" @click="
  4508. addTools(3, itemTaskIndex, toolIndex)
  4509. ">
  4510. <img src="../../../assets/icon/checkNo.png" alt
  4511. v-if="itemTool.tool.indexOf(3) == -1" />
  4512. <div class="checkDiv" v-else>
  4513. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4514. </div>
  4515. </div>
  4516. </div>
  4517. <div class="tool">
  4518. <div class="whiteBIcon" @click="
  4519. openTools(itemTaskIndex, 4, toolIndex)
  4520. ">
  4521. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4522. <div style="margin: 5px 0">问卷调查</div>
  4523. </div>
  4524. <div class="check" @click="
  4525. addTools(4, itemTaskIndex, toolIndex)
  4526. ">
  4527. <img src="../../../assets/icon/checkNo.png" alt
  4528. v-if="itemTool.tool.indexOf(4) == -1" />
  4529. <div class="checkDiv" v-else>
  4530. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4531. </div>
  4532. </div>
  4533. </div>
  4534. <div class="tool">
  4535. <div class="whiteBIcon" @click="
  4536. openTools(itemTaskIndex, 45, toolIndex)
  4537. ">
  4538. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4539. <div style="margin: 5px 0">选择题</div>
  4540. </div>
  4541. <div class="check" @click="
  4542. addTools(45, itemTaskIndex, toolIndex)
  4543. ">
  4544. <img src="../../../assets/icon/checkNo.png" alt
  4545. v-if="itemTool.tool.indexOf(45) == -1" />
  4546. <div class="checkDiv" v-else>
  4547. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4548. </div>
  4549. </div>
  4550. </div>
  4551. <div class="tool">
  4552. <div class="whiteBIcon" @click="
  4553. openTools(itemTaskIndex, 15, toolIndex)
  4554. ">
  4555. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4556. <div style="margin: 5px 0">问答</div>
  4557. </div>
  4558. <div class="check" @click="
  4559. addTools(15, itemTaskIndex, toolIndex)
  4560. ">
  4561. <img src="../../../assets/icon/checkNo.png" alt
  4562. v-if="itemTool.tool.indexOf(15) == -1" />
  4563. <div class="checkDiv" v-else>
  4564. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4565. </div>
  4566. </div>
  4567. </div>
  4568. <div class="tool">
  4569. <div class="whiteBIcon" @click="
  4570. addTools(16, itemTaskIndex, toolIndex)
  4571. ">
  4572. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4573. <div style="margin: 5px 0">作业提交</div>
  4574. </div>
  4575. <div class="check" @click="
  4576. addTools(16, itemTaskIndex, toolIndex)
  4577. ">
  4578. <img src="../../../assets/icon/checkNo.png" alt
  4579. v-if="itemTool.tool.indexOf(16) == -1" />
  4580. <div class="checkDiv" v-else>
  4581. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4582. </div>
  4583. </div>
  4584. </div>
  4585. <div class="tool">
  4586. <div class="whiteBIcon" @click="
  4587. openTools(itemTaskIndex, 50, toolIndex)
  4588. ">
  4589. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4590. <div style="margin: 5px 0">批量上传</div>
  4591. </div>
  4592. <div class="check" @click="
  4593. addTools(50, itemTaskIndex, toolIndex)
  4594. ">
  4595. <img src="../../../assets/icon/checkNo.png" alt
  4596. v-if="itemTool.tool.indexOf(50) == -1" />
  4597. <div class="checkDiv" v-else>
  4598. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4599. </div>
  4600. </div>
  4601. </div>
  4602. <div class="tool">
  4603. <div class="whiteBIcon" @click="
  4604. openTools(itemTaskIndex, 41, toolIndex)
  4605. ">
  4606. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4607. <div style="margin: 5px 0">选择匹配</div>
  4608. </div>
  4609. <div class="check" @click="
  4610. addTools(41, itemTaskIndex, toolIndex)
  4611. ">
  4612. <img src="../../../assets/icon/checkNo.png" alt
  4613. v-if="itemTool.tool.indexOf(41) == -1" />
  4614. <div class="checkDiv" v-else>
  4615. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4616. </div>
  4617. </div>
  4618. </div>
  4619. <div class="tool">
  4620. <div class="whiteBIcon" @click="
  4621. openTools(itemTaskIndex, 47, toolIndex)
  4622. ">
  4623. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4624. <div style="margin: 5px 0">排序</div>
  4625. </div>
  4626. <div class="check" @click="
  4627. addTools(47, itemTaskIndex, toolIndex)
  4628. ">
  4629. <img src="../../../assets/icon/checkNo.png" alt
  4630. v-if="itemTool.tool.indexOf(47) == -1" />
  4631. <div class="checkDiv" v-else>
  4632. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4633. </div>
  4634. </div>
  4635. </div>
  4636. <div class="tool">
  4637. <div class="whiteBIcon" @click="
  4638. openTools(itemTaskIndex, 48, toolIndex)
  4639. ">
  4640. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4641. <div style="margin: 5px 0">表格</div>
  4642. </div>
  4643. <div class="check" @click="
  4644. addTools(48, itemTaskIndex, toolIndex)
  4645. ">
  4646. <img src="../../../assets/icon/checkNo.png" alt
  4647. v-if="itemTool.tool.indexOf(48) == -1" />
  4648. <div class="checkDiv" v-else>
  4649. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4650. </div>
  4651. </div>
  4652. </div>
  4653. </div>
  4654. </div>
  4655. </div>
  4656. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  4657. <div class="addToolImg">
  4658. <img src="../../../assets/icon/add.png" alt />
  4659. </div>
  4660. <div>添加工具</div>
  4661. </div> -->
  4662. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  4663. style="margin: 35px auto 20px">
  4664. 添加工具
  4665. </button>
  4666. </div>
  4667. </div>
  4668. <div v-else-if="
  4669. unitJson[unitIndex].easy == 1 ||
  4670. (unitJson[unitIndex].easy == 5 &&
  4671. itemTask.taskType == 2)
  4672. " class="toolChoose" style="padding: 0 0 40px">
  4673. <div class="tools">
  4674. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  4675. itemTool, toolIndex
  4676. ) in itemTask.toolChoose" :key="toolIndex">
  4677. <div style="min-height: 163px">
  4678. <div class="toolSort">
  4679. <div class="tool">
  4680. <div class="whiteBIcon" @click="
  4681. openTools(itemTaskIndex, 50, toolIndex)
  4682. ">
  4683. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4684. <div style="margin: 5px 0">批量上传</div>
  4685. </div>
  4686. <div class="check" @click="
  4687. addTools(50, itemTaskIndex, toolIndex)
  4688. ">
  4689. <img src="../../../assets/icon/checkNo.png" alt
  4690. v-if="itemTool.tool.indexOf(50) == -1" />
  4691. <div class="checkDiv" v-else>
  4692. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4693. </div>
  4694. </div>
  4695. </div>
  4696. </div>
  4697. </div>
  4698. </div>
  4699. </div>
  4700. </div>
  4701. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  4702. v-loading="taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4703. <div class="elist_title">
  4704. <div style="
  4705. display: flex;
  4706. flex-direction: row;
  4707. align-items: center;
  4708. margin: 20px 0;
  4709. ">
  4710. <div class="lineTitle clineTitle">评价设置</div>
  4711. <div style="margin-left:auto;display: flex;">
  4712. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4713. <div class="r_pub_button_op"
  4714. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  4715. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  4716. </el-tooltip>
  4717. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4718. <div class="r_pub_button_op" style="margin-left:10px;"
  4719. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  4720. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  4721. </el-tooltip>
  4722. </div>
  4723. <!-- <div class="line" style="width: 90%"></div> -->
  4724. </div>
  4725. </div>
  4726. <div class="mbCss">
  4727. <div class="pjCss" :style="{
  4728. width: itemTask.isEvaFold
  4729. ? 'calc(100% - 55%)'
  4730. : 'calc(100% - 120px)',
  4731. }">
  4732. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  4733. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  4734. <div class="elist_inptu_text">
  4735. <span>目标:</span>
  4736. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: 200px;"/>
  4737. <el-switch
  4738. style="margin-left: auto;"
  4739. v-model="itemTask.eList[eIndex].isai"
  4740. active-text="人工评分"
  4741. inactive-text="AI评分"
  4742. active-value="2"
  4743. inactive-value="1">
  4744. </el-switch>
  4745. </div>
  4746. <div class="elist_inptu_text">
  4747. <span>评价维度:</span>
  4748. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  4749. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写评价维度" />
  4750. <!-- </el-tooltip> -->
  4751. <!-- <span>评星等级:</span>
  4752. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  4753. disabled></el-rate> -->
  4754. <div class="remove" @click="
  4755. deletEList(
  4756. unitIndex,
  4757. itemTaskIndex,
  4758. eIndex
  4759. )
  4760. "></div>
  4761. </div>
  4762. <div class="elist_inptu_text">
  4763. <span>维度描述:</span>
  4764. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  4765. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写维度描述" />
  4766. <!-- </el-tooltip> -->
  4767. </div>
  4768. <div class="elist_inptu_text" v-if="evalua">
  4769. <span>目标:</span>
  4770. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  4771. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  4772. @change="forceUpdate()">
  4773. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  4774. :value="e.name">
  4775. </el-option>
  4776. </el-select> -->
  4777. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  4778. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  4779. </div>
  4780. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  4781. <span>细则:</span>
  4782. <div style="width: calc(100%);">
  4783. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  4784. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  4785. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  4786. <div class="op_box">
  4787. <div class="op_remark"></div>
  4788. <div style="display: flex;">
  4789. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4790. <div class="r_pub_button_op"
  4791. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  4792. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  4793. </el-tooltip>
  4794. </div>
  4795. </div>
  4796. </div>
  4797. </div>
  4798. </div>
  4799. </div>
  4800. </div>
  4801. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  4802. style="margin: 35px 35px 0 0">
  4803. <div class="addToolImg">
  4804. <img src="../../../assets/icon/add.png" alt />
  4805. </div>
  4806. <div>添加</div>
  4807. </div> -->
  4808. <div class="eva_btn_box">
  4809. <div class="eva_btn_left_box">
  4810. <button class="c_pub_button_add pub_btn_eval_img"
  4811. @click="addEList(unitIndex, itemTaskIndex)">
  4812. 添加
  4813. </button>
  4814. <button class="c_pub_button_add pub_btn_eval_source_img"
  4815. @click="openEList(unitIndex, itemTaskIndex)">
  4816. 资源
  4817. </button>
  4818. </div>
  4819. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  4820. v-if="itemTask.eList && itemTask.eList.length">
  4821. 添加资源模板
  4822. </button>
  4823. </div>
  4824. </div>
  4825. <div v-if="evalua" style="
  4826. border: 1px solid #e5e5e5;
  4827. box-shadow: 3px 1px 15px 3px #e0e0e0;
  4828. " :style="{
  4829. width: itemTask.isEvaFold ? '55%' : '116px',
  4830. }" class="evaCss">
  4831. <!-- <div class="e_add_top">
  4832. <div class="e_add_title">
  4833. <span>当前使用目标管理</span>
  4834. <span>{{ eTitle }}</span>
  4835. <img src="../../../assets/line.png" class="cru_line" style="
  4836. width: 125px;
  4837. height: 20px;
  4838. bottom: -10px;
  4839. left: 155px;
  4840. " />
  4841. </div>
  4842. </div> -->
  4843. <div class="e_add_content" style="width: 100%">
  4844. <div class="e_add_list_pbox" style="width: 100%">
  4845. <div class="e_add_list_pbox_title">
  4846. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  4847. <div class="type_content" v-if="itemTask.isEvaFold">
  4848. <span :class="{ active: typeMode == 1 }"
  4849. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  4850. <span :class="{ active: typeMode == 2 }"
  4851. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  4852. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  4853. </div>
  4854. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  4855. @click="foldEva(itemTaskIndex)">
  4856. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  4857. </div>
  4858. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  4859. @click="foldEva(itemTaskIndex)">
  4860. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  4861. </div>
  4862. </div>
  4863. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  4864. style="min-height: 200px">
  4865. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  4866. " v-if="typeMode == 1"></Mind>
  4867. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  4868. </Sunburst>
  4869. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  4870. v-if="typeMode == 3"></SeeBoard>
  4871. </div>
  4872. </div>
  4873. </div>
  4874. </div>
  4875. </div>
  4876. </div>
  4877. <div class="funBlock" style="padding: 0">
  4878. <div class="fold" @click="fold(itemTaskIndex, $event)">
  4879. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  4880. <div>
  4881. {{
  4882. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  4883. }}
  4884. </div>
  4885. </div>
  4886. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  4887. <div>展开</div>
  4888. <div class="arrow">
  4889. <img src="../../../assets/icon/expand.png" alt />
  4890. </div>
  4891. </div> -->
  4892. </div>
  4893. </div>
  4894. </div>
  4895. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  4896. <!-- <div>
  4897. <img src="../../../../assets/icon/new/addStage.png" alt />
  4898. <span>添加任务</span>
  4899. </div> -->
  4900. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  4901. 添加任务
  4902. </button>
  4903. </div>
  4904. </div>
  4905. <div class="info_btnBox3">
  4906. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  4907. goTo(
  4908. '/course?userid=' +
  4909. userid +
  4910. '&oid=' +
  4911. oid +
  4912. '&org=' +
  4913. org +
  4914. '&role=' +
  4915. role
  4916. )
  4917. ">
  4918. 返回课程
  4919. </button>
  4920. <button class="c_pub_button_return pub_btn_last_img"
  4921. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  4922. {{ steps == 4 ? "返回课程" : "上一步" }}
  4923. </button>
  4924. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  4925. pub_btn_next_img: steps != 3,
  4926. pub_btn_finish_img: steps == 3,
  4927. }">
  4928. {{ steps == 3 ? "确认上传" : "下一步" }}
  4929. </button>
  4930. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  4931. '修改模板' : '保存模板'}}</button>
  4932. </div>
  4933. </div>
  4934. </div>
  4935. </div>
  4936. </div>
  4937. <div style="
  4938. width: calc(100% - 20px);
  4939. background: rgb(255, 255, 255);
  4940. border-radius: 10px;
  4941. " v-if="steps == 4">
  4942. <div class="basic_box_success">
  4943. <div class="right_img">
  4944. <img src="../../../assets/icon/right.png" alt />
  4945. </div>
  4946. <div style="font-weight: bold">成功</div>
  4947. <!-- <div>您的课程编号</div>
  4948. <div class="number">{{ number }}</div>-->
  4949. <!-- <div class="success_button">
  4950. <div class="look_course" @click="isNoFinsh">
  4951. 邀请老师协同编辑
  4952. </div>
  4953. <div class="attend_others" @click="goCourse">预览课程</div>
  4954. </div> -->
  4955. </div>
  4956. </div>
  4957. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  4958. @mouseleave="btnDisplay(false)" v-if="false">
  4959. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  4960. goTo(
  4961. '/course?userid=' +
  4962. userid +
  4963. '&oid=' +
  4964. oid +
  4965. '&org=' +
  4966. org +
  4967. '&role=' +
  4968. role
  4969. )
  4970. ">
  4971. 返回课程
  4972. </button>
  4973. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  4974. @click="lastSteps">
  4975. {{ steps == 4 ? "返回课程" : "上一步" }}
  4976. </button>
  4977. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  4978. pub_btn_next_img: steps != 3,
  4979. pub_btn_finish_img: steps == 3,
  4980. }">
  4981. {{ steps == 3 ? "确认上传" : "下一步" }}
  4982. </button>
  4983. </div>
  4984. </div>
  4985. </div>
  4986. <div class="leftBar" v-if="istemplate == 1">
  4987. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  4988. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  4989. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  4990. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  4991. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  4992. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  4993. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  4994. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  4995. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  4996. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  4997. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  4998. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  4999. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5000. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5001. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5002. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5003. @setAiJson="setAiJson" /> -->
  5004. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5005. @setAiJson="setAiJson" />
  5006. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5007. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5008. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5009. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5010. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5011. </div>
  5012. </div>
  5013. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5014. class="dialog_diy2 customWidth">
  5015. <div>请复制该链接邀请协同编辑</div>
  5016. <div>http://www.boomyon.com/index-zhang.com</div>
  5017. <span slot="footer" class="dialog-footer">
  5018. <el-button type="primary">复制链接分享</el-button>
  5019. <el-button @click="dialogVisible = false">取消</el-button>
  5020. </span>
  5021. </el-dialog>
  5022. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5023. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5024. <el-form>
  5025. <el-form-item label="文档标题">
  5026. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5027. </el-form-item>
  5028. <div>文档简介</div>
  5029. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5030. </el-form>
  5031. <span slot="footer" class="dialog-footer">
  5032. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5033. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5034. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5035. </span>
  5036. </el-dialog>
  5037. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5038. :before-close="handleClose" class="dialog_diy">
  5039. <el-form>
  5040. <el-form-item label="文档标题">
  5041. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5042. </el-form-item>
  5043. <div>文档内容</div>
  5044. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5045. </el-form>
  5046. <span slot="footer" class="dialog-footer">
  5047. <el-button @click="clearChoose">取 消</el-button>
  5048. <el-button type="primary" @click="wordNext()">确定</el-button>
  5049. </span>
  5050. </el-dialog>
  5051. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5052. :before-close="handleClose" class="dialog_diy">
  5053. <el-form>
  5054. <el-form-item label="文本标题">
  5055. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5056. placeholder="请输入文本标题..."></el-input>
  5057. </el-form-item>
  5058. <!-- <div>富文本内容</div> -->
  5059. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5060. </el-form>
  5061. <span slot="footer" class="dialog-footer">
  5062. <el-button @click="clearAttText">取 消</el-button>
  5063. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5064. </span>
  5065. </el-dialog>
  5066. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5067. :before-close="handleClose" class="dialog_diy lineCss">
  5068. <el-form>
  5069. <el-form-item label="标题" :label-width="formLabelWidth">
  5070. <span>
  5071. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5072. </span>
  5073. </el-form-item>
  5074. <el-form-item label="链接" :label-width="formLabelWidth">
  5075. <span>
  5076. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5077. </span>
  5078. </el-form-item>
  5079. </el-form>
  5080. <span slot="footer" class="dialog-footer">
  5081. <el-button @click="clearLine">取 消</el-button>
  5082. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5083. </span>
  5084. </el-dialog>
  5085. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5086. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5087. <div>
  5088. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5089. </div>
  5090. <span slot="footer" class="dialog-footer">
  5091. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5092. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5093. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5094. </span>
  5095. </el-dialog>
  5096. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5097. :before-close="handleClose" class="addNewPP customWidth">
  5098. <div class="people">
  5099. <div class="people_top">
  5100. <div class="people_nav">选择成员</div>
  5101. <div class="people_top_right">
  5102. <div class="people_search">
  5103. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5104. <div class="search_img" @click="searchStudent">
  5105. <img src="../../../assets/icon/search.png" alt />
  5106. </div>
  5107. </div>
  5108. </div>
  5109. </div>
  5110. <el-checkbox-group v-model="checkboxList" class="people_name">
  5111. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5112. "暂无学生可选" }}</el-checkbox>
  5113. </el-checkbox-group>
  5114. </div>
  5115. <span slot="footer" class="dialog-footer">
  5116. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5117. <el-button type="primary" @click="isAddPP">确定</el-button>
  5118. </span>
  5119. </el-dialog>
  5120. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5121. :before-close="handleClose" class="addNewPP2">
  5122. <div class="check_classBox">
  5123. <div class="check_class_right">
  5124. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5125. 全部
  5126. </div>
  5127. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5128. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5129. {{ item.name }}
  5130. </div>
  5131. </el-tooltip>
  5132. </div>
  5133. <div class="check_class_left">
  5134. <div class="check_class_all_box">
  5135. <div class="check_class_left_title">选择班级</div>
  5136. <div style="display: flex; align-items: center; margin-left: auto">
  5137. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5138. </div>
  5139. </div>
  5140. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5141. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5142. </div> -->
  5143. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5144. v-if="grade2.length">
  5145. <div v-for="item in grade2" :key="item.id" class="class_item">
  5146. <el-checkbox :label="item.id">
  5147. {{ item.name }}
  5148. </el-checkbox>
  5149. </div>
  5150. </el-checkbox-group>
  5151. <div v-if="!grade2.length">暂无数据</div>
  5152. </div>
  5153. </div>
  5154. <span slot="footer" class="dialog-footer">
  5155. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5156. <el-button type="primary" @click="isAddClass">确定</el-button>
  5157. </span>
  5158. </el-dialog>
  5159. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5160. :before-close="handleClose" class="addNewPP customWidth">
  5161. <div style="display: flex;justify-content: space-between;">
  5162. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5163. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5164. 全部
  5165. </div>
  5166. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5167. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5168. <el-tooltip placement="top" :content="i.name">
  5169. <span>{{i.name}}</span>
  5170. </el-tooltip>
  5171. </div>
  5172. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5173. 其他
  5174. </div>
  5175. </div>
  5176. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5177. <div class="people">
  5178. <div class="people_top">
  5179. <div class="people_top_right">
  5180. <div class="people_search">
  5181. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5182. <div class="search_img" @click="getTeacher(collid)">
  5183. <img src="../../../assets/icon/search.png" alt />
  5184. </div>
  5185. </div>
  5186. </div>
  5187. <div class="people_nav" style="display: flex; align-items: center">
  5188. <div class="check_class_left_title">选择成员</div>
  5189. <div style="display: flex; align-items: center; margin-left: auto">
  5190. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5191. </div>
  5192. </div>
  5193. </div>
  5194. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5195. @change="InviteChange2">
  5196. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5197. <div class="t_j_box">
  5198. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5199. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5200. </el-tooltip>
  5201. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5202. <span>{{ item.username.split('@')[0] }}</span>
  5203. </el-tooltip>
  5204. <el-tooltip placement="top" :content="item.school">
  5205. <span>{{ item.school }}</span>
  5206. </el-tooltip>
  5207. </div>
  5208. </el-checkbox>
  5209. </el-checkbox-group>
  5210. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5211. </div>
  5212. </div>
  5213. </div>
  5214. <span slot="footer" class="dialog-footer">
  5215. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5216. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5217. </span>
  5218. </el-dialog>
  5219. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5220. closePan(4);
  5221. }
  5222. " class="dialog_diy fullStyle">
  5223. <div style="height: 100%">
  5224. <div class="a_add_title" style="
  5225. display: flex;
  5226. flex-direction: row;
  5227. align-items: center;
  5228. justify-content: center;
  5229. ">
  5230. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5231. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5232. </div>
  5233. <div class="a_addBox" style="height: calc(100% - 50px)">
  5234. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5235. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5236. <div class="a_add_checkType">
  5237. <span :class="{
  5238. active:
  5239. askJson.askJson[index1].type == '1' ||
  5240. !askJson.askJson[index1].type,
  5241. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5242. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5243. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5244. </div>
  5245. <div class="a_add_head">
  5246. <div style="
  5247. display: flex;
  5248. align-items: center;
  5249. width: 100%;
  5250. margin-right: 20px;
  5251. ">
  5252. <span style="min-width: fit-content">{{
  5253. index1 + 1 + "、"
  5254. }}</span>
  5255. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5256. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5257. $forceUpdate();
  5258. }
  5259. "></textarea>
  5260. </div>
  5261. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5262. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5263. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5264. </div>
  5265. <div class="a_add_head_div">
  5266. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5267. </el-button>
  5268. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5269. </div>
  5270. </div>
  5271. <div class="a_add_body">
  5272. <div class="a_add_input" style="flex-direction: column">
  5273. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5274. margin: 20px 10px 0 0;
  5275. display: flex;
  5276. align-items: center;
  5277. position: relative;
  5278. ">
  5279. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5280. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5281. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5282. @change="() => {
  5283. $forceUpdate();
  5284. }
  5285. "></textarea>
  5286. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5287. v-if="askJson.askJson[index1].askItem != 1">
  5288. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5289. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5290. </div>
  5291. <div class="a_add_body_div">
  5292. <el-button type="primary" size="small"
  5293. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5294. <el-button type="primary" size="small" @click="
  5295. deletecheckList(askJson.askJson[index1], checkIndex)
  5296. " v-if="askJson.askJson[index1].askItem != 1">删除
  5297. </el-button>
  5298. </div>
  5299. </div>
  5300. </div>
  5301. <!-- <div class="a_add_body_div">
  5302. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5303. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5304. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5305. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5306. </el-button>
  5307. </div> -->
  5308. </div>
  5309. </div>
  5310. </div>
  5311. </div>
  5312. <span slot="footer" class="dialog-footer">
  5313. <el-button @click="closePan(4)">取 消</el-button>
  5314. <el-button type="primary" @click="addAsk">确 定</el-button>
  5315. </span>
  5316. </el-dialog>
  5317. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5318. closePan(45);
  5319. }
  5320. " class="dialog_diy fullStyle">
  5321. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5322. <!-- <div class="a_add_title" style="
  5323. display: flex;
  5324. flex-direction: row;
  5325. align-items: center;
  5326. justify-content: center;
  5327. ">
  5328. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5329. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5330. </div> -->
  5331. <div class="a_addBox" style="height: 100%">
  5332. <div style="
  5333. font-size: 16px;
  5334. color: #c7c7c7;
  5335. display: flex;
  5336. align-items: center;
  5337. justify-content: flex-end;
  5338. ">
  5339. <!-- 请输入题目内容 -->
  5340. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  5341. 智能生成
  5342. </button>
  5343. <!-- 请输入题目内容 -->
  5344. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  5345. v-if="isPasteChoice">
  5346. 智能粘贴
  5347. </button>
  5348. </div>
  5349. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  5350. <div class="a_add_checkType">
  5351. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  5352. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  5353. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  5354. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  5355. </div>
  5356. <div class="a_add_head">
  5357. <div class="timuUpImg">
  5358. <div style="display: flex; align-items: center">
  5359. <span style="min-width: fit-content">{{
  5360. index1 + 1 + "、"
  5361. }}</span>
  5362. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  5363. placeholder="请输入题目">
  5364. </el-input> -->
  5365. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5366. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  5367. $forceUpdate();
  5368. }
  5369. "></textarea>
  5370. </div>
  5371. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  5372. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  5373. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  5374. </div>
  5375. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  5376. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5377. <input type="file" accept="image/*" style="display: none"
  5378. @change="beforeUploadTiMu($event, index1)" />
  5379. </div>
  5380. </div>
  5381. <div class="a_add_head_div">
  5382. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  5383. </el-button>
  5384. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  5385. </div>
  5386. </div>
  5387. <div class="timuImgBox" v-if="
  5388. testJson.testJson[index1].timuList &&
  5389. testJson.testJson[index1].timuList.length
  5390. ">
  5391. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  5392. @click.stop="previewImg(timg.src)">
  5393. <img :src="timg.src" alt="" />
  5394. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  5395. <img src="../../../assets/icon/delete.png" alt="" />
  5396. </div>
  5397. </div>
  5398. </div>
  5399. <div class="a_add_body">
  5400. <div class="a_add_input a_add_input_choice">
  5401. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  5402. @change="() => {
  5403. $forceUpdate();
  5404. }
  5405. ">
  5406. <div class="radioBox">
  5407. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  5408. .testItem" :key="checkIndex" :label="checkIndex">
  5409. <div style="margin-right: 10px">
  5410. 选项{{ checkIndex + 1 }}
  5411. </div>
  5412. <div style="margin-right: 10px; width: 300px" v-if="
  5413. testJson.testJson[index1].checkList[checkIndex] &&
  5414. testJson.testJson[index1].checkList[checkIndex]
  5415. .imgType &&
  5416. testJson.testJson[index1].checkList[checkIndex]
  5417. .imgType == 1
  5418. ">
  5419. <div class="inImg" @click.stop="
  5420. previewImg(
  5421. testJson.testJson[index1].checkList[checkIndex]
  5422. .src
  5423. )
  5424. ">
  5425. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  5426. .src
  5427. " lazy />
  5428. <!-- <img :src="
  5429. testJson.testJson[index1].checkList[checkIndex]
  5430. .src
  5431. " alt="" /> -->
  5432. </div>
  5433. </div>
  5434. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  5435. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5436. $forceUpdate();
  5437. }
  5438. "></textarea>
  5439. <div class="xzUpImg" @click.stop="addImg($event)">
  5440. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5441. <input type="file" accept="image/*" style="display: none"
  5442. @change="beforeUploadTi($event, index1, checkIndex)" />
  5443. </div>
  5444. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5445. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  5446. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  5447. </div>
  5448. <div class="a_add_body_div">
  5449. <el-button type="primary" size="small" @click.stop="
  5450. addTcheckList(testJson.testJson[index1], checkIndex)
  5451. ">添加</el-button>
  5452. <el-button type="primary" size="small" @click.stop="
  5453. deleteTcheckList(
  5454. testJson.testJson[index1],
  5455. checkIndex
  5456. )
  5457. " v-if="testJson.testJson[index1].testItem != 1">删除
  5458. </el-button>
  5459. </div>
  5460. </el-radio>
  5461. </div>
  5462. </el-radio-group>
  5463. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  5464. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  5465. $forceUpdate();
  5466. }
  5467. ">
  5468. <div class="radioBox">
  5469. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  5470. .testItem" :key="checkIndex1" :label="checkIndex1">
  5471. <div style="margin-right: 10px">
  5472. 选项{{ checkIndex1 + 1 }}
  5473. </div>
  5474. <div style="margin-right: 10px; width: 300px" v-if="
  5475. testJson.testJson[index1].checkList[checkIndex1] &&
  5476. testJson.testJson[index1].checkList[checkIndex1]
  5477. .imgType &&
  5478. testJson.testJson[index1].checkList[checkIndex1]
  5479. .imgType == 1
  5480. ">
  5481. <div class="inImg" @click.stop="
  5482. previewImg(
  5483. testJson.testJson[index1].checkList[checkIndex1]
  5484. .src
  5485. )
  5486. ">
  5487. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  5488. .src
  5489. " lazy />
  5490. <!-- <img :src="
  5491. testJson.testJson[index1].checkList[checkIndex1]
  5492. .src
  5493. " alt="" /> -->
  5494. </div>
  5495. </div>
  5496. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  5497. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5498. $forceUpdate();
  5499. }
  5500. "></textarea>
  5501. <div class="xzUpImg" @click.stop="addImg($event)">
  5502. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5503. <input type="file" accept="image/*" style="display: none"
  5504. @change="beforeUploadTi($event, index1, checkIndex1)" />
  5505. </div>
  5506. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5507. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  5508. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  5509. </div>
  5510. <div class="a_add_body_div">
  5511. <el-button type="primary" size="small" @click.stop="
  5512. addTcheckList(
  5513. testJson.testJson[index1],
  5514. checkIndex1
  5515. )
  5516. ">添加</el-button>
  5517. <el-button type="primary" size="small" @click.stop="
  5518. deleteTcheckList(
  5519. testJson.testJson[index1],
  5520. checkIndex1
  5521. )
  5522. " v-if="testJson.testJson[index1].testItem != 1">删除
  5523. </el-button>
  5524. </div>
  5525. </el-checkbox>
  5526. </div>
  5527. </el-checkbox-group>
  5528. </div>
  5529. <!-- <div class="a_add_body_div">
  5530. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  5531. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  5532. v-if="testJson.testJson[index1].testItem != 1">删除
  5533. </el-button>
  5534. </div> -->
  5535. </div>
  5536. </div>
  5537. </div>
  5538. </div>
  5539. <span slot="footer" class="dialog-footer">
  5540. <el-button @click="closePan(45)">取 消</el-button>
  5541. <el-button type="primary" @click="addTest">确 定</el-button>
  5542. </span>
  5543. </el-dialog>
  5544. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  5545. :before-close="handleClose" class="dialog_diy addToolsDia">
  5546. <div class="toolChoose">
  5547. <div class="tools">
  5548. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  5549. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  5550. <div style="
  5551. display: flex;
  5552. flex-direction: row;
  5553. align-items: baseline;
  5554. flex-wrap: nowrap;
  5555. justify-content: flex-start;
  5556. position: relative;
  5557. ">
  5558. <div class="chooseWho">
  5559. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  5560. 互动类
  5561. </div>
  5562. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  5563. 思维类
  5564. </div>
  5565. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  5566. 评价类
  5567. </div>
  5568. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  5569. 其他
  5570. </div>
  5571. </div>
  5572. </div>
  5573. <div style="min-height: 163px">
  5574. <div class="toolSort" v-if="chapToolsType == 0">
  5575. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  5576. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  5577. <img src="../../../assets/icon/secondToolList/library.png" alt />
  5578. <div style="margin: 5px 0">素材库</div>
  5579. </div>
  5580. <div class="noCTool">
  5581. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5582. </div>
  5583. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  5584. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5585. </div>
  5586. <!-- <div class="check" @click="chapAddTools(8)">
  5587. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  5588. <div class="checkDiv" v-else>
  5589. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5590. </div>
  5591. </div> -->
  5592. </div>
  5593. </div>
  5594. <div class="toolSort" v-if="chapToolsType == 1">
  5595. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  5596. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  5597. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  5598. <div style="margin: 5px 0">思维网格</div>
  5599. </div>
  5600. <div class="noCTool">
  5601. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5602. </div>
  5603. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  5604. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5605. </div>
  5606. <!-- <div class="check" @click="chapAddTools(7)">
  5607. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  5608. <div class="checkDiv" v-else>
  5609. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5610. </div>
  5611. </div> -->
  5612. </div>
  5613. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  5614. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  5615. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  5616. <div style="margin: 5px 0">电子白板</div>
  5617. </div>
  5618. <div class="noCTool">
  5619. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5620. </div>
  5621. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  5622. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5623. </div>
  5624. <!-- <div class="check" @click="chapAddTools(1)">
  5625. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  5626. <div class="checkDiv" v-else>
  5627. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5628. </div>
  5629. </div> -->
  5630. </div>
  5631. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  5632. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  5633. <img src="../../../assets/icon/secondToolList/note.png" alt />
  5634. <div style="margin: 5px 0">便签</div>
  5635. </div>
  5636. <div class="noCTool">
  5637. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5638. </div>
  5639. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  5640. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5641. </div>
  5642. <!-- <div class="check" @click="chapAddTools(2)">
  5643. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  5644. <div class="checkDiv" v-else>
  5645. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5646. </div>
  5647. </div> -->
  5648. </div>
  5649. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  5650. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  5651. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  5652. <div style="margin: 5px 0">协同文档</div>
  5653. </div>
  5654. <div class="noCTool">
  5655. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5656. </div>
  5657. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  5658. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5659. </div>
  5660. <!-- <div class="check" @click="chapAddTools(6)">
  5661. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  5662. <div class="checkDiv" v-else>
  5663. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5664. </div>
  5665. </div> -->
  5666. </div>
  5667. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  5668. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  5669. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  5670. <div style="margin: 5px 0">思维导图</div>
  5671. </div>
  5672. <div class="noCTool">
  5673. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5674. </div>
  5675. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  5676. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5677. </div>
  5678. <!-- <div class="check" @click="chapAddTools(3)">
  5679. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  5680. <div class="checkDiv" v-else>
  5681. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5682. </div>
  5683. </div> -->
  5684. </div>
  5685. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  5686. @click="chapAddTools(31)">
  5687. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  5688. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  5689. <div style="margin: 5px 0">数学画板</div>
  5690. </div>
  5691. <div class="noCTool">
  5692. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5693. </div>
  5694. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  5695. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5696. </div>
  5697. <!-- <div class="check" @click="chapAddTools(31)">
  5698. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  5699. <div class="checkDiv" v-else>
  5700. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5701. </div>
  5702. </div> -->
  5703. </div>
  5704. </div>
  5705. <div class="toolSort" v-if="chapToolsType == 2">
  5706. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  5707. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  5708. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  5709. <div style="margin: 5px 0">量规评分</div>
  5710. </div>
  5711. <div class="noCTool">
  5712. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5713. </div>
  5714. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  5715. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5716. </div>
  5717. <!-- <div class="check" @click="chapAddTools(5)">
  5718. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  5719. <div class="checkDiv" v-else>
  5720. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5721. </div>
  5722. </div> -->
  5723. </div>
  5724. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  5725. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  5726. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  5727. <div style="margin: 5px 0">问卷调查</div>
  5728. </div>
  5729. <div class="noCTool">
  5730. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5731. </div>
  5732. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  5733. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  5734. </div>
  5735. <!-- <div class="check" @click="chapAddTools(4)">
  5736. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  5737. <div class="checkDiv" v-else>
  5738. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5739. </div>
  5740. </div> -->
  5741. </div>
  5742. </div>
  5743. </div>
  5744. <div>
  5745. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  5746. v-model="itemTools.toolDetail" />
  5747. </div>
  5748. </div>
  5749. </div>
  5750. </div>
  5751. <span slot="footer" class="dialog-footer">
  5752. <el-button @click="dialogVisible4 = false">取 消</el-button>
  5753. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  5754. </span>
  5755. </el-dialog>
  5756. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  5757. closePan(15);
  5758. }
  5759. " class="dialog_diy">
  5760. <div>
  5761. <div class="a_add_title" style="
  5762. display: flex;
  5763. flex-direction: column;
  5764. align-items: flex-start;
  5765. justify-content: center;
  5766. ">
  5767. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  5768. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  5769. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  5770. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  5771. </div>
  5772. </div>
  5773. <span slot="footer" class="dialog-footer">
  5774. <el-button @click="closePan(15)">取 消</el-button>
  5775. <el-button type="primary" @click="addAnswer">确 定</el-button>
  5776. </span>
  5777. </el-dialog>
  5778. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  5779. :before-close="handleClose" class="dialog_diy">
  5780. <div>
  5781. <div class="a_add_title" style="
  5782. display: flex;
  5783. flex-direction: column;
  5784. align-items: flex-start;
  5785. justify-content: center;
  5786. ">
  5787. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  5788. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  5789. </div>
  5790. </div>
  5791. <span slot="footer" class="dialog-footer">
  5792. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  5793. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  5794. </span>
  5795. </el-dialog>
  5796. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  5797. :before-close="handleClose" class="dialog_diy">
  5798. <div>
  5799. <div class="fileCss" style="padding-top: 20px">
  5800. <div>
  5801. <button class="info_btn" @click="addImg($event)">
  5802. 选择本地文件
  5803. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  5804. </button>
  5805. <div class="spanName">选择本地文件</div>
  5806. </div>
  5807. <!-- <div>
  5808. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  5809. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  5810. <img :src="cover[0].url" alt="" />
  5811. <div class="deletePic" @click="deleteSysPic">
  5812. <img src="../../../assets/icon/delete.png" alt="" />
  5813. </div>
  5814. </div>
  5815. <div class="spanName">选择系统文件</div>
  5816. </div> -->
  5817. <div>
  5818. <el-button @click="(searchImageValue = courseName), resetImage()"
  5819. v-if="isSysPic2 == false">选择网络文件</el-button>
  5820. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  5821. <img :src="cover[0].url" alt="" />
  5822. <div class="deletePic" @click="deleteSysPic">
  5823. <img src="../../../assets/icon/delete.png" alt="" />
  5824. </div>
  5825. </div>
  5826. <div class="spanName">选择网络文件</div>
  5827. </div>
  5828. </div>
  5829. <!-- <div class="fileCss">
  5830. </div> -->
  5831. </div>
  5832. <span slot="footer" class="dialog-footer">
  5833. <el-button @click="choosePicVisible = false">取 消</el-button>
  5834. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  5835. </span>
  5836. </el-dialog>
  5837. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  5838. :before-close="handleClose" class="dialog_diy">
  5839. <div class="cru_selectBox" style="margin: 0">
  5840. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  5841. 绘画
  5842. </div>
  5843. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  5844. 科技
  5845. </div>
  5846. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  5847. 人文
  5848. </div>
  5849. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  5850. 艺术
  5851. </div>
  5852. </div>
  5853. <div class="sysPicBox">
  5854. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  5855. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  5856. </div>
  5857. </div>
  5858. </el-dialog>
  5859. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  5860. :before-close="handleClose" class="dialog_diy">
  5861. <div>
  5862. <div class="people_top_right" style="display: flex; align-items: center">
  5863. <div style="position: relative; width: 100%">
  5864. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  5865. @keyup.enter.native="resetImage()"></el-input>
  5866. <div class="search_img" @click="resetImage" style="right: 10px">
  5867. <img src="../../../assets/icon/search.png" alt />
  5868. </div>
  5869. </div>
  5870. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  5871. </div>
  5872. <div class="sysPicBox" v-loading="imageloading">
  5873. <div class="picNone" v-if="!imageList.length">
  5874. 请输入关键词搜索图片
  5875. </div>
  5876. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  5877. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  5878. </div>
  5879. </div>
  5880. </div>
  5881. </el-dialog>
  5882. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  5883. closePan(41);
  5884. }
  5885. " class="dialog_diy dialog_diy3 fullStyle">
  5886. <div v-if="selectJson" style="height: 100%">
  5887. <div class="select_box1" v-if="selectSteps == 1">
  5888. <div class="select_box1_img">
  5889. <div class="select_box1_title">
  5890. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  5891. </div>
  5892. <div class="select_box1_add_img">
  5893. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  5894. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  5895. <img src="../../../assets/icon/addPoster.png" alt="" />
  5896. </div>
  5897. <div class="isSysPic" v-else>
  5898. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  5899. <div class="deletePic" @click="deleteSelectPic">
  5900. <img src="../../../assets/icon/delete.png" alt="" />
  5901. </div>
  5902. </div>
  5903. </div>
  5904. </div>
  5905. <div class="select_box1_select">
  5906. <div class="select_box1_title">
  5907. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  5908. </div>
  5909. <div class="select_box1_select_box">
  5910. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  5911. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  5912. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  5913. <div class="select_box1_select_box_add">
  5914. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  5915. 添加</el-button>
  5916. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  5917. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  5918. </div>
  5919. </div>
  5920. </div>
  5921. </div>
  5922. <div v-if="selectSteps == 2" style="height: 100%">
  5923. <div class="select_box2">
  5924. <div class="select_box2_title">设置每道题目的正确选项</div>
  5925. <div class="select_box2_box">
  5926. <div class="select_box2_img">
  5927. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  5928. </div>
  5929. <div class="select_box2_answer">
  5930. <div class="select_answer_title">根据题目选择对应答案</div>
  5931. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  5932. <span>{{ checkIndex + 1 }}、</span>
  5933. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  5934. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  5935. </el-option>
  5936. </el-select>
  5937. </div>
  5938. </div>
  5939. </div>
  5940. </div>
  5941. </div>
  5942. </div>
  5943. <span slot="footer" class="dialog-footer">
  5944. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  5945. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  5946. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  5947. </span>
  5948. </el-dialog>
  5949. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  5950. :before-close="handleClose" class="dialog_diy">
  5951. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  5952. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  5953. <div class="pjCss" style="width: 100%">
  5954. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  5955. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  5956. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  5957. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  5958. <div class="remove" @click="deletRateList(eIndex)"></div>
  5959. <div style="width: 100%; display: flex">
  5960. <span style="min-width: 100px; text-align: right">评星等级:</span>
  5961. <el-rate v-model="eItem.score" disabled></el-rate>
  5962. </div>
  5963. <div class="elist_inptu_text" style="align-items: flex-start">
  5964. <span style="min-width: 100px; text-align: right">描述:</span>
  5965. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  5966. </div>
  5967. </div>
  5968. </div>
  5969. <div class="addToolFun" @click="addRateList()">
  5970. <div class="addToolImg">
  5971. <img src="../../../assets/icon/add.png" alt />
  5972. </div>
  5973. <div>添加</div>
  5974. </div>
  5975. </div>
  5976. </div>
  5977. <span slot="footer" class="dialog-footer">
  5978. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  5979. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  5980. </span>
  5981. </el-dialog>
  5982. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  5983. closePan(47);
  5984. }
  5985. " class="dialog_diy dialog_diy3 fullStyle">
  5986. <div style="height: 100%">
  5987. <div class="sentenBox" style="height: 100%">
  5988. <div class="addSen" @click="addSt">添加题目</div>
  5989. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  5990. <div class="sentenTopBox">
  5991. <div class="sentenTop" :index="stIndex + 1">
  5992. <div>题目设置</div>
  5993. <div>
  5994. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  5995. </div>
  5996. <div @click="addSen(stIndex)">添加</div>
  5997. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  5998. </div>
  5999. </div>
  6000. <div class="cardList">
  6001. <div v-if="st.addSentence.length > 0" class="cardBox">
  6002. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6003. @click="setRightAnswer(s, stIndex, sIndex)">
  6004. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6005. <div>{{ s }}</div>
  6006. </el-tooltip>
  6007. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6008. <img src="../../../assets/icon/delete.png" alt="" />
  6009. </div>
  6010. </div>
  6011. </div>
  6012. <div class="card">
  6013. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6014. </div>
  6015. </div>
  6016. <div class="rightCardBox">
  6017. <div>正确顺序</div>
  6018. <div class="rightCardList">
  6019. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6020. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6021. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6022. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6023. <div>{{ r }}</div>
  6024. </el-tooltip>
  6025. </div>
  6026. <div>{{ rIndex + 1 }}</div>
  6027. </div>
  6028. </div>
  6029. <div class="card" v-if="st.rightAnswer.length == 0">
  6030. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6031. </div>
  6032. <div class="card" v-else>
  6033. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6034. </div>
  6035. </div>
  6036. </div>
  6037. </div>
  6038. </div>
  6039. </div>
  6040. <span slot="footer" class="dialog-footer">
  6041. <el-button @click="closePan(47)">取 消</el-button>
  6042. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6043. </span>
  6044. </el-dialog>
  6045. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6046. :before-close="handleClose" class="dialog_diy">
  6047. <el-form>
  6048. <!-- <el-form-item label="文本标题">
  6049. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6050. </el-form-item> -->
  6051. <div>表格内容</div>
  6052. <Table v-model="tableJson.text" @change="change"></Table>
  6053. </el-form>
  6054. <span slot="footer" class="dialog-footer">
  6055. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6056. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6057. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6058. </span>
  6059. </el-dialog>
  6060. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6061. :before-close="handleClose" class="dialog_diy">
  6062. <el-form>
  6063. <!-- <el-form-item label="文本标题">
  6064. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6065. </el-form-item> -->
  6066. <div>文档内容</div>
  6067. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6068. </el-form>
  6069. <span slot="footer" class="dialog-footer">
  6070. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6071. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6072. </span>
  6073. </el-dialog>
  6074. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6075. :before-close="handleClose" class="dialog_diy">
  6076. <div style="
  6077. width: 100%;
  6078. display: flex;
  6079. flex-direction: row;
  6080. flex-wrap: nowrap;
  6081. align-items: center;
  6082. justify-content: center;
  6083. ">
  6084. <div>班级:</div>
  6085. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6086. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6087. </el-option>
  6088. </el-select>
  6089. </div>
  6090. <span slot="footer" class="dialog-footer">
  6091. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6092. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6093. </span>
  6094. </el-dialog>
  6095. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6096. :before-close="handleClose" class="dialog_diy">
  6097. <div style="
  6098. width: 100%;
  6099. display: flex;
  6100. flex-direction: row;
  6101. flex-wrap: nowrap;
  6102. align-items: center;
  6103. justify-content: center;
  6104. ">
  6105. <div>随机码:</div>
  6106. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6107. </div>
  6108. <span slot="footer" class="dialog-footer">
  6109. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6110. <el-button type="primary" @click="addInvite">确定</el-button>
  6111. </span>
  6112. </el-dialog>
  6113. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6114. :before-close="handleClose" class="dialog_diy">
  6115. <div>
  6116. <div style="margin-bottom: 20px; color: #999">
  6117. 提示:点击“+”或“-”修改倒计时时长。
  6118. </div>
  6119. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6120. </div>
  6121. <span slot="footer" class="dialog-footer">
  6122. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6123. <el-button type="primary" @click="addPreTime">确定</el-button>
  6124. </span>
  6125. </el-dialog>
  6126. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6127. :before-close="handleClose" class="dialog_diy">
  6128. <div>
  6129. <div style="
  6130. width: 100%;
  6131. display: flex;
  6132. flex-direction: row;
  6133. flex-wrap: nowrap;
  6134. align-content: center;
  6135. align-items: center;
  6136. justify-content: space-between;
  6137. ">
  6138. <div style="
  6139. display: flex;
  6140. flex-flow: row nowrap;
  6141. align-items: flex-start;
  6142. width: 100%;
  6143. flex-direction: column;
  6144. flex-wrap: nowrap;
  6145. position: relative;
  6146. ">
  6147. <div class="e_box">
  6148. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6149. <div class="e_card_picture">
  6150. <img src="../../../assets/e_picture.png" />
  6151. </div>
  6152. <div class="e_card_name">
  6153. <span>{{ item.title }}</span>
  6154. </div>
  6155. <div class="e_card_btn">
  6156. <span @click="checkEva(item.id, 2)">导入</span>
  6157. </div>
  6158. </div> -->
  6159. <!-- <div class="addEva" @click="openT">
  6160. <img src="../../../assets/icon/addEva.png" alt="" />
  6161. </div> -->
  6162. <div style="
  6163. display: flex;
  6164. justify-content: flex-end;
  6165. margin-bottom: 10px;
  6166. ">
  6167. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6168. </div>
  6169. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6170. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6171. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6172. </el-table-column>
  6173. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6174. </el-table-column>
  6175. <el-table-column label="操作" width="250px">
  6176. <template slot-scope="scope">
  6177. <div class="btnBox">
  6178. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6179. </div>
  6180. </template>
  6181. </el-table-column>
  6182. </el-table>
  6183. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6184. 暂无数据
  6185. </div>
  6186. </div>
  6187. </div>
  6188. </div>
  6189. </div>
  6190. <span slot="footer" class="dialog-footer">
  6191. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6192. </span>
  6193. </el-dialog>
  6194. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6195. :before-close="handleClose" class="dialog_diy">
  6196. <div class="groupBox">
  6197. <div v-if="groupJson.group" class="groupContent">
  6198. <div class="groupTitle">请设置小组数量及名称</div>
  6199. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6200. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6201. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6202. <div class="groupBtn">
  6203. <el-button type="primary" size="small" @click="addGroup(index)"
  6204. v-if="groupJson.group.length - 1 == index">
  6205. 添加</el-button>
  6206. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6207. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6208. </div>
  6209. </div>
  6210. </div>
  6211. <div class="groupContent">
  6212. <div class="groupTitle">请设置每组人数</div>
  6213. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6214. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6215. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6216. @change="numberPan"></el-input>
  6217. </div>
  6218. </div>
  6219. <span slot="footer" class="dialog-footer">
  6220. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6221. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6222. </span>
  6223. </el-dialog>
  6224. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6225. :before-close="handleClose" class="dialog_diy">
  6226. <div style="
  6227. width: 100%;
  6228. display: flex;
  6229. flex-direction: row;
  6230. flex-wrap: nowrap;
  6231. align-items: center;
  6232. justify-content: center;
  6233. ">
  6234. <div style="min-width: fit-content">文件名称:</div>
  6235. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6236. </div>
  6237. <span slot="footer" class="dialog-footer">
  6238. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6239. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6240. </span>
  6241. </el-dialog>
  6242. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6243. closePan(69);
  6244. }
  6245. " class="dialog_diy fullStyle fullStyle1">
  6246. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6247. <span slot="footer" class="dialog-footer">
  6248. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6249. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6250. </span>
  6251. </el-dialog>
  6252. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6253. :before-close="handleClose" class="dialog_diy">
  6254. <div class="template_box">
  6255. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6256. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6257. <div class="wordPic">
  6258. <img src="../../../assets/icon/new/course_template.png" alt />
  6259. </div>
  6260. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6261. <div style="
  6262. margin-top: 10px;
  6263. line-height: 19px;
  6264. overflow: hidden;
  6265. text-overflow: ellipsis;
  6266. white-space: nowrap;
  6267. padding: 0 10px;
  6268. box-sizing: border-box;
  6269. width: 100%;
  6270. ">
  6271. {{ aa.title }}
  6272. </div>
  6273. </el-tooltip>
  6274. </div>
  6275. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6276. :class="{ wordTeacherA: ctJson.id == 1 }">
  6277. <div class="wordPic">
  6278. <img src="../../../assets/icon/new/course_template.png" alt />
  6279. </div>
  6280. <div style="
  6281. margin-top: 10px;
  6282. line-height: 19px;
  6283. overflow: hidden;
  6284. text-overflow: ellipsis;
  6285. white-space: nowrap;
  6286. padding: 0 20px;
  6287. ">
  6288. 简易模板
  6289. </div>
  6290. </div>
  6291. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6292. :class="{ wordTeacherA: ctJson.id == 2 }">
  6293. <div class="wordPic">
  6294. <img src="../../../assets/icon/new/course_template.png" alt />
  6295. </div>
  6296. <div style="
  6297. margin-top: 10px;
  6298. line-height: 19px;
  6299. overflow: hidden;
  6300. text-overflow: ellipsis;
  6301. white-space: nowrap;
  6302. padding: 0 20px;
  6303. ">
  6304. 智能粘贴模式
  6305. </div>
  6306. </div>
  6307. </div>
  6308. <span slot="footer" class="dialog-footer">
  6309. <el-button @click="templateDialog = false">取 消</el-button>
  6310. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6311. </span>
  6312. </el-dialog>
  6313. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6314. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6315. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6316. <div class="change_stageBox">
  6317. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6318. <div class="nt_taskBox">
  6319. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  6320. <div class="nt_taskName">
  6321. <el-tooltip effect="light" :content="t.dyName" placement="top">
  6322. <span>{{ t.dyName }}</span>
  6323. </el-tooltip>
  6324. </div>
  6325. </div>
  6326. <div class="moveBtn" v-if="unitJson3.length > 1">
  6327. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  6328. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  6329. </div>
  6330. </div>
  6331. </div>
  6332. <span slot="footer" class="dialog-footer">
  6333. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  6334. <el-button type="primary" @click="updateChange">确定</el-button>
  6335. </span>
  6336. </el-dialog>
  6337. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  6338. :before-close="handleClose" class="dialog_diy">
  6339. <div class="addTypeChoose" style="justify-content: center">
  6340. <div style="min-width: 100px">模板名称:</div>
  6341. <el-input v-model="templateName" style="width: 200px"></el-input>
  6342. </div>
  6343. <div class="addTypeBox">
  6344. <div class="addTypeChoose">
  6345. <div style="min-width: 100px">选择一级分类:</div>
  6346. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  6347. style="width: 200px">
  6348. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  6349. </el-option>
  6350. </el-select>
  6351. </div>
  6352. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  6353. <div style="min-width: 100px">选择二级分类:</div>
  6354. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  6355. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  6356. </el-option>
  6357. </el-select>
  6358. </div>
  6359. </div>
  6360. <span slot="footer" class="dialog-footer">
  6361. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  6362. <el-button @click="close()">关 闭</el-button>
  6363. </span>
  6364. </el-dialog>
  6365. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  6366. </evaBox>
  6367. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  6368. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  6369. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" @aiConfirm="aiConfirm" :clickType="clickType">
  6370. </aiDialog>
  6371. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  6372. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  6373. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  6374. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  6375. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  6376. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  6377. </div>
  6378. </template>
  6379. <script>
  6380. import "../../../common/aws-sdk-2.235.1.min.js";
  6381. import { tools as toolsData } from "../../../common/tools.js";
  6382. // import "../../../common/aws-sdk-2.99.0.min.js";
  6383. import $ from "jquery";
  6384. import EditorBar from "../../../components/tools/wangEnduit";
  6385. import Table from "../../../components/tools/table";
  6386. import Mind from "../../tools/jsmind2";
  6387. import Time from "../../tools/time.vue";
  6388. import Sunburst from "../../tools/sunburst";
  6389. import SeeBoard from "../../tools/seeBoard";
  6390. import weilaiData from "../components/weilai.js";
  6391. import sourceDialog from "../teacherSource/dialog.vue";
  6392. import interVideo from "../interVideo/index.vue";
  6393. import englishRight from "../components/englishRight.vue";
  6394. import evaBox from "../evaBox/index.vue";
  6395. import EnglishVoice from "../EnglishVoice/index.vue";
  6396. import aiBox from './aiBox.vue'
  6397. import aiDialog from './aiDialog'
  6398. import aiTips from './aiTips.vue'
  6399. import tipsDialog from './tipsDialog.vue'
  6400. import { v4 as uuidv4 } from "uuid";
  6401. import MarkdownIt from "markdown-it";
  6402. import aiCreateDialog from './aiCreateDialog.vue'
  6403. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  6404. import wpdf from "../test/file/wPdf2.vue";
  6405. import wOffice from "../test/file/wOffice.vue";
  6406. var OpenCC = require("opencc-js");
  6407. let converter = OpenCC.Converter({
  6408. from:'hk',
  6409. to:'cn'
  6410. })
  6411. export default {
  6412. components: {
  6413. EditorBar,
  6414. Mind,
  6415. Time,
  6416. Sunburst,
  6417. SeeBoard,
  6418. Table,
  6419. sourceDialog,
  6420. interVideo,
  6421. englishRight,
  6422. evaBox,
  6423. EnglishVoice,
  6424. aiBox,
  6425. aiDialog,
  6426. aiTips,
  6427. tipsDialog,
  6428. aiCreateDialog,
  6429. aiCreateVideoDialog,
  6430. wpdf,
  6431. wOffice,
  6432. },
  6433. data() {
  6434. return {
  6435. checkAll: false,
  6436. checkAll2: false,
  6437. chooseType: 1,
  6438. checkedCities: [],
  6439. isIndeterminate: true,
  6440. isIndeterminate2: true,
  6441. isSysPic: false,
  6442. isSysPic2: false,
  6443. steps: 1,
  6444. stepsNav: 1,
  6445. nbOrder: 0,
  6446. courseId: "",
  6447. chapToolsType: 0,
  6448. chapTools: [
  6449. {
  6450. tools: [],
  6451. toolDetail: "",
  6452. },
  6453. ],
  6454. line: "",
  6455. lineTitle: "",
  6456. sysPic: [],
  6457. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  6458. sentenceList2: [],
  6459. isPushTitleList: [],
  6460. lineCount: 0,
  6461. lineType: 0,
  6462. chapCount: 0,
  6463. courseName: "",
  6464. isTeacherSee: false,
  6465. courseText: "",
  6466. textLoading: false,
  6467. ttextLoading: false,
  6468. courseText2: "",
  6469. preTime: 0,
  6470. formLabelWidth: "100px",
  6471. choosePicVisible: false,
  6472. sysPicVisible: false,
  6473. sysPicVisible2: false,
  6474. uploadLoading1: false,
  6475. noneBtnImg: false,
  6476. updateBoolean2: false,
  6477. unitIndex: 0,
  6478. taskCount: 0,
  6479. dialogVisible: false,
  6480. dialogVisible1: false,
  6481. dialogVisible2: false,
  6482. dialogVisible3: false,
  6483. dialogVisible4: false,
  6484. dialogVisible5: false,
  6485. dialogVisible6: false,
  6486. dialogVisible7: false,
  6487. dialogVisible8: false,
  6488. dialogVisible9: false,
  6489. dialogVisibleClass: false,
  6490. dialogVisibleMember: false,
  6491. dialogVisibleMp3: false,
  6492. dialogVisibleSelect: false,
  6493. dialogVisibleSentence: false,
  6494. dialogVisibleRate: false,
  6495. dialogVisibleChoice: false,
  6496. dialogVisiblemb: false,
  6497. dialogVisibleInvite: false,
  6498. dialogVisibleSource: false,
  6499. dialogVisibleVideo: false,
  6500. dialogVisibleStageChange: false,
  6501. dialogVisibleupdataVideoT: false,
  6502. englishDialogVisible: false,
  6503. templateDialog: false,
  6504. ctJson: {},
  6505. isClickColor: 1,
  6506. toolIndexType: "",
  6507. publicTool: 0,
  6508. searchPeople: "",
  6509. searchTN: "",
  6510. collid: '',
  6511. CollLoading: false,
  6512. userid: this.$route.query.userid,
  6513. oid: this.$route.query.oid,
  6514. org: this.$route.query.org,
  6515. role: this.$route.query.role,
  6516. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  6517. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  6518. dialogVisibleTable: false,
  6519. dialogVisibleWord: false,
  6520. tableJson: { text: "" },
  6521. wordJson: { text: "" },
  6522. dialogVisibleMoreUpload: false,
  6523. dialogVisiblePreTime: false,
  6524. uploadJson: [],
  6525. classJuri: [],
  6526. gradeList: [],
  6527. cover: [], //课程封面
  6528. myWord: [],
  6529. evaJuri: [],
  6530. evalua: "",
  6531. targetArray: [],
  6532. eTitle: "",
  6533. eJson: {},
  6534. fid: "", //一级
  6535. sid: "", //二级
  6536. tid: "", //二级
  6537. typeMode: 3,
  6538. eJSONNum: 0,
  6539. data: {
  6540. meta: {
  6541. name: "example",
  6542. author: "dd@163.com",
  6543. version: "0.2",
  6544. },
  6545. format: "node_array",
  6546. data: [{ id: "root", isroot: true, topic: "" }],
  6547. },
  6548. askJson: {
  6549. askCount: 1,
  6550. askTitle: "",
  6551. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6552. },
  6553. askJson2: {},
  6554. testJson: {},
  6555. testJson2: {},
  6556. selectJson: {},
  6557. selectJson2: {},
  6558. rateJson: [],
  6559. unitJson2: [],
  6560. unitJson3: [],
  6561. unitJson: [
  6562. {
  6563. dyName: "", //单元标题
  6564. chapterInfo: [
  6565. {
  6566. isread: false,
  6567. chapterid: this.guid(),
  6568. title: "",
  6569. courseName: "",
  6570. taskJson: [
  6571. {
  6572. task: "",
  6573. taskDetail: "",
  6574. chapterData: [],
  6575. toolText: "",
  6576. toolChoose: [
  6577. {
  6578. tool: [],
  6579. toolDetail: "",
  6580. toolType: 0,
  6581. askCount: 1,
  6582. askTitle: "",
  6583. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6584. },
  6585. ],
  6586. isShowTools: false,
  6587. askCount: 1,
  6588. isFold: 1,
  6589. askTitle: "",
  6590. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6591. checkJson: [{ checkCount: [], checkPerent: [] }],
  6592. homeworkList: [],
  6593. },
  6594. ],
  6595. itemCount: 1,
  6596. fileList1: [],
  6597. video: [],
  6598. testData: [],
  6599. pData: [],
  6600. templateArray: [],
  6601. },
  6602. ],
  6603. },
  6604. ],
  6605. templateArray: [],
  6606. studentJuri: [],
  6607. teacherJuri: [],
  6608. CollaborativeTeaList: [],
  6609. checkboxList: [],
  6610. checkboxList2: [],
  6611. checkboxList3: [],
  6612. classSearch: "",
  6613. gradeId: "",
  6614. number: "",
  6615. tTitle: "",
  6616. tdetail: "",
  6617. templateC: {},
  6618. AttText: {},
  6619. AttTextType: 0,
  6620. AttTextIndex: 0,
  6621. cTemplate: "",
  6622. CourseType: [],
  6623. CourseType1: [],
  6624. CourseType2: [],
  6625. CourseTypeJson: {},
  6626. CourseTypeJson1: {},
  6627. courseTypeId: [],
  6628. courseTypeId1: [],
  6629. courseTypeSon: [],
  6630. clearArray: [],
  6631. pTypeCheck: [],
  6632. pTypeCheckName: [],
  6633. loading: false,
  6634. toolType: 0,
  6635. inputShow: true,
  6636. inputShow2: true,
  6637. toolIndex: 0,
  6638. cidType: 0,
  6639. answerQ: "",
  6640. answerQ2: "",
  6641. grade: [],
  6642. grade2: [],
  6643. courseUserid: "",
  6644. timer: null,
  6645. timer2: null,
  6646. pasteTimer: null,
  6647. checkId: "",
  6648. isDelete: 1,
  6649. addindex: 0,
  6650. selectSteps: 1,
  6651. groupJson: {},
  6652. dialogVisibleGroup: false,
  6653. rightBoxHeight: 0,
  6654. ManAarray: [],
  6655. checkBoolean: false,
  6656. inviteCode: [],
  6657. inviteId: "",
  6658. icode: "",
  6659. easyArray: [2, 4],
  6660. sourceData: {},
  6661. updateSourcePan: false,
  6662. videoJson: {},
  6663. isBtnDisplay: false,
  6664. isStepDisplay: false,
  6665. isPasteStage: false,
  6666. isPasteTask: false,
  6667. isPasteChoice: false,
  6668. imageList: [],
  6669. imageloading: false,
  6670. imageloading2: false,
  6671. searchImageValue: "",
  6672. ppage: 1,
  6673. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  6674. oldIndex: 0,
  6675. dragType: "",
  6676. oldUnitIndex: 0,
  6677. oldData: null,
  6678. newIndex: "",
  6679. englishList: {},
  6680. typeIndex: "",
  6681. courseState: 5,
  6682. taskJSONa: [
  6683. {
  6684. task: "",
  6685. taskDetail: "",
  6686. chapterData: [],
  6687. toolText: "",
  6688. toolChoose: [
  6689. {
  6690. tool: [],
  6691. toolDetail: "",
  6692. toolType: 0,
  6693. askCount: 1,
  6694. askTitle: "",
  6695. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6696. },
  6697. ],
  6698. isShowTools: false,
  6699. askCount: 1,
  6700. isFold: 1,
  6701. askTitle: "",
  6702. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  6703. checkJson: [{ checkCount: [], checkPerent: [] }],
  6704. homeworkList: [],
  6705. },
  6706. ],
  6707. checkUnitIndex: 0,
  6708. isdrag: "",
  6709. evaIndex: "",
  6710. evatIndex: "",
  6711. evaBoxDialog: false,
  6712. EnglishVoiceDialog: false,
  6713. englishVoiceJson: {},
  6714. cetIndex: "",
  6715. cettIndex: "",
  6716. cetBoxDialog: false,
  6717. templateName: "",
  6718. setTypeJson: {
  6719. one: "",
  6720. two: "",
  6721. },
  6722. twoJson: [],
  6723. oneJson: [],
  6724. updateKey: 1,
  6725. isOutline: false,
  6726. isOutline2: false,
  6727. infoData: [],
  6728. infoproVisible: false,
  6729. infoisFinishSize: 0,
  6730. infoisAllSize: 0,
  6731. infoprogress: 0,
  6732. taskDetailLoading: [],
  6733. ttaskDetailLoading: [],
  6734. taskDetailLoading2: [],
  6735. ttaskDetailLoading2: [],
  6736. taskDetailLoading3: [],
  6737. ttaskDetailLoading3: [],
  6738. taskDetailLoading4: [],
  6739. taskDetailLoading5: [],
  6740. ttaskDetailLoading5: [],
  6741. dArray: [],
  6742. dialogVisibleAiD: false,
  6743. aitype: "",
  6744. aiJson: {
  6745. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  6746. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  6747. "aiTask": "请根据<教学任务教案>。",
  6748. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  6749. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  6750. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  6751. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  6752. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  6753. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  6754. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  6755. },
  6756. aiText: "",
  6757. aiText2: "",
  6758. aiCallBack: "",
  6759. aiIndex: "",
  6760. clickType: 1,
  6761. promptShow: false,
  6762. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  6763. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  6764. dialogVisibleTips: false,
  6765. tipsJson: {},
  6766. cpote:{
  6767. cpote1: '',
  6768. cpote2: '',
  6769. cpote3: '',
  6770. cpote4: '',
  6771. },
  6772. cpoteLoading:{
  6773. cpote1: false,
  6774. cpote2: false,
  6775. cpote3: false,
  6776. cpote4: false,
  6777. },
  6778. cpotetLoading:{
  6779. cpote1: false,
  6780. cpote2: false,
  6781. cpote3: false,
  6782. cpote4: false,
  6783. },
  6784. cpoteType: 0,
  6785. dialogVisibleAiCreate: false,
  6786. dialogVisibleAiCreateVideo: false,
  6787. teacherText: [],
  6788. isFileSearch: true,
  6789. fileIds: ['file-A81p1q02HHpJhus4nYYwtAmM'],
  6790. templatePan: ['0e7966d6-1e49-11ef-bee5-005056b86db5','60d153e3-1e49-11ef-bee5-005056b86db5','7f3e28b7-1e66-11ef-bee5-005056b86db5','9dd4bb76-1e48-11ef-bee5-005056b86db5','ab317f23-1e66-11ef-bee5-005056b86db5'],
  6791. courseJie:1,
  6792. courseTime:45,
  6793. allTextArray: [],
  6794. dialogVisiblePdf: false,
  6795. dialogVisibleOffice: false,
  6796. wurl: "",
  6797. choiceLoading: false,
  6798. teacherInfoData: [],
  6799. teacherinfoproVisible: false,
  6800. teacherinfoisFinishSize: 0,
  6801. teacherinfoisAllSize: 0,
  6802. teacherinfoprogress: 0,
  6803. teacherCourseText: "",
  6804. teacherTextLoading: false,
  6805. tteacherTextLoading: false,
  6806. targetCourseText: "",
  6807. targetTextLoading: false,
  6808. ttargetTextLoading: false,
  6809. cankaoInfoData: [],
  6810. fileSLoading: false,
  6811. infoData2: [],
  6812. isuseT: false,
  6813. mode: 1,
  6814. targetCourseText2: "",
  6815. targetTextLoading2: false,
  6816. ttargetTextLoading2: false,
  6817. courseTextBool: false,
  6818. teacherCourseTextB: true,
  6819. targetCourseTextB: true,
  6820. courseTextB: true,
  6821. targetCourseText2B: true,
  6822. // yiKeTemplateArray:['cf5722a4-401b-11ef-b873-005056b86db5','cf5722a4-401b-11ef-b873-005056b86dc4','cf5722a4-401b-11ef-b873-005056b86dc3','cf5722a4-401b-11ef-b873-005056b86dc5','9dd4bb76-1e48-11ef-bee5-005056b86dc4'],
  6823. yiKeTemplateArray:[],
  6824. taskLoading: [],
  6825. ruleLoading: [],
  6826. };
  6827. },
  6828. directives: {
  6829. autoHeight: {
  6830. update(el, binding) {
  6831. const { value } = binding;
  6832. if (value && typeof value === "number") {
  6833. el.style.height = `${value}px`;
  6834. } else {
  6835. el.style.height = "auto";
  6836. }
  6837. },
  6838. componentUpdated(el) {
  6839. el.style.height = `${el.scrollHeight + 25}px`;
  6840. },
  6841. },
  6842. },
  6843. computed: {
  6844. // rightBoxHeight: function () {
  6845. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  6846. // },
  6847. offsetLetfPx: function () {
  6848. //addnum可以直接在模板语法里面用,相当于data内的值
  6849. return (
  6850. $(".cru_select")[this.unitIndex] &&
  6851. $(".cru_select")[this.unitIndex].offsetLeft + 5
  6852. );
  6853. },
  6854. getMan2() {
  6855. return function (people) {
  6856. let _people = people;
  6857. let _people2 = "";
  6858. if (this.ManAarray.length) {
  6859. for (var i = 0; i < this.ManAarray.length; i++) {
  6860. if (this.ManAarray[i].userid == people) {
  6861. _people2 = this.ManAarray[i].name;
  6862. break;
  6863. }
  6864. }
  6865. }
  6866. if (people == this.courseUserid) {
  6867. return "";
  6868. }
  6869. return this.ManAarray.length ? _people2 : "";
  6870. };
  6871. },
  6872. getListMan2() {
  6873. return function (list) {
  6874. let _people2 = [];
  6875. if (this.ManAarray.length) {
  6876. for (var j = 0; j < list.length; j++) {
  6877. let people = list[j];
  6878. for (var i = 0; i < this.ManAarray.length; i++) {
  6879. if (
  6880. this.ManAarray[i].userid == people &&
  6881. people != this.courseUserid
  6882. ) {
  6883. _people2.push(this.ManAarray[i].name);
  6884. break;
  6885. }
  6886. }
  6887. }
  6888. }
  6889. return this.ManAarray.length ? _people2.join("、") : "";
  6890. };
  6891. },
  6892. isInvite() {
  6893. return function (cid) {
  6894. let array = [];
  6895. for (var i = 0; i < this.inviteCode.length; i++) {
  6896. array.push(this.inviteCode[i].cid);
  6897. }
  6898. return array.indexOf(cid) != -1;
  6899. };
  6900. },
  6901. getInviteCodeC() {
  6902. return function (cid) {
  6903. let array = [];
  6904. for (var i = 0; i < this.inviteCode.length; i++) {
  6905. array.push(this.inviteCode[i].cid);
  6906. }
  6907. return this.inviteCode[array.indexOf(cid)].ic;
  6908. };
  6909. },
  6910. getClassC() {
  6911. return function (c) {
  6912. let _c2 = "";
  6913. if (this.grade.length) {
  6914. for (var i = 0; i < this.grade.length; i++) {
  6915. if (this.grade[i].id == c) {
  6916. _c2 = this.grade[i].name;
  6917. break;
  6918. }
  6919. }
  6920. }
  6921. return this.grade.length ? _c2 : "";
  6922. };
  6923. },
  6924. getListClassC() {
  6925. return function (list) {
  6926. let _c2 = [];
  6927. if (this.grade.length) {
  6928. for (var j = 0; j < list.length; j++) {
  6929. let c = list[j];
  6930. for (var i = 0; i < this.grade.length; i++) {
  6931. if (this.grade[i].id == c) {
  6932. _c2.push(this.grade[i].name);
  6933. break;
  6934. }
  6935. }
  6936. }
  6937. }
  6938. return this.grade.length ? _c2.join("、") : "";
  6939. };
  6940. },
  6941. MarkdownT() {
  6942. return function (c) {
  6943. let md = new MarkdownIt();
  6944. return c
  6945. ? md.render(c) : "";
  6946. };
  6947. },
  6948. panOutline(){
  6949. return function () {
  6950. let count = 0;
  6951. for(var i = 0; i < this.unitJson.length; i++){
  6952. let _task = this.unitJson[i].chapterInfo[0].taskJson
  6953. for(var j = 0; j < _task.length; j++){
  6954. if(_task[j].taskDetail2){
  6955. count++
  6956. }
  6957. }
  6958. }
  6959. return count;
  6960. };
  6961. },
  6962. panTeacher(){
  6963. return function () {
  6964. let count = 0;
  6965. for(var i = 0; i < this.unitJson.length; i++){
  6966. let _task = this.unitJson[i].chapterInfo[0].taskJson
  6967. for(var j = 0; j < _task.length; j++){
  6968. if(_task[j].taskDetail3){
  6969. count++
  6970. }
  6971. }
  6972. }
  6973. return count;
  6974. };
  6975. },
  6976. dataCheckPan(){
  6977. return function (fileid) {
  6978. for(let i = 0; i < this.infoData.length; i++){
  6979. if(this.infoData[i].fileid == fileid){
  6980. return true
  6981. }
  6982. }
  6983. return false;
  6984. };
  6985. }
  6986. },
  6987. watch: {
  6988. unitIndex(newValue, oldValue) {
  6989. // return;
  6990. if (this.isDelete == 2) {
  6991. this.isDelete = 1;
  6992. return;
  6993. }
  6994. if (this.cid != "") {
  6995. let _unitIndex = oldValue;
  6996. if (
  6997. JSON.stringify(this.unitJson2[_unitIndex]) ==
  6998. JSON.stringify(this.unitJson[_unitIndex])
  6999. ) {
  7000. this.$refs.rightboxR.scrollTop = 0;
  7001. return;
  7002. }
  7003. let cPan = 1;
  7004. for (
  7005. var j = 0;
  7006. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7007. j++
  7008. ) {
  7009. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7010. j
  7011. ].proVisible = false;
  7012. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7013. j
  7014. ].proVisible2 = false;
  7015. if (
  7016. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7017. .length > 1
  7018. ) {
  7019. for (
  7020. var z = 0;
  7021. z <
  7022. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7023. .length;
  7024. z++
  7025. ) {
  7026. if (
  7027. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7028. .toolChoose[z].tool.length
  7029. ) {
  7030. this.$message.error("请把工具添加完整");
  7031. cPan = 2;
  7032. break;
  7033. }
  7034. }
  7035. }
  7036. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7037. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7038. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7039. (ele) => {
  7040. return ele.value != "";
  7041. }
  7042. );
  7043. }
  7044. }
  7045. if (cPan == 2) {
  7046. this.unitIndex = oldValue;
  7047. return;
  7048. }
  7049. for (var i = 0; i < this.unitJson.length; i++) {
  7050. if (this.addindex != i) {
  7051. delete this.unitJson[i].isUpdate;
  7052. }
  7053. }
  7054. this.$refs.rightboxR.scrollTop = 0;
  7055. this.addindex = -1;
  7056. let params = [
  7057. {
  7058. cid: this.cid,
  7059. chapters: JSON.stringify(this.unitJson),
  7060. uid: this.userid,
  7061. unitIndex: _unitIndex,
  7062. },
  7063. ];
  7064. this.ajax
  7065. .post(this.$store.state.api + "updateWorkNew4", params)
  7066. .then((res) => {
  7067. // this.$message({
  7068. // message: "修改成功",
  7069. // type: "success",
  7070. // });
  7071. // this.courseId = this.cid;
  7072. this.addtips()
  7073. })
  7074. .catch((err) => {
  7075. this.$message.error("网络不佳");
  7076. console.error(err);
  7077. });
  7078. }
  7079. },
  7080. steps(newValue, old) {
  7081. if (newValue == 4) {
  7082. let cPan = 1;
  7083. for (var i = 0; i < this.unitJson.length; i++) {
  7084. for (
  7085. var j = 0;
  7086. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7087. j++
  7088. ) {
  7089. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7090. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7091. if (
  7092. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7093. ) {
  7094. for (
  7095. var z = 0;
  7096. z <
  7097. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7098. z++
  7099. ) {
  7100. if (
  7101. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7102. .tool.length
  7103. ) {
  7104. this.$message.error("请把工具添加完整");
  7105. cPan = 2;
  7106. break;
  7107. }
  7108. }
  7109. }
  7110. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7111. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7112. i
  7113. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7114. return ele.value != "";
  7115. });
  7116. }
  7117. }
  7118. }
  7119. this.inputShow = true;
  7120. if (cPan == 2) {
  7121. this.steps = old;
  7122. return;
  7123. }
  7124. this.goTo(
  7125. "/course?userid=" +
  7126. this.userid +
  7127. "&oid=" +
  7128. this.oid +
  7129. "&org=" +
  7130. this.org +
  7131. "&role=" +
  7132. this.role
  7133. );
  7134. }
  7135. },
  7136. },
  7137. methods: {
  7138. tableRowClassName({ row, rowIndex }) {
  7139. if ((rowIndex + 1) % 2 === 0) {
  7140. return "even_row";
  7141. } else {
  7142. return "";
  7143. }
  7144. },
  7145. close() {
  7146. this.cetIndex = "";
  7147. this.cettIndex = "";
  7148. this.templateName = "";
  7149. this.cetBoxDialog = false;
  7150. },
  7151. openAI() {
  7152. top.postMessage({ tools: "64" }, "*");
  7153. },
  7154. setMan() {
  7155. // let teacherJuri = this.teacherJuri2;
  7156. this.ManAarray = [];
  7157. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7158. if (_user.indexOf(this.userid) == -1) {
  7159. _user.push(this.userid);
  7160. }
  7161. if (_user.indexOf(this.courseUserid) == -1) {
  7162. _user.push(this.courseUserid);
  7163. }
  7164. let params = {
  7165. uid: _user.join(","),
  7166. };
  7167. this.ajax
  7168. .get(this.$store.state.api + "getAllUserById", params)
  7169. .then((res) => {
  7170. let teacherJuri = res.data[0];
  7171. this.ManAarray = teacherJuri;
  7172. })
  7173. .catch((err) => {
  7174. console.error(err);
  7175. });
  7176. },
  7177. previewImg(url) {
  7178. this.$hevueImgPreview(url);
  7179. },
  7180. btnDisplay(bool) {
  7181. this.isBtnDisplay = bool;
  7182. },
  7183. stepDisplay(bool) {
  7184. this.isStepDisplay = bool;
  7185. },
  7186. scrollChange() {
  7187. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  7188. },
  7189. addHw(e) {
  7190. var el = e.currentTarget;
  7191. el.getElementsByTagName("input")[0].click();
  7192. },
  7193. change(val) {
  7194. if (this.dialogVisible1) {
  7195. this.tdetail = val;
  7196. } else if (this.dialogVisible6) {
  7197. this.AttText.text = val;
  7198. } else if (this.dialogVisible2) {
  7199. this.cTemplate = val;
  7200. } else if (this.dialogVisibleTable) {
  7201. this.tableJson.text = val;
  7202. }
  7203. this.$forceUpdate();
  7204. console.log(val);
  7205. },
  7206. change2(val) {
  7207. console.log(val);
  7208. this.$forceUpdate();
  7209. },
  7210. handleClose(done) {
  7211. done();
  7212. },
  7213. closePan(tool) {
  7214. if (tool == 15) {
  7215. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  7216. this.dialogVisible8 = false;
  7217. } else {
  7218. this.closeConfirm(tool);
  7219. }
  7220. } else if (tool == 4) {
  7221. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  7222. this.dialogVisible5 = false;
  7223. } else {
  7224. this.closeConfirm(tool);
  7225. }
  7226. } else if (tool == 45) {
  7227. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  7228. this.dialogVisibleChoice = false;
  7229. } else {
  7230. this.closeConfirm(tool);
  7231. }
  7232. } else if (tool == 41) {
  7233. if (
  7234. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  7235. ) {
  7236. this.dialogVisibleSelect = false;
  7237. } else {
  7238. this.closeConfirm(tool);
  7239. }
  7240. } else if (tool == 47) {
  7241. if (
  7242. JSON.stringify(this.sentenceList) ==
  7243. JSON.stringify(this.sentenceList2)
  7244. ) {
  7245. this.dialogVisibleSentence = false;
  7246. } else {
  7247. this.closeConfirm(tool);
  7248. }
  7249. } else if (tool == 69) {
  7250. if (
  7251. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  7252. ) {
  7253. this.englishDialogVisible = false;
  7254. } else {
  7255. this.closeConfirm(tool);
  7256. }
  7257. }
  7258. },
  7259. closeConfirm(tool) {
  7260. this.$confirm("是否保存已编辑内容?", "提示", {
  7261. confirmButtonText: "保存",
  7262. cancelButtonText: "不保存",
  7263. type: "warning",
  7264. })
  7265. .then(() => {
  7266. if (tool == 15) {
  7267. this.addAnswer();
  7268. } else if (tool == 4) {
  7269. this.addAsk();
  7270. } else if (tool == 45) {
  7271. this.addTest();
  7272. } else if (tool == 41) {
  7273. this.addSelectAnswer();
  7274. } else if (tool == 47) {
  7275. this.addSentenceTool();
  7276. } else if (tool == 69) {
  7277. this.addEnglish();
  7278. }
  7279. })
  7280. .catch(() => {
  7281. if (tool == 15) {
  7282. this.dialogVisible8 = false;
  7283. } else if (tool == 4) {
  7284. this.dialogVisible5 = false;
  7285. } else if (tool == 45) {
  7286. this.dialogVisibleChoice = false;
  7287. } else if (tool == 41) {
  7288. this.dialogVisibleSelect = false;
  7289. } else if (tool == 47) {
  7290. this.dialogVisibleSentence = false;
  7291. } else if (tool == 69) {
  7292. this.englishDialogVisible = false;
  7293. }
  7294. });
  7295. },
  7296. addEnglish(jsonType) {
  7297. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  7298. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  7299. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  7300. if (
  7301. this.englishList.engTitle == "" ||
  7302. this.englishList.englishText == ""
  7303. ) {
  7304. this.$message.error("请将内容填写完整!");
  7305. return;
  7306. }
  7307. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7308. this.taskCount
  7309. ].toolChoose[this.toolIndex].englishList = this.englishList;
  7310. this.englishList = {};
  7311. if (jsonType && jsonType == 1) {
  7312. this.englishDialogVisible = true;
  7313. } else {
  7314. this.englishDialogVisible = false;
  7315. }
  7316. if (
  7317. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  7318. .toolChoose[this.toolIndex].tool != 69
  7319. ) {
  7320. this.addTools(69, this.taskCount, this.toolIndex);
  7321. }
  7322. },
  7323. imgChange2(i, j) {
  7324. var _tmp = this.testJson.testJson[i].checkList[j];
  7325. this.noneBtnImg = _tmp.length >= 1;
  7326. },
  7327. imgChange3(i) {
  7328. var _tmp = this.testJson.testJson[i];
  7329. this.noneBtnImg = _tmp.length >= 1;
  7330. },
  7331. imgChange1(file, fileList, type, itemTaskIndex) {
  7332. if (type == 1) {
  7333. var _tmp = this.cover;
  7334. } else if (
  7335. type == 2 ||
  7336. type == 3 ||
  7337. type == 6 ||
  7338. type == 7 ||
  7339. type == 8
  7340. ) {
  7341. var _tmp =
  7342. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7343. .chapterData;
  7344. } else if (type == 4) {
  7345. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  7346. } else {
  7347. var _tmp =
  7348. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7349. .homeworkList;
  7350. }
  7351. this.noneBtnImg = _tmp.length >= 1;
  7352. },
  7353. goTo(path) {
  7354. this.$router.push(path);
  7355. },
  7356. guid() {
  7357. var _num,
  7358. i,
  7359. _guid = "";
  7360. for (i = 0; i < 32; i++) {
  7361. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  7362. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  7363. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  7364. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  7365. _guid += "-";
  7366. }
  7367. }
  7368. return _guid;
  7369. },
  7370. retrunCourse() {
  7371. if(this.istemplate == 1){
  7372. this.goTo(
  7373. "/course?userid=" +
  7374. this.userid +
  7375. "&oid=" +
  7376. this.oid +
  7377. "&org=" +
  7378. this.org +
  7379. "&role=" +
  7380. this.role
  7381. );
  7382. return
  7383. }
  7384. this.$confirm("是否保存已编辑内容?", "提示", {
  7385. confirmButtonText: "保存",
  7386. cancelButtonText: "不保存",
  7387. distinguishCancelAndClose: true,
  7388. type: "warning",
  7389. })
  7390. .then(() => {
  7391. if (this.taskLoading.length) {
  7392. let _pan = 1
  7393. for(var k = 0; k < this.taskLoading.length; k++){
  7394. if(this.taskLoading[k]){
  7395. this.$message({
  7396. message: `请等待任务${k+1}回答完毕后再保存`,
  7397. type: "warning"
  7398. });
  7399. _pan = 2
  7400. }
  7401. }
  7402. if(_pan == 2){
  7403. return
  7404. }
  7405. }
  7406. if (this.cid == "" || this.cid == undefined) {
  7407. if (this.courseName == "") {
  7408. this.$message.error("请补充填写课程名称");
  7409. return;
  7410. } else {
  7411. this.addWork();
  7412. }
  7413. this.steps = 4;
  7414. } else {
  7415. if (this.courseName == "") {
  7416. this.$message.error("请补充填写课程名称");
  7417. return;
  7418. } else {
  7419. if (this.userid != this.courseUserid && this.role != "1") {
  7420. this.updateWork2();
  7421. } else {
  7422. this.updateWork();
  7423. }
  7424. this.steps = 4;
  7425. }
  7426. }
  7427. })
  7428. .catch((v) => {
  7429. console.log(v);
  7430. if (v == "cancel") {
  7431. this.goTo(
  7432. "/course?userid=" +
  7433. this.userid +
  7434. "&oid=" +
  7435. this.oid +
  7436. "&org=" +
  7437. this.org +
  7438. "&role=" +
  7439. this.role
  7440. );
  7441. }
  7442. });
  7443. },
  7444. lastSteps() {
  7445. if (this.steps == 4) {
  7446. this.goTo(
  7447. "/course?userid=" +
  7448. this.userid +
  7449. "&oid=" +
  7450. this.oid +
  7451. "&org=" +
  7452. this.org +
  7453. "&role=" +
  7454. this.role
  7455. );
  7456. } else {
  7457. // if (this.cidType == 0) {
  7458. // this.steps--;
  7459. // if (this.steps == 1) {
  7460. // setTimeout(() => {
  7461. // this.checkEva(this.checkId);
  7462. // setTimeout(() => {
  7463. // this.checkEva(this.checkId);
  7464. // }, 100);
  7465. // }, 100);
  7466. // }
  7467. // } else {
  7468. if (this.steps == 3) {
  7469. this.steps = 1;
  7470. setTimeout(() => {
  7471. this.checkEva(this.checkId);
  7472. setTimeout(() => {
  7473. this.checkEva(this.checkId);
  7474. }, 100);
  7475. }, 100);
  7476. }
  7477. // }
  7478. }
  7479. },
  7480. navSteps(s) {
  7481. if (this.courseName == "") {
  7482. this.$message.error("请补充填写课程名称");
  7483. return;
  7484. }
  7485. if (this.cidType == 0) {
  7486. if (this.steps == 1) {
  7487. if (this.cid == "" || this.cid == undefined) {
  7488. this.addWork();
  7489. } else {
  7490. if (this.userid != this.courseUserid && this.role != "1") {
  7491. this.updateWork2();
  7492. } else {
  7493. this.updateWork();
  7494. }
  7495. }
  7496. }
  7497. if (s == 1) {
  7498. this.steps = 1;
  7499. setTimeout(() => {
  7500. this.checkEva(this.checkId);
  7501. setTimeout(() => {
  7502. this.checkEva(this.checkId);
  7503. }, 100);
  7504. }, 100);
  7505. }
  7506. if (s == 2) {
  7507. this.steps = 2;
  7508. }
  7509. if (s == 3) {
  7510. this.cTemplate = this.templateC.content;
  7511. this.dialogVisible2 = false;
  7512. this.steps = 3;
  7513. this.isClickColor = 1;
  7514. this.unitJson[
  7515. this.unitIndex
  7516. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7517. this.$forceUpdate();
  7518. setTimeout(() => {
  7519. this.checkEva(this.checkId);
  7520. setTimeout(() => {
  7521. this.checkEva(this.checkId);
  7522. }, 100);
  7523. }, 1000);
  7524. }
  7525. } else {
  7526. if (this.steps == 1) {
  7527. if (this.cid == "" || this.cid == undefined) {
  7528. this.addWork();
  7529. } else {
  7530. if (this.userid != this.courseUserid && this.role != "1") {
  7531. this.updateWork2();
  7532. } else {
  7533. this.updateWork();
  7534. }
  7535. }
  7536. }
  7537. if (s == 1) {
  7538. this.steps = 1;
  7539. setTimeout(() => {
  7540. this.checkEva(this.checkId);
  7541. setTimeout(() => {
  7542. this.checkEva(this.checkId);
  7543. }, 100);
  7544. }, 100);
  7545. }
  7546. if (s == 3) {
  7547. this.cTemplate = this.templateC.content;
  7548. this.dialogVisible2 = false;
  7549. this.steps = 3;
  7550. this.isClickColor = 1;
  7551. this.unitJson[
  7552. this.unitIndex
  7553. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7554. this.$forceUpdate();
  7555. setTimeout(() => {
  7556. this.checkEva(this.checkId);
  7557. setTimeout(() => {
  7558. this.checkEva(this.checkId);
  7559. }, 100);
  7560. }, 1000);
  7561. }
  7562. }
  7563. this.$refs.stepBox.scrollTop = 0;
  7564. },
  7565. nextSteps(clickType) {
  7566. // if (this.cidType == 1) {
  7567. if (this.steps == 1) {
  7568. if (this.courseName != "") {
  7569. if ((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1) || (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  7570. // this.$message({
  7571. // message: "请回答完毕后再次发送",
  7572. // type: "warning"
  7573. // });
  7574. if(this.ttaskDetailLoading5.length){
  7575. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  7576. this.$message({
  7577. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  7578. type: "warning"
  7579. });
  7580. }
  7581. if(this.ttaskDetailLoading.length){
  7582. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  7583. this.$message({
  7584. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  7585. type: "warning"
  7586. });
  7587. }
  7588. if(this.cpotetLoading.cpote1){
  7589. this.$message({
  7590. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  7591. type: "warning"
  7592. });
  7593. }
  7594. if(this.cpotetLoading.cpote2){
  7595. this.$message({
  7596. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  7597. type: "warning"
  7598. });
  7599. }
  7600. if(this.cpotetLoading.cpote3){
  7601. this.$message({
  7602. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  7603. type: "warning"
  7604. });
  7605. }
  7606. if(this.cpotetLoading.cpote4){
  7607. this.$message({
  7608. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  7609. type: "warning"
  7610. });
  7611. }
  7612. return;
  7613. }
  7614. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  7615. if(!this.courseText && !this.teacherCourseText){
  7616. this.$message.error("请生成简要描述后再生成大纲");
  7617. return;
  7618. }
  7619. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  7620. this.openAiDialog(clickType, 'aiOutline2')
  7621. }else {
  7622. this.openAiDialog(clickType, 'aiOutline')
  7623. }
  7624. return;
  7625. }
  7626. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  7627. let _type = ''
  7628. if(this.cpoteType == 0){
  7629. _type = 'aiCpote1'
  7630. }else if(this.cpoteType == 1){
  7631. _type = 'aiCpote2'
  7632. }else if(this.cpoteType == 2){
  7633. _type = 'aiCpote3'
  7634. }else if(this.cpoteType == 3){
  7635. _type = 'aiCpote4'
  7636. }
  7637. this.cpoteType++
  7638. this.openAiDialog(clickType, _type)
  7639. return;
  7640. }
  7641. // if (!this.isOutline2) {
  7642. // this.openAiDialog(clickType, 'aiTeacher')
  7643. // return;
  7644. // }
  7645. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  7646. this.openAiDialog(clickType, 'aiTeacher3')
  7647. return;
  7648. }
  7649. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  7650. this.openAiDialog(clickType, 'aiTeacher2')
  7651. return;
  7652. }
  7653. let _pan2 = 1
  7654. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  7655. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2){
  7656. _pan2 = 2
  7657. this.$message.error(`请完善任务${k+1}的课程大纲`)
  7658. break;
  7659. }
  7660. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  7661. _pan2 = 2
  7662. this.$message.error(`请完善任务${k+1}的课程教案`)
  7663. break;
  7664. }
  7665. }
  7666. if(_pan2 == 2){
  7667. return;
  7668. }
  7669. const functionA = () => {
  7670. setTimeout(() => {
  7671. this.loading = false
  7672. this.steps = 3;
  7673. }, 0)
  7674. this.isClickColor = 1;
  7675. this.unitJson[
  7676. this.unitIndex
  7677. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7678. this.$forceUpdate();
  7679. setTimeout(() => {
  7680. this.checkEva(this.checkId);
  7681. setTimeout(() => {
  7682. this.checkEva(this.checkId);
  7683. }, 100);
  7684. }, 1000);
  7685. if (this.cid == "" || this.cid == undefined) {
  7686. this.addWork();
  7687. } else {
  7688. if (this.userid != this.courseUserid && this.role != "1") {
  7689. this.updateWork2();
  7690. } else {
  7691. this.updateWork();
  7692. }
  7693. }
  7694. }
  7695. if (this.cid) {
  7696. this.loading = true
  7697. } else {
  7698. this.openAiDialog(clickType, "aiTask2", 'all')
  7699. }
  7700. functionA()
  7701. } else {
  7702. this.$message.error("请补充填写课程名称");
  7703. return;
  7704. }
  7705. } else if (this.steps == 3) {
  7706. if (this.taskLoading.length) {
  7707. let _pan = 1
  7708. for(var k = 0; k < this.taskLoading.length; k++){
  7709. if(this.taskLoading[k]){
  7710. this.$message({
  7711. message: `请等待任务${k+1}回答完毕后再上传`,
  7712. type: "warning"
  7713. });
  7714. _pan = 2
  7715. }
  7716. }
  7717. if(_pan == 2){
  7718. return
  7719. }
  7720. }
  7721. if (this.cid == "" || this.cid == undefined) {
  7722. if (this.courseName == "") {
  7723. this.$message.error("请补充填写课程名称");
  7724. return;
  7725. } else {
  7726. this.addWork();
  7727. this.steps++;
  7728. }
  7729. } else {
  7730. if (this.courseName == "") {
  7731. this.$message.error("请补充填写课程名称");
  7732. return;
  7733. } else {
  7734. if (this.userid != this.courseUserid && this.role != "1") {
  7735. this.updateWork2();
  7736. } else {
  7737. this.updateWork();
  7738. }
  7739. this.steps++;
  7740. }
  7741. }
  7742. }
  7743. // } else {
  7744. // if (this.steps == 1) {
  7745. // if (this.courseName != "") {
  7746. // if (this.cid == "" || this.cid == undefined) {
  7747. // this.addWork();
  7748. // } else {
  7749. // if (this.userid != this.courseUserid && this.role != "1") {
  7750. // // this.updateWork2();
  7751. // } else {
  7752. // this.updateWork();
  7753. // }
  7754. // }
  7755. // this.steps++;
  7756. // } else {
  7757. // this.$message.error("请补充填写课程名称");
  7758. // return;
  7759. // }
  7760. // } else if (this.steps == 2) {
  7761. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  7762. // this.cTemplate = this.templateC.content;
  7763. // }
  7764. // this.dialogVisible2 = false;
  7765. // this.steps++;
  7766. // setTimeout(() => {
  7767. // this.checkEva(this.checkId);
  7768. // setTimeout(() => {
  7769. // this.checkEva(this.checkId);
  7770. // }, 100);
  7771. // }, 1000);
  7772. // } else if (this.steps == 3) {
  7773. // if (this.cid == "" || this.cid == undefined) {
  7774. // if (this.courseName == "") {
  7775. // this.$message.error("请补充填写课程名称");
  7776. // return;
  7777. // } else {
  7778. // this.addWork();
  7779. // this.steps++;
  7780. // }
  7781. // } else {
  7782. // if (this.courseName == "") {
  7783. // this.$message.error("请补充填写课程名称");
  7784. // return;
  7785. // } else {
  7786. // if (this.userid != this.courseUserid && this.role != "1") {
  7787. // this.updateWork2();
  7788. // } else {
  7789. // this.updateWork();
  7790. // }
  7791. // this.steps++;
  7792. // }
  7793. // }
  7794. // }
  7795. // }
  7796. this.$refs.stepBox.scrollTop = 0;
  7797. },
  7798. unitSet(i) {
  7799. if (this.unitIndex == i) {
  7800. return;
  7801. }
  7802. this.unitIndex = i;
  7803. this.isClickColor = 1;
  7804. // this.$refs.rightboxR.scrollTop = 0;
  7805. this.$refs.unitBox.scrollTop = 0;
  7806. },
  7807. panUnitJson() {
  7808. let _unitIndex = this.unitIndex;
  7809. let cPan = 1;
  7810. for (
  7811. var j = 0;
  7812. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7813. j++
  7814. ) {
  7815. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  7816. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7817. j
  7818. ].proVisible2 = false;
  7819. if (
  7820. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7821. .length > 1
  7822. ) {
  7823. for (
  7824. var z = 0;
  7825. z <
  7826. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7827. .length;
  7828. z++
  7829. ) {
  7830. if (
  7831. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  7832. z
  7833. ].tool.length
  7834. ) {
  7835. this.$message.error("请把工具添加完整");
  7836. cPan = 2;
  7837. break;
  7838. }
  7839. }
  7840. }
  7841. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7842. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7843. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7844. (ele) => {
  7845. return ele.value != "";
  7846. }
  7847. );
  7848. }
  7849. }
  7850. return cPan;
  7851. },
  7852. unitOpen(i) {
  7853. if (this.unitJson[i].toolOpen) {
  7854. this.unitJson[i].toolOpen = false;
  7855. } else {
  7856. this.unitJson[i].toolOpen = true;
  7857. }
  7858. this.updateWork();
  7859. this.$forceUpdate();
  7860. },
  7861. unitSet2(i) {
  7862. if (this.panUnitJson() == 2) {
  7863. return;
  7864. }
  7865. // if(this.unitJson[i].toolOpen){
  7866. // this.unitJson[i].toolOpen = false
  7867. // this.updateWork()
  7868. // this.$forceUpdate()
  7869. // return
  7870. // }else {
  7871. this.unitJson[i].toolOpen = true;
  7872. // }
  7873. this.$forceUpdate();
  7874. if (this.unitIndex == i) {
  7875. return;
  7876. }
  7877. this.unitIndex = i;
  7878. this.isClickColor = 1;
  7879. // this.$refs.rightboxR.scrollTop = 0;
  7880. this.$refs.unitBox.scrollTop = 0;
  7881. },
  7882. updateCourseState(i) {
  7883. let params = [
  7884. {
  7885. cid: this.cid,
  7886. state: i,
  7887. },
  7888. ];
  7889. this.ajax
  7890. .post(this.$store.state.api + "updateCourseMode", params)
  7891. .then((res) => {
  7892. this.courseState = i;
  7893. })
  7894. .catch((err) => {
  7895. this.$message.error("网络不佳");
  7896. console.error(err);
  7897. });
  7898. },
  7899. addtips(){
  7900. let params = [
  7901. {
  7902. cid: this.cid,
  7903. tips: JSON.stringify(this.aiJson),
  7904. tid: this.templateid
  7905. },
  7906. ];
  7907. this.ajax
  7908. .post(this.$store.state.api + "addTips", params)
  7909. .then((res) => {
  7910. })
  7911. .catch((err) => {
  7912. this.$message.error("网络不佳");
  7913. console.error(err);
  7914. });
  7915. },
  7916. openSaveTips(){
  7917. this.dialogVisibleTips = true
  7918. },
  7919. time() {
  7920. if (!this.now) {
  7921. this.now = new Date().getTime();
  7922. return true;
  7923. } else {
  7924. let time = new Date().getTime();
  7925. if (time - this.now > 3000) {
  7926. this.now = time;
  7927. return true;
  7928. } else {
  7929. return false;
  7930. }
  7931. }
  7932. },
  7933. deleteUnit(i) {
  7934. var _this = this;
  7935. if (i == 0 && _this.unitJson.length == 1) {
  7936. _this
  7937. .$confirm("确定切换成任务模式吗?", "提示", {
  7938. confirmButtonText: "确定",
  7939. cancelButtonText: "取消",
  7940. type: "warning",
  7941. })
  7942. .then(() => {
  7943. _this.unitJson[i].dyName = "";
  7944. // _this.updateCourseState(2);
  7945. })
  7946. .catch(() => {
  7947. return;
  7948. });
  7949. } else {
  7950. _this
  7951. .$confirm("确定删除此阶段吗?", "提示", {
  7952. confirmButtonText: "确定",
  7953. cancelButtonText: "取消",
  7954. type: "warning",
  7955. })
  7956. .then(() => {
  7957. _this.isDelete = 2;
  7958. // _this.unitIndex = _this.unitIndex - 1;
  7959. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  7960. // _this.$message.success("删除成功");
  7961. })
  7962. .catch(() => {
  7963. return;
  7964. });
  7965. }
  7966. },
  7967. deleteWork(chapid) {
  7968. let params = [
  7969. {
  7970. cid: this.cid,
  7971. chapters: JSON.stringify(this.unitJson),
  7972. uid: this.userid,
  7973. chapid: chapid,
  7974. },
  7975. ];
  7976. this.ajax
  7977. .post(this.$store.state.api + "deleteWork", params)
  7978. .then((res) => {
  7979. this.$message({
  7980. message: "删除成功",
  7981. type: "success",
  7982. });
  7983. let task = JSON.parse(
  7984. JSON.stringify(
  7985. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  7986. )
  7987. );
  7988. this.unitJson.splice(this.unitIndex, 1);
  7989. if (this.unitIndex == 0) {
  7990. this.unitIndex = 0;
  7991. } else {
  7992. this.unitIndex = this.unitIndex - 1;
  7993. }
  7994. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  7995. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  7996. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  7997. ...task,
  7998. ];
  7999. }
  8000. })
  8001. .catch((err) => {
  8002. this.$message.error("网络不佳");
  8003. console.error(err);
  8004. });
  8005. },
  8006. deleteTool(itemTaskIndex, i) {
  8007. var _this = this;
  8008. if (_this.time()) {
  8009. _this
  8010. .$confirm("确定删除此工具吗?", "提示", {
  8011. confirmButtonText: "确定",
  8012. cancelButtonText: "取消",
  8013. type: "warning",
  8014. })
  8015. .then(() => {
  8016. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8017. itemTaskIndex
  8018. ].toolChoose.splice(i, 1);
  8019. _this.$message.success("删除成功");
  8020. })
  8021. .catch(() => {
  8022. return;
  8023. });
  8024. }
  8025. },
  8026. deleteSentence(i) {
  8027. var _this = this;
  8028. _this
  8029. .$confirm("确定删除此题目吗?", "提示", {
  8030. confirmButtonText: "确定",
  8031. cancelButtonText: "取消",
  8032. type: "warning",
  8033. })
  8034. .then(() => {
  8035. _this.sentenceList.splice(i, 1);
  8036. _this.$message.success("删除成功");
  8037. })
  8038. .catch(() => {
  8039. return;
  8040. });
  8041. },
  8042. deleteS(s, i, j) {
  8043. this.sentenceList[i].addSentence.splice(j, 1);
  8044. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  8045. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  8046. this.sentenceList[i].rightAnswer.splice(a, 1);
  8047. }
  8048. },
  8049. openT() {
  8050. top.postMessage({ tools: "25" }, "*");
  8051. },
  8052. deleteTask(i) {
  8053. var _this = this;
  8054. if (_this.time()) {
  8055. _this
  8056. .$confirm(
  8057. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  8058. 1 ==
  8059. i
  8060. ? "确定删除此任务吗?"
  8061. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  8062. "提示",
  8063. {
  8064. confirmButtonText: "确定",
  8065. cancelButtonText: "取消",
  8066. type: "warning",
  8067. }
  8068. )
  8069. .then(() => {
  8070. if (i == 0 && _this.courseState == 4) {
  8071. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8072. i + 1
  8073. ].chapterData = JSON.parse(
  8074. JSON.stringify(
  8075. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8076. .chapterData
  8077. )
  8078. );
  8079. }
  8080. _this.$forceUpdate();
  8081. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8082. i,
  8083. 1
  8084. );
  8085. _this.$message.success("删除成功");
  8086. })
  8087. .catch(() => {
  8088. return;
  8089. });
  8090. }
  8091. },
  8092. deleteTask2(i) {
  8093. var _this = this;
  8094. if (_this.time()) {
  8095. _this
  8096. .$confirm(
  8097. "确定删除此任务吗?",
  8098. "提示",
  8099. {
  8100. confirmButtonText: "确定",
  8101. cancelButtonText: "取消",
  8102. type: "warning",
  8103. }
  8104. )
  8105. .then(() => {
  8106. if (i == 0 && _this.courseState == 4) {
  8107. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8108. i + 1
  8109. ].chapterData = JSON.parse(
  8110. JSON.stringify(
  8111. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8112. .chapterData
  8113. )
  8114. );
  8115. }
  8116. _this.$forceUpdate();
  8117. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8118. i,
  8119. 1
  8120. );
  8121. _this.$message.success("删除成功");
  8122. })
  8123. .catch(() => {
  8124. return;
  8125. });
  8126. }
  8127. },
  8128. handlePictureCardPreview(file) {
  8129. this.dialogImageUrl = file.url;
  8130. },
  8131. clean(i, c) {
  8132. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  8133. },
  8134. handle_remove1(file, fileList, type) {
  8135. var _tmp = this.cover;
  8136. // for (var i = 0, len = _tmp.length; i < len; i++) {
  8137. // if (_tmp[i].uid == file.uid) {
  8138. // _tmp.splice(i, 1);
  8139. // break;
  8140. // }
  8141. // this.cover = _tmp;
  8142. // }
  8143. this.cover = [];
  8144. this.noneBtnImg = this.cover.length >= 1;
  8145. this.isSysPic = false;
  8146. this.isSysPic2 = false;
  8147. this.$forceUpdate();
  8148. },
  8149. addImg(e) {
  8150. var el = e.currentTarget;
  8151. el.getElementsByTagName("input")[0].click();
  8152. e.target.value = "";
  8153. },
  8154. addChaptersTools(i) {
  8155. this.chapTools = [
  8156. {
  8157. tools: [],
  8158. toolDetail: "",
  8159. },
  8160. ];
  8161. this.chapCount = i;
  8162. this.dialogVisible4 = true;
  8163. },
  8164. isNoFinsh() {
  8165. this.$message.warning("功能正在开发中");
  8166. },
  8167. addAttText(i) {
  8168. this.AttText = {
  8169. title: "",
  8170. text: "",
  8171. };
  8172. this.taskCount = i;
  8173. this.AttTextType = 0;
  8174. this.$forceUpdate();
  8175. this.dialogVisible6 = true;
  8176. setTimeout(() => {
  8177. this.$refs["fuInput"].focus();
  8178. }, 100);
  8179. },
  8180. openLine(i) {
  8181. this.line = "";
  8182. this.lineCount = i;
  8183. this.lineType = 0;
  8184. this.$forceUpdate();
  8185. this.dialogVisible7 = true;
  8186. },
  8187. pasteLine(i) {
  8188. navigator.clipboard
  8189. .readText()
  8190. .then((v) => {
  8191. console.log("获取剪贴板成功:", v);
  8192. const html = v;
  8193. const regex = /src="(.*?)"/g;
  8194. const match = regex.exec(html);
  8195. if (match && match[1]) {
  8196. console.log(match[1]);
  8197. this.$message.success("粘贴成功");
  8198. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8199. i
  8200. ].chapterData.unshift({
  8201. name: "链接",
  8202. title: "嵌入代码",
  8203. url: match[1],
  8204. type: 8,
  8205. });
  8206. } else {
  8207. // console.log("未找到包含 src 属性的 iframe");
  8208. this.$message.error(
  8209. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  8210. );
  8211. }
  8212. })
  8213. .catch((v) => {
  8214. console.log("获取剪贴板失败: ", v);
  8215. });
  8216. },
  8217. openSource(i) {
  8218. this.lineCount = i;
  8219. this.sourceData = {};
  8220. this.dialogVisibleSource = true;
  8221. this.updateSourcePan = false;
  8222. },
  8223. openAiCreate(i){
  8224. this.lineCount = i;
  8225. this.dialogVisibleAiCreate = true;
  8226. },
  8227. createAiPpt(json){
  8228. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8229. this.dialogVisibleAiCreate = false;
  8230. },
  8231. openAiCreateVideo(i){
  8232. this.lineCount = i;
  8233. this.dialogVisibleAiCreateVideo = true;
  8234. },
  8235. createAiVideo(json){
  8236. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8237. // this.dialogVisibleAiCreateVideo = false;
  8238. },
  8239. async createTeacherAn(index){
  8240. this.lineCount = index;
  8241. this.loading = true
  8242. let md = new MarkdownIt();
  8243. if(this.courseState == 4){
  8244. if(index == 0 || index){
  8245. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8246. let name = _task.task+'-教案'
  8247. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8248. await this.generate(name, _html, 0)
  8249. }else {
  8250. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8251. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8252. let name = _task.task+'-教案'
  8253. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8254. await this.generate(name, _html, 0)
  8255. }
  8256. }
  8257. }else if(this.courseState == 5){
  8258. if(index == 0 || index){
  8259. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8260. let name = _task.task+'-教案'
  8261. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8262. await this.generate(name, _html, index)
  8263. }else {
  8264. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8265. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8266. let name = _task.task+'-教案'
  8267. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8268. await this.generate(name, _html, i)
  8269. }
  8270. }
  8271. }
  8272. },
  8273. async generate(a, html, index) {
  8274. // 将html文件中需要用到的数据挂载到store上
  8275. const content = `<!DOCTYPE html>
  8276. <html lang="en">
  8277. <head>
  8278. <meta charset="UTF-8">
  8279. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8280. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8281. <title>${a}</title>
  8282. <style>
  8283. </style>
  8284. </head>
  8285. <body>
  8286. ${html}
  8287. </body>
  8288. </html>`;
  8289. // debugger
  8290. let dname = a + ".doc";
  8291. // 创建文件流
  8292. // 创建bolb实例时,内容一定要放在[]中
  8293. const blob = new Blob([content], {
  8294. type: "text/plain;charset='utf-8'",
  8295. });
  8296. const file = new File([blob], dname, { type: 'application/msword' });
  8297. await this.beforeUploadHtml(file, index)
  8298. },
  8299. beforeUploadHtml(event, index) {
  8300. var file = event;
  8301. var credentials = {
  8302. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8303. secretAccessKey: "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",
  8304. }; //秘钥形式的登录上传
  8305. window.AWS.config.update(credentials);
  8306. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8307. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8308. var _this = this;
  8309. if (file) {
  8310. var params = {
  8311. Key:
  8312. file.name.split(".")[0] +
  8313. new Date().getTime() +
  8314. "." +
  8315. file.name.split(".")[file.name.split(".").length - 1],
  8316. ContentType: file.type,
  8317. Body: file,
  8318. "Access-Control-Allow-Credentials": "*",
  8319. ACL: "public-read",
  8320. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8321. var options = {
  8322. partSize: 2048 * 1024 * 1024,
  8323. queueSize: 2,
  8324. leavePartsOnError: true,
  8325. };
  8326. bucket
  8327. .upload(params, options)
  8328. .on("httpUploadProgress", function (evt) {
  8329. //这里可以写进度条
  8330. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8331. })
  8332. .send(function (err, data) {
  8333. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  8334. _this.loading = false
  8335. }
  8336. if(_this.courseState == 5){
  8337. _this.loading = false
  8338. }
  8339. if (err) {
  8340. _this.$message.error("上传失败");
  8341. } else {
  8342. let _index = 0
  8343. if(_this.lineCount == 0 || _this.lineCount){
  8344. _index = _this.lineCount
  8345. }else {
  8346. _index = index
  8347. }
  8348. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  8349.                   name: file.name,
  8350.                   url: data.Location,
  8351.                   type: 3,
  8352.                 })
  8353. console.log(data.Location);
  8354. }
  8355. });
  8356. }
  8357. },
  8358. async generate2(a, html, index, callback) {
  8359. // 将html文件中需要用到的数据挂载到store上
  8360. const content = `<!DOCTYPE html>
  8361. <html lang="en">
  8362. <head>
  8363. <meta charset="UTF-8">
  8364. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8365. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8366. <title>${a}</title>
  8367. <style>
  8368. </style>
  8369. </head>
  8370. <body>
  8371. ${html}
  8372. </body>
  8373. </html>`;
  8374. // debugger
  8375. let dname = a + ".doc";
  8376. // 创建文件流
  8377. // 创建bolb实例时,内容一定要放在[]中
  8378. const blob = new Blob([content], {
  8379. type: "text/plain;charset='utf-8'",
  8380. });
  8381. const file = new File([blob], dname, { type: 'application/msword' });
  8382. await this.beforeUploadHtml2(file, index, callback)
  8383. },
  8384. beforeUploadHtml2(event, index, callback) {
  8385. var file = event;
  8386. var credentials = {
  8387. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8388. secretAccessKey: "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",
  8389. }; //秘钥形式的登录上传
  8390. window.AWS.config.update(credentials);
  8391. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8392. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8393. var _this = this;
  8394. if (file) {
  8395. var params = {
  8396. Key:
  8397. file.name.split(".")[0] +
  8398. new Date().getTime() +
  8399. "." +
  8400. file.name.split(".")[file.name.split(".").length - 1],
  8401. ContentType: file.type,
  8402. Body: file,
  8403. "Access-Control-Allow-Credentials": "*",
  8404. ACL: "public-read",
  8405. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8406. var options = {
  8407. partSize: 2048 * 1024 * 1024,
  8408. queueSize: 2,
  8409. leavePartsOnError: true,
  8410. };
  8411. bucket
  8412. .upload(params, options)
  8413. .on("httpUploadProgress", function (evt) {
  8414. //这里可以写进度条
  8415. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8416. })
  8417. .send(async function (err, data) {
  8418. if(_this.courseState == 5){
  8419. _this.loading = false
  8420. }
  8421. if (err) {
  8422. callback ? callback() : ''
  8423. _this.$message.error("上传失败");
  8424. } else {
  8425. let fileid = await _this.createFileid(data.Location)
  8426. // _this.cankaoInfoData.push({
  8427. //                   name: file.name,
  8428. //                   url: data.Location,
  8429. //                   type: 3,
  8430. // fileid: fileid,
  8431. //   })
  8432. _this.infoData2.push({
  8433.                   name: file.name,
  8434.                   url: data.Location,
  8435.                   type: 3,
  8436. fileid: fileid,
  8437.   })
  8438. console.log(data.Location);
  8439. callback ? callback() : ''
  8440. }
  8441. });
  8442. }
  8443. },
  8444. addSource() {
  8445. if (!Object.keys(this.sourceData).length) {
  8446. this.$message.error("请选择要上传的资源");
  8447. return;
  8448. }
  8449. let keys = Object.keys(this.sourceData);
  8450. for (var i = 0; i < keys.length; i++) {
  8451. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8452. this.lineCount
  8453. ].chapterData.unshift({
  8454. name: "链接",
  8455. title: this.sourceData[keys[i]].name,
  8456. url: this.sourceData[keys[i]].url,
  8457. type: 14,
  8458. id: keys[i],
  8459. });
  8460. }
  8461. this.$forceUpdate();
  8462. this.dialogVisibleSource = false;
  8463. },
  8464. updateSource() {
  8465. if (!Object.keys(this.sourceData).length) {
  8466. this.$message.error("请选择要上传的资源");
  8467. return;
  8468. }
  8469. let keys = Object.keys(this.sourceData);
  8470. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8471. this.taskCount
  8472. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  8473. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8474. this.taskCount
  8475. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  8476. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8477. this.taskCount
  8478. ].chapterData[this.lineCount].id = keys[0];
  8479. this.updateSourcePan = false;
  8480. this.$forceUpdate();
  8481. this.dialogVisibleSource = false;
  8482. },
  8483. deleteM(i, j) {
  8484. this.testJson.testJson[i].timuList.splice(j, 1);
  8485. },
  8486. beforeUploadTiMu(event, i) {
  8487. const loading = this.openLoading();
  8488. var file = event.target.files[0];
  8489. var credentials = {
  8490. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8491. secretAccessKey: "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",
  8492. }; //秘钥形式的登录上传
  8493. window.AWS.config.update(credentials);
  8494. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8495. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8496. var _this = this;
  8497. if (file) {
  8498. var params = {
  8499. Key:
  8500. file.name.split(".")[0] +
  8501. new Date().getTime() +
  8502. "." +
  8503. file.name.split(".")[file.name.split(".").length - 1],
  8504. ContentType: file.type,
  8505. Body: file,
  8506. "Access-Control-Allow-Credentials": "*",
  8507. ACL: "public-read",
  8508. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8509. var options = {
  8510. partSize: 2048 * 1024 * 1024,
  8511. queueSize: 2,
  8512. leavePartsOnError: true,
  8513. };
  8514. bucket
  8515. .upload(params, options)
  8516. .on("httpUploadProgress", function (evt) {
  8517. //这里可以写进度条
  8518. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8519. })
  8520. .send(function (err, data) {
  8521. loading.close();
  8522. if (err) {
  8523. _this.$message.error("上传失败");
  8524. } else {
  8525. if (_this.testJson.testJson[i].timuList) {
  8526. _this.testJson.testJson[i].timuList.push({
  8527. src: data.Location,
  8528. });
  8529. } else {
  8530. _this.testJson.testJson[i].timuList = [];
  8531. _this.testJson.testJson[i].timuList.push({
  8532. src: data.Location,
  8533. });
  8534. }
  8535. _this.imgChange3(i);
  8536. _this.$forceUpdate();
  8537. }
  8538. });
  8539. }
  8540. },
  8541. beforeUploadTi(event, i, j) {
  8542. const loading = this.openLoading();
  8543. var file = event.target.files[0];
  8544. var credentials = {
  8545. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8546. secretAccessKey: "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",
  8547. }; //秘钥形式的登录上传
  8548. window.AWS.config.update(credentials);
  8549. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8550. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8551. var _this = this;
  8552. if (file) {
  8553. var params = {
  8554. Key:
  8555. file.name.split(".")[0] +
  8556. new Date().getTime() +
  8557. "." +
  8558. file.name.split(".")[file.name.split(".").length - 1],
  8559. ContentType: file.type,
  8560. Body: file,
  8561. "Access-Control-Allow-Credentials": "*",
  8562. ACL: "public-read",
  8563. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8564. var options = {
  8565. partSize: 2048 * 1024 * 1024,
  8566. queueSize: 2,
  8567. leavePartsOnError: true,
  8568. };
  8569. bucket
  8570. .upload(params, options)
  8571. .on("httpUploadProgress", function (evt) {
  8572. //这里可以写进度条
  8573. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8574. })
  8575. .send(function (err, data) {
  8576. loading.close();
  8577. if (err) {
  8578. _this.$message.error("上传失败");
  8579. } else {
  8580. _this.testJson.testJson[i].checkList[j] = {};
  8581. _this.testJson.testJson[i].checkList[j].src = data.Location;
  8582. _this.testJson.testJson[i].checkList[j].imgType = 1;
  8583. _this.imgChange2(i, j);
  8584. _this.$forceUpdate();
  8585. }
  8586. });
  8587. }
  8588. },
  8589. beforeUpload1(event, type) {
  8590. // const loading = this.openLoading();
  8591. var file = event.target.files[0];
  8592. var credentials = {
  8593. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8594. secretAccessKey: "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",
  8595. }; //秘钥形式的登录上传
  8596. window.AWS.config.update(credentials);
  8597. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8598. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8599. var _this = this;
  8600. if (file) {
  8601. var params = {
  8602. Key:
  8603. file.name.split(".")[0] +
  8604. new Date().getTime() +
  8605. "." +
  8606. file.name.split(".")[file.name.split(".").length - 1],
  8607. ContentType: file.type,
  8608. Body: file,
  8609. "Access-Control-Allow-Credentials": "*",
  8610. ACL: "public-read",
  8611. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8612. var options = {
  8613. partSize: 2048 * 1024 * 1024,
  8614. queueSize: 2,
  8615. leavePartsOnError: true,
  8616. };
  8617. bucket
  8618. .upload(params, options)
  8619. .on("httpUploadProgress", function (evt) {
  8620. //这里可以写进度条
  8621. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8622. })
  8623. .send(function (err, data) {
  8624. // loading.close();
  8625. if (err) {
  8626. // var a = _this.$refs.upload1.uploadFiles;
  8627. // a.splice(a.length - 1, a.length);
  8628. _this.$message.error("上传失败");
  8629. } else {
  8630. // _this.cover.push({
  8631. // name: file.name,
  8632. // url: data.Location,
  8633. // uid: file.uid,
  8634. // });
  8635. _this.cover = [
  8636. {
  8637. name: file.name,
  8638. url: data.Location,
  8639. uid: file.uid,
  8640. },
  8641. ];
  8642. _this.imgChange1(null, null, 1, null);
  8643. _this.choosePicVisible = false;
  8644. console.log(data.Location);
  8645. }
  8646. });
  8647. }
  8648. },
  8649. beforeUploadSelect(event, type) {
  8650. // const loading = this.openLoading();
  8651. var file = event.target.files[0];
  8652. var credentials = {
  8653. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8654. secretAccessKey: "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",
  8655. }; //秘钥形式的登录上传
  8656. window.AWS.config.update(credentials);
  8657. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8658. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8659. var _this = this;
  8660. if (file) {
  8661. var params = {
  8662. Key:
  8663. file.name.split(".")[0] +
  8664. new Date().getTime() +
  8665. "." +
  8666. file.name.split(".")[file.name.split(".").length - 1],
  8667. ContentType: file.type,
  8668. Body: file,
  8669. "Access-Control-Allow-Credentials": "*",
  8670. ACL: "public-read",
  8671. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8672. var options = {
  8673. partSize: 2048 * 1024 * 1024,
  8674. queueSize: 2,
  8675. leavePartsOnError: true,
  8676. };
  8677. bucket
  8678. .upload(params, options)
  8679. .on("httpUploadProgress", function (evt) {
  8680. //这里可以写进度条
  8681. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8682. })
  8683. .send(function (err, data) {
  8684. // loading.close();
  8685. if (err) {
  8686. _this.$message.error("上传失败");
  8687. } else {
  8688. _this.selectJson.url = data.Location;
  8689. console.log(data.Location);
  8690. }
  8691. });
  8692. }
  8693. },
  8694. chooseSysPic(p) {
  8695. this.cover = [];
  8696. setTimeout(() => {
  8697. this.cover[0] = {
  8698. name: "系统图片.png",
  8699. url: p,
  8700. };
  8701. this.imgChange1(null, null, 1, null);
  8702. this.$forceUpdate();
  8703. }, 0);
  8704. this.isSysPic = true;
  8705. this.isSysPic2 = false;
  8706. this.sysPicVisible = false;
  8707. this.$forceUpdate();
  8708. },
  8709. chooseSysPic2(p) {
  8710. this.cover = [];
  8711. setTimeout(() => {
  8712. this.cover[0] = {
  8713. name: "网络图片.png",
  8714. url: p,
  8715. };
  8716. this.imgChange1(null, null, 1, null);
  8717. this.$forceUpdate();
  8718. }, 0);
  8719. this.isSysPic2 = true;
  8720. this.isSysPic = false;
  8721. this.sysPicVisible2 = false;
  8722. this.$forceUpdate();
  8723. },
  8724. beforeUpload(data) {
  8725. this.$refs.upload1.uploadFiles;
  8726. this.uploadLoading1 = true;
  8727. var file = data.file;
  8728. var credentials = {
  8729. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8730. secretAccessKey: "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",
  8731. }; //秘钥形式的登录上传
  8732. window.AWS.config.update(credentials);
  8733. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8734. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8735. var _this = this;
  8736. if (file) {
  8737. var params = {
  8738. Key:
  8739. file.name.split(".")[0] +
  8740. new Date().getTime() +
  8741. "." +
  8742. file.name.split(".")[file.name.split(".").length - 1],
  8743. ContentType: file.type,
  8744. Body: file,
  8745. "Access-Control-Allow-Credentials": "*",
  8746. ACL: "public-read",
  8747. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8748. var options = {
  8749. partSize: 2048 * 1024 * 1024,
  8750. queueSize: 2,
  8751. leavePartsOnError: true,
  8752. };
  8753. bucket
  8754. .upload(params, options)
  8755. .on("httpUploadProgress", function (evt) {
  8756. //这里可以写进度条
  8757. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8758. })
  8759. .send(function (err, data) {
  8760. _this.uploadLoading1 = false;
  8761. if (err) {
  8762. // var a = _this.$refs.upload1.uploadFiles;
  8763. // a.splice(a.length - 1, a.length);
  8764. _this.$message.error("上传失败");
  8765. } else {
  8766. //上传成功处理
  8767. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  8768. name: file.name,
  8769. url: data.Location,
  8770. uid: file.uid,
  8771. });
  8772. _this.imgChange();
  8773. console.log(data.Location);
  8774. }
  8775. });
  8776. }
  8777. },
  8778. onExceed() {
  8779. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  8780. },
  8781. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  8782. // const loading = this.openLoading();
  8783. var file = event.target.files[0];
  8784. var credentials = {
  8785. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8786. secretAccessKey: "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",
  8787. }; //秘钥形式的登录上传
  8788. window.AWS.config.update(credentials);
  8789. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8790. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8791. var _this = this;
  8792. if (type == 3) {
  8793. var b = [
  8794. "DOC",
  8795. "DOCX",
  8796. "DOCM",
  8797. "DOTM",
  8798. "DOTX",
  8799. "PPTX",
  8800. "PPSX",
  8801. "PPT",
  8802. "PPS",
  8803. "PPTM",
  8804. "POTM",
  8805. "PPAM",
  8806. "POTX",
  8807. "PPSM",
  8808. ];
  8809. if (
  8810. b.indexOf(
  8811. file.name
  8812. .split(".")
  8813. [file.name.split(".").length - 1].toLocaleUpperCase()
  8814. ) != -1
  8815. ) {
  8816. if (file.size / 1024 / 1024 > 80) {
  8817. this.$message.error("上传文件大于80兆,请重新选择文件!");
  8818. this.inputShow = true;
  8819. // var a = _this.$refs.upload1.uploadFiles;
  8820. // a.splice(a.length - 1, a.length);
  8821. // loading.close();
  8822. return;
  8823. }
  8824. } else if (
  8825. file.name
  8826. .split(".")
  8827. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  8828. ) {
  8829. if (file.size / 1024 / 1024 > 80) {
  8830. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  8831. this.inputShow = true;
  8832. // var a = _this.$refs.upload1.uploadFiles;
  8833. // a.splice(a.length - 1, a.length);
  8834. // loading.close();
  8835. return;
  8836. }
  8837. }
  8838. }
  8839. this.inputShow = false;
  8840. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8841. itemTaskIndex
  8842. ].progress = 0;
  8843. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8844. itemTaskIndex
  8845. ].proVisible = true;
  8846. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8847. itemTaskIndex
  8848. ].isFinishSize = 0;
  8849. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8850. itemTaskIndex
  8851. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  8852. _this.$forceUpdate();
  8853. if (file) {
  8854. var params = {
  8855. Key:
  8856. file.name.split(".")[0] +
  8857. new Date().getTime() +
  8858. "." +
  8859. file.name.split(".")[file.name.split(".").length - 1],
  8860. ContentType: file.type,
  8861. Body: file,
  8862. "Access-Control-Allow-Credentials": "*",
  8863. ACL: "public-read",
  8864. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8865. var options = {
  8866. partSize: 2048 * 1024 * 1024,
  8867. queueSize: 2,
  8868. leavePartsOnError: true,
  8869. };
  8870. bucket
  8871. .upload(params, options)
  8872. .on("httpUploadProgress", function (evt) {
  8873. //这里可以写进度条
  8874. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8875. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8876. itemTaskIndex
  8877. ].progress = parseInt((evt.loaded / evt.total) * 100);
  8878. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8879. itemTaskIndex
  8880. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  8881. _this.$forceUpdate();
  8882. })
  8883. .send(function (err, data) {
  8884. // loading.close();
  8885. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8886. itemTaskIndex
  8887. ].progress = 100;
  8888. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8889. itemTaskIndex
  8890. ].isFinishSize =
  8891. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8892. itemTaskIndex
  8893. ].isAllSize;
  8894. _this.$forceUpdate();
  8895. setTimeout(() => {
  8896. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8897. itemTaskIndex
  8898. ].proVisible = false;
  8899. _this.$forceUpdate();
  8900. }, 1000);
  8901. _this.inputShow = true;
  8902. if (err) {
  8903. // var a = _this.$refs.upload1.uploadFiles;
  8904. // a.splice(a.length - 1, a.length);
  8905. _this.$message.error("上传失败");
  8906. } else {
  8907. if (type == 13) {
  8908. let _type = 2;
  8909. var imgA = [
  8910. "png",
  8911. "jpg",
  8912. "jpeg",
  8913. "bmp",
  8914. "gif",
  8915. "webp",
  8916. "psd",
  8917. "svg",
  8918. "tiff",
  8919. ];
  8920. var fileA = [
  8921. "PDF",
  8922. "DOC",
  8923. "DOCX",
  8924. "DOCM",
  8925. "DOTM",
  8926. "DOTX",
  8927. "PPTX",
  8928. "PPSX",
  8929. "PPT",
  8930. "PPS",
  8931. "PPTM",
  8932. "POTM",
  8933. "PPAM",
  8934. "POTX",
  8935. "PPSM",
  8936. "XLSX",
  8937. "XLS",
  8938. ];
  8939. var videoA = [
  8940. "AVI",
  8941. "NAVI",
  8942. "MPEG",
  8943. "ASF",
  8944. "MOV",
  8945. "WMV",
  8946. "3GP",
  8947. "RM",
  8948. "RMVB",
  8949. "FLV",
  8950. "F4V",
  8951. "H.264",
  8952. "H.265",
  8953. "REAL VIDEO",
  8954. "MKV",
  8955. "WebM",
  8956. "HDDVD",
  8957. "MP4",
  8958. "MPG",
  8959. "M4V",
  8960. "MGV",
  8961. "OGV",
  8962. "QTM",
  8963. "STR",
  8964. "AMC",
  8965. "DVX",
  8966. "EVO",
  8967. "DAT",
  8968. "OGG",
  8969. "OGM",
  8970. ];
  8971. if (
  8972. fileA.indexOf(
  8973. data.Location.split(".")[
  8974. data.Location.split(".").length - 1
  8975. ].toLocaleUpperCase()
  8976. ) != -1
  8977. ) {
  8978. _type = 3;
  8979. } else if (
  8980. videoA.indexOf(
  8981. data.Location.split(".")[
  8982. data.Location.split(".").length - 1
  8983. ].toLocaleUpperCase()
  8984. ) != -1
  8985. ) {
  8986. _type = 2;
  8987. } else if (
  8988. imgA.indexOf(
  8989. data.Location.split(".")[
  8990. data.Location.split(".").length - 1
  8991. ].toLocaleLowerCase()
  8992. ) != -1
  8993. ) {
  8994. _type = 13;
  8995. } else {
  8996. _type = 12;
  8997. }
  8998. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  8999. itemTaskIndex
  9000. ].chapterData.unshift({
  9001. name: file.name,
  9002. url: data.Location,
  9003. uid: file.uid,
  9004. type: _type,
  9005. });
  9006. _this.imgChange1(null, null, _type, itemTaskIndex);
  9007. } else if (type == 2 || type == 3 || type == 12) {
  9008. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9009. itemTaskIndex
  9010. ].chapterData.unshift({
  9011. name: file.name,
  9012. url: data.Location,
  9013. uid: file.uid,
  9014. type: type,
  9015. });
  9016. _this.imgChange1(null, null, type, itemTaskIndex);
  9017. } else if (type == 4) {
  9018. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9019. itemTaskIndex
  9020. ].fileList1.push({
  9021. name: file.name,
  9022. url: data.Location,
  9023. uid: file.uid,
  9024. });
  9025. _this.imgChange1(null, null, type, itemTaskIndex);
  9026. } else if (type == 5) {
  9027. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9028. itemTaskIndex
  9029. ].homeworkList.push({
  9030. name: file.name,
  9031. url: data.Location,
  9032. uid: file.uid,
  9033. });
  9034. _this.imgChange1(null, null, type, itemTaskIndex);
  9035. }
  9036. console.log(data.Location);
  9037. }
  9038. });
  9039. }
  9040. },
  9041. beforeUploadInfo2(event, type) {
  9042. // const loading = this.openLoading();
  9043. var file = event.target.files[0];
  9044. var credentials = {
  9045. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9046. secretAccessKey: "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",
  9047. }; //秘钥形式的登录上传
  9048. window.AWS.config.update(credentials);
  9049. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9050. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9051. var _this = this;
  9052. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  9053. if (
  9054. xianObj.indexOf(
  9055. file.name
  9056. .split(".")
  9057. [file.name.split(".").length - 1].toLocaleUpperCase()
  9058. ) == -1
  9059. ) {
  9060. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  9061. this.inputShow = true;
  9062. // var a = _this.$refs.upload1.uploadFiles;
  9063. // a.splice(a.length - 1, a.length);
  9064. // loading.close();
  9065. return;
  9066. }
  9067. if (type == 3) {
  9068. var b = [
  9069. "DOC",
  9070. "DOCX",
  9071. "DOCM",
  9072. "DOTM",
  9073. "DOTX",
  9074. "PPTX",
  9075. "PPSX",
  9076. "PPT",
  9077. "PPS",
  9078. "PPTM",
  9079. "POTM",
  9080. "PPAM",
  9081. "POTX",
  9082. "PPSM",
  9083. ];
  9084. if (
  9085. b.indexOf(
  9086. file.name
  9087. .split(".")
  9088. [file.name.split(".").length - 1].toLocaleUpperCase()
  9089. ) != -1
  9090. ) {
  9091. if (file.size / 1024 / 1024 > 80) {
  9092. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9093. this.inputShow = true;
  9094. // var a = _this.$refs.upload1.uploadFiles;
  9095. // a.splice(a.length - 1, a.length);
  9096. // loading.close();
  9097. return;
  9098. }
  9099. } else if (
  9100. file.name
  9101. .split(".")
  9102. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9103. ) {
  9104. if (file.size / 1024 / 1024 > 80) {
  9105. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9106. this.inputShow = true;
  9107. // var a = _this.$refs.upload1.uploadFiles;
  9108. // a.splice(a.length - 1, a.length);
  9109. // loading.close();
  9110. return;
  9111. }
  9112. }
  9113. }
  9114. this.inputShow = false;
  9115. if(type == 14){
  9116. _this.teacherinfoprogress = 0;
  9117. _this.teacherinfoproVisible = true;
  9118. _this.teacherinfoisFinishSize = 0;
  9119. _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9120. }else{
  9121. _this.infoprogress = 0;
  9122. _this.infoproVisible = true;
  9123. _this.infoisFinishSize = 0;
  9124. _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9125. }
  9126. _this.$forceUpdate();
  9127. if (file) {
  9128. var params = {
  9129. Key:
  9130. file.name.split(".")[0] +
  9131. new Date().getTime() +
  9132. "." +
  9133. file.name.split(".")[file.name.split(".").length - 1],
  9134. ContentType: file.type,
  9135. Body: file,
  9136. "Access-Control-Allow-Credentials": "*",
  9137. ACL: "public-read",
  9138. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9139. var options = {
  9140. partSize: 2048 * 1024 * 1024,
  9141. queueSize: 2,
  9142. leavePartsOnError: true,
  9143. };
  9144. bucket
  9145. .upload(params, options)
  9146. .on("httpUploadProgress", function (evt) {
  9147. //这里可以写进度条
  9148. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9149. if(type == 14){
  9150. _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9151. _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9152. }else {
  9153. _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  9154. _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9155. }
  9156. _this.$forceUpdate();
  9157. })
  9158. .send(async function (err, data) {
  9159. // loading.close();
  9160. if(type == 14){
  9161. _this.teacherinfoprogress = 100;
  9162. _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  9163. }else {
  9164. _this.infoprogress = 100;
  9165. _this.infoisFinishSize = _this.infoisAllSize;
  9166. }
  9167. _this.$forceUpdate();
  9168. _this.inputShow = true;
  9169. if (err) {
  9170. setTimeout(() => {
  9171. if(type == 14){
  9172. _this.teacherinfoproVisible = false;
  9173. }else{
  9174. _this.infoproVisible = false;
  9175. }
  9176. _this.$forceUpdate();
  9177. }, 1000);
  9178. // var a = _this.$refs.upload1.uploadFiles;
  9179. // a.splice(a.length - 1, a.length);
  9180. _this.$message.error("上传失败");
  9181. } else {
  9182. let fileid = await _this.createFileid(data.Location)
  9183. if(fileid){
  9184. if(type == 14){
  9185. _this.teacherinfoproVisible = false;
  9186. }else{
  9187. _this.infoproVisible = false;
  9188. }
  9189. _this.$forceUpdate();
  9190. }
  9191. var imgA = [
  9192. "png",
  9193. "jpg",
  9194. "jpeg",
  9195. "bmp",
  9196. "gif",
  9197. "webp",
  9198. "psd",
  9199. "svg",
  9200. "tiff",
  9201. ];
  9202. var fileA = [
  9203. "PDF",
  9204. "DOC",
  9205. "DOCX",
  9206. "DOCM",
  9207. "DOTM",
  9208. "DOTX",
  9209. "PPTX",
  9210. "PPSX",
  9211. "PPT",
  9212. "PPS",
  9213. "PPTM",
  9214. "POTM",
  9215. "PPAM",
  9216. "POTX",
  9217. "PPSM",
  9218. "XLSX",
  9219. "XLS",
  9220. ];
  9221. var videoA = [
  9222. "AVI",
  9223. "NAVI",
  9224. "MPEG",
  9225. "ASF",
  9226. "MOV",
  9227. "WMV",
  9228. "3GP",
  9229. "RM",
  9230. "RMVB",
  9231. "FLV",
  9232. "F4V",
  9233. "H.264",
  9234. "H.265",
  9235. "REAL VIDEO",
  9236. "MKV",
  9237. "WebM",
  9238. "HDDVD",
  9239. "MP4",
  9240. "MPG",
  9241. "M4V",
  9242. "MGV",
  9243. "OGV",
  9244. "QTM",
  9245. "STR",
  9246. "AMC",
  9247. "DVX",
  9248. "EVO",
  9249. "DAT",
  9250. "OGG",
  9251. "OGM",
  9252. ];
  9253. let _type = 2;
  9254. if (
  9255. fileA.indexOf(
  9256. data.Location.split(".")[
  9257. data.Location.split(".").length - 1
  9258. ].toLocaleUpperCase()
  9259. ) != -1
  9260. ) {
  9261. _type = 3;
  9262. } else if (
  9263. videoA.indexOf(
  9264. data.Location.split(".")[
  9265. data.Location.split(".").length - 1
  9266. ].toLocaleUpperCase()
  9267. ) != -1
  9268. ) {
  9269. _type = 2;
  9270. } else if (
  9271. imgA.indexOf(
  9272. data.Location.split(".")[
  9273. data.Location.split(".").length - 1
  9274. ].toLocaleLowerCase()
  9275. ) != -1
  9276. ) {
  9277. _type = 13;
  9278. } else {
  9279. _type = 12;
  9280. }
  9281. if (type == 13) {
  9282. _this.infoData.push({
  9283. name: file.name,
  9284. url: data.Location,
  9285. uid: file.uid,
  9286. type: _type,
  9287. fileid: fileid,
  9288. });
  9289. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9290. name: file.name,
  9291. url: data.Location,
  9292. uid: file.uid,
  9293. type: _type,
  9294. fileid: fileid,
  9295. })
  9296. }else if (type == 14) {
  9297. _this.teacherInfoData.push({
  9298. name: file.name,
  9299. url: data.Location,
  9300. uid: file.uid,
  9301. type: _type,
  9302. fileid: fileid,
  9303. });
  9304. _this.infoData2.push({
  9305. name: file.name,
  9306. url: data.Location,
  9307. uid: file.uid,
  9308. type: _type,
  9309. fileid: fileid,
  9310. });
  9311. }else if (type == 15) {
  9312. _this.infoData2.push({
  9313. name: file.name,
  9314. url: data.Location,
  9315. uid: file.uid,
  9316. type: _type,
  9317. fileid: fileid,
  9318. });
  9319. _this.infoData.push({
  9320. name: file.name,
  9321. url: data.Location,
  9322. uid: file.uid,
  9323. type: _type,
  9324. fileid: fileid,
  9325. });
  9326. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9327. name: file.name,
  9328. url: data.Location,
  9329. uid: file.uid,
  9330. type: _type,
  9331. fileid: fileid,
  9332. })
  9333. }
  9334. console.log(data.Location);
  9335. console.log(fileid);
  9336. }
  9337. });
  9338. }
  9339. },
  9340. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  9341. // const loading = this.openLoading();
  9342. var file = event.target.files[0];
  9343. var credentials = {
  9344. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9345. secretAccessKey: "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",
  9346. }; //秘钥形式的登录上传
  9347. window.AWS.config.update(credentials);
  9348. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9349. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9350. var _this = this;
  9351. if (type == 3) {
  9352. var b = [
  9353. "DOC",
  9354. "DOCX",
  9355. "DOCM",
  9356. "DOTM",
  9357. "DOTX",
  9358. "PPTX",
  9359. "PPSX",
  9360. "PPT",
  9361. "PPS",
  9362. "PPTM",
  9363. "POTM",
  9364. "PPAM",
  9365. "POTX",
  9366. "PPSM",
  9367. ];
  9368. if (
  9369. b.indexOf(
  9370. file.name
  9371. .split(".")
  9372. [file.name.split(".").length - 1].toLocaleUpperCase()
  9373. ) != -1
  9374. ) {
  9375. if (file.size / 1024 / 1024 > 80) {
  9376. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9377. this.inputShow = true;
  9378. // var a = _this.$refs.upload1.uploadFiles;
  9379. // a.splice(a.length - 1, a.length);
  9380. // loading.close();
  9381. return;
  9382. }
  9383. } else if (
  9384. file.name
  9385. .split(".")
  9386. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9387. ) {
  9388. if (file.size / 1024 / 1024 > 80) {
  9389. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9390. this.inputShow = true;
  9391. // var a = _this.$refs.upload1.uploadFiles;
  9392. // a.splice(a.length - 1, a.length);
  9393. // loading.close();
  9394. return;
  9395. }
  9396. }
  9397. }
  9398. this.inputShow = false;
  9399. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9400. itemTaskIndex
  9401. ].progress = 0;
  9402. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9403. itemTaskIndex
  9404. ].proVisible = true;
  9405. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9406. itemTaskIndex
  9407. ].isFinishSize = 0;
  9408. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9409. itemTaskIndex
  9410. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9411. _this.$forceUpdate();
  9412. if (file) {
  9413. var params = {
  9414. Key:
  9415. file.name.split(".")[0] +
  9416. new Date().getTime() +
  9417. "." +
  9418. file.name.split(".")[file.name.split(".").length - 1],
  9419. ContentType: file.type,
  9420. Body: file,
  9421. "Access-Control-Allow-Credentials": "*",
  9422. ACL: "public-read",
  9423. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9424. var options = {
  9425. partSize: 2048 * 1024 * 1024,
  9426. queueSize: 2,
  9427. leavePartsOnError: true,
  9428. };
  9429. bucket
  9430. .upload(params, options)
  9431. .on("httpUploadProgress", function (evt) {
  9432. //这里可以写进度条
  9433. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9434. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9435. itemTaskIndex
  9436. ].progress = parseInt((evt.loaded / evt.total) * 100);
  9437. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9438. itemTaskIndex
  9439. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9440. _this.$forceUpdate();
  9441. })
  9442. .send(function (err, data) {
  9443. // loading.close();
  9444. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9445. itemTaskIndex
  9446. ].progress = 100;
  9447. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9448. itemTaskIndex
  9449. ].isFinishSize =
  9450. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9451. itemTaskIndex
  9452. ].isAllSize;
  9453. _this.$forceUpdate();
  9454. setTimeout(() => {
  9455. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9456. itemTaskIndex
  9457. ].proVisible = false;
  9458. _this.$forceUpdate();
  9459. }, 1000);
  9460. _this.inputShow = true;
  9461. if (err) {
  9462. // var a = _this.$refs.upload1.uploadFiles;
  9463. // a.splice(a.length - 1, a.length);
  9464. _this.$message.error("上传失败");
  9465. } else {
  9466. if (type == 2 || type == 3) {
  9467. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9468. itemTaskIndex
  9469. ].chapterData.unshift({
  9470. name: file.name,
  9471. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9472. // itemTaskIndex
  9473. // ].chapterData.length+1),
  9474. url: data.Location,
  9475. uid: file.uid,
  9476. type: type,
  9477. text: string,
  9478. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9479. // itemTaskIndex
  9480. // ].chapterData.length + 1),
  9481. });
  9482. _this.imgChange1(null, null, type, itemTaskIndex);
  9483. } else if (type == 4) {
  9484. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9485. itemTaskIndex
  9486. ].fileList1.push({
  9487. name: file.name,
  9488. url: data.Location,
  9489. uid: file.uid,
  9490. });
  9491. _this.imgChange1(null, null, type, itemTaskIndex);
  9492. } else if (type == 5) {
  9493. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9494. itemTaskIndex
  9495. ].homeworkList.push({
  9496. name: file.name,
  9497. url: data.Location,
  9498. uid: file.uid,
  9499. });
  9500. _this.imgChange1(null, null, type, itemTaskIndex);
  9501. }
  9502. console.log(data.Location);
  9503. }
  9504. });
  9505. }
  9506. },
  9507. addunit() {
  9508. this.unitJson.push({
  9509. dyName: "", //单元标题
  9510. isUpdate: 1,
  9511. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  9512. chapterInfo: [
  9513. {
  9514. isread: false,
  9515. chapterid: this.guid(),
  9516. title: "",
  9517. courseName: "",
  9518. taskJson: [
  9519. {
  9520. task: "",
  9521. taskDetail: "",
  9522. chapterData: [],
  9523. toolText: "",
  9524. toolChoose: [
  9525. {
  9526. tool: [],
  9527. toolDetail: "",
  9528. toolType: 0,
  9529. askCount: 1,
  9530. askTitle: "",
  9531. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9532. },
  9533. ],
  9534. isShowTools: false,
  9535. askCount: 1,
  9536. isFold: 1,
  9537. askTitle: "",
  9538. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9539. checkJson: [{ checkCount: [], checkPerent: [] }],
  9540. homeworkList: [],
  9541. },
  9542. ],
  9543. itemCount: 1,
  9544. fileList1: [],
  9545. video: [],
  9546. testData: [],
  9547. pData: [],
  9548. templateArray: [],
  9549. },
  9550. ],
  9551. });
  9552. this.addindex = this.unitJson.length - 1;
  9553. setTimeout(() => {
  9554. this.unitIndex = this.unitJson.length - 1;
  9555. setTimeout(() => {
  9556. console.log(this.$refs.dyInput);
  9557. this.$refs.dyInput[0].focus();
  9558. }, 100);
  9559. this.unitSet(this.unitIndex);
  9560. }, 0);
  9561. },
  9562. addToolFun(itemTaskIndex) {
  9563. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9564. itemTaskIndex
  9565. ].toolChoose.push({
  9566. tool: [],
  9567. toolDetail: "",
  9568. toolType: 0,
  9569. askCount: 1,
  9570. askTitle: "",
  9571. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9572. });
  9573. },
  9574. addTaskBorder() {
  9575. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  9576. task: "",
  9577. taskDetail: "",
  9578. chapterData: [],
  9579. toolText: "",
  9580. toolChoose: [
  9581. {
  9582. tool: [],
  9583. toolDetail: "",
  9584. toolType: 0,
  9585. askCount: 1,
  9586. askTitle: "",
  9587. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9588. },
  9589. ],
  9590. isShowTools: false,
  9591. askCount: 1,
  9592. isFold: 1, //任务收起状态
  9593. askTitle: "",
  9594. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9595. checkJson: [{ checkCount: [], checkPerent: [] }],
  9596. homeworkList: [],
  9597. });
  9598. setTimeout(() => {
  9599. this.checkEva(this.checkId);
  9600. setTimeout(() => {
  9601. this.checkEva(this.checkId);
  9602. }, 100);
  9603. }, 100);
  9604. },
  9605. addTaskBorder2(type, index) {
  9606. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  9607. this.$message({
  9608. message: "有大纲在生成请生成完之后才能使用此功能",
  9609. type: "warning"
  9610. });
  9611. return;
  9612. }
  9613. if(type == 1){
  9614. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  9615. task: "",
  9616. isTask2: true,
  9617. isTask3: true,
  9618. taskDetail: "",
  9619. chapterData: [],
  9620. toolText: "",
  9621. toolChoose: [
  9622. {
  9623. tool: [],
  9624. toolDetail: "",
  9625. toolType: 0,
  9626. askCount: 1,
  9627. askTitle: "",
  9628. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9629. },
  9630. ],
  9631. isShowTools: false,
  9632. askCount: 1,
  9633. isFold: 0, //任务收起状态
  9634. askTitle: "",
  9635. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9636. checkJson: [{ checkCount: [], checkPerent: [] }],
  9637. homeworkList: [],
  9638. })
  9639. }else if(type == 2){
  9640. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  9641. task: "",
  9642. isTask2: true,
  9643. isTask3: true,
  9644. taskDetail: "",
  9645. chapterData: [],
  9646. toolText: "",
  9647. toolChoose: [
  9648. {
  9649. tool: [],
  9650. toolDetail: "",
  9651. toolType: 0,
  9652. askCount: 1,
  9653. askTitle: "",
  9654. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9655. },
  9656. ],
  9657. isShowTools: false,
  9658. askCount: 1,
  9659. isFold: 0, //任务收起状态
  9660. askTitle: "",
  9661. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9662. checkJson: [{ checkCount: [], checkPerent: [] }],
  9663. homeworkList: [],
  9664. })
  9665. }
  9666. setTimeout(() => {
  9667. this.checkEva(this.checkId);
  9668. setTimeout(() => {
  9669. this.checkEva(this.checkId);
  9670. }, 100);
  9671. }, 100);
  9672. },
  9673. add(e, i) {
  9674. var el = e.currentTarget;
  9675. el.getElementsByTagName("input")[0].click();
  9676. },
  9677. fold(i, e) {
  9678. if (
  9679. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  9680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  9681. ) {
  9682. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  9683. } else {
  9684. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  9685. }
  9686. },
  9687. fold2(i) {
  9688. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  9689. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9690. i
  9691. ].isFold2 = false;
  9692. } else {
  9693. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  9694. }
  9695. this.$forceUpdate();
  9696. },
  9697. foldEva(i) {
  9698. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  9699. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9700. i
  9701. ].isEvaFold = false;
  9702. } else {
  9703. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9704. i
  9705. ].isEvaFold = true;
  9706. setTimeout(() => {
  9707. this.checkEva(this.checkId);
  9708. setTimeout(() => {
  9709. this.checkEva(this.checkId);
  9710. }, 500);
  9711. }, 0);
  9712. }
  9713. this.$forceUpdate();
  9714. },
  9715. foldC(i) {
  9716. if (
  9717. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  9718. ) {
  9719. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9720. i
  9721. ].isFoldchapter = false;
  9722. } else {
  9723. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9724. i
  9725. ].isFoldchapter = true;
  9726. }
  9727. this.$forceUpdate();
  9728. },
  9729. fold3(i, ti) {
  9730. if (
  9731. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  9732. .isFold3
  9733. ) {
  9734. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  9735. ti
  9736. ].isFold3 = false;
  9737. } else {
  9738. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  9739. ti
  9740. ].isFold3 = true;
  9741. }
  9742. this.$forceUpdate();
  9743. },
  9744. deleteHomeworkBox(unitIndex, index, i) {
  9745. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  9746. this.taskCount
  9747. ].homeworkList.splice(i, 1);
  9748. },
  9749. getStudent() {
  9750. let params = {
  9751. oid: this.oid,
  9752. cu: "",
  9753. cn: this.searchPeople,
  9754. };
  9755. this.ajax
  9756. .get(this.$store.state.api + "selectStudentAdd", params)
  9757. .then((res) => {
  9758. this.studentJuri = res.data[0];
  9759. })
  9760. .catch((err) => {
  9761. this.isLoading = false;
  9762. console.error(err);
  9763. });
  9764. },
  9765. // 添加协同成员其他选项按钮
  9766. getTeacherCopy(){
  9767. this.CollLoading=true
  9768. this.collid = ''
  9769. this.collid = '1xpz'
  9770. let params = {
  9771. oid:
  9772. this.org && this.org != "undefined" && this.org != "null"
  9773. ? this.org
  9774. : this.oid,
  9775. cu: "",
  9776. cn: this.searchTN,
  9777. coll: ''
  9778. };
  9779. this.ajax
  9780. .get(
  9781. this.$store.state.api +
  9782. (this.org && this.org != "undefined" && this.org != "null"
  9783. ? "selectCollaborativeMembersOrg"
  9784. : "selectCollaborativeMembers"),
  9785. params
  9786. )
  9787. .then((res) => {
  9788. let teacherJuri = res.data[0];
  9789. this.CollaborativeTeaList = res.data[1];
  9790. for (var i = 0; i < teacherJuri.length; i++) {
  9791. if (teacherJuri[i].userid == this.userid) {
  9792. teacherJuri.splice(i, 1);
  9793. break;
  9794. }
  9795. }
  9796. this.teacherJuri = teacherJuri.filter((i,index)=>{
  9797. return (i.cclassid == '' || i.cclassid == null)
  9798. })
  9799. console.log(' this.teacherJuri', this.teacherJuri);
  9800. let _check = [];
  9801. let _check2 = [];
  9802. for (var i = 0; i < this.teacherJuri.length; i++) {
  9803. var gid = this.teacherJuri[i].userid;
  9804. _check.push(gid);
  9805. }
  9806. for (var i = 0; i < this.checkboxList3.length; i++) {
  9807. var _id = this.checkboxList3[i];
  9808. if (_check.indexOf(_id) !== -1) {
  9809. _check2.push(_id);
  9810. }
  9811. }
  9812. if (_check2.length==0 && _check.length==0) {
  9813. }else{
  9814. this.checkAll2 = _check2.length === _check.length;
  9815. }
  9816. this.CollLoading=false
  9817. })
  9818. .catch((err) => {
  9819. console.error(err);
  9820. this.CollLoading=false
  9821. });
  9822. },
  9823. getTeacher(val) {
  9824. this.CollLoading=true
  9825. this.collid = ''
  9826. this.collid = !val ? '' : val
  9827. let params = {
  9828. oid:
  9829. this.org && this.org != "undefined" && this.org != "null"
  9830. ? this.org
  9831. : this.oid,
  9832. cu: "",
  9833. cn: this.searchTN,
  9834. coll: this.collid
  9835. };
  9836. this.ajax
  9837. .get(
  9838. this.$store.state.api +
  9839. (this.org && this.org != "undefined" && this.org != "null"
  9840. ? "selectCollaborativeMembersOrg"
  9841. : "selectCollaborativeMembers"),
  9842. params
  9843. )
  9844. .then((res) => {
  9845. let teacherJuri = res.data[0];
  9846. this.CollaborativeTeaList = res.data[1];
  9847. for (var i = 0; i < teacherJuri.length; i++) {
  9848. if (teacherJuri[i].userid == this.userid) {
  9849. teacherJuri.splice(i, 1);
  9850. break;
  9851. }
  9852. }
  9853. this.teacherJuri = teacherJuri;
  9854. let _check = [];
  9855. let _check2 = [];
  9856. for (var i = 0; i < this.teacherJuri.length; i++) {
  9857. var gid = this.teacherJuri[i].userid;
  9858. _check.push(gid);
  9859. }
  9860. for (var i = 0; i < this.checkboxList3.length; i++) {
  9861. var _id = this.checkboxList3[i];
  9862. if (_check.indexOf(_id) !== -1) {
  9863. _check2.push(_id);
  9864. }
  9865. }
  9866. if (_check2.length==0 && _check.length==0) {
  9867. }else{
  9868. this.checkAll2 = _check2.length === _check.length;
  9869. }
  9870. this.CollLoading=false
  9871. })
  9872. .catch((err) => {
  9873. console.error(err);
  9874. this.CollLoading=false
  9875. });
  9876. },
  9877. searchStudent() {
  9878. this.getStudent();
  9879. },
  9880. selectGrage() {
  9881. let params = {
  9882. oid: this.oid,
  9883. };
  9884. this.ajax
  9885. .get(this.$store.state.api + "selectGrageBySchool", params)
  9886. .then((res) => {
  9887. this.gradeList = res.data[0];
  9888. })
  9889. .catch((err) => {
  9890. this.isLoading = false;
  9891. console.error(err);
  9892. });
  9893. },
  9894. //获取班级列表
  9895. getClass() {
  9896. let params = {
  9897. oid: this.oid,
  9898. gid: this.gradeId,
  9899. cn: this.classSearch,
  9900. };
  9901. this.ajax
  9902. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  9903. .then((res) => {
  9904. if (!this.grade.length) {
  9905. this.grade = res.data[0];
  9906. }
  9907. this.grade2 = res.data[0];
  9908. this.classJuri = res.data[0];
  9909. let _check = [];
  9910. let _check2 = [];
  9911. for (var i = 0; i < this.grade2.length; i++) {
  9912. var gid = this.grade2[i].id;
  9913. _check.push(gid);
  9914. }
  9915. for (var i = 0; i < this.checkboxList2.length; i++) {
  9916. var _id = this.checkboxList2[i];
  9917. if (_check.indexOf(_id) !== -1) {
  9918. _check2.push(_id);
  9919. }
  9920. }
  9921. this.checkAll = _check2.length === _check.length;
  9922. })
  9923. .catch((err) => {
  9924. this.isLoading = false;
  9925. console.error(err);
  9926. });
  9927. },
  9928. CourseType2Change(val) {
  9929. this.pTypeCheck = [];
  9930. for (var i = 0; i < this.CourseType2.length; i++) {
  9931. let typeA = this.CourseType2[i];
  9932. if (val.indexOf(typeA.name) != -1) {
  9933. this.pTypeCheck.push(...typeA.id);
  9934. }
  9935. }
  9936. },
  9937. getChapterData(e, i, j, ic, type) {
  9938. e.stopPropagation();
  9939. this.updataC = true;
  9940. this.icc = ic;
  9941. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  9942. console.log("还不能下载图片喔");
  9943. }
  9944. },
  9945. deleteChapterData(e, i, j, ic, taskI) {
  9946. e.stopPropagation();
  9947. let _this = this;
  9948. _this
  9949. .$confirm("确定删除此项?", "提示", {
  9950. confirmButtonText: "确定",
  9951. cancelButtonText: "取消",
  9952. type: "warning",
  9953. })
  9954. .then(() => {
  9955. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  9956. ic,
  9957. 1
  9958. );
  9959. })
  9960. .catch(() => {
  9961. return;
  9962. });
  9963. },
  9964. checkInfoData(fileid, file){
  9965. let type = 1
  9966. let index = 0
  9967. for(let i = 0; i < this.infoData.length; i++){
  9968. if(this.infoData[i].fileid == fileid){
  9969. type = 2
  9970. index = i
  9971. }
  9972. }
  9973. if(type == 2){
  9974. this.infoData.splice(index, 1)
  9975. }else {
  9976. this.infoData.push({...file})
  9977. }
  9978. },
  9979. deleteInfoData(e, ic) {
  9980. e.stopPropagation();
  9981. let _this = this;
  9982. _this
  9983. .$confirm("确定删除此项?", "提示", {
  9984. confirmButtonText: "确定",
  9985. cancelButtonText: "取消",
  9986. type: "warning",
  9987. })
  9988. .then(() => {
  9989. _this.infoData.splice(
  9990. ic,
  9991. 1
  9992. );
  9993. })
  9994. .catch(() => {
  9995. return;
  9996. });
  9997. },
  9998. deleteInfoData2(e, ic) {
  9999. e.stopPropagation();
  10000. let _this = this;
  10001. _this
  10002. .$confirm("确定删除此项?", "提示", {
  10003. confirmButtonText: "确定",
  10004. cancelButtonText: "取消",
  10005. type: "warning",
  10006. })
  10007. .then(() => {
  10008. _this.infoData2.splice(
  10009. ic,
  10010. 1
  10011. );
  10012. })
  10013. .catch(() => {
  10014. return;
  10015. });
  10016. },
  10017. deleteCankaoInfoData(e, ic) {
  10018. e.stopPropagation();
  10019. let _this = this;
  10020. _this
  10021. .$confirm("确定删除此项?", "提示", {
  10022. confirmButtonText: "确定",
  10023. cancelButtonText: "取消",
  10024. type: "warning",
  10025. })
  10026. .then(() => {
  10027. _this.cankaoInfoData.splice(
  10028. ic,
  10029. 1
  10030. );
  10031. })
  10032. .catch(() => {
  10033. return;
  10034. });
  10035. },
  10036. deleteTeacherInfoData(e, ic) {
  10037. e.stopPropagation();
  10038. let _this = this;
  10039. _this
  10040. .$confirm("确定删除此项?", "提示", {
  10041. confirmButtonText: "确定",
  10042. cancelButtonText: "取消",
  10043. type: "warning",
  10044. })
  10045. .then(() => {
  10046. _this.teacherInfoData.splice(
  10047. ic,
  10048. 1
  10049. );
  10050. })
  10051. .catch(() => {
  10052. return;
  10053. });
  10054. },
  10055. updataVideoT(e, i, j, ic) {
  10056. // e.stopPropagation();
  10057. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  10058. // ic
  10059. // ].name = JSON.parse(JSON.stringify(e.target.value));
  10060. this.line =
  10061. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  10062. this.taskCount = j;
  10063. this.lineCount = ic;
  10064. this.dialogVisibleupdataVideoT = true;
  10065. this.$forceUpdate();
  10066. },
  10067. checkChpater(e, i, j, ic){
  10068. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  10069. if(type == 3){
  10070. var fileA = [
  10071. "DOC",
  10072. "DOCX",
  10073. "DOCM",
  10074. "DOTM",
  10075. "DOTX",
  10076. "PPTX",
  10077. "PPSX",
  10078. "PPT",
  10079. "PPS",
  10080. "PPTM",
  10081. "POTM",
  10082. "PPAM",
  10083. "POTX",
  10084. "PPSM",
  10085. "XLSX",
  10086. "XLS"
  10087. ];
  10088. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  10089. if (
  10090. fileA.indexOf(
  10091. url.split(".")[
  10092. url.split(".").length - 1
  10093. ].toLocaleUpperCase()
  10094. ) != -1
  10095. ) {
  10096. this.dialogVisibleOffice = true
  10097. this.wurl = url
  10098. } else if (
  10099. "pdf".indexOf(
  10100. url.split(".")[
  10101. url.split(".").length - 1
  10102. ].toLocaleLowerCase()
  10103. ) != -1
  10104. ) {
  10105. this.dialogVisiblePdf = true
  10106. this.wurl = url
  10107. }
  10108. }
  10109. },
  10110. checkChpater2(e, ic){
  10111. let type = this.infoData2[ic].type
  10112. if(type == 3){
  10113. var fileA = [
  10114. "DOC",
  10115. "DOCX",
  10116. "DOCM",
  10117. "DOTM",
  10118. "DOTX",
  10119. "PPTX",
  10120. "PPSX",
  10121. "PPT",
  10122. "PPS",
  10123. "PPTM",
  10124. "POTM",
  10125. "PPAM",
  10126. "POTX",
  10127. "PPSM",
  10128. "XLSX",
  10129. "XLS"
  10130. ];
  10131. let url = this.infoData2[ic].url
  10132. if (
  10133. fileA.indexOf(
  10134. url.split(".")[
  10135. url.split(".").length - 1
  10136. ].toLocaleUpperCase()
  10137. ) != -1
  10138. ) {
  10139. this.dialogVisibleOffice = true
  10140. this.wurl = url
  10141. } else if (
  10142. "pdf".indexOf(
  10143. url.split(".")[
  10144. url.split(".").length - 1
  10145. ].toLocaleLowerCase()
  10146. ) != -1
  10147. ) {
  10148. this.dialogVisiblePdf = true
  10149. this.wurl = url
  10150. }
  10151. }
  10152. },
  10153. updataVideoC() {
  10154. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10155. this.taskCount
  10156. ].chapterData[this.lineCount].name = JSON.parse(
  10157. JSON.stringify(this.line)
  10158. );
  10159. this.dialogVisibleupdataVideoT = false;
  10160. this.$forceUpdate();
  10161. },
  10162. upCd(e, i, j, taskCount, ic) {
  10163. e.stopPropagation();
  10164. if (ic == 0) {
  10165. return;
  10166. }
  10167. var a = JSON.parse(
  10168. JSON.stringify(
  10169. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  10170. ic - 1
  10171. ]
  10172. )
  10173. );
  10174. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  10175. JSON.parse(
  10176. JSON.stringify(
  10177. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  10178. )
  10179. );
  10180. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  10181. this.$forceUpdate();
  10182. },
  10183. downCd(e, i, j, taskCount, ic) {
  10184. e.stopPropagation();
  10185. if (
  10186. ic ==
  10187. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  10188. 1
  10189. ) {
  10190. return;
  10191. }
  10192. var a = JSON.parse(
  10193. JSON.stringify(
  10194. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  10195. ic + 1
  10196. ]
  10197. )
  10198. );
  10199. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  10200. JSON.parse(
  10201. JSON.stringify(
  10202. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  10203. )
  10204. );
  10205. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  10206. this.$forceUpdate();
  10207. },
  10208. async upTool(e, i, j, tooli) {
  10209. e.stopPropagation();
  10210. if (tooli == 0) {
  10211. return;
  10212. }
  10213. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  10214. let count2 = await this.getWorksCount(3, i, j, tooli);
  10215. if (count1 > 0 || count2 > 0) {
  10216. this.$confirm(
  10217. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  10218. "提示",
  10219. {
  10220. confirmButtonText: "确定",
  10221. cancelButtonText: "取消",
  10222. type: "warning",
  10223. }
  10224. )
  10225. .then(() => {
  10226. var a = JSON.parse(
  10227. JSON.stringify(
  10228. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  10229. tooli - 1
  10230. ]
  10231. )
  10232. );
  10233. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  10234. JSON.parse(
  10235. JSON.stringify(
  10236. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10237. )
  10238. );
  10239. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10240. this.$forceUpdate();
  10241. })
  10242. .catch(() => {
  10243. return;
  10244. });
  10245. } else {
  10246. var a = JSON.parse(
  10247. JSON.stringify(
  10248. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  10249. )
  10250. );
  10251. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  10252. JSON.parse(
  10253. JSON.stringify(
  10254. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10255. )
  10256. );
  10257. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10258. this.$forceUpdate();
  10259. }
  10260. },
  10261. async downTool(e, i, j, tooli) {
  10262. e.stopPropagation();
  10263. if (
  10264. tooli ==
  10265. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  10266. ) {
  10267. return;
  10268. }
  10269. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  10270. let count2 = await this.getWorksCount(3, i, j, tooli);
  10271. if (count1 > 0 || count2 > 0) {
  10272. this.$confirm(
  10273. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  10274. "提示",
  10275. {
  10276. confirmButtonText: "确定",
  10277. cancelButtonText: "取消",
  10278. type: "warning",
  10279. }
  10280. )
  10281. .then(() => {
  10282. var a = JSON.parse(
  10283. JSON.stringify(
  10284. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  10285. tooli + 1
  10286. ]
  10287. )
  10288. );
  10289. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  10290. JSON.parse(
  10291. JSON.stringify(
  10292. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10293. )
  10294. );
  10295. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10296. this.$forceUpdate();
  10297. })
  10298. .catch(() => {
  10299. return;
  10300. });
  10301. } else {
  10302. var a = JSON.parse(
  10303. JSON.stringify(
  10304. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  10305. )
  10306. );
  10307. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  10308. JSON.parse(
  10309. JSON.stringify(
  10310. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10311. )
  10312. );
  10313. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10314. this.$forceUpdate();
  10315. }
  10316. },
  10317. addWork(type) {
  10318. if(type == 2 && this.courseName == "") {
  10319. this.$message.error("请补充填写课程名称");
  10320. return;
  10321. }
  10322. let cPan = 1;
  10323. for (var i = 0; i < this.unitJson.length; i++) {
  10324. for (
  10325. var j = 0;
  10326. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  10327. j++
  10328. ) {
  10329. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  10330. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  10331. if (
  10332. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  10333. ) {
  10334. for (
  10335. var z = 0;
  10336. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  10337. z++
  10338. ) {
  10339. if (
  10340. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  10341. .length
  10342. ) {
  10343. this.$message.error("请把工具添加完整");
  10344. cPan = 2;
  10345. break;
  10346. }
  10347. }
  10348. }
  10349. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  10350. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  10351. i
  10352. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  10353. return ele.value != "";
  10354. });
  10355. }
  10356. }
  10357. }
  10358. this.inputShow = true;
  10359. if (cPan == 2) {
  10360. this.steps--;
  10361. return;
  10362. }
  10363. for (var i = 0; i < this.unitJson.length; i++) {
  10364. delete this.unitJson[i].isUpdate;
  10365. }
  10366. if(!this.targetCourseText2){
  10367. this.courseText = this.targetCourseText ? JSON.parse(JSON.stringify(this.targetCourseText)) : this.courseText
  10368. }
  10369. let params = [
  10370. {
  10371. uid: this.userid,
  10372. title: this.courseName,
  10373. brief: this.courseText,
  10374. cover:
  10375. this.cover.length > 0
  10376. ? JSON.stringify(this.cover)
  10377. : JSON.stringify([
  10378. {
  10379. name: "noBanner.jpg",
  10380. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  10381. uid: 1656409780264,
  10382. status: "success",
  10383. },
  10384. ]),
  10385. evaId: this.evalua,
  10386. astudent:
  10387. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  10388. see: this.isTeacherSee == true ? 1 : 0,
  10389. chapters: JSON.stringify(this.unitJson),
  10390. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  10391. courseType: JSON.stringify(this.courseTypeId),
  10392. ateacher:
  10393. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  10394. inviteCode: JSON.stringify(this.inviteCode),
  10395. refile: JSON.stringify(this.infoData),
  10396. reBrief: this.courseText2,
  10397. cpote: JSON.stringify(this.cpote),
  10398. setting: JSON.stringify({
  10399. courseJie: this.courseJie,
  10400. courseTime: this.courseTime,
  10401. teacherInfoData: this.teacherInfoData,
  10402. teacherCourseText: this.teacherCourseText,
  10403. targetCourseText: this.targetCourseText,
  10404. cankaoInfoData: this.cankaoInfoData,
  10405. infoData2: this.infoData2,
  10406. isuseT: this.isuseT,
  10407. mode: this.mode,
  10408. targetCourseText2: this.targetCourseText2,
  10409. }),
  10410. iresearch: this.isFileSearch ? 1 : 2,
  10411. },
  10412. ];
  10413. this.ajax
  10414. .post(this.$store.state.api + "addWorkNew2AI3", params)
  10415. .then((res) => {
  10416. console.log(this.steps);
  10417. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  10418. this.$message({
  10419. message: "新增成功",
  10420. type: "success",
  10421. });
  10422. }
  10423. this.number = res.data.ordernumber;
  10424. this.courseId = res.data.courseId;
  10425. this.cid = res.data.courseId;
  10426. this.courseUserid = this.userid;
  10427. this.islogin = true;
  10428. // this.updateCourseState(4);
  10429. this.updateCourseState(5);
  10430. this.addtips()
  10431. if(type == 2){
  10432. this.retrunCourse()
  10433. }
  10434. })
  10435. .catch((err) => {
  10436. this.$message.error("网络不佳");
  10437. console.error(err);
  10438. });
  10439. },
  10440. goCourse() {
  10441. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  10442. },
  10443. updateWork2() {
  10444. let _unitIndex = this.unitIndex;
  10445. let cPan = 1;
  10446. for (
  10447. var j = 0;
  10448. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  10449. j++
  10450. ) {
  10451. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  10452. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  10453. j
  10454. ].proVisible2 = false;
  10455. if (
  10456. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10457. .length > 1
  10458. ) {
  10459. for (
  10460. var z = 0;
  10461. z <
  10462. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10463. .length;
  10464. z++
  10465. ) {
  10466. if (
  10467. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  10468. z
  10469. ].tool.length
  10470. ) {
  10471. this.$message.error("请把工具添加完整");
  10472. cPan = 2;
  10473. break;
  10474. }
  10475. }
  10476. }
  10477. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  10478. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  10479. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  10480. (ele) => {
  10481. return ele.value != "";
  10482. }
  10483. );
  10484. }
  10485. }
  10486. this.inputShow = true;
  10487. if (cPan == 2) {
  10488. this.steps--;
  10489. return;
  10490. }
  10491. let params = [
  10492. {
  10493. cid: this.cid,
  10494. chapters: JSON.stringify(this.unitJson),
  10495. uid: this.userid,
  10496. unitIndex: _unitIndex,
  10497. },
  10498. ];
  10499. this.ajax
  10500. .post(this.$store.state.api + "updateWorkNew4", params)
  10501. .then((res) => {
  10502. this.$message({
  10503. message: "修改成功",
  10504. type: "success",
  10505. });
  10506. this.courseId = this.cid;
  10507. this.addtips();
  10508. })
  10509. .catch((err) => {
  10510. this.$message.error("网络不佳");
  10511. console.error(err);
  10512. });
  10513. },
  10514. updateWork3(unitIndex) {
  10515. let _unitIndex = unitIndex;
  10516. let cPan = 1;
  10517. for (
  10518. var j = 0;
  10519. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  10520. j++
  10521. ) {
  10522. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  10523. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  10524. j
  10525. ].proVisible2 = false;
  10526. if (
  10527. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10528. .length > 1
  10529. ) {
  10530. for (
  10531. var z = 0;
  10532. z <
  10533. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  10534. .length;
  10535. z++
  10536. ) {
  10537. if (
  10538. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  10539. z
  10540. ].tool.length
  10541. ) {
  10542. this.$message.error("请把工具添加完整");
  10543. cPan = 2;
  10544. break;
  10545. }
  10546. }
  10547. }
  10548. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  10549. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  10550. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  10551. (ele) => {
  10552. return ele.value != "";
  10553. }
  10554. );
  10555. }
  10556. }
  10557. this.inputShow = true;
  10558. if (cPan == 2) {
  10559. this.steps--;
  10560. return;
  10561. }
  10562. let params = [
  10563. {
  10564. cid: this.cid,
  10565. chapters: JSON.stringify(this.unitJson),
  10566. uid: this.userid,
  10567. unitIndex: _unitIndex,
  10568. },
  10569. ];
  10570. this.ajax
  10571. .post(this.$store.state.api + "updateWorkNew4", params)
  10572. .then((res) => {
  10573. // this.$message({
  10574. // message: "修改成功",
  10575. // type: "success",
  10576. // });
  10577. this.courseId = this.cid;
  10578. this.addtips()
  10579. })
  10580. .catch((err) => {
  10581. this.$message.error("网络不佳");
  10582. console.error(err);
  10583. });
  10584. },
  10585. updateWork() {
  10586. let cPan = 1;
  10587. for (var i = 0; i < this.unitJson.length; i++) {
  10588. for (
  10589. var j = 0;
  10590. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  10591. j++
  10592. ) {
  10593. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  10594. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  10595. if (
  10596. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  10597. ) {
  10598. for (
  10599. var z = 0;
  10600. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  10601. z++
  10602. ) {
  10603. if (
  10604. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  10605. .length
  10606. ) {
  10607. this.$message.error("请把工具添加完整");
  10608. cPan = 2;
  10609. break;
  10610. }
  10611. }
  10612. }
  10613. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  10614. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  10615. i
  10616. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  10617. return ele.value != "";
  10618. });
  10619. }
  10620. }
  10621. }
  10622. this.inputShow = true;
  10623. if (cPan == 2) {
  10624. this.steps--;
  10625. return;
  10626. }
  10627. for (var i = 0; i < this.unitJson.length; i++) {
  10628. delete this.unitJson[i].isUpdate;
  10629. }
  10630. if(!this.targetCourseText2){
  10631. this.courseText = this.targetCourseText ? JSON.parse(JSON.stringify(this.targetCourseText)) : this.courseText
  10632. }
  10633. let params = [
  10634. {
  10635. cid: this.cid,
  10636. title: this.courseName,
  10637. brief: this.courseText,
  10638. cover:
  10639. this.cover.length > 0
  10640. ? JSON.stringify(this.cover)
  10641. : JSON.stringify([
  10642. {
  10643. name: "noBanner.jpg",
  10644. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  10645. uid: 1656409780264,
  10646. status: "success",
  10647. },
  10648. ]),
  10649. evaId: this.evalua,
  10650. astudent:
  10651. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  10652. see: this.isTeacherSee == true ? 1 : 0,
  10653. chapters: JSON.stringify(this.unitJson),
  10654. template: this.myWord != "undefined" ? this.myWord : [],
  10655. uid: this.userid,
  10656. courseType: JSON.stringify(this.courseTypeId),
  10657. ateacher:
  10658. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  10659. inviteCode: JSON.stringify(this.inviteCode),
  10660. refile: JSON.stringify(this.infoData),
  10661. reBrief: this.courseText2,
  10662. cpote: JSON.stringify(this.cpote),
  10663. setting: JSON.stringify({
  10664. courseJie: this.courseJie,
  10665. courseTime: this.courseTime,
  10666. teacherInfoData: this.teacherInfoData,
  10667. teacherCourseText: this.teacherCourseText,
  10668. targetCourseText: this.targetCourseText,
  10669. cankaoInfoData: this.cankaoInfoData,
  10670. infoData2: this.infoData2,
  10671. isuseT: this.isuseT,
  10672. mode: this.mode,
  10673. targetCourseText2: this.targetCourseText2,
  10674. }),
  10675. iresearch: this.isFileSearch ? 1 : 2,
  10676. },
  10677. ];
  10678. this.ajax
  10679. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  10680. .then((res) => {
  10681. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  10682. if (this.cidType == 1) {
  10683. this.$message({
  10684. message: "修改成功",
  10685. type: "success",
  10686. });
  10687. } else {
  10688. this.$message({
  10689. message: "新增成功",
  10690. type: "success",
  10691. });
  10692. }
  10693. }
  10694. this.number = this.nbOrder;
  10695. this.courseId = this.cid;
  10696. this.addtips()
  10697. })
  10698. .catch((err) => {
  10699. this.$message.error("网络不佳");
  10700. console.error(err);
  10701. });
  10702. },
  10703. insertWord() {
  10704. this.dialogVisible1 = true;
  10705. this.updateBoolean2 = false;
  10706. this.tTitle = "";
  10707. this.tdetail = "";
  10708. },
  10709. addWord() {
  10710. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  10711. name: this.tTitle,
  10712. content: this.tdetail,
  10713. uid: this.guid(),
  10714. });
  10715. this.dialogVisible1 = false;
  10716. },
  10717. upWord() { },
  10718. selectWord(uid, i, c) {
  10719. this.dialogVisible1 = true;
  10720. this.updateBoolean2 = true;
  10721. if (
  10722. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  10723. ) {
  10724. this.tTitle =
  10725. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  10726. this.tdetail =
  10727. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  10728. }
  10729. },
  10730. isAddPP() {
  10731. if (this.checkboxList.length > 0) {
  10732. this.$message({
  10733. message: "添加成功",
  10734. type: "success",
  10735. });
  10736. this.dialogVisible3 = false;
  10737. } else {
  10738. this.$message({
  10739. message: "请添加课程成员",
  10740. type: "error",
  10741. });
  10742. }
  10743. },
  10744. isAddClass() {
  10745. this.dialogVisibleClass = false;
  10746. },
  10747. isAddPPTeacher() {
  10748. this.dialogVisibleMember = false;
  10749. this.setMan();
  10750. },
  10751. getTipsTemplate(){
  10752. if(this.templateid){
  10753. let params = {
  10754. id: this.templateid
  10755. }
  10756. this.ajax
  10757. .get(this.$store.state.api + "selectTipsTemplateById", params)
  10758. .then((res) => {
  10759. if(res.data[0].length){
  10760. this.tipsJson = res.data[0][0]
  10761. this.aiJson = JSON.parse(res.data[0][0].tips)
  10762. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  10763. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  10764. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  10765. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  10766. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,从你的知识库去检索5个最相关的信息'
  10767. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  10768. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  10769. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  10770. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  10771. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  10772. }
  10773. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  10774. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  10775. // }
  10776. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  10777. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  10778. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  10779. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  10780. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  10781. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,从你的知识库去检索5个最相关的信息'
  10782. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  10783. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  10784. // }
  10785. this.$forceUpdate();
  10786. }
  10787. })
  10788. .catch((err) => { });
  10789. }
  10790. },
  10791. getTemplate() {
  10792. this.ajax
  10793. .get(this.$store.state.api + "getCourseTemplateT", "")
  10794. .then((res) => {
  10795. this.templateArray = res.data[0];
  10796. this.getTemplateOid();
  10797. this.$forceUpdate();
  10798. })
  10799. .catch((err) => { });
  10800. },
  10801. getTemplateOid() {
  10802. let params = {
  10803. oid: this.oid,
  10804. };
  10805. this.ajax
  10806. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  10807. .then((res) => {
  10808. if (res.data[0].length) {
  10809. this.templateArray = [...res.data[0], ...this.templateArray];
  10810. }
  10811. this.getTemplateOrg();
  10812. this.$forceUpdate();
  10813. })
  10814. .catch((err) => { });
  10815. },
  10816. getTemplateOrg() {
  10817. let params = {
  10818. oid: this.org,
  10819. };
  10820. this.ajax
  10821. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  10822. .then((res) => {
  10823. if (res.data[0].length) {
  10824. this.templateArray = [...res.data[0], ...this.templateArray];
  10825. }
  10826. this.$forceUpdate();
  10827. })
  10828. .catch((err) => { });
  10829. },
  10830. clearChoose() {
  10831. this.clearArray.splice(this.templateC.id, 1);
  10832. this.dialogVisible2 = false;
  10833. },
  10834. clearAttText() {
  10835. this.AttText = {
  10836. title: "",
  10837. text: "",
  10838. };
  10839. this.dialogVisible6 = false;
  10840. },
  10841. clearLine() {
  10842. this.line = "";
  10843. this.dialogVisible7 = false;
  10844. },
  10845. openTemplate() {
  10846. this.ctJson = {};
  10847. this.templateDialog = true;
  10848. },
  10849. checkctJson(json) {
  10850. if (this.ctJson.id == json.id) {
  10851. this.ctJson = {};
  10852. } else {
  10853. this.ctJson = json;
  10854. }
  10855. },
  10856. addTemplate(res) {
  10857. let _this = this;
  10858. let _res = [];
  10859. if (res.id == 1) {
  10860. _res = [
  10861. {
  10862. dyName: "", //单元标题
  10863. easy: 1,
  10864. chapterInfo: [
  10865. {
  10866. isread: false,
  10867. chapterid: this.guid(),
  10868. title: "",
  10869. courseName: "",
  10870. taskJson: [
  10871. {
  10872. task: "",
  10873. taskDetail: "",
  10874. chapterData: [],
  10875. toolText: "",
  10876. toolChoose: [
  10877. {
  10878. tool: [],
  10879. toolDetail: "",
  10880. toolType: 0,
  10881. askCount: 1,
  10882. askTitle: "",
  10883. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10884. },
  10885. ],
  10886. isShowTools: false,
  10887. askCount: 1,
  10888. isFold: 1,
  10889. askTitle: "",
  10890. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10891. checkJson: [{ checkCount: [], checkPerent: [] }],
  10892. homeworkList: [],
  10893. },
  10894. ],
  10895. itemCount: 1,
  10896. fileList1: [],
  10897. video: [],
  10898. testData: [],
  10899. pData: [],
  10900. templateArray: [],
  10901. },
  10902. ],
  10903. },
  10904. ];
  10905. this.updateCourseState(1);
  10906. } else if (res.id == 2) {
  10907. let stageData = [];
  10908. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  10909. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  10910. if (!iframe && !iframe2) {
  10911. this.$message.error("请使用AI共创生成");
  10912. return;
  10913. }
  10914. let copyData = iframe ? iframe.contentWindow.copyData : false;
  10915. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  10916. if (
  10917. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  10918. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  10919. ) {
  10920. this.$message.error("请使用AI共创生成");
  10921. return;
  10922. }
  10923. stageData = copyData
  10924. ? copyData.stageData
  10925. : copyData2
  10926. ? copyData2.stageData
  10927. : [""];
  10928. for (var i = 0; i < stageData.length; i++) {
  10929. _res.push({
  10930. dyName: stageData[i], //单元标题
  10931. chapterInfo: [
  10932. {
  10933. isread: false,
  10934. chapterid: this.guid(),
  10935. title: "",
  10936. courseName: "",
  10937. taskJson: [
  10938. {
  10939. task: "",
  10940. taskDetail: "",
  10941. chapterData: [],
  10942. toolText: "",
  10943. toolChoose: [
  10944. {
  10945. tool: [],
  10946. toolDetail: "",
  10947. toolType: 0,
  10948. askCount: 1,
  10949. askTitle: "",
  10950. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10951. },
  10952. ],
  10953. isShowTools: false,
  10954. askCount: 1,
  10955. isFold: 1,
  10956. askTitle: "",
  10957. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10958. checkJson: [{ checkCount: [], checkPerent: [] }],
  10959. homeworkList: [],
  10960. },
  10961. ],
  10962. itemCount: 1,
  10963. fileList1: [],
  10964. video: [],
  10965. testData: [],
  10966. pData: [],
  10967. templateArray: [],
  10968. },
  10969. ],
  10970. });
  10971. }
  10972. this.updateCourseState(1);
  10973. } else if (!Object.keys(res).length) {
  10974. this.$message.error("请选择模板");
  10975. retrun;
  10976. } else {
  10977. _res = JSON.parse(res.chapters);
  10978. this.updateCourseState(parseInt(res.state));
  10979. }
  10980. _this
  10981. .$confirm(
  10982. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  10983. "提示",
  10984. {
  10985. confirmButtonText: "确定",
  10986. cancelButtonText: "取消",
  10987. type: "warning",
  10988. }
  10989. )
  10990. .then(() => {
  10991. _this.unitJson = _res;
  10992. _this.updateWork();
  10993. // _this.steps++;
  10994. _this.templateDialog = false;
  10995. setTimeout(() => {
  10996. this.checkEva(this.checkId);
  10997. setTimeout(() => {
  10998. this.checkEva(this.checkId);
  10999. }, 100);
  11000. }, 1000);
  11001. })
  11002. .catch(() => {
  11003. return;
  11004. });
  11005. },
  11006. checkTemplate(res) {
  11007. let _this = this;
  11008. _this
  11009. .$confirm(
  11010. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11011. "提示",
  11012. {
  11013. confirmButtonText: "确定",
  11014. cancelButtonText: "取消",
  11015. type: "warning",
  11016. }
  11017. )
  11018. .then(() => {
  11019. _this.unitJson = JSON.parse(res.chapters);
  11020. _this.steps++;
  11021. setTimeout(() => {
  11022. this.checkEva(this.checkId);
  11023. setTimeout(() => {
  11024. this.checkEva(this.checkId);
  11025. }, 100);
  11026. }, 1000);
  11027. })
  11028. .catch(() => {
  11029. return;
  11030. });
  11031. },
  11032. checkTemplate1(w) {
  11033. this.steps++;
  11034. },
  11035. checkTemplate2() {
  11036. let _this = this;
  11037. _this
  11038. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  11039. confirmButtonText: "确定",
  11040. cancelButtonText: "取消",
  11041. type: "warning",
  11042. })
  11043. .then(() => {
  11044. _this.unitIndex = 0;
  11045. _this.unitJson = [
  11046. {
  11047. dyName: "", //单元标题
  11048. chapterInfo: [
  11049. {
  11050. isread: false,
  11051. chapterid: this.guid(),
  11052. title: "",
  11053. courseName: "",
  11054. taskJson: [
  11055. {
  11056. task: "",
  11057. taskDetail: "",
  11058. chapterData: [],
  11059. toolText: "",
  11060. toolChoose: [
  11061. {
  11062. tool: [],
  11063. toolDetail: "",
  11064. toolType: 0,
  11065. askCount: 1,
  11066. askTitle: "",
  11067. askJson: [
  11068. { askstitle: "", askItem: 1, checkList: [] },
  11069. ],
  11070. },
  11071. ],
  11072. isShowTools: false,
  11073. askCount: 1,
  11074. isFold: 1,
  11075. askTitle: "",
  11076. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11077. checkJson: [{ checkCount: [], checkPerent: [] }],
  11078. homeworkList: [],
  11079. },
  11080. ],
  11081. itemCount: 1,
  11082. fileList1: [],
  11083. video: [],
  11084. testData: [],
  11085. pData: [],
  11086. templateArray: [],
  11087. },
  11088. ],
  11089. },
  11090. ];
  11091. this.steps++;
  11092. setTimeout(() => {
  11093. this.checkEva(this.checkId);
  11094. setTimeout(() => {
  11095. this.checkEva(this.checkId);
  11096. }, 100);
  11097. }, 1000);
  11098. this.updateWork();
  11099. })
  11100. .catch(() => {
  11101. return;
  11102. });
  11103. },
  11104. checkTemplate3() {
  11105. let _this = this;
  11106. _this
  11107. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  11108. confirmButtonText: "确定",
  11109. cancelButtonText: "取消",
  11110. type: "warning",
  11111. })
  11112. .then(() => {
  11113. _this.unitIndex = 0;
  11114. _this.unitJson = [
  11115. {
  11116. dyName: "", //单元标题
  11117. easy: 1,
  11118. chapterInfo: [
  11119. {
  11120. isread: false,
  11121. chapterid: this.guid(),
  11122. title: "",
  11123. courseName: "",
  11124. taskJson: [
  11125. {
  11126. task: "",
  11127. taskDetail: "",
  11128. chapterData: [],
  11129. toolText: "",
  11130. toolChoose: [
  11131. {
  11132. tool: [],
  11133. toolDetail: "",
  11134. toolType: 0,
  11135. askCount: 1,
  11136. askTitle: "",
  11137. askJson: [
  11138. { askstitle: "", askItem: 1, checkList: [] },
  11139. ],
  11140. },
  11141. ],
  11142. isShowTools: false,
  11143. askCount: 1,
  11144. isFold: 1,
  11145. askTitle: "",
  11146. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11147. checkJson: [{ checkCount: [], checkPerent: [] }],
  11148. homeworkList: [],
  11149. },
  11150. ],
  11151. itemCount: 1,
  11152. fileList1: [],
  11153. video: [],
  11154. testData: [],
  11155. pData: [],
  11156. templateArray: [],
  11157. },
  11158. ],
  11159. },
  11160. ];
  11161. // this.steps++;
  11162. this.updateWork();
  11163. })
  11164. .catch(() => {
  11165. return;
  11166. });
  11167. },
  11168. checkTemplate4() {
  11169. let _this = this;
  11170. _this
  11171. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  11172. confirmButtonText: "确定",
  11173. cancelButtonText: "取消",
  11174. type: "warning",
  11175. })
  11176. .then(() => {
  11177. _this.unitIndex = 0;
  11178. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  11179. this.steps++;
  11180. this.updateWork();
  11181. })
  11182. .catch(() => {
  11183. return;
  11184. });
  11185. },
  11186. wordNext() {
  11187. this.dialogVisible2 = false;
  11188. },
  11189. isAddOrUpdateAttText() {
  11190. if (this.AttTextType == 0) {
  11191. this.addAttTextMessage();
  11192. } else {
  11193. this.updateAttText();
  11194. }
  11195. },
  11196. isAddOrUpdateLine() {
  11197. if (!this.lineTitle) {
  11198. this.$message.error("请填写链接标题");
  11199. return;
  11200. }
  11201. if (this.lineType == 0) {
  11202. this.addLine();
  11203. } else {
  11204. this.updateLine();
  11205. }
  11206. },
  11207. addAttTextMessage() {
  11208. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11209. this.taskCount
  11210. ].chapterData.unshift({
  11211. name: this.AttText.title,
  11212. url: this.AttText.text,
  11213. type: 6,
  11214. });
  11215. this.imgChange1(null, null, 6, this.taskCount);
  11216. this.dialogVisible6 = false;
  11217. },
  11218. selectAttText(itemTaskIndex, i) {
  11219. this.AttText.title =
  11220. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11221. itemTaskIndex
  11222. ].chapterData[i].name;
  11223. this.AttText.text =
  11224. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11225. itemTaskIndex
  11226. ].chapterData[i].url;
  11227. this.taskCount = itemTaskIndex;
  11228. this.AttTextIndex = i;
  11229. this.AttTextType = 1;
  11230. this.dialogVisible6 = true;
  11231. },
  11232. updateAttText() {
  11233. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11234. this.taskCount
  11235. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  11236. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11237. this.taskCount
  11238. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  11239. this.dialogVisible6 = false;
  11240. },
  11241. addLine() {
  11242. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11243. this.lineCount
  11244. ].chapterData.unshift({
  11245. name: "链接",
  11246. title: this.lineTitle,
  11247. url: this.line,
  11248. type: 8,
  11249. });
  11250. this.imgChange1(null, null, 8, this.lineCount);
  11251. this.dialogVisible7 = false;
  11252. },
  11253. selectLine(itemTaskIndex, i) {
  11254. this.line =
  11255. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11256. itemTaskIndex
  11257. ].chapterData[i].url;
  11258. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11259. itemTaskIndex
  11260. ].chapterData[i].title
  11261. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11262. .chapterData[i].title
  11263. : "";
  11264. this.taskCount = itemTaskIndex;
  11265. this.lineCount = i;
  11266. this.lineType = 1;
  11267. this.dialogVisible7 = true;
  11268. },
  11269. openUpdateSource(itemTaskIndex, i) {
  11270. this.sourceData = {};
  11271. let source =
  11272. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11273. .chapterData[i];
  11274. this.sourceData[source.id] = {};
  11275. this.sourceData[source.id].name = source.title;
  11276. this.sourceData[source.id].url = source.url;
  11277. this.dialogVisibleSource = true;
  11278. this.updateSourcePan = true;
  11279. this.taskCount = itemTaskIndex;
  11280. this.lineCount = i;
  11281. },
  11282. updateLine() {
  11283. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11284. this.taskCount
  11285. ].chapterData[this.lineCount].url = this.line;
  11286. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11287. this.taskCount
  11288. ].chapterData[this.lineCount].title = this.lineTitle;
  11289. this.dialogVisible7 = false;
  11290. },
  11291. addPP() {
  11292. this.dialogVisible3 = true;
  11293. },
  11294. goTo(path) {
  11295. this.$router.push(path);
  11296. },
  11297. openTools(itemTaskIndex, i, toolIndex) {
  11298. this.toolIndex = toolIndex;
  11299. this.taskCount = itemTaskIndex;
  11300. if (i == 4) {
  11301. if (toolIndex == null) {
  11302. var a =
  11303. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11304. .chapterData;
  11305. for (var i = 0; i < a.length; i++) {
  11306. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  11307. this.askJson =
  11308. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11309. itemTaskIndex
  11310. ].chapterData[i].askJson;
  11311. }
  11312. }
  11313. } else {
  11314. this.askJson = JSON.parse(
  11315. JSON.stringify(
  11316. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11317. itemTaskIndex
  11318. ].toolChoose[toolIndex]
  11319. )
  11320. );
  11321. }
  11322. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  11323. this.dialogVisible5 = true;
  11324. } else if (i == 45) {
  11325. if (
  11326. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11327. .toolChoose[toolIndex].testJson
  11328. ) {
  11329. this.testJson = JSON.parse(
  11330. JSON.stringify(
  11331. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11332. itemTaskIndex
  11333. ].toolChoose[toolIndex].testJson
  11334. )
  11335. );
  11336. } else {
  11337. var testJson = {
  11338. testCount: 1,
  11339. testTitle: "",
  11340. testJson: [
  11341. {
  11342. teststitle: "",
  11343. testItem: 1,
  11344. checkList: [],
  11345. timuList: [],
  11346. answer: [],
  11347. type: "1",
  11348. },
  11349. ],
  11350. };
  11351. this.testJson = testJson;
  11352. }
  11353. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  11354. this.dialogVisibleChoice = true;
  11355. } else if (i == 47) {
  11356. if (
  11357. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11358. .toolChoose[toolIndex].sentenceList
  11359. ) {
  11360. this.sentenceList = JSON.parse(
  11361. JSON.stringify(
  11362. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11363. itemTaskIndex
  11364. ].toolChoose[toolIndex].sentenceList
  11365. )
  11366. );
  11367. } else {
  11368. var sentenceList = [
  11369. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  11370. ];
  11371. this.sentenceList = sentenceList;
  11372. }
  11373. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  11374. this.dialogVisibleSentence = true;
  11375. } else if (i == 48) {
  11376. if (
  11377. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11378. .toolChoose[toolIndex].tableJson
  11379. ) {
  11380. this.tableJson = JSON.parse(
  11381. JSON.stringify(
  11382. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11383. itemTaskIndex
  11384. ].toolChoose[toolIndex].tableJson
  11385. )
  11386. );
  11387. } else {
  11388. var tableJson = { text: "" };
  11389. this.tableJson = tableJson;
  11390. }
  11391. this.dialogVisibleTable = true;
  11392. } else if (i == 52) {
  11393. if (
  11394. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11395. .toolChoose[toolIndex].wordJson
  11396. ) {
  11397. this.wordJson = JSON.parse(
  11398. JSON.stringify(
  11399. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11400. itemTaskIndex
  11401. ].toolChoose[toolIndex].wordJson
  11402. )
  11403. );
  11404. } else {
  11405. var wordJson = { text: "" };
  11406. this.wordJson = wordJson;
  11407. }
  11408. this.dialogVisibleWord = true;
  11409. // else if (i == 50) {
  11410. // if (
  11411. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11412. // .toolChoose[toolIndex].uploadJson
  11413. // ) {
  11414. // this.uploadJson = JSON.parse(
  11415. // JSON.stringify(
  11416. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11417. // itemTaskIndex
  11418. // ].toolChoose[toolIndex].uploadJson
  11419. // )
  11420. // );
  11421. // } else {
  11422. // var uploadJson = [];
  11423. // this.uploadJson = uploadJson;
  11424. // }
  11425. // this.dialogVisibleMoreUpload = true;
  11426. // }
  11427. } else if (i == 10) {
  11428. if (
  11429. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11430. .toolChoose[toolIndex].preTime
  11431. ) {
  11432. this.preTime = JSON.parse(
  11433. JSON.stringify(
  11434. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11435. itemTaskIndex
  11436. ].toolChoose[toolIndex].preTime
  11437. )
  11438. );
  11439. } else {
  11440. var preTime = 0;
  11441. this.preTime = preTime;
  11442. }
  11443. this.dialogVisiblePreTime = true;
  11444. } else if (i == 49) {
  11445. if (
  11446. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11447. .toolChoose[toolIndex].groupJson
  11448. ) {
  11449. this.groupJson = JSON.parse(
  11450. JSON.stringify(
  11451. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11452. itemTaskIndex
  11453. ].toolChoose[toolIndex].groupJson
  11454. )
  11455. );
  11456. } else {
  11457. var groupJson = {
  11458. group: [{ name: "第1组" }],
  11459. number: undefined,
  11460. islock: 1,
  11461. };
  11462. this.groupJson = groupJson;
  11463. }
  11464. this.dialogVisibleGroup = true;
  11465. } else if (i == 62) {
  11466. if (
  11467. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11468. .toolChoose[toolIndex].videoJson
  11469. ) {
  11470. this.videoJson = JSON.parse(
  11471. JSON.stringify(
  11472. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11473. itemTaskIndex
  11474. ].toolChoose[toolIndex].videoJson
  11475. )
  11476. );
  11477. } else {
  11478. var videoJson = {
  11479. video: "",
  11480. setting: [],
  11481. };
  11482. this.videoJson = videoJson;
  11483. }
  11484. this.dialogVisibleVideo = true;
  11485. } else if (i == 15) {
  11486. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11487. itemTaskIndex
  11488. ].toolChoose[toolIndex].answerQ
  11489. ? JSON.parse(
  11490. JSON.stringify(
  11491. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11492. itemTaskIndex
  11493. ].toolChoose[toolIndex].answerQ
  11494. )
  11495. )
  11496. : "";
  11497. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  11498. this.dialogVisible8 = true;
  11499. } else if (i == 40) {
  11500. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11501. itemTaskIndex
  11502. ].toolChoose[toolIndex].rateJson
  11503. ? JSON.parse(
  11504. JSON.stringify(
  11505. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11506. itemTaskIndex
  11507. ].toolChoose[toolIndex].rateJson
  11508. )
  11509. )
  11510. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  11511. this.selectSteps = 1;
  11512. this.dialogVisibleRate = true;
  11513. } else if (i == 42) {
  11514. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11515. itemTaskIndex
  11516. ].toolChoose[toolIndex].answerQ
  11517. ? JSON.parse(
  11518. JSON.stringify(
  11519. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11520. itemTaskIndex
  11521. ].toolChoose[toolIndex].answerQ
  11522. )
  11523. )
  11524. : "";
  11525. this.dialogVisibleMp3 = true;
  11526. } else if (i == 41) {
  11527. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11528. itemTaskIndex
  11529. ].toolChoose[toolIndex].selectJson
  11530. ? JSON.parse(
  11531. JSON.stringify(
  11532. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11533. itemTaskIndex
  11534. ].toolChoose[toolIndex].selectJson
  11535. )
  11536. )
  11537. : { url: "", select: [], answer: [] };
  11538. this.selectSteps = 1;
  11539. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  11540. this.dialogVisibleSelect = true;
  11541. } else if (i == 3) {
  11542. top.postMessage(
  11543. {
  11544. tools: "3y",
  11545. cid: this.cid,
  11546. stage: this.unitIndex,
  11547. task: itemTaskIndex,
  11548. tool: toolIndex,
  11549. },
  11550. "*"
  11551. );
  11552. } else if (i == 1) {
  11553. top.postMessage(
  11554. {
  11555. tools: "1y",
  11556. cid: this.cid,
  11557. stage: this.unitIndex,
  11558. task: itemTaskIndex,
  11559. tool: toolIndex,
  11560. },
  11561. "*"
  11562. );
  11563. } else if (i == 57) {
  11564. top.postMessage(
  11565. {
  11566. tools: "57y",
  11567. cid: this.cid,
  11568. stage: this.unitIndex,
  11569. task: itemTaskIndex,
  11570. tool: toolIndex,
  11571. },
  11572. "*"
  11573. );
  11574. } else if (i == 69) {
  11575. this.englishList = {};
  11576. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  11577. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  11578. ? JSON.parse(
  11579. JSON.stringify(
  11580. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11581. itemTaskIndex
  11582. ].toolChoose[toolIndex].englishList
  11583. )
  11584. )
  11585. : {};
  11586. this.$forceUpdate();
  11587. this.englishDialogVisible = true;
  11588. } else if (i == 70) {
  11589. this.englishVoiceJson = {};
  11590. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  11591. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  11592. ? JSON.parse(
  11593. JSON.stringify(
  11594. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11595. itemTaskIndex
  11596. ].toolChoose[toolIndex].englishVoiceJson
  11597. )
  11598. )
  11599. : {
  11600. title: '',
  11601. detail: '',
  11602. array: []
  11603. };
  11604. // {
  11605. // time: "",
  11606. // class: "",
  11607. // difficulty: 0,
  11608. // topic: "",
  11609. // isShow: false,
  11610. // eva: 0,
  11611. // aiEva: {
  11612. // isAiEva: false,
  11613. // aiEvaChoose: [],
  11614. // },
  11615. // allfType: [],
  11616. // englishJson: {},
  11617. // };
  11618. this.$forceUpdate();
  11619. this.EnglishVoiceDialog = true;
  11620. }
  11621. },
  11622. setEnglishVoiceJson(val) {
  11623. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11624. this.taskCount
  11625. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  11626. JSON.stringify(val)
  11627. );
  11628. this.$forceUpdate();
  11629. if (
  11630. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11631. .toolChoose[this.toolIndex].tool != 70
  11632. ) {
  11633. this.addTools(70, this.taskCount, this.toolIndex);
  11634. }
  11635. },
  11636. chapAddTools(i) {
  11637. if (this.chapTools[0].tools.length == 0) {
  11638. this.chapTools[0].tools.push(i);
  11639. } else {
  11640. if (this.chapTools[0].tools.indexOf(i) != -1) {
  11641. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  11642. } else {
  11643. this.chapTools[0].tools.push(i);
  11644. }
  11645. }
  11646. this.$forceUpdate();
  11647. },
  11648. addChaptersDataTools() {
  11649. if (this.chapTools[0].tools.indexOf(4) != -1) {
  11650. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11651. this.chapCount
  11652. ].chapterData.unshift({
  11653. name: this.chapTools[0].toolDetail,
  11654. url: this.chapTools[0].tools,
  11655. type: 7,
  11656. askJson: this.askJson,
  11657. });
  11658. } else {
  11659. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11660. this.chapCount
  11661. ].chapterData.unshift({
  11662. name: this.chapTools[0].toolDetail,
  11663. url: this.chapTools[0].tools,
  11664. type: 7,
  11665. });
  11666. }
  11667. this.imgChange1(null, null, 7, this.chapCount);
  11668. this.dialogVisible4 = false;
  11669. },
  11670. addTools(i, itemTaskIndex, toolIndex) {
  11671. // if (
  11672. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11673. // .toolChoose[toolIndex].tool.length == 0
  11674. // ) {
  11675. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11676. // itemTaskIndex
  11677. // ].toolChoose[toolIndex].tool.push(i);
  11678. // } else {
  11679. // if (
  11680. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11681. // itemTaskIndex
  11682. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  11683. // ) {
  11684. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11685. // itemTaskIndex
  11686. // ].toolChoose[toolIndex].tool.splice(
  11687. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11688. // itemTaskIndex
  11689. // ].toolChoose[toolIndex].tool.indexOf(i),
  11690. // 1
  11691. // );
  11692. // } else {
  11693. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11694. // itemTaskIndex
  11695. // ].toolChoose[toolIndex].tool.push(i);
  11696. // }
  11697. // console.log(
  11698. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11699. // .toolChoose[toolIndex].tool
  11700. // );
  11701. // }
  11702. if (i == 4) {
  11703. if (
  11704. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11705. .toolChoose[toolIndex].askJson.askTitle == "" ||
  11706. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11707. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  11708. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11709. .toolChoose[toolIndex].askJson[0].checkList < 2
  11710. ) {
  11711. this.openTools(itemTaskIndex, 4, toolIndex);
  11712. // this.$message({
  11713. // message: "请填写完整问卷内容",
  11714. // type: "error",
  11715. // });
  11716. return;
  11717. }
  11718. }
  11719. if (i == 45) {
  11720. if (
  11721. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11722. .toolChoose[toolIndex].testJson ||
  11723. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11724. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  11725. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11726. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  11727. ) {
  11728. this.openTools(itemTaskIndex, 45, toolIndex);
  11729. // this.$message({
  11730. // message: "请填写完整问卷内容",
  11731. // type: "error",
  11732. // });
  11733. return;
  11734. }
  11735. }
  11736. if (i == 47) {
  11737. if (
  11738. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11739. .toolChoose[toolIndex].sentenceList ||
  11740. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11741. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  11742. ) {
  11743. this.openTools(itemTaskIndex, 47, toolIndex);
  11744. return;
  11745. }
  11746. }
  11747. if (i == 69) {
  11748. if (
  11749. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11750. .toolChoose[toolIndex].englishList
  11751. ) {
  11752. this.openTools(itemTaskIndex, 69, toolIndex);
  11753. return;
  11754. }
  11755. }
  11756. if (i == 70) {
  11757. if (
  11758. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11759. .toolChoose[toolIndex].englishVoiceJson
  11760. ) {
  11761. this.openTools(itemTaskIndex, 70, toolIndex);
  11762. return;
  11763. }
  11764. }
  11765. // if (i == 48) {
  11766. // if (
  11767. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11768. // .toolChoose[toolIndex].tableJson
  11769. // ) {
  11770. // this.openTools(itemTaskIndex, 48, toolIndex);
  11771. // return;
  11772. // }
  11773. // }
  11774. // if (i == 50) {
  11775. // if (
  11776. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11777. // .toolChoose[toolIndex].uploadJson
  11778. // ) {
  11779. // this.openTools(itemTaskIndex, 50, toolIndex);
  11780. // return;
  11781. // }
  11782. // }
  11783. if (i == 49) {
  11784. if (
  11785. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11786. .toolChoose[toolIndex].groupJson
  11787. ) {
  11788. this.openTools(itemTaskIndex, 49, toolIndex);
  11789. return;
  11790. }
  11791. }
  11792. if (i == 62) {
  11793. if (
  11794. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11795. .toolChoose[toolIndex].videoJson
  11796. ) {
  11797. this.openTools(itemTaskIndex, 62, toolIndex);
  11798. return;
  11799. }
  11800. }
  11801. if (i == 15) {
  11802. if (
  11803. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11804. .toolChoose[toolIndex].answerQ ||
  11805. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11806. .toolChoose[toolIndex].answerQ == ""
  11807. ) {
  11808. this.openTools(itemTaskIndex, 15, toolIndex);
  11809. // this.$message({
  11810. // message: "请填写问答内容",
  11811. // type: "error",
  11812. // });
  11813. return;
  11814. }
  11815. }
  11816. if (i == 40) {
  11817. if (
  11818. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11819. .toolChoose[toolIndex].rateJson ||
  11820. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11821. .toolChoose[toolIndex].rateJson.length
  11822. ) {
  11823. this.openTools(itemTaskIndex, 40, toolIndex);
  11824. return;
  11825. }
  11826. }
  11827. if (i == 41) {
  11828. if (
  11829. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11830. .toolChoose[toolIndex].selectJson ||
  11831. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11832. .toolChoose[toolIndex].selectJson.url == "" ||
  11833. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11834. .toolChoose[toolIndex].selectJson.select.length ||
  11835. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11836. .toolChoose[toolIndex].selectJson.answer.length
  11837. ) {
  11838. this.openTools(itemTaskIndex, 41, toolIndex);
  11839. return;
  11840. }
  11841. }
  11842. if (i == 42) {
  11843. if (
  11844. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11845. .toolChoose[toolIndex].answerQ ||
  11846. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11847. .toolChoose[toolIndex].answerQ == ""
  11848. ) {
  11849. this.openTools(itemTaskIndex, 42, toolIndex);
  11850. return;
  11851. }
  11852. }
  11853. if (
  11854. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  11855. .toolChoose[toolIndex].tool.length > 0
  11856. ) {
  11857. if (
  11858. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11859. itemTaskIndex
  11860. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  11861. ) {
  11862. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11863. itemTaskIndex
  11864. ].toolChoose[toolIndex].tool.splice(
  11865. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11866. itemTaskIndex
  11867. ].toolChoose[toolIndex].tool.indexOf(i),
  11868. 1
  11869. );
  11870. } else {
  11871. // this.$message({
  11872. // message: "每个工具只能添加一个",
  11873. // type: "error",
  11874. // });
  11875. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11876. itemTaskIndex
  11877. ].toolChoose[toolIndex].tool = [];
  11878. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11879. itemTaskIndex
  11880. ].toolChoose[toolIndex].tool.push(i);
  11881. }
  11882. } else {
  11883. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11884. itemTaskIndex
  11885. ].toolChoose[toolIndex].tool.push(i);
  11886. }
  11887. this.$forceUpdate();
  11888. },
  11889. addAskList(index) {
  11890. this.askJson.askJson.splice(index + 1, 0, {
  11891. askstitle: "",
  11892. askItem: 1,
  11893. checkList: [],
  11894. });
  11895. this.askJson.askCount++;
  11896. },
  11897. addTestList(index) {
  11898. this.testJson.testJson.splice(index + 1, 0, {
  11899. teststitle: "",
  11900. testItem: 1,
  11901. checkList: [],
  11902. timuList: [],
  11903. answer: [],
  11904. type: "1",
  11905. });
  11906. this.testJson.testCount++;
  11907. },
  11908. deleteAskList(index) {
  11909. if (
  11910. !this.askJson.askJson[index].askstitle &&
  11911. this.askJson.askJson[index].askItem == 1 &&
  11912. !this.askJson.askJson[index].checkList[0]
  11913. ) {
  11914. this.askJson.askJson.splice(index, 1);
  11915. this.askJson.askCount--;
  11916. } else {
  11917. let _this = this;
  11918. _this
  11919. .$confirm("此操作不可撤销,是否继续?", "提示", {
  11920. confirmButtonText: "确定",
  11921. cancelButtonText: "取消",
  11922. type: "warning",
  11923. })
  11924. .then(() => {
  11925. _this.askJson.askJson.splice(index, 1);
  11926. _this.askJson.askCount--;
  11927. })
  11928. .catch(() => {
  11929. return;
  11930. });
  11931. }
  11932. },
  11933. deleteTestList(index) {
  11934. if (
  11935. !this.testJson.testJson[index].teststitle &&
  11936. this.testJson.testJson[index].testItem == 1 &&
  11937. !this.testJson.testJson[index].checkList[0]
  11938. ) {
  11939. this.testJson.testJson.splice(index, 1);
  11940. this.testJson.testCount--;
  11941. } else {
  11942. let _this = this;
  11943. _this
  11944. .$confirm("此操作不可撤销,是否继续?", "提示", {
  11945. confirmButtonText: "确定",
  11946. cancelButtonText: "取消",
  11947. type: "warning",
  11948. })
  11949. .then(() => {
  11950. _this.testJson.testJson.splice(index, 1);
  11951. _this.testJson.testCount--;
  11952. })
  11953. .catch(() => {
  11954. return;
  11955. });
  11956. }
  11957. },
  11958. askMove(type, index) {
  11959. if (type == 1) {
  11960. if (index > 0) {
  11961. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  11962. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  11963. this.askJson.askJson[index - 1] = b;
  11964. this.askJson.askJson[index] = a;
  11965. }
  11966. } else {
  11967. if (index < this.askJson.askJson.length - 1) {
  11968. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  11969. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  11970. this.askJson.askJson[index + 1] = b;
  11971. this.askJson.askJson[index] = a;
  11972. }
  11973. }
  11974. this.$forceUpdate();
  11975. },
  11976. checkMove(type, index, checkIndex) {
  11977. if (type == 1) {
  11978. if (checkIndex > 0) {
  11979. let a = JSON.parse(
  11980. JSON.stringify(
  11981. this.askJson.askJson[index].checkList[checkIndex - 1]
  11982. )
  11983. );
  11984. let b = JSON.parse(
  11985. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  11986. );
  11987. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  11988. this.askJson.askJson[index].checkList[checkIndex] = a;
  11989. }
  11990. } else {
  11991. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  11992. let a = JSON.parse(
  11993. JSON.stringify(
  11994. this.askJson.askJson[index].checkList[checkIndex + 1]
  11995. )
  11996. );
  11997. let b = JSON.parse(
  11998. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  11999. );
  12000. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  12001. this.askJson.askJson[index].checkList[checkIndex] = a;
  12002. }
  12003. }
  12004. this.$forceUpdate();
  12005. },
  12006. testMove(type, index) {
  12007. if (type == 1) {
  12008. if (index > 0) {
  12009. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  12010. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12011. this.testJson.testJson[index - 1] = b;
  12012. this.testJson.testJson[index] = a;
  12013. }
  12014. } else {
  12015. if (index < this.testJson.testJson.length - 1) {
  12016. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  12017. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12018. this.testJson.testJson[index + 1] = b;
  12019. this.testJson.testJson[index] = a;
  12020. }
  12021. }
  12022. this.$forceUpdate();
  12023. },
  12024. tcheckMove(type, index, checkIndex) {
  12025. if (type == 1) {
  12026. if (checkIndex > 0) {
  12027. let a = JSON.parse(
  12028. JSON.stringify(
  12029. this.testJson.testJson[index].checkList[checkIndex - 1]
  12030. )
  12031. );
  12032. let b = JSON.parse(
  12033. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12034. );
  12035. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  12036. this.testJson.testJson[index].checkList[checkIndex] = a;
  12037. }
  12038. } else {
  12039. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  12040. let a = JSON.parse(
  12041. JSON.stringify(
  12042. this.testJson.testJson[index].checkList[checkIndex + 1]
  12043. )
  12044. );
  12045. let b = JSON.parse(
  12046. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12047. );
  12048. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  12049. this.testJson.testJson[index].checkList[checkIndex] = a;
  12050. }
  12051. }
  12052. this.$forceUpdate();
  12053. },
  12054. addcheckList(json, index) {
  12055. // json.checkList.length++;
  12056. json.checkList.splice(index + 1, 0, "");
  12057. json.askItem++;
  12058. this.$forceUpdate();
  12059. },
  12060. deletecheckList(json, index) {
  12061. // json.checkList.length--;
  12062. json.checkList.splice(index, 1);
  12063. json.askItem--;
  12064. this.$forceUpdate();
  12065. },
  12066. addTcheckList(json, index) {
  12067. // json.checkList.length++;
  12068. json.checkList.splice(index + 1, 0, "");
  12069. json.testItem++;
  12070. this.$forceUpdate();
  12071. },
  12072. deleteTcheckList(json, index) {
  12073. // json.checkList.length--;
  12074. json.checkList.splice(index, 1);
  12075. json.testItem--;
  12076. this.$forceUpdate();
  12077. },
  12078. checkTestType(type, json) {
  12079. json.type = type;
  12080. setTimeout(() => {
  12081. json.answer = [];
  12082. }, 100);
  12083. },
  12084. checkAskType(type, json) {
  12085. json.type = type;
  12086. // json.checkList = [];
  12087. this.$forceUpdate();
  12088. },
  12089. addSelectList(json) {
  12090. json.select.push("");
  12091. json.answer.push("");
  12092. },
  12093. deleteSelectList(json) {
  12094. // json.select.length--;
  12095. // json.answer.length--;
  12096. json.select.splice(json.select.length - 1, 1);
  12097. json.answer.splice(json.answer.length - 1, 1);
  12098. },
  12099. addAsk() {
  12100. if (this.askJson.askTitle === "") {
  12101. this.$message.error("标题不能为空!");
  12102. return;
  12103. }
  12104. var aj = this.askJson.askJson;
  12105. var b = 1;
  12106. for (var i = 0; i < aj.length; i++) {
  12107. if (aj[i].askstitle === "") {
  12108. var a = 1;
  12109. for (let index = 0; index < aj[i].askItem; index++) {
  12110. const element = aj[i].checkList[index]
  12111. ? aj[i].checkList[index]
  12112. : "";
  12113. if (element != "") {
  12114. b++;
  12115. this.$message.error(`请将题目${i + 1}填写完整。`);
  12116. return;
  12117. } else {
  12118. a++;
  12119. }
  12120. }
  12121. if (b == 1) {
  12122. this.$message.error("至少填写一个问题");
  12123. return;
  12124. }
  12125. } else if (aj[i].askstitle != "") {
  12126. for (let index = 0; index < aj[i].askItem; index++) {
  12127. const element = aj[i].checkList[index]
  12128. ? aj[i].checkList[index]
  12129. : "";
  12130. var index = 0;
  12131. for (var z = 0; z < aj[i].checkList.length; z++) {
  12132. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12133. if (checkC != "") {
  12134. index++;
  12135. } else {
  12136. this.$message.error(`题目${i + 1}选项不能为空!`);
  12137. return;
  12138. }
  12139. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12140. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12141. if (checkC == checkC2) {
  12142. this.$message.error(
  12143. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12144. );
  12145. return;
  12146. }
  12147. }
  12148. }
  12149. b++;
  12150. if (index < 2) {
  12151. this.$message.error("每道题目至少需要设置2个选项。");
  12152. return;
  12153. }
  12154. }
  12155. }
  12156. }
  12157. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  12158. var elc = el.checkList.filter((element) => {
  12159. return element != "";
  12160. });
  12161. return el.askstitle != "" && elc.length != 0;
  12162. });
  12163. if (!this.dialogVisible4) {
  12164. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12165. this.taskCount
  12166. ].toolChoose[this.toolIndex] = this.askJson;
  12167. }
  12168. this.dialogVisible5 = false;
  12169. if (
  12170. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12171. .toolChoose[this.toolIndex].tool != 4
  12172. ) {
  12173. this.addTools(4, this.taskCount, this.toolIndex);
  12174. }
  12175. },
  12176. addTest() {
  12177. // if (this.testJson.testTitle === "") {
  12178. // this.$message.error("标题不能为空!");
  12179. // return;
  12180. // }
  12181. var aj = this.testJson.testJson;
  12182. var b = 1;
  12183. for (var i = 0; i < aj.length; i++) {
  12184. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  12185. var a = 1;
  12186. for (let index = 0; index < aj[i].testItem; index++) {
  12187. const element = aj[i].checkList[index]
  12188. ? aj[i].checkList[index]
  12189. : "";
  12190. if (element != "") {
  12191. b++;
  12192. this.$message.error(`请将题目${i + 1}填写完整。`);
  12193. return;
  12194. } else {
  12195. a++;
  12196. }
  12197. }
  12198. if (b == 1) {
  12199. this.$message.error("至少填写一个问题");
  12200. return;
  12201. }
  12202. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  12203. for (let index = 0; index < aj[i].testItem; index++) {
  12204. const element = aj[i].checkList[index]
  12205. ? aj[i].checkList[index]
  12206. : "";
  12207. var index = 0;
  12208. for (var z = 0; z < aj[i].checkList.length; z++) {
  12209. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12210. if (checkC != "") {
  12211. index++;
  12212. } else {
  12213. this.$message.error(`题目${i + 1}选项不能为空!`);
  12214. return;
  12215. }
  12216. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12217. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12218. if (checkC == checkC2) {
  12219. this.$message.error(
  12220. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12221. );
  12222. return;
  12223. }
  12224. }
  12225. }
  12226. b++;
  12227. if (index < 2) {
  12228. this.$message.error("每道题目至少需要设置2个选项。");
  12229. return;
  12230. }
  12231. if (
  12232. (aj[i].type == "2" && !aj[i].answer.length) ||
  12233. (aj[i].type == "1" &&
  12234. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  12235. (aj[i].answer !== 0 && !aj[i].answer)))
  12236. ) {
  12237. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  12238. return;
  12239. }
  12240. }
  12241. }
  12242. }
  12243. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  12244. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  12245. var elc = el.checkList.filter((element) => {
  12246. return element != "";
  12247. });
  12248. return (
  12249. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  12250. );
  12251. });
  12252. isTestJson.testCount = isTestJson.testJson.length;
  12253. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12254. this.taskCount
  12255. ].toolChoose[this.toolIndex].testJson = isTestJson;
  12256. this.dialogVisibleChoice = false;
  12257. if (
  12258. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12259. .toolChoose[this.toolIndex].tool != 45
  12260. ) {
  12261. this.addTools(45, this.taskCount, this.toolIndex);
  12262. }
  12263. },
  12264. addVideoJson(videoJson) {
  12265. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12266. this.taskCount
  12267. ].toolChoose[this.toolIndex].videoJson = videoJson;
  12268. this.dialogVisibleVideo = false;
  12269. if (
  12270. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12271. .toolChoose[this.toolIndex].tool != 62
  12272. ) {
  12273. this.addTools(62, this.taskCount, this.toolIndex);
  12274. }
  12275. },
  12276. //自动获取剪贴板
  12277. pasteOption() {
  12278. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12279. if (!iframe) {
  12280. this.$message.error("请使用AI共创生成题目");
  12281. return;
  12282. }
  12283. let copyData = iframe.contentWindow.copyData;
  12284. if (!copyData || !copyData.selectData.length) {
  12285. this.$message.error("请使用AI共创生成题目");
  12286. return;
  12287. }
  12288. let selectData = copyData.selectData;
  12289. for (var i = 0; i < selectData.length; i++) {
  12290. let answer = 0;
  12291. switch (selectData[i].answer[0]) {
  12292. case "A":
  12293. answer = 0;
  12294. break;
  12295. case "B":
  12296. answer = 1;
  12297. break;
  12298. case "C":
  12299. answer = 2;
  12300. break;
  12301. case "D":
  12302. answer = 3;
  12303. break;
  12304. case "E":
  12305. answer = 4;
  12306. break;
  12307. default:
  12308. break;
  12309. }
  12310. this.testJson.testJson.push({
  12311. teststitle: selectData[i].subject,
  12312. testItem: selectData[i].options.length,
  12313. checkList: selectData[i].options,
  12314. timuList: [],
  12315. answer: answer,
  12316. type: "1",
  12317. });
  12318. this.testJson.testCount++;
  12319. }
  12320. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  12321. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  12322. var elc = el.checkList.filter((element) => {
  12323. return element != "";
  12324. });
  12325. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  12326. });
  12327. isTestJson.testCount = isTestJson.testJson.length;
  12328. if (!isTestJson.testCount) {
  12329. return;
  12330. }
  12331. this.testJson = isTestJson;
  12332. this.$forceUpdate();
  12333. },
  12334. pasteTask(taskJson) {
  12335. let stageTasksData = [];
  12336. if (taskJson) {
  12337. stageTasksData = taskJson;
  12338. } else {
  12339. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12340. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12341. if (!iframe && !iframe2) {
  12342. this.$message.error("请使用AI共创生成");
  12343. return;
  12344. }
  12345. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12346. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12347. if (
  12348. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  12349. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  12350. ) {
  12351. this.$message.error("请使用AI共创生成");
  12352. return;
  12353. }
  12354. stageTasksData = copyData
  12355. ? copyData.tasksData
  12356. : copyData2
  12357. ? copyData2.tasksData
  12358. : [{ taskName: "", taskDecs: "" }];
  12359. }
  12360. let taskA = [];
  12361. let tasks = stageTasksData;
  12362. for (var j = 0; j < tasks.length; j++) {
  12363. taskA.push({
  12364. task: tasks[j].taskName,
  12365. taskDetail: tasks[j].taskDecs,
  12366. chapterData: [],
  12367. toolText: "",
  12368. toolChoose: [
  12369. {
  12370. tool: [],
  12371. toolDetail: "",
  12372. toolType: 0,
  12373. askCount: 1,
  12374. askTitle: "",
  12375. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12376. },
  12377. ],
  12378. isShowTools: false,
  12379. askCount: 1,
  12380. isFold: 1,
  12381. askTitle: "",
  12382. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12383. checkJson: [{ checkCount: [], checkPerent: [] }],
  12384. homeworkList: [],
  12385. });
  12386. }
  12387. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  12388. this.$forceUpdate();
  12389. },
  12390. pasteStage(stageJson) {
  12391. let stageData = [];
  12392. if (stageJson) {
  12393. stageData = stageJson;
  12394. } else {
  12395. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12396. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12397. if (!iframe && !iframe2) {
  12398. this.$message.error("请使用AI共创生成");
  12399. return;
  12400. }
  12401. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12402. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12403. if (
  12404. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  12405. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  12406. ) {
  12407. this.$message.error("请使用AI共创生成");
  12408. return;
  12409. }
  12410. stageData = copyData
  12411. ? copyData.stageData
  12412. : copyData2
  12413. ? copyData2.stageData
  12414. : [""];
  12415. }
  12416. let stage = [];
  12417. for (var i = 0; i < stageData.length; i++) {
  12418. stage.push({
  12419. dyName: stageData[i], //单元标题
  12420. chapterInfo: [
  12421. {
  12422. isread: false,
  12423. chapterid: this.guid(),
  12424. title: "",
  12425. courseName: "",
  12426. taskJson: [
  12427. {
  12428. task: "",
  12429. taskDetail: "",
  12430. chapterData: [],
  12431. toolText: "",
  12432. toolChoose: [
  12433. {
  12434. tool: [],
  12435. toolDetail: "",
  12436. toolType: 0,
  12437. askCount: 1,
  12438. askTitle: "",
  12439. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12440. },
  12441. ],
  12442. isShowTools: false,
  12443. askCount: 1,
  12444. isFold: 1,
  12445. askTitle: "",
  12446. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12447. checkJson: [{ checkCount: [], checkPerent: [] }],
  12448. homeworkList: [],
  12449. },
  12450. ],
  12451. itemCount: 1,
  12452. fileList1: [],
  12453. video: [],
  12454. testData: [],
  12455. pData: [],
  12456. templateArray: [],
  12457. },
  12458. ],
  12459. });
  12460. }
  12461. let _this = this;
  12462. if (stageJson) {
  12463. if (!_this.cid) {
  12464. _this.unitJson = stage;
  12465. } else {
  12466. _this.unitIndex = 0;
  12467. _this.unitJson = stage;
  12468. _this.updateWork();
  12469. }
  12470. } else {
  12471. _this
  12472. .$confirm(
  12473. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  12474. "提示",
  12475. {
  12476. confirmButtonText: "确定",
  12477. cancelButtonText: "取消",
  12478. type: "warning",
  12479. }
  12480. )
  12481. .then(() => {
  12482. _this.unitIndex = 0;
  12483. _this.unitJson = stage;
  12484. // _this.steps++;
  12485. _this.updateWork();
  12486. })
  12487. .catch(() => {
  12488. return;
  12489. });
  12490. }
  12491. },
  12492. openStageBox() {
  12493. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  12494. this.dialogVisibleStageChange = true;
  12495. },
  12496. updateChange() {
  12497. this.$confirm(
  12498. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  12499. "提示",
  12500. {
  12501. confirmButtonText: "确定",
  12502. cancelButtonText: "取消",
  12503. type: "warning",
  12504. }
  12505. )
  12506. .then(() => {
  12507. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  12508. this.updateWork();
  12509. this.dialogVisibleStageChange = false;
  12510. })
  12511. .catch(() => {
  12512. return;
  12513. });
  12514. },
  12515. addAnswer() {
  12516. if (this.answerQ == "") {
  12517. this.$message.error("请输入您想要问的问题");
  12518. return;
  12519. }
  12520. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12521. this.taskCount
  12522. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  12523. this.dialogVisible8 = false;
  12524. if (
  12525. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12526. .toolChoose[this.toolIndex].tool != 15
  12527. ) {
  12528. this.addTools(15, this.taskCount, this.toolIndex);
  12529. }
  12530. },
  12531. addMp3Answer() {
  12532. if (this.answerQ == "") {
  12533. this.$message.error("请输入您想要回答的问题");
  12534. return;
  12535. }
  12536. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12537. this.taskCount
  12538. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  12539. this.dialogVisibleMp3 = false;
  12540. },
  12541. addRateAnswer() {
  12542. var a = 1;
  12543. for (var i = 0; i < this.rateJson.length; i++) {
  12544. if (this.rateJson[i].value == "") {
  12545. a = 2;
  12546. break;
  12547. }
  12548. }
  12549. if (a == 2) {
  12550. this.$message.error("请把评价信息填写完整");
  12551. return;
  12552. }
  12553. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12554. this.taskCount
  12555. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  12556. this.dialogVisibleRate = false;
  12557. if (
  12558. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12559. .toolChoose[this.toolIndex].tool != 40
  12560. ) {
  12561. this.addTools(40, this.taskCount, this.toolIndex);
  12562. }
  12563. },
  12564. addSelectAnswer() {
  12565. if (this.selectJson.url == "") {
  12566. this.$message.error("请上传题目");
  12567. return;
  12568. }
  12569. if (!this.selectJson.select.length) {
  12570. this.$message.error("请添加选项");
  12571. return;
  12572. }
  12573. if (!this.selectJson.answer.length) {
  12574. this.$message.error("请设置答案");
  12575. return;
  12576. }
  12577. var a = 1;
  12578. for (var i = 0; i < this.selectJson.answer.length; i++) {
  12579. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  12580. a = 2;
  12581. }
  12582. }
  12583. if (a == 2) {
  12584. this.$message.error("请设置答案");
  12585. return;
  12586. }
  12587. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12588. this.taskCount
  12589. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  12590. this.dialogVisibleSelect = false;
  12591. if (
  12592. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12593. .toolChoose[this.toolIndex].tool != 41
  12594. ) {
  12595. this.addTools(41, this.taskCount, this.toolIndex);
  12596. }
  12597. },
  12598. nextSelectSteps() {
  12599. if (this.selectJson.url == "") {
  12600. this.$message.error("请上传题目");
  12601. return;
  12602. }
  12603. if (!this.selectJson.select.length) {
  12604. this.$message.error("请添加选项");
  12605. return;
  12606. } else {
  12607. for (var z = 0; z < this.selectJson.select.length; z++) {
  12608. let checkC = this.selectJson.select[z];
  12609. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  12610. let checkC2 = this.selectJson.select[z2];
  12611. if (checkC == checkC2) {
  12612. this.$message.error(
  12613. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12614. );
  12615. return;
  12616. }
  12617. }
  12618. }
  12619. }
  12620. var a = 1;
  12621. for (var i = 0; i < this.selectJson.select.length; i++) {
  12622. if (!this.selectJson.select[i]) {
  12623. a = 2;
  12624. }
  12625. }
  12626. if (a == 2) {
  12627. this.$message.error("添加的选项不能为空");
  12628. return;
  12629. }
  12630. this.selectSteps++;
  12631. },
  12632. selectCourseDetail() {
  12633. if (this.cid == "" || this.cid == undefined) {
  12634. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  12635. this.isTeacherSee = true;
  12636. }
  12637. console.log("这是新增课程");
  12638. this.selectAllType();
  12639. } else {
  12640. this.isOutline = true
  12641. this.isOutline2 = true
  12642. this.cpoteType = 4
  12643. this.cidType = 1;
  12644. let params = {
  12645. cid: this.cid,
  12646. };
  12647. this.ajax
  12648. .get(this.$store.state.api + "select_course_detail", params)
  12649. .then((res) => {
  12650. this.unitJson = JSON.parse(res.data[0][0].chapters);
  12651. this.courseState = res.data[0][0].state;
  12652. for (var j = 0; j < this.unitJson.length; j++) {
  12653. for (
  12654. var k = 0;
  12655. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  12656. k++
  12657. ) {
  12658. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  12659. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  12660. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  12661. : [];
  12662. let _chapterData = [];
  12663. for (
  12664. var c = 0;
  12665. c <
  12666. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  12667. .length;
  12668. c++
  12669. ) {
  12670. if (
  12671. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  12672. ) {
  12673. _chapterData.push(
  12674. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  12675. );
  12676. }
  12677. }
  12678. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  12679. _chapterData;
  12680. }
  12681. }
  12682. this.$forceUpdate();
  12683. this.courseName = res.data[0][0].title;
  12684. this.courseText = res.data[0][0].brief;
  12685. this.courseText2 = res.data[0][0].reBrief;
  12686. this.evalua = res.data[0][0].evaId;
  12687. this.cover = JSON.parse(res.data[0][0].cover);
  12688. this.noneBtnImg = this.cover.length >= 1;
  12689. if (res.data[0][0].refile) {
  12690. this.infoData = JSON.parse(res.data[0][0].refile)
  12691. }
  12692. // this.checkboxList =
  12693. // res.data[0][0].course_student.length > 0
  12694. // ? JSON.parse(res.data[0][0].course_student)
  12695. // : [];
  12696. this.checkboxList2 = res.data[0][0].juri
  12697. ? res.data[0][0].juri.split(",")
  12698. : [];
  12699. this.inviteCode = [];
  12700. for (var i = 0; i < res.data[2].length; i++) {
  12701. this.inviteCode.push({
  12702. cid: res.data[2][i].classid,
  12703. ic: res.data[2][i].code,
  12704. });
  12705. }
  12706. this.checkboxList3 = res.data[0][0].course_teacher
  12707. ? res.data[0][0].course_teacher.split(",")
  12708. : [];
  12709. // this.isTeacherSee =
  12710. // res.data[0][0].is_teacher_look == 0 ? true : false;
  12711. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  12712. this.myWord = res.data[0][0].template;
  12713. this.templateC.id = "123";
  12714. this.courseUserid = res.data[0][0].userid;
  12715. // if(this.courseUserid == this.userid){
  12716. // this.InviteChange(this.checkboxList2)
  12717. // }
  12718. this.nbOrder = res.data[0][0].ordernumber;
  12719. this.courseTypeId = [];
  12720. for (var i = 0; i < res.data[1].length; i++) {
  12721. this.courseTypeId.push(res.data[1][i].typeid);
  12722. }
  12723. console.log(this.courseTypeId);
  12724. // if (this.timer) clearInterval(this.timer);
  12725. if (this.timer) clearTimeout(this.timer);
  12726. this.timer = null;
  12727. // this.timer = setInterval(() => {
  12728. if(res.data[3].length){
  12729. try {
  12730. this.aiJson = JSON.parse(res.data[3][0].tips);
  12731. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12732. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12733. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12734. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12735. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,从你的知识库去检索5个最相关的信息'
  12736. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12737. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12738. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12739. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12740. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12741. }
  12742. this.templateid = res.data[3][0].template;
  12743. }catch(error){
  12744. console.error(error)
  12745. }
  12746. }
  12747. if(res.data[0][0].cpote){
  12748. try {
  12749. this.cpote = JSON.parse(res.data[0][0].cpote);
  12750. }catch(error){
  12751. console.error(error)
  12752. }
  12753. }
  12754. if(res.data[0][0].setting){
  12755. try {
  12756. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  12757. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  12758. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  12759. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  12760. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  12761. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  12762. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  12763. this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
  12764. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  12765. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  12766. if(this.targetCourseText2 || (!this.teacherCourseText)){
  12767. this.courseTextBool = true
  12768. }
  12769. if(!this.teacherCourseText && !this.teacherCourseText){
  12770. this.isuseT = false
  12771. }
  12772. }catch(error){
  12773. console.error(error)
  12774. }
  12775. }
  12776. if(this.courseText){
  12777. this.courseTextB = false
  12778. }
  12779. if(this.teacherCourseText){
  12780. this.teacherCourseTextB = false
  12781. }
  12782. if(this.targetCourseText){
  12783. this.targetCourseTextB = false
  12784. }
  12785. if(this.targetCourseText2){
  12786. this.targetCourseText2B = false
  12787. }
  12788. this.isFileSearch = res.data[0][0].iresearch == 1
  12789. this.seleteCourseUpdate();
  12790. this.setMan();
  12791. this.selectAllType();
  12792. this.unitJson[
  12793. this.unitIndex
  12794. ].chapterInfo[0].taskJson[0].toolOpen = true;
  12795. // }, 5000);
  12796. this.$forceUpdate();
  12797. setTimeout(() => {
  12798. this.checkEva(this.evalua);
  12799. setTimeout(() => {
  12800. this.checkEva(this.evalua);
  12801. }, 100);
  12802. }, 100);
  12803. })
  12804. .catch((err) => {
  12805. console.error(err);
  12806. });
  12807. }
  12808. if(this.aiId){
  12809. let params = {
  12810. cid: this.aiId,
  12811. };
  12812. this.ajax
  12813. .get(this.$store.state.api + "select_course_detail", params)
  12814. .then((res) => {
  12815. let _unitJson = JSON.parse(res.data[0][0].chapters);
  12816. let fileInfo = []
  12817. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  12818. for(var i = 0; i < _unitJson.length; i++){
  12819. let tasks = _unitJson[i].chapterInfo[0].taskJson
  12820. for(var j = 0; j < tasks.length; j++){
  12821. let _infoData = tasks[j].chapterData.filter(el => {
  12822. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  12823. })
  12824. if(_infoData.length){
  12825. fileInfo = [...fileInfo, ..._infoData]
  12826. }
  12827. }
  12828. }
  12829. this.infoData = fileInfo
  12830. this.$forceUpdate();
  12831. this.courseName = res.data[0][0].title;
  12832. this.courseText = res.data[0][0].brief;
  12833. this.courseText2 = res.data[0][0].reBrief;
  12834. this.cover = JSON.parse(res.data[0][0].cover);
  12835. this.noneBtnImg = this.cover.length >= 1;
  12836. this.checkboxList2 = res.data[0][0].juri
  12837. ? res.data[0][0].juri.split(",")
  12838. : [];
  12839. this.inviteCode = [];
  12840. for (var i = 0; i < res.data[2].length; i++) {
  12841. this.inviteCode.push({
  12842. cid: res.data[2][i].classid,
  12843. ic: res.data[2][i].code,
  12844. });
  12845. }
  12846. this.checkboxList3 = res.data[0][0].course_teacher
  12847. ? res.data[0][0].course_teacher.split(",")
  12848. : [];
  12849. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  12850. this.myWord = res.data[0][0].template;
  12851. this.templateC.id = "123";
  12852. this.courseTypeId = [];
  12853. for (var i = 0; i < res.data[1].length; i++) {
  12854. this.courseTypeId.push(res.data[1][i].typeid);
  12855. }
  12856. console.log(this.courseTypeId);
  12857. if(res.data[3].length){
  12858. try {
  12859. this.aiJson = JSON.parse(res.data[3][0].tips);
  12860. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12861. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12862. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12863. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12864. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,从你的知识库去检索5个最相关的信息'
  12865. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12866. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12867. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12868. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12869. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12870. }
  12871. this.templateid = res.data[3][0].template;
  12872. }catch(error){
  12873. console.error(error)
  12874. }
  12875. }
  12876. if(res.data[0][0].cpote){
  12877. try {
  12878. this.cpote = JSON.parse(res.data[0][0].cpote);
  12879. }catch(error){
  12880. console.error(error)
  12881. }
  12882. }
  12883. if(res.data[0][0].setting){
  12884. try {
  12885. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  12886. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  12887. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  12888. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  12889. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  12890. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  12891. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  12892. this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
  12893. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  12894. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  12895. if(this.targetCourseText2 || (!this.teacherCourseText)){
  12896. this.courseTextBool = true
  12897. }
  12898. if(!this.teacherCourseText && !this.teacherCourseText){
  12899. this.isuseT = false
  12900. }
  12901. }catch(error){
  12902. console.error(error)
  12903. }
  12904. }
  12905. if(this.courseText){
  12906. this.courseTextB = false
  12907. }
  12908. if(this.teacherCourseText){
  12909. this.teacherCourseTextB = false
  12910. }
  12911. if(this.targetCourseText){
  12912. this.targetCourseTextB = false
  12913. }
  12914. if(this.targetCourseText2){
  12915. this.targetCourseText2B = false
  12916. }
  12917. this.setMan();
  12918. this.unitJson[
  12919. this.unitIndex
  12920. ].chapterInfo[0].taskJson[0].toolOpen = true;
  12921. this.$forceUpdate();
  12922. setTimeout(() => {
  12923. this.checkEva(this.evalua);
  12924. setTimeout(() => {
  12925. this.checkEva(this.evalua);
  12926. }, 100);
  12927. }, 100);
  12928. })
  12929. .catch((err) => {
  12930. console.error(err);
  12931. });
  12932. }
  12933. // if(this.cidType != 1 && this.templateid == ''){
  12934. // this.promptShow = true
  12935. // }
  12936. },
  12937. seleteCourseUpdate() {
  12938. let params = {
  12939. cid: this.cid,
  12940. };
  12941. this.ajax
  12942. .get(this.$store.state.api + "select_course_detail", params)
  12943. .then((res) => {
  12944. // console.log(this.unitJson);
  12945. let unitJson = JSON.parse(res.data[0][0].chapters);
  12946. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  12947. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  12948. let _unitJson = [];
  12949. let _chapAarry = [];
  12950. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  12951. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  12952. let index = 1;
  12953. let chapindex;
  12954. if (_unitJson2.length > unitJson.length) {
  12955. for (let c = 0; c < _unitJson2.length; c++) {
  12956. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  12957. }
  12958. for (let j = 0; j < unitJson.length; j++) {
  12959. let count = 0;
  12960. for (let k = 0; k < _unitJson2.length; k++) {
  12961. if (
  12962. unitJson[j].chapterInfo[0].chapterid ==
  12963. _unitJson2[k].chapterInfo[0].chapterid
  12964. ) {
  12965. count++;
  12966. _chapAarry.splice(
  12967. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  12968. 1
  12969. );
  12970. _unitJson.push(unitJson[j]);
  12971. break;
  12972. }
  12973. }
  12974. // if(count === 0){
  12975. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  12976. // }
  12977. }
  12978. for (let k = 0; k < _unitJson2.length; k++) {
  12979. if (_unitJson2[k].isUpdate == 1) {
  12980. _chapAarry.splice(
  12981. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  12982. 1
  12983. );
  12984. _unitJson.push(_unitJson2[k]);
  12985. }
  12986. }
  12987. console.log(_chapAarry);
  12988. for (let d = 0; d < _unitJson2.length; d++) {
  12989. if (
  12990. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  12991. ) {
  12992. if (_unitIndex == d) {
  12993. index = 2;
  12994. }
  12995. chapindex = d;
  12996. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  12997. }
  12998. }
  12999. } else {
  13000. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  13001. }
  13002. for (let i = 0; i < unitJson.length; i++) {
  13003. if (
  13004. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  13005. _unitJson[i].chapterInfo[0].chapterid !=
  13006. unitJson[i].chapterInfo[0].chapterid
  13007. ) {
  13008. if (i == _unitJson.length - 1) {
  13009. // this.unitIndex++
  13010. _unitIndex2++;
  13011. }
  13012. _unitJson.splice(i, 0, unitJson[i]);
  13013. } else if (i > _unitJson.length - 1) {
  13014. _unitJson.push(unitJson[i]);
  13015. } else if (
  13016. _unitJson[i].chapterInfo[0].chapterid ==
  13017. unitJson[i].chapterInfo[0].chapterid
  13018. ) {
  13019. _unitJson[i] = unitJson[i];
  13020. }
  13021. // if (i == _unitIndex) {
  13022. // continue;
  13023. // } else
  13024. }
  13025. if (_chapAarry.length && index != 2) {
  13026. if (chapindex < _unitIndex) {
  13027. this.isDelete = 2;
  13028. // this.unitIndex--;
  13029. _unitIndex2--;
  13030. } else if (
  13031. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  13032. _unitJson[_unitIndex].chapterInfo[0].chapterid
  13033. ) {
  13034. this.isDelete = 2;
  13035. for (let n = 0; n < _unitJson.length; n++) {
  13036. if (
  13037. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  13038. _unitJson[n].chapterInfo[0].chapterid
  13039. ) {
  13040. // this.unitIndex = n;
  13041. _unitIndex2 = n;
  13042. _unitJson[n] = _unitJson2[_unitIndex];
  13043. break;
  13044. }
  13045. }
  13046. }
  13047. } else if (index != 2) {
  13048. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  13049. _unitJson2[_unitIndex];
  13050. for (
  13051. var ci = 0;
  13052. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  13053. ci++
  13054. ) {
  13055. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  13056. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  13057. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13058. .toolChoose
  13059. : [];
  13060. let _chapterData = [];
  13061. for (
  13062. var c = 0;
  13063. c <
  13064. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  13065. .length;
  13066. c++
  13067. ) {
  13068. if (
  13069. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13070. .chapterData[c]
  13071. ) {
  13072. _chapterData.push(
  13073. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13074. .chapterData[c]
  13075. );
  13076. }
  13077. }
  13078. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  13079. _chapterData;
  13080. }
  13081. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  13082. }
  13083. if (index == 1) {
  13084. this.unitJson = _unitJson;
  13085. this.$forceUpdate();
  13086. setTimeout(() => {
  13087. if (this.unitIndex != _unitIndex2) {
  13088. this.isDelete = 2;
  13089. this.unitIndex = _unitIndex2;
  13090. }
  13091. }, 0);
  13092. this.timer = setTimeout(() => {
  13093. this.seleteCourseUpdate();
  13094. }, 1000);
  13095. } else if (index == 2) {
  13096. let _this = this;
  13097. _this
  13098. .$confirm(
  13099. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  13100. "提示",
  13101. {
  13102. confirmButtonText: "需要",
  13103. cancelButtonText: "取消",
  13104. type: "warning",
  13105. }
  13106. )
  13107. .then(() => {
  13108. if (_this.time()) {
  13109. _this.restoreWork(
  13110. _chapAarry[0],
  13111. _unitJson,
  13112. chapindex,
  13113. _unitJson2,
  13114. _unitIndex2
  13115. );
  13116. }
  13117. })
  13118. .catch(() => {
  13119. _this.unitJson = _unitJson;
  13120. _this.$forceUpdate();
  13121. setTimeout(() => {
  13122. if (this.unitIndex != _unitIndex2) {
  13123. this.isDelete = 2;
  13124. this.unitIndex = _unitIndex2;
  13125. }
  13126. }, 0);
  13127. _this.timer = setTimeout(() => {
  13128. _this.seleteCourseUpdate();
  13129. }, 1000);
  13130. });
  13131. }
  13132. // 在复制操作之前记录滚动位置
  13133. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  13134. // 执行复制操作
  13135. // 复制操作完成后恢复滚动位置
  13136. this.$nextTick(() => {
  13137. if (this.$refs.scrollContainer) {
  13138. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  13139. }
  13140. });
  13141. })
  13142. .catch((err) => {
  13143. console.error(err);
  13144. });
  13145. },
  13146. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  13147. let params = [
  13148. {
  13149. cid: this.cid,
  13150. chapters: JSON.stringify(this.unitJson),
  13151. uid: this.userid,
  13152. chapid: chapid,
  13153. },
  13154. ];
  13155. this.ajax
  13156. .post(this.$store.state.api + "restoreWork", params)
  13157. .then((res) => {
  13158. this.$message({
  13159. message: "恢复成功",
  13160. type: "success",
  13161. });
  13162. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  13163. this.unitJson = unitJson;
  13164. this.$forceUpdate();
  13165. setTimeout(() => {
  13166. if (this.unitIndex != unitIndex2) {
  13167. this.isDelete = 2;
  13168. this.unitIndex = unitIndex2;
  13169. }
  13170. }, 0);
  13171. this.timer = setTimeout(() => {
  13172. this.seleteCourseUpdate();
  13173. }, 1000);
  13174. })
  13175. .catch((err) => {
  13176. this.$message.error("网络不佳");
  13177. console.error(err);
  13178. });
  13179. },
  13180. getTypeName() {
  13181. console.log(this.courseTypeId);
  13182. this.$forceUpdate();
  13183. },
  13184. selectAllType() {
  13185. let params = {
  13186. org: this.org && this.org != "" ? this.org : "",
  13187. oid: this.oid && this.oid != "" ? this.oid : "",
  13188. stand: "cn",
  13189. };
  13190. this.ajax
  13191. .get(this.$store.state.api + "selectAllTypeStand", params)
  13192. .then((res) => {
  13193. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13194. res.data[0] = [...res.data[0], ...res.data[4]];
  13195. }
  13196. this.CourseType = res.data;
  13197. this.CourseType2 = [
  13198. { name: "智见课程", id: [] },
  13199. { name: "智行课程", id: [] },
  13200. { name: "智创课程", id: [] },
  13201. ];
  13202. for (var cti = 0; cti < res.data[0].length; cti++) {
  13203. if (
  13204. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  13205. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  13206. ) {
  13207. this.CourseType2[0].id.push(res.data[0][cti].id);
  13208. } else if (
  13209. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  13210. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  13211. ) {
  13212. this.CourseType2[1].id.push(res.data[0][cti].id);
  13213. } else if (
  13214. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  13215. ) {
  13216. this.CourseType2[2].id.push(res.data[0][cti].id);
  13217. }
  13218. if (
  13219. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  13220. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  13221. ) {
  13222. res.data[0][cti].name = "年级";
  13223. } else if (
  13224. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  13225. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  13226. ) {
  13227. res.data[0][cti].name = "学科";
  13228. } else if (
  13229. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  13230. ) {
  13231. res.data[0][cti].name = "主题";
  13232. }
  13233. }
  13234. let _courseTypeId = [];
  13235. for (var i = 0; i < res.data[0].length; i++) {
  13236. if (!this.cid) {
  13237. this.courseTypeId[res.data[0][i].id] = [];
  13238. }
  13239. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  13240. // }
  13241. this.CourseTypeJson[res.data[0][i].id] = [];
  13242. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13243. if (res.data[0][i].name == "栏目") {
  13244. this.CourseType[0][i].name = "主题";
  13245. }
  13246. }
  13247. if (res.data[2].length == 0 && res.data[3].length == 0) {
  13248. for (var j = 0; j < res.data[1].length; j++) {
  13249. if (
  13250. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  13251. _courseTypeId.indexOf(res.data[1][j].id) == -1
  13252. ) {
  13253. _courseTypeId.push(res.data[1][j].id);
  13254. }
  13255. if (res.data[0][i].id == res.data[1][j].pid) {
  13256. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  13257. }
  13258. }
  13259. } else {
  13260. if (res.data[2].length > 0) {
  13261. for (var j = 0; j < res.data[2].length; j++) {
  13262. if (
  13263. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  13264. _courseTypeId.indexOf(res.data[2][j].id) == -1
  13265. ) {
  13266. _courseTypeId.push(res.data[2][j].id);
  13267. }
  13268. if (res.data[0][i].id == res.data[2][j].pid) {
  13269. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  13270. }
  13271. }
  13272. }
  13273. if (res.data[3].length > 0) {
  13274. for (var j = 0; j < res.data[3].length; j++) {
  13275. if (
  13276. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  13277. _courseTypeId.indexOf(res.data[3][j].id) == -1
  13278. ) {
  13279. _courseTypeId.push(res.data[3][j].id);
  13280. }
  13281. if (res.data[0][i].id == res.data[3][j].pid) {
  13282. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  13283. }
  13284. }
  13285. }
  13286. }
  13287. }
  13288. this.courseTypeId = _courseTypeId;
  13289. })
  13290. .catch((err) => {
  13291. console.error(err);
  13292. });
  13293. },
  13294. selectType() {
  13295. this.ajax
  13296. .get(this.$store.state.api + "selectType")
  13297. .then((res) => {
  13298. this.CourseType = res.data;
  13299. for (var i = 0; i < res.data[0].length; i++) {
  13300. if (!this.cid) {
  13301. this.courseTypeId[res.data[0][i].id] = "";
  13302. }
  13303. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13304. if (res.data[0][i].name == "栏目") {
  13305. this.CourseType[0][i].name = "主题";
  13306. }
  13307. }
  13308. for (var j = 0; j < res.data[1].length; j++) {
  13309. if (res.data[0][i].id == res.data[1][j].pid) {
  13310. if (!this.CourseTypeJson[res.data[0][i].id]) {
  13311. this.CourseTypeJson[res.data[0][i].id] = [];
  13312. }
  13313. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  13314. }
  13315. }
  13316. }
  13317. this.selectTypeByOid();
  13318. this.selectTypeByOrg();
  13319. })
  13320. .catch((err) => {
  13321. console.error(err);
  13322. });
  13323. },
  13324. selectTypeByOid() {
  13325. let params = {
  13326. oid: this.oid,
  13327. };
  13328. this.ajax
  13329. .get(this.$store.state.api + "selectTypeByOid", params)
  13330. .then((res) => {
  13331. for (var i = 0; i < res.data[0].length; i++) {
  13332. for (var j = 0; j < res.data[1].length; j++) {
  13333. if (res.data[0][i].id == res.data[1][j].pid) {
  13334. if (!this.CourseTypeJson[res.data[0][i].id]) {
  13335. this.CourseTypeJson[res.data[0][i].id] = [];
  13336. }
  13337. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  13338. }
  13339. }
  13340. }
  13341. })
  13342. .catch((err) => {
  13343. console.error(err);
  13344. });
  13345. },
  13346. selectTypeByOrg() {
  13347. let params = {
  13348. oid: this.org,
  13349. };
  13350. this.ajax
  13351. .get(this.$store.state.api + "selectTypeByOrg", params)
  13352. .then((res) => {
  13353. for (var i = 0; i < res.data[0].length; i++) {
  13354. for (var j = 0; j < res.data[1].length; j++) {
  13355. if (res.data[0][i].id == res.data[1][j].pid) {
  13356. if (!this.CourseTypeJson[res.data[0][i].id]) {
  13357. this.CourseTypeJson[res.data[0][i].id] = [];
  13358. }
  13359. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  13360. }
  13361. }
  13362. }
  13363. this.$forceUpdate();
  13364. })
  13365. .catch((err) => {
  13366. console.error(err);
  13367. });
  13368. },
  13369. OtherMb(type, task) {
  13370. if (task === 0 || task) {
  13371. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13372. task
  13373. ].isEvaFold = true;
  13374. }
  13375. this.typeMode = type;
  13376. setTimeout(() => {
  13377. this.checkEva(this.checkId);
  13378. setTimeout(() => {
  13379. this.checkEva(this.checkId);
  13380. }, 100);
  13381. }, 100);
  13382. },
  13383. openMember() {
  13384. this.searchTN = "";
  13385. this.getTeacher();
  13386. this.dialogVisibleMember = true;
  13387. },
  13388. checkEva(id, type) {
  13389. this.dialogVisiblemb = false;
  13390. this.selectEva();
  13391. if (this.evalua != id && type == 2) {
  13392. this.$message.success("导入成功");
  13393. setTimeout(() => {
  13394. this.checkEva(id);
  13395. }, 100);
  13396. }
  13397. this.evalua = id;
  13398. this.checkId = id;
  13399. if (this.evalua != "") {
  13400. for (var i = 0; i < this.evaJuri.length; i++) {
  13401. if (this.evalua == this.evaJuri[i].id) {
  13402. this.eTitle = this.evaJuri[i].title;
  13403. this.eJson = JSON.parse(this.evaJuri[i].content);
  13404. }
  13405. }
  13406. this.data.data = [];
  13407. this.$forceUpdate();
  13408. setTimeout(() => {
  13409. this.setMindData();
  13410. }, 1000);
  13411. }
  13412. },
  13413. deleteEva() {
  13414. let _this = this;
  13415. if (_this.evalua == "") {
  13416. this.$message.warning("内容已经清空了,请勿重复清空");
  13417. return;
  13418. }
  13419. _this
  13420. .$confirm("确定删除此目标吗?", "提示", {
  13421. confirmButtonText: "确定",
  13422. cancelButtonText: "取消",
  13423. type: "warning",
  13424. })
  13425. .then(() => {
  13426. _this.evalua = "";
  13427. _this.checkId = "";
  13428. _this.eTitle = "";
  13429. let _unitJson = _this.unitJson;
  13430. for (var i = 0; i < _unitJson.length; i++) {
  13431. let _task = _unitJson[i].chapterInfo[0].taskJson;
  13432. for (var j = 0; j < _task.length; j++) {
  13433. let _eList = _task[j].eList;
  13434. for (var k = 0; k < _eList.length; k++) {
  13435. delete _eList[k].target;
  13436. }
  13437. }
  13438. }
  13439. _this.$forceUpdate();
  13440. if (_this.cid) {
  13441. _this.updateWork();
  13442. }
  13443. })
  13444. .catch(() => {
  13445. return;
  13446. });
  13447. },
  13448. selectEva() {
  13449. let params = {
  13450. oid: this.oid,
  13451. };
  13452. this.ajax
  13453. .get(this.$store.state.api + "selectAllEvaluation", params)
  13454. .then((res) => {
  13455. this.evaJuri = res.data[0];
  13456. // 在复制操作之前记录滚动位置
  13457. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  13458. // 执行复制操作
  13459. // 复制操作完成后恢复滚动位置
  13460. this.$nextTick(() => {
  13461. if (this.$refs.scrollContainer) {
  13462. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  13463. }
  13464. });
  13465. })
  13466. .catch((err) => {
  13467. console.error(err);
  13468. });
  13469. },
  13470. setMindData() {
  13471. let targetArray = [];
  13472. this.data.data = [];
  13473. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  13474. let _eJson = Object.keys(this.eJson);
  13475. let _e = this.eJson;
  13476. for (let i = 0; i < _eJson.length; i++) {
  13477. let element = _e[_eJson[i]];
  13478. this.data.data.push({
  13479. id: element.id,
  13480. parentid: "root",
  13481. topic: element.name,
  13482. });
  13483. // targetArray.push({
  13484. // id: element.id,
  13485. // parentid: "root",
  13486. // name: element.name,
  13487. // });
  13488. targetArray.push({
  13489. value: element.name,
  13490. label: element.name,
  13491. children: [],
  13492. });
  13493. let _eJsonc = Object.keys(element.child);
  13494. let _e2 = element.child;
  13495. for (let j = 0; j < _eJsonc.length; j++) {
  13496. let _ec = _e2[_eJsonc[j]];
  13497. this.data.data.push({
  13498. id: _ec.id,
  13499. parentid: element.id,
  13500. topic: _ec.name,
  13501. });
  13502. // targetArray.push({
  13503. // id: _ec.id,
  13504. // parentid: element.id,
  13505. // name: _ec.name,
  13506. // });
  13507. targetArray[i].children.push({
  13508. value: _ec.name,
  13509. label: _ec.name,
  13510. children: [],
  13511. });
  13512. let _eJsonz = Object.keys(_ec.child);
  13513. let _e3 = _ec.child;
  13514. for (let z = 0; z < _eJsonz.length; z++) {
  13515. let _ez = _e3[_eJsonz[z]];
  13516. this.data.data.push({
  13517. id: _ez.id,
  13518. parentid: _ec.id,
  13519. topic: _ez.name,
  13520. });
  13521. // targetArray.push({
  13522. // id: _ez.id,
  13523. // parentid: _ec.id,
  13524. // name: _ez.name,
  13525. // });
  13526. targetArray[i].children[j].children.push({
  13527. value: _ez.name,
  13528. label: _ez.name,
  13529. });
  13530. }
  13531. }
  13532. }
  13533. this.targetArray = targetArray;
  13534. this.$forceUpdate();
  13535. },
  13536. /*添加评价 */
  13537. addEList(index, tIndex) {
  13538. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  13539. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  13540. value: "",
  13541. detail: "",
  13542. score: 5,
  13543. })
  13544. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  13545. { value: "", detail: "", score: 5 },
  13546. ]);
  13547. this.$forceUpdate();
  13548. },
  13549. openEList(index, tIndex) {
  13550. this.evaIndex = index;
  13551. this.evatIndex = tIndex;
  13552. this.evaBoxDialog = true;
  13553. },
  13554. addCET(index, tIndex) {
  13555. this.cetIndex = index;
  13556. this.cettIndex = tIndex;
  13557. this.selectAllType1();
  13558. },
  13559. addCETemplate() {
  13560. var array =
  13561. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  13562. .eList;
  13563. let params = [
  13564. {
  13565. uid: this.userid,
  13566. n: this.templateName,
  13567. json: JSON.stringify(array),
  13568. t: 1,
  13569. oid: this.oid,
  13570. },
  13571. ];
  13572. this.ajax
  13573. .post(this.$store.state.api + "addCETShare", params)
  13574. .then((res) => {
  13575. this.addTypeByCET(res.data[0][0].id);
  13576. })
  13577. .catch((err) => {
  13578. this.$message.error("网络不佳");
  13579. console.error(err);
  13580. });
  13581. },
  13582. addTypeByCET(id) {
  13583. if (this.setTypeJson.two == "") {
  13584. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  13585. return;
  13586. }
  13587. let params = {
  13588. cid: id,
  13589. };
  13590. this.ajax
  13591. .get(this.$store.state.api + "deleteCETLabel", params)
  13592. .then((res) => {
  13593. for (var i = 0; i < 2; i++) {
  13594. let tid = "";
  13595. if (i == 0) {
  13596. tid = this.setTypeJson.one;
  13597. } else {
  13598. tid = this.setTypeJson.two;
  13599. }
  13600. let params = [
  13601. {
  13602. cid: id,
  13603. tid: tid,
  13604. uid: this.userid,
  13605. },
  13606. ];
  13607. this.ajax
  13608. .post(this.$store.state.api + "addCETLabel", params)
  13609. .then((res) => {
  13610. this.$message({
  13611. message: "添加成功",
  13612. type: "success",
  13613. });
  13614. this.close();
  13615. })
  13616. .catch((err) => {
  13617. this.$message.error("网络不佳");
  13618. console.error(err);
  13619. });
  13620. }
  13621. })
  13622. .catch((err) => {
  13623. this.$message.error("网络不佳");
  13624. console.error(err);
  13625. });
  13626. },
  13627. updateEvaJson(array) {
  13628. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  13629. this.evatIndex
  13630. ].eList = array;
  13631. },
  13632. forceUpdate() {
  13633. this.$forceUpdate();
  13634. },
  13635. deletEList(index, tIndex, eIndex) {
  13636. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  13637. eIndex,
  13638. 1
  13639. );
  13640. this.$forceUpdate();
  13641. },
  13642. getChoosePic(t) {
  13643. this.chooseType = t;
  13644. this.getAllBanner();
  13645. },
  13646. getAllBanner() {
  13647. this.sysPicVisible = true;
  13648. let params = {
  13649. t: this.chooseType,
  13650. };
  13651. this.ajax
  13652. .get(this.$store.state.api + "selectAllBanner", params)
  13653. .then((res) => {
  13654. this.sysPic = res.data[0];
  13655. })
  13656. .catch((err) => {
  13657. console.error(err);
  13658. });
  13659. },
  13660. // getClass() {
  13661. // let params = {
  13662. // oid: this.oid,
  13663. // };
  13664. // this.ajax
  13665. // .get(this.$store.state.api + "selectClassBySchool", params)
  13666. // .then((res) => {
  13667. // this.classJuri = res.data[0];
  13668. // })
  13669. // .catch((err) => {
  13670. // console.error(err);
  13671. // });
  13672. // },
  13673. deleteSysPic() {
  13674. this.cover = [];
  13675. this.isSysPic = false;
  13676. this.isSysPic2 = false;
  13677. },
  13678. deleteSelectPic() {
  13679. this.selectJson.url = "";
  13680. },
  13681. setEListStar() {
  13682. this.$forceUpdate();
  13683. },
  13684. deletRateList(i) {
  13685. this.rateJson.splice(i, 1);
  13686. },
  13687. addRateList() {
  13688. this.rateJson.push({ detail: "", score: 5, value: "" });
  13689. },
  13690. addSt() {
  13691. this.sentenceList.push({
  13692. sentenceTitle: "",
  13693. addSentence: [],
  13694. rightAnswer: [],
  13695. });
  13696. },
  13697. addSen(i) {
  13698. if (!this.sentenceList[i].sentenceTitle) {
  13699. this.$message.error("请填写卡片内容!");
  13700. return;
  13701. }
  13702. if (this.sentenceList[i].sentenceTitle.length > 10) {
  13703. this.$message.error("卡片内容字数不能超过10位");
  13704. return;
  13705. }
  13706. if (
  13707. this.sentenceList[i].addSentence.indexOf(
  13708. this.sentenceList[i].sentenceTitle
  13709. ) !== -1
  13710. ) {
  13711. this.$message.error("不能添加重复的卡片内容!");
  13712. return;
  13713. }
  13714. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  13715. // this.isPushTitleList.push(this.sentenceTitle);
  13716. this.sentenceList[i].sentenceTitle = "";
  13717. },
  13718. setRightAnswer(s, i, j) {
  13719. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  13720. this.sentenceList[i].rightAnswer.push(s);
  13721. }
  13722. },
  13723. returnCard(r, i, j) {
  13724. this.sentenceList[i].rightAnswer.splice(j, 1);
  13725. },
  13726. addSentenceTool() {
  13727. for (var i = 0; i < this.sentenceList.length; i++) {
  13728. if (this.sentenceList[i].rightAnswer.length == 0) {
  13729. this.$message.error(`请将题目${i + 1}设置完整。`);
  13730. return;
  13731. }
  13732. if (
  13733. this.sentenceList[i].addSentence.length !=
  13734. this.sentenceList[i].rightAnswer.length
  13735. ) {
  13736. this.$message.error(`请将题目${i + 1}设置完整。`);
  13737. return;
  13738. }
  13739. }
  13740. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13741. this.taskCount
  13742. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  13743. this.sentenceList = [
  13744. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  13745. ];
  13746. this.dialogVisibleSentence = false;
  13747. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13748. // itemTaskIndex
  13749. // ].toolChoose[toolIndex].tool = [];
  13750. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13751. // itemTaskIndex
  13752. // ].toolChoose[toolIndex].tool.push(i);
  13753. if (
  13754. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13755. .toolChoose[this.toolIndex].tool != 47
  13756. ) {
  13757. this.addTools(47, this.taskCount, this.toolIndex);
  13758. }
  13759. },
  13760. addTableJson() {
  13761. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  13762. // this.$message.error("请将信息填写完整!");
  13763. // return;
  13764. // }
  13765. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13766. this.taskCount
  13767. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  13768. // this.tableJson = [{ text: "" }];
  13769. // this.dialogVisibleTable = false;
  13770. this.$message.success("上传成功");
  13771. if (
  13772. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13773. .toolChoose[this.toolIndex].tool != 48
  13774. ) {
  13775. this.addTools(48, this.taskCount, this.toolIndex);
  13776. }
  13777. },
  13778. addWordJson() {
  13779. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13780. this.taskCount
  13781. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  13782. // this.wordJson = [{ text: "" }];
  13783. // this.dialogVisibleWord = false;
  13784. this.$message.success("上传成功");
  13785. if (
  13786. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13787. .toolChoose[this.toolIndex].tool != 52
  13788. ) {
  13789. this.addTools(52, this.taskCount, this.toolIndex);
  13790. }
  13791. },
  13792. addMoreUpload() {
  13793. if (this.uploadJson.length == 0) {
  13794. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13795. this.taskCount
  13796. ].toolChoose[this.toolIndex].uploadJson = [];
  13797. } else {
  13798. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13799. this.taskCount
  13800. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  13801. }
  13802. this.uploadJson = [];
  13803. this.dialogVisibleMoreUpload = false;
  13804. if (
  13805. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13806. .toolChoose[this.toolIndex].tool != 50
  13807. ) {
  13808. this.addTools(50, this.taskCount, this.toolIndex);
  13809. }
  13810. },
  13811. addPreTime() {
  13812. if (this.preTime == 0) {
  13813. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13814. this.taskCount
  13815. ].toolChoose[this.toolIndex].preTime = 0;
  13816. } else {
  13817. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13818. this.taskCount
  13819. ].toolChoose[this.toolIndex].preTime = this.preTime;
  13820. }
  13821. this.preTime = 0;
  13822. this.dialogVisiblePreTime = false;
  13823. if (
  13824. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13825. .toolChoose[this.toolIndex].tool != 10
  13826. ) {
  13827. this.addTools(10, this.taskCount, this.toolIndex);
  13828. }
  13829. },
  13830. goToTask(i) {
  13831. this.toolIndexType = "";
  13832. if (this.isClickColor == i + 1) {
  13833. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13834. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13835. // } else {
  13836. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13837. i
  13838. ].toolOpen = true;
  13839. // }
  13840. this.$forceUpdate();
  13841. return;
  13842. }
  13843. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13844. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13845. // } else {
  13846. document.querySelectorAll(".basic_box")[0].scrollTop =
  13847. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  13848. this.isClickColor = i + 1;
  13849. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  13850. // }
  13851. this.$forceUpdate();
  13852. },
  13853. taskOpen(i, stageIndex) {
  13854. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13855. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  13856. } else {
  13857. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  13858. }
  13859. this.updateWork3(stageIndex);
  13860. this.$forceUpdate();
  13861. },
  13862. goToTask2(i, stage) {
  13863. this.toolIndexType = "";
  13864. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  13865. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13866. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13867. // } else {
  13868. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13869. i
  13870. ].toolOpen = true;
  13871. // }
  13872. this.$forceUpdate();
  13873. return;
  13874. }
  13875. if (this.unitIndex != stage) {
  13876. if (this.panUnitJson() == 2) {
  13877. return;
  13878. }
  13879. this.unitSet(stage);
  13880. }
  13881. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  13882. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  13883. // } else {
  13884. document.querySelectorAll(".basic_box")[0].scrollTop =
  13885. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  13886. this.isClickColor = i + 1;
  13887. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  13888. // }
  13889. this.$forceUpdate();
  13890. },
  13891. taskMove(type, index) {
  13892. this.$confirm(
  13893. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  13894. "提示",
  13895. {
  13896. confirmButtonText: "确定",
  13897. cancelButtonText: "取消",
  13898. type: "warning",
  13899. }
  13900. )
  13901. .then(() => {
  13902. if (type == 1) {
  13903. if (index > 0) {
  13904. let a = JSON.parse(
  13905. JSON.stringify(
  13906. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13907. index - 1
  13908. ]
  13909. )
  13910. );
  13911. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  13912. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  13913. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  13914. }
  13915. } else {
  13916. if (
  13917. index <
  13918. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  13919. ) {
  13920. let a = JSON.parse(
  13921. JSON.stringify(
  13922. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13923. index + 1
  13924. ]
  13925. )
  13926. );
  13927. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  13928. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  13929. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  13930. }
  13931. }
  13932. this.$forceUpdate();
  13933. })
  13934. .catch(() => {
  13935. return;
  13936. });
  13937. },
  13938. stageMove(type, index) {
  13939. if (type == 1) {
  13940. if (index > 0) {
  13941. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  13942. let acid = JSON.parse(
  13943. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  13944. );
  13945. let bcid = JSON.parse(
  13946. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  13947. );
  13948. this.unitJson3[index - 1] = this.unitJson3[index];
  13949. this.unitJson3[index] = a;
  13950. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  13951. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  13952. }
  13953. } else {
  13954. if (index < this.unitJson3.length - 1) {
  13955. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  13956. let acid = JSON.parse(
  13957. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  13958. );
  13959. let bcid = JSON.parse(
  13960. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  13961. );
  13962. this.unitJson3[index + 1] = this.unitJson3[index];
  13963. this.unitJson3[index] = a;
  13964. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  13965. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  13966. }
  13967. }
  13968. this.$forceUpdate();
  13969. },
  13970. addGroup(i) {
  13971. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  13972. this.groupJson.group.push({
  13973. name: "第" + (this.groupJson.group.length + 1) + "组",
  13974. });
  13975. },
  13976. deleteGroup(i) {
  13977. this.groupJson.group.splice(i, 1);
  13978. },
  13979. numberPan() {
  13980. if (
  13981. /[^\d]/.test(this.groupJson.number) ||
  13982. this.groupJson.number < 2 ||
  13983. this.groupJson.number > 10
  13984. ) {
  13985. this.$message.error("请输入2-10的数字");
  13986. this.groupJson.number = "";
  13987. }
  13988. },
  13989. numberPanJie() {
  13990. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  13991. this.$message.error('请输入大于1的数字')
  13992. this.courseJie = 1
  13993. }
  13994. },
  13995. numberPanTime() {
  13996. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  13997. this.$message.error('请输入大于1的数字')
  13998. this.courseTime = 1
  13999. }
  14000. },
  14001. addGroupJson() {
  14002. for (var i = 0; i < this.groupJson.group.length; i++) {
  14003. if (!this.groupJson.group[i].name) {
  14004. this.$message.error("请将信息填写完整!");
  14005. return;
  14006. }
  14007. }
  14008. if (!this.groupJson.number) {
  14009. this.$message.error("请将信息填写完整!");
  14010. return;
  14011. }
  14012. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14013. this.taskCount
  14014. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  14015. JSON.stringify(this.groupJson)
  14016. );
  14017. this.dialogVisibleGroup = false;
  14018. this.groupJson = {};
  14019. if (
  14020. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14021. .toolChoose[this.toolIndex].tool != 49
  14022. ) {
  14023. this.addTools(49, this.taskCount, this.toolIndex);
  14024. }
  14025. },
  14026. updateTime(preTime) {
  14027. this.preTime = preTime;
  14028. },
  14029. InviteChange(val) {
  14030. console.log(val);
  14031. let _check = [];
  14032. let _check2 = [];
  14033. for (var i = 0; i < this.grade2.length; i++) {
  14034. var gid = this.grade2[i].id;
  14035. _check.push(gid);
  14036. }
  14037. for (var i = 0; i < this.checkboxList2.length; i++) {
  14038. var _id = this.checkboxList2[i];
  14039. if (_check.indexOf(_id) !== -1) {
  14040. _check2.push(_id);
  14041. }
  14042. }
  14043. this.checkAll = _check2.length === _check.length;
  14044. return;
  14045. let array = JSON.parse(JSON.stringify(val));
  14046. this.inviteCode = this.inviteCode.filter((el) => {
  14047. if (val.indexOf(el.cid) != -1) {
  14048. array.splice(array.indexOf(el.cid), 1);
  14049. return el;
  14050. }
  14051. });
  14052. for (var i = 0; i < array.length; i++) {
  14053. this.getInviteCode(array[i]);
  14054. }
  14055. },
  14056. InviteChange2(val) {
  14057. console.log(val);
  14058. let _check = [];
  14059. let _check2 = [];
  14060. for (var i = 0; i < this.teacherJuri.length; i++) {
  14061. var gid = this.teacherJuri[i].userid;
  14062. _check.push(gid);
  14063. }
  14064. for (var i = 0; i < this.checkboxList3.length; i++) {
  14065. var _id = this.checkboxList3[i];
  14066. if (_check.indexOf(_id) !== -1) {
  14067. _check2.push(_id);
  14068. }
  14069. }
  14070. this.checkAll2 = _check2.length === _check.length;
  14071. this.setMan();
  14072. return;
  14073. let array = JSON.parse(JSON.stringify(val));
  14074. this.inviteCode = this.inviteCode.filter((el) => {
  14075. if (val.indexOf(el.cid) != -1) {
  14076. array.splice(array.indexOf(el.cid), 1);
  14077. return el;
  14078. }
  14079. });
  14080. for (var i = 0; i < array.length; i++) {
  14081. this.getInviteCode(array[i]);
  14082. }
  14083. },
  14084. handleCheckAllChange(val) {
  14085. if (val) {
  14086. for (var i = 0; i < this.grade2.length; i++) {
  14087. var gid = this.grade2[i].id;
  14088. if (this.checkboxList2.indexOf(gid) === -1) {
  14089. this.checkboxList2.push(gid);
  14090. }
  14091. }
  14092. } else {
  14093. let _check = [];
  14094. let _check2 = [];
  14095. for (var i = 0; i < this.grade2.length; i++) {
  14096. var gid = this.grade2[i].id;
  14097. _check.push(gid);
  14098. }
  14099. for (var i = 0; i < this.checkboxList2.length; i++) {
  14100. var _id = this.checkboxList2[i];
  14101. if (_check.indexOf(_id) === -1) {
  14102. _check2.push(_id);
  14103. }
  14104. }
  14105. this.checkboxList2 = _check2;
  14106. }
  14107. this.isIndeterminate = false;
  14108. },
  14109. handleCheckAllChange2(val) {
  14110. if (val) {
  14111. for (var i = 0; i < this.teacherJuri.length; i++) {
  14112. var gid = this.teacherJuri[i].userid;
  14113. if (this.checkboxList3.indexOf(gid) === -1) {
  14114. this.checkboxList3.push(gid);
  14115. }
  14116. }
  14117. } else {
  14118. let _check = [];
  14119. let _check2 = [];
  14120. for (var i = 0; i < this.teacherJuri.length; i++) {
  14121. var gid = this.teacherJuri[i].userid;
  14122. _check.push(gid);
  14123. }
  14124. for (var i = 0; i < this.checkboxList3.length; i++) {
  14125. var _id = this.checkboxList3[i];
  14126. if (_check.indexOf(_id) === -1) {
  14127. _check2.push(_id);
  14128. }
  14129. }
  14130. this.checkboxList3 = _check2;
  14131. }
  14132. this.isIndeterminate2 = false;
  14133. },
  14134. async getInviteCode(cid) {
  14135. let code = this.randomNumber();
  14136. let params = {
  14137. code: code,
  14138. oid: this.oid,
  14139. };
  14140. let type = 1;
  14141. for (var i = 0; i < this.inviteCode.length; i++) {
  14142. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  14143. type = 2;
  14144. }
  14145. }
  14146. if (type == 2) {
  14147. this.getInviteCode(cid);
  14148. return;
  14149. }
  14150. const res = await this.ajax.get(
  14151. this.$store.state.api + "selectInviteCode2",
  14152. params
  14153. );
  14154. if (
  14155. res.data.length &&
  14156. res.data[0].length &&
  14157. res.data[0][0].courseId != this.cid
  14158. ) {
  14159. this.getInviteCode(cid);
  14160. return;
  14161. }
  14162. let array = [];
  14163. for (var i = 0; i < this.inviteCode.length; i++) {
  14164. array.push(this.inviteCode[i].cid);
  14165. }
  14166. if (array.indexOf(cid) != -1) {
  14167. this.inviteCode[array.indexOf(cid)].ic = code;
  14168. } else {
  14169. this.inviteCode.push({ cid: cid, ic: code });
  14170. }
  14171. },
  14172. OpenInviteD(cid) {
  14173. let array = [];
  14174. this.icode = "";
  14175. for (var i = 0; i < this.inviteCode.length; i++) {
  14176. array.push(this.inviteCode[i].cid);
  14177. }
  14178. if (array.indexOf(cid) != -1) {
  14179. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  14180. }
  14181. this.inviteId = cid;
  14182. this.dialogVisibleInvite = true;
  14183. },
  14184. addInvite() {
  14185. let reg = /^[A-Za-z0-9]{4,}$/;
  14186. if (!reg.test(this.icode)) {
  14187. this.$message.error("请输入至少四位数字或英文组合的随机码");
  14188. return;
  14189. }
  14190. let type = 1;
  14191. for (var i = 0; i < this.inviteCode.length; i++) {
  14192. if (
  14193. this.inviteCode[i].cid != this.inviteId &&
  14194. this.icode == this.inviteCode[i].ic
  14195. ) {
  14196. type = 2;
  14197. }
  14198. }
  14199. if (type == 2) {
  14200. this.$message.error("已有此随机码,不能重复");
  14201. return;
  14202. }
  14203. let params = {
  14204. code: this.icode,
  14205. oid: this.oid,
  14206. };
  14207. this.ajax
  14208. .get(this.$store.state.api + "selectInviteCode", params)
  14209. .then((res) => {
  14210. if (
  14211. res.data.length &&
  14212. res.data[0].length &&
  14213. res.data[0][0].courseId != this.cid
  14214. ) {
  14215. this.$message.error("已有此随机码,不能重复");
  14216. return;
  14217. }
  14218. let array = [];
  14219. for (var i = 0; i < this.inviteCode.length; i++) {
  14220. array.push(this.inviteCode[i].cid);
  14221. }
  14222. if (array.indexOf(this.inviteId) != -1) {
  14223. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  14224. } else {
  14225. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  14226. }
  14227. this.icode = "";
  14228. this.dialogVisibleInvite = false;
  14229. })
  14230. .catch((err) => {
  14231. console.error(err);
  14232. });
  14233. },
  14234. randomNumber() {
  14235. // 随机生成两位数
  14236. // let num = Math.floor(Math.random() * 900) + 100;
  14237. // 生成 0 到 99 之间的随机整数
  14238. const randomNumber = Math.floor(Math.random() * 100);
  14239. // 如果随机数小于 10,补上前导零
  14240. const num =
  14241. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  14242. // 随机生成两个大写字母
  14243. let letters = "";
  14244. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  14245. for (let i = 0; i < 3; i++) {
  14246. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  14247. }
  14248. // 随机生成两位数字和字母的组合
  14249. let mix = "";
  14250. let chars =
  14251. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  14252. for (let i = 0; i < 3; i++) {
  14253. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  14254. mix += char;
  14255. }
  14256. // 随机选择一种类型
  14257. let type = Math.floor(Math.random() * 3);
  14258. return num;
  14259. // 根据类型输出结果
  14260. switch (type) {
  14261. case 0:
  14262. console.log(num); // 输出两位数
  14263. return num;
  14264. case 1:
  14265. console.log(letters); // 输出两个大写字母
  14266. return letters;
  14267. case 2:
  14268. console.log(mix); // 输出两位数字和字母的组合
  14269. return mix;
  14270. }
  14271. },
  14272. getPaste() {
  14273. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14274. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14275. if (!iframe && !iframe2) {
  14276. return;
  14277. }
  14278. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14279. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14280. if (copyData && copyData.stageData && copyData.stageData.length) {
  14281. this.isPasteStage = true;
  14282. }
  14283. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  14284. this.isPasteStage = true;
  14285. }
  14286. if (copyData && copyData.selectData.length) {
  14287. this.isPasteChoice = true;
  14288. }
  14289. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  14290. this.isPasteTask = true;
  14291. }
  14292. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  14293. this.isPasteTask = true;
  14294. }
  14295. },
  14296. setCover() {
  14297. var _this = this;
  14298. if(_this.cover.length){
  14299. return;
  14300. }
  14301. _this.imageloading2 = true
  14302. _this.ajax
  14303. .post("https://gpt.cocorobo.cn/search_image", {
  14304. page: _this.ppage,
  14305. pagesize: 9,
  14306. query: _this.courseName,
  14307. })
  14308. .then(function (response) {
  14309. // console.log(response.data.data);
  14310. var data = response.data.FunctionResponse.result;
  14311. _this.cover = [];
  14312.       setTimeout(() => {
  14313.         _this.cover[0] = {
  14314.           name: "网络图片.png",
  14315.           url: data[0].thumbnail
  14316.         };
  14317.         _this.imgChange1(null, null, 1, null);
  14318.         _this.$forceUpdate();
  14319.       }, 0);
  14320. _this.imageloading2 = false
  14321. })
  14322. .catch(function (error) {
  14323. _this.imageloading2 = false
  14324. console.log(error);
  14325. });
  14326. },
  14327. searchImage() {
  14328. var _this = this;
  14329. _this.imageList = [];
  14330. if (!_this.searchImageValue) {
  14331. _this.sysPicVisible2 = true;
  14332. return;
  14333. }
  14334. _this.imageloading = true;
  14335. _this.ajax
  14336. .post("https://gpt.cocorobo.cn/search_image", {
  14337. page: _this.ppage,
  14338. pagesize: 9,
  14339. query: _this.searchImageValue,
  14340. })
  14341. .then(function (response) {
  14342. // console.log(response.data.data);
  14343. var data = response.data.FunctionResponse.result;
  14344. for (var i = 0; i < data.length; i++) {
  14345. _this.imageList.push({ url: data[i].thumbnail });
  14346. }
  14347. _this.imageloading = false;
  14348. })
  14349. .catch(function (error) {
  14350. console.log(error);
  14351. });
  14352. _this.sysPicVisible2 = true;
  14353. },
  14354. changePicture() {
  14355. this.ppage++;
  14356. this.searchImage();
  14357. },
  14358. resetImage() {
  14359. this.ppage = 1;
  14360. this.searchImage();
  14361. },
  14362. jumpGj(i, j) {
  14363. if (i + 1 != this.isClickColor) {
  14364. this.isClickColor = i + 1;
  14365. }
  14366. var a = document.scrollingElement;
  14367. this.toolIndexType = `gj${i}${j}`;
  14368. let target = document.querySelector(`#gj${i}${j}`);
  14369. if (target) {
  14370. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  14371. setTimeout(() => {
  14372. target.scrollIntoView(true);
  14373. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  14374. j
  14375. ].isFold3 = false;
  14376. setTimeout(() => {
  14377. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  14378. }, 0);
  14379. }, 0);
  14380. }
  14381. },
  14382. jumpGj2(i, j, k) {
  14383. if (this.unitIndex != k) {
  14384. if (this.panUnitJson() == 2) {
  14385. return;
  14386. }
  14387. this.unitSet(k);
  14388. }
  14389. setTimeout(() => {
  14390. if (i + 1 != this.isClickColor) {
  14391. this.isClickColor = i + 1;
  14392. }
  14393. var a = document.scrollingElement;
  14394. this.toolIndexType = `gj${i}${j}${k}`;
  14395. let target = document.querySelector(`#gj${i}${j}`);
  14396. if (target) {
  14397. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  14398. setTimeout(() => {
  14399. target.scrollIntoView(true);
  14400. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  14401. j
  14402. ].isFold3 = false;
  14403. setTimeout(() => {
  14404. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  14405. }, 0);
  14406. }, 0);
  14407. }
  14408. }, 0);
  14409. },
  14410. dragStart(val, i, j) {
  14411. console.log(this.taskCount);
  14412. this.dragType = "drag";
  14413. this.taskCount = j;
  14414. this.oldIndex = i;
  14415. this.oldData = val;
  14416. },
  14417. dragOver(i, j) {
  14418. this.typeIndex = "chapter-" + j + "-" + i;
  14419. this.newIndex = i;
  14420. },
  14421. dragEnd() {
  14422. if (this.dragType != "drag") {
  14423. this.typeIndex = "";
  14424. this.newIndex = "";
  14425. this.dragType = "";
  14426. this.isdrag = "";
  14427. return;
  14428. }
  14429. console.log(this.taskCount);
  14430. let newItems = [
  14431. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14432. .chapterData,
  14433. ];
  14434. // 删除老的节点
  14435. newItems.splice(this.oldIndex, 1);
  14436. // 在列表中目标位置增加新的节点
  14437. newItems.splice(this.newIndex, 0, this.oldData);
  14438. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14439. this.taskCount
  14440. ].chapterData = [...newItems];
  14441. this.typeIndex = "";
  14442. this.newIndex = "";
  14443. this.dragType = "";
  14444. this.isdrag = "";
  14445. this.$forceUpdate();
  14446. },
  14447. dragTaskStart(val, i, j) {
  14448. this.dragType = "task";
  14449. this.oldIndex = i;
  14450. this.oldData = val;
  14451. this.oldUnitIndex = j;
  14452. },
  14453. dragTaskOver(i, j) {
  14454. this.typeIndex = "task-" + i;
  14455. this.newIndex = i;
  14456. this.checkUnitIndex = j;
  14457. },
  14458. async dragTaskEnd() {
  14459. if (this.dragType != "task") {
  14460. this.newIndex = "";
  14461. this.dragType = "";
  14462. this.typeIndex = "";
  14463. this.checkUnitIndex = "";
  14464. this.isdrag = "";
  14465. return;
  14466. }
  14467. if (
  14468. this.newIndex == this.oldIndex &&
  14469. this.oldUnitIndex == this.checkUnitIndex
  14470. ) {
  14471. this.newIndex = "";
  14472. this.dragType = "";
  14473. this.typeIndex = "";
  14474. this.checkUnitIndex = "";
  14475. this.isdrag = "";
  14476. return;
  14477. }
  14478. let count1 = await this.getWorksCount(
  14479. 2,
  14480. this.checkUnitIndex,
  14481. this.newIndex,
  14482. 0
  14483. );
  14484. let count2 = await this.getWorksCount(
  14485. 2,
  14486. this.oldUnitIndex,
  14487. this.oldIndex,
  14488. 0
  14489. );
  14490. if (count1 > 0 || count2 > 0) {
  14491. this.$confirm(
  14492. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  14493. "提示",
  14494. {
  14495. confirmButtonText: "确定",
  14496. cancelButtonText: "取消",
  14497. type: "warning",
  14498. }
  14499. )
  14500. .then(() => {
  14501. if (this.oldUnitIndex != this.checkUnitIndex) {
  14502. let newItems = [
  14503. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14504. ];
  14505. // 删除老的节点
  14506. newItems.splice(this.oldIndex, 1);
  14507. // 在列表中目标位置增加新的节点
  14508. let newItems2 = [
  14509. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  14510. ];
  14511. newItems2.splice(this.newIndex, 0, this.oldData);
  14512. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14513. ...newItems,
  14514. ];
  14515. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  14516. ...newItems2,
  14517. ];
  14518. } else {
  14519. let newItems = [
  14520. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14521. ];
  14522. let chapterData = []
  14523. if (this.oldIndex == 0) {
  14524. chapterData = newItems[this.oldIndex].chapterData
  14525. newItems[this.oldIndex].chapterData = []
  14526. } else if (this.newIndex == 0) {
  14527. chapterData = newItems[this.newIndex].chapterData
  14528. newItems[this.oldIndex].chapterData = []
  14529. }
  14530. // 删除老的节点
  14531. newItems.splice(this.oldIndex, 1);
  14532. // 在列表中目标位置增加新的节点
  14533. newItems.splice(this.newIndex, 0, this.oldData);
  14534. if (this.oldIndex == 0 || this.newIndex == 0) {
  14535. newItems[0].chapterData = chapterData
  14536. }
  14537. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14538. ...newItems,
  14539. ];
  14540. }
  14541. this.typeIndex = "";
  14542. this.newIndex = "";
  14543. this.dragType = "";
  14544. this.checkUnitIndex = "";
  14545. this.isdrag = "";
  14546. this.updateWork();
  14547. this.$forceUpdate();
  14548. })
  14549. .catch(() => {
  14550. this.newIndex = "";
  14551. this.dragType = "";
  14552. this.typeIndex = "";
  14553. this.checkUnitIndex = "";
  14554. this.isdrag = "";
  14555. return;
  14556. });
  14557. } else {
  14558. if (this.oldUnitIndex != this.checkUnitIndex) {
  14559. let newItems = [
  14560. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14561. ];
  14562. // 删除老的节点
  14563. newItems.splice(this.oldIndex, 1);
  14564. // 在列表中目标位置增加新的节点
  14565. let newItems2 = [
  14566. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  14567. ];
  14568. newItems2.splice(this.newIndex, 0, this.oldData);
  14569. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14570. ...newItems,
  14571. ];
  14572. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  14573. ...newItems2,
  14574. ];
  14575. } else {
  14576. let newItems = [
  14577. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  14578. ];
  14579. let chapterData = []
  14580. if (this.oldIndex == 0) {
  14581. chapterData = newItems[this.oldIndex].chapterData
  14582. newItems[this.oldIndex].chapterData = []
  14583. } else if (this.newIndex == 0) {
  14584. chapterData = newItems[this.newIndex].chapterData
  14585. newItems[this.oldIndex].chapterData = []
  14586. }
  14587. // 删除老的节点
  14588. newItems.splice(this.oldIndex, 1);
  14589. // 在列表中目标位置增加新的节点
  14590. newItems.splice(this.newIndex, 0, this.oldData);
  14591. if (this.oldIndex == 0 || this.newIndex == 0) {
  14592. newItems[0].chapterData = chapterData
  14593. }
  14594. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  14595. ...newItems,
  14596. ];
  14597. }
  14598. this.typeIndex = "";
  14599. this.newIndex = "";
  14600. this.dragType = "";
  14601. this.checkUnitIndex = "";
  14602. this.isdrag = "";
  14603. this.updateWork();
  14604. this.$forceUpdate();
  14605. }
  14606. },
  14607. dragUnitStart(val, i) {
  14608. this.dragType = "Unit";
  14609. this.oldIndex = i;
  14610. this.oldData = val;
  14611. },
  14612. dragUnitOver(i) {
  14613. this.typeIndex = "Unit-" + i;
  14614. this.newIndex = i;
  14615. console.log(i, this.unitJson[i].toolOpen);
  14616. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  14617. this.unitJson[i].toolOpen = true;
  14618. this.updateWork();
  14619. this.$forceUpdate();
  14620. }
  14621. },
  14622. async dragUnitEnd() {
  14623. if (this.dragType != "Unit") {
  14624. this.newIndex = "";
  14625. this.dragType = "";
  14626. this.typeIndex = "";
  14627. this.isdrag = "";
  14628. return;
  14629. }
  14630. if (this.newIndex == this.oldIndex) {
  14631. this.newIndex = "";
  14632. this.dragType = "";
  14633. this.typeIndex = "";
  14634. this.isdrag = "";
  14635. return;
  14636. }
  14637. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  14638. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  14639. console.log(count1, count2);
  14640. if (count1 > 0 || count2 > 0) {
  14641. this.$confirm(
  14642. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  14643. "提示",
  14644. {
  14645. confirmButtonText: "确定",
  14646. cancelButtonText: "取消",
  14647. type: "warning",
  14648. }
  14649. )
  14650. .then(() => {
  14651. let newItems = [...this.unitJson];
  14652. // 删除老的节点
  14653. newItems.splice(this.oldIndex, 1);
  14654. // 在列表中目标位置增加新的节点
  14655. newItems.splice(this.newIndex, 0, this.oldData);
  14656. this.unitJson = [...newItems];
  14657. this.typeIndex = "";
  14658. this.newIndex = "";
  14659. this.dragType = "";
  14660. this.isdrag = "";
  14661. this.updateWork();
  14662. this.$forceUpdate();
  14663. })
  14664. .catch(() => {
  14665. this.newIndex = "";
  14666. this.dragType = "";
  14667. this.typeIndex = "";
  14668. this.isdrag = "";
  14669. return;
  14670. });
  14671. } else {
  14672. let newItems = [...this.unitJson];
  14673. // 删除老的节点
  14674. newItems.splice(this.oldIndex, 1);
  14675. // 在列表中目标位置增加新的节点
  14676. newItems.splice(this.newIndex, 0, this.oldData);
  14677. this.unitJson = [...newItems];
  14678. this.typeIndex = "";
  14679. this.newIndex = "";
  14680. this.dragType = "";
  14681. this.isdrag = "";
  14682. this.updateWork();
  14683. this.$forceUpdate();
  14684. }
  14685. },
  14686. getWorksCount(type, stage, task, tool) {
  14687. return new Promise((resolve, reject) => {
  14688. let params = [
  14689. {
  14690. cid: this.cid,
  14691. stage: stage,
  14692. task: task,
  14693. tool: tool,
  14694. type: type,
  14695. },
  14696. ];
  14697. this.ajax
  14698. .post(this.$store.state.api + "getCourseWorkCount", params)
  14699. .then((res) => {
  14700. let count = res.data[0][0].count;
  14701. resolve(count);
  14702. })
  14703. .catch((err) => {
  14704. resolve(0);
  14705. this.$message.error("网络不佳");
  14706. console.error(err);
  14707. });
  14708. });
  14709. },
  14710. getTwoType(id) {
  14711. this.twoJson = [];
  14712. var array = this.CourseTypeJson1[
  14713. "3f8eed32-aba9-11ee-b534-005056b86db5"
  14714. ].filter((e) => {
  14715. return e.ppid == id;
  14716. });
  14717. this.twoJson = array;
  14718. this.$forceUpdate();
  14719. },
  14720. ctype() {
  14721. this.oneJson =
  14722. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  14723. },
  14724. selectAllType1() {
  14725. this.CourseType1 = [];
  14726. this.CourseTypeJson1 = {};
  14727. this.courseTypeId1 = {};
  14728. this.$forceUpdate();
  14729. let params = {
  14730. org: this.org && this.org != "" ? this.org : "",
  14731. oid: this.oid && this.oid != "" ? this.oid : "",
  14732. };
  14733. this.ajax
  14734. .get(this.$store.state.api + "selectAllEvaType", params)
  14735. .then((res) => {
  14736. this.CourseType1 = res.data;
  14737. for (var i = 0; i < res.data[0].length; i++) {
  14738. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  14739. res.data[0][i].name = "一级分类";
  14740. } else if (
  14741. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  14742. ) {
  14743. res.data[0][i].name = "二级分类";
  14744. }
  14745. if (!this.cid) {
  14746. this.courseTypeId1[res.data[0][i].id] = [];
  14747. }
  14748. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  14749. this.CourseTypeJson1[res.data[0][i].id] = [];
  14750. }
  14751. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  14752. for (var j = 0; j < res.data[1].length; j++) {
  14753. if (res.data[0][i].id == res.data[1][j].pid) {
  14754. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14755. }
  14756. }
  14757. // } else {
  14758. if (res.data[2].length > 0) {
  14759. for (var j = 0; j < res.data[2].length; j++) {
  14760. if (res.data[0][i].id == res.data[2][j].pid) {
  14761. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14762. }
  14763. }
  14764. }
  14765. if (res.data[3].length > 0) {
  14766. for (var j = 0; j < res.data[3].length; j++) {
  14767. if (res.data[0][i].id == res.data[3][j].pid) {
  14768. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14769. }
  14770. }
  14771. }
  14772. // }
  14773. }
  14774. this.ctype();
  14775. this.cetBoxDialog = true;
  14776. })
  14777. .catch((err) => {
  14778. console.error(err);
  14779. });
  14780. },
  14781. setAiJson(pan,string,string2){
  14782. if(pan == 'aiTeacher2'){
  14783. this.aiJson['teacherDetail2'] = string
  14784. }else if(pan == 'aiRateRuleA'){
  14785. this.aiJson['aiRateRule'] = string
  14786. }else if(pan == 'aiOutline2'){
  14787. this.aiJson['aiOutlineTask'] = string
  14788. this.aiJson['aiOutlineDetail'] = string2
  14789. this.aiText2 = ''
  14790. }else if(pan == 'aiTeacher3'){
  14791. this.aiJson['aiCpoteTask'] = string
  14792. this.aiJson['teacherDetail2'] = string2
  14793. this.aiText2 = ''
  14794. }else if(pan == 'aiTask2'){
  14795. this.aiJson['aiTask'] = string
  14796. }else {
  14797. this.aiJson[pan] = string
  14798. }
  14799. this.$forceUpdate();
  14800. },
  14801. editTask3(index){
  14802. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  14803. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  14804. }else {
  14805. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  14806. }
  14807. this.$forceUpdate();
  14808. },
  14809. editTask2(index){
  14810. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  14811. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  14812. }else {
  14813. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  14814. }
  14815. this.$forceUpdate();
  14816. },
  14817. openRule(i, k){
  14818. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  14819. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  14820. }else {
  14821. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  14822. }
  14823. this.$forceUpdate();
  14824. },
  14825. editCpote(index){
  14826. if(this.cpote[index]){
  14827. this.cpote[index] = false
  14828. }else {
  14829. this.cpote[index] = true
  14830. }
  14831. this.$forceUpdate();
  14832. },
  14833. clickGenTT(){
  14834. if(!this.teacherInfoData.length){
  14835. this.$message.error("请上传教案");
  14836. return;
  14837. }
  14838. this.openAiDialog(2, 'aiteacherTextDetail',1)
  14839. setTimeout(() => {
  14840. this.openAiDialog(2, 'aitargetTextDetail',1)
  14841. }, 500);
  14842. },
  14843. clickGenTT2(){
  14844. if (this.courseName == "") {
  14845. this.$message.error("请补充填写课程名称");
  14846. return;
  14847. }
  14848. this.openAiDialog(2, 'aiDetail',1)
  14849. setTimeout(() => {
  14850. this.openAiDialog(2, 'aitargetTextDetail2',1)
  14851. }, 500);
  14852. this.courseTextBool = true
  14853. },
  14854. openAiDialog2(clickType, type, callback, index, tindex){
  14855. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  14856. confirmButtonText: "确定",
  14857. cancelButtonText: "取消",
  14858. type: "warning",
  14859. })
  14860. .then(() => {
  14861. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  14862. // this.openAiDialog(clickType, 'aiTeacher')
  14863. // }else {
  14864. this.openAiDialog(clickType, type, callback, index, tindex)
  14865. // }
  14866. })
  14867. .catch(() => {
  14868. });
  14869. },
  14870. openAiDialog(clickType, type, callback, index, tindex) {
  14871. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  14872. this.$message.error("您没有权限修改/查看提示词");
  14873. return;
  14874. }
  14875. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  14876. this.$message.error("请上传教案");
  14877. return;
  14878. }
  14879. if (this.courseName == "") {
  14880. this.$message.error("请补充填写课程名称");
  14881. return;
  14882. }
  14883. this.aiText2 = ''
  14884. this.clickType = clickType
  14885. let sub = []
  14886. if (this.courseTypeId.length) {
  14887. for (var i = 0; i < this.courseTypeId.length; i++) {
  14888. let _sid = this.courseTypeId[i]
  14889. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  14890. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  14891. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  14892. }
  14893. }
  14894. }
  14895. }
  14896. let mclass = []
  14897. if (this.courseTypeId.length) {
  14898. for (var i = 0; i < this.courseTypeId.length; i++) {
  14899. let _sid = this.courseTypeId[i]
  14900. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  14901. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  14902. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  14903. }
  14904. }
  14905. }
  14906. }
  14907. if (type == "aiDetail") {
  14908. if (this.ttextLoading) {
  14909. this.$message({
  14910. message: "请回答完毕后再次发送",
  14911. type: "warning"
  14912. });
  14913. return;
  14914. }
  14915. this.aitype = "aiDetail"
  14916. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  14917. this.aiText = this.aiJson.aiDetail
  14918. this.aiCallback = callback
  14919. } else if (type == "aiOutline") {
  14920. this.aitype = "aiOutline"
  14921. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  14922. this.aiText = this.aiJson.aiOutline
  14923. } else if (type == "aiOutline2") {
  14924. this.aitype = "aiOutline2"
  14925. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  14926. this.aiText = this.aiJson.aiOutlineTask
  14927. this.aiText2 = this.aiJson.aiOutlineDetail
  14928. } else if (type == "aiOutlineDetail2") {
  14929. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  14930. this.$message({
  14931. message: "请回答完毕后再次发送",
  14932. type: "warning"
  14933. });
  14934. return;
  14935. }
  14936. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  14937. this.$message.error('请输入任务名称')
  14938. return;
  14939. }
  14940. this.aitype = type
  14941. this.aiCallBack = callback
  14942. this.aiText = this.aiJson.aiOutlineDetail2
  14943. } else if (type == "aiTask") {
  14944. this.aitype = "aiTask"
  14945. var _text = ""
  14946. for (var i = 0; i < this.teacherText.length; i++) {
  14947. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  14948. }
  14949. // this.aiText = `请根据${_text}。`
  14950. this.aiText = this.aiJson.aiTask
  14951. this.aiCallBack = callback
  14952. } else if (type == "aiTask2") {
  14953. if (this.taskLoading[callback]) {
  14954. this.$message({
  14955. message: "请回答完毕后再次发送",
  14956. type: "warning"
  14957. });
  14958. return;
  14959. }
  14960. this.aitype = "aiTask2"
  14961. this.aiText = this.aiJson.aiTask
  14962. this.aiCallBack = callback
  14963. } else if (type == "aiDetail1") {
  14964. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  14965. this.$message({
  14966. message: "请回答完毕后再次发送",
  14967. type: "warning"
  14968. });
  14969. return;
  14970. }
  14971. this.aitype = "aiDetail1"
  14972. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  14973. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  14974. this.aiText = this.aiJson.aiDetail1
  14975. this.aiCallBack = callback
  14976. this.aiIndex = index
  14977. } else if (type == "aiDetail2") {
  14978. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  14979. this.$message({
  14980. message: "请回答完毕后再次发送",
  14981. type: "warning"
  14982. });
  14983. return;
  14984. }
  14985. this.aitype = "aiDetail2"
  14986. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  14987. this.aiText = this.aiJson.aiDetail2
  14988. this.aiCallBack = callback
  14989. this.aiIndex = index
  14990. } else if (type == "aiDetail3") {
  14991. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  14992. this.$message({
  14993. message: "请回答完毕后再次发送",
  14994. type: "warning"
  14995. });
  14996. return;
  14997. }
  14998. this.aitype = "aiDetail3"
  14999. this.aiText = this.aiJson.aiDetail3
  15000. this.aiIndex = index + '-' + tindex
  15001. } else if (type == "aiDetail4") {
  15002. var _text = ""
  15003. for (var i = 0; i < callback.length; i++) {
  15004. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  15005. }
  15006. this.aitype = "aiDetail4"
  15007. this.aiText = this.aiJson.aiDetail4
  15008. this.aiIndex = index
  15009. } else if (type == "aiTeacher") {
  15010. this.aitype = "aiTeacher"
  15011. var _text = ""
  15012. for (var i = 0; i < this.dArray.length; i++) {
  15013. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  15014. }
  15015. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15016. this.aiText = this.aiJson.aiTeacher
  15017. this.aiCallBack = callback
  15018. } else if (type == "aiTeacher2") {
  15019. this.aitype = "aiTeacher2"
  15020. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15021. } else if (type == "aiTeacher3") {
  15022. this.aitype = type
  15023. this.aiText = this.aiJson.aiCpoteTask
  15024. this.aiText2 = this.aiJson.teacherDetail2
  15025. } else if (type == "teacherDetail") {
  15026. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15027. this.$message({
  15028. message: "请回答完毕后再次发送",
  15029. type: "warning"
  15030. });
  15031. return;
  15032. }
  15033. this.aitype = "teacherDetail"
  15034. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15035. this.aiText = this.aiJson.teacherDetail
  15036. this.aiCallBack = callback
  15037. this.aiIndex = index
  15038. } else if (type == "teacherDetail2") {
  15039. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15040. this.$message({
  15041. message: "请回答完毕后再次发送",
  15042. type: "warning"
  15043. });
  15044. return;
  15045. }
  15046. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  15047. this.$message.error('请输入任务名称')
  15048. return;
  15049. }
  15050. this.aitype = "teacherDetail2"
  15051. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15052. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15053. this.aiCallBack = callback
  15054. this.aiIndex = index
  15055. } else if (type == "aiCpote1") {
  15056. if (this.cpotetLoading.cpote1) {
  15057. this.$message({
  15058. message: "请回答完毕后再次发送",
  15059. type: "warning"
  15060. });
  15061. return;
  15062. }
  15063. this.aitype = "aiCpote1"
  15064. this.aiText = this.aiJson.cpote1
  15065. this.aiCallBack = callback
  15066. } else if (type == "aiCpote2") {
  15067. if (this.cpotetLoading.cpote2) {
  15068. this.$message({
  15069. message: "请回答完毕后再次发送",
  15070. type: "warning"
  15071. });
  15072. return;
  15073. }
  15074. this.aitype = "aiCpote2"
  15075. this.aiText = this.aiJson.cpote2
  15076. this.aiCallBack = callback
  15077. } else if (type == "aiCpote3") {
  15078. if (this.cpotetLoading.cpote3) {
  15079. this.$message({
  15080. message: "请回答完毕后再次发送",
  15081. type: "warning"
  15082. });
  15083. return;
  15084. }
  15085. this.aitype = "aiCpote3"
  15086. this.aiText = this.aiJson.cpote3
  15087. this.aiCallBack = callback
  15088. } else if (type == "aiCpote4") {
  15089. if (this.cpotetLoading.cpote4) {
  15090. this.$message({
  15091. message: "请回答完毕后再次发送",
  15092. type: "warning"
  15093. });
  15094. return;
  15095. }
  15096. this.aitype = "aiCpote4"
  15097. this.aiText = this.aiJson.cpote4
  15098. this.aiCallBack = callback
  15099. } else if (type == 'aiteacherTextDetail'){
  15100. if (this.tteacherTextLoading) {
  15101. this.$message({
  15102. message: "请回答完毕后再次发送",
  15103. type: "warning"
  15104. });
  15105. return;
  15106. }
  15107. this.aitype = type
  15108. this.aiText = this.aiJson.aiAbstract
  15109. this.aiCallback = callback
  15110. } else if (type == 'aitargetTextDetail'){
  15111. if (this.ttargetTextLoading) {
  15112. this.$message({
  15113. message: "请回答完毕后再次发送",
  15114. type: "warning"
  15115. });
  15116. return;
  15117. }
  15118. this.aitype = type
  15119. this.aiText = this.aiJson.aiTarget
  15120. this.aiCallback = callback
  15121. } else if (type == 'aitargetTextDetail2'){
  15122. if (this.ttargetTextLoading2) {
  15123. this.$message({
  15124. message: "请回答完毕后再次发送",
  15125. type: "warning"
  15126. });
  15127. return;
  15128. }
  15129. this.aitype = type
  15130. this.aiText = this.aiJson.aiTarget2
  15131. this.aiCallback = callback
  15132. } else if (type == 'aiSearchFile'){
  15133. if(this.fileSLoading) {
  15134. this.$message({
  15135. message: "请回答完毕后再次发送",
  15136. type: "warning"
  15137. });
  15138. return;
  15139. }
  15140. this.aitype = type
  15141. this.aiText = this.aiJson.aiSearchFile
  15142. } else if (type == 'aiRateRule'){
  15143. this.aitype = type
  15144. this.aiText = this.aiJson.aiRateRule
  15145. this.aiCallback = [callback, index]
  15146. } else if (type == 'aiRateRuleA'){
  15147. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  15148. confirmButtonText: "生成所有",
  15149. cancelButtonText: "仅生成该任务",
  15150. distinguishCancelAndClose: true,
  15151. type: "warning",
  15152. })
  15153. .then(() => {
  15154. this.aitype = type
  15155. this.aiText = this.aiJson.aiRateRule
  15156. this.aiCallback = [1,callback]
  15157. this.dialogVisibleAiD = true
  15158. }).catch(() => {
  15159. console.log(v);
  15160. if (v == "cancel") {
  15161. this.aitype = type
  15162. this.aiText = this.aiJson.aiRateRule
  15163. this.aiCallback = [2,callback]
  15164. this.dialogVisibleAiD = true
  15165. }
  15166. })
  15167. }
  15168. if(type != 'aiRateRuleA'){
  15169. this.dialogVisibleAiD = true
  15170. }
  15171. },
  15172. async aiConfirm(msg,msg2) {
  15173. let sub = []
  15174. if (this.courseTypeId.length) {
  15175. for (var i = 0; i < this.courseTypeId.length; i++) {
  15176. let _sid = this.courseTypeId[i]
  15177. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15178. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15179. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15180. }
  15181. }
  15182. }
  15183. }
  15184. let mclass = []
  15185. if (this.courseTypeId.length) {
  15186. for (var i = 0; i < this.courseTypeId.length; i++) {
  15187. let _sid = this.courseTypeId[i]
  15188. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15189. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15190. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15191. }
  15192. }
  15193. }
  15194. }
  15195. let url = []
  15196. if (this.infoData.length) {
  15197. for (var i = 0; i < this.infoData.length; i++) {
  15198. url.push(this.infoData[i].url)
  15199. }
  15200. }
  15201. if (this.aitype == "aiDetail") {
  15202. this.detailYou(msg)
  15203. } else if (this.aitype == "aiOutline") {
  15204. this.loading = true
  15205. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  15206. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  15207. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  15208. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  15209. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15210. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  15211. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  15212. let message = `NOTICE
  15213. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15214. 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.
  15215. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15216. Instruction: Based on the context, follow "Format example", write content.
  15217. # Context
  15218. ## 要求
  15219. ${msg} 以及##参考资料
  15220. ## 参考资料
  15221. 课程名字:${this.courseName}
  15222. ${courseText ? '课程简要描述:' + courseText : ''}
  15223. ${sub.length ? '学科:' + sub.join(",") : ''}
  15224. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15225. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15226. detail输出不要输出成json,文本或者markdown都可以
  15227. # Format example
  15228. [{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"}]`
  15229. this.aiGet2(message, () => {
  15230. this.loading = false
  15231. this.isOutline = true
  15232. })
  15233. } else if (this.aitype == "aiOutline2") {
  15234. this.loading = true
  15235. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15236. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  15237. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  15238. let message = `NOTICE
  15239. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15240. 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.
  15241. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15242. Instruction: Based on the context, follow "Format example", write content.
  15243. # Context
  15244. ## 要求
  15245. ${msg} 以及##参考资料
  15246. ## 参考资料
  15247. 课程名字:${this.courseName}
  15248. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  15249. ${sub.length ? '学科:' + sub.join(",") : ''}
  15250. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15251. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15252. # Format example
  15253. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  15254. this.aiGetTask2(message, () => {
  15255. this.loading = false
  15256. this.isOutline = true
  15257. })
  15258. } else if (this.aitype == "aiOutlineDetail2") {
  15259. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  15260. } else if (this.aitype == "aiTask") {
  15261. var _text = ""
  15262. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  15263. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  15264. }
  15265. let message = `NOTICE
  15266. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  15267. 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.
  15268. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15269. Instruction: Based on the context, follow "Format example", write content.
  15270. # Context
  15271. ## 要求
  15272. ${msg} 为**每个教学任务分别输出**以下内容。
  15273.  
  15274. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15275. ## 参考资料
  15276. 教学任务教案:${_text}
  15277. ## 格式要求
  15278. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  15279. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  15280. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  15281. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  15282. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  15283. 出现选择题和问答题的概率提高
  15284. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  15285.  
  15286. # Format example
  15287. [{"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]},{"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[]},{"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"}]}]`
  15288. this.loading = true
  15289. this.aiGet3(message, this.aiCallBack)
  15290. } else if (this.aitype == "aiTask2") {
  15291. if(this.aiCallBack == 'all'){
  15292. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  15293. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  15294. let message = `NOTICE
  15295. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  15296. 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.
  15297. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15298. Instruction: Based on the context, follow "Format example", write content.
  15299. # Context
  15300. ## 要求
  15301. ${msg} 为教学任务分别输出以下内容。
  15302.  
  15303. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15304. ## 参考资料
  15305. 教学任务教案:${_text}
  15306. ## 格式要求
  15307. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  15308. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  15309. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  15310. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  15311. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  15312.  
  15313. # Format example
  15314. {"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  15315. this.taskLoading[_task] = true
  15316. this.aiGet32(message, _task)
  15317. }
  15318. }else{
  15319. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  15320. let message = `NOTICE
  15321. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  15322. 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.
  15323. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15324. Instruction: Based on the context, follow "Format example", write content.
  15325. # Context
  15326. ## 要求
  15327. ${msg} 为教学任务分别输出以下内容。
  15328.  
  15329. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15330. ## 参考资料
  15331. 教学任务教案:${_text}
  15332. ## 格式要求
  15333. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  15334. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  15335. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  15336. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  15337. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  15338.  
  15339. # Format example
  15340. {"detail":"面向学生的任务描述","elist":[{"value":"评价名字1","detail":"评价维度1","score":5},{"value":"评价名字2","detail":"评价维度2","score":5},{"value":"评价名字3","detail":"评价维度3","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  15341. this.taskLoading[this.aiCallBack] = true
  15342. this.aiGet32(message, this.aiCallBack)
  15343. }
  15344. } else if (this.aitype == "aiDetail1") {
  15345. this.aiDetail(msg, this.aiIndex)
  15346. } else if (this.aitype == "aiDetail2") {
  15347. this.aiDetail2(msg, this.aiIndex)
  15348. } else if (this.aitype == "aiDetail3") {
  15349. let _index = this.aiIndex.split('-')
  15350. this.aiDetail3(msg, _index[0], _index[1])
  15351. } else if (this.aitype == "aiDetail4") {
  15352. this.aiDetail4(msg, this.aiIndex)
  15353. } else if (this.aitype == "teacherDetail") {
  15354. this.aiDetail5(msg, this.aiIndex)
  15355. } else if (this.aitype == "teacherDetail2") {
  15356. this.aiDetail52(msg, this.aiIndex)
  15357. } else if (this.aitype == "aiCpote1") {
  15358. this.aiCpote(msg, this.aiCallBack)
  15359. } else if (this.aitype == "aiCpote2") {
  15360. this.aiCpote(msg, this.aiCallBack)
  15361. } else if (this.aitype == "aiCpote3") {
  15362. this.aiCpote(msg, this.aiCallBack)
  15363. } else if (this.aitype == "aiCpote4") {
  15364. this.aiCpote(msg, this.aiCallBack)
  15365. } else if (this.aitype == "aiTeacher") {
  15366. this.loading = true
  15367. var _text = ""
  15368. for (var i = 0; i < this.dArray.length; i++) {
  15369. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  15370. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  15371. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15372. let message = ` NOTICE
  15373. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15374. 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.
  15375. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15376. Instruction: Based on the context, follow "Format example", write content.
  15377. # Context
  15378. ## 要求
  15379. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  15380. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  15381. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n## 任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15382. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  15383. ## Format example
  15384. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  15385. this.aiGet4(message, () => {
  15386. this.loading = false
  15387. this.isOutline2 = true
  15388. })
  15389. } else if (this.aitype == "aiTeacher2"){
  15390. this.isOutline2 = true
  15391. setTimeout(()=>{
  15392. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  15393. this.aiDetail52(msg, i)
  15394. }
  15395. }, 0)
  15396. } else if (this.aitype == "aiTeacher3"){
  15397. this.loading = true
  15398. let message = `NOTICE
  15399. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15400. 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.
  15401. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15402. Instruction: Based on the context, follow "Format example", write content.
  15403. # Context
  15404. ## 要求
  15405. ${msg} 以及##参考资料
  15406. ## 参考资料
  15407. 任务簇:${this.cpote.cpote4}
  15408. # Format example
  15409. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  15410. this.aiGetTask3(message, () => {
  15411. this.loading = false
  15412. this.isOutline2 = true
  15413. })
  15414. } else if (this.aitype == "aiteacherTextDetail") {
  15415. this.aiteacherTextDetail(msg)
  15416. } else if (this.aitype == "aitargetTextDetail") {
  15417. this.aitargetTextDetail(msg)
  15418. } else if (this.aitype == "aitargetTextDetail2") {
  15419. this.aitargetTextDetail2(msg)
  15420. } else if (this.aitype == 'aiSearchFile'){
  15421. let messages = `NOTICE
  15422. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  15423. 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.
  15424. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15425. Instruction: Based on the context, follow "Format example", write content.
  15426. ## 参考资料
  15427. 关键词:${this.courseName}
  15428. # Context
  15429. ## 要求
  15430. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  15431. # Format example
  15432. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  15433. this.fileSLoading = true
  15434. this.aiSearchFile(messages,()=>{
  15435. this.fileSLoading = false
  15436. })
  15437. } else if (this.aitype == 'aiRateRule'){
  15438. this.againEva(msg, this.aiCallback[0], this.aiCallback[1])
  15439. } else if (this.aitype == 'aiRateRuleA'){
  15440. if(this.aiCallBack[0] == 1){
  15441. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  15442. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  15443. for(var k = 0; k < task.eList.length; k++){
  15444. if(!task.eList[k].rule){
  15445. this.againEva(msg, i, k)
  15446. }
  15447. }
  15448. }
  15449. }else if(this.aiCallBack[0] == 2){
  15450. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  15451. for(var k = 0; k < task.eList.length; k++){
  15452. if(!task.eList[k].rule){
  15453. this.againEva(msg, i, k)
  15454. }
  15455. }
  15456. }
  15457. }
  15458. this.setAiJson(this.aitype, msg, msg2)
  15459. },
  15460. detailYou(message) {
  15461. this.textLoading = true
  15462. this.ttextLoading = true
  15463. let sub = []
  15464. if (this.courseTypeId.length) {
  15465. for (var i = 0; i < this.courseTypeId.length; i++) {
  15466. let _sid = this.courseTypeId[i]
  15467. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15468. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15469. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15470. }
  15471. }
  15472. }
  15473. }
  15474. let mclass = []
  15475. if (this.courseTypeId.length) {
  15476. for (var i = 0; i < this.courseTypeId.length; i++) {
  15477. let _sid = this.courseTypeId[i]
  15478. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15479. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15480. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15481. }
  15482. }
  15483. }
  15484. }
  15485. let url = []
  15486. if (this.infoData.length) {
  15487. for (var i = 0; i < this.infoData.length; i++) {
  15488. url.push(this.infoData[i].url)
  15489. }
  15490. }
  15491. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  15492. // --------
  15493. // ## 补充参考资料
  15494. // 补充资料:${url.join(",")}
  15495. // 补充描述:${this.courseText2} ##补充参考资料和
  15496. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  15497. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  15498. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  15499. let msg = `NOTICE
  15500. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  15501. 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.
  15502. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  15503. Instruction: Based on the context, follow "Format example", write content.
  15504. #Context
  15505. ## 参考资料
  15506. 课程名字:${this.courseName}
  15507. ${sub.length ? '学科:' + sub.join(",") : ''}
  15508. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15509. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  15510. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  15511. ${this.courseText && this.aiCallback == 2 ? '参考内容:'+this.courseText : ''}
  15512. ## 要求
  15513. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  15514. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  15515. ${this.courseText && this.aiCallback == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
  15516. 如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
  15517. this.aiGet(msg)
  15518. },
  15519. setUnitJson() {
  15520. this.unitJson[0].chapterInfo[0].taskJson[0] = { "task": "观察热在水中的传递", "taskDetail": "同学们,今天我们将通过一个有趣的实验来探究热是如何在水中传递的。你将需要加热水并观察温度是如何分布的。请准备好实验器材,并按照安全指南进行操作。在实验过程中,请注意观察热水和冷水之间的相互作用,以及水温是如何随时间和空间变化的。你将需要记录你的观察结果,并思考热是如何从一个地方传递到另一个地方的。", "chapterData": [], "toolText": "", "toolChoose": [{ "tool": [1], "toolDetail": "使用电子白板工具来绘制你的实验设置和观察到的热传递过程。你可以使用电子白板的绘图功能来创建一个温度分布图,展示热水和冷水相遇时的情况。同时,你可以用它来记录实验步骤和关键观察点,以便于你和同学们进行讨论和分享。", "toolType": 1, "askCount": 1, "askTitle": "", "askJson": [{ "askstitle": "", "askItem": 1, "checkList": [] }], "isFold3": false }], "isShowTools": false, "askCount": 1, "isFold": 0, "askTitle": "", "askJson": [{ "askstitle": "", "askItem": 1, "checkList": [] }], "checkJson": [{ "checkCount": [], "checkPerent": [] }], "homeworkList": [], "toolOpen": true, "eList": [{ "value": "实验观察和记录", "detail": "学生应该能够准确地记录实验过程中的观察结果,包括水温变化和热传递的现象。", "score": 5 }, { "value": "数据分析和解释", "detail": "学生应该能够分析实验数据,解释热在水中的传递方式,并能够用自己的话描述热对流的原理。", "score": 5 }, { "value": "实验报告撰写", "detail": "学生应该能够撰写一份清晰的实验报告,包括实验目的、方法、结果和结论,以及对实验过程的反思。", "score": 5 }] }
  15521. this.$forceUpdate()
  15522. },
  15523. async aiGet(messages) {
  15524. let _this = this
  15525. let fileid = []
  15526. if(!this.yiKeTemplateArray.includes(this.templateid)){
  15527. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  15528. if(_this.cankaoInfoData[i].fileid){
  15529. fileid.push(_this.cankaoInfoData[i].fileid)
  15530. }else {
  15531. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  15532. if(_fileid){
  15533. _this.cankaoInfoData[i].fileid = _fileid
  15534. _this.$forceUpdate();
  15535. fileid.push(_fileid)
  15536. }
  15537. }
  15538. }
  15539. if(this.mode == 1){
  15540. for (var i = 0; i < _this.infoData.length; i++) {
  15541. if(_this.infoData[i].fileid){
  15542. fileid.push(_this.infoData[i].fileid)
  15543. }else {
  15544. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15545. if(_fileid){
  15546. _this.infoData[i].fileid = _fileid
  15547. _this.$forceUpdate();
  15548. fileid.push(_fileid)
  15549. }
  15550. }
  15551. }
  15552. }
  15553. } else {
  15554. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15555. if (_this.infoData.length) {
  15556. for (var i = 0; i < _this.infoData.length; i++) {
  15557. if(_this.infoData[i].fileid){
  15558. fileid.push(_this.infoData[i].fileid)
  15559. }else {
  15560. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15561. if(_fileid){
  15562. _this.infoData[i].fileid = _fileid
  15563. _this.$forceUpdate();
  15564. fileid.push(_fileid)
  15565. }
  15566. }
  15567. }
  15568. }
  15569. }
  15570. let _uuid = uuidv4();
  15571. // let params = JSON.stringify({
  15572. // // "model": "Chat",
  15573. // model: 'gpt-3.5-turbo',
  15574. // temperature: 0,
  15575. // max_tokens: 4096,
  15576. // top_p: 1,
  15577. // frequency_penalty: 0,
  15578. // presence_penalty: 0,
  15579. // messages: [{
  15580. // content: messages,
  15581. // role: 'user'
  15582. // }],
  15583. // uid: _uuid,
  15584. // mind_map_question: "",
  15585. // })
  15586. let params = {
  15587. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  15588. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15589. session_name: _uuid,
  15590. userId: _this.userid,
  15591. uid: _uuid,
  15592. file_ids: fileid.length ? [...fileid] : '',
  15593. }
  15594. // let params = JSON.stringify({
  15595. // message: {
  15596. // anthropic_version: "bedrock-2023-05-31",
  15597. // max_tokens: 4096,
  15598. // temperature: 0,
  15599. // top_p: 1,
  15600. // messages: [{
  15601. // "role": "user",
  15602. // "content": messages
  15603. // }] ,
  15604. // },
  15605. // uid: _uuid,
  15606. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15607. // });
  15608. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15609. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15610. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15611. console.log(response);
  15612. // let data = response.data.FunctionResponse
  15613. // if (data.choices && data.choices.length && data.choices[0].message) {
  15614. // _this.courseText = data.choices[0].message.content
  15615. // }
  15616. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15617. } else {
  15618. _this.$message.warning(response.data.FunctionResponse.result);
  15619. }
  15620. }).catch(function (error) {
  15621. _this.textLoading = false
  15622. _this.ttextLoading = false
  15623. console.log(error);
  15624. });
  15625. await _this.aiGetgetAiContent(_uuid)
  15626. },
  15627. aiGetgetAiContent(_uid) {
  15628. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15629. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15630. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15631. let _allText = "";
  15632. let _mdText = "";
  15633. let _iindex = 0
  15634. _source.onmessage = _e => {
  15635. let _eData = JSON.parse(_e.data).content;
  15636. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15637. //对话已经完成
  15638. _mdText = _mdText.replace("_", "");
  15639. _source.close();
  15640. this.courseText = _mdText;
  15641. this.textLoading = false
  15642. this.ttextLoading = false
  15643. this.courseTextB = false
  15644. return;
  15645. } else {
  15646. _iindex++
  15647. //对话还在继续
  15648. let _text = "";
  15649. _text = _eData.replaceAll("'", "");
  15650. if (_allText == "") {
  15651. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15652. } else {
  15653. _allText += _text;
  15654. }
  15655. _mdText = _allText + "_";
  15656. _mdText = _mdText.replace(/\\n/g, "\n");
  15657. _mdText = _mdText.replace(/\\/g, "");
  15658. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15659. //转化返回的回复流数据
  15660. if(_iindex == 10){
  15661. this.courseText = _mdText;
  15662. _iindex = 0
  15663. }
  15664. this.textLoading = false
  15665. // 处理流数据
  15666. }
  15667. // this.$forceUpdate();
  15668. };
  15669. },
  15670. async aiGet2(messages, callback) {
  15671. let _this = this
  15672. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15673. if (_this.infoData.length) {
  15674. for (var i = 0; i < _this.infoData.length; i++) {
  15675. if(_this.infoData[i].fileid){
  15676. fileid.push(_this.infoData[i].fileid)
  15677. }else {
  15678. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15679. if(_fileid){
  15680. _this.infoData[i].fileid = _fileid
  15681. _this.$forceUpdate();
  15682. fileid.push(_fileid)
  15683. }
  15684. }
  15685. }
  15686. }
  15687. console.log('fileid=========',fileid)
  15688. // let params = JSON.stringify({
  15689. // // "model": "Chat",
  15690. // model: 'gpt-3.5-turbo',
  15691. // temperature: 0,
  15692. // max_tokens: 4096,
  15693. // top_p: 1,
  15694. // frequency_penalty: 0,
  15695. // presence_penalty: 0,
  15696. // messages: [{
  15697. // content: messages,
  15698. // role: 'user'
  15699. // }],
  15700. // stream: false,
  15701. // uid: this.userid,
  15702. // mind_map_question: "",
  15703. // })
  15704. // // let params = JSON.stringify({
  15705. // // message: {
  15706. // // anthropic_version: "bedrock-2023-05-31",
  15707. // // max_tokens: 4096,
  15708. // // temperature: 0,
  15709. // // top_p: 1,
  15710. // // messages: [{
  15711. // // content: messages,
  15712. // // role: 'user'
  15713. // // }], //
  15714. // // },
  15715. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15716. // // });
  15717. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15718. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  15719. // console.log(response);
  15720. // let data = response.data.FunctionResponse
  15721. // if (data.choices && data.choices.length && data.choices[0].message) {
  15722. // console.log(data.choices[0].message.content);
  15723. // let dArray = JSON.parse(data.choices[0].message.content)
  15724. // _this.dArray = dArray
  15725. // _this.unitJson[0].chapterInfo[0].taskJson = []
  15726. // for (var i = 0; i < dArray.length; i++) {
  15727. // let _task = dArray[i]
  15728. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  15729. // task: _task.task,
  15730. // taskDetail: "",
  15731. // taskDetail2: _task.detail,
  15732. // taskDetail3: "",
  15733. // chapterData: [],
  15734. // toolText: "",
  15735. // toolChoose: [
  15736. // {
  15737. // tool: [],
  15738. // toolDetail: "",
  15739. // toolType: 0,
  15740. // askCount: 1,
  15741. // askTitle: "",
  15742. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15743. // },
  15744. // ],
  15745. // isShowTools: false,
  15746. // askCount: 1,
  15747. // isFold: 0,
  15748. // askTitle: "",
  15749. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15750. // checkJson: [{ checkCount: [], checkPerent: [] }],
  15751. // homeworkList: [],
  15752. // })
  15753. // }
  15754. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  15755. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15756. // _this.$forceUpdate();
  15757. // }
  15758. // // if (data.result) {
  15759. // // console.log(data.result);
  15760. // // let dArray = JSON.parse(data.result)
  15761. // // _this.dArray = dArray
  15762. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  15763. // // for (var i = 0; i < dArray.length; i++) {
  15764. // // let _task = dArray[i]
  15765. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  15766. // // task: _task.task,
  15767. // // taskDetail: "",
  15768. // // taskDetail2: _task.detail,
  15769. // // taskDetail3: "",
  15770. // // chapterData: [],
  15771. // // toolText: "",
  15772. // // toolChoose: [
  15773. // // {
  15774. // // tool: [],
  15775. // // toolDetail: "",
  15776. // // toolType: 0,
  15777. // // askCount: 1,
  15778. // // askTitle: "",
  15779. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15780. // // },
  15781. // // ],
  15782. // // isShowTools: false,
  15783. // // askCount: 1,
  15784. // // isFold: 1,
  15785. // // askTitle: "",
  15786. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15787. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  15788. // // homeworkList: [],
  15789. // // })
  15790. // // }
  15791. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15792. // // _this.$forceUpdate();
  15793. // // }
  15794. // callback ? callback() : ''
  15795. // }).catch(function (error) {
  15796. // _this.loading = false
  15797. // console.log(error);
  15798. // });
  15799. let parm = {
  15800. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  15801. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  15802. session_name: uuidv4(),
  15803. userId: this.userid,
  15804. file_ids: fileid.length ? [...fileid] : '',
  15805. }
  15806. this.ajax
  15807. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  15808. .then((response) => {
  15809. console.log(response);
  15810. let data = response.data.FunctionResponse
  15811. if (data.message) {
  15812. console.log(data.message);
  15813. let dArray = {}
  15814. try {
  15815. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  15816. } catch (error) {
  15817. console.log("error_________________" + error);
  15818. try {
  15819. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  15820. let match = data.message.match(regex);
  15821. dArray = JSON.parse(match[0]);
  15822. // var message = data.message;
  15823. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  15824. // var jsonEnd = message.indexOf("```", jsonStart);
  15825. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  15826. // dArray = JSON.parse(jsonString);
  15827. } catch (error) {
  15828. try {
  15829. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  15830. let match = data.message.match(regex);
  15831. // eval("var aaa = " + match[0])
  15832. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  15833. } catch (error) {
  15834. console.log("error_________________" + error);
  15835. }
  15836. console.log("error_________________" + error);
  15837. }
  15838. }
  15839. _this.dArray = dArray
  15840. console.log(dArray)
  15841. if(_this.panOutline() > 0){
  15842. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  15843. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  15844. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  15845. }
  15846. for (var i = 0; i < dArray.length; i++) {
  15847. let _task = dArray[i]
  15848. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  15849. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  15850. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  15851. }else {
  15852. _this.unitJson[0].chapterInfo[0].taskJson.push({
  15853. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  15854. taskDetail: "",
  15855. taskDetail2: _task.detail,
  15856. taskDetail3: "",
  15857. chapterData: [],
  15858. toolText: "",
  15859. toolChoose: [
  15860. {
  15861. tool: [],
  15862. toolDetail: "",
  15863. toolType: 0,
  15864. askCount: 1,
  15865. askTitle: "",
  15866. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15867. },
  15868. ],
  15869. isShowTools: false,
  15870. askCount: 1,
  15871. isFold: 0,
  15872. askTitle: "",
  15873. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15874. checkJson: [{ checkCount: [], checkPerent: [] }],
  15875. homeworkList: [],
  15876. })
  15877. }
  15878. }
  15879. }else {
  15880. _this.unitJson[0].chapterInfo[0].taskJson = []
  15881. for (var i = 0; i < dArray.length; i++) {
  15882. let _task = dArray[i]
  15883. _this.unitJson[0].chapterInfo[0].taskJson.push({
  15884. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  15885. taskDetail: "",
  15886. taskDetail2: _task.detail,
  15887. taskDetail3: "",
  15888. chapterData: [],
  15889. toolText: "",
  15890. toolChoose: [
  15891. {
  15892. tool: [],
  15893. toolDetail: "",
  15894. toolType: 0,
  15895. askCount: 1,
  15896. askTitle: "",
  15897. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15898. },
  15899. ],
  15900. isShowTools: false,
  15901. askCount: 1,
  15902. isFold: 0,
  15903. askTitle: "",
  15904. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15905. checkJson: [{ checkCount: [], checkPerent: [] }],
  15906. homeworkList: [],
  15907. })
  15908. }
  15909. }
  15910. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  15911. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  15912. _this.$forceUpdate();
  15913. }
  15914. callback ? callback() : ''
  15915. })
  15916. .catch((error) => {
  15917. _this.loading = false
  15918. console.log(error);
  15919. });
  15920. },
  15921. async aiGetTask2(messages, callback) {
  15922. let _this = this
  15923. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15924. if (_this.infoData.length) {
  15925. for (var i = 0; i < _this.infoData.length; i++) {
  15926. if(_this.infoData[i].fileid){
  15927. fileid.push(_this.infoData[i].fileid)
  15928. }else {
  15929. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15930. if(_fileid){
  15931. _this.infoData[i].fileid = _fileid
  15932. _this.$forceUpdate();
  15933. fileid.push(_fileid)
  15934. }
  15935. }
  15936. }
  15937. }
  15938. console.log('fileid=========',fileid)
  15939. // let params = JSON.stringify({
  15940. // // "model": "Chat",
  15941. // model: 'gpt-3.5-turbo',
  15942. // temperature: 0,
  15943. // max_tokens: 4096,
  15944. // top_p: 1,
  15945. // frequency_penalty: 0,
  15946. // presence_penalty: 0,
  15947. // messages: [{
  15948. // content: messages,
  15949. // role: 'user'
  15950. // }],
  15951. // stream: false,
  15952. // uid: this.userid,
  15953. // mind_map_question: "",
  15954. // })
  15955. // // let params = JSON.stringify({
  15956. // // message: {
  15957. // // anthropic_version: "bedrock-2023-05-31",
  15958. // // max_tokens: 4096,
  15959. // // temperature: 0,
  15960. // // top_p: 1,
  15961. // // messages: [{
  15962. // // content: messages,
  15963. // // role: 'user'
  15964. // // }], //
  15965. // // },
  15966. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15967. // // });
  15968. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15969. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  15970. // console.log(response);
  15971. // let data = response.data.FunctionResponse
  15972. // if (data.choices && data.choices.length && data.choices[0].message) {
  15973. // console.log(data.choices[0].message.content);
  15974. // let dArray = JSON.parse(data.choices[0].message.content)
  15975. // _this.dArray = dArray
  15976. // _this.unitJson[0].chapterInfo[0].taskJson = []
  15977. // for (var i = 0; i < dArray.length; i++) {
  15978. // let _task = dArray[i]
  15979. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  15980. // task: _task.task,
  15981. // taskDetail: "",
  15982. // taskDetail2: _task.detail,
  15983. // taskDetail3: "",
  15984. // chapterData: [],
  15985. // toolText: "",
  15986. // toolChoose: [
  15987. // {
  15988. // tool: [],
  15989. // toolDetail: "",
  15990. // toolType: 0,
  15991. // askCount: 1,
  15992. // askTitle: "",
  15993. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  15994. // },
  15995. // ],
  15996. // isShowTools: false,
  15997. // askCount: 1,
  15998. // isFold: 0,
  15999. // askTitle: "",
  16000. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16001. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16002. // homeworkList: [],
  16003. // })
  16004. // }
  16005. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16006. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16007. // _this.$forceUpdate();
  16008. // }
  16009. // // if (data.result) {
  16010. // // console.log(data.result);
  16011. // // let dArray = JSON.parse(data.result)
  16012. // // _this.dArray = dArray
  16013. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16014. // // for (var i = 0; i < dArray.length; i++) {
  16015. // // let _task = dArray[i]
  16016. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16017. // // task: _task.task,
  16018. // // taskDetail: "",
  16019. // // taskDetail2: _task.detail,
  16020. // // taskDetail3: "",
  16021. // // chapterData: [],
  16022. // // toolText: "",
  16023. // // toolChoose: [
  16024. // // {
  16025. // // tool: [],
  16026. // // toolDetail: "",
  16027. // // toolType: 0,
  16028. // // askCount: 1,
  16029. // // askTitle: "",
  16030. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16031. // // },
  16032. // // ],
  16033. // // isShowTools: false,
  16034. // // askCount: 1,
  16035. // // isFold: 1,
  16036. // // askTitle: "",
  16037. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16038. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16039. // // homeworkList: [],
  16040. // // })
  16041. // // }
  16042. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16043. // // _this.$forceUpdate();
  16044. // // }
  16045. // callback ? callback() : ''
  16046. // }).catch(function (error) {
  16047. // _this.loading = false
  16048. // console.log(error);
  16049. // });
  16050. let parm = {
  16051. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16052. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16053. session_name: uuidv4(),
  16054. userId: this.userid,
  16055. file_ids: fileid.length ? [...fileid] : '',
  16056. }
  16057. this.ajax
  16058. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16059. .then((response) => {
  16060. console.log(response);
  16061. let data = response.data.FunctionResponse
  16062. if (data.message) {
  16063. console.log(data.message);
  16064. let dArray = {}
  16065. try {
  16066. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16067. } catch (error) {
  16068. console.log("error_________________" + error);
  16069. try {
  16070. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16071. let match = data.message.match(regex);
  16072. dArray = JSON.parse(match[0]);
  16073. // var message = data.message;
  16074. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16075. // var jsonEnd = message.indexOf("```", jsonStart);
  16076. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16077. // dArray = JSON.parse(jsonString);
  16078. } catch (error) {
  16079. try {
  16080. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16081. let match = data.message.match(regex);
  16082. // eval("var aaa = " + match[0])
  16083. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16084. } catch (error) {
  16085. console.log("error_________________" + error);
  16086. }
  16087. console.log("error_________________" + error);
  16088. }
  16089. }
  16090. _this.dArray = dArray
  16091. if(_this.panOutline() > 0){
  16092. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16093. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16094. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  16095. }
  16096. for (var i = 0; i < dArray.length; i++) {
  16097. let _task = dArray[i]
  16098. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16099. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  16100. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  16101. }else {
  16102. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16103. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16104. taskDetail: "",
  16105. taskDetail2: "",
  16106. taskDetail3: "",
  16107. chapterData: [],
  16108. toolText: "",
  16109. toolChoose: [
  16110. {
  16111. tool: [],
  16112. toolDetail: "",
  16113. toolType: 0,
  16114. askCount: 1,
  16115. askTitle: "",
  16116. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16117. },
  16118. ],
  16119. isShowTools: false,
  16120. askCount: 1,
  16121. isFold: 0,
  16122. askTitle: "",
  16123. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16124. checkJson: [{ checkCount: [], checkPerent: [] }],
  16125. homeworkList: [],
  16126. })
  16127. }
  16128. }
  16129. }else {
  16130. _this.unitJson[0].chapterInfo[0].taskJson = []
  16131. for (var i = 0; i < dArray.length; i++) {
  16132. let _task = dArray[i]
  16133. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16134. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16135. taskDetail: "",
  16136. taskDetail2: "",
  16137. taskDetail3: "",
  16138. chapterData: [],
  16139. toolText: "",
  16140. toolChoose: [
  16141. {
  16142. tool: [],
  16143. toolDetail: "",
  16144. toolType: 0,
  16145. askCount: 1,
  16146. askTitle: "",
  16147. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16148. },
  16149. ],
  16150. isShowTools: false,
  16151. askCount: 1,
  16152. isFold: 0,
  16153. askTitle: "",
  16154. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16155. checkJson: [{ checkCount: [], checkPerent: [] }],
  16156. homeworkList: [],
  16157. })
  16158. }
  16159. }
  16160. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16161. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16162. _this.$forceUpdate();
  16163. setTimeout(()=>{
  16164. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16165. this.aiOutlineDetail('', i)
  16166. }
  16167. }, 0)
  16168. }
  16169. callback ? callback() : ''
  16170. })
  16171. .catch((error) => {
  16172. _this.loading = false
  16173. console.log(error);
  16174. });
  16175. },
  16176. async aiGetTask3(messages, callback) {
  16177. let _this = this
  16178. // let params = JSON.stringify({
  16179. // // "model": "Chat",
  16180. // model: 'gpt-3.5-turbo',
  16181. // temperature: 0,
  16182. // max_tokens: 4096,
  16183. // top_p: 1,
  16184. // frequency_penalty: 0,
  16185. // presence_penalty: 0,
  16186. // messages: [{
  16187. // content: messages,
  16188. // role: 'user'
  16189. // }],
  16190. // stream: false,
  16191. // uid: this.userid,
  16192. // mind_map_question: "",
  16193. // })
  16194. // // let params = JSON.stringify({
  16195. // // message: {
  16196. // // anthropic_version: "bedrock-2023-05-31",
  16197. // // max_tokens: 4096,
  16198. // // temperature: 0,
  16199. // // top_p: 1,
  16200. // // messages: [{
  16201. // // content: messages,
  16202. // // role: 'user'
  16203. // // }], //
  16204. // // },
  16205. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16206. // // });
  16207. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16208. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16209. // console.log(response);
  16210. // let data = response.data.FunctionResponse
  16211. // if (data.choices && data.choices.length && data.choices[0].message) {
  16212. // console.log(data.choices[0].message.content);
  16213. // let dArray = JSON.parse(data.choices[0].message.content)
  16214. // _this.dArray = dArray
  16215. // _this.unitJson[0].chapterInfo[0].taskJson = []
  16216. // for (var i = 0; i < dArray.length; i++) {
  16217. // let _task = dArray[i]
  16218. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16219. // task: _task.task,
  16220. // taskDetail: "",
  16221. // taskDetail2: _task.detail,
  16222. // taskDetail3: "",
  16223. // chapterData: [],
  16224. // toolText: "",
  16225. // toolChoose: [
  16226. // {
  16227. // tool: [],
  16228. // toolDetail: "",
  16229. // toolType: 0,
  16230. // askCount: 1,
  16231. // askTitle: "",
  16232. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16233. // },
  16234. // ],
  16235. // isShowTools: false,
  16236. // askCount: 1,
  16237. // isFold: 0,
  16238. // askTitle: "",
  16239. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16240. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16241. // homeworkList: [],
  16242. // })
  16243. // }
  16244. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16245. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16246. // _this.$forceUpdate();
  16247. // }
  16248. // // if (data.result) {
  16249. // // console.log(data.result);
  16250. // // let dArray = JSON.parse(data.result)
  16251. // // _this.dArray = dArray
  16252. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16253. // // for (var i = 0; i < dArray.length; i++) {
  16254. // // let _task = dArray[i]
  16255. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16256. // // task: _task.task,
  16257. // // taskDetail: "",
  16258. // // taskDetail2: _task.detail,
  16259. // // taskDetail3: "",
  16260. // // chapterData: [],
  16261. // // toolText: "",
  16262. // // toolChoose: [
  16263. // // {
  16264. // // tool: [],
  16265. // // toolDetail: "",
  16266. // // toolType: 0,
  16267. // // askCount: 1,
  16268. // // askTitle: "",
  16269. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16270. // // },
  16271. // // ],
  16272. // // isShowTools: false,
  16273. // // askCount: 1,
  16274. // // isFold: 1,
  16275. // // askTitle: "",
  16276. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16277. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16278. // // homeworkList: [],
  16279. // // })
  16280. // // }
  16281. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16282. // // _this.$forceUpdate();
  16283. // // }
  16284. // callback ? callback() : ''
  16285. // }).catch(function (error) {
  16286. // _this.loading = false
  16287. // console.log(error);
  16288. // });
  16289. let parm = {
  16290. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16291. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16292. session_name: uuidv4(),
  16293. userId: this.userid,
  16294. file_ids: '',
  16295. }
  16296. this.ajax
  16297. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16298. .then((response) => {
  16299. console.log(response);
  16300. let data = response.data.FunctionResponse
  16301. if (data.message) {
  16302. console.log(data.message);
  16303. let dArray = {}
  16304. try {
  16305. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16306. } catch (error) {
  16307. console.log("error_________________" + error);
  16308. try {
  16309. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16310. let match = data.message.match(regex);
  16311. dArray = JSON.parse(match[0]);
  16312. // var message = data.message;
  16313. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16314. // var jsonEnd = message.indexOf("```", jsonStart);
  16315. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16316. // dArray = JSON.parse(jsonString);
  16317. } catch (error) {
  16318. try {
  16319. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16320. let match = data.message.match(regex);
  16321. // eval("var aaa = " + match[0])
  16322. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16323. } catch (error) {
  16324. console.log("error_________________" + error);
  16325. }
  16326. console.log("error_________________" + error);
  16327. }
  16328. }
  16329. _this.dArray = dArray
  16330. if(_this.panOutline() > 0){
  16331. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16332. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16333. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  16334. }
  16335. for (var i = 0; i < dArray.length; i++) {
  16336. let _task = dArray[i]
  16337. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16338. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  16339. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  16340. }else {
  16341. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16342. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16343. taskDetail: "",
  16344. taskDetail2: "",
  16345. taskDetail3: "",
  16346. chapterData: [],
  16347. toolText: "",
  16348. toolChoose: [
  16349. {
  16350. tool: [],
  16351. toolDetail: "",
  16352. toolType: 0,
  16353. askCount: 1,
  16354. askTitle: "",
  16355. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16356. },
  16357. ],
  16358. isShowTools: false,
  16359. askCount: 1,
  16360. isFold: 0,
  16361. askTitle: "",
  16362. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16363. checkJson: [{ checkCount: [], checkPerent: [] }],
  16364. homeworkList: [],
  16365. })
  16366. }
  16367. }
  16368. }else {
  16369. _this.unitJson[0].chapterInfo[0].taskJson = []
  16370. for (var i = 0; i < dArray.length; i++) {
  16371. let _task = dArray[i]
  16372. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16373. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  16374. taskDetail: "",
  16375. taskDetail2: "",
  16376. taskDetail3: "",
  16377. chapterData: [],
  16378. toolText: "",
  16379. toolChoose: [
  16380. {
  16381. tool: [],
  16382. toolDetail: "",
  16383. toolType: 0,
  16384. askCount: 1,
  16385. askTitle: "",
  16386. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16387. },
  16388. ],
  16389. isShowTools: false,
  16390. askCount: 1,
  16391. isFold: 0,
  16392. askTitle: "",
  16393. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16394. checkJson: [{ checkCount: [], checkPerent: [] }],
  16395. homeworkList: [],
  16396. })
  16397. }
  16398. }
  16399. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16400. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16401. _this.$forceUpdate();
  16402. setTimeout(()=>{
  16403. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16404. this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  16405. }
  16406. }, 0)
  16407. }
  16408. callback ? callback() : ''
  16409. })
  16410. .catch((error) => {
  16411. _this.loading = false
  16412. console.log(error);
  16413. });
  16414. },
  16415. async aiGet3(messages, callback) {
  16416. let _this = this
  16417. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16418. if (_this.infoData.length) {
  16419. for (var i = 0; i < _this.infoData.length; i++) {
  16420. if(_this.infoData[i].fileid){
  16421. fileid.push(_this.infoData[i].fileid)
  16422. }else {
  16423. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16424. if(_fileid){
  16425. _this.infoData[i].fileid = _fileid
  16426. _this.$forceUpdate();
  16427. fileid.push(_fileid)
  16428. }
  16429. }
  16430. }
  16431. }
  16432. // let params = JSON.stringify({
  16433. // // "model": "Chat",
  16434. // model: 'gpt-3.5-turbo',
  16435. // temperature: 0,
  16436. // max_tokens: 4096,
  16437. // top_p: 1,
  16438. // frequency_penalty: 0,
  16439. // presence_penalty: 0,
  16440. // messages: [{
  16441. // content: messages,
  16442. // role: 'user'
  16443. // }],
  16444. // stream: false,
  16445. // uid: this.userid,
  16446. // mind_map_question: "",
  16447. // })
  16448. // // let params = JSON.stringify({
  16449. // // message: {
  16450. // // anthropic_version: "bedrock-2023-05-31",
  16451. // // max_tokens: 4096,
  16452. // // temperature: 0,
  16453. // // top_p: 1,
  16454. // // messages: [{
  16455. // // content: messages,
  16456. // // role: 'user'
  16457. // // }], //
  16458. // // },
  16459. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16460. // // });
  16461. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16462. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16463. // console.log(response);
  16464. // let data = response.data.FunctionResponse
  16465. // if (data.choices && data.choices.length && data.choices[0].message) {
  16466. // console.log(data.choices[0].message.content);
  16467. // let tArray = JSON.parse(data.choices[0].message.content)
  16468. // // _this.unitJson[0].chapterInfo[0].task = []
  16469. // let toolsJson = {
  16470. // "电子白板": { tool: 1, type: 1 },
  16471. // "文档": { tool: 52, type: 1 },
  16472. // "思维导图": { tool: 3, type: 1 },
  16473. // "表格": { tool: 48, type: 1 },
  16474. // "作业提交": { tool: 16, type: 2 }
  16475. // }
  16476. // for (var i = 0; i < tArray.length; i++) {
  16477. // let _task = tArray[i]
  16478. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16479. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16480. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16481. // if (_task.toolChoose.length) {
  16482. // for (var j = 0; j < _task.toolChoose.length; j++) {
  16483. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16484. // {
  16485. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16486. // toolDetail: _task.toolChoose[j].detail,
  16487. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16488. // askCount: 1,
  16489. // askTitle: "",
  16490. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16491. // },
  16492. // )
  16493. // }
  16494. // } else {
  16495. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16496. // {
  16497. // tool: [],
  16498. // toolDetail: "",
  16499. // toolType: 0,
  16500. // askCount: 1,
  16501. // askTitle: "",
  16502. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16503. // },
  16504. // )
  16505. // }
  16506. // }
  16507. // // if (_this.infoData.length) {
  16508. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16509. // // }
  16510. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16511. // _this.$forceUpdate();
  16512. // }
  16513. // // if (data.result) {
  16514. // // console.log(data.result);
  16515. // // let tArray = JSON.parse(data.result)
  16516. // // // _this.unitJson[0].chapterInfo[0].task = []
  16517. // // let toolsJson = {
  16518. // // "电子白板": { tool: 1, type: 1 },
  16519. // // "文档": { tool: 52, type: 1 },
  16520. // // "思维导图": { tool: 3, type: 1 },
  16521. // // "表格": { tool: 48, type: 1 },
  16522. // // "作业提交": { tool: 16, type: 2 }
  16523. // // }
  16524. // // for (var i = 0; i < tArray.length; i++) {
  16525. // // let _task = tArray[i]
  16526. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16527. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16528. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16529. // // if (_task.toolChoose.length) {
  16530. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  16531. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16532. // // {
  16533. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16534. // // toolDetail: _task.toolChoose[j].detail,
  16535. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16536. // // askCount: 1,
  16537. // // askTitle: "",
  16538. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16539. // // },
  16540. // // )
  16541. // // }
  16542. // // } else {
  16543. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16544. // // {
  16545. // // tool: [],
  16546. // // toolDetail: "",
  16547. // // toolType: 0,
  16548. // // askCount: 1,
  16549. // // askTitle: "",
  16550. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16551. // // },
  16552. // // )
  16553. // // }
  16554. // // }
  16555. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16556. // // _this.$forceUpdate();
  16557. // // }
  16558. // callback ? callback() : ''
  16559. // }).catch(function (error) {
  16560. // _this.loading = false
  16561. // console.log(error);
  16562. // });
  16563. let parm = {
  16564. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16565. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16566. session_name: uuidv4(),
  16567. userId: this.userid,
  16568. file_ids: fileid.length ? [...fileid] : '',
  16569. }
  16570. this.ajax
  16571. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16572. .then(async (response) => {
  16573. console.log(response);
  16574. let data = response.data.FunctionResponse
  16575. if (data.message) {
  16576. console.log(data.message);
  16577. let tArray = {}
  16578. try {
  16579. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16580. } catch (error) {
  16581. console.log("error_________________" + error);
  16582. try {
  16583. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16584. let match = data.message.match(regex);
  16585. tArray = JSON.parse(match[0]);
  16586. // var message = data.message;
  16587. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16588. // var jsonEnd = message.indexOf("```", jsonStart);
  16589. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16590. // tArray = JSON.parse(jsonString);
  16591. } catch (error) {
  16592. try {
  16593. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16594. let match = data.message.match(regex);
  16595. // eval("var aaa = " + match[0])
  16596. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16597. } catch (error) {
  16598. console.log("error_________________" + error);
  16599. }
  16600. console.log("error_________________" + error);
  16601. }
  16602. }
  16603. let toolsJson = {
  16604. "电子白板": { tool: 1, type: 1 },
  16605. "文档": { tool: 52, type: 1 },
  16606. "思维导图": { tool: 3, type: 1 },
  16607. "表格": { tool: 48, type: 1 },
  16608. "作业提交": { tool: 16, type: 2 },
  16609. "问答": { tool: 15, type: 2 },
  16610. "选择题": { tool: 45, type: 2 },
  16611. }
  16612. // answerQ:"sssssssssssssss"
  16613. for (var i = 0; i < tArray.length; i++) {
  16614. let _task = tArray[i]
  16615. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16616. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16617. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16618. if (_task.toolChoose.length) {
  16619. for (var j = 0; j < _task.toolChoose.length; j++) {
  16620. let _json = {
  16621. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  16622. toolDetail: _task.toolChoose[j].detail,
  16623. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  16624. askCount: 1,
  16625. askTitle: "",
  16626. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16627. }
  16628. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  16629. let answerQ = await _this.aiCreateQuestion(15, i)
  16630. _json.answerQ = answerQ.answerQ
  16631. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  16632. let testJson = await _this.aiCreateQuestion(45, i)
  16633. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  16634. }
  16635. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  16636. }
  16637. } else {
  16638. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16639. {
  16640. tool: [],
  16641. toolDetail: "",
  16642. toolType: 0,
  16643. askCount: 1,
  16644. askTitle: "",
  16645. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16646. },
  16647. )
  16648. }
  16649. }
  16650. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16651. _this.$forceUpdate();
  16652. _this.createTeacherAn();
  16653. }
  16654. callback ? callback() : ''
  16655. })
  16656. .catch((error) => {
  16657. _this.loading = false
  16658. console.log(error);
  16659. });
  16660. },
  16661. async aiGet32(messages, index) {
  16662. let _this = this
  16663. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16664. if (_this.infoData.length) {
  16665. for (var i = 0; i < _this.infoData.length; i++) {
  16666. if(_this.infoData[i].fileid){
  16667. fileid.push(_this.infoData[i].fileid)
  16668. }else {
  16669. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16670. if(_fileid){
  16671. _this.infoData[i].fileid = _fileid
  16672. _this.$forceUpdate();
  16673. fileid.push(_fileid)
  16674. }
  16675. }
  16676. }
  16677. }
  16678. // let params = JSON.stringify({
  16679. // // "model": "Chat",
  16680. // model: 'gpt-3.5-turbo',
  16681. // temperature: 0,
  16682. // max_tokens: 4096,
  16683. // top_p: 1,
  16684. // frequency_penalty: 0,
  16685. // presence_penalty: 0,
  16686. // messages: [{
  16687. // content: messages,
  16688. // role: 'user'
  16689. // }],
  16690. // stream: false,
  16691. // uid: this.userid,
  16692. // mind_map_question: "",
  16693. // })
  16694. // // let params = JSON.stringify({
  16695. // // message: {
  16696. // // anthropic_version: "bedrock-2023-05-31",
  16697. // // max_tokens: 4096,
  16698. // // temperature: 0,
  16699. // // top_p: 1,
  16700. // // messages: [{
  16701. // // content: messages,
  16702. // // role: 'user'
  16703. // // }], //
  16704. // // },
  16705. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16706. // // });
  16707. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16708. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16709. // console.log(response);
  16710. // let data = response.data.FunctionResponse
  16711. // if (data.choices && data.choices.length && data.choices[0].message) {
  16712. // console.log(data.choices[0].message.content);
  16713. // let tArray = JSON.parse(data.choices[0].message.content)
  16714. // // _this.unitJson[0].chapterInfo[0].task = []
  16715. // let toolsJson = {
  16716. // "电子白板": { tool: 1, type: 1 },
  16717. // "文档": { tool: 52, type: 1 },
  16718. // "思维导图": { tool: 3, type: 1 },
  16719. // "表格": { tool: 48, type: 1 },
  16720. // "作业提交": { tool: 16, type: 2 }
  16721. // }
  16722. // for (var i = 0; i < tArray.length; i++) {
  16723. // let _task = tArray[i]
  16724. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16725. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16726. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16727. // if (_task.toolChoose.length) {
  16728. // for (var j = 0; j < _task.toolChoose.length; j++) {
  16729. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16730. // {
  16731. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16732. // toolDetail: _task.toolChoose[j].detail,
  16733. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16734. // askCount: 1,
  16735. // askTitle: "",
  16736. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16737. // },
  16738. // )
  16739. // }
  16740. // } else {
  16741. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16742. // {
  16743. // tool: [],
  16744. // toolDetail: "",
  16745. // toolType: 0,
  16746. // askCount: 1,
  16747. // askTitle: "",
  16748. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16749. // },
  16750. // )
  16751. // }
  16752. // }
  16753. // // if (_this.infoData.length) {
  16754. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16755. // // }
  16756. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16757. // _this.$forceUpdate();
  16758. // }
  16759. // // if (data.result) {
  16760. // // console.log(data.result);
  16761. // // let tArray = JSON.parse(data.result)
  16762. // // // _this.unitJson[0].chapterInfo[0].task = []
  16763. // // let toolsJson = {
  16764. // // "电子白板": { tool: 1, type: 1 },
  16765. // // "文档": { tool: 52, type: 1 },
  16766. // // "思维导图": { tool: 3, type: 1 },
  16767. // // "表格": { tool: 48, type: 1 },
  16768. // // "作业提交": { tool: 16, type: 2 }
  16769. // // }
  16770. // // for (var i = 0; i < tArray.length; i++) {
  16771. // // let _task = tArray[i]
  16772. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  16773. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  16774. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  16775. // // if (_task.toolChoose.length) {
  16776. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  16777. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16778. // // {
  16779. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  16780. // // toolDetail: _task.toolChoose[j].detail,
  16781. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  16782. // // askCount: 1,
  16783. // // askTitle: "",
  16784. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16785. // // },
  16786. // // )
  16787. // // }
  16788. // // } else {
  16789. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  16790. // // {
  16791. // // tool: [],
  16792. // // toolDetail: "",
  16793. // // toolType: 0,
  16794. // // askCount: 1,
  16795. // // askTitle: "",
  16796. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16797. // // },
  16798. // // )
  16799. // // }
  16800. // // }
  16801. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16802. // // _this.$forceUpdate();
  16803. // // }
  16804. // callback ? callback() : ''
  16805. // }).catch(function (error) {
  16806. // _this.loading = false
  16807. // console.log(error);
  16808. // });
  16809. let parm = {
  16810. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16811. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16812. session_name: uuidv4(),
  16813. userId: this.userid,
  16814. file_ids: fileid.length ? [...fileid] : '',
  16815. }
  16816. this.ajax
  16817. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  16818. .then(async (response) => {
  16819. console.log(response);
  16820. let data = response.data.FunctionResponse
  16821. if (data.message) {
  16822. console.log(data.message);
  16823. let tArray = {}
  16824. try {
  16825. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16826. } catch (error) {
  16827. console.log("error_________________" + error);
  16828. try {
  16829. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16830. let match = data.message.match(regex);
  16831. tArray = JSON.parse(match[0]);
  16832. // var message = data.message;
  16833. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16834. // var jsonEnd = message.indexOf("```", jsonStart);
  16835. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16836. // tArray = JSON.parse(jsonString);
  16837. } catch (error) {
  16838. try {
  16839. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16840. let match = data.message.match(regex);
  16841. // eval("var aaa = " + match[0])
  16842. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16843. } catch (error) {
  16844. console.log("error_________________" + error);
  16845. }
  16846. console.log("error_________________" + error);
  16847. }
  16848. }
  16849. let toolsJson = {
  16850. "电子白板": { tool: 1, type: 1 },
  16851. "文档": { tool: 52, type: 1 },
  16852. "思维导图": { tool: 3, type: 1 },
  16853. "表格": { tool: 48, type: 1 },
  16854. "作业提交": { tool: 16, type: 2 },
  16855. "问答": { tool: 15, type: 2 },
  16856. "选择题": { tool: 45, type: 2 },
  16857. }
  16858. // answerQ:"sssssssssssssss"
  16859. // for (var i = 0; i < tArray.length; i++) {
  16860. let _task = tArray
  16861. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  16862. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  16863. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  16864. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  16865. console.log("error_________________JSON不对重新生成");
  16866. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  16867. _this.aiGet32(messages, index)
  16868. return;
  16869. }
  16870. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  16871. if (_task.toolChoose && _task.toolChoose.length) {
  16872. for (var j = 0; j < _task.toolChoose.length; j++) {
  16873. let _json = {
  16874. tool: [],
  16875. toolDetail: _task.toolChoose[j].detail,
  16876. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  16877. askCount: 1,
  16878. askTitle: "",
  16879. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16880. }
  16881. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  16882. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  16883. let answerQ = await _this.aiCreateQuestion(15, index)
  16884. // _json.answerQ = answerQ.answerQ
  16885. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  16886. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  16887. let testJson = await _this.aiCreateQuestion(45, index)
  16888. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  16889. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  16890. }
  16891. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].tool = toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16]
  16892. _this.$forceUpdate();
  16893. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  16894. }
  16895. } else {
  16896. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  16897. {
  16898. tool: [],
  16899. toolDetail: "",
  16900. toolType: 0,
  16901. askCount: 1,
  16902. askTitle: "",
  16903. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16904. },
  16905. )
  16906. }
  16907. // }
  16908. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16909. _this.$forceUpdate();
  16910. _this.createTeacherAn(index);
  16911. }
  16912. // callback ? callback() : ''
  16913. _this.taskLoading[index] = false
  16914. })
  16915. .catch((error) => {
  16916. // _this.loading = false
  16917. _this.taskLoading[index] = false
  16918. console.log(error);
  16919. });
  16920. },
  16921. async aiCreateQuestion(type, task) {
  16922. let _this = this
  16923. return new Promise((resolve, reject) => {
  16924. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16925. if (_this.infoData.length) {
  16926. for (var i = 0; i < _this.infoData.length; i++) {
  16927. if(_this.infoData[i].fileid){
  16928. fileid.push(_this.infoData[i].fileid)
  16929. }
  16930. }
  16931. }
  16932. let sub = []
  16933. let mclass = []
  16934. if (this.courseTypeId.length) {
  16935. for (var i = 0; i < this.courseTypeId.length; i++) {
  16936. let _sid = this.courseTypeId[i]
  16937. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16938. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16939. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16940. }
  16941. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16942. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16943. }
  16944. }
  16945. }
  16946. }
  16947. let messages = ""
  16948. if(type == 15){
  16949. messages = `NOTICE
  16950. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16951. 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.
  16952. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16953. Instruction: Based on the context, follow "Format example", write content.
  16954. # Context
  16955. ## 任务
  16956. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  16957. ## 限制
  16958. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  16959. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  16960. ## 课程简介
  16961. 课程名字:${_this.courseName}
  16962. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  16963. ${sub.length ? '学科:' + sub.join(",") : ''}
  16964. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16965. ## 教案
  16966. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16967. # Format example
  16968. {answerQ:"问题"}
  16969. `
  16970. }else if(type == 45){
  16971. messages = `NOTICE
  16972. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16973. 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.
  16974. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16975. Instruction: Based on the context, follow "Format example", write content.
  16976. # Context
  16977. ## 任务
  16978. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  16979. ## 限制
  16980. - 生成题目禁止重复。
  16981. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  16982. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  16983. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  16984. ## 课程简介
  16985. 课程名字:${_this.courseName}
  16986. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  16987. ${sub.length ? '学科:' + sub.join(",") : ''}
  16988. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16989. ## 教案
  16990. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16991. # Format example
  16992. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  16993. `
  16994. }
  16995. let parm = {
  16996. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16997. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16998. session_name: uuidv4(),
  16999. userId: this.userid,
  17000. file_ids: fileid.length ? [...fileid] : '',
  17001. }
  17002. this.ajax
  17003. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17004. .then((response) => {
  17005. console.log(response);
  17006. let data = response.data.FunctionResponse
  17007. if (data.message) {
  17008. console.log(data.message);
  17009. try {
  17010. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17011. let tArray = {}
  17012. try {
  17013. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17014. } catch (error) {
  17015. console.log("error_________________" + error);
  17016. try {
  17017. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17018. let match = data.message.match(regex);
  17019. tArray = JSON.parse(match[0]);
  17020. // var message = data.message;
  17021. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17022. // var jsonEnd = message.indexOf("```", jsonStart);
  17023. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17024. // tArray = JSON.parse(jsonString);
  17025. } catch (error) {
  17026. try {
  17027. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17028. let match = data.message.match(regex);
  17029. // eval("var aaa = " + match[0])
  17030. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17031. } catch (error) {
  17032. console.log("error_________________" + error);
  17033. }
  17034. console.log("error_________________" + error);
  17035. }
  17036. }
  17037. resolve(tArray)
  17038. } catch (error) {
  17039. if(type == 15){
  17040. resolve({answerQ: "题目"})
  17041. }else if(type == 45){
  17042. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17043. }
  17044. }
  17045. }else if(type == 15){
  17046. resolve({answerQ: "题目"})
  17047. }else if(type == 45){
  17048. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17049. }
  17050. })
  17051. .catch((error) => {
  17052. if(type == 15){
  17053. resolve({answerQ: "题目"})
  17054. }else if(type == 45){
  17055. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17056. }
  17057. console.log(error);
  17058. });
  17059. });
  17060. },
  17061. async aiChoice(type){
  17062. if(type == 45){
  17063. this.choiceLoading = true
  17064. }
  17065. let _this = this
  17066. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17067. if (_this.infoData.length) {
  17068. for (var i = 0; i < _this.infoData.length; i++) {
  17069. if(_this.infoData[i].fileid){
  17070. fileid.push(_this.infoData[i].fileid)
  17071. }
  17072. }
  17073. }
  17074. let sub = []
  17075. let mclass = []
  17076. if (this.courseTypeId.length) {
  17077. for (var i = 0; i < this.courseTypeId.length; i++) {
  17078. let _sid = this.courseTypeId[i]
  17079. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17080. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17081. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17082. }
  17083. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17084. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17085. }
  17086. }
  17087. }
  17088. }
  17089. let messages = ""
  17090. if(type == 15){
  17091. messages = `NOTICE
  17092. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17093. 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.
  17094. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17095. Instruction: Based on the context, follow "Format example", write content.
  17096. # Context
  17097. ## 任务
  17098. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  17099. ## 限制
  17100. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17101. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17102. ## 课程简介
  17103. 课程名字:${_this.courseName}
  17104. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17105. ${sub.length ? '学科:' + sub.join(",") : ''}
  17106. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17107. ## 教案
  17108. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17109. # Format example
  17110. {answerQ:"问题"}
  17111. `
  17112. }else if(type == 45){
  17113. messages = `NOTICE
  17114. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17115. 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.
  17116. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17117. Instruction: Based on the context, follow "Format example", write content.
  17118. # Context
  17119. ## 任务
  17120. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  17121. ## 限制
  17122. - 生成题目禁止重复。
  17123. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17124. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  17125. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17126. ## 课程简介
  17127. 课程名字:${_this.courseName}
  17128. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17129. ${sub.length ? '学科:' + sub.join(",") : ''}
  17130. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17131. ## 教案
  17132. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17133. # Format example
  17134. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  17135. `
  17136. }
  17137. let parm = {
  17138. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17139. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17140. session_name: uuidv4(),
  17141. userId: this.userid,
  17142. file_ids: fileid.length ? [...fileid] : '',
  17143. }
  17144. this.ajax
  17145. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17146. .then((response) => {
  17147. console.log(response);
  17148. let data = response.data.FunctionResponse
  17149. if (data.message) {
  17150. console.log(data.message);
  17151. try {
  17152. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17153. let tArray = {}
  17154. try {
  17155. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17156. } catch (error) {
  17157. console.log("error_________________" + error);
  17158. try {
  17159. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17160. let match = data.message.match(regex);
  17161. tArray = JSON.parse(match[0]);
  17162. // var message = data.message;
  17163. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17164. // var jsonEnd = message.indexOf("```", jsonStart);
  17165. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17166. // tArray = JSON.parse(jsonString);
  17167. } catch (error) {
  17168. try {
  17169. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17170. let match = data.message.match(regex);
  17171. // eval("var aaa = " + match[0])
  17172. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17173. } catch (error) {
  17174. console.log("error_________________" + error);
  17175. }
  17176. console.log("error_________________" + error);
  17177. }
  17178. }
  17179. if(type == 45){
  17180. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  17181. }
  17182. } catch (error) {
  17183. if(type == 15){
  17184. {answerQ: "题目"}
  17185. }else if(type == 45){
  17186. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  17187. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  17188. }
  17189. _this.choiceLoading = false
  17190. }
  17191. }else if(type == 15){
  17192. {answerQ: "题目"}
  17193. }else if(type == 45){
  17194. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  17195. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  17196. }
  17197. _this.choiceLoading = false
  17198. }).catch((error) => {
  17199. if(type == 15){
  17200. {answerQ: "题目"}
  17201. }else if(type == 45){
  17202. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  17203. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  17204. }
  17205. console.log(error);
  17206. _this.choiceLoading = false
  17207. });
  17208. },
  17209. async aiGet4(messages, callback, clickType) {
  17210. let _this = this
  17211. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17212. if (_this.infoData.length) {
  17213. for (var i = 0; i < _this.infoData.length; i++) {
  17214. if(_this.infoData[i].fileid){
  17215. fileid.push(_this.infoData[i].fileid)
  17216. }else {
  17217. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17218. if(_fileid){
  17219. _this.infoData[i].fileid = _fileid
  17220. _this.$forceUpdate();
  17221. fileid.push(_fileid)
  17222. }
  17223. }
  17224. }
  17225. }
  17226. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  17227. if(_this.cankaoInfoData[i].fileid){
  17228. fileid.push(_this.cankaoInfoData[i].fileid)
  17229. }else {
  17230. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  17231. if(_fileid){
  17232. _this.cankaoInfoData[i].fileid = _fileid
  17233. _this.$forceUpdate();
  17234. fileid.push(_fileid)
  17235. }
  17236. }
  17237. }
  17238. // let params = JSON.stringify({
  17239. // // "model": "Chat",
  17240. // model: 'gpt-3.5-turbo',
  17241. // temperature: 0,
  17242. // max_tokens: 4096,
  17243. // top_p: 1,
  17244. // frequency_penalty: 0,
  17245. // presence_penalty: 0,
  17246. // messages: [{
  17247. // content: messages,
  17248. // role: 'user'
  17249. // }],
  17250. // stream: false,
  17251. // uid: this.userid,
  17252. // mind_map_question: "",
  17253. // })
  17254. // // let params = JSON.stringify({
  17255. // // message: {
  17256. // // anthropic_version: "bedrock-2023-05-31",
  17257. // // max_tokens: 4096,
  17258. // // temperature: 0,
  17259. // // top_p: 1,
  17260. // // messages: [{
  17261. // // content: messages,
  17262. // // role: 'user'
  17263. // // }], //
  17264. // // },
  17265. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17266. // // });
  17267. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17268. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17269. // console.log(response);
  17270. // let data = response.data.FunctionResponse
  17271. // if (data.choices && data.choices.length && data.choices[0].message) {
  17272. // console.log(data.choices[0].message.content);
  17273. // let dArray = JSON.parse(data.choices[0].message.content)
  17274. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  17275. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  17276. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17277. // for (var i = 0; i < dArray.length; i++) {
  17278. // let _task = dArray[i]
  17279. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17280. // task: _task.task,
  17281. // taskDetail: "",
  17282. // taskDetail2: "",
  17283. // taskDetail3: _task.detail,
  17284. // chapterData: [],
  17285. // toolText: "",
  17286. // toolChoose: [
  17287. // {
  17288. // tool: [],
  17289. // toolDetail: "",
  17290. // toolType: 0,
  17291. // askCount: 1,
  17292. // askTitle: "",
  17293. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17294. // },
  17295. // ],
  17296. // isShowTools: false,
  17297. // askCount: 1,
  17298. // isFold: 0,
  17299. // askTitle: "",
  17300. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17301. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17302. // homeworkList: [],
  17303. // })
  17304. // }
  17305. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17306. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17307. // _this.$forceUpdate();
  17308. // } else {
  17309. // for (var i = 0; i < dArray.length; i++) {
  17310. // let _task = dArray[i]
  17311. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17312. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17313. // }else {
  17314. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  17315. // task: _task.task,
  17316. // taskDetail: "",
  17317. // taskDetail2: "",
  17318. // taskDetail3: _task.detail,
  17319. // chapterData: [],
  17320. // toolText: "",
  17321. // toolChoose: [
  17322. // {
  17323. // tool: [],
  17324. // toolDetail: "",
  17325. // toolType: 0,
  17326. // askCount: 1,
  17327. // askTitle: "",
  17328. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17329. // },
  17330. // ],
  17331. // isShowTools: false,
  17332. // askCount: 1,
  17333. // isFold: 0,
  17334. // askTitle: "",
  17335. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17336. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17337. // homeworkList: [],
  17338. // }
  17339. // }
  17340. // }
  17341. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17342. // _this.$forceUpdate();
  17343. // }
  17344. // }
  17345. // // if (data.result) {
  17346. // // console.log(data.result);
  17347. // // let dArray = JSON.parse(data.result)
  17348. // // _this.teacherText = JSON.parse(data.result)
  17349. // // for (var i = 0; i < dArray.length; i++) {
  17350. // // let _task = dArray[i]
  17351. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17352. // // }
  17353. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17354. // // _this.$forceUpdate();
  17355. // // }
  17356. // callback ? callback() : ''
  17357. // _this.loading = false
  17358. // }).catch(function (error) {
  17359. // _this.loading = false
  17360. // console.log(error);
  17361. // });
  17362. let parm = {
  17363. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17364. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17365. session_name: uuidv4(),
  17366. userId: this.userid,
  17367. file_ids: fileid.length ? [...fileid] : '',
  17368. }
  17369. this.ajax
  17370. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17371. .then((response) => {
  17372. console.log(response);
  17373. let data = response.data.FunctionResponse
  17374. if (data.message) {
  17375. console.log(data.message);
  17376. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17377. let dArray = []
  17378. try {
  17379. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17380. } catch (error) {
  17381. console.log("error_________________" + error);
  17382. try {
  17383. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17384. let match = data.message.match(regex);
  17385. dArray = JSON.parse(match[0]);
  17386. // var message = data.message;
  17387. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17388. // var jsonEnd = message.indexOf("```", jsonStart);
  17389. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17390. // dArray = JSON.parse(jsonString);
  17391. } catch (error) {
  17392. _this.aiGet4(messages, callback)
  17393. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17394. console.log("error_________________" + error);
  17395. return;
  17396. console.log("error_________________" + error);
  17397. _this.loading = false
  17398. }
  17399. }
  17400. try {
  17401. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  17402. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  17403. if(_this.panTeacher() > 0){
  17404. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17405. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17406. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  17407. }
  17408. for (var i = 0; i < dArray.length; i++) {
  17409. let _task = dArray[i]
  17410. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17411. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
  17412. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17413. }else {
  17414. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17415. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  17416. taskDetail: "",
  17417. taskDetail2: "",
  17418. taskDetail3: _task.detail,
  17419. chapterData: [],
  17420. toolText: "",
  17421. toolChoose: [
  17422. {
  17423. tool: [],
  17424. toolDetail: "",
  17425. toolType: 0,
  17426. askCount: 1,
  17427. askTitle: "",
  17428. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17429. },
  17430. ],
  17431. isShowTools: false,
  17432. askCount: 1,
  17433. isFold: 0,
  17434. askTitle: "",
  17435. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17436. checkJson: [{ checkCount: [], checkPerent: [] }],
  17437. homeworkList: [],
  17438. })
  17439. }
  17440. }
  17441. }else {
  17442. _this.unitJson[0].chapterInfo[0].taskJson = []
  17443. for (var i = 0; i < dArray.length; i++) {
  17444. let _task = dArray[i]
  17445. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17446. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  17447. taskDetail: "",
  17448. taskDetail2: "",
  17449. taskDetail3: _task.detail,
  17450. chapterData: [],
  17451. toolText: "",
  17452. toolChoose: [
  17453. {
  17454. tool: [],
  17455. toolDetail: "",
  17456. toolType: 0,
  17457. askCount: 1,
  17458. askTitle: "",
  17459. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17460. },
  17461. ],
  17462. isShowTools: false,
  17463. askCount: 1,
  17464. isFold: 0,
  17465. askTitle: "",
  17466. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17467. checkJson: [{ checkCount: [], checkPerent: [] }],
  17468. homeworkList: [],
  17469. })
  17470. }
  17471. }
  17472. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17473. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17474. _this.$forceUpdate();
  17475. } else {
  17476. for (var i = 0; i < dArray.length; i++) {
  17477. let _task = dArray[i]
  17478. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17479. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  17480. }else {
  17481. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  17482. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll(':','').replaceAll(':',''),
  17483. taskDetail: "",
  17484. taskDetail2: "",
  17485. taskDetail3: _task.detail,
  17486. chapterData: [],
  17487. toolText: "",
  17488. toolChoose: [
  17489. {
  17490. tool: [],
  17491. toolDetail: "",
  17492. toolType: 0,
  17493. askCount: 1,
  17494. askTitle: "",
  17495. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17496. },
  17497. ],
  17498. isShowTools: false,
  17499. askCount: 1,
  17500. isFold: 0,
  17501. askTitle: "",
  17502. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17503. checkJson: [{ checkCount: [], checkPerent: [] }],
  17504. homeworkList: [],
  17505. }
  17506. }
  17507. }
  17508. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17509. _this.$forceUpdate();
  17510. }
  17511. } catch (error) {
  17512. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17513. _this.aiGet4(messages, callback)
  17514. console.log("error_________________" + error);
  17515. return;
  17516. // _this.loading = false
  17517. }
  17518. }
  17519. callback ? callback() : ''
  17520. })
  17521. .catch((error) => {
  17522. _this.loading = false
  17523. console.log(error);
  17524. });
  17525. },
  17526. async aiDetail(msg, index) {
  17527. let _this = this
  17528. const _tindex = 'task-' + index
  17529. const _tindex2 = index
  17530. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17531. if (_this.infoData.length) {
  17532. for (var i = 0; i < _this.infoData.length; i++) {
  17533. if(_this.infoData[i].fileid){
  17534. fileid.push(_this.infoData[i].fileid)
  17535. }else {
  17536. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17537. if(_fileid){
  17538. _this.infoData[i].fileid = _fileid
  17539. _this.$forceUpdate();
  17540. fileid.push(_fileid)
  17541. }
  17542. }
  17543. }
  17544. }
  17545. let url = []
  17546. if (this.infoData.length) {
  17547. for (var i = 0; i < this.infoData.length; i++) {
  17548. url.push(this.infoData[i].url)
  17549. }
  17550. }
  17551. let messages = `NOTICE
  17552. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  17553. 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.
  17554. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17555. Instruction: Based on the context, follow "Format example", write content.
  17556. #Context
  17557. ## 要求
  17558. ${msg}
  17559. ## 参考信息
  17560. 任务名称:${_this.aiCallBack.task}
  17561. ## 优化内容
  17562. 大纲描述:${_this.aiCallBack.taskDetail2}。 内容不要以markdown形式出现,只需要口语化的形式`
  17563. // -------- #补充参考资料和
  17564. // ## 补充参考资料
  17565. // - 补充资料:${url.join(",")}
  17566. // - 补充描述:${_this.courseText2}
  17567. _this.taskDetailLoading.push(_tindex)
  17568. _this.ttaskDetailLoading.push(_tindex)
  17569. let _uuid = uuidv4();
  17570. // let params = JSON.stringify({
  17571. // // "model": "Chat",
  17572. // model: 'gpt-3.5-turbo',
  17573. // temperature: 0,
  17574. // max_tokens: 4096,
  17575. // top_p: 1,
  17576. // frequency_penalty: 0,
  17577. // presence_penalty: 0,
  17578. // messages: [{
  17579. // content: messages,
  17580. // role: 'user'
  17581. // }],
  17582. // uid: _uuid,
  17583. // mind_map_question: "",
  17584. // })
  17585. let params = {
  17586. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17587. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17588. session_name: _uuid,
  17589. userId: _this.userid,
  17590. uid: _uuid,
  17591. file_ids: fileid.length ? [...fileid] : '',
  17592. }
  17593. // let params = JSON.stringify({
  17594. // message: {
  17595. // anthropic_version: "bedrock-2023-05-31",
  17596. // max_tokens: 4096,
  17597. // temperature: 0,
  17598. // top_p: 1,
  17599. // messages: [{
  17600. // "role": "user",
  17601. // "content": messages
  17602. // }] ,
  17603. // },
  17604. // uid: _uuid,
  17605. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17606. // });
  17607. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17608. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  17609. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17610. console.log(response);
  17611. // let data = response.data.FunctionResponse
  17612. // if (data.choices && data.choices.length && data.choices[0].message) {
  17613. // console.log(data.choices[0].message.content);
  17614. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  17615. // _this.$forceUpdate()
  17616. // }
  17617. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17618. } else {
  17619. _this.$message.warning(response.data.FunctionResponse.result);
  17620. }
  17621. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17622. }).catch(function (error) {
  17623. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17624. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  17625. console.log(error);
  17626. });
  17627. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  17628. },
  17629. aiDetailgetAiContent(_uid, loading, _tindex2) {
  17630. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17631. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17632. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17633. let _allText = "";
  17634. let _mdText = "";
  17635. let _iindex = 0
  17636. _source.onmessage = _e => {
  17637. let _eData = JSON.parse(_e.data).content;
  17638. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17639. //对话已经完成
  17640. _mdText = _mdText.replace("_", "");
  17641. _source.close();
  17642. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17643. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17644. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  17645. return;
  17646. } else {
  17647. _iindex++
  17648. //对话还在继续
  17649. let _text = "";
  17650. _text = _eData.replaceAll("'", "");
  17651. if (_allText == "") {
  17652. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17653. } else {
  17654. _allText += _text;
  17655. }
  17656. _mdText = _allText + "_";
  17657. _mdText = _mdText.replace(/\\n/g, "\n");
  17658. _mdText = _mdText.replace(/\\/g, "");
  17659. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17660. //转化返回的回复流数据.
  17661. if(_iindex == 10){
  17662. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17663. _iindex = 0
  17664. }
  17665. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17666. // 处理流数据
  17667. }
  17668. // this.$forceUpdate();
  17669. };
  17670. },
  17671. async aiOutlineDetail(msg, index) {
  17672. let _this = this
  17673. const _tindex = 'task-' + index
  17674. const _tindex2 = index
  17675. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17676. if (_this.infoData.length) {
  17677. for (var i = 0; i < _this.infoData.length; i++) {
  17678. if(_this.infoData[i].fileid){
  17679. fileid.push(_this.infoData[i].fileid)
  17680. }else {
  17681. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17682. if(_fileid){
  17683. _this.infoData[i].fileid = _fileid
  17684. _this.$forceUpdate();
  17685. fileid.push(_fileid)
  17686. }
  17687. }
  17688. }
  17689. }
  17690. let url = []
  17691. if (this.infoData.length) {
  17692. for (var i = 0; i < this.infoData.length; i++) {
  17693. url.push(this.infoData[i].url)
  17694. }
  17695. }
  17696. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  17697. let messages = `NOTICE
  17698. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  17699. 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.
  17700. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17701. Instruction: Based on the context, follow "Format example", write content.
  17702. #Context
  17703. ## 要求
  17704. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  17705. ## 参考信息
  17706. 课程名字:${_this.courseName}
  17707. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  17708. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17709. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17710. # Format example
  17711. 教学目标:教学目标。
  17712. 任务设计:任务设计。
  17713. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  17714. `
  17715. // -------- #补充参考资料和
  17716. // ## 补充参考资料
  17717. // - 补充资料:${url.join(",")}
  17718. // - 补充描述:${_this.courseText2}
  17719. _this.taskDetailLoading.push(_tindex)
  17720. _this.ttaskDetailLoading.push(_tindex)
  17721. let _uuid = uuidv4();
  17722. // let params = JSON.stringify({
  17723. // // "model": "Chat",
  17724. // model: 'gpt-3.5-turbo',
  17725. // temperature: 0,
  17726. // max_tokens: 4096,
  17727. // top_p: 1,
  17728. // frequency_penalty: 0,
  17729. // presence_penalty: 0,
  17730. // messages: [{
  17731. // content: messages,
  17732. // role: 'user'
  17733. // }],
  17734. // uid: _uuid,
  17735. // mind_map_question: "",
  17736. // })
  17737. let params = {
  17738. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17739. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17740. session_name: _uuid,
  17741. userId: _this.userid,
  17742. uid: _uuid,
  17743. file_ids: fileid.length ? [...fileid] : '',
  17744. }
  17745. // let params = JSON.stringify({
  17746. // message: {
  17747. // anthropic_version: "bedrock-2023-05-31",
  17748. // max_tokens: 4096,
  17749. // temperature: 0,
  17750. // top_p: 1,
  17751. // messages: [{
  17752. // "role": "user",
  17753. // "content": messages
  17754. // }] ,
  17755. // },
  17756. // uid: _uuid,
  17757. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17758. // });
  17759. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17760. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  17761. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17762. console.log(response);
  17763. // let data = response.data.FunctionResponse
  17764. // if (data.choices && data.choices.length && data.choices[0].message) {
  17765. // console.log(data.choices[0].message.content);
  17766. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  17767. // _this.$forceUpdate()
  17768. // }
  17769. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17770. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  17771. } else {
  17772. _this.$message.warning(response.data.FunctionResponse.result);
  17773. }
  17774. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17775. }).catch(function (error) {
  17776. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17777. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  17778. console.log(error);
  17779. });
  17780. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  17781. },
  17782. async aiOutlineDetail2(msg, index) {
  17783. let _this = this
  17784. const _tindex = 'task-' + index
  17785. const _tindex2 = index
  17786. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17787. if (_this.infoData.length) {
  17788. for (var i = 0; i < _this.infoData.length; i++) {
  17789. if(_this.infoData[i].fileid){
  17790. fileid.push(_this.infoData[i].fileid)
  17791. }else {
  17792. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17793. if(_fileid){
  17794. _this.infoData[i].fileid = _fileid
  17795. _this.$forceUpdate();
  17796. fileid.push(_fileid)
  17797. }
  17798. }
  17799. }
  17800. }
  17801. let url = []
  17802. if (this.infoData.length) {
  17803. for (var i = 0; i < this.infoData.length; i++) {
  17804. url.push(this.infoData[i].url)
  17805. }
  17806. }
  17807. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  17808. let taskArray = []
  17809. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  17810. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  17811. if(k != index){
  17812. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  17813. }
  17814. }
  17815. let messages = `NOTICE
  17816. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  17817. 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.
  17818. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17819. Instruction: Based on the context, follow "Format example", write content.
  17820. #Context
  17821. ## 要求
  17822. ${msg}
  17823. ## 参考信息
  17824. 课程名字:${_this.courseName}
  17825. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  17826. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17827. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17828. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  17829. # Format example
  17830. 教学目标:教学目标。
  17831. 任务设计:任务设计。
  17832. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  17833. `
  17834. // -------- #补充参考资料和
  17835. // ## 补充参考资料
  17836. // - 补充资料:${url.join(",")}
  17837. // - 补充描述:${_this.courseText2}
  17838. _this.taskDetailLoading.push(_tindex)
  17839. _this.ttaskDetailLoading.push(_tindex)
  17840. let _uuid = uuidv4();
  17841. // let params = JSON.stringify({
  17842. // // "model": "Chat",
  17843. // model: 'gpt-3.5-turbo',
  17844. // temperature: 0,
  17845. // max_tokens: 4096,
  17846. // top_p: 1,
  17847. // frequency_penalty: 0,
  17848. // presence_penalty: 0,
  17849. // messages: [{
  17850. // content: messages,
  17851. // role: 'user'
  17852. // }],
  17853. // uid: _uuid,
  17854. // mind_map_question: "",
  17855. // })
  17856. let params = {
  17857. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17858. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17859. session_name: _uuid,
  17860. userId: _this.userid,
  17861. uid: _uuid,
  17862. file_ids: fileid.length ? [...fileid] : '',
  17863. }
  17864. // let params = JSON.stringify({
  17865. // message: {
  17866. // anthropic_version: "bedrock-2023-05-31",
  17867. // max_tokens: 4096,
  17868. // temperature: 0,
  17869. // top_p: 1,
  17870. // messages: [{
  17871. // "role": "user",
  17872. // "content": messages
  17873. // }] ,
  17874. // },
  17875. // uid: _uuid,
  17876. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17877. // });
  17878. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17879. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  17880. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17881. console.log(response);
  17882. // let data = response.data.FunctionResponse
  17883. // if (data.choices && data.choices.length && data.choices[0].message) {
  17884. // console.log(data.choices[0].message.content);
  17885. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  17886. // _this.$forceUpdate()
  17887. // }
  17888. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17889. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  17890. } else {
  17891. _this.$message.warning(response.data.FunctionResponse.result);
  17892. }
  17893. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17894. }).catch(function (error) {
  17895. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  17896. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  17897. console.log(error);
  17898. });
  17899. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  17900. },
  17901. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  17902. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17903. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17904. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17905. let _allText = "";
  17906. let _mdText = "";
  17907. let _iindex = 0
  17908. _source.onmessage = _e => {
  17909. let _eData = JSON.parse(_e.data).content;
  17910. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17911. //对话已经完成
  17912. _mdText = _mdText.replace("_", "");
  17913. _source.close();
  17914. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17915. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  17916. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  17917. }
  17918. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17919. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  17920. return;
  17921. } else {
  17922. _iindex++
  17923. //对话还在继续
  17924. let _text = "";
  17925. _text = _eData.replaceAll("'", "");
  17926. if (_allText == "") {
  17927. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17928. } else {
  17929. _allText += _text;
  17930. }
  17931. _mdText = _allText + "_";
  17932. _mdText = _mdText.replace(/\\n/g, "\n");
  17933. _mdText = _mdText.replace(/\\/g, "");
  17934. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17935. //转化返回的回复流数据.
  17936. if(_iindex == 10){
  17937. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  17938. _iindex = 0
  17939. }
  17940. if(this.taskDetailLoading.indexOf(loading) !== -1){
  17941. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  17942. }
  17943. // 处理流数据
  17944. }
  17945. // this.$forceUpdate();
  17946. };
  17947. },
  17948. async aiDetail2(msg, index) {
  17949. let _this = this
  17950. const _tindex = 'task-' + index
  17951. const _tindex2 = index
  17952. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17953. if (_this.infoData.length) {
  17954. for (var i = 0; i < _this.infoData.length; i++) {
  17955. if(_this.infoData[i].fileid){
  17956. fileid.push(_this.infoData[i].fileid)
  17957. }else {
  17958. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17959. if(_fileid){
  17960. _this.infoData[i].fileid = _fileid
  17961. _this.$forceUpdate();
  17962. fileid.push(_fileid)
  17963. }
  17964. }
  17965. }
  17966. }
  17967. let messages = `NOTICE
  17968. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  17969. 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.
  17970. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17971. Instruction: Based on the context, follow "Format example", write content.
  17972. #Context
  17973. ## 要求
  17974. ${msg}
  17975. ## 参考资料
  17976. 任务名字: ${_this.aiCallBack.task}
  17977. ## 优化信息
  17978. ${_this.aiCallBack.taskDetail}
  17979. # Format example
  17980. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  17981. _this.taskDetailLoading2.push(_tindex)
  17982. _this.ttaskDetailLoading2.push(_tindex)
  17983. let _uuid = uuidv4();
  17984. // let params = JSON.stringify({
  17985. // // "model": "Chat",
  17986. // model: 'gpt-3.5-turbo',
  17987. // temperature: 0,
  17988. // max_tokens: 4096,
  17989. // top_p: 1,
  17990. // frequency_penalty: 0,
  17991. // presence_penalty: 0,
  17992. // messages: [{
  17993. // content: messages,
  17994. // role: 'user'
  17995. // }],
  17996. // uid: _uuid,
  17997. // mind_map_question: "",
  17998. // })
  17999. let params = {
  18000. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18001. message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
  18002. session_name: _uuid,
  18003. userId: _this.userid,
  18004. uid: _uuid,
  18005. file_ids: fileid.length ? [...fileid] : '',
  18006. }
  18007. // let params = JSON.stringify({
  18008. // message: {
  18009. // anthropic_version: "bedrock-2023-05-31",
  18010. // max_tokens: 4096,
  18011. // temperature: 0,
  18012. // top_p: 1,
  18013. // messages: [{
  18014. // "role": "user",
  18015. // "content": messages
  18016. // }] ,
  18017. // },
  18018. // uid: _uuid,
  18019. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18020. // });
  18021. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18022. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18023. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18024. console.log(response);
  18025. // let data = response.data.FunctionResponse
  18026. // if (data.choices && data.choices.length && data.choices[0].message) {
  18027. // console.log(data.choices[0].message.content);
  18028. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18029. // _this.$forceUpdate()
  18030. // }
  18031. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18032. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18033. } else {
  18034. _this.$message.warning(response.data.FunctionResponse.result);
  18035. }
  18036. }).catch(function (error) {
  18037. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  18038. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  18039. console.log(error);
  18040. });
  18041. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  18042. },
  18043. aiDetail2getAiContent(_uid, loading, _tindex2) {
  18044. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18045. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18046. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18047. let _allText = "";
  18048. let _mdText = "";
  18049. let _iindex = 0
  18050. _source.onmessage = _e => {
  18051. let _eData = JSON.parse(_e.data).content;
  18052. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18053. //对话已经完成
  18054. _mdText = _mdText.replace("_", "");
  18055. _source.close();
  18056. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  18057. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  18058. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  18059. return;
  18060. } else {
  18061. _iindex++
  18062. //对话还在继续
  18063. let _text = "";
  18064. _text = _eData.replaceAll("'", "");
  18065. if (_allText == "") {
  18066. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18067. } else {
  18068. _allText += _text;
  18069. }
  18070. _mdText = _allText + "_";
  18071. _mdText = _mdText.replace(/\\n/g, "\n");
  18072. _mdText = _mdText.replace(/\\/g, "");
  18073. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18074. //转化返回的回复流数据
  18075. if(_iindex == 10){
  18076. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  18077. _iindex = 0
  18078. }
  18079. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  18080. // 处理流数据
  18081. }
  18082. // this.$forceUpdate();
  18083. };
  18084. },
  18085. async aiDetail3(msg, index, tindex) {
  18086. let _this = this
  18087. const _tindex = 'task-' + index + tindex
  18088. const _tindex2 = index
  18089. const _tindex3 = tindex
  18090. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18091. if (_this.infoData.length) {
  18092. for (var i = 0; i < _this.infoData.length; i++) {
  18093. if(_this.infoData[i].fileid){
  18094. fileid.push(_this.infoData[i].fileid)
  18095. }else {
  18096. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18097. if(_fileid){
  18098. _this.infoData[i].fileid = _fileid
  18099. _this.$forceUpdate();
  18100. fileid.push(_fileid)
  18101. }
  18102. }
  18103. }
  18104. }
  18105. // **重点考虑该任务及工具名和工具内容的情况下*
  18106. let messages = `NOTICE
  18107. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  18108. 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.
  18109. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18110. Instruction: Based on the context, follow "Format example", write content.
  18111. #Context
  18112. ## 参考内容
  18113. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18114. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  18115. 工具名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0] ? _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]].name : '无'}
  18116. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  18117. ## 要求
  18118. ${msg} 输出格式和内容要求参考#格式与要求
  18119. # Format example
  18120. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  18121. _this.taskDetailLoading3.push(_tindex)
  18122. _this.ttaskDetailLoading3.push(_tindex)
  18123. let _uuid = uuidv4();
  18124. // let params = JSON.stringify({
  18125. // // "model": "Chat",
  18126. // model: 'gpt-3.5-turbo',
  18127. // temperature: 0,
  18128. // max_tokens: 4096,
  18129. // top_p: 1,
  18130. // frequency_penalty: 0,
  18131. // presence_penalty: 0,
  18132. // messages: [{
  18133. // content: messages,
  18134. // role: 'user'
  18135. // }],
  18136. // uid: _uuid,
  18137. // mind_map_question: "",
  18138. // })
  18139. let params = {
  18140. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18141. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18142. session_name: _uuid,
  18143. userId: _this.userid,
  18144. uid: _uuid,
  18145. file_ids: fileid.length ? [...fileid] : '',
  18146. }
  18147. // let params = JSON.stringify({
  18148. // message: {
  18149. // anthropic_version: "bedrock-2023-05-31",
  18150. // max_tokens: 4096,
  18151. // temperature: 0,
  18152. // top_p: 1,
  18153. // messages: [{
  18154. // "role": "user",
  18155. // "content": messages
  18156. // }] ,
  18157. // },
  18158. // uid: _uuid,
  18159. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18160. // });
  18161. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18162. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18163. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18164. console.log(response);
  18165. let data = response.data.FunctionResponse
  18166. // if (data.choices && data.choices.length && data.choices[0].message) {
  18167. // console.log(data.choices[0].message.content);
  18168. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  18169. // _this.$forceUpdate()
  18170. // }
  18171. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  18172. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18173. } else {
  18174. _this.$message.warning(response.data.FunctionResponse.result);
  18175. }
  18176. }).catch(function (error) {
  18177. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  18178. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  18179. console.log(error);
  18180. });
  18181. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  18182. },
  18183. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  18184. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18185. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18186. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18187. let _allText = "";
  18188. let _mdText = "";
  18189. let _iindex = 0
  18190. _source.onmessage = _e => {
  18191. let _eData = JSON.parse(_e.data).content;
  18192. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18193. //对话已经完成
  18194. _mdText = _mdText.replace("_", "");
  18195. _source.close();
  18196. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  18197. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  18198. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  18199. return;
  18200. } else {
  18201. _iindex++
  18202. //对话还在继续
  18203. let _text = "";
  18204. _text = _eData.replaceAll("'", "");
  18205. if (_allText == "") {
  18206. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18207. } else {
  18208. _allText += _text;
  18209. }
  18210. _mdText = _allText + "_";
  18211. _mdText = _mdText.replace(/\\n/g, "\n");
  18212. _mdText = _mdText.replace(/\\/g, "");
  18213. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18214. //转化返回的回复流数据
  18215. if(_iindex == 10){
  18216. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  18217. _iindex = 0
  18218. }
  18219. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  18220. // 处理流数据
  18221. }
  18222. // this.$forceUpdate();
  18223. };
  18224. },
  18225. async aiDetail4(msg, index) {
  18226. if (!msg.length) {
  18227. this.$message.error("请添加评价后才能优化")
  18228. return
  18229. }
  18230. let _this = this
  18231. const _tindex = 'task-' + index
  18232. const _tindex2 = index
  18233. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18234. if (_this.infoData.length) {
  18235. for (var i = 0; i < _this.infoData.length; i++) {
  18236. if(_this.infoData[i].fileid){
  18237. fileid.push(_this.infoData[i].fileid)
  18238. }else {
  18239. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18240. if(_fileid){
  18241. _this.infoData[i].fileid = _fileid
  18242. _this.$forceUpdate();
  18243. fileid.push(_fileid)
  18244. }
  18245. }
  18246. }
  18247. }
  18248. var _text = ""
  18249. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  18250. _text += `评价维度:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 维度描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} `
  18251. }
  18252. // **重点考虑该任务详情**
  18253. let messages = `
  18254. 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.
  18255. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  18256. #Context
  18257. ## 参考内容
  18258. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18259. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  18260. 评价设计:${_text}
  18261. ## 要求
  18262. ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  18263. # 格式与要求
  18264. -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  18265. # Format example
  18266. [{"value":"评价维度1","detail":"维度描述1","score":5},{"value":"评价维度2","detail":"维度描述2","score":5},{"value":"评价维度3","detail":"维度描述3","score":5}]`
  18267. _this.taskDetailLoading4.push(_tindex)
  18268. // let params = JSON.stringify({
  18269. // // "model": "Chat",
  18270. // model: 'gpt-3.5-turbo',
  18271. // temperature: 0,
  18272. // max_tokens: 4096,
  18273. // top_p: 1,
  18274. // frequency_penalty: 0,
  18275. // presence_penalty: 0,
  18276. // messages: [{
  18277. // content: messages,
  18278. // role: 'user'
  18279. // }],
  18280. // stream: false,
  18281. // uid: this.userid,
  18282. // mind_map_question: "",
  18283. // })
  18284. let params = {
  18285. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18286. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18287. session_name: uuidv4(),
  18288. userId: _this.userid,
  18289. file_ids: fileid.length ? [...fileid] : '',
  18290. }
  18291. // let params = JSON.stringify({
  18292. // message: {
  18293. // anthropic_version: "bedrock-2023-05-31",
  18294. // max_tokens: 4096,
  18295. // temperature: 0,
  18296. // top_p: 1,
  18297. // messages: [{
  18298. // content: messages,
  18299. // role: 'user'
  18300. // }], //
  18301. // },
  18302. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18303. // });
  18304. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18305. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  18306. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18307. console.log(response);
  18308. let data = response.data.FunctionResponse
  18309. // if (data.choices && data.choices.length && data.choices[0].message) {
  18310. // console.log(data.choices[0].message.content);
  18311. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  18312. // _this.$forceUpdate()
  18313. // }
  18314. if (data.message) {
  18315. console.log(data.message);
  18316. try {
  18317. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  18318. } catch (e) {
  18319. console.log("error_________________" + e);
  18320. // _this.$message.error(data.message)
  18321. try {
  18322. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18323. let match = data.message.match(regex);
  18324. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(match[0]);
  18325. // var message = data.message;
  18326. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18327. // var jsonEnd = message.indexOf("```", jsonStart);
  18328. // if (jsonStart !== -1 && jsonEnd !== -1) {
  18329. // var jsonString = message
  18330. // .substring(jsonStart, jsonEnd)
  18331. // .trim();
  18332. // var _data2 = JSON.parse(jsonString);
  18333. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  18334. // }
  18335. } catch (error) {
  18336. }
  18337. }
  18338. _this.$forceUpdate()
  18339. }
  18340. // if (data.result) {
  18341. // console.log(data.result);
  18342. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  18343. // _this.$forceUpdate()
  18344. // }
  18345. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18346. }).catch(function (error) {
  18347. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18348. console.log(error);
  18349. });
  18350. },
  18351. async aiDetail5(msg, index) {
  18352. let _this = this
  18353. const _tindex = 'task-' + index
  18354. const _tindex2 = index
  18355. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18356. if (_this.infoData.length) {
  18357. for (var i = 0; i < _this.infoData.length; i++) {
  18358. if(_this.infoData[i].fileid){
  18359. fileid.push(_this.infoData[i].fileid)
  18360. }else {
  18361. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18362. if(_fileid){
  18363. _this.infoData[i].fileid = _fileid
  18364. _this.$forceUpdate();
  18365. fileid.push(_fileid)
  18366. }
  18367. }
  18368. }
  18369. }
  18370. let url = []
  18371. if (this.infoData.length) {
  18372. for (var i = 0; i < this.infoData.length; i++) {
  18373. url.push(this.infoData[i].url)
  18374. }
  18375. }
  18376. var _text = ""
  18377. var _text2 = ""
  18378. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18379. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18380. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  18381. }
  18382. let messages = `
  18383. 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.
  18384. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  18385. --------
  18386. ## 要求
  18387. ${msg}
  18388. -------
  18389. ## 本教案描述
  18390. ${_this.aiCallBack}
  18391. -------
  18392. ## 课程大纲
  18393. ${_text}
  18394. -------
  18395. ## 其他教学任务教案
  18396. ${_text2}`
  18397. // ## 补充参考资料
  18398. // - 补充资料:${url.join(",")}
  18399. // - 补充描述:${this.courseText2}
  18400. _this.taskDetailLoading5.push(_tindex)
  18401. _this.ttaskDetailLoading5.push(_tindex)
  18402. let _uuid = uuidv4();
  18403. // let params = JSON.stringify({
  18404. // // "model": "Chat",
  18405. // model: 'gpt-3.5-turbo',
  18406. // temperature: 0,
  18407. // max_tokens: 4096,
  18408. // top_p: 1,
  18409. // frequency_penalty: 0,
  18410. // presence_penalty: 0,
  18411. // messages: [{
  18412. // content: messages,
  18413. // role: 'user'
  18414. // }],
  18415. // uid: _uuid,
  18416. // mind_map_question: "",
  18417. // })
  18418. let params = {
  18419. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18420. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18421. session_name: _uuid,
  18422. userId: _this.userid,
  18423. uid: _uuid,
  18424. file_ids: fileid.length ? [...fileid] : '',
  18425. }
  18426. // let params = JSON.stringify({
  18427. // message: {
  18428. // anthropic_version: "bedrock-2023-05-31",
  18429. // max_tokens: 4096,
  18430. // temperature: 0,
  18431. // top_p: 1,
  18432. // messages: [{
  18433. // "role": "user",
  18434. // "content": messages
  18435. // }] ,
  18436. // },
  18437. // uid: _uuid,
  18438. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18439. // });
  18440. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18441. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18442. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18443. console.log(response);
  18444. // let data = response.data.FunctionResponse
  18445. // if (data.choices && data.choices.length && data.choices[0].message) {
  18446. // console.log(data.choices[0].message.content);
  18447. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18448. // _this.$forceUpdate()
  18449. // }
  18450. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18451. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18452. } else {
  18453. _this.$message.warning(response.data.FunctionResponse.result);
  18454. }
  18455. }).catch(function (error) {
  18456. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  18457. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  18458. console.log(error);
  18459. });
  18460. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  18461. },
  18462. aiDetail5getAiContent(_uid, loading, _tindex2) {
  18463. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18464. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18465. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18466. let _allText = "";
  18467. let _mdText = "";
  18468. let _iindex = 0
  18469. _source.onmessage = _e => {
  18470. let _eData = JSON.parse(_e.data).content;
  18471. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18472. //对话已经完成
  18473. _mdText = _mdText.replace("_", "");
  18474. _source.close();
  18475. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18476. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18477. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  18478. return;
  18479. } else {
  18480. _iindex++
  18481. //对话还在继续
  18482. let _text = "";
  18483. _text = _eData.replaceAll("'", "");
  18484. if (_allText == "") {
  18485. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18486. } else {
  18487. _allText += _text;
  18488. }
  18489. _mdText = _allText + "_";
  18490. _mdText = _mdText.replace(/\\n/g, "\n");
  18491. _mdText = _mdText.replace(/\\/g, "");
  18492. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18493. //转化返回的回复流数据
  18494. if(_iindex == 10){
  18495. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18496. _iindex = 0
  18497. }
  18498. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  18499. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18500. }
  18501. // 处理流数据
  18502. }
  18503. // this.$forceUpdate();
  18504. };
  18505. },
  18506. async aiDetail52(msg, index) {
  18507. let _this = this
  18508. const _tindex = 'task-' + index
  18509. const _tindex2 = index
  18510. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18511. if (_this.infoData.length) {
  18512. for (var i = 0; i < _this.infoData.length; i++) {
  18513. if(_this.infoData[i].fileid){
  18514. fileid.push(_this.infoData[i].fileid)
  18515. }else {
  18516. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18517. if(_fileid){
  18518. _this.infoData[i].fileid = _fileid
  18519. _this.$forceUpdate();
  18520. fileid.push(_fileid)
  18521. }
  18522. }
  18523. }
  18524. }
  18525. let url = []
  18526. if (this.infoData.length) {
  18527. for (var i = 0; i < this.infoData.length; i++) {
  18528. url.push(this.infoData[i].url)
  18529. }
  18530. }
  18531. let messages = `NOTICE
  18532. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  18533. 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.
  18534. #Context
  18535. ## 要求
  18536. ${msg}
  18537. ## 补充描述
  18538. 课程简要描述:${_this.courseText}
  18539. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18540. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  18541. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18542. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18543. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18544. `
  18545. // ## 补充参考资料
  18546. // - 补充资料:${url.join(",")}
  18547. // - 补充描述:${this.courseText2}
  18548. _this.taskDetailLoading5.push(_tindex)
  18549. _this.ttaskDetailLoading5.push(_tindex)
  18550. let _uuid = uuidv4();
  18551. // let params = JSON.stringify({
  18552. // // "model": "Chat",
  18553. // model: 'gpt-3.5-turbo',
  18554. // temperature: 0,
  18555. // max_tokens: 4096,
  18556. // top_p: 1,
  18557. // frequency_penalty: 0,
  18558. // presence_penalty: 0,
  18559. // messages: [{
  18560. // content: messages,
  18561. // role: 'user'
  18562. // }],
  18563. // uid: _uuid,
  18564. // mind_map_question: "",
  18565. // })
  18566. let params = {
  18567. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18568. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18569. session_name: _uuid,
  18570. userId: _this.userid,
  18571. uid: _uuid,
  18572. file_ids: fileid.length ? [...fileid] : '',
  18573. }
  18574. // let params = JSON.stringify({
  18575. // message: {
  18576. // anthropic_version: "bedrock-2023-05-31",
  18577. // max_tokens: 4096,
  18578. // temperature: 0,
  18579. // top_p: 1,
  18580. // messages: [{
  18581. // "role": "user",
  18582. // "content": messages
  18583. // }] ,
  18584. // },
  18585. // uid: _uuid,
  18586. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18587. // });
  18588. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18589. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18590. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18591. console.log(response);
  18592. // let data = response.data.FunctionResponse
  18593. // if (data.choices && data.choices.length && data.choices[0].message) {
  18594. // console.log(data.choices[0].message.content);
  18595. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18596. // _this.$forceUpdate()
  18597. // }
  18598. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18599. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18600. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  18601. } else {
  18602. _this.$message.warning(response.data.FunctionResponse.result);
  18603. }
  18604. }).catch(function (error) {
  18605. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  18606. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  18607. console.log(error);
  18608. });
  18609. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  18610. },
  18611. aiDetail52getAiContent(_uid, loading, _tindex2) {
  18612. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18613. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18614. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18615. let _allText = "";
  18616. let _mdText = "";
  18617. this.allTextArray[_tindex2] = ""
  18618. let _iindex = 0
  18619. _source.onmessage = async (_e) => {
  18620. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  18621. let _eData = JSON.parse(_e.data).content;
  18622. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18623. //对话已经完成
  18624. _mdText = _mdText.replace("_", "");
  18625. _source.close();
  18626. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18627. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18628. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  18629. return;
  18630. } else {
  18631. _iindex++
  18632. //对话还在继续
  18633. let _text = "";
  18634. _text = _eData.replaceAll("'", "");
  18635. if (_allText == "") {
  18636. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18637. } else {
  18638. _allText += _text;
  18639. }
  18640. _mdText = _allText + "_";
  18641. _mdText = _mdText.replace(/\\n/g, "\n");
  18642. _mdText = _mdText.replace(/\\/g, "");
  18643. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18644. //转化返回的回复流数据
  18645. if(_iindex == 10){
  18646. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  18647. _iindex = 0
  18648. }
  18649. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  18650. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18651. }
  18652. // 处理流数据
  18653. }
  18654. };
  18655. },
  18656. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  18657. let _mdText = "";
  18658. let _eData = JSON.parse(_e.data).content;
  18659. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18660. //对话已经完成
  18661. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "");
  18662. _source.close();
  18663. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18664. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  18665. return;
  18666. } else {
  18667. //对话还在继续
  18668. let _text = "";
  18669. _text = _eData.replaceAll("'", "");
  18670. if (this.allTextArray[_tindex2] == "") {
  18671. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18672. } else {
  18673. this.allTextArray[_tindex2] += _text;
  18674. }
  18675. _mdText = this.allTextArray[_tindex2] + "_";
  18676. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  18677. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  18678. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  18679. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  18680. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  18681. // 处理流数据
  18682. }
  18683. },
  18684. async aiCpote(msg, callback) {
  18685. let _this = this
  18686. let _index = _this.aitype.replace("aiC","c")
  18687. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18688. if (_this.infoData.length) {
  18689. for (var i = 0; i < _this.infoData.length; i++) {
  18690. if(_this.infoData[i].fileid){
  18691. fileid.push(_this.infoData[i].fileid)
  18692. }else {
  18693. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18694. if(_fileid){
  18695. _this.infoData[i].fileid = _fileid
  18696. _this.$forceUpdate();
  18697. fileid.push(_fileid)
  18698. }
  18699. }
  18700. }
  18701. }
  18702. let sub = []
  18703. if (this.courseTypeId.length) {
  18704. for (var i = 0; i < this.courseTypeId.length; i++) {
  18705. let _sid = this.courseTypeId[i]
  18706. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18707. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18708. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18709. }
  18710. }
  18711. }
  18712. }
  18713. let mclass = []
  18714. if (this.courseTypeId.length) {
  18715. for (var i = 0; i < this.courseTypeId.length; i++) {
  18716. let _sid = this.courseTypeId[i]
  18717. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18718. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18719. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18720. }
  18721. }
  18722. }
  18723. }
  18724. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  18725. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  18726. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  18727. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  18728. let messages = `NOTICE
  18729. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  18730. 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.
  18731. ${msg}
  18732. ## 课程简介
  18733. 课程名字:${this.courseName}
  18734. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18735. ${sub.length ? '学科:' + sub.join(",") : ''}
  18736. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18737. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18738. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  18739. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  18740. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  18741. _this.cpoteLoading[_index] = true
  18742. _this.cpotetLoading[_index] = true
  18743. let _uuid = uuidv4();
  18744. // let params = JSON.stringify({
  18745. // // "model": "Chat",
  18746. // model: 'gpt-3.5-turbo',
  18747. // temperature: 0,
  18748. // max_tokens: 4096,
  18749. // top_p: 1,
  18750. // frequency_penalty: 0,
  18751. // presence_penalty: 0,
  18752. // messages: [{
  18753. // content: messages,
  18754. // role: 'user'
  18755. // }],
  18756. // uid: _uuid,
  18757. // mind_map_question: "",
  18758. // })
  18759. let params = {
  18760. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18761. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18762. session_name: _uuid,
  18763. userId: _this.userid,
  18764. uid: _uuid,
  18765. file_ids: fileid.length ? [...fileid] : '',
  18766. }
  18767. // let params = JSON.stringify({
  18768. // message: {
  18769. // anthropic_version: "bedrock-2023-05-31",
  18770. // max_tokens: 4096,
  18771. // temperature: 0,
  18772. // top_p: 1,
  18773. // messages: [{
  18774. // "role": "user",
  18775. // "content": messages
  18776. // }] ,
  18777. // },
  18778. // uid: _uuid,
  18779. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18780. // });
  18781. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18782. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18783. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18784. console.log(response);
  18785. // let data = response.data.FunctionResponse
  18786. // if (data.choices && data.choices.length && data.choices[0].message) {
  18787. // console.log(data.choices[0].message.content);
  18788. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18789. // _this.$forceUpdate()
  18790. // }
  18791. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18792. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18793. } else {
  18794. _this.$message.warning(response.data.FunctionResponse.result);
  18795. }
  18796. }).catch(function (error) {
  18797. _this.cpoteLoading[_index] = false
  18798. _this.cpotetLoading[_index] = false
  18799. callback ? callback() : ''
  18800. console.log(error);
  18801. });
  18802. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  18803. },
  18804. aiCpotegetAiContent(_uid, loading, callback) {
  18805. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18806. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18807. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18808. let _allText = "";
  18809. let _mdText = "";
  18810. let _iindex = 0
  18811. _source.onmessage = _e => {
  18812. let _eData = JSON.parse(_e.data).content;
  18813. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18814. //对话已经完成
  18815. _mdText = _mdText.replace("_", "");
  18816. _source.close();
  18817. this.cpote[loading] = _mdText;
  18818. this.cpoteLoading[loading] = false
  18819. this.cpotetLoading[loading] = false
  18820. callback ? callback() : ''
  18821. return;
  18822. } else {
  18823. _iindex++
  18824. //对话还在继续
  18825. let _text = "";
  18826. _text = _eData.replaceAll("'", "");
  18827. if (_allText == "") {
  18828. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18829. } else {
  18830. _allText += _text;
  18831. }
  18832. _mdText = _allText + "_";
  18833. _mdText = _mdText.replace(/\\n/g, "\n");
  18834. _mdText = _mdText.replace(/\\/g, "");
  18835. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18836. //转化返回的回复流数据
  18837. if(_iindex == 10){
  18838. this.cpote[loading] = _mdText;
  18839. _iindex = 0
  18840. }
  18841. this.cpoteLoading[loading] = false
  18842. // 处理流数据
  18843. }
  18844. // this.$forceUpdate();
  18845. };
  18846. },
  18847. async aiteacherTextDetail(msg) {
  18848. let _this = this
  18849. let fileid = []
  18850. if (_this.teacherInfoData.length) {
  18851. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  18852. if(_this.teacherInfoData[i].fileid){
  18853. fileid.push(_this.teacherInfoData[i].fileid)
  18854. }else {
  18855. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  18856. if(_fileid){
  18857. _this.teacherInfoData[i].fileid = _fileid
  18858. _this.$forceUpdate();
  18859. fileid.push(_fileid)
  18860. }
  18861. }
  18862. }
  18863. }
  18864. _this.teacherTextLoading = true
  18865. _this.tteacherTextLoading = true
  18866. let sub = []
  18867. if (_this.courseTypeId.length) {
  18868. for (var i = 0; i < _this.courseTypeId.length; i++) {
  18869. let _sid = _this.courseTypeId[i]
  18870. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18871. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18872. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18873. }
  18874. }
  18875. }
  18876. }
  18877. let mclass = []
  18878. if (_this.courseTypeId.length) {
  18879. for (var i = 0; i < _this.courseTypeId.length; i++) {
  18880. let _sid = _this.courseTypeId[i]
  18881. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18882. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18883. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18884. }
  18885. }
  18886. }
  18887. }
  18888. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  18889. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  18890. let messages = `NOTICE
  18891. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  18892. 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.
  18893. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18894. Instruction: Based on the context, follow "Format example", write content.
  18895. #Context
  18896. ## 参考资料
  18897. 课程名字:${this.courseName}
  18898. ${sub.length ? '学科:' + sub.join(",") : ''}
  18899. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18900. ${this.teacherCourseText && this.aiCallback == 2 ? '参考内容:'+this.teacherCourseText : ''}
  18901. ## 要求
  18902. ${msg}
  18903. ${this.teacherCourseText && this.aiCallback == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  18904. let _uuid = uuidv4();
  18905. // let params = JSON.stringify({
  18906. // // "model": "Chat",
  18907. // model: 'gpt-3.5-turbo',
  18908. // temperature: 0,
  18909. // max_tokens: 4096,
  18910. // top_p: 1,
  18911. // frequency_penalty: 0,
  18912. // presence_penalty: 0,
  18913. // messages: [{
  18914. // content: messages,
  18915. // role: 'user'
  18916. // }],
  18917. // uid: _uuid,
  18918. // mind_map_question: "",
  18919. // })
  18920. let params = {
  18921. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18922. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18923. session_name: _uuid,
  18924. userId: _this.userid,
  18925. uid: _uuid,
  18926. file_ids: fileid.length ? [...fileid] : '',
  18927. }
  18928. // let params = JSON.stringify({
  18929. // message: {
  18930. // anthropic_version: "bedrock-2023-05-31",
  18931. // max_tokens: 4096,
  18932. // temperature: 0,
  18933. // top_p: 1,
  18934. // messages: [{
  18935. // "role": "user",
  18936. // "content": messages
  18937. // }] ,
  18938. // },
  18939. // uid: _uuid,
  18940. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18941. // });
  18942. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18943. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18944. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18945. console.log(response);
  18946. // let data = response.data.FunctionResponse
  18947. // if (data.choices && data.choices.length && data.choices[0].message) {
  18948. // _this.courseText = data.choices[0].message.content
  18949. // }
  18950. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18951. } else {
  18952. _this.$message.warning(response.data.FunctionResponse.result);
  18953. }
  18954. }).catch(function (error) {
  18955. _this.teacherTextLoading = false
  18956. _this.tteacherTextLoading = false
  18957. console.log(error);
  18958. });
  18959. await _this.aiteacherTextDetailgetAiContent(_uuid)
  18960. },
  18961. aiteacherTextDetailgetAiContent(_uid) {
  18962. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18963. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18964. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18965. let _allText = "";
  18966. let _mdText = "";
  18967. let _iindex = 0
  18968. _source.onmessage = _e => {
  18969. let _eData = JSON.parse(_e.data).content;
  18970. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18971. //对话已经完成
  18972. _mdText = _mdText.replace("_", "");
  18973. _source.close();
  18974. this.teacherCourseText = _mdText;
  18975. this.teacherTextLoading = false
  18976. this.tteacherTextLoading = false
  18977. this.teacherCourseTextB = false
  18978. return;
  18979. } else {
  18980. _iindex++
  18981. //对话还在继续
  18982. let _text = "";
  18983. _text = _eData.replaceAll("'", "");
  18984. if (_allText == "") {
  18985. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18986. } else {
  18987. _allText += _text;
  18988. }
  18989. _mdText = _allText + "_";
  18990. _mdText = _mdText.replace(/\\n/g, "\n");
  18991. _mdText = _mdText.replace(/\\/g, "");
  18992. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18993. //转化返回的回复流数据
  18994. if(_iindex == 10){
  18995. this.teacherCourseText = _mdText;
  18996. _iindex = 0
  18997. }
  18998. if(this.teacherTextLoading){
  18999. this.teacherTextLoading = false
  19000. }
  19001. // 处理流数据
  19002. }
  19003. // this.$forceUpdate();
  19004. };
  19005. },
  19006. async aitargetTextDetail(msg) {
  19007. let _this = this
  19008. let fileid = []
  19009. if (_this.teacherInfoData.length) {
  19010. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  19011. if(_this.teacherInfoData[i].fileid){
  19012. fileid.push(_this.teacherInfoData[i].fileid)
  19013. }else {
  19014. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  19015. if(_fileid){
  19016. _this.teacherInfoData[i].fileid = _fileid
  19017. _this.$forceUpdate();
  19018. fileid.push(_fileid)
  19019. }
  19020. }
  19021. }
  19022. }
  19023. _this.targetTextLoading = true
  19024. _this.ttargetTextLoading = true
  19025. let sub = []
  19026. if (_this.courseTypeId.length) {
  19027. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19028. let _sid = _this.courseTypeId[i]
  19029. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19030. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19031. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19032. }
  19033. }
  19034. }
  19035. }
  19036. let mclass = []
  19037. if (_this.courseTypeId.length) {
  19038. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19039. let _sid = _this.courseTypeId[i]
  19040. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19041. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19042. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19043. }
  19044. }
  19045. }
  19046. }
  19047. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19048. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19049. let messages = `NOTICE
  19050. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19051. 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.
  19052. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19053. Instruction: Based on the context, follow "Format example", write content.
  19054. #Context
  19055. ## 参考资料
  19056. 课程名字:${this.courseName}
  19057. ${sub.length ? '学科:' + sub.join(",") : ''}
  19058. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19059. ${this.targetCourseText && this.aiCallback == 2 ? '参考内容:'+this.targetCourseText : ''}
  19060. ## 要求
  19061. ${msg}
  19062. ${this.targetCourseText && this.aiCallback == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19063. let _uuid = uuidv4();
  19064. // let params = JSON.stringify({
  19065. // // "model": "Chat",
  19066. // model: 'gpt-3.5-turbo',
  19067. // temperature: 0,
  19068. // max_tokens: 4096,
  19069. // top_p: 1,
  19070. // frequency_penalty: 0,
  19071. // presence_penalty: 0,
  19072. // messages: [{
  19073. // content: messages,
  19074. // role: 'user'
  19075. // }],
  19076. // uid: _uuid,
  19077. // mind_map_question: "",
  19078. // })
  19079. let params = {
  19080. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19081. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19082. session_name: _uuid,
  19083. userId: _this.userid,
  19084. uid: _uuid,
  19085. file_ids: fileid.length ? [...fileid] : '',
  19086. }
  19087. // let params = JSON.stringify({
  19088. // message: {
  19089. // anthropic_version: "bedrock-2023-05-31",
  19090. // max_tokens: 4096,
  19091. // temperature: 0,
  19092. // top_p: 1,
  19093. // messages: [{
  19094. // "role": "user",
  19095. // "content": messages
  19096. // }] ,
  19097. // },
  19098. // uid: _uuid,
  19099. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19100. // });
  19101. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19102. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19103. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19104. console.log(response);
  19105. // let data = response.data.FunctionResponse
  19106. // if (data.choices && data.choices.length && data.choices[0].message) {
  19107. // _this.courseText = data.choices[0].message.content
  19108. // }
  19109. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19110. } else {
  19111. _this.$message.warning(response.data.FunctionResponse.result);
  19112. }
  19113. }).catch(function (error) {
  19114. _this.targetTextLoading = false
  19115. _this.ttargetTextLoading = false
  19116. console.log(error);
  19117. });
  19118. await _this.aitargetTextDetailgetAiContent(_uuid)
  19119. },
  19120. aitargetTextDetailgetAiContent(_uid) {
  19121. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19122. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19123. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19124. let _allText = "";
  19125. let _mdText = "";
  19126. let _iindex = 0
  19127. _source.onmessage = _e => {
  19128. let _eData = JSON.parse(_e.data).content;
  19129. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19130. //对话已经完成
  19131. _mdText = _mdText.replace("_", "");
  19132. _source.close();
  19133. this.targetCourseText = _mdText;
  19134. this.targetTextLoading = false
  19135. this.ttargetTextLoading = false
  19136. this.targetCourseTextB = false
  19137. return;
  19138. } else {
  19139. _iindex++
  19140. //对话还在继续
  19141. let _text = "";
  19142. _text = _eData.replaceAll("'", "");
  19143. if (_allText == "") {
  19144. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19145. } else {
  19146. _allText += _text;
  19147. }
  19148. _mdText = _allText + "_";
  19149. _mdText = _mdText.replace(/\\n/g, "\n");
  19150. _mdText = _mdText.replace(/\\/g, "");
  19151. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19152. //转化返回的回复流数据
  19153. if(_iindex == 10){
  19154. this.targetCourseText = _mdText;
  19155. _iindex = 0
  19156. }
  19157. if(this.targetTextLoading){
  19158. this.targetTextLoading = false
  19159. }
  19160. // 处理流数据
  19161. }
  19162. // this.$forceUpdate();
  19163. };
  19164. },
  19165. async aitargetTextDetail2(msg) {
  19166. let _this = this
  19167. let fileid = ['file-okF1PSRw4VYjRl81SykkxWSo'] // file-okF1PSRw4VYjRl81SykkxWSo 科学目标fileid
  19168. _this.targetTextLoading2 = true
  19169. _this.ttargetTextLoading2 = true
  19170. let sub = []
  19171. if (_this.courseTypeId.length) {
  19172. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19173. let _sid = _this.courseTypeId[i]
  19174. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19175. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19176. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19177. }
  19178. }
  19179. }
  19180. }
  19181. let mclass = []
  19182. if (_this.courseTypeId.length) {
  19183. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19184. let _sid = _this.courseTypeId[i]
  19185. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19186. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19187. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19188. }
  19189. }
  19190. }
  19191. }
  19192. let messages = `NOTICE
  19193. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19194. 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.
  19195. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19196. Instruction: Based on the context, follow "Format example", write content.
  19197. #Context
  19198. ## 参考资料
  19199. 课程标题:${this.courseName}
  19200. ${this.targetCourseText && this.aiCallback == 2 ? '参考内容:'+this.targetCourseText : ''}
  19201. ## 要求
  19202. ${msg}
  19203. ${this.targetCourseText && this.aiCallback == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19204. let _uuid = uuidv4();
  19205. // let params = JSON.stringify({
  19206. // // "model": "Chat",
  19207. // model: 'gpt-3.5-turbo',
  19208. // temperature: 0,
  19209. // max_tokens: 4096,
  19210. // top_p: 1,
  19211. // frequency_penalty: 0,
  19212. // presence_penalty: 0,
  19213. // messages: [{
  19214. // content: messages,
  19215. // role: 'user'
  19216. // }],
  19217. // uid: _uuid,
  19218. // mind_map_question: "",
  19219. // })
  19220. let params = {
  19221. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19222. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19223. session_name: _uuid,
  19224. userId: _this.userid,
  19225. uid: _uuid,
  19226. file_ids: fileid.length ? [...fileid] : '',
  19227. }
  19228. // let params = JSON.stringify({
  19229. // message: {
  19230. // anthropic_version: "bedrock-2023-05-31",
  19231. // max_tokens: 4096,
  19232. // temperature: 0,
  19233. // top_p: 1,
  19234. // messages: [{
  19235. // "role": "user",
  19236. // "content": messages
  19237. // }] ,
  19238. // },
  19239. // uid: _uuid,
  19240. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19241. // });
  19242. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19243. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19244. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19245. console.log(response);
  19246. // let data = response.data.FunctionResponse
  19247. // if (data.choices && data.choices.length && data.choices[0].message) {
  19248. // _this.courseText = data.choices[0].message.content
  19249. // }
  19250. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19251. } else {
  19252. _this.$message.warning(response.data.FunctionResponse.result);
  19253. }
  19254. }).catch(function (error) {
  19255. _this.targetTextLoading2 = false
  19256. _this.ttargetTextLoading2 = false
  19257. console.log(error);
  19258. });
  19259. await _this.aitargetTextDetail2getAiContent(_uuid)
  19260. },
  19261. aitargetTextDetail2getAiContent(_uid) {
  19262. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19263. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19264. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19265. let _allText = "";
  19266. let _mdText = "";
  19267. let _iindex = 0
  19268. _source.onmessage = _e => {
  19269. let _eData = JSON.parse(_e.data).content;
  19270. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19271. //对话已经完成
  19272. _mdText = _mdText.replace("_", "");
  19273. _source.close();
  19274. this.targetCourseText2 = _mdText;
  19275. this.targetTextLoading2 = false
  19276. this.ttargetTextLoading2 = false
  19277. this.targetCourseText2B = false
  19278. return;
  19279. } else {
  19280. _iindex++
  19281. //对话还在继续
  19282. let _text = "";
  19283. _text = _eData.replaceAll("'", "");
  19284. if (_allText == "") {
  19285. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19286. } else {
  19287. _allText += _text;
  19288. }
  19289. _mdText = _allText + "_";
  19290. _mdText = _mdText.replace(/\\n/g, "\n");
  19291. _mdText = _mdText.replace(/\\/g, "");
  19292. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19293. //转化返回的回复流数据
  19294. if(_iindex == 10){
  19295. this.targetCourseText2 = _mdText;
  19296. _iindex = 0
  19297. }
  19298. if(this.targetTextLoading2){
  19299. this.targetTextLoading2 = false
  19300. }
  19301. // 处理流数据
  19302. }
  19303. // this.$forceUpdate();
  19304. };
  19305. },
  19306. againEva(msg, i, k) {
  19307. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  19308. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  19309. return;
  19310. }
  19311. if (this.ruleLoading[i]) {
  19312. this.ruleLoading[i][k] = true
  19313. } else {
  19314. this.ruleLoading[i] = []
  19315. this.ruleLoading[i][k] = true
  19316. }
  19317. let message = `NOTICE
  19318. Role: 你是一个专业的项目式学习导师,你要根据<评价维度>和<维度描述>制定具体的评价细则。
  19319. 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.
  19320. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19321. Instruction: Based on the context, follow "Format example", write content.
  19322. #Context
  19323. ##要求
  19324. ${msg}
  19325. ##制定标准资料
  19326. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value}
  19327. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  19328. # Format example
  19329. == 0 星,作业内容与作业要求无关;
  19330. 1 星,没有识别问题和需求;
  19331. 2 星,问题或需求没有被清晰理解或准确识别;
  19332. 3 星,问题或需求的一部分被识别;
  19333. 4 星,问题或需求的大部分被识别;
  19334. 5 星,问题或需求都被识别。 ==
  19335. `
  19336. let params = {
  19337. // "model": "Chat",
  19338. model: "gpt-4o",
  19339. temperature: 0,
  19340. max_tokens: 4096,
  19341. top_p: 1,
  19342. frequency_penalty: 0,
  19343. presence_penalty: 0,
  19344. messages: [
  19345. {
  19346. content: message.replaceAll("\n", " ").replaceAll("*", ""),
  19347. role: "user"
  19348. }
  19349. ],
  19350. stream: false,
  19351. uid: this.userid,
  19352. mind_map_question: ""
  19353. };
  19354. this.ajax
  19355. .post("https://gpt4.cocorobo.cn/chat", params)
  19356. .then(response => {
  19357. let data = response.data.FunctionResponse;
  19358. console.log("data", data);
  19359. if (data.choices && data.choices.length && data.choices[0].message) {
  19360. let content = data.choices[0].message.content;
  19361. var regex = new RegExp('==([^=]+)==');
  19362. let match = content.match(regex);
  19363. if (match) {
  19364. content = match[1].trim().replaceAll(' ', '');
  19365. // 获取匹配到的内容并去除两端空格
  19366. console.log('contentInsideDoubleEquals', content);
  19367. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  19368. console.log("未有星级。");
  19369. this.againEva(msg, i, k)
  19370. return
  19371. }
  19372. //  return
  19373. } else {
  19374. console.log("未找到匹配的内容。");
  19375. this.againEva(msg, i, k)
  19376. return
  19377. }
  19378. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  19379. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  19380. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  19381. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  19382. this.$forceUpdate();
  19383. this.ruleLoading[i][k] = false
  19384. }else{
  19385. this.ruleLoading[i][k] = false
  19386. }
  19387. })
  19388. .catch(error => {
  19389. console.log(error);
  19390. this.ruleLoading[i][k] = false
  19391. });
  19392. },
  19393. async aiSearchFile(messages, callback) {
  19394. let _this = this
  19395. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19396. console.log('fileid=========',fileid)
  19397. // let params = JSON.stringify({
  19398. // // "model": "Chat",
  19399. // model: 'gpt-3.5-turbo',
  19400. // temperature: 0,
  19401. // max_tokens: 4096,
  19402. // top_p: 1,
  19403. // frequency_penalty: 0,
  19404. // presence_penalty: 0,
  19405. // messages: [{
  19406. // content: messages,
  19407. // role: 'user'
  19408. // }],
  19409. // stream: false,
  19410. // uid: this.userid,
  19411. // mind_map_question: "",
  19412. // })
  19413. // // let params = JSON.stringify({
  19414. // // message: {
  19415. // // anthropic_version: "bedrock-2023-05-31",
  19416. // // max_tokens: 4096,
  19417. // // temperature: 0,
  19418. // // top_p: 1,
  19419. // // messages: [{
  19420. // // content: messages,
  19421. // // role: 'user'
  19422. // // }], //
  19423. // // },
  19424. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19425. // // });
  19426. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19427. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19428. // console.log(response);
  19429. // let data = response.data.FunctionResponse
  19430. // if (data.choices && data.choices.length && data.choices[0].message) {
  19431. // console.log(data.choices[0].message.content);
  19432. // let dArray = JSON.parse(data.choices[0].message.content)
  19433. // _this.dArray = dArray
  19434. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19435. // for (var i = 0; i < dArray.length; i++) {
  19436. // let _task = dArray[i]
  19437. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19438. // task: _task.task,
  19439. // taskDetail: "",
  19440. // taskDetail2: _task.detail,
  19441. // taskDetail3: "",
  19442. // chapterData: [],
  19443. // toolText: "",
  19444. // toolChoose: [
  19445. // {
  19446. // tool: [],
  19447. // toolDetail: "",
  19448. // toolType: 0,
  19449. // askCount: 1,
  19450. // askTitle: "",
  19451. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19452. // },
  19453. // ],
  19454. // isShowTools: false,
  19455. // askCount: 1,
  19456. // isFold: 0,
  19457. // askTitle: "",
  19458. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19459. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19460. // homeworkList: [],
  19461. // })
  19462. // }
  19463. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19464. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19465. // _this.$forceUpdate();
  19466. // }
  19467. // // if (data.result) {
  19468. // // console.log(data.result);
  19469. // // let dArray = JSON.parse(data.result)
  19470. // // _this.dArray = dArray
  19471. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  19472. // // for (var i = 0; i < dArray.length; i++) {
  19473. // // let _task = dArray[i]
  19474. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19475. // // task: _task.task,
  19476. // // taskDetail: "",
  19477. // // taskDetail2: _task.detail,
  19478. // // taskDetail3: "",
  19479. // // chapterData: [],
  19480. // // toolText: "",
  19481. // // toolChoose: [
  19482. // // {
  19483. // // tool: [],
  19484. // // toolDetail: "",
  19485. // // toolType: 0,
  19486. // // askCount: 1,
  19487. // // askTitle: "",
  19488. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19489. // // },
  19490. // // ],
  19491. // // isShowTools: false,
  19492. // // askCount: 1,
  19493. // // isFold: 1,
  19494. // // askTitle: "",
  19495. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19496. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  19497. // // homeworkList: [],
  19498. // // })
  19499. // // }
  19500. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19501. // // _this.$forceUpdate();
  19502. // // }
  19503. // callback ? callback() : ''
  19504. // }).catch(function (error) {
  19505. // _this.loading = false
  19506. // console.log(error);
  19507. // });
  19508. let parm = {
  19509. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19510. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19511. session_name: uuidv4(),
  19512. userId: this.userid,
  19513. file_ids: fileid.length ? [...fileid] : '',
  19514. }
  19515. this.ajax
  19516. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19517. .then((response) => {
  19518. console.log(response);
  19519. let data = response.data.FunctionResponse
  19520. if (data.message) {
  19521. console.log(data.message);
  19522. let dArray = []
  19523. try {
  19524. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19525. } catch (error) {
  19526. // callback ? callback() : ''
  19527. console.log("error_________________" + error);
  19528. try {
  19529. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19530. let match = data.message.match(regex);
  19531. dArray = JSON.parse(match[0]);
  19532. } catch (error) {
  19533. callback ? callback() : ''
  19534. _this.$message.error("生成的json格式错误,请重新点击获取")
  19535. console.log("error_________________" + error);
  19536. }
  19537. }
  19538. for(let i = 0; i < dArray.length; i++){
  19539. let content = dArray[i].content
  19540. let name = '参考资料'+(i+1)
  19541. let md = new MarkdownIt();
  19542. let _html = content ? md.render(content) : ''
  19543. setTimeout(()=>{
  19544. if(i == (dArray.length - 1)){
  19545. _this.generate2(name, _html, i, callback)
  19546. }else {
  19547. _this.generate2(name, _html, i)
  19548. }
  19549. }, 500 * i)
  19550. }
  19551. _this.$forceUpdate();
  19552. }
  19553. })
  19554. .catch((error) => {
  19555. callback ? callback() : ''
  19556. console.log(error);
  19557. });
  19558. },
  19559. createFileid(url) {
  19560. let _this = this
  19561. return new Promise((resolve, reject) => {
  19562. try {
  19563. _this.ajax
  19564. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  19565. url: url,
  19566. })
  19567. .then((res) => {
  19568. let _data = res.data.FunctionResponse;
  19569. if (_data.result && _data.result.id) {
  19570. resolve(_data.result.id)
  19571. }
  19572. }).catch(function (error) {
  19573. resolve('')
  19574. });
  19575. }catch (e){
  19576. resolve()
  19577. }
  19578. });
  19579. }
  19580. },
  19581. beforeDestroy() {
  19582. clearTimeout(this.timer);
  19583. this.timer = null;
  19584. clearInterval(this.timer2);
  19585. this.timer2 = null;
  19586. clearInterval(this.pasteTimer);
  19587. this.pasteTimer = null;
  19588. },
  19589. beforeRouteLeave(to, from, next) {
  19590. clearTimeout(this.timer);
  19591. this.timer = null;
  19592. clearInterval(this.timer2);
  19593. this.timer2 = null;
  19594. clearInterval(this.pasteTimer);
  19595. this.pasteTimer = null;
  19596. next();
  19597. },
  19598. created() {
  19599. this.getStudent();
  19600. this.getTeacher();
  19601. this.getClass();
  19602. this.selectGrage();
  19603. this.getTemplate();
  19604. this.getTipsTemplate();
  19605. // this.selectType();
  19606. this.selectEva();
  19607. if(this.istemplate == 1){
  19608. this.isOutline = true
  19609. this.isOutline2 = true
  19610. this.courseTextBool = true
  19611. }
  19612. this.loading = false;
  19613. this.timer2 = setInterval(() => {
  19614. this.selectEva();
  19615. }, 5000);
  19616. this.pasteTimer = setInterval(() => {
  19617. this.getPaste();
  19618. }, 1000);
  19619. setTimeout(() => {
  19620. // this.selectAllType();
  19621. this.selectCourseDetail();
  19622. }, 500);
  19623. let _this = this;
  19624. window.pasteStage = function (json) {
  19625. _this.pasteStage(json);
  19626. };
  19627. window.pasteTask = function (json) {
  19628. _this.pasteTask(json);
  19629. };
  19630. },
  19631. };
  19632. </script>
  19633. <style scoped>
  19634. @media screen and (max-width: 1280px) {
  19635. .mbCss {
  19636. flex-direction: column !important;
  19637. }
  19638. .pjCss {
  19639. width: 100% !important;
  19640. }
  19641. .evaCss {
  19642. width: 100% !important;
  19643. margin-top: 10px;
  19644. }
  19645. }
  19646. .el-table>>>.even_row {
  19647. background-color: #f1f1f1 !important;
  19648. }
  19649. .dialog_diy>>>.el-dialog__header {
  19650. background: #3c3c3c !important;
  19651. padding: 15px 20px;
  19652. }
  19653. .dialog_diy>>>.el-dialog__title {
  19654. color: #fff;
  19655. }
  19656. .dialog_diy>>>.el-dialog__headerbtn {
  19657. top: 19px;
  19658. }
  19659. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  19660. color: #fff;
  19661. }
  19662. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  19663. color: #fff;
  19664. }
  19665. .dialog_diy>>>.el-dialog__body,
  19666. .dialog_diy>>>.el-dialog__footer {
  19667. background: #fafafa;
  19668. }
  19669. .dialog_diy3>>>.el-dialog__body,
  19670. .dialog_diy3>>>.el-dialog__footer {
  19671. background: #eee !important;
  19672. }
  19673. .dialog_diy3>>>.el-dialog__body {
  19674. padding: 20px 20px;
  19675. }
  19676. .dialog_diyStage>>>.el-dialog__body {
  19677. padding: 10px;
  19678. }
  19679. .source_diy>>>.el-dialog {
  19680. height: 100% !important;
  19681. margin: 0 auto !important;
  19682. }
  19683. .source_diy>>>.el-dialog__body {
  19684. height: calc(100% - 185px);
  19685. overflow: auto;
  19686. background: #e6eaf0;
  19687. }
  19688. .source_diy>>>.el-dialog__footer {
  19689. background: #e6eaf0 !important;
  19690. }
  19691. .left {
  19692. border-right: 1px solid rgb(60, 94, 143);
  19693. display: flex;
  19694. flex-direction: column;
  19695. align-items: center;
  19696. min-height: 600px;
  19697. width: 385px;
  19698. height: 80%;
  19699. }
  19700. .tips {
  19701. color: rgb(128, 128, 128);
  19702. font-size: 12px;
  19703. width: 270px;
  19704. margin: 40px;
  19705. }
  19706. .pb_content {
  19707. height: 100% !important;
  19708. /* margin: 0 20px 0 20px; */
  19709. }
  19710. .pb_content_body {
  19711. width: 100% !important;
  19712. height: 100%;
  19713. display: flex;
  19714. }
  19715. .info_solid {
  19716. width: 270px;
  19717. height: 30px;
  19718. border-left: 1px solid #bdbdbd;
  19719. margin: 10px 0px 10px 30px;
  19720. }
  19721. .info_steps {
  19722. width: 270px;
  19723. font-size: 0.875rem;
  19724. display: flex;
  19725. align-items: center;
  19726. }
  19727. .info_steps span:nth-child(1) {
  19728. width: 30px;
  19729. height: 30px;
  19730. background: rgba(0, 0, 0, 0.38);
  19731. display: block;
  19732. color: #fff;
  19733. border-radius: 40px;
  19734. text-align: center;
  19735. line-height: 30px;
  19736. }
  19737. .steps_active {
  19738. background: #3d67bc !important;
  19739. }
  19740. .info_steps span:nth-child(2) {
  19741. margin-left: 5px;
  19742. }
  19743. .right {
  19744. height: 100%;
  19745. width: 100%;
  19746. display: flex;
  19747. overflow: hidden;
  19748. flex-direction: column;
  19749. }
  19750. .leftBar{
  19751. width: 290px;
  19752. height: calc(100% - 50px);
  19753. overflow: auto;
  19754. border-radius: 5px;
  19755. margin: 25px auto;
  19756. box-sizing: border-box;
  19757. margin-right: 10px;
  19758. }
  19759. .basic_box {
  19760. margin: 0 auto;
  19761. position: relative;
  19762. padding: 0 20px 0 20px;
  19763. }
  19764. .basic_box_success {
  19765. width: 100%;
  19766. min-height: 455px;
  19767. padding: 50px 0;
  19768. position: relative;
  19769. text-align: center;
  19770. border-bottom: 1px solid #bfbfbf;
  19771. box-sizing: border-box;
  19772. display: flex;
  19773. align-items: center;
  19774. flex-direction: column;
  19775. justify-content: center;
  19776. }
  19777. .info_title {
  19778. font-size: 1.5em;
  19779. margin-right: 25px;
  19780. /* margin: 20px 30px 20px 30px; */
  19781. }
  19782. .bInfo_title {
  19783. text-align: left;
  19784. margin: 10px 0;
  19785. }
  19786. .small_title {
  19787. font-size: 14px;
  19788. line-height: 40px;
  19789. }
  19790. .chapter_beizhu {
  19791. font-size: 12px;
  19792. font-weight: bold;
  19793. float: right;
  19794. color: rgb(128, 128, 128);
  19795. margin-top: 5px;
  19796. }
  19797. .chapter_uploadBox1 {
  19798. text-align: left;
  19799. background-color: rgb(242, 242, 242);
  19800. width: 100%;
  19801. height: 67px;
  19802. padding: 0px 15px;
  19803. border-radius: 8px;
  19804. overflow: hidden;
  19805. font-size: 16px;
  19806. box-sizing: border-box;
  19807. position: relative;
  19808. }
  19809. .chapter_add {
  19810. width: 100%;
  19811. height: 32px;
  19812. margin-top: 15px;
  19813. cursor: pointer;
  19814. }
  19815. .chapter_add_l {
  19816. margin-left: 5px;
  19817. width: 30px;
  19818. height: 30px;
  19819. float: left;
  19820. border: 1px solid #aaa;
  19821. color: #aaa;
  19822. border-radius: 50%;
  19823. font-size: 25px;
  19824. text-align: center;
  19825. }
  19826. .chapter_add_r {
  19827. font-size: 18px;
  19828. height: 40px;
  19829. line-height: 30px;
  19830. text-indent: 10px;
  19831. color: #aaa;
  19832. }
  19833. .chapter_add_r span {
  19834. font-size: 12px;
  19835. color: rgb(204, 204, 204);
  19836. }
  19837. .chapter_add_input {
  19838. display: none;
  19839. }
  19840. .line {
  19841. width: 85%;
  19842. margin: 0 auto;
  19843. border-top: 1px solid #e5e5e5;
  19844. margin-top: 20px;
  19845. }
  19846. .info_btnBox {
  19847. width: calc(100%);
  19848. display: flex;
  19849. justify-content: center;
  19850. height: 80px;
  19851. align-items: center;
  19852. background: #fff;
  19853. margin: 0 auto;
  19854. border-top: 2px solid rgb(228, 232, 237);
  19855. box-sizing: border-box;
  19856. }
  19857. .info_btnBox2 {
  19858. width: calc(100%);
  19859. display: flex;
  19860. justify-content: center;
  19861. height: 20px;
  19862. align-items: center;
  19863. background: #fff;
  19864. margin: 0 auto;
  19865. border-top: 2px solid rgb(228, 232, 237);
  19866. box-sizing: border-box;
  19867. overflow: hidden;
  19868. cursor: pointer;
  19869. }
  19870. .info_btnBox3 {
  19871. width: calc(100%);
  19872. display: flex;
  19873. justify-content: flex-end;
  19874. padding: 0 20px;
  19875. height: 60px;
  19876. align-items: center;
  19877. background: unset;
  19878. margin: 0 auto;
  19879. /* border-top: 1px solid rgb(228, 232, 237); */
  19880. box-sizing: border-box;
  19881. overflow: hidden;
  19882. cursor: pointer;
  19883. background: #fff;
  19884. border-radius: 10px;
  19885. }
  19886. .info_btn+.info_btn {
  19887. margin-left: 15px;
  19888. }
  19889. .info_btn,
  19890. .teacherWord {
  19891. color: #fff;
  19892. background-color: #0f7eff;
  19893. padding: 8px 24px;
  19894. font-size: 0.9375rem;
  19895. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  19896. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  19897. min-width: 64px;
  19898. font-weight: 500;
  19899. border-radius: 4px;
  19900. box-sizing: border-box;
  19901. border: none;
  19902. cursor: pointer;
  19903. }
  19904. .teacherWord {
  19905. width: 105px !important;
  19906. text-align: center !important;
  19907. line-height: 36px !important;
  19908. padding: 0 !important;
  19909. font-size: 14px !important;
  19910. margin: 10px 0 !important;
  19911. }
  19912. .template_box {
  19913. display: flex;
  19914. flex-wrap: wrap;
  19915. }
  19916. .wordTeacher {
  19917. display: flex;
  19918. flex-direction: column;
  19919. width: 100px;
  19920. height: 100px;
  19921. text-align: center;
  19922. font-size: 13px;
  19923. margin: 0 20px 20px 0;
  19924. background: #f0f4fa;
  19925. position: relative;
  19926. border-radius: 5px;
  19927. align-items: center;
  19928. justify-content: center;
  19929. border: 1px solid #cad1dc;
  19930. color: #0e1e33;
  19931. /* padding: 25px 0px; */
  19932. cursor: pointer;
  19933. }
  19934. .wordTeacher::after {
  19935. content: "";
  19936. display: block;
  19937. position: absolute;
  19938. width: 15px;
  19939. height: 15px;
  19940. right: 10px;
  19941. top: 10px;
  19942. background-image: url(../../../assets/icon/new/choose_a.png);
  19943. background-size: 100% 100%;
  19944. }
  19945. .wordTeacherA::after {
  19946. background-image: url(../../../assets/icon/new/choose_b.png);
  19947. }
  19948. .wordTeacher:nth-child(5n) {
  19949. margin-right: 0px;
  19950. }
  19951. .wordPic {
  19952. margin: 0 auto;
  19953. width: 30px;
  19954. height: 30px;
  19955. cursor: pointer;
  19956. }
  19957. .deleteWord {
  19958. width: 22px;
  19959. height: 22px;
  19960. position: absolute;
  19961. right: 5px;
  19962. top: -15px;
  19963. cursor: pointer;
  19964. display: none;
  19965. z-index: 999;
  19966. }
  19967. .wordPic>img,
  19968. .deleteWord>img,
  19969. .addToolImg>img {
  19970. width: 100%;
  19971. height: 100%;
  19972. }
  19973. .info_btn:hover {
  19974. background-color: #4f7cd5 !important;
  19975. }
  19976. .cru_selectBox {
  19977. display: flex;
  19978. margin: 15px 0;
  19979. flex-wrap: nowrap;
  19980. white-space: nowrap;
  19981. overflow: auto;
  19982. position: relative;
  19983. height: 40px;
  19984. max-width: calc(100% - 175px);
  19985. }
  19986. .cru_selectBox::-webkit-scrollbar {
  19987. /*滚动条整体样式*/
  19988. width: 6px;
  19989. /*高宽分别对应横竖滚动条的尺寸*/
  19990. height: 6px;
  19991. }
  19992. /*定义滚动条轨道 内阴影+圆角*/
  19993. .cru_selectBox::-webkit-scrollbar-track {
  19994. border-radius: 10px;
  19995. background-color: #eee;
  19996. }
  19997. /*定义滑块 内阴影+圆角*/
  19998. .cru_selectBox::-webkit-scrollbar-thumb {
  19999. border-radius: 10px;
  20000. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  20001. background-color: rgba(0, 0, 0, 0.1);
  20002. }
  20003. .cru_line {
  20004. position: absolute;
  20005. bottom: 0px;
  20006. transition: all 0.5s;
  20007. left: 0px;
  20008. width: 50px;
  20009. height: 4px;
  20010. left: 10px;
  20011. border-radius: 2px;
  20012. background: #3681fc;
  20013. }
  20014. .cru_select {
  20015. font-size: 18px;
  20016. margin-right: 20px;
  20017. margin-left: 5px;
  20018. cursor: pointer;
  20019. color: #0e1e33;
  20020. }
  20021. .cru_select:hover {
  20022. color: #3681fc !important;
  20023. }
  20024. .cru_selected {
  20025. color: #3681fc !important;
  20026. font-weight: bold;
  20027. }
  20028. .chapter_box {
  20029. margin-top: 10px;
  20030. width: 100%;
  20031. padding: 10px 20px;
  20032. background: #fff;
  20033. border-radius: 8px;
  20034. box-sizing: border-box;
  20035. }
  20036. .chapter_contentbox {
  20037. display: flex;
  20038. align-items: center;
  20039. /* margin-top: 15px; */
  20040. }
  20041. .chapter_contentbox .cc_title {
  20042. margin: 0px;
  20043. color: black;
  20044. display: block;
  20045. white-space: nowrap;
  20046. overflow: hidden;
  20047. text-overflow: ellipsis;
  20048. margin-right: 20px;
  20049. font-size: 18px;
  20050. height: 20px;
  20051. line-height: 22px;
  20052. min-width: fit-content;
  20053. display: flex;
  20054. }
  20055. .chapter_contentbox .cc_title::before {
  20056. content: "";
  20057. height: 100%;
  20058. width: 3px;
  20059. background: #3681fc;
  20060. border-radius: 3px;
  20061. opacity: 1;
  20062. display: block;
  20063. margin-right: 10px;
  20064. }
  20065. .chapter_contentbox .cc_input {
  20066. width: 100%;
  20067. display: flex;
  20068. }
  20069. .show_taskD {
  20070. min-width: fit-content;
  20071. margin-left: 10px;
  20072. display: flex;
  20073. align-items: center;
  20074. font-size: 14px;
  20075. cursor: pointer;
  20076. color: #717c8d;
  20077. }
  20078. .show_taskD>img {
  20079. width: 15px;
  20080. margin-right: 5px;
  20081. transition: 0.2s all;
  20082. transform: rotate(-90deg);
  20083. }
  20084. .show_taskD.show>img {
  20085. transform: rotate(0deg);
  20086. }
  20087. .show_toolD {
  20088. min-width: fit-content;
  20089. margin-left: 10px;
  20090. display: flex;
  20091. align-items: center;
  20092. font-size: 14px;
  20093. cursor: pointer;
  20094. color: #717c8d;
  20095. /* position: absolute;
  20096. right: 45px;
  20097. top: 5px; */
  20098. }
  20099. .show_toolD>img {
  20100. width: 15px;
  20101. margin-right: 5px;
  20102. transition: 0.2s all;
  20103. transform: rotate(-90deg);
  20104. }
  20105. .show_toolD.show>img {
  20106. transform: rotate(0deg);
  20107. }
  20108. .remove {
  20109. background-image: url("../../../assets/icon/new/delete_u.png");
  20110. cursor: pointer;
  20111. opacity: 0.5;
  20112. width: 30px;
  20113. min-width: 30px;
  20114. height: 30px;
  20115. background-size: 100% 100%;
  20116. background-repeat: no-repeat;
  20117. margin-left: 10px;
  20118. }
  20119. .remove1 {
  20120. background-image: url("../../../assets/remove1.png");
  20121. background-repeat: no-repeat;
  20122. background-position: 5px 10px;
  20123. width: 40px;
  20124. height: 50px;
  20125. cursor: pointer;
  20126. margin-left: 10px;
  20127. }
  20128. .binfo_input {
  20129. width: 100%;
  20130. margin: 0;
  20131. padding: 12px 14px;
  20132. display: block;
  20133. min-width: 0;
  20134. outline: none;
  20135. box-sizing: border-box;
  20136. background: none;
  20137. border: none;
  20138. border-radius: 4px;
  20139. background: #fff;
  20140. font-size: 16px;
  20141. resize: none;
  20142. font-family: "Microsoft YaHei";
  20143. min-height: 48px;
  20144. /* border: 1px solid #3682fc00; */
  20145. border: 1.5px solid #cad1dc;
  20146. }
  20147. .binfo_textarea {
  20148. border: 1.5px solid #cad1dc;
  20149. font-size: 16px;
  20150. resize: none;
  20151. /* background: #f6f6f6; */
  20152. font-family: "Microsoft YaHei";
  20153. }
  20154. .binfo_input:focus-visible {
  20155. border: 1.5px solid #3681fc !important;
  20156. }
  20157. .time {
  20158. display: flex;
  20159. margin: 35px 0 80px 0;
  20160. }
  20161. .chapter_btnbox {
  20162. width: 160px;
  20163. border-radius: 5px;
  20164. border: 2px dashed gray;
  20165. display: flex;
  20166. padding: 8px 50px;
  20167. align-items: center;
  20168. justify-content: center;
  20169. margin: 30px auto 0;
  20170. cursor: pointer;
  20171. }
  20172. .icon_add {
  20173. position: relative;
  20174. width: 24px;
  20175. padding-top: 20px;
  20176. border-radius: 100%;
  20177. border-width: 2px;
  20178. border-style: solid;
  20179. border-color: gray;
  20180. }
  20181. .icon_add i:nth-child(1) {
  20182. position: absolute;
  20183. left: 50%;
  20184. top: 50%;
  20185. height: 60%;
  20186. transform: translate(-50%, -50%);
  20187. border-width: 1px;
  20188. border-style: solid;
  20189. border-color: inherit;
  20190. }
  20191. .icon_add i:nth-child(2) {
  20192. position: absolute;
  20193. top: 50%;
  20194. left: 50%;
  20195. width: 60%;
  20196. transform: translate(-50%, -50%);
  20197. border-width: 1px;
  20198. border-style: solid;
  20199. border-color: inherit;
  20200. }
  20201. .chapter_btn_w {
  20202. font-size: 0.9375rem;
  20203. font-weight: bold;
  20204. color: gray;
  20205. margin-left: 20px;
  20206. }
  20207. .disUoloadSty>>>.el-icon-plus {
  20208. display: none !important;
  20209. /* 上传按钮隐藏 */
  20210. }
  20211. .imgLeft {
  20212. margin: 15px 0;
  20213. }
  20214. .add_info_box {
  20215. margin: 0 0 0 auto;
  20216. display: flex;
  20217. flex-wrap: wrap;
  20218. }
  20219. .add_info_box button {
  20220. margin: 0 5px 10px 0;
  20221. }
  20222. .add_info_box2 {
  20223. display: flex;
  20224. align-items: center;
  20225. flex-wrap: wrap;
  20226. }
  20227. .add_info_box2::after {
  20228. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  20229. color: red;
  20230. font-size: 14px;
  20231. margin-bottom: 10px;
  20232. }
  20233. .add_chapters_box {
  20234. text-align: left;
  20235. background-color: #fff;
  20236. width: 100%;
  20237. border-radius: 4px;
  20238. font-size: 16px;
  20239. box-sizing: border-box;
  20240. position: relative;
  20241. padding: 0 15px;
  20242. height: auto;
  20243. overflow-y: auto;
  20244. overflow-x: hidden;
  20245. border: 1px solid #cad1dc;
  20246. }
  20247. .add_chapters_box.add_c_none {
  20248. display: flex;
  20249. justify-content: center;
  20250. align-items: center;
  20251. padding: 15px;
  20252. }
  20253. .add_c_none>img {
  20254. width: 25px;
  20255. }
  20256. .add_chapters_box.add_c_none>span {
  20257. font-size: 14px;
  20258. font-weight: 400;
  20259. margin: 0 0 5px 5px;
  20260. }
  20261. .homework_box {
  20262. display: flex;
  20263. align-items: flex-start;
  20264. flex-wrap: wrap;
  20265. margin: 15px 0 0 0;
  20266. flex-direction: column;
  20267. align-content: flex-start;
  20268. }
  20269. .course_homework {
  20270. display: flex;
  20271. justify-content: center;
  20272. flex-direction: row;
  20273. align-items: center;
  20274. margin: 0 10px 0 0;
  20275. }
  20276. .course_homework>>>.el-input__inner {
  20277. width: 140px;
  20278. margin-left: 15px;
  20279. }
  20280. .chapter_upload_move {
  20281. position: relative;
  20282. background-color: #fff;
  20283. position: absolute;
  20284. width: 100%;
  20285. top: 0px;
  20286. left: 0px;
  20287. border: 1px solid #eee;
  20288. border-radius: 5px;
  20289. transition: width 2s;
  20290. -moz-transition: width 2s;
  20291. -webkit-transition: width 2s;
  20292. -o-transition: width 2s;
  20293. }
  20294. .chapter_upload_l_i {
  20295. background-image: url("../../../assets/icon.png");
  20296. background-position: 3px -165px;
  20297. width: 30px;
  20298. height: 30px;
  20299. margin: 10px auto 0 auto;
  20300. }
  20301. .course_input_box {
  20302. display: flex;
  20303. margin-right: 20px;
  20304. width: 100%;
  20305. align-items: center;
  20306. position: relative;
  20307. }
  20308. .course_input_box>.binfo_input {
  20309. width: calc(100% - 0 - 200px - 20px);
  20310. margin: 0 10px;
  20311. }
  20312. .bb_courseIcon {
  20313. width: 57px;
  20314. height: 45px;
  20315. background: #f0f4fa;
  20316. border-radius: 5px 0px 0px 5px;
  20317. display: flex;
  20318. align-items: center;
  20319. justify-content: center;
  20320. border-right: 1.5px solid rgb(202, 209, 220);
  20321. box-sizing: border-box;
  20322. position: absolute;
  20323. left: 1.5px;
  20324. }
  20325. .bb_courseIcon>img {
  20326. width: 25px;
  20327. height: auto;
  20328. }
  20329. .big_box {
  20330. /* margin-top: 20px; */
  20331. display: flex;
  20332. justify-content: space-between;
  20333. /* border-bottom: 1px solid #E0E2ED; */
  20334. }
  20335. .left_first {
  20336. display: flex;
  20337. flex-direction: column;
  20338. flex-wrap: nowrap;
  20339. width: calc(100% - 310px);
  20340. padding: 20px;
  20341. box-sizing: border-box;
  20342. background: #fff;
  20343. border-radius: 5px;
  20344. }
  20345. .right_first {
  20346. width: 300px;
  20347. display: flex;
  20348. align-items: center;
  20349. justify-content: center;
  20350. /* border-left: 1px solid #E0E2ED; */
  20351. box-sizing: border-box;
  20352. padding: 20px;
  20353. flex-direction: column;
  20354. background: #fff;
  20355. border-radius: 5px;
  20356. }
  20357. .ai_box {
  20358. width: 204px;
  20359. display: flex;
  20360. justify-content: flex-end;
  20361. margin-bottom: 15px;
  20362. }
  20363. .ai_content {
  20364. display: flex;
  20365. align-items: center;
  20366. font-size: 14px;
  20367. padding: 7px 20px;
  20368. box-sizing: border-box;
  20369. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  20370. border-radius: 12px;
  20371. font-weight: 700;
  20372. cursor: pointer;
  20373. }
  20374. .ai_content>img {
  20375. width: 40px;
  20376. margin-right: 5px;
  20377. }
  20378. .c_info_title {
  20379. padding: 15px 0 15px 0;
  20380. font-size: 16px;
  20381. font-weight: bold;
  20382. margin: 0 0 0 20px;
  20383. box-sizing: border-box;
  20384. display: flex;
  20385. align-items: center;
  20386. line-height: 20px;
  20387. }
  20388. .c_info_title::before {
  20389. content: "";
  20390. display: block;
  20391. width: 3px;
  20392. height: 20px;
  20393. background: #0061ff;
  20394. border-radius: 3px;
  20395. margin: 0 5px 0 0;
  20396. }
  20397. .right_title {
  20398. height: 30px;
  20399. padding: 15px 0 15px 20px;
  20400. border-bottom: 1px solid #f2f2f2;
  20401. font-size: 1.5em;
  20402. font-weight: bold;
  20403. color: #0f7eff;
  20404. margin: 0 auto;
  20405. }
  20406. .people {
  20407. border: 1px solid rgb(229 229 229);
  20408. /* height: 495px; */
  20409. height: 350px;
  20410. border-radius: 5px;
  20411. width: 100%;
  20412. overflow: auto;
  20413. }
  20414. .people_top {
  20415. display: flex;
  20416. width: 100%;
  20417. /* justify-content: space-between; */
  20418. /* align-items: center; */
  20419. flex-direction: column;
  20420. padding: 10px 10px 0;
  20421. box-sizing: border-box;
  20422. }
  20423. .people_nav,
  20424. .people_top_right {
  20425. /* padding: 20px 0 0 20px; */
  20426. }
  20427. .people_top_right {
  20428. height: 40px;
  20429. margin-bottom: 10px;
  20430. }
  20431. .people_search {
  20432. display: flex;
  20433. position: relative;
  20434. }
  20435. .people_search>>>.el-input__inner {
  20436. /* height: 25px; */
  20437. width: 100%;
  20438. }
  20439. .search_img {
  20440. width: 20px;
  20441. height: 20px;
  20442. position: absolute;
  20443. right: 10px;
  20444. top: 50%;
  20445. transform: translateY(-50%);
  20446. }
  20447. .search_img>img {
  20448. width: 100%;
  20449. height: 100%;
  20450. }
  20451. .people_name {
  20452. display: flex;
  20453. justify-content: flex-start;
  20454. padding: 20px 10px;
  20455. flex-direction: column;
  20456. flex-wrap: wrap;
  20457. }
  20458. .p_box {
  20459. position: relative;
  20460. }
  20461. .people_name>>>.el-checkbox {
  20462. width: 100%;
  20463. display: flex;
  20464. align-items: center;
  20465. margin-bottom: 10px;
  20466. }
  20467. .people_name>>>.el-checkbox__label {
  20468. text-overflow: ellipsis;
  20469. overflow: hidden;
  20470. width: calc(100%);
  20471. }
  20472. .people_name2>>>.el-checkbox__label {
  20473. width: calc(100% - 130px);
  20474. }
  20475. .inviteCode {
  20476. position: absolute;
  20477. right: 30px;
  20478. color: #237ade;
  20479. top: 0;
  20480. cursor: pointer;
  20481. font-size: 13px;
  20482. }
  20483. .noneInvite {
  20484. color: #a8a8a8;
  20485. }
  20486. .inviteImg {
  20487. position: absolute;
  20488. right: 5px;
  20489. top: 0;
  20490. width: 20px;
  20491. }
  20492. .right_img {
  20493. width: 150px;
  20494. height: 150px;
  20495. margin: 0 auto;
  20496. }
  20497. .right_img>img {
  20498. width: 100%;
  20499. height: 100%;
  20500. }
  20501. .number {
  20502. margin-top: 20px;
  20503. color: #4aa6ff;
  20504. text-decoration: underline;
  20505. }
  20506. .success_button {
  20507. display: flex;
  20508. text-align: center;
  20509. margin: 5% 0 auto;
  20510. flex-direction: row;
  20511. justify-content: center;
  20512. }
  20513. .look_course {
  20514. margin-right: 40px;
  20515. background: #3d67bc;
  20516. width: 200px;
  20517. height: 35px;
  20518. line-height: 35px;
  20519. color: #fff;
  20520. text-align: center;
  20521. font-size: 14px;
  20522. border-radius: 5px;
  20523. cursor: pointer;
  20524. }
  20525. .attend_others {
  20526. width: 250px;
  20527. background: #4fb13c;
  20528. height: 35px;
  20529. line-height: 35px;
  20530. color: #fff;
  20531. text-align: center;
  20532. font-size: 14px;
  20533. border-radius: 5px;
  20534. cursor: pointer;
  20535. }
  20536. .dialog_diy2>>>.el-dialog__body {
  20537. text-align: center;
  20538. }
  20539. .write_togother {
  20540. position: absolute;
  20541. right: 45px;
  20542. display: flex;
  20543. top: 5%;
  20544. }
  20545. .write_people {
  20546. font-size: 14px;
  20547. line-height: 50px;
  20548. padding-right: 10px;
  20549. }
  20550. .end_write {
  20551. background: #3d67bc;
  20552. color: #fff;
  20553. width: 100px;
  20554. height: 35px;
  20555. line-height: 35px;
  20556. text-align: center;
  20557. font-size: 14px;
  20558. border-radius: 5px;
  20559. cursor: pointer;
  20560. }
  20561. .chapter_upload+.chapter_upload {
  20562. /* margin-top: 15px; */
  20563. border-top: 1px solid #e7ebf1;
  20564. }
  20565. .chapter_upload {
  20566. height: 45px;
  20567. position: relative;
  20568. display: flex;
  20569. align-items: center;
  20570. width: 100%;
  20571. min-height: 45px;
  20572. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  20573. /* border-radius: 4px; */
  20574. /* overflow: hidden; */
  20575. box-sizing: border-box;
  20576. }
  20577. .chapter_upload_drag {
  20578. position: absolute;
  20579. cursor: pointer;
  20580. width: 16px;
  20581. height: 16px;
  20582. left: -9px;
  20583. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  20584. background-size: 100% 100%;
  20585. z-index: 10;
  20586. display: none;
  20587. }
  20588. .isNavStage>.chapter_upload_drag {
  20589. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  20590. }
  20591. .chapter_upload_t {
  20592. background-color: #fff;
  20593. position: absolute;
  20594. height: 100%;
  20595. top: 0px;
  20596. left: 0px;
  20597. box-sizing: border-box;
  20598. }
  20599. .chapter_upload_o {
  20600. width: 100%;
  20601. height: 100%;
  20602. position: relative;
  20603. z-index: 1;
  20604. }
  20605. .chapter_upload_ic {
  20606. margin: 0 15px 0px auto;
  20607. display: flex;
  20608. align-items: center;
  20609. }
  20610. .chapter_upload_ic_l {
  20611. width: 50px;
  20612. height: 50px;
  20613. float: left;
  20614. }
  20615. .chapter_upload_ic_l div {
  20616. width: 30px;
  20617. height: 35px;
  20618. background: url("../../../assets/icon/icon.png");
  20619. }
  20620. .chapter_upload_ic_edit {
  20621. height: 100%;
  20622. display: flex;
  20623. align-items: center;
  20624. cursor: pointer;
  20625. margin: 0 10px 0 0;
  20626. }
  20627. .chapter_upload_ic_edit div {
  20628. width: 18px;
  20629. height: 18px;
  20630. background-image: url("../../../assets/icon/new/edit_u.png");
  20631. background-size: 100% 100%;
  20632. }
  20633. .chapter_upload_ic_check {
  20634. height: 100%;
  20635. display: flex;
  20636. align-items: center;
  20637. cursor: pointer;
  20638. margin: 0 10px 0 0;
  20639. }
  20640. .chapter_upload_ic_check div {
  20641. width: 18px;
  20642. height: 18px;
  20643. background-image: url("../../../assets/icon/course/lookeye.svg");
  20644. background-size: 100% 100%;
  20645. }
  20646. .chapter_upload_ic_r {
  20647. height: 100%;
  20648. display: flex;
  20649. align-items: center;
  20650. cursor: pointer;
  20651. }
  20652. .chapter_upload_ic_r div {
  20653. width: 18px;
  20654. height: 18px;
  20655. background-image: url("../../../assets/icon/new/delete_u.png");
  20656. background-size: 100% 100%;
  20657. }
  20658. .chapter_upload_n {
  20659. display: flex;
  20660. text-indent: 10px;
  20661. text-decoration: none;
  20662. text-overflow: ellipsis;
  20663. white-space: nowrap;
  20664. overflow: hidden;
  20665. width: 55%;
  20666. margin-left: 10px;
  20667. cursor: pointer;
  20668. margin-top: 2px;
  20669. align-items: center;
  20670. }
  20671. .chapter_upload_l_i2,
  20672. .chapter_upload_l_i3,
  20673. .chapter_upload_l_i8,
  20674. .chapter_upload_l_i6,
  20675. .chapter_upload_l_i12,
  20676. .chapter_upload_l_i14,
  20677. .chapter_upload_l_i13 {
  20678. width: 15px;
  20679. height: 15px;
  20680. background-size: 100% 100%;
  20681. }
  20682. .chapter_upload_l_i2 {
  20683. background-image: url("../../../assets/icon/new/u_word.png");
  20684. }
  20685. .chapter_upload_l_i3 {
  20686. background-image: url("../../../assets/icon/new/u_video.png");
  20687. }
  20688. .chapter_upload_l_i8 {
  20689. background-image: url("../../../assets/icon/new/u_url.png");
  20690. }
  20691. .chapter_upload_l_i14 {
  20692. background-image: url("../../../assets/icon/new/u_source.png");
  20693. }
  20694. .chapter_upload_l_i6 {
  20695. background-image: url("../../../assets/icon/new/u_picture.png");
  20696. }
  20697. .chapter_upload_l_i12 {
  20698. background-image: url("../../../assets/icon/new/u_word.png");
  20699. }
  20700. .chapter_upload_l_i13 {
  20701. background-image: url("../../../assets/icon/new/u_img.png");
  20702. }
  20703. .chapter_upload_noSee {
  20704. background-image: url("../../../assets/icon/new/u_noUpload.png");
  20705. width: 18px;
  20706. height: 18px;
  20707. background-size: 100% 100%;
  20708. display: block;
  20709. margin-right: 10px;
  20710. }
  20711. .chapter_upload_ud {
  20712. display: flex;
  20713. flex-direction: row;
  20714. justify-content: center;
  20715. margin: 0 10px 0 0;
  20716. }
  20717. .chapter_upload_ud>.chapter_upload_up {
  20718. margin-bottom: 0;
  20719. margin-right: 10px;
  20720. }
  20721. .chapter_upload_down,
  20722. .chapter_upload_up {
  20723. width: 20px;
  20724. height: 20px;
  20725. background: #e4eaf2;
  20726. cursor: pointer;
  20727. margin: 0 auto;
  20728. border-radius: 5px;
  20729. display: flex;
  20730. justify-content: center;
  20731. align-items: center;
  20732. }
  20733. .chapter_upload_up::after,
  20734. .chapter_upload_down::after {
  20735. content: "";
  20736. background-image: url("../../../assets/icon/new/downBtn.png");
  20737. width: 13px;
  20738. height: 13px;
  20739. background-size: 100% 100%;
  20740. display: block;
  20741. }
  20742. .chapter_upload_up::after {
  20743. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  20744. }
  20745. .chapter_upload_up {
  20746. margin-bottom: 5px;
  20747. }
  20748. .chapter_upload_ud2 {
  20749. display: flex;
  20750. flex-direction: row;
  20751. justify-content: center;
  20752. margin: 0 10px 0 0;
  20753. }
  20754. .chapter_upload_ud2>.chapter_upload_up2 {
  20755. margin-bottom: 0;
  20756. margin-right: 10px;
  20757. }
  20758. .chapter_upload_down2,
  20759. .chapter_upload_up2 {
  20760. cursor: pointer;
  20761. margin: 0 auto;
  20762. border-radius: 5px;
  20763. display: flex;
  20764. justify-content: center;
  20765. align-items: center;
  20766. color: #717c8d;
  20767. font-size: 14px;
  20768. }
  20769. .chapter_upload_up2 {
  20770. margin-right: 10px;
  20771. }
  20772. .chapter_upload_up2::before,
  20773. .chapter_upload_down2::before {
  20774. content: "";
  20775. background-image: url("../../../assets/icon/new/c_down.png");
  20776. width: 14px;
  20777. height: 14px;
  20778. background-size: 100% 100%;
  20779. display: block;
  20780. margin-right: 5px;
  20781. }
  20782. .chapter_upload_up2::before {
  20783. background-image: url("../../../assets/icon/new/c_up.png") !important;
  20784. }
  20785. .addWordStyle {
  20786. display: flex;
  20787. flex-direction: row;
  20788. justify-content: flex-start;
  20789. overflow-x: auto;
  20790. white-space: nowrap;
  20791. flex-wrap: wrap;
  20792. }
  20793. /* table 样式 */
  20794. .cont>>>table {
  20795. border-top: 1px solid #ccc;
  20796. border-left: 1px solid #ccc;
  20797. }
  20798. .cont>>>table td,
  20799. .cont>>>table th {
  20800. border-bottom: 1px solid #ccc;
  20801. border-right: 1px solid #ccc;
  20802. /* padding: 20px 5px; */
  20803. padding: 5px 10px;
  20804. max-width: 0px;
  20805. height: 30px;
  20806. vertical-align: baseline;
  20807. }
  20808. .cont>>>table th {
  20809. border-bottom: 2px solid #ccc;
  20810. text-align: center;
  20811. }
  20812. /* blockquote 样式 */
  20813. .cont>>>blockquote {
  20814. display: block;
  20815. border-left: 8px solid #d0e5f2;
  20816. padding: 5px 10px;
  20817. margin: 10px 0;
  20818. line-height: 1.4;
  20819. font-size: 100%;
  20820. background-color: #f1f1f1;
  20821. }
  20822. /* code 样式 */
  20823. .cont>>>code {
  20824. display: inline-block;
  20825. /* *display: inline; */
  20826. zoom: 1;
  20827. background-color: #f1f1f1;
  20828. border-radius: 3px;
  20829. padding: 3px 5px;
  20830. margin: 0 3px;
  20831. }
  20832. .cont>>>pre code {
  20833. display: block;
  20834. }
  20835. /* ul ol 样式 */
  20836. .cont>>>ul,
  20837. ol {
  20838. margin: 10px 0 10px 20px;
  20839. }
  20840. .wordbox {
  20841. display: flex;
  20842. flex-wrap: wrap;
  20843. cursor: pointer;
  20844. width: 100%;
  20845. }
  20846. .checkword {
  20847. width: 22px;
  20848. height: 22px;
  20849. margin: 10px auto 0;
  20850. cursor: pointer;
  20851. }
  20852. .checkword img {
  20853. width: 100%;
  20854. }
  20855. .stepBg {
  20856. display: flex;
  20857. justify-content: space-between;
  20858. align-items: center;
  20859. background: #fff;
  20860. width: calc(100%);
  20861. margin: 0 auto;
  20862. }
  20863. .stepBorder {
  20864. height: 3px !important;
  20865. background: #cad1dc;
  20866. width: 100px !important;
  20867. margin: 0 15px !important;
  20868. position: relative;
  20869. }
  20870. .border-active {
  20871. background: #3681fc !important;
  20872. }
  20873. .border-active::before,
  20874. .border-active::after {
  20875. border-color: #3681fc !important;
  20876. }
  20877. .stepBorder::before,
  20878. .stepBorder::after {
  20879. content: "";
  20880. width: 9px;
  20881. height: 9px;
  20882. background: #ffffff;
  20883. opacity: 1;
  20884. border: 2px solid #acb4bf;
  20885. display: block;
  20886. box-sizing: border-box;
  20887. border-radius: 50%;
  20888. position: absolute;
  20889. top: 50%;
  20890. transform: translateY(-50%);
  20891. }
  20892. .stepBorder::after {
  20893. right: -9px;
  20894. }
  20895. .stepTop {
  20896. width: 100%;
  20897. /* border-radius: 10px; */
  20898. display: flex;
  20899. justify-content: center;
  20900. align-items: center;
  20901. flex-wrap: nowrap;
  20902. background: #fff;
  20903. /* top: 18%; */
  20904. height: 80px;
  20905. border-bottom: 2px solid rgb(228, 232, 237);
  20906. box-sizing: border-box;
  20907. }
  20908. .stepTop2 {
  20909. width: 100%;
  20910. /* border-radius: 10px; */
  20911. display: flex;
  20912. justify-content: center;
  20913. align-items: center;
  20914. flex-wrap: nowrap;
  20915. background: #fff;
  20916. /* top: 18%; */
  20917. height: 20px;
  20918. border-bottom: 2px solid rgb(228, 232, 237);
  20919. box-sizing: border-box;
  20920. overflow: hidden;
  20921. cursor: pointer;
  20922. }
  20923. .stepTop>div img {
  20924. width: 100%;
  20925. }
  20926. .stepTop>div {
  20927. height: 50px;
  20928. width: 180px;
  20929. cursor: pointer;
  20930. margin: 10px 0;
  20931. border-radius: 10px;
  20932. }
  20933. .first,
  20934. .second,
  20935. .third,
  20936. .four {
  20937. background: #3681fc;
  20938. height: 90px;
  20939. color: #fff;
  20940. display: flex;
  20941. flex-direction: row;
  20942. align-items: center;
  20943. justify-content: center;
  20944. }
  20945. .first>div:nth-child(1),
  20946. .second>div:nth-child(1),
  20947. .third>div:nth-child(1),
  20948. .four>div:nth-child(1) {
  20949. margin: 5px 10px 0 0;
  20950. width: 2rem;
  20951. }
  20952. .firstNo,
  20953. .secondNo,
  20954. .thirdNo,
  20955. .fourNo {
  20956. background: #e7e7e7;
  20957. color: #adadad;
  20958. display: flex;
  20959. flex-direction: row;
  20960. align-items: center;
  20961. justify-content: center;
  20962. }
  20963. .firstNo>div:nth-child(1),
  20964. .secondNo>div:nth-child(1),
  20965. .thirdNo>div:nth-child(1),
  20966. .fourNo>div:nth-child(1) {
  20967. margin: 5px 10px 0 0;
  20968. width: 2rem;
  20969. }
  20970. .uploadWidth>>>.el-upload {
  20971. width: 60px;
  20972. height: 60px;
  20973. position: relative;
  20974. }
  20975. .addPeople {
  20976. background: #fa6060;
  20977. width: 150px;
  20978. height: 40px;
  20979. color: #fff;
  20980. border-radius: 5px;
  20981. text-align: center;
  20982. line-height: 40px;
  20983. font-size: 14px;
  20984. cursor: pointer;
  20985. }
  20986. .kcImg {
  20987. width: 60px;
  20988. margin-left: 10px;
  20989. }
  20990. .zyImg {
  20991. width: 55px;
  20992. margin: 0 10px;
  20993. }
  20994. .deleteZy {
  20995. width: 20px;
  20996. position: absolute;
  20997. top: 5px;
  20998. right: 5px;
  20999. cursor: pointer;
  21000. }
  21001. .kcImg>img,
  21002. .zyImg>img,
  21003. .deleteZy>img {
  21004. width: 100%;
  21005. height: 100%;
  21006. }
  21007. .zyBox {
  21008. display: flex;
  21009. flex-direction: row;
  21010. align-items: center;
  21011. background: #67d37d;
  21012. color: #fff;
  21013. width: 210px;
  21014. margin: 20px 20px 0 0;
  21015. border-radius: 10px;
  21016. height: 70px;
  21017. position: relative;
  21018. }
  21019. .upCss {
  21020. display: flex;
  21021. flex-direction: row;
  21022. justify-content: flex-start;
  21023. }
  21024. .upCss>>>.el-icon-plus {
  21025. position: none !important;
  21026. width: 200px;
  21027. height: 100px;
  21028. display: flex;
  21029. flex-wrap: nowrap;
  21030. flex-direction: column;
  21031. align-items: center;
  21032. justify-content: center;
  21033. border: 1px dashed #ccc;
  21034. min-width: 78px;
  21035. min-height: 100px;
  21036. z-index: 999;
  21037. }
  21038. .upCss>>>.el-upload-list__item-name {
  21039. width: 100px;
  21040. white-space: nowrap;
  21041. overflow: hidden;
  21042. text-overflow: ellipsis;
  21043. }
  21044. .upCss>>>.el-upload-list__item .el-icon-close {
  21045. font-size: 20px;
  21046. z-index: 9999;
  21047. }
  21048. .addStageImg {
  21049. min-width: 20px;
  21050. min-height: 20px;
  21051. width: 20px;
  21052. height: 20px;
  21053. cursor: pointer;
  21054. }
  21055. .addHW {
  21056. width: 28px;
  21057. height: 28px;
  21058. cursor: pointer;
  21059. }
  21060. .addStageImg>img,
  21061. .addHW>img {
  21062. width: 100%;
  21063. height: 100%;
  21064. }
  21065. .addNewPP>>>.el-dialog__body {
  21066. padding: 5px 20px;
  21067. }
  21068. .addNewPP>>>.el-dialog {
  21069. margin-top: 5vh !important;
  21070. }
  21071. .addNewPP2>>>.el-dialog__body {
  21072. padding: 5px 0;
  21073. }
  21074. .addNewPP2>>>.el-dialog {
  21075. margin-top: 5vh !important;
  21076. }
  21077. .isHeight {
  21078. height: 680px;
  21079. }
  21080. .toolChoose {
  21081. display: flex;
  21082. /* width: 100%; */
  21083. flex-direction: row;
  21084. flex-wrap: wrap;
  21085. }
  21086. .tool,
  21087. .isToolChoose {
  21088. display: flex;
  21089. flex-direction: column;
  21090. flex-wrap: nowrap;
  21091. width: fit-content;
  21092. margin: 10px 0 10px 0;
  21093. align-items: center;
  21094. border: 2px solid #dbdbdb00;
  21095. padding: 10px 20px;
  21096. border-radius: 5px;
  21097. cursor: pointer;
  21098. /* box-shadow: 0 0 2px 0px #dedede; */
  21099. position: relative;
  21100. box-sizing: border-box;
  21101. }
  21102. .tool:hover {
  21103. border: 2px solid #a5c7ff;
  21104. }
  21105. .tool:hover>.noCTool {
  21106. display: block;
  21107. opacity: 0.5;
  21108. }
  21109. .isToolChoose {
  21110. border: 2px solid #438aff !important;
  21111. box-shadow: 0 0 2px 0px #438aff;
  21112. opacity: 1 !important;
  21113. }
  21114. .isCTool,
  21115. .noCTool {
  21116. width: 30px;
  21117. height: 30px;
  21118. position: absolute;
  21119. top: -4px;
  21120. right: -4px;
  21121. }
  21122. .noCTool {
  21123. display: none;
  21124. }
  21125. .isCTool>img,
  21126. .noCTool>img {
  21127. width: 100%;
  21128. height: 100%;
  21129. }
  21130. .tool+.tool {
  21131. margin-right: 10px;
  21132. }
  21133. .whiteBIcon {
  21134. width: 80px;
  21135. cursor: pointer;
  21136. display: flex;
  21137. flex-direction: column;
  21138. flex-wrap: nowrap;
  21139. align-items: center;
  21140. font-size: 14px;
  21141. }
  21142. .whiteBIcon>img,
  21143. .toolIcon>img,
  21144. .arrow>img {
  21145. width: 100%;
  21146. height: 100%;
  21147. }
  21148. .check img {
  21149. width: 20px;
  21150. height: 20px;
  21151. }
  21152. .whiteBIcon>img {
  21153. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  21154. border-radius: 15px;
  21155. }
  21156. .whiteBIcon>div:nth-child(2) {
  21157. height: 20px;
  21158. line-height: 20px;
  21159. }
  21160. .check {
  21161. /* width: 20px;
  21162. height: 20px; */
  21163. cursor: pointer;
  21164. margin: 10px 0 0;
  21165. }
  21166. .checkDiv {
  21167. display: flex;
  21168. align-items: center;
  21169. }
  21170. .checkDiv span {
  21171. margin-left: 5px;
  21172. color: #858585;
  21173. }
  21174. .customWidth>>>.el-dialog {
  21175. min-width: 600px !important;
  21176. }
  21177. .CollaborativeCss {
  21178. width: 100%;
  21179. display: flex;
  21180. justify-content: center;
  21181. align-items: center;
  21182. box-sizing: border-box;
  21183. padding: 10px 0;
  21184. cursor: pointer;
  21185. }
  21186. .CollaborativeCss >>> .el-tooltip {
  21187. overflow: hidden;
  21188. white-space: nowrap;
  21189. text-overflow: ellipsis;
  21190. }
  21191. .CollaborativeCss2 {
  21192. background: #e0eafb;
  21193. color: #3681fc;
  21194. font-weight: 700;
  21195. border-radius: 5px;
  21196. }
  21197. .a_addBox {
  21198. margin: 10px 0;
  21199. background: #fff;
  21200. padding: 15px;
  21201. /* max-height: 600px; */
  21202. overflow: auto;
  21203. }
  21204. .a_add_box {
  21205. border-bottom: 2px solid #eee;
  21206. padding-bottom: 25px;
  21207. }
  21208. .a_add_head {
  21209. display: flex;
  21210. align-items: center;
  21211. justify-content: space-between;
  21212. margin: 10px 0 0 0;
  21213. font-size: 18px;
  21214. }
  21215. .a_add_checkType {
  21216. margin-top: 10px;
  21217. display: flex;
  21218. font-size: 14px;
  21219. align-items: center;
  21220. }
  21221. .a_add_checkType span {
  21222. box-sizing: border-box;
  21223. padding: 0 0 5px 0;
  21224. cursor: pointer;
  21225. }
  21226. .a_add_checkType span+span {
  21227. margin-left: 10px;
  21228. }
  21229. .a_add_checkType .active {
  21230. border-bottom: 2px solid #409eff;
  21231. color: #409eff;
  21232. }
  21233. .a_add_head .a_add_head_input {
  21234. /* width: 540px; */
  21235. width: 100%;
  21236. }
  21237. .a_add_head .a_add_head_div {
  21238. display: flex;
  21239. align-items: center;
  21240. justify-content: space-between;
  21241. }
  21242. .a_add_body {
  21243. display: flex;
  21244. /* align-items: center; */
  21245. align-items: flex-end;
  21246. }
  21247. .a_add_input {
  21248. display: flex;
  21249. align-items: center;
  21250. flex-wrap: wrap;
  21251. }
  21252. .a_add_input_choice {
  21253. flex-direction: column;
  21254. margin-right: 10px;
  21255. }
  21256. .a_add_input_choice>>>.el-radio {
  21257. display: flex;
  21258. align-items: center;
  21259. flex-direction: row-reverse;
  21260. margin: 30px 0 0 0;
  21261. position: relative;
  21262. }
  21263. .a_add_input_choice>>>.el-checkbox {
  21264. display: flex;
  21265. align-items: center;
  21266. flex-direction: row-reverse;
  21267. margin: 30px 0 0 0;
  21268. position: relative;
  21269. }
  21270. .width100 {
  21271. width: 100%;
  21272. }
  21273. .a_add_input .a_add_persent {
  21274. width: 100%;
  21275. }
  21276. .a_add_persent_div {
  21277. width: 100%;
  21278. display: flex;
  21279. align-items: center;
  21280. }
  21281. .a_add_persent_div span {
  21282. margin: 5px 0;
  21283. }
  21284. .a_add_persent_div span:nth-child(1) {
  21285. width: 30%;
  21286. }
  21287. .a_add_persent_div span:nth-child(2) {
  21288. width: 7%;
  21289. }
  21290. .a_add_persent_div span:nth-child(3) {
  21291. width: 40%;
  21292. }
  21293. .a_add_body_div {
  21294. display: flex;
  21295. align-items: center;
  21296. justify-content: center;
  21297. /* flex-direction: column; */
  21298. position: absolute;
  21299. right: -20px;
  21300. transform: translateX(100%);
  21301. }
  21302. .a_add_body_div>>>.el-button--primary {
  21303. background: #466b99;
  21304. border: none;
  21305. }
  21306. .all_choose {
  21307. display: flex;
  21308. flex-direction: row;
  21309. align-items: flex-start;
  21310. width: 100%;
  21311. }
  21312. .all_choose+.all_choose {
  21313. /* margin-top: 10px */
  21314. }
  21315. .all_choose>span {
  21316. min-width: fit-content;
  21317. display: block;
  21318. white-space: nowrap;
  21319. overflow: hidden;
  21320. text-overflow: ellipsis;
  21321. margin-right: 20px;
  21322. font-weight: bold;
  21323. font-size: 14px;
  21324. }
  21325. .all_choose>>>.el-checkbox-group {
  21326. display: flex;
  21327. flex-direction: row;
  21328. width: 100%;
  21329. flex-wrap: wrap;
  21330. align-content: center;
  21331. justify-content: flex-start;
  21332. align-items: center;
  21333. margin-top: 3px;
  21334. }
  21335. .all_choose>.el-checkbox-group>>>.el-checkbox {
  21336. margin-bottom: 10px;
  21337. display: flex;
  21338. flex-direction: row;
  21339. align-items: center;
  21340. margin-right: 10px;
  21341. }
  21342. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  21343. min-width: 80px;
  21344. overflow: hidden;
  21345. width: 80px;
  21346. text-overflow: ellipsis;
  21347. white-space: nowrap;
  21348. }
  21349. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  21350. width: auto;
  21351. }
  21352. .choose>div:nth-child(3)>span {
  21353. /* letter-spacing: 0 !important; */
  21354. }
  21355. .choose {
  21356. display: flex;
  21357. flex-direction: column;
  21358. flex-wrap: nowrap;
  21359. height: 100%;
  21360. justify-content: space-evenly;
  21361. align-items: flex-start;
  21362. }
  21363. .both {
  21364. display: flex;
  21365. flex-direction: row;
  21366. flex-wrap: wrap;
  21367. width: 100%;
  21368. align-items: center;
  21369. justify-content: flex-start;
  21370. margin: 15px 0;
  21371. }
  21372. .notice>>>.el-dialog {
  21373. width: 500px !important;
  21374. text-align: center;
  21375. }
  21376. .notice>>>.el-button {
  21377. margin-top: 20px;
  21378. }
  21379. .whiteBg {
  21380. /* background: #fff; */
  21381. border-radius: 10px;
  21382. }
  21383. .wb_j_box {
  21384. display: flex;
  21385. width: 100%;
  21386. padding: 0 20px 0;
  21387. box-sizing: border-box;
  21388. }
  21389. .wb_j_box_content {
  21390. width: calc(100% - 55% - 100px);
  21391. display: flex;
  21392. align-items: center;
  21393. }
  21394. .wb_j_box_p_box {
  21395. max-width: calc(100% - 200px);
  21396. word-break: break-all;
  21397. overflow: hidden;
  21398. margin: 0 0 0 10px;
  21399. font-size: 14px;
  21400. color: #6e6e6e;
  21401. z-index: 999;
  21402. }
  21403. .chooseWho {
  21404. display: flex;
  21405. width: 410px;
  21406. flex-direction: row;
  21407. flex-wrap: nowrap;
  21408. justify-content: space-between;
  21409. padding-bottom: 10px;
  21410. }
  21411. .chooseWho>div {
  21412. cursor: pointer;
  21413. padding-bottom: 10px;
  21414. font-weight: bold;
  21415. }
  21416. .isChooseActive {
  21417. color: #3e88f4;
  21418. border-bottom: 2px solid #2f80f3;
  21419. }
  21420. .toolSort {
  21421. display: flex;
  21422. flex-direction: row;
  21423. flex-wrap: wrap;
  21424. justify-content: flex-start;
  21425. align-items: flex-start;
  21426. }
  21427. .toolSort>div {
  21428. margin-right: 10px;
  21429. }
  21430. .tools {
  21431. width: 100%;
  21432. display: flex;
  21433. flex-direction: column;
  21434. flex-wrap: nowrap;
  21435. align-items: flex-start;
  21436. }
  21437. .leftTools,
  21438. .rightTools {
  21439. width: 50%;
  21440. }
  21441. .leftTools+.leftTools {
  21442. border-top: 1px solid #dbdbdb;
  21443. padding-top: 30px;
  21444. }
  21445. .rightTools {
  21446. display: flex;
  21447. flex-direction: row;
  21448. flex-wrap: nowrap;
  21449. justify-content: space-around;
  21450. }
  21451. .firstToolList {
  21452. display: flex;
  21453. flex-direction: column;
  21454. flex-wrap: nowrap;
  21455. align-items: center;
  21456. }
  21457. .iconList {
  21458. display: flex;
  21459. flex-direction: row;
  21460. flex-wrap: wrap;
  21461. justify-content: flex-start;
  21462. align-items: center;
  21463. margin: 20px 0 5px 0;
  21464. width: 240px;
  21465. min-width: 240px;
  21466. }
  21467. .iconTool {
  21468. display: flex;
  21469. flex-direction: column;
  21470. flex-wrap: nowrap;
  21471. align-items: center;
  21472. justify-content: flex-start;
  21473. margin: 15px 10px;
  21474. }
  21475. .toolIcon {
  21476. width: 50px;
  21477. }
  21478. .taskBorder {
  21479. /* border: 1px solid #CAD1DC; */
  21480. border-radius: 10px;
  21481. margin-top: 10px;
  21482. min-height: 670px;
  21483. position: relative;
  21484. background: #fff;
  21485. padding: 20px;
  21486. overflow: hidden;
  21487. box-sizing: border-box;
  21488. }
  21489. .smallTaskBorder {
  21490. height: 405px;
  21491. min-height: 405px !important;
  21492. overflow: hidden;
  21493. }
  21494. /* .taskBorder>div {
  21495. padding: 30px 30px 10px;
  21496. } */
  21497. .addTaskBorder {
  21498. /* border: 2px solid #5E9AFC; */
  21499. border-radius: 8px;
  21500. margin-top: 10px;
  21501. cursor: pointer;
  21502. /* height: 50px;
  21503. line-height: 50px; */
  21504. background: #fff;
  21505. padding: 15px 0;
  21506. display: flex;
  21507. align-items: center;
  21508. justify-content: center;
  21509. }
  21510. /* .addTaskBorder>div {
  21511. margin: 0 auto;
  21512. display: flex;
  21513. align-items: center;
  21514. justify-content: center;
  21515. }
  21516. .addTaskBorder>div>img {
  21517. width: 20px;
  21518. }
  21519. .addTaskBorder>div>span {
  21520. font-size: 16px;
  21521. margin-left: 10px;
  21522. color: #5E9AFC;
  21523. } */
  21524. .funBlock {
  21525. display: flex;
  21526. padding: 15px 0;
  21527. flex-direction: row;
  21528. justify-content: center;
  21529. align-items: center;
  21530. position: absolute;
  21531. right: 0;
  21532. bottom: 0;
  21533. background: #fff;
  21534. width: 100%;
  21535. height: 60px;
  21536. z-index: 9;
  21537. }
  21538. .fold {
  21539. display: flex;
  21540. margin: 0 20px;
  21541. flex-direction: row;
  21542. align-items: center;
  21543. cursor: pointer;
  21544. color: #2b7bff;
  21545. }
  21546. .arrow {
  21547. margin-right: 8px;
  21548. width: 16px;
  21549. height: 16px;
  21550. min-width: 16px;
  21551. min-height: 16px;
  21552. background-size: 100% 100%;
  21553. display: block;
  21554. background-image: url(../../../assets/icon/new/u_up.png);
  21555. /* border-left: 7px solid transparent;
  21556. border-bottom: 7px solid #717C8D;
  21557. border-top: 0px solid transparent;
  21558. border-right: 7px solid transparent; */
  21559. /* box-sizing: border-box; */
  21560. transition: all 0.3s;
  21561. }
  21562. .arrowZ {
  21563. transform: rotate(180deg);
  21564. }
  21565. .addToolFun {
  21566. display: flex;
  21567. width: 150px;
  21568. flex-direction: row;
  21569. align-items: center;
  21570. justify-content: center;
  21571. border: 2px dashed #cad1dc;
  21572. border-radius: 5px;
  21573. height: 50px;
  21574. margin: 35px auto 0;
  21575. cursor: pointer;
  21576. }
  21577. .addToolFun2 {
  21578. display: flex;
  21579. width: 150px;
  21580. border: 2px dashed #cad1dc;
  21581. flex-direction: row;
  21582. align-items: center;
  21583. justify-content: center;
  21584. border-radius: 5px;
  21585. height: 50px;
  21586. margin: 0 auto 0;
  21587. cursor: pointer;
  21588. }
  21589. .addToolFun2>div,
  21590. .addToolFun>div {
  21591. display: flex;
  21592. line-height: 50px;
  21593. }
  21594. .addToolImg {
  21595. width: 20px;
  21596. height: 20px;
  21597. margin-right: 10px;
  21598. }
  21599. .addToolsDia>>>.el-dialog__body {
  21600. padding: 20px;
  21601. }
  21602. .addToolsDia>>>.el-dialog__body>.toolChoose {
  21603. padding: 0;
  21604. }
  21605. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  21606. padding: 0;
  21607. border-bottom: none;
  21608. margin-bottom: 0;
  21609. }
  21610. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  21611. width: 100%;
  21612. }
  21613. .lineCss>>>.el-form-item__label {
  21614. width: auto !important;
  21615. }
  21616. .lineCss>>>.el-form-item__content {
  21617. margin-left: 50px !important;
  21618. }
  21619. .newSteps {
  21620. display: flex;
  21621. width: 100% !important;
  21622. /* height: 80px; */
  21623. cursor: pointer;
  21624. margin: 10px 0;
  21625. border-radius: 10px;
  21626. flex-direction: row;
  21627. align-content: center;
  21628. justify-content: center;
  21629. align-items: center;
  21630. margin: 0 !important;
  21631. }
  21632. /* 评价样式 */
  21633. .elist_css {
  21634. padding-bottom: 75px !important;
  21635. }
  21636. .elist_title {
  21637. margin-bottom: 10px;
  21638. }
  21639. .elist_input {
  21640. width: 100%;
  21641. }
  21642. .elist_input_box {
  21643. display: flex;
  21644. align-items: center;
  21645. flex-wrap: wrap;
  21646. }
  21647. .elist_input_box+.elist_input_box {
  21648. margin-top: 30px;
  21649. }
  21650. .elist_input .elist_input_box input {
  21651. font: inherit;
  21652. color: currentColor;
  21653. width: 100%;
  21654. /* max-width: calc(100% - 385px); */
  21655. max-width: calc(100% - 150px);
  21656. padding: 8px 14px;
  21657. display: block;
  21658. min-width: 0;
  21659. outline: none;
  21660. border: 1px solid rgba(0, 0, 0, 0.23);
  21661. border-radius: 4px;
  21662. box-sizing: border-box;
  21663. background: #fff;
  21664. margin: 0 20px 0 0;
  21665. }
  21666. .elist_input .elist_input_box span {
  21667. height: 36px;
  21668. line-height: 36px;
  21669. color: rgb(82, 82, 82);
  21670. min-width: 80px;
  21671. }
  21672. .elist_input .elist_input_box .remove {
  21673. height: 20px;
  21674. width: 20px;
  21675. min-height: 20px;
  21676. min-width: 20px;
  21677. background-size: 100% 100%;
  21678. background-position: unset;
  21679. margin-left: 5px;
  21680. }
  21681. .elist_input_box>>>.el-rate {
  21682. display: flex;
  21683. height: 36px;
  21684. align-items: center;
  21685. }
  21686. .elist_input_box .elist_inptu_text {
  21687. width: 100%;
  21688. display: flex;
  21689. align-items: center;
  21690. margin-top: 10px;
  21691. }
  21692. .elist_input_box .elist_inptu_text input {
  21693. /* width: 500px; */
  21694. width: 100%;
  21695. max-width: unset;
  21696. }
  21697. .elist_input_box>>>.el-rate__icon {
  21698. font-size: 24px;
  21699. }
  21700. .elist_btn {
  21701. margin-top: 10px;
  21702. }
  21703. .lineTitle {
  21704. /* margin-top: 15px; */
  21705. width: 110px;
  21706. font-size: 16px;
  21707. display: flex;
  21708. align-items: center;
  21709. line-height: 20px;
  21710. }
  21711. .lineTitle::before {
  21712. content: "";
  21713. display: block;
  21714. width: 3px;
  21715. height: 20px;
  21716. background: #0061ff;
  21717. border-radius: 3px;
  21718. margin: 0 5px 0 0;
  21719. }
  21720. .clineTitle::before {
  21721. content: "";
  21722. display: block;
  21723. min-width: 10px;
  21724. width: 10px;
  21725. height: 10px;
  21726. background: #0061ff;
  21727. border-radius: 50%;
  21728. margin: 0 5px 0 0;
  21729. }
  21730. .courseTop {
  21731. display: flex;
  21732. flex-direction: row;
  21733. justify-content: space-between;
  21734. align-items: center;
  21735. width: calc(100% - 40px);
  21736. margin: 0 auto;
  21737. padding: 10px 0;
  21738. }
  21739. .stepsNav {
  21740. display: flex;
  21741. flex-direction: row;
  21742. justify-content: flex-start;
  21743. align-items: center;
  21744. }
  21745. .stepsWord {
  21746. font-size: 18px;
  21747. color: #fff;
  21748. font-weight: bold;
  21749. margin-left: auto;
  21750. background: rgb(15, 126, 255);
  21751. border-radius: 5px;
  21752. padding: 3px 25px;
  21753. box-sizing: border-box;
  21754. }
  21755. .stepBox {
  21756. width: calc(100% - 40px);
  21757. height: calc(100% - 50px);
  21758. overflow: hidden;
  21759. border-radius: 5px;
  21760. margin: 0 auto;
  21761. }
  21762. .rightBox {
  21763. width: calc(100%);
  21764. background: #f0f2f5;
  21765. /* border-radius: 10px; */
  21766. overflow: auto;
  21767. height: calc(100% - 150px);
  21768. margin: 0 auto;
  21769. position: relative;
  21770. box-sizing: border-box;
  21771. }
  21772. .e_add_top {
  21773. display: flex;
  21774. justify-content: space-between;
  21775. background: #fff;
  21776. position: absolute;
  21777. right: 20px;
  21778. height: 50px;
  21779. align-items: center;
  21780. }
  21781. .e_add_title2 {
  21782. display: flex;
  21783. align-items: center;
  21784. }
  21785. .e_add_title2 span {
  21786. width: 40px;
  21787. }
  21788. .e_add_title {
  21789. display: flex;
  21790. align-items: center;
  21791. color: #b8b8b8;
  21792. font-size: 18px;
  21793. position: relative;
  21794. height: 40px;
  21795. }
  21796. .e_add_title span {
  21797. margin-right: 10px;
  21798. }
  21799. .e_add_title .el_input {
  21800. width: 300px;
  21801. }
  21802. .e_add_title>>>.el-input__inner {
  21803. width: 400px;
  21804. }
  21805. .e_add_btn {}
  21806. .e_add_content {
  21807. display: flex;
  21808. width: 100%;
  21809. }
  21810. .e_add_list {
  21811. background: #fff;
  21812. height: 500px;
  21813. width: 210px;
  21814. position: relative;
  21815. margin: 15px 5px 0 0;
  21816. flex-shrink: 0;
  21817. display: flex;
  21818. flex-direction: column;
  21819. }
  21820. .e_add_list_title {
  21821. font-size: 20px;
  21822. width: 100%;
  21823. box-sizing: border-box;
  21824. padding: 15px 40px;
  21825. text-align: center;
  21826. border-bottom: 1px solid #eaeaea;
  21827. position: relative;
  21828. display: flex;
  21829. align-items: center;
  21830. justify-content: center;
  21831. height: 57px;
  21832. background: #f6f6f6;
  21833. }
  21834. .e_add_list_title span {
  21835. overflow: hidden;
  21836. white-space: nowrap;
  21837. text-overflow: ellipsis;
  21838. }
  21839. .e_add_list_title img {
  21840. position: absolute;
  21841. right: 15px;
  21842. width: 25px;
  21843. cursor: pointer;
  21844. top: 50%;
  21845. transform: translateY(-50%);
  21846. }
  21847. .e_add_list_body {
  21848. height: calc(100% - 187px);
  21849. overflow: auto;
  21850. }
  21851. .e_add_list_child {
  21852. width: 100%;
  21853. display: flex;
  21854. align-items: center;
  21855. justify-content: center;
  21856. position: relative;
  21857. box-sizing: border-box;
  21858. padding: 15px 40px;
  21859. text-align: center;
  21860. }
  21861. .e_add_list_child span {
  21862. overflow: hidden;
  21863. white-space: nowrap;
  21864. text-overflow: ellipsis;
  21865. cursor: pointer;
  21866. }
  21867. .e_add_list_child img {
  21868. position: absolute;
  21869. right: 10px;
  21870. width: 21px;
  21871. cursor: pointer;
  21872. top: 50%;
  21873. transform: translateY(-50%);
  21874. }
  21875. .e_add_list_child+.e_add_list_child {
  21876. border-top: 1px solid #eaeaea;
  21877. }
  21878. .e_add_list_child .active {
  21879. color: #409eff;
  21880. }
  21881. .e_add_list_btn {
  21882. position: absolute;
  21883. bottom: 0;
  21884. height: 50px;
  21885. background: rgb(120, 120, 254);
  21886. width: 100%;
  21887. color: #fff;
  21888. font-size: 16px;
  21889. text-align: center;
  21890. line-height: 50px;
  21891. cursor: pointer;
  21892. }
  21893. .e_add_list_detail {
  21894. position: absolute;
  21895. bottom: 0;
  21896. height: 130px;
  21897. background: rgb(120, 120, 254);
  21898. width: 100%;
  21899. color: #fff;
  21900. font-size: 16px;
  21901. display: flex;
  21902. align-items: center;
  21903. justify-content: center;
  21904. }
  21905. .e_add_list_detail textarea {
  21906. height: 90%;
  21907. width: 95%;
  21908. border: none;
  21909. resize: none;
  21910. outline: none;
  21911. padding: 5px;
  21912. box-sizing: border-box;
  21913. }
  21914. .e_add_list_pbox {
  21915. width: 100%;
  21916. }
  21917. .e_add_list_pbox_title {
  21918. height: 50px;
  21919. background: #fff;
  21920. display: flex;
  21921. align-items: center;
  21922. width: 100%;
  21923. box-sizing: border-box;
  21924. padding: 0 20px;
  21925. flex-direction: row;
  21926. flex-wrap: wrap;
  21927. }
  21928. .type_title {
  21929. font-size: 18px;
  21930. font-weight: 700;
  21931. }
  21932. .type_content {
  21933. font-size: 16px;
  21934. margin-left: 30px;
  21935. }
  21936. .type_content span+span {
  21937. margin-left: 20px;
  21938. }
  21939. .type_content span {
  21940. cursor: pointer;
  21941. padding-bottom: 5px;
  21942. box-sizing: border-box;
  21943. }
  21944. .type_content .active {
  21945. color: #409eff;
  21946. border-bottom: 2px solid #409eff;
  21947. }
  21948. .e_add_list_pbox_content {
  21949. height: calc(100% - 50px);
  21950. display: flex;
  21951. align-items: center;
  21952. width: 100%;
  21953. background: #fff;
  21954. }
  21955. .mbCss {
  21956. width: 100%;
  21957. display: flex;
  21958. flex-direction: row;
  21959. flex-wrap: nowrap;
  21960. align-content: center;
  21961. align-items: flex-start;
  21962. justify-content: flex-start;
  21963. }
  21964. .pjCss {
  21965. /* width: 42%; */
  21966. width: calc(100% - 55%);
  21967. display: flex;
  21968. flex-direction: column;
  21969. flex-wrap: nowrap;
  21970. align-items: flex-start;
  21971. }
  21972. .e_box {
  21973. /* display: flex; */
  21974. flex-wrap: wrap;
  21975. max-height: 500px;
  21976. align-items: flex-start;
  21977. overflow: auto;
  21978. width: 100%;
  21979. }
  21980. .e_card {
  21981. border: 1px solid #ccc;
  21982. background: #fff;
  21983. margin-right: 20px;
  21984. width: 270px;
  21985. display: flex;
  21986. flex-direction: column;
  21987. align-items: center;
  21988. border-radius: 5px;
  21989. margin-top: 10px;
  21990. text-align: center;
  21991. }
  21992. .e_card_picture {
  21993. margin: 10px 0;
  21994. }
  21995. .e_card_picture>img {
  21996. width: 50px;
  21997. }
  21998. .e_card_name {
  21999. width: 100%;
  22000. padding: 0 10px;
  22001. box-sizing: border-box;
  22002. margin-bottom: 10px;
  22003. overflow: hidden;
  22004. text-overflow: ellipsis;
  22005. white-space: nowrap;
  22006. }
  22007. .e_card_time {
  22008. width: 100%;
  22009. padding: 0 10px;
  22010. box-sizing: border-box;
  22011. font-size: 15px;
  22012. color: #c3c3c3;
  22013. margin-bottom: 10px;
  22014. }
  22015. .e_card_btn {
  22016. height: 40px;
  22017. display: flex;
  22018. align-items: center;
  22019. width: 100%;
  22020. background: rgb(244, 244, 244);
  22021. }
  22022. .e_card_btn:hover {
  22023. background: rgb(221 221 221);
  22024. }
  22025. .e_card_btn span {
  22026. flex: 1 1 auto;
  22027. text-align: center;
  22028. cursor: pointer;
  22029. }
  22030. .addEva {
  22031. border: 1px solid #ccc;
  22032. background: #fff;
  22033. margin-right: 20px;
  22034. width: 270px;
  22035. height: 149px;
  22036. display: flex;
  22037. flex-direction: column;
  22038. align-items: center;
  22039. border-radius: 5px;
  22040. margin-top: 10px;
  22041. text-align: center;
  22042. cursor: pointer;
  22043. justify-content: center;
  22044. }
  22045. .addEva>img {
  22046. width: 50px;
  22047. object-fit: cover;
  22048. }
  22049. .uploadFm {
  22050. border: 1px dashed #ccc;
  22051. width: 100%;
  22052. height: 140px;
  22053. position: relative;
  22054. cursor: pointer;
  22055. display: flex;
  22056. flex-direction: column;
  22057. justify-content: center;
  22058. align-items: center;
  22059. font-size: 14px;
  22060. color: #6e6e6e;
  22061. position: relative;
  22062. }
  22063. .cover_p {
  22064. width: 100% !important;
  22065. height: 100%;
  22066. object-fit: cover;
  22067. }
  22068. .uploadFm2:hover .cover_mask {
  22069. display: flex !important;
  22070. }
  22071. .cover_mask {
  22072. display: none;
  22073. width: 100%;
  22074. height: 100%;
  22075. position: absolute;
  22076. background: #00000054;
  22077. align-items: center;
  22078. justify-content: center;
  22079. flex-direction: column;
  22080. }
  22081. .cover_mask>img {
  22082. width: 30px;
  22083. }
  22084. .cover_mask>span {
  22085. color: #fff;
  22086. font-size: 12px;
  22087. }
  22088. .uploadFm>img {
  22089. width: 50px;
  22090. }
  22091. .fileCss {
  22092. width: 100%;
  22093. display: flex;
  22094. flex-direction: row;
  22095. flex-wrap: nowrap;
  22096. justify-content: space-around;
  22097. align-items: center;
  22098. padding-top: 15px;
  22099. }
  22100. .fileCss>div {
  22101. display: flex;
  22102. flex-direction: column;
  22103. align-items: center;
  22104. }
  22105. .fileCss .spanName {
  22106. margin-top: 10px;
  22107. }
  22108. .sysPicBox {
  22109. display: flex;
  22110. flex-direction: row;
  22111. flex-wrap: wrap;
  22112. align-content: flex-start;
  22113. height: 435px;
  22114. overflow: auto;
  22115. position: relative;
  22116. }
  22117. .picNone {
  22118. position: absolute;
  22119. left: 50%;
  22120. top: 45%;
  22121. transform: translate(-50%, -50%);
  22122. width: fit-content;
  22123. color: #9c9c9c;
  22124. }
  22125. .sysPic {
  22126. width: 200px;
  22127. height: 115px;
  22128. margin: 0 20px 20px 0;
  22129. cursor: pointer;
  22130. }
  22131. .sysPic>img,
  22132. .isSysPic>img,
  22133. .deletePic>img {
  22134. width: 100%;
  22135. height: 100%;
  22136. object-fit: cover;
  22137. }
  22138. .isSysPic {
  22139. width: 200px;
  22140. height: 115px;
  22141. position: relative;
  22142. }
  22143. .deletePic {
  22144. width: 20px;
  22145. height: 20px;
  22146. position: absolute;
  22147. top: 0;
  22148. right: 0;
  22149. cursor: pointer;
  22150. }
  22151. .select_box1 {
  22152. height: 100%;
  22153. }
  22154. .select_box1_img {
  22155. background: #fff;
  22156. border-radius: 5px;
  22157. padding: 15px;
  22158. box-sizing: border-box;
  22159. margin-bottom: 20px;
  22160. }
  22161. .select_box1_title {
  22162. padding: 0 0 15px 0;
  22163. border-bottom: 1px solid #eee;
  22164. margin-bottom: 15px;
  22165. }
  22166. .select_box1_title span:nth-child(1) {
  22167. font-size: 16px;
  22168. margin-right: 20px;
  22169. color: #000;
  22170. }
  22171. .select_box1_title span:nth-child(2) {
  22172. font-size: 14px;
  22173. color: rgb(112, 112, 112);
  22174. }
  22175. .select_box1_add_img {}
  22176. .select_box1_select {
  22177. background: #fff;
  22178. border-radius: 5px;
  22179. padding: 15px;
  22180. box-sizing: border-box;
  22181. height: calc(100% - 200px);
  22182. overflow: auto;
  22183. }
  22184. .select_box2 {
  22185. height: 100%;
  22186. }
  22187. .select_box2_title {
  22188. background: #fff;
  22189. border-radius: 5px;
  22190. padding: 5px 10px;
  22191. box-sizing: border-box;
  22192. margin-bottom: 10px;
  22193. }
  22194. .select_box2_box {
  22195. display: flex;
  22196. height: calc(100% - 30px);
  22197. }
  22198. .select_box2_img {
  22199. width: calc(100% - 310px);
  22200. height: 100%;
  22201. overflow: auto;
  22202. background: #fff;
  22203. border-radius: 5px;
  22204. }
  22205. .select_box2_img img {
  22206. width: 100%;
  22207. }
  22208. .select_box2_answer {
  22209. background: #fff;
  22210. margin-left: 10px;
  22211. border-radius: 5px;
  22212. width: 300px;
  22213. overflow: auto;
  22214. height: 100%;
  22215. display: flex;
  22216. flex-direction: column;
  22217. align-items: center;
  22218. padding-top: 10px;
  22219. box-sizing: border-box;
  22220. }
  22221. .select_box2_answer_box {
  22222. margin: 0 0 10px 0;
  22223. width: 85%;
  22224. }
  22225. .rate_textarea {
  22226. font: inherit;
  22227. color: currentColor;
  22228. width: 100%;
  22229. padding: 8px 14px;
  22230. display: block;
  22231. min-width: 0;
  22232. outline: none;
  22233. border: 1px solid rgba(0, 0, 0, 0.23);
  22234. border-radius: 4px;
  22235. box-sizing: border-box;
  22236. background: #fff;
  22237. margin: 0 20px 0 0;
  22238. resize: none;
  22239. }
  22240. .select_answer_title {
  22241. text-align: left;
  22242. width: 85%;
  22243. margin-bottom: 10px;
  22244. font-size: 18px;
  22245. color: #8e8e8e;
  22246. }
  22247. .mask {
  22248. background-color: rgb(0 0 0 / 30%);
  22249. /* position: fixed; */
  22250. position: absolute;
  22251. top: 0;
  22252. left: 0;
  22253. width: 100%;
  22254. height: 100%;
  22255. z-index: 90;
  22256. display: flex;
  22257. align-items: center;
  22258. justify-content: center;
  22259. }
  22260. .progressBox {
  22261. width: 300px;
  22262. height: 150px;
  22263. background: #fff;
  22264. border-radius: 10px;
  22265. box-shadow: 0 0 6px 1px #bfbfbf;
  22266. display: flex;
  22267. align-items: center;
  22268. justify-content: center;
  22269. flex-direction: column;
  22270. position: relative;
  22271. color: #6c6c6c;
  22272. }
  22273. .progressBox>>>.el-progress-bar__outer {
  22274. background-color: #d1dfff !important;
  22275. }
  22276. .progressBox .lbox {
  22277. height: 50px;
  22278. font-size: 19px;
  22279. display: flex;
  22280. align-items: center;
  22281. color: #747474;
  22282. }
  22283. .progressBox .lbox img {
  22284. width: 40px;
  22285. margin-right: 20px;
  22286. }
  22287. .closeCss {
  22288. position: absolute;
  22289. top: 8px;
  22290. right: 8px;
  22291. cursor: pointer;
  22292. width: 20px;
  22293. height: 20px;
  22294. }
  22295. .closeCss>img {
  22296. width: 100%;
  22297. height: 100%;
  22298. }
  22299. .updateTips::before {
  22300. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  22301. font-size: 14px;
  22302. margin-left: 20px;
  22303. font-weight: 400;
  22304. color: #ff3a3a;
  22305. margin-bottom: 10px;
  22306. display: block;
  22307. }
  22308. .updateMask {
  22309. width: 100%;
  22310. z-index: 3;
  22311. top: 0;
  22312. position: absolute;
  22313. /* background-color: rgba(0,0,0,.3); */
  22314. }
  22315. .t_j_box {
  22316. display: flex;
  22317. }
  22318. .t_j_box span:nth-child(1) {
  22319. width: 15%;
  22320. overflow: hidden;
  22321. margin-right: 10px;
  22322. text-overflow: ellipsis;
  22323. white-space: nowrap;
  22324. }
  22325. .t_j_box span:nth-child(2) {
  22326. width: 30%;
  22327. overflow: hidden;
  22328. text-overflow: ellipsis;
  22329. margin-right: 10px;
  22330. }
  22331. .t_j_box span:nth-child(3) {
  22332. max-width: calc(55% - 20px);
  22333. overflow: hidden;
  22334. text-overflow: ellipsis;
  22335. }
  22336. .sentenBox {
  22337. background: #fff;
  22338. height: 600px;
  22339. overflow: auto;
  22340. background-image: url("../../../assets/icon/conSentences/csBg.png");
  22341. background-position: 102%;
  22342. background-repeat: no-repeat;
  22343. background-size: 60%;
  22344. }
  22345. .sentenBox>.sentenContent {
  22346. padding-bottom: 10px;
  22347. width: 97%;
  22348. margin: 0 auto;
  22349. }
  22350. .sentenBox>.sentenContent+.sentenContent {
  22351. border-top: 1px solid #cbcbcb;
  22352. }
  22353. .addSen {
  22354. background: #409efe;
  22355. width: 90px;
  22356. color: #fff;
  22357. height: 35px;
  22358. text-align: center;
  22359. line-height: 35px;
  22360. border-radius: 5px;
  22361. float: right;
  22362. margin: 10px 20px 0 0;
  22363. cursor: pointer;
  22364. }
  22365. .sentenTop {
  22366. display: flex;
  22367. flex-direction: row;
  22368. flex-wrap: nowrap;
  22369. align-items: center;
  22370. }
  22371. .sentenTop::before {
  22372. content: attr(index);
  22373. background: #3681fc;
  22374. border-radius: 50%;
  22375. color: #fff;
  22376. width: 25px;
  22377. height: 25px;
  22378. min-width: 25px;
  22379. min-height: 25px;
  22380. text-align: center;
  22381. line-height: 25px;
  22382. margin-right: 5px;
  22383. }
  22384. .sentenTop>div:nth-child(2) {
  22385. width: 300px;
  22386. margin: 0 15px;
  22387. }
  22388. .sentenTop>div:nth-child(3) {
  22389. background: #409efe;
  22390. color: #fff;
  22391. width: 65px;
  22392. height: 35px;
  22393. text-align: center;
  22394. line-height: 35px;
  22395. border-radius: 5px;
  22396. cursor: pointer;
  22397. }
  22398. .cardList {
  22399. padding: 30px 0 20px 0;
  22400. display: flex;
  22401. flex-direction: row;
  22402. flex-wrap: wrap;
  22403. align-items: center;
  22404. box-sizing: border-box;
  22405. border-bottom: 1px solid #f4f4f4;
  22406. width: 98%;
  22407. margin: 0 auto;
  22408. }
  22409. .rightCardList {
  22410. display: flex;
  22411. flex-wrap: wrap;
  22412. }
  22413. .cardBox {
  22414. display: flex;
  22415. flex-direction: row;
  22416. flex-wrap: wrap;
  22417. align-items: center;
  22418. align-content: center;
  22419. }
  22420. .isCard,
  22421. .isCard1 {
  22422. width: auto;
  22423. padding: 0 20px;
  22424. height: 65px;
  22425. text-align: center;
  22426. line-height: 65px;
  22427. font-size: 14px;
  22428. cursor: pointer;
  22429. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  22430. background-size: 100% 100%;
  22431. position: relative;
  22432. z-index: 99;
  22433. }
  22434. .isCard1 {
  22435. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  22436. }
  22437. .isCard:hover .deleteWord {
  22438. display: block;
  22439. }
  22440. .isCard>div:nth-child(1),
  22441. .isCard1>div:nth-child(1) {
  22442. white-space: nowrap;
  22443. overflow: hidden;
  22444. text-overflow: ellipsis;
  22445. width: 100%;
  22446. margin: 0 auto;
  22447. }
  22448. .card {
  22449. width: 140px;
  22450. height: 65px;
  22451. }
  22452. .card>img {
  22453. width: 100%;
  22454. height: 100%;
  22455. }
  22456. .rightCardBox {
  22457. width: 98%;
  22458. margin: 10px auto 0;
  22459. }
  22460. .rightCardBox>div:nth-child(1) {
  22461. margin-bottom: 10px;
  22462. }
  22463. .cardCss {
  22464. display: flex;
  22465. flex-direction: column;
  22466. flex-wrap: nowrap;
  22467. align-items: center;
  22468. border-bottom: 3px solid #b4c3d3;
  22469. padding: 0 0 5px 0;
  22470. /* margin-right: 10px; */
  22471. }
  22472. .cardCss>div:nth-child(2) {
  22473. background: #5b7b9d;
  22474. color: #fff;
  22475. width: 20px;
  22476. height: 20px;
  22477. border-radius: 50%;
  22478. text-align: center;
  22479. line-height: 20px;
  22480. }
  22481. .sentenTopBox {
  22482. display: flex;
  22483. flex-direction: row;
  22484. flex-wrap: nowrap;
  22485. align-items: center;
  22486. justify-content: space-between;
  22487. padding: 55px 0 0 20px;
  22488. box-sizing: border-box;
  22489. width: 85%;
  22490. }
  22491. .rb_c_ai_box,
  22492. .stepsBottom {
  22493. width: 100%;
  22494. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  22495. /* background: #f7f7f7; */
  22496. border-radius: 10px;
  22497. overflow: hidden;
  22498. /* height: 100%; */
  22499. height: calc(100% - 55px);
  22500. }
  22501. .navTop {
  22502. background: #53749b;
  22503. color: #fff;
  22504. height: 40px;
  22505. line-height: 40px;
  22506. padding-left: 15px;
  22507. font-size: 18px;
  22508. }
  22509. .navBottom {
  22510. /* background: #6b91b7; */
  22511. height: 100%;
  22512. overflow: auto;
  22513. padding: 10px 0;
  22514. }
  22515. .navStage {
  22516. display: flex;
  22517. flex-direction: row;
  22518. flex-wrap: nowrap;
  22519. align-items: center;
  22520. padding: 10px 10px 10px 0;
  22521. cursor: pointer;
  22522. background: #ffffff;
  22523. width: 95%;
  22524. margin: 5px auto 5px;
  22525. box-sizing: border-box;
  22526. border-radius: 5px;
  22527. flex-wrap: wrap;
  22528. position: relative;
  22529. }
  22530. .navStage:hover>.chapter_upload_drag {
  22531. display: block;
  22532. }
  22533. .navTask:hover>.chapter_upload_drag {
  22534. display: block;
  22535. }
  22536. .chapter_upload:hover>.chapter_upload_drag {
  22537. display: block;
  22538. }
  22539. .navStage::before {
  22540. content: "";
  22541. display: block;
  22542. width: 16px;
  22543. height: 16px;
  22544. background-image: url(../../../assets/icon/new/icon_stage.png);
  22545. background-size: 100%;
  22546. margin-left: 25px;
  22547. }
  22548. .navStage .chapter_unit_open {
  22549. content: "";
  22550. display: block;
  22551. width: 16px;
  22552. height: 16px;
  22553. background-image: url(../../../assets/icon/new/down.png);
  22554. transform: rotate(-90deg);
  22555. background-size: 100%;
  22556. margin-left: 10px;
  22557. transition: all 0.5s;
  22558. }
  22559. .isNavStageOpen .chapter_unit_open {
  22560. transform: rotate(0deg);
  22561. }
  22562. .isNavStage {
  22563. background: #0061ff;
  22564. }
  22565. .isNavStage::before {
  22566. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  22567. }
  22568. .isNavStage .chapter_unit_open {
  22569. background-image: url(../../../assets/icon/new/downC.png);
  22570. }
  22571. .isNavStage .nt_taskName {
  22572. font-weight: bold !important;
  22573. color: #ffffff !important;
  22574. }
  22575. .isNavStage .nt_taskTitle {
  22576. font-weight: bold !important;
  22577. color: #fff !important;
  22578. }
  22579. .navStage .nt_taskBox {
  22580. width: calc(100% - 68px);
  22581. padding: 0 0 0 5px;
  22582. box-sizing: border-box;
  22583. box-sizing: border-box;
  22584. display: flex;
  22585. flex-direction: row;
  22586. flex-wrap: nowrap;
  22587. align-items: baseline;
  22588. }
  22589. .navStage .nt_taskTitle {
  22590. color: #060e17;
  22591. line-height: 25px;
  22592. font-size: 16px;
  22593. }
  22594. .navStage .nt_taskName {
  22595. max-width: calc(100% - 82px);
  22596. white-space: nowrap;
  22597. overflow: hidden;
  22598. text-overflow: ellipsis;
  22599. font-size: 16px;
  22600. color: #060e17;
  22601. }
  22602. .navTask {
  22603. display: flex;
  22604. flex-direction: row;
  22605. flex-wrap: nowrap;
  22606. align-items: center;
  22607. padding: 10px 10px 10px 0;
  22608. cursor: pointer;
  22609. background: #ffffff;
  22610. width: 95%;
  22611. margin: 5px auto 5px;
  22612. box-sizing: border-box;
  22613. border-radius: 5px;
  22614. flex-wrap: wrap;
  22615. position: relative;
  22616. }
  22617. .navTask .chapter_upload_open {
  22618. content: "";
  22619. display: block;
  22620. width: 16px;
  22621. height: 16px;
  22622. background-image: url(../../../assets/icon/new/icon_arrow.png);
  22623. background-size: 100%;
  22624. margin-left: 23px;
  22625. }
  22626. .noImage .chapter_upload_open {
  22627. display: none;
  22628. background-image: unset !important;
  22629. }
  22630. .isNavOpen .chapter_upload_open {
  22631. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  22632. transform: rotate(90deg);
  22633. }
  22634. .isNavTask .chapter_upload_open {
  22635. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  22636. transform: rotate(-90deg);
  22637. }
  22638. .isNavTask.isNavOpen .chapter_upload_open {
  22639. transform: rotate(0deg);
  22640. }
  22641. .dragOverTop {
  22642. border-top: 2px solid #0061ff !important;
  22643. border-radius: 0 !important;
  22644. margin-top: 10px;
  22645. }
  22646. .dragOverBottom {
  22647. border-bottom: 2px solid #0061ff !important;
  22648. border-radius: 0 !important;
  22649. margin-top: 10px;
  22650. }
  22651. .dragOverTop2 {
  22652. border-top: 2px solid #0061ff !important;
  22653. border-radius: 0 !important;
  22654. }
  22655. .dragOverBottom2 {
  22656. border-bottom: 2px solid #0061ff !important;
  22657. border-radius: 0 !important;
  22658. }
  22659. .isNavTask {
  22660. /* background: #3681FC; */
  22661. background: #eef3fb;
  22662. }
  22663. .isNavTask>.chapter_upload_drag {
  22664. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  22665. }
  22666. .isNavTask .nt_taskName {
  22667. /* color: #fff !important; */
  22668. font-weight: bold !important;
  22669. color: #0061ff !important;
  22670. }
  22671. .isNavTask .nt_taskTitle {
  22672. /* color: #AECCFE !important; */
  22673. font-weight: bold !important;
  22674. color: #0061ff !important;
  22675. }
  22676. .navTask .nt_taskBox {
  22677. width: calc(100% - 40px);
  22678. padding: 0 0 0 5px;
  22679. box-sizing: border-box;
  22680. box-sizing: border-box;
  22681. display: flex;
  22682. flex-direction: row;
  22683. flex-wrap: nowrap;
  22684. align-items: baseline;
  22685. }
  22686. .navTask .nt_taskTitle {
  22687. /* color: #717C8D; */
  22688. color: #060e17;
  22689. line-height: 25px;
  22690. font-size: 16px;
  22691. /* min-width: 66px; */
  22692. }
  22693. .navTask .nt_taskName {
  22694. /* color: #fff; */
  22695. /* max-width: 130px; */
  22696. /* width: 100%; */
  22697. max-width: calc(100% - 66px);
  22698. font-size: 16px;
  22699. color: #060e17;
  22700. /* color: #0E1E33; */
  22701. }
  22702. .navTask .nt_taskName span {
  22703. width: 100%;
  22704. white-space: nowrap;
  22705. overflow: hidden;
  22706. text-overflow: ellipsis;
  22707. display: block;
  22708. }
  22709. .gjBox {
  22710. width: calc(100% - 25px);
  22711. padding: 0 0 0 0;
  22712. box-sizing: border-box;
  22713. border-left: 1px solid #cad1dc;
  22714. margin-left: 25px;
  22715. }
  22716. .gjBox>div {
  22717. display: flex;
  22718. align-items: center;
  22719. }
  22720. .gjBox>div::before {
  22721. content: "";
  22722. height: 1px;
  22723. width: 10px;
  22724. background: #cad1dc;
  22725. display: block;
  22726. margin-right: 5px;
  22727. }
  22728. .gjCss {
  22729. display: flex;
  22730. flex-direction: row;
  22731. flex-wrap: nowrap;
  22732. align-items: center;
  22733. padding: 15px 0;
  22734. box-sizing: border-box;
  22735. font-size: 14px;
  22736. cursor: pointer;
  22737. }
  22738. .isGjCss {
  22739. color: #0061ff;
  22740. }
  22741. .groupBox {}
  22742. .groupContent+.groupContent {
  22743. margin-top: 30px;
  22744. }
  22745. .groupTitle {
  22746. font-size: 24px;
  22747. color: rgb(80, 80, 80);
  22748. margin-bottom: 20px;
  22749. }
  22750. .groupName {
  22751. display: flex;
  22752. align-items: center;
  22753. }
  22754. .groupn {
  22755. font-size: 15px;
  22756. margin-right: 10px;
  22757. }
  22758. .groupName+.groupName {
  22759. margin-top: 15px;
  22760. }
  22761. .groupBtn {
  22762. margin-left: 10px;
  22763. }
  22764. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  22765. text-align: left;
  22766. }
  22767. .radioBox>div {
  22768. margin: 10px 0 0 10px;
  22769. }
  22770. .radioBox>>>.el-radio__input,
  22771. .radioBox>>>.el-checkbox__inner {
  22772. margin-left: 10px;
  22773. }
  22774. .radioBox>>>.el-radio__label,
  22775. .radioBox>>>.el-checkbox__label {
  22776. display: flex;
  22777. align-items: center;
  22778. }
  22779. .inImg {
  22780. width: 50px;
  22781. }
  22782. .inImg>img {
  22783. width: 100%;
  22784. height: 100%;
  22785. object-fit: cover;
  22786. }
  22787. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  22788. height: auto;
  22789. padding: 10px;
  22790. margin: 0;
  22791. }
  22792. .upCss>>>.el-upload-list {
  22793. width: 100%;
  22794. }
  22795. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  22796. width: 100%;
  22797. height: 120px;
  22798. object-fit: contain;
  22799. background: unset;
  22800. margin-left: 0;
  22801. }
  22802. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  22803. display: none;
  22804. }
  22805. .tcMember+.tcMember::before {
  22806. content: "、";
  22807. }
  22808. .xzUpImg {
  22809. width: 25px;
  22810. height: 25px;
  22811. min-width: 25px;
  22812. min-height: 25px;
  22813. cursor: pointer;
  22814. margin: 0 10px;
  22815. }
  22816. .xzUpImg>img {
  22817. width: 100%;
  22818. height: 100%;
  22819. }
  22820. .closeCss {
  22821. position: absolute;
  22822. top: 8px;
  22823. right: 8px;
  22824. cursor: pointer;
  22825. width: 20px;
  22826. height: 20px;
  22827. }
  22828. .closeCss>img {
  22829. width: 100%;
  22830. height: 100%;
  22831. }
  22832. .moveBtn {
  22833. display: flex;
  22834. flex-direction: row;
  22835. flex-wrap: nowrap;
  22836. align-items: center;
  22837. width: 55px;
  22838. }
  22839. .timuUpImg {
  22840. display: flex;
  22841. flex-direction: row;
  22842. align-items: center;
  22843. width: 100%;
  22844. margin-right: 10px;
  22845. }
  22846. .timuUpImg>div:nth-child(1) {
  22847. margin-right: 10px;
  22848. display: flex;
  22849. align-items: center;
  22850. width: 100%;
  22851. }
  22852. .timuImgBox {
  22853. margin: 10px 0;
  22854. display: flex;
  22855. flex-direction: column;
  22856. flex-wrap: wrap;
  22857. align-items: flex-start;
  22858. }
  22859. .timuImg {
  22860. width: 100px;
  22861. margin: 5px 0;
  22862. cursor: pointer;
  22863. position: relative;
  22864. }
  22865. .timuImg:hover .deleteWord {
  22866. display: block;
  22867. }
  22868. .deleteWord {
  22869. width: 25px;
  22870. height: 25px;
  22871. position: absolute;
  22872. right: -5px;
  22873. top: -5px;
  22874. cursor: pointer;
  22875. display: none;
  22876. }
  22877. .timuImg>img,
  22878. .deleteWord>img {
  22879. width: 100%;
  22880. height: 100%;
  22881. object-fit: cover;
  22882. }
  22883. .e_add_delete {
  22884. cursor: pointer;
  22885. margin-left: 10px;
  22886. }
  22887. .pType_box {
  22888. margin-top: 30px;
  22889. align-items: flex-end;
  22890. }
  22891. .noneBox {
  22892. height: 200px;
  22893. width: 100%;
  22894. display: flex;
  22895. align-items: center;
  22896. justify-content: center;
  22897. flex-direction: column;
  22898. /* margin-top: 150px; */
  22899. }
  22900. .noneBox>img {
  22901. width: 95px;
  22902. }
  22903. .noneBox>span {
  22904. margin-top: 10px;
  22905. color: #717c8d;
  22906. }
  22907. .rb_c_box {
  22908. width: 100%;
  22909. height: 100%;
  22910. display: flex;
  22911. /* padding: 20px; */
  22912. box-sizing: border-box;
  22913. justify-content: space-between;
  22914. }
  22915. .rb_c_box_left {
  22916. height: 100%;
  22917. background: #fff;
  22918. width: 270px;
  22919. min-width: 270px;
  22920. border-radius: 8px;
  22921. margin-right: 10px;
  22922. }
  22923. .rb_c_box_right {
  22924. height: 100%;
  22925. width: calc(100%);
  22926. overflow: hidden;
  22927. }
  22928. .rb_c_box_btn {
  22929. display: flex;
  22930. justify-content: flex-start;
  22931. height: 50px;
  22932. align-items: center;
  22933. }
  22934. .rb_c_box_right>.basic_box {
  22935. /* background: #fff; */
  22936. border-radius: 0;
  22937. height: calc(100% - 0px);
  22938. overflow: auto;
  22939. padding: 0;
  22940. }
  22941. .textarea_css {
  22942. display: block;
  22943. resize: none;
  22944. padding: 10px 15px;
  22945. line-height: 1.5;
  22946. box-sizing: border-box;
  22947. width: 100%;
  22948. font-size: 14px;
  22949. color: #606266;
  22950. background-color: #fff;
  22951. background-image: none;
  22952. border: 1px solid #dcdfe6;
  22953. border-radius: 4px;
  22954. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  22955. outline: none;
  22956. overflow: hidden;
  22957. height: 46px;
  22958. font-family: "Microsoft YaHei";
  22959. }
  22960. .textarea_css::-webkit-input-placeholder {
  22961. color: #c0c4cc;
  22962. }
  22963. .textarea_css:focus {
  22964. border-color: #409eff;
  22965. outline: 0;
  22966. }
  22967. .addEditor>>>.text {
  22968. height: auto;
  22969. min-height: 100px;
  22970. }
  22971. .addEditor>>>.w-e-text-container {
  22972. min-height: 100px;
  22973. }
  22974. .moveBtn2 {
  22975. flex-direction: column;
  22976. width: fit-content;
  22977. margin: 0 10px 0 10px;
  22978. }
  22979. .moveBtn2 .chapter_upload_down,
  22980. .moveBtn2 .chapter_upload_up {
  22981. width: 16px;
  22982. height: 16px;
  22983. }
  22984. .moveBtn2 .chapter_upload_up::after,
  22985. .moveBtn2 .chapter_upload_down::after {
  22986. width: 10px;
  22987. height: 10px;
  22988. }
  22989. .fullStyle>>>.el-dialog__body {
  22990. height: calc(100% - 125px) !important;
  22991. box-sizing: border-box;
  22992. }
  22993. .fullStyle1>>>.el-dialog__body {
  22994. height: auto !important;
  22995. }
  22996. .fullStyle>>>.el-dialog {
  22997. width: 100% !important;
  22998. max-width: 100% !important;
  22999. height: 100% !important;
  23000. margin: 0 !important;
  23001. }
  23002. .fullStyle {
  23003. width: 100% !important;
  23004. max-width: 100% !important;
  23005. height: 100% !important;
  23006. margin: 0 auto !important;
  23007. }
  23008. .wb_j_box_btn {
  23009. width: calc(100% - 30px);
  23010. display: flex;
  23011. height: 40px;
  23012. border: 1.5px solid #cad1dc;
  23013. border-radius: 4px;
  23014. box-sizing: border-box;
  23015. align-items: center;
  23016. font-size: 14px;
  23017. cursor: pointer;
  23018. overflow: hidden;
  23019. }
  23020. .wb_j_box_btn:hover {
  23021. border: 1.5px solid #0061ff;
  23022. }
  23023. .wb_j_box_title {
  23024. background: #f0f4fa;
  23025. height: 100%;
  23026. line-height: 40px;
  23027. width: 90px;
  23028. text-align: center;
  23029. color: #060e17;
  23030. border-right: 1.5px solid #cad1dc;
  23031. box-sizing: border-box;
  23032. }
  23033. .wb_j_box_btn_c {
  23034. width: calc(100% - 90px);
  23035. padding: 0 35px 0 10px;
  23036. box-sizing: border-box;
  23037. position: relative;
  23038. }
  23039. .wb_j_box_span {
  23040. width: 100%;
  23041. overflow: hidden;
  23042. white-space: nowrap;
  23043. text-overflow: ellipsis;
  23044. word-wrap: break-word;
  23045. color: #717c8d;
  23046. }
  23047. .wb_j_box_arrow {
  23048. content: "";
  23049. width: 14px;
  23050. height: 14px;
  23051. background: url(../../../assets/icon/new/u_arrow.png);
  23052. background-size: 100% 100%;
  23053. position: absolute;
  23054. right: 12px;
  23055. top: 50%;
  23056. transform: translateY(-50%);
  23057. }
  23058. .check_classBox {
  23059. height: 400px;
  23060. display: flex;
  23061. border-top: 1.5px solid #e7ebf1;
  23062. border-bottom: 1.5px solid #e7ebf1;
  23063. }
  23064. .check_class_right {
  23065. width: 130px;
  23066. border-right: 1px solid #e7ebf1;
  23067. display: flex;
  23068. align-items: center;
  23069. flex-direction: column;
  23070. height: 100%;
  23071. overflow: auto;
  23072. padding: 15px 0;
  23073. box-sizing: border-box;
  23074. }
  23075. .check_class {
  23076. width: 85%;
  23077. border-radius: 5px;
  23078. height: 30px;
  23079. min-height: 30px;
  23080. line-height: 30px;
  23081. text-align: center;
  23082. padding: 0 10px;
  23083. box-sizing: border-box;
  23084. cursor: pointer;
  23085. white-space: nowrap;
  23086. overflow: hidden;
  23087. text-overflow: ellipsis;
  23088. }
  23089. .check_class.activeX {
  23090. background: #e0eafb;
  23091. color: #3681fc;
  23092. font-weight: 700;
  23093. }
  23094. .check_class+.check_class {
  23095. margin-top: 15px;
  23096. }
  23097. .check_class_left {
  23098. background: #fafafa;
  23099. width: calc(100% - 130px);
  23100. padding: 15px;
  23101. box-sizing: border-box;
  23102. }
  23103. .check_class_all_box {
  23104. display: flex;
  23105. margin-bottom: 10px;
  23106. }
  23107. .all_check {
  23108. display: flex;
  23109. align-items: center;
  23110. padding: 2px 0 0;
  23111. margin-left: 10px;
  23112. }
  23113. .all_check>>>.el-checkbox__label {
  23114. line-height: 18px;
  23115. }
  23116. .check_class_left_title {
  23117. font-size: 16px;
  23118. font-weight: 700;
  23119. }
  23120. .check_class_item {
  23121. display: flex;
  23122. flex-wrap: wrap;
  23123. height: calc(100% - 45px);
  23124. overflow: auto;
  23125. justify-content: flex-start;
  23126. align-items: flex-start;
  23127. align-content: flex-start;
  23128. }
  23129. .class_item:first-child {
  23130. /* margin: 0 15px 15px 67px; */
  23131. }
  23132. .class_item {
  23133. margin: 0 15px 15px 0;
  23134. }
  23135. .class_item:hover>>>.el-checkbox__label {
  23136. color: #409eff;
  23137. }
  23138. .class_item>>>.el-checkbox__label {
  23139. color: #0e1e33;
  23140. }
  23141. .class_item:hover>>>.el-checkbox__inner {
  23142. border-color: #409eff;
  23143. }
  23144. .class_item>>>.el-checkbox,
  23145. .class_item>>>.el-checkbox__input {
  23146. display: flex;
  23147. align-items: center;
  23148. }
  23149. .taskTitle {
  23150. font-size: 20px;
  23151. font-weight: bold;
  23152. margin-bottom: 35px;
  23153. }
  23154. .taskTitle:after {
  23155. content: "";
  23156. width: 100%;
  23157. display: block;
  23158. height: 1px;
  23159. background: #cad1dc;
  23160. position: absolute;
  23161. left: 0;
  23162. margin: 15px 0 0;
  23163. }
  23164. .eva_btn_box {
  23165. margin: 20px 0px 0 0;
  23166. display: flex;
  23167. flex-direction: row;
  23168. flex-wrap: nowrap;
  23169. align-items: center;
  23170. justify-content: space-between;
  23171. width: 100%;
  23172. }
  23173. .eva_btn_left_box {
  23174. display: flex;
  23175. flex-direction: row;
  23176. flex-wrap: nowrap;
  23177. align-items: center;
  23178. }
  23179. .addTypeChoose {
  23180. display: flex;
  23181. flex-direction: row;
  23182. flex-wrap: nowrap;
  23183. align-items: center;
  23184. margin: 15px 0;
  23185. }
  23186. .addTypeBox {
  23187. display: flex;
  23188. flex-direction: column;
  23189. flex-wrap: nowrap;
  23190. align-items: center;
  23191. }
  23192. .addTypeChoose {
  23193. display: flex;
  23194. flex-direction: row;
  23195. flex-wrap: nowrap;
  23196. align-items: center;
  23197. margin: 15px 0;
  23198. }
  23199. .buchong_box {
  23200. background: #E0EAFB66;
  23201. width: calc(100% - 20px);
  23202. min-height: 50px;
  23203. display: flex;
  23204. align-items: center;
  23205. justify-content: center;
  23206. margin: 0 auto;
  23207. }
  23208. .outline {
  23209. width: calc(100% - 40px);
  23210. margin: 0 auto;
  23211. }
  23212. .task_outline {
  23213. width: calc(100% - 40px);
  23214. margin: 0 auto;
  23215. }
  23216. .outline_box+.outline_box {
  23217. margin: 30px 0 0px;
  23218. }
  23219. .outline_task {
  23220. display: flex;
  23221. align-items: center;
  23222. margin-bottom: 10px;
  23223. }
  23224. .outline_btn{
  23225. display: flex;
  23226. align-items: center;
  23227. min-width: fit-content;
  23228. margin-left: 10px;
  23229. }
  23230. .outline_task .title {
  23231. font-size: 18px;
  23232. font-weight: bold;
  23233. min-width: 80px;
  23234. }
  23235. .op_task_box,
  23236. .op_tool_box,
  23237. .outline_detail {
  23238. position: relative;
  23239. }
  23240. .op_task_box:hover .op_box,
  23241. .op_tool_box:hover .op_box,
  23242. .outline_detail:hover .op_box {
  23243. display: flex
  23244. }
  23245. .op_box {
  23246. position: absolute;
  23247. bottom: 10px;
  23248. display: none;
  23249. align-items: center;
  23250. justify-content: space-between;
  23251. width: calc(100% - 20px);
  23252. left: 50%;
  23253. transform: translateX(-50%);
  23254. }
  23255. .op_box .op_remark {
  23256. color: #8E8E8E;
  23257. font-size: 14px;
  23258. }
  23259. .rb_c_nav {
  23260. width: calc(100% - 20px);
  23261. margin: 15px auto 0;
  23262. font-size: 18px;
  23263. }
  23264. .rb_c_nav span {
  23265. cursor: pointer;
  23266. }
  23267. .rb_c_nav span+span {
  23268. margin-left: 10px;
  23269. }
  23270. .rb_c_nav span.active {
  23271. color: #0061FF
  23272. }
  23273. .text_panel>>>.text {
  23274. height: 400px;
  23275. }
  23276. .markBox{
  23277. padding: 20px 14px;
  23278. line-height: 29px;
  23279. font-size: 16px;
  23280. background: #f4f4f4;
  23281. border-radius: 5px;
  23282. }
  23283. .info_box_t{
  23284. display: flex;
  23285. align-items: center;
  23286. }
  23287. .info_box_t + .info_box_t{
  23288. margin-top: 10px;
  23289. }
  23290. .info_box_t_box{
  23291. display: flex;
  23292. align-items: center;
  23293. }
  23294. .info_box_t_box + .info_box_t_box{
  23295. margin-left: 10px;
  23296. }
  23297. .info_box_t_box > span{
  23298. width: fit-content
  23299. }
  23300. .info_box_t_box > input{
  23301. width: 150px !important;
  23302. margin: 0 5px 0 0;
  23303. }
  23304. .mode_box{
  23305. display: flex;
  23306. align-items: center;
  23307. }
  23308. .mode_box > span{
  23309. padding: 0px 5px;
  23310. cursor: pointer;
  23311. }
  23312. .mode_box > span.active{
  23313. color: #409eff;
  23314. }
  23315. .chapter_upload_check {
  23316. width: 15px;
  23317. height: 15px;
  23318. cursor: pointer;
  23319. background-image: url('../../../assets/icon/check.png');
  23320. background-size: 100% 100%;
  23321. }
  23322. .chapter_upload_check.checked{
  23323. background-image: url('../../../assets/icon/checked.png');
  23324. }
  23325. .ruleBtn {
  23326. height: 36px;
  23327. line-height: 36px;
  23328. cursor: pointer;
  23329. color: #0061FF;
  23330. }
  23331. </style>