addCourseX.vue 714 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735
  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="templatePan.includes(templateid)">
  177. <div class="info_box_t_box">
  178. <span>课程节数:</span>
  179. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  180. <span>节</span>
  181. </div>
  182. <div class="info_box_t_box">
  183. <span>课程时长:</span>
  184. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  185. <span>min</span>
  186. </div>
  187. </div>
  188. </div>
  189. <div class="right_first" v-loading="imageloading2">
  190. <!-- <div class="ai_box">
  191. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  192. </div> -->
  193. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  194. 上传封面
  195. </div>
  196. <div style="width: 100%">
  197. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  198. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  199. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  200. <div v-if="cover.length == 0">点击添加封面</div>
  201. <div class="cover_mask">
  202. <img src="../../../assets/icon/new/cover_update.png" /><span
  203. style="margin-top: 5px">修改封面</span>
  204. </div>
  205. </div>
  206. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  207. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  208. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  209. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  210. <i class="el-icon-plus"></i>
  211. </el-upload> -->
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  219. <div class="whiteBg" style="border-radius: 0">
  220. <div class="c_info_title">
  221. 课程权限设置
  222. </div>
  223. <div class="wb_j_box">
  224. <div class="wb_j_box_content">
  225. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  226. (dialogVisibleClass = true),
  227. (classSearch = ''),
  228. (gradeId = ''),
  229. getClass()
  230. ">添加班级</button>
  231. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  232. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  233. getClassC(tc) }}</span>
  234. </div> -->
  235. <div class="wb_j_box_btn" @click="
  236. (dialogVisibleClass = true),
  237. (classSearch = ''),
  238. (gradeId = ''),
  239. getClass()
  240. ">
  241. <div class="wb_j_box_title">授课班级</div>
  242. <div class="wb_j_box_btn_c">
  243. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  244. v-if="checkboxList2.length" popper-class="text_tooltip2">
  245. <div class="wb_j_box_span">
  246. {{ getListClassC(checkboxList2) }}
  247. </div>
  248. </el-tooltip>
  249. <div v-else class="wb_j_box_span">请选择授课班级</div>
  250. <div class="wb_j_box_arrow"></div>
  251. </div>
  252. </div>
  253. </div>
  254. <div class="wb_j_box_content">
  255. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  256. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  257. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  258. checkBoolean
  259. ? checkboxList3
  260. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  261. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  262. </div> -->
  263. <div class="wb_j_box_btn" @click="openMember">
  264. <div class="wb_j_box_title">协同人员</div>
  265. <div class="wb_j_box_btn_c">
  266. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  267. v-if="checkboxList3.length" popper-class="text_tooltip2">
  268. <div class="wb_j_box_span">
  269. {{ getListMan2(checkboxList3) }}
  270. </div>
  271. </el-tooltip>
  272. <div v-else class="wb_j_box_span">请选择协同人员</div>
  273. <div class="wb_j_box_arrow"></div>
  274. </div>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  280. <div class="c_info_title">目标管理</div>
  281. <div style="margin: 0 auto; padding: 0 20px">
  282. <div style="
  283. width: 95%;
  284. min-height: 200px;
  285. border: 1px solid #cad1dc;
  286. border-radius: 4px;
  287. position: relative;
  288. ">
  289. <div class="e_add_top">
  290. <div class="e_add_title">
  291. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  292. 清除
  293. </button>
  294. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  295. 添加
  296. </button>
  297. <!-- <span>当前使用目标管理</span>
  298. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  299. <img
  300. src="../../../assets/line.png"
  301. class="cru_line"
  302. style="
  303. width: 125px;
  304. height: 20px;
  305. bottom: -10px;
  306. left: 155px;
  307. "
  308. /> -->
  309. </div>
  310. <div style="
  311. display: flex;
  312. flex-direction: row;
  313. align-items: center;
  314. ">
  315. <!-- <el-button
  316. type="primary"
  317. size="small"
  318. @click="dialogVisiblemb = true"
  319. >添加目标管理</el-button
  320. >
  321. <el-button
  322. type="primary"
  323. size="small"
  324. @click="deleteEva()"
  325. >清除内容</el-button
  326. > -->
  327. <!-- <div class="e_add_delete" @click="deleteEva()">
  328. <img src="../../../assets/icon/delete.png" alt="" />
  329. </div> -->
  330. </div>
  331. </div>
  332. <div v-if="evalua == ''">
  333. <div class="noneBox">
  334. <img src="../../../assets/icon/new/eva_none.png" />
  335. <span>请添加目标管理</span>
  336. </div>
  337. </div>
  338. <div class="e_add_content" v-else>
  339. <div class="e_add_list_pbox">
  340. <div class="e_add_list_pbox_title">
  341. <span class="type_title">切换模式</span>
  342. <div class="type_content">
  343. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  344. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  345. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  346. </div>
  347. </div>
  348. <div class="e_add_list_pbox_content">
  349. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  350. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  351. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  352. v-if="typeMode == 3">
  353. </SeeBoard>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. </div>
  360. </div>
  361. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等...">
  362. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  363. <div class="c_info_title">
  364. 课程简要描述
  365. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  366. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  367. @contextmenu.prevent="openAiDialog(1, 'aiDetail')"
  368. @click="openAiDialog(2, 'aiDetail')">AI优化</button>
  369.                   </el-tooltip>
  370. </div>
  371. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  372. <div style="width: calc(100%)">
  373. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  374. placeholder="请输入课程简要描述"></textarea>
  375. </div>
  376. </div>
  377. </div>
  378. </div>
  379. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;">
  380. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  381. <div class="c_info_title">
  382. 补充资料
  383. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  384. </div>
  385. <div class="buchong_box">
  386. <span>暂时还没有内容,快去添加吧~</span>
  387. </div>
  388. </div> -->
  389. <div style="position: relative;
  390. background: #fff;
  391. box-sizing: border-box;
  392. padding: 1px 20px 10px;
  393. width: 100%;
  394. border-radius: 10px;">
  395. <div style="
  396. display: flex;
  397. flex-direction: row;
  398. justify-content: space-between;
  399. align-items: center;
  400. " :style="{
  401. margin: true
  402. ? '20px 0 10px'
  403. : '20px 0 0',
  404. }">
  405. <div style="margin-bottom: 10px;width:100%" class="lineTitle">
  406. 补充资料
  407. <div class="add_info_box" style="margin: 0 0 0 auto">
  408. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  409. 上传补充资料
  410. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" style="display: none" v-if="inputShow" @change="
  411. beforeUploadInfo2(
  412. $event,
  413. 13
  414. )
  415. " />
  416. </button>
  417. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  418. 图文
  419. </button>
  420. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  421. 链接
  422. </button>
  423. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  424. 代码
  425. </button>
  426. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  427. 资源
  428. </button> -->
  429. </div>
  430. </div>
  431. </div>
  432. <div>
  433. <div class="add_chapters_box add_c_none" v-if="
  434. infoData &&
  435. infoData.length == 0
  436. ">
  437. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  438. </div>
  439. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  440. <div @dragstart="
  441. dragStart(item1, index1, 0)
  442. " @dragover.prevent="
  443. dragOver(index1, 0)
  444. " @dragend="dragEnd()" :draggable="isdrag ==
  445. 'chapter-' + 0 + '-' + index1
  446. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  447. getChapterData(
  448. $event,
  449. index1,
  450. item1.type
  451. )
  452. " :class="{
  453. dragOverTop2:
  454. newIndex === index1 &&
  455. typeIndex ==
  456. 'chapter-' +
  457. 0 +
  458. '-' +
  459. index1 &&
  460. oldIndex > index1 &&
  461. dragType == 'drag',
  462. dragOverBottom2:
  463. newIndex === index1 &&
  464. typeIndex ==
  465. 'chapter-' +
  466. 0 +
  467. '-' +
  468. index1 &&
  469. oldIndex < index1 &&
  470. dragType == 'drag',
  471. }">
  472. <!-- <div @mousedown="
  473. isdrag =
  474. 'chapter-' + 0 + '-' + index1
  475. " @mouseup="isdrag = ''" @touchstart="
  476. isdrag =
  477. 'chapter-' + 0 + '-' + index1
  478. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  479. <div class="chapter_upload_o" style="
  480. position: relative;
  481. display: flex;
  482. align-items: center;
  483. ">
  484. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  485. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  486. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  487. </div>
  488. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  489. </div>
  490. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  491. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  492. </div>
  493. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  494. </div>
  495. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  496. </div>
  497. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  498. </div>
  499. </div>
  500. <div class="chapter_upload_n">
  501. <input readonly="true" v-if="
  502. item1.type == 2 ||
  503. item1.type == 3 ||
  504. item1.type == 12 ||
  505. item1.type == 13 ||
  506. item1.type == 7
  507. " :placeholder="item1.name" @click="
  508. updataVideoT(
  509. $event,
  510. index1
  511. )
  512. " style="
  513. border: none;
  514. outline: none;
  515. width: 80%;
  516. minwidth: 215px;
  517. z-index: 99;
  518. font-size: 14px;
  519. white-space: nowrap;
  520. overflow: hidden;
  521. text-overflow: ellipsis;
  522. " />
  523. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  524. border: none;
  525. outline: none;
  526. width: 80%;
  527. white-space: nowrap;
  528. overflow: hidden;
  529. text-overflow: ellipsis;
  530. " readonly="true" @click="
  531. selectAttText(index1)
  532. " />
  533. <input :placeholder="item1.title ? item1.title : '链接'
  534. " v-if="item1.type == 8" style="
  535. border: none;
  536. outline: none;
  537. width: 80%;
  538. white-space: nowrap;
  539. overflow: hidden;
  540. text-overflow: ellipsis;
  541. " readonly="true" @click="selectLine(index1)" />
  542. <input :placeholder="item1.title ? item1.title : '链接'
  543. " v-if="item1.type == 14" style="
  544. border: none;
  545. outline: none;
  546. width: 80%;
  547. white-space: nowrap;
  548. overflow: hidden;
  549. text-overflow: ellipsis;
  550. " readonly="true" @click="
  551. openUpdateSource(index1)
  552. " />
  553. </div>
  554. <div class="chapter_upload_ic">
  555. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  556. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  557. <div class="chapter_upload_up" @click="
  558. upCd(
  559. $event,
  560. index1
  561. )
  562. "></div>
  563. <div class="chapter_upload_down" @click="
  564. downCd(
  565. $event,
  566. index1
  567. )
  568. "></div>
  569. </div>
  570. <div class="chapter_upload_ic_edit" v-if="
  571. item1.type == 2 ||
  572. item1.type == 3 ||
  573. item1.type == 12 ||
  574. item1.type == 13 ||
  575. item1.type == 7
  576. " @click.stop="
  577. updataVideoT(
  578. $event,
  579. index1
  580. )
  581. ">
  582. <div></div>
  583. </div>
  584. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  585. selectAttText(index1)
  586. ">
  587. <div></div>
  588. </div>
  589. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  590. @click="selectLine(index1)">
  591. <div></div>
  592. </div>
  593. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  594. openUpdateSource(index1)
  595. ">
  596. <div></div>
  597. </div> -->
  598. <div class="chapter_upload_ic_r" @click.stop="
  599. deleteInfoData(
  600. $event,
  601. index1
  602. )
  603. ">
  604. <div></div>
  605. </div>
  606. </div>
  607. </div>
  608. </div>
  609. </div>
  610. </div>
  611. <div v-if="
  612. infoproVisible
  613. " class="mask">
  614. <div class="progressBox">
  615. <!-- <div id="closePro" class="closeCss">
  616. <img src="../../../../assets/icon/close.png" alt />
  617. </div> -->
  618. <div class="lbox">
  619. <img src="../../../assets/loading.gif" />上传中,请稍后
  620. </div>
  621. <div style="margin-bottom: 10px">
  622. <span>{{
  623. infoisFinishSize
  624. }}M</span>
  625. /
  626. <span>{{
  627. infoisAllSize
  628. }}M</span>
  629. </div>
  630. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  631. ? infoprogress
  632. : 0
  633. " style="width: 80%"></el-progress>
  634. </div>
  635. </div>
  636. </div>
  637. </div>
  638. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="false">
  639. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  640. <div class="c_info_title">
  641. 补充描述
  642. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  643. </div>
  644. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  645. <div style="width: calc(100%)">
  646. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  647. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  648. </div>
  649. </div>
  650. </div>
  651. </div>
  652. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && isOutline">
  653. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  654. <div class="c_info_title">
  655. 课程大纲
  656. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  657. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  658. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  659. @click="openAiDialog(2, 'aiOutline')">生成大纲</button>
  660. </el-tooltip>
  661. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  662. </div>
  663. <div class="task_outline">
  664. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  665. <div class="outline_task">
  666. <div class="title">任务{{ index + 1 }}</div>
  667. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  668. v-model="item.task" />
  669. </div>
  670. <div class="outline_detail" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  671. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  672. placeholder="请输入任务描述" v-model="item.taskDetail2"></textarea>
  673. <div class="op_box">
  674. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  675. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  676. <div class="r_pub_button_op"
  677. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  678. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  679. </el-tooltip>
  680. </div>
  681. </div>
  682. </div>
  683. </div>
  684. </div>
  685. </div>
  686. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 0">
  687. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  688. <div class="c_info_title">
  689. 概念群
  690. </div>
  691. <div class="task_outline">
  692. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  693. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  694. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  695. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  696. <div class="op_box">
  697. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  698. <div style="display: flex;">
  699. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  700. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  701. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  702. </el-tooltip>
  703. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  704. cpote.cpote1s ? '确定' : '编辑'}}</div>
  705. </div>
  706. </div>
  707. </div>
  708. </div>
  709. </div>
  710. </div>
  711. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 1">
  712. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  713. <div class="c_info_title">
  714. 问题链
  715. </div>
  716. <div class="task_outline">
  717. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  718. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  719. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  720. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  721. <div class="op_box">
  722. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  723. <div style="display: flex;">
  724. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  725. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  726. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  727. </el-tooltip>
  728. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  729. cpote.cpote2s ? '确定' : '编辑'}}</div>
  730. </div>
  731. </div>
  732. </div>
  733. </div>
  734. </div>
  735. </div>
  736. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 2">
  737. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  738. <div class="c_info_title">
  739. 目标层
  740. </div>
  741. <div class="task_outline">
  742. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  743. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  744. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  745. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  746. <div class="op_box">
  747. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  748. <div style="display: flex;">
  749. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  750. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  751. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  752. </el-tooltip>
  753. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  754. cpote.cpote3s ? '确定' : '编辑'}}</div>
  755. </div>
  756. </div>
  757. </div>
  758. </div>
  759. </div>
  760. </div>
  761. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-show="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && cpoteType > 3">
  762. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  763. <div class="c_info_title">
  764. 任务簇
  765. </div>
  766. <div class="task_outline">
  767. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  768. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  769. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  770. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  771. <div class="op_box">
  772. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  773. <div style="display: flex;">
  774. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  775. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  776. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  777. </el-tooltip>
  778. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  779. cpote.cpote4s ? '确定' : '编辑'}}</div>
  780. </div>
  781. </div>
  782. </div>
  783. </div>
  784. </div>
  785. </div>
  786. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  787. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  788. <div class="c_info_title">
  789. 教案
  790. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length">
  791. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  792. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  793. @click="openAiDialog(2, 'aiTeacher2')" v-if="istemplate == 1 && dArray.length">生成教案</button>
  794. </el-tooltip>
  795. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  796. </div>
  797. <div class="task_outline">
  798. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  799. <div class="outline_task">
  800. <div class="title">任务{{ index + 1 }}</div>
  801. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  802. v-model="item.task" />
  803. </div>
  804. <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  805. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  806. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  807. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  808. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  809. <div class="op_box">
  810. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  811. <div style="display: flex;">
  812. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  813. <div class="r_pub_button_op"
  814. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  815. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  816. </el-tooltip>
  817. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  818. item.isTask3 ? '确定' : '编辑'}}</div>
  819. </div>
  820. </div>
  821. </div>
  822. </div>
  823. </div>
  824. </div>
  825. </div>
  826. <div class="info_btnBox3" v-if="istemplate != 1">
  827. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  828. goTo(
  829. '/course?userid=' +
  830. userid +
  831. '&oid=' +
  832. oid +
  833. '&org=' +
  834. org +
  835. '&role=' +
  836. role
  837. )
  838. ">
  839. 返回课程
  840. </button>
  841. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  842. {{ steps == 4 ? "返回课程" : "上一步" }}
  843. </button>
  844. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="steps < 4">
  845. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  846. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5'" :class="{
  847. pub_btn_next_img: steps != 3,
  848. pub_btn_finish_img: steps == 3,
  849. }">
  850. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  851. </button>
  852. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  853. @contextmenu.prevent="nextSteps(1)" :class="{
  854. pub_btn_next_img: steps != 3,
  855. pub_btn_finish_img: steps == 3,
  856. }">
  857. {{ steps == 3 ? "确认上传" : (templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" && cpoteType < 4) ?
  858. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  859. : "下一步" }}
  860. </button>
  861. </el-tooltip>
  862. </div>
  863. </div>
  864. <div class="rightBox" v-if="steps == 2" :style="{
  865. height:
  866. !isStepDisplay && !isBtnDisplay
  867. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  868. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  869. }">
  870. <div class="basic_box" style="
  871. padding: 20px 30px 0px !important;
  872. box-sizing: border-box;
  873. height: calc(100% - 80px);
  874. overflow: auto;
  875. background: #fff;
  876. ">
  877. <!-- <div
  878. style="
  879. color: #b8b8b8;
  880. background: #fff;
  881. width: 26%;
  882. height: 40px;
  883. border-radius: 15px;
  884. padding-left: 20px;
  885. line-height: 40px;
  886. font-size: 17px;
  887. box-shadow: 0px 1px 2px 2px #e0e0e0;
  888. "
  889. >-->
  890. <div class="right_title" style="border: none; margin: 0; padding: 0">
  891. 请选择合适的课程模板
  892. </div>
  893. <div class="wordbox">
  894. <div class="wordTeacher" @click="checkTemplate2()">
  895. <div class="wordPic">
  896. <img src="../../../assets/icon/new/template_none.png" alt />
  897. </div>
  898. <div style="
  899. margin-top: 10px;
  900. line-height: 19px;
  901. overflow: hidden;
  902. text-overflow: ellipsis;
  903. white-space: nowrap;
  904. padding: 0 20px;
  905. ">
  906. 空白模板
  907. </div>
  908. </div>
  909. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  910. <div class="wordPic">
  911. <img src="../../../assets/icon/new/template.png" alt />
  912. </div>
  913. <div style="
  914. margin-top: 10px;
  915. line-height: 19px;
  916. overflow: hidden;
  917. text-overflow: ellipsis;
  918. white-space: nowrap;
  919. padding: 0 20px;
  920. ">
  921. {{ aa.title }}
  922. </div>
  923. </div>
  924. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  925. <div class="wordPic">
  926. <img src="../../../assets/icon/new/template.png" alt />
  927. </div>
  928. <div style="
  929. margin-top: 10px;
  930. line-height: 19px;
  931. overflow: hidden;
  932. text-overflow: ellipsis;
  933. white-space: nowrap;
  934. padding: 0 20px;
  935. ">
  936. 简易模板
  937. </div>
  938. </div>
  939. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  940. <div class="wordPic">
  941. <img src="../../../assets/icon/new/template.png" alt />
  942. </div>
  943. <div style="
  944. margin-top: 10px;
  945. line-height: 19px;
  946. overflow: hidden;
  947. text-overflow: ellipsis;
  948. white-space: nowrap;
  949. padding: 0 20px;
  950. ">
  951. 智能粘贴模式
  952. </div>
  953. </div>
  954. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  955. <div class="wordPic">
  956. <img src="../../../assets/icon/wordMub.png" alt />
  957. </div>
  958. <div style="
  959. margin-top: 10px;
  960. line-height: 19px;
  961. overflow: hidden;
  962. text-overflow: ellipsis;
  963. white-space: nowrap;
  964. padding: 0 20px;
  965. ">
  966. 未来小学课程设计
  967. </div>
  968. </div> -->
  969. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  970. <div class="wordPic">
  971. <img src="../../../assets/icon/wordMub.png" alt />
  972. </div>
  973. <div style="
  974. margin-top: 10px;
  975. line-height: 19px;
  976. overflow: hidden;
  977. text-overflow: ellipsis;
  978. white-space: nowrap;
  979. padding: 0 20px;
  980. ">
  981. 我的课程
  982. </div>
  983. </div> -->
  984. </div>
  985. </div>
  986. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  987. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  988. goTo(
  989. '/course?userid=' +
  990. userid +
  991. '&oid=' +
  992. oid +
  993. '&org=' +
  994. org +
  995. '&role=' +
  996. role
  997. )
  998. ">
  999. 返回课程
  1000. </button>
  1001. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1002. {{ steps == 4 ? "返回课程" : "上一步" }}
  1003. </button>
  1004. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1005. pub_btn_next_img: steps != 3,
  1006. pub_btn_finish_img: steps == 3,
  1007. }">
  1008. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1009. </button>
  1010. </div>
  1011. </div>
  1012. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1013. height:
  1014. !isStepDisplay && !isBtnDisplay
  1015. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1016. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1017. }">
  1018. <div class="rb_c_box">
  1019. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1020. <div class="rb_c_nav">
  1021. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1022. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1023. </div>
  1024. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1025. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1026. position: istemplate == 1 ? 'sticky' : 'unset',
  1027. top: istemplate == 1 ? '0' : 'unset'
  1028. }">
  1029. <!-- <div class="navTop">辅助导航</div> -->
  1030. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  1031. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1032. <div class="nt_taskBox" style="width: 100%;">
  1033. <div class="nt_taskTitle"
  1034. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1035. unitIndex + 1 }}</div>
  1036. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1037. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1038. <span>{{ unitJson[unitIndex].dyName }}</span>
  1039. </el-tooltip>
  1040. </div>
  1041. </div>
  1042. </div> -->
  1043. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1044. .taskJson" :key="tIndex" :class="{
  1045. dragOverTop:
  1046. newIndex === tIndex &&
  1047. typeIndex == 'task-' + tIndex &&
  1048. oldIndex > tIndex &&
  1049. dragType == 'task',
  1050. dragOverBottom:
  1051. newIndex === tIndex &&
  1052. typeIndex == 'task-' + tIndex &&
  1053. oldIndex < tIndex &&
  1054. dragType == 'task',
  1055. }">
  1056. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1057. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1058. class="navTask" :class="{
  1059. isNavTask:
  1060. isClickColor > 0 && isClickColor == tIndex + 1,
  1061. isNavOpen: t.toolOpen,
  1062. }">
  1063. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1064. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1065. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1066. class="chapter_upload_drag"></div>
  1067. <div class="nt_taskBox">
  1068. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1069. <div class="nt_taskName">
  1070. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1071. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1072. </el-tooltip>
  1073. </div>
  1074. </div>
  1075. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1076. 1
  1077. ">
  1078. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1079. @click.stop="taskMove(1, tIndex)"></div>
  1080. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1081. @click.stop="taskMove(2, tIndex)"></div>
  1082. </div> -->
  1083. </div>
  1084. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1085. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1086. @click="jumpGj(tIndex, toolIndex2)">
  1087. <div class="gjCss" :class="{
  1088. isGjCss:
  1089. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1090. }">
  1091. <div>工具{{ toolIndex2 + 1 }}:</div>
  1092. <div>
  1093. {{
  1094. toolsData[tool.tool[0]] &&
  1095. toolsData[tool.tool[0]].name
  1096. }}
  1097. </div>
  1098. </div>
  1099. </div>
  1100. </div>
  1101. </div>
  1102. </div>
  1103. <div class="navBottom" v-if="courseState == 1">
  1104. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1105. dragOverTop:
  1106. newIndex === stageIndex &&
  1107. typeIndex == 'Unit-' + stageIndex &&
  1108. oldIndex > stageIndex &&
  1109. dragType == 'Unit',
  1110. dragOverBottom:
  1111. newIndex === stageIndex &&
  1112. typeIndex == 'Unit-' + stageIndex &&
  1113. oldIndex < stageIndex &&
  1114. dragType == 'Unit',
  1115. }">
  1116. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1117. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1118. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1119. isNavStage: stageIndex == unitIndex,
  1120. isNavStageOpen: stage.toolOpen,
  1121. }">
  1122. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1123. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1124. class="chapter_upload_drag"></div>
  1125. <div class="nt_taskBox">
  1126. <div class="nt_taskTitle">
  1127. 第{{ stageIndex + 1 }}阶段:
  1128. </div>
  1129. <div class="nt_taskName">
  1130. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1131. " placement="top">
  1132. <span>{{
  1133. stage.dyName ? stage.dyName : "未命名阶段"
  1134. }}</span>
  1135. </el-tooltip>
  1136. </div>
  1137. </div>
  1138. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1139. </div>
  1140. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1141. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1142. dragOverTop:
  1143. newIndex === tIndex &&
  1144. typeIndex == 'task-' + tIndex &&
  1145. ((oldIndex > tIndex &&
  1146. stageIndex == checkUnitIndex) ||
  1147. (oldIndex == tIndex &&
  1148. stageIndex == checkUnitIndex &&
  1149. checkUnitIndex != oldUnitIndex)) &&
  1150. dragType == 'task',
  1151. dragOverBottom:
  1152. newIndex === tIndex &&
  1153. typeIndex == 'task-' + tIndex &&
  1154. oldIndex < tIndex &&
  1155. stageIndex == checkUnitIndex &&
  1156. dragType == 'task',
  1157. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  1158. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  1159. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  1160. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  1161. isNavTask:
  1162. isClickColor > 0 &&
  1163. isClickColor == tIndex + 1 &&
  1164. stageIndex == unitIndex,
  1165. isNavOpen: t.toolOpen,
  1166. }">
  1167. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  1168. <div @mousedown="
  1169. isdrag = 'task-' + stageIndex + '-' + tIndex
  1170. " @mouseup="isdrag = ''" @touchstart="
  1171. isdrag = 'task-' + stageIndex + '-' + tIndex
  1172. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  1173. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  1174. <div class="nt_taskTitle">
  1175. 任务{{ tIndex + 1 }}:
  1176. </div>
  1177. <div class="nt_taskName">
  1178. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1179. <span>{{
  1180. t.task ? t.task : "未命名任务"
  1181. }}</span>
  1182. </el-tooltip>
  1183. </div>
  1184. </div>
  1185. </div>
  1186. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1187. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1188. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  1189. <div class="gjCss" :class="{
  1190. isGjCss:
  1191. toolIndexType ==
  1192. `gj${tIndex}${toolIndex2}${stageIndex}`,
  1193. }">
  1194. <div>工具{{ toolIndex2 + 1 }}:</div>
  1195. <div>
  1196. {{
  1197. toolsData[tool.tool[0]] &&
  1198. toolsData[tool.tool[0]].name
  1199. }}
  1200. </div>
  1201. </div>
  1202. </div>
  1203. </div>
  1204. </div>
  1205. </div>
  1206. </div>
  1207. </div>
  1208. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  1209. <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
  1210. </div>
  1211. </div>
  1212. <div class="rb_c_box_right">
  1213. <!-- <div class="rb_c_box_btn">
  1214. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  1215. </div> -->
  1216. <div class="basic_box" ref="unitBox">
  1217. <div v-if="false" style="
  1218. display: flex;
  1219. flex-direction: row;
  1220. align-items: center;
  1221. position: sticky;
  1222. top: 0;
  1223. z-index: 99;
  1224. width: 100%;
  1225. padding: 0 20px 0 20px;
  1226. box-sizing: border-box;
  1227. background: #fff;
  1228. border-radius: 8px;
  1229. ">
  1230. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  1231. <div class="cru_selectBox" :style="{
  1232. maxWidth: isPasteTask
  1233. ? 'calc(100% - 335px)'
  1234. : 'calc(100% - 190px)',
  1235. }" v-if="courseState == 1">
  1236. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  1237. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  1238. <!-- item.dyName ? item.dyName : -->
  1239. <span v-if="
  1240. unitJson[unitJson.length - 1].easy == 4 ||
  1241. unitJson[unitJson.length - 1].easy == 6
  1242. ">{{
  1243. item.dyName
  1244. ? item.dyName
  1245. : "第" + (index + 1) + "阶段"
  1246. }}</span>
  1247. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  1248. </div>
  1249. <div class="cru_line" :style="{
  1250. left: offsetLetfPx + 'px',
  1251. }"></div>
  1252. </div>
  1253. <div class="addStageImg" @click="addunit()" v-if="
  1254. !(unitJson[unitJson.length - 1].easy == 4) &&
  1255. !(unitJson[unitJson.length - 1].easy == 6) &&
  1256. courseState == 1
  1257. ">
  1258. <img src="../../../assets/icon/new/addStage.png" alt />
  1259. </div>
  1260. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  1261. v-if="courseState == 2" style="margin: 15px 0">
  1262. 新建阶段
  1263. </button>
  1264. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  1265. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  1266. 阶段顺序
  1267. </button>
  1268. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  1269. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  1270. 智能粘贴
  1271. </button>
  1272. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  1273. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  1274. }" style="padding: 0 12px">
  1275. 选择课程模板
  1276. </button>
  1277. </div>
  1278. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  1279. :key="index">
  1280. <div style="position: relative;
  1281. background: #fff;
  1282. box-sizing: border-box;
  1283. padding: 1px 20px 10px;
  1284. width: 100%;
  1285. border-radius: 10px;">
  1286. <div style="
  1287. display: flex;
  1288. flex-direction: row;
  1289. justify-content: space-between;
  1290. align-items: center;
  1291. " :style="{
  1292. margin: !item.taskJson[0].isFoldchapter
  1293. ? '20px 0 10px'
  1294. : '20px 0 0',
  1295. }">
  1296. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  1297. 学习内容
  1298. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1299. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1300. @contextmenu.prevent="openAiDialog(1, 'aiTask',()=>{loading = false})"
  1301. @click="openAiDialog(2, 'aiTask',()=>{loading = false})">生成任务</button>
  1302. </el-tooltip>
  1303. </div>
  1304. </div>
  1305. <div>
  1306. <div class="add_chapters_box add_c_none" v-if="
  1307. item.taskJson[0].chapterData &&
  1308. item.taskJson[0].chapterData.length == 0
  1309. ">
  1310. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  1311. </div>
  1312. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1313. <div @dragstart="
  1314. dragStart(item1, index1, 0)
  1315. " @dragover.prevent="
  1316. dragOver(index1, 0)
  1317. " @dragend="dragEnd()" :draggable="isdrag ==
  1318. 'chapter-' + 0 + '-' + index1
  1319. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  1320. :key="item1.id" @click="
  1321. getChapterData(
  1322. $event,
  1323. unitIndex,
  1324. index,
  1325. index1,
  1326. item1.type
  1327. )
  1328. " :class="{
  1329. dragOverTop2:
  1330. newIndex === index1 &&
  1331. typeIndex ==
  1332. 'chapter-' +
  1333. 0 +
  1334. '-' +
  1335. index1 &&
  1336. oldIndex > index1 &&
  1337. dragType == 'drag',
  1338. dragOverBottom2:
  1339. newIndex === index1 &&
  1340. typeIndex ==
  1341. 'chapter-' +
  1342. 0 +
  1343. '-' +
  1344. index1 &&
  1345. oldIndex < index1 &&
  1346. dragType == 'drag',
  1347. }">
  1348. <div @mousedown="
  1349. isdrag =
  1350. 'chapter-' + 0 + '-' + index1
  1351. " @mouseup="isdrag = ''" @touchstart="
  1352. isdrag =
  1353. 'chapter-' + 0 + '-' + index1
  1354. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  1355. <div class="chapter_upload_o" style="
  1356. position: relative;
  1357. display: flex;
  1358. align-items: center;
  1359. ">
  1360. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1361. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1362. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1363. </div>
  1364. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1365. </div>
  1366. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1367. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1368. </div>
  1369. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1370. </div>
  1371. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1372. </div>
  1373. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1374. </div>
  1375. </div>
  1376. <div class="chapter_upload_n">
  1377. <input readonly="true" v-if="
  1378. item1.type == 2 ||
  1379. item1.type == 3 ||
  1380. item1.type == 12 ||
  1381. item1.type == 13 ||
  1382. item1.type == 7
  1383. " :placeholder="item1.name" @click="
  1384. updataVideoT(
  1385. $event,
  1386. unitIndex,
  1387. 0,
  1388. index1
  1389. )
  1390. " style="
  1391. border: none;
  1392. outline: none;
  1393. width: 80%;
  1394. minwidth: 215px;
  1395. z-index: 99;
  1396. font-size: 14px;
  1397. white-space: nowrap;
  1398. overflow: hidden;
  1399. text-overflow: ellipsis;
  1400. " />
  1401. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1402. border: none;
  1403. outline: none;
  1404. width: 80%;
  1405. white-space: nowrap;
  1406. overflow: hidden;
  1407. text-overflow: ellipsis;
  1408. " readonly="true" @click="
  1409. selectAttText(0, index1)
  1410. " />
  1411. <input :placeholder="item1.title ? item1.title : '链接'
  1412. " v-if="item1.type == 8" style="
  1413. border: none;
  1414. outline: none;
  1415. width: 80%;
  1416. white-space: nowrap;
  1417. overflow: hidden;
  1418. text-overflow: ellipsis;
  1419. " readonly="true" @click="selectLine(0, index1)" />
  1420. <input :placeholder="item1.title ? item1.title : '链接'
  1421. " v-if="item1.type == 14" style="
  1422. border: none;
  1423. outline: none;
  1424. width: 80%;
  1425. white-space: nowrap;
  1426. overflow: hidden;
  1427. text-overflow: ellipsis;
  1428. " readonly="true" @click="
  1429. openUpdateSource(0, index1)
  1430. " />
  1431. </div>
  1432. <div class="chapter_upload_ic">
  1433. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1434. <div class="chapter_upload_ud" style="z-index: 99">
  1435. <div class="chapter_upload_up" @click="
  1436. upCd(
  1437. $event,
  1438. unitIndex,
  1439. index,
  1440. 0,
  1441. index1
  1442. )
  1443. "></div>
  1444. <div class="chapter_upload_down" @click="
  1445. downCd(
  1446. $event,
  1447. unitIndex,
  1448. index,
  1449. 0,
  1450. index1
  1451. )
  1452. "></div>
  1453. </div>
  1454. <div class="chapter_upload_ic_edit" v-if="
  1455. item1.type == 2 ||
  1456. item1.type == 3 ||
  1457. item1.type == 12 ||
  1458. item1.type == 13 ||
  1459. item1.type == 7
  1460. " @click.stop="
  1461. updataVideoT(
  1462. $event,
  1463. unitIndex,
  1464. 0,
  1465. index1
  1466. )
  1467. ">
  1468. <div></div>
  1469. </div>
  1470. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1471. selectAttText(0, index1)
  1472. ">
  1473. <div></div>
  1474. </div>
  1475. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1476. @click="selectLine(0, index1)">
  1477. <div></div>
  1478. </div>
  1479. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1480. openUpdateSource(0, index1)
  1481. ">
  1482. <div></div>
  1483. </div>
  1484. <div class="chapter_upload_ic_r" @click.stop="
  1485. deleteChapterData(
  1486. $event,
  1487. unitIndex,
  1488. index,
  1489. index1,
  1490. 0
  1491. )
  1492. ">
  1493. <div></div>
  1494. </div>
  1495. </div>
  1496. </div>
  1497. </div>
  1498. </div>
  1499. </div>
  1500. <div class="add_info_box" style="margin: 10px 0 0">
  1501. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1502. 文件
  1503. <input type="file" accept="*" style="display: none" v-if="inputShow" @change="
  1504. beforeUpload2(
  1505. $event,
  1506. unitIndex,
  1507. 13,
  1508. 0
  1509. )
  1510. " />
  1511. </button>
  1512. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1513. 图文
  1514. </button>
  1515. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1516. 链接
  1517. </button>
  1518. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1519. 代码
  1520. </button>
  1521. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1522. 资源
  1523. </button>
  1524. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  1525. AI生成PPT
  1526. </button>
  1527. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  1528. AI生成教案
  1529. </button>
  1530. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  1531. 智能检索视频
  1532. </button>
  1533. </div>
  1534. <div v-if="
  1535. unitJson[unitIndex].chapterInfo[0].taskJson[
  1536. 0
  1537. ].proVisible
  1538. " class="mask">
  1539. <div class="progressBox">
  1540. <!-- <div id="closePro" class="closeCss">
  1541. <img src="../../../../assets/icon/close.png" alt />
  1542. </div> -->
  1543. <div class="lbox">
  1544. <img src="../../../assets/loading.gif" />上传中,请稍后
  1545. </div>
  1546. <div style="margin-bottom: 10px">
  1547. <span>{{
  1548. unitJson[unitIndex].chapterInfo[0].taskJson[
  1549. 0
  1550. ].isFinishSize
  1551. }}M</span>
  1552. /
  1553. <span>{{
  1554. unitJson[unitIndex].chapterInfo[0].taskJson[
  1555. 0
  1556. ].isAllSize
  1557. }}M</span>
  1558. </div>
  1559. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  1560. 0
  1561. ].progress
  1562. ? unitJson[unitIndex].chapterInfo[0]
  1563. .taskJson[0].progress
  1564. : 0
  1565. " style="width: 80%"></el-progress>
  1566. </div>
  1567. </div>
  1568. </div>
  1569. <div class="chapter_box" v-if="courseState == 1">
  1570. <div class="chapter_contentbox">
  1571. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  1572. <div class="cc_input">
  1573. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  1574. v-model="unitJson[unitIndex].dyName" />
  1575. </div>
  1576. <div class="remove" v-if="
  1577. (unitJson.length > 1 || courseState != 2) &&
  1578. !(unitJson[unitJson.length - 1].easy == 4) &&
  1579. !(unitJson[unitJson.length - 1].easy == 6)
  1580. " @click="deleteUnit(unitIndex)"></div>
  1581. </div>
  1582. </div>
  1583. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  1584. margin: 50px 0px 10px;
  1585. font-size: 1.5em;
  1586. font-weight: 700;
  1587. color: #0f7eff;
  1588. ">
  1589. 添加任务
  1590. </div> -->
  1591. <div class="taskBorder" :style="{
  1592. minHeight: unitJson[unitIndex].easy && 'unset',
  1593. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  1594. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
  1595. <div style="background: #fff; border-radius: 5px">
  1596. <div class="taskTitle">任务{{ itemTaskIndex + 1 }}</div>
  1597. <!-- padding: 20px; -->
  1598. <div v-if="unitJson[unitIndex].easy != 1">
  1599. <div :style="{
  1600. marginBottom:
  1601. unitJson[unitIndex].easy == 3 ||
  1602. (unitJson[unitIndex].easy == 5 &&
  1603. itemTask.taskType == 1)
  1604. ? '75px'
  1605. : '0',
  1606. }">
  1607. <div style="
  1608. display: flex;
  1609. margin: 0px 0 20px;
  1610. flex-direction: row;
  1611. justify-content: flex-start;
  1612. align-items: center;
  1613. ">
  1614. <div class="lineTitle">任务概述</div>
  1615. </div>
  1616. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  1617. flex-direction: row;
  1618. justify-content: flex-start;
  1619. align-items: center;
  1620. margin: 0;
  1621. ">
  1622. <!-- <div class="cc_title">
  1623. 任务{{ itemTaskIndex + 1 }}
  1624. </div> -->
  1625. <div class="cc_input">
  1626. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1627. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1628. itemTaskIndex
  1629. ].task
  1630. " />
  1631. </div>
  1632. <div class="remove" v-if="
  1633. item.taskJson.length > 1 &&
  1634. (!unitJson[unitIndex].easy ||
  1635. unitJson[unitIndex].easy == 6)
  1636. " @click="deleteTask(itemTaskIndex)"></div>
  1637. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  1638. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  1639. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  1640. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  1641. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  1642. </div> -->
  1643. </div>
  1644. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  1645. display: flex;
  1646. margin: 20px 0;
  1647. flex-direction: row;
  1648. justify-content: flex-start;
  1649. align-items: center;
  1650. ">
  1651. <div class="lineTitle">任务描述</div>
  1652. </div> && !itemTask.isFold2-->
  1653. <div v-if="
  1654. easyArray.indexOf(unitJson[unitIndex].easy) ==
  1655. -1
  1656. " style="margin-top: 20px" class="op_task_box"
  1657. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1658. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1659. itemTaskIndex
  1660. ].taskDetail
  1661. " @change="change"></editor-bar> -->
  1662. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1663. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1664. itemTaskIndex
  1665. ].taskDetail
  1666. "></textarea>
  1667. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  1668. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  1669. itemTaskIndex
  1670. ].taskDetail
  1671. "></textarea> -->
  1672. <div class="op_box">
  1673. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1674. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1675. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  1676. itemTaskIndex
  1677. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  1678. itemTaskIndex
  1679. ], itemTaskIndex)">智能优化</div>
  1680. </el-tooltip>
  1681. </div>
  1682. </div>
  1683. </div>
  1684. </div>
  1685. <div v-if="
  1686. unitJson[unitIndex].easy == 1 ||
  1687. (unitJson[unitIndex].easy == 5 &&
  1688. itemTask.taskType == 2)
  1689. ">
  1690. <div>
  1691. <div class="add_chapters_box add_c_none" v-if="
  1692. itemTask.chapterData &&
  1693. itemTask.chapterData.length == 0
  1694. ">
  1695. <img src="../../../assets/icon/new/c_none.png" alt />
  1696. </div>
  1697. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1698. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  1699. dragOver(index1, itemTaskIndex)
  1700. " @dragend="dragEnd()" :draggable="isdrag ==
  1701. 'chapter-' + itemTaskIndex + '-' + index1
  1702. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  1703. :key="item1.id" @click="
  1704. getChapterData(
  1705. $event,
  1706. unitIndex,
  1707. index,
  1708. index1,
  1709. item1.type
  1710. )
  1711. " :class="{
  1712. dragOverTop2:
  1713. newIndex === index1 &&
  1714. typeIndex ==
  1715. 'chapter-' +
  1716. itemTaskIndex +
  1717. '-' +
  1718. index1 &&
  1719. oldIndex > index1,
  1720. dragOverBottom2:
  1721. newIndex === index1 &&
  1722. typeIndex ==
  1723. 'chapter-' +
  1724. itemTaskIndex +
  1725. '-' +
  1726. index1 &&
  1727. oldIndex < index1,
  1728. }">
  1729. <div @mousedown="
  1730. isdrag =
  1731. 'chapter-' + itemTaskIndex + '-' + index1
  1732. " @mouseup="isdrag = ''" @touchstart="
  1733. isdrag =
  1734. 'chapter-' + itemTaskIndex + '-' + index1
  1735. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  1736. <div class="chapter_upload_t" style="width: 100%"></div>
  1737. <div class="chapter_upload_o" style="
  1738. position: relative;
  1739. display: flex;
  1740. align-items: center;
  1741. ">
  1742. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1743. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1744. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1745. </div>
  1746. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1747. </div>
  1748. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1749. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1750. </div>
  1751. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1752. </div>
  1753. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1754. </div>
  1755. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1756. </div>
  1757. </div>
  1758. <div class="chapter_upload_n">
  1759. <span style="
  1760. font-size: 14px;
  1761. color: rgb(109, 109, 109);
  1762. height: 14px;
  1763. line-height: 14px;
  1764. " v-if="
  1765. item1.type == 2 ||
  1766. item1.type == 3 ||
  1767. item1.type == 7
  1768. ">{{ item1.text }}-</span>
  1769. <input readonly="true" v-if="
  1770. item1.type == 2 ||
  1771. item1.type == 3 ||
  1772. item1.type == 7
  1773. " :placeholder="item1.name" @click="
  1774. updataVideoT(
  1775. $event,
  1776. unitIndex,
  1777. itemTaskIndex,
  1778. index1
  1779. )
  1780. " style="
  1781. border: none;
  1782. outline: none;
  1783. width: 80%;
  1784. minwidth: 215px;
  1785. z-index: 99;
  1786. font-size: 14px;
  1787. white-space: nowrap;
  1788. overflow: hidden;
  1789. text-overflow: ellipsis;
  1790. " />
  1791. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1792. border: none;
  1793. outline: none;
  1794. width: 80%;
  1795. white-space: nowrap;
  1796. overflow: hidden;
  1797. text-overflow: ellipsis;
  1798. " readonly="true" @click="
  1799. selectAttText(itemTaskIndex, index1)
  1800. " />
  1801. <input :placeholder="item1.title ? item1.title : '链接'
  1802. " v-if="item1.type == 8 || item1.type == 14" style="
  1803. border: none;
  1804. outline: none;
  1805. width: 80%;
  1806. white-space: nowrap;
  1807. overflow: hidden;
  1808. text-overflow: ellipsis;
  1809. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  1810. </div>
  1811. <div class="chapter_upload_ic">
  1812. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1813. <div class="chapter_upload_ud" style="z-index: 99">
  1814. <div class="chapter_upload_up" @click="
  1815. upCd(
  1816. $event,
  1817. unitIndex,
  1818. index,
  1819. itemTaskIndex,
  1820. index1
  1821. )
  1822. "></div>
  1823. <div class="chapter_upload_down" @click="
  1824. downCd(
  1825. $event,
  1826. unitIndex,
  1827. index,
  1828. itemTaskIndex,
  1829. index1
  1830. )
  1831. "></div>
  1832. </div>
  1833. <div class="chapter_upload_ic_edit" v-if="
  1834. item1.type == 2 ||
  1835. item1.type == 3 ||
  1836. item1.type == 12 ||
  1837. item1.type == 13 ||
  1838. item1.type == 7
  1839. " @click.stop="
  1840. updataVideoT(
  1841. $event,
  1842. unitIndex,
  1843. itemTaskIndex,
  1844. index1
  1845. )
  1846. ">
  1847. <div></div>
  1848. </div>
  1849. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1850. selectAttText(itemTaskIndex, index1)
  1851. ">
  1852. <div></div>
  1853. </div>
  1854. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1855. @click="selectLine(itemTaskIndex, index1)">
  1856. <div></div>
  1857. </div>
  1858. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1859. openUpdateSource(itemTaskIndex, index1)
  1860. ">
  1861. <div></div>
  1862. </div>
  1863. <div class="chapter_upload_ic_r" @click.stop="
  1864. deleteChapterData(
  1865. $event,
  1866. unitIndex,
  1867. index,
  1868. index1,
  1869. itemTaskIndex
  1870. )
  1871. ">
  1872. <div></div>
  1873. </div>
  1874. </div>
  1875. </div>
  1876. </div>
  1877. </div>
  1878. </div>
  1879. <div class="add_info_box" style="margin: 10px 0 0">
  1880. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1881. <span style="color: red">*</span>
  1882. 教学设计
  1883. <input type="file"
  1884. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  1885. style="display: none" v-if="inputShow" @change="
  1886. beforeUpload3(
  1887. $event,
  1888. unitIndex,
  1889. 3,
  1890. itemTaskIndex,
  1891. '教学设计'
  1892. )
  1893. " />
  1894. </button>
  1895. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1896. <span style="color: red">*</span>
  1897. 教学课件
  1898. <input type="file"
  1899. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  1900. style="display: none" v-if="inputShow" @change="
  1901. beforeUpload3(
  1902. $event,
  1903. unitIndex,
  1904. 3,
  1905. itemTaskIndex,
  1906. '教学课件'
  1907. )
  1908. " />
  1909. </button>
  1910. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1911. 教学视频
  1912. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  1913. style="display: none" v-if="inputShow" @change="
  1914. beforeUpload3(
  1915. $event,
  1916. unitIndex,
  1917. 2,
  1918. itemTaskIndex,
  1919. '教学视频'
  1920. )
  1921. " />
  1922. </button>
  1923. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1924. 教学音频
  1925. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  1926. beforeUpload3(
  1927. $event,
  1928. unitIndex,
  1929. 2,
  1930. itemTaskIndex,
  1931. '教学音频'
  1932. )
  1933. " />
  1934. </button>
  1935. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1936. 学习单
  1937. <input type="file"
  1938. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  1939. style="display: none" v-if="inputShow" @change="
  1940. beforeUpload3(
  1941. $event,
  1942. unitIndex,
  1943. 3,
  1944. itemTaskIndex,
  1945. '学习单'
  1946. )
  1947. " />
  1948. </button>
  1949. </div>
  1950. <div v-if="
  1951. unitJson[unitIndex].chapterInfo[0].taskJson[
  1952. itemTaskIndex
  1953. ].proVisible
  1954. " class="mask">
  1955. <div class="progressBox">
  1956. <!-- <div id="closePro" class="closeCss">
  1957. <img src="../../../../assets/icon/close.png" alt />
  1958. </div> -->
  1959. <div class="lbox">
  1960. <img src="../../../assets/loading.gif" />上传中,请稍后
  1961. </div>
  1962. <div style="margin-bottom: 10px">
  1963. <span>{{
  1964. unitJson[unitIndex].chapterInfo[0].taskJson[
  1965. itemTaskIndex
  1966. ].isFinishSize
  1967. }}M</span>
  1968. /
  1969. <span>{{
  1970. unitJson[unitIndex].chapterInfo[0].taskJson[
  1971. itemTaskIndex
  1972. ].isAllSize
  1973. }}M</span>
  1974. </div>
  1975. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  1976. itemTaskIndex
  1977. ].progress
  1978. ? unitJson[unitIndex].chapterInfo[0]
  1979. .taskJson[itemTaskIndex].progress
  1980. : 0
  1981. " style="width: 80%"></el-progress>
  1982. </div>
  1983. </div>
  1984. </div>
  1985. </div>
  1986. <!-- padding: 20px; -->
  1987. <div style="
  1988. background: #fff;
  1989. border-radius: 5px;
  1990. margin-top: 15px;
  1991. ">
  1992. <div v-if="
  1993. unitJson[unitIndex].easy != 3 &&
  1994. !(
  1995. unitJson[unitIndex].easy == 5 &&
  1996. itemTask.taskType == 1
  1997. )
  1998. " style="
  1999. flex-direction: row;
  2000. justify-content: flex-start;
  2001. align-items: center;
  2002. ">
  2003. <div style="
  2004. display: flex;
  2005. flex-direction: row;
  2006. align-items: center;
  2007. margin: 5px 0 20px;
  2008. ">
  2009. <div class="lineTitle clineTitle">
  2010. {{
  2011. !unitJson[unitIndex].easy ||
  2012. unitJson[unitIndex].easy == 6 ||
  2013. easyArray.indexOf(unitJson[unitIndex].easy) !=
  2014. -1
  2015. ? "练习内容"
  2016. : "评价内容"
  2017. }}
  2018. </div>
  2019. <!-- <div class="line" style="width: 90%"></div> -->
  2020. </div>
  2021. </div>
  2022. <div v-if="
  2023. unitJson[unitIndex].easy == 6 ||
  2024. !unitJson[unitIndex].easy
  2025. " class="toolChoose">
  2026. <div class="tools">
  2027. <div class="leftTools" style="width: 100%" v-for="(
  2028. itemTool, toolIndex
  2029. ) in itemTask.toolChoose" :key="toolIndex">
  2030. <div style="
  2031. display: flex;
  2032. flex-direction: row;
  2033. align-items: baseline;
  2034. flex-wrap: nowrap;
  2035. justify-content: flex-start;
  2036. position: relative;
  2037. ">
  2038. <div style="margin-right: 20px; font-weight: bold"
  2039. :id="'gj' + itemTaskIndex + '' + toolIndex">
  2040. 工具 {{ toolIndex + 1 }} :
  2041. </div>
  2042. <div class="chooseWho">
  2043. <div :class="itemTool.toolType == 0
  2044. ? 'isChooseActive'
  2045. : ''
  2046. " @click="
  2047. (itemTool.toolType = 0),
  2048. (itemTool.isFold3 = false),
  2049. $forceUpdate()
  2050. ">
  2051. 互动类
  2052. </div>
  2053. <div :class="itemTool.toolType == 1
  2054. ? 'isChooseActive'
  2055. : ''
  2056. " @click="
  2057. (itemTool.toolType = 1),
  2058. (itemTool.isFold3 = false),
  2059. $forceUpdate()
  2060. ">
  2061. 思维类
  2062. </div>
  2063. <div :class="itemTool.toolType == 6
  2064. ? 'isChooseActive'
  2065. : ''
  2066. " @click="
  2067. (itemTool.toolType = 6),
  2068. (itemTool.isFold3 = false),
  2069. $forceUpdate()
  2070. ">
  2071. 协作类
  2072. </div>
  2073. <div :class="itemTool.toolType == 2
  2074. ? 'isChooseActive'
  2075. : ''
  2076. " @click="
  2077. (itemTool.toolType = 2),
  2078. (itemTool.isFold3 = false),
  2079. $forceUpdate()
  2080. ">
  2081. 测评类
  2082. </div>
  2083. <div :class="itemTool.toolType == 7
  2084. ? 'isChooseActive'
  2085. : ''
  2086. " @click="
  2087. (itemTool.toolType = 7),
  2088. (itemTool.isFold3 = false),
  2089. $forceUpdate()
  2090. ">
  2091. 评价类
  2092. </div>
  2093. <div :class="itemTool.toolType == 3
  2094. ? 'isChooseActive'
  2095. : ''
  2096. " @click="
  2097. (itemTool.toolType = 3),
  2098. (itemTool.isFold3 = false),
  2099. $forceUpdate()
  2100. ">
  2101. 编程类
  2102. </div>
  2103. <div :class="itemTool.toolType == 5
  2104. ? 'isChooseActive'
  2105. : ''
  2106. " @click="
  2107. (itemTool.toolType = 5),
  2108. (itemTool.isFold3 = false),
  2109. $forceUpdate()
  2110. ">
  2111. 学科类
  2112. </div>
  2113. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  2114. " @click="(itemTool.toolType = 4), $forceUpdate()">
  2115. 其他
  2116. </div> -->
  2117. </div>
  2118. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  2119. margin:
  2120. itemTask.toolChoose.length > 1
  2121. ? '0px 35px 0px auto'
  2122. : '0 0 0 auto',
  2123. }" v-if="itemTask.toolChoose.length > 1">
  2124. <div class="chapter_upload_up2" @click.stop="
  2125. upTool(
  2126. $event,
  2127. unitIndex,
  2128. itemTaskIndex,
  2129. toolIndex
  2130. )
  2131. ">
  2132. 上移
  2133. </div>
  2134. <div class="chapter_upload_down2" @click.stop="
  2135. downTool(
  2136. $event,
  2137. unitIndex,
  2138. itemTaskIndex,
  2139. toolIndex
  2140. )
  2141. ">
  2142. 下移
  2143. </div>
  2144. </div>
  2145. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  2146. @click="fold3(itemTaskIndex, toolIndex)"
  2147. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  2148. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  2149. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  2150. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  2151. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  2152. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  2153. v-if="itemTask.toolChoose.length > 1" style="
  2154. position: absolute;
  2155. right: 0;
  2156. top: -5px;
  2157. "></div>
  2158. </div>
  2159. <!-- v-show="!itemTool.isFold3" -->
  2160. <div style="min-height: 163px">
  2161. <div class="toolSort" v-if="itemTool.toolType == 0">
  2162. <!-- <div class="tool">
  2163. <div
  2164. class="whiteBIcon"
  2165. @click="addTools(8, itemTaskIndex, toolIndex)"
  2166. >
  2167. <img src="../../../assets/icon/secondToolList/library.png" alt />
  2168. <div style="margin: 5px 0">素材库</div>
  2169. </div>
  2170. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  2171. <img
  2172. src="../../../assets/icon/checkNo.png"
  2173. alt
  2174. v-if="itemTool.tool.indexOf(8) == -1"
  2175. />
  2176. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  2177. alt /><span>已选择</span></div>
  2178. </div>
  2179. </div>-->
  2180. <!-- <div class="tool">
  2181. <div
  2182. class="whiteBIcon"
  2183. @click="addTools(17, itemTaskIndex, toolIndex)"
  2184. >
  2185. <img
  2186. src="../../../assets/icon/secondToolList/library.png"
  2187. alt
  2188. />
  2189. <div style="margin: 5px 0">学习资料</div>
  2190. </div>
  2191. <div
  2192. class="check"
  2193. @click="addTools(17, itemTaskIndex, toolIndex)"
  2194. >
  2195. <img
  2196. src="../../../assets/icon/checkNo.png"
  2197. alt
  2198. v-if="itemTool.tool.indexOf(17) == -1"
  2199. />
  2200. <img
  2201. src="../../../assets/icon/checkedIs.png"
  2202. alt
  2203. v-else
  2204. />
  2205. </div>10
  2206. </div> -->
  2207. <div class="tool" :class="{
  2208. isToolChoose:
  2209. itemTool.tool.indexOf(10) != -1,
  2210. }" @click="
  2211. addTools(10, itemTaskIndex, toolIndex)
  2212. ">
  2213. <div class="whiteBIcon" @click.stop="
  2214. openTools(itemTaskIndex, 10, toolIndex)
  2215. ">
  2216. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  2217. <div style="margin: 5px 0">倒计时</div>
  2218. </div>
  2219. <div class="noCTool">
  2220. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2221. </div>
  2222. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  2223. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2224. </div>
  2225. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  2226. <img src="../../../assets/icon/checkNo.png" alt
  2227. v-if="itemTool.tool.indexOf(10) == -1" />
  2228. <div class="checkDiv" v-else>
  2229. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2230. </div>
  2231. </div> -->
  2232. </div>
  2233. <div class="tool" :class="{
  2234. isToolChoose:
  2235. itemTool.tool.indexOf(65) != -1,
  2236. }" @click="
  2237. addTools(65, itemTaskIndex, toolIndex)
  2238. ">
  2239. <div class="whiteBIcon" @click.stop="
  2240. addTools(65, itemTaskIndex, toolIndex)
  2241. ">
  2242. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  2243. <div style="margin: 5px 0">挑人</div>
  2244. </div>
  2245. <div class="noCTool">
  2246. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2247. </div>
  2248. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  2249. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2250. </div>
  2251. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  2252. <img src="../../../assets/icon/checkNo.png" alt
  2253. v-if="itemTool.tool.indexOf(65) == -1" />
  2254. <div class="checkDiv" v-else>
  2255. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2256. </div>
  2257. </div> -->
  2258. </div>
  2259. <!-- <div class="tool">
  2260. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  2261. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  2262. <div style="margin: 5px 0">学生分组</div>
  2263. </div>
  2264. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  2265. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  2266. <div class="checkDiv" v-else>
  2267. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2268. </div>
  2269. </div>
  2270. </div> -->
  2271. <!-- <div class="tool">
  2272. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  2273. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  2274. <div style="margin: 5px 0">交互视频</div>
  2275. </div>
  2276. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  2277. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  2278. <div class="checkDiv" v-else>
  2279. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2280. </div>
  2281. </div>
  2282. </div> -->
  2283. </div>
  2284. <div class="toolSort" v-if="itemTool.toolType == 1">
  2285. <div class="tool" :class="{
  2286. isToolChoose:
  2287. itemTool.tool.indexOf(7) != -1,
  2288. }" @click="
  2289. addTools(7, itemTaskIndex, toolIndex)
  2290. ">
  2291. <div class="whiteBIcon" @click.stop="
  2292. addTools(7, itemTaskIndex, toolIndex)
  2293. ">
  2294. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  2295. <div style="margin: 5px 0">思维网格</div>
  2296. </div>
  2297. <div class="noCTool">
  2298. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2299. </div>
  2300. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  2301. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2302. </div>
  2303. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  2304. <img src="../../../assets/icon/checkNo.png" alt
  2305. v-if="itemTool.tool.indexOf(7) == -1" />
  2306. <div class="checkDiv" v-else>
  2307. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2308. </div>
  2309. </div> -->
  2310. </div>
  2311. <div class="tool" :class="{
  2312. isToolChoose:
  2313. itemTool.tool.indexOf(1) != -1,
  2314. }" @click="
  2315. addTools(1, itemTaskIndex, toolIndex)
  2316. ">
  2317. <div class="whiteBIcon" @click.stop="
  2318. openTools(itemTaskIndex, 1, toolIndex)
  2319. ">
  2320. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  2321. <div style="margin: 5px 0">电子白板</div>
  2322. </div>
  2323. <div class="noCTool">
  2324. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2325. </div>
  2326. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  2327. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2328. </div>
  2329. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  2330. <img src="../../../assets/icon/checkNo.png" alt
  2331. v-if="itemTool.tool.indexOf(1) == -1" />
  2332. <div class="checkDiv" v-else>
  2333. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2334. </div>
  2335. </div> -->
  2336. </div>
  2337. <!-- <div class="tool">
  2338. <div
  2339. class="whiteBIcon"
  2340. @click="addTools(2, itemTaskIndex, toolIndex)"
  2341. >
  2342. <img
  2343. src="../../../assets/icon/secondToolList/note.png"
  2344. alt
  2345. />
  2346. <div style="margin: 5px 0">便签</div>
  2347. </div>
  2348. <div
  2349. class="check"
  2350. @click="addTools(2, itemTaskIndex, toolIndex)"
  2351. >
  2352. <img
  2353. src="../../../assets/icon/checkNo.png"
  2354. alt
  2355. v-if="itemTool.tool.indexOf(2) == -1"
  2356. />
  2357. <div class="checkDiv" v-else>
  2358. <img
  2359. src="../../../assets/icon/checkedIs.png"
  2360. alt
  2361. /><span>已选择</span>
  2362. </div>
  2363. </div>
  2364. </div> -->
  2365. <!-- <div class="tool">
  2366. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  2367. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  2368. <div style="margin: 5px 0">协同文档</div>
  2369. </div>
  2370. <div
  2371. class="check"
  2372. @click="addTools(6, itemTaskIndex, toolIndex)"
  2373. >
  2374. <img
  2375. src="../../../assets/icon/checkNo.png"
  2376. alt
  2377. v-if="itemTool.tool.indexOf(6) == -1"
  2378. />
  2379. <div class="checkDiv" v-else>
  2380. <img
  2381. src="../../../assets/icon/checkedIs.png"
  2382. alt
  2383. /><span>已选择</span>
  2384. </div>
  2385. </div>
  2386. </div> -->
  2387. <div class="tool" :class="{
  2388. isToolChoose:
  2389. itemTool.tool.indexOf(52) != -1,
  2390. }" @click="
  2391. addTools(52, itemTaskIndex, toolIndex)
  2392. ">
  2393. <div class="whiteBIcon" @click.stop="
  2394. openTools(itemTaskIndex, 52, toolIndex)
  2395. ">
  2396. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  2397. <div style="margin: 5px 0">文档</div>
  2398. </div>
  2399. <div class="noCTool">
  2400. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2401. </div>
  2402. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  2403. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2404. </div>
  2405. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  2406. <img src="../../../assets/icon/checkNo.png" alt
  2407. v-if="itemTool.tool.indexOf(52) == -1" />
  2408. <div class="checkDiv" v-else>
  2409. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2410. </div>
  2411. </div> -->
  2412. </div>
  2413. <div class="tool" :class="{
  2414. isToolChoose:
  2415. itemTool.tool.indexOf(3) != -1,
  2416. }" @click="
  2417. addTools(3, itemTaskIndex, toolIndex)
  2418. ">
  2419. <div class="whiteBIcon" @click.stop="
  2420. openTools(itemTaskIndex, 3, toolIndex)
  2421. ">
  2422. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  2423. <div style="margin: 5px 0">思维导图</div>
  2424. </div>
  2425. <div class="noCTool">
  2426. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2427. </div>
  2428. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  2429. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2430. </div>
  2431. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  2432. <img src="../../../assets/icon/checkNo.png" alt
  2433. v-if="itemTool.tool.indexOf(3) == -1" />
  2434. <div class="checkDiv" v-else>
  2435. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2436. </div>
  2437. </div> -->
  2438. </div>
  2439. <div class="tool" :class="{
  2440. isToolChoose:
  2441. itemTool.tool.indexOf(48) != -1,
  2442. }" @click="
  2443. addTools(48, itemTaskIndex, toolIndex)
  2444. ">
  2445. <div class="whiteBIcon" @click.stop="
  2446. openTools(itemTaskIndex, 48, toolIndex)
  2447. ">
  2448. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  2449. <div style="margin: 5px 0">表格</div>
  2450. </div>
  2451. <div class="noCTool">
  2452. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2453. </div>
  2454. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  2455. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2456. </div>
  2457. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  2458. <img src="../../../assets/icon/checkNo.png" alt
  2459. v-if="itemTool.tool.indexOf(48) == -1" />
  2460. <div class="checkDiv" v-else>
  2461. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2462. </div>
  2463. </div> -->
  2464. </div>
  2465. </div>
  2466. <div class="toolSort" v-if="itemTool.toolType == 6">
  2467. <div class="tool" :class="{
  2468. isToolChoose:
  2469. itemTool.tool.indexOf(49) != -1,
  2470. }" @click="
  2471. addTools(49, itemTaskIndex, toolIndex)
  2472. ">
  2473. <div class="whiteBIcon" @click.stop="
  2474. openTools(itemTaskIndex, 49, toolIndex)
  2475. ">
  2476. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  2477. <div style="margin: 5px 0">学生分组</div>
  2478. </div>
  2479. <div class="noCTool">
  2480. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2481. </div>
  2482. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  2483. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2484. </div>
  2485. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  2486. <img src="../../../assets/icon/checkNo.png" alt
  2487. v-if="itemTool.tool.indexOf(49) == -1" />
  2488. <div class="checkDiv" v-else>
  2489. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2490. </div>
  2491. </div> -->
  2492. </div>
  2493. </div>
  2494. <div class="toolSort" v-if="itemTool.toolType == 2">
  2495. <!-- <div class="tool">
  2496. <div
  2497. class="whiteBIcon"
  2498. @click="addTools(5, itemTaskIndex, toolIndex)"
  2499. >
  2500. <img
  2501. src="../../../assets/icon/thirdToolList/score.png"
  2502. alt
  2503. />
  2504. <div style="margin: 5px 0">量规评分</div>
  2505. </div>
  2506. <div
  2507. class="check"
  2508. @click="addTools(5, itemTaskIndex, toolIndex)"
  2509. >
  2510. <img
  2511. src="../../../assets/icon/checkNo.png"
  2512. alt
  2513. v-if="itemTool.tool.indexOf(5) == -1"
  2514. />
  2515. <img
  2516. src="../../../assets/icon/checkedIs.png"
  2517. alt
  2518. v-else
  2519. />
  2520. </div>
  2521. </div>-->
  2522. <div class="tool" :class="{
  2523. isToolChoose:
  2524. itemTool.tool.indexOf(4) != -1,
  2525. }" @click="
  2526. addTools(4, itemTaskIndex, toolIndex)
  2527. ">
  2528. <div class="whiteBIcon" @click.stop="
  2529. openTools(itemTaskIndex, 4, toolIndex)
  2530. ">
  2531. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  2532. <div style="margin: 5px 0">问卷调查</div>
  2533. </div>
  2534. <div class="noCTool">
  2535. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2536. </div>
  2537. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  2538. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2539. </div>
  2540. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  2541. <img src="../../../assets/icon/checkNo.png" alt
  2542. v-if="itemTool.tool.indexOf(4) == -1" />
  2543. <div class="checkDiv" v-else>
  2544. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2545. </div>
  2546. </div> -->
  2547. </div>
  2548. <div class="tool" :class="{
  2549. isToolChoose:
  2550. itemTool.tool.indexOf(45) != -1,
  2551. }" @click="
  2552. addTools(45, itemTaskIndex, toolIndex)
  2553. ">
  2554. <div class="whiteBIcon" @click="
  2555. openTools(itemTaskIndex, 45, toolIndex)
  2556. ">
  2557. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  2558. <div style="margin: 5px 0">选择题</div>
  2559. </div>
  2560. <div class="noCTool">
  2561. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2562. </div>
  2563. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  2564. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2565. </div>
  2566. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  2567. <img src="../../../assets/icon/checkNo.png" alt
  2568. v-if="itemTool.tool.indexOf(45) == -1" />
  2569. <div class="checkDiv" v-else>
  2570. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2571. </div>
  2572. </div> -->
  2573. </div>
  2574. <div class="tool" :class="{
  2575. isToolChoose:
  2576. itemTool.tool.indexOf(15) != -1,
  2577. }" @click="
  2578. addTools(15, itemTaskIndex, toolIndex)
  2579. ">
  2580. <div class="whiteBIcon" @click.stop="
  2581. openTools(itemTaskIndex, 15, toolIndex)
  2582. ">
  2583. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  2584. <div style="margin: 5px 0">问答</div>
  2585. </div>
  2586. <div class="noCTool">
  2587. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2588. </div>
  2589. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  2590. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2591. </div>
  2592. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  2593. <img src="../../../assets/icon/checkNo.png" alt
  2594. v-if="itemTool.tool.indexOf(15) == -1" />
  2595. <div class="checkDiv" v-else>
  2596. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2597. </div>
  2598. </div> -->
  2599. </div>
  2600. <div class="tool" :class="{
  2601. isToolChoose:
  2602. itemTool.tool.indexOf(16) != -1,
  2603. }" @click="
  2604. addTools(16, itemTaskIndex, toolIndex)
  2605. ">
  2606. <div class="whiteBIcon" @click.stop="
  2607. addTools(16, itemTaskIndex, toolIndex)
  2608. ">
  2609. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  2610. <div style="margin: 5px 0">作业提交</div>
  2611. </div>
  2612. <div class="noCTool">
  2613. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2614. </div>
  2615. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  2616. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2617. </div>
  2618. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  2619. <img src="../../../assets/icon/checkNo.png" alt
  2620. v-if="itemTool.tool.indexOf(16) == -1" />
  2621. <div class="checkDiv" v-else>
  2622. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2623. </div>
  2624. </div> -->
  2625. </div>
  2626. <div class="tool" :class="{
  2627. isToolChoose:
  2628. itemTool.tool.indexOf(50) != -1,
  2629. }" @click="
  2630. addTools(50, itemTaskIndex, toolIndex)
  2631. ">
  2632. <div class="whiteBIcon" @click.stop="
  2633. addTools(50, itemTaskIndex, toolIndex)
  2634. ">
  2635. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  2636. <div style="margin: 5px 0">批量上传</div>
  2637. </div>
  2638. <div class="noCTool">
  2639. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2640. </div>
  2641. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  2642. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2643. </div>
  2644. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  2645. <img src="../../../assets/icon/checkNo.png" alt
  2646. v-if="itemTool.tool.indexOf(50) == -1" />
  2647. <div class="checkDiv" v-else>
  2648. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2649. </div>
  2650. </div> -->
  2651. </div>
  2652. <!-- <div class="tool">
  2653. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  2654. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  2655. <div style="margin: 5px 0">个人评价</div>
  2656. </div>
  2657. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  2658. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  2659. <div class="checkDiv" v-else>
  2660. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2661. </div>
  2662. </div>
  2663. </div> -->
  2664. <div class="tool" :class="{
  2665. isToolChoose:
  2666. itemTool.tool.indexOf(41) != -1,
  2667. }" @click="
  2668. addTools(41, itemTaskIndex, toolIndex)
  2669. ">
  2670. <div class="whiteBIcon" @click.stop="
  2671. openTools(itemTaskIndex, 41, toolIndex)
  2672. ">
  2673. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  2674. <div style="margin: 5px 0">选择匹配</div>
  2675. </div>
  2676. <div class="noCTool">
  2677. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2678. </div>
  2679. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  2680. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2681. </div>
  2682. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  2683. <img src="../../../assets/icon/checkNo.png" alt
  2684. v-if="itemTool.tool.indexOf(41) == -1" />
  2685. <div class="checkDiv" v-else>
  2686. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2687. </div>
  2688. </div> -->
  2689. </div>
  2690. <div class="tool" :class="{
  2691. isToolChoose:
  2692. itemTool.tool.indexOf(47) != -1,
  2693. }" @click="
  2694. addTools(47, itemTaskIndex, toolIndex)
  2695. ">
  2696. <div class="whiteBIcon" @click.stop="
  2697. openTools(itemTaskIndex, 47, toolIndex)
  2698. ">
  2699. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  2700. <div style="margin: 5px 0">排序</div>
  2701. </div>
  2702. <div class="noCTool">
  2703. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2704. </div>
  2705. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  2706. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2707. </div>
  2708. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  2709. <img src="../../../assets/icon/checkNo.png" alt
  2710. v-if="itemTool.tool.indexOf(47) == -1" />
  2711. <div class="checkDiv" v-else>
  2712. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2713. </div>
  2714. </div> -->
  2715. </div>
  2716. <!-- <div class="tool">
  2717. <div
  2718. class="whiteBIcon"
  2719. @click="openTools(itemTaskIndex, 42, toolIndex)"
  2720. >
  2721. <img
  2722. src="../../../assets/icon/thirdToolList/mp3.png"
  2723. alt
  2724. />
  2725. <div style="margin: 5px 0">上传音频</div>
  2726. </div>
  2727. <div
  2728. class="check"
  2729. @click="addTools(42, itemTaskIndex, toolIndex)"
  2730. >
  2731. <img
  2732. src="../../../assets/icon/checkNo.png"
  2733. alt
  2734. v-if="itemTool.tool.indexOf(42) == -1"
  2735. />
  2736. <img
  2737. src="../../../assets/icon/checkedIs.png"
  2738. alt
  2739. v-else
  2740. />
  2741. </div>
  2742. </div> -->
  2743. </div>
  2744. <div class="toolSort" v-if="itemTool.toolType == 3">
  2745. <div class="tool" :class="{
  2746. isToolChoose:
  2747. itemTool.tool.indexOf(18) != -1,
  2748. }" @click="
  2749. addTools(18, itemTaskIndex, toolIndex)
  2750. ">
  2751. <div class="whiteBIcon" @click.stop="
  2752. addTools(18, itemTaskIndex, toolIndex)
  2753. ">
  2754. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  2755. <div style="margin: 5px 0">训练平台</div>
  2756. </div>
  2757. <div class="noCTool">
  2758. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2759. </div>
  2760. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  2761. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2762. </div>
  2763. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  2764. <img src="../../../assets/icon/checkNo.png" alt
  2765. v-if="itemTool.tool.indexOf(18) == -1" />
  2766. <div class="checkDiv" v-else>
  2767. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2768. </div>
  2769. </div> -->
  2770. </div>
  2771. <div class="tool" :class="{
  2772. isToolChoose:
  2773. itemTool.tool.indexOf(21) != -1,
  2774. }" @click="
  2775. addTools(21, itemTaskIndex, toolIndex)
  2776. ">
  2777. <div class="whiteBIcon" @click.stop="
  2778. addTools(21, itemTaskIndex, toolIndex)
  2779. ">
  2780. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  2781. <div style="margin: 5px 0">
  2782. AIoT Blockly
  2783. </div>
  2784. </div>
  2785. <div class="noCTool">
  2786. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2787. </div>
  2788. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  2789. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2790. </div>
  2791. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  2792. <img src="../../../assets/icon/checkNo.png" alt
  2793. v-if="itemTool.tool.indexOf(21) == -1" />
  2794. <div class="checkDiv" v-else>
  2795. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2796. </div>
  2797. </div> -->
  2798. </div>
  2799. <!-- <div class="tool">
  2800. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  2801. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  2802. <div style="margin: 5px 0">AI体验</div>
  2803. </div>
  2804. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  2805. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  2806. <div class="checkDiv" v-else>
  2807. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2808. </div>
  2809. </div>
  2810. </div> -->
  2811. <div class="tool" :class="{
  2812. isToolChoose:
  2813. itemTool.tool.indexOf(23) != -1,
  2814. }" @click="
  2815. addTools(23, itemTaskIndex, toolIndex)
  2816. ">
  2817. <div class="whiteBIcon" @click.stop="
  2818. addTools(23, itemTaskIndex, toolIndex)
  2819. ">
  2820. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  2821. <div style="margin: 5px 0">AI Python</div>
  2822. </div>
  2823. <div class="noCTool">
  2824. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2825. </div>
  2826. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  2827. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2828. </div>
  2829. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  2830. <img src="../../../assets/icon/checkNo.png" alt
  2831. v-if="itemTool.tool.indexOf(23) == -1" />
  2832. <div class="checkDiv" v-else>
  2833. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2834. </div>
  2835. </div> -->
  2836. </div>
  2837. <div class="tool" :class="{
  2838. isToolChoose:
  2839. itemTool.tool.indexOf(24) != -1,
  2840. }" @click="
  2841. addTools(24, itemTaskIndex, toolIndex)
  2842. ">
  2843. <div class="whiteBIcon" @click.stop="
  2844. addTools(24, itemTaskIndex, toolIndex)
  2845. ">
  2846. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  2847. <div style="margin: 5px 0">
  2848. AI Blockly
  2849. </div>
  2850. </div>
  2851. <div class="noCTool">
  2852. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2853. </div>
  2854. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  2855. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2856. </div>
  2857. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  2858. <img src="../../../assets/icon/checkNo.png" alt
  2859. v-if="itemTool.tool.indexOf(24) == -1" />
  2860. <div class="checkDiv" v-else>
  2861. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2862. </div>
  2863. </div> -->
  2864. </div>
  2865. <div class="tool" :class="{
  2866. isToolChoose:
  2867. itemTool.tool.indexOf(32) != -1,
  2868. }" @click="
  2869. addTools(32, itemTaskIndex, toolIndex)
  2870. ">
  2871. <div class="whiteBIcon" @click.stop="
  2872. addTools(32, itemTaskIndex, toolIndex)
  2873. ">
  2874. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  2875. <div style="margin: 5px 0">源码编辑</div>
  2876. </div>
  2877. <div class="noCTool">
  2878. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2879. </div>
  2880. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  2881. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2882. </div>
  2883. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  2884. <img src="../../../assets/icon/checkNo.png" alt
  2885. v-if="itemTool.tool.indexOf(32) == -1" />
  2886. <div class="checkDiv" v-else>
  2887. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2888. </div>
  2889. </div> -->
  2890. </div>
  2891. <div class="tool" :class="{
  2892. isToolChoose:
  2893. itemTool.tool.indexOf(57) != -1,
  2894. }" @click="
  2895. addTools(57, itemTaskIndex, toolIndex)
  2896. ">
  2897. <div class="whiteBIcon" @click.stop="
  2898. openTools(itemTaskIndex, 57, toolIndex)
  2899. ">
  2900. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  2901. <div style="margin: 5px 0">CocoPi</div>
  2902. </div>
  2903. <div class="noCTool">
  2904. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2905. </div>
  2906. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  2907. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2908. </div>
  2909. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  2910. <img src="../../../assets/icon/checkNo.png" alt
  2911. v-if="itemTool.tool.indexOf(57) == -1" />
  2912. <div class="checkDiv" v-else>
  2913. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2914. </div>
  2915. </div> -->
  2916. </div>
  2917. <div class="tool" :class="{
  2918. isToolChoose:
  2919. itemTool.tool.indexOf(63) != -1,
  2920. }" @click="
  2921. addTools(63, itemTaskIndex, toolIndex)
  2922. ">
  2923. <div class="whiteBIcon" @click.stop="
  2924. addTools(63, itemTaskIndex, toolIndex)
  2925. ">
  2926. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  2927. <div style="margin: 5px 0">海龟编程</div>
  2928. </div>
  2929. <div class="noCTool">
  2930. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2931. </div>
  2932. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  2933. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2934. </div>
  2935. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  2936. <img src="../../../assets/icon/checkNo.png" alt
  2937. v-if="itemTool.tool.indexOf(63) == -1" />
  2938. <div class="checkDiv" v-else>
  2939. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2940. </div>
  2941. </div> -->
  2942. </div>
  2943. <div class="tool" :class="{
  2944. isToolChoose:
  2945. itemTool.tool.indexOf(71) != -1,
  2946. }" @click="
  2947. addTools(71, itemTaskIndex, toolIndex)
  2948. ">
  2949. <div class="whiteBIcon" @click.stop="
  2950. addTools(71, itemTaskIndex, toolIndex)
  2951. ">
  2952. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  2953. <div style="margin: 5px 0">AI智能体</div>
  2954. </div>
  2955. <div class="noCTool">
  2956. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2957. </div>
  2958. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  2959. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2960. </div>
  2961. </div>
  2962. </div>
  2963. <div class="toolSort" v-if="itemTool.toolType == 7">
  2964. <div class="tool" :class="{
  2965. isToolChoose:
  2966. itemTool.tool.indexOf(40) != -1,
  2967. }" @click.stop="
  2968. addTools(40, itemTaskIndex, toolIndex)
  2969. ">
  2970. <div class="whiteBIcon" @click.stop="
  2971. openTools(itemTaskIndex, 40, toolIndex)
  2972. ">
  2973. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  2974. <div style="margin: 5px 0">个人评价</div>
  2975. </div>
  2976. <div class="noCTool">
  2977. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2978. </div>
  2979. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  2980. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  2981. </div>
  2982. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  2983. <img src="../../../assets/icon/checkNo.png" alt
  2984. v-if="itemTool.tool.indexOf(40) == -1" />
  2985. <div class="checkDiv" v-else>
  2986. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  2987. </div>
  2988. </div> -->
  2989. </div>
  2990. </div>
  2991. <div class="toolSort" v-if="itemTool.toolType == 5">
  2992. <div class="tool" :class="{
  2993. isToolChoose:
  2994. itemTool.tool.indexOf(28) != -1,
  2995. }" @click="
  2996. addTools(28, itemTaskIndex, toolIndex)
  2997. ">
  2998. <div class="whiteBIcon" @click.stop="
  2999. addTools(28, itemTaskIndex, toolIndex)
  3000. ">
  3001. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  3002. <div style="margin: 5px 0">翻译</div>
  3003. </div>
  3004. <div class="noCTool">
  3005. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3006. </div>
  3007. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  3008. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3009. </div>
  3010. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  3011. <img src="../../../assets/icon/checkNo.png" alt
  3012. v-if="itemTool.tool.indexOf(28) == -1" />
  3013. <div class="checkDiv" v-else>
  3014. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3015. </div>
  3016. </div> -->
  3017. </div>
  3018. <div class="tool" :class="{
  3019. isToolChoose:
  3020. itemTool.tool.indexOf(31) != -1,
  3021. }" @click="
  3022. addTools(31, itemTaskIndex, toolIndex)
  3023. ">
  3024. <div class="whiteBIcon" @click.stop="
  3025. addTools(31, itemTaskIndex, toolIndex)
  3026. ">
  3027. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  3028. <div style="margin: 5px 0">数字画板</div>
  3029. </div>
  3030. <div class="noCTool">
  3031. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3032. </div>
  3033. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  3034. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3035. </div>
  3036. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  3037. <img src="../../../assets/icon/checkNo.png" alt
  3038. v-if="itemTool.tool.indexOf(31) == -1" />
  3039. <div class="checkDiv" v-else>
  3040. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3041. </div>
  3042. </div> -->
  3043. </div>
  3044. <div class="tool" :class="{
  3045. isToolChoose:
  3046. itemTool.tool.indexOf(39) != -1,
  3047. }" @click="
  3048. addTools(39, itemTaskIndex, toolIndex)
  3049. ">
  3050. <div class="whiteBIcon" @click.stop="
  3051. addTools(39, itemTaskIndex, toolIndex)
  3052. ">
  3053. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  3054. <div style="margin: 5px 0">GeoGebra</div>
  3055. </div>
  3056. <div class="noCTool">
  3057. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3058. </div>
  3059. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  3060. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3061. </div>
  3062. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  3063. <img src="../../../assets/icon/checkNo.png" alt
  3064. v-if="itemTool.tool.indexOf(39) == -1" />
  3065. <div class="checkDiv" v-else>
  3066. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3067. </div>
  3068. </div> -->
  3069. </div>
  3070. <div class="tool" :class="{
  3071. isToolChoose:
  3072. itemTool.tool.indexOf(66) != -1,
  3073. }" @click="
  3074. addTools(66, itemTaskIndex, toolIndex)
  3075. ">
  3076. <div class="whiteBIcon" @click.stop="
  3077. addTools(66, itemTaskIndex, toolIndex)
  3078. ">
  3079. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  3080. <div style="margin: 5px 0">公式编辑</div>
  3081. </div>
  3082. <div class="noCTool">
  3083. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3084. </div>
  3085. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  3086. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3087. </div>
  3088. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  3089. <img src="../../../assets/icon/checkNo.png" alt
  3090. v-if="itemTool.tool.indexOf(66) == -1" />
  3091. <div class="checkDiv" v-else>
  3092. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3093. </div>
  3094. </div> -->
  3095. </div>
  3096. <!-- <div class="tool">
  3097. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  3098. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  3099. <div style="margin: 5px 0">分子结构</div>
  3100. </div>
  3101. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  3102. <img src="../../../assets/icon/checkNo.png" alt
  3103. v-if="itemTool.tool.indexOf(67) == -1" />
  3104. <div class="checkDiv" v-else>
  3105. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3106. </div>
  3107. </div>
  3108. </div> -->
  3109. <div class="tool" :class="{
  3110. isToolChoose:
  3111. itemTool.tool.indexOf(68) != -1,
  3112. }" @click="
  3113. addTools(68, itemTaskIndex, toolIndex)
  3114. ">
  3115. <div class="whiteBIcon" @click.stop="
  3116. addTools(68, itemTaskIndex, toolIndex)
  3117. ">
  3118. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  3119. <div style="margin: 5px 0">时间轴</div>
  3120. </div>
  3121. <div class="noCTool">
  3122. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3123. </div>
  3124. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  3125. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3126. </div>
  3127. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  3128. <img src="../../../assets/icon/checkNo.png" alt
  3129. v-if="itemTool.tool.indexOf(68) == -1" />
  3130. <div class="checkDiv" v-else>
  3131. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3132. </div>
  3133. </div> -->
  3134. </div>
  3135. <div class="tool" :class="{
  3136. isToolChoose:
  3137. itemTool.tool.indexOf(69) != -1,
  3138. }" @click="
  3139. addTools(69, itemTaskIndex, toolIndex)
  3140. ">
  3141. <div class="whiteBIcon" @click.stop="
  3142. openTools(itemTaskIndex, 69, toolIndex)
  3143. ">
  3144. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  3145. <div style="margin: 5px 0">英语写作</div>
  3146. </div>
  3147. <div class="noCTool">
  3148. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3149. </div>
  3150. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  3151. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3152. </div>
  3153. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3154. <img src="../../../assets/icon/checkNo.png" alt
  3155. v-if="itemTool.tool.indexOf(4) == -1" />
  3156. <div class="checkDiv" v-else>
  3157. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3158. </div>
  3159. </div> -->
  3160. </div>
  3161. <div class="tool" :class="{
  3162. isToolChoose:
  3163. itemTool.tool.indexOf(70) != -1,
  3164. }" @click="
  3165. addTools(70, itemTaskIndex, toolIndex)
  3166. ">
  3167. <div class="whiteBIcon" @click.stop="
  3168. openTools(itemTaskIndex, 70, toolIndex)
  3169. ">
  3170. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  3171. <div style="margin: 5px 0">英语口语</div>
  3172. </div>
  3173. <div class="noCTool">
  3174. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3175. </div>
  3176. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  3177. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3178. </div>
  3179. </div>
  3180. <!-- <div class="tool">
  3181. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  3182. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  3183. <div style="margin: 5px 0">翻译</div>
  3184. </div>
  3185. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  3186. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  3187. <div class="checkDiv" v-else>
  3188. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3189. </div>
  3190. </div>
  3191. </div>
  3192. <div class="tool">
  3193. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  3194. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  3195. <div style="margin: 5px 0">魔盒识字</div>
  3196. </div>
  3197. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  3198. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  3199. <div class="checkDiv" v-else>
  3200. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3201. </div>
  3202. </div>
  3203. </div>
  3204. <div class="tool">
  3205. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  3206. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  3207. <div style="margin: 5px 0">24点</div>
  3208. </div>
  3209. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  3210. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  3211. <div class="checkDiv" v-else>
  3212. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3213. </div>
  3214. </div>
  3215. </div>
  3216. <div class="tool">
  3217. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  3218. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  3219. <div style="margin: 5px 0">数学画板</div>
  3220. </div>
  3221. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  3222. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  3223. <div class="checkDiv" v-else>
  3224. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3225. </div>
  3226. </div>
  3227. </div>
  3228. <div class="tool">
  3229. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  3230. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  3231. <div style="margin: 5px 0">GeoGebra</div>
  3232. </div>
  3233. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  3234. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  3235. <div class="checkDiv" v-else>
  3236. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3237. </div>
  3238. </div>
  3239. </div>
  3240. <div class="tool">
  3241. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  3242. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  3243. <div style="margin: 5px 0">模拟驾驶</div>
  3244. </div>
  3245. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  3246. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  3247. <div class="checkDiv" v-else>
  3248. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3249. </div>
  3250. </div>
  3251. </div>
  3252. <div class="tool">
  3253. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  3254. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  3255. <div style="margin: 5px 0">路径搜索</div>
  3256. </div>
  3257. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  3258. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  3259. <div class="checkDiv" v-else>
  3260. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3261. </div>
  3262. </div>
  3263. </div>
  3264. <div class="tool">
  3265. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  3266. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  3267. <div style="margin: 5px 0">深度学习</div>
  3268. </div>
  3269. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  3270. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  3271. <div class="checkDiv" v-else>
  3272. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3273. </div>
  3274. </div>
  3275. </div>
  3276. <div class="tool">
  3277. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  3278. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  3279. <div style="margin: 5px 0">全历史</div>
  3280. </div>
  3281. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  3282. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  3283. <div class="checkDiv" v-else>
  3284. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3285. </div>
  3286. </div>
  3287. </div>
  3288. </div>
  3289. <div class="toolSort" v-if="itemTool.toolType == 4">
  3290. <div class="tool">
  3291. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  3292. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  3293. <div style="margin: 5px 0">课程设计</div>
  3294. </div>
  3295. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  3296. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  3297. <div class="checkDiv" v-else>
  3298. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3299. </div>
  3300. </div>
  3301. </div>
  3302. <div class="tool">
  3303. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  3304. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  3305. <div style="margin: 5px 0">目标管理</div>
  3306. </div>
  3307. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  3308. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  3309. <div class="checkDiv" v-else>
  3310. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3311. </div>
  3312. </div>
  3313. </div> -->
  3314. <!-- <div class="tool">
  3315. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  3316. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  3317. <div style="margin: 5px 0">汉字宫</div>
  3318. </div>
  3319. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  3320. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  3321. <div class="checkDiv" v-else>
  3322. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3323. </div>
  3324. </div>
  3325. </div> -->
  3326. </div>
  3327. </div>
  3328. <!-- v-show="!itemTool.isFold3" -->
  3329. <div class="op_tool_box"
  3330. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  3331. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  3332. class="binfo_input" style="
  3333. margin: 0 0 20px 0;
  3334. width: 100% !important;
  3335. " v-model="itemTool.toolDetail"></textarea>
  3336. <div class="op_box">
  3337. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  3338. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3339. <div class="r_pub_button_op"
  3340. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  3341. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  3342. 智能优化</div>
  3343.                              
  3344. </el-tooltip>
  3345. </div>
  3346. </div>
  3347. </div>
  3348. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  3349. <div class="addToolImg">
  3350. <img src="../../../assets/icon/add.png" alt />
  3351. </div>
  3352. <div>添加工具</div>
  3353. </div> -->
  3354. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  3355. margin: 0 auto;
  3356. padding: 0 30px;
  3357. height: 45px;
  3358. ">
  3359. 添加工具
  3360. </button>
  3361. </div>
  3362. </div>
  3363. <div v-else-if="
  3364. unitJson[unitIndex].easy == 2 ||
  3365. unitJson[unitIndex].easy == 4
  3366. " class="toolChoose" style="padding: 0 0 40px">
  3367. <div class="tools">
  3368. <div class="leftTools" style="width: 100%" v-for="(
  3369. itemTool, toolIndex
  3370. ) in itemTask.toolChoose" :key="toolIndex">
  3371. <div>
  3372. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  3373. margin: 0 0 20px 0;
  3374. width: 100% !important;
  3375. " v-model="itemTool.toolDetail"></textarea>
  3376. </div>
  3377. <div style="
  3378. display: flex;
  3379. flex-direction: row;
  3380. align-items: baseline;
  3381. flex-wrap: nowrap;
  3382. justify-content: flex-start;
  3383. position: relative;
  3384. ">
  3385. <div style="margin-right: 20px; font-weight: bold"
  3386. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3387. 工具 {{ toolIndex + 1 }} :
  3388. </div>
  3389. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3390. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  3391. </div>
  3392. <div style="min-height: 163px">
  3393. <div class="toolSort">
  3394. <div class="tool">
  3395. <div class="whiteBIcon" @click="
  3396. openTools(itemTaskIndex, 1, toolIndex)
  3397. ">
  3398. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3399. <div style="margin: 5px 0">电子白板</div>
  3400. </div>
  3401. <div class="check" @click="
  3402. addTools(1, itemTaskIndex, toolIndex)
  3403. ">
  3404. <img src="../../../assets/icon/checkNo.png" alt
  3405. v-if="itemTool.tool.indexOf(1) == -1" />
  3406. <div class="checkDiv" v-else>
  3407. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3408. </div>
  3409. </div>
  3410. </div>
  3411. <div class="tool">
  3412. <div class="whiteBIcon" @click="
  3413. openTools(itemTaskIndex, 52, toolIndex)
  3414. ">
  3415. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3416. <div style="margin: 5px 0">文档</div>
  3417. </div>
  3418. <div class="check" @click="
  3419. addTools(52, itemTaskIndex, toolIndex)
  3420. ">
  3421. <img src="../../../assets/icon/checkNo.png" alt
  3422. v-if="itemTool.tool.indexOf(52) == -1" />
  3423. <div class="checkDiv" v-else>
  3424. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3425. </div>
  3426. </div>
  3427. </div>
  3428. <div class="tool">
  3429. <div class="whiteBIcon" @click="
  3430. openTools(itemTaskIndex, 3, toolIndex)
  3431. ">
  3432. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3433. <div style="margin: 5px 0">思维导图</div>
  3434. </div>
  3435. <div class="check" @click="
  3436. addTools(3, itemTaskIndex, toolIndex)
  3437. ">
  3438. <img src="../../../assets/icon/checkNo.png" alt
  3439. v-if="itemTool.tool.indexOf(3) == -1" />
  3440. <div class="checkDiv" v-else>
  3441. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3442. </div>
  3443. </div>
  3444. </div>
  3445. <div class="tool">
  3446. <div class="whiteBIcon" @click="
  3447. openTools(itemTaskIndex, 4, toolIndex)
  3448. ">
  3449. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3450. <div style="margin: 5px 0">问卷调查</div>
  3451. </div>
  3452. <div class="check" @click="
  3453. addTools(4, itemTaskIndex, toolIndex)
  3454. ">
  3455. <img src="../../../assets/icon/checkNo.png" alt
  3456. v-if="itemTool.tool.indexOf(4) == -1" />
  3457. <div class="checkDiv" v-else>
  3458. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3459. </div>
  3460. </div>
  3461. </div>
  3462. <div class="tool">
  3463. <div class="whiteBIcon" @click="
  3464. openTools(itemTaskIndex, 45, toolIndex)
  3465. ">
  3466. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3467. <div style="margin: 5px 0">选择题</div>
  3468. </div>
  3469. <div class="check" @click="
  3470. addTools(45, itemTaskIndex, toolIndex)
  3471. ">
  3472. <img src="../../../assets/icon/checkNo.png" alt
  3473. v-if="itemTool.tool.indexOf(45) == -1" />
  3474. <div class="checkDiv" v-else>
  3475. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3476. </div>
  3477. </div>
  3478. </div>
  3479. <div class="tool">
  3480. <div class="whiteBIcon" @click="
  3481. openTools(itemTaskIndex, 15, toolIndex)
  3482. ">
  3483. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3484. <div style="margin: 5px 0">问答</div>
  3485. </div>
  3486. <div class="check" @click="
  3487. addTools(15, itemTaskIndex, toolIndex)
  3488. ">
  3489. <img src="../../../assets/icon/checkNo.png" alt
  3490. v-if="itemTool.tool.indexOf(15) == -1" />
  3491. <div class="checkDiv" v-else>
  3492. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3493. </div>
  3494. </div>
  3495. </div>
  3496. <div class="tool">
  3497. <div class="whiteBIcon" @click="
  3498. addTools(16, itemTaskIndex, toolIndex)
  3499. ">
  3500. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3501. <div style="margin: 5px 0">作业提交</div>
  3502. </div>
  3503. <div class="check" @click="
  3504. addTools(16, itemTaskIndex, toolIndex)
  3505. ">
  3506. <img src="../../../assets/icon/checkNo.png" alt
  3507. v-if="itemTool.tool.indexOf(16) == -1" />
  3508. <div class="checkDiv" v-else>
  3509. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3510. </div>
  3511. </div>
  3512. </div>
  3513. <div class="tool">
  3514. <div class="whiteBIcon" @click="
  3515. openTools(itemTaskIndex, 50, toolIndex)
  3516. ">
  3517. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3518. <div style="margin: 5px 0">批量上传</div>
  3519. </div>
  3520. <div class="check" @click="
  3521. addTools(50, itemTaskIndex, toolIndex)
  3522. ">
  3523. <img src="../../../assets/icon/checkNo.png" alt
  3524. v-if="itemTool.tool.indexOf(50) == -1" />
  3525. <div class="checkDiv" v-else>
  3526. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3527. </div>
  3528. </div>
  3529. </div>
  3530. <div class="tool">
  3531. <div class="whiteBIcon" @click="
  3532. openTools(itemTaskIndex, 41, toolIndex)
  3533. ">
  3534. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3535. <div style="margin: 5px 0">选择匹配</div>
  3536. </div>
  3537. <div class="check" @click="
  3538. addTools(41, itemTaskIndex, toolIndex)
  3539. ">
  3540. <img src="../../../assets/icon/checkNo.png" alt
  3541. v-if="itemTool.tool.indexOf(41) == -1" />
  3542. <div class="checkDiv" v-else>
  3543. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3544. </div>
  3545. </div>
  3546. </div>
  3547. <div class="tool">
  3548. <div class="whiteBIcon" @click="
  3549. openTools(itemTaskIndex, 47, toolIndex)
  3550. ">
  3551. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  3552. <div style="margin: 5px 0">排序</div>
  3553. </div>
  3554. <div class="check" @click="
  3555. addTools(47, itemTaskIndex, toolIndex)
  3556. ">
  3557. <img src="../../../assets/icon/checkNo.png" alt
  3558. v-if="itemTool.tool.indexOf(47) == -1" />
  3559. <div class="checkDiv" v-else>
  3560. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3561. </div>
  3562. </div>
  3563. </div>
  3564. <div class="tool">
  3565. <div class="whiteBIcon" @click="
  3566. openTools(itemTaskIndex, 48, toolIndex)
  3567. ">
  3568. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3569. <div style="margin: 5px 0">表格</div>
  3570. </div>
  3571. <div class="check" @click="
  3572. addTools(48, itemTaskIndex, toolIndex)
  3573. ">
  3574. <img src="../../../assets/icon/checkNo.png" alt
  3575. v-if="itemTool.tool.indexOf(48) == -1" />
  3576. <div class="checkDiv" v-else>
  3577. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3578. </div>
  3579. </div>
  3580. </div>
  3581. </div>
  3582. </div>
  3583. </div>
  3584. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  3585. <div class="addToolImg">
  3586. <img src="../../../assets/icon/add.png" alt />
  3587. </div>
  3588. <div>添加工具</div>
  3589. </div> -->
  3590. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  3591. style="margin: 35px auto 20px">
  3592. 添加工具
  3593. </button>
  3594. </div>
  3595. </div>
  3596. <div v-else-if="
  3597. unitJson[unitIndex].easy == 1 ||
  3598. (unitJson[unitIndex].easy == 5 &&
  3599. itemTask.taskType == 2)
  3600. " class="toolChoose" style="padding: 0 0 40px">
  3601. <div class="tools">
  3602. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  3603. itemTool, toolIndex
  3604. ) in itemTask.toolChoose" :key="toolIndex">
  3605. <div style="min-height: 163px">
  3606. <div class="toolSort">
  3607. <div class="tool">
  3608. <div class="whiteBIcon" @click="
  3609. openTools(itemTaskIndex, 50, toolIndex)
  3610. ">
  3611. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3612. <div style="margin: 5px 0">批量上传</div>
  3613. </div>
  3614. <div class="check" @click="
  3615. addTools(50, itemTaskIndex, toolIndex)
  3616. ">
  3617. <img src="../../../assets/icon/checkNo.png" alt
  3618. v-if="itemTool.tool.indexOf(50) == -1" />
  3619. <div class="checkDiv" v-else>
  3620. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3621. </div>
  3622. </div>
  3623. </div>
  3624. </div>
  3625. </div>
  3626. </div>
  3627. </div>
  3628. </div>
  3629. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  3630. v-loading="taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  3631. <div class="elist_title">
  3632. <div style="
  3633. display: flex;
  3634. flex-direction: row;
  3635. align-items: center;
  3636. margin: 20px 0;
  3637. ">
  3638. <div class="lineTitle clineTitle">评价设置</div>
  3639. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  3640. <div class="r_pub_button_op" style="margin-left:auto;"
  3641. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  3642. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  3643. </el-tooltip>
  3644. <!-- <div class="line" style="width: 90%"></div> -->
  3645. </div>
  3646. </div>
  3647. <div class="mbCss">
  3648. <div class="pjCss" :style="{
  3649. width: itemTask.isEvaFold
  3650. ? 'calc(100% - 55%)'
  3651. : 'calc(100% - 120px)',
  3652. }">
  3653. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  3654. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  3655. <span>评价维度:</span>
  3656. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  3657. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写评价维度" />
  3658. <!-- </el-tooltip> -->
  3659. <!-- <span>评星等级:</span>
  3660. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  3661. disabled></el-rate> -->
  3662. <div class="remove" @click="
  3663. deletEList(
  3664. unitIndex,
  3665. itemTaskIndex,
  3666. eIndex
  3667. )
  3668. "></div>
  3669. <div class="elist_inptu_text">
  3670. <span>维度描述:</span>
  3671. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  3672. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写维度描述" />
  3673. <!-- </el-tooltip> -->
  3674. </div>
  3675. <div class="elist_inptu_text" v-if="evalua">
  3676. <span>目标:</span>
  3677. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  3678. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  3679. @change="forceUpdate()">
  3680. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  3681. :value="e.name">
  3682. </el-option>
  3683. </el-select> -->
  3684. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  3685. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  3686. </div>
  3687. </div>
  3688. </div>
  3689. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  3690. style="margin: 35px 35px 0 0">
  3691. <div class="addToolImg">
  3692. <img src="../../../assets/icon/add.png" alt />
  3693. </div>
  3694. <div>添加</div>
  3695. </div> -->
  3696. <div class="eva_btn_box">
  3697. <div class="eva_btn_left_box">
  3698. <button class="c_pub_button_add pub_btn_eval_img"
  3699. @click="addEList(unitIndex, itemTaskIndex)">
  3700. 添加
  3701. </button>
  3702. <button class="c_pub_button_add pub_btn_eval_source_img"
  3703. @click="openEList(unitIndex, itemTaskIndex)">
  3704. 资源
  3705. </button>
  3706. </div>
  3707. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  3708. v-if="itemTask.eList && itemTask.eList.length">
  3709. 添加资源模板
  3710. </button>
  3711. </div>
  3712. </div>
  3713. <div v-if="evalua" style="
  3714. border: 1px solid #e5e5e5;
  3715. box-shadow: 3px 1px 15px 3px #e0e0e0;
  3716. " :style="{
  3717. width: itemTask.isEvaFold ? '55%' : '116px',
  3718. }" class="evaCss">
  3719. <!-- <div class="e_add_top">
  3720. <div class="e_add_title">
  3721. <span>当前使用目标管理</span>
  3722. <span>{{ eTitle }}</span>
  3723. <img src="../../../assets/line.png" class="cru_line" style="
  3724. width: 125px;
  3725. height: 20px;
  3726. bottom: -10px;
  3727. left: 155px;
  3728. " />
  3729. </div>
  3730. </div> -->
  3731. <div class="e_add_content" style="width: 100%">
  3732. <div class="e_add_list_pbox" style="width: 100%">
  3733. <div class="e_add_list_pbox_title">
  3734. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  3735. <div class="type_content" v-if="itemTask.isEvaFold">
  3736. <span :class="{ active: typeMode == 1 }"
  3737. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  3738. <span :class="{ active: typeMode == 2 }"
  3739. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  3740. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  3741. </div>
  3742. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  3743. @click="foldEva(itemTaskIndex)">
  3744. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  3745. </div>
  3746. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  3747. @click="foldEva(itemTaskIndex)">
  3748. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  3749. </div>
  3750. </div>
  3751. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  3752. style="min-height: 200px">
  3753. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  3754. " v-if="typeMode == 1"></Mind>
  3755. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  3756. </Sunburst>
  3757. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  3758. v-if="typeMode == 3"></SeeBoard>
  3759. </div>
  3760. </div>
  3761. </div>
  3762. </div>
  3763. </div>
  3764. </div>
  3765. <div class="funBlock" style="padding: 0">
  3766. <div class="fold" @click="fold(itemTaskIndex, $event)">
  3767. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  3768. <div>
  3769. {{
  3770. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  3771. }}
  3772. </div>
  3773. </div>
  3774. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  3775. <div>展开</div>
  3776. <div class="arrow">
  3777. <img src="../../../assets/icon/expand.png" alt />
  3778. </div>
  3779. </div> -->
  3780. </div>
  3781. </div>
  3782. </div>
  3783. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  3784. <!-- <div>
  3785. <img src="../../../../assets/icon/new/addStage.png" alt />
  3786. <span>添加任务</span>
  3787. </div> -->
  3788. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  3789. 添加任务
  3790. </button>
  3791. </div>
  3792. </div>
  3793. <div class="info_btnBox3">
  3794. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  3795. goTo(
  3796. '/course?userid=' +
  3797. userid +
  3798. '&oid=' +
  3799. oid +
  3800. '&org=' +
  3801. org +
  3802. '&role=' +
  3803. role
  3804. )
  3805. ">
  3806. 返回课程
  3807. </button>
  3808. <button class="c_pub_button_return pub_btn_last_img"
  3809. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  3810. {{ steps == 4 ? "返回课程" : "上一步" }}
  3811. </button>
  3812. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  3813. pub_btn_next_img: steps != 3,
  3814. pub_btn_finish_img: steps == 3,
  3815. }">
  3816. {{ steps == 3 ? "确认上传" : "下一步" }}
  3817. </button>
  3818. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  3819. '修改模板' : '保存模板'}}</button>
  3820. </div>
  3821. </div>
  3822. </div>
  3823. </div>
  3824. </div>
  3825. <div style="
  3826. width: calc(100% - 20px);
  3827. background: rgb(255, 255, 255);
  3828. border-radius: 10px;
  3829. " v-if="steps == 4">
  3830. <div class="basic_box_success">
  3831. <div class="right_img">
  3832. <img src="../../../assets/icon/right.png" alt />
  3833. </div>
  3834. <div style="font-weight: bold">成功</div>
  3835. <!-- <div>您的课程编号</div>
  3836. <div class="number">{{ number }}</div>-->
  3837. <!-- <div class="success_button">
  3838. <div class="look_course" @click="isNoFinsh">
  3839. 邀请老师协同编辑
  3840. </div>
  3841. <div class="attend_others" @click="goCourse">预览课程</div>
  3842. </div> -->
  3843. </div>
  3844. </div>
  3845. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  3846. @mouseleave="btnDisplay(false)" v-if="false">
  3847. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  3848. goTo(
  3849. '/course?userid=' +
  3850. userid +
  3851. '&oid=' +
  3852. oid +
  3853. '&org=' +
  3854. org +
  3855. '&role=' +
  3856. role
  3857. )
  3858. ">
  3859. 返回课程
  3860. </button>
  3861. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  3862. @click="lastSteps">
  3863. {{ steps == 4 ? "返回课程" : "上一步" }}
  3864. </button>
  3865. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  3866. pub_btn_next_img: steps != 3,
  3867. pub_btn_finish_img: steps == 3,
  3868. }">
  3869. {{ steps == 3 ? "确认上传" : "下一步" }}
  3870. </button>
  3871. </div>
  3872. </div>
  3873. </div>
  3874. <div class="leftBar" v-if="istemplate == 1">
  3875. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  3876. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" />
  3877. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" />
  3878. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  3879. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  3880. @setAiJson="setAiJson" /> -->
  3881. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  3882. @setAiJson="setAiJson" />
  3883. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  3884. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  3885. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  3886. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  3887. </div>
  3888. </div>
  3889. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  3890. class="dialog_diy2 customWidth">
  3891. <div>请复制该链接邀请协同编辑</div>
  3892. <div>http://www.boomyon.com/index-zhang.com</div>
  3893. <span slot="footer" class="dialog-footer">
  3894. <el-button type="primary">复制链接分享</el-button>
  3895. <el-button @click="dialogVisible = false">取消</el-button>
  3896. </span>
  3897. </el-dialog>
  3898. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  3899. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  3900. <el-form>
  3901. <el-form-item label="文档标题">
  3902. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  3903. </el-form-item>
  3904. <div>文档简介</div>
  3905. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  3906. </el-form>
  3907. <span slot="footer" class="dialog-footer">
  3908. <el-button @click="dialogVisible1 = false">取 消</el-button>
  3909. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  3910. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  3911. </span>
  3912. </el-dialog>
  3913. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  3914. :before-close="handleClose" class="dialog_diy">
  3915. <el-form>
  3916. <el-form-item label="文档标题">
  3917. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  3918. </el-form-item>
  3919. <div>文档内容</div>
  3920. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  3921. </el-form>
  3922. <span slot="footer" class="dialog-footer">
  3923. <el-button @click="clearChoose">取 消</el-button>
  3924. <el-button type="primary" @click="wordNext()">确定</el-button>
  3925. </span>
  3926. </el-dialog>
  3927. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  3928. :before-close="handleClose" class="dialog_diy">
  3929. <el-form>
  3930. <el-form-item label="文本标题">
  3931. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  3932. placeholder="请输入文本标题..."></el-input>
  3933. </el-form-item>
  3934. <!-- <div>富文本内容</div> -->
  3935. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  3936. </el-form>
  3937. <span slot="footer" class="dialog-footer">
  3938. <el-button @click="clearAttText">取 消</el-button>
  3939. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  3940. </span>
  3941. </el-dialog>
  3942. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  3943. :before-close="handleClose" class="dialog_diy lineCss">
  3944. <el-form>
  3945. <el-form-item label="标题" :label-width="formLabelWidth">
  3946. <span>
  3947. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  3948. </span>
  3949. </el-form-item>
  3950. <el-form-item label="链接" :label-width="formLabelWidth">
  3951. <span>
  3952. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  3953. </span>
  3954. </el-form-item>
  3955. </el-form>
  3956. <span slot="footer" class="dialog-footer">
  3957. <el-button @click="clearLine">取 消</el-button>
  3958. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  3959. </span>
  3960. </el-dialog>
  3961. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  3962. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  3963. <div>
  3964. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  3965. </div>
  3966. <span slot="footer" class="dialog-footer">
  3967. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  3968. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  3969. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  3970. </span>
  3971. </el-dialog>
  3972. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  3973. :before-close="handleClose" class="addNewPP customWidth">
  3974. <div class="people">
  3975. <div class="people_top">
  3976. <div class="people_nav">选择成员</div>
  3977. <div class="people_top_right">
  3978. <div class="people_search">
  3979. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  3980. <div class="search_img" @click="searchStudent">
  3981. <img src="../../../assets/icon/search.png" alt />
  3982. </div>
  3983. </div>
  3984. </div>
  3985. </div>
  3986. <el-checkbox-group v-model="checkboxList" class="people_name">
  3987. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  3988. "暂无学生可选" }}</el-checkbox>
  3989. </el-checkbox-group>
  3990. </div>
  3991. <span slot="footer" class="dialog-footer">
  3992. <el-button @click="dialogVisible3 = false">取 消</el-button>
  3993. <el-button type="primary" @click="isAddPP">确定</el-button>
  3994. </span>
  3995. </el-dialog>
  3996. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  3997. :before-close="handleClose" class="addNewPP2">
  3998. <div class="check_classBox">
  3999. <div class="check_class_right">
  4000. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  4001. 全部
  4002. </div>
  4003. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  4004. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  4005. {{ item.name }}
  4006. </div>
  4007. </el-tooltip>
  4008. </div>
  4009. <div class="check_class_left">
  4010. <div class="check_class_all_box">
  4011. <div class="check_class_left_title">选择班级</div>
  4012. <div style="display: flex; align-items: center; margin-left: auto">
  4013. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  4014. </div>
  4015. </div>
  4016. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  4017. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  4018. </div> -->
  4019. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  4020. v-if="grade2.length">
  4021. <div v-for="item in grade2" :key="item.id" class="class_item">
  4022. <el-checkbox :label="item.id">
  4023. {{ item.name }}
  4024. </el-checkbox>
  4025. </div>
  4026. </el-checkbox-group>
  4027. <div v-if="!grade2.length">暂无数据</div>
  4028. </div>
  4029. </div>
  4030. <span slot="footer" class="dialog-footer">
  4031. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  4032. <el-button type="primary" @click="isAddClass">确定</el-button>
  4033. </span>
  4034. </el-dialog>
  4035. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  4036. :before-close="handleClose" class="addNewPP customWidth">
  4037. <div style="display: flex;justify-content: space-between;">
  4038. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  4039. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  4040. 全部
  4041. </div>
  4042. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  4043. v-for="(i) in CollaborativeTeaList" :key="i.id">
  4044. <el-tooltip placement="top" :content="i.name">
  4045. <span>{{i.name}}</span>
  4046. </el-tooltip>
  4047. </div>
  4048. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  4049. 其他
  4050. </div>
  4051. </div>
  4052. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  4053. <div class="people">
  4054. <div class="people_top">
  4055. <div class="people_top_right">
  4056. <div class="people_search">
  4057. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  4058. <div class="search_img" @click="getTeacher(collid)">
  4059. <img src="../../../assets/icon/search.png" alt />
  4060. </div>
  4061. </div>
  4062. </div>
  4063. <div class="people_nav" style="display: flex; align-items: center">
  4064. <div class="check_class_left_title">选择成员</div>
  4065. <div style="display: flex; align-items: center; margin-left: auto">
  4066. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  4067. </div>
  4068. </div>
  4069. </div>
  4070. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  4071. @change="InviteChange2">
  4072. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  4073. <div class="t_j_box">
  4074. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  4075. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  4076. </el-tooltip>
  4077. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  4078. <span>{{ item.username.split('@')[0] }}</span>
  4079. </el-tooltip>
  4080. <el-tooltip placement="top" :content="item.school">
  4081. <span>{{ item.school }}</span>
  4082. </el-tooltip>
  4083. </div>
  4084. </el-checkbox>
  4085. </el-checkbox-group>
  4086. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  4087. </div>
  4088. </div>
  4089. </div>
  4090. <span slot="footer" class="dialog-footer">
  4091. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  4092. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  4093. </span>
  4094. </el-dialog>
  4095. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  4096. closePan(4);
  4097. }
  4098. " class="dialog_diy fullStyle">
  4099. <div style="height: 100%">
  4100. <div class="a_add_title" style="
  4101. display: flex;
  4102. flex-direction: row;
  4103. align-items: center;
  4104. justify-content: center;
  4105. ">
  4106. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  4107. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  4108. </div>
  4109. <div class="a_addBox" style="height: calc(100% - 50px)">
  4110. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  4111. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  4112. <div class="a_add_checkType">
  4113. <span :class="{
  4114. active:
  4115. askJson.askJson[index1].type == '1' ||
  4116. !askJson.askJson[index1].type,
  4117. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  4118. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  4119. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  4120. </div>
  4121. <div class="a_add_head">
  4122. <div style="
  4123. display: flex;
  4124. align-items: center;
  4125. width: 100%;
  4126. margin-right: 20px;
  4127. ">
  4128. <span style="min-width: fit-content">{{
  4129. index1 + 1 + "、"
  4130. }}</span>
  4131. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  4132. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  4133. $forceUpdate();
  4134. }
  4135. "></textarea>
  4136. </div>
  4137. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  4138. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  4139. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  4140. </div>
  4141. <div class="a_add_head_div">
  4142. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  4143. </el-button>
  4144. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  4145. </div>
  4146. </div>
  4147. <div class="a_add_body">
  4148. <div class="a_add_input" style="flex-direction: column">
  4149. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  4150. margin: 20px 10px 0 0;
  4151. display: flex;
  4152. align-items: center;
  4153. position: relative;
  4154. ">
  4155. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  4156. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  4157. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  4158. @change="() => {
  4159. $forceUpdate();
  4160. }
  4161. "></textarea>
  4162. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  4163. v-if="askJson.askJson[index1].askItem != 1">
  4164. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  4165. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  4166. </div>
  4167. <div class="a_add_body_div">
  4168. <el-button type="primary" size="small"
  4169. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  4170. <el-button type="primary" size="small" @click="
  4171. deletecheckList(askJson.askJson[index1], checkIndex)
  4172. " v-if="askJson.askJson[index1].askItem != 1">删除
  4173. </el-button>
  4174. </div>
  4175. </div>
  4176. </div>
  4177. <!-- <div class="a_add_body_div">
  4178. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  4179. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  4180. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  4181. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  4182. </el-button>
  4183. </div> -->
  4184. </div>
  4185. </div>
  4186. </div>
  4187. </div>
  4188. <span slot="footer" class="dialog-footer">
  4189. <el-button @click="closePan(4)">取 消</el-button>
  4190. <el-button type="primary" @click="addAsk">确 定</el-button>
  4191. </span>
  4192. </el-dialog>
  4193. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  4194. closePan(45);
  4195. }
  4196. " class="dialog_diy fullStyle">
  4197. <div style="height: 100%">
  4198. <!-- <div class="a_add_title" style="
  4199. display: flex;
  4200. flex-direction: row;
  4201. align-items: center;
  4202. justify-content: center;
  4203. ">
  4204. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  4205. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  4206. </div> -->
  4207. <div class="a_addBox" style="height: 100%">
  4208. <div style="
  4209. font-size: 16px;
  4210. color: #c7c7c7;
  4211. display: flex;
  4212. align-items: center;
  4213. ">
  4214. <!-- 请输入题目内容 -->
  4215. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  4216. v-if="isPasteChoice">
  4217. 智能粘贴
  4218. </button>
  4219. </div>
  4220. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  4221. <div class="a_add_checkType">
  4222. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  4223. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  4224. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  4225. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  4226. </div>
  4227. <div class="a_add_head">
  4228. <div class="timuUpImg">
  4229. <div style="display: flex; align-items: center">
  4230. <span style="min-width: fit-content">{{
  4231. index1 + 1 + "、"
  4232. }}</span>
  4233. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  4234. placeholder="请输入题目">
  4235. </el-input> -->
  4236. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  4237. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  4238. $forceUpdate();
  4239. }
  4240. "></textarea>
  4241. </div>
  4242. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  4243. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  4244. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  4245. </div>
  4246. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  4247. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  4248. <input type="file" accept="image/*" style="display: none"
  4249. @change="beforeUploadTiMu($event, index1)" />
  4250. </div>
  4251. </div>
  4252. <div class="a_add_head_div">
  4253. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  4254. </el-button>
  4255. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  4256. </div>
  4257. </div>
  4258. <div class="timuImgBox" v-if="
  4259. testJson.testJson[index1].timuList &&
  4260. testJson.testJson[index1].timuList.length
  4261. ">
  4262. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  4263. @click.stop="previewImg(timg.src)">
  4264. <img :src="timg.src" alt="" />
  4265. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  4266. <img src="../../../assets/icon/delete.png" alt="" />
  4267. </div>
  4268. </div>
  4269. </div>
  4270. <div class="a_add_body">
  4271. <div class="a_add_input a_add_input_choice">
  4272. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  4273. @change="() => {
  4274. $forceUpdate();
  4275. }
  4276. ">
  4277. <div class="radioBox">
  4278. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  4279. .testItem" :key="checkIndex" :label="checkIndex">
  4280. <div style="margin-right: 10px">
  4281. 选项{{ checkIndex + 1 }}
  4282. </div>
  4283. <div style="margin-right: 10px; width: 300px" v-if="
  4284. testJson.testJson[index1].checkList[checkIndex] &&
  4285. testJson.testJson[index1].checkList[checkIndex]
  4286. .imgType &&
  4287. testJson.testJson[index1].checkList[checkIndex]
  4288. .imgType == 1
  4289. ">
  4290. <div class="inImg" @click.stop="
  4291. previewImg(
  4292. testJson.testJson[index1].checkList[checkIndex]
  4293. .src
  4294. )
  4295. ">
  4296. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  4297. .src
  4298. " lazy />
  4299. <!-- <img :src="
  4300. testJson.testJson[index1].checkList[checkIndex]
  4301. .src
  4302. " alt="" /> -->
  4303. </div>
  4304. </div>
  4305. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  4306. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  4307. $forceUpdate();
  4308. }
  4309. "></textarea>
  4310. <div class="xzUpImg" @click.stop="addImg($event)">
  4311. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  4312. <input type="file" accept="image/*" style="display: none"
  4313. @change="beforeUploadTi($event, index1, checkIndex)" />
  4314. </div>
  4315. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  4316. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  4317. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  4318. </div>
  4319. <div class="a_add_body_div">
  4320. <el-button type="primary" size="small" @click.stop="
  4321. addTcheckList(testJson.testJson[index1], checkIndex)
  4322. ">添加</el-button>
  4323. <el-button type="primary" size="small" @click.stop="
  4324. deleteTcheckList(
  4325. testJson.testJson[index1],
  4326. checkIndex
  4327. )
  4328. " v-if="testJson.testJson[index1].testItem != 1">删除
  4329. </el-button>
  4330. </div>
  4331. </el-radio>
  4332. </div>
  4333. </el-radio-group>
  4334. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  4335. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  4336. $forceUpdate();
  4337. }
  4338. ">
  4339. <div class="radioBox">
  4340. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  4341. .testItem" :key="checkIndex1" :label="checkIndex1">
  4342. <div style="margin-right: 10px">
  4343. 选项{{ checkIndex1 + 1 }}
  4344. </div>
  4345. <div style="margin-right: 10px; width: 300px" v-if="
  4346. testJson.testJson[index1].checkList[checkIndex1] &&
  4347. testJson.testJson[index1].checkList[checkIndex1]
  4348. .imgType &&
  4349. testJson.testJson[index1].checkList[checkIndex1]
  4350. .imgType == 1
  4351. ">
  4352. <div class="inImg" @click.stop="
  4353. previewImg(
  4354. testJson.testJson[index1].checkList[checkIndex1]
  4355. .src
  4356. )
  4357. ">
  4358. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  4359. .src
  4360. " lazy />
  4361. <!-- <img :src="
  4362. testJson.testJson[index1].checkList[checkIndex1]
  4363. .src
  4364. " alt="" /> -->
  4365. </div>
  4366. </div>
  4367. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  4368. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  4369. $forceUpdate();
  4370. }
  4371. "></textarea>
  4372. <div class="xzUpImg" @click.stop="addImg($event)">
  4373. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  4374. <input type="file" accept="image/*" style="display: none"
  4375. @change="beforeUploadTi($event, index1, checkIndex1)" />
  4376. </div>
  4377. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  4378. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  4379. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  4380. </div>
  4381. <div class="a_add_body_div">
  4382. <el-button type="primary" size="small" @click.stop="
  4383. addTcheckList(
  4384. testJson.testJson[index1],
  4385. checkIndex1
  4386. )
  4387. ">添加</el-button>
  4388. <el-button type="primary" size="small" @click.stop="
  4389. deleteTcheckList(
  4390. testJson.testJson[index1],
  4391. checkIndex1
  4392. )
  4393. " v-if="testJson.testJson[index1].testItem != 1">删除
  4394. </el-button>
  4395. </div>
  4396. </el-checkbox>
  4397. </div>
  4398. </el-checkbox-group>
  4399. </div>
  4400. <!-- <div class="a_add_body_div">
  4401. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  4402. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  4403. v-if="testJson.testJson[index1].testItem != 1">删除
  4404. </el-button>
  4405. </div> -->
  4406. </div>
  4407. </div>
  4408. </div>
  4409. </div>
  4410. <span slot="footer" class="dialog-footer">
  4411. <el-button @click="closePan(45)">取 消</el-button>
  4412. <el-button type="primary" @click="addTest">确 定</el-button>
  4413. </span>
  4414. </el-dialog>
  4415. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  4416. :before-close="handleClose" class="dialog_diy addToolsDia">
  4417. <div class="toolChoose">
  4418. <div class="tools">
  4419. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  4420. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  4421. <div style="
  4422. display: flex;
  4423. flex-direction: row;
  4424. align-items: baseline;
  4425. flex-wrap: nowrap;
  4426. justify-content: flex-start;
  4427. position: relative;
  4428. ">
  4429. <div class="chooseWho">
  4430. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  4431. 互动类
  4432. </div>
  4433. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  4434. 思维类
  4435. </div>
  4436. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  4437. 评价类
  4438. </div>
  4439. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  4440. 其他
  4441. </div>
  4442. </div>
  4443. </div>
  4444. <div style="min-height: 163px">
  4445. <div class="toolSort" v-if="chapToolsType == 0">
  4446. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  4447. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  4448. <img src="../../../assets/icon/secondToolList/library.png" alt />
  4449. <div style="margin: 5px 0">素材库</div>
  4450. </div>
  4451. <div class="noCTool">
  4452. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4453. </div>
  4454. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  4455. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4456. </div>
  4457. <!-- <div class="check" @click="chapAddTools(8)">
  4458. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  4459. <div class="checkDiv" v-else>
  4460. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4461. </div>
  4462. </div> -->
  4463. </div>
  4464. </div>
  4465. <div class="toolSort" v-if="chapToolsType == 1">
  4466. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  4467. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  4468. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  4469. <div style="margin: 5px 0">思维网格</div>
  4470. </div>
  4471. <div class="noCTool">
  4472. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4473. </div>
  4474. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  4475. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4476. </div>
  4477. <!-- <div class="check" @click="chapAddTools(7)">
  4478. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  4479. <div class="checkDiv" v-else>
  4480. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4481. </div>
  4482. </div> -->
  4483. </div>
  4484. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  4485. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  4486. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4487. <div style="margin: 5px 0">电子白板</div>
  4488. </div>
  4489. <div class="noCTool">
  4490. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4491. </div>
  4492. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  4493. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4494. </div>
  4495. <!-- <div class="check" @click="chapAddTools(1)">
  4496. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  4497. <div class="checkDiv" v-else>
  4498. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4499. </div>
  4500. </div> -->
  4501. </div>
  4502. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  4503. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  4504. <img src="../../../assets/icon/secondToolList/note.png" alt />
  4505. <div style="margin: 5px 0">便签</div>
  4506. </div>
  4507. <div class="noCTool">
  4508. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4509. </div>
  4510. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  4511. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4512. </div>
  4513. <!-- <div class="check" @click="chapAddTools(2)">
  4514. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  4515. <div class="checkDiv" v-else>
  4516. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4517. </div>
  4518. </div> -->
  4519. </div>
  4520. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  4521. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  4522. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4523. <div style="margin: 5px 0">协同文档</div>
  4524. </div>
  4525. <div class="noCTool">
  4526. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4527. </div>
  4528. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  4529. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4530. </div>
  4531. <!-- <div class="check" @click="chapAddTools(6)">
  4532. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  4533. <div class="checkDiv" v-else>
  4534. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4535. </div>
  4536. </div> -->
  4537. </div>
  4538. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  4539. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  4540. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4541. <div style="margin: 5px 0">思维导图</div>
  4542. </div>
  4543. <div class="noCTool">
  4544. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4545. </div>
  4546. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  4547. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4548. </div>
  4549. <!-- <div class="check" @click="chapAddTools(3)">
  4550. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  4551. <div class="checkDiv" v-else>
  4552. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4553. </div>
  4554. </div> -->
  4555. </div>
  4556. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  4557. @click="chapAddTools(31)">
  4558. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  4559. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4560. <div style="margin: 5px 0">数学画板</div>
  4561. </div>
  4562. <div class="noCTool">
  4563. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4564. </div>
  4565. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  4566. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4567. </div>
  4568. <!-- <div class="check" @click="chapAddTools(31)">
  4569. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  4570. <div class="checkDiv" v-else>
  4571. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4572. </div>
  4573. </div> -->
  4574. </div>
  4575. </div>
  4576. <div class="toolSort" v-if="chapToolsType == 2">
  4577. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  4578. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  4579. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  4580. <div style="margin: 5px 0">量规评分</div>
  4581. </div>
  4582. <div class="noCTool">
  4583. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4584. </div>
  4585. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  4586. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4587. </div>
  4588. <!-- <div class="check" @click="chapAddTools(5)">
  4589. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  4590. <div class="checkDiv" v-else>
  4591. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4592. </div>
  4593. </div> -->
  4594. </div>
  4595. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  4596. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  4597. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4598. <div style="margin: 5px 0">问卷调查</div>
  4599. </div>
  4600. <div class="noCTool">
  4601. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4602. </div>
  4603. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  4604. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4605. </div>
  4606. <!-- <div class="check" @click="chapAddTools(4)">
  4607. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  4608. <div class="checkDiv" v-else>
  4609. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4610. </div>
  4611. </div> -->
  4612. </div>
  4613. </div>
  4614. </div>
  4615. <div>
  4616. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  4617. v-model="itemTools.toolDetail" />
  4618. </div>
  4619. </div>
  4620. </div>
  4621. </div>
  4622. <span slot="footer" class="dialog-footer">
  4623. <el-button @click="dialogVisible4 = false">取 消</el-button>
  4624. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  4625. </span>
  4626. </el-dialog>
  4627. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  4628. closePan(15);
  4629. }
  4630. " class="dialog_diy">
  4631. <div>
  4632. <div class="a_add_title" style="
  4633. display: flex;
  4634. flex-direction: column;
  4635. align-items: flex-start;
  4636. justify-content: center;
  4637. ">
  4638. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  4639. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  4640. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  4641. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  4642. </div>
  4643. </div>
  4644. <span slot="footer" class="dialog-footer">
  4645. <el-button @click="closePan(15)">取 消</el-button>
  4646. <el-button type="primary" @click="addAnswer">确 定</el-button>
  4647. </span>
  4648. </el-dialog>
  4649. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  4650. :before-close="handleClose" class="dialog_diy">
  4651. <div>
  4652. <div class="a_add_title" style="
  4653. display: flex;
  4654. flex-direction: column;
  4655. align-items: flex-start;
  4656. justify-content: center;
  4657. ">
  4658. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  4659. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  4660. </div>
  4661. </div>
  4662. <span slot="footer" class="dialog-footer">
  4663. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  4664. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  4665. </span>
  4666. </el-dialog>
  4667. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  4668. :before-close="handleClose" class="dialog_diy">
  4669. <div>
  4670. <div class="fileCss" style="padding-top: 20px">
  4671. <div>
  4672. <button class="info_btn" @click="addImg($event)">
  4673. 选择本地文件
  4674. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  4675. </button>
  4676. <div class="spanName">选择本地文件</div>
  4677. </div>
  4678. <!-- <div>
  4679. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  4680. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  4681. <img :src="cover[0].url" alt="" />
  4682. <div class="deletePic" @click="deleteSysPic">
  4683. <img src="../../../assets/icon/delete.png" alt="" />
  4684. </div>
  4685. </div>
  4686. <div class="spanName">选择系统文件</div>
  4687. </div> -->
  4688. <div>
  4689. <el-button @click="(searchImageValue = courseName), resetImage()"
  4690. v-if="isSysPic2 == false">选择网络文件</el-button>
  4691. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  4692. <img :src="cover[0].url" alt="" />
  4693. <div class="deletePic" @click="deleteSysPic">
  4694. <img src="../../../assets/icon/delete.png" alt="" />
  4695. </div>
  4696. </div>
  4697. <div class="spanName">选择网络文件</div>
  4698. </div>
  4699. </div>
  4700. <!-- <div class="fileCss">
  4701. </div> -->
  4702. </div>
  4703. <span slot="footer" class="dialog-footer">
  4704. <el-button @click="choosePicVisible = false">取 消</el-button>
  4705. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  4706. </span>
  4707. </el-dialog>
  4708. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  4709. :before-close="handleClose" class="dialog_diy">
  4710. <div class="cru_selectBox" style="margin: 0">
  4711. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  4712. 绘画
  4713. </div>
  4714. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  4715. 科技
  4716. </div>
  4717. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  4718. 人文
  4719. </div>
  4720. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  4721. 艺术
  4722. </div>
  4723. </div>
  4724. <div class="sysPicBox">
  4725. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  4726. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  4727. </div>
  4728. </div>
  4729. </el-dialog>
  4730. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  4731. :before-close="handleClose" class="dialog_diy">
  4732. <div>
  4733. <div class="people_top_right" style="display: flex; align-items: center">
  4734. <div style="position: relative; width: 100%">
  4735. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  4736. @keyup.enter.native="resetImage()"></el-input>
  4737. <div class="search_img" @click="resetImage" style="right: 10px">
  4738. <img src="../../../assets/icon/search.png" alt />
  4739. </div>
  4740. </div>
  4741. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  4742. </div>
  4743. <div class="sysPicBox" v-loading="imageloading">
  4744. <div class="picNone" v-if="!imageList.length">
  4745. 请输入关键词搜索图片
  4746. </div>
  4747. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  4748. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  4749. </div>
  4750. </div>
  4751. </div>
  4752. </el-dialog>
  4753. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  4754. closePan(41);
  4755. }
  4756. " class="dialog_diy dialog_diy3 fullStyle">
  4757. <div v-if="selectJson" style="height: 100%">
  4758. <div class="select_box1" v-if="selectSteps == 1">
  4759. <div class="select_box1_img">
  4760. <div class="select_box1_title">
  4761. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  4762. </div>
  4763. <div class="select_box1_add_img">
  4764. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  4765. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  4766. <img src="../../../assets/icon/addPoster.png" alt="" />
  4767. </div>
  4768. <div class="isSysPic" v-else>
  4769. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  4770. <div class="deletePic" @click="deleteSelectPic">
  4771. <img src="../../../assets/icon/delete.png" alt="" />
  4772. </div>
  4773. </div>
  4774. </div>
  4775. </div>
  4776. <div class="select_box1_select">
  4777. <div class="select_box1_title">
  4778. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  4779. </div>
  4780. <div class="select_box1_select_box">
  4781. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  4782. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  4783. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  4784. <div class="select_box1_select_box_add">
  4785. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  4786. 添加</el-button>
  4787. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  4788. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  4789. </div>
  4790. </div>
  4791. </div>
  4792. </div>
  4793. <div v-if="selectSteps == 2" style="height: 100%">
  4794. <div class="select_box2">
  4795. <div class="select_box2_title">设置每道题目的正确选项</div>
  4796. <div class="select_box2_box">
  4797. <div class="select_box2_img">
  4798. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  4799. </div>
  4800. <div class="select_box2_answer">
  4801. <div class="select_answer_title">根据题目选择对应答案</div>
  4802. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  4803. <span>{{ checkIndex + 1 }}、</span>
  4804. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  4805. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  4806. </el-option>
  4807. </el-select>
  4808. </div>
  4809. </div>
  4810. </div>
  4811. </div>
  4812. </div>
  4813. </div>
  4814. <span slot="footer" class="dialog-footer">
  4815. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  4816. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  4817. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  4818. </span>
  4819. </el-dialog>
  4820. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  4821. :before-close="handleClose" class="dialog_diy">
  4822. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  4823. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  4824. <div class="pjCss" style="width: 100%">
  4825. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  4826. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  4827. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  4828. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  4829. <div class="remove" @click="deletRateList(eIndex)"></div>
  4830. <div style="width: 100%; display: flex">
  4831. <span style="min-width: 100px; text-align: right">评星等级:</span>
  4832. <el-rate v-model="eItem.score" disabled></el-rate>
  4833. </div>
  4834. <div class="elist_inptu_text" style="align-items: flex-start">
  4835. <span style="min-width: 100px; text-align: right">描述:</span>
  4836. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  4837. </div>
  4838. </div>
  4839. </div>
  4840. <div class="addToolFun" @click="addRateList()">
  4841. <div class="addToolImg">
  4842. <img src="../../../assets/icon/add.png" alt />
  4843. </div>
  4844. <div>添加</div>
  4845. </div>
  4846. </div>
  4847. </div>
  4848. <span slot="footer" class="dialog-footer">
  4849. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  4850. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  4851. </span>
  4852. </el-dialog>
  4853. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  4854. closePan(47);
  4855. }
  4856. " class="dialog_diy dialog_diy3 fullStyle">
  4857. <div style="height: 100%">
  4858. <div class="sentenBox" style="height: 100%">
  4859. <div class="addSen" @click="addSt">添加题目</div>
  4860. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  4861. <div class="sentenTopBox">
  4862. <div class="sentenTop" :index="stIndex + 1">
  4863. <div>题目设置</div>
  4864. <div>
  4865. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  4866. </div>
  4867. <div @click="addSen(stIndex)">添加</div>
  4868. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  4869. </div>
  4870. </div>
  4871. <div class="cardList">
  4872. <div v-if="st.addSentence.length > 0" class="cardBox">
  4873. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  4874. @click="setRightAnswer(s, stIndex, sIndex)">
  4875. <el-tooltip class="item" effect="light" :content="s" placement="top">
  4876. <div>{{ s }}</div>
  4877. </el-tooltip>
  4878. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  4879. <img src="../../../assets/icon/delete.png" alt="" />
  4880. </div>
  4881. </div>
  4882. </div>
  4883. <div class="card">
  4884. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  4885. </div>
  4886. </div>
  4887. <div class="rightCardBox">
  4888. <div>正确顺序</div>
  4889. <div class="rightCardList">
  4890. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  4891. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  4892. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  4893. <el-tooltip class="item" effect="light" :content="r" placement="top">
  4894. <div>{{ r }}</div>
  4895. </el-tooltip>
  4896. </div>
  4897. <div>{{ rIndex + 1 }}</div>
  4898. </div>
  4899. </div>
  4900. <div class="card" v-if="st.rightAnswer.length == 0">
  4901. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  4902. </div>
  4903. <div class="card" v-else>
  4904. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  4905. </div>
  4906. </div>
  4907. </div>
  4908. </div>
  4909. </div>
  4910. </div>
  4911. <span slot="footer" class="dialog-footer">
  4912. <el-button @click="closePan(47)">取 消</el-button>
  4913. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  4914. </span>
  4915. </el-dialog>
  4916. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  4917. :before-close="handleClose" class="dialog_diy">
  4918. <el-form>
  4919. <!-- <el-form-item label="文本标题">
  4920. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  4921. </el-form-item> -->
  4922. <div>表格内容</div>
  4923. <Table v-model="tableJson.text" @change="change"></Table>
  4924. </el-form>
  4925. <span slot="footer" class="dialog-footer">
  4926. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  4927. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  4928. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  4929. </span>
  4930. </el-dialog>
  4931. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  4932. :before-close="handleClose" class="dialog_diy">
  4933. <el-form>
  4934. <!-- <el-form-item label="文本标题">
  4935. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  4936. </el-form-item> -->
  4937. <div>文档内容</div>
  4938. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  4939. </el-form>
  4940. <span slot="footer" class="dialog-footer">
  4941. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  4942. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  4943. </span>
  4944. </el-dialog>
  4945. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  4946. :before-close="handleClose" class="dialog_diy">
  4947. <div style="
  4948. width: 100%;
  4949. display: flex;
  4950. flex-direction: row;
  4951. flex-wrap: nowrap;
  4952. align-items: center;
  4953. justify-content: center;
  4954. ">
  4955. <div>班级:</div>
  4956. <el-select multiple v-model="uploadJson" placeholder="请选择">
  4957. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  4958. </el-option>
  4959. </el-select>
  4960. </div>
  4961. <span slot="footer" class="dialog-footer">
  4962. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  4963. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  4964. </span>
  4965. </el-dialog>
  4966. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  4967. :before-close="handleClose" class="dialog_diy">
  4968. <div style="
  4969. width: 100%;
  4970. display: flex;
  4971. flex-direction: row;
  4972. flex-wrap: nowrap;
  4973. align-items: center;
  4974. justify-content: center;
  4975. ">
  4976. <div>随机码:</div>
  4977. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  4978. </div>
  4979. <span slot="footer" class="dialog-footer">
  4980. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  4981. <el-button type="primary" @click="addInvite">确定</el-button>
  4982. </span>
  4983. </el-dialog>
  4984. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  4985. :before-close="handleClose" class="dialog_diy">
  4986. <div>
  4987. <div style="margin-bottom: 20px; color: #999">
  4988. 提示:点击“+”或“-”修改倒计时时长。
  4989. </div>
  4990. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  4991. </div>
  4992. <span slot="footer" class="dialog-footer">
  4993. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  4994. <el-button type="primary" @click="addPreTime">确定</el-button>
  4995. </span>
  4996. </el-dialog>
  4997. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  4998. :before-close="handleClose" class="dialog_diy">
  4999. <div>
  5000. <div style="
  5001. width: 100%;
  5002. display: flex;
  5003. flex-direction: row;
  5004. flex-wrap: nowrap;
  5005. align-content: center;
  5006. align-items: center;
  5007. justify-content: space-between;
  5008. ">
  5009. <div style="
  5010. display: flex;
  5011. flex-flow: row nowrap;
  5012. align-items: flex-start;
  5013. width: 100%;
  5014. flex-direction: column;
  5015. flex-wrap: nowrap;
  5016. position: relative;
  5017. ">
  5018. <div class="e_box">
  5019. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  5020. <div class="e_card_picture">
  5021. <img src="../../../assets/e_picture.png" />
  5022. </div>
  5023. <div class="e_card_name">
  5024. <span>{{ item.title }}</span>
  5025. </div>
  5026. <div class="e_card_btn">
  5027. <span @click="checkEva(item.id, 2)">导入</span>
  5028. </div>
  5029. </div> -->
  5030. <!-- <div class="addEva" @click="openT">
  5031. <img src="../../../assets/icon/addEva.png" alt="" />
  5032. </div> -->
  5033. <div style="
  5034. display: flex;
  5035. justify-content: flex-end;
  5036. margin-bottom: 10px;
  5037. ">
  5038. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  5039. </div>
  5040. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  5041. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  5042. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  5043. </el-table-column>
  5044. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  5045. </el-table-column>
  5046. <el-table-column label="操作" width="250px">
  5047. <template slot-scope="scope">
  5048. <div class="btnBox">
  5049. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  5050. </div>
  5051. </template>
  5052. </el-table-column>
  5053. </el-table>
  5054. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  5055. 暂无数据
  5056. </div>
  5057. </div>
  5058. </div>
  5059. </div>
  5060. </div>
  5061. <span slot="footer" class="dialog-footer">
  5062. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  5063. </span>
  5064. </el-dialog>
  5065. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  5066. :before-close="handleClose" class="dialog_diy">
  5067. <div class="groupBox">
  5068. <div v-if="groupJson.group" class="groupContent">
  5069. <div class="groupTitle">请设置小组数量及名称</div>
  5070. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  5071. <span class="groupn">第{{ index + 1 }}组名称:</span>
  5072. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  5073. <div class="groupBtn">
  5074. <el-button type="primary" size="small" @click="addGroup(index)"
  5075. v-if="groupJson.group.length - 1 == index">
  5076. 添加</el-button>
  5077. <el-button type="primary" size="small" @click="deleteGroup(index)"
  5078. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  5079. </div>
  5080. </div>
  5081. </div>
  5082. <div class="groupContent">
  5083. <div class="groupTitle">请设置每组人数</div>
  5084. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  5085. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  5086. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  5087. @change="numberPan"></el-input>
  5088. </div>
  5089. </div>
  5090. <span slot="footer" class="dialog-footer">
  5091. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  5092. <el-button type="primary" @click="addGroupJson">确定</el-button>
  5093. </span>
  5094. </el-dialog>
  5095. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  5096. :before-close="handleClose" class="dialog_diy">
  5097. <div style="
  5098. width: 100%;
  5099. display: flex;
  5100. flex-direction: row;
  5101. flex-wrap: nowrap;
  5102. align-items: center;
  5103. justify-content: center;
  5104. ">
  5105. <div style="min-width: fit-content">文件名称:</div>
  5106. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  5107. </div>
  5108. <span slot="footer" class="dialog-footer">
  5109. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  5110. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  5111. </span>
  5112. </el-dialog>
  5113. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  5114. closePan(69);
  5115. }
  5116. " class="dialog_diy fullStyle fullStyle1">
  5117. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  5118. <span slot="footer" class="dialog-footer">
  5119. <el-button @click="englishDialogVisible = false">取 消</el-button>
  5120. <el-button type="primary" @click="addEnglish">确 定</el-button>
  5121. </span>
  5122. </el-dialog>
  5123. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  5124. :before-close="handleClose" class="dialog_diy">
  5125. <div class="template_box">
  5126. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  5127. :class="{ wordTeacherA: ctJson.id == aa.id }">
  5128. <div class="wordPic">
  5129. <img src="../../../assets/icon/new/course_template.png" alt />
  5130. </div>
  5131. <el-tooltip effect="dark" :content="aa.title" placement="top">
  5132. <div style="
  5133. margin-top: 10px;
  5134. line-height: 19px;
  5135. overflow: hidden;
  5136. text-overflow: ellipsis;
  5137. white-space: nowrap;
  5138. padding: 0 10px;
  5139. box-sizing: border-box;
  5140. width: 100%;
  5141. ">
  5142. {{ aa.title }}
  5143. </div>
  5144. </el-tooltip>
  5145. </div>
  5146. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  5147. :class="{ wordTeacherA: ctJson.id == 1 }">
  5148. <div class="wordPic">
  5149. <img src="../../../assets/icon/new/course_template.png" alt />
  5150. </div>
  5151. <div style="
  5152. margin-top: 10px;
  5153. line-height: 19px;
  5154. overflow: hidden;
  5155. text-overflow: ellipsis;
  5156. white-space: nowrap;
  5157. padding: 0 20px;
  5158. ">
  5159. 简易模板
  5160. </div>
  5161. </div>
  5162. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  5163. :class="{ wordTeacherA: ctJson.id == 2 }">
  5164. <div class="wordPic">
  5165. <img src="../../../assets/icon/new/course_template.png" alt />
  5166. </div>
  5167. <div style="
  5168. margin-top: 10px;
  5169. line-height: 19px;
  5170. overflow: hidden;
  5171. text-overflow: ellipsis;
  5172. white-space: nowrap;
  5173. padding: 0 20px;
  5174. ">
  5175. 智能粘贴模式
  5176. </div>
  5177. </div>
  5178. </div>
  5179. <span slot="footer" class="dialog-footer">
  5180. <el-button @click="templateDialog = false">取 消</el-button>
  5181. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  5182. </span>
  5183. </el-dialog>
  5184. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  5185. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  5186. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  5187. <div class="change_stageBox">
  5188. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  5189. <div class="nt_taskBox">
  5190. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  5191. <div class="nt_taskName">
  5192. <el-tooltip effect="light" :content="t.dyName" placement="top">
  5193. <span>{{ t.dyName }}</span>
  5194. </el-tooltip>
  5195. </div>
  5196. </div>
  5197. <div class="moveBtn" v-if="unitJson3.length > 1">
  5198. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  5199. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  5200. </div>
  5201. </div>
  5202. </div>
  5203. <span slot="footer" class="dialog-footer">
  5204. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  5205. <el-button type="primary" @click="updateChange">确定</el-button>
  5206. </span>
  5207. </el-dialog>
  5208. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  5209. :before-close="handleClose" class="dialog_diy">
  5210. <div class="addTypeChoose" style="justify-content: center">
  5211. <div style="min-width: 100px">模板名称:</div>
  5212. <el-input v-model="templateName" style="width: 200px"></el-input>
  5213. </div>
  5214. <div class="addTypeBox">
  5215. <div class="addTypeChoose">
  5216. <div style="min-width: 100px">选择一级分类:</div>
  5217. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  5218. style="width: 200px">
  5219. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  5220. </el-option>
  5221. </el-select>
  5222. </div>
  5223. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  5224. <div style="min-width: 100px">选择二级分类:</div>
  5225. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  5226. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  5227. </el-option>
  5228. </el-select>
  5229. </div>
  5230. </div>
  5231. <span slot="footer" class="dialog-footer">
  5232. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  5233. <el-button @click="close()">关 闭</el-button>
  5234. </span>
  5235. </el-dialog>
  5236. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  5237. </evaBox>
  5238. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  5239. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  5240. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
  5241. </aiDialog>
  5242. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  5243. @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
  5244. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  5245. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  5246. </div>
  5247. </template>
  5248. <script>
  5249. import "../../../common/aws-sdk-2.235.1.min.js";
  5250. import { tools as toolsData } from "../../../common/tools.js";
  5251. // import "../../../common/aws-sdk-2.99.0.min.js";
  5252. import $ from "jquery";
  5253. import EditorBar from "../../../components/tools/wangEnduit";
  5254. import Table from "../../../components/tools/table";
  5255. import Mind from "../../tools/jsmind2";
  5256. import Time from "../../tools/time.vue";
  5257. import Sunburst from "../../tools/sunburst";
  5258. import SeeBoard from "../../tools/seeBoard";
  5259. import weilaiData from "../components/weilai.js";
  5260. import sourceDialog from "../teacherSource/dialog.vue";
  5261. import interVideo from "../interVideo/index.vue";
  5262. import englishRight from "../components/englishRight.vue";
  5263. import evaBox from "../evaBox/index.vue";
  5264. import EnglishVoice from "../EnglishVoice/index.vue";
  5265. import aiBox from './aiBox.vue'
  5266. import aiDialog from './aiDialog'
  5267. import aiTips from './aiTips.vue'
  5268. import tipsDialog from './tipsDialog.vue'
  5269. import { v4 as uuidv4 } from "uuid";
  5270. import MarkdownIt from "markdown-it";
  5271. import aiCreateDialog from './aiCreateDialog.vue'
  5272. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  5273. var OpenCC = require("opencc-js");
  5274. let converter = OpenCC.Converter({
  5275. from:'hk',
  5276. to:'cn'
  5277. })
  5278. export default {
  5279. components: {
  5280. EditorBar,
  5281. Mind,
  5282. Time,
  5283. Sunburst,
  5284. SeeBoard,
  5285. Table,
  5286. sourceDialog,
  5287. interVideo,
  5288. englishRight,
  5289. evaBox,
  5290. EnglishVoice,
  5291. aiBox,
  5292. aiDialog,
  5293. aiTips,
  5294. tipsDialog,
  5295. aiCreateDialog,
  5296. aiCreateVideoDialog
  5297. },
  5298. data() {
  5299. return {
  5300. checkAll: false,
  5301. checkAll2: false,
  5302. chooseType: 1,
  5303. checkedCities: [],
  5304. isIndeterminate: true,
  5305. isIndeterminate2: true,
  5306. isSysPic: false,
  5307. isSysPic2: false,
  5308. steps: 1,
  5309. stepsNav: 1,
  5310. nbOrder: 0,
  5311. courseId: "",
  5312. chapToolsType: 0,
  5313. chapTools: [
  5314. {
  5315. tools: [],
  5316. toolDetail: "",
  5317. },
  5318. ],
  5319. line: "",
  5320. lineTitle: "",
  5321. sysPic: [],
  5322. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  5323. sentenceList2: [],
  5324. isPushTitleList: [],
  5325. lineCount: 0,
  5326. lineType: 0,
  5327. chapCount: 0,
  5328. courseName: "",
  5329. isTeacherSee: false,
  5330. courseText: "",
  5331. textLoading: false,
  5332. ttextLoading: false,
  5333. courseText2: "",
  5334. preTime: 0,
  5335. formLabelWidth: "100px",
  5336. choosePicVisible: false,
  5337. sysPicVisible: false,
  5338. sysPicVisible2: false,
  5339. uploadLoading1: false,
  5340. noneBtnImg: false,
  5341. updateBoolean2: false,
  5342. unitIndex: 0,
  5343. taskCount: 0,
  5344. dialogVisible: false,
  5345. dialogVisible1: false,
  5346. dialogVisible2: false,
  5347. dialogVisible3: false,
  5348. dialogVisible4: false,
  5349. dialogVisible5: false,
  5350. dialogVisible6: false,
  5351. dialogVisible7: false,
  5352. dialogVisible8: false,
  5353. dialogVisible9: false,
  5354. dialogVisibleClass: false,
  5355. dialogVisibleMember: false,
  5356. dialogVisibleMp3: false,
  5357. dialogVisibleSelect: false,
  5358. dialogVisibleSentence: false,
  5359. dialogVisibleRate: false,
  5360. dialogVisibleChoice: false,
  5361. dialogVisiblemb: false,
  5362. dialogVisibleInvite: false,
  5363. dialogVisibleSource: false,
  5364. dialogVisibleVideo: false,
  5365. dialogVisibleStageChange: false,
  5366. dialogVisibleupdataVideoT: false,
  5367. englishDialogVisible: false,
  5368. templateDialog: false,
  5369. ctJson: {},
  5370. isClickColor: 1,
  5371. toolIndexType: "",
  5372. publicTool: 0,
  5373. searchPeople: "",
  5374. searchTN: "",
  5375. collid: '',
  5376. CollLoading: false,
  5377. userid: this.$route.query.userid,
  5378. oid: this.$route.query.oid,
  5379. org: this.$route.query.org,
  5380. role: this.$route.query.role,
  5381. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  5382. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  5383. dialogVisibleTable: false,
  5384. dialogVisibleWord: false,
  5385. tableJson: { text: "" },
  5386. wordJson: { text: "" },
  5387. dialogVisibleMoreUpload: false,
  5388. dialogVisiblePreTime: false,
  5389. uploadJson: [],
  5390. classJuri: [],
  5391. gradeList: [],
  5392. cover: [], //课程封面
  5393. myWord: [],
  5394. evaJuri: [],
  5395. evalua: "",
  5396. targetArray: [],
  5397. eTitle: "",
  5398. eJson: {},
  5399. fid: "", //一级
  5400. sid: "", //二级
  5401. tid: "", //二级
  5402. typeMode: 1,
  5403. eJSONNum: 0,
  5404. data: {
  5405. meta: {
  5406. name: "example",
  5407. author: "dd@163.com",
  5408. version: "0.2",
  5409. },
  5410. format: "node_array",
  5411. data: [{ id: "root", isroot: true, topic: "" }],
  5412. },
  5413. askJson: {
  5414. askCount: 1,
  5415. askTitle: "",
  5416. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5417. },
  5418. askJson2: {},
  5419. testJson: {},
  5420. testJson2: {},
  5421. selectJson: {},
  5422. selectJson2: {},
  5423. rateJson: [],
  5424. unitJson2: [],
  5425. unitJson3: [],
  5426. unitJson: [
  5427. {
  5428. dyName: "", //单元标题
  5429. chapterInfo: [
  5430. {
  5431. isread: false,
  5432. chapterid: this.guid(),
  5433. title: "",
  5434. courseName: "",
  5435. taskJson: [
  5436. {
  5437. task: "",
  5438. taskDetail: "",
  5439. chapterData: [],
  5440. toolText: "",
  5441. toolChoose: [
  5442. {
  5443. tool: [],
  5444. toolDetail: "",
  5445. toolType: 0,
  5446. askCount: 1,
  5447. askTitle: "",
  5448. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5449. },
  5450. ],
  5451. isShowTools: false,
  5452. askCount: 1,
  5453. isFold: 1,
  5454. askTitle: "",
  5455. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5456. checkJson: [{ checkCount: [], checkPerent: [] }],
  5457. homeworkList: [],
  5458. },
  5459. ],
  5460. itemCount: 1,
  5461. fileList1: [],
  5462. video: [],
  5463. testData: [],
  5464. pData: [],
  5465. templateArray: [],
  5466. },
  5467. ],
  5468. },
  5469. ],
  5470. templateArray: [],
  5471. studentJuri: [],
  5472. teacherJuri: [],
  5473. CollaborativeTeaList: [],
  5474. checkboxList: [],
  5475. checkboxList2: [],
  5476. checkboxList3: [],
  5477. classSearch: "",
  5478. gradeId: "",
  5479. number: "",
  5480. tTitle: "",
  5481. tdetail: "",
  5482. templateC: {},
  5483. AttText: {},
  5484. AttTextType: 0,
  5485. AttTextIndex: 0,
  5486. cTemplate: "",
  5487. CourseType: [],
  5488. CourseType1: [],
  5489. CourseType2: [],
  5490. CourseTypeJson: {},
  5491. CourseTypeJson1: {},
  5492. courseTypeId: [],
  5493. courseTypeId1: [],
  5494. courseTypeSon: [],
  5495. clearArray: [],
  5496. pTypeCheck: [],
  5497. pTypeCheckName: [],
  5498. loading: false,
  5499. toolType: 0,
  5500. inputShow: true,
  5501. inputShow2: true,
  5502. toolIndex: 0,
  5503. cidType: 0,
  5504. answerQ: "",
  5505. answerQ2: "",
  5506. grade: [],
  5507. grade2: [],
  5508. courseUserid: "",
  5509. timer: null,
  5510. timer2: null,
  5511. pasteTimer: null,
  5512. checkId: "",
  5513. isDelete: 1,
  5514. addindex: 0,
  5515. selectSteps: 1,
  5516. groupJson: {},
  5517. dialogVisibleGroup: false,
  5518. rightBoxHeight: 0,
  5519. ManAarray: [],
  5520. checkBoolean: false,
  5521. inviteCode: [],
  5522. inviteId: "",
  5523. icode: "",
  5524. easyArray: [2, 4],
  5525. sourceData: {},
  5526. updateSourcePan: false,
  5527. videoJson: {},
  5528. isBtnDisplay: false,
  5529. isStepDisplay: false,
  5530. isPasteStage: false,
  5531. isPasteTask: false,
  5532. isPasteChoice: false,
  5533. imageList: [],
  5534. imageloading: false,
  5535. imageloading2: false,
  5536. searchImageValue: "",
  5537. ppage: 1,
  5538. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  5539. oldIndex: 0,
  5540. dragType: "",
  5541. oldUnitIndex: 0,
  5542. oldData: null,
  5543. newIndex: "",
  5544. englishList: {},
  5545. typeIndex: "",
  5546. courseState: 4,
  5547. taskJSONa: [
  5548. {
  5549. task: "",
  5550. taskDetail: "",
  5551. chapterData: [],
  5552. toolText: "",
  5553. toolChoose: [
  5554. {
  5555. tool: [],
  5556. toolDetail: "",
  5557. toolType: 0,
  5558. askCount: 1,
  5559. askTitle: "",
  5560. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5561. },
  5562. ],
  5563. isShowTools: false,
  5564. askCount: 1,
  5565. isFold: 1,
  5566. askTitle: "",
  5567. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  5568. checkJson: [{ checkCount: [], checkPerent: [] }],
  5569. homeworkList: [],
  5570. },
  5571. ],
  5572. checkUnitIndex: 0,
  5573. isdrag: "",
  5574. evaIndex: "",
  5575. evatIndex: "",
  5576. evaBoxDialog: false,
  5577. EnglishVoiceDialog: false,
  5578. englishVoiceJson: {},
  5579. cetIndex: "",
  5580. cettIndex: "",
  5581. cetBoxDialog: false,
  5582. templateName: "",
  5583. setTypeJson: {
  5584. one: "",
  5585. two: "",
  5586. },
  5587. twoJson: [],
  5588. oneJson: [],
  5589. updateKey: 1,
  5590. isOutline: false,
  5591. isOutline2: false,
  5592. infoData: [],
  5593. infoproVisible: false,
  5594. infoisFinishSize: 0,
  5595. infoisAllSize: 0,
  5596. infoprogress: 0,
  5597. taskDetailLoading: [],
  5598. ttaskDetailLoading: [],
  5599. taskDetailLoading2: [],
  5600. ttaskDetailLoading2: [],
  5601. taskDetailLoading3: [],
  5602. ttaskDetailLoading3: [],
  5603. taskDetailLoading4: [],
  5604. taskDetailLoading5: [],
  5605. ttaskDetailLoading5: [],
  5606. dArray: [],
  5607. dialogVisibleAiD: false,
  5608. aitype: "",
  5609. aiJson: {
  5610. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  5611. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  5612. "aiTask": "请根据<教学任务教案>。",
  5613. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  5614. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述和任务名:<任务名>:<任务描述>",
  5615. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  5616. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  5617. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  5618. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  5619. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  5620. },
  5621. aiText: "",
  5622. aiCallBack: "",
  5623. aiIndex: "",
  5624. clickType: 1,
  5625. promptShow: false,
  5626. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  5627. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  5628. dialogVisibleTips: false,
  5629. tipsJson: {},
  5630. cpote:{
  5631. cpote1: '',
  5632. cpote2: '',
  5633. cpote3: '',
  5634. cpote4: '',
  5635. },
  5636. cpoteLoading:{
  5637. cpote1: false,
  5638. cpote2: false,
  5639. cpote3: false,
  5640. cpote4: false,
  5641. },
  5642. cpotetLoading:{
  5643. cpote1: false,
  5644. cpote2: false,
  5645. cpote3: false,
  5646. cpote4: false,
  5647. },
  5648. cpoteType: 0,
  5649. dialogVisibleAiCreate: false,
  5650. dialogVisibleAiCreateVideo: false,
  5651. teacherText: [],
  5652. isFileSearch: true,
  5653. fileIds: ['file-A81p1q02HHpJhus4nYYwtAmM'],
  5654. 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'],
  5655. courseJie:1,
  5656. courseTime:45,
  5657. };
  5658. },
  5659. directives: {
  5660. autoHeight: {
  5661. update(el, binding) {
  5662. const { value } = binding;
  5663. if (value && typeof value === "number") {
  5664. el.style.height = `${value}px`;
  5665. } else {
  5666. el.style.height = "auto";
  5667. }
  5668. },
  5669. componentUpdated(el) {
  5670. el.style.height = `${el.scrollHeight + 25}px`;
  5671. },
  5672. },
  5673. },
  5674. computed: {
  5675. // rightBoxHeight: function () {
  5676. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  5677. // },
  5678. offsetLetfPx: function () {
  5679. //addnum可以直接在模板语法里面用,相当于data内的值
  5680. return (
  5681. $(".cru_select")[this.unitIndex] &&
  5682. $(".cru_select")[this.unitIndex].offsetLeft + 5
  5683. );
  5684. },
  5685. getMan2() {
  5686. return function (people) {
  5687. let _people = people;
  5688. let _people2 = "";
  5689. if (this.ManAarray.length) {
  5690. for (var i = 0; i < this.ManAarray.length; i++) {
  5691. if (this.ManAarray[i].userid == people) {
  5692. _people2 = this.ManAarray[i].name;
  5693. break;
  5694. }
  5695. }
  5696. }
  5697. if (people == this.courseUserid) {
  5698. return "";
  5699. }
  5700. return this.ManAarray.length ? _people2 : "";
  5701. };
  5702. },
  5703. getListMan2() {
  5704. return function (list) {
  5705. let _people2 = [];
  5706. if (this.ManAarray.length) {
  5707. for (var j = 0; j < list.length; j++) {
  5708. let people = list[j];
  5709. for (var i = 0; i < this.ManAarray.length; i++) {
  5710. if (
  5711. this.ManAarray[i].userid == people &&
  5712. people != this.courseUserid
  5713. ) {
  5714. _people2.push(this.ManAarray[i].name);
  5715. break;
  5716. }
  5717. }
  5718. }
  5719. }
  5720. return this.ManAarray.length ? _people2.join("、") : "";
  5721. };
  5722. },
  5723. isInvite() {
  5724. return function (cid) {
  5725. let array = [];
  5726. for (var i = 0; i < this.inviteCode.length; i++) {
  5727. array.push(this.inviteCode[i].cid);
  5728. }
  5729. return array.indexOf(cid) != -1;
  5730. };
  5731. },
  5732. getInviteCodeC() {
  5733. return function (cid) {
  5734. let array = [];
  5735. for (var i = 0; i < this.inviteCode.length; i++) {
  5736. array.push(this.inviteCode[i].cid);
  5737. }
  5738. return this.inviteCode[array.indexOf(cid)].ic;
  5739. };
  5740. },
  5741. getClassC() {
  5742. return function (c) {
  5743. let _c2 = "";
  5744. if (this.grade.length) {
  5745. for (var i = 0; i < this.grade.length; i++) {
  5746. if (this.grade[i].id == c) {
  5747. _c2 = this.grade[i].name;
  5748. break;
  5749. }
  5750. }
  5751. }
  5752. return this.grade.length ? _c2 : "";
  5753. };
  5754. },
  5755. getListClassC() {
  5756. return function (list) {
  5757. let _c2 = [];
  5758. if (this.grade.length) {
  5759. for (var j = 0; j < list.length; j++) {
  5760. let c = list[j];
  5761. for (var i = 0; i < this.grade.length; i++) {
  5762. if (this.grade[i].id == c) {
  5763. _c2.push(this.grade[i].name);
  5764. break;
  5765. }
  5766. }
  5767. }
  5768. }
  5769. return this.grade.length ? _c2.join("、") : "";
  5770. };
  5771. },
  5772. MarkdownT() {
  5773. return function (c) {
  5774. let md = new MarkdownIt();
  5775. return c
  5776. ? md.render(c) : "";
  5777. };
  5778. },
  5779. },
  5780. watch: {
  5781. unitIndex(newValue, oldValue) {
  5782. // return;
  5783. if (this.isDelete == 2) {
  5784. this.isDelete = 1;
  5785. return;
  5786. }
  5787. if (this.cid != "") {
  5788. let _unitIndex = oldValue;
  5789. if (
  5790. JSON.stringify(this.unitJson2[_unitIndex]) ==
  5791. JSON.stringify(this.unitJson[_unitIndex])
  5792. ) {
  5793. this.$refs.rightboxR.scrollTop = 0;
  5794. return;
  5795. }
  5796. let cPan = 1;
  5797. for (
  5798. var j = 0;
  5799. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  5800. j++
  5801. ) {
  5802. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  5803. j
  5804. ].proVisible = false;
  5805. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  5806. j
  5807. ].proVisible2 = false;
  5808. if (
  5809. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  5810. .length > 1
  5811. ) {
  5812. for (
  5813. var z = 0;
  5814. z <
  5815. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  5816. .length;
  5817. z++
  5818. ) {
  5819. if (
  5820. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  5821. .toolChoose[z].tool.length
  5822. ) {
  5823. this.$message.error("请把工具添加完整");
  5824. cPan = 2;
  5825. break;
  5826. }
  5827. }
  5828. }
  5829. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  5830. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  5831. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  5832. (ele) => {
  5833. return ele.value != "";
  5834. }
  5835. );
  5836. }
  5837. }
  5838. if (cPan == 2) {
  5839. this.unitIndex = oldValue;
  5840. return;
  5841. }
  5842. for (var i = 0; i < this.unitJson.length; i++) {
  5843. if (this.addindex != i) {
  5844. delete this.unitJson[i].isUpdate;
  5845. }
  5846. }
  5847. this.$refs.rightboxR.scrollTop = 0;
  5848. this.addindex = -1;
  5849. let params = [
  5850. {
  5851. cid: this.cid,
  5852. chapters: JSON.stringify(this.unitJson),
  5853. uid: this.userid,
  5854. unitIndex: _unitIndex,
  5855. },
  5856. ];
  5857. this.ajax
  5858. .post(this.$store.state.api + "updateWorkNew4", params)
  5859. .then((res) => {
  5860. // this.$message({
  5861. // message: "修改成功",
  5862. // type: "success",
  5863. // });
  5864. // this.courseId = this.cid;
  5865. this.addtips()
  5866. })
  5867. .catch((err) => {
  5868. this.$message.error("网络不佳");
  5869. console.error(err);
  5870. });
  5871. }
  5872. },
  5873. steps(newValue, old) {
  5874. if (newValue == 4) {
  5875. let cPan = 1;
  5876. for (var i = 0; i < this.unitJson.length; i++) {
  5877. for (
  5878. var j = 0;
  5879. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  5880. j++
  5881. ) {
  5882. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  5883. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  5884. if (
  5885. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  5886. ) {
  5887. for (
  5888. var z = 0;
  5889. z <
  5890. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  5891. z++
  5892. ) {
  5893. if (
  5894. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  5895. .tool.length
  5896. ) {
  5897. this.$message.error("请把工具添加完整");
  5898. cPan = 2;
  5899. break;
  5900. }
  5901. }
  5902. }
  5903. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  5904. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  5905. i
  5906. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  5907. return ele.value != "";
  5908. });
  5909. }
  5910. }
  5911. }
  5912. this.inputShow = true;
  5913. if (cPan == 2) {
  5914. this.steps = old;
  5915. return;
  5916. }
  5917. this.goTo(
  5918. "/course?userid=" +
  5919. this.userid +
  5920. "&oid=" +
  5921. this.oid +
  5922. "&org=" +
  5923. this.org +
  5924. "&role=" +
  5925. this.role
  5926. );
  5927. }
  5928. },
  5929. },
  5930. methods: {
  5931. tableRowClassName({ row, rowIndex }) {
  5932. if ((rowIndex + 1) % 2 === 0) {
  5933. return "even_row";
  5934. } else {
  5935. return "";
  5936. }
  5937. },
  5938. close() {
  5939. this.cetIndex = "";
  5940. this.cettIndex = "";
  5941. this.templateName = "";
  5942. this.cetBoxDialog = false;
  5943. },
  5944. openAI() {
  5945. top.postMessage({ tools: "64" }, "*");
  5946. },
  5947. setMan() {
  5948. // let teacherJuri = this.teacherJuri2;
  5949. this.ManAarray = [];
  5950. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  5951. if (_user.indexOf(this.userid) == -1) {
  5952. _user.push(this.userid);
  5953. }
  5954. if (_user.indexOf(this.courseUserid) == -1) {
  5955. _user.push(this.courseUserid);
  5956. }
  5957. let params = {
  5958. uid: _user.join(","),
  5959. };
  5960. this.ajax
  5961. .get(this.$store.state.api + "getAllUserById", params)
  5962. .then((res) => {
  5963. let teacherJuri = res.data[0];
  5964. this.ManAarray = teacherJuri;
  5965. })
  5966. .catch((err) => {
  5967. console.error(err);
  5968. });
  5969. },
  5970. previewImg(url) {
  5971. this.$hevueImgPreview(url);
  5972. },
  5973. btnDisplay(bool) {
  5974. this.isBtnDisplay = bool;
  5975. },
  5976. stepDisplay(bool) {
  5977. this.isStepDisplay = bool;
  5978. },
  5979. scrollChange() {
  5980. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  5981. },
  5982. addHw(e) {
  5983. var el = e.currentTarget;
  5984. el.getElementsByTagName("input")[0].click();
  5985. },
  5986. change(val) {
  5987. if (this.dialogVisible1) {
  5988. this.tdetail = val;
  5989. } else if (this.dialogVisible6) {
  5990. this.AttText.text = val;
  5991. } else if (this.dialogVisible2) {
  5992. this.cTemplate = val;
  5993. } else if (this.dialogVisibleTable) {
  5994. this.tableJson.text = val;
  5995. }
  5996. this.$forceUpdate();
  5997. console.log(val);
  5998. },
  5999. change2(val) {
  6000. console.log(val);
  6001. this.$forceUpdate();
  6002. },
  6003. handleClose(done) {
  6004. done();
  6005. },
  6006. closePan(tool) {
  6007. if (tool == 15) {
  6008. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  6009. this.dialogVisible8 = false;
  6010. } else {
  6011. this.closeConfirm(tool);
  6012. }
  6013. } else if (tool == 4) {
  6014. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  6015. this.dialogVisible5 = false;
  6016. } else {
  6017. this.closeConfirm(tool);
  6018. }
  6019. } else if (tool == 45) {
  6020. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  6021. this.dialogVisibleChoice = false;
  6022. } else {
  6023. this.closeConfirm(tool);
  6024. }
  6025. } else if (tool == 41) {
  6026. if (
  6027. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  6028. ) {
  6029. this.dialogVisibleSelect = false;
  6030. } else {
  6031. this.closeConfirm(tool);
  6032. }
  6033. } else if (tool == 47) {
  6034. if (
  6035. JSON.stringify(this.sentenceList) ==
  6036. JSON.stringify(this.sentenceList2)
  6037. ) {
  6038. this.dialogVisibleSentence = false;
  6039. } else {
  6040. this.closeConfirm(tool);
  6041. }
  6042. } else if (tool == 69) {
  6043. if (
  6044. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  6045. ) {
  6046. this.englishDialogVisible = false;
  6047. } else {
  6048. this.closeConfirm(tool);
  6049. }
  6050. }
  6051. },
  6052. closeConfirm(tool) {
  6053. this.$confirm("是否保存已编辑内容?", "提示", {
  6054. confirmButtonText: "保存",
  6055. cancelButtonText: "不保存",
  6056. type: "warning",
  6057. })
  6058. .then(() => {
  6059. if (tool == 15) {
  6060. this.addAnswer();
  6061. } else if (tool == 4) {
  6062. this.addAsk();
  6063. } else if (tool == 45) {
  6064. this.addTest();
  6065. } else if (tool == 41) {
  6066. this.addSelectAnswer();
  6067. } else if (tool == 47) {
  6068. this.addSentenceTool();
  6069. } else if (tool == 69) {
  6070. this.addEnglish();
  6071. }
  6072. })
  6073. .catch(() => {
  6074. if (tool == 15) {
  6075. this.dialogVisible8 = false;
  6076. } else if (tool == 4) {
  6077. this.dialogVisible5 = false;
  6078. } else if (tool == 45) {
  6079. this.dialogVisibleChoice = false;
  6080. } else if (tool == 41) {
  6081. this.dialogVisibleSelect = false;
  6082. } else if (tool == 47) {
  6083. this.dialogVisibleSentence = false;
  6084. } else if (tool == 69) {
  6085. this.englishDialogVisible = false;
  6086. }
  6087. });
  6088. },
  6089. addEnglish(jsonType) {
  6090. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  6091. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  6092. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  6093. if (
  6094. this.englishList.engTitle == "" ||
  6095. this.englishList.englishText == ""
  6096. ) {
  6097. this.$message.error("请将内容填写完整!");
  6098. return;
  6099. }
  6100. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  6101. this.taskCount
  6102. ].toolChoose[this.toolIndex].englishList = this.englishList;
  6103. this.englishList = {};
  6104. if (jsonType && jsonType == 1) {
  6105. this.englishDialogVisible = true;
  6106. } else {
  6107. this.englishDialogVisible = false;
  6108. }
  6109. if (
  6110. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  6111. .toolChoose[this.toolIndex].tool != 69
  6112. ) {
  6113. this.addTools(69, this.taskCount, this.toolIndex);
  6114. }
  6115. },
  6116. imgChange2(i, j) {
  6117. var _tmp = this.testJson.testJson[i].checkList[j];
  6118. this.noneBtnImg = _tmp.length >= 1;
  6119. },
  6120. imgChange3(i) {
  6121. var _tmp = this.testJson.testJson[i];
  6122. this.noneBtnImg = _tmp.length >= 1;
  6123. },
  6124. imgChange1(file, fileList, type, itemTaskIndex) {
  6125. if (type == 1) {
  6126. var _tmp = this.cover;
  6127. } else if (
  6128. type == 2 ||
  6129. type == 3 ||
  6130. type == 6 ||
  6131. type == 7 ||
  6132. type == 8
  6133. ) {
  6134. var _tmp =
  6135. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  6136. .chapterData;
  6137. } else if (type == 4) {
  6138. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  6139. } else {
  6140. var _tmp =
  6141. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  6142. .homeworkList;
  6143. }
  6144. this.noneBtnImg = _tmp.length >= 1;
  6145. },
  6146. goTo(path) {
  6147. this.$router.push(path);
  6148. },
  6149. guid() {
  6150. var _num,
  6151. i,
  6152. _guid = "";
  6153. for (i = 0; i < 32; i++) {
  6154. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  6155. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  6156. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  6157. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  6158. _guid += "-";
  6159. }
  6160. }
  6161. return _guid;
  6162. },
  6163. retrunCourse() {
  6164. if(this.istemplate == 1){
  6165. this.goTo(
  6166. "/course?userid=" +
  6167. this.userid +
  6168. "&oid=" +
  6169. this.oid +
  6170. "&org=" +
  6171. this.org +
  6172. "&role=" +
  6173. this.role
  6174. );
  6175. return
  6176. }
  6177. this.$confirm("是否保存已编辑内容?", "提示", {
  6178. confirmButtonText: "保存",
  6179. cancelButtonText: "不保存",
  6180. distinguishCancelAndClose: true,
  6181. type: "warning",
  6182. })
  6183. .then(() => {
  6184. if (this.cid == "" || this.cid == undefined) {
  6185. if (this.courseName == "") {
  6186. this.$message.error("请补充填写课程名称");
  6187. return;
  6188. } else {
  6189. this.addWork();
  6190. }
  6191. this.steps = 4;
  6192. } else {
  6193. if (this.courseName == "") {
  6194. this.$message.error("请补充填写课程名称");
  6195. return;
  6196. } else {
  6197. if (this.userid != this.courseUserid && this.role != "1") {
  6198. this.updateWork2();
  6199. } else {
  6200. this.updateWork();
  6201. }
  6202. this.steps = 4;
  6203. }
  6204. }
  6205. })
  6206. .catch((v) => {
  6207. console.log(v);
  6208. if (v == "cancel") {
  6209. this.goTo(
  6210. "/course?userid=" +
  6211. this.userid +
  6212. "&oid=" +
  6213. this.oid +
  6214. "&org=" +
  6215. this.org +
  6216. "&role=" +
  6217. this.role
  6218. );
  6219. }
  6220. });
  6221. },
  6222. lastSteps() {
  6223. if (this.steps == 4) {
  6224. this.goTo(
  6225. "/course?userid=" +
  6226. this.userid +
  6227. "&oid=" +
  6228. this.oid +
  6229. "&org=" +
  6230. this.org +
  6231. "&role=" +
  6232. this.role
  6233. );
  6234. } else {
  6235. // if (this.cidType == 0) {
  6236. // this.steps--;
  6237. // if (this.steps == 1) {
  6238. // setTimeout(() => {
  6239. // this.checkEva(this.checkId);
  6240. // setTimeout(() => {
  6241. // this.checkEva(this.checkId);
  6242. // }, 100);
  6243. // }, 100);
  6244. // }
  6245. // } else {
  6246. if (this.steps == 3) {
  6247. this.steps = 1;
  6248. setTimeout(() => {
  6249. this.checkEva(this.checkId);
  6250. setTimeout(() => {
  6251. this.checkEva(this.checkId);
  6252. }, 100);
  6253. }, 100);
  6254. }
  6255. // }
  6256. }
  6257. },
  6258. navSteps(s) {
  6259. if (this.courseName == "") {
  6260. this.$message.error("请补充填写课程名称");
  6261. return;
  6262. }
  6263. if (this.cidType == 0) {
  6264. if (this.steps == 1) {
  6265. if (this.cid == "" || this.cid == undefined) {
  6266. this.addWork();
  6267. } else {
  6268. if (this.userid != this.courseUserid && this.role != "1") {
  6269. this.updateWork2();
  6270. } else {
  6271. this.updateWork();
  6272. }
  6273. }
  6274. }
  6275. if (s == 1) {
  6276. this.steps = 1;
  6277. setTimeout(() => {
  6278. this.checkEva(this.checkId);
  6279. setTimeout(() => {
  6280. this.checkEva(this.checkId);
  6281. }, 100);
  6282. }, 100);
  6283. }
  6284. if (s == 2) {
  6285. this.steps = 2;
  6286. }
  6287. if (s == 3) {
  6288. this.cTemplate = this.templateC.content;
  6289. this.dialogVisible2 = false;
  6290. this.steps = 3;
  6291. this.isClickColor = 1;
  6292. this.unitJson[
  6293. this.unitIndex
  6294. ].chapterInfo[0].taskJson[0].toolOpen = true;
  6295. this.$forceUpdate();
  6296. setTimeout(() => {
  6297. this.checkEva(this.checkId);
  6298. setTimeout(() => {
  6299. this.checkEva(this.checkId);
  6300. }, 100);
  6301. }, 1000);
  6302. }
  6303. } else {
  6304. if (this.steps == 1) {
  6305. if (this.cid == "" || this.cid == undefined) {
  6306. this.addWork();
  6307. } else {
  6308. if (this.userid != this.courseUserid && this.role != "1") {
  6309. this.updateWork2();
  6310. } else {
  6311. this.updateWork();
  6312. }
  6313. }
  6314. }
  6315. if (s == 1) {
  6316. this.steps = 1;
  6317. setTimeout(() => {
  6318. this.checkEva(this.checkId);
  6319. setTimeout(() => {
  6320. this.checkEva(this.checkId);
  6321. }, 100);
  6322. }, 100);
  6323. }
  6324. if (s == 3) {
  6325. this.cTemplate = this.templateC.content;
  6326. this.dialogVisible2 = false;
  6327. this.steps = 3;
  6328. this.isClickColor = 1;
  6329. this.unitJson[
  6330. this.unitIndex
  6331. ].chapterInfo[0].taskJson[0].toolOpen = true;
  6332. this.$forceUpdate();
  6333. setTimeout(() => {
  6334. this.checkEva(this.checkId);
  6335. setTimeout(() => {
  6336. this.checkEva(this.checkId);
  6337. }, 100);
  6338. }, 1000);
  6339. }
  6340. }
  6341. this.$refs.stepBox.scrollTop = 0;
  6342. },
  6343. nextSteps(clickType) {
  6344. // if (this.cidType == 1) {
  6345. if (this.steps == 1) {
  6346. if (this.courseName != "") {
  6347. if (this.ttaskDetailLoading5.indexOf('task-') !== -1 || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  6348. this.$message({
  6349. message: "请回答完毕后再次发送",
  6350. type: "warning"
  6351. });
  6352. return;
  6353. }
  6354. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && !this.isOutline) {
  6355. this.openAiDialog(clickType, 'aiOutline')
  6356. return;
  6357. }
  6358. if(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" && this.cpoteType != 4){
  6359. let _type = ''
  6360. if(this.cpoteType == 0){
  6361. _type = 'aiCpote1'
  6362. }else if(this.cpoteType == 1){
  6363. _type = 'aiCpote2'
  6364. }else if(this.cpoteType == 2){
  6365. _type = 'aiCpote3'
  6366. }else if(this.cpoteType == 3){
  6367. _type = 'aiCpote4'
  6368. }
  6369. this.cpoteType++
  6370. this.openAiDialog(clickType, _type)
  6371. return;
  6372. }
  6373. if (!this.isOutline2 && this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  6374. this.openAiDialog(clickType, 'aiTeacher')
  6375. return;
  6376. }
  6377. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") {
  6378. this.openAiDialog(clickType, 'aiTeacher2')
  6379. return;
  6380. }
  6381. const functionA = () => {
  6382. setTimeout(() => {
  6383. this.loading = false
  6384. this.steps = 3;
  6385. }, 0)
  6386. this.isClickColor = 1;
  6387. this.unitJson[
  6388. this.unitIndex
  6389. ].chapterInfo[0].taskJson[0].toolOpen = true;
  6390. this.$forceUpdate();
  6391. setTimeout(() => {
  6392. this.checkEva(this.checkId);
  6393. setTimeout(() => {
  6394. this.checkEva(this.checkId);
  6395. }, 100);
  6396. }, 1000);
  6397. if (this.cid == "" || this.cid == undefined) {
  6398. this.addWork();
  6399. } else {
  6400. if (this.userid != this.courseUserid && this.role != "1") {
  6401. this.updateWork2();
  6402. } else {
  6403. this.updateWork();
  6404. }
  6405. }
  6406. }
  6407. if (this.cid) {
  6408. this.loading = true
  6409. functionA()
  6410. } else {
  6411. this.openAiDialog(clickType, "aiTask", functionA)
  6412. }
  6413. } else {
  6414. this.$message.error("请补充填写课程名称");
  6415. return;
  6416. }
  6417. } else if (this.steps == 3) {
  6418. if (this.cid == "" || this.cid == undefined) {
  6419. if (this.courseName == "") {
  6420. this.$message.error("请补充填写课程名称");
  6421. return;
  6422. } else {
  6423. this.addWork();
  6424. this.steps++;
  6425. }
  6426. } else {
  6427. if (this.courseName == "") {
  6428. this.$message.error("请补充填写课程名称");
  6429. return;
  6430. } else {
  6431. if (this.userid != this.courseUserid && this.role != "1") {
  6432. this.updateWork2();
  6433. } else {
  6434. this.updateWork();
  6435. }
  6436. this.steps++;
  6437. }
  6438. }
  6439. }
  6440. // } else {
  6441. // if (this.steps == 1) {
  6442. // if (this.courseName != "") {
  6443. // if (this.cid == "" || this.cid == undefined) {
  6444. // this.addWork();
  6445. // } else {
  6446. // if (this.userid != this.courseUserid && this.role != "1") {
  6447. // // this.updateWork2();
  6448. // } else {
  6449. // this.updateWork();
  6450. // }
  6451. // }
  6452. // this.steps++;
  6453. // } else {
  6454. // this.$message.error("请补充填写课程名称");
  6455. // return;
  6456. // }
  6457. // } else if (this.steps == 2) {
  6458. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  6459. // this.cTemplate = this.templateC.content;
  6460. // }
  6461. // this.dialogVisible2 = false;
  6462. // this.steps++;
  6463. // setTimeout(() => {
  6464. // this.checkEva(this.checkId);
  6465. // setTimeout(() => {
  6466. // this.checkEva(this.checkId);
  6467. // }, 100);
  6468. // }, 1000);
  6469. // } else if (this.steps == 3) {
  6470. // if (this.cid == "" || this.cid == undefined) {
  6471. // if (this.courseName == "") {
  6472. // this.$message.error("请补充填写课程名称");
  6473. // return;
  6474. // } else {
  6475. // this.addWork();
  6476. // this.steps++;
  6477. // }
  6478. // } else {
  6479. // if (this.courseName == "") {
  6480. // this.$message.error("请补充填写课程名称");
  6481. // return;
  6482. // } else {
  6483. // if (this.userid != this.courseUserid && this.role != "1") {
  6484. // this.updateWork2();
  6485. // } else {
  6486. // this.updateWork();
  6487. // }
  6488. // this.steps++;
  6489. // }
  6490. // }
  6491. // }
  6492. // }
  6493. this.$refs.stepBox.scrollTop = 0;
  6494. },
  6495. unitSet(i) {
  6496. if (this.unitIndex == i) {
  6497. return;
  6498. }
  6499. this.unitIndex = i;
  6500. this.isClickColor = 1;
  6501. // this.$refs.rightboxR.scrollTop = 0;
  6502. this.$refs.unitBox.scrollTop = 0;
  6503. },
  6504. panUnitJson() {
  6505. let _unitIndex = this.unitIndex;
  6506. let cPan = 1;
  6507. for (
  6508. var j = 0;
  6509. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  6510. j++
  6511. ) {
  6512. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  6513. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  6514. j
  6515. ].proVisible2 = false;
  6516. if (
  6517. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  6518. .length > 1
  6519. ) {
  6520. for (
  6521. var z = 0;
  6522. z <
  6523. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  6524. .length;
  6525. z++
  6526. ) {
  6527. if (
  6528. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  6529. z
  6530. ].tool.length
  6531. ) {
  6532. this.$message.error("请把工具添加完整");
  6533. cPan = 2;
  6534. break;
  6535. }
  6536. }
  6537. }
  6538. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  6539. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  6540. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  6541. (ele) => {
  6542. return ele.value != "";
  6543. }
  6544. );
  6545. }
  6546. }
  6547. return cPan;
  6548. },
  6549. unitOpen(i) {
  6550. if (this.unitJson[i].toolOpen) {
  6551. this.unitJson[i].toolOpen = false;
  6552. } else {
  6553. this.unitJson[i].toolOpen = true;
  6554. }
  6555. this.updateWork();
  6556. this.$forceUpdate();
  6557. },
  6558. unitSet2(i) {
  6559. if (this.panUnitJson() == 2) {
  6560. return;
  6561. }
  6562. // if(this.unitJson[i].toolOpen){
  6563. // this.unitJson[i].toolOpen = false
  6564. // this.updateWork()
  6565. // this.$forceUpdate()
  6566. // return
  6567. // }else {
  6568. this.unitJson[i].toolOpen = true;
  6569. // }
  6570. this.$forceUpdate();
  6571. if (this.unitIndex == i) {
  6572. return;
  6573. }
  6574. this.unitIndex = i;
  6575. this.isClickColor = 1;
  6576. // this.$refs.rightboxR.scrollTop = 0;
  6577. this.$refs.unitBox.scrollTop = 0;
  6578. },
  6579. updateCourseState(i) {
  6580. let params = [
  6581. {
  6582. cid: this.cid,
  6583. state: i,
  6584. },
  6585. ];
  6586. this.ajax
  6587. .post(this.$store.state.api + "updateCourseMode", params)
  6588. .then((res) => {
  6589. this.courseState = i;
  6590. })
  6591. .catch((err) => {
  6592. this.$message.error("网络不佳");
  6593. console.error(err);
  6594. });
  6595. },
  6596. addtips(){
  6597. let params = [
  6598. {
  6599. cid: this.cid,
  6600. tips: JSON.stringify(this.aiJson),
  6601. tid: this.templateid
  6602. },
  6603. ];
  6604. this.ajax
  6605. .post(this.$store.state.api + "addTips", params)
  6606. .then((res) => {
  6607. })
  6608. .catch((err) => {
  6609. this.$message.error("网络不佳");
  6610. console.error(err);
  6611. });
  6612. },
  6613. openSaveTips(){
  6614. this.dialogVisibleTips = true
  6615. },
  6616. time() {
  6617. if (!this.now) {
  6618. this.now = new Date().getTime();
  6619. return true;
  6620. } else {
  6621. let time = new Date().getTime();
  6622. if (time - this.now > 3000) {
  6623. this.now = time;
  6624. return true;
  6625. } else {
  6626. return false;
  6627. }
  6628. }
  6629. },
  6630. deleteUnit(i) {
  6631. var _this = this;
  6632. if (i == 0 && _this.unitJson.length == 1) {
  6633. _this
  6634. .$confirm("确定切换成任务模式吗?", "提示", {
  6635. confirmButtonText: "确定",
  6636. cancelButtonText: "取消",
  6637. type: "warning",
  6638. })
  6639. .then(() => {
  6640. _this.unitJson[i].dyName = "";
  6641. // _this.updateCourseState(2);
  6642. })
  6643. .catch(() => {
  6644. return;
  6645. });
  6646. } else {
  6647. _this
  6648. .$confirm("确定删除此阶段吗?", "提示", {
  6649. confirmButtonText: "确定",
  6650. cancelButtonText: "取消",
  6651. type: "warning",
  6652. })
  6653. .then(() => {
  6654. _this.isDelete = 2;
  6655. // _this.unitIndex = _this.unitIndex - 1;
  6656. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  6657. // _this.$message.success("删除成功");
  6658. })
  6659. .catch(() => {
  6660. return;
  6661. });
  6662. }
  6663. },
  6664. deleteWork(chapid) {
  6665. let params = [
  6666. {
  6667. cid: this.cid,
  6668. chapters: JSON.stringify(this.unitJson),
  6669. uid: this.userid,
  6670. chapid: chapid,
  6671. },
  6672. ];
  6673. this.ajax
  6674. .post(this.$store.state.api + "deleteWork", params)
  6675. .then((res) => {
  6676. this.$message({
  6677. message: "删除成功",
  6678. type: "success",
  6679. });
  6680. let task = JSON.parse(
  6681. JSON.stringify(
  6682. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  6683. )
  6684. );
  6685. this.unitJson.splice(this.unitIndex, 1);
  6686. if (this.unitIndex == 0) {
  6687. this.unitIndex = 0;
  6688. } else {
  6689. this.unitIndex = this.unitIndex - 1;
  6690. }
  6691. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  6692. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  6693. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  6694. ...task,
  6695. ];
  6696. }
  6697. })
  6698. .catch((err) => {
  6699. this.$message.error("网络不佳");
  6700. console.error(err);
  6701. });
  6702. },
  6703. deleteTool(itemTaskIndex, i) {
  6704. var _this = this;
  6705. if (_this.time()) {
  6706. _this
  6707. .$confirm("确定删除此工具吗?", "提示", {
  6708. confirmButtonText: "确定",
  6709. cancelButtonText: "取消",
  6710. type: "warning",
  6711. })
  6712. .then(() => {
  6713. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  6714. itemTaskIndex
  6715. ].toolChoose.splice(i, 1);
  6716. _this.$message.success("删除成功");
  6717. })
  6718. .catch(() => {
  6719. return;
  6720. });
  6721. }
  6722. },
  6723. deleteSentence(i) {
  6724. var _this = this;
  6725. _this
  6726. .$confirm("确定删除此题目吗?", "提示", {
  6727. confirmButtonText: "确定",
  6728. cancelButtonText: "取消",
  6729. type: "warning",
  6730. })
  6731. .then(() => {
  6732. _this.sentenceList.splice(i, 1);
  6733. _this.$message.success("删除成功");
  6734. })
  6735. .catch(() => {
  6736. return;
  6737. });
  6738. },
  6739. deleteS(s, i, j) {
  6740. this.sentenceList[i].addSentence.splice(j, 1);
  6741. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  6742. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  6743. this.sentenceList[i].rightAnswer.splice(a, 1);
  6744. }
  6745. },
  6746. openT() {
  6747. top.postMessage({ tools: "25" }, "*");
  6748. },
  6749. deleteTask(i) {
  6750. var _this = this;
  6751. if (_this.time()) {
  6752. _this
  6753. .$confirm(
  6754. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  6755. 1 ==
  6756. i
  6757. ? "确定删除此任务吗?"
  6758. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  6759. "提示",
  6760. {
  6761. confirmButtonText: "确定",
  6762. cancelButtonText: "取消",
  6763. type: "warning",
  6764. }
  6765. )
  6766. .then(() => {
  6767. if (i == 0) {
  6768. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  6769. i + 1
  6770. ].chapterData = JSON.parse(
  6771. JSON.stringify(
  6772. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  6773. .chapterData
  6774. )
  6775. );
  6776. }
  6777. _this.$forceUpdate();
  6778. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  6779. i,
  6780. 1
  6781. );
  6782. _this.$message.success("删除成功");
  6783. })
  6784. .catch(() => {
  6785. return;
  6786. });
  6787. }
  6788. },
  6789. handlePictureCardPreview(file) {
  6790. this.dialogImageUrl = file.url;
  6791. },
  6792. clean(i, c) {
  6793. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  6794. },
  6795. handle_remove1(file, fileList, type) {
  6796. var _tmp = this.cover;
  6797. // for (var i = 0, len = _tmp.length; i < len; i++) {
  6798. // if (_tmp[i].uid == file.uid) {
  6799. // _tmp.splice(i, 1);
  6800. // break;
  6801. // }
  6802. // this.cover = _tmp;
  6803. // }
  6804. this.cover = [];
  6805. this.noneBtnImg = this.cover.length >= 1;
  6806. this.isSysPic = false;
  6807. this.isSysPic2 = false;
  6808. this.$forceUpdate();
  6809. },
  6810. addImg(e) {
  6811. var el = e.currentTarget;
  6812. el.getElementsByTagName("input")[0].click();
  6813. e.target.value = "";
  6814. },
  6815. addChaptersTools(i) {
  6816. this.chapTools = [
  6817. {
  6818. tools: [],
  6819. toolDetail: "",
  6820. },
  6821. ];
  6822. this.chapCount = i;
  6823. this.dialogVisible4 = true;
  6824. },
  6825. isNoFinsh() {
  6826. this.$message.warning("功能正在开发中");
  6827. },
  6828. addAttText(i) {
  6829. this.AttText = {
  6830. title: "",
  6831. text: "",
  6832. };
  6833. this.taskCount = i;
  6834. this.AttTextType = 0;
  6835. this.$forceUpdate();
  6836. this.dialogVisible6 = true;
  6837. setTimeout(() => {
  6838. this.$refs["fuInput"].focus();
  6839. }, 100);
  6840. },
  6841. openLine(i) {
  6842. this.line = "";
  6843. this.lineCount = i;
  6844. this.lineType = 0;
  6845. this.$forceUpdate();
  6846. this.dialogVisible7 = true;
  6847. },
  6848. pasteLine(i) {
  6849. navigator.clipboard
  6850. .readText()
  6851. .then((v) => {
  6852. console.log("获取剪贴板成功:", v);
  6853. const html = v;
  6854. const regex = /src="(.*?)"/g;
  6855. const match = regex.exec(html);
  6856. if (match && match[1]) {
  6857. console.log(match[1]);
  6858. this.$message.success("粘贴成功");
  6859. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  6860. i
  6861. ].chapterData.push({
  6862. name: "链接",
  6863. title: "嵌入代码",
  6864. url: match[1],
  6865. type: 8,
  6866. });
  6867. } else {
  6868. // console.log("未找到包含 src 属性的 iframe");
  6869. this.$message.error(
  6870. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  6871. );
  6872. }
  6873. })
  6874. .catch((v) => {
  6875. console.log("获取剪贴板失败: ", v);
  6876. });
  6877. },
  6878. openSource(i) {
  6879. this.lineCount = i;
  6880. this.sourceData = {};
  6881. this.dialogVisibleSource = true;
  6882. this.updateSourcePan = false;
  6883. },
  6884. openAiCreate(){
  6885. this.dialogVisibleAiCreate = true;
  6886. },
  6887. createAiPpt(json){
  6888. this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push(json);
  6889. this.dialogVisibleAiCreate = false;
  6890. },
  6891. openAiCreateVideo(){
  6892. this.dialogVisibleAiCreateVideo = true;
  6893. },
  6894. createAiVideo(json){
  6895. this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push(json);
  6896. // this.dialogVisibleAiCreateVideo = false;
  6897. },
  6898. async createTeacherAn(){
  6899. this.loading = true
  6900. let md = new MarkdownIt();
  6901. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  6902. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  6903. let name = _task.task+'-教案'
  6904. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  6905. await this.generate(name, _html, i)
  6906. }
  6907. },
  6908. async generate(a, html, index) {
  6909. // 将html文件中需要用到的数据挂载到store上
  6910. const content = `<!DOCTYPE html>
  6911. <html lang="en">
  6912. <head>
  6913. <meta charset="UTF-8">
  6914. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6915. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6916. <title>${a}</title>
  6917. <style>
  6918. </style>
  6919. </head>
  6920. <body>
  6921. ${html}
  6922. </body>
  6923. </html>`;
  6924. // debugger
  6925. let dname = a + ".doc";
  6926. // 创建文件流
  6927. // 创建bolb实例时,内容一定要放在[]中
  6928. const blob = new Blob([content], {
  6929. type: "text/plain;charset='utf-8'",
  6930. });
  6931. const file = new File([blob], dname, { type: 'application/msword' });
  6932. await this.beforeUploadHtml(file, index)
  6933. },
  6934. beforeUploadHtml(event, index) {
  6935. var file = event;
  6936. var credentials = {
  6937. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  6938. secretAccessKey: "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",
  6939. }; //秘钥形式的登录上传
  6940. window.AWS.config.update(credentials);
  6941. window.AWS.config.region = "cn-northwest-1"; //设置区域
  6942. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  6943. var _this = this;
  6944. if (file) {
  6945. var params = {
  6946. Key:
  6947. file.name.split(".")[0] +
  6948. new Date().getTime() +
  6949. "." +
  6950. file.name.split(".")[file.name.split(".").length - 1],
  6951. ContentType: file.type,
  6952. Body: file,
  6953. "Access-Control-Allow-Credentials": "*",
  6954. ACL: "public-read",
  6955. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  6956. var options = {
  6957. partSize: 2048 * 1024 * 1024,
  6958. queueSize: 2,
  6959. leavePartsOnError: true,
  6960. };
  6961. bucket
  6962. .upload(params, options)
  6963. .on("httpUploadProgress", function (evt) {
  6964. //这里可以写进度条
  6965. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  6966. })
  6967. .send(function (err, data) {
  6968. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1)){
  6969. _this.loading = false
  6970. }
  6971. if (err) {
  6972. _this.$message.error("上传失败");
  6973. } else {
  6974. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push({
  6975.                   name: file.name,
  6976.                   url: data.Location,
  6977.                   type: 3,
  6978.                 })
  6979. console.log(data.Location);
  6980. }
  6981. });
  6982. }
  6983. },
  6984. addSource() {
  6985. if (!Object.keys(this.sourceData).length) {
  6986. this.$message.error("请选择要上传的资源");
  6987. return;
  6988. }
  6989. let keys = Object.keys(this.sourceData);
  6990. for (var i = 0; i < keys.length; i++) {
  6991. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  6992. this.lineCount
  6993. ].chapterData.push({
  6994. name: "链接",
  6995. title: this.sourceData[keys[i]].name,
  6996. url: this.sourceData[keys[i]].url,
  6997. type: 14,
  6998. id: keys[i],
  6999. });
  7000. }
  7001. this.$forceUpdate();
  7002. this.dialogVisibleSource = false;
  7003. },
  7004. updateSource() {
  7005. if (!Object.keys(this.sourceData).length) {
  7006. this.$message.error("请选择要上传的资源");
  7007. return;
  7008. }
  7009. let keys = Object.keys(this.sourceData);
  7010. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7011. this.taskCount
  7012. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  7013. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7014. this.taskCount
  7015. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  7016. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7017. this.taskCount
  7018. ].chapterData[this.lineCount].id = keys[0];
  7019. this.updateSourcePan = false;
  7020. this.$forceUpdate();
  7021. this.dialogVisibleSource = false;
  7022. },
  7023. deleteM(i, j) {
  7024. this.testJson.testJson[i].timuList.splice(j, 1);
  7025. },
  7026. beforeUploadTiMu(event, i) {
  7027. const loading = this.openLoading();
  7028. var file = event.target.files[0];
  7029. var credentials = {
  7030. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7031. secretAccessKey: "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",
  7032. }; //秘钥形式的登录上传
  7033. window.AWS.config.update(credentials);
  7034. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7035. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7036. var _this = this;
  7037. if (file) {
  7038. var params = {
  7039. Key:
  7040. file.name.split(".")[0] +
  7041. new Date().getTime() +
  7042. "." +
  7043. file.name.split(".")[file.name.split(".").length - 1],
  7044. ContentType: file.type,
  7045. Body: file,
  7046. "Access-Control-Allow-Credentials": "*",
  7047. ACL: "public-read",
  7048. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7049. var options = {
  7050. partSize: 2048 * 1024 * 1024,
  7051. queueSize: 2,
  7052. leavePartsOnError: true,
  7053. };
  7054. bucket
  7055. .upload(params, options)
  7056. .on("httpUploadProgress", function (evt) {
  7057. //这里可以写进度条
  7058. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7059. })
  7060. .send(function (err, data) {
  7061. loading.close();
  7062. if (err) {
  7063. _this.$message.error("上传失败");
  7064. } else {
  7065. if (_this.testJson.testJson[i].timuList) {
  7066. _this.testJson.testJson[i].timuList.push({
  7067. src: data.Location,
  7068. });
  7069. } else {
  7070. _this.testJson.testJson[i].timuList = [];
  7071. _this.testJson.testJson[i].timuList.push({
  7072. src: data.Location,
  7073. });
  7074. }
  7075. _this.imgChange3(i);
  7076. _this.$forceUpdate();
  7077. }
  7078. });
  7079. }
  7080. },
  7081. beforeUploadTi(event, i, j) {
  7082. const loading = this.openLoading();
  7083. var file = event.target.files[0];
  7084. var credentials = {
  7085. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7086. secretAccessKey: "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",
  7087. }; //秘钥形式的登录上传
  7088. window.AWS.config.update(credentials);
  7089. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7090. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7091. var _this = this;
  7092. if (file) {
  7093. var params = {
  7094. Key:
  7095. file.name.split(".")[0] +
  7096. new Date().getTime() +
  7097. "." +
  7098. file.name.split(".")[file.name.split(".").length - 1],
  7099. ContentType: file.type,
  7100. Body: file,
  7101. "Access-Control-Allow-Credentials": "*",
  7102. ACL: "public-read",
  7103. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7104. var options = {
  7105. partSize: 2048 * 1024 * 1024,
  7106. queueSize: 2,
  7107. leavePartsOnError: true,
  7108. };
  7109. bucket
  7110. .upload(params, options)
  7111. .on("httpUploadProgress", function (evt) {
  7112. //这里可以写进度条
  7113. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7114. })
  7115. .send(function (err, data) {
  7116. loading.close();
  7117. if (err) {
  7118. _this.$message.error("上传失败");
  7119. } else {
  7120. _this.testJson.testJson[i].checkList[j] = {};
  7121. _this.testJson.testJson[i].checkList[j].src = data.Location;
  7122. _this.testJson.testJson[i].checkList[j].imgType = 1;
  7123. _this.imgChange2(i, j);
  7124. _this.$forceUpdate();
  7125. }
  7126. });
  7127. }
  7128. },
  7129. beforeUpload1(event, type) {
  7130. // const loading = this.openLoading();
  7131. var file = event.target.files[0];
  7132. var credentials = {
  7133. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7134. secretAccessKey: "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",
  7135. }; //秘钥形式的登录上传
  7136. window.AWS.config.update(credentials);
  7137. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7138. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7139. var _this = this;
  7140. if (file) {
  7141. var params = {
  7142. Key:
  7143. file.name.split(".")[0] +
  7144. new Date().getTime() +
  7145. "." +
  7146. file.name.split(".")[file.name.split(".").length - 1],
  7147. ContentType: file.type,
  7148. Body: file,
  7149. "Access-Control-Allow-Credentials": "*",
  7150. ACL: "public-read",
  7151. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7152. var options = {
  7153. partSize: 2048 * 1024 * 1024,
  7154. queueSize: 2,
  7155. leavePartsOnError: true,
  7156. };
  7157. bucket
  7158. .upload(params, options)
  7159. .on("httpUploadProgress", function (evt) {
  7160. //这里可以写进度条
  7161. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7162. })
  7163. .send(function (err, data) {
  7164. // loading.close();
  7165. if (err) {
  7166. // var a = _this.$refs.upload1.uploadFiles;
  7167. // a.splice(a.length - 1, a.length);
  7168. _this.$message.error("上传失败");
  7169. } else {
  7170. // _this.cover.push({
  7171. // name: file.name,
  7172. // url: data.Location,
  7173. // uid: file.uid,
  7174. // });
  7175. _this.cover = [
  7176. {
  7177. name: file.name,
  7178. url: data.Location,
  7179. uid: file.uid,
  7180. },
  7181. ];
  7182. _this.imgChange1(null, null, 1, null);
  7183. _this.choosePicVisible = false;
  7184. console.log(data.Location);
  7185. }
  7186. });
  7187. }
  7188. },
  7189. beforeUploadSelect(event, type) {
  7190. // const loading = this.openLoading();
  7191. var file = event.target.files[0];
  7192. var credentials = {
  7193. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7194. secretAccessKey: "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",
  7195. }; //秘钥形式的登录上传
  7196. window.AWS.config.update(credentials);
  7197. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7198. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7199. var _this = this;
  7200. if (file) {
  7201. var params = {
  7202. Key:
  7203. file.name.split(".")[0] +
  7204. new Date().getTime() +
  7205. "." +
  7206. file.name.split(".")[file.name.split(".").length - 1],
  7207. ContentType: file.type,
  7208. Body: file,
  7209. "Access-Control-Allow-Credentials": "*",
  7210. ACL: "public-read",
  7211. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7212. var options = {
  7213. partSize: 2048 * 1024 * 1024,
  7214. queueSize: 2,
  7215. leavePartsOnError: true,
  7216. };
  7217. bucket
  7218. .upload(params, options)
  7219. .on("httpUploadProgress", function (evt) {
  7220. //这里可以写进度条
  7221. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7222. })
  7223. .send(function (err, data) {
  7224. // loading.close();
  7225. if (err) {
  7226. _this.$message.error("上传失败");
  7227. } else {
  7228. _this.selectJson.url = data.Location;
  7229. console.log(data.Location);
  7230. }
  7231. });
  7232. }
  7233. },
  7234. chooseSysPic(p) {
  7235. this.cover = [];
  7236. setTimeout(() => {
  7237. this.cover[0] = {
  7238. name: "系统图片.png",
  7239. url: p,
  7240. };
  7241. this.imgChange1(null, null, 1, null);
  7242. this.$forceUpdate();
  7243. }, 0);
  7244. this.isSysPic = true;
  7245. this.isSysPic2 = false;
  7246. this.sysPicVisible = false;
  7247. this.$forceUpdate();
  7248. },
  7249. chooseSysPic2(p) {
  7250. this.cover = [];
  7251. setTimeout(() => {
  7252. this.cover[0] = {
  7253. name: "网络图片.png",
  7254. url: p,
  7255. };
  7256. this.imgChange1(null, null, 1, null);
  7257. this.$forceUpdate();
  7258. }, 0);
  7259. this.isSysPic2 = true;
  7260. this.isSysPic = false;
  7261. this.sysPicVisible2 = false;
  7262. this.$forceUpdate();
  7263. },
  7264. beforeUpload(data) {
  7265. this.$refs.upload1.uploadFiles;
  7266. this.uploadLoading1 = true;
  7267. var file = data.file;
  7268. var credentials = {
  7269. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7270. secretAccessKey: "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",
  7271. }; //秘钥形式的登录上传
  7272. window.AWS.config.update(credentials);
  7273. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7274. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7275. var _this = this;
  7276. if (file) {
  7277. var params = {
  7278. Key:
  7279. file.name.split(".")[0] +
  7280. new Date().getTime() +
  7281. "." +
  7282. file.name.split(".")[file.name.split(".").length - 1],
  7283. ContentType: file.type,
  7284. Body: file,
  7285. "Access-Control-Allow-Credentials": "*",
  7286. ACL: "public-read",
  7287. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7288. var options = {
  7289. partSize: 2048 * 1024 * 1024,
  7290. queueSize: 2,
  7291. leavePartsOnError: true,
  7292. };
  7293. bucket
  7294. .upload(params, options)
  7295. .on("httpUploadProgress", function (evt) {
  7296. //这里可以写进度条
  7297. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7298. })
  7299. .send(function (err, data) {
  7300. _this.uploadLoading1 = false;
  7301. if (err) {
  7302. // var a = _this.$refs.upload1.uploadFiles;
  7303. // a.splice(a.length - 1, a.length);
  7304. _this.$message.error("上传失败");
  7305. } else {
  7306. //上传成功处理
  7307. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  7308. name: file.name,
  7309. url: data.Location,
  7310. uid: file.uid,
  7311. });
  7312. _this.imgChange();
  7313. console.log(data.Location);
  7314. }
  7315. });
  7316. }
  7317. },
  7318. onExceed() {
  7319. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  7320. },
  7321. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  7322. // const loading = this.openLoading();
  7323. var file = event.target.files[0];
  7324. var credentials = {
  7325. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7326. secretAccessKey: "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",
  7327. }; //秘钥形式的登录上传
  7328. window.AWS.config.update(credentials);
  7329. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7330. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7331. var _this = this;
  7332. if (type == 3) {
  7333. var b = [
  7334. "DOC",
  7335. "DOCX",
  7336. "DOCM",
  7337. "DOTM",
  7338. "DOTX",
  7339. "PPTX",
  7340. "PPSX",
  7341. "PPT",
  7342. "PPS",
  7343. "PPTM",
  7344. "POTM",
  7345. "PPAM",
  7346. "POTX",
  7347. "PPSM",
  7348. ];
  7349. if (
  7350. b.indexOf(
  7351. file.name
  7352. .split(".")
  7353. [file.name.split(".").length - 1].toLocaleUpperCase()
  7354. ) != -1
  7355. ) {
  7356. if (file.size / 1024 / 1024 > 80) {
  7357. this.$message.error("上传文件大于80兆,请重新选择文件!");
  7358. this.inputShow = true;
  7359. // var a = _this.$refs.upload1.uploadFiles;
  7360. // a.splice(a.length - 1, a.length);
  7361. // loading.close();
  7362. return;
  7363. }
  7364. } else if (
  7365. file.name
  7366. .split(".")
  7367. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  7368. ) {
  7369. if (file.size / 1024 / 1024 > 80) {
  7370. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  7371. this.inputShow = true;
  7372. // var a = _this.$refs.upload1.uploadFiles;
  7373. // a.splice(a.length - 1, a.length);
  7374. // loading.close();
  7375. return;
  7376. }
  7377. }
  7378. }
  7379. this.inputShow = false;
  7380. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7381. itemTaskIndex
  7382. ].progress = 0;
  7383. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7384. itemTaskIndex
  7385. ].proVisible = true;
  7386. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7387. itemTaskIndex
  7388. ].isFinishSize = 0;
  7389. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7390. itemTaskIndex
  7391. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  7392. _this.$forceUpdate();
  7393. if (file) {
  7394. var params = {
  7395. Key:
  7396. file.name.split(".")[0] +
  7397. new Date().getTime() +
  7398. "." +
  7399. file.name.split(".")[file.name.split(".").length - 1],
  7400. ContentType: file.type,
  7401. Body: file,
  7402. "Access-Control-Allow-Credentials": "*",
  7403. ACL: "public-read",
  7404. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7405. var options = {
  7406. partSize: 2048 * 1024 * 1024,
  7407. queueSize: 2,
  7408. leavePartsOnError: true,
  7409. };
  7410. bucket
  7411. .upload(params, options)
  7412. .on("httpUploadProgress", function (evt) {
  7413. //这里可以写进度条
  7414. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7415. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7416. itemTaskIndex
  7417. ].progress = parseInt((evt.loaded / evt.total) * 100);
  7418. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7419. itemTaskIndex
  7420. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  7421. _this.$forceUpdate();
  7422. })
  7423. .send(function (err, data) {
  7424. // loading.close();
  7425. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7426. itemTaskIndex
  7427. ].progress = 100;
  7428. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7429. itemTaskIndex
  7430. ].isFinishSize =
  7431. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7432. itemTaskIndex
  7433. ].isAllSize;
  7434. _this.$forceUpdate();
  7435. setTimeout(() => {
  7436. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7437. itemTaskIndex
  7438. ].proVisible = false;
  7439. _this.$forceUpdate();
  7440. }, 1000);
  7441. _this.inputShow = true;
  7442. if (err) {
  7443. // var a = _this.$refs.upload1.uploadFiles;
  7444. // a.splice(a.length - 1, a.length);
  7445. _this.$message.error("上传失败");
  7446. } else {
  7447. if (type == 13) {
  7448. let _type = 2;
  7449. var imgA = [
  7450. "png",
  7451. "jpg",
  7452. "jpeg",
  7453. "bmp",
  7454. "gif",
  7455. "webp",
  7456. "psd",
  7457. "svg",
  7458. "tiff",
  7459. ];
  7460. var fileA = [
  7461. "PDF",
  7462. "DOC",
  7463. "DOCX",
  7464. "DOCM",
  7465. "DOTM",
  7466. "DOTX",
  7467. "PPTX",
  7468. "PPSX",
  7469. "PPT",
  7470. "PPS",
  7471. "PPTM",
  7472. "POTM",
  7473. "PPAM",
  7474. "POTX",
  7475. "PPSM",
  7476. "XLSX",
  7477. "XLS",
  7478. ];
  7479. var videoA = [
  7480. "AVI",
  7481. "NAVI",
  7482. "MPEG",
  7483. "ASF",
  7484. "MOV",
  7485. "WMV",
  7486. "3GP",
  7487. "RM",
  7488. "RMVB",
  7489. "FLV",
  7490. "F4V",
  7491. "H.264",
  7492. "H.265",
  7493. "REAL VIDEO",
  7494. "MKV",
  7495. "WebM",
  7496. "HDDVD",
  7497. "MP4",
  7498. "MPG",
  7499. "M4V",
  7500. "MGV",
  7501. "OGV",
  7502. "QTM",
  7503. "STR",
  7504. "AMC",
  7505. "DVX",
  7506. "EVO",
  7507. "DAT",
  7508. "OGG",
  7509. "OGM",
  7510. ];
  7511. if (
  7512. fileA.indexOf(
  7513. data.Location.split(".")[
  7514. data.Location.split(".").length - 1
  7515. ].toLocaleUpperCase()
  7516. ) != -1
  7517. ) {
  7518. _type = 3;
  7519. } else if (
  7520. videoA.indexOf(
  7521. data.Location.split(".")[
  7522. data.Location.split(".").length - 1
  7523. ].toLocaleUpperCase()
  7524. ) != -1
  7525. ) {
  7526. _type = 2;
  7527. } else if (
  7528. imgA.indexOf(
  7529. data.Location.split(".")[
  7530. data.Location.split(".").length - 1
  7531. ].toLocaleLowerCase()
  7532. ) != -1
  7533. ) {
  7534. _type = 13;
  7535. } else {
  7536. _type = 12;
  7537. }
  7538. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7539. itemTaskIndex
  7540. ].chapterData.push({
  7541. name: file.name,
  7542. url: data.Location,
  7543. uid: file.uid,
  7544. type: _type,
  7545. });
  7546. _this.imgChange1(null, null, _type, itemTaskIndex);
  7547. } else if (type == 2 || type == 3 || type == 12) {
  7548. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7549. itemTaskIndex
  7550. ].chapterData.push({
  7551. name: file.name,
  7552. url: data.Location,
  7553. uid: file.uid,
  7554. type: type,
  7555. });
  7556. _this.imgChange1(null, null, type, itemTaskIndex);
  7557. } else if (type == 4) {
  7558. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7559. itemTaskIndex
  7560. ].fileList1.push({
  7561. name: file.name,
  7562. url: data.Location,
  7563. uid: file.uid,
  7564. });
  7565. _this.imgChange1(null, null, type, itemTaskIndex);
  7566. } else if (type == 5) {
  7567. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7568. itemTaskIndex
  7569. ].homeworkList.push({
  7570. name: file.name,
  7571. url: data.Location,
  7572. uid: file.uid,
  7573. });
  7574. _this.imgChange1(null, null, type, itemTaskIndex);
  7575. }
  7576. console.log(data.Location);
  7577. }
  7578. });
  7579. }
  7580. },
  7581. beforeUploadInfo2(event, type) {
  7582. // const loading = this.openLoading();
  7583. var file = event.target.files[0];
  7584. var credentials = {
  7585. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7586. secretAccessKey: "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",
  7587. }; //秘钥形式的登录上传
  7588. window.AWS.config.update(credentials);
  7589. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7590. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7591. var _this = this;
  7592. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  7593. if (
  7594. xianObj.indexOf(
  7595. file.name
  7596. .split(".")
  7597. [file.name.split(".").length - 1].toLocaleUpperCase()
  7598. ) == -1
  7599. ) {
  7600. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  7601. this.inputShow = true;
  7602. // var a = _this.$refs.upload1.uploadFiles;
  7603. // a.splice(a.length - 1, a.length);
  7604. // loading.close();
  7605. return;
  7606. }
  7607. if (type == 3) {
  7608. var b = [
  7609. "DOC",
  7610. "DOCX",
  7611. "DOCM",
  7612. "DOTM",
  7613. "DOTX",
  7614. "PPTX",
  7615. "PPSX",
  7616. "PPT",
  7617. "PPS",
  7618. "PPTM",
  7619. "POTM",
  7620. "PPAM",
  7621. "POTX",
  7622. "PPSM",
  7623. ];
  7624. if (
  7625. b.indexOf(
  7626. file.name
  7627. .split(".")
  7628. [file.name.split(".").length - 1].toLocaleUpperCase()
  7629. ) != -1
  7630. ) {
  7631. if (file.size / 1024 / 1024 > 80) {
  7632. this.$message.error("上传文件大于80兆,请重新选择文件!");
  7633. this.inputShow = true;
  7634. // var a = _this.$refs.upload1.uploadFiles;
  7635. // a.splice(a.length - 1, a.length);
  7636. // loading.close();
  7637. return;
  7638. }
  7639. } else if (
  7640. file.name
  7641. .split(".")
  7642. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  7643. ) {
  7644. if (file.size / 1024 / 1024 > 80) {
  7645. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  7646. this.inputShow = true;
  7647. // var a = _this.$refs.upload1.uploadFiles;
  7648. // a.splice(a.length - 1, a.length);
  7649. // loading.close();
  7650. return;
  7651. }
  7652. }
  7653. }
  7654. this.inputShow = false;
  7655. _this.infoprogress = 0;
  7656. _this.infoproVisible = true;
  7657. _this.infoisFinishSize = 0;
  7658. _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  7659. _this.$forceUpdate();
  7660. if (file) {
  7661. var params = {
  7662. Key:
  7663. file.name.split(".")[0] +
  7664. new Date().getTime() +
  7665. "." +
  7666. file.name.split(".")[file.name.split(".").length - 1],
  7667. ContentType: file.type,
  7668. Body: file,
  7669. "Access-Control-Allow-Credentials": "*",
  7670. ACL: "public-read",
  7671. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7672. var options = {
  7673. partSize: 2048 * 1024 * 1024,
  7674. queueSize: 2,
  7675. leavePartsOnError: true,
  7676. };
  7677. bucket
  7678. .upload(params, options)
  7679. .on("httpUploadProgress", function (evt) {
  7680. //这里可以写进度条
  7681. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7682. _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  7683. _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  7684. _this.$forceUpdate();
  7685. })
  7686. .send(async function (err, data) {
  7687. // loading.close();
  7688. _this.infoprogress = 100;
  7689. _this.infoisFinishSize = _this.infoisAllSize;
  7690. _this.$forceUpdate();
  7691. _this.inputShow = true;
  7692. if (err) {
  7693. setTimeout(() => {
  7694. _this.infoproVisible = false;
  7695. _this.$forceUpdate();
  7696. }, 1000);
  7697. // var a = _this.$refs.upload1.uploadFiles;
  7698. // a.splice(a.length - 1, a.length);
  7699. _this.$message.error("上传失败");
  7700. } else {
  7701. let fileid = await _this.createFileid(data.Location)
  7702. if(fileid){
  7703. _this.infoproVisible = false;
  7704. _this.$forceUpdate();
  7705. }
  7706. if (type == 13) {
  7707. let _type = 2;
  7708. var imgA = [
  7709. "png",
  7710. "jpg",
  7711. "jpeg",
  7712. "bmp",
  7713. "gif",
  7714. "webp",
  7715. "psd",
  7716. "svg",
  7717. "tiff",
  7718. ];
  7719. var fileA = [
  7720. "PDF",
  7721. "DOC",
  7722. "DOCX",
  7723. "DOCM",
  7724. "DOTM",
  7725. "DOTX",
  7726. "PPTX",
  7727. "PPSX",
  7728. "PPT",
  7729. "PPS",
  7730. "PPTM",
  7731. "POTM",
  7732. "PPAM",
  7733. "POTX",
  7734. "PPSM",
  7735. "XLSX",
  7736. "XLS",
  7737. ];
  7738. var videoA = [
  7739. "AVI",
  7740. "NAVI",
  7741. "MPEG",
  7742. "ASF",
  7743. "MOV",
  7744. "WMV",
  7745. "3GP",
  7746. "RM",
  7747. "RMVB",
  7748. "FLV",
  7749. "F4V",
  7750. "H.264",
  7751. "H.265",
  7752. "REAL VIDEO",
  7753. "MKV",
  7754. "WebM",
  7755. "HDDVD",
  7756. "MP4",
  7757. "MPG",
  7758. "M4V",
  7759. "MGV",
  7760. "OGV",
  7761. "QTM",
  7762. "STR",
  7763. "AMC",
  7764. "DVX",
  7765. "EVO",
  7766. "DAT",
  7767. "OGG",
  7768. "OGM",
  7769. ];
  7770. if (
  7771. fileA.indexOf(
  7772. data.Location.split(".")[
  7773. data.Location.split(".").length - 1
  7774. ].toLocaleUpperCase()
  7775. ) != -1
  7776. ) {
  7777. _type = 3;
  7778. } else if (
  7779. videoA.indexOf(
  7780. data.Location.split(".")[
  7781. data.Location.split(".").length - 1
  7782. ].toLocaleUpperCase()
  7783. ) != -1
  7784. ) {
  7785. _type = 2;
  7786. } else if (
  7787. imgA.indexOf(
  7788. data.Location.split(".")[
  7789. data.Location.split(".").length - 1
  7790. ].toLocaleLowerCase()
  7791. ) != -1
  7792. ) {
  7793. _type = 13;
  7794. } else {
  7795. _type = 12;
  7796. }
  7797. _this.infoData.push({
  7798. name: file.name,
  7799. url: data.Location,
  7800. uid: file.uid,
  7801. type: _type,
  7802. fileid: fileid,
  7803. });
  7804. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push({
  7805. name: file.name,
  7806. url: data.Location,
  7807. uid: file.uid,
  7808. type: _type,
  7809. fileid: fileid,
  7810. })
  7811. } else if (type == 2 || type == 3 || type == 12) {
  7812. _this.infoData.push({
  7813. name: file.name,
  7814. url: data.Location,
  7815. uid: file.uid,
  7816. type: type,
  7817. fileid: fileid,
  7818. });
  7819. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push({
  7820. name: file.name,
  7821. url: data.Location,
  7822. uid: file.uid,
  7823. type: type,
  7824. fileid: fileid,
  7825. })
  7826. }
  7827. console.log(data.Location);
  7828. console.log(fileid);
  7829. }
  7830. });
  7831. }
  7832. },
  7833. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  7834. // const loading = this.openLoading();
  7835. var file = event.target.files[0];
  7836. var credentials = {
  7837. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  7838. secretAccessKey: "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",
  7839. }; //秘钥形式的登录上传
  7840. window.AWS.config.update(credentials);
  7841. window.AWS.config.region = "cn-northwest-1"; //设置区域
  7842. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  7843. var _this = this;
  7844. if (type == 3) {
  7845. var b = [
  7846. "DOC",
  7847. "DOCX",
  7848. "DOCM",
  7849. "DOTM",
  7850. "DOTX",
  7851. "PPTX",
  7852. "PPSX",
  7853. "PPT",
  7854. "PPS",
  7855. "PPTM",
  7856. "POTM",
  7857. "PPAM",
  7858. "POTX",
  7859. "PPSM",
  7860. ];
  7861. if (
  7862. b.indexOf(
  7863. file.name
  7864. .split(".")
  7865. [file.name.split(".").length - 1].toLocaleUpperCase()
  7866. ) != -1
  7867. ) {
  7868. if (file.size / 1024 / 1024 > 80) {
  7869. this.$message.error("上传文件大于80兆,请重新选择文件!");
  7870. this.inputShow = true;
  7871. // var a = _this.$refs.upload1.uploadFiles;
  7872. // a.splice(a.length - 1, a.length);
  7873. // loading.close();
  7874. return;
  7875. }
  7876. } else if (
  7877. file.name
  7878. .split(".")
  7879. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  7880. ) {
  7881. if (file.size / 1024 / 1024 > 80) {
  7882. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  7883. this.inputShow = true;
  7884. // var a = _this.$refs.upload1.uploadFiles;
  7885. // a.splice(a.length - 1, a.length);
  7886. // loading.close();
  7887. return;
  7888. }
  7889. }
  7890. }
  7891. this.inputShow = false;
  7892. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7893. itemTaskIndex
  7894. ].progress = 0;
  7895. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7896. itemTaskIndex
  7897. ].proVisible = true;
  7898. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7899. itemTaskIndex
  7900. ].isFinishSize = 0;
  7901. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7902. itemTaskIndex
  7903. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  7904. _this.$forceUpdate();
  7905. if (file) {
  7906. var params = {
  7907. Key:
  7908. file.name.split(".")[0] +
  7909. new Date().getTime() +
  7910. "." +
  7911. file.name.split(".")[file.name.split(".").length - 1],
  7912. ContentType: file.type,
  7913. Body: file,
  7914. "Access-Control-Allow-Credentials": "*",
  7915. ACL: "public-read",
  7916. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  7917. var options = {
  7918. partSize: 2048 * 1024 * 1024,
  7919. queueSize: 2,
  7920. leavePartsOnError: true,
  7921. };
  7922. bucket
  7923. .upload(params, options)
  7924. .on("httpUploadProgress", function (evt) {
  7925. //这里可以写进度条
  7926. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  7927. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7928. itemTaskIndex
  7929. ].progress = parseInt((evt.loaded / evt.total) * 100);
  7930. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7931. itemTaskIndex
  7932. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  7933. _this.$forceUpdate();
  7934. })
  7935. .send(function (err, data) {
  7936. // loading.close();
  7937. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7938. itemTaskIndex
  7939. ].progress = 100;
  7940. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7941. itemTaskIndex
  7942. ].isFinishSize =
  7943. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7944. itemTaskIndex
  7945. ].isAllSize;
  7946. _this.$forceUpdate();
  7947. setTimeout(() => {
  7948. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7949. itemTaskIndex
  7950. ].proVisible = false;
  7951. _this.$forceUpdate();
  7952. }, 1000);
  7953. _this.inputShow = true;
  7954. if (err) {
  7955. // var a = _this.$refs.upload1.uploadFiles;
  7956. // a.splice(a.length - 1, a.length);
  7957. _this.$message.error("上传失败");
  7958. } else {
  7959. if (type == 2 || type == 3) {
  7960. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7961. itemTaskIndex
  7962. ].chapterData.push({
  7963. name: file.name,
  7964. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7965. // itemTaskIndex
  7966. // ].chapterData.length+1),
  7967. url: data.Location,
  7968. uid: file.uid,
  7969. type: type,
  7970. text: string,
  7971. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  7972. // itemTaskIndex
  7973. // ].chapterData.length + 1),
  7974. });
  7975. _this.imgChange1(null, null, type, itemTaskIndex);
  7976. } else if (type == 4) {
  7977. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7978. itemTaskIndex
  7979. ].fileList1.push({
  7980. name: file.name,
  7981. url: data.Location,
  7982. uid: file.uid,
  7983. });
  7984. _this.imgChange1(null, null, type, itemTaskIndex);
  7985. } else if (type == 5) {
  7986. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  7987. itemTaskIndex
  7988. ].homeworkList.push({
  7989. name: file.name,
  7990. url: data.Location,
  7991. uid: file.uid,
  7992. });
  7993. _this.imgChange1(null, null, type, itemTaskIndex);
  7994. }
  7995. console.log(data.Location);
  7996. }
  7997. });
  7998. }
  7999. },
  8000. addunit() {
  8001. this.unitJson.push({
  8002. dyName: "", //单元标题
  8003. isUpdate: 1,
  8004. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  8005. chapterInfo: [
  8006. {
  8007. isread: false,
  8008. chapterid: this.guid(),
  8009. title: "",
  8010. courseName: "",
  8011. taskJson: [
  8012. {
  8013. task: "",
  8014. taskDetail: "",
  8015. chapterData: [],
  8016. toolText: "",
  8017. toolChoose: [
  8018. {
  8019. tool: [],
  8020. toolDetail: "",
  8021. toolType: 0,
  8022. askCount: 1,
  8023. askTitle: "",
  8024. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8025. },
  8026. ],
  8027. isShowTools: false,
  8028. askCount: 1,
  8029. isFold: 1,
  8030. askTitle: "",
  8031. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8032. checkJson: [{ checkCount: [], checkPerent: [] }],
  8033. homeworkList: [],
  8034. },
  8035. ],
  8036. itemCount: 1,
  8037. fileList1: [],
  8038. video: [],
  8039. testData: [],
  8040. pData: [],
  8041. templateArray: [],
  8042. },
  8043. ],
  8044. });
  8045. this.addindex = this.unitJson.length - 1;
  8046. setTimeout(() => {
  8047. this.unitIndex = this.unitJson.length - 1;
  8048. setTimeout(() => {
  8049. console.log(this.$refs.dyInput);
  8050. this.$refs.dyInput[0].focus();
  8051. }, 100);
  8052. this.unitSet(this.unitIndex);
  8053. }, 0);
  8054. },
  8055. addToolFun(itemTaskIndex) {
  8056. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8057. itemTaskIndex
  8058. ].toolChoose.push({
  8059. tool: [],
  8060. toolDetail: "",
  8061. toolType: 0,
  8062. askCount: 1,
  8063. askTitle: "",
  8064. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8065. });
  8066. },
  8067. addTaskBorder() {
  8068. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  8069. task: "",
  8070. taskDetail: "",
  8071. chapterData: [],
  8072. toolText: "",
  8073. toolChoose: [
  8074. {
  8075. tool: [],
  8076. toolDetail: "",
  8077. toolType: 0,
  8078. askCount: 1,
  8079. askTitle: "",
  8080. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8081. },
  8082. ],
  8083. isShowTools: false,
  8084. askCount: 1,
  8085. isFold: 1, //任务收起状态
  8086. askTitle: "",
  8087. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  8088. checkJson: [{ checkCount: [], checkPerent: [] }],
  8089. homeworkList: [],
  8090. });
  8091. setTimeout(() => {
  8092. this.checkEva(this.checkId);
  8093. setTimeout(() => {
  8094. this.checkEva(this.checkId);
  8095. }, 100);
  8096. }, 100);
  8097. },
  8098. add(e, i) {
  8099. var el = e.currentTarget;
  8100. el.getElementsByTagName("input")[0].click();
  8101. },
  8102. fold(i, e) {
  8103. if (
  8104. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0
  8105. ) {
  8106. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  8107. } else {
  8108. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  8109. }
  8110. },
  8111. fold2(i) {
  8112. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  8113. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8114. i
  8115. ].isFold2 = false;
  8116. } else {
  8117. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  8118. }
  8119. this.$forceUpdate();
  8120. },
  8121. foldEva(i) {
  8122. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  8123. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8124. i
  8125. ].isEvaFold = false;
  8126. } else {
  8127. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8128. i
  8129. ].isEvaFold = true;
  8130. setTimeout(() => {
  8131. this.checkEva(this.checkId);
  8132. setTimeout(() => {
  8133. this.checkEva(this.checkId);
  8134. }, 500);
  8135. }, 0);
  8136. }
  8137. this.$forceUpdate();
  8138. },
  8139. foldC(i) {
  8140. if (
  8141. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  8142. ) {
  8143. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8144. i
  8145. ].isFoldchapter = false;
  8146. } else {
  8147. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8148. i
  8149. ].isFoldchapter = true;
  8150. }
  8151. this.$forceUpdate();
  8152. },
  8153. fold3(i, ti) {
  8154. if (
  8155. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  8156. .isFold3
  8157. ) {
  8158. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  8159. ti
  8160. ].isFold3 = false;
  8161. } else {
  8162. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  8163. ti
  8164. ].isFold3 = true;
  8165. }
  8166. this.$forceUpdate();
  8167. },
  8168. deleteHomeworkBox(unitIndex, index, i) {
  8169. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  8170. this.taskCount
  8171. ].homeworkList.splice(i, 1);
  8172. },
  8173. getStudent() {
  8174. let params = {
  8175. oid: this.oid,
  8176. cu: "",
  8177. cn: this.searchPeople,
  8178. };
  8179. this.ajax
  8180. .get(this.$store.state.api + "selectStudentAdd", params)
  8181. .then((res) => {
  8182. this.studentJuri = res.data[0];
  8183. })
  8184. .catch((err) => {
  8185. this.isLoading = false;
  8186. console.error(err);
  8187. });
  8188. },
  8189. // 添加协同成员其他选项按钮
  8190. getTeacherCopy(){
  8191. this.CollLoading=true
  8192. this.collid = ''
  8193. this.collid = '1xpz'
  8194. let params = {
  8195. oid:
  8196. this.org && this.org != "undefined" && this.org != "null"
  8197. ? this.org
  8198. : this.oid,
  8199. cu: "",
  8200. cn: this.searchTN,
  8201. coll: ''
  8202. };
  8203. this.ajax
  8204. .get(
  8205. this.$store.state.api +
  8206. (this.org && this.org != "undefined" && this.org != "null"
  8207. ? "selectCollaborativeMembersOrg"
  8208. : "selectCollaborativeMembers"),
  8209. params
  8210. )
  8211. .then((res) => {
  8212. let teacherJuri = res.data[0];
  8213. this.CollaborativeTeaList = res.data[1];
  8214. for (var i = 0; i < teacherJuri.length; i++) {
  8215. if (teacherJuri[i].userid == this.userid) {
  8216. teacherJuri.splice(i, 1);
  8217. break;
  8218. }
  8219. }
  8220. this.teacherJuri = teacherJuri.filter((i,index)=>{
  8221. return (i.cclassid == '' || i.cclassid == null)
  8222. })
  8223. console.log(' this.teacherJuri', this.teacherJuri);
  8224. let _check = [];
  8225. let _check2 = [];
  8226. for (var i = 0; i < this.teacherJuri.length; i++) {
  8227. var gid = this.teacherJuri[i].userid;
  8228. _check.push(gid);
  8229. }
  8230. for (var i = 0; i < this.checkboxList3.length; i++) {
  8231. var _id = this.checkboxList3[i];
  8232. if (_check.indexOf(_id) !== -1) {
  8233. _check2.push(_id);
  8234. }
  8235. }
  8236. if (_check2.length==0 && _check.length==0) {
  8237. }else{
  8238. this.checkAll2 = _check2.length === _check.length;
  8239. }
  8240. this.CollLoading=false
  8241. })
  8242. .catch((err) => {
  8243. console.error(err);
  8244. this.CollLoading=false
  8245. });
  8246. },
  8247. getTeacher(val) {
  8248. this.CollLoading=true
  8249. this.collid = ''
  8250. this.collid = !val ? '' : val
  8251. let params = {
  8252. oid:
  8253. this.org && this.org != "undefined" && this.org != "null"
  8254. ? this.org
  8255. : this.oid,
  8256. cu: "",
  8257. cn: this.searchTN,
  8258. coll: this.collid
  8259. };
  8260. this.ajax
  8261. .get(
  8262. this.$store.state.api +
  8263. (this.org && this.org != "undefined" && this.org != "null"
  8264. ? "selectCollaborativeMembersOrg"
  8265. : "selectCollaborativeMembers"),
  8266. params
  8267. )
  8268. .then((res) => {
  8269. let teacherJuri = res.data[0];
  8270. this.CollaborativeTeaList = res.data[1];
  8271. for (var i = 0; i < teacherJuri.length; i++) {
  8272. if (teacherJuri[i].userid == this.userid) {
  8273. teacherJuri.splice(i, 1);
  8274. break;
  8275. }
  8276. }
  8277. this.teacherJuri = teacherJuri;
  8278. let _check = [];
  8279. let _check2 = [];
  8280. for (var i = 0; i < this.teacherJuri.length; i++) {
  8281. var gid = this.teacherJuri[i].userid;
  8282. _check.push(gid);
  8283. }
  8284. for (var i = 0; i < this.checkboxList3.length; i++) {
  8285. var _id = this.checkboxList3[i];
  8286. if (_check.indexOf(_id) !== -1) {
  8287. _check2.push(_id);
  8288. }
  8289. }
  8290. if (_check2.length==0 && _check.length==0) {
  8291. }else{
  8292. this.checkAll2 = _check2.length === _check.length;
  8293. }
  8294. this.CollLoading=false
  8295. })
  8296. .catch((err) => {
  8297. console.error(err);
  8298. this.CollLoading=false
  8299. });
  8300. },
  8301. searchStudent() {
  8302. this.getStudent();
  8303. },
  8304. selectGrage() {
  8305. let params = {
  8306. oid: this.oid,
  8307. };
  8308. this.ajax
  8309. .get(this.$store.state.api + "selectGrageBySchool", params)
  8310. .then((res) => {
  8311. this.gradeList = res.data[0];
  8312. })
  8313. .catch((err) => {
  8314. this.isLoading = false;
  8315. console.error(err);
  8316. });
  8317. },
  8318. //获取班级列表
  8319. getClass() {
  8320. let params = {
  8321. oid: this.oid,
  8322. gid: this.gradeId,
  8323. cn: this.classSearch,
  8324. };
  8325. this.ajax
  8326. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  8327. .then((res) => {
  8328. if (!this.grade.length) {
  8329. this.grade = res.data[0];
  8330. }
  8331. this.grade2 = res.data[0];
  8332. this.classJuri = res.data[0];
  8333. let _check = [];
  8334. let _check2 = [];
  8335. for (var i = 0; i < this.grade2.length; i++) {
  8336. var gid = this.grade2[i].id;
  8337. _check.push(gid);
  8338. }
  8339. for (var i = 0; i < this.checkboxList2.length; i++) {
  8340. var _id = this.checkboxList2[i];
  8341. if (_check.indexOf(_id) !== -1) {
  8342. _check2.push(_id);
  8343. }
  8344. }
  8345. this.checkAll = _check2.length === _check.length;
  8346. })
  8347. .catch((err) => {
  8348. this.isLoading = false;
  8349. console.error(err);
  8350. });
  8351. },
  8352. CourseType2Change(val) {
  8353. this.pTypeCheck = [];
  8354. for (var i = 0; i < this.CourseType2.length; i++) {
  8355. let typeA = this.CourseType2[i];
  8356. if (val.indexOf(typeA.name) != -1) {
  8357. this.pTypeCheck.push(...typeA.id);
  8358. }
  8359. }
  8360. },
  8361. getChapterData(e, i, j, ic, type) {
  8362. e.stopPropagation();
  8363. this.updataC = true;
  8364. this.icc = ic;
  8365. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  8366. console.log("还不能下载图片喔");
  8367. }
  8368. },
  8369. deleteChapterData(e, i, j, ic, taskI) {
  8370. e.stopPropagation();
  8371. let _this = this;
  8372. _this
  8373. .$confirm("确定删除此项?", "提示", {
  8374. confirmButtonText: "确定",
  8375. cancelButtonText: "取消",
  8376. type: "warning",
  8377. })
  8378. .then(() => {
  8379. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  8380. ic,
  8381. 1
  8382. );
  8383. })
  8384. .catch(() => {
  8385. return;
  8386. });
  8387. },
  8388. deleteInfoData(e, ic) {
  8389. e.stopPropagation();
  8390. let _this = this;
  8391. _this
  8392. .$confirm("确定删除此项?", "提示", {
  8393. confirmButtonText: "确定",
  8394. cancelButtonText: "取消",
  8395. type: "warning",
  8396. })
  8397. .then(() => {
  8398. _this.infoData.splice(
  8399. ic,
  8400. 1
  8401. );
  8402. })
  8403. .catch(() => {
  8404. return;
  8405. });
  8406. },
  8407. updataVideoT(e, i, j, ic) {
  8408. // e.stopPropagation();
  8409. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  8410. // ic
  8411. // ].name = JSON.parse(JSON.stringify(e.target.value));
  8412. this.line =
  8413. this.unitJson[i].chapterInfo[0].taskJson[0].chapterData[ic].name;
  8414. this.taskCount = j;
  8415. this.lineCount = ic;
  8416. this.dialogVisibleupdataVideoT = true;
  8417. this.$forceUpdate();
  8418. },
  8419. updataVideoC() {
  8420. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8421. this.taskCount
  8422. ].chapterData[this.lineCount].name = JSON.parse(
  8423. JSON.stringify(this.line)
  8424. );
  8425. this.dialogVisibleupdataVideoT = false;
  8426. this.$forceUpdate();
  8427. },
  8428. upCd(e, i, j, taskCount, ic) {
  8429. e.stopPropagation();
  8430. if (ic == 0) {
  8431. return;
  8432. }
  8433. var a = JSON.parse(
  8434. JSON.stringify(
  8435. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  8436. ic - 1
  8437. ]
  8438. )
  8439. );
  8440. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  8441. JSON.parse(
  8442. JSON.stringify(
  8443. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  8444. )
  8445. );
  8446. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  8447. this.$forceUpdate();
  8448. },
  8449. downCd(e, i, j, taskCount, ic) {
  8450. e.stopPropagation();
  8451. if (
  8452. ic ==
  8453. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  8454. 1
  8455. ) {
  8456. return;
  8457. }
  8458. var a = JSON.parse(
  8459. JSON.stringify(
  8460. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  8461. ic + 1
  8462. ]
  8463. )
  8464. );
  8465. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  8466. JSON.parse(
  8467. JSON.stringify(
  8468. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  8469. )
  8470. );
  8471. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  8472. this.$forceUpdate();
  8473. },
  8474. async upTool(e, i, j, tooli) {
  8475. e.stopPropagation();
  8476. if (tooli == 0) {
  8477. return;
  8478. }
  8479. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  8480. let count2 = await this.getWorksCount(3, i, j, tooli);
  8481. if (count1 > 0 || count2 > 0) {
  8482. this.$confirm(
  8483. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  8484. "提示",
  8485. {
  8486. confirmButtonText: "确定",
  8487. cancelButtonText: "取消",
  8488. type: "warning",
  8489. }
  8490. )
  8491. .then(() => {
  8492. var a = JSON.parse(
  8493. JSON.stringify(
  8494. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  8495. tooli - 1
  8496. ]
  8497. )
  8498. );
  8499. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  8500. JSON.parse(
  8501. JSON.stringify(
  8502. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  8503. )
  8504. );
  8505. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  8506. this.$forceUpdate();
  8507. })
  8508. .catch(() => {
  8509. return;
  8510. });
  8511. } else {
  8512. var a = JSON.parse(
  8513. JSON.stringify(
  8514. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  8515. )
  8516. );
  8517. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  8518. JSON.parse(
  8519. JSON.stringify(
  8520. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  8521. )
  8522. );
  8523. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  8524. this.$forceUpdate();
  8525. }
  8526. },
  8527. async downTool(e, i, j, tooli) {
  8528. e.stopPropagation();
  8529. if (
  8530. tooli ==
  8531. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  8532. ) {
  8533. return;
  8534. }
  8535. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  8536. let count2 = await this.getWorksCount(3, i, j, tooli);
  8537. if (count1 > 0 || count2 > 0) {
  8538. this.$confirm(
  8539. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  8540. "提示",
  8541. {
  8542. confirmButtonText: "确定",
  8543. cancelButtonText: "取消",
  8544. type: "warning",
  8545. }
  8546. )
  8547. .then(() => {
  8548. var a = JSON.parse(
  8549. JSON.stringify(
  8550. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  8551. tooli + 1
  8552. ]
  8553. )
  8554. );
  8555. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  8556. JSON.parse(
  8557. JSON.stringify(
  8558. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  8559. )
  8560. );
  8561. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  8562. this.$forceUpdate();
  8563. })
  8564. .catch(() => {
  8565. return;
  8566. });
  8567. } else {
  8568. var a = JSON.parse(
  8569. JSON.stringify(
  8570. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  8571. )
  8572. );
  8573. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  8574. JSON.parse(
  8575. JSON.stringify(
  8576. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  8577. )
  8578. );
  8579. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  8580. this.$forceUpdate();
  8581. }
  8582. },
  8583. addWork() {
  8584. let cPan = 1;
  8585. for (var i = 0; i < this.unitJson.length; i++) {
  8586. for (
  8587. var j = 0;
  8588. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8589. j++
  8590. ) {
  8591. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8592. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8593. if (
  8594. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8595. ) {
  8596. for (
  8597. var z = 0;
  8598. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8599. z++
  8600. ) {
  8601. if (
  8602. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  8603. .length
  8604. ) {
  8605. this.$message.error("请把工具添加完整");
  8606. cPan = 2;
  8607. break;
  8608. }
  8609. }
  8610. }
  8611. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8612. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8613. i
  8614. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8615. return ele.value != "";
  8616. });
  8617. }
  8618. }
  8619. }
  8620. this.inputShow = true;
  8621. if (cPan == 2) {
  8622. this.steps--;
  8623. return;
  8624. }
  8625. for (var i = 0; i < this.unitJson.length; i++) {
  8626. delete this.unitJson[i].isUpdate;
  8627. }
  8628. let params = [
  8629. {
  8630. uid: this.userid,
  8631. title: this.courseName,
  8632. brief: this.courseText,
  8633. cover:
  8634. this.cover.length > 0
  8635. ? JSON.stringify(this.cover)
  8636. : JSON.stringify([
  8637. {
  8638. name: "noBanner.jpg",
  8639. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  8640. uid: 1656409780264,
  8641. status: "success",
  8642. },
  8643. ]),
  8644. evaId: this.evalua,
  8645. astudent:
  8646. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  8647. see: this.isTeacherSee == true ? 1 : 0,
  8648. chapters: JSON.stringify(this.unitJson),
  8649. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  8650. courseType: JSON.stringify(this.courseTypeId),
  8651. ateacher:
  8652. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  8653. inviteCode: JSON.stringify(this.inviteCode),
  8654. refile: JSON.stringify(this.infoData),
  8655. reBrief: this.courseText2,
  8656. cpote: JSON.stringify(this.cpote),
  8657. setting: JSON.stringify({courseJie: this.courseJie, courseTime: this.courseTime}),
  8658. iresearch: this.isFileSearch ? 1 : 2,
  8659. },
  8660. ];
  8661. this.ajax
  8662. .post(this.$store.state.api + "addWorkNew2AI3", params)
  8663. .then((res) => {
  8664. console.log(this.steps);
  8665. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  8666. this.$message({
  8667. message: "新增成功",
  8668. type: "success",
  8669. });
  8670. }
  8671. this.number = res.data.ordernumber;
  8672. this.courseId = res.data.courseId;
  8673. this.cid = res.data.courseId;
  8674. this.courseUserid = this.userid;
  8675. this.islogin = true;
  8676. this.updateCourseState(4);
  8677. this.addtips()
  8678. })
  8679. .catch((err) => {
  8680. this.$message.error("网络不佳");
  8681. console.error(err);
  8682. });
  8683. },
  8684. goCourse() {
  8685. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  8686. },
  8687. updateWork2() {
  8688. let _unitIndex = this.unitIndex;
  8689. let cPan = 1;
  8690. for (
  8691. var j = 0;
  8692. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8693. j++
  8694. ) {
  8695. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8696. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8697. j
  8698. ].proVisible2 = false;
  8699. if (
  8700. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8701. .length > 1
  8702. ) {
  8703. for (
  8704. var z = 0;
  8705. z <
  8706. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8707. .length;
  8708. z++
  8709. ) {
  8710. if (
  8711. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8712. z
  8713. ].tool.length
  8714. ) {
  8715. this.$message.error("请把工具添加完整");
  8716. cPan = 2;
  8717. break;
  8718. }
  8719. }
  8720. }
  8721. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8722. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8723. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8724. (ele) => {
  8725. return ele.value != "";
  8726. }
  8727. );
  8728. }
  8729. }
  8730. this.inputShow = true;
  8731. if (cPan == 2) {
  8732. this.steps--;
  8733. return;
  8734. }
  8735. let params = [
  8736. {
  8737. cid: this.cid,
  8738. chapters: JSON.stringify(this.unitJson),
  8739. uid: this.userid,
  8740. unitIndex: _unitIndex,
  8741. },
  8742. ];
  8743. this.ajax
  8744. .post(this.$store.state.api + "updateWorkNew4", params)
  8745. .then((res) => {
  8746. this.$message({
  8747. message: "修改成功",
  8748. type: "success",
  8749. });
  8750. this.courseId = this.cid;
  8751. this.addtips();
  8752. })
  8753. .catch((err) => {
  8754. this.$message.error("网络不佳");
  8755. console.error(err);
  8756. });
  8757. },
  8758. updateWork3(unitIndex) {
  8759. let _unitIndex = unitIndex;
  8760. let cPan = 1;
  8761. for (
  8762. var j = 0;
  8763. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8764. j++
  8765. ) {
  8766. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8767. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8768. j
  8769. ].proVisible2 = false;
  8770. if (
  8771. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8772. .length > 1
  8773. ) {
  8774. for (
  8775. var z = 0;
  8776. z <
  8777. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8778. .length;
  8779. z++
  8780. ) {
  8781. if (
  8782. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8783. z
  8784. ].tool.length
  8785. ) {
  8786. this.$message.error("请把工具添加完整");
  8787. cPan = 2;
  8788. break;
  8789. }
  8790. }
  8791. }
  8792. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8793. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8794. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8795. (ele) => {
  8796. return ele.value != "";
  8797. }
  8798. );
  8799. }
  8800. }
  8801. this.inputShow = true;
  8802. if (cPan == 2) {
  8803. this.steps--;
  8804. return;
  8805. }
  8806. let params = [
  8807. {
  8808. cid: this.cid,
  8809. chapters: JSON.stringify(this.unitJson),
  8810. uid: this.userid,
  8811. unitIndex: _unitIndex,
  8812. },
  8813. ];
  8814. this.ajax
  8815. .post(this.$store.state.api + "updateWorkNew4", params)
  8816. .then((res) => {
  8817. // this.$message({
  8818. // message: "修改成功",
  8819. // type: "success",
  8820. // });
  8821. this.courseId = this.cid;
  8822. this.addtips()
  8823. })
  8824. .catch((err) => {
  8825. this.$message.error("网络不佳");
  8826. console.error(err);
  8827. });
  8828. },
  8829. updateWork() {
  8830. let cPan = 1;
  8831. for (var i = 0; i < this.unitJson.length; i++) {
  8832. for (
  8833. var j = 0;
  8834. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  8835. j++
  8836. ) {
  8837. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  8838. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  8839. if (
  8840. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  8841. ) {
  8842. for (
  8843. var z = 0;
  8844. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  8845. z++
  8846. ) {
  8847. if (
  8848. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  8849. .length
  8850. ) {
  8851. this.$message.error("请把工具添加完整");
  8852. cPan = 2;
  8853. break;
  8854. }
  8855. }
  8856. }
  8857. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  8858. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  8859. i
  8860. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  8861. return ele.value != "";
  8862. });
  8863. }
  8864. }
  8865. }
  8866. this.inputShow = true;
  8867. if (cPan == 2) {
  8868. this.steps--;
  8869. return;
  8870. }
  8871. for (var i = 0; i < this.unitJson.length; i++) {
  8872. delete this.unitJson[i].isUpdate;
  8873. }
  8874. let params = [
  8875. {
  8876. cid: this.cid,
  8877. title: this.courseName,
  8878. brief: this.courseText,
  8879. cover:
  8880. this.cover.length > 0
  8881. ? JSON.stringify(this.cover)
  8882. : JSON.stringify([
  8883. {
  8884. name: "noBanner.jpg",
  8885. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  8886. uid: 1656409780264,
  8887. status: "success",
  8888. },
  8889. ]),
  8890. evaId: this.evalua,
  8891. astudent:
  8892. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  8893. see: this.isTeacherSee == true ? 1 : 0,
  8894. chapters: JSON.stringify(this.unitJson),
  8895. template: this.myWord != "undefined" ? this.myWord : [],
  8896. uid: this.userid,
  8897. courseType: JSON.stringify(this.courseTypeId),
  8898. ateacher:
  8899. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  8900. inviteCode: JSON.stringify(this.inviteCode),
  8901. refile: JSON.stringify(this.infoData),
  8902. reBrief: this.courseText2,
  8903. cpote: JSON.stringify(this.cpote),
  8904. setting: JSON.stringify({courseJie: this.courseJie, courseTime: this.courseTime}),
  8905. iresearch: this.isFileSearch ? 1 : 2,
  8906. },
  8907. ];
  8908. this.ajax
  8909. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  8910. .then((res) => {
  8911. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  8912. if (this.cidType == 1) {
  8913. this.$message({
  8914. message: "修改成功",
  8915. type: "success",
  8916. });
  8917. } else {
  8918. this.$message({
  8919. message: "新增成功",
  8920. type: "success",
  8921. });
  8922. }
  8923. }
  8924. this.number = this.nbOrder;
  8925. this.courseId = this.cid;
  8926. this.addtips()
  8927. })
  8928. .catch((err) => {
  8929. this.$message.error("网络不佳");
  8930. console.error(err);
  8931. });
  8932. },
  8933. insertWord() {
  8934. this.dialogVisible1 = true;
  8935. this.updateBoolean2 = false;
  8936. this.tTitle = "";
  8937. this.tdetail = "";
  8938. },
  8939. addWord() {
  8940. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  8941. name: this.tTitle,
  8942. content: this.tdetail,
  8943. uid: this.guid(),
  8944. });
  8945. this.dialogVisible1 = false;
  8946. },
  8947. upWord() { },
  8948. selectWord(uid, i, c) {
  8949. this.dialogVisible1 = true;
  8950. this.updateBoolean2 = true;
  8951. if (
  8952. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  8953. ) {
  8954. this.tTitle =
  8955. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  8956. this.tdetail =
  8957. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  8958. }
  8959. },
  8960. isAddPP() {
  8961. if (this.checkboxList.length > 0) {
  8962. this.$message({
  8963. message: "添加成功",
  8964. type: "success",
  8965. });
  8966. this.dialogVisible3 = false;
  8967. } else {
  8968. this.$message({
  8969. message: "请添加课程成员",
  8970. type: "error",
  8971. });
  8972. }
  8973. },
  8974. isAddClass() {
  8975. this.dialogVisibleClass = false;
  8976. },
  8977. isAddPPTeacher() {
  8978. this.dialogVisibleMember = false;
  8979. this.setMan();
  8980. },
  8981. getTipsTemplate(){
  8982. if(this.templateid){
  8983. let params = {
  8984. id: this.templateid
  8985. }
  8986. this.ajax
  8987. .get(this.$store.state.api + "selectTipsTemplateById", params)
  8988. .then((res) => {
  8989. if(res.data[0].length){
  8990. this.tipsJson = res.data[0][0]
  8991. this.aiJson = JSON.parse(res.data[0][0].tips)
  8992. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  8993. this.$forceUpdate();
  8994. }
  8995. })
  8996. .catch((err) => { });
  8997. }
  8998. },
  8999. getTemplate() {
  9000. this.ajax
  9001. .get(this.$store.state.api + "getCourseTemplateT", "")
  9002. .then((res) => {
  9003. this.templateArray = res.data[0];
  9004. this.getTemplateOid();
  9005. this.$forceUpdate();
  9006. })
  9007. .catch((err) => { });
  9008. },
  9009. getTemplateOid() {
  9010. let params = {
  9011. oid: this.oid,
  9012. };
  9013. this.ajax
  9014. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  9015. .then((res) => {
  9016. if (res.data[0].length) {
  9017. this.templateArray = [...res.data[0], ...this.templateArray];
  9018. }
  9019. this.getTemplateOrg();
  9020. this.$forceUpdate();
  9021. })
  9022. .catch((err) => { });
  9023. },
  9024. getTemplateOrg() {
  9025. let params = {
  9026. oid: this.org,
  9027. };
  9028. this.ajax
  9029. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  9030. .then((res) => {
  9031. if (res.data[0].length) {
  9032. this.templateArray = [...res.data[0], ...this.templateArray];
  9033. }
  9034. this.$forceUpdate();
  9035. })
  9036. .catch((err) => { });
  9037. },
  9038. clearChoose() {
  9039. this.clearArray.splice(this.templateC.id, 1);
  9040. this.dialogVisible2 = false;
  9041. },
  9042. clearAttText() {
  9043. this.AttText = {
  9044. title: "",
  9045. text: "",
  9046. };
  9047. this.dialogVisible6 = false;
  9048. },
  9049. clearLine() {
  9050. this.line = "";
  9051. this.dialogVisible7 = false;
  9052. },
  9053. openTemplate() {
  9054. this.ctJson = {};
  9055. this.templateDialog = true;
  9056. },
  9057. checkctJson(json) {
  9058. if (this.ctJson.id == json.id) {
  9059. this.ctJson = {};
  9060. } else {
  9061. this.ctJson = json;
  9062. }
  9063. },
  9064. addTemplate(res) {
  9065. let _this = this;
  9066. let _res = [];
  9067. if (res.id == 1) {
  9068. _res = [
  9069. {
  9070. dyName: "", //单元标题
  9071. easy: 1,
  9072. chapterInfo: [
  9073. {
  9074. isread: false,
  9075. chapterid: this.guid(),
  9076. title: "",
  9077. courseName: "",
  9078. taskJson: [
  9079. {
  9080. task: "",
  9081. taskDetail: "",
  9082. chapterData: [],
  9083. toolText: "",
  9084. toolChoose: [
  9085. {
  9086. tool: [],
  9087. toolDetail: "",
  9088. toolType: 0,
  9089. askCount: 1,
  9090. askTitle: "",
  9091. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9092. },
  9093. ],
  9094. isShowTools: false,
  9095. askCount: 1,
  9096. isFold: 1,
  9097. askTitle: "",
  9098. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9099. checkJson: [{ checkCount: [], checkPerent: [] }],
  9100. homeworkList: [],
  9101. },
  9102. ],
  9103. itemCount: 1,
  9104. fileList1: [],
  9105. video: [],
  9106. testData: [],
  9107. pData: [],
  9108. templateArray: [],
  9109. },
  9110. ],
  9111. },
  9112. ];
  9113. this.updateCourseState(1);
  9114. } else if (res.id == 2) {
  9115. let stageData = [];
  9116. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  9117. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  9118. if (!iframe && !iframe2) {
  9119. this.$message.error("请使用AI共创生成");
  9120. return;
  9121. }
  9122. let copyData = iframe ? iframe.contentWindow.copyData : false;
  9123. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  9124. if (
  9125. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  9126. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  9127. ) {
  9128. this.$message.error("请使用AI共创生成");
  9129. return;
  9130. }
  9131. stageData = copyData
  9132. ? copyData.stageData
  9133. : copyData2
  9134. ? copyData2.stageData
  9135. : [""];
  9136. for (var i = 0; i < stageData.length; i++) {
  9137. _res.push({
  9138. dyName: stageData[i], //单元标题
  9139. chapterInfo: [
  9140. {
  9141. isread: false,
  9142. chapterid: this.guid(),
  9143. title: "",
  9144. courseName: "",
  9145. taskJson: [
  9146. {
  9147. task: "",
  9148. taskDetail: "",
  9149. chapterData: [],
  9150. toolText: "",
  9151. toolChoose: [
  9152. {
  9153. tool: [],
  9154. toolDetail: "",
  9155. toolType: 0,
  9156. askCount: 1,
  9157. askTitle: "",
  9158. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9159. },
  9160. ],
  9161. isShowTools: false,
  9162. askCount: 1,
  9163. isFold: 1,
  9164. askTitle: "",
  9165. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9166. checkJson: [{ checkCount: [], checkPerent: [] }],
  9167. homeworkList: [],
  9168. },
  9169. ],
  9170. itemCount: 1,
  9171. fileList1: [],
  9172. video: [],
  9173. testData: [],
  9174. pData: [],
  9175. templateArray: [],
  9176. },
  9177. ],
  9178. });
  9179. }
  9180. this.updateCourseState(1);
  9181. } else if (!Object.keys(res).length) {
  9182. this.$message.error("请选择模板");
  9183. retrun;
  9184. } else {
  9185. _res = JSON.parse(res.chapters);
  9186. this.updateCourseState(parseInt(res.state));
  9187. }
  9188. _this
  9189. .$confirm(
  9190. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  9191. "提示",
  9192. {
  9193. confirmButtonText: "确定",
  9194. cancelButtonText: "取消",
  9195. type: "warning",
  9196. }
  9197. )
  9198. .then(() => {
  9199. _this.unitJson = _res;
  9200. _this.updateWork();
  9201. // _this.steps++;
  9202. _this.templateDialog = false;
  9203. setTimeout(() => {
  9204. this.checkEva(this.checkId);
  9205. setTimeout(() => {
  9206. this.checkEva(this.checkId);
  9207. }, 100);
  9208. }, 1000);
  9209. })
  9210. .catch(() => {
  9211. return;
  9212. });
  9213. },
  9214. checkTemplate(res) {
  9215. let _this = this;
  9216. _this
  9217. .$confirm(
  9218. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  9219. "提示",
  9220. {
  9221. confirmButtonText: "确定",
  9222. cancelButtonText: "取消",
  9223. type: "warning",
  9224. }
  9225. )
  9226. .then(() => {
  9227. _this.unitJson = JSON.parse(res.chapters);
  9228. _this.steps++;
  9229. setTimeout(() => {
  9230. this.checkEva(this.checkId);
  9231. setTimeout(() => {
  9232. this.checkEva(this.checkId);
  9233. }, 100);
  9234. }, 1000);
  9235. })
  9236. .catch(() => {
  9237. return;
  9238. });
  9239. },
  9240. checkTemplate1(w) {
  9241. this.steps++;
  9242. },
  9243. checkTemplate2() {
  9244. let _this = this;
  9245. _this
  9246. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  9247. confirmButtonText: "确定",
  9248. cancelButtonText: "取消",
  9249. type: "warning",
  9250. })
  9251. .then(() => {
  9252. _this.unitIndex = 0;
  9253. _this.unitJson = [
  9254. {
  9255. dyName: "", //单元标题
  9256. chapterInfo: [
  9257. {
  9258. isread: false,
  9259. chapterid: this.guid(),
  9260. title: "",
  9261. courseName: "",
  9262. taskJson: [
  9263. {
  9264. task: "",
  9265. taskDetail: "",
  9266. chapterData: [],
  9267. toolText: "",
  9268. toolChoose: [
  9269. {
  9270. tool: [],
  9271. toolDetail: "",
  9272. toolType: 0,
  9273. askCount: 1,
  9274. askTitle: "",
  9275. askJson: [
  9276. { askstitle: "", askItem: 1, checkList: [] },
  9277. ],
  9278. },
  9279. ],
  9280. isShowTools: false,
  9281. askCount: 1,
  9282. isFold: 1,
  9283. askTitle: "",
  9284. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9285. checkJson: [{ checkCount: [], checkPerent: [] }],
  9286. homeworkList: [],
  9287. },
  9288. ],
  9289. itemCount: 1,
  9290. fileList1: [],
  9291. video: [],
  9292. testData: [],
  9293. pData: [],
  9294. templateArray: [],
  9295. },
  9296. ],
  9297. },
  9298. ];
  9299. this.steps++;
  9300. setTimeout(() => {
  9301. this.checkEva(this.checkId);
  9302. setTimeout(() => {
  9303. this.checkEva(this.checkId);
  9304. }, 100);
  9305. }, 1000);
  9306. this.updateWork();
  9307. })
  9308. .catch(() => {
  9309. return;
  9310. });
  9311. },
  9312. checkTemplate3() {
  9313. let _this = this;
  9314. _this
  9315. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  9316. confirmButtonText: "确定",
  9317. cancelButtonText: "取消",
  9318. type: "warning",
  9319. })
  9320. .then(() => {
  9321. _this.unitIndex = 0;
  9322. _this.unitJson = [
  9323. {
  9324. dyName: "", //单元标题
  9325. easy: 1,
  9326. chapterInfo: [
  9327. {
  9328. isread: false,
  9329. chapterid: this.guid(),
  9330. title: "",
  9331. courseName: "",
  9332. taskJson: [
  9333. {
  9334. task: "",
  9335. taskDetail: "",
  9336. chapterData: [],
  9337. toolText: "",
  9338. toolChoose: [
  9339. {
  9340. tool: [],
  9341. toolDetail: "",
  9342. toolType: 0,
  9343. askCount: 1,
  9344. askTitle: "",
  9345. askJson: [
  9346. { askstitle: "", askItem: 1, checkList: [] },
  9347. ],
  9348. },
  9349. ],
  9350. isShowTools: false,
  9351. askCount: 1,
  9352. isFold: 1,
  9353. askTitle: "",
  9354. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  9355. checkJson: [{ checkCount: [], checkPerent: [] }],
  9356. homeworkList: [],
  9357. },
  9358. ],
  9359. itemCount: 1,
  9360. fileList1: [],
  9361. video: [],
  9362. testData: [],
  9363. pData: [],
  9364. templateArray: [],
  9365. },
  9366. ],
  9367. },
  9368. ];
  9369. // this.steps++;
  9370. this.updateWork();
  9371. })
  9372. .catch(() => {
  9373. return;
  9374. });
  9375. },
  9376. checkTemplate4() {
  9377. let _this = this;
  9378. _this
  9379. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  9380. confirmButtonText: "确定",
  9381. cancelButtonText: "取消",
  9382. type: "warning",
  9383. })
  9384. .then(() => {
  9385. _this.unitIndex = 0;
  9386. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  9387. this.steps++;
  9388. this.updateWork();
  9389. })
  9390. .catch(() => {
  9391. return;
  9392. });
  9393. },
  9394. wordNext() {
  9395. this.dialogVisible2 = false;
  9396. },
  9397. isAddOrUpdateAttText() {
  9398. if (this.AttTextType == 0) {
  9399. this.addAttTextMessage();
  9400. } else {
  9401. this.updateAttText();
  9402. }
  9403. },
  9404. isAddOrUpdateLine() {
  9405. if (!this.lineTitle) {
  9406. this.$message.error("请填写链接标题");
  9407. return;
  9408. }
  9409. if (this.lineType == 0) {
  9410. this.addLine();
  9411. } else {
  9412. this.updateLine();
  9413. }
  9414. },
  9415. addAttTextMessage() {
  9416. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9417. this.taskCount
  9418. ].chapterData.push({
  9419. name: this.AttText.title,
  9420. url: this.AttText.text,
  9421. type: 6,
  9422. });
  9423. this.imgChange1(null, null, 6, this.taskCount);
  9424. this.dialogVisible6 = false;
  9425. },
  9426. selectAttText(itemTaskIndex, i) {
  9427. this.AttText.title =
  9428. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9429. itemTaskIndex
  9430. ].chapterData[i].name;
  9431. this.AttText.text =
  9432. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9433. itemTaskIndex
  9434. ].chapterData[i].url;
  9435. this.taskCount = itemTaskIndex;
  9436. this.AttTextIndex = i;
  9437. this.AttTextType = 1;
  9438. this.dialogVisible6 = true;
  9439. },
  9440. updateAttText() {
  9441. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9442. this.taskCount
  9443. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  9444. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9445. this.taskCount
  9446. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  9447. this.dialogVisible6 = false;
  9448. },
  9449. addLine() {
  9450. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9451. this.lineCount
  9452. ].chapterData.push({
  9453. name: "链接",
  9454. title: this.lineTitle,
  9455. url: this.line,
  9456. type: 8,
  9457. });
  9458. this.imgChange1(null, null, 8, this.lineCount);
  9459. this.dialogVisible7 = false;
  9460. },
  9461. selectLine(itemTaskIndex, i) {
  9462. this.line =
  9463. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9464. itemTaskIndex
  9465. ].chapterData[i].url;
  9466. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9467. itemTaskIndex
  9468. ].chapterData[i].title
  9469. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9470. .chapterData[i].title
  9471. : "";
  9472. this.taskCount = itemTaskIndex;
  9473. this.lineCount = i;
  9474. this.lineType = 1;
  9475. this.dialogVisible7 = true;
  9476. },
  9477. openUpdateSource(itemTaskIndex, i) {
  9478. this.sourceData = {};
  9479. let source =
  9480. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9481. .chapterData[i];
  9482. this.sourceData[source.id] = {};
  9483. this.sourceData[source.id].name = source.title;
  9484. this.sourceData[source.id].url = source.url;
  9485. this.dialogVisibleSource = true;
  9486. this.updateSourcePan = true;
  9487. this.taskCount = itemTaskIndex;
  9488. this.lineCount = i;
  9489. },
  9490. updateLine() {
  9491. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9492. this.taskCount
  9493. ].chapterData[this.lineCount].url = this.line;
  9494. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9495. this.taskCount
  9496. ].chapterData[this.lineCount].title = this.lineTitle;
  9497. this.dialogVisible7 = false;
  9498. },
  9499. addPP() {
  9500. this.dialogVisible3 = true;
  9501. },
  9502. goTo(path) {
  9503. this.$router.push(path);
  9504. },
  9505. openTools(itemTaskIndex, i, toolIndex) {
  9506. this.toolIndex = toolIndex;
  9507. this.taskCount = itemTaskIndex;
  9508. if (i == 4) {
  9509. if (toolIndex == null) {
  9510. var a =
  9511. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9512. .chapterData;
  9513. for (var i = 0; i < a.length; i++) {
  9514. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  9515. this.askJson =
  9516. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9517. itemTaskIndex
  9518. ].chapterData[i].askJson;
  9519. }
  9520. }
  9521. } else {
  9522. this.askJson = JSON.parse(
  9523. JSON.stringify(
  9524. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9525. itemTaskIndex
  9526. ].toolChoose[toolIndex]
  9527. )
  9528. );
  9529. }
  9530. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  9531. this.dialogVisible5 = true;
  9532. } else if (i == 45) {
  9533. if (
  9534. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9535. .toolChoose[toolIndex].testJson
  9536. ) {
  9537. this.testJson = JSON.parse(
  9538. JSON.stringify(
  9539. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9540. itemTaskIndex
  9541. ].toolChoose[toolIndex].testJson
  9542. )
  9543. );
  9544. } else {
  9545. var testJson = {
  9546. testCount: 1,
  9547. testTitle: "",
  9548. testJson: [
  9549. {
  9550. teststitle: "",
  9551. testItem: 1,
  9552. checkList: [],
  9553. timuList: [],
  9554. answer: [],
  9555. type: "1",
  9556. },
  9557. ],
  9558. };
  9559. this.testJson = testJson;
  9560. }
  9561. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  9562. this.dialogVisibleChoice = true;
  9563. } else if (i == 47) {
  9564. if (
  9565. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9566. .toolChoose[toolIndex].sentenceList
  9567. ) {
  9568. this.sentenceList = JSON.parse(
  9569. JSON.stringify(
  9570. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9571. itemTaskIndex
  9572. ].toolChoose[toolIndex].sentenceList
  9573. )
  9574. );
  9575. } else {
  9576. var sentenceList = [
  9577. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  9578. ];
  9579. this.sentenceList = sentenceList;
  9580. }
  9581. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  9582. this.dialogVisibleSentence = true;
  9583. } else if (i == 48) {
  9584. if (
  9585. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9586. .toolChoose[toolIndex].tableJson
  9587. ) {
  9588. this.tableJson = JSON.parse(
  9589. JSON.stringify(
  9590. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9591. itemTaskIndex
  9592. ].toolChoose[toolIndex].tableJson
  9593. )
  9594. );
  9595. } else {
  9596. var tableJson = { text: "" };
  9597. this.tableJson = tableJson;
  9598. }
  9599. this.dialogVisibleTable = true;
  9600. } else if (i == 52) {
  9601. if (
  9602. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9603. .toolChoose[toolIndex].wordJson
  9604. ) {
  9605. this.wordJson = JSON.parse(
  9606. JSON.stringify(
  9607. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9608. itemTaskIndex
  9609. ].toolChoose[toolIndex].wordJson
  9610. )
  9611. );
  9612. } else {
  9613. var wordJson = { text: "" };
  9614. this.wordJson = wordJson;
  9615. }
  9616. this.dialogVisibleWord = true;
  9617. // else if (i == 50) {
  9618. // if (
  9619. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9620. // .toolChoose[toolIndex].uploadJson
  9621. // ) {
  9622. // this.uploadJson = JSON.parse(
  9623. // JSON.stringify(
  9624. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9625. // itemTaskIndex
  9626. // ].toolChoose[toolIndex].uploadJson
  9627. // )
  9628. // );
  9629. // } else {
  9630. // var uploadJson = [];
  9631. // this.uploadJson = uploadJson;
  9632. // }
  9633. // this.dialogVisibleMoreUpload = true;
  9634. // }
  9635. } else if (i == 10) {
  9636. if (
  9637. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9638. .toolChoose[toolIndex].preTime
  9639. ) {
  9640. this.preTime = JSON.parse(
  9641. JSON.stringify(
  9642. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9643. itemTaskIndex
  9644. ].toolChoose[toolIndex].preTime
  9645. )
  9646. );
  9647. } else {
  9648. var preTime = 0;
  9649. this.preTime = preTime;
  9650. }
  9651. this.dialogVisiblePreTime = true;
  9652. } else if (i == 49) {
  9653. if (
  9654. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9655. .toolChoose[toolIndex].groupJson
  9656. ) {
  9657. this.groupJson = JSON.parse(
  9658. JSON.stringify(
  9659. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9660. itemTaskIndex
  9661. ].toolChoose[toolIndex].groupJson
  9662. )
  9663. );
  9664. } else {
  9665. var groupJson = {
  9666. group: [{ name: "第1组" }],
  9667. number: undefined,
  9668. islock: 1,
  9669. };
  9670. this.groupJson = groupJson;
  9671. }
  9672. this.dialogVisibleGroup = true;
  9673. } else if (i == 62) {
  9674. if (
  9675. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9676. .toolChoose[toolIndex].videoJson
  9677. ) {
  9678. this.videoJson = JSON.parse(
  9679. JSON.stringify(
  9680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9681. itemTaskIndex
  9682. ].toolChoose[toolIndex].videoJson
  9683. )
  9684. );
  9685. } else {
  9686. var videoJson = {
  9687. video: "",
  9688. setting: [],
  9689. };
  9690. this.videoJson = videoJson;
  9691. }
  9692. this.dialogVisibleVideo = true;
  9693. } else if (i == 15) {
  9694. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9695. itemTaskIndex
  9696. ].toolChoose[toolIndex].answerQ
  9697. ? JSON.parse(
  9698. JSON.stringify(
  9699. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9700. itemTaskIndex
  9701. ].toolChoose[toolIndex].answerQ
  9702. )
  9703. )
  9704. : "";
  9705. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  9706. this.dialogVisible8 = true;
  9707. } else if (i == 40) {
  9708. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9709. itemTaskIndex
  9710. ].toolChoose[toolIndex].rateJson
  9711. ? JSON.parse(
  9712. JSON.stringify(
  9713. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9714. itemTaskIndex
  9715. ].toolChoose[toolIndex].rateJson
  9716. )
  9717. )
  9718. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  9719. this.selectSteps = 1;
  9720. this.dialogVisibleRate = true;
  9721. } else if (i == 42) {
  9722. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9723. itemTaskIndex
  9724. ].toolChoose[toolIndex].answerQ
  9725. ? JSON.parse(
  9726. JSON.stringify(
  9727. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9728. itemTaskIndex
  9729. ].toolChoose[toolIndex].answerQ
  9730. )
  9731. )
  9732. : "";
  9733. this.dialogVisibleMp3 = true;
  9734. } else if (i == 41) {
  9735. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9736. itemTaskIndex
  9737. ].toolChoose[toolIndex].selectJson
  9738. ? JSON.parse(
  9739. JSON.stringify(
  9740. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9741. itemTaskIndex
  9742. ].toolChoose[toolIndex].selectJson
  9743. )
  9744. )
  9745. : { url: "", select: [], answer: [] };
  9746. this.selectSteps = 1;
  9747. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  9748. this.dialogVisibleSelect = true;
  9749. } else if (i == 3) {
  9750. top.postMessage(
  9751. {
  9752. tools: "3y",
  9753. cid: this.cid,
  9754. stage: this.unitIndex,
  9755. task: itemTaskIndex,
  9756. tool: toolIndex,
  9757. },
  9758. "*"
  9759. );
  9760. } else if (i == 1) {
  9761. top.postMessage(
  9762. {
  9763. tools: "1y",
  9764. cid: this.cid,
  9765. stage: this.unitIndex,
  9766. task: itemTaskIndex,
  9767. tool: toolIndex,
  9768. },
  9769. "*"
  9770. );
  9771. } else if (i == 57) {
  9772. top.postMessage(
  9773. {
  9774. tools: "57y",
  9775. cid: this.cid,
  9776. stage: this.unitIndex,
  9777. task: itemTaskIndex,
  9778. tool: toolIndex,
  9779. },
  9780. "*"
  9781. );
  9782. } else if (i == 69) {
  9783. this.englishList = {};
  9784. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  9785. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  9786. ? JSON.parse(
  9787. JSON.stringify(
  9788. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9789. itemTaskIndex
  9790. ].toolChoose[toolIndex].englishList
  9791. )
  9792. )
  9793. : {};
  9794. this.$forceUpdate();
  9795. this.englishDialogVisible = true;
  9796. } else if (i == 70) {
  9797. this.englishVoiceJson = {};
  9798. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  9799. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  9800. ? JSON.parse(
  9801. JSON.stringify(
  9802. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9803. itemTaskIndex
  9804. ].toolChoose[toolIndex].englishVoiceJson
  9805. )
  9806. )
  9807. : {
  9808. title: '',
  9809. detail: '',
  9810. array: []
  9811. };
  9812. // {
  9813. // time: "",
  9814. // class: "",
  9815. // difficulty: 0,
  9816. // topic: "",
  9817. // isShow: false,
  9818. // eva: 0,
  9819. // aiEva: {
  9820. // isAiEva: false,
  9821. // aiEvaChoose: [],
  9822. // },
  9823. // allfType: [],
  9824. // englishJson: {},
  9825. // };
  9826. this.$forceUpdate();
  9827. this.EnglishVoiceDialog = true;
  9828. }
  9829. },
  9830. setEnglishVoiceJson(val) {
  9831. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9832. this.taskCount
  9833. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  9834. JSON.stringify(val)
  9835. );
  9836. this.$forceUpdate();
  9837. if (
  9838. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  9839. .toolChoose[this.toolIndex].tool != 70
  9840. ) {
  9841. this.addTools(70, this.taskCount, this.toolIndex);
  9842. }
  9843. },
  9844. chapAddTools(i) {
  9845. if (this.chapTools[0].tools.length == 0) {
  9846. this.chapTools[0].tools.push(i);
  9847. } else {
  9848. if (this.chapTools[0].tools.indexOf(i) != -1) {
  9849. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  9850. } else {
  9851. this.chapTools[0].tools.push(i);
  9852. }
  9853. }
  9854. this.$forceUpdate();
  9855. },
  9856. addChaptersDataTools() {
  9857. if (this.chapTools[0].tools.indexOf(4) != -1) {
  9858. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9859. this.chapCount
  9860. ].chapterData.push({
  9861. name: this.chapTools[0].toolDetail,
  9862. url: this.chapTools[0].tools,
  9863. type: 7,
  9864. askJson: this.askJson,
  9865. });
  9866. } else {
  9867. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9868. this.chapCount
  9869. ].chapterData.push({
  9870. name: this.chapTools[0].toolDetail,
  9871. url: this.chapTools[0].tools,
  9872. type: 7,
  9873. });
  9874. }
  9875. this.imgChange1(null, null, 7, this.chapCount);
  9876. this.dialogVisible4 = false;
  9877. },
  9878. addTools(i, itemTaskIndex, toolIndex) {
  9879. // if (
  9880. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9881. // .toolChoose[toolIndex].tool.length == 0
  9882. // ) {
  9883. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9884. // itemTaskIndex
  9885. // ].toolChoose[toolIndex].tool.push(i);
  9886. // } else {
  9887. // if (
  9888. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9889. // itemTaskIndex
  9890. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  9891. // ) {
  9892. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9893. // itemTaskIndex
  9894. // ].toolChoose[toolIndex].tool.splice(
  9895. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9896. // itemTaskIndex
  9897. // ].toolChoose[toolIndex].tool.indexOf(i),
  9898. // 1
  9899. // );
  9900. // } else {
  9901. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9902. // itemTaskIndex
  9903. // ].toolChoose[toolIndex].tool.push(i);
  9904. // }
  9905. // console.log(
  9906. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9907. // .toolChoose[toolIndex].tool
  9908. // );
  9909. // }
  9910. if (i == 4) {
  9911. if (
  9912. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9913. .toolChoose[toolIndex].askJson.askTitle == "" ||
  9914. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9915. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  9916. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9917. .toolChoose[toolIndex].askJson[0].checkList < 2
  9918. ) {
  9919. this.openTools(itemTaskIndex, 4, toolIndex);
  9920. // this.$message({
  9921. // message: "请填写完整问卷内容",
  9922. // type: "error",
  9923. // });
  9924. return;
  9925. }
  9926. }
  9927. if (i == 45) {
  9928. if (
  9929. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9930. .toolChoose[toolIndex].testJson ||
  9931. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9932. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  9933. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9934. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  9935. ) {
  9936. this.openTools(itemTaskIndex, 45, toolIndex);
  9937. // this.$message({
  9938. // message: "请填写完整问卷内容",
  9939. // type: "error",
  9940. // });
  9941. return;
  9942. }
  9943. }
  9944. if (i == 47) {
  9945. if (
  9946. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9947. .toolChoose[toolIndex].sentenceList ||
  9948. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9949. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  9950. ) {
  9951. this.openTools(itemTaskIndex, 47, toolIndex);
  9952. return;
  9953. }
  9954. }
  9955. if (i == 69) {
  9956. if (
  9957. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9958. .toolChoose[toolIndex].englishList
  9959. ) {
  9960. this.openTools(itemTaskIndex, 69, toolIndex);
  9961. return;
  9962. }
  9963. }
  9964. if (i == 70) {
  9965. if (
  9966. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9967. .toolChoose[toolIndex].englishVoiceJson
  9968. ) {
  9969. this.openTools(itemTaskIndex, 70, toolIndex);
  9970. return;
  9971. }
  9972. }
  9973. // if (i == 48) {
  9974. // if (
  9975. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9976. // .toolChoose[toolIndex].tableJson
  9977. // ) {
  9978. // this.openTools(itemTaskIndex, 48, toolIndex);
  9979. // return;
  9980. // }
  9981. // }
  9982. // if (i == 50) {
  9983. // if (
  9984. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9985. // .toolChoose[toolIndex].uploadJson
  9986. // ) {
  9987. // this.openTools(itemTaskIndex, 50, toolIndex);
  9988. // return;
  9989. // }
  9990. // }
  9991. if (i == 49) {
  9992. if (
  9993. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  9994. .toolChoose[toolIndex].groupJson
  9995. ) {
  9996. this.openTools(itemTaskIndex, 49, toolIndex);
  9997. return;
  9998. }
  9999. }
  10000. if (i == 62) {
  10001. if (
  10002. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10003. .toolChoose[toolIndex].videoJson
  10004. ) {
  10005. this.openTools(itemTaskIndex, 62, toolIndex);
  10006. return;
  10007. }
  10008. }
  10009. if (i == 15) {
  10010. if (
  10011. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10012. .toolChoose[toolIndex].answerQ ||
  10013. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10014. .toolChoose[toolIndex].answerQ == ""
  10015. ) {
  10016. this.openTools(itemTaskIndex, 15, toolIndex);
  10017. // this.$message({
  10018. // message: "请填写问答内容",
  10019. // type: "error",
  10020. // });
  10021. return;
  10022. }
  10023. }
  10024. if (i == 40) {
  10025. if (
  10026. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10027. .toolChoose[toolIndex].rateJson ||
  10028. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10029. .toolChoose[toolIndex].rateJson.length
  10030. ) {
  10031. this.openTools(itemTaskIndex, 40, toolIndex);
  10032. return;
  10033. }
  10034. }
  10035. if (i == 41) {
  10036. if (
  10037. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10038. .toolChoose[toolIndex].selectJson ||
  10039. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10040. .toolChoose[toolIndex].selectJson.url == "" ||
  10041. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10042. .toolChoose[toolIndex].selectJson.select.length ||
  10043. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10044. .toolChoose[toolIndex].selectJson.answer.length
  10045. ) {
  10046. this.openTools(itemTaskIndex, 41, toolIndex);
  10047. return;
  10048. }
  10049. }
  10050. if (i == 42) {
  10051. if (
  10052. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10053. .toolChoose[toolIndex].answerQ ||
  10054. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10055. .toolChoose[toolIndex].answerQ == ""
  10056. ) {
  10057. this.openTools(itemTaskIndex, 42, toolIndex);
  10058. return;
  10059. }
  10060. }
  10061. if (
  10062. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  10063. .toolChoose[toolIndex].tool.length > 0
  10064. ) {
  10065. if (
  10066. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10067. itemTaskIndex
  10068. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  10069. ) {
  10070. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10071. itemTaskIndex
  10072. ].toolChoose[toolIndex].tool.splice(
  10073. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10074. itemTaskIndex
  10075. ].toolChoose[toolIndex].tool.indexOf(i),
  10076. 1
  10077. );
  10078. } else {
  10079. // this.$message({
  10080. // message: "每个工具只能添加一个",
  10081. // type: "error",
  10082. // });
  10083. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10084. itemTaskIndex
  10085. ].toolChoose[toolIndex].tool = [];
  10086. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10087. itemTaskIndex
  10088. ].toolChoose[toolIndex].tool.push(i);
  10089. }
  10090. } else {
  10091. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10092. itemTaskIndex
  10093. ].toolChoose[toolIndex].tool.push(i);
  10094. }
  10095. this.$forceUpdate();
  10096. },
  10097. addAskList(index) {
  10098. this.askJson.askJson.splice(index + 1, 0, {
  10099. askstitle: "",
  10100. askItem: 1,
  10101. checkList: [],
  10102. });
  10103. this.askJson.askCount++;
  10104. },
  10105. addTestList(index) {
  10106. this.testJson.testJson.splice(index + 1, 0, {
  10107. teststitle: "",
  10108. testItem: 1,
  10109. checkList: [],
  10110. timuList: [],
  10111. answer: [],
  10112. type: "1",
  10113. });
  10114. this.testJson.testCount++;
  10115. },
  10116. deleteAskList(index) {
  10117. if (
  10118. !this.askJson.askJson[index].askstitle &&
  10119. this.askJson.askJson[index].askItem == 1 &&
  10120. !this.askJson.askJson[index].checkList[0]
  10121. ) {
  10122. this.askJson.askJson.splice(index, 1);
  10123. this.askJson.askCount--;
  10124. } else {
  10125. let _this = this;
  10126. _this
  10127. .$confirm("此操作不可撤销,是否继续?", "提示", {
  10128. confirmButtonText: "确定",
  10129. cancelButtonText: "取消",
  10130. type: "warning",
  10131. })
  10132. .then(() => {
  10133. _this.askJson.askJson.splice(index, 1);
  10134. _this.askJson.askCount--;
  10135. })
  10136. .catch(() => {
  10137. return;
  10138. });
  10139. }
  10140. },
  10141. deleteTestList(index) {
  10142. if (
  10143. !this.testJson.testJson[index].teststitle &&
  10144. this.testJson.testJson[index].testItem == 1 &&
  10145. !this.testJson.testJson[index].checkList[0]
  10146. ) {
  10147. this.testJson.testJson.splice(index, 1);
  10148. this.testJson.testCount--;
  10149. } else {
  10150. let _this = this;
  10151. _this
  10152. .$confirm("此操作不可撤销,是否继续?", "提示", {
  10153. confirmButtonText: "确定",
  10154. cancelButtonText: "取消",
  10155. type: "warning",
  10156. })
  10157. .then(() => {
  10158. _this.testJson.testJson.splice(index, 1);
  10159. _this.testJson.testCount--;
  10160. })
  10161. .catch(() => {
  10162. return;
  10163. });
  10164. }
  10165. },
  10166. askMove(type, index) {
  10167. if (type == 1) {
  10168. if (index > 0) {
  10169. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  10170. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  10171. this.askJson.askJson[index - 1] = b;
  10172. this.askJson.askJson[index] = a;
  10173. }
  10174. } else {
  10175. if (index < this.askJson.askJson.length - 1) {
  10176. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  10177. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  10178. this.askJson.askJson[index + 1] = b;
  10179. this.askJson.askJson[index] = a;
  10180. }
  10181. }
  10182. this.$forceUpdate();
  10183. },
  10184. checkMove(type, index, checkIndex) {
  10185. if (type == 1) {
  10186. if (checkIndex > 0) {
  10187. let a = JSON.parse(
  10188. JSON.stringify(
  10189. this.askJson.askJson[index].checkList[checkIndex - 1]
  10190. )
  10191. );
  10192. let b = JSON.parse(
  10193. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  10194. );
  10195. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  10196. this.askJson.askJson[index].checkList[checkIndex] = a;
  10197. }
  10198. } else {
  10199. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  10200. let a = JSON.parse(
  10201. JSON.stringify(
  10202. this.askJson.askJson[index].checkList[checkIndex + 1]
  10203. )
  10204. );
  10205. let b = JSON.parse(
  10206. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  10207. );
  10208. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  10209. this.askJson.askJson[index].checkList[checkIndex] = a;
  10210. }
  10211. }
  10212. this.$forceUpdate();
  10213. },
  10214. testMove(type, index) {
  10215. if (type == 1) {
  10216. if (index > 0) {
  10217. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  10218. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  10219. this.testJson.testJson[index - 1] = b;
  10220. this.testJson.testJson[index] = a;
  10221. }
  10222. } else {
  10223. if (index < this.testJson.testJson.length - 1) {
  10224. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  10225. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  10226. this.testJson.testJson[index + 1] = b;
  10227. this.testJson.testJson[index] = a;
  10228. }
  10229. }
  10230. this.$forceUpdate();
  10231. },
  10232. tcheckMove(type, index, checkIndex) {
  10233. if (type == 1) {
  10234. if (checkIndex > 0) {
  10235. let a = JSON.parse(
  10236. JSON.stringify(
  10237. this.testJson.testJson[index].checkList[checkIndex - 1]
  10238. )
  10239. );
  10240. let b = JSON.parse(
  10241. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  10242. );
  10243. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  10244. this.testJson.testJson[index].checkList[checkIndex] = a;
  10245. }
  10246. } else {
  10247. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  10248. let a = JSON.parse(
  10249. JSON.stringify(
  10250. this.testJson.testJson[index].checkList[checkIndex + 1]
  10251. )
  10252. );
  10253. let b = JSON.parse(
  10254. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  10255. );
  10256. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  10257. this.testJson.testJson[index].checkList[checkIndex] = a;
  10258. }
  10259. }
  10260. this.$forceUpdate();
  10261. },
  10262. addcheckList(json, index) {
  10263. // json.checkList.length++;
  10264. json.checkList.splice(index + 1, 0, "");
  10265. json.askItem++;
  10266. this.$forceUpdate();
  10267. },
  10268. deletecheckList(json, index) {
  10269. // json.checkList.length--;
  10270. json.checkList.splice(index, 1);
  10271. json.askItem--;
  10272. this.$forceUpdate();
  10273. },
  10274. addTcheckList(json, index) {
  10275. // json.checkList.length++;
  10276. json.checkList.splice(index + 1, 0, "");
  10277. json.testItem++;
  10278. this.$forceUpdate();
  10279. },
  10280. deleteTcheckList(json, index) {
  10281. // json.checkList.length--;
  10282. json.checkList.splice(index, 1);
  10283. json.testItem--;
  10284. this.$forceUpdate();
  10285. },
  10286. checkTestType(type, json) {
  10287. json.type = type;
  10288. setTimeout(() => {
  10289. json.answer = [];
  10290. }, 100);
  10291. },
  10292. checkAskType(type, json) {
  10293. json.type = type;
  10294. // json.checkList = [];
  10295. this.$forceUpdate();
  10296. },
  10297. addSelectList(json) {
  10298. json.select.push("");
  10299. json.answer.push("");
  10300. },
  10301. deleteSelectList(json) {
  10302. // json.select.length--;
  10303. // json.answer.length--;
  10304. json.select.splice(json.select.length - 1, 1);
  10305. json.answer.splice(json.answer.length - 1, 1);
  10306. },
  10307. addAsk() {
  10308. if (this.askJson.askTitle === "") {
  10309. this.$message.error("标题不能为空!");
  10310. return;
  10311. }
  10312. var aj = this.askJson.askJson;
  10313. var b = 1;
  10314. for (var i = 0; i < aj.length; i++) {
  10315. if (aj[i].askstitle === "") {
  10316. var a = 1;
  10317. for (let index = 0; index < aj[i].askItem; index++) {
  10318. const element = aj[i].checkList[index]
  10319. ? aj[i].checkList[index]
  10320. : "";
  10321. if (element != "") {
  10322. b++;
  10323. this.$message.error(`请将题目${i + 1}填写完整。`);
  10324. return;
  10325. } else {
  10326. a++;
  10327. }
  10328. }
  10329. if (b == 1) {
  10330. this.$message.error("至少填写一个问题");
  10331. return;
  10332. }
  10333. } else if (aj[i].askstitle != "") {
  10334. for (let index = 0; index < aj[i].askItem; index++) {
  10335. const element = aj[i].checkList[index]
  10336. ? aj[i].checkList[index]
  10337. : "";
  10338. var index = 0;
  10339. for (var z = 0; z < aj[i].checkList.length; z++) {
  10340. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  10341. if (checkC != "") {
  10342. index++;
  10343. } else {
  10344. this.$message.error(`题目${i + 1}选项不能为空!`);
  10345. return;
  10346. }
  10347. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  10348. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  10349. if (checkC == checkC2) {
  10350. this.$message.error(
  10351. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  10352. );
  10353. return;
  10354. }
  10355. }
  10356. }
  10357. b++;
  10358. if (index < 2) {
  10359. this.$message.error("每道题目至少需要设置2个选项。");
  10360. return;
  10361. }
  10362. }
  10363. }
  10364. }
  10365. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  10366. var elc = el.checkList.filter((element) => {
  10367. return element != "";
  10368. });
  10369. return el.askstitle != "" && elc.length != 0;
  10370. });
  10371. if (!this.dialogVisible4) {
  10372. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10373. this.taskCount
  10374. ].toolChoose[this.toolIndex] = this.askJson;
  10375. }
  10376. this.dialogVisible5 = false;
  10377. if (
  10378. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10379. .toolChoose[this.toolIndex].tool != 4
  10380. ) {
  10381. this.addTools(4, this.taskCount, this.toolIndex);
  10382. }
  10383. },
  10384. addTest() {
  10385. // if (this.testJson.testTitle === "") {
  10386. // this.$message.error("标题不能为空!");
  10387. // return;
  10388. // }
  10389. var aj = this.testJson.testJson;
  10390. var b = 1;
  10391. for (var i = 0; i < aj.length; i++) {
  10392. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  10393. var a = 1;
  10394. for (let index = 0; index < aj[i].testItem; index++) {
  10395. const element = aj[i].checkList[index]
  10396. ? aj[i].checkList[index]
  10397. : "";
  10398. if (element != "") {
  10399. b++;
  10400. this.$message.error(`请将题目${i + 1}填写完整。`);
  10401. return;
  10402. } else {
  10403. a++;
  10404. }
  10405. }
  10406. if (b == 1) {
  10407. this.$message.error("至少填写一个问题");
  10408. return;
  10409. }
  10410. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  10411. for (let index = 0; index < aj[i].testItem; index++) {
  10412. const element = aj[i].checkList[index]
  10413. ? aj[i].checkList[index]
  10414. : "";
  10415. var index = 0;
  10416. for (var z = 0; z < aj[i].checkList.length; z++) {
  10417. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  10418. if (checkC != "") {
  10419. index++;
  10420. } else {
  10421. this.$message.error(`题目${i + 1}选项不能为空!`);
  10422. return;
  10423. }
  10424. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  10425. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  10426. if (checkC == checkC2) {
  10427. this.$message.error(
  10428. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  10429. );
  10430. return;
  10431. }
  10432. }
  10433. }
  10434. b++;
  10435. if (index < 2) {
  10436. this.$message.error("每道题目至少需要设置2个选项。");
  10437. return;
  10438. }
  10439. if (
  10440. (aj[i].type == "2" && !aj[i].answer.length) ||
  10441. (aj[i].type == "1" &&
  10442. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  10443. (aj[i].answer !== 0 && !aj[i].answer)))
  10444. ) {
  10445. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  10446. return;
  10447. }
  10448. }
  10449. }
  10450. }
  10451. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  10452. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  10453. var elc = el.checkList.filter((element) => {
  10454. return element != "";
  10455. });
  10456. return (
  10457. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  10458. );
  10459. });
  10460. isTestJson.testCount = isTestJson.testJson.length;
  10461. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10462. this.taskCount
  10463. ].toolChoose[this.toolIndex].testJson = isTestJson;
  10464. this.dialogVisibleChoice = false;
  10465. if (
  10466. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10467. .toolChoose[this.toolIndex].tool != 45
  10468. ) {
  10469. this.addTools(45, this.taskCount, this.toolIndex);
  10470. }
  10471. },
  10472. addVideoJson(videoJson) {
  10473. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10474. this.taskCount
  10475. ].toolChoose[this.toolIndex].videoJson = videoJson;
  10476. this.dialogVisibleVideo = false;
  10477. if (
  10478. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10479. .toolChoose[this.toolIndex].tool != 62
  10480. ) {
  10481. this.addTools(62, this.taskCount, this.toolIndex);
  10482. }
  10483. },
  10484. //自动获取剪贴板
  10485. pasteOption() {
  10486. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  10487. if (!iframe) {
  10488. this.$message.error("请使用AI共创生成题目");
  10489. return;
  10490. }
  10491. let copyData = iframe.contentWindow.copyData;
  10492. if (!copyData || !copyData.selectData.length) {
  10493. this.$message.error("请使用AI共创生成题目");
  10494. return;
  10495. }
  10496. let selectData = copyData.selectData;
  10497. for (var i = 0; i < selectData.length; i++) {
  10498. let answer = 0;
  10499. switch (selectData[i].answer[0]) {
  10500. case "A":
  10501. answer = 0;
  10502. break;
  10503. case "B":
  10504. answer = 1;
  10505. break;
  10506. case "C":
  10507. answer = 2;
  10508. break;
  10509. case "D":
  10510. answer = 3;
  10511. break;
  10512. case "E":
  10513. answer = 4;
  10514. break;
  10515. default:
  10516. break;
  10517. }
  10518. this.testJson.testJson.push({
  10519. teststitle: selectData[i].subject,
  10520. testItem: selectData[i].options.length,
  10521. checkList: selectData[i].options,
  10522. timuList: [],
  10523. answer: answer,
  10524. type: "1",
  10525. });
  10526. this.testJson.testCount++;
  10527. }
  10528. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  10529. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  10530. var elc = el.checkList.filter((element) => {
  10531. return element != "";
  10532. });
  10533. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  10534. });
  10535. isTestJson.testCount = isTestJson.testJson.length;
  10536. if (!isTestJson.testCount) {
  10537. return;
  10538. }
  10539. this.testJson = isTestJson;
  10540. this.$forceUpdate();
  10541. },
  10542. pasteTask(taskJson) {
  10543. let stageTasksData = [];
  10544. if (taskJson) {
  10545. stageTasksData = taskJson;
  10546. } else {
  10547. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  10548. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  10549. if (!iframe && !iframe2) {
  10550. this.$message.error("请使用AI共创生成");
  10551. return;
  10552. }
  10553. let copyData = iframe ? iframe.contentWindow.copyData : false;
  10554. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  10555. if (
  10556. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  10557. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  10558. ) {
  10559. this.$message.error("请使用AI共创生成");
  10560. return;
  10561. }
  10562. stageTasksData = copyData
  10563. ? copyData.tasksData
  10564. : copyData2
  10565. ? copyData2.tasksData
  10566. : [{ taskName: "", taskDecs: "" }];
  10567. }
  10568. let taskA = [];
  10569. let tasks = stageTasksData;
  10570. for (var j = 0; j < tasks.length; j++) {
  10571. taskA.push({
  10572. task: tasks[j].taskName,
  10573. taskDetail: tasks[j].taskDecs,
  10574. chapterData: [],
  10575. toolText: "",
  10576. toolChoose: [
  10577. {
  10578. tool: [],
  10579. toolDetail: "",
  10580. toolType: 0,
  10581. askCount: 1,
  10582. askTitle: "",
  10583. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10584. },
  10585. ],
  10586. isShowTools: false,
  10587. askCount: 1,
  10588. isFold: 1,
  10589. askTitle: "",
  10590. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10591. checkJson: [{ checkCount: [], checkPerent: [] }],
  10592. homeworkList: [],
  10593. });
  10594. }
  10595. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  10596. this.$forceUpdate();
  10597. },
  10598. pasteStage(stageJson) {
  10599. let stageData = [];
  10600. if (stageJson) {
  10601. stageData = stageJson;
  10602. } else {
  10603. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  10604. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  10605. if (!iframe && !iframe2) {
  10606. this.$message.error("请使用AI共创生成");
  10607. return;
  10608. }
  10609. let copyData = iframe ? iframe.contentWindow.copyData : false;
  10610. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  10611. if (
  10612. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  10613. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  10614. ) {
  10615. this.$message.error("请使用AI共创生成");
  10616. return;
  10617. }
  10618. stageData = copyData
  10619. ? copyData.stageData
  10620. : copyData2
  10621. ? copyData2.stageData
  10622. : [""];
  10623. }
  10624. let stage = [];
  10625. for (var i = 0; i < stageData.length; i++) {
  10626. stage.push({
  10627. dyName: stageData[i], //单元标题
  10628. chapterInfo: [
  10629. {
  10630. isread: false,
  10631. chapterid: this.guid(),
  10632. title: "",
  10633. courseName: "",
  10634. taskJson: [
  10635. {
  10636. task: "",
  10637. taskDetail: "",
  10638. chapterData: [],
  10639. toolText: "",
  10640. toolChoose: [
  10641. {
  10642. tool: [],
  10643. toolDetail: "",
  10644. toolType: 0,
  10645. askCount: 1,
  10646. askTitle: "",
  10647. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10648. },
  10649. ],
  10650. isShowTools: false,
  10651. askCount: 1,
  10652. isFold: 1,
  10653. askTitle: "",
  10654. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10655. checkJson: [{ checkCount: [], checkPerent: [] }],
  10656. homeworkList: [],
  10657. },
  10658. ],
  10659. itemCount: 1,
  10660. fileList1: [],
  10661. video: [],
  10662. testData: [],
  10663. pData: [],
  10664. templateArray: [],
  10665. },
  10666. ],
  10667. });
  10668. }
  10669. let _this = this;
  10670. if (stageJson) {
  10671. if (!_this.cid) {
  10672. _this.unitJson = stage;
  10673. } else {
  10674. _this.unitIndex = 0;
  10675. _this.unitJson = stage;
  10676. _this.updateWork();
  10677. }
  10678. } else {
  10679. _this
  10680. .$confirm(
  10681. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  10682. "提示",
  10683. {
  10684. confirmButtonText: "确定",
  10685. cancelButtonText: "取消",
  10686. type: "warning",
  10687. }
  10688. )
  10689. .then(() => {
  10690. _this.unitIndex = 0;
  10691. _this.unitJson = stage;
  10692. // _this.steps++;
  10693. _this.updateWork();
  10694. })
  10695. .catch(() => {
  10696. return;
  10697. });
  10698. }
  10699. },
  10700. openStageBox() {
  10701. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  10702. this.dialogVisibleStageChange = true;
  10703. },
  10704. updateChange() {
  10705. this.$confirm(
  10706. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  10707. "提示",
  10708. {
  10709. confirmButtonText: "确定",
  10710. cancelButtonText: "取消",
  10711. type: "warning",
  10712. }
  10713. )
  10714. .then(() => {
  10715. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  10716. this.updateWork();
  10717. this.dialogVisibleStageChange = false;
  10718. })
  10719. .catch(() => {
  10720. return;
  10721. });
  10722. },
  10723. addAnswer() {
  10724. if (this.answerQ == "") {
  10725. this.$message.error("请输入您想要问的问题");
  10726. return;
  10727. }
  10728. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10729. this.taskCount
  10730. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  10731. this.dialogVisible8 = false;
  10732. if (
  10733. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10734. .toolChoose[this.toolIndex].tool != 15
  10735. ) {
  10736. this.addTools(15, this.taskCount, this.toolIndex);
  10737. }
  10738. },
  10739. addMp3Answer() {
  10740. if (this.answerQ == "") {
  10741. this.$message.error("请输入您想要回答的问题");
  10742. return;
  10743. }
  10744. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10745. this.taskCount
  10746. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  10747. this.dialogVisibleMp3 = false;
  10748. },
  10749. addRateAnswer() {
  10750. var a = 1;
  10751. for (var i = 0; i < this.rateJson.length; i++) {
  10752. if (this.rateJson[i].value == "") {
  10753. a = 2;
  10754. break;
  10755. }
  10756. }
  10757. if (a == 2) {
  10758. this.$message.error("请把评价信息填写完整");
  10759. return;
  10760. }
  10761. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10762. this.taskCount
  10763. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  10764. this.dialogVisibleRate = false;
  10765. if (
  10766. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10767. .toolChoose[this.toolIndex].tool != 40
  10768. ) {
  10769. this.addTools(40, this.taskCount, this.toolIndex);
  10770. }
  10771. },
  10772. addSelectAnswer() {
  10773. if (this.selectJson.url == "") {
  10774. this.$message.error("请上传题目");
  10775. return;
  10776. }
  10777. if (!this.selectJson.select.length) {
  10778. this.$message.error("请添加选项");
  10779. return;
  10780. }
  10781. if (!this.selectJson.answer.length) {
  10782. this.$message.error("请设置答案");
  10783. return;
  10784. }
  10785. var a = 1;
  10786. for (var i = 0; i < this.selectJson.answer.length; i++) {
  10787. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  10788. a = 2;
  10789. }
  10790. }
  10791. if (a == 2) {
  10792. this.$message.error("请设置答案");
  10793. return;
  10794. }
  10795. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10796. this.taskCount
  10797. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  10798. this.dialogVisibleSelect = false;
  10799. if (
  10800. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  10801. .toolChoose[this.toolIndex].tool != 41
  10802. ) {
  10803. this.addTools(41, this.taskCount, this.toolIndex);
  10804. }
  10805. },
  10806. nextSelectSteps() {
  10807. if (this.selectJson.url == "") {
  10808. this.$message.error("请上传题目");
  10809. return;
  10810. }
  10811. if (!this.selectJson.select.length) {
  10812. this.$message.error("请添加选项");
  10813. return;
  10814. } else {
  10815. for (var z = 0; z < this.selectJson.select.length; z++) {
  10816. let checkC = this.selectJson.select[z];
  10817. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  10818. let checkC2 = this.selectJson.select[z2];
  10819. if (checkC == checkC2) {
  10820. this.$message.error(
  10821. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  10822. );
  10823. return;
  10824. }
  10825. }
  10826. }
  10827. }
  10828. var a = 1;
  10829. for (var i = 0; i < this.selectJson.select.length; i++) {
  10830. if (!this.selectJson.select[i]) {
  10831. a = 2;
  10832. }
  10833. }
  10834. if (a == 2) {
  10835. this.$message.error("添加的选项不能为空");
  10836. return;
  10837. }
  10838. this.selectSteps++;
  10839. },
  10840. selectCourseDetail() {
  10841. if (this.cid == "" || this.cid == undefined) {
  10842. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  10843. this.isTeacherSee = true;
  10844. }
  10845. console.log("这是新增课程");
  10846. this.selectAllType();
  10847. } else {
  10848. this.isOutline = true
  10849. this.isOutline2 = true
  10850. this.cpoteType = 4
  10851. this.cidType = 1;
  10852. let params = {
  10853. cid: this.cid,
  10854. };
  10855. this.ajax
  10856. .get(this.$store.state.api + "select_course_detail", params)
  10857. .then((res) => {
  10858. this.unitJson = JSON.parse(res.data[0][0].chapters);
  10859. this.courseState = res.data[0][0].state;
  10860. for (var j = 0; j < this.unitJson.length; j++) {
  10861. for (
  10862. var k = 0;
  10863. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  10864. k++
  10865. ) {
  10866. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  10867. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  10868. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  10869. : [];
  10870. let _chapterData = [];
  10871. for (
  10872. var c = 0;
  10873. c <
  10874. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  10875. .length;
  10876. c++
  10877. ) {
  10878. if (
  10879. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  10880. ) {
  10881. _chapterData.push(
  10882. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  10883. );
  10884. }
  10885. }
  10886. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  10887. _chapterData;
  10888. }
  10889. }
  10890. this.$forceUpdate();
  10891. this.courseName = res.data[0][0].title;
  10892. this.courseText = res.data[0][0].brief;
  10893. this.courseText2 = res.data[0][0].reBrief;
  10894. this.evalua = res.data[0][0].evaId;
  10895. this.cover = JSON.parse(res.data[0][0].cover);
  10896. this.noneBtnImg = this.cover.length >= 1;
  10897. if (res.data[0][0].refile) {
  10898. this.infoData = JSON.parse(res.data[0][0].refile)
  10899. }
  10900. // this.checkboxList =
  10901. // res.data[0][0].course_student.length > 0
  10902. // ? JSON.parse(res.data[0][0].course_student)
  10903. // : [];
  10904. this.checkboxList2 = res.data[0][0].juri
  10905. ? res.data[0][0].juri.split(",")
  10906. : [];
  10907. this.inviteCode = [];
  10908. for (var i = 0; i < res.data[2].length; i++) {
  10909. this.inviteCode.push({
  10910. cid: res.data[2][i].classid,
  10911. ic: res.data[2][i].code,
  10912. });
  10913. }
  10914. this.checkboxList3 = res.data[0][0].course_teacher
  10915. ? res.data[0][0].course_teacher.split(",")
  10916. : [];
  10917. // this.isTeacherSee =
  10918. // res.data[0][0].is_teacher_look == 0 ? true : false;
  10919. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  10920. this.myWord = res.data[0][0].template;
  10921. this.templateC.id = "123";
  10922. this.courseUserid = res.data[0][0].userid;
  10923. // if(this.courseUserid == this.userid){
  10924. // this.InviteChange(this.checkboxList2)
  10925. // }
  10926. this.nbOrder = res.data[0][0].ordernumber;
  10927. this.courseTypeId = [];
  10928. for (var i = 0; i < res.data[1].length; i++) {
  10929. this.courseTypeId.push(res.data[1][i].typeid);
  10930. }
  10931. console.log(this.courseTypeId);
  10932. // if (this.timer) clearInterval(this.timer);
  10933. if (this.timer) clearTimeout(this.timer);
  10934. this.timer = null;
  10935. // this.timer = setInterval(() => {
  10936. if(res.data[3].length){
  10937. try {
  10938. this.aiJson = JSON.parse(res.data[3][0].tips);
  10939. this.templateid = res.data[3][0].template;
  10940. }catch(error){
  10941. console.error(error)
  10942. }
  10943. }
  10944. if(res.data[0][0].cpote){
  10945. try {
  10946. this.cpote = JSON.parse(res.data[0][0].cpote);
  10947. }catch(error){
  10948. console.error(error)
  10949. }
  10950. }
  10951. if(res.data[0][0].setting){
  10952. try {
  10953. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie;
  10954. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime;
  10955. }catch(error){
  10956. console.error(error)
  10957. }
  10958. }
  10959. this.isFileSearch = res.data[0][0].iresearch == 1
  10960. this.seleteCourseUpdate();
  10961. this.setMan();
  10962. this.selectAllType();
  10963. this.unitJson[
  10964. this.unitIndex
  10965. ].chapterInfo[0].taskJson[0].toolOpen = true;
  10966. // }, 5000);
  10967. this.$forceUpdate();
  10968. setTimeout(() => {
  10969. this.checkEva(this.evalua);
  10970. setTimeout(() => {
  10971. this.checkEva(this.evalua);
  10972. }, 100);
  10973. }, 100);
  10974. })
  10975. .catch((err) => {
  10976. console.error(err);
  10977. });
  10978. }
  10979. if(this.aiId){
  10980. let params = {
  10981. cid: this.aiId,
  10982. };
  10983. this.ajax
  10984. .get(this.$store.state.api + "select_course_detail", params)
  10985. .then((res) => {
  10986. let _unitJson = JSON.parse(res.data[0][0].chapters);
  10987. let fileInfo = []
  10988. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  10989. for(var i = 0; i < _unitJson.length; i++){
  10990. let tasks = _unitJson[i].chapterInfo[0].taskJson
  10991. for(var j = 0; j < tasks.length; j++){
  10992. let _infoData = tasks[j].chapterData.filter(el => {
  10993. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  10994. })
  10995. if(_infoData.length){
  10996. fileInfo = [...fileInfo, ..._infoData]
  10997. }
  10998. }
  10999. }
  11000. this.infoData = fileInfo
  11001. this.$forceUpdate();
  11002. this.courseName = res.data[0][0].title;
  11003. this.courseText = res.data[0][0].brief;
  11004. this.courseText2 = res.data[0][0].reBrief;
  11005. this.cover = JSON.parse(res.data[0][0].cover);
  11006. this.noneBtnImg = this.cover.length >= 1;
  11007. this.checkboxList2 = res.data[0][0].juri
  11008. ? res.data[0][0].juri.split(",")
  11009. : [];
  11010. this.inviteCode = [];
  11011. for (var i = 0; i < res.data[2].length; i++) {
  11012. this.inviteCode.push({
  11013. cid: res.data[2][i].classid,
  11014. ic: res.data[2][i].code,
  11015. });
  11016. }
  11017. this.checkboxList3 = res.data[0][0].course_teacher
  11018. ? res.data[0][0].course_teacher.split(",")
  11019. : [];
  11020. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  11021. this.myWord = res.data[0][0].template;
  11022. this.templateC.id = "123";
  11023. this.courseTypeId = [];
  11024. for (var i = 0; i < res.data[1].length; i++) {
  11025. this.courseTypeId.push(res.data[1][i].typeid);
  11026. }
  11027. console.log(this.courseTypeId);
  11028. this.setMan();
  11029. this.unitJson[
  11030. this.unitIndex
  11031. ].chapterInfo[0].taskJson[0].toolOpen = true;
  11032. this.$forceUpdate();
  11033. setTimeout(() => {
  11034. this.checkEva(this.evalua);
  11035. setTimeout(() => {
  11036. this.checkEva(this.evalua);
  11037. }, 100);
  11038. }, 100);
  11039. })
  11040. .catch((err) => {
  11041. console.error(err);
  11042. });
  11043. }
  11044. // if(this.cidType != 1 && this.templateid == ''){
  11045. // this.promptShow = true
  11046. // }
  11047. },
  11048. seleteCourseUpdate() {
  11049. let params = {
  11050. cid: this.cid,
  11051. };
  11052. this.ajax
  11053. .get(this.$store.state.api + "select_course_detail", params)
  11054. .then((res) => {
  11055. // console.log(this.unitJson);
  11056. let unitJson = JSON.parse(res.data[0][0].chapters);
  11057. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  11058. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  11059. let _unitJson = [];
  11060. let _chapAarry = [];
  11061. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  11062. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  11063. let index = 1;
  11064. let chapindex;
  11065. if (_unitJson2.length > unitJson.length) {
  11066. for (let c = 0; c < _unitJson2.length; c++) {
  11067. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  11068. }
  11069. for (let j = 0; j < unitJson.length; j++) {
  11070. let count = 0;
  11071. for (let k = 0; k < _unitJson2.length; k++) {
  11072. if (
  11073. unitJson[j].chapterInfo[0].chapterid ==
  11074. _unitJson2[k].chapterInfo[0].chapterid
  11075. ) {
  11076. count++;
  11077. _chapAarry.splice(
  11078. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  11079. 1
  11080. );
  11081. _unitJson.push(unitJson[j]);
  11082. break;
  11083. }
  11084. }
  11085. // if(count === 0){
  11086. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  11087. // }
  11088. }
  11089. for (let k = 0; k < _unitJson2.length; k++) {
  11090. if (_unitJson2[k].isUpdate == 1) {
  11091. _chapAarry.splice(
  11092. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  11093. 1
  11094. );
  11095. _unitJson.push(_unitJson2[k]);
  11096. }
  11097. }
  11098. console.log(_chapAarry);
  11099. for (let d = 0; d < _unitJson2.length; d++) {
  11100. if (
  11101. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  11102. ) {
  11103. if (_unitIndex == d) {
  11104. index = 2;
  11105. }
  11106. chapindex = d;
  11107. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  11108. }
  11109. }
  11110. } else {
  11111. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  11112. }
  11113. for (let i = 0; i < unitJson.length; i++) {
  11114. if (
  11115. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  11116. _unitJson[i].chapterInfo[0].chapterid !=
  11117. unitJson[i].chapterInfo[0].chapterid
  11118. ) {
  11119. if (i == _unitJson.length - 1) {
  11120. // this.unitIndex++
  11121. _unitIndex2++;
  11122. }
  11123. _unitJson.splice(i, 0, unitJson[i]);
  11124. } else if (i > _unitJson.length - 1) {
  11125. _unitJson.push(unitJson[i]);
  11126. } else if (
  11127. _unitJson[i].chapterInfo[0].chapterid ==
  11128. unitJson[i].chapterInfo[0].chapterid
  11129. ) {
  11130. _unitJson[i] = unitJson[i];
  11131. }
  11132. // if (i == _unitIndex) {
  11133. // continue;
  11134. // } else
  11135. }
  11136. if (_chapAarry.length && index != 2) {
  11137. if (chapindex < _unitIndex) {
  11138. this.isDelete = 2;
  11139. // this.unitIndex--;
  11140. _unitIndex2--;
  11141. } else if (
  11142. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  11143. _unitJson[_unitIndex].chapterInfo[0].chapterid
  11144. ) {
  11145. this.isDelete = 2;
  11146. for (let n = 0; n < _unitJson.length; n++) {
  11147. if (
  11148. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  11149. _unitJson[n].chapterInfo[0].chapterid
  11150. ) {
  11151. // this.unitIndex = n;
  11152. _unitIndex2 = n;
  11153. _unitJson[n] = _unitJson2[_unitIndex];
  11154. break;
  11155. }
  11156. }
  11157. }
  11158. } else if (index != 2) {
  11159. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  11160. _unitJson2[_unitIndex];
  11161. for (
  11162. var ci = 0;
  11163. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  11164. ci++
  11165. ) {
  11166. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  11167. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  11168. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  11169. .toolChoose
  11170. : [];
  11171. let _chapterData = [];
  11172. for (
  11173. var c = 0;
  11174. c <
  11175. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  11176. .length;
  11177. c++
  11178. ) {
  11179. if (
  11180. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  11181. .chapterData[c]
  11182. ) {
  11183. _chapterData.push(
  11184. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  11185. .chapterData[c]
  11186. );
  11187. }
  11188. }
  11189. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  11190. _chapterData;
  11191. }
  11192. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  11193. }
  11194. if (index == 1) {
  11195. this.unitJson = _unitJson;
  11196. this.$forceUpdate();
  11197. setTimeout(() => {
  11198. if (this.unitIndex != _unitIndex2) {
  11199. this.isDelete = 2;
  11200. this.unitIndex = _unitIndex2;
  11201. }
  11202. }, 0);
  11203. this.timer = setTimeout(() => {
  11204. this.seleteCourseUpdate();
  11205. }, 1000);
  11206. } else if (index == 2) {
  11207. let _this = this;
  11208. _this
  11209. .$confirm(
  11210. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  11211. "提示",
  11212. {
  11213. confirmButtonText: "需要",
  11214. cancelButtonText: "取消",
  11215. type: "warning",
  11216. }
  11217. )
  11218. .then(() => {
  11219. if (_this.time()) {
  11220. _this.restoreWork(
  11221. _chapAarry[0],
  11222. _unitJson,
  11223. chapindex,
  11224. _unitJson2,
  11225. _unitIndex2
  11226. );
  11227. }
  11228. })
  11229. .catch(() => {
  11230. _this.unitJson = _unitJson;
  11231. _this.$forceUpdate();
  11232. setTimeout(() => {
  11233. if (this.unitIndex != _unitIndex2) {
  11234. this.isDelete = 2;
  11235. this.unitIndex = _unitIndex2;
  11236. }
  11237. }, 0);
  11238. _this.timer = setTimeout(() => {
  11239. _this.seleteCourseUpdate();
  11240. }, 1000);
  11241. });
  11242. }
  11243. // 在复制操作之前记录滚动位置
  11244. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  11245. // 执行复制操作
  11246. // 复制操作完成后恢复滚动位置
  11247. this.$nextTick(() => {
  11248. if (this.$refs.scrollContainer) {
  11249. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  11250. }
  11251. });
  11252. })
  11253. .catch((err) => {
  11254. console.error(err);
  11255. });
  11256. },
  11257. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  11258. let params = [
  11259. {
  11260. cid: this.cid,
  11261. chapters: JSON.stringify(this.unitJson),
  11262. uid: this.userid,
  11263. chapid: chapid,
  11264. },
  11265. ];
  11266. this.ajax
  11267. .post(this.$store.state.api + "restoreWork", params)
  11268. .then((res) => {
  11269. this.$message({
  11270. message: "恢复成功",
  11271. type: "success",
  11272. });
  11273. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  11274. this.unitJson = unitJson;
  11275. this.$forceUpdate();
  11276. setTimeout(() => {
  11277. if (this.unitIndex != unitIndex2) {
  11278. this.isDelete = 2;
  11279. this.unitIndex = unitIndex2;
  11280. }
  11281. }, 0);
  11282. this.timer = setTimeout(() => {
  11283. this.seleteCourseUpdate();
  11284. }, 1000);
  11285. })
  11286. .catch((err) => {
  11287. this.$message.error("网络不佳");
  11288. console.error(err);
  11289. });
  11290. },
  11291. getTypeName() {
  11292. console.log(this.courseTypeId);
  11293. this.$forceUpdate();
  11294. },
  11295. selectAllType() {
  11296. let params = {
  11297. org: this.org && this.org != "" ? this.org : "",
  11298. oid: this.oid && this.oid != "" ? this.oid : "",
  11299. stand: "cn"
  11300. };
  11301. this.ajax
  11302. .get(this.$store.state.api + "selectAllTypeStand", params)
  11303. .then((res) => {
  11304. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  11305. res.data[0] = [...res.data[0], ...res.data[4]];
  11306. }
  11307. this.CourseType = res.data;
  11308. this.CourseType2 = [
  11309. { name: "智见课程", id: [] },
  11310. { name: "智行课程", id: [] },
  11311. { name: "智创课程", id: [] },
  11312. ];
  11313. for (var cti = 0; cti < res.data[0].length; cti++) {
  11314. if (
  11315. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  11316. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  11317. ) {
  11318. this.CourseType2[0].id.push(res.data[0][cti].id);
  11319. } else if (
  11320. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  11321. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  11322. ) {
  11323. this.CourseType2[1].id.push(res.data[0][cti].id);
  11324. } else if (
  11325. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  11326. ) {
  11327. this.CourseType2[2].id.push(res.data[0][cti].id);
  11328. }
  11329. if (
  11330. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  11331. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  11332. ) {
  11333. res.data[0][cti].name = "年级";
  11334. } else if (
  11335. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  11336. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  11337. ) {
  11338. res.data[0][cti].name = "学科";
  11339. } else if (
  11340. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  11341. ) {
  11342. res.data[0][cti].name = "主题";
  11343. }
  11344. }
  11345. let _courseTypeId = [];
  11346. for (var i = 0; i < res.data[0].length; i++) {
  11347. if (!this.cid) {
  11348. this.courseTypeId[res.data[0][i].id] = [];
  11349. }
  11350. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  11351. // }
  11352. this.CourseTypeJson[res.data[0][i].id] = [];
  11353. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  11354. if (res.data[0][i].name == "栏目") {
  11355. this.CourseType[0][i].name = "主题";
  11356. }
  11357. }
  11358. if (res.data[2].length == 0 && res.data[3].length == 0) {
  11359. for (var j = 0; j < res.data[1].length; j++) {
  11360. if (
  11361. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  11362. _courseTypeId.indexOf(res.data[1][j].id) == -1
  11363. ) {
  11364. _courseTypeId.push(res.data[1][j].id);
  11365. }
  11366. if (res.data[0][i].id == res.data[1][j].pid) {
  11367. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  11368. }
  11369. }
  11370. } else {
  11371. if (res.data[2].length > 0) {
  11372. for (var j = 0; j < res.data[2].length; j++) {
  11373. if (
  11374. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  11375. _courseTypeId.indexOf(res.data[2][j].id) == -1
  11376. ) {
  11377. _courseTypeId.push(res.data[2][j].id);
  11378. }
  11379. if (res.data[0][i].id == res.data[2][j].pid) {
  11380. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  11381. }
  11382. }
  11383. }
  11384. if (res.data[3].length > 0) {
  11385. for (var j = 0; j < res.data[3].length; j++) {
  11386. if (
  11387. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  11388. _courseTypeId.indexOf(res.data[3][j].id) == -1
  11389. ) {
  11390. _courseTypeId.push(res.data[3][j].id);
  11391. }
  11392. if (res.data[0][i].id == res.data[3][j].pid) {
  11393. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  11394. }
  11395. }
  11396. }
  11397. }
  11398. }
  11399. this.courseTypeId = _courseTypeId;
  11400. })
  11401. .catch((err) => {
  11402. console.error(err);
  11403. });
  11404. },
  11405. selectType() {
  11406. this.ajax
  11407. .get(this.$store.state.api + "selectType")
  11408. .then((res) => {
  11409. this.CourseType = res.data;
  11410. for (var i = 0; i < res.data[0].length; i++) {
  11411. if (!this.cid) {
  11412. this.courseTypeId[res.data[0][i].id] = "";
  11413. }
  11414. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  11415. if (res.data[0][i].name == "栏目") {
  11416. this.CourseType[0][i].name = "主题";
  11417. }
  11418. }
  11419. for (var j = 0; j < res.data[1].length; j++) {
  11420. if (res.data[0][i].id == res.data[1][j].pid) {
  11421. if (!this.CourseTypeJson[res.data[0][i].id]) {
  11422. this.CourseTypeJson[res.data[0][i].id] = [];
  11423. }
  11424. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  11425. }
  11426. }
  11427. }
  11428. this.selectTypeByOid();
  11429. this.selectTypeByOrg();
  11430. })
  11431. .catch((err) => {
  11432. console.error(err);
  11433. });
  11434. },
  11435. selectTypeByOid() {
  11436. let params = {
  11437. oid: this.oid,
  11438. };
  11439. this.ajax
  11440. .get(this.$store.state.api + "selectTypeByOid", params)
  11441. .then((res) => {
  11442. for (var i = 0; i < res.data[0].length; i++) {
  11443. for (var j = 0; j < res.data[1].length; j++) {
  11444. if (res.data[0][i].id == res.data[1][j].pid) {
  11445. if (!this.CourseTypeJson[res.data[0][i].id]) {
  11446. this.CourseTypeJson[res.data[0][i].id] = [];
  11447. }
  11448. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  11449. }
  11450. }
  11451. }
  11452. })
  11453. .catch((err) => {
  11454. console.error(err);
  11455. });
  11456. },
  11457. selectTypeByOrg() {
  11458. let params = {
  11459. oid: this.org,
  11460. };
  11461. this.ajax
  11462. .get(this.$store.state.api + "selectTypeByOrg", params)
  11463. .then((res) => {
  11464. for (var i = 0; i < res.data[0].length; i++) {
  11465. for (var j = 0; j < res.data[1].length; j++) {
  11466. if (res.data[0][i].id == res.data[1][j].pid) {
  11467. if (!this.CourseTypeJson[res.data[0][i].id]) {
  11468. this.CourseTypeJson[res.data[0][i].id] = [];
  11469. }
  11470. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  11471. }
  11472. }
  11473. }
  11474. this.$forceUpdate();
  11475. })
  11476. .catch((err) => {
  11477. console.error(err);
  11478. });
  11479. },
  11480. OtherMb(type, task) {
  11481. if (task === 0 || task) {
  11482. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11483. task
  11484. ].isEvaFold = true;
  11485. }
  11486. this.typeMode = type;
  11487. setTimeout(() => {
  11488. this.checkEva(this.checkId);
  11489. setTimeout(() => {
  11490. this.checkEva(this.checkId);
  11491. }, 100);
  11492. }, 100);
  11493. },
  11494. openMember() {
  11495. this.searchTN = "";
  11496. this.getTeacher();
  11497. this.dialogVisibleMember = true;
  11498. },
  11499. checkEva(id, type) {
  11500. this.dialogVisiblemb = false;
  11501. this.selectEva();
  11502. if (this.evalua != id && type == 2) {
  11503. this.$message.success("导入成功");
  11504. setTimeout(() => {
  11505. this.checkEva(id);
  11506. }, 100);
  11507. }
  11508. this.evalua = id;
  11509. this.checkId = id;
  11510. if (this.evalua != "") {
  11511. for (var i = 0; i < this.evaJuri.length; i++) {
  11512. if (this.evalua == this.evaJuri[i].id) {
  11513. this.eTitle = this.evaJuri[i].title;
  11514. this.eJson = JSON.parse(this.evaJuri[i].content);
  11515. }
  11516. }
  11517. this.data.data = [];
  11518. this.$forceUpdate();
  11519. setTimeout(() => {
  11520. this.setMindData();
  11521. }, 1000);
  11522. }
  11523. },
  11524. deleteEva() {
  11525. let _this = this;
  11526. if (_this.evalua == "") {
  11527. this.$message.warning("内容已经清空了,请勿重复清空");
  11528. return;
  11529. }
  11530. _this
  11531. .$confirm("确定删除此目标吗?", "提示", {
  11532. confirmButtonText: "确定",
  11533. cancelButtonText: "取消",
  11534. type: "warning",
  11535. })
  11536. .then(() => {
  11537. _this.evalua = "";
  11538. _this.checkId = "";
  11539. _this.eTitle = "";
  11540. let _unitJson = _this.unitJson;
  11541. for (var i = 0; i < _unitJson.length; i++) {
  11542. let _task = _unitJson[i].chapterInfo[0].taskJson;
  11543. for (var j = 0; j < _task.length; j++) {
  11544. let _eList = _task[j].eList;
  11545. for (var k = 0; k < _eList.length; k++) {
  11546. delete _eList[k].target;
  11547. }
  11548. }
  11549. }
  11550. _this.$forceUpdate();
  11551. if (_this.cid) {
  11552. _this.updateWork();
  11553. }
  11554. })
  11555. .catch(() => {
  11556. return;
  11557. });
  11558. },
  11559. selectEva() {
  11560. let params = {
  11561. oid: this.oid,
  11562. };
  11563. this.ajax
  11564. .get(this.$store.state.api + "selectAllEvaluation", params)
  11565. .then((res) => {
  11566. this.evaJuri = res.data[0];
  11567. // 在复制操作之前记录滚动位置
  11568. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  11569. // 执行复制操作
  11570. // 复制操作完成后恢复滚动位置
  11571. this.$nextTick(() => {
  11572. if (this.$refs.scrollContainer) {
  11573. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  11574. }
  11575. });
  11576. })
  11577. .catch((err) => {
  11578. console.error(err);
  11579. });
  11580. },
  11581. setMindData() {
  11582. let targetArray = [];
  11583. this.data.data = [];
  11584. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  11585. let _eJson = Object.keys(this.eJson);
  11586. let _e = this.eJson;
  11587. for (let i = 0; i < _eJson.length; i++) {
  11588. let element = _e[_eJson[i]];
  11589. this.data.data.push({
  11590. id: element.id,
  11591. parentid: "root",
  11592. topic: element.name,
  11593. });
  11594. // targetArray.push({
  11595. // id: element.id,
  11596. // parentid: "root",
  11597. // name: element.name,
  11598. // });
  11599. targetArray.push({
  11600. value: element.name,
  11601. label: element.name,
  11602. children: [],
  11603. });
  11604. let _eJsonc = Object.keys(element.child);
  11605. let _e2 = element.child;
  11606. for (let j = 0; j < _eJsonc.length; j++) {
  11607. let _ec = _e2[_eJsonc[j]];
  11608. this.data.data.push({
  11609. id: _ec.id,
  11610. parentid: element.id,
  11611. topic: _ec.name,
  11612. });
  11613. // targetArray.push({
  11614. // id: _ec.id,
  11615. // parentid: element.id,
  11616. // name: _ec.name,
  11617. // });
  11618. targetArray[i].children.push({
  11619. value: _ec.name,
  11620. label: _ec.name,
  11621. children: [],
  11622. });
  11623. let _eJsonz = Object.keys(_ec.child);
  11624. let _e3 = _ec.child;
  11625. for (let z = 0; z < _eJsonz.length; z++) {
  11626. let _ez = _e3[_eJsonz[z]];
  11627. this.data.data.push({
  11628. id: _ez.id,
  11629. parentid: _ec.id,
  11630. topic: _ez.name,
  11631. });
  11632. // targetArray.push({
  11633. // id: _ez.id,
  11634. // parentid: _ec.id,
  11635. // name: _ez.name,
  11636. // });
  11637. targetArray[i].children[j].children.push({
  11638. value: _ez.name,
  11639. label: _ez.name,
  11640. });
  11641. }
  11642. }
  11643. }
  11644. this.targetArray = targetArray;
  11645. this.$forceUpdate();
  11646. },
  11647. /*添加评价 */
  11648. addEList(index, tIndex) {
  11649. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  11650. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  11651. value: "",
  11652. detail: "",
  11653. score: 5,
  11654. })
  11655. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  11656. { value: "", detail: "", score: 5 },
  11657. ]);
  11658. this.$forceUpdate();
  11659. },
  11660. openEList(index, tIndex) {
  11661. this.evaIndex = index;
  11662. this.evatIndex = tIndex;
  11663. this.evaBoxDialog = true;
  11664. },
  11665. addCET(index, tIndex) {
  11666. this.cetIndex = index;
  11667. this.cettIndex = tIndex;
  11668. this.selectAllType1();
  11669. },
  11670. addCETemplate() {
  11671. var array =
  11672. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  11673. .eList;
  11674. let params = [
  11675. {
  11676. uid: this.userid,
  11677. n: this.templateName,
  11678. json: JSON.stringify(array),
  11679. t: 1,
  11680. oid: this.oid,
  11681. },
  11682. ];
  11683. this.ajax
  11684. .post(this.$store.state.api + "addCETShare", params)
  11685. .then((res) => {
  11686. this.addTypeByCET(res.data[0][0].id);
  11687. })
  11688. .catch((err) => {
  11689. this.$message.error("网络不佳");
  11690. console.error(err);
  11691. });
  11692. },
  11693. addTypeByCET(id) {
  11694. if (this.setTypeJson.two == "") {
  11695. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  11696. return;
  11697. }
  11698. let params = {
  11699. cid: id,
  11700. };
  11701. this.ajax
  11702. .get(this.$store.state.api + "deleteCETLabel", params)
  11703. .then((res) => {
  11704. for (var i = 0; i < 2; i++) {
  11705. let tid = "";
  11706. if (i == 0) {
  11707. tid = this.setTypeJson.one;
  11708. } else {
  11709. tid = this.setTypeJson.two;
  11710. }
  11711. let params = [
  11712. {
  11713. cid: id,
  11714. tid: tid,
  11715. uid: this.userid,
  11716. },
  11717. ];
  11718. this.ajax
  11719. .post(this.$store.state.api + "addCETLabel", params)
  11720. .then((res) => {
  11721. this.$message({
  11722. message: "添加成功",
  11723. type: "success",
  11724. });
  11725. this.close();
  11726. })
  11727. .catch((err) => {
  11728. this.$message.error("网络不佳");
  11729. console.error(err);
  11730. });
  11731. }
  11732. })
  11733. .catch((err) => {
  11734. this.$message.error("网络不佳");
  11735. console.error(err);
  11736. });
  11737. },
  11738. updateEvaJson(array) {
  11739. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  11740. this.evatIndex
  11741. ].eList = array;
  11742. },
  11743. forceUpdate() {
  11744. this.$forceUpdate();
  11745. },
  11746. deletEList(index, tIndex, eIndex) {
  11747. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  11748. eIndex,
  11749. 1
  11750. );
  11751. this.$forceUpdate();
  11752. },
  11753. getChoosePic(t) {
  11754. this.chooseType = t;
  11755. this.getAllBanner();
  11756. },
  11757. getAllBanner() {
  11758. this.sysPicVisible = true;
  11759. let params = {
  11760. t: this.chooseType,
  11761. };
  11762. this.ajax
  11763. .get(this.$store.state.api + "selectAllBanner", params)
  11764. .then((res) => {
  11765. this.sysPic = res.data[0];
  11766. })
  11767. .catch((err) => {
  11768. console.error(err);
  11769. });
  11770. },
  11771. // getClass() {
  11772. // let params = {
  11773. // oid: this.oid,
  11774. // };
  11775. // this.ajax
  11776. // .get(this.$store.state.api + "selectClassBySchool", params)
  11777. // .then((res) => {
  11778. // this.classJuri = res.data[0];
  11779. // })
  11780. // .catch((err) => {
  11781. // console.error(err);
  11782. // });
  11783. // },
  11784. deleteSysPic() {
  11785. this.cover = [];
  11786. this.isSysPic = false;
  11787. this.isSysPic2 = false;
  11788. },
  11789. deleteSelectPic() {
  11790. this.selectJson.url = "";
  11791. },
  11792. setEListStar() {
  11793. this.$forceUpdate();
  11794. },
  11795. deletRateList(i) {
  11796. this.rateJson.splice(i, 1);
  11797. },
  11798. addRateList() {
  11799. this.rateJson.push({ detail: "", score: 5, value: "" });
  11800. },
  11801. addSt() {
  11802. this.sentenceList.push({
  11803. sentenceTitle: "",
  11804. addSentence: [],
  11805. rightAnswer: [],
  11806. });
  11807. },
  11808. addSen(i) {
  11809. if (!this.sentenceList[i].sentenceTitle) {
  11810. this.$message.error("请填写卡片内容!");
  11811. return;
  11812. }
  11813. if (this.sentenceList[i].sentenceTitle.length > 10) {
  11814. this.$message.error("卡片内容字数不能超过10位");
  11815. return;
  11816. }
  11817. if (
  11818. this.sentenceList[i].addSentence.indexOf(
  11819. this.sentenceList[i].sentenceTitle
  11820. ) !== -1
  11821. ) {
  11822. this.$message.error("不能添加重复的卡片内容!");
  11823. return;
  11824. }
  11825. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  11826. // this.isPushTitleList.push(this.sentenceTitle);
  11827. this.sentenceList[i].sentenceTitle = "";
  11828. },
  11829. setRightAnswer(s, i, j) {
  11830. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  11831. this.sentenceList[i].rightAnswer.push(s);
  11832. }
  11833. },
  11834. returnCard(r, i, j) {
  11835. this.sentenceList[i].rightAnswer.splice(j, 1);
  11836. },
  11837. addSentenceTool() {
  11838. for (var i = 0; i < this.sentenceList.length; i++) {
  11839. if (this.sentenceList[i].rightAnswer.length == 0) {
  11840. this.$message.error(`请将题目${i + 1}设置完整。`);
  11841. return;
  11842. }
  11843. if (
  11844. this.sentenceList[i].addSentence.length !=
  11845. this.sentenceList[i].rightAnswer.length
  11846. ) {
  11847. this.$message.error(`请将题目${i + 1}设置完整。`);
  11848. return;
  11849. }
  11850. }
  11851. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11852. this.taskCount
  11853. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  11854. this.sentenceList = [
  11855. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  11856. ];
  11857. this.dialogVisibleSentence = false;
  11858. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11859. // itemTaskIndex
  11860. // ].toolChoose[toolIndex].tool = [];
  11861. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11862. // itemTaskIndex
  11863. // ].toolChoose[toolIndex].tool.push(i);
  11864. if (
  11865. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11866. .toolChoose[this.toolIndex].tool != 47
  11867. ) {
  11868. this.addTools(47, this.taskCount, this.toolIndex);
  11869. }
  11870. },
  11871. addTableJson() {
  11872. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  11873. // this.$message.error("请将信息填写完整!");
  11874. // return;
  11875. // }
  11876. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11877. this.taskCount
  11878. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  11879. // this.tableJson = [{ text: "" }];
  11880. // this.dialogVisibleTable = false;
  11881. this.$message.success("上传成功");
  11882. if (
  11883. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11884. .toolChoose[this.toolIndex].tool != 48
  11885. ) {
  11886. this.addTools(48, this.taskCount, this.toolIndex);
  11887. }
  11888. },
  11889. addWordJson() {
  11890. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11891. this.taskCount
  11892. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  11893. // this.wordJson = [{ text: "" }];
  11894. // this.dialogVisibleWord = false;
  11895. this.$message.success("上传成功");
  11896. if (
  11897. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11898. .toolChoose[this.toolIndex].tool != 52
  11899. ) {
  11900. this.addTools(52, this.taskCount, this.toolIndex);
  11901. }
  11902. },
  11903. addMoreUpload() {
  11904. if (this.uploadJson.length == 0) {
  11905. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11906. this.taskCount
  11907. ].toolChoose[this.toolIndex].uploadJson = [];
  11908. } else {
  11909. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11910. this.taskCount
  11911. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  11912. }
  11913. this.uploadJson = [];
  11914. this.dialogVisibleMoreUpload = false;
  11915. if (
  11916. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11917. .toolChoose[this.toolIndex].tool != 50
  11918. ) {
  11919. this.addTools(50, this.taskCount, this.toolIndex);
  11920. }
  11921. },
  11922. addPreTime() {
  11923. if (this.preTime == 0) {
  11924. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11925. this.taskCount
  11926. ].toolChoose[this.toolIndex].preTime = 0;
  11927. } else {
  11928. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11929. this.taskCount
  11930. ].toolChoose[this.toolIndex].preTime = this.preTime;
  11931. }
  11932. this.preTime = 0;
  11933. this.dialogVisiblePreTime = false;
  11934. if (
  11935. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  11936. .toolChoose[this.toolIndex].tool != 10
  11937. ) {
  11938. this.addTools(10, this.taskCount, this.toolIndex);
  11939. }
  11940. },
  11941. goToTask(i) {
  11942. this.toolIndexType = "";
  11943. if (this.isClickColor == i + 1) {
  11944. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11945. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  11946. // } else {
  11947. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11948. i
  11949. ].toolOpen = true;
  11950. // }
  11951. this.$forceUpdate();
  11952. return;
  11953. }
  11954. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11955. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  11956. // } else {
  11957. document.querySelectorAll(".basic_box")[0].scrollTop =
  11958. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  11959. this.isClickColor = i + 1;
  11960. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  11961. // }
  11962. this.$forceUpdate();
  11963. },
  11964. taskOpen(i, stageIndex) {
  11965. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11966. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  11967. } else {
  11968. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  11969. }
  11970. this.updateWork3(stageIndex);
  11971. this.$forceUpdate();
  11972. },
  11973. goToTask2(i, stage) {
  11974. this.toolIndexType = "";
  11975. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  11976. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11977. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  11978. // } else {
  11979. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11980. i
  11981. ].toolOpen = true;
  11982. // }
  11983. this.$forceUpdate();
  11984. return;
  11985. }
  11986. if (this.unitIndex != stage) {
  11987. if (this.panUnitJson() == 2) {
  11988. return;
  11989. }
  11990. this.unitSet(stage);
  11991. }
  11992. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  11993. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  11994. // } else {
  11995. document.querySelectorAll(".basic_box")[0].scrollTop =
  11996. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  11997. this.isClickColor = i + 1;
  11998. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  11999. // }
  12000. this.$forceUpdate();
  12001. },
  12002. taskMove(type, index) {
  12003. this.$confirm(
  12004. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  12005. "提示",
  12006. {
  12007. confirmButtonText: "确定",
  12008. cancelButtonText: "取消",
  12009. type: "warning",
  12010. }
  12011. )
  12012. .then(() => {
  12013. if (type == 1) {
  12014. if (index > 0) {
  12015. let a = JSON.parse(
  12016. JSON.stringify(
  12017. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12018. index - 1
  12019. ]
  12020. )
  12021. );
  12022. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  12023. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  12024. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  12025. }
  12026. } else {
  12027. if (
  12028. index <
  12029. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  12030. ) {
  12031. let a = JSON.parse(
  12032. JSON.stringify(
  12033. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12034. index + 1
  12035. ]
  12036. )
  12037. );
  12038. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  12039. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  12040. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  12041. }
  12042. }
  12043. this.$forceUpdate();
  12044. })
  12045. .catch(() => {
  12046. return;
  12047. });
  12048. },
  12049. stageMove(type, index) {
  12050. if (type == 1) {
  12051. if (index > 0) {
  12052. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  12053. let acid = JSON.parse(
  12054. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  12055. );
  12056. let bcid = JSON.parse(
  12057. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  12058. );
  12059. this.unitJson3[index - 1] = this.unitJson3[index];
  12060. this.unitJson3[index] = a;
  12061. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  12062. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  12063. }
  12064. } else {
  12065. if (index < this.unitJson3.length - 1) {
  12066. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  12067. let acid = JSON.parse(
  12068. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  12069. );
  12070. let bcid = JSON.parse(
  12071. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  12072. );
  12073. this.unitJson3[index + 1] = this.unitJson3[index];
  12074. this.unitJson3[index] = a;
  12075. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  12076. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  12077. }
  12078. }
  12079. this.$forceUpdate();
  12080. },
  12081. addGroup(i) {
  12082. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  12083. this.groupJson.group.push({
  12084. name: "第" + (this.groupJson.group.length + 1) + "组",
  12085. });
  12086. },
  12087. deleteGroup(i) {
  12088. this.groupJson.group.splice(i, 1);
  12089. },
  12090. numberPan() {
  12091. if (
  12092. /[^\d]/.test(this.groupJson.number) ||
  12093. this.groupJson.number < 2 ||
  12094. this.groupJson.number > 10
  12095. ) {
  12096. this.$message.error("请输入2-10的数字");
  12097. this.groupJson.number = "";
  12098. }
  12099. },
  12100. numberPanJie() {
  12101. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  12102. this.$message.error('请输入大于1的数字')
  12103. this.courseJie = 1
  12104. }
  12105. },
  12106. numberPanTime() {
  12107. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  12108. this.$message.error('请输入大于1的数字')
  12109. this.courseTime = 1
  12110. }
  12111. },
  12112. addGroupJson() {
  12113. for (var i = 0; i < this.groupJson.group.length; i++) {
  12114. if (!this.groupJson.group[i].name) {
  12115. this.$message.error("请将信息填写完整!");
  12116. return;
  12117. }
  12118. }
  12119. if (!this.groupJson.number) {
  12120. this.$message.error("请将信息填写完整!");
  12121. return;
  12122. }
  12123. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12124. this.taskCount
  12125. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  12126. JSON.stringify(this.groupJson)
  12127. );
  12128. this.dialogVisibleGroup = false;
  12129. this.groupJson = {};
  12130. if (
  12131. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12132. .toolChoose[this.toolIndex].tool != 49
  12133. ) {
  12134. this.addTools(49, this.taskCount, this.toolIndex);
  12135. }
  12136. },
  12137. updateTime(preTime) {
  12138. this.preTime = preTime;
  12139. },
  12140. InviteChange(val) {
  12141. console.log(val);
  12142. let _check = [];
  12143. let _check2 = [];
  12144. for (var i = 0; i < this.grade2.length; i++) {
  12145. var gid = this.grade2[i].id;
  12146. _check.push(gid);
  12147. }
  12148. for (var i = 0; i < this.checkboxList2.length; i++) {
  12149. var _id = this.checkboxList2[i];
  12150. if (_check.indexOf(_id) !== -1) {
  12151. _check2.push(_id);
  12152. }
  12153. }
  12154. this.checkAll = _check2.length === _check.length;
  12155. return;
  12156. let array = JSON.parse(JSON.stringify(val));
  12157. this.inviteCode = this.inviteCode.filter((el) => {
  12158. if (val.indexOf(el.cid) != -1) {
  12159. array.splice(array.indexOf(el.cid), 1);
  12160. return el;
  12161. }
  12162. });
  12163. for (var i = 0; i < array.length; i++) {
  12164. this.getInviteCode(array[i]);
  12165. }
  12166. },
  12167. InviteChange2(val) {
  12168. console.log(val);
  12169. let _check = [];
  12170. let _check2 = [];
  12171. for (var i = 0; i < this.teacherJuri.length; i++) {
  12172. var gid = this.teacherJuri[i].userid;
  12173. _check.push(gid);
  12174. }
  12175. for (var i = 0; i < this.checkboxList3.length; i++) {
  12176. var _id = this.checkboxList3[i];
  12177. if (_check.indexOf(_id) !== -1) {
  12178. _check2.push(_id);
  12179. }
  12180. }
  12181. this.checkAll2 = _check2.length === _check.length;
  12182. this.setMan();
  12183. return;
  12184. let array = JSON.parse(JSON.stringify(val));
  12185. this.inviteCode = this.inviteCode.filter((el) => {
  12186. if (val.indexOf(el.cid) != -1) {
  12187. array.splice(array.indexOf(el.cid), 1);
  12188. return el;
  12189. }
  12190. });
  12191. for (var i = 0; i < array.length; i++) {
  12192. this.getInviteCode(array[i]);
  12193. }
  12194. },
  12195. handleCheckAllChange(val) {
  12196. if (val) {
  12197. for (var i = 0; i < this.grade2.length; i++) {
  12198. var gid = this.grade2[i].id;
  12199. if (this.checkboxList2.indexOf(gid) === -1) {
  12200. this.checkboxList2.push(gid);
  12201. }
  12202. }
  12203. } else {
  12204. let _check = [];
  12205. let _check2 = [];
  12206. for (var i = 0; i < this.grade2.length; i++) {
  12207. var gid = this.grade2[i].id;
  12208. _check.push(gid);
  12209. }
  12210. for (var i = 0; i < this.checkboxList2.length; i++) {
  12211. var _id = this.checkboxList2[i];
  12212. if (_check.indexOf(_id) === -1) {
  12213. _check2.push(_id);
  12214. }
  12215. }
  12216. this.checkboxList2 = _check2;
  12217. }
  12218. this.isIndeterminate = false;
  12219. },
  12220. handleCheckAllChange2(val) {
  12221. if (val) {
  12222. for (var i = 0; i < this.teacherJuri.length; i++) {
  12223. var gid = this.teacherJuri[i].userid;
  12224. if (this.checkboxList3.indexOf(gid) === -1) {
  12225. this.checkboxList3.push(gid);
  12226. }
  12227. }
  12228. } else {
  12229. let _check = [];
  12230. let _check2 = [];
  12231. for (var i = 0; i < this.teacherJuri.length; i++) {
  12232. var gid = this.teacherJuri[i].userid;
  12233. _check.push(gid);
  12234. }
  12235. for (var i = 0; i < this.checkboxList3.length; i++) {
  12236. var _id = this.checkboxList3[i];
  12237. if (_check.indexOf(_id) === -1) {
  12238. _check2.push(_id);
  12239. }
  12240. }
  12241. this.checkboxList3 = _check2;
  12242. }
  12243. this.isIndeterminate2 = false;
  12244. },
  12245. async getInviteCode(cid) {
  12246. let code = this.randomNumber();
  12247. let params = {
  12248. code: code,
  12249. oid: this.oid,
  12250. };
  12251. let type = 1;
  12252. for (var i = 0; i < this.inviteCode.length; i++) {
  12253. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  12254. type = 2;
  12255. }
  12256. }
  12257. if (type == 2) {
  12258. this.getInviteCode(cid);
  12259. return;
  12260. }
  12261. const res = await this.ajax.get(
  12262. this.$store.state.api + "selectInviteCode2",
  12263. params
  12264. );
  12265. if (
  12266. res.data.length &&
  12267. res.data[0].length &&
  12268. res.data[0][0].courseId != this.cid
  12269. ) {
  12270. this.getInviteCode(cid);
  12271. return;
  12272. }
  12273. let array = [];
  12274. for (var i = 0; i < this.inviteCode.length; i++) {
  12275. array.push(this.inviteCode[i].cid);
  12276. }
  12277. if (array.indexOf(cid) != -1) {
  12278. this.inviteCode[array.indexOf(cid)].ic = code;
  12279. } else {
  12280. this.inviteCode.push({ cid: cid, ic: code });
  12281. }
  12282. },
  12283. OpenInviteD(cid) {
  12284. let array = [];
  12285. this.icode = "";
  12286. for (var i = 0; i < this.inviteCode.length; i++) {
  12287. array.push(this.inviteCode[i].cid);
  12288. }
  12289. if (array.indexOf(cid) != -1) {
  12290. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  12291. }
  12292. this.inviteId = cid;
  12293. this.dialogVisibleInvite = true;
  12294. },
  12295. addInvite() {
  12296. let reg = /^[A-Za-z0-9]{4,}$/;
  12297. if (!reg.test(this.icode)) {
  12298. this.$message.error("请输入至少四位数字或英文组合的随机码");
  12299. return;
  12300. }
  12301. let type = 1;
  12302. for (var i = 0; i < this.inviteCode.length; i++) {
  12303. if (
  12304. this.inviteCode[i].cid != this.inviteId &&
  12305. this.icode == this.inviteCode[i].ic
  12306. ) {
  12307. type = 2;
  12308. }
  12309. }
  12310. if (type == 2) {
  12311. this.$message.error("已有此随机码,不能重复");
  12312. return;
  12313. }
  12314. let params = {
  12315. code: this.icode,
  12316. oid: this.oid,
  12317. };
  12318. this.ajax
  12319. .get(this.$store.state.api + "selectInviteCode", params)
  12320. .then((res) => {
  12321. if (
  12322. res.data.length &&
  12323. res.data[0].length &&
  12324. res.data[0][0].courseId != this.cid
  12325. ) {
  12326. this.$message.error("已有此随机码,不能重复");
  12327. return;
  12328. }
  12329. let array = [];
  12330. for (var i = 0; i < this.inviteCode.length; i++) {
  12331. array.push(this.inviteCode[i].cid);
  12332. }
  12333. if (array.indexOf(this.inviteId) != -1) {
  12334. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  12335. } else {
  12336. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  12337. }
  12338. this.icode = "";
  12339. this.dialogVisibleInvite = false;
  12340. })
  12341. .catch((err) => {
  12342. console.error(err);
  12343. });
  12344. },
  12345. randomNumber() {
  12346. // 随机生成两位数
  12347. // let num = Math.floor(Math.random() * 900) + 100;
  12348. // 生成 0 到 99 之间的随机整数
  12349. const randomNumber = Math.floor(Math.random() * 100);
  12350. // 如果随机数小于 10,补上前导零
  12351. const num =
  12352. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  12353. // 随机生成两个大写字母
  12354. let letters = "";
  12355. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  12356. for (let i = 0; i < 3; i++) {
  12357. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  12358. }
  12359. // 随机生成两位数字和字母的组合
  12360. let mix = "";
  12361. let chars =
  12362. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  12363. for (let i = 0; i < 3; i++) {
  12364. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  12365. mix += char;
  12366. }
  12367. // 随机选择一种类型
  12368. let type = Math.floor(Math.random() * 3);
  12369. return num;
  12370. // 根据类型输出结果
  12371. switch (type) {
  12372. case 0:
  12373. console.log(num); // 输出两位数
  12374. return num;
  12375. case 1:
  12376. console.log(letters); // 输出两个大写字母
  12377. return letters;
  12378. case 2:
  12379. console.log(mix); // 输出两位数字和字母的组合
  12380. return mix;
  12381. }
  12382. },
  12383. getPaste() {
  12384. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12385. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12386. if (!iframe && !iframe2) {
  12387. return;
  12388. }
  12389. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12390. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12391. if (copyData && copyData.stageData && copyData.stageData.length) {
  12392. this.isPasteStage = true;
  12393. }
  12394. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  12395. this.isPasteStage = true;
  12396. }
  12397. if (copyData && copyData.selectData.length) {
  12398. this.isPasteChoice = true;
  12399. }
  12400. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  12401. this.isPasteTask = true;
  12402. }
  12403. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  12404. this.isPasteTask = true;
  12405. }
  12406. },
  12407. setCover() {
  12408. var _this = this;
  12409. if(_this.cover.length){
  12410. return;
  12411. }
  12412. _this.imageloading2 = true
  12413. _this.ajax
  12414. .post("https://gpt.cocorobo.cn/search_image", {
  12415. page: _this.ppage,
  12416. pagesize: 9,
  12417. query: _this.courseName,
  12418. })
  12419. .then(function (response) {
  12420. // console.log(response.data.data);
  12421. var data = response.data.FunctionResponse.result;
  12422. _this.cover = [];
  12423.       setTimeout(() => {
  12424.         _this.cover[0] = {
  12425.           name: "网络图片.png",
  12426.           url: data[0].thumbnail
  12427.         };
  12428.         _this.imgChange1(null, null, 1, null);
  12429.         _this.$forceUpdate();
  12430.       }, 0);
  12431. _this.imageloading2 = false
  12432. })
  12433. .catch(function (error) {
  12434. _this.imageloading2 = false
  12435. console.log(error);
  12436. });
  12437. },
  12438. searchImage() {
  12439. var _this = this;
  12440. _this.imageList = [];
  12441. if (!_this.searchImageValue) {
  12442. _this.sysPicVisible2 = true;
  12443. return;
  12444. }
  12445. _this.imageloading = true;
  12446. _this.ajax
  12447. .post("https://gpt.cocorobo.cn/search_image", {
  12448. page: _this.ppage,
  12449. pagesize: 9,
  12450. query: _this.searchImageValue,
  12451. })
  12452. .then(function (response) {
  12453. // console.log(response.data.data);
  12454. var data = response.data.FunctionResponse.result;
  12455. for (var i = 0; i < data.length; i++) {
  12456. _this.imageList.push({ url: data[i].thumbnail });
  12457. }
  12458. _this.imageloading = false;
  12459. })
  12460. .catch(function (error) {
  12461. console.log(error);
  12462. });
  12463. _this.sysPicVisible2 = true;
  12464. },
  12465. changePicture() {
  12466. this.ppage++;
  12467. this.searchImage();
  12468. },
  12469. resetImage() {
  12470. this.ppage = 1;
  12471. this.searchImage();
  12472. },
  12473. jumpGj(i, j) {
  12474. if (i + 1 != this.isClickColor) {
  12475. this.isClickColor = i + 1;
  12476. }
  12477. var a = document.scrollingElement;
  12478. this.toolIndexType = `gj${i}${j}`;
  12479. let target = document.querySelector(`#gj${i}${j}`);
  12480. if (target) {
  12481. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  12482. setTimeout(() => {
  12483. target.scrollIntoView(true);
  12484. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12485. j
  12486. ].isFold3 = false;
  12487. setTimeout(() => {
  12488. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  12489. }, 0);
  12490. }, 0);
  12491. }
  12492. },
  12493. jumpGj2(i, j, k) {
  12494. if (this.unitIndex != k) {
  12495. if (this.panUnitJson() == 2) {
  12496. return;
  12497. }
  12498. this.unitSet(k);
  12499. }
  12500. setTimeout(() => {
  12501. if (i + 1 != this.isClickColor) {
  12502. this.isClickColor = i + 1;
  12503. }
  12504. var a = document.scrollingElement;
  12505. this.toolIndexType = `gj${i}${j}${k}`;
  12506. let target = document.querySelector(`#gj${i}${j}`);
  12507. if (target) {
  12508. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  12509. setTimeout(() => {
  12510. target.scrollIntoView(true);
  12511. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  12512. j
  12513. ].isFold3 = false;
  12514. setTimeout(() => {
  12515. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  12516. }, 0);
  12517. }, 0);
  12518. }
  12519. }, 0);
  12520. },
  12521. dragStart(val, i, j) {
  12522. console.log(this.taskCount);
  12523. this.dragType = "drag";
  12524. this.taskCount = j;
  12525. this.oldIndex = i;
  12526. this.oldData = val;
  12527. },
  12528. dragOver(i, j) {
  12529. this.typeIndex = "chapter-" + j + "-" + i;
  12530. this.newIndex = i;
  12531. },
  12532. dragEnd() {
  12533. if (this.dragType != "drag") {
  12534. this.typeIndex = "";
  12535. this.newIndex = "";
  12536. this.dragType = "";
  12537. this.isdrag = "";
  12538. return;
  12539. }
  12540. console.log(this.taskCount);
  12541. let newItems = [
  12542. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12543. .chapterData,
  12544. ];
  12545. // 删除老的节点
  12546. newItems.splice(this.oldIndex, 1);
  12547. // 在列表中目标位置增加新的节点
  12548. newItems.splice(this.newIndex, 0, this.oldData);
  12549. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12550. this.taskCount
  12551. ].chapterData = [...newItems];
  12552. this.typeIndex = "";
  12553. this.newIndex = "";
  12554. this.dragType = "";
  12555. this.isdrag = "";
  12556. this.$forceUpdate();
  12557. },
  12558. dragTaskStart(val, i, j) {
  12559. this.dragType = "task";
  12560. this.oldIndex = i;
  12561. this.oldData = val;
  12562. this.oldUnitIndex = j;
  12563. },
  12564. dragTaskOver(i, j) {
  12565. this.typeIndex = "task-" + i;
  12566. this.newIndex = i;
  12567. this.checkUnitIndex = j;
  12568. },
  12569. async dragTaskEnd() {
  12570. if (this.dragType != "task") {
  12571. this.newIndex = "";
  12572. this.dragType = "";
  12573. this.typeIndex = "";
  12574. this.checkUnitIndex = "";
  12575. this.isdrag = "";
  12576. return;
  12577. }
  12578. if (
  12579. this.newIndex == this.oldIndex &&
  12580. this.oldUnitIndex == this.checkUnitIndex
  12581. ) {
  12582. this.newIndex = "";
  12583. this.dragType = "";
  12584. this.typeIndex = "";
  12585. this.checkUnitIndex = "";
  12586. this.isdrag = "";
  12587. return;
  12588. }
  12589. let count1 = await this.getWorksCount(
  12590. 2,
  12591. this.checkUnitIndex,
  12592. this.newIndex,
  12593. 0
  12594. );
  12595. let count2 = await this.getWorksCount(
  12596. 2,
  12597. this.oldUnitIndex,
  12598. this.oldIndex,
  12599. 0
  12600. );
  12601. if (count1 > 0 || count2 > 0) {
  12602. this.$confirm(
  12603. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  12604. "提示",
  12605. {
  12606. confirmButtonText: "确定",
  12607. cancelButtonText: "取消",
  12608. type: "warning",
  12609. }
  12610. )
  12611. .then(() => {
  12612. if (this.oldUnitIndex != this.checkUnitIndex) {
  12613. let newItems = [
  12614. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  12615. ];
  12616. // 删除老的节点
  12617. newItems.splice(this.oldIndex, 1);
  12618. // 在列表中目标位置增加新的节点
  12619. let newItems2 = [
  12620. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  12621. ];
  12622. newItems2.splice(this.newIndex, 0, this.oldData);
  12623. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  12624. ...newItems,
  12625. ];
  12626. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  12627. ...newItems2,
  12628. ];
  12629. } else {
  12630. let newItems = [
  12631. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  12632. ];
  12633. let chapterData = []
  12634. if (this.oldIndex == 0) {
  12635. chapterData = newItems[this.oldIndex].chapterData
  12636. newItems[this.oldIndex].chapterData = []
  12637. } else if (this.newIndex == 0) {
  12638. chapterData = newItems[this.newIndex].chapterData
  12639. newItems[this.oldIndex].chapterData = []
  12640. }
  12641. // 删除老的节点
  12642. newItems.splice(this.oldIndex, 1);
  12643. // 在列表中目标位置增加新的节点
  12644. newItems.splice(this.newIndex, 0, this.oldData);
  12645. if (this.oldIndex == 0 || this.newIndex == 0) {
  12646. newItems[0].chapterData = chapterData
  12647. }
  12648. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  12649. ...newItems,
  12650. ];
  12651. }
  12652. this.typeIndex = "";
  12653. this.newIndex = "";
  12654. this.dragType = "";
  12655. this.checkUnitIndex = "";
  12656. this.isdrag = "";
  12657. this.updateWork();
  12658. this.$forceUpdate();
  12659. })
  12660. .catch(() => {
  12661. this.newIndex = "";
  12662. this.dragType = "";
  12663. this.typeIndex = "";
  12664. this.checkUnitIndex = "";
  12665. this.isdrag = "";
  12666. return;
  12667. });
  12668. } else {
  12669. if (this.oldUnitIndex != this.checkUnitIndex) {
  12670. let newItems = [
  12671. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  12672. ];
  12673. // 删除老的节点
  12674. newItems.splice(this.oldIndex, 1);
  12675. // 在列表中目标位置增加新的节点
  12676. let newItems2 = [
  12677. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  12678. ];
  12679. newItems2.splice(this.newIndex, 0, this.oldData);
  12680. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  12681. ...newItems,
  12682. ];
  12683. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  12684. ...newItems2,
  12685. ];
  12686. } else {
  12687. let newItems = [
  12688. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  12689. ];
  12690. let chapterData = []
  12691. if (this.oldIndex == 0) {
  12692. chapterData = newItems[this.oldIndex].chapterData
  12693. newItems[this.oldIndex].chapterData = []
  12694. } else if (this.newIndex == 0) {
  12695. chapterData = newItems[this.newIndex].chapterData
  12696. newItems[this.oldIndex].chapterData = []
  12697. }
  12698. // 删除老的节点
  12699. newItems.splice(this.oldIndex, 1);
  12700. // 在列表中目标位置增加新的节点
  12701. newItems.splice(this.newIndex, 0, this.oldData);
  12702. if (this.oldIndex == 0 || this.newIndex == 0) {
  12703. newItems[0].chapterData = chapterData
  12704. }
  12705. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  12706. ...newItems,
  12707. ];
  12708. }
  12709. this.typeIndex = "";
  12710. this.newIndex = "";
  12711. this.dragType = "";
  12712. this.checkUnitIndex = "";
  12713. this.isdrag = "";
  12714. this.updateWork();
  12715. this.$forceUpdate();
  12716. }
  12717. },
  12718. dragUnitStart(val, i) {
  12719. this.dragType = "Unit";
  12720. this.oldIndex = i;
  12721. this.oldData = val;
  12722. },
  12723. dragUnitOver(i) {
  12724. this.typeIndex = "Unit-" + i;
  12725. this.newIndex = i;
  12726. console.log(i, this.unitJson[i].toolOpen);
  12727. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  12728. this.unitJson[i].toolOpen = true;
  12729. this.updateWork();
  12730. this.$forceUpdate();
  12731. }
  12732. },
  12733. async dragUnitEnd() {
  12734. if (this.dragType != "Unit") {
  12735. this.newIndex = "";
  12736. this.dragType = "";
  12737. this.typeIndex = "";
  12738. this.isdrag = "";
  12739. return;
  12740. }
  12741. if (this.newIndex == this.oldIndex) {
  12742. this.newIndex = "";
  12743. this.dragType = "";
  12744. this.typeIndex = "";
  12745. this.isdrag = "";
  12746. return;
  12747. }
  12748. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  12749. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  12750. console.log(count1, count2);
  12751. if (count1 > 0 || count2 > 0) {
  12752. this.$confirm(
  12753. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  12754. "提示",
  12755. {
  12756. confirmButtonText: "确定",
  12757. cancelButtonText: "取消",
  12758. type: "warning",
  12759. }
  12760. )
  12761. .then(() => {
  12762. let newItems = [...this.unitJson];
  12763. // 删除老的节点
  12764. newItems.splice(this.oldIndex, 1);
  12765. // 在列表中目标位置增加新的节点
  12766. newItems.splice(this.newIndex, 0, this.oldData);
  12767. this.unitJson = [...newItems];
  12768. this.typeIndex = "";
  12769. this.newIndex = "";
  12770. this.dragType = "";
  12771. this.isdrag = "";
  12772. this.updateWork();
  12773. this.$forceUpdate();
  12774. })
  12775. .catch(() => {
  12776. this.newIndex = "";
  12777. this.dragType = "";
  12778. this.typeIndex = "";
  12779. this.isdrag = "";
  12780. return;
  12781. });
  12782. } else {
  12783. let newItems = [...this.unitJson];
  12784. // 删除老的节点
  12785. newItems.splice(this.oldIndex, 1);
  12786. // 在列表中目标位置增加新的节点
  12787. newItems.splice(this.newIndex, 0, this.oldData);
  12788. this.unitJson = [...newItems];
  12789. this.typeIndex = "";
  12790. this.newIndex = "";
  12791. this.dragType = "";
  12792. this.isdrag = "";
  12793. this.updateWork();
  12794. this.$forceUpdate();
  12795. }
  12796. },
  12797. getWorksCount(type, stage, task, tool) {
  12798. return new Promise((resolve, reject) => {
  12799. let params = [
  12800. {
  12801. cid: this.cid,
  12802. stage: stage,
  12803. task: task,
  12804. tool: tool,
  12805. type: type,
  12806. },
  12807. ];
  12808. this.ajax
  12809. .post(this.$store.state.api + "getCourseWorkCount", params)
  12810. .then((res) => {
  12811. let count = res.data[0][0].count;
  12812. resolve(count);
  12813. })
  12814. .catch((err) => {
  12815. resolve(0);
  12816. this.$message.error("网络不佳");
  12817. console.error(err);
  12818. });
  12819. });
  12820. },
  12821. getTwoType(id) {
  12822. this.twoJson = [];
  12823. var array = this.CourseTypeJson1[
  12824. "3f8eed32-aba9-11ee-b534-005056b86db5"
  12825. ].filter((e) => {
  12826. return e.ppid == id;
  12827. });
  12828. this.twoJson = array;
  12829. this.$forceUpdate();
  12830. },
  12831. ctype() {
  12832. this.oneJson =
  12833. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  12834. },
  12835. selectAllType1() {
  12836. this.CourseType1 = [];
  12837. this.CourseTypeJson1 = {};
  12838. this.courseTypeId1 = {};
  12839. this.$forceUpdate();
  12840. let params = {
  12841. org: this.org && this.org != "" ? this.org : "",
  12842. oid: this.oid && this.oid != "" ? this.oid : "",
  12843. };
  12844. this.ajax
  12845. .get(this.$store.state.api + "selectAllEvaType", params)
  12846. .then((res) => {
  12847. this.CourseType1 = res.data;
  12848. for (var i = 0; i < res.data[0].length; i++) {
  12849. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  12850. res.data[0][i].name = "一级分类";
  12851. } else if (
  12852. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  12853. ) {
  12854. res.data[0][i].name = "二级分类";
  12855. }
  12856. if (!this.cid) {
  12857. this.courseTypeId1[res.data[0][i].id] = [];
  12858. }
  12859. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  12860. this.CourseTypeJson1[res.data[0][i].id] = [];
  12861. }
  12862. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  12863. for (var j = 0; j < res.data[1].length; j++) {
  12864. if (res.data[0][i].id == res.data[1][j].pid) {
  12865. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  12866. }
  12867. }
  12868. // } else {
  12869. if (res.data[2].length > 0) {
  12870. for (var j = 0; j < res.data[2].length; j++) {
  12871. if (res.data[0][i].id == res.data[2][j].pid) {
  12872. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  12873. }
  12874. }
  12875. }
  12876. if (res.data[3].length > 0) {
  12877. for (var j = 0; j < res.data[3].length; j++) {
  12878. if (res.data[0][i].id == res.data[3][j].pid) {
  12879. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  12880. }
  12881. }
  12882. }
  12883. // }
  12884. }
  12885. this.ctype();
  12886. this.cetBoxDialog = true;
  12887. })
  12888. .catch((err) => {
  12889. console.error(err);
  12890. });
  12891. },
  12892. setAiJson(pan,string){
  12893. if(pan == 'aiTeacher2'){
  12894. this.aiJson['teacherDetail2'] = string
  12895. }else {
  12896. this.aiJson[pan] = string
  12897. }
  12898. this.$forceUpdate();
  12899. },
  12900. editTask3(index){
  12901. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  12902. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  12903. }else {
  12904. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  12905. }
  12906. this.$forceUpdate();
  12907. },
  12908. editCpote(index){
  12909. if(this.cpote[index]){
  12910. this.cpote[index] = false
  12911. }else {
  12912. this.cpote[index] = true
  12913. }
  12914. this.$forceUpdate();
  12915. },
  12916. openAiDialog(clickType, type, callback, index, tindex) {
  12917. // if(clickType == 1){
  12918. // return;
  12919. // }
  12920. if (this.courseName == "") {
  12921. this.$message.error("请补充填写课程名称");
  12922. return;
  12923. }
  12924. this.clickType = clickType
  12925. let sub = []
  12926. if (this.courseTypeId.length) {
  12927. for (var i = 0; i < this.courseTypeId.length; i++) {
  12928. let _sid = this.courseTypeId[i]
  12929. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12930. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  12931. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  12932. }
  12933. }
  12934. }
  12935. }
  12936. let mclass = []
  12937. if (this.courseTypeId.length) {
  12938. for (var i = 0; i < this.courseTypeId.length; i++) {
  12939. let _sid = this.courseTypeId[i]
  12940. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  12941. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  12942. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  12943. }
  12944. }
  12945. }
  12946. }
  12947. if (type == "aiDetail") {
  12948. if (this.ttextLoading) {
  12949. this.$message({
  12950. message: "请回答完毕后再次发送",
  12951. type: "warning"
  12952. });
  12953. return;
  12954. }
  12955. this.aitype = "aiDetail"
  12956. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  12957. this.aiText = this.aiJson.aiDetail
  12958. } else if (type == "aiOutline") {
  12959. this.aitype = "aiOutline"
  12960. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  12961. this.aiText = this.aiJson.aiOutline
  12962. } else if (type == "aiTask") {
  12963. this.aitype = "aiTask"
  12964. var _text = ""
  12965. for (var i = 0; i < this.teacherText.length; i++) {
  12966. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  12967. }
  12968. // this.aiText = `请根据${_text}。`
  12969. this.aiText = this.aiJson.aiTask
  12970. this.aiCallBack = callback
  12971. } else if (type == "aiDetail1") {
  12972. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  12973. this.$message({
  12974. message: "请回答完毕后再次发送",
  12975. type: "warning"
  12976. });
  12977. return;
  12978. }
  12979. this.aitype = "aiDetail1"
  12980. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  12981. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  12982. this.aiText = this.aiJson.aiDetail1
  12983. this.aiCallBack = callback
  12984. this.aiIndex = index
  12985. } else if (type == "aiDetail2") {
  12986. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  12987. this.$message({
  12988. message: "请回答完毕后再次发送",
  12989. type: "warning"
  12990. });
  12991. return;
  12992. }
  12993. this.aitype = "aiDetail2"
  12994. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  12995. this.aiText = this.aiJson.aiDetail2
  12996. this.aiCallBack = callback
  12997. this.aiIndex = index
  12998. } else if (type == "aiDetail3") {
  12999. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  13000. this.$message({
  13001. message: "请回答完毕后再次发送",
  13002. type: "warning"
  13003. });
  13004. return;
  13005. }
  13006. this.aitype = "aiDetail3"
  13007. this.aiText = this.aiJson.aiDetail3
  13008. this.aiIndex = index + '-' + tindex
  13009. } else if (type == "aiDetail4") {
  13010. var _text = ""
  13011. for (var i = 0; i < callback.length; i++) {
  13012. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  13013. }
  13014. this.aitype = "aiDetail4"
  13015. this.aiText = this.aiJson.aiDetail4
  13016. this.aiIndex = index
  13017. } else if (type == "aiTeacher") {
  13018. this.aitype = "aiTeacher"
  13019. var _text = ""
  13020. for (var i = 0; i < this.dArray.length; i++) {
  13021. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  13022. }
  13023. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  13024. this.aiText = this.aiJson.aiTeacher
  13025. this.aiCallBack = callback
  13026. } else if (type == "aiTeacher2") {
  13027. this.aitype = "aiTeacher2"
  13028. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13029. } else if (type == "teacherDetail") {
  13030. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  13031. this.$message({
  13032. message: "请回答完毕后再次发送",
  13033. type: "warning"
  13034. });
  13035. return;
  13036. }
  13037. this.aitype = "teacherDetail"
  13038. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  13039. this.aiText = this.aiJson.teacherDetail
  13040. this.aiCallBack = callback
  13041. this.aiIndex = index
  13042. } else if (type == "teacherDetail2") {
  13043. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  13044. this.$message({
  13045. message: "请回答完毕后再次发送",
  13046. type: "warning"
  13047. });
  13048. return;
  13049. }
  13050. this.aitype = "teacherDetail2"
  13051. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  13052. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13053. this.aiCallBack = callback
  13054. this.aiIndex = index
  13055. } else if (type == "aiCpote1") {
  13056. if (this.cpotetLoading.cpote1) {
  13057. this.$message({
  13058. message: "请回答完毕后再次发送",
  13059. type: "warning"
  13060. });
  13061. return;
  13062. }
  13063. this.aitype = "aiCpote1"
  13064. this.aiText = this.aiJson.cpote1
  13065. this.aiCallBack = callback
  13066. } else if (type == "aiCpote2") {
  13067. if (this.cpotetLoading.cpote2) {
  13068. this.$message({
  13069. message: "请回答完毕后再次发送",
  13070. type: "warning"
  13071. });
  13072. return;
  13073. }
  13074. this.aitype = "aiCpote2"
  13075. this.aiText = this.aiJson.cpote2
  13076. this.aiCallBack = callback
  13077. }
  13078. else if (type == "aiCpote3") {
  13079. if (this.cpotetLoading.cpote3) {
  13080. this.$message({
  13081. message: "请回答完毕后再次发送",
  13082. type: "warning"
  13083. });
  13084. return;
  13085. }
  13086. this.aitype = "aiCpote3"
  13087. this.aiText = this.aiJson.cpote3
  13088. this.aiCallBack = callback
  13089. } else if (type == "aiCpote4") {
  13090. if (this.cpotetLoading.cpote4) {
  13091. this.$message({
  13092. message: "请回答完毕后再次发送",
  13093. type: "warning"
  13094. });
  13095. return;
  13096. }
  13097. this.aitype = "aiCpote4"
  13098. this.aiText = this.aiJson.cpote4
  13099. this.aiCallBack = callback
  13100. }
  13101. this.dialogVisibleAiD = true
  13102. },
  13103. async aiConfirm(msg) {
  13104. let sub = []
  13105. if (this.courseTypeId.length) {
  13106. for (var i = 0; i < this.courseTypeId.length; i++) {
  13107. let _sid = this.courseTypeId[i]
  13108. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13109. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  13110. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  13111. }
  13112. }
  13113. }
  13114. }
  13115. let mclass = []
  13116. if (this.courseTypeId.length) {
  13117. for (var i = 0; i < this.courseTypeId.length; i++) {
  13118. let _sid = this.courseTypeId[i]
  13119. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13120. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  13121. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  13122. }
  13123. }
  13124. }
  13125. }
  13126. let url = []
  13127. if (this.infoData.length) {
  13128. for (var i = 0; i < this.infoData.length; i++) {
  13129. url.push(this.infoData[i].url)
  13130. }
  13131. }
  13132. if (this.aitype == "aiDetail") {
  13133. this.detailYou(msg)
  13134. } else if (this.aitype == "aiOutline") {
  13135. this.loading = true
  13136. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  13137. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  13138. let message = `NOTICE
  13139. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13140. 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.
  13141. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13142. Instruction: Based on the context, follow "Format example", write content.
  13143. # Context
  13144. ## 要求
  13145. ${msg} 以及##参考资料
  13146. ## 参考资料
  13147. 课程名字:${this.courseName}
  13148. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  13149. ${sub.length ? '学科:' + sub.join(",") : ''}
  13150. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13151. ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  13152. ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  13153. # Format example
  13154. [{"task": "任务名称1","detail": "任务设计和评价标准"},{"task": "任务名称2","detail": "任务设计和评价标准"}]`
  13155. this.aiGet2(message, () => {
  13156. this.loading = false
  13157. this.isOutline = true
  13158. })
  13159. } else if (this.aitype == "aiTask") {
  13160. var _text = ""
  13161. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  13162. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  13163. }
  13164. let message = `NOTICE
  13165. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13166. 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.
  13167. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13168. Instruction: Based on the context, follow "Format example", write content.
  13169. # Context
  13170. ## 要求
  13171. ${msg} 为**每个教学任务分别输出**以下内容。
  13172.  
  13173. ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  13174. ## 格式要求
  13175. 任务数量:${this.teacherText.length}个
  13176. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动
  13177. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  13178. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  13179. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  13180. ## 参考资料
  13181. 教学任务教案:${_text}
  13182.  
  13183. # Format example
  13184. [{"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":"工具描述"}]}]`
  13185. this.loading = true
  13186. this.aiGet3(message, this.aiCallBack)
  13187. } else if (this.aitype == "aiDetail1") {
  13188. this.aiDetail(msg, this.aiIndex)
  13189. } else if (this.aitype == "aiDetail2") {
  13190. this.aiDetail2(msg, this.aiIndex)
  13191. } else if (this.aitype == "aiDetail3") {
  13192. let _index = this.aiIndex.split('-')
  13193. this.aiDetail3(msg, _index[0], _index[1])
  13194. } else if (this.aitype == "aiDetail4") {
  13195. this.aiDetail4(msg, this.aiIndex)
  13196. } else if (this.aitype == "teacherDetail") {
  13197. this.aiDetail5(msg, this.aiIndex)
  13198. } else if (this.aitype == "teacherDetail2") {
  13199. this.aiDetail52(msg, this.aiIndex)
  13200. } else if (this.aitype == "aiCpote1") {
  13201. this.aiCpote(msg, this.aiCallBack)
  13202. } else if (this.aitype == "aiCpote2") {
  13203. this.aiCpote(msg, this.aiCallBack)
  13204. } else if (this.aitype == "aiCpote3") {
  13205. this.aiCpote(msg, this.aiCallBack)
  13206. } else if (this.aitype == "aiCpote4") {
  13207. this.aiCpote(msg, this.aiCallBack)
  13208. } else if (this.aitype == "aiTeacher") {
  13209. this.loading = true
  13210. var _text = ""
  13211. for (var i = 0; i < this.dArray.length; i++) {
  13212. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  13213. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  13214. let message = ` NOTICE
  13215. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13216. 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.
  13217. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13218. Instruction: Based on the context, follow "Format example", write content.
  13219. # Context
  13220. ## 要求
  13221. ${msg} 以及${this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" ? '##任务大纲' : '##目标层,##任务簇'}
  13222. ${this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 任务大纲\n'+_text : ''}
  13223. ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n## 任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  13224. ## Format example
  13225. [{"task": "任务名称1","detail": "教案输出为文本格式就行"},{"task": "任务名称2","detail": "教案输出为文本格式就行"}]`
  13226. this.aiGet4(message, () => {
  13227. this.loading = false
  13228. this.isOutline2 = true
  13229. })
  13230. } else if (this.aitype == "aiTeacher2"){
  13231. this.isOutline2 = true
  13232. setTimeout(()=>{
  13233. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  13234. this.aiDetail52(msg, i)
  13235. }
  13236. }, 0)
  13237. }
  13238. this.setAiJson(this.aitype, msg)
  13239. },
  13240. detailYou(message) {
  13241. this.textLoading = true
  13242. this.ttextLoading = true
  13243. let sub = []
  13244. if (this.courseTypeId.length) {
  13245. for (var i = 0; i < this.courseTypeId.length; i++) {
  13246. let _sid = this.courseTypeId[i]
  13247. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13248. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  13249. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  13250. }
  13251. }
  13252. }
  13253. }
  13254. let mclass = []
  13255. if (this.courseTypeId.length) {
  13256. for (var i = 0; i < this.courseTypeId.length; i++) {
  13257. let _sid = this.courseTypeId[i]
  13258. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13259. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  13260. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  13261. }
  13262. }
  13263. }
  13264. }
  13265. let url = []
  13266. if (this.infoData.length) {
  13267. for (var i = 0; i < this.infoData.length; i++) {
  13268. url.push(this.infoData[i].url)
  13269. }
  13270. }
  13271. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  13272. // --------
  13273. // ## 补充参考资料
  13274. // 补充资料:${url.join(",")}
  13275. // 补充描述:${this.courseText2} ##补充参考资料和
  13276. let msg = `
  13277. 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.
  13278. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13279. --------
  13280. ## 参考资料
  13281. 课程名字:${this.courseName}
  13282. ${sub.length ? '学科:' + sub.join(",") : ''}
  13283. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13284. ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  13285. ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  13286. --------
  13287. ## 要求
  13288. ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问题,最终作品,格式参考## Format example
  13289. --------
  13290. ## Format example
  13291. -课程简要描述:
  13292. -驱动性问题:**1个**驱动整个项目的问题
  13293. -最终作品:对应解决驱动性问题的作品,可个人可团队`
  13294. this.aiGet(msg)
  13295. },
  13296. setUnitJson() {
  13297. 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 }] }
  13298. this.$forceUpdate()
  13299. },
  13300. async aiGet(messages) {
  13301. let _this = this
  13302. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13303. if (_this.infoData.length) {
  13304. for (var i = 0; i < _this.infoData.length; i++) {
  13305. if(_this.infoData[i].fileid){
  13306. fileid.push(_this.infoData[i].fileid)
  13307. }else {
  13308. let _fileid = await _this.createFileid(_this.infoData[i].url)
  13309. if(_fileid){
  13310. _this.infoData[i].fileid = _fileid
  13311. _this.$forceUpdate();
  13312. fileid.push(_fileid)
  13313. }
  13314. }
  13315. }
  13316. }
  13317. let _uuid = uuidv4();
  13318. // let params = JSON.stringify({
  13319. // // "model": "Chat",
  13320. // model: 'gpt-3.5-turbo',
  13321. // temperature: 0,
  13322. // max_tokens: 4096,
  13323. // top_p: 1,
  13324. // frequency_penalty: 0,
  13325. // presence_penalty: 0,
  13326. // messages: [{
  13327. // content: messages,
  13328. // role: 'user'
  13329. // }],
  13330. // uid: _uuid,
  13331. // mind_map_question: "",
  13332. // })
  13333. let params = {
  13334. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  13335. message: [{"type":"text", "text":messages}],
  13336. session_name: _uuid,
  13337. userId: _this.userid,
  13338. uid: _uuid,
  13339. file_ids: fileid.length ? [...fileid] : '',
  13340. }
  13341. // let params = JSON.stringify({
  13342. // message: {
  13343. // anthropic_version: "bedrock-2023-05-31",
  13344. // max_tokens: 4096,
  13345. // temperature: 0,
  13346. // top_p: 1,
  13347. // messages: [{
  13348. // "role": "user",
  13349. // "content": messages
  13350. // }] ,
  13351. // },
  13352. // uid: _uuid,
  13353. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  13354. // });
  13355. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  13356. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  13357. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  13358. console.log(response);
  13359. // let data = response.data.FunctionResponse
  13360. // if (data.choices && data.choices.length && data.choices[0].message) {
  13361. // _this.courseText = data.choices[0].message.content
  13362. // }
  13363. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  13364. } else {
  13365. this.$message.warning(response.data.FunctionResponse.result);
  13366. }
  13367. }).catch(function (error) {
  13368. _this.textLoading = false
  13369. _this.ttextLoading = false
  13370. console.log(error);
  13371. });
  13372. await _this.aiGetgetAiContent(_uuid)
  13373. },
  13374. aiGetgetAiContent(_uid) {
  13375. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  13376. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  13377. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  13378. let _allText = "";
  13379. let _mdText = "";
  13380. _source.onmessage = _e => {
  13381. let _eData = JSON.parse(_e.data).content;
  13382. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  13383. //对话已经完成
  13384. _mdText = _mdText.replace("_", "");
  13385. _source.close();
  13386. this.courseText = _mdText;
  13387. this.textLoading = false
  13388. this.ttextLoading = false
  13389. return;
  13390. } else {
  13391. //对话还在继续
  13392. let _text = "";
  13393. _text = _eData.replaceAll("'", "");
  13394. if (_allText == "") {
  13395. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  13396. } else {
  13397. _allText += _text;
  13398. }
  13399. _mdText = _allText + "_";
  13400. _mdText = _mdText.replace(/\\n/g, "\n");
  13401. _mdText = _mdText.replace(/\\/g, "");
  13402. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  13403. //转化返回的回复流数据
  13404. this.courseText = _mdText;
  13405. this.textLoading = false
  13406. // 处理流数据
  13407. }
  13408. this.$forceUpdate();
  13409. };
  13410. },
  13411. async aiGet2(messages, callback) {
  13412. let _this = this
  13413. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13414. if (_this.infoData.length) {
  13415. for (var i = 0; i < _this.infoData.length; i++) {
  13416. if(_this.infoData[i].fileid){
  13417. fileid.push(_this.infoData[i].fileid)
  13418. }else {
  13419. let _fileid = await _this.createFileid(_this.infoData[i].url)
  13420. if(_fileid){
  13421. _this.infoData[i].fileid = _fileid
  13422. _this.$forceUpdate();
  13423. fileid.push(_fileid)
  13424. }
  13425. }
  13426. }
  13427. }
  13428. console.log('fileid=========',fileid)
  13429. // let params = JSON.stringify({
  13430. // // "model": "Chat",
  13431. // model: 'gpt-3.5-turbo',
  13432. // temperature: 0,
  13433. // max_tokens: 4096,
  13434. // top_p: 1,
  13435. // frequency_penalty: 0,
  13436. // presence_penalty: 0,
  13437. // messages: [{
  13438. // content: messages,
  13439. // role: 'user'
  13440. // }],
  13441. // stream: false,
  13442. // uid: this.userid,
  13443. // mind_map_question: "",
  13444. // })
  13445. // // let params = JSON.stringify({
  13446. // // message: {
  13447. // // anthropic_version: "bedrock-2023-05-31",
  13448. // // max_tokens: 4096,
  13449. // // temperature: 0,
  13450. // // top_p: 1,
  13451. // // messages: [{
  13452. // // content: messages,
  13453. // // role: 'user'
  13454. // // }], //
  13455. // // },
  13456. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  13457. // // });
  13458. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  13459. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  13460. // console.log(response);
  13461. // let data = response.data.FunctionResponse
  13462. // if (data.choices && data.choices.length && data.choices[0].message) {
  13463. // console.log(data.choices[0].message.content);
  13464. // let dArray = JSON.parse(data.choices[0].message.content)
  13465. // _this.dArray = dArray
  13466. // _this.unitJson[0].chapterInfo[0].taskJson = []
  13467. // for (var i = 0; i < dArray.length; i++) {
  13468. // let _task = dArray[i]
  13469. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  13470. // task: _task.task,
  13471. // taskDetail: "",
  13472. // taskDetail2: _task.detail,
  13473. // taskDetail3: "",
  13474. // chapterData: [],
  13475. // toolText: "",
  13476. // toolChoose: [
  13477. // {
  13478. // tool: [],
  13479. // toolDetail: "",
  13480. // toolType: 0,
  13481. // askCount: 1,
  13482. // askTitle: "",
  13483. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13484. // },
  13485. // ],
  13486. // isShowTools: false,
  13487. // askCount: 1,
  13488. // isFold: 2,
  13489. // askTitle: "",
  13490. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13491. // checkJson: [{ checkCount: [], checkPerent: [] }],
  13492. // homeworkList: [],
  13493. // })
  13494. // }
  13495. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  13496. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13497. // _this.$forceUpdate();
  13498. // }
  13499. // // if (data.result) {
  13500. // // console.log(data.result);
  13501. // // let dArray = JSON.parse(data.result)
  13502. // // _this.dArray = dArray
  13503. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  13504. // // for (var i = 0; i < dArray.length; i++) {
  13505. // // let _task = dArray[i]
  13506. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  13507. // // task: _task.task,
  13508. // // taskDetail: "",
  13509. // // taskDetail2: _task.detail,
  13510. // // taskDetail3: "",
  13511. // // chapterData: [],
  13512. // // toolText: "",
  13513. // // toolChoose: [
  13514. // // {
  13515. // // tool: [],
  13516. // // toolDetail: "",
  13517. // // toolType: 0,
  13518. // // askCount: 1,
  13519. // // askTitle: "",
  13520. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13521. // // },
  13522. // // ],
  13523. // // isShowTools: false,
  13524. // // askCount: 1,
  13525. // // isFold: 1,
  13526. // // askTitle: "",
  13527. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13528. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  13529. // // homeworkList: [],
  13530. // // })
  13531. // // }
  13532. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13533. // // _this.$forceUpdate();
  13534. // // }
  13535. // callback ? callback() : ''
  13536. // }).catch(function (error) {
  13537. // _this.loading = false
  13538. // console.log(error);
  13539. // });
  13540. let parm = {
  13541. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  13542. message: [{"type":"text", "text":messages}],
  13543. session_name: uuidv4(),
  13544. userId: this.userid,
  13545. file_ids: fileid.length ? [...fileid] : '',
  13546. }
  13547. this.ajax
  13548. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  13549. .then((response) => {
  13550. console.log(response);
  13551. let data = response.data.FunctionResponse
  13552. if (data.message) {
  13553. console.log(data.message);
  13554. let dArray = {}
  13555. try {
  13556. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  13557. } catch (error) {
  13558. console.log("error_________________" + error);
  13559. try {
  13560. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  13561. let match = data.message.match(regex);
  13562. dArray = JSON.parse(match[0]);
  13563. // var message = data.message;
  13564. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  13565. // var jsonEnd = message.indexOf("```", jsonStart);
  13566. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  13567. // dArray = JSON.parse(jsonString);
  13568. } catch (error) {
  13569. console.log("error_________________" + error);
  13570. }
  13571. }
  13572. _this.dArray = dArray
  13573. _this.unitJson[0].chapterInfo[0].taskJson = []
  13574. for (var i = 0; i < dArray.length; i++) {
  13575. let _task = dArray[i]
  13576. _this.unitJson[0].chapterInfo[0].taskJson.push({
  13577. task: _task.task,
  13578. taskDetail: "",
  13579. taskDetail2: _task.detail,
  13580. taskDetail3: "",
  13581. chapterData: [],
  13582. toolText: "",
  13583. toolChoose: [
  13584. {
  13585. tool: [],
  13586. toolDetail: "",
  13587. toolType: 0,
  13588. askCount: 1,
  13589. askTitle: "",
  13590. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13591. },
  13592. ],
  13593. isShowTools: false,
  13594. askCount: 1,
  13595. isFold: 2,
  13596. askTitle: "",
  13597. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13598. checkJson: [{ checkCount: [], checkPerent: [] }],
  13599. homeworkList: [],
  13600. })
  13601. }
  13602. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  13603. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13604. _this.$forceUpdate();
  13605. }
  13606. callback ? callback() : ''
  13607. })
  13608. .catch((error) => {
  13609. _this.loading = false
  13610. console.log(error);
  13611. });
  13612. },
  13613. async aiGet3(messages, callback) {
  13614. let _this = this
  13615. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13616. if (_this.infoData.length) {
  13617. for (var i = 0; i < _this.infoData.length; i++) {
  13618. if(_this.infoData[i].fileid){
  13619. fileid.push(_this.infoData[i].fileid)
  13620. }else {
  13621. let _fileid = await _this.createFileid(_this.infoData[i].url)
  13622. if(_fileid){
  13623. _this.infoData[i].fileid = _fileid
  13624. _this.$forceUpdate();
  13625. fileid.push(_fileid)
  13626. }
  13627. }
  13628. }
  13629. }
  13630. // let params = JSON.stringify({
  13631. // // "model": "Chat",
  13632. // model: 'gpt-3.5-turbo',
  13633. // temperature: 0,
  13634. // max_tokens: 4096,
  13635. // top_p: 1,
  13636. // frequency_penalty: 0,
  13637. // presence_penalty: 0,
  13638. // messages: [{
  13639. // content: messages,
  13640. // role: 'user'
  13641. // }],
  13642. // stream: false,
  13643. // uid: this.userid,
  13644. // mind_map_question: "",
  13645. // })
  13646. // // let params = JSON.stringify({
  13647. // // message: {
  13648. // // anthropic_version: "bedrock-2023-05-31",
  13649. // // max_tokens: 4096,
  13650. // // temperature: 0,
  13651. // // top_p: 1,
  13652. // // messages: [{
  13653. // // content: messages,
  13654. // // role: 'user'
  13655. // // }], //
  13656. // // },
  13657. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  13658. // // });
  13659. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  13660. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  13661. // console.log(response);
  13662. // let data = response.data.FunctionResponse
  13663. // if (data.choices && data.choices.length && data.choices[0].message) {
  13664. // console.log(data.choices[0].message.content);
  13665. // let tArray = JSON.parse(data.choices[0].message.content)
  13666. // // _this.unitJson[0].chapterInfo[0].task = []
  13667. // let toolsJson = {
  13668. // "电子白板": { tool: 1, type: 1 },
  13669. // "文档": { tool: 52, type: 1 },
  13670. // "思维导图": { tool: 3, type: 1 },
  13671. // "表格": { tool: 48, type: 1 },
  13672. // "作业提交": { tool: 16, type: 2 }
  13673. // }
  13674. // for (var i = 0; i < tArray.length; i++) {
  13675. // let _task = tArray[i]
  13676. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  13677. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  13678. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  13679. // if (_task.toolChoose.length) {
  13680. // for (var j = 0; j < _task.toolChoose.length; j++) {
  13681. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13682. // {
  13683. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  13684. // toolDetail: _task.toolChoose[j].detail,
  13685. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  13686. // askCount: 1,
  13687. // askTitle: "",
  13688. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13689. // },
  13690. // )
  13691. // }
  13692. // } else {
  13693. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13694. // {
  13695. // tool: [],
  13696. // toolDetail: "",
  13697. // toolType: 0,
  13698. // askCount: 1,
  13699. // askTitle: "",
  13700. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13701. // },
  13702. // )
  13703. // }
  13704. // }
  13705. // // if (_this.infoData.length) {
  13706. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  13707. // // }
  13708. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13709. // _this.$forceUpdate();
  13710. // }
  13711. // // if (data.result) {
  13712. // // console.log(data.result);
  13713. // // let tArray = JSON.parse(data.result)
  13714. // // // _this.unitJson[0].chapterInfo[0].task = []
  13715. // // let toolsJson = {
  13716. // // "电子白板": { tool: 1, type: 1 },
  13717. // // "文档": { tool: 52, type: 1 },
  13718. // // "思维导图": { tool: 3, type: 1 },
  13719. // // "表格": { tool: 48, type: 1 },
  13720. // // "作业提交": { tool: 16, type: 2 }
  13721. // // }
  13722. // // for (var i = 0; i < tArray.length; i++) {
  13723. // // let _task = tArray[i]
  13724. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  13725. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  13726. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  13727. // // if (_task.toolChoose.length) {
  13728. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  13729. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13730. // // {
  13731. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  13732. // // toolDetail: _task.toolChoose[j].detail,
  13733. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  13734. // // askCount: 1,
  13735. // // askTitle: "",
  13736. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13737. // // },
  13738. // // )
  13739. // // }
  13740. // // } else {
  13741. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13742. // // {
  13743. // // tool: [],
  13744. // // toolDetail: "",
  13745. // // toolType: 0,
  13746. // // askCount: 1,
  13747. // // askTitle: "",
  13748. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13749. // // },
  13750. // // )
  13751. // // }
  13752. // // }
  13753. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13754. // // _this.$forceUpdate();
  13755. // // }
  13756. // callback ? callback() : ''
  13757. // }).catch(function (error) {
  13758. // _this.loading = false
  13759. // console.log(error);
  13760. // });
  13761. let parm = {
  13762. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  13763. message: [{"type":"text", "text":messages}],
  13764. session_name: uuidv4(),
  13765. userId: this.userid,
  13766. file_ids: fileid.length ? [...fileid] : '',
  13767. }
  13768. this.ajax
  13769. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  13770. .then(async (response) => {
  13771. console.log(response);
  13772. let data = response.data.FunctionResponse
  13773. if (data.message) {
  13774. console.log(data.message);
  13775. let tArray = {}
  13776. try {
  13777. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  13778. } catch (error) {
  13779. console.log("error_________________" + error);
  13780. try {
  13781. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  13782. let match = data.message.match(regex);
  13783. tArray = JSON.parse(match[0]);
  13784. // var message = data.message;
  13785. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  13786. // var jsonEnd = message.indexOf("```", jsonStart);
  13787. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  13788. // tArray = JSON.parse(jsonString);
  13789. } catch (error) {
  13790. console.log("error_________________" + error);
  13791. }
  13792. }
  13793. let toolsJson = {
  13794. "电子白板": { tool: 1, type: 1 },
  13795. "文档": { tool: 52, type: 1 },
  13796. "思维导图": { tool: 3, type: 1 },
  13797. "表格": { tool: 48, type: 1 },
  13798. "作业提交": { tool: 16, type: 2 },
  13799. "问答": { tool: 15, type: 2 },
  13800. "选择题": { tool: 45, type: 2 },
  13801. }
  13802. // answerQ:"sssssssssssssss"
  13803. for (var i = 0; i < tArray.length; i++) {
  13804. let _task = tArray[i]
  13805. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  13806. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  13807. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  13808. if (_task.toolChoose.length) {
  13809. for (var j = 0; j < _task.toolChoose.length; j++) {
  13810. let _json = {
  13811. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  13812. toolDetail: _task.toolChoose[j].detail,
  13813. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  13814. askCount: 1,
  13815. askTitle: "",
  13816. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13817. }
  13818. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  13819. let answerQ = await _this.aiCreateQuestion(15, i)
  13820. _json.answerQ = answerQ.answerQ
  13821. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  13822. let testJson = await _this.aiCreateQuestion(45, i)
  13823. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  13824. }
  13825. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  13826. }
  13827. } else {
  13828. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  13829. {
  13830. tool: [],
  13831. toolDetail: "",
  13832. toolType: 0,
  13833. askCount: 1,
  13834. askTitle: "",
  13835. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13836. },
  13837. )
  13838. }
  13839. }
  13840. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  13841. _this.$forceUpdate();
  13842. _this.createTeacherAn();
  13843. }
  13844. callback ? callback() : ''
  13845. })
  13846. .catch((error) => {
  13847. _this.loading = false
  13848. console.log(error);
  13849. });
  13850. },
  13851. async aiCreateQuestion(type, task) {
  13852. let _this = this
  13853. return new Promise((resolve, reject) => {
  13854. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13855. if (_this.infoData.length) {
  13856. for (var i = 0; i < _this.infoData.length; i++) {
  13857. if(_this.infoData[i].fileid){
  13858. fileid.push(_this.infoData[i].fileid)
  13859. }
  13860. }
  13861. }
  13862. let sub = []
  13863. let mclass = []
  13864. if (this.courseTypeId.length) {
  13865. for (var i = 0; i < this.courseTypeId.length; i++) {
  13866. let _sid = this.courseTypeId[i]
  13867. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  13868. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  13869. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  13870. }
  13871. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  13872. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  13873. }
  13874. }
  13875. }
  13876. }
  13877. let messages = ""
  13878. if(type == 15){
  13879. messages = `NOTICE
  13880. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13881. 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.
  13882. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13883. Instruction: Based on the context, follow "Format example", write content.
  13884. # Context
  13885. ## 任务
  13886. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  13887. ## 限制
  13888. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  13889. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  13890. ## 课程简介
  13891. 课程名字:${_this.courseName}
  13892. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  13893. ${sub.length ? '学科:' + sub.join(",") : ''}
  13894. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13895. ## 教案
  13896. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  13897. # Format example
  13898. {answerQ:"问题"}
  13899. `
  13900. }else if(type == 45){
  13901. messages = `NOTICE
  13902. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  13903. 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.
  13904. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  13905. Instruction: Based on the context, follow "Format example", write content.
  13906. # Context
  13907. ## 任务
  13908. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  13909. ## 限制
  13910. - 生成题目禁止重复。
  13911. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  13912. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  13913. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  13914. ## 课程简介
  13915. 课程名字:${_this.courseName}
  13916. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  13917. ${sub.length ? '学科:' + sub.join(",") : ''}
  13918. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  13919. ## 教案
  13920. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  13921. # Format example
  13922. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  13923. `
  13924. }
  13925. let parm = {
  13926. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  13927. message: [{"type":"text", "text":messages}],
  13928. session_name: uuidv4(),
  13929. userId: this.userid,
  13930. file_ids: fileid.length ? [...fileid] : '',
  13931. }
  13932. this.ajax
  13933. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  13934. .then((response) => {
  13935. console.log(response);
  13936. let data = response.data.FunctionResponse
  13937. if (data.message) {
  13938. console.log(data.message);
  13939. try {
  13940. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  13941. let tArray = {}
  13942. try {
  13943. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  13944. } catch (error) {
  13945. console.log("error_________________" + error);
  13946. try {
  13947. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  13948. let match = data.message.match(regex);
  13949. tArray = JSON.parse(match[0]);
  13950. // var message = data.message;
  13951. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  13952. // var jsonEnd = message.indexOf("```", jsonStart);
  13953. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  13954. // tArray = JSON.parse(jsonString);
  13955. } catch (error) {
  13956. console.log("error_________________" + error);
  13957. }
  13958. }
  13959. resolve(tArray)
  13960. } catch (error) {
  13961. if(type == 15){
  13962. resolve({answerQ: "题目"})
  13963. }else if(type == 45){
  13964. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  13965. }
  13966. }
  13967. }else if(type == 15){
  13968. resolve({answerQ: "题目"})
  13969. }else if(type == 45){
  13970. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  13971. }
  13972. })
  13973. .catch((error) => {
  13974. if(type == 15){
  13975. resolve({answerQ: "题目"})
  13976. }else if(type == 45){
  13977. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  13978. }
  13979. console.log(error);
  13980. });
  13981. });
  13982. },
  13983. async aiGet4(messages, callback, clickType) {
  13984. let _this = this
  13985. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  13986. if (_this.infoData.length) {
  13987. for (var i = 0; i < _this.infoData.length; i++) {
  13988. if(_this.infoData[i].fileid){
  13989. fileid.push(_this.infoData[i].fileid)
  13990. }else {
  13991. let _fileid = await _this.createFileid(_this.infoData[i].url)
  13992. if(_fileid){
  13993. _this.infoData[i].fileid = _fileid
  13994. _this.$forceUpdate();
  13995. fileid.push(_fileid)
  13996. }
  13997. }
  13998. }
  13999. }
  14000. // let params = JSON.stringify({
  14001. // // "model": "Chat",
  14002. // model: 'gpt-3.5-turbo',
  14003. // temperature: 0,
  14004. // max_tokens: 4096,
  14005. // top_p: 1,
  14006. // frequency_penalty: 0,
  14007. // presence_penalty: 0,
  14008. // messages: [{
  14009. // content: messages,
  14010. // role: 'user'
  14011. // }],
  14012. // stream: false,
  14013. // uid: this.userid,
  14014. // mind_map_question: "",
  14015. // })
  14016. // // let params = JSON.stringify({
  14017. // // message: {
  14018. // // anthropic_version: "bedrock-2023-05-31",
  14019. // // max_tokens: 4096,
  14020. // // temperature: 0,
  14021. // // top_p: 1,
  14022. // // messages: [{
  14023. // // content: messages,
  14024. // // role: 'user'
  14025. // // }], //
  14026. // // },
  14027. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14028. // // });
  14029. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14030. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  14031. // console.log(response);
  14032. // let data = response.data.FunctionResponse
  14033. // if (data.choices && data.choices.length && data.choices[0].message) {
  14034. // console.log(data.choices[0].message.content);
  14035. // let dArray = JSON.parse(data.choices[0].message.content)
  14036. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  14037. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  14038. // _this.unitJson[0].chapterInfo[0].taskJson = []
  14039. // for (var i = 0; i < dArray.length; i++) {
  14040. // let _task = dArray[i]
  14041. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  14042. // task: _task.task,
  14043. // taskDetail: "",
  14044. // taskDetail2: "",
  14045. // taskDetail3: _task.detail,
  14046. // chapterData: [],
  14047. // toolText: "",
  14048. // toolChoose: [
  14049. // {
  14050. // tool: [],
  14051. // toolDetail: "",
  14052. // toolType: 0,
  14053. // askCount: 1,
  14054. // askTitle: "",
  14055. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14056. // },
  14057. // ],
  14058. // isShowTools: false,
  14059. // askCount: 1,
  14060. // isFold: 2,
  14061. // askTitle: "",
  14062. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14063. // checkJson: [{ checkCount: [], checkPerent: [] }],
  14064. // homeworkList: [],
  14065. // })
  14066. // }
  14067. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  14068. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14069. // _this.$forceUpdate();
  14070. // } else {
  14071. // for (var i = 0; i < dArray.length; i++) {
  14072. // let _task = dArray[i]
  14073. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  14074. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  14075. // }else {
  14076. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  14077. // task: _task.task,
  14078. // taskDetail: "",
  14079. // taskDetail2: "",
  14080. // taskDetail3: _task.detail,
  14081. // chapterData: [],
  14082. // toolText: "",
  14083. // toolChoose: [
  14084. // {
  14085. // tool: [],
  14086. // toolDetail: "",
  14087. // toolType: 0,
  14088. // askCount: 1,
  14089. // askTitle: "",
  14090. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14091. // },
  14092. // ],
  14093. // isShowTools: false,
  14094. // askCount: 1,
  14095. // isFold: 2,
  14096. // askTitle: "",
  14097. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14098. // checkJson: [{ checkCount: [], checkPerent: [] }],
  14099. // homeworkList: [],
  14100. // }
  14101. // }
  14102. // }
  14103. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14104. // _this.$forceUpdate();
  14105. // }
  14106. // }
  14107. // // if (data.result) {
  14108. // // console.log(data.result);
  14109. // // let dArray = JSON.parse(data.result)
  14110. // // _this.teacherText = JSON.parse(data.result)
  14111. // // for (var i = 0; i < dArray.length; i++) {
  14112. // // let _task = dArray[i]
  14113. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  14114. // // }
  14115. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14116. // // _this.$forceUpdate();
  14117. // // }
  14118. // callback ? callback() : ''
  14119. // _this.loading = false
  14120. // }).catch(function (error) {
  14121. // _this.loading = false
  14122. // console.log(error);
  14123. // });
  14124. let parm = {
  14125. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  14126. message: [{"type":"text", "text":messages}],
  14127. session_name: uuidv4(),
  14128. userId: this.userid,
  14129. file_ids: fileid.length ? [...fileid] : '',
  14130. }
  14131. this.ajax
  14132. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  14133. .then((response) => {
  14134. console.log(response);
  14135. let data = response.data.FunctionResponse
  14136. if (data.message) {
  14137. console.log(data.message);
  14138. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  14139. let dArray = []
  14140. try {
  14141. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  14142. } catch (error) {
  14143. console.log("error_________________" + error);
  14144. try {
  14145. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  14146. let match = data.message.match(regex);
  14147. dArray = JSON.parse(match[0]);
  14148. // var message = data.message;
  14149. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  14150. // var jsonEnd = message.indexOf("```", jsonStart);
  14151. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  14152. // dArray = JSON.parse(jsonString);
  14153. } catch (error) {
  14154. console.log("error_________________" + error);
  14155. }
  14156. }
  14157. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  14158. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  14159. _this.unitJson[0].chapterInfo[0].taskJson = []
  14160. for (var i = 0; i < dArray.length; i++) {
  14161. let _task = dArray[i]
  14162. _this.unitJson[0].chapterInfo[0].taskJson.push({
  14163. task: _task.task,
  14164. taskDetail: "",
  14165. taskDetail2: "",
  14166. taskDetail3: _task.detail,
  14167. chapterData: [],
  14168. toolText: "",
  14169. toolChoose: [
  14170. {
  14171. tool: [],
  14172. toolDetail: "",
  14173. toolType: 0,
  14174. askCount: 1,
  14175. askTitle: "",
  14176. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14177. },
  14178. ],
  14179. isShowTools: false,
  14180. askCount: 1,
  14181. isFold: 2,
  14182. askTitle: "",
  14183. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14184. checkJson: [{ checkCount: [], checkPerent: [] }],
  14185. homeworkList: [],
  14186. })
  14187. }
  14188. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  14189. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14190. _this.$forceUpdate();
  14191. } else {
  14192. for (var i = 0; i < dArray.length; i++) {
  14193. let _task = dArray[i]
  14194. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  14195. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  14196. }else {
  14197. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  14198. task: _task.task,
  14199. taskDetail: "",
  14200. taskDetail2: "",
  14201. taskDetail3: _task.detail,
  14202. chapterData: [],
  14203. toolText: "",
  14204. toolChoose: [
  14205. {
  14206. tool: [],
  14207. toolDetail: "",
  14208. toolType: 0,
  14209. askCount: 1,
  14210. askTitle: "",
  14211. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14212. },
  14213. ],
  14214. isShowTools: false,
  14215. askCount: 1,
  14216. isFold: 2,
  14217. askTitle: "",
  14218. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14219. checkJson: [{ checkCount: [], checkPerent: [] }],
  14220. homeworkList: [],
  14221. }
  14222. }
  14223. }
  14224. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  14225. _this.$forceUpdate();
  14226. }
  14227. }
  14228. callback ? callback() : ''
  14229. })
  14230. .catch((error) => {
  14231. _this.loading = false
  14232. console.log(error);
  14233. });
  14234. },
  14235. async aiDetail(msg, index) {
  14236. let _this = this
  14237. const _tindex = 'task-' + index
  14238. const _tindex2 = index
  14239. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14240. if (_this.infoData.length) {
  14241. for (var i = 0; i < _this.infoData.length; i++) {
  14242. if(_this.infoData[i].fileid){
  14243. fileid.push(_this.infoData[i].fileid)
  14244. }else {
  14245. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14246. if(_fileid){
  14247. _this.infoData[i].fileid = _fileid
  14248. _this.$forceUpdate();
  14249. fileid.push(_fileid)
  14250. }
  14251. }
  14252. }
  14253. }
  14254. let url = []
  14255. if (this.infoData.length) {
  14256. for (var i = 0; i < this.infoData.length; i++) {
  14257. url.push(this.infoData[i].url)
  14258. }
  14259. }
  14260. let messages = `
  14261. 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.
  14262. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14263. --------
  14264. ## 要求
  14265. ${msg} 及#教学任务描述 以文本格式输出任务设计和评价标准
  14266. --------
  14267. ## 教学任务描述
  14268. 任务名称:${_this.aiCallBack.task}
  14269. 大纲描述:${_this.aiCallBack.taskDetail2}`
  14270. // -------- #补充参考资料和
  14271. // ## 补充参考资料
  14272. // - 补充资料:${url.join(",")}
  14273. // - 补充描述:${_this.courseText2}
  14274. _this.taskDetailLoading.push(_tindex)
  14275. _this.ttaskDetailLoading.push(_tindex)
  14276. let _uuid = uuidv4();
  14277. // let params = JSON.stringify({
  14278. // // "model": "Chat",
  14279. // model: 'gpt-3.5-turbo',
  14280. // temperature: 0,
  14281. // max_tokens: 4096,
  14282. // top_p: 1,
  14283. // frequency_penalty: 0,
  14284. // presence_penalty: 0,
  14285. // messages: [{
  14286. // content: messages,
  14287. // role: 'user'
  14288. // }],
  14289. // uid: _uuid,
  14290. // mind_map_question: "",
  14291. // })
  14292. let params = {
  14293. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14294. message: [{"type":"text", "text":messages}],
  14295. session_name: _uuid,
  14296. userId: _this.userid,
  14297. uid: _uuid,
  14298. file_ids: fileid.length ? [...fileid] : '',
  14299. }
  14300. // let params = JSON.stringify({
  14301. // message: {
  14302. // anthropic_version: "bedrock-2023-05-31",
  14303. // max_tokens: 4096,
  14304. // temperature: 0,
  14305. // top_p: 1,
  14306. // messages: [{
  14307. // "role": "user",
  14308. // "content": messages
  14309. // }] ,
  14310. // },
  14311. // uid: _uuid,
  14312. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14313. // });
  14314. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14315. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14316. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14317. console.log(response);
  14318. // let data = response.data.FunctionResponse
  14319. // if (data.choices && data.choices.length && data.choices[0].message) {
  14320. // console.log(data.choices[0].message.content);
  14321. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  14322. // _this.$forceUpdate()
  14323. // }
  14324. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  14325. } else {
  14326. this.$message.warning(response.data.FunctionResponse.result);
  14327. }
  14328. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14329. }).catch(function (error) {
  14330. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14331. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  14332. console.log(error);
  14333. });
  14334. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  14335. },
  14336. aiDetailgetAiContent(_uid, loading, _tindex2) {
  14337. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14338. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14339. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14340. let _allText = "";
  14341. let _mdText = "";
  14342. _source.onmessage = _e => {
  14343. let _eData = JSON.parse(_e.data).content;
  14344. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  14345. //对话已经完成
  14346. _mdText = _mdText.replace("_", "");
  14347. _source.close();
  14348. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  14349. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  14350. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  14351. return;
  14352. } else {
  14353. //对话还在继续
  14354. let _text = "";
  14355. _text = _eData.replaceAll("'", "");
  14356. if (_allText == "") {
  14357. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  14358. } else {
  14359. _allText += _text;
  14360. }
  14361. _mdText = _allText + "_";
  14362. _mdText = _mdText.replace(/\\n/g, "\n");
  14363. _mdText = _mdText.replace(/\\/g, "");
  14364. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  14365. //转化返回的回复流数据
  14366. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  14367. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  14368. // 处理流数据
  14369. }
  14370. this.$forceUpdate();
  14371. };
  14372. },
  14373. async aiDetail2(msg, index) {
  14374. let _this = this
  14375. const _tindex = 'task-' + index
  14376. const _tindex2 = index
  14377. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14378. if (_this.infoData.length) {
  14379. for (var i = 0; i < _this.infoData.length; i++) {
  14380. if(_this.infoData[i].fileid){
  14381. fileid.push(_this.infoData[i].fileid)
  14382. }else {
  14383. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14384. if(_fileid){
  14385. _this.infoData[i].fileid = _fileid
  14386. _this.$forceUpdate();
  14387. fileid.push(_fileid)
  14388. }
  14389. }
  14390. }
  14391. }
  14392. let messages = `
  14393. 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.
  14394. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14395. --------
  14396. ## 要求
  14397. ${msg}
  14398. --------
  14399. ## 优化信息
  14400. 任务名字: ${_this.aiCallBack.task}
  14401. 任务描述: ${_this.aiCallBack.taskDetail}
  14402. # 格式与要求
  14403. - 任务名:
  14404. - 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  14405. _this.taskDetailLoading2.push(_tindex)
  14406. _this.ttaskDetailLoading2.push(_tindex)
  14407. let _uuid = uuidv4();
  14408. // let params = JSON.stringify({
  14409. // // "model": "Chat",
  14410. // model: 'gpt-3.5-turbo',
  14411. // temperature: 0,
  14412. // max_tokens: 4096,
  14413. // top_p: 1,
  14414. // frequency_penalty: 0,
  14415. // presence_penalty: 0,
  14416. // messages: [{
  14417. // content: messages,
  14418. // role: 'user'
  14419. // }],
  14420. // uid: _uuid,
  14421. // mind_map_question: "",
  14422. // })
  14423. let params = {
  14424. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14425. message: [{"type":"text", "text":messages}],
  14426. session_name: _uuid,
  14427. userId: _this.userid,
  14428. uid: _uuid,
  14429. file_ids: fileid.length ? [...fileid] : '',
  14430. }
  14431. // let params = JSON.stringify({
  14432. // message: {
  14433. // anthropic_version: "bedrock-2023-05-31",
  14434. // max_tokens: 4096,
  14435. // temperature: 0,
  14436. // top_p: 1,
  14437. // messages: [{
  14438. // "role": "user",
  14439. // "content": messages
  14440. // }] ,
  14441. // },
  14442. // uid: _uuid,
  14443. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14444. // });
  14445. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14446. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14447. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14448. console.log(response);
  14449. // let data = response.data.FunctionResponse
  14450. // if (data.choices && data.choices.length && data.choices[0].message) {
  14451. // console.log(data.choices[0].message.content);
  14452. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  14453. // _this.$forceUpdate()
  14454. // }
  14455. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14456. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  14457. } else {
  14458. this.$message.warning(response.data.FunctionResponse.result);
  14459. }
  14460. }).catch(function (error) {
  14461. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  14462. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  14463. console.log(error);
  14464. });
  14465. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  14466. },
  14467. aiDetail2getAiContent(_uid, loading, _tindex2) {
  14468. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14469. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14470. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14471. let _allText = "";
  14472. let _mdText = "";
  14473. _source.onmessage = _e => {
  14474. let _eData = JSON.parse(_e.data).content;
  14475. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  14476. //对话已经完成
  14477. _mdText = _mdText.replace("_", "");
  14478. _source.close();
  14479. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  14480. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  14481. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  14482. return;
  14483. } else {
  14484. //对话还在继续
  14485. let _text = "";
  14486. _text = _eData.replaceAll("'", "");
  14487. if (_allText == "") {
  14488. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  14489. } else {
  14490. _allText += _text;
  14491. }
  14492. _mdText = _allText + "_";
  14493. _mdText = _mdText.replace(/\\n/g, "\n");
  14494. _mdText = _mdText.replace(/\\/g, "");
  14495. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  14496. //转化返回的回复流数据
  14497. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  14498. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  14499. // 处理流数据
  14500. }
  14501. this.$forceUpdate();
  14502. };
  14503. },
  14504. async aiDetail3(msg, index, tindex) {
  14505. let _this = this
  14506. const _tindex = 'task-' + index + tindex
  14507. const _tindex2 = index
  14508. const _tindex3 = tindex
  14509. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14510. if (_this.infoData.length) {
  14511. for (var i = 0; i < _this.infoData.length; i++) {
  14512. if(_this.infoData[i].fileid){
  14513. fileid.push(_this.infoData[i].fileid)
  14514. }else {
  14515. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14516. if(_fileid){
  14517. _this.infoData[i].fileid = _fileid
  14518. _this.$forceUpdate();
  14519. fileid.push(_fileid)
  14520. }
  14521. }
  14522. }
  14523. }
  14524. // **重点考虑该任务及工具名和工具内容的情况下*
  14525. let messages = `
  14526. 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.
  14527. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14528. --------
  14529. ## 参考内容
  14530. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  14531. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  14532. 工具名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0] ? _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]] : '无'}
  14533. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  14534. --------
  14535. ## 要求
  14536. ${msg} 输出格式和内容要求参考#格式与要求
  14537. # 格式与要求
  14538. -工具指引:以友好,明确的口吻告诉学生该如何使用该工具`
  14539. _this.taskDetailLoading3.push(_tindex)
  14540. _this.ttaskDetailLoading3.push(_tindex)
  14541. let _uuid = uuidv4();
  14542. // let params = JSON.stringify({
  14543. // // "model": "Chat",
  14544. // model: 'gpt-3.5-turbo',
  14545. // temperature: 0,
  14546. // max_tokens: 4096,
  14547. // top_p: 1,
  14548. // frequency_penalty: 0,
  14549. // presence_penalty: 0,
  14550. // messages: [{
  14551. // content: messages,
  14552. // role: 'user'
  14553. // }],
  14554. // uid: _uuid,
  14555. // mind_map_question: "",
  14556. // })
  14557. let params = {
  14558. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14559. message: [{"type":"text", "text":messages}],
  14560. session_name: _uuid,
  14561. userId: _this.userid,
  14562. uid: _uuid,
  14563. file_ids: fileid.length ? [...fileid] : '',
  14564. }
  14565. // let params = JSON.stringify({
  14566. // message: {
  14567. // anthropic_version: "bedrock-2023-05-31",
  14568. // max_tokens: 4096,
  14569. // temperature: 0,
  14570. // top_p: 1,
  14571. // messages: [{
  14572. // "role": "user",
  14573. // "content": messages
  14574. // }] ,
  14575. // },
  14576. // uid: _uuid,
  14577. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14578. // });
  14579. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14580. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14581. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14582. console.log(response);
  14583. let data = response.data.FunctionResponse
  14584. // if (data.choices && data.choices.length && data.choices[0].message) {
  14585. // console.log(data.choices[0].message.content);
  14586. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  14587. // _this.$forceUpdate()
  14588. // }
  14589. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  14590. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  14591. } else {
  14592. this.$message.warning(response.data.FunctionResponse.result);
  14593. }
  14594. }).catch(function (error) {
  14595. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  14596. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  14597. console.log(error);
  14598. });
  14599. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  14600. },
  14601. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  14602. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14603. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14604. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14605. let _allText = "";
  14606. let _mdText = "";
  14607. _source.onmessage = _e => {
  14608. let _eData = JSON.parse(_e.data).content;
  14609. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  14610. //对话已经完成
  14611. _mdText = _mdText.replace("_", "");
  14612. _source.close();
  14613. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  14614. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  14615. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  14616. return;
  14617. } else {
  14618. //对话还在继续
  14619. let _text = "";
  14620. _text = _eData.replaceAll("'", "");
  14621. if (_allText == "") {
  14622. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  14623. } else {
  14624. _allText += _text;
  14625. }
  14626. _mdText = _allText + "_";
  14627. _mdText = _mdText.replace(/\\n/g, "\n");
  14628. _mdText = _mdText.replace(/\\/g, "");
  14629. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  14630. //转化返回的回复流数据
  14631. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  14632. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  14633. // 处理流数据
  14634. }
  14635. this.$forceUpdate();
  14636. };
  14637. },
  14638. async aiDetail4(msg, index) {
  14639. if (!msg.length) {
  14640. this.$message.error("请添加评价后才能优化")
  14641. return
  14642. }
  14643. let _this = this
  14644. const _tindex = 'task-' + index
  14645. const _tindex2 = index
  14646. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14647. if (_this.infoData.length) {
  14648. for (var i = 0; i < _this.infoData.length; i++) {
  14649. if(_this.infoData[i].fileid){
  14650. fileid.push(_this.infoData[i].fileid)
  14651. }else {
  14652. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14653. if(_fileid){
  14654. _this.infoData[i].fileid = _fileid
  14655. _this.$forceUpdate();
  14656. fileid.push(_fileid)
  14657. }
  14658. }
  14659. }
  14660. }
  14661. var _text = ""
  14662. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  14663. _text += `评价维度:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 维度描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} `
  14664. }
  14665. // **重点考虑该任务详情**
  14666. let messages = `
  14667. 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.
  14668. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14669. #Context
  14670. ## 参考内容
  14671. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  14672. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  14673. 评价设计:${_text}
  14674. ## 要求
  14675. ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  14676. # 格式与要求
  14677. -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  14678. # Format example
  14679. [{"value":"评价维度1","detail":"维度描述1","score":5},{"value":"评价维度2","detail":"维度描述2","score":5},{"value":"评价维度3","detail":"维度描述3","score":5}]`
  14680. _this.taskDetailLoading4.push(_tindex)
  14681. // let params = JSON.stringify({
  14682. // // "model": "Chat",
  14683. // model: 'gpt-3.5-turbo',
  14684. // temperature: 0,
  14685. // max_tokens: 4096,
  14686. // top_p: 1,
  14687. // frequency_penalty: 0,
  14688. // presence_penalty: 0,
  14689. // messages: [{
  14690. // content: messages,
  14691. // role: 'user'
  14692. // }],
  14693. // stream: false,
  14694. // uid: this.userid,
  14695. // mind_map_question: "",
  14696. // })
  14697. let params = {
  14698. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  14699. message: [{"type":"text", "text":messages}],
  14700. session_name: uuidv4(),
  14701. userId: _this.userid,
  14702. file_ids: fileid.length ? [...fileid] : '',
  14703. }
  14704. // let params = JSON.stringify({
  14705. // message: {
  14706. // anthropic_version: "bedrock-2023-05-31",
  14707. // max_tokens: 4096,
  14708. // temperature: 0,
  14709. // top_p: 1,
  14710. // messages: [{
  14711. // content: messages,
  14712. // role: 'user'
  14713. // }], //
  14714. // },
  14715. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14716. // });
  14717. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14718. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  14719. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  14720. console.log(response);
  14721. let data = response.data.FunctionResponse
  14722. // if (data.choices && data.choices.length && data.choices[0].message) {
  14723. // console.log(data.choices[0].message.content);
  14724. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  14725. // _this.$forceUpdate()
  14726. // }
  14727. if (data.message) {
  14728. console.log(data.message);
  14729. try {
  14730. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  14731. } catch (e) {
  14732. console.log("error_________________" + e);
  14733. // _this.$message.error(data.message)
  14734. try {
  14735. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  14736. let match = data.message.match(regex);
  14737. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(match[0]);
  14738. // var message = data.message;
  14739. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  14740. // var jsonEnd = message.indexOf("```", jsonStart);
  14741. // if (jsonStart !== -1 && jsonEnd !== -1) {
  14742. // var jsonString = message
  14743. // .substring(jsonStart, jsonEnd)
  14744. // .trim();
  14745. // var _data2 = JSON.parse(jsonString);
  14746. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  14747. // }
  14748. } catch (error) {
  14749. }
  14750. }
  14751. _this.$forceUpdate()
  14752. }
  14753. // if (data.result) {
  14754. // console.log(data.result);
  14755. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  14756. // _this.$forceUpdate()
  14757. // }
  14758. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14759. }).catch(function (error) {
  14760. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14761. console.log(error);
  14762. });
  14763. },
  14764. async aiDetail5(msg, index) {
  14765. let _this = this
  14766. const _tindex = 'task-' + index
  14767. const _tindex2 = index
  14768. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14769. if (_this.infoData.length) {
  14770. for (var i = 0; i < _this.infoData.length; i++) {
  14771. if(_this.infoData[i].fileid){
  14772. fileid.push(_this.infoData[i].fileid)
  14773. }else {
  14774. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14775. if(_fileid){
  14776. _this.infoData[i].fileid = _fileid
  14777. _this.$forceUpdate();
  14778. fileid.push(_fileid)
  14779. }
  14780. }
  14781. }
  14782. }
  14783. let url = []
  14784. if (this.infoData.length) {
  14785. for (var i = 0; i < this.infoData.length; i++) {
  14786. url.push(this.infoData[i].url)
  14787. }
  14788. }
  14789. var _text = ""
  14790. var _text2 = ""
  14791. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  14792. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  14793. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  14794. }
  14795. let messages = `
  14796. 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.
  14797. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14798. --------
  14799. ## 要求
  14800. ${msg}
  14801. -------
  14802. ## 本教案描述
  14803. ${_this.aiCallBack}
  14804. -------
  14805. ## 课程大纲
  14806. ${_text}
  14807. -------
  14808. ## 其他教学任务教案
  14809. ${_text2}`
  14810. // ## 补充参考资料
  14811. // - 补充资料:${url.join(",")}
  14812. // - 补充描述:${this.courseText2}
  14813. _this.taskDetailLoading5.push(_tindex)
  14814. _this.ttaskDetailLoading5.push(_tindex)
  14815. let _uuid = uuidv4();
  14816. // let params = JSON.stringify({
  14817. // // "model": "Chat",
  14818. // model: 'gpt-3.5-turbo',
  14819. // temperature: 0,
  14820. // max_tokens: 4096,
  14821. // top_p: 1,
  14822. // frequency_penalty: 0,
  14823. // presence_penalty: 0,
  14824. // messages: [{
  14825. // content: messages,
  14826. // role: 'user'
  14827. // }],
  14828. // uid: _uuid,
  14829. // mind_map_question: "",
  14830. // })
  14831. let params = {
  14832. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14833. message: [{"type":"text", "text":messages}],
  14834. session_name: _uuid,
  14835. userId: _this.userid,
  14836. uid: _uuid,
  14837. file_ids: fileid.length ? [...fileid] : '',
  14838. }
  14839. // let params = JSON.stringify({
  14840. // message: {
  14841. // anthropic_version: "bedrock-2023-05-31",
  14842. // max_tokens: 4096,
  14843. // temperature: 0,
  14844. // top_p: 1,
  14845. // messages: [{
  14846. // "role": "user",
  14847. // "content": messages
  14848. // }] ,
  14849. // },
  14850. // uid: _uuid,
  14851. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14852. // });
  14853. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14854. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14855. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14856. console.log(response);
  14857. // let data = response.data.FunctionResponse
  14858. // if (data.choices && data.choices.length && data.choices[0].message) {
  14859. // console.log(data.choices[0].message.content);
  14860. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  14861. // _this.$forceUpdate()
  14862. // }
  14863. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  14864. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  14865. } else {
  14866. this.$message.warning(response.data.FunctionResponse.result);
  14867. }
  14868. }).catch(function (error) {
  14869. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  14870. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  14871. console.log(error);
  14872. });
  14873. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  14874. },
  14875. aiDetail5getAiContent(_uid, loading, _tindex2) {
  14876. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14877. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14878. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  14879. let _allText = "";
  14880. let _mdText = "";
  14881. _source.onmessage = _e => {
  14882. let _eData = JSON.parse(_e.data).content;
  14883. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  14884. //对话已经完成
  14885. _mdText = _mdText.replace("_", "");
  14886. _source.close();
  14887. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  14888. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  14889. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  14890. return;
  14891. } else {
  14892. //对话还在继续
  14893. let _text = "";
  14894. _text = _eData.replaceAll("'", "");
  14895. if (_allText == "") {
  14896. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  14897. } else {
  14898. _allText += _text;
  14899. }
  14900. _mdText = _allText + "_";
  14901. _mdText = _mdText.replace(/\\n/g, "\n");
  14902. _mdText = _mdText.replace(/\\/g, "");
  14903. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  14904. //转化返回的回复流数据
  14905. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  14906. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  14907. // 处理流数据
  14908. }
  14909. this.$forceUpdate();
  14910. };
  14911. },
  14912. async aiDetail52(msg, index) {
  14913. let _this = this
  14914. const _tindex = 'task-' + index
  14915. const _tindex2 = index
  14916. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  14917. if (_this.infoData.length) {
  14918. for (var i = 0; i < _this.infoData.length; i++) {
  14919. if(_this.infoData[i].fileid){
  14920. fileid.push(_this.infoData[i].fileid)
  14921. }else {
  14922. let _fileid = await _this.createFileid(_this.infoData[i].url)
  14923. if(_fileid){
  14924. _this.infoData[i].fileid = _fileid
  14925. _this.$forceUpdate();
  14926. fileid.push(_fileid)
  14927. }
  14928. }
  14929. }
  14930. }
  14931. let url = []
  14932. if (this.infoData.length) {
  14933. for (var i = 0; i < this.infoData.length; i++) {
  14934. url.push(this.infoData[i].url)
  14935. }
  14936. }
  14937. let messages = `
  14938. 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.
  14939. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  14940. --------
  14941. ## 要求
  14942. ${msg}
  14943. -------
  14944. ## 补充描述
  14945. 课程简要描述:${_this.courseText}
  14946. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  14947. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}`
  14948. // ## 补充参考资料
  14949. // - 补充资料:${url.join(",")}
  14950. // - 补充描述:${this.courseText2}
  14951. _this.taskDetailLoading5.push(_tindex)
  14952. _this.ttaskDetailLoading5.push(_tindex)
  14953. let _uuid = uuidv4();
  14954. // let params = JSON.stringify({
  14955. // // "model": "Chat",
  14956. // model: 'gpt-3.5-turbo',
  14957. // temperature: 0,
  14958. // max_tokens: 4096,
  14959. // top_p: 1,
  14960. // frequency_penalty: 0,
  14961. // presence_penalty: 0,
  14962. // messages: [{
  14963. // content: messages,
  14964. // role: 'user'
  14965. // }],
  14966. // uid: _uuid,
  14967. // mind_map_question: "",
  14968. // })
  14969. let params = {
  14970. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  14971. message: [{"type":"text", "text":messages}],
  14972. session_name: _uuid,
  14973. userId: _this.userid,
  14974. uid: _uuid,
  14975. file_ids: fileid.length ? [...fileid] : '',
  14976. }
  14977. // let params = JSON.stringify({
  14978. // message: {
  14979. // anthropic_version: "bedrock-2023-05-31",
  14980. // max_tokens: 4096,
  14981. // temperature: 0,
  14982. // top_p: 1,
  14983. // messages: [{
  14984. // "role": "user",
  14985. // "content": messages
  14986. // }] ,
  14987. // },
  14988. // uid: _uuid,
  14989. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  14990. // });
  14991. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  14992. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  14993. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  14994. console.log(response);
  14995. // let data = response.data.FunctionResponse
  14996. // if (data.choices && data.choices.length && data.choices[0].message) {
  14997. // console.log(data.choices[0].message.content);
  14998. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  14999. // _this.$forceUpdate()
  15000. // }
  15001. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  15002. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15003. } else {
  15004. this.$message.warning(response.data.FunctionResponse.result);
  15005. }
  15006. }).catch(function (error) {
  15007. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  15008. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  15009. console.log(error);
  15010. });
  15011. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  15012. },
  15013. aiDetail52getAiContent(_uid, loading, _tindex2) {
  15014. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15015. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15016. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15017. let _allText = "";
  15018. let _mdText = "";
  15019. _source.onmessage = _e => {
  15020. let _eData = JSON.parse(_e.data).content;
  15021. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15022. //对话已经完成
  15023. _mdText = _mdText.replace("_", "");
  15024. _source.close();
  15025. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  15026. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  15027. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  15028. return;
  15029. } else {
  15030. //对话还在继续
  15031. let _text = "";
  15032. _text = _eData.replaceAll("'", "");
  15033. if (_allText == "") {
  15034. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15035. } else {
  15036. _allText += _text;
  15037. }
  15038. _mdText = _allText + "_";
  15039. _mdText = _mdText.replace(/\\n/g, "\n");
  15040. _mdText = _mdText.replace(/\\/g, "");
  15041. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15042. //转化返回的回复流数据
  15043. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  15044. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  15045. // 处理流数据
  15046. }
  15047. this.$forceUpdate();
  15048. };
  15049. },
  15050. async aiCpote(msg, callback) {
  15051. let _this = this
  15052. let _index = _this.aitype.replace("aiC","c")
  15053. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  15054. if (_this.infoData.length) {
  15055. for (var i = 0; i < _this.infoData.length; i++) {
  15056. if(_this.infoData[i].fileid){
  15057. fileid.push(_this.infoData[i].fileid)
  15058. }else {
  15059. let _fileid = await _this.createFileid(_this.infoData[i].url)
  15060. if(_fileid){
  15061. _this.infoData[i].fileid = _fileid
  15062. _this.$forceUpdate();
  15063. fileid.push(_fileid)
  15064. }
  15065. }
  15066. }
  15067. }
  15068. let sub = []
  15069. if (this.courseTypeId.length) {
  15070. for (var i = 0; i < this.courseTypeId.length; i++) {
  15071. let _sid = this.courseTypeId[i]
  15072. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15073. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15074. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15075. }
  15076. }
  15077. }
  15078. }
  15079. let mclass = []
  15080. if (this.courseTypeId.length) {
  15081. for (var i = 0; i < this.courseTypeId.length; i++) {
  15082. let _sid = this.courseTypeId[i]
  15083. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15084. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15085. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15086. }
  15087. }
  15088. }
  15089. }
  15090. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  15091. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  15092. let messages = `
  15093. 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.
  15094. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  15095. ${msg}
  15096. ## 课程简介
  15097. 课程名字:${this.courseName}
  15098. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  15099. ${sub.length ? '学科:' + sub.join(",") : ''}
  15100. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  15101. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  15102. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  15103. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  15104. _this.cpoteLoading[_index] = true
  15105. _this.cpotetLoading[_index] = true
  15106. let _uuid = uuidv4();
  15107. // let params = JSON.stringify({
  15108. // // "model": "Chat",
  15109. // model: 'gpt-3.5-turbo',
  15110. // temperature: 0,
  15111. // max_tokens: 4096,
  15112. // top_p: 1,
  15113. // frequency_penalty: 0,
  15114. // presence_penalty: 0,
  15115. // messages: [{
  15116. // content: messages,
  15117. // role: 'user'
  15118. // }],
  15119. // uid: _uuid,
  15120. // mind_map_question: "",
  15121. // })
  15122. let params = {
  15123. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  15124. message: [{"type":"text", "text":messages}],
  15125. session_name: _uuid,
  15126. userId: _this.userid,
  15127. uid: _uuid,
  15128. file_ids: fileid.length ? [...fileid] : '',
  15129. }
  15130. // let params = JSON.stringify({
  15131. // message: {
  15132. // anthropic_version: "bedrock-2023-05-31",
  15133. // max_tokens: 4096,
  15134. // temperature: 0,
  15135. // top_p: 1,
  15136. // messages: [{
  15137. // "role": "user",
  15138. // "content": messages
  15139. // }] ,
  15140. // },
  15141. // uid: _uuid,
  15142. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  15143. // });
  15144. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  15145. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  15146. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  15147. console.log(response);
  15148. // let data = response.data.FunctionResponse
  15149. // if (data.choices && data.choices.length && data.choices[0].message) {
  15150. // console.log(data.choices[0].message.content);
  15151. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  15152. // _this.$forceUpdate()
  15153. // }
  15154. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  15155. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  15156. } else {
  15157. this.$message.warning(response.data.FunctionResponse.result);
  15158. }
  15159. }).catch(function (error) {
  15160. _this.cpoteLoading[_index] = false
  15161. _this.cpotetLoading[_index] = false
  15162. callback ? callback() : ''
  15163. console.log(error);
  15164. });
  15165. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  15166. },
  15167. aiCpotegetAiContent(_uid, loading, callback) {
  15168. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15169. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15170. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  15171. let _allText = "";
  15172. let _mdText = "";
  15173. _source.onmessage = _e => {
  15174. let _eData = JSON.parse(_e.data).content;
  15175. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  15176. //对话已经完成
  15177. _mdText = _mdText.replace("_", "");
  15178. _source.close();
  15179. this.cpote[loading] = _mdText;
  15180. this.cpoteLoading[loading] = false
  15181. this.cpotetLoading[loading] = false
  15182. callback ? callback() : ''
  15183. return;
  15184. } else {
  15185. //对话还在继续
  15186. let _text = "";
  15187. _text = _eData.replaceAll("'", "");
  15188. if (_allText == "") {
  15189. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  15190. } else {
  15191. _allText += _text;
  15192. }
  15193. _mdText = _allText + "_";
  15194. _mdText = _mdText.replace(/\\n/g, "\n");
  15195. _mdText = _mdText.replace(/\\/g, "");
  15196. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  15197. //转化返回的回复流数据
  15198. this.cpote[loading] = _mdText;
  15199. this.cpoteLoading[loading] = false
  15200. // 处理流数据
  15201. }
  15202. this.$forceUpdate();
  15203. };
  15204. },
  15205. createFileid(url) {
  15206. let _this = this
  15207. return new Promise((resolve, reject) => {
  15208. try {
  15209. _this.ajax
  15210. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  15211. url: url,
  15212. })
  15213. .then((res) => {
  15214. let _data = res.data.FunctionResponse;
  15215. if (_data.result && _data.result.id) {
  15216. resolve(_data.result.id)
  15217. }
  15218. }).catch(function (error) {
  15219. resolve('')
  15220. });
  15221. }catch (e){
  15222. resolve()
  15223. }
  15224. });
  15225. }
  15226. },
  15227. beforeDestroy() {
  15228. clearTimeout(this.timer);
  15229. this.timer = null;
  15230. clearInterval(this.timer2);
  15231. this.timer2 = null;
  15232. clearInterval(this.pasteTimer);
  15233. this.pasteTimer = null;
  15234. },
  15235. beforeRouteLeave(to, from, next) {
  15236. clearTimeout(this.timer);
  15237. this.timer = null;
  15238. clearInterval(this.timer2);
  15239. this.timer2 = null;
  15240. clearInterval(this.pasteTimer);
  15241. this.pasteTimer = null;
  15242. next();
  15243. },
  15244. created() {
  15245. this.getStudent();
  15246. this.getTeacher();
  15247. this.getClass();
  15248. this.selectGrage();
  15249. this.getTemplate();
  15250. this.getTipsTemplate();
  15251. // this.selectType();
  15252. this.selectEva();
  15253. if(this.istemplate == 1){
  15254. this.isOutline = true
  15255. this.isOutline2 = true
  15256. }
  15257. this.loading = false;
  15258. this.timer2 = setInterval(() => {
  15259. this.selectEva();
  15260. }, 5000);
  15261. this.pasteTimer = setInterval(() => {
  15262. this.getPaste();
  15263. }, 1000);
  15264. setTimeout(() => {
  15265. // this.selectAllType();
  15266. this.selectCourseDetail();
  15267. }, 500);
  15268. let _this = this;
  15269. window.pasteStage = function (json) {
  15270. _this.pasteStage(json);
  15271. };
  15272. window.pasteTask = function (json) {
  15273. _this.pasteTask(json);
  15274. };
  15275. },
  15276. };
  15277. </script>
  15278. <style scoped>
  15279. @media screen and (max-width: 1280px) {
  15280. .mbCss {
  15281. flex-direction: column !important;
  15282. }
  15283. .pjCss {
  15284. width: 100% !important;
  15285. }
  15286. .evaCss {
  15287. width: 100% !important;
  15288. margin-top: 10px;
  15289. }
  15290. }
  15291. .el-table>>>.even_row {
  15292. background-color: #f1f1f1 !important;
  15293. }
  15294. .dialog_diy>>>.el-dialog__header {
  15295. background: #3c3c3c !important;
  15296. padding: 15px 20px;
  15297. }
  15298. .dialog_diy>>>.el-dialog__title {
  15299. color: #fff;
  15300. }
  15301. .dialog_diy>>>.el-dialog__headerbtn {
  15302. top: 19px;
  15303. }
  15304. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  15305. color: #fff;
  15306. }
  15307. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  15308. color: #fff;
  15309. }
  15310. .dialog_diy>>>.el-dialog__body,
  15311. .dialog_diy>>>.el-dialog__footer {
  15312. background: #fafafa;
  15313. }
  15314. .dialog_diy3>>>.el-dialog__body,
  15315. .dialog_diy3>>>.el-dialog__footer {
  15316. background: #eee !important;
  15317. }
  15318. .dialog_diy3>>>.el-dialog__body {
  15319. padding: 20px 20px;
  15320. }
  15321. .dialog_diyStage>>>.el-dialog__body {
  15322. padding: 10px;
  15323. }
  15324. .source_diy>>>.el-dialog {
  15325. height: 100% !important;
  15326. margin: 0 auto !important;
  15327. }
  15328. .source_diy>>>.el-dialog__body {
  15329. height: calc(100% - 185px);
  15330. overflow: auto;
  15331. background: #e6eaf0;
  15332. }
  15333. .source_diy>>>.el-dialog__footer {
  15334. background: #e6eaf0 !important;
  15335. }
  15336. .left {
  15337. border-right: 1px solid rgb(60, 94, 143);
  15338. display: flex;
  15339. flex-direction: column;
  15340. align-items: center;
  15341. min-height: 600px;
  15342. width: 385px;
  15343. height: 80%;
  15344. }
  15345. .tips {
  15346. color: rgb(128, 128, 128);
  15347. font-size: 12px;
  15348. width: 270px;
  15349. margin: 40px;
  15350. }
  15351. .pb_content {
  15352. height: 100% !important;
  15353. /* margin: 0 20px 0 20px; */
  15354. }
  15355. .pb_content_body {
  15356. width: 100% !important;
  15357. height: 100%;
  15358. display: flex;
  15359. }
  15360. .info_solid {
  15361. width: 270px;
  15362. height: 30px;
  15363. border-left: 1px solid #bdbdbd;
  15364. margin: 10px 0px 10px 30px;
  15365. }
  15366. .info_steps {
  15367. width: 270px;
  15368. font-size: 0.875rem;
  15369. display: flex;
  15370. align-items: center;
  15371. }
  15372. .info_steps span:nth-child(1) {
  15373. width: 30px;
  15374. height: 30px;
  15375. background: rgba(0, 0, 0, 0.38);
  15376. display: block;
  15377. color: #fff;
  15378. border-radius: 40px;
  15379. text-align: center;
  15380. line-height: 30px;
  15381. }
  15382. .steps_active {
  15383. background: #3d67bc !important;
  15384. }
  15385. .info_steps span:nth-child(2) {
  15386. margin-left: 5px;
  15387. }
  15388. .right {
  15389. height: 100%;
  15390. width: 100%;
  15391. display: flex;
  15392. overflow: hidden;
  15393. flex-direction: column;
  15394. }
  15395. .leftBar{
  15396. width: 290px;
  15397. height: calc(100% - 50px);
  15398. overflow: auto;
  15399. border-radius: 5px;
  15400. margin: 25px auto;
  15401. box-sizing: border-box;
  15402. margin-right: 10px;
  15403. }
  15404. .basic_box {
  15405. margin: 0 auto;
  15406. position: relative;
  15407. padding: 0 20px 0 20px;
  15408. }
  15409. .basic_box_success {
  15410. width: 100%;
  15411. min-height: 455px;
  15412. padding: 50px 0;
  15413. position: relative;
  15414. text-align: center;
  15415. border-bottom: 1px solid #bfbfbf;
  15416. box-sizing: border-box;
  15417. display: flex;
  15418. align-items: center;
  15419. flex-direction: column;
  15420. justify-content: center;
  15421. }
  15422. .info_title {
  15423. font-size: 1.5em;
  15424. margin-right: 25px;
  15425. /* margin: 20px 30px 20px 30px; */
  15426. }
  15427. .bInfo_title {
  15428. text-align: left;
  15429. margin: 10px 0;
  15430. }
  15431. .small_title {
  15432. font-size: 14px;
  15433. line-height: 40px;
  15434. }
  15435. .chapter_beizhu {
  15436. font-size: 12px;
  15437. font-weight: bold;
  15438. float: right;
  15439. color: rgb(128, 128, 128);
  15440. margin-top: 5px;
  15441. }
  15442. .chapter_uploadBox1 {
  15443. text-align: left;
  15444. background-color: rgb(242, 242, 242);
  15445. width: 100%;
  15446. height: 67px;
  15447. padding: 0px 15px;
  15448. border-radius: 8px;
  15449. overflow: hidden;
  15450. font-size: 16px;
  15451. box-sizing: border-box;
  15452. position: relative;
  15453. }
  15454. .chapter_add {
  15455. width: 100%;
  15456. height: 32px;
  15457. margin-top: 15px;
  15458. cursor: pointer;
  15459. }
  15460. .chapter_add_l {
  15461. margin-left: 5px;
  15462. width: 30px;
  15463. height: 30px;
  15464. float: left;
  15465. border: 1px solid #aaa;
  15466. color: #aaa;
  15467. border-radius: 50%;
  15468. font-size: 25px;
  15469. text-align: center;
  15470. }
  15471. .chapter_add_r {
  15472. font-size: 18px;
  15473. height: 40px;
  15474. line-height: 30px;
  15475. text-indent: 10px;
  15476. color: #aaa;
  15477. }
  15478. .chapter_add_r span {
  15479. font-size: 12px;
  15480. color: rgb(204, 204, 204);
  15481. }
  15482. .chapter_add_input {
  15483. display: none;
  15484. }
  15485. .line {
  15486. width: 85%;
  15487. margin: 0 auto;
  15488. border-top: 1px solid #e5e5e5;
  15489. margin-top: 20px;
  15490. }
  15491. .info_btnBox {
  15492. width: calc(100%);
  15493. display: flex;
  15494. justify-content: center;
  15495. height: 80px;
  15496. align-items: center;
  15497. background: #fff;
  15498. margin: 0 auto;
  15499. border-top: 2px solid rgb(228, 232, 237);
  15500. box-sizing: border-box;
  15501. }
  15502. .info_btnBox2 {
  15503. width: calc(100%);
  15504. display: flex;
  15505. justify-content: center;
  15506. height: 20px;
  15507. align-items: center;
  15508. background: #fff;
  15509. margin: 0 auto;
  15510. border-top: 2px solid rgb(228, 232, 237);
  15511. box-sizing: border-box;
  15512. overflow: hidden;
  15513. cursor: pointer;
  15514. }
  15515. .info_btnBox3 {
  15516. width: calc(100%);
  15517. display: flex;
  15518. justify-content: flex-end;
  15519. padding: 0 20px;
  15520. height: 60px;
  15521. align-items: center;
  15522. background: unset;
  15523. margin: 0 auto;
  15524. /* border-top: 1px solid rgb(228, 232, 237); */
  15525. box-sizing: border-box;
  15526. overflow: hidden;
  15527. cursor: pointer;
  15528. background: #fff;
  15529. border-radius: 10px;
  15530. }
  15531. .info_btn+.info_btn {
  15532. margin-left: 15px;
  15533. }
  15534. .info_btn,
  15535. .teacherWord {
  15536. color: #fff;
  15537. background-color: #0f7eff;
  15538. padding: 8px 24px;
  15539. font-size: 0.9375rem;
  15540. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  15541. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  15542. min-width: 64px;
  15543. font-weight: 500;
  15544. border-radius: 4px;
  15545. box-sizing: border-box;
  15546. border: none;
  15547. cursor: pointer;
  15548. }
  15549. .teacherWord {
  15550. width: 105px !important;
  15551. text-align: center !important;
  15552. line-height: 36px !important;
  15553. padding: 0 !important;
  15554. font-size: 14px !important;
  15555. margin: 10px 0 !important;
  15556. }
  15557. .template_box {
  15558. display: flex;
  15559. flex-wrap: wrap;
  15560. }
  15561. .wordTeacher {
  15562. display: flex;
  15563. flex-direction: column;
  15564. width: 100px;
  15565. height: 100px;
  15566. text-align: center;
  15567. font-size: 13px;
  15568. margin: 0 20px 20px 0;
  15569. background: #f0f4fa;
  15570. position: relative;
  15571. border-radius: 5px;
  15572. align-items: center;
  15573. justify-content: center;
  15574. border: 1px solid #cad1dc;
  15575. color: #0e1e33;
  15576. /* padding: 25px 0px; */
  15577. cursor: pointer;
  15578. }
  15579. .wordTeacher::after {
  15580. content: "";
  15581. display: block;
  15582. position: absolute;
  15583. width: 15px;
  15584. height: 15px;
  15585. right: 10px;
  15586. top: 10px;
  15587. background-image: url(../../../assets/icon/new/choose_a.png);
  15588. background-size: 100% 100%;
  15589. }
  15590. .wordTeacherA::after {
  15591. background-image: url(../../../assets/icon/new/choose_b.png);
  15592. }
  15593. .wordTeacher:nth-child(5n) {
  15594. margin-right: 0px;
  15595. }
  15596. .wordPic {
  15597. margin: 0 auto;
  15598. width: 30px;
  15599. height: 30px;
  15600. cursor: pointer;
  15601. }
  15602. .deleteWord {
  15603. width: 22px;
  15604. height: 22px;
  15605. position: absolute;
  15606. right: 5px;
  15607. top: -15px;
  15608. cursor: pointer;
  15609. display: none;
  15610. z-index: 999;
  15611. }
  15612. .wordPic>img,
  15613. .deleteWord>img,
  15614. .addToolImg>img {
  15615. width: 100%;
  15616. height: 100%;
  15617. }
  15618. .info_btn:hover {
  15619. background-color: #4f7cd5 !important;
  15620. }
  15621. .cru_selectBox {
  15622. display: flex;
  15623. margin: 15px 0;
  15624. flex-wrap: nowrap;
  15625. white-space: nowrap;
  15626. overflow: auto;
  15627. position: relative;
  15628. height: 40px;
  15629. max-width: calc(100% - 175px);
  15630. }
  15631. .cru_selectBox::-webkit-scrollbar {
  15632. /*滚动条整体样式*/
  15633. width: 6px;
  15634. /*高宽分别对应横竖滚动条的尺寸*/
  15635. height: 6px;
  15636. }
  15637. /*定义滚动条轨道 内阴影+圆角*/
  15638. .cru_selectBox::-webkit-scrollbar-track {
  15639. border-radius: 10px;
  15640. background-color: #eee;
  15641. }
  15642. /*定义滑块 内阴影+圆角*/
  15643. .cru_selectBox::-webkit-scrollbar-thumb {
  15644. border-radius: 10px;
  15645. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  15646. background-color: rgba(0, 0, 0, 0.1);
  15647. }
  15648. .cru_line {
  15649. position: absolute;
  15650. bottom: 0px;
  15651. transition: all 0.5s;
  15652. left: 0px;
  15653. width: 50px;
  15654. height: 4px;
  15655. left: 10px;
  15656. border-radius: 2px;
  15657. background: #3681fc;
  15658. }
  15659. .cru_select {
  15660. font-size: 18px;
  15661. margin-right: 20px;
  15662. margin-left: 5px;
  15663. cursor: pointer;
  15664. color: #0e1e33;
  15665. }
  15666. .cru_select:hover {
  15667. color: #3681fc !important;
  15668. }
  15669. .cru_selected {
  15670. color: #3681fc !important;
  15671. font-weight: bold;
  15672. }
  15673. .chapter_box {
  15674. margin-top: 10px;
  15675. width: 100%;
  15676. padding: 10px 20px;
  15677. background: #fff;
  15678. border-radius: 8px;
  15679. box-sizing: border-box;
  15680. }
  15681. .chapter_contentbox {
  15682. display: flex;
  15683. align-items: center;
  15684. /* margin-top: 15px; */
  15685. }
  15686. .chapter_contentbox .cc_title {
  15687. margin: 0px;
  15688. color: black;
  15689. display: block;
  15690. white-space: nowrap;
  15691. overflow: hidden;
  15692. text-overflow: ellipsis;
  15693. margin-right: 20px;
  15694. font-size: 18px;
  15695. height: 20px;
  15696. line-height: 22px;
  15697. min-width: fit-content;
  15698. display: flex;
  15699. }
  15700. .chapter_contentbox .cc_title::before {
  15701. content: "";
  15702. height: 100%;
  15703. width: 3px;
  15704. background: #3681fc;
  15705. border-radius: 3px;
  15706. opacity: 1;
  15707. display: block;
  15708. margin-right: 10px;
  15709. }
  15710. .chapter_contentbox .cc_input {
  15711. width: 100%;
  15712. display: flex;
  15713. }
  15714. .show_taskD {
  15715. min-width: fit-content;
  15716. margin-left: 10px;
  15717. display: flex;
  15718. align-items: center;
  15719. font-size: 14px;
  15720. cursor: pointer;
  15721. color: #717c8d;
  15722. }
  15723. .show_taskD>img {
  15724. width: 15px;
  15725. margin-right: 5px;
  15726. transition: 0.2s all;
  15727. transform: rotate(-90deg);
  15728. }
  15729. .show_taskD.show>img {
  15730. transform: rotate(0deg);
  15731. }
  15732. .show_toolD {
  15733. min-width: fit-content;
  15734. margin-left: 10px;
  15735. display: flex;
  15736. align-items: center;
  15737. font-size: 14px;
  15738. cursor: pointer;
  15739. color: #717c8d;
  15740. /* position: absolute;
  15741. right: 45px;
  15742. top: 5px; */
  15743. }
  15744. .show_toolD>img {
  15745. width: 15px;
  15746. margin-right: 5px;
  15747. transition: 0.2s all;
  15748. transform: rotate(-90deg);
  15749. }
  15750. .show_toolD.show>img {
  15751. transform: rotate(0deg);
  15752. }
  15753. .remove {
  15754. background-image: url("../../../assets/icon/new/delete_u.png");
  15755. cursor: pointer;
  15756. opacity: 0.5;
  15757. width: 30px;
  15758. min-width: 30px;
  15759. height: 30px;
  15760. background-size: 100% 100%;
  15761. background-repeat: no-repeat;
  15762. margin-left: 10px;
  15763. }
  15764. .remove1 {
  15765. background-image: url("../../../assets/remove1.png");
  15766. background-repeat: no-repeat;
  15767. background-position: 5px 10px;
  15768. width: 40px;
  15769. height: 50px;
  15770. cursor: pointer;
  15771. margin-left: 10px;
  15772. }
  15773. .binfo_input {
  15774. width: 100%;
  15775. margin: 0;
  15776. padding: 12px 14px;
  15777. display: block;
  15778. min-width: 0;
  15779. outline: none;
  15780. box-sizing: border-box;
  15781. background: none;
  15782. border: none;
  15783. border-radius: 4px;
  15784. background: #fff;
  15785. font-size: 16px;
  15786. resize: none;
  15787. font-family: "Microsoft YaHei";
  15788. min-height: 48px;
  15789. /* border: 1px solid #3682fc00; */
  15790. border: 1.5px solid #cad1dc;
  15791. }
  15792. .binfo_textarea {
  15793. border: 1.5px solid #cad1dc;
  15794. font-size: 16px;
  15795. resize: none;
  15796. /* background: #f6f6f6; */
  15797. font-family: "Microsoft YaHei";
  15798. }
  15799. .binfo_input:focus-visible {
  15800. border: 1.5px solid #3681fc !important;
  15801. }
  15802. .time {
  15803. display: flex;
  15804. margin: 35px 0 80px 0;
  15805. }
  15806. .chapter_btnbox {
  15807. width: 160px;
  15808. border-radius: 5px;
  15809. border: 2px dashed gray;
  15810. display: flex;
  15811. padding: 8px 50px;
  15812. align-items: center;
  15813. justify-content: center;
  15814. margin: 30px auto 0;
  15815. cursor: pointer;
  15816. }
  15817. .icon_add {
  15818. position: relative;
  15819. width: 24px;
  15820. padding-top: 20px;
  15821. border-radius: 100%;
  15822. border-width: 2px;
  15823. border-style: solid;
  15824. border-color: gray;
  15825. }
  15826. .icon_add i:nth-child(1) {
  15827. position: absolute;
  15828. left: 50%;
  15829. top: 50%;
  15830. height: 60%;
  15831. transform: translate(-50%, -50%);
  15832. border-width: 1px;
  15833. border-style: solid;
  15834. border-color: inherit;
  15835. }
  15836. .icon_add i:nth-child(2) {
  15837. position: absolute;
  15838. top: 50%;
  15839. left: 50%;
  15840. width: 60%;
  15841. transform: translate(-50%, -50%);
  15842. border-width: 1px;
  15843. border-style: solid;
  15844. border-color: inherit;
  15845. }
  15846. .chapter_btn_w {
  15847. font-size: 0.9375rem;
  15848. font-weight: bold;
  15849. color: gray;
  15850. margin-left: 20px;
  15851. }
  15852. .disUoloadSty>>>.el-icon-plus {
  15853. display: none !important;
  15854. /* 上传按钮隐藏 */
  15855. }
  15856. .imgLeft {
  15857. margin: 15px 0;
  15858. }
  15859. .add_info_box {
  15860. margin: 0 0 0 auto;
  15861. display: flex;
  15862. flex-wrap: wrap;
  15863. }
  15864. .add_info_box button {
  15865. margin: 0 5px 10px 0;
  15866. }
  15867. .add_info_box2 {
  15868. display: flex;
  15869. align-items: center;
  15870. flex-wrap: wrap;
  15871. }
  15872. .add_info_box2::after {
  15873. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  15874. color: red;
  15875. font-size: 14px;
  15876. margin-bottom: 10px;
  15877. }
  15878. .add_chapters_box {
  15879. text-align: left;
  15880. background-color: #fff;
  15881. width: 100%;
  15882. border-radius: 4px;
  15883. font-size: 16px;
  15884. box-sizing: border-box;
  15885. position: relative;
  15886. padding: 0 15px;
  15887. height: auto;
  15888. overflow-y: auto;
  15889. overflow-x: hidden;
  15890. border: 1px solid #cad1dc;
  15891. }
  15892. .add_chapters_box.add_c_none {
  15893. display: flex;
  15894. justify-content: center;
  15895. align-items: center;
  15896. padding: 15px;
  15897. }
  15898. .add_c_none>img {
  15899. width: 25px;
  15900. }
  15901. .add_chapters_box.add_c_none>span {
  15902. font-size: 14px;
  15903. font-weight: 400;
  15904. margin: 0 0 5px 5px;
  15905. }
  15906. .homework_box {
  15907. display: flex;
  15908. align-items: flex-start;
  15909. flex-wrap: wrap;
  15910. margin: 15px 0 0 0;
  15911. flex-direction: column;
  15912. align-content: flex-start;
  15913. }
  15914. .course_homework {
  15915. display: flex;
  15916. justify-content: center;
  15917. flex-direction: row;
  15918. align-items: center;
  15919. margin: 0 10px 0 0;
  15920. }
  15921. .course_homework>>>.el-input__inner {
  15922. width: 140px;
  15923. margin-left: 15px;
  15924. }
  15925. .chapter_upload_move {
  15926. position: relative;
  15927. background-color: #fff;
  15928. position: absolute;
  15929. width: 100%;
  15930. top: 0px;
  15931. left: 0px;
  15932. border: 1px solid #eee;
  15933. border-radius: 5px;
  15934. transition: width 2s;
  15935. -moz-transition: width 2s;
  15936. -webkit-transition: width 2s;
  15937. -o-transition: width 2s;
  15938. }
  15939. .chapter_upload_l_i {
  15940. background-image: url("../../../assets/icon.png");
  15941. background-position: 3px -165px;
  15942. width: 30px;
  15943. height: 30px;
  15944. margin: 10px auto 0 auto;
  15945. }
  15946. .course_input_box {
  15947. display: flex;
  15948. margin-right: 20px;
  15949. width: 100%;
  15950. align-items: center;
  15951. position: relative;
  15952. }
  15953. .course_input_box>.binfo_input {
  15954. width: calc(100% - 0 - 200px - 20px);
  15955. margin: 0 10px;
  15956. }
  15957. .bb_courseIcon {
  15958. width: 57px;
  15959. height: 45px;
  15960. background: #f0f4fa;
  15961. border-radius: 5px 0px 0px 5px;
  15962. display: flex;
  15963. align-items: center;
  15964. justify-content: center;
  15965. border-right: 1.5px solid rgb(202, 209, 220);
  15966. box-sizing: border-box;
  15967. position: absolute;
  15968. left: 1.5px;
  15969. }
  15970. .bb_courseIcon>img {
  15971. width: 25px;
  15972. height: auto;
  15973. }
  15974. .big_box {
  15975. /* margin-top: 20px; */
  15976. display: flex;
  15977. justify-content: space-between;
  15978. /* border-bottom: 1px solid #E0E2ED; */
  15979. }
  15980. .left_first {
  15981. display: flex;
  15982. flex-direction: column;
  15983. flex-wrap: nowrap;
  15984. width: calc(100% - 310px);
  15985. padding: 20px;
  15986. box-sizing: border-box;
  15987. background: #fff;
  15988. border-radius: 5px;
  15989. }
  15990. .right_first {
  15991. width: 300px;
  15992. display: flex;
  15993. align-items: center;
  15994. justify-content: center;
  15995. /* border-left: 1px solid #E0E2ED; */
  15996. box-sizing: border-box;
  15997. padding: 20px;
  15998. flex-direction: column;
  15999. background: #fff;
  16000. border-radius: 5px;
  16001. }
  16002. .ai_box {
  16003. width: 204px;
  16004. display: flex;
  16005. justify-content: flex-end;
  16006. margin-bottom: 15px;
  16007. }
  16008. .ai_content {
  16009. display: flex;
  16010. align-items: center;
  16011. font-size: 14px;
  16012. padding: 7px 20px;
  16013. box-sizing: border-box;
  16014. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  16015. border-radius: 12px;
  16016. font-weight: 700;
  16017. cursor: pointer;
  16018. }
  16019. .ai_content>img {
  16020. width: 40px;
  16021. margin-right: 5px;
  16022. }
  16023. .c_info_title {
  16024. padding: 15px 0 15px 0;
  16025. font-size: 16px;
  16026. font-weight: bold;
  16027. margin: 0 0 0 20px;
  16028. box-sizing: border-box;
  16029. display: flex;
  16030. align-items: center;
  16031. line-height: 20px;
  16032. }
  16033. .c_info_title::before {
  16034. content: "";
  16035. display: block;
  16036. width: 3px;
  16037. height: 20px;
  16038. background: #0061ff;
  16039. border-radius: 3px;
  16040. margin: 0 5px 0 0;
  16041. }
  16042. .right_title {
  16043. height: 30px;
  16044. padding: 15px 0 15px 20px;
  16045. border-bottom: 1px solid #f2f2f2;
  16046. font-size: 1.5em;
  16047. font-weight: bold;
  16048. color: #0f7eff;
  16049. margin: 0 auto;
  16050. }
  16051. .people {
  16052. border: 1px solid rgb(229 229 229);
  16053. /* height: 495px; */
  16054. height: 350px;
  16055. border-radius: 5px;
  16056. width: 100%;
  16057. overflow: auto;
  16058. }
  16059. .people_top {
  16060. display: flex;
  16061. width: 100%;
  16062. /* justify-content: space-between; */
  16063. /* align-items: center; */
  16064. flex-direction: column;
  16065. padding: 10px 10px 0;
  16066. box-sizing: border-box;
  16067. }
  16068. .people_nav,
  16069. .people_top_right {
  16070. /* padding: 20px 0 0 20px; */
  16071. }
  16072. .people_top_right {
  16073. height: 40px;
  16074. margin-bottom: 10px;
  16075. }
  16076. .people_search {
  16077. display: flex;
  16078. position: relative;
  16079. }
  16080. .people_search>>>.el-input__inner {
  16081. /* height: 25px; */
  16082. width: 100%;
  16083. }
  16084. .search_img {
  16085. width: 20px;
  16086. height: 20px;
  16087. position: absolute;
  16088. right: 10px;
  16089. top: 50%;
  16090. transform: translateY(-50%);
  16091. }
  16092. .search_img>img {
  16093. width: 100%;
  16094. height: 100%;
  16095. }
  16096. .people_name {
  16097. display: flex;
  16098. justify-content: flex-start;
  16099. padding: 20px 10px;
  16100. flex-direction: column;
  16101. flex-wrap: wrap;
  16102. }
  16103. .p_box {
  16104. position: relative;
  16105. }
  16106. .people_name>>>.el-checkbox {
  16107. width: 100%;
  16108. display: flex;
  16109. align-items: center;
  16110. margin-bottom: 10px;
  16111. }
  16112. .people_name>>>.el-checkbox__label {
  16113. text-overflow: ellipsis;
  16114. overflow: hidden;
  16115. width: calc(100%);
  16116. }
  16117. .people_name2>>>.el-checkbox__label {
  16118. width: calc(100% - 130px);
  16119. }
  16120. .inviteCode {
  16121. position: absolute;
  16122. right: 30px;
  16123. color: #237ade;
  16124. top: 0;
  16125. cursor: pointer;
  16126. font-size: 13px;
  16127. }
  16128. .noneInvite {
  16129. color: #a8a8a8;
  16130. }
  16131. .inviteImg {
  16132. position: absolute;
  16133. right: 5px;
  16134. top: 0;
  16135. width: 20px;
  16136. }
  16137. .right_img {
  16138. width: 150px;
  16139. height: 150px;
  16140. margin: 0 auto;
  16141. }
  16142. .right_img>img {
  16143. width: 100%;
  16144. height: 100%;
  16145. }
  16146. .number {
  16147. margin-top: 20px;
  16148. color: #4aa6ff;
  16149. text-decoration: underline;
  16150. }
  16151. .success_button {
  16152. display: flex;
  16153. text-align: center;
  16154. margin: 5% 0 auto;
  16155. flex-direction: row;
  16156. justify-content: center;
  16157. }
  16158. .look_course {
  16159. margin-right: 40px;
  16160. background: #3d67bc;
  16161. width: 200px;
  16162. height: 35px;
  16163. line-height: 35px;
  16164. color: #fff;
  16165. text-align: center;
  16166. font-size: 14px;
  16167. border-radius: 5px;
  16168. cursor: pointer;
  16169. }
  16170. .attend_others {
  16171. width: 250px;
  16172. background: #4fb13c;
  16173. height: 35px;
  16174. line-height: 35px;
  16175. color: #fff;
  16176. text-align: center;
  16177. font-size: 14px;
  16178. border-radius: 5px;
  16179. cursor: pointer;
  16180. }
  16181. .dialog_diy2>>>.el-dialog__body {
  16182. text-align: center;
  16183. }
  16184. .write_togother {
  16185. position: absolute;
  16186. right: 45px;
  16187. display: flex;
  16188. top: 5%;
  16189. }
  16190. .write_people {
  16191. font-size: 14px;
  16192. line-height: 50px;
  16193. padding-right: 10px;
  16194. }
  16195. .end_write {
  16196. background: #3d67bc;
  16197. color: #fff;
  16198. width: 100px;
  16199. height: 35px;
  16200. line-height: 35px;
  16201. text-align: center;
  16202. font-size: 14px;
  16203. border-radius: 5px;
  16204. cursor: pointer;
  16205. }
  16206. .chapter_upload+.chapter_upload {
  16207. /* margin-top: 15px; */
  16208. border-top: 1px solid #e7ebf1;
  16209. }
  16210. .chapter_upload {
  16211. height: 45px;
  16212. position: relative;
  16213. display: flex;
  16214. align-items: center;
  16215. width: 100%;
  16216. min-height: 45px;
  16217. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  16218. /* border-radius: 4px; */
  16219. /* overflow: hidden; */
  16220. box-sizing: border-box;
  16221. }
  16222. .chapter_upload_drag {
  16223. position: absolute;
  16224. cursor: pointer;
  16225. width: 16px;
  16226. height: 16px;
  16227. left: -9px;
  16228. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  16229. background-size: 100% 100%;
  16230. z-index: 10;
  16231. display: none;
  16232. }
  16233. .isNavStage>.chapter_upload_drag {
  16234. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  16235. }
  16236. .chapter_upload_t {
  16237. background-color: #fff;
  16238. position: absolute;
  16239. height: 100%;
  16240. top: 0px;
  16241. left: 0px;
  16242. box-sizing: border-box;
  16243. }
  16244. .chapter_upload_o {
  16245. width: 100%;
  16246. height: 100%;
  16247. position: relative;
  16248. z-index: 1;
  16249. }
  16250. .chapter_upload_ic {
  16251. margin: 0 15px 0px auto;
  16252. display: flex;
  16253. align-items: center;
  16254. }
  16255. .chapter_upload_ic_l {
  16256. width: 50px;
  16257. height: 50px;
  16258. float: left;
  16259. }
  16260. .chapter_upload_ic_l div {
  16261. width: 30px;
  16262. height: 35px;
  16263. background: url("../../../assets/icon/icon.png");
  16264. }
  16265. .chapter_upload_ic_edit {
  16266. height: 100%;
  16267. display: flex;
  16268. align-items: center;
  16269. cursor: pointer;
  16270. margin: 0 10px 0 0;
  16271. }
  16272. .chapter_upload_ic_edit div {
  16273. width: 18px;
  16274. height: 18px;
  16275. background-image: url("../../../assets/icon/new/edit_u.png");
  16276. background-size: 100% 100%;
  16277. }
  16278. .chapter_upload_ic_r {
  16279. height: 100%;
  16280. display: flex;
  16281. align-items: center;
  16282. cursor: pointer;
  16283. }
  16284. .chapter_upload_ic_r div {
  16285. width: 18px;
  16286. height: 18px;
  16287. background-image: url("../../../assets/icon/new/delete_u.png");
  16288. background-size: 100% 100%;
  16289. }
  16290. .chapter_upload_n {
  16291. display: flex;
  16292. text-indent: 10px;
  16293. text-decoration: none;
  16294. text-overflow: ellipsis;
  16295. white-space: nowrap;
  16296. overflow: hidden;
  16297. width: 55%;
  16298. margin-left: 10px;
  16299. cursor: pointer;
  16300. margin-top: 2px;
  16301. align-items: center;
  16302. }
  16303. .chapter_upload_l_i2,
  16304. .chapter_upload_l_i3,
  16305. .chapter_upload_l_i8,
  16306. .chapter_upload_l_i6,
  16307. .chapter_upload_l_i12,
  16308. .chapter_upload_l_i14,
  16309. .chapter_upload_l_i13 {
  16310. width: 15px;
  16311. height: 15px;
  16312. background-size: 100% 100%;
  16313. }
  16314. .chapter_upload_l_i2 {
  16315. background-image: url("../../../assets/icon/new/u_word.png");
  16316. }
  16317. .chapter_upload_l_i3 {
  16318. background-image: url("../../../assets/icon/new/u_video.png");
  16319. }
  16320. .chapter_upload_l_i8 {
  16321. background-image: url("../../../assets/icon/new/u_url.png");
  16322. }
  16323. .chapter_upload_l_i14 {
  16324. background-image: url("../../../assets/icon/new/u_source.png");
  16325. }
  16326. .chapter_upload_l_i6 {
  16327. background-image: url("../../../assets/icon/new/u_picture.png");
  16328. }
  16329. .chapter_upload_l_i12 {
  16330. background-image: url("../../../assets/icon/new/u_word.png");
  16331. }
  16332. .chapter_upload_l_i13 {
  16333. background-image: url("../../../assets/icon/new/u_img.png");
  16334. }
  16335. .chapter_upload_noSee {
  16336. background-image: url("../../../assets/icon/new/u_noUpload.png");
  16337. width: 18px;
  16338. height: 18px;
  16339. background-size: 100% 100%;
  16340. display: block;
  16341. margin-right: 10px;
  16342. }
  16343. .chapter_upload_ud {
  16344. display: flex;
  16345. flex-direction: row;
  16346. justify-content: center;
  16347. margin: 0 10px 0 0;
  16348. }
  16349. .chapter_upload_ud>.chapter_upload_up {
  16350. margin-bottom: 0;
  16351. margin-right: 10px;
  16352. }
  16353. .chapter_upload_down,
  16354. .chapter_upload_up {
  16355. width: 20px;
  16356. height: 20px;
  16357. background: #e4eaf2;
  16358. cursor: pointer;
  16359. margin: 0 auto;
  16360. border-radius: 5px;
  16361. display: flex;
  16362. justify-content: center;
  16363. align-items: center;
  16364. }
  16365. .chapter_upload_up::after,
  16366. .chapter_upload_down::after {
  16367. content: "";
  16368. background-image: url("../../../assets/icon/new/downBtn.png");
  16369. width: 13px;
  16370. height: 13px;
  16371. background-size: 100% 100%;
  16372. display: block;
  16373. }
  16374. .chapter_upload_up::after {
  16375. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  16376. }
  16377. .chapter_upload_up {
  16378. margin-bottom: 5px;
  16379. }
  16380. .chapter_upload_ud2 {
  16381. display: flex;
  16382. flex-direction: row;
  16383. justify-content: center;
  16384. margin: 0 10px 0 0;
  16385. }
  16386. .chapter_upload_ud2>.chapter_upload_up2 {
  16387. margin-bottom: 0;
  16388. margin-right: 10px;
  16389. }
  16390. .chapter_upload_down2,
  16391. .chapter_upload_up2 {
  16392. cursor: pointer;
  16393. margin: 0 auto;
  16394. border-radius: 5px;
  16395. display: flex;
  16396. justify-content: center;
  16397. align-items: center;
  16398. color: #717c8d;
  16399. font-size: 14px;
  16400. }
  16401. .chapter_upload_up2 {
  16402. margin-right: 10px;
  16403. }
  16404. .chapter_upload_up2::before,
  16405. .chapter_upload_down2::before {
  16406. content: "";
  16407. background-image: url("../../../assets/icon/new/c_down.png");
  16408. width: 14px;
  16409. height: 14px;
  16410. background-size: 100% 100%;
  16411. display: block;
  16412. margin-right: 5px;
  16413. }
  16414. .chapter_upload_up2::before {
  16415. background-image: url("../../../assets/icon/new/c_up.png") !important;
  16416. }
  16417. .addWordStyle {
  16418. display: flex;
  16419. flex-direction: row;
  16420. justify-content: flex-start;
  16421. overflow-x: auto;
  16422. white-space: nowrap;
  16423. flex-wrap: wrap;
  16424. }
  16425. /* table 样式 */
  16426. .cont>>>table {
  16427. border-top: 1px solid #ccc;
  16428. border-left: 1px solid #ccc;
  16429. }
  16430. .cont>>>table td,
  16431. .cont>>>table th {
  16432. border-bottom: 1px solid #ccc;
  16433. border-right: 1px solid #ccc;
  16434. /* padding: 20px 5px; */
  16435. padding: 5px 10px;
  16436. max-width: 0px;
  16437. height: 30px;
  16438. vertical-align: baseline;
  16439. }
  16440. .cont>>>table th {
  16441. border-bottom: 2px solid #ccc;
  16442. text-align: center;
  16443. }
  16444. /* blockquote 样式 */
  16445. .cont>>>blockquote {
  16446. display: block;
  16447. border-left: 8px solid #d0e5f2;
  16448. padding: 5px 10px;
  16449. margin: 10px 0;
  16450. line-height: 1.4;
  16451. font-size: 100%;
  16452. background-color: #f1f1f1;
  16453. }
  16454. /* code 样式 */
  16455. .cont>>>code {
  16456. display: inline-block;
  16457. /* *display: inline; */
  16458. zoom: 1;
  16459. background-color: #f1f1f1;
  16460. border-radius: 3px;
  16461. padding: 3px 5px;
  16462. margin: 0 3px;
  16463. }
  16464. .cont>>>pre code {
  16465. display: block;
  16466. }
  16467. /* ul ol 样式 */
  16468. .cont>>>ul,
  16469. ol {
  16470. margin: 10px 0 10px 20px;
  16471. }
  16472. .wordbox {
  16473. display: flex;
  16474. flex-wrap: wrap;
  16475. cursor: pointer;
  16476. width: 100%;
  16477. }
  16478. .checkword {
  16479. width: 22px;
  16480. height: 22px;
  16481. margin: 10px auto 0;
  16482. cursor: pointer;
  16483. }
  16484. .checkword img {
  16485. width: 100%;
  16486. }
  16487. .stepBg {
  16488. display: flex;
  16489. justify-content: space-between;
  16490. align-items: center;
  16491. background: #fff;
  16492. width: calc(100%);
  16493. margin: 0 auto;
  16494. }
  16495. .stepBorder {
  16496. height: 3px !important;
  16497. background: #cad1dc;
  16498. width: 100px !important;
  16499. margin: 0 15px !important;
  16500. position: relative;
  16501. }
  16502. .border-active {
  16503. background: #3681fc !important;
  16504. }
  16505. .border-active::before,
  16506. .border-active::after {
  16507. border-color: #3681fc !important;
  16508. }
  16509. .stepBorder::before,
  16510. .stepBorder::after {
  16511. content: "";
  16512. width: 9px;
  16513. height: 9px;
  16514. background: #ffffff;
  16515. opacity: 1;
  16516. border: 2px solid #acb4bf;
  16517. display: block;
  16518. box-sizing: border-box;
  16519. border-radius: 50%;
  16520. position: absolute;
  16521. top: 50%;
  16522. transform: translateY(-50%);
  16523. }
  16524. .stepBorder::after {
  16525. right: -9px;
  16526. }
  16527. .stepTop {
  16528. width: 100%;
  16529. /* border-radius: 10px; */
  16530. display: flex;
  16531. justify-content: center;
  16532. align-items: center;
  16533. flex-wrap: nowrap;
  16534. background: #fff;
  16535. /* top: 18%; */
  16536. height: 80px;
  16537. border-bottom: 2px solid rgb(228, 232, 237);
  16538. box-sizing: border-box;
  16539. }
  16540. .stepTop2 {
  16541. width: 100%;
  16542. /* border-radius: 10px; */
  16543. display: flex;
  16544. justify-content: center;
  16545. align-items: center;
  16546. flex-wrap: nowrap;
  16547. background: #fff;
  16548. /* top: 18%; */
  16549. height: 20px;
  16550. border-bottom: 2px solid rgb(228, 232, 237);
  16551. box-sizing: border-box;
  16552. overflow: hidden;
  16553. cursor: pointer;
  16554. }
  16555. .stepTop>div img {
  16556. width: 100%;
  16557. }
  16558. .stepTop>div {
  16559. height: 50px;
  16560. width: 180px;
  16561. cursor: pointer;
  16562. margin: 10px 0;
  16563. border-radius: 10px;
  16564. }
  16565. .first,
  16566. .second,
  16567. .third,
  16568. .four {
  16569. background: #3681fc;
  16570. height: 90px;
  16571. color: #fff;
  16572. display: flex;
  16573. flex-direction: row;
  16574. align-items: center;
  16575. justify-content: center;
  16576. }
  16577. .first>div:nth-child(1),
  16578. .second>div:nth-child(1),
  16579. .third>div:nth-child(1),
  16580. .four>div:nth-child(1) {
  16581. margin: 5px 10px 0 0;
  16582. width: 2rem;
  16583. }
  16584. .firstNo,
  16585. .secondNo,
  16586. .thirdNo,
  16587. .fourNo {
  16588. background: #e7e7e7;
  16589. color: #adadad;
  16590. display: flex;
  16591. flex-direction: row;
  16592. align-items: center;
  16593. justify-content: center;
  16594. }
  16595. .firstNo>div:nth-child(1),
  16596. .secondNo>div:nth-child(1),
  16597. .thirdNo>div:nth-child(1),
  16598. .fourNo>div:nth-child(1) {
  16599. margin: 5px 10px 0 0;
  16600. width: 2rem;
  16601. }
  16602. .uploadWidth>>>.el-upload {
  16603. width: 60px;
  16604. height: 60px;
  16605. position: relative;
  16606. }
  16607. .addPeople {
  16608. background: #fa6060;
  16609. width: 150px;
  16610. height: 40px;
  16611. color: #fff;
  16612. border-radius: 5px;
  16613. text-align: center;
  16614. line-height: 40px;
  16615. font-size: 14px;
  16616. cursor: pointer;
  16617. }
  16618. .kcImg {
  16619. width: 60px;
  16620. margin-left: 10px;
  16621. }
  16622. .zyImg {
  16623. width: 55px;
  16624. margin: 0 10px;
  16625. }
  16626. .deleteZy {
  16627. width: 20px;
  16628. position: absolute;
  16629. top: 5px;
  16630. right: 5px;
  16631. cursor: pointer;
  16632. }
  16633. .kcImg>img,
  16634. .zyImg>img,
  16635. .deleteZy>img {
  16636. width: 100%;
  16637. height: 100%;
  16638. }
  16639. .zyBox {
  16640. display: flex;
  16641. flex-direction: row;
  16642. align-items: center;
  16643. background: #67d37d;
  16644. color: #fff;
  16645. width: 210px;
  16646. margin: 20px 20px 0 0;
  16647. border-radius: 10px;
  16648. height: 70px;
  16649. position: relative;
  16650. }
  16651. .upCss {
  16652. display: flex;
  16653. flex-direction: row;
  16654. justify-content: flex-start;
  16655. }
  16656. .upCss>>>.el-icon-plus {
  16657. position: none !important;
  16658. width: 200px;
  16659. height: 100px;
  16660. display: flex;
  16661. flex-wrap: nowrap;
  16662. flex-direction: column;
  16663. align-items: center;
  16664. justify-content: center;
  16665. border: 1px dashed #ccc;
  16666. min-width: 78px;
  16667. min-height: 100px;
  16668. z-index: 999;
  16669. }
  16670. .upCss>>>.el-upload-list__item-name {
  16671. width: 100px;
  16672. white-space: nowrap;
  16673. overflow: hidden;
  16674. text-overflow: ellipsis;
  16675. }
  16676. .upCss>>>.el-upload-list__item .el-icon-close {
  16677. font-size: 20px;
  16678. z-index: 9999;
  16679. }
  16680. .addStageImg {
  16681. min-width: 20px;
  16682. min-height: 20px;
  16683. width: 20px;
  16684. height: 20px;
  16685. cursor: pointer;
  16686. }
  16687. .addHW {
  16688. width: 28px;
  16689. height: 28px;
  16690. cursor: pointer;
  16691. }
  16692. .addStageImg>img,
  16693. .addHW>img {
  16694. width: 100%;
  16695. height: 100%;
  16696. }
  16697. .addNewPP>>>.el-dialog__body {
  16698. padding: 5px 20px;
  16699. }
  16700. .addNewPP>>>.el-dialog {
  16701. margin-top: 5vh !important;
  16702. }
  16703. .addNewPP2>>>.el-dialog__body {
  16704. padding: 5px 0;
  16705. }
  16706. .addNewPP2>>>.el-dialog {
  16707. margin-top: 5vh !important;
  16708. }
  16709. .isHeight {
  16710. height: 680px;
  16711. }
  16712. .toolChoose {
  16713. display: flex;
  16714. /* width: 100%; */
  16715. flex-direction: row;
  16716. flex-wrap: wrap;
  16717. }
  16718. .tool,
  16719. .isToolChoose {
  16720. display: flex;
  16721. flex-direction: column;
  16722. flex-wrap: nowrap;
  16723. width: fit-content;
  16724. margin: 10px 0 10px 0;
  16725. align-items: center;
  16726. border: 2px solid #dbdbdb00;
  16727. padding: 10px 20px;
  16728. border-radius: 5px;
  16729. cursor: pointer;
  16730. /* box-shadow: 0 0 2px 0px #dedede; */
  16731. position: relative;
  16732. box-sizing: border-box;
  16733. }
  16734. .tool:hover {
  16735. border: 2px solid #a5c7ff;
  16736. }
  16737. .tool:hover>.noCTool {
  16738. display: block;
  16739. opacity: 0.5;
  16740. }
  16741. .isToolChoose {
  16742. border: 2px solid #438aff !important;
  16743. box-shadow: 0 0 2px 0px #438aff;
  16744. opacity: 1 !important;
  16745. }
  16746. .isCTool,
  16747. .noCTool {
  16748. width: 30px;
  16749. height: 30px;
  16750. position: absolute;
  16751. top: -4px;
  16752. right: -4px;
  16753. }
  16754. .noCTool {
  16755. display: none;
  16756. }
  16757. .isCTool>img,
  16758. .noCTool>img {
  16759. width: 100%;
  16760. height: 100%;
  16761. }
  16762. .tool+.tool {
  16763. margin-right: 10px;
  16764. }
  16765. .whiteBIcon {
  16766. width: 80px;
  16767. cursor: pointer;
  16768. display: flex;
  16769. flex-direction: column;
  16770. flex-wrap: nowrap;
  16771. align-items: center;
  16772. font-size: 14px;
  16773. }
  16774. .whiteBIcon>img,
  16775. .toolIcon>img,
  16776. .arrow>img {
  16777. width: 100%;
  16778. height: 100%;
  16779. }
  16780. .check img {
  16781. width: 20px;
  16782. height: 20px;
  16783. }
  16784. .whiteBIcon>img {
  16785. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  16786. border-radius: 15px;
  16787. }
  16788. .whiteBIcon>div:nth-child(2) {
  16789. height: 20px;
  16790. line-height: 20px;
  16791. }
  16792. .check {
  16793. /* width: 20px;
  16794. height: 20px; */
  16795. cursor: pointer;
  16796. margin: 10px 0 0;
  16797. }
  16798. .checkDiv {
  16799. display: flex;
  16800. align-items: center;
  16801. }
  16802. .checkDiv span {
  16803. margin-left: 5px;
  16804. color: #858585;
  16805. }
  16806. .customWidth>>>.el-dialog {
  16807. min-width: 600px !important;
  16808. }
  16809. .CollaborativeCss {
  16810. width: 100%;
  16811. display: flex;
  16812. justify-content: center;
  16813. align-items: center;
  16814. box-sizing: border-box;
  16815. padding: 10px 0;
  16816. cursor: pointer;
  16817. }
  16818. .CollaborativeCss >>> .el-tooltip {
  16819. overflow: hidden;
  16820. white-space: nowrap;
  16821. text-overflow: ellipsis;
  16822. }
  16823. .CollaborativeCss2 {
  16824. background: #e0eafb;
  16825. color: #3681fc;
  16826. font-weight: 700;
  16827. border-radius: 5px;
  16828. }
  16829. .a_addBox {
  16830. margin: 10px 0;
  16831. background: #fff;
  16832. padding: 15px;
  16833. /* max-height: 600px; */
  16834. overflow: auto;
  16835. }
  16836. .a_add_box {
  16837. border-bottom: 2px solid #eee;
  16838. padding-bottom: 25px;
  16839. }
  16840. .a_add_head {
  16841. display: flex;
  16842. align-items: center;
  16843. justify-content: space-between;
  16844. margin: 10px 0 0 0;
  16845. font-size: 18px;
  16846. }
  16847. .a_add_checkType {
  16848. margin-top: 10px;
  16849. display: flex;
  16850. font-size: 14px;
  16851. align-items: center;
  16852. }
  16853. .a_add_checkType span {
  16854. box-sizing: border-box;
  16855. padding: 0 0 5px 0;
  16856. cursor: pointer;
  16857. }
  16858. .a_add_checkType span+span {
  16859. margin-left: 10px;
  16860. }
  16861. .a_add_checkType .active {
  16862. border-bottom: 2px solid #409eff;
  16863. color: #409eff;
  16864. }
  16865. .a_add_head .a_add_head_input {
  16866. /* width: 540px; */
  16867. width: 100%;
  16868. }
  16869. .a_add_head .a_add_head_div {
  16870. display: flex;
  16871. align-items: center;
  16872. justify-content: space-between;
  16873. }
  16874. .a_add_body {
  16875. display: flex;
  16876. /* align-items: center; */
  16877. align-items: flex-end;
  16878. }
  16879. .a_add_input {
  16880. display: flex;
  16881. align-items: center;
  16882. flex-wrap: wrap;
  16883. }
  16884. .a_add_input_choice {
  16885. flex-direction: column;
  16886. margin-right: 10px;
  16887. }
  16888. .a_add_input_choice>>>.el-radio {
  16889. display: flex;
  16890. align-items: center;
  16891. flex-direction: row-reverse;
  16892. margin: 30px 0 0 0;
  16893. position: relative;
  16894. }
  16895. .a_add_input_choice>>>.el-checkbox {
  16896. display: flex;
  16897. align-items: center;
  16898. flex-direction: row-reverse;
  16899. margin: 30px 0 0 0;
  16900. position: relative;
  16901. }
  16902. .width100 {
  16903. width: 100%;
  16904. }
  16905. .a_add_input .a_add_persent {
  16906. width: 100%;
  16907. }
  16908. .a_add_persent_div {
  16909. width: 100%;
  16910. display: flex;
  16911. align-items: center;
  16912. }
  16913. .a_add_persent_div span {
  16914. margin: 5px 0;
  16915. }
  16916. .a_add_persent_div span:nth-child(1) {
  16917. width: 30%;
  16918. }
  16919. .a_add_persent_div span:nth-child(2) {
  16920. width: 7%;
  16921. }
  16922. .a_add_persent_div span:nth-child(3) {
  16923. width: 40%;
  16924. }
  16925. .a_add_body_div {
  16926. display: flex;
  16927. align-items: center;
  16928. justify-content: center;
  16929. /* flex-direction: column; */
  16930. position: absolute;
  16931. right: -20px;
  16932. transform: translateX(100%);
  16933. }
  16934. .a_add_body_div>>>.el-button--primary {
  16935. background: #466b99;
  16936. border: none;
  16937. }
  16938. .all_choose {
  16939. display: flex;
  16940. flex-direction: row;
  16941. align-items: flex-start;
  16942. width: 100%;
  16943. }
  16944. .all_choose+.all_choose {
  16945. /* margin-top: 10px */
  16946. }
  16947. .all_choose>span {
  16948. min-width: fit-content;
  16949. display: block;
  16950. white-space: nowrap;
  16951. overflow: hidden;
  16952. text-overflow: ellipsis;
  16953. margin-right: 20px;
  16954. font-weight: bold;
  16955. font-size: 14px;
  16956. }
  16957. .all_choose>>>.el-checkbox-group {
  16958. display: flex;
  16959. flex-direction: row;
  16960. width: 100%;
  16961. flex-wrap: wrap;
  16962. align-content: center;
  16963. justify-content: flex-start;
  16964. align-items: center;
  16965. margin-top: 3px;
  16966. }
  16967. .all_choose>.el-checkbox-group>>>.el-checkbox {
  16968. margin-bottom: 10px;
  16969. display: flex;
  16970. flex-direction: row;
  16971. align-items: center;
  16972. margin-right: 10px;
  16973. }
  16974. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  16975. min-width: 80px;
  16976. overflow: hidden;
  16977. width: 80px;
  16978. text-overflow: ellipsis;
  16979. white-space: nowrap;
  16980. }
  16981. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  16982. width: auto;
  16983. }
  16984. .choose>div:nth-child(3)>span {
  16985. /* letter-spacing: 0 !important; */
  16986. }
  16987. .choose {
  16988. display: flex;
  16989. flex-direction: column;
  16990. flex-wrap: nowrap;
  16991. height: 100%;
  16992. justify-content: space-evenly;
  16993. align-items: flex-start;
  16994. }
  16995. .both {
  16996. display: flex;
  16997. flex-direction: row;
  16998. flex-wrap: wrap;
  16999. width: 100%;
  17000. align-items: center;
  17001. justify-content: flex-start;
  17002. margin: 15px 0;
  17003. }
  17004. .notice>>>.el-dialog {
  17005. width: 500px !important;
  17006. text-align: center;
  17007. }
  17008. .notice>>>.el-button {
  17009. margin-top: 20px;
  17010. }
  17011. .whiteBg {
  17012. /* background: #fff; */
  17013. border-radius: 10px;
  17014. }
  17015. .wb_j_box {
  17016. display: flex;
  17017. width: 100%;
  17018. padding: 0 20px 0;
  17019. box-sizing: border-box;
  17020. }
  17021. .wb_j_box_content {
  17022. width: calc(100% - 55% - 100px);
  17023. display: flex;
  17024. align-items: center;
  17025. }
  17026. .wb_j_box_p_box {
  17027. max-width: calc(100% - 200px);
  17028. word-break: break-all;
  17029. overflow: hidden;
  17030. margin: 0 0 0 10px;
  17031. font-size: 14px;
  17032. color: #6e6e6e;
  17033. z-index: 999;
  17034. }
  17035. .chooseWho {
  17036. display: flex;
  17037. width: 410px;
  17038. flex-direction: row;
  17039. flex-wrap: nowrap;
  17040. justify-content: space-between;
  17041. padding-bottom: 10px;
  17042. }
  17043. .chooseWho>div {
  17044. cursor: pointer;
  17045. padding-bottom: 10px;
  17046. font-weight: bold;
  17047. }
  17048. .isChooseActive {
  17049. color: #3e88f4;
  17050. border-bottom: 2px solid #2f80f3;
  17051. }
  17052. .toolSort {
  17053. display: flex;
  17054. flex-direction: row;
  17055. flex-wrap: wrap;
  17056. justify-content: flex-start;
  17057. align-items: flex-start;
  17058. }
  17059. .toolSort>div {
  17060. margin-right: 10px;
  17061. }
  17062. .tools {
  17063. width: 100%;
  17064. display: flex;
  17065. flex-direction: column;
  17066. flex-wrap: nowrap;
  17067. align-items: flex-start;
  17068. }
  17069. .leftTools,
  17070. .rightTools {
  17071. width: 50%;
  17072. }
  17073. .leftTools+.leftTools {
  17074. border-top: 1px solid #dbdbdb;
  17075. padding-top: 30px;
  17076. }
  17077. .rightTools {
  17078. display: flex;
  17079. flex-direction: row;
  17080. flex-wrap: nowrap;
  17081. justify-content: space-around;
  17082. }
  17083. .firstToolList {
  17084. display: flex;
  17085. flex-direction: column;
  17086. flex-wrap: nowrap;
  17087. align-items: center;
  17088. }
  17089. .iconList {
  17090. display: flex;
  17091. flex-direction: row;
  17092. flex-wrap: wrap;
  17093. justify-content: flex-start;
  17094. align-items: center;
  17095. margin: 20px 0 5px 0;
  17096. width: 240px;
  17097. min-width: 240px;
  17098. }
  17099. .iconTool {
  17100. display: flex;
  17101. flex-direction: column;
  17102. flex-wrap: nowrap;
  17103. align-items: center;
  17104. justify-content: flex-start;
  17105. margin: 15px 10px;
  17106. }
  17107. .toolIcon {
  17108. width: 50px;
  17109. }
  17110. .taskBorder {
  17111. /* border: 1px solid #CAD1DC; */
  17112. border-radius: 10px;
  17113. margin-top: 10px;
  17114. min-height: 670px;
  17115. position: relative;
  17116. background: #fff;
  17117. padding: 20px;
  17118. overflow: hidden;
  17119. box-sizing: border-box;
  17120. }
  17121. .smallTaskBorder {
  17122. height: 405px;
  17123. min-height: 405px !important;
  17124. overflow: hidden;
  17125. }
  17126. /* .taskBorder>div {
  17127. padding: 30px 30px 10px;
  17128. } */
  17129. .addTaskBorder {
  17130. /* border: 2px solid #5E9AFC; */
  17131. border-radius: 8px;
  17132. margin-top: 10px;
  17133. cursor: pointer;
  17134. /* height: 50px;
  17135. line-height: 50px; */
  17136. background: #fff;
  17137. padding: 15px 0;
  17138. display: flex;
  17139. align-items: center;
  17140. justify-content: center;
  17141. }
  17142. /* .addTaskBorder>div {
  17143. margin: 0 auto;
  17144. display: flex;
  17145. align-items: center;
  17146. justify-content: center;
  17147. }
  17148. .addTaskBorder>div>img {
  17149. width: 20px;
  17150. }
  17151. .addTaskBorder>div>span {
  17152. font-size: 16px;
  17153. margin-left: 10px;
  17154. color: #5E9AFC;
  17155. } */
  17156. .funBlock {
  17157. display: flex;
  17158. padding: 15px 0;
  17159. flex-direction: row;
  17160. justify-content: center;
  17161. align-items: center;
  17162. position: absolute;
  17163. right: 0;
  17164. bottom: 0;
  17165. background: #fff;
  17166. width: 100%;
  17167. height: 60px;
  17168. z-index: 9;
  17169. }
  17170. .fold {
  17171. display: flex;
  17172. margin: 0 20px;
  17173. flex-direction: row;
  17174. align-items: center;
  17175. cursor: pointer;
  17176. color: #2b7bff;
  17177. }
  17178. .arrow {
  17179. margin-right: 8px;
  17180. width: 16px;
  17181. height: 16px;
  17182. min-width: 16px;
  17183. min-height: 16px;
  17184. background-size: 100% 100%;
  17185. display: block;
  17186. background-image: url(../../../assets/icon/new/u_up.png);
  17187. /* border-left: 7px solid transparent;
  17188. border-bottom: 7px solid #717C8D;
  17189. border-top: 0px solid transparent;
  17190. border-right: 7px solid transparent; */
  17191. /* box-sizing: border-box; */
  17192. transition: all 0.3s;
  17193. }
  17194. .arrowZ {
  17195. transform: rotate(180deg);
  17196. }
  17197. .addToolFun {
  17198. display: flex;
  17199. width: 150px;
  17200. flex-direction: row;
  17201. align-items: center;
  17202. justify-content: center;
  17203. border: 2px dashed #cad1dc;
  17204. border-radius: 5px;
  17205. height: 50px;
  17206. margin: 35px auto 0;
  17207. cursor: pointer;
  17208. }
  17209. .addToolFun2 {
  17210. display: flex;
  17211. width: 150px;
  17212. border: 2px dashed #cad1dc;
  17213. flex-direction: row;
  17214. align-items: center;
  17215. justify-content: center;
  17216. border-radius: 5px;
  17217. height: 50px;
  17218. margin: 0 auto 0;
  17219. cursor: pointer;
  17220. }
  17221. .addToolFun2>div,
  17222. .addToolFun>div {
  17223. display: flex;
  17224. line-height: 50px;
  17225. }
  17226. .addToolImg {
  17227. width: 20px;
  17228. height: 20px;
  17229. margin-right: 10px;
  17230. }
  17231. .addToolsDia>>>.el-dialog__body {
  17232. padding: 20px;
  17233. }
  17234. .addToolsDia>>>.el-dialog__body>.toolChoose {
  17235. padding: 0;
  17236. }
  17237. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  17238. padding: 0;
  17239. border-bottom: none;
  17240. margin-bottom: 0;
  17241. }
  17242. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  17243. width: 100%;
  17244. }
  17245. .lineCss>>>.el-form-item__label {
  17246. width: auto !important;
  17247. }
  17248. .lineCss>>>.el-form-item__content {
  17249. margin-left: 50px !important;
  17250. }
  17251. .newSteps {
  17252. display: flex;
  17253. width: 100% !important;
  17254. /* height: 80px; */
  17255. cursor: pointer;
  17256. margin: 10px 0;
  17257. border-radius: 10px;
  17258. flex-direction: row;
  17259. align-content: center;
  17260. justify-content: center;
  17261. align-items: center;
  17262. margin: 0 !important;
  17263. }
  17264. /* 评价样式 */
  17265. .elist_css {
  17266. padding-bottom: 75px !important;
  17267. }
  17268. .elist_title {
  17269. margin-bottom: 10px;
  17270. }
  17271. .elist_input {
  17272. width: 100%;
  17273. }
  17274. .elist_input_box {
  17275. display: flex;
  17276. align-items: center;
  17277. flex-wrap: wrap;
  17278. }
  17279. .elist_input_box+.elist_input_box {
  17280. margin-top: 30px;
  17281. }
  17282. .elist_input .elist_input_box input {
  17283. font: inherit;
  17284. color: currentColor;
  17285. width: 100%;
  17286. /* max-width: calc(100% - 385px); */
  17287. max-width: calc(100% - 150px);
  17288. padding: 8px 14px;
  17289. display: block;
  17290. min-width: 0;
  17291. outline: none;
  17292. border: 1px solid rgba(0, 0, 0, 0.23);
  17293. border-radius: 4px;
  17294. box-sizing: border-box;
  17295. background: #fff;
  17296. margin: 0 20px 0 0;
  17297. }
  17298. .elist_input .elist_input_box span {
  17299. height: 36px;
  17300. line-height: 36px;
  17301. color: rgb(82, 82, 82);
  17302. min-width: 80px;
  17303. }
  17304. .elist_input .elist_input_box .remove {
  17305. height: 20px;
  17306. width: 20px;
  17307. min-height: 20px;
  17308. min-width: 20px;
  17309. background-size: 100% 100%;
  17310. background-position: unset;
  17311. margin-left: 5px;
  17312. }
  17313. .elist_input_box>>>.el-rate {
  17314. display: flex;
  17315. height: 36px;
  17316. align-items: center;
  17317. }
  17318. .elist_input_box .elist_inptu_text {
  17319. width: 100%;
  17320. display: flex;
  17321. align-items: center;
  17322. margin-top: 10px;
  17323. }
  17324. .elist_input_box .elist_inptu_text input {
  17325. /* width: 500px; */
  17326. width: 100%;
  17327. max-width: unset;
  17328. }
  17329. .elist_input_box>>>.el-rate__icon {
  17330. font-size: 24px;
  17331. }
  17332. .elist_btn {
  17333. margin-top: 10px;
  17334. }
  17335. .lineTitle {
  17336. /* margin-top: 15px; */
  17337. width: 110px;
  17338. font-size: 16px;
  17339. display: flex;
  17340. align-items: center;
  17341. line-height: 20px;
  17342. }
  17343. .lineTitle::before {
  17344. content: "";
  17345. display: block;
  17346. width: 3px;
  17347. height: 20px;
  17348. background: #0061ff;
  17349. border-radius: 3px;
  17350. margin: 0 5px 0 0;
  17351. }
  17352. .clineTitle::before {
  17353. content: "";
  17354. display: block;
  17355. min-width: 10px;
  17356. width: 10px;
  17357. height: 10px;
  17358. background: #0061ff;
  17359. border-radius: 50%;
  17360. margin: 0 5px 0 0;
  17361. }
  17362. .courseTop {
  17363. display: flex;
  17364. flex-direction: row;
  17365. justify-content: space-between;
  17366. align-items: center;
  17367. width: calc(100% - 40px);
  17368. margin: 0 auto;
  17369. padding: 10px 0;
  17370. }
  17371. .stepsNav {
  17372. display: flex;
  17373. flex-direction: row;
  17374. justify-content: flex-start;
  17375. align-items: center;
  17376. }
  17377. .stepsWord {
  17378. font-size: 18px;
  17379. color: #fff;
  17380. font-weight: bold;
  17381. margin-left: auto;
  17382. background: rgb(15, 126, 255);
  17383. border-radius: 5px;
  17384. padding: 3px 25px;
  17385. box-sizing: border-box;
  17386. }
  17387. .stepBox {
  17388. width: calc(100% - 40px);
  17389. height: calc(100% - 50px);
  17390. overflow: hidden;
  17391. border-radius: 5px;
  17392. margin: 0 auto;
  17393. }
  17394. .rightBox {
  17395. width: calc(100%);
  17396. background: #f0f2f5;
  17397. /* border-radius: 10px; */
  17398. overflow: auto;
  17399. height: calc(100% - 150px);
  17400. margin: 0 auto;
  17401. position: relative;
  17402. box-sizing: border-box;
  17403. }
  17404. .e_add_top {
  17405. display: flex;
  17406. justify-content: space-between;
  17407. background: #fff;
  17408. position: absolute;
  17409. right: 20px;
  17410. height: 50px;
  17411. align-items: center;
  17412. }
  17413. .e_add_title2 {
  17414. display: flex;
  17415. align-items: center;
  17416. }
  17417. .e_add_title2 span {
  17418. width: 40px;
  17419. }
  17420. .e_add_title {
  17421. display: flex;
  17422. align-items: center;
  17423. color: #b8b8b8;
  17424. font-size: 18px;
  17425. position: relative;
  17426. height: 40px;
  17427. }
  17428. .e_add_title span {
  17429. margin-right: 10px;
  17430. }
  17431. .e_add_title .el_input {
  17432. width: 300px;
  17433. }
  17434. .e_add_title>>>.el-input__inner {
  17435. width: 400px;
  17436. }
  17437. .e_add_btn {}
  17438. .e_add_content {
  17439. display: flex;
  17440. width: 100%;
  17441. }
  17442. .e_add_list {
  17443. background: #fff;
  17444. height: 500px;
  17445. width: 210px;
  17446. position: relative;
  17447. margin: 15px 5px 0 0;
  17448. flex-shrink: 0;
  17449. display: flex;
  17450. flex-direction: column;
  17451. }
  17452. .e_add_list_title {
  17453. font-size: 20px;
  17454. width: 100%;
  17455. box-sizing: border-box;
  17456. padding: 15px 40px;
  17457. text-align: center;
  17458. border-bottom: 1px solid #eaeaea;
  17459. position: relative;
  17460. display: flex;
  17461. align-items: center;
  17462. justify-content: center;
  17463. height: 57px;
  17464. background: #f6f6f6;
  17465. }
  17466. .e_add_list_title span {
  17467. overflow: hidden;
  17468. white-space: nowrap;
  17469. text-overflow: ellipsis;
  17470. }
  17471. .e_add_list_title img {
  17472. position: absolute;
  17473. right: 15px;
  17474. width: 25px;
  17475. cursor: pointer;
  17476. top: 50%;
  17477. transform: translateY(-50%);
  17478. }
  17479. .e_add_list_body {
  17480. height: calc(100% - 187px);
  17481. overflow: auto;
  17482. }
  17483. .e_add_list_child {
  17484. width: 100%;
  17485. display: flex;
  17486. align-items: center;
  17487. justify-content: center;
  17488. position: relative;
  17489. box-sizing: border-box;
  17490. padding: 15px 40px;
  17491. text-align: center;
  17492. }
  17493. .e_add_list_child span {
  17494. overflow: hidden;
  17495. white-space: nowrap;
  17496. text-overflow: ellipsis;
  17497. cursor: pointer;
  17498. }
  17499. .e_add_list_child img {
  17500. position: absolute;
  17501. right: 10px;
  17502. width: 21px;
  17503. cursor: pointer;
  17504. top: 50%;
  17505. transform: translateY(-50%);
  17506. }
  17507. .e_add_list_child+.e_add_list_child {
  17508. border-top: 1px solid #eaeaea;
  17509. }
  17510. .e_add_list_child .active {
  17511. color: #409eff;
  17512. }
  17513. .e_add_list_btn {
  17514. position: absolute;
  17515. bottom: 0;
  17516. height: 50px;
  17517. background: rgb(120, 120, 254);
  17518. width: 100%;
  17519. color: #fff;
  17520. font-size: 16px;
  17521. text-align: center;
  17522. line-height: 50px;
  17523. cursor: pointer;
  17524. }
  17525. .e_add_list_detail {
  17526. position: absolute;
  17527. bottom: 0;
  17528. height: 130px;
  17529. background: rgb(120, 120, 254);
  17530. width: 100%;
  17531. color: #fff;
  17532. font-size: 16px;
  17533. display: flex;
  17534. align-items: center;
  17535. justify-content: center;
  17536. }
  17537. .e_add_list_detail textarea {
  17538. height: 90%;
  17539. width: 95%;
  17540. border: none;
  17541. resize: none;
  17542. outline: none;
  17543. padding: 5px;
  17544. box-sizing: border-box;
  17545. }
  17546. .e_add_list_pbox {
  17547. width: 100%;
  17548. }
  17549. .e_add_list_pbox_title {
  17550. height: 50px;
  17551. background: #fff;
  17552. display: flex;
  17553. align-items: center;
  17554. width: 100%;
  17555. box-sizing: border-box;
  17556. padding: 0 20px;
  17557. flex-direction: row;
  17558. flex-wrap: wrap;
  17559. }
  17560. .type_title {
  17561. font-size: 18px;
  17562. font-weight: 700;
  17563. }
  17564. .type_content {
  17565. font-size: 16px;
  17566. margin-left: 30px;
  17567. }
  17568. .type_content span+span {
  17569. margin-left: 20px;
  17570. }
  17571. .type_content span {
  17572. cursor: pointer;
  17573. padding-bottom: 5px;
  17574. box-sizing: border-box;
  17575. }
  17576. .type_content .active {
  17577. color: #409eff;
  17578. border-bottom: 2px solid #409eff;
  17579. }
  17580. .e_add_list_pbox_content {
  17581. height: calc(100% - 50px);
  17582. display: flex;
  17583. align-items: center;
  17584. width: 100%;
  17585. background: #fff;
  17586. }
  17587. .mbCss {
  17588. width: 100%;
  17589. display: flex;
  17590. flex-direction: row;
  17591. flex-wrap: nowrap;
  17592. align-content: center;
  17593. align-items: flex-start;
  17594. justify-content: flex-start;
  17595. }
  17596. .pjCss {
  17597. /* width: 42%; */
  17598. width: calc(100% - 55%);
  17599. display: flex;
  17600. flex-direction: column;
  17601. flex-wrap: nowrap;
  17602. align-items: flex-start;
  17603. }
  17604. .e_box {
  17605. /* display: flex; */
  17606. flex-wrap: wrap;
  17607. max-height: 500px;
  17608. align-items: flex-start;
  17609. overflow: auto;
  17610. width: 100%;
  17611. }
  17612. .e_card {
  17613. border: 1px solid #ccc;
  17614. background: #fff;
  17615. margin-right: 20px;
  17616. width: 270px;
  17617. display: flex;
  17618. flex-direction: column;
  17619. align-items: center;
  17620. border-radius: 5px;
  17621. margin-top: 10px;
  17622. text-align: center;
  17623. }
  17624. .e_card_picture {
  17625. margin: 10px 0;
  17626. }
  17627. .e_card_picture>img {
  17628. width: 50px;
  17629. }
  17630. .e_card_name {
  17631. width: 100%;
  17632. padding: 0 10px;
  17633. box-sizing: border-box;
  17634. margin-bottom: 10px;
  17635. overflow: hidden;
  17636. text-overflow: ellipsis;
  17637. white-space: nowrap;
  17638. }
  17639. .e_card_time {
  17640. width: 100%;
  17641. padding: 0 10px;
  17642. box-sizing: border-box;
  17643. font-size: 15px;
  17644. color: #c3c3c3;
  17645. margin-bottom: 10px;
  17646. }
  17647. .e_card_btn {
  17648. height: 40px;
  17649. display: flex;
  17650. align-items: center;
  17651. width: 100%;
  17652. background: rgb(244, 244, 244);
  17653. }
  17654. .e_card_btn:hover {
  17655. background: rgb(221 221 221);
  17656. }
  17657. .e_card_btn span {
  17658. flex: 1 1 auto;
  17659. text-align: center;
  17660. cursor: pointer;
  17661. }
  17662. .addEva {
  17663. border: 1px solid #ccc;
  17664. background: #fff;
  17665. margin-right: 20px;
  17666. width: 270px;
  17667. height: 149px;
  17668. display: flex;
  17669. flex-direction: column;
  17670. align-items: center;
  17671. border-radius: 5px;
  17672. margin-top: 10px;
  17673. text-align: center;
  17674. cursor: pointer;
  17675. justify-content: center;
  17676. }
  17677. .addEva>img {
  17678. width: 50px;
  17679. object-fit: cover;
  17680. }
  17681. .uploadFm {
  17682. border: 1px dashed #ccc;
  17683. width: 100%;
  17684. height: 140px;
  17685. position: relative;
  17686. cursor: pointer;
  17687. display: flex;
  17688. flex-direction: column;
  17689. justify-content: center;
  17690. align-items: center;
  17691. font-size: 14px;
  17692. color: #6e6e6e;
  17693. position: relative;
  17694. }
  17695. .cover_p {
  17696. width: 100% !important;
  17697. height: 100%;
  17698. object-fit: cover;
  17699. }
  17700. .uploadFm2:hover .cover_mask {
  17701. display: flex !important;
  17702. }
  17703. .cover_mask {
  17704. display: none;
  17705. width: 100%;
  17706. height: 100%;
  17707. position: absolute;
  17708. background: #00000054;
  17709. align-items: center;
  17710. justify-content: center;
  17711. flex-direction: column;
  17712. }
  17713. .cover_mask>img {
  17714. width: 30px;
  17715. }
  17716. .cover_mask>span {
  17717. color: #fff;
  17718. font-size: 12px;
  17719. }
  17720. .uploadFm>img {
  17721. width: 50px;
  17722. }
  17723. .fileCss {
  17724. width: 100%;
  17725. display: flex;
  17726. flex-direction: row;
  17727. flex-wrap: nowrap;
  17728. justify-content: space-around;
  17729. align-items: center;
  17730. padding-top: 15px;
  17731. }
  17732. .fileCss>div {
  17733. display: flex;
  17734. flex-direction: column;
  17735. align-items: center;
  17736. }
  17737. .fileCss .spanName {
  17738. margin-top: 10px;
  17739. }
  17740. .sysPicBox {
  17741. display: flex;
  17742. flex-direction: row;
  17743. flex-wrap: wrap;
  17744. align-content: flex-start;
  17745. height: 435px;
  17746. overflow: auto;
  17747. position: relative;
  17748. }
  17749. .picNone {
  17750. position: absolute;
  17751. left: 50%;
  17752. top: 45%;
  17753. transform: translate(-50%, -50%);
  17754. width: fit-content;
  17755. color: #9c9c9c;
  17756. }
  17757. .sysPic {
  17758. width: 200px;
  17759. height: 115px;
  17760. margin: 0 20px 20px 0;
  17761. cursor: pointer;
  17762. }
  17763. .sysPic>img,
  17764. .isSysPic>img,
  17765. .deletePic>img {
  17766. width: 100%;
  17767. height: 100%;
  17768. object-fit: cover;
  17769. }
  17770. .isSysPic {
  17771. width: 200px;
  17772. height: 115px;
  17773. position: relative;
  17774. }
  17775. .deletePic {
  17776. width: 20px;
  17777. height: 20px;
  17778. position: absolute;
  17779. top: 0;
  17780. right: 0;
  17781. cursor: pointer;
  17782. }
  17783. .select_box1 {
  17784. height: 100%;
  17785. }
  17786. .select_box1_img {
  17787. background: #fff;
  17788. border-radius: 5px;
  17789. padding: 15px;
  17790. box-sizing: border-box;
  17791. margin-bottom: 20px;
  17792. }
  17793. .select_box1_title {
  17794. padding: 0 0 15px 0;
  17795. border-bottom: 1px solid #eee;
  17796. margin-bottom: 15px;
  17797. }
  17798. .select_box1_title span:nth-child(1) {
  17799. font-size: 16px;
  17800. margin-right: 20px;
  17801. color: #000;
  17802. }
  17803. .select_box1_title span:nth-child(2) {
  17804. font-size: 14px;
  17805. color: rgb(112, 112, 112);
  17806. }
  17807. .select_box1_add_img {}
  17808. .select_box1_select {
  17809. background: #fff;
  17810. border-radius: 5px;
  17811. padding: 15px;
  17812. box-sizing: border-box;
  17813. height: calc(100% - 200px);
  17814. overflow: auto;
  17815. }
  17816. .select_box2 {
  17817. height: 100%;
  17818. }
  17819. .select_box2_title {
  17820. background: #fff;
  17821. border-radius: 5px;
  17822. padding: 5px 10px;
  17823. box-sizing: border-box;
  17824. margin-bottom: 10px;
  17825. }
  17826. .select_box2_box {
  17827. display: flex;
  17828. height: calc(100% - 30px);
  17829. }
  17830. .select_box2_img {
  17831. width: calc(100% - 310px);
  17832. height: 100%;
  17833. overflow: auto;
  17834. background: #fff;
  17835. border-radius: 5px;
  17836. }
  17837. .select_box2_img img {
  17838. width: 100%;
  17839. }
  17840. .select_box2_answer {
  17841. background: #fff;
  17842. margin-left: 10px;
  17843. border-radius: 5px;
  17844. width: 300px;
  17845. overflow: auto;
  17846. height: 100%;
  17847. display: flex;
  17848. flex-direction: column;
  17849. align-items: center;
  17850. padding-top: 10px;
  17851. box-sizing: border-box;
  17852. }
  17853. .select_box2_answer_box {
  17854. margin: 0 0 10px 0;
  17855. width: 85%;
  17856. }
  17857. .rate_textarea {
  17858. font: inherit;
  17859. color: currentColor;
  17860. width: 100%;
  17861. padding: 8px 14px;
  17862. display: block;
  17863. min-width: 0;
  17864. outline: none;
  17865. border: 1px solid rgba(0, 0, 0, 0.23);
  17866. border-radius: 4px;
  17867. box-sizing: border-box;
  17868. background: #fff;
  17869. margin: 0 20px 0 0;
  17870. resize: none;
  17871. }
  17872. .select_answer_title {
  17873. text-align: left;
  17874. width: 85%;
  17875. margin-bottom: 10px;
  17876. font-size: 18px;
  17877. color: #8e8e8e;
  17878. }
  17879. .mask {
  17880. background-color: rgb(0 0 0 / 30%);
  17881. /* position: fixed; */
  17882. position: absolute;
  17883. top: 0;
  17884. left: 0;
  17885. width: 100%;
  17886. height: 100%;
  17887. z-index: 90;
  17888. display: flex;
  17889. align-items: center;
  17890. justify-content: center;
  17891. }
  17892. .progressBox {
  17893. width: 300px;
  17894. height: 150px;
  17895. background: #fff;
  17896. border-radius: 10px;
  17897. box-shadow: 0 0 6px 1px #bfbfbf;
  17898. display: flex;
  17899. align-items: center;
  17900. justify-content: center;
  17901. flex-direction: column;
  17902. position: relative;
  17903. color: #6c6c6c;
  17904. }
  17905. .progressBox>>>.el-progress-bar__outer {
  17906. background-color: #d1dfff !important;
  17907. }
  17908. .progressBox .lbox {
  17909. height: 50px;
  17910. font-size: 19px;
  17911. display: flex;
  17912. align-items: center;
  17913. color: #747474;
  17914. }
  17915. .progressBox .lbox img {
  17916. width: 40px;
  17917. margin-right: 20px;
  17918. }
  17919. .closeCss {
  17920. position: absolute;
  17921. top: 8px;
  17922. right: 8px;
  17923. cursor: pointer;
  17924. width: 20px;
  17925. height: 20px;
  17926. }
  17927. .closeCss>img {
  17928. width: 100%;
  17929. height: 100%;
  17930. }
  17931. .updateTips::before {
  17932. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  17933. font-size: 14px;
  17934. margin-left: 20px;
  17935. font-weight: 400;
  17936. color: #ff3a3a;
  17937. margin-bottom: 10px;
  17938. display: block;
  17939. }
  17940. .updateMask {
  17941. width: 100%;
  17942. z-index: 3;
  17943. top: 0;
  17944. position: absolute;
  17945. /* background-color: rgba(0,0,0,.3); */
  17946. }
  17947. .t_j_box {
  17948. display: flex;
  17949. }
  17950. .t_j_box span:nth-child(1) {
  17951. width: 15%;
  17952. overflow: hidden;
  17953. margin-right: 10px;
  17954. text-overflow: ellipsis;
  17955. white-space: nowrap;
  17956. }
  17957. .t_j_box span:nth-child(2) {
  17958. width: 30%;
  17959. overflow: hidden;
  17960. text-overflow: ellipsis;
  17961. margin-right: 10px;
  17962. }
  17963. .t_j_box span:nth-child(3) {
  17964. max-width: calc(55% - 20px);
  17965. overflow: hidden;
  17966. text-overflow: ellipsis;
  17967. }
  17968. .sentenBox {
  17969. background: #fff;
  17970. height: 600px;
  17971. overflow: auto;
  17972. background-image: url("../../../assets/icon/conSentences/csBg.png");
  17973. background-position: 102%;
  17974. background-repeat: no-repeat;
  17975. background-size: 60%;
  17976. }
  17977. .sentenBox>.sentenContent {
  17978. padding-bottom: 10px;
  17979. width: 97%;
  17980. margin: 0 auto;
  17981. }
  17982. .sentenBox>.sentenContent+.sentenContent {
  17983. border-top: 1px solid #cbcbcb;
  17984. }
  17985. .addSen {
  17986. background: #409efe;
  17987. width: 90px;
  17988. color: #fff;
  17989. height: 35px;
  17990. text-align: center;
  17991. line-height: 35px;
  17992. border-radius: 5px;
  17993. float: right;
  17994. margin: 10px 20px 0 0;
  17995. cursor: pointer;
  17996. }
  17997. .sentenTop {
  17998. display: flex;
  17999. flex-direction: row;
  18000. flex-wrap: nowrap;
  18001. align-items: center;
  18002. }
  18003. .sentenTop::before {
  18004. content: attr(index);
  18005. background: #3681fc;
  18006. border-radius: 50%;
  18007. color: #fff;
  18008. width: 25px;
  18009. height: 25px;
  18010. min-width: 25px;
  18011. min-height: 25px;
  18012. text-align: center;
  18013. line-height: 25px;
  18014. margin-right: 5px;
  18015. }
  18016. .sentenTop>div:nth-child(2) {
  18017. width: 300px;
  18018. margin: 0 15px;
  18019. }
  18020. .sentenTop>div:nth-child(3) {
  18021. background: #409efe;
  18022. color: #fff;
  18023. width: 65px;
  18024. height: 35px;
  18025. text-align: center;
  18026. line-height: 35px;
  18027. border-radius: 5px;
  18028. cursor: pointer;
  18029. }
  18030. .cardList {
  18031. padding: 30px 0 20px 0;
  18032. display: flex;
  18033. flex-direction: row;
  18034. flex-wrap: wrap;
  18035. align-items: center;
  18036. box-sizing: border-box;
  18037. border-bottom: 1px solid #f4f4f4;
  18038. width: 98%;
  18039. margin: 0 auto;
  18040. }
  18041. .rightCardList {
  18042. display: flex;
  18043. flex-wrap: wrap;
  18044. }
  18045. .cardBox {
  18046. display: flex;
  18047. flex-direction: row;
  18048. flex-wrap: wrap;
  18049. align-items: center;
  18050. align-content: center;
  18051. }
  18052. .isCard,
  18053. .isCard1 {
  18054. width: auto;
  18055. padding: 0 20px;
  18056. height: 65px;
  18057. text-align: center;
  18058. line-height: 65px;
  18059. font-size: 14px;
  18060. cursor: pointer;
  18061. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  18062. background-size: 100% 100%;
  18063. position: relative;
  18064. z-index: 99;
  18065. }
  18066. .isCard1 {
  18067. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  18068. }
  18069. .isCard:hover .deleteWord {
  18070. display: block;
  18071. }
  18072. .isCard>div:nth-child(1),
  18073. .isCard1>div:nth-child(1) {
  18074. white-space: nowrap;
  18075. overflow: hidden;
  18076. text-overflow: ellipsis;
  18077. width: 100%;
  18078. margin: 0 auto;
  18079. }
  18080. .card {
  18081. width: 140px;
  18082. height: 65px;
  18083. }
  18084. .card>img {
  18085. width: 100%;
  18086. height: 100%;
  18087. }
  18088. .rightCardBox {
  18089. width: 98%;
  18090. margin: 10px auto 0;
  18091. }
  18092. .rightCardBox>div:nth-child(1) {
  18093. margin-bottom: 10px;
  18094. }
  18095. .cardCss {
  18096. display: flex;
  18097. flex-direction: column;
  18098. flex-wrap: nowrap;
  18099. align-items: center;
  18100. border-bottom: 3px solid #b4c3d3;
  18101. padding: 0 0 5px 0;
  18102. /* margin-right: 10px; */
  18103. }
  18104. .cardCss>div:nth-child(2) {
  18105. background: #5b7b9d;
  18106. color: #fff;
  18107. width: 20px;
  18108. height: 20px;
  18109. border-radius: 50%;
  18110. text-align: center;
  18111. line-height: 20px;
  18112. }
  18113. .sentenTopBox {
  18114. display: flex;
  18115. flex-direction: row;
  18116. flex-wrap: nowrap;
  18117. align-items: center;
  18118. justify-content: space-between;
  18119. padding: 55px 0 0 20px;
  18120. box-sizing: border-box;
  18121. width: 85%;
  18122. }
  18123. .rb_c_ai_box,
  18124. .stepsBottom {
  18125. width: 100%;
  18126. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  18127. /* background: #f7f7f7; */
  18128. border-radius: 10px;
  18129. overflow: hidden;
  18130. /* height: 100%; */
  18131. height: calc(100% - 55px);
  18132. }
  18133. .navTop {
  18134. background: #53749b;
  18135. color: #fff;
  18136. height: 40px;
  18137. line-height: 40px;
  18138. padding-left: 15px;
  18139. font-size: 18px;
  18140. }
  18141. .navBottom {
  18142. /* background: #6b91b7; */
  18143. height: 100%;
  18144. overflow: auto;
  18145. padding: 10px 0;
  18146. }
  18147. .navStage {
  18148. display: flex;
  18149. flex-direction: row;
  18150. flex-wrap: nowrap;
  18151. align-items: center;
  18152. padding: 10px 10px 10px 0;
  18153. cursor: pointer;
  18154. background: #ffffff;
  18155. width: 95%;
  18156. margin: 5px auto 5px;
  18157. box-sizing: border-box;
  18158. border-radius: 5px;
  18159. flex-wrap: wrap;
  18160. position: relative;
  18161. }
  18162. .navStage:hover>.chapter_upload_drag {
  18163. display: block;
  18164. }
  18165. .navTask:hover>.chapter_upload_drag {
  18166. display: block;
  18167. }
  18168. .chapter_upload:hover>.chapter_upload_drag {
  18169. display: block;
  18170. }
  18171. .navStage::before {
  18172. content: "";
  18173. display: block;
  18174. width: 16px;
  18175. height: 16px;
  18176. background-image: url(../../../assets/icon/new/icon_stage.png);
  18177. background-size: 100%;
  18178. margin-left: 25px;
  18179. }
  18180. .navStage .chapter_unit_open {
  18181. content: "";
  18182. display: block;
  18183. width: 16px;
  18184. height: 16px;
  18185. background-image: url(../../../assets/icon/new/down.png);
  18186. transform: rotate(-90deg);
  18187. background-size: 100%;
  18188. margin-left: 10px;
  18189. transition: all 0.5s;
  18190. }
  18191. .isNavStageOpen .chapter_unit_open {
  18192. transform: rotate(0deg);
  18193. }
  18194. .isNavStage {
  18195. background: #0061ff;
  18196. }
  18197. .isNavStage::before {
  18198. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  18199. }
  18200. .isNavStage .chapter_unit_open {
  18201. background-image: url(../../../assets/icon/new/downC.png);
  18202. }
  18203. .isNavStage .nt_taskName {
  18204. font-weight: bold !important;
  18205. color: #ffffff !important;
  18206. }
  18207. .isNavStage .nt_taskTitle {
  18208. font-weight: bold !important;
  18209. color: #fff !important;
  18210. }
  18211. .navStage .nt_taskBox {
  18212. width: calc(100% - 68px);
  18213. padding: 0 0 0 5px;
  18214. box-sizing: border-box;
  18215. box-sizing: border-box;
  18216. display: flex;
  18217. flex-direction: row;
  18218. flex-wrap: nowrap;
  18219. align-items: baseline;
  18220. }
  18221. .navStage .nt_taskTitle {
  18222. color: #060e17;
  18223. line-height: 25px;
  18224. font-size: 16px;
  18225. }
  18226. .navStage .nt_taskName {
  18227. max-width: calc(100% - 82px);
  18228. white-space: nowrap;
  18229. overflow: hidden;
  18230. text-overflow: ellipsis;
  18231. font-size: 16px;
  18232. color: #060e17;
  18233. }
  18234. .navTask {
  18235. display: flex;
  18236. flex-direction: row;
  18237. flex-wrap: nowrap;
  18238. align-items: center;
  18239. padding: 10px 10px 10px 0;
  18240. cursor: pointer;
  18241. background: #ffffff;
  18242. width: 95%;
  18243. margin: 5px auto 5px;
  18244. box-sizing: border-box;
  18245. border-radius: 5px;
  18246. flex-wrap: wrap;
  18247. position: relative;
  18248. }
  18249. .navTask .chapter_upload_open {
  18250. content: "";
  18251. display: block;
  18252. width: 16px;
  18253. height: 16px;
  18254. background-image: url(../../../assets/icon/new/icon_arrow.png);
  18255. background-size: 100%;
  18256. margin-left: 23px;
  18257. }
  18258. .noImage .chapter_upload_open {
  18259. display: none;
  18260. background-image: unset !important;
  18261. }
  18262. .isNavOpen .chapter_upload_open {
  18263. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  18264. transform: rotate(90deg);
  18265. }
  18266. .isNavTask .chapter_upload_open {
  18267. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  18268. transform: rotate(-90deg);
  18269. }
  18270. .isNavTask.isNavOpen .chapter_upload_open {
  18271. transform: rotate(0deg);
  18272. }
  18273. .dragOverTop {
  18274. border-top: 2px solid #0061ff !important;
  18275. border-radius: 0 !important;
  18276. margin-top: 10px;
  18277. }
  18278. .dragOverBottom {
  18279. border-bottom: 2px solid #0061ff !important;
  18280. border-radius: 0 !important;
  18281. margin-top: 10px;
  18282. }
  18283. .dragOverTop2 {
  18284. border-top: 2px solid #0061ff !important;
  18285. border-radius: 0 !important;
  18286. }
  18287. .dragOverBottom2 {
  18288. border-bottom: 2px solid #0061ff !important;
  18289. border-radius: 0 !important;
  18290. }
  18291. .isNavTask {
  18292. /* background: #3681FC; */
  18293. background: #eef3fb;
  18294. }
  18295. .isNavTask>.chapter_upload_drag {
  18296. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  18297. }
  18298. .isNavTask .nt_taskName {
  18299. /* color: #fff !important; */
  18300. font-weight: bold !important;
  18301. color: #0061ff !important;
  18302. }
  18303. .isNavTask .nt_taskTitle {
  18304. /* color: #AECCFE !important; */
  18305. font-weight: bold !important;
  18306. color: #0061ff !important;
  18307. }
  18308. .navTask .nt_taskBox {
  18309. width: calc(100% - 40px);
  18310. padding: 0 0 0 5px;
  18311. box-sizing: border-box;
  18312. box-sizing: border-box;
  18313. display: flex;
  18314. flex-direction: row;
  18315. flex-wrap: nowrap;
  18316. align-items: baseline;
  18317. }
  18318. .navTask .nt_taskTitle {
  18319. /* color: #717C8D; */
  18320. color: #060e17;
  18321. line-height: 25px;
  18322. font-size: 16px;
  18323. /* min-width: 66px; */
  18324. }
  18325. .navTask .nt_taskName {
  18326. /* color: #fff; */
  18327. /* max-width: 130px; */
  18328. /* width: 100%; */
  18329. max-width: calc(100% - 66px);
  18330. font-size: 16px;
  18331. color: #060e17;
  18332. /* color: #0E1E33; */
  18333. }
  18334. .navTask .nt_taskName span {
  18335. width: 100%;
  18336. white-space: nowrap;
  18337. overflow: hidden;
  18338. text-overflow: ellipsis;
  18339. display: block;
  18340. }
  18341. .gjBox {
  18342. width: calc(100% - 25px);
  18343. padding: 0 0 0 0;
  18344. box-sizing: border-box;
  18345. border-left: 1px solid #cad1dc;
  18346. margin-left: 25px;
  18347. }
  18348. .gjBox>div {
  18349. display: flex;
  18350. align-items: center;
  18351. }
  18352. .gjBox>div::before {
  18353. content: "";
  18354. height: 1px;
  18355. width: 10px;
  18356. background: #cad1dc;
  18357. display: block;
  18358. margin-right: 5px;
  18359. }
  18360. .gjCss {
  18361. display: flex;
  18362. flex-direction: row;
  18363. flex-wrap: nowrap;
  18364. align-items: center;
  18365. padding: 15px 0;
  18366. box-sizing: border-box;
  18367. font-size: 14px;
  18368. cursor: pointer;
  18369. }
  18370. .isGjCss {
  18371. color: #0061ff;
  18372. }
  18373. .groupBox {}
  18374. .groupContent+.groupContent {
  18375. margin-top: 30px;
  18376. }
  18377. .groupTitle {
  18378. font-size: 24px;
  18379. color: rgb(80, 80, 80);
  18380. margin-bottom: 20px;
  18381. }
  18382. .groupName {
  18383. display: flex;
  18384. align-items: center;
  18385. }
  18386. .groupn {
  18387. font-size: 15px;
  18388. margin-right: 10px;
  18389. }
  18390. .groupName+.groupName {
  18391. margin-top: 15px;
  18392. }
  18393. .groupBtn {
  18394. margin-left: 10px;
  18395. }
  18396. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  18397. text-align: left;
  18398. }
  18399. .radioBox>div {
  18400. margin: 10px 0 0 10px;
  18401. }
  18402. .radioBox>>>.el-radio__input,
  18403. .radioBox>>>.el-checkbox__inner {
  18404. margin-left: 10px;
  18405. }
  18406. .radioBox>>>.el-radio__label,
  18407. .radioBox>>>.el-checkbox__label {
  18408. display: flex;
  18409. align-items: center;
  18410. }
  18411. .inImg {
  18412. width: 50px;
  18413. }
  18414. .inImg>img {
  18415. width: 100%;
  18416. height: 100%;
  18417. object-fit: cover;
  18418. }
  18419. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  18420. height: auto;
  18421. padding: 10px;
  18422. margin: 0;
  18423. }
  18424. .upCss>>>.el-upload-list {
  18425. width: 100%;
  18426. }
  18427. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  18428. width: 100%;
  18429. height: 120px;
  18430. object-fit: contain;
  18431. background: unset;
  18432. margin-left: 0;
  18433. }
  18434. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  18435. display: none;
  18436. }
  18437. .tcMember+.tcMember::before {
  18438. content: "、";
  18439. }
  18440. .xzUpImg {
  18441. width: 25px;
  18442. height: 25px;
  18443. min-width: 25px;
  18444. min-height: 25px;
  18445. cursor: pointer;
  18446. margin: 0 10px;
  18447. }
  18448. .xzUpImg>img {
  18449. width: 100%;
  18450. height: 100%;
  18451. }
  18452. .closeCss {
  18453. position: absolute;
  18454. top: 8px;
  18455. right: 8px;
  18456. cursor: pointer;
  18457. width: 20px;
  18458. height: 20px;
  18459. }
  18460. .closeCss>img {
  18461. width: 100%;
  18462. height: 100%;
  18463. }
  18464. .moveBtn {
  18465. display: flex;
  18466. flex-direction: row;
  18467. flex-wrap: nowrap;
  18468. align-items: center;
  18469. width: 55px;
  18470. }
  18471. .timuUpImg {
  18472. display: flex;
  18473. flex-direction: row;
  18474. align-items: center;
  18475. width: 100%;
  18476. margin-right: 10px;
  18477. }
  18478. .timuUpImg>div:nth-child(1) {
  18479. margin-right: 10px;
  18480. display: flex;
  18481. align-items: center;
  18482. width: 100%;
  18483. }
  18484. .timuImgBox {
  18485. margin: 10px 0;
  18486. display: flex;
  18487. flex-direction: column;
  18488. flex-wrap: wrap;
  18489. align-items: flex-start;
  18490. }
  18491. .timuImg {
  18492. width: 100px;
  18493. margin: 5px 0;
  18494. cursor: pointer;
  18495. position: relative;
  18496. }
  18497. .timuImg:hover .deleteWord {
  18498. display: block;
  18499. }
  18500. .deleteWord {
  18501. width: 25px;
  18502. height: 25px;
  18503. position: absolute;
  18504. right: -5px;
  18505. top: -5px;
  18506. cursor: pointer;
  18507. display: none;
  18508. }
  18509. .timuImg>img,
  18510. .deleteWord>img {
  18511. width: 100%;
  18512. height: 100%;
  18513. object-fit: cover;
  18514. }
  18515. .e_add_delete {
  18516. cursor: pointer;
  18517. margin-left: 10px;
  18518. }
  18519. .pType_box {
  18520. margin-top: 30px;
  18521. align-items: flex-end;
  18522. }
  18523. .noneBox {
  18524. height: 200px;
  18525. width: 100%;
  18526. display: flex;
  18527. align-items: center;
  18528. justify-content: center;
  18529. flex-direction: column;
  18530. /* margin-top: 150px; */
  18531. }
  18532. .noneBox>img {
  18533. width: 95px;
  18534. }
  18535. .noneBox>span {
  18536. margin-top: 10px;
  18537. color: #717c8d;
  18538. }
  18539. .rb_c_box {
  18540. width: 100%;
  18541. height: 100%;
  18542. display: flex;
  18543. /* padding: 20px; */
  18544. box-sizing: border-box;
  18545. justify-content: space-between;
  18546. }
  18547. .rb_c_box_left {
  18548. height: 100%;
  18549. background: #fff;
  18550. width: 270px;
  18551. min-width: 270px;
  18552. border-radius: 8px;
  18553. margin-right: 10px;
  18554. }
  18555. .rb_c_box_right {
  18556. height: 100%;
  18557. width: calc(100%);
  18558. overflow: hidden;
  18559. }
  18560. .rb_c_box_btn {
  18561. display: flex;
  18562. justify-content: flex-start;
  18563. height: 50px;
  18564. align-items: center;
  18565. }
  18566. .rb_c_box_right>.basic_box {
  18567. /* background: #fff; */
  18568. border-radius: 0;
  18569. height: calc(100% - 0px);
  18570. overflow: auto;
  18571. padding: 0;
  18572. }
  18573. .textarea_css {
  18574. display: block;
  18575. resize: none;
  18576. padding: 10px 15px;
  18577. line-height: 1.5;
  18578. box-sizing: border-box;
  18579. width: 100%;
  18580. font-size: 14px;
  18581. color: #606266;
  18582. background-color: #fff;
  18583. background-image: none;
  18584. border: 1px solid #dcdfe6;
  18585. border-radius: 4px;
  18586. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  18587. outline: none;
  18588. overflow: hidden;
  18589. height: 46px;
  18590. font-family: "Microsoft YaHei";
  18591. }
  18592. .textarea_css::-webkit-input-placeholder {
  18593. color: #c0c4cc;
  18594. }
  18595. .textarea_css:focus {
  18596. border-color: #409eff;
  18597. outline: 0;
  18598. }
  18599. .addEditor>>>.text {
  18600. height: auto;
  18601. min-height: 100px;
  18602. }
  18603. .addEditor>>>.w-e-text-container {
  18604. min-height: 100px;
  18605. }
  18606. .moveBtn2 {
  18607. flex-direction: column;
  18608. width: fit-content;
  18609. margin: 0 10px 0 10px;
  18610. }
  18611. .moveBtn2 .chapter_upload_down,
  18612. .moveBtn2 .chapter_upload_up {
  18613. width: 16px;
  18614. height: 16px;
  18615. }
  18616. .moveBtn2 .chapter_upload_up::after,
  18617. .moveBtn2 .chapter_upload_down::after {
  18618. width: 10px;
  18619. height: 10px;
  18620. }
  18621. .fullStyle>>>.el-dialog__body {
  18622. height: calc(100% - 125px) !important;
  18623. box-sizing: border-box;
  18624. }
  18625. .fullStyle1>>>.el-dialog__body {
  18626. height: auto !important;
  18627. }
  18628. .fullStyle>>>.el-dialog {
  18629. width: 100% !important;
  18630. max-width: 100% !important;
  18631. height: 100% !important;
  18632. margin: 0 !important;
  18633. }
  18634. .fullStyle {
  18635. width: 100% !important;
  18636. max-width: 100% !important;
  18637. height: 100% !important;
  18638. margin: 0 auto !important;
  18639. }
  18640. .wb_j_box_btn {
  18641. width: calc(100% - 30px);
  18642. display: flex;
  18643. height: 40px;
  18644. border: 1.5px solid #cad1dc;
  18645. border-radius: 4px;
  18646. box-sizing: border-box;
  18647. align-items: center;
  18648. font-size: 14px;
  18649. cursor: pointer;
  18650. overflow: hidden;
  18651. }
  18652. .wb_j_box_btn:hover {
  18653. border: 1.5px solid #0061ff;
  18654. }
  18655. .wb_j_box_title {
  18656. background: #f0f4fa;
  18657. height: 100%;
  18658. line-height: 40px;
  18659. width: 90px;
  18660. text-align: center;
  18661. color: #060e17;
  18662. border-right: 1.5px solid #cad1dc;
  18663. box-sizing: border-box;
  18664. }
  18665. .wb_j_box_btn_c {
  18666. width: calc(100% - 90px);
  18667. padding: 0 35px 0 10px;
  18668. box-sizing: border-box;
  18669. position: relative;
  18670. }
  18671. .wb_j_box_span {
  18672. width: 100%;
  18673. overflow: hidden;
  18674. white-space: nowrap;
  18675. text-overflow: ellipsis;
  18676. word-wrap: break-word;
  18677. color: #717c8d;
  18678. }
  18679. .wb_j_box_arrow {
  18680. content: "";
  18681. width: 14px;
  18682. height: 14px;
  18683. background: url(../../../assets/icon/new/u_arrow.png);
  18684. background-size: 100% 100%;
  18685. position: absolute;
  18686. right: 12px;
  18687. top: 50%;
  18688. transform: translateY(-50%);
  18689. }
  18690. .check_classBox {
  18691. height: 400px;
  18692. display: flex;
  18693. border-top: 1.5px solid #e7ebf1;
  18694. border-bottom: 1.5px solid #e7ebf1;
  18695. }
  18696. .check_class_right {
  18697. width: 130px;
  18698. border-right: 1px solid #e7ebf1;
  18699. display: flex;
  18700. align-items: center;
  18701. flex-direction: column;
  18702. height: 100%;
  18703. overflow: auto;
  18704. padding: 15px 0;
  18705. box-sizing: border-box;
  18706. }
  18707. .check_class {
  18708. width: 85%;
  18709. border-radius: 5px;
  18710. height: 30px;
  18711. min-height: 30px;
  18712. line-height: 30px;
  18713. text-align: center;
  18714. padding: 0 10px;
  18715. box-sizing: border-box;
  18716. cursor: pointer;
  18717. white-space: nowrap;
  18718. overflow: hidden;
  18719. text-overflow: ellipsis;
  18720. }
  18721. .check_class.activeX {
  18722. background: #e0eafb;
  18723. color: #3681fc;
  18724. font-weight: 700;
  18725. }
  18726. .check_class+.check_class {
  18727. margin-top: 15px;
  18728. }
  18729. .check_class_left {
  18730. background: #fafafa;
  18731. width: calc(100% - 130px);
  18732. padding: 15px;
  18733. box-sizing: border-box;
  18734. }
  18735. .check_class_all_box {
  18736. display: flex;
  18737. margin-bottom: 10px;
  18738. }
  18739. .all_check {
  18740. display: flex;
  18741. align-items: center;
  18742. padding: 2px 0 0;
  18743. margin-left: 10px;
  18744. }
  18745. .all_check>>>.el-checkbox__label {
  18746. line-height: 18px;
  18747. }
  18748. .check_class_left_title {
  18749. font-size: 16px;
  18750. font-weight: 700;
  18751. }
  18752. .check_class_item {
  18753. display: flex;
  18754. flex-wrap: wrap;
  18755. height: calc(100% - 45px);
  18756. overflow: auto;
  18757. justify-content: flex-start;
  18758. align-items: flex-start;
  18759. align-content: flex-start;
  18760. }
  18761. .class_item:first-child {
  18762. /* margin: 0 15px 15px 67px; */
  18763. }
  18764. .class_item {
  18765. margin: 0 15px 15px 0;
  18766. }
  18767. .class_item:hover>>>.el-checkbox__label {
  18768. color: #409eff;
  18769. }
  18770. .class_item>>>.el-checkbox__label {
  18771. color: #0e1e33;
  18772. }
  18773. .class_item:hover>>>.el-checkbox__inner {
  18774. border-color: #409eff;
  18775. }
  18776. .class_item>>>.el-checkbox,
  18777. .class_item>>>.el-checkbox__input {
  18778. display: flex;
  18779. align-items: center;
  18780. }
  18781. .taskTitle {
  18782. font-size: 20px;
  18783. font-weight: bold;
  18784. margin-bottom: 35px;
  18785. }
  18786. .taskTitle:after {
  18787. content: "";
  18788. width: 100%;
  18789. display: block;
  18790. height: 1px;
  18791. background: #cad1dc;
  18792. position: absolute;
  18793. left: 0;
  18794. margin: 15px 0 0;
  18795. }
  18796. .eva_btn_box {
  18797. margin: 20px 0px 0 0;
  18798. display: flex;
  18799. flex-direction: row;
  18800. flex-wrap: nowrap;
  18801. align-items: center;
  18802. justify-content: space-between;
  18803. width: 100%;
  18804. }
  18805. .eva_btn_left_box {
  18806. display: flex;
  18807. flex-direction: row;
  18808. flex-wrap: nowrap;
  18809. align-items: center;
  18810. }
  18811. .addTypeChoose {
  18812. display: flex;
  18813. flex-direction: row;
  18814. flex-wrap: nowrap;
  18815. align-items: center;
  18816. margin: 15px 0;
  18817. }
  18818. .addTypeBox {
  18819. display: flex;
  18820. flex-direction: column;
  18821. flex-wrap: nowrap;
  18822. align-items: center;
  18823. }
  18824. .addTypeChoose {
  18825. display: flex;
  18826. flex-direction: row;
  18827. flex-wrap: nowrap;
  18828. align-items: center;
  18829. margin: 15px 0;
  18830. }
  18831. .buchong_box {
  18832. background: #E0EAFB66;
  18833. width: calc(100% - 20px);
  18834. min-height: 50px;
  18835. display: flex;
  18836. align-items: center;
  18837. justify-content: center;
  18838. margin: 0 auto;
  18839. }
  18840. .outline {
  18841. width: calc(100% - 40px);
  18842. margin: 0 auto;
  18843. }
  18844. .task_outline {
  18845. width: calc(100% - 40px);
  18846. margin: 0 auto;
  18847. }
  18848. .outline_box+.outline_box {
  18849. margin: 30px 0 0px;
  18850. }
  18851. .outline_task {
  18852. display: flex;
  18853. align-items: center;
  18854. margin-bottom: 10px;
  18855. }
  18856. .outline_task .title {
  18857. font-size: 18px;
  18858. font-weight: bold;
  18859. min-width: 80px;
  18860. }
  18861. .op_task_box,
  18862. .op_tool_box,
  18863. .outline_detail {
  18864. position: relative;
  18865. }
  18866. .op_task_box:hover .op_box,
  18867. .op_tool_box:hover .op_box,
  18868. .outline_detail:hover .op_box {
  18869. display: flex
  18870. }
  18871. .op_box {
  18872. position: absolute;
  18873. bottom: 10px;
  18874. display: none;
  18875. align-items: center;
  18876. justify-content: space-between;
  18877. width: calc(100% - 20px);
  18878. left: 50%;
  18879. transform: translateX(-50%);
  18880. }
  18881. .op_box .op_remark {
  18882. color: #8E8E8E;
  18883. font-size: 14px;
  18884. }
  18885. .rb_c_nav {
  18886. width: calc(100% - 20px);
  18887. margin: 15px auto 0;
  18888. font-size: 18px;
  18889. }
  18890. .rb_c_nav span {
  18891. cursor: pointer;
  18892. }
  18893. .rb_c_nav span+span {
  18894. margin-left: 10px;
  18895. }
  18896. .rb_c_nav span.active {
  18897. color: #0061FF
  18898. }
  18899. .text_panel>>>.text {
  18900. height: 400px;
  18901. }
  18902. .markBox{
  18903. padding: 20px 14px;
  18904. line-height: 29px;
  18905. font-size: 16px;
  18906. background: #f4f4f4;
  18907. border-radius: 5px;
  18908. }
  18909. .info_box_t{
  18910. display: flex;
  18911. align-items: center;
  18912. }
  18913. .info_box_t_box{
  18914. display: flex;
  18915. align-items: center;
  18916. }
  18917. .info_box_t_box + .info_box_t_box{
  18918. margin-left: 10px;
  18919. }
  18920. .info_box_t_box > span{
  18921. width: fit-content
  18922. }
  18923. .info_box_t_box > input{
  18924. width: 150px !important;
  18925. margin: 0 5px 0 0;
  18926. }
  18927. </style>