addCourse.vue 1002 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelOutline">停止</div>
  4. <div class="pb_content_body" style="position: relative; margin: 0">
  5. <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  6. <div class="courseTop">
  7. <div class="stepsNav">
  8. <el-breadcrumb separator-class="el-icon-arrow-right">
  9. <el-breadcrumb-item :to="{
  10. path:
  11. '/course?userid=' +
  12. userid +
  13. '&oid=' +
  14. oid +
  15. '&org=' +
  16. org +
  17. '&role=' +
  18. role,
  19. }">课程管理</el-breadcrumb-item>
  20. <el-breadcrumb-item>
  21. <span style="color: rgb(15, 126, 255)">添加课程</span>
  22. </el-breadcrumb-item>
  23. </el-breadcrumb>
  24. </div>
  25. <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  26. </div>
  27. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  28. <!-- @mouseenter="stepDisplay(true)"
  29. @mouseleave="stepDisplay(false)" -->
  30. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  31. <div class="stepBg" v-if="false">
  32. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  33. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  34. <div>
  35. <img src="../../../assets/icon/first.png" alt />
  36. </div>
  37. <div>填写基本信息</div>
  38. </div>
  39. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  40. <div>
  41. <img src="../../../assets/icon/firstNo.png" alt />
  42. </div>
  43. <div>填写基本信息</div>
  44. </div>
  45. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  46. </div>
  47. <!-- <div
  48. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  49. class="second"
  50. @click="navSteps(2)"
  51. >
  52. <div style="margin: 5px 10px 0 0; width: 2rem">
  53. <img src="../../../assets/icon/second.png" alt />
  54. </div>
  55. <div>选择课程模板</div>
  56. </div>
  57. <div
  58. v-else-if="cidType === 0 && isStepDisplay"
  59. class="secondNo"
  60. @click="navSteps(2)"
  61. >
  62. <div>
  63. <img src="../../../assets/icon/secondNo.png" alt />
  64. </div>
  65. <div>选择课程模板</div>
  66. </div> -->
  67. <!-- <div
  68. v-if="isStepDisplay"
  69. class="stepBorder"
  70. :class="{ 'border-active': steps > 2 }"
  71. ></div> -->
  72. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  73. <div>
  74. <img src="../../../assets/icon/third.png" alt />
  75. </div>
  76. <div>上传课程内容</div>
  77. </div>
  78. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  79. <div>
  80. <img src="../../../assets/icon/thirdNo.png" alt />
  81. </div>
  82. <div>上传课程内容</div>
  83. </div>
  84. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  85. <div v-if="steps > 3 && isStepDisplay" class="four">
  86. <div>
  87. <img src="../../../assets/icon/four.png" alt />
  88. </div>
  89. <div>上传完成</div>
  90. </div>
  91. <div v-else-if="isStepDisplay" class="fourNo">
  92. <div>
  93. <img src="../../../assets/icon/fourNo.png" alt />
  94. </div>
  95. <div>上传完成</div>
  96. </div>
  97. </div>
  98. </div>
  99. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  100. style="padding: 0" :style="{
  101. height:
  102. !isStepDisplay && !isBtnDisplay
  103. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  104. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  105. }">
  106. <div class="updateMask" :style="{
  107. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  108. }" v-if="cid && userid != courseUserid && role != '1'"></div>
  109. <div class="whiteBg" style="background: unset; padding: 0">
  110. <div>
  111. <div class="basic_box" style="padding: 0">
  112. <div class="big_box">
  113. <div class="left_first">
  114. <div :class="{
  115. updateTips:
  116. cid && userid != courseUserid && role != '1',
  117. }">
  118. <div style="width: 100%">
  119. <div class="course_input_box">
  120. <div class="bb_courseIcon">
  121. <img src="../../../assets/icon/new/course.png" />
  122. </div>
  123. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" style="
  124. border: 1.5px solid rgb(202, 209, 220);
  125. margin: 0px 10px 0px 0px;
  126. border-radius: 5px;
  127. font-weight: 600;
  128. padding: 12px 14px 12px 71px;
  129. " @change="setCover" />
  130. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  131. style="justify-content: center; min-width: 150px"></el-switch>
  132. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  133. style="justify-content: center; min-width: 175px"></el-switch>
  134. </div>
  135. </div>
  136. </div>
  137. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  138. <span>类型</span>
  139. <!-- 学科+ 主题+ 未来+ -->
  140. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  141. style="display: flex; align-items: center">
  142. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  143. :key="index">
  144. <el-radio :label="item.name">{{
  145. item.name
  146. }}</el-radio>
  147. </div>
  148. </el-radio-group>
  149. </div>
  150. <div class="both">
  151. <div class="choose">
  152. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  153. <span v-if="
  154. CourseTypeJson[item.id].length > 0 &&
  155. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  156. ? pTypeCheck.indexOf(item.id) != -1
  157. : true)
  158. ">{{ item.name }}:</span>
  159. <el-checkbox-group v-model="courseTypeId" v-if="
  160. CourseTypeJson[item.id].length > 0 &&
  161. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  162. ? pTypeCheck.indexOf(item.id) != -1
  163. : true)
  164. ">
  165. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  166. item1.name }}</el-checkbox>
  167. </el-checkbox-group>
  168. <!-- <div
  169. v-else
  170. style="font-size: 14px; margin-left: -8px"
  171. >
  172. 暂无
  173. </div> -->
  174. </div>
  175. </div>
  176. </div>
  177. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  178. <div class="info_box_t_box">
  179. <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  180. style="justify-content: center; min-width: 175px"></el-switch>
  181. </div>
  182. <div class="info_box_t_box">
  183. <span>AI生成模式:</span>
  184. <div class="mode_box">
  185. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  186. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  187. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  188. </div>
  189. </div>
  190. </div>
  191. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  192. <div class="info_box_t_box">
  193. <span>课程节数:</span>
  194. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  195. <span>节</span>
  196. </div>
  197. <div class="info_box_t_box">
  198. <span>课程时长:</span>
  199. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  200. <span>min</span>
  201. </div>
  202. </div> -->
  203. </div>
  204. <div class="right_first" v-loading="imageloading2">
  205. <!-- <div class="ai_box">
  206. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  207. </div> -->
  208. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  209. 上传封面
  210. </div>
  211. <div style="width: 100%">
  212. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  213. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  214. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  215. <div v-if="cover.length == 0">点击添加封面</div>
  216. <div class="cover_mask">
  217. <img src="../../../assets/icon/new/cover_update.png" /><span
  218. style="margin-top: 5px">修改封面</span>
  219. </div>
  220. </div>
  221. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  222. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  223. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  224. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  225. <i class="el-icon-plus"></i>
  226. </el-upload> -->
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. </div>
  233. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  234. <div class="whiteBg" style="border-radius: 0">
  235. <div class="c_info_title">
  236. 课程权限设置
  237. </div>
  238. <div class="wb_j_box">
  239. <div class="wb_j_box_content">
  240. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  241. (dialogVisibleClass = true),
  242. (classSearch = ''),
  243. (gradeId = ''),
  244. getClass()
  245. ">添加班级</button>
  246. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  247. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  248. getClassC(tc) }}</span>
  249. </div> -->
  250. <div class="wb_j_box_btn" @click="
  251. (dialogVisibleClass = true),
  252. (classSearch = ''),
  253. (gradeId = ''),
  254. getClass()
  255. ">
  256. <div class="wb_j_box_title">授课班级</div>
  257. <div class="wb_j_box_btn_c">
  258. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  259. v-if="checkboxList2.length" popper-class="text_tooltip2">
  260. <div class="wb_j_box_span">
  261. {{ getListClassC(checkboxList2) }}
  262. </div>
  263. </el-tooltip>
  264. <div v-else class="wb_j_box_span">请选择授课班级</div>
  265. <div class="wb_j_box_arrow"></div>
  266. </div>
  267. </div>
  268. </div>
  269. <div class="wb_j_box_content">
  270. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  271. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  272. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  273. checkBoolean
  274. ? checkboxList3
  275. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  276. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  277. </div> -->
  278. <div class="wb_j_box_btn" @click="openMember">
  279. <div class="wb_j_box_title">协同人员</div>
  280. <div class="wb_j_box_btn_c">
  281. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  282. v-if="checkboxList3.length" popper-class="text_tooltip2">
  283. <div class="wb_j_box_span">
  284. {{ getListMan2(checkboxList3) }}
  285. </div>
  286. </el-tooltip>
  287. <div v-else class="wb_j_box_span">请选择协同人员</div>
  288. <div class="wb_j_box_arrow"></div>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. </div>
  294. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  295. <div class="c_info_title">目标管理</div>
  296. <div style="margin: 0 auto; padding: 0 20px">
  297. <div style="
  298. width: 95%;
  299. min-height: 200px;
  300. border: 1px solid #cad1dc;
  301. border-radius: 4px;
  302. position: relative;
  303. ">
  304. <div class="e_add_top">
  305. <div class="e_add_title">
  306. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  307. 清除
  308. </button>
  309. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  310. 添加
  311. </button>
  312. <!-- <span>当前使用目标管理</span>
  313. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  314. <img
  315. src="../../../assets/line.png"
  316. class="cru_line"
  317. style="
  318. width: 125px;
  319. height: 20px;
  320. bottom: -10px;
  321. left: 155px;
  322. "
  323. /> -->
  324. </div>
  325. <div style="
  326. display: flex;
  327. flex-direction: row;
  328. align-items: center;
  329. ">
  330. <!-- <el-button
  331. type="primary"
  332. size="small"
  333. @click="dialogVisiblemb = true"
  334. >添加目标管理</el-button
  335. >
  336. <el-button
  337. type="primary"
  338. size="small"
  339. @click="deleteEva()"
  340. >清除内容</el-button
  341. > -->
  342. <!-- <div class="e_add_delete" @click="deleteEva()">
  343. <img src="../../../assets/icon/delete.png" alt="" />
  344. </div> -->
  345. </div>
  346. </div>
  347. <div v-if="evalua == ''">
  348. <div class="noneBox">
  349. <img src="../../../assets/icon/new/eva_none.png" />
  350. <span>请添加目标管理</span>
  351. </div>
  352. </div>
  353. <div class="e_add_content" v-else>
  354. <div class="e_add_list_pbox">
  355. <div class="e_add_list_pbox_title">
  356. <span class="type_title">切换模式</span>
  357. <div class="type_content">
  358. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  359. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  360. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  361. </div>
  362. </div>
  363. <div class="e_add_list_pbox_content">
  364. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  365. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  366. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  367. v-if="typeMode == 3">
  368. </SeeBoard>
  369. </div>
  370. </div>
  371. </div>
  372. </div>
  373. </div>
  374. </div>
  375. </div>
  376. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  377. <div style="position: relative;
  378. background: #fff;
  379. box-sizing: border-box;
  380. padding: 1px 20px 10px;
  381. width: 100%;
  382. border-radius: 10px;">
  383. <div style="
  384. display: flex;
  385. flex-direction: row;
  386. justify-content: space-between;
  387. align-items: center;
  388. " :style="{
  389. margin: true
  390. ? '20px 0 10px'
  391. : '20px 0 0',
  392. }">
  393. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  394. 已有教案
  395. <div class="add_info_box" style="margin: 0 0 0 auto">
  396. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  397. 上传已有教案
  398. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  399. beforeUploadInfo2(
  400. $event,
  401. 14
  402. )
  403. " />
  404. </button>
  405. <button class="c_pub_button_add" @click="clickGenTT">
  406. 一键智能总结生成
  407. </button>
  408. </div>
  409. </div>
  410. </div>
  411. <div>
  412. <div class="add_chapters_box add_c_none" v-if="
  413. teacherInfoData &&
  414. teacherInfoData.length == 0
  415. ">
  416. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  417. </div>
  418. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  419. <div @dragstart="
  420. dragStart(item1, index1, 0)
  421. " @dragover.prevent="
  422. dragOver(index1, 0)
  423. " @dragend="dragEnd()" :draggable="isdrag ==
  424. 'chapter-' + 0 + '-' + index1
  425. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  426. getChapterData(
  427. $event,
  428. index1,
  429. item1.type
  430. )
  431. " :class="{
  432. dragOverTop2:
  433. newIndex === index1 &&
  434. typeIndex ==
  435. 'chapter-' +
  436. 0 +
  437. '-' +
  438. index1 &&
  439. oldIndex > index1 &&
  440. dragType == 'drag',
  441. dragOverBottom2:
  442. newIndex === index1 &&
  443. typeIndex ==
  444. 'chapter-' +
  445. 0 +
  446. '-' +
  447. index1 &&
  448. oldIndex < index1 &&
  449. dragType == 'drag',
  450. }">
  451. <div class="chapter_upload_o" style="
  452. position: relative;
  453. display: flex;
  454. align-items: center;
  455. ">
  456. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  457. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  458. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  459. </div>
  460. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  461. </div>
  462. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  463. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  464. </div>
  465. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  466. </div>
  467. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  468. </div>
  469. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  470. </div>
  471. </div>
  472. <div class="chapter_upload_n">
  473. <input readonly="true" v-if="
  474. item1.type == 2 ||
  475. item1.type == 3 ||
  476. item1.type == 12 ||
  477. item1.type == 13 ||
  478. item1.type == 7
  479. " :placeholder="item1.name" style="
  480. border: none;
  481. outline: none;
  482. width: 80%;
  483. minwidth: 215px;
  484. z-index: 99;
  485. font-size: 14px;
  486. white-space: nowrap;
  487. overflow: hidden;
  488. text-overflow: ellipsis;
  489. " />
  490. </div>
  491. <div class="chapter_upload_ic">
  492. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  493. <div class="chapter_upload_ic_r" @click.stop="
  494. deleteTeacherInfoData(
  495. $event,
  496. index1
  497. )
  498. ">
  499. <div></div>
  500. </div>
  501. </div>
  502. </div>
  503. </div>
  504. </div>
  505. </div>
  506. <div v-if="
  507. teacherinfoproVisible
  508. " class="mask">
  509. <div class="progressBox">
  510. <div class="lbox">
  511. <img src="../../../assets/loading.gif" />上传中,请稍后
  512. </div>
  513. <div style="margin-bottom: 10px">
  514. <span>{{
  515. teacherinfoisFinishSize
  516. }}</span>
  517. /
  518. <span>{{
  519. teacherinfoisAllSize
  520. }}</span>
  521. </div>
  522. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  523. ? teacherinfoprogress
  524. : 0
  525. " style="width: 80%"></el-progress> -->
  526. </div>
  527. </div>
  528. </div>
  529. </div>
  530. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  531. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  532. <div class="c_info_title">
  533. 已有教案摘要
  534. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  535. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  536. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1)"
  537. @click="openAiDialog(2, 'aiteacherTextDetail',1)">提取摘要</button>
  538. </el-tooltip>
  539. </div>
  540. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  541. <div style="width: calc(100%);" class='op_task_box'>
  542. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  543. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  544. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  545. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  546. <div class="op_box">
  547. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  548. <div style="display: flex;">
  549. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  550. <div class="r_pub_button_op"
  551. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
  552. @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
  553. </el-tooltip>
  554. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  555. </div>
  556. </div>
  557. </div>
  558. </div>
  559. </div>
  560. </div>
  561. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT">
  562. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  563. <div class="c_info_title">
  564. 课程目标
  565. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  566. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  567. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1)"
  568. @click="openAiDialog(2, 'aitargetTextDetail',1)">提取目标</button>
  569.                   </el-tooltip>
  570. </div>
  571. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  572. <div style="width: calc(100%);" class='op_task_box'>
  573. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  574. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  575. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  576. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  577. <div class="op_box">
  578. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  579. <div style="display: flex;">
  580. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  581. <div class="r_pub_button_op"
  582. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
  583. @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
  584. </el-tooltip>
  585. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  586. </div>
  587. </div>
  588. </div>
  589. </div>
  590. </div>
  591. </div>
  592. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  593. <div style="position: relative;
  594. background: #fff;
  595. box-sizing: border-box;
  596. padding: 1px 20px 10px;
  597. width: 100%;
  598. border-radius: 10px;">
  599. <div style="
  600. display: flex;
  601. flex-direction: row;
  602. justify-content: space-between;
  603. align-items: center;
  604. " :style="{
  605. margin: true
  606. ? '20px 0 10px'
  607. : '20px 0 0',
  608. }">
  609. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  610. 系统推荐参考资料
  611. <div class="add_info_box" style="margin: 0 0 0 auto">
  612. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  613. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  614. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  615. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  616.  </el-tooltip>
  617. </div>
  618. </div>
  619. </div>
  620. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  621. <div class="add_chapters_box add_c_none" v-if="
  622. cankaoInfoData &&
  623. cankaoInfoData.length == 0
  624. ">
  625. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  626. </div>
  627. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  628. <div @dragstart="
  629. dragStart(item1, index1, 0)
  630. " @dragover.prevent="
  631. dragOver(index1, 0)
  632. " @dragend="dragEnd()" :draggable="isdrag ==
  633. 'chapter-' + 0 + '-' + index1
  634. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  635. getChapterData(
  636. $event,
  637. index1,
  638. item1.type
  639. )
  640. " :class="{
  641. dragOverTop2:
  642. newIndex === index1 &&
  643. typeIndex ==
  644. 'chapter-' +
  645. 0 +
  646. '-' +
  647. index1 &&
  648. oldIndex > index1 &&
  649. dragType == 'drag',
  650. dragOverBottom2:
  651. newIndex === index1 &&
  652. typeIndex ==
  653. 'chapter-' +
  654. 0 +
  655. '-' +
  656. index1 &&
  657. oldIndex < index1 &&
  658. dragType == 'drag',
  659. }">
  660. <div class="chapter_upload_o" style="
  661. position: relative;
  662. display: flex;
  663. align-items: center;
  664. ">
  665. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  666. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  667. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  668. </div>
  669. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  670. </div>
  671. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  672. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  673. </div>
  674. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  675. </div>
  676. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  677. </div>
  678. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  679. </div>
  680. </div>
  681. <div class="chapter_upload_n">
  682. <input readonly="true" v-if="
  683. item1.type == 2 ||
  684. item1.type == 3 ||
  685. item1.type == 12 ||
  686. item1.type == 13 ||
  687. item1.type == 7
  688. " :placeholder="item1.name" style="
  689. border: none;
  690. outline: none;
  691. width: 80%;
  692. minwidth: 215px;
  693. z-index: 99;
  694. font-size: 14px;
  695. white-space: nowrap;
  696. overflow: hidden;
  697. text-overflow: ellipsis;
  698. " />
  699. </div>
  700. <div class="chapter_upload_ic">
  701. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  702. <div class="chapter_upload_ic_r" @click.stop="
  703. deleteCankaoInfoData(
  704. $event,
  705. index1
  706. )
  707. ">
  708. <div></div>
  709. </div>
  710. </div>
  711. </div>
  712. </div>
  713. </div>
  714. </div>
  715. </div>
  716. </div>
  717. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  718. <div style="position: relative;
  719. background: #fff;
  720. box-sizing: border-box;
  721. padding: 1px 20px 10px;
  722. width: 100%;
  723. border-radius: 10px;">
  724. <div style="
  725. display: flex;
  726. flex-direction: row;
  727. justify-content: space-between;
  728. align-items: center;
  729. " :style="{
  730. margin: true
  731. ? '20px 0 10px'
  732. : '20px 0 0',
  733. }">
  734. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  735. 知识库
  736. <div class="add_info_box" style="margin: 0 0 0 auto">
  737. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  738. 上传补充资料
  739. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  740. beforeUploadInfo2(
  741. $event,
  742. 15
  743. )
  744. " />
  745. </button>
  746. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  747. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  748. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  749. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  750.  </el-tooltip>
  751. </div>
  752. </div>
  753. </div>
  754. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  755. <div class="add_chapters_box add_c_none" v-if="
  756. infoData2 &&
  757. infoData2.length == 0
  758. ">
  759. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  760. </div>
  761. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  762. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  763. getChapterData(
  764. $event,
  765. index1,
  766. item1.type
  767. )
  768. " >
  769. <div class="chapter_upload_o" style="
  770. position: relative;
  771. display: flex;
  772. align-items: center;
  773. ">
  774. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  775. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  776. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  777. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  778. </div>
  779. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  780. </div>
  781. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  782. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  783. </div>
  784. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  785. </div>
  786. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  787. </div>
  788. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  789. </div>
  790. </div>
  791. <div class="chapter_upload_n">
  792. <input readonly="true" v-if="
  793. item1.type == 2 ||
  794. item1.type == 3 ||
  795. item1.type == 12 ||
  796. item1.type == 13 ||
  797. item1.type == 7
  798. " :placeholder="item1.name" @click.stop="
  799. checkChpater2($event, index1 )
  800. " style="
  801. border: none;
  802. outline: none;
  803. width: 80%;
  804. minwidth: 215px;
  805. z-index: 99;
  806. font-size: 14px;
  807. white-space: nowrap;
  808. overflow: hidden;
  809. text-overflow: ellipsis;
  810. " />
  811. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  812. border: none;
  813. outline: none;
  814. width: 80%;
  815. white-space: nowrap;
  816. overflow: hidden;
  817. text-overflow: ellipsis;
  818. " readonly="true" @click="
  819. selectAttText(index1)
  820. " />
  821. <input :placeholder="item1.title ? item1.title : '链接'
  822. " v-if="item1.type == 8" style="
  823. border: none;
  824. outline: none;
  825. width: 80%;
  826. white-space: nowrap;
  827. overflow: hidden;
  828. text-overflow: ellipsis;
  829. " readonly="true" @click="selectLine(index1)" />
  830. <input :placeholder="item1.title ? item1.title : '链接'
  831. " v-if="item1.type == 14" style="
  832. border: none;
  833. outline: none;
  834. width: 80%;
  835. white-space: nowrap;
  836. overflow: hidden;
  837. text-overflow: ellipsis;
  838. " readonly="true" @click="
  839. openUpdateSource(index1)
  840. " />
  841. </div>
  842. <div class="chapter_upload_ic">
  843. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  844. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  845. checkChpater2($event, index1 )
  846. ">
  847. <div></div>
  848. </div>
  849. <div class="chapter_upload_ic_r" @click.stop="
  850. deleteInfoData2(
  851. $event,
  852. index1
  853. )
  854. ">
  855. <div></div>
  856. </div>
  857. </div>
  858. </div>
  859. </div>
  860. </div>
  861. </div>
  862. <div v-if="
  863. infoproVisible
  864. " class="mask">
  865. <div class="progressBox">
  866. <div class="lbox">
  867. <img src="../../../assets/loading.gif" />上传中,请稍后
  868. </div>
  869. <div style="margin-bottom: 10px">
  870. <span>{{
  871. infoisFinishSize
  872. }}</span>
  873. /
  874. <span>{{
  875. infoisAllSize
  876. }}</span>
  877. </div>
  878. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  879. ? infoprogress
  880. : 0
  881. " style="width: 80%"></el-progress> -->
  882. </div>
  883. </div>
  884. </div>
  885. </div>
  886. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!isuseT && (!yiKeTemplateArray.includes(templateid))) || (isuseT && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid))">
  887. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  888. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  889. 课程简要描述
  890. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  891. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  892. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
  893. @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
  894. </el-tooltip>
  895. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;">生成概况和目标</button>
  896. </div>
  897. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  898. <div style="width: calc(100%);" class='op_task_box'>
  899. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  900. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  901. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  902. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  903. <div class="op_box">
  904. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  905. <div style="display: flex;">
  906. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  907. <div class="r_pub_button_op"
  908. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  909. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  910. </el-tooltip>
  911. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB">{{ courseTextB ? '确定' : '编辑'}}</div>
  912. </div>
  913. </div>
  914. </div>
  915. </div>
  916. </div>
  917. </div>
  918. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!isuseT && (!yiKeTemplateArray.includes(templateid))) || (isuseT && (!yiKeTemplateArray.includes(templateid)) && courseTextBool)">
  919. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  920. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  921. 课程目标
  922. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  923. 上传补充资料
  924. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  925. beforeUploadInfo2(
  926. $event,
  927. 16
  928. )
  929. " />
  930. </button>
  931. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  932. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  933. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  934. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  935. </el-tooltip>
  936. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  937. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  938. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1)"
  939. @click="openAiDialog(2, 'aitargetTextDetail3',1)">生成目标</button>
  940. </el-tooltip>
  941. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  942. <div class="add_chapters_box add_c_none" v-if="
  943. mubiaoInfoData &&
  944. mubiaoInfoData.length == 0
  945. ">
  946. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  947. </div>
  948. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  949. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  950. getChapterData(
  951. $event,
  952. index1,
  953. item1.type
  954. )
  955. " >
  956. <div class="chapter_upload_o" style="
  957. position: relative;
  958. display: flex;
  959. align-items: center;
  960. ">
  961. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  962. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  963. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  964. </div>
  965. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  966. </div>
  967. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  968. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  969. </div>
  970. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  971. </div>
  972. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  973. </div>
  974. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  975. </div>
  976. </div>
  977. <div class="chapter_upload_n">
  978. <input readonly="true" v-if="
  979. item1.type == 2 ||
  980. item1.type == 3 ||
  981. item1.type == 12 ||
  982. item1.type == 13 ||
  983. item1.type == 7
  984. " :placeholder="item1.name" @click.stop="
  985. checkChpater3($event, index1, item1)
  986. " style="
  987. border: none;
  988. outline: none;
  989. width: 80%;
  990. minwidth: 215px;
  991. z-index: 99;
  992. font-size: 14px;
  993. white-space: nowrap;
  994. overflow: hidden;
  995. text-overflow: ellipsis;
  996. " />
  997. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  998. border: none;
  999. outline: none;
  1000. width: 80%;
  1001. white-space: nowrap;
  1002. overflow: hidden;
  1003. text-overflow: ellipsis;
  1004. " readonly="true" @click="
  1005. selectAttText(index1)
  1006. " />
  1007. <input :placeholder="item1.title ? item1.title : '链接'
  1008. " v-if="item1.type == 8" style="
  1009. border: none;
  1010. outline: none;
  1011. width: 80%;
  1012. white-space: nowrap;
  1013. overflow: hidden;
  1014. text-overflow: ellipsis;
  1015. " readonly="true" @click="selectLine(index1)" />
  1016. <input :placeholder="item1.title ? item1.title : '链接'
  1017. " v-if="item1.type == 14" style="
  1018. border: none;
  1019. outline: none;
  1020. width: 80%;
  1021. white-space: nowrap;
  1022. overflow: hidden;
  1023. text-overflow: ellipsis;
  1024. " readonly="true" @click="
  1025. openUpdateSource(index1)
  1026. " />
  1027. </div>
  1028. <div class="chapter_upload_ic">
  1029. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1030. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1031. checkChpater3($event, index1, item1)
  1032. ">
  1033. <div></div>
  1034. </div>
  1035. <div class="chapter_upload_ic_r" @click.stop="
  1036. deletemubiaoInfoData(
  1037. $event,
  1038. index1
  1039. )
  1040. ">
  1041. <div></div>
  1042. </div>
  1043. </div>
  1044. </div>
  1045. </div>
  1046. </div>
  1047. </div>
  1048. <div v-if="
  1049. mubiaoinfoproVisible
  1050. " class="mask">
  1051. <div class="progressBox">
  1052. <div class="lbox">
  1053. <img src="../../../assets/loading.gif" />上传中,请稍后
  1054. </div>
  1055. <div style="margin-bottom: 10px">
  1056. <span>{{
  1057. mubiaoinfoisFinishSize
  1058. }}</span>
  1059. /
  1060. <span>{{
  1061. mubiaoinfoisAllSize
  1062. }}</span>
  1063. </div>
  1064. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1065. ? mubiaoinfoprogress
  1066. : 0
  1067. " style="width: 80%"></el-progress> -->
  1068. </div>
  1069. </div>
  1070. </div>
  1071. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1072. <div style="width: calc(100%);" class='op_task_box'>
  1073. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  1074. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  1075. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  1076. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1077. <div class="op_box">
  1078. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1079. <div style="display: flex;">
  1080. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1081. <div class="r_pub_button_op"
  1082. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
  1083. @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
  1084. </el-tooltip>
  1085. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1086. </div>
  1087. </div>
  1088. </div>
  1089. </div>
  1090. </div>
  1091. </div>
  1092. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  1093. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1094. <div class="c_info_title">
  1095. 补充资料
  1096. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1097. </div>
  1098. <div class="buchong_box">
  1099. <span>暂时还没有内容,快去添加吧~</span>
  1100. </div>
  1101. </div> -->
  1102. <div style="position: relative;
  1103. background: #fff;
  1104. box-sizing: border-box;
  1105. padding: 1px 20px 10px;
  1106. width: 100%;
  1107. border-radius: 10px;">
  1108. <div style="
  1109. display: flex;
  1110. flex-direction: row;
  1111. justify-content: space-between;
  1112. align-items: center;
  1113. " :style="{
  1114. margin: true
  1115. ? '20px 0 10px'
  1116. : '20px 0 0',
  1117. }">
  1118. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1119. 补充资料
  1120. <div class="add_info_box" style="margin: 0 0 0 auto">
  1121. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1122. 上传补充资料
  1123. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1124. beforeUploadInfo2(
  1125. $event,
  1126. 13
  1127. )
  1128. " />
  1129. </button>
  1130. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1131. 图文
  1132. </button>
  1133. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1134. 链接
  1135. </button>
  1136. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1137. 代码
  1138. </button>
  1139. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1140. 资源
  1141. </button> -->
  1142. </div>
  1143. </div>
  1144. </div>
  1145. <div>
  1146. <div class="add_chapters_box add_c_none" v-if="
  1147. infoData &&
  1148. infoData.length == 0
  1149. ">
  1150. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  1151. </div>
  1152. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1153. <div @dragstart="
  1154. dragStart(item1, index1, 0)
  1155. " @dragover.prevent="
  1156. dragOver(index1, 0)
  1157. " @dragend="dragEnd()" :draggable="isdrag ==
  1158. 'chapter-' + 0 + '-' + index1
  1159. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1160. getChapterData(
  1161. $event,
  1162. index1,
  1163. item1.type
  1164. )
  1165. " :class="{
  1166. dragOverTop2:
  1167. newIndex === index1 &&
  1168. typeIndex ==
  1169. 'chapter-' +
  1170. 0 +
  1171. '-' +
  1172. index1 &&
  1173. oldIndex > index1 &&
  1174. dragType == 'drag',
  1175. dragOverBottom2:
  1176. newIndex === index1 &&
  1177. typeIndex ==
  1178. 'chapter-' +
  1179. 0 +
  1180. '-' +
  1181. index1 &&
  1182. oldIndex < index1 &&
  1183. dragType == 'drag',
  1184. }">
  1185. <!-- <div @mousedown="
  1186. isdrag =
  1187. 'chapter-' + 0 + '-' + index1
  1188. " @mouseup="isdrag = ''" @touchstart="
  1189. isdrag =
  1190. 'chapter-' + 0 + '-' + index1
  1191. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1192. <div class="chapter_upload_o" style="
  1193. position: relative;
  1194. display: flex;
  1195. align-items: center;
  1196. ">
  1197. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1198. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1199. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1200. </div>
  1201. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1202. </div>
  1203. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1204. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1205. </div>
  1206. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1207. </div>
  1208. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1209. </div>
  1210. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1211. </div>
  1212. </div>
  1213. <div class="chapter_upload_n">
  1214. <input readonly="true" v-if="
  1215. item1.type == 2 ||
  1216. item1.type == 3 ||
  1217. item1.type == 12 ||
  1218. item1.type == 13 ||
  1219. item1.type == 7
  1220. " :placeholder="item1.name" @click="
  1221. updataVideoT(
  1222. $event,
  1223. index1
  1224. )
  1225. " style="
  1226. border: none;
  1227. outline: none;
  1228. width: 80%;
  1229. minwidth: 215px;
  1230. z-index: 99;
  1231. font-size: 14px;
  1232. white-space: nowrap;
  1233. overflow: hidden;
  1234. text-overflow: ellipsis;
  1235. " />
  1236. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1237. border: none;
  1238. outline: none;
  1239. width: 80%;
  1240. white-space: nowrap;
  1241. overflow: hidden;
  1242. text-overflow: ellipsis;
  1243. " readonly="true" @click="
  1244. selectAttText(index1)
  1245. " />
  1246. <input :placeholder="item1.title ? item1.title : '链接'
  1247. " v-if="item1.type == 8" style="
  1248. border: none;
  1249. outline: none;
  1250. width: 80%;
  1251. white-space: nowrap;
  1252. overflow: hidden;
  1253. text-overflow: ellipsis;
  1254. " readonly="true" @click="selectLine(index1)" />
  1255. <input :placeholder="item1.title ? item1.title : '链接'
  1256. " v-if="item1.type == 14" style="
  1257. border: none;
  1258. outline: none;
  1259. width: 80%;
  1260. white-space: nowrap;
  1261. overflow: hidden;
  1262. text-overflow: ellipsis;
  1263. " readonly="true" @click="
  1264. openUpdateSource(index1)
  1265. " />
  1266. </div>
  1267. <div class="chapter_upload_ic">
  1268. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1269. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1270. <div class="chapter_upload_up" @click="
  1271. upCd(
  1272. $event,
  1273. index1
  1274. )
  1275. "></div>
  1276. <div class="chapter_upload_down" @click="
  1277. downCd(
  1278. $event,
  1279. index1
  1280. )
  1281. "></div>
  1282. </div>
  1283. <div class="chapter_upload_ic_edit" v-if="
  1284. item1.type == 2 ||
  1285. item1.type == 3 ||
  1286. item1.type == 12 ||
  1287. item1.type == 13 ||
  1288. item1.type == 7
  1289. " @click.stop="
  1290. updataVideoT(
  1291. $event,
  1292. index1
  1293. )
  1294. ">
  1295. <div></div>
  1296. </div>
  1297. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1298. selectAttText(index1)
  1299. ">
  1300. <div></div>
  1301. </div>
  1302. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1303. @click="selectLine(index1)">
  1304. <div></div>
  1305. </div>
  1306. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1307. openUpdateSource(index1)
  1308. ">
  1309. <div></div>
  1310. </div> -->
  1311. <div class="chapter_upload_ic_r" @click.stop="
  1312. deleteInfoData(
  1313. $event,
  1314. index1
  1315. )
  1316. ">
  1317. <div></div>
  1318. </div>
  1319. </div>
  1320. </div>
  1321. </div>
  1322. </div>
  1323. </div>
  1324. <div v-if="
  1325. infoproVisible
  1326. " class="mask">
  1327. <div class="progressBox">
  1328. <!-- <div id="closePro" class="closeCss">
  1329. <img src="../../../../assets/icon/close.png" alt />
  1330. </div> -->
  1331. <div class="lbox">
  1332. <img src="../../../assets/loading.gif" />上传中,请稍后
  1333. </div>
  1334. <div style="margin-bottom: 10px">
  1335. <span>{{
  1336. infoisFinishSize
  1337. }}M</span>
  1338. /
  1339. <span>{{
  1340. infoisAllSize
  1341. }}M</span>
  1342. </div>
  1343. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1344. ? infoprogress
  1345. : 0
  1346. " style="width: 80%"></el-progress>
  1347. </div>
  1348. </div>
  1349. </div>
  1350. </div>
  1351. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1352. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1353. <div class="c_info_title">
  1354. 补充描述
  1355. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1356. </div>
  1357. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1358. <div style="width: calc(100%)">
  1359. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1360. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1361. </div>
  1362. </div>
  1363. </div>
  1364. </div>
  1365. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  1366. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1367. <div class="c_info_title">
  1368. 课程大纲
  1369. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1370. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1371. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1372. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1373. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1374. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1375. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1376. </el-tooltip>
  1377. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1378. @click="openAiDialog2(2, 'aiOutline')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1379. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1380. @click="openAiDialog2(2, 'aiOutline2')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1381. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1382. </div>
  1383. <div class="task_outline">
  1384. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1385. <div class="outline_task">
  1386. <div class="title">任务{{ index + 1 }}</div>
  1387. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1388. v-model="item.task" />
  1389. <div class="outline_btn">
  1390. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1391. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)" @click="openAiDialog(2, 'aiOutlineDetail2', index)">{{ item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  1392. </el-tooltip>
  1393. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index)">在上面加入一个任务</button>
  1394. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index)">在下面加入一个任务</button>
  1395. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="deleteTask2(index)" v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  1396. </div>
  1397. </div>
  1398. <div class="outline_detail" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1399. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1400. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1401. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1402. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1403. <div class="op_box">
  1404. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1405. <div style="display: flex;">
  1406. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1407. <div class="r_pub_button_op"
  1408. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  1409. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  1410. </el-tooltip>
  1411. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index)">{{
  1412. item.isTask2 ? '确定' : '编辑'}}</div>
  1413. </div>
  1414. </div>
  1415. </div>
  1416. </div>
  1417. </div>
  1418. </div>
  1419. </div>
  1420. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  1421. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1422. <div class="c_info_title">
  1423. 概念群
  1424. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1425. @click="openAiDialog2(2, 'aiCpote1')">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1426. </div>
  1427. <div class="task_outline">
  1428. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1429. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1430. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1431. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1432. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1433. <div class="op_box">
  1434. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1435. <div style="display: flex;">
  1436. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1437. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  1438. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1439. </el-tooltip>
  1440. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  1441. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1442. </div>
  1443. </div>
  1444. </div>
  1445. </div>
  1446. </div>
  1447. </div>
  1448. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  1449. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1450. <div class="c_info_title">
  1451. 问题链
  1452. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1453. @click="openAiDialog2(2, 'aiCpote2')">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1454. </div>
  1455. <div class="task_outline">
  1456. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1457. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1458. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1459. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1460. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1461. <div class="op_box">
  1462. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1463. <div style="display: flex;">
  1464. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1465. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  1466. @click="openAiDialog(2, 'aiCpote2')">智能优化</div>
  1467. </el-tooltip>
  1468. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  1469. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1470. </div>
  1471. </div>
  1472. </div>
  1473. </div>
  1474. </div>
  1475. </div>
  1476. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  1477. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1478. <div class="c_info_title">
  1479. 目标层
  1480. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1481. @click="openAiDialog2(2, 'aiCpote3')">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1482. </div>
  1483. <div class="task_outline">
  1484. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1485. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1486. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1487. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1488. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1489. <div class="op_box">
  1490. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1491. <div style="display: flex;">
  1492. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1493. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  1494. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  1495. </el-tooltip>
  1496. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  1497. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1498. </div>
  1499. </div>
  1500. </div>
  1501. </div>
  1502. </div>
  1503. </div>
  1504. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  1505. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1506. <div class="c_info_title">
  1507. 任务簇
  1508. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1509. @click="openAiDialog2(2, 'aiCpote4')">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1510. </div>
  1511. <div class="task_outline">
  1512. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1513. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1514. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1515. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1516. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1517. <div class="op_box">
  1518. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1519. <div style="display: flex;">
  1520. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1521. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  1522. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  1523. </el-tooltip>
  1524. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  1525. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1526. </div>
  1527. </div>
  1528. </div>
  1529. </div>
  1530. </div>
  1531. </div>
  1532. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1533. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1534. <div class="c_info_title">
  1535. 教案
  1536. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1537. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1538. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1539. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1540. </el-tooltip>
  1541. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1542. @click="openAiDialog2(2, 'aiTeacher2')" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1543. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="panTeacher() == 0 && istemplate == 1 && templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1544. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1545. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1546. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1547. </el-tooltip>
  1548. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1549. </div>
  1550. <div class="task_outline">
  1551. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1552. <div class="outline_task">
  1553. <div class="title">任务{{ index + 1 }}</div>
  1554. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1555. v-model="item.task" />
  1556. </div>
  1557. <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1558. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1559. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1560. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1561. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1562. <div class="op_box">
  1563. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1564. <div style="display: flex;">
  1565. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1566. <div class="r_pub_button_op"
  1567. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  1568. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  1569. </el-tooltip>
  1570. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1571. item.isTask3 ? '确定' : '编辑'}}</div>
  1572. </div>
  1573. </div>
  1574. </div>
  1575. </div>
  1576. </div>
  1577. </div>
  1578. </div>
  1579. <div class="info_btnBox3" v-if="istemplate != 1">
  1580. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1581. goTo(
  1582. '/course?userid=' +
  1583. userid +
  1584. '&oid=' +
  1585. oid +
  1586. '&org=' +
  1587. org +
  1588. '&role=' +
  1589. role
  1590. )
  1591. ">
  1592. 返回课程
  1593. </button>
  1594. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1595. {{ steps == 4 ? "返回课程" : "上一步" }}
  1596. </button>
  1597. <button class="c_pub_button_confirm" v-if="isuseT && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  1598. {{isuseT ? "重新生成概况和目标" : "生成概况和目标"}}
  1599. </button>
  1600. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  1601. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  1602. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  1603. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  1604. pub_btn_next_img: steps != 3,
  1605. pub_btn_finish_img: steps == 3,
  1606. }">
  1607. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  1608. </button>
  1609. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  1610. @contextmenu.prevent="nextSteps(1)" :class="{
  1611. pub_btn_next_img: steps != 3,
  1612. pub_btn_finish_img: steps == 3,
  1613. }">
  1614. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  1615. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  1616. : "下一步" }}
  1617. </button>
  1618. </el-tooltip>
  1619. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  1620. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  1621. pub_btn_next_img: steps != 3,
  1622. pub_btn_finish_img: steps == 3,
  1623. }">下一步2</button>
  1624. </el-tooltip> -->
  1625. </div>
  1626. </div>
  1627. <div class="rightBox" v-if="steps == 2" :style="{
  1628. height:
  1629. !isStepDisplay && !isBtnDisplay
  1630. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1631. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1632. }">
  1633. <div class="basic_box" style="
  1634. padding: 20px 30px 0px !important;
  1635. box-sizing: border-box;
  1636. height: calc(100% - 80px);
  1637. overflow: auto;
  1638. background: #fff;
  1639. ">
  1640. <!-- <div
  1641. style="
  1642. color: #b8b8b8;
  1643. background: #fff;
  1644. width: 26%;
  1645. height: 40px;
  1646. border-radius: 15px;
  1647. padding-left: 20px;
  1648. line-height: 40px;
  1649. font-size: 17px;
  1650. box-shadow: 0px 1px 2px 2px #e0e0e0;
  1651. "
  1652. >-->
  1653. <div class="right_title" style="border: none; margin: 0; padding: 0">
  1654. 请选择合适的课程模板
  1655. </div>
  1656. <div class="wordbox">
  1657. <div class="wordTeacher" @click="checkTemplate2()">
  1658. <div class="wordPic">
  1659. <img src="../../../assets/icon/new/template_none.png" alt />
  1660. </div>
  1661. <div style="
  1662. margin-top: 10px;
  1663. line-height: 19px;
  1664. overflow: hidden;
  1665. text-overflow: ellipsis;
  1666. white-space: nowrap;
  1667. padding: 0 20px;
  1668. ">
  1669. 空白模板
  1670. </div>
  1671. </div>
  1672. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  1673. <div class="wordPic">
  1674. <img src="../../../assets/icon/new/template.png" alt />
  1675. </div>
  1676. <div style="
  1677. margin-top: 10px;
  1678. line-height: 19px;
  1679. overflow: hidden;
  1680. text-overflow: ellipsis;
  1681. white-space: nowrap;
  1682. padding: 0 20px;
  1683. ">
  1684. {{ aa.title }}
  1685. </div>
  1686. </div>
  1687. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  1688. <div class="wordPic">
  1689. <img src="../../../assets/icon/new/template.png" alt />
  1690. </div>
  1691. <div style="
  1692. margin-top: 10px;
  1693. line-height: 19px;
  1694. overflow: hidden;
  1695. text-overflow: ellipsis;
  1696. white-space: nowrap;
  1697. padding: 0 20px;
  1698. ">
  1699. 简易模板
  1700. </div>
  1701. </div>
  1702. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  1703. <div class="wordPic">
  1704. <img src="../../../assets/icon/new/template.png" alt />
  1705. </div>
  1706. <div style="
  1707. margin-top: 10px;
  1708. line-height: 19px;
  1709. overflow: hidden;
  1710. text-overflow: ellipsis;
  1711. white-space: nowrap;
  1712. padding: 0 20px;
  1713. ">
  1714. 智能粘贴模式
  1715. </div>
  1716. </div>
  1717. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  1718. <div class="wordPic">
  1719. <img src="../../../assets/icon/wordMub.png" alt />
  1720. </div>
  1721. <div style="
  1722. margin-top: 10px;
  1723. line-height: 19px;
  1724. overflow: hidden;
  1725. text-overflow: ellipsis;
  1726. white-space: nowrap;
  1727. padding: 0 20px;
  1728. ">
  1729. 未来小学课程设计
  1730. </div>
  1731. </div> -->
  1732. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  1733. <div class="wordPic">
  1734. <img src="../../../assets/icon/wordMub.png" alt />
  1735. </div>
  1736. <div style="
  1737. margin-top: 10px;
  1738. line-height: 19px;
  1739. overflow: hidden;
  1740. text-overflow: ellipsis;
  1741. white-space: nowrap;
  1742. padding: 0 20px;
  1743. ">
  1744. 我的课程
  1745. </div>
  1746. </div> -->
  1747. </div>
  1748. </div>
  1749. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  1750. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1751. goTo(
  1752. '/course?userid=' +
  1753. userid +
  1754. '&oid=' +
  1755. oid +
  1756. '&org=' +
  1757. org +
  1758. '&role=' +
  1759. role
  1760. )
  1761. ">
  1762. 返回课程
  1763. </button>
  1764. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1765. {{ steps == 4 ? "返回课程" : "上一步" }}
  1766. </button>
  1767. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1768. pub_btn_next_img: steps != 3,
  1769. pub_btn_finish_img: steps == 3,
  1770. }">
  1771. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1772. </button>
  1773. </div>
  1774. </div>
  1775. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1776. height:
  1777. !isStepDisplay && !isBtnDisplay
  1778. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1779. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1780. }">
  1781. <div class="rb_c_box">
  1782. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1783. <div class="rb_c_nav">
  1784. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1785. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1786. </div>
  1787. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1788. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1789. position: istemplate == 1 ? 'sticky' : 'unset',
  1790. top: istemplate == 1 ? '0' : 'unset'
  1791. }">
  1792. <!-- <div class="navTop">辅助导航</div> -->
  1793. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  1794. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1795. <div class="nt_taskBox" style="width: 100%;">
  1796. <div class="nt_taskTitle"
  1797. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1798. unitIndex + 1 }}</div>
  1799. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1800. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1801. <span>{{ unitJson[unitIndex].dyName }}</span>
  1802. </el-tooltip>
  1803. </div>
  1804. </div>
  1805. </div> -->
  1806. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1807. .taskJson" :key="tIndex" :class="{
  1808. dragOverTop:
  1809. newIndex === tIndex &&
  1810. typeIndex == 'task-' + tIndex &&
  1811. oldIndex > tIndex &&
  1812. dragType == 'task',
  1813. dragOverBottom:
  1814. newIndex === tIndex &&
  1815. typeIndex == 'task-' + tIndex &&
  1816. oldIndex < tIndex &&
  1817. dragType == 'task',
  1818. }">
  1819. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1820. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1821. class="navTask" :class="{
  1822. isNavTask:
  1823. isClickColor > 0 && isClickColor == tIndex + 1,
  1824. isNavOpen: t.toolOpen,
  1825. }">
  1826. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1827. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1828. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1829. class="chapter_upload_drag"></div>
  1830. <div class="nt_taskBox">
  1831. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1832. <div class="nt_taskName">
  1833. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1834. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1835. </el-tooltip>
  1836. </div>
  1837. </div>
  1838. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1839. 1
  1840. ">
  1841. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1842. @click.stop="taskMove(1, tIndex)"></div>
  1843. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1844. @click.stop="taskMove(2, tIndex)"></div>
  1845. </div> -->
  1846. </div>
  1847. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1848. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1849. @click="jumpGj(tIndex, toolIndex2)">
  1850. <div class="gjCss" :class="{
  1851. isGjCss:
  1852. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1853. }">
  1854. <div>工具{{ toolIndex2 + 1 }}:</div>
  1855. <div>
  1856. {{
  1857. toolsData[tool.tool[0]] &&
  1858. toolsData[tool.tool[0]].name
  1859. }}
  1860. </div>
  1861. </div>
  1862. </div>
  1863. </div>
  1864. </div>
  1865. </div>
  1866. <div class="navBottom" v-if="courseState == 1">
  1867. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1868. dragOverTop:
  1869. newIndex === stageIndex &&
  1870. typeIndex == 'Unit-' + stageIndex &&
  1871. oldIndex > stageIndex &&
  1872. dragType == 'Unit',
  1873. dragOverBottom:
  1874. newIndex === stageIndex &&
  1875. typeIndex == 'Unit-' + stageIndex &&
  1876. oldIndex < stageIndex &&
  1877. dragType == 'Unit',
  1878. }">
  1879. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1880. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1881. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1882. isNavStage: stageIndex == unitIndex,
  1883. isNavStageOpen: stage.toolOpen,
  1884. }">
  1885. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1886. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1887. class="chapter_upload_drag"></div>
  1888. <div class="nt_taskBox">
  1889. <div class="nt_taskTitle">
  1890. 第{{ stageIndex + 1 }}阶段:
  1891. </div>
  1892. <div class="nt_taskName">
  1893. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1894. " placement="top">
  1895. <span>{{
  1896. stage.dyName ? stage.dyName : "未命名阶段"
  1897. }}</span>
  1898. </el-tooltip>
  1899. </div>
  1900. </div>
  1901. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1902. </div>
  1903. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1904. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1905. dragOverTop:
  1906. newIndex === tIndex &&
  1907. typeIndex == 'task-' + tIndex &&
  1908. ((oldIndex > tIndex &&
  1909. stageIndex == checkUnitIndex) ||
  1910. (oldIndex == tIndex &&
  1911. stageIndex == checkUnitIndex &&
  1912. checkUnitIndex != oldUnitIndex)) &&
  1913. dragType == 'task',
  1914. dragOverBottom:
  1915. newIndex === tIndex &&
  1916. typeIndex == 'task-' + tIndex &&
  1917. oldIndex < tIndex &&
  1918. stageIndex == checkUnitIndex &&
  1919. dragType == 'task',
  1920. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  1921. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  1922. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  1923. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  1924. isNavTask:
  1925. isClickColor > 0 &&
  1926. isClickColor == tIndex + 1 &&
  1927. stageIndex == unitIndex,
  1928. isNavOpen: t.toolOpen,
  1929. }">
  1930. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  1931. <div @mousedown="
  1932. isdrag = 'task-' + stageIndex + '-' + tIndex
  1933. " @mouseup="isdrag = ''" @touchstart="
  1934. isdrag = 'task-' + stageIndex + '-' + tIndex
  1935. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  1936. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  1937. <div class="nt_taskTitle">
  1938. 任务{{ tIndex + 1 }}:
  1939. </div>
  1940. <div class="nt_taskName">
  1941. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1942. <span>{{
  1943. t.task ? t.task : "未命名任务"
  1944. }}</span>
  1945. </el-tooltip>
  1946. </div>
  1947. </div>
  1948. </div>
  1949. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1950. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1951. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  1952. <div class="gjCss" :class="{
  1953. isGjCss:
  1954. toolIndexType ==
  1955. `gj${tIndex}${toolIndex2}${stageIndex}`,
  1956. }">
  1957. <div>工具{{ toolIndex2 + 1 }}:</div>
  1958. <div>
  1959. {{
  1960. toolsData[tool.tool[0]] &&
  1961. toolsData[tool.tool[0]].name
  1962. }}
  1963. </div>
  1964. </div>
  1965. </div>
  1966. </div>
  1967. </div>
  1968. </div>
  1969. </div>
  1970. </div>
  1971. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  1972. <aiBox @setUnitJson="setUnitJson" :courseId="courseId" :unitJson="unitJson"></aiBox>
  1973. </div>
  1974. </div>
  1975. <div class="rb_c_box_right">
  1976. <!-- <div class="rb_c_box_btn">
  1977. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  1978. </div> -->
  1979. <div class="basic_box" ref="unitBox">
  1980. <div v-if="false" style="
  1981. display: flex;
  1982. flex-direction: row;
  1983. align-items: center;
  1984. position: sticky;
  1985. top: 0;
  1986. z-index: 99;
  1987. width: 100%;
  1988. padding: 0 20px 0 20px;
  1989. box-sizing: border-box;
  1990. background: #fff;
  1991. border-radius: 8px;
  1992. ">
  1993. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  1994. <div class="cru_selectBox" :style="{
  1995. maxWidth: isPasteTask
  1996. ? 'calc(100% - 335px)'
  1997. : 'calc(100% - 190px)',
  1998. }" v-if="courseState == 1">
  1999. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2000. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2001. <!-- item.dyName ? item.dyName : -->
  2002. <span v-if="
  2003. unitJson[unitJson.length - 1].easy == 4 ||
  2004. unitJson[unitJson.length - 1].easy == 6
  2005. ">{{
  2006. item.dyName
  2007. ? item.dyName
  2008. : "第" + (index + 1) + "阶段"
  2009. }}</span>
  2010. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2011. </div>
  2012. <div class="cru_line" :style="{
  2013. left: offsetLetfPx + 'px',
  2014. }"></div>
  2015. </div>
  2016. <div class="addStageImg" @click="addunit()" v-if="
  2017. !(unitJson[unitJson.length - 1].easy == 4) &&
  2018. !(unitJson[unitJson.length - 1].easy == 6) &&
  2019. courseState == 1
  2020. ">
  2021. <img src="../../../assets/icon/new/addStage.png" alt />
  2022. </div>
  2023. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2024. v-if="courseState == 2" style="margin: 15px 0">
  2025. 新建阶段
  2026. </button>
  2027. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2028. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2029. 阶段顺序
  2030. </button>
  2031. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2032. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2033. 智能粘贴
  2034. </button>
  2035. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2036. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2037. }" style="padding: 0 12px">
  2038. 选择课程模板
  2039. </button>
  2040. </div>
  2041. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2042. :key="index">
  2043. <div v-if="courseState == 4" style="position: relative;
  2044. background: #fff;
  2045. box-sizing: border-box;
  2046. padding: 1px 20px 10px;
  2047. width: 100%;
  2048. border-radius: 10px;">
  2049. <div style="
  2050. display: flex;
  2051. flex-direction: row;
  2052. justify-content: space-between;
  2053. align-items: center;
  2054. " :style="{
  2055. margin: !item.taskJson[0].isFoldchapter
  2056. ? '20px 0 10px'
  2057. : '20px 0 0',
  2058. }">
  2059. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2060. 学习内容
  2061. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2062. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2063. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2064. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2065. </el-tooltip>
  2066. </div>
  2067. </div>
  2068. <div>
  2069. <div class="add_chapters_box add_c_none" v-if="
  2070. item.taskJson[0].chapterData &&
  2071. item.taskJson[0].chapterData.length == 0
  2072. ">
  2073. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  2074. </div>
  2075. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2076. <div @dragstart="
  2077. dragStart(item1, index1, 0)
  2078. " @dragover.prevent="
  2079. dragOver(index1, 0)
  2080. " @dragend="dragEnd()" :draggable="isdrag ==
  2081. 'chapter-' + 0 + '-' + index1
  2082. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2083. :key="item1.id" @click="
  2084. getChapterData(
  2085. $event,
  2086. unitIndex,
  2087. index,
  2088. index1,
  2089. item1.type
  2090. )
  2091. " :class="{
  2092. dragOverTop2:
  2093. newIndex === index1 &&
  2094. typeIndex ==
  2095. 'chapter-' +
  2096. 0 +
  2097. '-' +
  2098. index1 &&
  2099. oldIndex > index1 &&
  2100. dragType == 'drag',
  2101. dragOverBottom2:
  2102. newIndex === index1 &&
  2103. typeIndex ==
  2104. 'chapter-' +
  2105. 0 +
  2106. '-' +
  2107. index1 &&
  2108. oldIndex < index1 &&
  2109. dragType == 'drag',
  2110. }">
  2111. <div @mousedown="
  2112. isdrag =
  2113. 'chapter-' + 0 + '-' + index1
  2114. " @mouseup="isdrag = ''" @touchstart="
  2115. isdrag =
  2116. 'chapter-' + 0 + '-' + index1
  2117. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2118. <div class="chapter_upload_o" style="
  2119. position: relative;
  2120. display: flex;
  2121. align-items: center;
  2122. ">
  2123. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2124. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2125. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2126. </div>
  2127. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2128. </div>
  2129. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2130. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2131. </div>
  2132. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2133. </div>
  2134. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2135. </div>
  2136. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2137. </div>
  2138. </div>
  2139. <div class="chapter_upload_n">
  2140. <input readonly="true" v-if="
  2141. item1.type == 2 ||
  2142. item1.type == 3 ||
  2143. item1.type == 12 ||
  2144. item1.type == 13 ||
  2145. item1.type == 7
  2146. " :placeholder="item1.name" @click="
  2147. updataVideoT(
  2148. $event,
  2149. unitIndex,
  2150. 0,
  2151. index1
  2152. )
  2153. " style="
  2154. border: none;
  2155. outline: none;
  2156. width: 80%;
  2157. minwidth: 215px;
  2158. z-index: 99;
  2159. font-size: 14px;
  2160. white-space: nowrap;
  2161. overflow: hidden;
  2162. text-overflow: ellipsis;
  2163. " />
  2164. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2165. border: none;
  2166. outline: none;
  2167. width: 80%;
  2168. white-space: nowrap;
  2169. overflow: hidden;
  2170. text-overflow: ellipsis;
  2171. " readonly="true" @click="
  2172. selectAttText(0, index1)
  2173. " />
  2174. <input :placeholder="item1.title ? item1.title : '链接'
  2175. " v-if="item1.type == 8" style="
  2176. border: none;
  2177. outline: none;
  2178. width: 80%;
  2179. white-space: nowrap;
  2180. overflow: hidden;
  2181. text-overflow: ellipsis;
  2182. " readonly="true" @click="selectLine(0, index1)" />
  2183. <input :placeholder="item1.title ? item1.title : '链接'
  2184. " v-if="item1.type == 14" style="
  2185. border: none;
  2186. outline: none;
  2187. width: 80%;
  2188. white-space: nowrap;
  2189. overflow: hidden;
  2190. text-overflow: ellipsis;
  2191. " readonly="true" @click="
  2192. openUpdateSource(0, index1)
  2193. " />
  2194. </div>
  2195. <div class="chapter_upload_ic">
  2196. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2197. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2198. checkChpater( $event, unitIndex, 0, index1 )
  2199. ">
  2200. <div></div>
  2201. </div>
  2202. <div class="chapter_upload_ud" style="z-index: 99">
  2203. <div class="chapter_upload_up" @click="
  2204. upCd(
  2205. $event,
  2206. unitIndex,
  2207. index,
  2208. 0,
  2209. index1
  2210. )
  2211. "></div>
  2212. <div class="chapter_upload_down" @click="
  2213. downCd(
  2214. $event,
  2215. unitIndex,
  2216. index,
  2217. 0,
  2218. index1
  2219. )
  2220. "></div>
  2221. </div>
  2222. <div class="chapter_upload_ic_edit" v-if="
  2223. item1.type == 2 ||
  2224. item1.type == 3 ||
  2225. item1.type == 12 ||
  2226. item1.type == 13 ||
  2227. item1.type == 7
  2228. " @click.stop="
  2229. updataVideoT(
  2230. $event,
  2231. unitIndex,
  2232. 0,
  2233. index1
  2234. )
  2235. ">
  2236. <div></div>
  2237. </div>
  2238. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2239. selectAttText(0, index1)
  2240. ">
  2241. <div></div>
  2242. </div>
  2243. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2244. @click="selectLine(0, index1)">
  2245. <div></div>
  2246. </div>
  2247. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2248. openUpdateSource(0, index1)
  2249. ">
  2250. <div></div>
  2251. </div>
  2252. <div class="chapter_upload_ic_r" @click.stop="
  2253. deleteChapterData(
  2254. $event,
  2255. unitIndex,
  2256. index,
  2257. index1,
  2258. 0
  2259. )
  2260. ">
  2261. <div></div>
  2262. </div>
  2263. </div>
  2264. </div>
  2265. </div>
  2266. </div>
  2267. </div>
  2268. <div class="add_info_box" style="margin: 10px 0 0">
  2269. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2270. 文件
  2271. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2272. beforeUpload2(
  2273. $event,
  2274. unitIndex,
  2275. 13,
  2276. 0
  2277. )
  2278. " />
  2279. </button>
  2280. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2281. 图文
  2282. </button>
  2283. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2284. 链接
  2285. </button>
  2286. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2287. 代码
  2288. </button>
  2289. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2290. 资源
  2291. </button>
  2292. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2293. AI生成PPT
  2294. </button>
  2295. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2296. AI生成教案
  2297. </button>
  2298. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2299. 智能检索视频
  2300. </button>
  2301. </div>
  2302. <div v-if="
  2303. unitJson[unitIndex].chapterInfo[0].taskJson[
  2304. 0
  2305. ].proVisible
  2306. " class="mask">
  2307. <div class="progressBox">
  2308. <!-- <div id="closePro" class="closeCss">
  2309. <img src="../../../../assets/icon/close.png" alt />
  2310. </div> -->
  2311. <div class="lbox">
  2312. <img src="../../../assets/loading.gif" />上传中,请稍后
  2313. </div>
  2314. <div style="margin-bottom: 10px">
  2315. <span>{{
  2316. unitJson[unitIndex].chapterInfo[0].taskJson[
  2317. 0
  2318. ].isFinishSize
  2319. }}</span>
  2320. /
  2321. <span>{{
  2322. unitJson[unitIndex].chapterInfo[0].taskJson[
  2323. 0
  2324. ].isAllSize
  2325. }}</span>
  2326. </div>
  2327. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2328. 0
  2329. ].progress
  2330. ? unitJson[unitIndex].chapterInfo[0]
  2331. .taskJson[0].progress
  2332. : 0
  2333. " style="width: 80%"></el-progress> -->
  2334. </div>
  2335. </div>
  2336. </div>
  2337. <div class="chapter_box" v-if="courseState == 1">
  2338. <div class="chapter_contentbox">
  2339. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2340. <div class="cc_input">
  2341. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2342. v-model="unitJson[unitIndex].dyName" />
  2343. </div>
  2344. <div class="remove" v-if="
  2345. (unitJson.length > 1 || courseState != 2) &&
  2346. !(unitJson[unitJson.length - 1].easy == 4) &&
  2347. !(unitJson[unitJson.length - 1].easy == 6)
  2348. " @click="deleteUnit(unitIndex)"></div>
  2349. </div>
  2350. </div>
  2351. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2352. margin: 50px 0px 10px;
  2353. font-size: 1.5em;
  2354. font-weight: 700;
  2355. color: #0f7eff;
  2356. ">
  2357. 添加任务
  2358. </div> -->
  2359. <div class="taskBorder" :style="{
  2360. minHeight: unitJson[unitIndex].easy && 'unset',
  2361. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2362. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2363. <div style="background: #fff; border-radius: 5px">
  2364. <div class="taskTitle">
  2365. <div style="display: flex;width: 100%;justify-content: space-between;">
  2366. <span>任务{{ itemTaskIndex + 1 }}</span>
  2367. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2368. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2369. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2370. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2371. </el-tooltip>
  2372. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2373. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2374. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2375. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务2</button>
  2376. </el-tooltip> -->
  2377. </div>
  2378. </div>
  2379. <!-- padding: 20px; -->
  2380. <div v-if="unitJson[unitIndex].easy != 1">
  2381. <div :style="{
  2382. marginBottom:
  2383. unitJson[unitIndex].easy == 3 ||
  2384. (unitJson[unitIndex].easy == 5 &&
  2385. itemTask.taskType == 1)
  2386. ? '75px'
  2387. : '0',
  2388. }">
  2389. <div style="
  2390. display: flex;
  2391. margin: 0px 0 20px;
  2392. flex-direction: row;
  2393. justify-content: flex-start;
  2394. align-items: center;
  2395. ">
  2396. <div class="lineTitle">任务概述</div>
  2397. </div>
  2398. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2399. flex-direction: row;
  2400. justify-content: flex-start;
  2401. align-items: center;
  2402. margin: 0;
  2403. ">
  2404. <!-- <div class="cc_title">
  2405. 任务{{ itemTaskIndex + 1 }}
  2406. </div> -->
  2407. <div class="cc_input">
  2408. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2409. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2410. itemTaskIndex
  2411. ].task
  2412. " />
  2413. </div>
  2414. <div class="remove" v-if="
  2415. item.taskJson.length > 1 &&
  2416. (!unitJson[unitIndex].easy ||
  2417. unitJson[unitIndex].easy == 6)
  2418. " @click="deleteTask(itemTaskIndex)"></div>
  2419. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2420. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2421. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2422. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2423. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2424. </div> -->
  2425. </div>
  2426. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2427. display: flex;
  2428. margin: 20px 0;
  2429. flex-direction: row;
  2430. justify-content: flex-start;
  2431. align-items: center;
  2432. ">
  2433. <div class="lineTitle">任务描述</div>
  2434. </div> && !itemTask.isFold2-->
  2435. <div v-if="
  2436. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2437. -1
  2438. " style="margin-top: 20px" class="op_task_box"
  2439. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2440. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2441. itemTaskIndex
  2442. ].taskDetail
  2443. " @change="change"></editor-bar> -->
  2444. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2445. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2446. itemTaskIndex
  2447. ].taskDetail
  2448. "></textarea>
  2449. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2450. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2451. itemTaskIndex
  2452. ].taskDetail
  2453. "></textarea> -->
  2454. <div class="op_box">
  2455. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2456. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2457. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2458. itemTaskIndex
  2459. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2460. itemTaskIndex
  2461. ], itemTaskIndex)">智能优化</div>
  2462. </el-tooltip>
  2463. </div>
  2464. </div>
  2465. </div>
  2466. </div>
  2467. <div
  2468. style="position: relative"
  2469. v-if="courseState == 5"
  2470. >
  2471. <div
  2472. style="
  2473. display: flex;
  2474. flex-direction: row;
  2475. justify-content: space-between;
  2476. align-items: center;
  2477. "
  2478. :style="{
  2479. margin: !itemTask.isFoldchapter
  2480. ? '20px 0 10px'
  2481. : '20px 0 0',
  2482. }"
  2483. >
  2484. <div
  2485. style="margin-bottom: 10px"
  2486. class="lineTitle clineTitle"
  2487. >
  2488. 学习内容
  2489. </div>
  2490. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2491. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2492. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2493. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2494. <!-- <div class="line"></div> -->
  2495. </div>
  2496. <!-- v-if="!itemTask.isFoldchapter" -->
  2497. <div>
  2498. <div
  2499. class="add_chapters_box add_c_none"
  2500. v-if="
  2501. itemTask.chapterData &&
  2502. itemTask.chapterData.length == 0
  2503. "
  2504. >
  2505. <img
  2506. src="../../../assets/icon/new/c_none.png"
  2507. alt
  2508. /><span>请添加学习内容</span>
  2509. </div>
  2510. <div
  2511. v-else
  2512. class="add_chapters_box"
  2513. style="display: flex; flex-direction: column"
  2514. >
  2515. <div
  2516. @dragstart="
  2517. dragStart(item1, index1, itemTaskIndex)
  2518. "
  2519. @dragover.prevent="
  2520. dragOver(index1, itemTaskIndex)
  2521. "
  2522. @dragend="dragEnd()"
  2523. :draggable="
  2524. isdrag ==
  2525. 'chapter-' + itemTaskIndex + '-' + index1
  2526. "
  2527. class="chapter_upload"
  2528. v-for="(item1, index1) in itemTask.chapterData"
  2529. :key="item1.id"
  2530. @click="
  2531. getChapterData(
  2532. $event,
  2533. unitIndex,
  2534. index,
  2535. index1,
  2536. item1.type
  2537. )
  2538. "
  2539. :class="{
  2540. dragOverTop2:
  2541. newIndex === index1 &&
  2542. typeIndex ==
  2543. 'chapter-' +
  2544. itemTaskIndex +
  2545. '-' +
  2546. index1 &&
  2547. oldIndex > index1 &&
  2548. dragType == 'drag',
  2549. dragOverBottom2:
  2550. newIndex === index1 &&
  2551. typeIndex ==
  2552. 'chapter-' +
  2553. itemTaskIndex +
  2554. '-' +
  2555. index1 &&
  2556. oldIndex < index1 &&
  2557. dragType == 'drag',
  2558. }"
  2559. >
  2560. <div
  2561. @mousedown="
  2562. isdrag =
  2563. 'chapter-' + itemTaskIndex + '-' + index1
  2564. "
  2565. @mouseup="isdrag = ''"
  2566. @touchstart="
  2567. isdrag =
  2568. 'chapter-' + itemTaskIndex + '-' + index1
  2569. "
  2570. @touchend="isdrag = ''"
  2571. class="chapter_upload_drag"
  2572. ></div>
  2573. <div
  2574. class="chapter_upload_o"
  2575. style="
  2576. position: relative;
  2577. display: flex;
  2578. align-items: center;
  2579. "
  2580. >
  2581. <div
  2582. class="chapter_upload_l"
  2583. style="padding: 1px 0 0 10px"
  2584. >
  2585. <div
  2586. v-if="item1.type == 2"
  2587. class="chapter_upload_l_i2"
  2588. ></div>
  2589. <div
  2590. v-if="item1.type == 3"
  2591. class="chapter_upload_l_i3"
  2592. style="margin-left: 1px"
  2593. ></div>
  2594. <div
  2595. v-if="item1.type == 6"
  2596. class="chapter_upload_l_i6"
  2597. style="margin-left: 1px"
  2598. ></div>
  2599. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2600. <div
  2601. v-if="item1.type == 8"
  2602. class="chapter_upload_l_i8"
  2603. style="margin-left: 1px"
  2604. ></div>
  2605. <div
  2606. v-if="item1.type == 14"
  2607. class="chapter_upload_l_i14"
  2608. style="margin-left: 1px"
  2609. ></div>
  2610. <div
  2611. v-if="item1.type == 12"
  2612. class="chapter_upload_l_i12"
  2613. style="margin-left: 1px"
  2614. ></div>
  2615. <div
  2616. v-if="item1.type == 13"
  2617. class="chapter_upload_l_i13"
  2618. style="margin-left: 1px"
  2619. ></div>
  2620. </div>
  2621. <div class="chapter_upload_n">
  2622. <input
  2623. readonly="true"
  2624. v-if="
  2625. item1.type == 2 ||
  2626. item1.type == 3 ||
  2627. item1.type == 12 ||
  2628. item1.type == 13 ||
  2629. item1.type == 7
  2630. "
  2631. :placeholder="item1.name"
  2632. @click="
  2633. updataVideoT(
  2634. $event,
  2635. unitIndex,
  2636. itemTaskIndex,
  2637. index1
  2638. )
  2639. "
  2640. style="
  2641. border: none;
  2642. outline: none;
  2643. width: 80%;
  2644. minwidth: 215px;
  2645. z-index: 99;
  2646. font-size: 14px;
  2647. white-space: nowrap;
  2648. overflow: hidden;
  2649. text-overflow: ellipsis;
  2650. "
  2651. />
  2652. <input
  2653. :placeholder="item1.name"
  2654. v-if="item1.type == 6"
  2655. style="
  2656. border: none;
  2657. outline: none;
  2658. width: 80%;
  2659. white-space: nowrap;
  2660. overflow: hidden;
  2661. text-overflow: ellipsis;
  2662. "
  2663. readonly="true"
  2664. @click="
  2665. selectAttText(itemTaskIndex, index1)
  2666. "
  2667. />
  2668. <input
  2669. :placeholder="
  2670. item1.title ? item1.title : '链接'
  2671. "
  2672. v-if="item1.type == 8"
  2673. style="
  2674. border: none;
  2675. outline: none;
  2676. width: 80%;
  2677. white-space: nowrap;
  2678. overflow: hidden;
  2679. text-overflow: ellipsis;
  2680. "
  2681. readonly="true"
  2682. @click="selectLine(itemTaskIndex, index1)"
  2683. />
  2684. <input
  2685. :placeholder="
  2686. item1.title ? item1.title : '链接'
  2687. "
  2688. v-if="item1.type == 14"
  2689. style="
  2690. border: none;
  2691. outline: none;
  2692. width: 80%;
  2693. white-space: nowrap;
  2694. overflow: hidden;
  2695. text-overflow: ellipsis;
  2696. "
  2697. readonly="true"
  2698. @click="
  2699. openUpdateSource(itemTaskIndex, index1)
  2700. "
  2701. />
  2702. </div>
  2703. <div class="chapter_upload_ic">
  2704. <div
  2705. class="chapter_upload_noSee"
  2706. v-if="item1.type == 12"
  2707. ></div>
  2708. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2709. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  2710. ">
  2711. <div></div>
  2712. </div>
  2713. <div
  2714. class="chapter_upload_ud"
  2715. style="z-index: 99"
  2716. >
  2717. <div
  2718. class="chapter_upload_up"
  2719. @click="
  2720. upCd(
  2721. $event,
  2722. unitIndex,
  2723. index,
  2724. itemTaskIndex,
  2725. index1
  2726. )
  2727. "
  2728. ></div>
  2729. <div
  2730. class="chapter_upload_down"
  2731. @click="
  2732. downCd(
  2733. $event,
  2734. unitIndex,
  2735. index,
  2736. itemTaskIndex,
  2737. index1
  2738. )
  2739. "
  2740. ></div>
  2741. </div>
  2742. <div
  2743. class="chapter_upload_ic_edit"
  2744. v-if="
  2745. item1.type == 2 ||
  2746. item1.type == 3 ||
  2747. item1.type == 12 ||
  2748. item1.type == 13 ||
  2749. item1.type == 7
  2750. "
  2751. @click.stop="
  2752. updataVideoT(
  2753. $event,
  2754. unitIndex,
  2755. itemTaskIndex,
  2756. index1
  2757. )
  2758. "
  2759. >
  2760. <div></div>
  2761. </div>
  2762. <div
  2763. class="chapter_upload_ic_edit"
  2764. v-if="item1.type == 6"
  2765. @click="
  2766. selectAttText(itemTaskIndex, index1)
  2767. "
  2768. >
  2769. <div></div>
  2770. </div>
  2771. <div
  2772. class="chapter_upload_ic_edit"
  2773. v-if="item1.type == 8"
  2774. @click="selectLine(itemTaskIndex, index1)"
  2775. >
  2776. <div></div>
  2777. </div>
  2778. <div
  2779. class="chapter_upload_ic_edit"
  2780. v-if="item1.type == 14"
  2781. @click="
  2782. openUpdateSource(itemTaskIndex, index1)
  2783. "
  2784. >
  2785. <div></div>
  2786. </div>
  2787. <div
  2788. class="chapter_upload_ic_r"
  2789. @click.stop="
  2790. deleteChapterData(
  2791. $event,
  2792. unitIndex,
  2793. index,
  2794. index1,
  2795. itemTaskIndex
  2796. )
  2797. "
  2798. >
  2799. <div></div>
  2800. </div>
  2801. </div>
  2802. </div>
  2803. </div>
  2804. </div>
  2805. </div>
  2806. <!-- v-if="!itemTask.isFoldchapter" -->
  2807. <div class="add_info_box" style="margin: 10px 0 0">
  2808. <button
  2809. class="c_pub_button_add pub_btn_add_img"
  2810. @click="addImg($event)"
  2811. >
  2812. 文件
  2813. <input
  2814. type="file"
  2815. accept="*"
  2816. style="display: none"
  2817. multiple="multiple"
  2818. v-if="inputShow"
  2819. @change="
  2820. beforeUpload2(
  2821. $event,
  2822. unitIndex,
  2823. 13,
  2824. itemTaskIndex
  2825. )
  2826. "
  2827. />
  2828. </button>
  2829. <button
  2830. class="c_pub_button_add pub_btn_add_img"
  2831. @click="addAttText(itemTaskIndex)"
  2832. >
  2833. 图文
  2834. </button>
  2835. <button
  2836. class="c_pub_button_add pub_btn_add_img"
  2837. @click="openLine(itemTaskIndex)"
  2838. >
  2839. 链接
  2840. </button>
  2841. <button
  2842. class="c_pub_button_add pub_btn_add_img"
  2843. @click="pasteLine(itemTaskIndex)"
  2844. >
  2845. 代码
  2846. </button>
  2847. <button
  2848. class="c_pub_button_add pub_btn_add_img"
  2849. @click="openSource(itemTaskIndex)"
  2850. >
  2851. 资源
  2852. </button>
  2853. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  2854. AI生成PPT
  2855. </button>
  2856. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  2857. AI生成教案
  2858. </button>
  2859. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  2860. 智能检索视频
  2861. </button>
  2862. </div>
  2863. <div
  2864. v-if="
  2865. unitJson[unitIndex].chapterInfo[0].taskJson[
  2866. itemTaskIndex
  2867. ].proVisible
  2868. "
  2869. class="mask"
  2870. >
  2871. <div class="progressBox">
  2872. <!-- <div id="closePro" class="closeCss">
  2873. <img src="../../../../assets/icon/close.png" alt />
  2874. </div> -->
  2875. <div class="lbox">
  2876. <img
  2877. src="../../../assets/loading.gif"
  2878. />上传中,请稍后
  2879. </div>
  2880. <div style="margin-bottom: 10px">
  2881. <span
  2882. >{{
  2883. unitJson[unitIndex].chapterInfo[0].taskJson[
  2884. itemTaskIndex
  2885. ].isFinishSize
  2886. }}</span
  2887. >
  2888. /
  2889. <span
  2890. >{{
  2891. unitJson[unitIndex].chapterInfo[0].taskJson[
  2892. itemTaskIndex
  2893. ].isAllSize
  2894. }}</span
  2895. >
  2896. </div>
  2897. <!-- <el-progress
  2898. :text-inside="true"
  2899. :stroke-width="20"
  2900. :percentage="
  2901. unitJson[unitIndex].chapterInfo[0].taskJson[
  2902. itemTaskIndex
  2903. ].progress
  2904. ? unitJson[unitIndex].chapterInfo[0]
  2905. .taskJson[itemTaskIndex].progress
  2906. : 0
  2907. "
  2908. style="width: 80%"
  2909. ></el-progress> -->
  2910. </div>
  2911. </div>
  2912. </div>
  2913. <div v-if="
  2914. unitJson[unitIndex].easy == 1 ||
  2915. (unitJson[unitIndex].easy == 5 &&
  2916. itemTask.taskType == 2)
  2917. ">
  2918. <div>
  2919. <div class="add_chapters_box add_c_none" v-if="
  2920. itemTask.chapterData &&
  2921. itemTask.chapterData.length == 0
  2922. ">
  2923. <img src="../../../assets/icon/new/c_none.png" alt />
  2924. </div>
  2925. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2926. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  2927. dragOver(index1, itemTaskIndex)
  2928. " @dragend="dragEnd()" :draggable="isdrag ==
  2929. 'chapter-' + itemTaskIndex + '-' + index1
  2930. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  2931. :key="item1.id" @click="
  2932. getChapterData(
  2933. $event,
  2934. unitIndex,
  2935. index,
  2936. index1,
  2937. item1.type
  2938. )
  2939. " :class="{
  2940. dragOverTop2:
  2941. newIndex === index1 &&
  2942. typeIndex ==
  2943. 'chapter-' +
  2944. itemTaskIndex +
  2945. '-' +
  2946. index1 &&
  2947. oldIndex > index1,
  2948. dragOverBottom2:
  2949. newIndex === index1 &&
  2950. typeIndex ==
  2951. 'chapter-' +
  2952. itemTaskIndex +
  2953. '-' +
  2954. index1 &&
  2955. oldIndex < index1,
  2956. }">
  2957. <div @mousedown="
  2958. isdrag =
  2959. 'chapter-' + itemTaskIndex + '-' + index1
  2960. " @mouseup="isdrag = ''" @touchstart="
  2961. isdrag =
  2962. 'chapter-' + itemTaskIndex + '-' + index1
  2963. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2964. <div class="chapter_upload_t" style="width: 100%"></div>
  2965. <div class="chapter_upload_o" style="
  2966. position: relative;
  2967. display: flex;
  2968. align-items: center;
  2969. ">
  2970. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2971. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2972. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2973. </div>
  2974. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2975. </div>
  2976. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2977. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2978. </div>
  2979. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2980. </div>
  2981. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2982. </div>
  2983. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2984. </div>
  2985. </div>
  2986. <div class="chapter_upload_n">
  2987. <span style="
  2988. font-size: 14px;
  2989. color: rgb(109, 109, 109);
  2990. height: 14px;
  2991. line-height: 14px;
  2992. " v-if="
  2993. item1.type == 2 ||
  2994. item1.type == 3 ||
  2995. item1.type == 7
  2996. ">{{ item1.text }}-</span>
  2997. <input readonly="true" v-if="
  2998. item1.type == 2 ||
  2999. item1.type == 3 ||
  3000. item1.type == 7
  3001. " :placeholder="item1.name" @click="
  3002. updataVideoT(
  3003. $event,
  3004. unitIndex,
  3005. itemTaskIndex,
  3006. index1
  3007. )
  3008. " style="
  3009. border: none;
  3010. outline: none;
  3011. width: 80%;
  3012. minwidth: 215px;
  3013. z-index: 99;
  3014. font-size: 14px;
  3015. white-space: nowrap;
  3016. overflow: hidden;
  3017. text-overflow: ellipsis;
  3018. " />
  3019. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3020. border: none;
  3021. outline: none;
  3022. width: 80%;
  3023. white-space: nowrap;
  3024. overflow: hidden;
  3025. text-overflow: ellipsis;
  3026. " readonly="true" @click="
  3027. selectAttText(itemTaskIndex, index1)
  3028. " />
  3029. <input :placeholder="item1.title ? item1.title : '链接'
  3030. " v-if="item1.type == 8 || item1.type == 14" style="
  3031. border: none;
  3032. outline: none;
  3033. width: 80%;
  3034. white-space: nowrap;
  3035. overflow: hidden;
  3036. text-overflow: ellipsis;
  3037. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3038. </div>
  3039. <div class="chapter_upload_ic">
  3040. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3041. <div class="chapter_upload_ud" style="z-index: 99">
  3042. <div class="chapter_upload_up" @click="
  3043. upCd(
  3044. $event,
  3045. unitIndex,
  3046. index,
  3047. itemTaskIndex,
  3048. index1
  3049. )
  3050. "></div>
  3051. <div class="chapter_upload_down" @click="
  3052. downCd(
  3053. $event,
  3054. unitIndex,
  3055. index,
  3056. itemTaskIndex,
  3057. index1
  3058. )
  3059. "></div>
  3060. </div>
  3061. <div class="chapter_upload_ic_edit" v-if="
  3062. item1.type == 2 ||
  3063. item1.type == 3 ||
  3064. item1.type == 12 ||
  3065. item1.type == 13 ||
  3066. item1.type == 7
  3067. " @click.stop="
  3068. updataVideoT(
  3069. $event,
  3070. unitIndex,
  3071. itemTaskIndex,
  3072. index1
  3073. )
  3074. ">
  3075. <div></div>
  3076. </div>
  3077. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3078. selectAttText(itemTaskIndex, index1)
  3079. ">
  3080. <div></div>
  3081. </div>
  3082. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3083. @click="selectLine(itemTaskIndex, index1)">
  3084. <div></div>
  3085. </div>
  3086. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3087. openUpdateSource(itemTaskIndex, index1)
  3088. ">
  3089. <div></div>
  3090. </div>
  3091. <div class="chapter_upload_ic_r" @click.stop="
  3092. deleteChapterData(
  3093. $event,
  3094. unitIndex,
  3095. index,
  3096. index1,
  3097. itemTaskIndex
  3098. )
  3099. ">
  3100. <div></div>
  3101. </div>
  3102. </div>
  3103. </div>
  3104. </div>
  3105. </div>
  3106. </div>
  3107. <div class="add_info_box" style="margin: 10px 0 0">
  3108. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3109. <span style="color: red">*</span>
  3110. 教学设计
  3111. <input type="file"
  3112. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3113. style="display: none" v-if="inputShow" @change="
  3114. beforeUpload3(
  3115. $event,
  3116. unitIndex,
  3117. 3,
  3118. itemTaskIndex,
  3119. '教学设计'
  3120. )
  3121. " />
  3122. </button>
  3123. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3124. <span style="color: red">*</span>
  3125. 教学课件
  3126. <input type="file"
  3127. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3128. style="display: none" v-if="inputShow" @change="
  3129. beforeUpload3(
  3130. $event,
  3131. unitIndex,
  3132. 3,
  3133. itemTaskIndex,
  3134. '教学课件'
  3135. )
  3136. " />
  3137. </button>
  3138. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3139. 教学视频
  3140. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3141. style="display: none" v-if="inputShow" @change="
  3142. beforeUpload3(
  3143. $event,
  3144. unitIndex,
  3145. 2,
  3146. itemTaskIndex,
  3147. '教学视频'
  3148. )
  3149. " />
  3150. </button>
  3151. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3152. 教学音频
  3153. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3154. beforeUpload3(
  3155. $event,
  3156. unitIndex,
  3157. 2,
  3158. itemTaskIndex,
  3159. '教学音频'
  3160. )
  3161. " />
  3162. </button>
  3163. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3164. 学习单
  3165. <input type="file"
  3166. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3167. style="display: none" v-if="inputShow" @change="
  3168. beforeUpload3(
  3169. $event,
  3170. unitIndex,
  3171. 3,
  3172. itemTaskIndex,
  3173. '学习单'
  3174. )
  3175. " />
  3176. </button>
  3177. </div>
  3178. <div v-if="
  3179. unitJson[unitIndex].chapterInfo[0].taskJson[
  3180. itemTaskIndex
  3181. ].proVisible
  3182. " class="mask">
  3183. <div class="progressBox">
  3184. <!-- <div id="closePro" class="closeCss">
  3185. <img src="../../../../assets/icon/close.png" alt />
  3186. </div> -->
  3187. <div class="lbox">
  3188. <img src="../../../assets/loading.gif" />上传中,请稍后
  3189. </div>
  3190. <div style="margin-bottom: 10px">
  3191. <span>{{
  3192. unitJson[unitIndex].chapterInfo[0].taskJson[
  3193. itemTaskIndex
  3194. ].isFinishSize
  3195. }}M</span>
  3196. /
  3197. <span>{{
  3198. unitJson[unitIndex].chapterInfo[0].taskJson[
  3199. itemTaskIndex
  3200. ].isAllSize
  3201. }}M</span>
  3202. </div>
  3203. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3204. itemTaskIndex
  3205. ].progress
  3206. ? unitJson[unitIndex].chapterInfo[0]
  3207. .taskJson[itemTaskIndex].progress
  3208. : 0
  3209. " style="width: 80%"></el-progress>
  3210. </div>
  3211. </div>
  3212. </div>
  3213. </div>
  3214. <!-- padding: 20px; -->
  3215. <div style="
  3216. background: #fff;
  3217. border-radius: 5px;
  3218. margin-top: 15px;
  3219. ">
  3220. <div v-if="
  3221. unitJson[unitIndex].easy != 3 &&
  3222. !(
  3223. unitJson[unitIndex].easy == 5 &&
  3224. itemTask.taskType == 1
  3225. )
  3226. " style="
  3227. flex-direction: row;
  3228. justify-content: flex-start;
  3229. align-items: center;
  3230. ">
  3231. <div style="
  3232. display: flex;
  3233. flex-direction: row;
  3234. align-items: center;
  3235. margin: 5px 0 20px;
  3236. ">
  3237. <div class="lineTitle clineTitle">
  3238. {{
  3239. !unitJson[unitIndex].easy ||
  3240. unitJson[unitIndex].easy == 6 ||
  3241. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3242. -1
  3243. ? "练习内容"
  3244. : "评价内容"
  3245. }}
  3246. </div>
  3247. <!-- <div class="line" style="width: 90%"></div> -->
  3248. </div>
  3249. </div>
  3250. <div v-if="
  3251. unitJson[unitIndex].easy == 6 ||
  3252. !unitJson[unitIndex].easy
  3253. " class="toolChoose">
  3254. <div class="tools">
  3255. <div class="leftTools" style="width: 100%" v-for="(
  3256. itemTool, toolIndex
  3257. ) in itemTask.toolChoose" :key="toolIndex">
  3258. <div style="
  3259. display: flex;
  3260. flex-direction: row;
  3261. align-items: baseline;
  3262. flex-wrap: nowrap;
  3263. justify-content: flex-start;
  3264. position: relative;
  3265. ">
  3266. <div style="margin-right: 20px; font-weight: bold"
  3267. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3268. 工具 {{ toolIndex + 1 }} :
  3269. </div>
  3270. <div class="chooseWho">
  3271. <div :class="itemTool.toolType == 0
  3272. ? 'isChooseActive'
  3273. : ''
  3274. " @click="
  3275. (itemTool.toolType = 0),
  3276. (itemTool.isFold3 = false),
  3277. $forceUpdate()
  3278. ">
  3279. 互动类
  3280. </div>
  3281. <div :class="itemTool.toolType == 1
  3282. ? 'isChooseActive'
  3283. : ''
  3284. " @click="
  3285. (itemTool.toolType = 1),
  3286. (itemTool.isFold3 = false),
  3287. $forceUpdate()
  3288. ">
  3289. 思维类
  3290. </div>
  3291. <div :class="itemTool.toolType == 6
  3292. ? 'isChooseActive'
  3293. : ''
  3294. " @click="
  3295. (itemTool.toolType = 6),
  3296. (itemTool.isFold3 = false),
  3297. $forceUpdate()
  3298. ">
  3299. 协作类
  3300. </div>
  3301. <div :class="itemTool.toolType == 2
  3302. ? 'isChooseActive'
  3303. : ''
  3304. " @click="
  3305. (itemTool.toolType = 2),
  3306. (itemTool.isFold3 = false),
  3307. $forceUpdate()
  3308. ">
  3309. 测评类
  3310. </div>
  3311. <div :class="itemTool.toolType == 7
  3312. ? 'isChooseActive'
  3313. : ''
  3314. " @click="
  3315. (itemTool.toolType = 7),
  3316. (itemTool.isFold3 = false),
  3317. $forceUpdate()
  3318. ">
  3319. 评价类
  3320. </div>
  3321. <div :class="itemTool.toolType == 3
  3322. ? 'isChooseActive'
  3323. : ''
  3324. " @click="
  3325. (itemTool.toolType = 3),
  3326. (itemTool.isFold3 = false),
  3327. $forceUpdate()
  3328. ">
  3329. 编程类
  3330. </div>
  3331. <div :class="itemTool.toolType == 5
  3332. ? 'isChooseActive'
  3333. : ''
  3334. " @click="
  3335. (itemTool.toolType = 5),
  3336. (itemTool.isFold3 = false),
  3337. $forceUpdate()
  3338. ">
  3339. 学科类
  3340. </div>
  3341. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3342. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3343. 其他
  3344. </div> -->
  3345. </div>
  3346. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3347. margin:
  3348. itemTask.toolChoose.length > 1
  3349. ? '0px 35px 0px auto'
  3350. : '0 0 0 auto',
  3351. }" v-if="itemTask.toolChoose.length > 1">
  3352. <div class="chapter_upload_up2" @click.stop="
  3353. upTool(
  3354. $event,
  3355. unitIndex,
  3356. itemTaskIndex,
  3357. toolIndex
  3358. )
  3359. ">
  3360. 上移
  3361. </div>
  3362. <div class="chapter_upload_down2" @click.stop="
  3363. downTool(
  3364. $event,
  3365. unitIndex,
  3366. itemTaskIndex,
  3367. toolIndex
  3368. )
  3369. ">
  3370. 下移
  3371. </div>
  3372. </div>
  3373. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3374. @click="fold3(itemTaskIndex, toolIndex)"
  3375. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3376. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3377. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3378. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3379. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3380. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3381. v-if="itemTask.toolChoose.length > 1" style="
  3382. position: absolute;
  3383. right: 0;
  3384. top: -5px;
  3385. "></div>
  3386. </div>
  3387. <!-- v-show="!itemTool.isFold3" -->
  3388. <div style="min-height: 163px">
  3389. <div class="toolSort" v-if="itemTool.toolType == 0">
  3390. <!-- <div class="tool">
  3391. <div
  3392. class="whiteBIcon"
  3393. @click="addTools(8, itemTaskIndex, toolIndex)"
  3394. >
  3395. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3396. <div style="margin: 5px 0">素材库</div>
  3397. </div>
  3398. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3399. <img
  3400. src="../../../assets/icon/checkNo.png"
  3401. alt
  3402. v-if="itemTool.tool.indexOf(8) == -1"
  3403. />
  3404. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3405. alt /><span>已选择</span></div>
  3406. </div>
  3407. </div>-->
  3408. <!-- <div class="tool">
  3409. <div
  3410. class="whiteBIcon"
  3411. @click="addTools(17, itemTaskIndex, toolIndex)"
  3412. >
  3413. <img
  3414. src="../../../assets/icon/secondToolList/library.png"
  3415. alt
  3416. />
  3417. <div style="margin: 5px 0">学习资料</div>
  3418. </div>
  3419. <div
  3420. class="check"
  3421. @click="addTools(17, itemTaskIndex, toolIndex)"
  3422. >
  3423. <img
  3424. src="../../../assets/icon/checkNo.png"
  3425. alt
  3426. v-if="itemTool.tool.indexOf(17) == -1"
  3427. />
  3428. <img
  3429. src="../../../assets/icon/checkedIs.png"
  3430. alt
  3431. v-else
  3432. />
  3433. </div>10
  3434. </div> -->
  3435. <div class="tool" :class="{
  3436. isToolChoose:
  3437. itemTool.tool.indexOf(10) != -1,
  3438. }" @click="
  3439. addTools(10, itemTaskIndex, toolIndex)
  3440. ">
  3441. <div class="whiteBIcon" @click.stop="
  3442. openTools(itemTaskIndex, 10, toolIndex)
  3443. ">
  3444. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3445. <div style="margin: 5px 0">倒计时</div>
  3446. </div>
  3447. <div class="noCTool">
  3448. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3449. </div>
  3450. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3451. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3452. </div>
  3453. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3454. <img src="../../../assets/icon/checkNo.png" alt
  3455. v-if="itemTool.tool.indexOf(10) == -1" />
  3456. <div class="checkDiv" v-else>
  3457. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3458. </div>
  3459. </div> -->
  3460. </div>
  3461. <div class="tool" :class="{
  3462. isToolChoose:
  3463. itemTool.tool.indexOf(65) != -1,
  3464. }" @click="
  3465. addTools(65, itemTaskIndex, toolIndex)
  3466. ">
  3467. <div class="whiteBIcon" @click.stop="
  3468. addTools(65, itemTaskIndex, toolIndex)
  3469. ">
  3470. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3471. <div style="margin: 5px 0">挑人</div>
  3472. </div>
  3473. <div class="noCTool">
  3474. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3475. </div>
  3476. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3477. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3478. </div>
  3479. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3480. <img src="../../../assets/icon/checkNo.png" alt
  3481. v-if="itemTool.tool.indexOf(65) == -1" />
  3482. <div class="checkDiv" v-else>
  3483. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3484. </div>
  3485. </div> -->
  3486. </div>
  3487. <!-- <div class="tool">
  3488. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3489. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3490. <div style="margin: 5px 0">学生分组</div>
  3491. </div>
  3492. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3493. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3494. <div class="checkDiv" v-else>
  3495. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3496. </div>
  3497. </div>
  3498. </div> -->
  3499. <!-- <div class="tool">
  3500. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3501. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3502. <div style="margin: 5px 0">交互视频</div>
  3503. </div>
  3504. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3505. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3506. <div class="checkDiv" v-else>
  3507. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3508. </div>
  3509. </div>
  3510. </div> -->
  3511. </div>
  3512. <div class="toolSort" v-if="itemTool.toolType == 1">
  3513. <div class="tool" :class="{
  3514. isToolChoose:
  3515. itemTool.tool.indexOf(7) != -1,
  3516. }" @click="
  3517. addTools(7, itemTaskIndex, toolIndex)
  3518. ">
  3519. <div class="whiteBIcon" @click.stop="
  3520. addTools(7, itemTaskIndex, toolIndex)
  3521. ">
  3522. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3523. <div style="margin: 5px 0">思维网格</div>
  3524. </div>
  3525. <div class="noCTool">
  3526. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3527. </div>
  3528. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3529. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3530. </div>
  3531. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3532. <img src="../../../assets/icon/checkNo.png" alt
  3533. v-if="itemTool.tool.indexOf(7) == -1" />
  3534. <div class="checkDiv" v-else>
  3535. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3536. </div>
  3537. </div> -->
  3538. </div>
  3539. <div class="tool" :class="{
  3540. isToolChoose:
  3541. itemTool.tool.indexOf(1) != -1,
  3542. }" @click="
  3543. addTools(1, itemTaskIndex, toolIndex)
  3544. ">
  3545. <div class="whiteBIcon" @click.stop="
  3546. openTools(itemTaskIndex, 1, toolIndex)
  3547. ">
  3548. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3549. <div style="margin: 5px 0">电子白板</div>
  3550. </div>
  3551. <div class="noCTool">
  3552. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3553. </div>
  3554. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3555. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3556. </div>
  3557. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  3558. <img src="../../../assets/icon/checkNo.png" alt
  3559. v-if="itemTool.tool.indexOf(1) == -1" />
  3560. <div class="checkDiv" v-else>
  3561. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3562. </div>
  3563. </div> -->
  3564. </div>
  3565. <!-- <div class="tool">
  3566. <div
  3567. class="whiteBIcon"
  3568. @click="addTools(2, itemTaskIndex, toolIndex)"
  3569. >
  3570. <img
  3571. src="../../../assets/icon/secondToolList/note.png"
  3572. alt
  3573. />
  3574. <div style="margin: 5px 0">便签</div>
  3575. </div>
  3576. <div
  3577. class="check"
  3578. @click="addTools(2, itemTaskIndex, toolIndex)"
  3579. >
  3580. <img
  3581. src="../../../assets/icon/checkNo.png"
  3582. alt
  3583. v-if="itemTool.tool.indexOf(2) == -1"
  3584. />
  3585. <div class="checkDiv" v-else>
  3586. <img
  3587. src="../../../assets/icon/checkedIs.png"
  3588. alt
  3589. /><span>已选择</span>
  3590. </div>
  3591. </div>
  3592. </div> -->
  3593. <!-- <div class="tool">
  3594. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  3595. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  3596. <div style="margin: 5px 0">协同文档</div>
  3597. </div>
  3598. <div
  3599. class="check"
  3600. @click="addTools(6, itemTaskIndex, toolIndex)"
  3601. >
  3602. <img
  3603. src="../../../assets/icon/checkNo.png"
  3604. alt
  3605. v-if="itemTool.tool.indexOf(6) == -1"
  3606. />
  3607. <div class="checkDiv" v-else>
  3608. <img
  3609. src="../../../assets/icon/checkedIs.png"
  3610. alt
  3611. /><span>已选择</span>
  3612. </div>
  3613. </div>
  3614. </div> -->
  3615. <div class="tool" :class="{
  3616. isToolChoose:
  3617. itemTool.tool.indexOf(52) != -1,
  3618. }" @click="
  3619. addTools(52, itemTaskIndex, toolIndex)
  3620. ">
  3621. <div class="whiteBIcon" @click.stop="
  3622. openTools(itemTaskIndex, 52, toolIndex)
  3623. ">
  3624. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3625. <div style="margin: 5px 0">文档</div>
  3626. </div>
  3627. <div class="noCTool">
  3628. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3629. </div>
  3630. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  3631. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3632. </div>
  3633. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  3634. <img src="../../../assets/icon/checkNo.png" alt
  3635. v-if="itemTool.tool.indexOf(52) == -1" />
  3636. <div class="checkDiv" v-else>
  3637. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3638. </div>
  3639. </div> -->
  3640. </div>
  3641. <div class="tool" :class="{
  3642. isToolChoose:
  3643. itemTool.tool.indexOf(3) != -1,
  3644. }" @click="
  3645. addTools(3, itemTaskIndex, toolIndex)
  3646. ">
  3647. <div class="whiteBIcon" @click.stop="
  3648. openTools(itemTaskIndex, 3, toolIndex)
  3649. ">
  3650. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3651. <div style="margin: 5px 0">思维导图</div>
  3652. </div>
  3653. <div class="noCTool">
  3654. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3655. </div>
  3656. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  3657. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3658. </div>
  3659. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  3660. <img src="../../../assets/icon/checkNo.png" alt
  3661. v-if="itemTool.tool.indexOf(3) == -1" />
  3662. <div class="checkDiv" v-else>
  3663. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3664. </div>
  3665. </div> -->
  3666. </div>
  3667. <div class="tool" :class="{
  3668. isToolChoose:
  3669. itemTool.tool.indexOf(48) != -1,
  3670. }" @click="
  3671. addTools(48, itemTaskIndex, toolIndex)
  3672. ">
  3673. <div class="whiteBIcon" @click.stop="
  3674. openTools(itemTaskIndex, 48, toolIndex)
  3675. ">
  3676. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3677. <div style="margin: 5px 0">表格</div>
  3678. </div>
  3679. <div class="noCTool">
  3680. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3681. </div>
  3682. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  3683. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3684. </div>
  3685. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  3686. <img src="../../../assets/icon/checkNo.png" alt
  3687. v-if="itemTool.tool.indexOf(48) == -1" />
  3688. <div class="checkDiv" v-else>
  3689. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3690. </div>
  3691. </div> -->
  3692. </div>
  3693. </div>
  3694. <div class="toolSort" v-if="itemTool.toolType == 6">
  3695. <div class="tool" :class="{
  3696. isToolChoose:
  3697. itemTool.tool.indexOf(49) != -1,
  3698. }" @click="
  3699. addTools(49, itemTaskIndex, toolIndex)
  3700. ">
  3701. <div class="whiteBIcon" @click.stop="
  3702. openTools(itemTaskIndex, 49, toolIndex)
  3703. ">
  3704. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3705. <div style="margin: 5px 0">学生分组</div>
  3706. </div>
  3707. <div class="noCTool">
  3708. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3709. </div>
  3710. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  3711. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3712. </div>
  3713. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3714. <img src="../../../assets/icon/checkNo.png" alt
  3715. v-if="itemTool.tool.indexOf(49) == -1" />
  3716. <div class="checkDiv" v-else>
  3717. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3718. </div>
  3719. </div> -->
  3720. </div>
  3721. </div>
  3722. <div class="toolSort" v-if="itemTool.toolType == 2">
  3723. <!-- <div class="tool">
  3724. <div
  3725. class="whiteBIcon"
  3726. @click="addTools(5, itemTaskIndex, toolIndex)"
  3727. >
  3728. <img
  3729. src="../../../assets/icon/thirdToolList/score.png"
  3730. alt
  3731. />
  3732. <div style="margin: 5px 0">量规评分</div>
  3733. </div>
  3734. <div
  3735. class="check"
  3736. @click="addTools(5, itemTaskIndex, toolIndex)"
  3737. >
  3738. <img
  3739. src="../../../assets/icon/checkNo.png"
  3740. alt
  3741. v-if="itemTool.tool.indexOf(5) == -1"
  3742. />
  3743. <img
  3744. src="../../../assets/icon/checkedIs.png"
  3745. alt
  3746. v-else
  3747. />
  3748. </div>
  3749. </div>-->
  3750. <div class="tool" :class="{
  3751. isToolChoose:
  3752. itemTool.tool.indexOf(4) != -1,
  3753. }" @click="
  3754. addTools(4, itemTaskIndex, toolIndex)
  3755. ">
  3756. <div class="whiteBIcon" @click.stop="
  3757. openTools(itemTaskIndex, 4, toolIndex)
  3758. ">
  3759. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3760. <div style="margin: 5px 0">问卷调查</div>
  3761. </div>
  3762. <div class="noCTool">
  3763. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3764. </div>
  3765. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  3766. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3767. </div>
  3768. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3769. <img src="../../../assets/icon/checkNo.png" alt
  3770. v-if="itemTool.tool.indexOf(4) == -1" />
  3771. <div class="checkDiv" v-else>
  3772. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3773. </div>
  3774. </div> -->
  3775. </div>
  3776. <div class="tool" :class="{
  3777. isToolChoose:
  3778. itemTool.tool.indexOf(45) != -1,
  3779. }" @click="
  3780. addTools(45, itemTaskIndex, toolIndex)
  3781. ">
  3782. <div class="whiteBIcon" @click="
  3783. openTools(itemTaskIndex, 45, toolIndex)
  3784. ">
  3785. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3786. <div style="margin: 5px 0">选择题</div>
  3787. </div>
  3788. <div class="noCTool">
  3789. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3790. </div>
  3791. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  3792. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3793. </div>
  3794. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  3795. <img src="../../../assets/icon/checkNo.png" alt
  3796. v-if="itemTool.tool.indexOf(45) == -1" />
  3797. <div class="checkDiv" v-else>
  3798. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3799. </div>
  3800. </div> -->
  3801. </div>
  3802. <div class="tool" :class="{
  3803. isToolChoose:
  3804. itemTool.tool.indexOf(15) != -1,
  3805. }" @click="
  3806. addTools(15, itemTaskIndex, toolIndex)
  3807. ">
  3808. <div class="whiteBIcon" @click.stop="
  3809. openTools(itemTaskIndex, 15, toolIndex)
  3810. ">
  3811. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3812. <div style="margin: 5px 0">问答</div>
  3813. </div>
  3814. <div class="noCTool">
  3815. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3816. </div>
  3817. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  3818. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3819. </div>
  3820. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  3821. <img src="../../../assets/icon/checkNo.png" alt
  3822. v-if="itemTool.tool.indexOf(15) == -1" />
  3823. <div class="checkDiv" v-else>
  3824. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3825. </div>
  3826. </div> -->
  3827. </div>
  3828. <div class="tool" :class="{
  3829. isToolChoose:
  3830. itemTool.tool.indexOf(16) != -1,
  3831. }" @click="
  3832. addTools(16, itemTaskIndex, toolIndex)
  3833. ">
  3834. <div class="whiteBIcon" @click.stop="
  3835. addTools(16, itemTaskIndex, toolIndex)
  3836. ">
  3837. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3838. <div style="margin: 5px 0">作业提交</div>
  3839. </div>
  3840. <div class="noCTool">
  3841. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3842. </div>
  3843. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  3844. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3845. </div>
  3846. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  3847. <img src="../../../assets/icon/checkNo.png" alt
  3848. v-if="itemTool.tool.indexOf(16) == -1" />
  3849. <div class="checkDiv" v-else>
  3850. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3851. </div>
  3852. </div> -->
  3853. </div>
  3854. <div class="tool" :class="{
  3855. isToolChoose:
  3856. itemTool.tool.indexOf(50) != -1,
  3857. }" @click="
  3858. addTools(50, itemTaskIndex, toolIndex)
  3859. ">
  3860. <div class="whiteBIcon" @click.stop="
  3861. addTools(50, itemTaskIndex, toolIndex)
  3862. ">
  3863. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3864. <div style="margin: 5px 0">批量上传</div>
  3865. </div>
  3866. <div class="noCTool">
  3867. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3868. </div>
  3869. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  3870. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3871. </div>
  3872. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  3873. <img src="../../../assets/icon/checkNo.png" alt
  3874. v-if="itemTool.tool.indexOf(50) == -1" />
  3875. <div class="checkDiv" v-else>
  3876. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3877. </div>
  3878. </div> -->
  3879. </div>
  3880. <!-- <div class="tool">
  3881. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  3882. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  3883. <div style="margin: 5px 0">个人评价</div>
  3884. </div>
  3885. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  3886. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  3887. <div class="checkDiv" v-else>
  3888. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3889. </div>
  3890. </div>
  3891. </div> -->
  3892. <div class="tool" :class="{
  3893. isToolChoose:
  3894. itemTool.tool.indexOf(41) != -1,
  3895. }" @click="
  3896. addTools(41, itemTaskIndex, toolIndex)
  3897. ">
  3898. <div class="whiteBIcon" @click.stop="
  3899. openTools(itemTaskIndex, 41, toolIndex)
  3900. ">
  3901. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3902. <div style="margin: 5px 0">选择匹配</div>
  3903. </div>
  3904. <div class="noCTool">
  3905. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3906. </div>
  3907. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  3908. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3909. </div>
  3910. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  3911. <img src="../../../assets/icon/checkNo.png" alt
  3912. v-if="itemTool.tool.indexOf(41) == -1" />
  3913. <div class="checkDiv" v-else>
  3914. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3915. </div>
  3916. </div> -->
  3917. </div>
  3918. <div class="tool" :class="{
  3919. isToolChoose:
  3920. itemTool.tool.indexOf(47) != -1,
  3921. }" @click="
  3922. addTools(47, itemTaskIndex, toolIndex)
  3923. ">
  3924. <div class="whiteBIcon" @click.stop="
  3925. openTools(itemTaskIndex, 47, toolIndex)
  3926. ">
  3927. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  3928. <div style="margin: 5px 0">排序</div>
  3929. </div>
  3930. <div class="noCTool">
  3931. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3932. </div>
  3933. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  3934. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3935. </div>
  3936. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  3937. <img src="../../../assets/icon/checkNo.png" alt
  3938. v-if="itemTool.tool.indexOf(47) == -1" />
  3939. <div class="checkDiv" v-else>
  3940. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3941. </div>
  3942. </div> -->
  3943. </div>
  3944. <!-- <div class="tool">
  3945. <div
  3946. class="whiteBIcon"
  3947. @click="openTools(itemTaskIndex, 42, toolIndex)"
  3948. >
  3949. <img
  3950. src="../../../assets/icon/thirdToolList/mp3.png"
  3951. alt
  3952. />
  3953. <div style="margin: 5px 0">上传音频</div>
  3954. </div>
  3955. <div
  3956. class="check"
  3957. @click="addTools(42, itemTaskIndex, toolIndex)"
  3958. >
  3959. <img
  3960. src="../../../assets/icon/checkNo.png"
  3961. alt
  3962. v-if="itemTool.tool.indexOf(42) == -1"
  3963. />
  3964. <img
  3965. src="../../../assets/icon/checkedIs.png"
  3966. alt
  3967. v-else
  3968. />
  3969. </div>
  3970. </div> -->
  3971. </div>
  3972. <div class="toolSort" v-if="itemTool.toolType == 3">
  3973. <div class="tool" :class="{
  3974. isToolChoose:
  3975. itemTool.tool.indexOf(18) != -1,
  3976. }" @click="
  3977. addTools(18, itemTaskIndex, toolIndex)
  3978. ">
  3979. <div class="whiteBIcon" @click.stop="
  3980. addTools(18, itemTaskIndex, toolIndex)
  3981. ">
  3982. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  3983. <div style="margin: 5px 0">训练平台</div>
  3984. </div>
  3985. <div class="noCTool">
  3986. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3987. </div>
  3988. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  3989. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3990. </div>
  3991. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  3992. <img src="../../../assets/icon/checkNo.png" alt
  3993. v-if="itemTool.tool.indexOf(18) == -1" />
  3994. <div class="checkDiv" v-else>
  3995. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3996. </div>
  3997. </div> -->
  3998. </div>
  3999. <div class="tool" :class="{
  4000. isToolChoose:
  4001. itemTool.tool.indexOf(21) != -1,
  4002. }" @click="
  4003. addTools(21, itemTaskIndex, toolIndex)
  4004. ">
  4005. <div class="whiteBIcon" @click.stop="
  4006. addTools(21, itemTaskIndex, toolIndex)
  4007. ">
  4008. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4009. <div style="margin: 5px 0">
  4010. AIoT Blockly
  4011. </div>
  4012. </div>
  4013. <div class="noCTool">
  4014. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4015. </div>
  4016. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4017. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4018. </div>
  4019. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4020. <img src="../../../assets/icon/checkNo.png" alt
  4021. v-if="itemTool.tool.indexOf(21) == -1" />
  4022. <div class="checkDiv" v-else>
  4023. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4024. </div>
  4025. </div> -->
  4026. </div>
  4027. <!-- <div class="tool">
  4028. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4029. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4030. <div style="margin: 5px 0">AI体验</div>
  4031. </div>
  4032. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4033. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4034. <div class="checkDiv" v-else>
  4035. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4036. </div>
  4037. </div>
  4038. </div> -->
  4039. <div class="tool" :class="{
  4040. isToolChoose:
  4041. itemTool.tool.indexOf(23) != -1,
  4042. }" @click="
  4043. addTools(23, itemTaskIndex, toolIndex)
  4044. ">
  4045. <div class="whiteBIcon" @click.stop="
  4046. addTools(23, itemTaskIndex, toolIndex)
  4047. ">
  4048. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4049. <div style="margin: 5px 0">AI Python</div>
  4050. </div>
  4051. <div class="noCTool">
  4052. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4053. </div>
  4054. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4055. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4056. </div>
  4057. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4058. <img src="../../../assets/icon/checkNo.png" alt
  4059. v-if="itemTool.tool.indexOf(23) == -1" />
  4060. <div class="checkDiv" v-else>
  4061. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4062. </div>
  4063. </div> -->
  4064. </div>
  4065. <div class="tool" :class="{
  4066. isToolChoose:
  4067. itemTool.tool.indexOf(24) != -1,
  4068. }" @click="
  4069. addTools(24, itemTaskIndex, toolIndex)
  4070. ">
  4071. <div class="whiteBIcon" @click.stop="
  4072. addTools(24, itemTaskIndex, toolIndex)
  4073. ">
  4074. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4075. <div style="margin: 5px 0">
  4076. AI Blockly
  4077. </div>
  4078. </div>
  4079. <div class="noCTool">
  4080. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4081. </div>
  4082. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4083. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4084. </div>
  4085. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4086. <img src="../../../assets/icon/checkNo.png" alt
  4087. v-if="itemTool.tool.indexOf(24) == -1" />
  4088. <div class="checkDiv" v-else>
  4089. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4090. </div>
  4091. </div> -->
  4092. </div>
  4093. <div class="tool" :class="{
  4094. isToolChoose:
  4095. itemTool.tool.indexOf(32) != -1,
  4096. }" @click="
  4097. addTools(32, itemTaskIndex, toolIndex)
  4098. ">
  4099. <div class="whiteBIcon" @click.stop="
  4100. addTools(32, itemTaskIndex, toolIndex)
  4101. ">
  4102. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4103. <div style="margin: 5px 0">源码编辑</div>
  4104. </div>
  4105. <div class="noCTool">
  4106. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4107. </div>
  4108. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4109. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4110. </div>
  4111. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4112. <img src="../../../assets/icon/checkNo.png" alt
  4113. v-if="itemTool.tool.indexOf(32) == -1" />
  4114. <div class="checkDiv" v-else>
  4115. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4116. </div>
  4117. </div> -->
  4118. </div>
  4119. <div class="tool" :class="{
  4120. isToolChoose:
  4121. itemTool.tool.indexOf(57) != -1,
  4122. }" @click="
  4123. addTools(57, itemTaskIndex, toolIndex)
  4124. ">
  4125. <div class="whiteBIcon" @click.stop="
  4126. openTools(itemTaskIndex, 57, toolIndex)
  4127. ">
  4128. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4129. <div style="margin: 5px 0">CocoPi</div>
  4130. </div>
  4131. <div class="noCTool">
  4132. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4133. </div>
  4134. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4135. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4136. </div>
  4137. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4138. <img src="../../../assets/icon/checkNo.png" alt
  4139. v-if="itemTool.tool.indexOf(57) == -1" />
  4140. <div class="checkDiv" v-else>
  4141. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4142. </div>
  4143. </div> -->
  4144. </div>
  4145. <div class="tool" :class="{
  4146. isToolChoose:
  4147. itemTool.tool.indexOf(63) != -1,
  4148. }" @click="
  4149. addTools(63, itemTaskIndex, toolIndex)
  4150. ">
  4151. <div class="whiteBIcon" @click.stop="
  4152. addTools(63, itemTaskIndex, toolIndex)
  4153. ">
  4154. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4155. <div style="margin: 5px 0">海龟编程</div>
  4156. </div>
  4157. <div class="noCTool">
  4158. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4159. </div>
  4160. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4161. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4162. </div>
  4163. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4164. <img src="../../../assets/icon/checkNo.png" alt
  4165. v-if="itemTool.tool.indexOf(63) == -1" />
  4166. <div class="checkDiv" v-else>
  4167. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4168. </div>
  4169. </div> -->
  4170. </div>
  4171. <div class="tool" :class="{
  4172. isToolChoose:
  4173. itemTool.tool.indexOf(71) != -1,
  4174. }" @click="
  4175. addTools(71, itemTaskIndex, toolIndex)
  4176. ">
  4177. <div class="whiteBIcon" @click.stop="
  4178. addTools(71, itemTaskIndex, toolIndex)
  4179. ">
  4180. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4181. <div style="margin: 5px 0">AI智能体</div>
  4182. </div>
  4183. <div class="noCTool">
  4184. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4185. </div>
  4186. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4187. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4188. </div>
  4189. </div>
  4190. </div>
  4191. <div class="toolSort" v-if="itemTool.toolType == 7">
  4192. <div class="tool" :class="{
  4193. isToolChoose:
  4194. itemTool.tool.indexOf(40) != -1,
  4195. }" @click.stop="
  4196. addTools(40, itemTaskIndex, toolIndex)
  4197. ">
  4198. <div class="whiteBIcon" @click.stop="
  4199. openTools(itemTaskIndex, 40, toolIndex)
  4200. ">
  4201. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4202. <div style="margin: 5px 0">个人评价</div>
  4203. </div>
  4204. <div class="noCTool">
  4205. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4206. </div>
  4207. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4208. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4209. </div>
  4210. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4211. <img src="../../../assets/icon/checkNo.png" alt
  4212. v-if="itemTool.tool.indexOf(40) == -1" />
  4213. <div class="checkDiv" v-else>
  4214. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4215. </div>
  4216. </div> -->
  4217. </div>
  4218. </div>
  4219. <div class="toolSort" v-if="itemTool.toolType == 5">
  4220. <div class="tool" :class="{
  4221. isToolChoose:
  4222. itemTool.tool.indexOf(28) != -1,
  4223. }" @click="
  4224. addTools(28, itemTaskIndex, toolIndex)
  4225. ">
  4226. <div class="whiteBIcon" @click.stop="
  4227. addTools(28, itemTaskIndex, toolIndex)
  4228. ">
  4229. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4230. <div style="margin: 5px 0">翻译</div>
  4231. </div>
  4232. <div class="noCTool">
  4233. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4234. </div>
  4235. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4236. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4237. </div>
  4238. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4239. <img src="../../../assets/icon/checkNo.png" alt
  4240. v-if="itemTool.tool.indexOf(28) == -1" />
  4241. <div class="checkDiv" v-else>
  4242. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4243. </div>
  4244. </div> -->
  4245. </div>
  4246. <div class="tool" :class="{
  4247. isToolChoose:
  4248. itemTool.tool.indexOf(31) != -1,
  4249. }" @click="
  4250. addTools(31, itemTaskIndex, toolIndex)
  4251. ">
  4252. <div class="whiteBIcon" @click.stop="
  4253. addTools(31, itemTaskIndex, toolIndex)
  4254. ">
  4255. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4256. <div style="margin: 5px 0">数字画板</div>
  4257. </div>
  4258. <div class="noCTool">
  4259. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4260. </div>
  4261. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4262. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4263. </div>
  4264. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4265. <img src="../../../assets/icon/checkNo.png" alt
  4266. v-if="itemTool.tool.indexOf(31) == -1" />
  4267. <div class="checkDiv" v-else>
  4268. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4269. </div>
  4270. </div> -->
  4271. </div>
  4272. <div class="tool" :class="{
  4273. isToolChoose:
  4274. itemTool.tool.indexOf(39) != -1,
  4275. }" @click="
  4276. addTools(39, itemTaskIndex, toolIndex)
  4277. ">
  4278. <div class="whiteBIcon" @click.stop="
  4279. addTools(39, itemTaskIndex, toolIndex)
  4280. ">
  4281. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4282. <div style="margin: 5px 0">GeoGebra</div>
  4283. </div>
  4284. <div class="noCTool">
  4285. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4286. </div>
  4287. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4288. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4289. </div>
  4290. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4291. <img src="../../../assets/icon/checkNo.png" alt
  4292. v-if="itemTool.tool.indexOf(39) == -1" />
  4293. <div class="checkDiv" v-else>
  4294. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4295. </div>
  4296. </div> -->
  4297. </div>
  4298. <div class="tool" :class="{
  4299. isToolChoose:
  4300. itemTool.tool.indexOf(66) != -1,
  4301. }" @click="
  4302. addTools(66, itemTaskIndex, toolIndex)
  4303. ">
  4304. <div class="whiteBIcon" @click.stop="
  4305. addTools(66, itemTaskIndex, toolIndex)
  4306. ">
  4307. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4308. <div style="margin: 5px 0">公式编辑</div>
  4309. </div>
  4310. <div class="noCTool">
  4311. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4312. </div>
  4313. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4314. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4315. </div>
  4316. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4317. <img src="../../../assets/icon/checkNo.png" alt
  4318. v-if="itemTool.tool.indexOf(66) == -1" />
  4319. <div class="checkDiv" v-else>
  4320. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4321. </div>
  4322. </div> -->
  4323. </div>
  4324. <!-- <div class="tool">
  4325. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4326. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4327. <div style="margin: 5px 0">分子结构</div>
  4328. </div>
  4329. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4330. <img src="../../../assets/icon/checkNo.png" alt
  4331. v-if="itemTool.tool.indexOf(67) == -1" />
  4332. <div class="checkDiv" v-else>
  4333. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4334. </div>
  4335. </div>
  4336. </div> -->
  4337. <div class="tool" :class="{
  4338. isToolChoose:
  4339. itemTool.tool.indexOf(68) != -1,
  4340. }" @click="
  4341. addTools(68, itemTaskIndex, toolIndex)
  4342. ">
  4343. <div class="whiteBIcon" @click.stop="
  4344. addTools(68, itemTaskIndex, toolIndex)
  4345. ">
  4346. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4347. <div style="margin: 5px 0">时间轴</div>
  4348. </div>
  4349. <div class="noCTool">
  4350. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4351. </div>
  4352. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4353. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4354. </div>
  4355. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4356. <img src="../../../assets/icon/checkNo.png" alt
  4357. v-if="itemTool.tool.indexOf(68) == -1" />
  4358. <div class="checkDiv" v-else>
  4359. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4360. </div>
  4361. </div> -->
  4362. </div>
  4363. <div class="tool" :class="{
  4364. isToolChoose:
  4365. itemTool.tool.indexOf(69) != -1,
  4366. }" @click="
  4367. addTools(69, itemTaskIndex, toolIndex)
  4368. ">
  4369. <div class="whiteBIcon" @click.stop="
  4370. openTools(itemTaskIndex, 69, toolIndex)
  4371. ">
  4372. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4373. <div style="margin: 5px 0">英语写作</div>
  4374. </div>
  4375. <div class="noCTool">
  4376. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4377. </div>
  4378. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4379. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4380. </div>
  4381. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4382. <img src="../../../assets/icon/checkNo.png" alt
  4383. v-if="itemTool.tool.indexOf(4) == -1" />
  4384. <div class="checkDiv" v-else>
  4385. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4386. </div>
  4387. </div> -->
  4388. </div>
  4389. <div class="tool" :class="{
  4390. isToolChoose:
  4391. itemTool.tool.indexOf(70) != -1,
  4392. }" @click="
  4393. addTools(70, itemTaskIndex, toolIndex)
  4394. ">
  4395. <div class="whiteBIcon" @click.stop="
  4396. openTools(itemTaskIndex, 70, toolIndex)
  4397. ">
  4398. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4399. <div style="margin: 5px 0">英语口语</div>
  4400. </div>
  4401. <div class="noCTool">
  4402. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4403. </div>
  4404. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4405. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4406. </div>
  4407. </div>
  4408. <!-- <div class="tool">
  4409. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4410. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4411. <div style="margin: 5px 0">翻译</div>
  4412. </div>
  4413. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4414. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4415. <div class="checkDiv" v-else>
  4416. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4417. </div>
  4418. </div>
  4419. </div>
  4420. <div class="tool">
  4421. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4422. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4423. <div style="margin: 5px 0">魔盒识字</div>
  4424. </div>
  4425. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4426. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4427. <div class="checkDiv" v-else>
  4428. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4429. </div>
  4430. </div>
  4431. </div>
  4432. <div class="tool">
  4433. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4434. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4435. <div style="margin: 5px 0">24点</div>
  4436. </div>
  4437. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4438. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4439. <div class="checkDiv" v-else>
  4440. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4441. </div>
  4442. </div>
  4443. </div>
  4444. <div class="tool">
  4445. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4446. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4447. <div style="margin: 5px 0">数学画板</div>
  4448. </div>
  4449. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4450. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4451. <div class="checkDiv" v-else>
  4452. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4453. </div>
  4454. </div>
  4455. </div>
  4456. <div class="tool">
  4457. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4458. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4459. <div style="margin: 5px 0">GeoGebra</div>
  4460. </div>
  4461. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4462. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4463. <div class="checkDiv" v-else>
  4464. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4465. </div>
  4466. </div>
  4467. </div>
  4468. <div class="tool">
  4469. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4470. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4471. <div style="margin: 5px 0">模拟驾驶</div>
  4472. </div>
  4473. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4474. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4475. <div class="checkDiv" v-else>
  4476. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4477. </div>
  4478. </div>
  4479. </div>
  4480. <div class="tool">
  4481. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4482. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4483. <div style="margin: 5px 0">路径搜索</div>
  4484. </div>
  4485. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4486. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4487. <div class="checkDiv" v-else>
  4488. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4489. </div>
  4490. </div>
  4491. </div>
  4492. <div class="tool">
  4493. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4494. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4495. <div style="margin: 5px 0">深度学习</div>
  4496. </div>
  4497. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4498. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4499. <div class="checkDiv" v-else>
  4500. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4501. </div>
  4502. </div>
  4503. </div>
  4504. <div class="tool">
  4505. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4506. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4507. <div style="margin: 5px 0">全历史</div>
  4508. </div>
  4509. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4510. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4511. <div class="checkDiv" v-else>
  4512. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4513. </div>
  4514. </div>
  4515. </div>
  4516. </div>
  4517. <div class="toolSort" v-if="itemTool.toolType == 4">
  4518. <div class="tool">
  4519. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4520. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4521. <div style="margin: 5px 0">课程设计</div>
  4522. </div>
  4523. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4524. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4525. <div class="checkDiv" v-else>
  4526. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4527. </div>
  4528. </div>
  4529. </div>
  4530. <div class="tool">
  4531. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4532. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4533. <div style="margin: 5px 0">目标管理</div>
  4534. </div>
  4535. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4536. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4537. <div class="checkDiv" v-else>
  4538. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4539. </div>
  4540. </div>
  4541. </div> -->
  4542. <!-- <div class="tool">
  4543. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4544. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4545. <div style="margin: 5px 0">汉字宫</div>
  4546. </div>
  4547. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4548. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4549. <div class="checkDiv" v-else>
  4550. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4551. </div>
  4552. </div>
  4553. </div> -->
  4554. </div>
  4555. </div>
  4556. <!-- v-show="!itemTool.isFold3" -->
  4557. <div class="op_tool_box"
  4558. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4559. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  4560. class="binfo_input" style="
  4561. margin: 0 0 20px 0;
  4562. width: 100% !important;
  4563. " v-model="itemTool.toolDetail"></textarea>
  4564. <div class="op_box">
  4565. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  4566. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4567. <div class="r_pub_button_op"
  4568. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  4569. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  4570. 智能优化</div>
  4571.                              
  4572. </el-tooltip>
  4573. </div>
  4574. </div>
  4575. </div>
  4576. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  4577. <div class="addToolImg">
  4578. <img src="../../../assets/icon/add.png" alt />
  4579. </div>
  4580. <div>添加工具</div>
  4581. </div> -->
  4582. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  4583. margin: 0 auto;
  4584. padding: 0 30px;
  4585. height: 45px;
  4586. ">
  4587. 添加工具
  4588. </button>
  4589. </div>
  4590. </div>
  4591. <div v-else-if="
  4592. unitJson[unitIndex].easy == 2 ||
  4593. unitJson[unitIndex].easy == 4
  4594. " class="toolChoose" style="padding: 0 0 40px">
  4595. <div class="tools">
  4596. <div class="leftTools" style="width: 100%" v-for="(
  4597. itemTool, toolIndex
  4598. ) in itemTask.toolChoose" :key="toolIndex">
  4599. <div>
  4600. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  4601. margin: 0 0 20px 0;
  4602. width: 100% !important;
  4603. " v-model="itemTool.toolDetail"></textarea>
  4604. </div>
  4605. <div style="
  4606. display: flex;
  4607. flex-direction: row;
  4608. align-items: baseline;
  4609. flex-wrap: nowrap;
  4610. justify-content: flex-start;
  4611. position: relative;
  4612. ">
  4613. <div style="margin-right: 20px; font-weight: bold"
  4614. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4615. 工具 {{ toolIndex + 1 }} :
  4616. </div>
  4617. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4618. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  4619. </div>
  4620. <div style="min-height: 163px">
  4621. <div class="toolSort">
  4622. <div class="tool">
  4623. <div class="whiteBIcon" @click="
  4624. openTools(itemTaskIndex, 1, toolIndex)
  4625. ">
  4626. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4627. <div style="margin: 5px 0">电子白板</div>
  4628. </div>
  4629. <div class="check" @click="
  4630. addTools(1, itemTaskIndex, toolIndex)
  4631. ">
  4632. <img src="../../../assets/icon/checkNo.png" alt
  4633. v-if="itemTool.tool.indexOf(1) == -1" />
  4634. <div class="checkDiv" v-else>
  4635. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4636. </div>
  4637. </div>
  4638. </div>
  4639. <div class="tool">
  4640. <div class="whiteBIcon" @click="
  4641. openTools(itemTaskIndex, 52, toolIndex)
  4642. ">
  4643. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4644. <div style="margin: 5px 0">文档</div>
  4645. </div>
  4646. <div class="check" @click="
  4647. addTools(52, itemTaskIndex, toolIndex)
  4648. ">
  4649. <img src="../../../assets/icon/checkNo.png" alt
  4650. v-if="itemTool.tool.indexOf(52) == -1" />
  4651. <div class="checkDiv" v-else>
  4652. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4653. </div>
  4654. </div>
  4655. </div>
  4656. <div class="tool">
  4657. <div class="whiteBIcon" @click="
  4658. openTools(itemTaskIndex, 3, toolIndex)
  4659. ">
  4660. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4661. <div style="margin: 5px 0">思维导图</div>
  4662. </div>
  4663. <div class="check" @click="
  4664. addTools(3, itemTaskIndex, toolIndex)
  4665. ">
  4666. <img src="../../../assets/icon/checkNo.png" alt
  4667. v-if="itemTool.tool.indexOf(3) == -1" />
  4668. <div class="checkDiv" v-else>
  4669. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4670. </div>
  4671. </div>
  4672. </div>
  4673. <div class="tool">
  4674. <div class="whiteBIcon" @click="
  4675. openTools(itemTaskIndex, 4, toolIndex)
  4676. ">
  4677. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4678. <div style="margin: 5px 0">问卷调查</div>
  4679. </div>
  4680. <div class="check" @click="
  4681. addTools(4, itemTaskIndex, toolIndex)
  4682. ">
  4683. <img src="../../../assets/icon/checkNo.png" alt
  4684. v-if="itemTool.tool.indexOf(4) == -1" />
  4685. <div class="checkDiv" v-else>
  4686. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4687. </div>
  4688. </div>
  4689. </div>
  4690. <div class="tool">
  4691. <div class="whiteBIcon" @click="
  4692. openTools(itemTaskIndex, 45, toolIndex)
  4693. ">
  4694. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4695. <div style="margin: 5px 0">选择题</div>
  4696. </div>
  4697. <div class="check" @click="
  4698. addTools(45, itemTaskIndex, toolIndex)
  4699. ">
  4700. <img src="../../../assets/icon/checkNo.png" alt
  4701. v-if="itemTool.tool.indexOf(45) == -1" />
  4702. <div class="checkDiv" v-else>
  4703. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4704. </div>
  4705. </div>
  4706. </div>
  4707. <div class="tool">
  4708. <div class="whiteBIcon" @click="
  4709. openTools(itemTaskIndex, 15, toolIndex)
  4710. ">
  4711. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4712. <div style="margin: 5px 0">问答</div>
  4713. </div>
  4714. <div class="check" @click="
  4715. addTools(15, itemTaskIndex, toolIndex)
  4716. ">
  4717. <img src="../../../assets/icon/checkNo.png" alt
  4718. v-if="itemTool.tool.indexOf(15) == -1" />
  4719. <div class="checkDiv" v-else>
  4720. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4721. </div>
  4722. </div>
  4723. </div>
  4724. <div class="tool">
  4725. <div class="whiteBIcon" @click="
  4726. addTools(16, itemTaskIndex, toolIndex)
  4727. ">
  4728. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4729. <div style="margin: 5px 0">作业提交</div>
  4730. </div>
  4731. <div class="check" @click="
  4732. addTools(16, itemTaskIndex, toolIndex)
  4733. ">
  4734. <img src="../../../assets/icon/checkNo.png" alt
  4735. v-if="itemTool.tool.indexOf(16) == -1" />
  4736. <div class="checkDiv" v-else>
  4737. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4738. </div>
  4739. </div>
  4740. </div>
  4741. <div class="tool">
  4742. <div class="whiteBIcon" @click="
  4743. openTools(itemTaskIndex, 50, toolIndex)
  4744. ">
  4745. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4746. <div style="margin: 5px 0">批量上传</div>
  4747. </div>
  4748. <div class="check" @click="
  4749. addTools(50, itemTaskIndex, toolIndex)
  4750. ">
  4751. <img src="../../../assets/icon/checkNo.png" alt
  4752. v-if="itemTool.tool.indexOf(50) == -1" />
  4753. <div class="checkDiv" v-else>
  4754. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4755. </div>
  4756. </div>
  4757. </div>
  4758. <div class="tool">
  4759. <div class="whiteBIcon" @click="
  4760. openTools(itemTaskIndex, 41, toolIndex)
  4761. ">
  4762. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4763. <div style="margin: 5px 0">选择匹配</div>
  4764. </div>
  4765. <div class="check" @click="
  4766. addTools(41, itemTaskIndex, toolIndex)
  4767. ">
  4768. <img src="../../../assets/icon/checkNo.png" alt
  4769. v-if="itemTool.tool.indexOf(41) == -1" />
  4770. <div class="checkDiv" v-else>
  4771. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4772. </div>
  4773. </div>
  4774. </div>
  4775. <div class="tool">
  4776. <div class="whiteBIcon" @click="
  4777. openTools(itemTaskIndex, 47, toolIndex)
  4778. ">
  4779. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4780. <div style="margin: 5px 0">排序</div>
  4781. </div>
  4782. <div class="check" @click="
  4783. addTools(47, itemTaskIndex, toolIndex)
  4784. ">
  4785. <img src="../../../assets/icon/checkNo.png" alt
  4786. v-if="itemTool.tool.indexOf(47) == -1" />
  4787. <div class="checkDiv" v-else>
  4788. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4789. </div>
  4790. </div>
  4791. </div>
  4792. <div class="tool">
  4793. <div class="whiteBIcon" @click="
  4794. openTools(itemTaskIndex, 48, toolIndex)
  4795. ">
  4796. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4797. <div style="margin: 5px 0">表格</div>
  4798. </div>
  4799. <div class="check" @click="
  4800. addTools(48, itemTaskIndex, toolIndex)
  4801. ">
  4802. <img src="../../../assets/icon/checkNo.png" alt
  4803. v-if="itemTool.tool.indexOf(48) == -1" />
  4804. <div class="checkDiv" v-else>
  4805. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4806. </div>
  4807. </div>
  4808. </div>
  4809. </div>
  4810. </div>
  4811. </div>
  4812. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  4813. <div class="addToolImg">
  4814. <img src="../../../assets/icon/add.png" alt />
  4815. </div>
  4816. <div>添加工具</div>
  4817. </div> -->
  4818. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  4819. style="margin: 35px auto 20px">
  4820. 添加工具
  4821. </button>
  4822. </div>
  4823. </div>
  4824. <div v-else-if="
  4825. unitJson[unitIndex].easy == 1 ||
  4826. (unitJson[unitIndex].easy == 5 &&
  4827. itemTask.taskType == 2)
  4828. " class="toolChoose" style="padding: 0 0 40px">
  4829. <div class="tools">
  4830. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  4831. itemTool, toolIndex
  4832. ) in itemTask.toolChoose" :key="toolIndex">
  4833. <div style="min-height: 163px">
  4834. <div class="toolSort">
  4835. <div class="tool">
  4836. <div class="whiteBIcon" @click="
  4837. openTools(itemTaskIndex, 50, toolIndex)
  4838. ">
  4839. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4840. <div style="margin: 5px 0">批量上传</div>
  4841. </div>
  4842. <div class="check" @click="
  4843. addTools(50, itemTaskIndex, toolIndex)
  4844. ">
  4845. <img src="../../../assets/icon/checkNo.png" alt
  4846. v-if="itemTool.tool.indexOf(50) == -1" />
  4847. <div class="checkDiv" v-else>
  4848. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4849. </div>
  4850. </div>
  4851. </div>
  4852. </div>
  4853. </div>
  4854. </div>
  4855. </div>
  4856. </div>
  4857. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  4858. v-loading="taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4859. <div class="elist_title">
  4860. <div style="
  4861. display: flex;
  4862. flex-direction: row;
  4863. align-items: center;
  4864. margin: 20px 0;
  4865. ">
  4866. <div class="lineTitle clineTitle">评价设置</div>
  4867. <div style="margin-left:auto;display: flex;">
  4868. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4869. <div class="r_pub_button_op"
  4870. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  4871. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  4872. </el-tooltip>
  4873. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4874. <div class="r_pub_button_op" style="margin-left:10px;"
  4875. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  4876. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  4877. </el-tooltip>
  4878. </div>
  4879. <!-- <div class="line" style="width: 90%"></div> -->
  4880. </div>
  4881. </div>
  4882. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  4883. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  4884. 上传补充资料
  4885. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  4886. beforeUploadInfo2(
  4887. $event,
  4888. 18,
  4889. itemTaskIndex
  4890. )
  4891. " />
  4892. </button>
  4893. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  4894. <div class="add_chapters_box add_c_none" v-if="
  4895. pingjiaInfoData[itemTaskIndex] &&
  4896. pingjiaInfoData[itemTaskIndex].length == 0
  4897. ">
  4898. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  4899. </div>
  4900. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  4901. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  4902. getChapterData(
  4903. $event,
  4904. index1,
  4905. item1.type
  4906. )
  4907. " >
  4908. <div class="chapter_upload_o" style="
  4909. position: relative;
  4910. display: flex;
  4911. align-items: center;
  4912. ">
  4913. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  4914. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  4915. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  4916. </div>
  4917. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  4918. </div>
  4919. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  4920. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  4921. </div>
  4922. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  4923. </div>
  4924. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  4925. </div>
  4926. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  4927. </div>
  4928. </div>
  4929. <div class="chapter_upload_n">
  4930. <input readonly="true" v-if="
  4931. item1.type == 2 ||
  4932. item1.type == 3 ||
  4933. item1.type == 12 ||
  4934. item1.type == 13 ||
  4935. item1.type == 7
  4936. " :placeholder="item1.name" @click.stop="
  4937. checkChpater3($event, index1, item1)
  4938. " style="
  4939. border: none;
  4940. outline: none;
  4941. width: 80%;
  4942. minwidth: 215px;
  4943. z-index: 99;
  4944. font-size: 14px;
  4945. white-space: nowrap;
  4946. overflow: hidden;
  4947. text-overflow: ellipsis;
  4948. " />
  4949. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  4950. border: none;
  4951. outline: none;
  4952. width: 80%;
  4953. white-space: nowrap;
  4954. overflow: hidden;
  4955. text-overflow: ellipsis;
  4956. " readonly="true" @click="
  4957. selectAttText(index1)
  4958. " />
  4959. <input :placeholder="item1.title ? item1.title : '链接'
  4960. " v-if="item1.type == 8" style="
  4961. border: none;
  4962. outline: none;
  4963. width: 80%;
  4964. white-space: nowrap;
  4965. overflow: hidden;
  4966. text-overflow: ellipsis;
  4967. " readonly="true" @click="selectLine(index1)" />
  4968. <input :placeholder="item1.title ? item1.title : '链接'
  4969. " v-if="item1.type == 14" style="
  4970. border: none;
  4971. outline: none;
  4972. width: 80%;
  4973. white-space: nowrap;
  4974. overflow: hidden;
  4975. text-overflow: ellipsis;
  4976. " readonly="true" @click="
  4977. openUpdateSource(index1)
  4978. " />
  4979. </div>
  4980. <div class="chapter_upload_ic">
  4981. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  4982. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  4983. checkChpater3($event, index1, item1)
  4984. ">
  4985. <div></div>
  4986. </div>
  4987. <div class="chapter_upload_ic_r" @click.stop="
  4988. deletepingjiaInfoData(
  4989. $event,
  4990. index1,
  4991. itemTaskIndex
  4992. )
  4993. ">
  4994. <div></div>
  4995. </div>
  4996. </div>
  4997. </div>
  4998. </div>
  4999. </div>
  5000. </div>
  5001. <div v-if="
  5002. pingjiainfoproVisible[itemTaskIndex]
  5003. " class="mask">
  5004. <div class="progressBox">
  5005. <div class="lbox">
  5006. <img src="../../../assets/loading.gif" />上传中,请稍后
  5007. </div>
  5008. <div style="margin-bottom: 10px">
  5009. <span>{{
  5010. pingjiainfoisFinishSize[itemTaskIndex]
  5011. }}</span>
  5012. /
  5013. <span>{{
  5014. pingjiainfoisAllSize[itemTaskIndex]
  5015. }}</span>
  5016. </div>
  5017. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5018. ? pingjiainfoprogress[itemTaskIndex]
  5019. : 0
  5020. " style="width: 80%"></el-progress> -->
  5021. </div>
  5022. </div>
  5023. </div>
  5024. <div class="mbCss">
  5025. <div class="pjCss" :style="{
  5026. width: itemTask.isEvaFold
  5027. ? 'calc(100% - 55%)'
  5028. : 'calc(100% - 120px)',
  5029. }">
  5030. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5031. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5032. <div class="elist_inptu_text">
  5033. <!-- <span>目标:</span> -->
  5034. <span>核心素养:</span>
  5035. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写核心素养" style="width: calc(100% - 280px);"/>
  5036. <el-switch
  5037. class="rateSwitch"
  5038. style="margin-left: auto;"
  5039. v-model="itemTask.eList[eIndex].isai"
  5040. active-color="#0061FF"
  5041. active-text="人工评分"
  5042. inactive-text="AI评分"
  5043. active-value="2"
  5044. inactive-value="1">
  5045. </el-switch>
  5046. </div>
  5047. <div class="elist_inptu_text">
  5048. <!-- <span>评价维度:</span> -->
  5049. <span>目标:</span>
  5050. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5051. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写目标" />
  5052. <!-- </el-tooltip> -->
  5053. <!-- <span>评星等级:</span>
  5054. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5055. disabled></el-rate> -->
  5056. <div class="remove" @click="
  5057. deletEList(
  5058. unitIndex,
  5059. itemTaskIndex,
  5060. eIndex
  5061. )
  5062. "></div>
  5063. </div>
  5064. <div class="elist_inptu_text">
  5065. <!-- <span>维度描述:</span> -->
  5066. <span>评价标准:</span>
  5067. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5068. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5069. <!-- </el-tooltip> -->
  5070. </div>
  5071. <div class="elist_inptu_text" v-if="evalua">
  5072. <span>目标:</span>
  5073. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5074. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5075. @change="forceUpdate()">
  5076. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5077. :value="e.name">
  5078. </el-option>
  5079. </el-select> -->
  5080. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5081. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5082. </div>
  5083. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5084. <span>细则:</span>
  5085. <div style="width: calc(100%);">
  5086. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5087. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5088. <div class="ruleBtn"
  5089. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5090. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5091. </el-tooltip>
  5092. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5093. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5094. <div class="op_box">
  5095. <div class="op_remark"></div>
  5096. <div style="display: flex;">
  5097. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5098. <div class="r_pub_button_op"
  5099. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5100. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5101. </el-tooltip>
  5102. </div>
  5103. </div>
  5104. </div>
  5105. </div>
  5106. </div>
  5107. </div>
  5108. </div>
  5109. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5110. style="margin: 35px 35px 0 0">
  5111. <div class="addToolImg">
  5112. <img src="../../../assets/icon/add.png" alt />
  5113. </div>
  5114. <div>添加</div>
  5115. </div> -->
  5116. <div class="eva_btn_box">
  5117. <div class="eva_btn_left_box">
  5118. <button class="c_pub_button_add pub_btn_eval_img"
  5119. @click="addEList(unitIndex, itemTaskIndex)">
  5120. 添加
  5121. </button>
  5122. <button class="c_pub_button_add pub_btn_eval_source_img"
  5123. @click="openEList(unitIndex, itemTaskIndex)">
  5124. 资源
  5125. </button>
  5126. </div>
  5127. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5128. v-if="itemTask.eList && itemTask.eList.length">
  5129. 添加资源模板
  5130. </button>
  5131. </div>
  5132. </div>
  5133. <div v-if="evalua" style="
  5134. border: 1px solid #e5e5e5;
  5135. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5136. " :style="{
  5137. width: itemTask.isEvaFold ? '55%' : '116px',
  5138. }" class="evaCss">
  5139. <!-- <div class="e_add_top">
  5140. <div class="e_add_title">
  5141. <span>当前使用目标管理</span>
  5142. <span>{{ eTitle }}</span>
  5143. <img src="../../../assets/line.png" class="cru_line" style="
  5144. width: 125px;
  5145. height: 20px;
  5146. bottom: -10px;
  5147. left: 155px;
  5148. " />
  5149. </div>
  5150. </div> -->
  5151. <div class="e_add_content" style="width: 100%">
  5152. <div class="e_add_list_pbox" style="width: 100%">
  5153. <div class="e_add_list_pbox_title">
  5154. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5155. <div class="type_content" v-if="itemTask.isEvaFold">
  5156. <span :class="{ active: typeMode == 1 }"
  5157. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5158. <span :class="{ active: typeMode == 2 }"
  5159. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5160. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5161. </div>
  5162. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5163. @click="foldEva(itemTaskIndex)">
  5164. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5165. </div>
  5166. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5167. @click="foldEva(itemTaskIndex)">
  5168. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5169. </div>
  5170. </div>
  5171. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5172. style="min-height: 200px">
  5173. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5174. " v-if="typeMode == 1"></Mind>
  5175. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5176. </Sunburst>
  5177. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5178. v-if="typeMode == 3"></SeeBoard>
  5179. </div>
  5180. </div>
  5181. </div>
  5182. </div>
  5183. </div>
  5184. </div>
  5185. <div class="funBlock" style="padding: 0">
  5186. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5187. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5188. <div>
  5189. {{
  5190. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5191. }}
  5192. </div>
  5193. </div>
  5194. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5195. <div>展开</div>
  5196. <div class="arrow">
  5197. <img src="../../../assets/icon/expand.png" alt />
  5198. </div>
  5199. </div> -->
  5200. </div>
  5201. </div>
  5202. </div>
  5203. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5204. <!-- <div>
  5205. <img src="../../../../assets/icon/new/addStage.png" alt />
  5206. <span>添加任务</span>
  5207. </div> -->
  5208. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5209. 添加任务
  5210. </button>
  5211. </div>
  5212. </div>
  5213. <div class="info_btnBox3">
  5214. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5215. goTo(
  5216. '/course?userid=' +
  5217. userid +
  5218. '&oid=' +
  5219. oid +
  5220. '&org=' +
  5221. org +
  5222. '&role=' +
  5223. role
  5224. )
  5225. ">
  5226. 返回课程
  5227. </button>
  5228. <button class="c_pub_button_return pub_btn_last_img"
  5229. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5230. {{ steps == 4 ? "返回课程" : "上一步" }}
  5231. </button>
  5232. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5233. pub_btn_next_img: steps != 3,
  5234. pub_btn_finish_img: steps == 3,
  5235. }">
  5236. {{ steps == 3 ? "确认上传" : "下一步" }}
  5237. </button>
  5238. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5239. '修改模板' : '保存模板'}}</button>
  5240. </div>
  5241. </div>
  5242. </div>
  5243. </div>
  5244. </div>
  5245. <div style="
  5246. width: calc(100% - 20px);
  5247. background: rgb(255, 255, 255);
  5248. border-radius: 10px;
  5249. " v-if="steps == 4">
  5250. <div class="basic_box_success">
  5251. <div class="right_img">
  5252. <img src="../../../assets/icon/right.png" alt />
  5253. </div>
  5254. <div style="font-weight: bold">成功</div>
  5255. <!-- <div>您的课程编号</div>
  5256. <div class="number">{{ number }}</div>-->
  5257. <!-- <div class="success_button">
  5258. <div class="look_course" @click="isNoFinsh">
  5259. 邀请老师协同编辑
  5260. </div>
  5261. <div class="attend_others" @click="goCourse">预览课程</div>
  5262. </div> -->
  5263. </div>
  5264. </div>
  5265. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5266. @mouseleave="btnDisplay(false)" v-if="false">
  5267. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5268. goTo(
  5269. '/course?userid=' +
  5270. userid +
  5271. '&oid=' +
  5272. oid +
  5273. '&org=' +
  5274. org +
  5275. '&role=' +
  5276. role
  5277. )
  5278. ">
  5279. 返回课程
  5280. </button>
  5281. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5282. @click="lastSteps">
  5283. {{ steps == 4 ? "返回课程" : "上一步" }}
  5284. </button>
  5285. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5286. pub_btn_next_img: steps != 3,
  5287. pub_btn_finish_img: steps == 3,
  5288. }">
  5289. {{ steps == 3 ? "确认上传" : "下一步" }}
  5290. </button>
  5291. </div>
  5292. </div>
  5293. </div>
  5294. <div class="leftBar" v-if="istemplate == 1">
  5295. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5296. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5297. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5298. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5299. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5300. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5301. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5302. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5303. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5304. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5305. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5306. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5307. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5308. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5309. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5310. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5311. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5312. @setAiJson="setAiJson" /> -->
  5313. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5314. @setAiJson="setAiJson" />
  5315. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5316. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5317. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5318. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5319. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5320. </div>
  5321. </div>
  5322. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5323. class="dialog_diy2 customWidth">
  5324. <div>请复制该链接邀请协同编辑</div>
  5325. <div>http://www.boomyon.com/index-zhang.com</div>
  5326. <span slot="footer" class="dialog-footer">
  5327. <el-button type="primary">复制链接分享</el-button>
  5328. <el-button @click="dialogVisible = false">取消</el-button>
  5329. </span>
  5330. </el-dialog>
  5331. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5332. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5333. <el-form>
  5334. <el-form-item label="文档标题">
  5335. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5336. </el-form-item>
  5337. <div>文档简介</div>
  5338. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5339. </el-form>
  5340. <span slot="footer" class="dialog-footer">
  5341. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5342. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5343. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5344. </span>
  5345. </el-dialog>
  5346. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5347. :before-close="handleClose" class="dialog_diy">
  5348. <el-form>
  5349. <el-form-item label="文档标题">
  5350. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5351. </el-form-item>
  5352. <div>文档内容</div>
  5353. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5354. </el-form>
  5355. <span slot="footer" class="dialog-footer">
  5356. <el-button @click="clearChoose">取 消</el-button>
  5357. <el-button type="primary" @click="wordNext()">确定</el-button>
  5358. </span>
  5359. </el-dialog>
  5360. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5361. :before-close="handleClose" class="dialog_diy">
  5362. <el-form>
  5363. <el-form-item label="文本标题">
  5364. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5365. placeholder="请输入文本标题..."></el-input>
  5366. </el-form-item>
  5367. <!-- <div>富文本内容</div> -->
  5368. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5369. </el-form>
  5370. <span slot="footer" class="dialog-footer">
  5371. <el-button @click="clearAttText">取 消</el-button>
  5372. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5373. </span>
  5374. </el-dialog>
  5375. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5376. :before-close="handleClose" class="dialog_diy lineCss">
  5377. <el-form>
  5378. <el-form-item label="标题" :label-width="formLabelWidth">
  5379. <span>
  5380. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5381. </span>
  5382. </el-form-item>
  5383. <el-form-item label="链接" :label-width="formLabelWidth">
  5384. <span>
  5385. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5386. </span>
  5387. </el-form-item>
  5388. </el-form>
  5389. <span slot="footer" class="dialog-footer">
  5390. <el-button @click="clearLine">取 消</el-button>
  5391. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5392. </span>
  5393. </el-dialog>
  5394. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5395. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5396. <div>
  5397. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5398. </div>
  5399. <span slot="footer" class="dialog-footer">
  5400. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5401. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5402. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5403. </span>
  5404. </el-dialog>
  5405. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5406. :before-close="handleClose" class="addNewPP customWidth">
  5407. <div class="people">
  5408. <div class="people_top">
  5409. <div class="people_nav">选择成员</div>
  5410. <div class="people_top_right">
  5411. <div class="people_search">
  5412. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5413. <div class="search_img" @click="searchStudent">
  5414. <img src="../../../assets/icon/search.png" alt />
  5415. </div>
  5416. </div>
  5417. </div>
  5418. </div>
  5419. <el-checkbox-group v-model="checkboxList" class="people_name">
  5420. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5421. "暂无学生可选" }}</el-checkbox>
  5422. </el-checkbox-group>
  5423. </div>
  5424. <span slot="footer" class="dialog-footer">
  5425. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5426. <el-button type="primary" @click="isAddPP">确定</el-button>
  5427. </span>
  5428. </el-dialog>
  5429. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5430. :before-close="handleClose" class="addNewPP2">
  5431. <div class="check_classBox">
  5432. <div class="check_class_right">
  5433. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5434. 全部
  5435. </div>
  5436. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5437. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5438. {{ item.name }}
  5439. </div>
  5440. </el-tooltip>
  5441. </div>
  5442. <div class="check_class_left">
  5443. <div class="check_class_all_box">
  5444. <div class="check_class_left_title">选择班级</div>
  5445. <div style="display: flex; align-items: center; margin-left: auto">
  5446. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5447. </div>
  5448. </div>
  5449. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5450. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5451. </div> -->
  5452. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5453. v-if="grade2.length">
  5454. <div v-for="item in grade2" :key="item.id" class="class_item">
  5455. <el-checkbox :label="item.id">
  5456. {{ item.name }}
  5457. </el-checkbox>
  5458. </div>
  5459. </el-checkbox-group>
  5460. <div v-if="!grade2.length">暂无数据</div>
  5461. </div>
  5462. </div>
  5463. <span slot="footer" class="dialog-footer">
  5464. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5465. <el-button type="primary" @click="isAddClass">确定</el-button>
  5466. </span>
  5467. </el-dialog>
  5468. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5469. :before-close="handleClose" class="addNewPP customWidth">
  5470. <div style="display: flex;justify-content: space-between;">
  5471. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5472. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5473. 全部
  5474. </div>
  5475. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5476. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5477. <el-tooltip placement="top" :content="i.name">
  5478. <span>{{i.name}}</span>
  5479. </el-tooltip>
  5480. </div>
  5481. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5482. 其他
  5483. </div>
  5484. </div>
  5485. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5486. <div class="people">
  5487. <div class="people_top">
  5488. <div class="people_top_right">
  5489. <div class="people_search">
  5490. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5491. <div class="search_img" @click="getTeacher(collid)">
  5492. <img src="../../../assets/icon/search.png" alt />
  5493. </div>
  5494. </div>
  5495. </div>
  5496. <div class="people_nav" style="display: flex; align-items: center">
  5497. <div class="check_class_left_title">选择成员</div>
  5498. <div style="display: flex; align-items: center; margin-left: auto">
  5499. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5500. </div>
  5501. </div>
  5502. </div>
  5503. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5504. @change="InviteChange2">
  5505. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5506. <div class="t_j_box">
  5507. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5508. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5509. </el-tooltip>
  5510. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5511. <span>{{ item.username.split('@')[0] }}</span>
  5512. </el-tooltip>
  5513. <el-tooltip placement="top" :content="item.school">
  5514. <span>{{ item.school }}</span>
  5515. </el-tooltip>
  5516. </div>
  5517. </el-checkbox>
  5518. </el-checkbox-group>
  5519. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5520. </div>
  5521. </div>
  5522. </div>
  5523. <span slot="footer" class="dialog-footer">
  5524. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5525. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5526. </span>
  5527. </el-dialog>
  5528. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5529. closePan(4);
  5530. }
  5531. " class="dialog_diy fullStyle">
  5532. <div style="height: 100%">
  5533. <div class="a_add_title" style="
  5534. display: flex;
  5535. flex-direction: row;
  5536. align-items: center;
  5537. justify-content: center;
  5538. ">
  5539. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5540. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5541. </div>
  5542. <div class="a_addBox" style="height: calc(100% - 50px)">
  5543. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5544. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5545. <div class="a_add_checkType">
  5546. <span :class="{
  5547. active:
  5548. askJson.askJson[index1].type == '1' ||
  5549. !askJson.askJson[index1].type,
  5550. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5551. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5552. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5553. </div>
  5554. <div class="a_add_head">
  5555. <div style="
  5556. display: flex;
  5557. align-items: center;
  5558. width: 100%;
  5559. margin-right: 20px;
  5560. ">
  5561. <span style="min-width: fit-content">{{
  5562. index1 + 1 + "、"
  5563. }}</span>
  5564. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5565. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5566. $forceUpdate();
  5567. }
  5568. "></textarea>
  5569. </div>
  5570. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5571. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5572. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5573. </div>
  5574. <div class="a_add_head_div">
  5575. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5576. </el-button>
  5577. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5578. </div>
  5579. </div>
  5580. <div class="a_add_body">
  5581. <div class="a_add_input" style="flex-direction: column">
  5582. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5583. margin: 20px 10px 0 0;
  5584. display: flex;
  5585. align-items: center;
  5586. position: relative;
  5587. ">
  5588. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5589. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5590. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5591. @change="() => {
  5592. $forceUpdate();
  5593. }
  5594. "></textarea>
  5595. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5596. v-if="askJson.askJson[index1].askItem != 1">
  5597. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5598. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5599. </div>
  5600. <div class="a_add_body_div">
  5601. <el-button type="primary" size="small"
  5602. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5603. <el-button type="primary" size="small" @click="
  5604. deletecheckList(askJson.askJson[index1], checkIndex)
  5605. " v-if="askJson.askJson[index1].askItem != 1">删除
  5606. </el-button>
  5607. </div>
  5608. </div>
  5609. </div>
  5610. <!-- <div class="a_add_body_div">
  5611. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5612. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5613. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5614. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5615. </el-button>
  5616. </div> -->
  5617. </div>
  5618. </div>
  5619. </div>
  5620. </div>
  5621. <span slot="footer" class="dialog-footer">
  5622. <el-button @click="closePan(4)">取 消</el-button>
  5623. <el-button type="primary" @click="addAsk">确 定</el-button>
  5624. </span>
  5625. </el-dialog>
  5626. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5627. closePan(45);
  5628. }
  5629. " class="dialog_diy fullStyle">
  5630. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5631. <!-- <div class="a_add_title" style="
  5632. display: flex;
  5633. flex-direction: row;
  5634. align-items: center;
  5635. justify-content: center;
  5636. ">
  5637. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5638. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5639. </div> -->
  5640. <div class="a_addBox" style="height: 100%">
  5641. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5642. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5643. 上传补充资料
  5644. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5645. beforeUploadInfo2(
  5646. $event,
  5647. 17
  5648. )
  5649. " />
  5650. </button>
  5651. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  5652. <div class="add_chapters_box add_c_none" v-if="
  5653. xuanzeInfoData &&
  5654. xuanzeInfoData.length == 0
  5655. ">
  5656. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  5657. </div>
  5658. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5659. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  5660. getChapterData(
  5661. $event,
  5662. index1,
  5663. item1.type
  5664. )
  5665. " >
  5666. <div class="chapter_upload_o" style="
  5667. position: relative;
  5668. display: flex;
  5669. align-items: center;
  5670. ">
  5671. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5672. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5673. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5674. </div>
  5675. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5676. </div>
  5677. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5678. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5679. </div>
  5680. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5681. </div>
  5682. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5683. </div>
  5684. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5685. </div>
  5686. </div>
  5687. <div class="chapter_upload_n">
  5688. <input readonly="true" v-if="
  5689. item1.type == 2 ||
  5690. item1.type == 3 ||
  5691. item1.type == 12 ||
  5692. item1.type == 13 ||
  5693. item1.type == 7
  5694. " :placeholder="item1.name" @click.stop="
  5695. checkChpater3($event, index1, item1)
  5696. " style="
  5697. border: none;
  5698. outline: none;
  5699. width: 80%;
  5700. minwidth: 215px;
  5701. z-index: 99;
  5702. font-size: 14px;
  5703. white-space: nowrap;
  5704. overflow: hidden;
  5705. text-overflow: ellipsis;
  5706. " />
  5707. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5708. border: none;
  5709. outline: none;
  5710. width: 80%;
  5711. white-space: nowrap;
  5712. overflow: hidden;
  5713. text-overflow: ellipsis;
  5714. " readonly="true" @click="
  5715. selectAttText(index1)
  5716. " />
  5717. <input :placeholder="item1.title ? item1.title : '链接'
  5718. " v-if="item1.type == 8" style="
  5719. border: none;
  5720. outline: none;
  5721. width: 80%;
  5722. white-space: nowrap;
  5723. overflow: hidden;
  5724. text-overflow: ellipsis;
  5725. " readonly="true" @click="selectLine(index1)" />
  5726. <input :placeholder="item1.title ? item1.title : '链接'
  5727. " v-if="item1.type == 14" style="
  5728. border: none;
  5729. outline: none;
  5730. width: 80%;
  5731. white-space: nowrap;
  5732. overflow: hidden;
  5733. text-overflow: ellipsis;
  5734. " readonly="true" @click="
  5735. openUpdateSource(index1)
  5736. " />
  5737. </div>
  5738. <div class="chapter_upload_ic">
  5739. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5740. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5741. checkChpater3($event, index1, item1)
  5742. ">
  5743. <div></div>
  5744. </div>
  5745. <div class="chapter_upload_ic_r" @click.stop="
  5746. deletexuanzeInfoData(
  5747. $event,
  5748. index1
  5749. )
  5750. ">
  5751. <div></div>
  5752. </div>
  5753. </div>
  5754. </div>
  5755. </div>
  5756. </div>
  5757. </div>
  5758. <div v-if="
  5759. xuanzeinfoproVisible
  5760. " class="mask">
  5761. <div class="progressBox">
  5762. <div class="lbox">
  5763. <img src="../../../assets/loading.gif" />上传中,请稍后
  5764. </div>
  5765. <div style="margin-bottom: 10px">
  5766. <span>{{
  5767. xuanzeinfoisFinishSize
  5768. }}</span>
  5769. /
  5770. <span>{{
  5771. xuanzeinfoisAllSize
  5772. }}</span>
  5773. </div>
  5774. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  5775. ? xuanzeinfoprogress
  5776. : 0
  5777. " style="width: 80%"></el-progress> -->
  5778. </div>
  5779. </div>
  5780. </div>
  5781. <div style="
  5782. font-size: 16px;
  5783. color: #c7c7c7;
  5784. display: flex;
  5785. align-items: center;
  5786. justify-content: flex-end;
  5787. ">
  5788. <!-- 请输入题目内容 -->
  5789. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  5790. 智能生成
  5791. </button>
  5792. <!-- 请输入题目内容 -->
  5793. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  5794. v-if="isPasteChoice">
  5795. 智能粘贴
  5796. </button>
  5797. </div>
  5798. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  5799. <div class="a_add_checkType">
  5800. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  5801. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  5802. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  5803. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  5804. </div>
  5805. <div class="a_add_head">
  5806. <div class="timuUpImg">
  5807. <div style="display: flex; align-items: center">
  5808. <span style="min-width: fit-content">{{
  5809. index1 + 1 + "、"
  5810. }}</span>
  5811. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  5812. placeholder="请输入题目">
  5813. </el-input> -->
  5814. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5815. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  5816. $forceUpdate();
  5817. }
  5818. "></textarea>
  5819. </div>
  5820. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  5821. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  5822. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  5823. </div>
  5824. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  5825. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5826. <input type="file" accept="image/*" style="display: none"
  5827. @change="beforeUploadTiMu($event, index1)" />
  5828. </div>
  5829. </div>
  5830. <div class="a_add_head_div">
  5831. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  5832. </el-button>
  5833. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  5834. </div>
  5835. </div>
  5836. <div class="timuImgBox" v-if="
  5837. testJson.testJson[index1].timuList &&
  5838. testJson.testJson[index1].timuList.length
  5839. ">
  5840. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  5841. @click.stop="previewImg(timg.src)">
  5842. <img :src="timg.src" alt="" />
  5843. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  5844. <img src="../../../assets/icon/delete.png" alt="" />
  5845. </div>
  5846. </div>
  5847. </div>
  5848. <div class="a_add_body">
  5849. <div class="a_add_input a_add_input_choice">
  5850. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  5851. @change="() => {
  5852. $forceUpdate();
  5853. }
  5854. ">
  5855. <div class="radioBox">
  5856. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  5857. .testItem" :key="checkIndex" :label="checkIndex">
  5858. <div style="margin-right: 10px">
  5859. 选项{{ checkIndex + 1 }}
  5860. </div>
  5861. <div style="margin-right: 10px; width: 300px" v-if="
  5862. testJson.testJson[index1].checkList[checkIndex] &&
  5863. testJson.testJson[index1].checkList[checkIndex]
  5864. .imgType &&
  5865. testJson.testJson[index1].checkList[checkIndex]
  5866. .imgType == 1
  5867. ">
  5868. <div class="inImg" @click.stop="
  5869. previewImg(
  5870. testJson.testJson[index1].checkList[checkIndex]
  5871. .src
  5872. )
  5873. ">
  5874. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  5875. .src
  5876. " lazy />
  5877. <!-- <img :src="
  5878. testJson.testJson[index1].checkList[checkIndex]
  5879. .src
  5880. " alt="" /> -->
  5881. </div>
  5882. </div>
  5883. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  5884. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5885. $forceUpdate();
  5886. }
  5887. "></textarea>
  5888. <div class="xzUpImg" @click.stop="addImg($event)">
  5889. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5890. <input type="file" accept="image/*" style="display: none"
  5891. @change="beforeUploadTi($event, index1, checkIndex)" />
  5892. </div>
  5893. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5894. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  5895. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  5896. </div>
  5897. <div class="a_add_body_div">
  5898. <el-button type="primary" size="small" @click.stop="
  5899. addTcheckList(testJson.testJson[index1], checkIndex)
  5900. ">添加</el-button>
  5901. <el-button type="primary" size="small" @click.stop="
  5902. deleteTcheckList(
  5903. testJson.testJson[index1],
  5904. checkIndex
  5905. )
  5906. " v-if="testJson.testJson[index1].testItem != 1">删除
  5907. </el-button>
  5908. </div>
  5909. </el-radio>
  5910. </div>
  5911. </el-radio-group>
  5912. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  5913. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  5914. $forceUpdate();
  5915. }
  5916. ">
  5917. <div class="radioBox">
  5918. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  5919. .testItem" :key="checkIndex1" :label="checkIndex1">
  5920. <div style="margin-right: 10px">
  5921. 选项{{ checkIndex1 + 1 }}
  5922. </div>
  5923. <div style="margin-right: 10px; width: 300px" v-if="
  5924. testJson.testJson[index1].checkList[checkIndex1] &&
  5925. testJson.testJson[index1].checkList[checkIndex1]
  5926. .imgType &&
  5927. testJson.testJson[index1].checkList[checkIndex1]
  5928. .imgType == 1
  5929. ">
  5930. <div class="inImg" @click.stop="
  5931. previewImg(
  5932. testJson.testJson[index1].checkList[checkIndex1]
  5933. .src
  5934. )
  5935. ">
  5936. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  5937. .src
  5938. " lazy />
  5939. <!-- <img :src="
  5940. testJson.testJson[index1].checkList[checkIndex1]
  5941. .src
  5942. " alt="" /> -->
  5943. </div>
  5944. </div>
  5945. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  5946. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5947. $forceUpdate();
  5948. }
  5949. "></textarea>
  5950. <div class="xzUpImg" @click.stop="addImg($event)">
  5951. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5952. <input type="file" accept="image/*" style="display: none"
  5953. @change="beforeUploadTi($event, index1, checkIndex1)" />
  5954. </div>
  5955. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5956. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  5957. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  5958. </div>
  5959. <div class="a_add_body_div">
  5960. <el-button type="primary" size="small" @click.stop="
  5961. addTcheckList(
  5962. testJson.testJson[index1],
  5963. checkIndex1
  5964. )
  5965. ">添加</el-button>
  5966. <el-button type="primary" size="small" @click.stop="
  5967. deleteTcheckList(
  5968. testJson.testJson[index1],
  5969. checkIndex1
  5970. )
  5971. " v-if="testJson.testJson[index1].testItem != 1">删除
  5972. </el-button>
  5973. </div>
  5974. </el-checkbox>
  5975. </div>
  5976. </el-checkbox-group>
  5977. </div>
  5978. <!-- <div class="a_add_body_div">
  5979. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  5980. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  5981. v-if="testJson.testJson[index1].testItem != 1">删除
  5982. </el-button>
  5983. </div> -->
  5984. </div>
  5985. </div>
  5986. </div>
  5987. </div>
  5988. <span slot="footer" class="dialog-footer">
  5989. <el-button @click="closePan(45)">取 消</el-button>
  5990. <el-button type="primary" @click="addTest">确 定</el-button>
  5991. </span>
  5992. </el-dialog>
  5993. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  5994. :before-close="handleClose" class="dialog_diy addToolsDia">
  5995. <div class="toolChoose">
  5996. <div class="tools">
  5997. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  5998. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  5999. <div style="
  6000. display: flex;
  6001. flex-direction: row;
  6002. align-items: baseline;
  6003. flex-wrap: nowrap;
  6004. justify-content: flex-start;
  6005. position: relative;
  6006. ">
  6007. <div class="chooseWho">
  6008. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6009. 互动类
  6010. </div>
  6011. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6012. 思维类
  6013. </div>
  6014. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6015. 评价类
  6016. </div>
  6017. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6018. 其他
  6019. </div>
  6020. </div>
  6021. </div>
  6022. <div style="min-height: 163px">
  6023. <div class="toolSort" v-if="chapToolsType == 0">
  6024. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6025. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6026. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6027. <div style="margin: 5px 0">素材库</div>
  6028. </div>
  6029. <div class="noCTool">
  6030. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6031. </div>
  6032. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6033. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6034. </div>
  6035. <!-- <div class="check" @click="chapAddTools(8)">
  6036. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6037. <div class="checkDiv" v-else>
  6038. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6039. </div>
  6040. </div> -->
  6041. </div>
  6042. </div>
  6043. <div class="toolSort" v-if="chapToolsType == 1">
  6044. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6045. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6046. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6047. <div style="margin: 5px 0">思维网格</div>
  6048. </div>
  6049. <div class="noCTool">
  6050. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6051. </div>
  6052. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6053. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6054. </div>
  6055. <!-- <div class="check" @click="chapAddTools(7)">
  6056. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6057. <div class="checkDiv" v-else>
  6058. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6059. </div>
  6060. </div> -->
  6061. </div>
  6062. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6063. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6064. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6065. <div style="margin: 5px 0">电子白板</div>
  6066. </div>
  6067. <div class="noCTool">
  6068. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6069. </div>
  6070. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6071. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6072. </div>
  6073. <!-- <div class="check" @click="chapAddTools(1)">
  6074. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6075. <div class="checkDiv" v-else>
  6076. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6077. </div>
  6078. </div> -->
  6079. </div>
  6080. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6081. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6082. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6083. <div style="margin: 5px 0">便签</div>
  6084. </div>
  6085. <div class="noCTool">
  6086. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6087. </div>
  6088. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6089. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6090. </div>
  6091. <!-- <div class="check" @click="chapAddTools(2)">
  6092. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6093. <div class="checkDiv" v-else>
  6094. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6095. </div>
  6096. </div> -->
  6097. </div>
  6098. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6099. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6100. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6101. <div style="margin: 5px 0">协同文档</div>
  6102. </div>
  6103. <div class="noCTool">
  6104. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6105. </div>
  6106. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6107. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6108. </div>
  6109. <!-- <div class="check" @click="chapAddTools(6)">
  6110. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6111. <div class="checkDiv" v-else>
  6112. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6113. </div>
  6114. </div> -->
  6115. </div>
  6116. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6117. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6118. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6119. <div style="margin: 5px 0">思维导图</div>
  6120. </div>
  6121. <div class="noCTool">
  6122. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6123. </div>
  6124. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6125. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6126. </div>
  6127. <!-- <div class="check" @click="chapAddTools(3)">
  6128. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6129. <div class="checkDiv" v-else>
  6130. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6131. </div>
  6132. </div> -->
  6133. </div>
  6134. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6135. @click="chapAddTools(31)">
  6136. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6137. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6138. <div style="margin: 5px 0">数学画板</div>
  6139. </div>
  6140. <div class="noCTool">
  6141. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6142. </div>
  6143. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6144. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6145. </div>
  6146. <!-- <div class="check" @click="chapAddTools(31)">
  6147. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6148. <div class="checkDiv" v-else>
  6149. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6150. </div>
  6151. </div> -->
  6152. </div>
  6153. </div>
  6154. <div class="toolSort" v-if="chapToolsType == 2">
  6155. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6156. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6157. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6158. <div style="margin: 5px 0">量规评分</div>
  6159. </div>
  6160. <div class="noCTool">
  6161. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6162. </div>
  6163. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6164. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6165. </div>
  6166. <!-- <div class="check" @click="chapAddTools(5)">
  6167. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6168. <div class="checkDiv" v-else>
  6169. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6170. </div>
  6171. </div> -->
  6172. </div>
  6173. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6174. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6175. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6176. <div style="margin: 5px 0">问卷调查</div>
  6177. </div>
  6178. <div class="noCTool">
  6179. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6180. </div>
  6181. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6182. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6183. </div>
  6184. <!-- <div class="check" @click="chapAddTools(4)">
  6185. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6186. <div class="checkDiv" v-else>
  6187. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6188. </div>
  6189. </div> -->
  6190. </div>
  6191. </div>
  6192. </div>
  6193. <div>
  6194. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6195. v-model="itemTools.toolDetail" />
  6196. </div>
  6197. </div>
  6198. </div>
  6199. </div>
  6200. <span slot="footer" class="dialog-footer">
  6201. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6202. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6203. </span>
  6204. </el-dialog>
  6205. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6206. closePan(15);
  6207. }
  6208. " class="dialog_diy">
  6209. <div>
  6210. <div class="a_add_title" style="
  6211. display: flex;
  6212. flex-direction: column;
  6213. align-items: flex-start;
  6214. justify-content: center;
  6215. ">
  6216. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6217. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6218. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6219. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6220. </div>
  6221. </div>
  6222. <span slot="footer" class="dialog-footer">
  6223. <el-button @click="closePan(15)">取 消</el-button>
  6224. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6225. </span>
  6226. </el-dialog>
  6227. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6228. :before-close="handleClose" class="dialog_diy">
  6229. <div>
  6230. <div class="a_add_title" style="
  6231. display: flex;
  6232. flex-direction: column;
  6233. align-items: flex-start;
  6234. justify-content: center;
  6235. ">
  6236. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6237. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6238. </div>
  6239. </div>
  6240. <span slot="footer" class="dialog-footer">
  6241. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6242. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6243. </span>
  6244. </el-dialog>
  6245. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6246. :before-close="handleClose" class="dialog_diy">
  6247. <div>
  6248. <div class="fileCss" style="padding-top: 20px">
  6249. <div>
  6250. <button class="info_btn" @click="addImg($event)">
  6251. 选择本地文件
  6252. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6253. </button>
  6254. <div class="spanName">选择本地文件</div>
  6255. </div>
  6256. <!-- <div>
  6257. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6258. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6259. <img :src="cover[0].url" alt="" />
  6260. <div class="deletePic" @click="deleteSysPic">
  6261. <img src="../../../assets/icon/delete.png" alt="" />
  6262. </div>
  6263. </div>
  6264. <div class="spanName">选择系统文件</div>
  6265. </div> -->
  6266. <div>
  6267. <el-button @click="(searchImageValue = courseName), resetImage()"
  6268. v-if="isSysPic2 == false">选择网络文件</el-button>
  6269. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6270. <img :src="cover[0].url" alt="" />
  6271. <div class="deletePic" @click="deleteSysPic">
  6272. <img src="../../../assets/icon/delete.png" alt="" />
  6273. </div>
  6274. </div>
  6275. <div class="spanName">选择网络文件</div>
  6276. </div>
  6277. </div>
  6278. <!-- <div class="fileCss">
  6279. </div> -->
  6280. </div>
  6281. <span slot="footer" class="dialog-footer">
  6282. <el-button @click="choosePicVisible = false">取 消</el-button>
  6283. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6284. </span>
  6285. </el-dialog>
  6286. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6287. :before-close="handleClose" class="dialog_diy">
  6288. <div class="cru_selectBox" style="margin: 0">
  6289. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6290. 绘画
  6291. </div>
  6292. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6293. 科技
  6294. </div>
  6295. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6296. 人文
  6297. </div>
  6298. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6299. 艺术
  6300. </div>
  6301. </div>
  6302. <div class="sysPicBox">
  6303. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6304. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6305. </div>
  6306. </div>
  6307. </el-dialog>
  6308. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6309. :before-close="handleClose" class="dialog_diy">
  6310. <div>
  6311. <div class="people_top_right" style="display: flex; align-items: center">
  6312. <div style="position: relative; width: 100%">
  6313. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6314. @keyup.enter.native="resetImage()"></el-input>
  6315. <div class="search_img" @click="resetImage" style="right: 10px">
  6316. <img src="../../../assets/icon/search.png" alt />
  6317. </div>
  6318. </div>
  6319. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6320. </div>
  6321. <div class="sysPicBox" v-loading="imageloading">
  6322. <div class="picNone" v-if="!imageList.length">
  6323. 请输入关键词搜索图片
  6324. </div>
  6325. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6326. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6327. </div>
  6328. </div>
  6329. </div>
  6330. </el-dialog>
  6331. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6332. closePan(41);
  6333. }
  6334. " class="dialog_diy dialog_diy3 fullStyle">
  6335. <div v-if="selectJson" style="height: 100%">
  6336. <div class="select_box1" v-if="selectSteps == 1">
  6337. <div class="select_box1_img">
  6338. <div class="select_box1_title">
  6339. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6340. </div>
  6341. <div class="select_box1_add_img">
  6342. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6343. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6344. <img src="../../../assets/icon/addPoster.png" alt="" />
  6345. </div>
  6346. <div class="isSysPic" v-else>
  6347. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6348. <div class="deletePic" @click="deleteSelectPic">
  6349. <img src="../../../assets/icon/delete.png" alt="" />
  6350. </div>
  6351. </div>
  6352. </div>
  6353. </div>
  6354. <div class="select_box1_select">
  6355. <div class="select_box1_title">
  6356. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6357. </div>
  6358. <div class="select_box1_select_box">
  6359. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6360. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6361. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6362. <div class="select_box1_select_box_add">
  6363. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6364. 添加</el-button>
  6365. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6366. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6367. </div>
  6368. </div>
  6369. </div>
  6370. </div>
  6371. <div v-if="selectSteps == 2" style="height: 100%">
  6372. <div class="select_box2">
  6373. <div class="select_box2_title">设置每道题目的正确选项</div>
  6374. <div class="select_box2_box">
  6375. <div class="select_box2_img">
  6376. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6377. </div>
  6378. <div class="select_box2_answer">
  6379. <div class="select_answer_title">根据题目选择对应答案</div>
  6380. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6381. <span>{{ checkIndex + 1 }}、</span>
  6382. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6383. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6384. </el-option>
  6385. </el-select>
  6386. </div>
  6387. </div>
  6388. </div>
  6389. </div>
  6390. </div>
  6391. </div>
  6392. <span slot="footer" class="dialog-footer">
  6393. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6394. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6395. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6396. </span>
  6397. </el-dialog>
  6398. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6399. :before-close="handleClose" class="dialog_diy">
  6400. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6401. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6402. <div class="pjCss" style="width: 100%">
  6403. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6404. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6405. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6406. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6407. <div class="remove" @click="deletRateList(eIndex)"></div>
  6408. <div style="width: 100%; display: flex">
  6409. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6410. <el-rate v-model="eItem.score" disabled></el-rate>
  6411. </div>
  6412. <div class="elist_inptu_text" style="align-items: flex-start">
  6413. <span style="min-width: 100px; text-align: right">描述:</span>
  6414. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6415. </div>
  6416. </div>
  6417. </div>
  6418. <div class="addToolFun" @click="addRateList()">
  6419. <div class="addToolImg">
  6420. <img src="../../../assets/icon/add.png" alt />
  6421. </div>
  6422. <div>添加</div>
  6423. </div>
  6424. </div>
  6425. </div>
  6426. <span slot="footer" class="dialog-footer">
  6427. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6428. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6429. </span>
  6430. </el-dialog>
  6431. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6432. closePan(47);
  6433. }
  6434. " class="dialog_diy dialog_diy3 fullStyle">
  6435. <div style="height: 100%">
  6436. <div class="sentenBox" style="height: 100%">
  6437. <div class="addSen" @click="addSt">添加题目</div>
  6438. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6439. <div class="sentenTopBox">
  6440. <div class="sentenTop" :index="stIndex + 1">
  6441. <div>题目设置</div>
  6442. <div>
  6443. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6444. </div>
  6445. <div @click="addSen(stIndex)">添加</div>
  6446. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6447. </div>
  6448. </div>
  6449. <div class="cardList">
  6450. <div v-if="st.addSentence.length > 0" class="cardBox">
  6451. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6452. @click="setRightAnswer(s, stIndex, sIndex)">
  6453. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6454. <div>{{ s }}</div>
  6455. </el-tooltip>
  6456. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6457. <img src="../../../assets/icon/delete.png" alt="" />
  6458. </div>
  6459. </div>
  6460. </div>
  6461. <div class="card">
  6462. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6463. </div>
  6464. </div>
  6465. <div class="rightCardBox">
  6466. <div>正确顺序</div>
  6467. <div class="rightCardList">
  6468. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6469. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6470. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6471. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6472. <div>{{ r }}</div>
  6473. </el-tooltip>
  6474. </div>
  6475. <div>{{ rIndex + 1 }}</div>
  6476. </div>
  6477. </div>
  6478. <div class="card" v-if="st.rightAnswer.length == 0">
  6479. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6480. </div>
  6481. <div class="card" v-else>
  6482. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6483. </div>
  6484. </div>
  6485. </div>
  6486. </div>
  6487. </div>
  6488. </div>
  6489. <span slot="footer" class="dialog-footer">
  6490. <el-button @click="closePan(47)">取 消</el-button>
  6491. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6492. </span>
  6493. </el-dialog>
  6494. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6495. :before-close="handleClose" class="dialog_diy">
  6496. <el-form>
  6497. <!-- <el-form-item label="文本标题">
  6498. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6499. </el-form-item> -->
  6500. <div>表格内容</div>
  6501. <Table v-model="tableJson.text" @change="change"></Table>
  6502. </el-form>
  6503. <span slot="footer" class="dialog-footer">
  6504. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6505. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6506. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6507. </span>
  6508. </el-dialog>
  6509. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6510. :before-close="handleClose" class="dialog_diy">
  6511. <el-form>
  6512. <!-- <el-form-item label="文本标题">
  6513. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6514. </el-form-item> -->
  6515. <div>文档内容</div>
  6516. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6517. </el-form>
  6518. <span slot="footer" class="dialog-footer">
  6519. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6520. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6521. </span>
  6522. </el-dialog>
  6523. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6524. :before-close="handleClose" class="dialog_diy">
  6525. <div style="
  6526. width: 100%;
  6527. display: flex;
  6528. flex-direction: row;
  6529. flex-wrap: nowrap;
  6530. align-items: center;
  6531. justify-content: center;
  6532. ">
  6533. <div>班级:</div>
  6534. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6535. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6536. </el-option>
  6537. </el-select>
  6538. </div>
  6539. <span slot="footer" class="dialog-footer">
  6540. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6541. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6542. </span>
  6543. </el-dialog>
  6544. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6545. :before-close="handleClose" class="dialog_diy">
  6546. <div style="
  6547. width: 100%;
  6548. display: flex;
  6549. flex-direction: row;
  6550. flex-wrap: nowrap;
  6551. align-items: center;
  6552. justify-content: center;
  6553. ">
  6554. <div>随机码:</div>
  6555. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6556. </div>
  6557. <span slot="footer" class="dialog-footer">
  6558. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6559. <el-button type="primary" @click="addInvite">确定</el-button>
  6560. </span>
  6561. </el-dialog>
  6562. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6563. :before-close="handleClose" class="dialog_diy">
  6564. <div>
  6565. <div style="margin-bottom: 20px; color: #999">
  6566. 提示:点击“+”或“-”修改倒计时时长。
  6567. </div>
  6568. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6569. </div>
  6570. <span slot="footer" class="dialog-footer">
  6571. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6572. <el-button type="primary" @click="addPreTime">确定</el-button>
  6573. </span>
  6574. </el-dialog>
  6575. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6576. :before-close="handleClose" class="dialog_diy">
  6577. <div>
  6578. <div style="
  6579. width: 100%;
  6580. display: flex;
  6581. flex-direction: row;
  6582. flex-wrap: nowrap;
  6583. align-content: center;
  6584. align-items: center;
  6585. justify-content: space-between;
  6586. ">
  6587. <div style="
  6588. display: flex;
  6589. flex-flow: row nowrap;
  6590. align-items: flex-start;
  6591. width: 100%;
  6592. flex-direction: column;
  6593. flex-wrap: nowrap;
  6594. position: relative;
  6595. ">
  6596. <div class="e_box">
  6597. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6598. <div class="e_card_picture">
  6599. <img src="../../../assets/e_picture.png" />
  6600. </div>
  6601. <div class="e_card_name">
  6602. <span>{{ item.title }}</span>
  6603. </div>
  6604. <div class="e_card_btn">
  6605. <span @click="checkEva(item.id, 2)">导入</span>
  6606. </div>
  6607. </div> -->
  6608. <!-- <div class="addEva" @click="openT">
  6609. <img src="../../../assets/icon/addEva.png" alt="" />
  6610. </div> -->
  6611. <div style="
  6612. display: flex;
  6613. justify-content: flex-end;
  6614. margin-bottom: 10px;
  6615. ">
  6616. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6617. </div>
  6618. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6619. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6620. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6621. </el-table-column>
  6622. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6623. </el-table-column>
  6624. <el-table-column label="操作" width="250px">
  6625. <template slot-scope="scope">
  6626. <div class="btnBox">
  6627. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6628. </div>
  6629. </template>
  6630. </el-table-column>
  6631. </el-table>
  6632. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6633. 暂无数据
  6634. </div>
  6635. </div>
  6636. </div>
  6637. </div>
  6638. </div>
  6639. <span slot="footer" class="dialog-footer">
  6640. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6641. </span>
  6642. </el-dialog>
  6643. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6644. :before-close="handleClose" class="dialog_diy">
  6645. <div class="groupBox">
  6646. <div v-if="groupJson.group" class="groupContent">
  6647. <div class="groupTitle">请设置小组数量及名称</div>
  6648. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6649. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6650. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6651. <div class="groupBtn">
  6652. <el-button type="primary" size="small" @click="addGroup(index)"
  6653. v-if="groupJson.group.length - 1 == index">
  6654. 添加</el-button>
  6655. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6656. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6657. </div>
  6658. </div>
  6659. </div>
  6660. <div class="groupContent">
  6661. <div class="groupTitle">请设置每组人数</div>
  6662. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6663. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6664. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6665. @change="numberPan"></el-input>
  6666. </div>
  6667. </div>
  6668. <span slot="footer" class="dialog-footer">
  6669. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6670. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6671. </span>
  6672. </el-dialog>
  6673. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6674. :before-close="handleClose" class="dialog_diy">
  6675. <div style="
  6676. width: 100%;
  6677. display: flex;
  6678. flex-direction: row;
  6679. flex-wrap: nowrap;
  6680. align-items: center;
  6681. justify-content: center;
  6682. ">
  6683. <div style="min-width: fit-content">文件名称:</div>
  6684. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6685. </div>
  6686. <span slot="footer" class="dialog-footer">
  6687. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6688. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6689. </span>
  6690. </el-dialog>
  6691. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6692. closePan(69);
  6693. }
  6694. " class="dialog_diy fullStyle fullStyle1">
  6695. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6696. <span slot="footer" class="dialog-footer">
  6697. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6698. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6699. </span>
  6700. </el-dialog>
  6701. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6702. :before-close="handleClose" class="dialog_diy">
  6703. <div class="template_box">
  6704. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6705. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6706. <div class="wordPic">
  6707. <img src="../../../assets/icon/new/course_template.png" alt />
  6708. </div>
  6709. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6710. <div style="
  6711. margin-top: 10px;
  6712. line-height: 19px;
  6713. overflow: hidden;
  6714. text-overflow: ellipsis;
  6715. white-space: nowrap;
  6716. padding: 0 10px;
  6717. box-sizing: border-box;
  6718. width: 100%;
  6719. ">
  6720. {{ aa.title }}
  6721. </div>
  6722. </el-tooltip>
  6723. </div>
  6724. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6725. :class="{ wordTeacherA: ctJson.id == 1 }">
  6726. <div class="wordPic">
  6727. <img src="../../../assets/icon/new/course_template.png" alt />
  6728. </div>
  6729. <div style="
  6730. margin-top: 10px;
  6731. line-height: 19px;
  6732. overflow: hidden;
  6733. text-overflow: ellipsis;
  6734. white-space: nowrap;
  6735. padding: 0 20px;
  6736. ">
  6737. 简易模板
  6738. </div>
  6739. </div>
  6740. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6741. :class="{ wordTeacherA: ctJson.id == 2 }">
  6742. <div class="wordPic">
  6743. <img src="../../../assets/icon/new/course_template.png" alt />
  6744. </div>
  6745. <div style="
  6746. margin-top: 10px;
  6747. line-height: 19px;
  6748. overflow: hidden;
  6749. text-overflow: ellipsis;
  6750. white-space: nowrap;
  6751. padding: 0 20px;
  6752. ">
  6753. 智能粘贴模式
  6754. </div>
  6755. </div>
  6756. </div>
  6757. <span slot="footer" class="dialog-footer">
  6758. <el-button @click="templateDialog = false">取 消</el-button>
  6759. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6760. </span>
  6761. </el-dialog>
  6762. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6763. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6764. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6765. <div class="change_stageBox">
  6766. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6767. <div class="nt_taskBox">
  6768. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  6769. <div class="nt_taskName">
  6770. <el-tooltip effect="light" :content="t.dyName" placement="top">
  6771. <span>{{ t.dyName }}</span>
  6772. </el-tooltip>
  6773. </div>
  6774. </div>
  6775. <div class="moveBtn" v-if="unitJson3.length > 1">
  6776. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  6777. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  6778. </div>
  6779. </div>
  6780. </div>
  6781. <span slot="footer" class="dialog-footer">
  6782. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  6783. <el-button type="primary" @click="updateChange">确定</el-button>
  6784. </span>
  6785. </el-dialog>
  6786. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  6787. :before-close="handleClose" class="dialog_diy">
  6788. <div class="addTypeChoose" style="justify-content: center">
  6789. <div style="min-width: 100px">模板名称:</div>
  6790. <el-input v-model="templateName" style="width: 200px"></el-input>
  6791. </div>
  6792. <div class="addTypeBox">
  6793. <div class="addTypeChoose">
  6794. <div style="min-width: 100px">选择一级分类:</div>
  6795. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  6796. style="width: 200px">
  6797. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  6798. </el-option>
  6799. </el-select>
  6800. </div>
  6801. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  6802. <div style="min-width: 100px">选择二级分类:</div>
  6803. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  6804. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  6805. </el-option>
  6806. </el-select>
  6807. </div>
  6808. </div>
  6809. <span slot="footer" class="dialog-footer">
  6810. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  6811. <el-button @click="close()">关 闭</el-button>
  6812. </span>
  6813. </el-dialog>
  6814. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  6815. </evaBox>
  6816. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  6817. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  6818. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" @aiConfirm="aiConfirm" :clickType="clickType">
  6819. </aiDialog>
  6820. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  6821. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  6822. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  6823. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  6824. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  6825. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  6826. </div>
  6827. </template>
  6828. <script>
  6829. import "../../../common/aws-sdk-2.235.1.min.js";
  6830. import { tools as toolsData } from "../../../common/tools.js";
  6831. // import "../../../common/aws-sdk-2.99.0.min.js";
  6832. import $ from "jquery";
  6833. import EditorBar from "../../../components/tools/wangEnduit";
  6834. import Table from "../../../components/tools/table";
  6835. import Mind from "../../tools/jsmind2";
  6836. import Time from "../../tools/time.vue";
  6837. import Sunburst from "../../tools/sunburst";
  6838. import SeeBoard from "../../tools/seeBoard";
  6839. import weilaiData from "../components/weilai.js";
  6840. import sourceDialog from "../teacherSource/dialog.vue";
  6841. import interVideo from "../interVideo/index.vue";
  6842. import englishRight from "../components/englishRight.vue";
  6843. import evaBox from "../evaBox/index.vue";
  6844. import EnglishVoice from "../EnglishVoice/index.vue";
  6845. import aiBox from './aiBox.vue'
  6846. import aiDialog from './aiDialog'
  6847. import aiTips from './aiTips.vue'
  6848. import tipsDialog from './tipsDialog.vue'
  6849. import { v4 as uuidv4 } from "uuid";
  6850. import MarkdownIt from "markdown-it";
  6851. import aiCreateDialog from './aiCreateDialog.vue'
  6852. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  6853. import wpdf from "../test/file/wPdf2.vue";
  6854. import wOffice from "../test/file/wOffice.vue";
  6855. var OpenCC = require("opencc-js");
  6856. let converter = OpenCC.Converter({
  6857. from:'hk',
  6858. to:'cn'
  6859. })
  6860. export default {
  6861. components: {
  6862. EditorBar,
  6863. Mind,
  6864. Time,
  6865. Sunburst,
  6866. SeeBoard,
  6867. Table,
  6868. sourceDialog,
  6869. interVideo,
  6870. englishRight,
  6871. evaBox,
  6872. EnglishVoice,
  6873. aiBox,
  6874. aiDialog,
  6875. aiTips,
  6876. tipsDialog,
  6877. aiCreateDialog,
  6878. aiCreateVideoDialog,
  6879. wpdf,
  6880. wOffice,
  6881. },
  6882. data() {
  6883. return {
  6884. checkAll: false,
  6885. checkAll2: false,
  6886. chooseType: 1,
  6887. checkedCities: [],
  6888. isIndeterminate: true,
  6889. isIndeterminate2: true,
  6890. isSysPic: false,
  6891. isSysPic2: false,
  6892. steps: 1,
  6893. stepsNav: 1,
  6894. nbOrder: 0,
  6895. courseId: "",
  6896. chapToolsType: 0,
  6897. chapTools: [
  6898. {
  6899. tools: [],
  6900. toolDetail: "",
  6901. },
  6902. ],
  6903. line: "",
  6904. lineTitle: "",
  6905. sysPic: [],
  6906. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  6907. sentenceList2: [],
  6908. isPushTitleList: [],
  6909. lineCount: 0,
  6910. lineType: 0,
  6911. chapCount: 0,
  6912. courseName: "",
  6913. isTeacherSee: false,
  6914. courseText: "",
  6915. textLoading: false,
  6916. ttextLoading: false,
  6917. courseText2: "",
  6918. preTime: 0,
  6919. formLabelWidth: "100px",
  6920. choosePicVisible: false,
  6921. sysPicVisible: false,
  6922. sysPicVisible2: false,
  6923. uploadLoading1: false,
  6924. noneBtnImg: false,
  6925. updateBoolean2: false,
  6926. unitIndex: 0,
  6927. taskCount: 0,
  6928. dialogVisible: false,
  6929. dialogVisible1: false,
  6930. dialogVisible2: false,
  6931. dialogVisible3: false,
  6932. dialogVisible4: false,
  6933. dialogVisible5: false,
  6934. dialogVisible6: false,
  6935. dialogVisible7: false,
  6936. dialogVisible8: false,
  6937. dialogVisible9: false,
  6938. dialogVisibleClass: false,
  6939. dialogVisibleMember: false,
  6940. dialogVisibleMp3: false,
  6941. dialogVisibleSelect: false,
  6942. dialogVisibleSentence: false,
  6943. dialogVisibleRate: false,
  6944. dialogVisibleChoice: false,
  6945. dialogVisiblemb: false,
  6946. dialogVisibleInvite: false,
  6947. dialogVisibleSource: false,
  6948. dialogVisibleVideo: false,
  6949. dialogVisibleStageChange: false,
  6950. dialogVisibleupdataVideoT: false,
  6951. englishDialogVisible: false,
  6952. templateDialog: false,
  6953. ctJson: {},
  6954. isClickColor: 1,
  6955. toolIndexType: "",
  6956. publicTool: 0,
  6957. searchPeople: "",
  6958. searchTN: "",
  6959. collid: '',
  6960. CollLoading: false,
  6961. userid: this.$route.query.userid,
  6962. oid: this.$route.query.oid,
  6963. org: this.$route.query.org,
  6964. role: this.$route.query.role,
  6965. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  6966. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  6967. dialogVisibleTable: false,
  6968. dialogVisibleWord: false,
  6969. tableJson: { text: "" },
  6970. wordJson: { text: "" },
  6971. dialogVisibleMoreUpload: false,
  6972. dialogVisiblePreTime: false,
  6973. uploadJson: [],
  6974. classJuri: [],
  6975. gradeList: [],
  6976. cover: [], //课程封面
  6977. myWord: [],
  6978. evaJuri: [],
  6979. evalua: "",
  6980. targetArray: [],
  6981. eTitle: "",
  6982. eJson: {},
  6983. fid: "", //一级
  6984. sid: "", //二级
  6985. tid: "", //二级
  6986. typeMode: 3,
  6987. eJSONNum: 0,
  6988. data: {
  6989. meta: {
  6990. name: "example",
  6991. author: "dd@163.com",
  6992. version: "0.2",
  6993. },
  6994. format: "node_array",
  6995. data: [{ id: "root", isroot: true, topic: "" }],
  6996. },
  6997. askJson: {
  6998. askCount: 1,
  6999. askTitle: "",
  7000. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7001. },
  7002. askJson2: {},
  7003. testJson: {},
  7004. testJson2: {},
  7005. selectJson: {},
  7006. selectJson2: {},
  7007. rateJson: [],
  7008. unitJson2: [],
  7009. unitJson3: [],
  7010. unitJson: [
  7011. {
  7012. dyName: "", //单元标题
  7013. chapterInfo: [
  7014. {
  7015. isread: false,
  7016. chapterid: this.guid(),
  7017. title: "",
  7018. courseName: "",
  7019. taskJson: [
  7020. {
  7021. task: "",
  7022. taskDetail: "",
  7023. chapterData: [],
  7024. toolText: "",
  7025. toolChoose: [
  7026. {
  7027. tool: [],
  7028. toolDetail: "",
  7029. toolType: 0,
  7030. askCount: 1,
  7031. askTitle: "",
  7032. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7033. },
  7034. ],
  7035. isShowTools: false,
  7036. askCount: 1,
  7037. isFold: 1,
  7038. askTitle: "",
  7039. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7040. checkJson: [{ checkCount: [], checkPerent: [] }],
  7041. homeworkList: [],
  7042. },
  7043. ],
  7044. itemCount: 1,
  7045. fileList1: [],
  7046. video: [],
  7047. testData: [],
  7048. pData: [],
  7049. templateArray: [],
  7050. },
  7051. ],
  7052. },
  7053. ],
  7054. templateArray: [],
  7055. studentJuri: [],
  7056. teacherJuri: [],
  7057. CollaborativeTeaList: [],
  7058. checkboxList: [],
  7059. checkboxList2: [],
  7060. checkboxList3: [],
  7061. classSearch: "",
  7062. gradeId: "",
  7063. number: "",
  7064. tTitle: "",
  7065. tdetail: "",
  7066. templateC: {},
  7067. AttText: {},
  7068. AttTextType: 0,
  7069. AttTextIndex: 0,
  7070. cTemplate: "",
  7071. CourseType: [],
  7072. CourseType1: [],
  7073. CourseType2: [],
  7074. CourseTypeJson: {},
  7075. CourseTypeJson1: {},
  7076. courseTypeId: [],
  7077. courseTypeId1: [],
  7078. courseTypeSon: [],
  7079. clearArray: [],
  7080. pTypeCheck: [],
  7081. pTypeCheckName: [],
  7082. loading: false,
  7083. toolType: 0,
  7084. inputShow: true,
  7085. inputShow2: true,
  7086. toolIndex: 0,
  7087. cidType: 0,
  7088. answerQ: "",
  7089. answerQ2: "",
  7090. grade: [],
  7091. grade2: [],
  7092. courseUserid: "",
  7093. timer: null,
  7094. timer2: null,
  7095. pasteTimer: null,
  7096. checkId: "",
  7097. isDelete: 1,
  7098. addindex: 0,
  7099. selectSteps: 1,
  7100. groupJson: {},
  7101. dialogVisibleGroup: false,
  7102. rightBoxHeight: 0,
  7103. ManAarray: [],
  7104. checkBoolean: false,
  7105. inviteCode: [],
  7106. inviteId: "",
  7107. icode: "",
  7108. easyArray: [2, 4],
  7109. sourceData: {},
  7110. updateSourcePan: false,
  7111. videoJson: {},
  7112. isBtnDisplay: false,
  7113. isStepDisplay: false,
  7114. isPasteStage: false,
  7115. isPasteTask: false,
  7116. isPasteChoice: false,
  7117. imageList: [],
  7118. imageloading: false,
  7119. imageloading2: false,
  7120. searchImageValue: "",
  7121. ppage: 1,
  7122. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7123. oldIndex: 0,
  7124. dragType: "",
  7125. oldUnitIndex: 0,
  7126. oldData: null,
  7127. newIndex: "",
  7128. englishList: {},
  7129. typeIndex: "",
  7130. courseState: 5,
  7131. taskJSONa: [
  7132. {
  7133. task: "",
  7134. taskDetail: "",
  7135. chapterData: [],
  7136. toolText: "",
  7137. toolChoose: [
  7138. {
  7139. tool: [],
  7140. toolDetail: "",
  7141. toolType: 0,
  7142. askCount: 1,
  7143. askTitle: "",
  7144. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7145. },
  7146. ],
  7147. isShowTools: false,
  7148. askCount: 1,
  7149. isFold: 1,
  7150. askTitle: "",
  7151. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7152. checkJson: [{ checkCount: [], checkPerent: [] }],
  7153. homeworkList: [],
  7154. },
  7155. ],
  7156. checkUnitIndex: 0,
  7157. isdrag: "",
  7158. evaIndex: "",
  7159. evatIndex: "",
  7160. evaBoxDialog: false,
  7161. EnglishVoiceDialog: false,
  7162. englishVoiceJson: {},
  7163. cetIndex: "",
  7164. cettIndex: "",
  7165. cetBoxDialog: false,
  7166. templateName: "",
  7167. setTypeJson: {
  7168. one: "",
  7169. two: "",
  7170. },
  7171. twoJson: [],
  7172. oneJson: [],
  7173. updateKey: 1,
  7174. isOutline: false,
  7175. isOutline2: false,
  7176. infoData: [],
  7177. infoproVisible: false,
  7178. infoisFinishSize: 0,
  7179. infoisAllSize: 0,
  7180. infoprogress: 0,
  7181. taskDetailLoading: [],
  7182. ttaskDetailLoading: [],
  7183. taskDetailLoading2: [],
  7184. ttaskDetailLoading2: [],
  7185. taskDetailLoading3: [],
  7186. ttaskDetailLoading3: [],
  7187. taskDetailLoading4: [],
  7188. taskDetailLoading5: [],
  7189. ttaskDetailLoading5: [],
  7190. dArray: [],
  7191. dialogVisibleAiD: false,
  7192. aitype: "",
  7193. aiJson: {
  7194. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7195. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7196. "aiTask": "请根据<教学任务教案>。",
  7197. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7198. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7199. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7200. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7201. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7202. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7203. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7204. },
  7205. aiText: "",
  7206. aiText2: "",
  7207. aiCallBack: "",
  7208. aiIndex: "",
  7209. clickType: 1,
  7210. promptShow: false,
  7211. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7212. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7213. dialogVisibleTips: false,
  7214. tipsJson: {},
  7215. cpote:{
  7216. cpote1: '',
  7217. cpote2: '',
  7218. cpote3: '',
  7219. cpote4: '',
  7220. },
  7221. cpoteLoading:{
  7222. cpote1: false,
  7223. cpote2: false,
  7224. cpote3: false,
  7225. cpote4: false,
  7226. },
  7227. cpotetLoading:{
  7228. cpote1: false,
  7229. cpote2: false,
  7230. cpote3: false,
  7231. cpote4: false,
  7232. },
  7233. cpoteType: 0,
  7234. dialogVisibleAiCreate: false,
  7235. dialogVisibleAiCreateVideo: false,
  7236. teacherText: [],
  7237. isFileSearch: true,
  7238. fileIds: ['file-A81p1q02HHpJhus4nYYwtAmM'],
  7239. 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'],
  7240. courseJie:1,
  7241. courseTime:45,
  7242. allTextArray: [],
  7243. dialogVisiblePdf: false,
  7244. dialogVisibleOffice: false,
  7245. wurl: "",
  7246. choiceLoading: false,
  7247. teacherInfoData: [],
  7248. teacherinfoproVisible: false,
  7249. teacherinfoisFinishSize: 0,
  7250. teacherinfoisAllSize: 0,
  7251. teacherinfoprogress: 0,
  7252. teacherCourseText: "",
  7253. teacherTextLoading: false,
  7254. tteacherTextLoading: false,
  7255. targetCourseText: "",
  7256. targetTextLoading: false,
  7257. ttargetTextLoading: false,
  7258. cankaoInfoData: [],
  7259. fileSLoading: false,
  7260. infoData2: [],
  7261. isuseT: false,
  7262. mode: 1,
  7263. targetCourseText2: "",
  7264. targetTextLoading2: false,
  7265. ttargetTextLoading2: false,
  7266. courseTextBool: false,
  7267. teacherCourseTextB: true,
  7268. targetCourseTextB: true,
  7269. courseTextB: true,
  7270. targetCourseText2B: true,
  7271. // yiKeTemplateArray:['cf5722a4-401b-11ef-b873-005056b86db5','cf5722a4-401b-11ef-b873-005056b86dc4','cf5722a4-401b-11ef-b873-005056b86dc3','cf5722a4-401b-11ef-b873-005056b86dc5','9dd4bb76-1e48-11ef-bee5-005056b86dc4'],
  7272. yiKeTemplateArray:[],
  7273. taskLoading: [],
  7274. ruleLoading: [],
  7275. mubiaoInfoData: [],
  7276. mubiaoinfoproVisible: false,
  7277. mubiaoinfoisFinishSize: 0,
  7278. mubiaoinfoisAllSize: 0,
  7279. mubiaoinfoprogress: 0,
  7280. xuanzeInfoData: [],
  7281. xuanzeinfoproVisible: false,
  7282. xuanzeinfoisFinishSize: 0,
  7283. xuanzeinfoisAllSize: 0,
  7284. xuanzeinfoprogress: 0,
  7285. pingjiaInfoData: [],
  7286. pingjiainfoproVisible: [],
  7287. pingjiainfoisFinishSize: [],
  7288. pingjiainfoisAllSize: [],
  7289. pingjiainfoprogress: [],
  7290. isOutlineCancelToken: null
  7291. };
  7292. },
  7293. directives: {
  7294. autoHeight: {
  7295. update(el, binding) {
  7296. const { value } = binding;
  7297. if (value && typeof value === "number") {
  7298. el.style.height = `${value}px`;
  7299. } else {
  7300. el.style.height = "auto";
  7301. }
  7302. },
  7303. componentUpdated(el) {
  7304. el.style.height = `${el.scrollHeight + 25}px`;
  7305. },
  7306. },
  7307. },
  7308. computed: {
  7309. // rightBoxHeight: function () {
  7310. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7311. // },
  7312. offsetLetfPx: function () {
  7313. //addnum可以直接在模板语法里面用,相当于data内的值
  7314. return (
  7315. $(".cru_select")[this.unitIndex] &&
  7316. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7317. );
  7318. },
  7319. getMan2() {
  7320. return function (people) {
  7321. let _people = people;
  7322. let _people2 = "";
  7323. if (this.ManAarray.length) {
  7324. for (var i = 0; i < this.ManAarray.length; i++) {
  7325. if (this.ManAarray[i].userid == people) {
  7326. _people2 = this.ManAarray[i].name;
  7327. break;
  7328. }
  7329. }
  7330. }
  7331. if (people == this.courseUserid) {
  7332. return "";
  7333. }
  7334. return this.ManAarray.length ? _people2 : "";
  7335. };
  7336. },
  7337. getListMan2() {
  7338. return function (list) {
  7339. let _people2 = [];
  7340. if (this.ManAarray.length) {
  7341. for (var j = 0; j < list.length; j++) {
  7342. let people = list[j];
  7343. for (var i = 0; i < this.ManAarray.length; i++) {
  7344. if (
  7345. this.ManAarray[i].userid == people &&
  7346. people != this.courseUserid
  7347. ) {
  7348. _people2.push(this.ManAarray[i].name);
  7349. break;
  7350. }
  7351. }
  7352. }
  7353. }
  7354. return this.ManAarray.length ? _people2.join("、") : "";
  7355. };
  7356. },
  7357. isInvite() {
  7358. return function (cid) {
  7359. let array = [];
  7360. for (var i = 0; i < this.inviteCode.length; i++) {
  7361. array.push(this.inviteCode[i].cid);
  7362. }
  7363. return array.indexOf(cid) != -1;
  7364. };
  7365. },
  7366. getInviteCodeC() {
  7367. return function (cid) {
  7368. let array = [];
  7369. for (var i = 0; i < this.inviteCode.length; i++) {
  7370. array.push(this.inviteCode[i].cid);
  7371. }
  7372. return this.inviteCode[array.indexOf(cid)].ic;
  7373. };
  7374. },
  7375. getClassC() {
  7376. return function (c) {
  7377. let _c2 = "";
  7378. if (this.grade.length) {
  7379. for (var i = 0; i < this.grade.length; i++) {
  7380. if (this.grade[i].id == c) {
  7381. _c2 = this.grade[i].name;
  7382. break;
  7383. }
  7384. }
  7385. }
  7386. return this.grade.length ? _c2 : "";
  7387. };
  7388. },
  7389. getListClassC() {
  7390. return function (list) {
  7391. let _c2 = [];
  7392. if (this.grade.length) {
  7393. for (var j = 0; j < list.length; j++) {
  7394. let c = list[j];
  7395. for (var i = 0; i < this.grade.length; i++) {
  7396. if (this.grade[i].id == c) {
  7397. _c2.push(this.grade[i].name);
  7398. break;
  7399. }
  7400. }
  7401. }
  7402. }
  7403. return this.grade.length ? _c2.join("、") : "";
  7404. };
  7405. },
  7406. MarkdownT() {
  7407. return function (c) {
  7408. let md = new MarkdownIt();
  7409. return c
  7410. ? md.render(c) : "";
  7411. };
  7412. },
  7413. panOutline(){
  7414. return function () {
  7415. let count = 0;
  7416. for(var i = 0; i < this.unitJson.length; i++){
  7417. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7418. for(var j = 0; j < _task.length; j++){
  7419. if(_task[j].taskDetail2){
  7420. count++
  7421. }
  7422. }
  7423. }
  7424. return count;
  7425. };
  7426. },
  7427. panTeacher(){
  7428. return function () {
  7429. let count = 0;
  7430. for(var i = 0; i < this.unitJson.length; i++){
  7431. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7432. for(var j = 0; j < _task.length; j++){
  7433. if(_task[j].taskDetail3){
  7434. count++
  7435. }
  7436. }
  7437. }
  7438. return count;
  7439. };
  7440. },
  7441. dataCheckPan(){
  7442. return function (fileid) {
  7443. for(let i = 0; i < this.infoData.length; i++){
  7444. if(this.infoData[i].fileid == fileid){
  7445. return true
  7446. }
  7447. }
  7448. return false;
  7449. };
  7450. }
  7451. },
  7452. watch: {
  7453. unitIndex(newValue, oldValue) {
  7454. // return;
  7455. if (this.isDelete == 2) {
  7456. this.isDelete = 1;
  7457. return;
  7458. }
  7459. if (this.cid != "") {
  7460. let _unitIndex = oldValue;
  7461. if (
  7462. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7463. JSON.stringify(this.unitJson[_unitIndex])
  7464. ) {
  7465. this.$refs.rightboxR.scrollTop = 0;
  7466. return;
  7467. }
  7468. let cPan = 1;
  7469. for (
  7470. var j = 0;
  7471. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7472. j++
  7473. ) {
  7474. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7475. j
  7476. ].proVisible = false;
  7477. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7478. j
  7479. ].proVisible2 = false;
  7480. if (
  7481. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7482. .length > 1
  7483. ) {
  7484. for (
  7485. var z = 0;
  7486. z <
  7487. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7488. .length;
  7489. z++
  7490. ) {
  7491. if (
  7492. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7493. .toolChoose[z].tool.length
  7494. ) {
  7495. this.$message.error("请把工具添加完整");
  7496. cPan = 2;
  7497. break;
  7498. }
  7499. }
  7500. }
  7501. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7502. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7503. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7504. (ele) => {
  7505. return ele.value != "";
  7506. }
  7507. );
  7508. }
  7509. }
  7510. if (cPan == 2) {
  7511. this.unitIndex = oldValue;
  7512. return;
  7513. }
  7514. for (var i = 0; i < this.unitJson.length; i++) {
  7515. if (this.addindex != i) {
  7516. delete this.unitJson[i].isUpdate;
  7517. }
  7518. }
  7519. this.$refs.rightboxR.scrollTop = 0;
  7520. this.addindex = -1;
  7521. let params = [
  7522. {
  7523. cid: this.cid,
  7524. chapters: JSON.stringify(this.unitJson),
  7525. uid: this.userid,
  7526. unitIndex: _unitIndex,
  7527. },
  7528. ];
  7529. this.ajax
  7530. .post(this.$store.state.api + "updateWorkNew4", params)
  7531. .then((res) => {
  7532. // this.$message({
  7533. // message: "修改成功",
  7534. // type: "success",
  7535. // });
  7536. // this.courseId = this.cid;
  7537. this.addtips()
  7538. })
  7539. .catch((err) => {
  7540. this.$message.error("网络不佳");
  7541. console.error(err);
  7542. });
  7543. }
  7544. },
  7545. steps(newValue, old) {
  7546. if (newValue == 4) {
  7547. let cPan = 1;
  7548. for (var i = 0; i < this.unitJson.length; i++) {
  7549. for (
  7550. var j = 0;
  7551. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7552. j++
  7553. ) {
  7554. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7555. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7556. if (
  7557. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7558. ) {
  7559. for (
  7560. var z = 0;
  7561. z <
  7562. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7563. z++
  7564. ) {
  7565. if (
  7566. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7567. .tool.length
  7568. ) {
  7569. this.$message.error("请把工具添加完整");
  7570. cPan = 2;
  7571. break;
  7572. }
  7573. }
  7574. }
  7575. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7576. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7577. i
  7578. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7579. return ele.value != "";
  7580. });
  7581. }
  7582. }
  7583. }
  7584. this.inputShow = true;
  7585. if (cPan == 2) {
  7586. this.steps = old;
  7587. return;
  7588. }
  7589. this.goTo(
  7590. "/course?userid=" +
  7591. this.userid +
  7592. "&oid=" +
  7593. this.oid +
  7594. "&org=" +
  7595. this.org +
  7596. "&role=" +
  7597. this.role
  7598. );
  7599. }
  7600. },
  7601. },
  7602. methods: {
  7603. tableRowClassName({ row, rowIndex }) {
  7604. if ((rowIndex + 1) % 2 === 0) {
  7605. return "even_row";
  7606. } else {
  7607. return "";
  7608. }
  7609. },
  7610. close() {
  7611. this.cetIndex = "";
  7612. this.cettIndex = "";
  7613. this.templateName = "";
  7614. this.cetBoxDialog = false;
  7615. },
  7616. openAI() {
  7617. top.postMessage({ tools: "64" }, "*");
  7618. },
  7619. setMan() {
  7620. // let teacherJuri = this.teacherJuri2;
  7621. this.ManAarray = [];
  7622. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7623. if (_user.indexOf(this.userid) == -1) {
  7624. _user.push(this.userid);
  7625. }
  7626. if (_user.indexOf(this.courseUserid) == -1) {
  7627. _user.push(this.courseUserid);
  7628. }
  7629. let params = {
  7630. uid: _user.join(","),
  7631. };
  7632. this.ajax
  7633. .get(this.$store.state.api + "getAllUserById", params)
  7634. .then((res) => {
  7635. let teacherJuri = res.data[0];
  7636. this.ManAarray = teacherJuri;
  7637. })
  7638. .catch((err) => {
  7639. console.error(err);
  7640. });
  7641. },
  7642. previewImg(url) {
  7643. this.$hevueImgPreview(url);
  7644. },
  7645. btnDisplay(bool) {
  7646. this.isBtnDisplay = bool;
  7647. },
  7648. stepDisplay(bool) {
  7649. this.isStepDisplay = bool;
  7650. },
  7651. scrollChange() {
  7652. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  7653. },
  7654. addHw(e) {
  7655. var el = e.currentTarget;
  7656. el.getElementsByTagName("input")[0].click();
  7657. },
  7658. change(val) {
  7659. if (this.dialogVisible1) {
  7660. this.tdetail = val;
  7661. } else if (this.dialogVisible6) {
  7662. this.AttText.text = val;
  7663. } else if (this.dialogVisible2) {
  7664. this.cTemplate = val;
  7665. } else if (this.dialogVisibleTable) {
  7666. this.tableJson.text = val;
  7667. }
  7668. this.$forceUpdate();
  7669. console.log(val);
  7670. },
  7671. change2(val) {
  7672. console.log(val);
  7673. this.$forceUpdate();
  7674. },
  7675. handleClose(done) {
  7676. done();
  7677. },
  7678. closePan(tool) {
  7679. if (tool == 15) {
  7680. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  7681. this.dialogVisible8 = false;
  7682. } else {
  7683. this.closeConfirm(tool);
  7684. }
  7685. } else if (tool == 4) {
  7686. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  7687. this.dialogVisible5 = false;
  7688. } else {
  7689. this.closeConfirm(tool);
  7690. }
  7691. } else if (tool == 45) {
  7692. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  7693. this.dialogVisibleChoice = false;
  7694. } else {
  7695. this.closeConfirm(tool);
  7696. }
  7697. } else if (tool == 41) {
  7698. if (
  7699. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  7700. ) {
  7701. this.dialogVisibleSelect = false;
  7702. } else {
  7703. this.closeConfirm(tool);
  7704. }
  7705. } else if (tool == 47) {
  7706. if (
  7707. JSON.stringify(this.sentenceList) ==
  7708. JSON.stringify(this.sentenceList2)
  7709. ) {
  7710. this.dialogVisibleSentence = false;
  7711. } else {
  7712. this.closeConfirm(tool);
  7713. }
  7714. } else if (tool == 69) {
  7715. if (
  7716. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  7717. ) {
  7718. this.englishDialogVisible = false;
  7719. } else {
  7720. this.closeConfirm(tool);
  7721. }
  7722. }
  7723. },
  7724. closeConfirm(tool) {
  7725. this.$confirm("是否保存已编辑内容?", "提示", {
  7726. confirmButtonText: "保存",
  7727. cancelButtonText: "不保存",
  7728. type: "warning",
  7729. })
  7730. .then(() => {
  7731. if (tool == 15) {
  7732. this.addAnswer();
  7733. } else if (tool == 4) {
  7734. this.addAsk();
  7735. } else if (tool == 45) {
  7736. this.addTest();
  7737. } else if (tool == 41) {
  7738. this.addSelectAnswer();
  7739. } else if (tool == 47) {
  7740. this.addSentenceTool();
  7741. } else if (tool == 69) {
  7742. this.addEnglish();
  7743. }
  7744. })
  7745. .catch(() => {
  7746. if (tool == 15) {
  7747. this.dialogVisible8 = false;
  7748. } else if (tool == 4) {
  7749. this.dialogVisible5 = false;
  7750. } else if (tool == 45) {
  7751. this.dialogVisibleChoice = false;
  7752. } else if (tool == 41) {
  7753. this.dialogVisibleSelect = false;
  7754. } else if (tool == 47) {
  7755. this.dialogVisibleSentence = false;
  7756. } else if (tool == 69) {
  7757. this.englishDialogVisible = false;
  7758. }
  7759. });
  7760. },
  7761. addEnglish(jsonType) {
  7762. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  7763. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  7764. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  7765. if (
  7766. this.englishList.engTitle == "" ||
  7767. this.englishList.englishText == ""
  7768. ) {
  7769. this.$message.error("请将内容填写完整!");
  7770. return;
  7771. }
  7772. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7773. this.taskCount
  7774. ].toolChoose[this.toolIndex].englishList = this.englishList;
  7775. this.englishList = {};
  7776. if (jsonType && jsonType == 1) {
  7777. this.englishDialogVisible = true;
  7778. } else {
  7779. this.englishDialogVisible = false;
  7780. }
  7781. if (
  7782. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  7783. .toolChoose[this.toolIndex].tool != 69
  7784. ) {
  7785. this.addTools(69, this.taskCount, this.toolIndex);
  7786. }
  7787. },
  7788. imgChange2(i, j) {
  7789. var _tmp = this.testJson.testJson[i].checkList[j];
  7790. this.noneBtnImg = _tmp.length >= 1;
  7791. },
  7792. imgChange3(i) {
  7793. var _tmp = this.testJson.testJson[i];
  7794. this.noneBtnImg = _tmp.length >= 1;
  7795. },
  7796. imgChange1(file, fileList, type, itemTaskIndex) {
  7797. if (type == 1) {
  7798. var _tmp = this.cover;
  7799. } else if (
  7800. type == 2 ||
  7801. type == 3 ||
  7802. type == 6 ||
  7803. type == 7 ||
  7804. type == 8
  7805. ) {
  7806. var _tmp =
  7807. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7808. .chapterData;
  7809. } else if (type == 4) {
  7810. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  7811. } else {
  7812. var _tmp =
  7813. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7814. .homeworkList;
  7815. }
  7816. this.noneBtnImg = _tmp.length >= 1;
  7817. },
  7818. goTo(path) {
  7819. this.$router.push(path);
  7820. },
  7821. guid() {
  7822. var _num,
  7823. i,
  7824. _guid = "";
  7825. for (i = 0; i < 32; i++) {
  7826. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  7827. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  7828. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  7829. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  7830. _guid += "-";
  7831. }
  7832. }
  7833. return _guid;
  7834. },
  7835. retrunCourse() {
  7836. if(this.istemplate == 1){
  7837. this.goTo(
  7838. "/course?userid=" +
  7839. this.userid +
  7840. "&oid=" +
  7841. this.oid +
  7842. "&org=" +
  7843. this.org +
  7844. "&role=" +
  7845. this.role
  7846. );
  7847. return
  7848. }
  7849. this.$confirm("是否保存已编辑内容?", "提示", {
  7850. confirmButtonText: "保存",
  7851. cancelButtonText: "不保存",
  7852. distinguishCancelAndClose: true,
  7853. type: "warning",
  7854. })
  7855. .then(() => {
  7856. if (this.taskLoading.length) {
  7857. let _pan = 1
  7858. for(var k = 0; k < this.taskLoading.length; k++){
  7859. if(this.taskLoading[k]){
  7860. this.$message({
  7861. message: `请等待任务${k+1}回答完毕后再保存`,
  7862. type: "warning"
  7863. });
  7864. _pan = 2
  7865. }
  7866. }
  7867. if(_pan == 2){
  7868. return
  7869. }
  7870. }
  7871. if (this.cid == "" || this.cid == undefined) {
  7872. if (this.courseName == "") {
  7873. this.$message.error("请补充填写课程名称");
  7874. return;
  7875. } else {
  7876. this.addWork();
  7877. }
  7878. this.steps = 4;
  7879. } else {
  7880. if (this.courseName == "") {
  7881. this.$message.error("请补充填写课程名称");
  7882. return;
  7883. } else {
  7884. if (this.userid != this.courseUserid && this.role != "1") {
  7885. this.updateWork2();
  7886. } else {
  7887. this.updateWork();
  7888. }
  7889. this.steps = 4;
  7890. }
  7891. }
  7892. })
  7893. .catch((v) => {
  7894. console.log(v);
  7895. if (v == "cancel") {
  7896. this.goTo(
  7897. "/course?userid=" +
  7898. this.userid +
  7899. "&oid=" +
  7900. this.oid +
  7901. "&org=" +
  7902. this.org +
  7903. "&role=" +
  7904. this.role
  7905. );
  7906. }
  7907. });
  7908. },
  7909. lastSteps() {
  7910. if (this.steps == 4) {
  7911. this.goTo(
  7912. "/course?userid=" +
  7913. this.userid +
  7914. "&oid=" +
  7915. this.oid +
  7916. "&org=" +
  7917. this.org +
  7918. "&role=" +
  7919. this.role
  7920. );
  7921. } else {
  7922. // if (this.cidType == 0) {
  7923. // this.steps--;
  7924. // if (this.steps == 1) {
  7925. // setTimeout(() => {
  7926. // this.checkEva(this.checkId);
  7927. // setTimeout(() => {
  7928. // this.checkEva(this.checkId);
  7929. // }, 100);
  7930. // }, 100);
  7931. // }
  7932. // } else {
  7933. if (this.steps == 3) {
  7934. this.steps = 1;
  7935. setTimeout(() => {
  7936. this.checkEva(this.checkId);
  7937. setTimeout(() => {
  7938. this.checkEva(this.checkId);
  7939. }, 100);
  7940. }, 100);
  7941. }
  7942. // }
  7943. }
  7944. },
  7945. navSteps(s) {
  7946. if (this.courseName == "") {
  7947. this.$message.error("请补充填写课程名称");
  7948. return;
  7949. }
  7950. if (this.cidType == 0) {
  7951. if (this.steps == 1) {
  7952. if (this.cid == "" || this.cid == undefined) {
  7953. this.addWork();
  7954. } else {
  7955. if (this.userid != this.courseUserid && this.role != "1") {
  7956. this.updateWork2();
  7957. } else {
  7958. this.updateWork();
  7959. }
  7960. }
  7961. }
  7962. if (s == 1) {
  7963. this.steps = 1;
  7964. setTimeout(() => {
  7965. this.checkEva(this.checkId);
  7966. setTimeout(() => {
  7967. this.checkEva(this.checkId);
  7968. }, 100);
  7969. }, 100);
  7970. }
  7971. if (s == 2) {
  7972. this.steps = 2;
  7973. }
  7974. if (s == 3) {
  7975. this.cTemplate = this.templateC.content;
  7976. this.dialogVisible2 = false;
  7977. this.steps = 3;
  7978. this.isClickColor = 1;
  7979. this.unitJson[
  7980. this.unitIndex
  7981. ].chapterInfo[0].taskJson[0].toolOpen = true;
  7982. this.$forceUpdate();
  7983. setTimeout(() => {
  7984. this.checkEva(this.checkId);
  7985. setTimeout(() => {
  7986. this.checkEva(this.checkId);
  7987. }, 100);
  7988. }, 1000);
  7989. }
  7990. } else {
  7991. if (this.steps == 1) {
  7992. if (this.cid == "" || this.cid == undefined) {
  7993. this.addWork();
  7994. } else {
  7995. if (this.userid != this.courseUserid && this.role != "1") {
  7996. this.updateWork2();
  7997. } else {
  7998. this.updateWork();
  7999. }
  8000. }
  8001. }
  8002. if (s == 1) {
  8003. this.steps = 1;
  8004. setTimeout(() => {
  8005. this.checkEva(this.checkId);
  8006. setTimeout(() => {
  8007. this.checkEva(this.checkId);
  8008. }, 100);
  8009. }, 100);
  8010. }
  8011. if (s == 3) {
  8012. this.cTemplate = this.templateC.content;
  8013. this.dialogVisible2 = false;
  8014. this.steps = 3;
  8015. this.isClickColor = 1;
  8016. this.unitJson[
  8017. this.unitIndex
  8018. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8019. this.$forceUpdate();
  8020. setTimeout(() => {
  8021. this.checkEva(this.checkId);
  8022. setTimeout(() => {
  8023. this.checkEva(this.checkId);
  8024. }, 100);
  8025. }, 1000);
  8026. }
  8027. }
  8028. this.$refs.stepBox.scrollTop = 0;
  8029. },
  8030. nextSteps(clickType, ttype) {
  8031. // if (this.cidType == 1) {
  8032. if (this.steps == 1) {
  8033. if (this.courseName != "") {
  8034. if ((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1) || (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  8035. // this.$message({
  8036. // message: "请回答完毕后再次发送",
  8037. // type: "warning"
  8038. // });
  8039. if(this.ttaskDetailLoading5.length){
  8040. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8041. this.$message({
  8042. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8043. type: "warning"
  8044. });
  8045. }
  8046. if(this.ttaskDetailLoading.length){
  8047. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8048. this.$message({
  8049. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8050. type: "warning"
  8051. });
  8052. }
  8053. if(this.cpotetLoading.cpote1){
  8054. this.$message({
  8055. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8056. type: "warning"
  8057. });
  8058. }
  8059. if(this.cpotetLoading.cpote2){
  8060. this.$message({
  8061. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8062. type: "warning"
  8063. });
  8064. }
  8065. if(this.cpotetLoading.cpote3){
  8066. this.$message({
  8067. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8068. type: "warning"
  8069. });
  8070. }
  8071. if(this.cpotetLoading.cpote4){
  8072. this.$message({
  8073. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8074. type: "warning"
  8075. });
  8076. }
  8077. return;
  8078. }
  8079. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8080. if(!this.courseText && !this.teacherCourseText){
  8081. this.$message.error("请生成简要描述后再生成大纲");
  8082. return;
  8083. }
  8084. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8085. this.openAiDialog(clickType, 'aiOutline2')
  8086. }else {
  8087. this.openAiDialog(clickType, 'aiOutline')
  8088. }
  8089. return;
  8090. }
  8091. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8092. let _type = ''
  8093. if(this.cpoteType == 0){
  8094. _type = 'aiCpote1'
  8095. }else if(this.cpoteType == 1){
  8096. _type = 'aiCpote2'
  8097. }else if(this.cpoteType == 2){
  8098. _type = 'aiCpote3'
  8099. }else if(this.cpoteType == 3){
  8100. _type = 'aiCpote4'
  8101. }
  8102. this.cpoteType++
  8103. this.openAiDialog(clickType, _type)
  8104. return;
  8105. }
  8106. // if (!this.isOutline2) {
  8107. // this.openAiDialog(clickType, 'aiTeacher')
  8108. // return;
  8109. // }
  8110. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8111. this.openAiDialog(clickType, 'aiTeacher3')
  8112. return;
  8113. }
  8114. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8115. this.openAiDialog(clickType, 'aiTeacher2')
  8116. return;
  8117. }
  8118. let _pan2 = 1
  8119. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8120. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8121. _pan2 = 2
  8122. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8123. break;
  8124. }
  8125. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8126. _pan2 = 2
  8127. this.$message.error(`请完善任务${k+1}的课程教案`)
  8128. break;
  8129. }
  8130. }
  8131. if(_pan2 == 2){
  8132. return;
  8133. }
  8134. const functionA = () => {
  8135. setTimeout(() => {
  8136. this.loading = false
  8137. this.steps = 3;
  8138. }, 0)
  8139. this.isClickColor = 1;
  8140. this.unitJson[
  8141. this.unitIndex
  8142. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8143. this.$forceUpdate();
  8144. setTimeout(() => {
  8145. this.checkEva(this.checkId);
  8146. setTimeout(() => {
  8147. this.checkEva(this.checkId);
  8148. }, 100);
  8149. }, 1000);
  8150. if (this.cid == "" || this.cid == undefined) {
  8151. this.addWork();
  8152. } else {
  8153. if (this.userid != this.courseUserid && this.role != "1") {
  8154. this.updateWork2();
  8155. } else {
  8156. this.updateWork();
  8157. }
  8158. }
  8159. }
  8160. if (this.cid) {
  8161. this.loading = true
  8162. functionA()
  8163. } else {
  8164. if(ttype == 2){
  8165. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8166. }else {
  8167. this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  8168. }
  8169. }
  8170. } else {
  8171. this.$message.error("请补充填写课程名称");
  8172. return;
  8173. }
  8174. } else if (this.steps == 3) {
  8175. if (this.taskLoading.length) {
  8176. let _pan = 1
  8177. for(var k = 0; k < this.taskLoading.length; k++){
  8178. if(this.taskLoading[k]){
  8179. this.$message({
  8180. message: `请等待任务${k+1}回答完毕后再上传`,
  8181. type: "warning"
  8182. });
  8183. _pan = 2
  8184. }
  8185. }
  8186. if(_pan == 2){
  8187. return
  8188. }
  8189. }
  8190. if (this.cid == "" || this.cid == undefined) {
  8191. if (this.courseName == "") {
  8192. this.$message.error("请补充填写课程名称");
  8193. return;
  8194. } else {
  8195. this.addWork();
  8196. this.steps++;
  8197. }
  8198. } else {
  8199. if (this.courseName == "") {
  8200. this.$message.error("请补充填写课程名称");
  8201. return;
  8202. } else {
  8203. if (this.userid != this.courseUserid && this.role != "1") {
  8204. this.updateWork2();
  8205. } else {
  8206. this.updateWork();
  8207. }
  8208. this.steps++;
  8209. }
  8210. }
  8211. }
  8212. // } else {
  8213. // if (this.steps == 1) {
  8214. // if (this.courseName != "") {
  8215. // if (this.cid == "" || this.cid == undefined) {
  8216. // this.addWork();
  8217. // } else {
  8218. // if (this.userid != this.courseUserid && this.role != "1") {
  8219. // // this.updateWork2();
  8220. // } else {
  8221. // this.updateWork();
  8222. // }
  8223. // }
  8224. // this.steps++;
  8225. // } else {
  8226. // this.$message.error("请补充填写课程名称");
  8227. // return;
  8228. // }
  8229. // } else if (this.steps == 2) {
  8230. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  8231. // this.cTemplate = this.templateC.content;
  8232. // }
  8233. // this.dialogVisible2 = false;
  8234. // this.steps++;
  8235. // setTimeout(() => {
  8236. // this.checkEva(this.checkId);
  8237. // setTimeout(() => {
  8238. // this.checkEva(this.checkId);
  8239. // }, 100);
  8240. // }, 1000);
  8241. // } else if (this.steps == 3) {
  8242. // if (this.cid == "" || this.cid == undefined) {
  8243. // if (this.courseName == "") {
  8244. // this.$message.error("请补充填写课程名称");
  8245. // return;
  8246. // } else {
  8247. // this.addWork();
  8248. // this.steps++;
  8249. // }
  8250. // } else {
  8251. // if (this.courseName == "") {
  8252. // this.$message.error("请补充填写课程名称");
  8253. // return;
  8254. // } else {
  8255. // if (this.userid != this.courseUserid && this.role != "1") {
  8256. // this.updateWork2();
  8257. // } else {
  8258. // this.updateWork();
  8259. // }
  8260. // this.steps++;
  8261. // }
  8262. // }
  8263. // }
  8264. // }
  8265. this.$refs.stepBox.scrollTop = 0;
  8266. },
  8267. unitSet(i) {
  8268. if (this.unitIndex == i) {
  8269. return;
  8270. }
  8271. this.unitIndex = i;
  8272. this.isClickColor = 1;
  8273. // this.$refs.rightboxR.scrollTop = 0;
  8274. this.$refs.unitBox.scrollTop = 0;
  8275. },
  8276. panUnitJson() {
  8277. let _unitIndex = this.unitIndex;
  8278. let cPan = 1;
  8279. for (
  8280. var j = 0;
  8281. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8282. j++
  8283. ) {
  8284. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8285. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8286. j
  8287. ].proVisible2 = false;
  8288. if (
  8289. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8290. .length > 1
  8291. ) {
  8292. for (
  8293. var z = 0;
  8294. z <
  8295. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8296. .length;
  8297. z++
  8298. ) {
  8299. if (
  8300. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8301. z
  8302. ].tool.length
  8303. ) {
  8304. this.$message.error("请把工具添加完整");
  8305. cPan = 2;
  8306. break;
  8307. }
  8308. }
  8309. }
  8310. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8311. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8312. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8313. (ele) => {
  8314. return ele.value != "";
  8315. }
  8316. );
  8317. }
  8318. }
  8319. return cPan;
  8320. },
  8321. unitOpen(i) {
  8322. if (this.unitJson[i].toolOpen) {
  8323. this.unitJson[i].toolOpen = false;
  8324. } else {
  8325. this.unitJson[i].toolOpen = true;
  8326. }
  8327. this.updateWork();
  8328. this.$forceUpdate();
  8329. },
  8330. unitSet2(i) {
  8331. if (this.panUnitJson() == 2) {
  8332. return;
  8333. }
  8334. // if(this.unitJson[i].toolOpen){
  8335. // this.unitJson[i].toolOpen = false
  8336. // this.updateWork()
  8337. // this.$forceUpdate()
  8338. // return
  8339. // }else {
  8340. this.unitJson[i].toolOpen = true;
  8341. // }
  8342. this.$forceUpdate();
  8343. if (this.unitIndex == i) {
  8344. return;
  8345. }
  8346. this.unitIndex = i;
  8347. this.isClickColor = 1;
  8348. // this.$refs.rightboxR.scrollTop = 0;
  8349. this.$refs.unitBox.scrollTop = 0;
  8350. },
  8351. updateCourseState(i) {
  8352. let params = [
  8353. {
  8354. cid: this.cid,
  8355. state: i,
  8356. },
  8357. ];
  8358. this.ajax
  8359. .post(this.$store.state.api + "updateCourseMode", params)
  8360. .then((res) => {
  8361. this.courseState = i;
  8362. })
  8363. .catch((err) => {
  8364. this.$message.error("网络不佳");
  8365. console.error(err);
  8366. });
  8367. },
  8368. addtips(){
  8369. let params = [
  8370. {
  8371. cid: this.cid,
  8372. tips: JSON.stringify(this.aiJson),
  8373. tid: this.templateid
  8374. },
  8375. ];
  8376. this.ajax
  8377. .post(this.$store.state.api + "addTips", params)
  8378. .then((res) => {
  8379. })
  8380. .catch((err) => {
  8381. this.$message.error("网络不佳");
  8382. console.error(err);
  8383. });
  8384. },
  8385. openSaveTips(){
  8386. this.dialogVisibleTips = true
  8387. },
  8388. time() {
  8389. if (!this.now) {
  8390. this.now = new Date().getTime();
  8391. return true;
  8392. } else {
  8393. let time = new Date().getTime();
  8394. if (time - this.now > 3000) {
  8395. this.now = time;
  8396. return true;
  8397. } else {
  8398. return false;
  8399. }
  8400. }
  8401. },
  8402. deleteUnit(i) {
  8403. var _this = this;
  8404. if (i == 0 && _this.unitJson.length == 1) {
  8405. _this
  8406. .$confirm("确定切换成任务模式吗?", "提示", {
  8407. confirmButtonText: "确定",
  8408. cancelButtonText: "取消",
  8409. type: "warning",
  8410. })
  8411. .then(() => {
  8412. _this.unitJson[i].dyName = "";
  8413. // _this.updateCourseState(2);
  8414. })
  8415. .catch(() => {
  8416. return;
  8417. });
  8418. } else {
  8419. _this
  8420. .$confirm("确定删除此阶段吗?", "提示", {
  8421. confirmButtonText: "确定",
  8422. cancelButtonText: "取消",
  8423. type: "warning",
  8424. })
  8425. .then(() => {
  8426. _this.isDelete = 2;
  8427. // _this.unitIndex = _this.unitIndex - 1;
  8428. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  8429. // _this.$message.success("删除成功");
  8430. })
  8431. .catch(() => {
  8432. return;
  8433. });
  8434. }
  8435. },
  8436. deleteWork(chapid) {
  8437. let params = [
  8438. {
  8439. cid: this.cid,
  8440. chapters: JSON.stringify(this.unitJson),
  8441. uid: this.userid,
  8442. chapid: chapid,
  8443. },
  8444. ];
  8445. this.ajax
  8446. .post(this.$store.state.api + "deleteWork", params)
  8447. .then((res) => {
  8448. this.$message({
  8449. message: "删除成功",
  8450. type: "success",
  8451. });
  8452. let task = JSON.parse(
  8453. JSON.stringify(
  8454. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  8455. )
  8456. );
  8457. this.unitJson.splice(this.unitIndex, 1);
  8458. if (this.unitIndex == 0) {
  8459. this.unitIndex = 0;
  8460. } else {
  8461. this.unitIndex = this.unitIndex - 1;
  8462. }
  8463. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8464. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8465. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  8466. ...task,
  8467. ];
  8468. }
  8469. })
  8470. .catch((err) => {
  8471. this.$message.error("网络不佳");
  8472. console.error(err);
  8473. });
  8474. },
  8475. deleteTool(itemTaskIndex, i) {
  8476. var _this = this;
  8477. if (_this.time()) {
  8478. _this
  8479. .$confirm("确定删除此工具吗?", "提示", {
  8480. confirmButtonText: "确定",
  8481. cancelButtonText: "取消",
  8482. type: "warning",
  8483. })
  8484. .then(() => {
  8485. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8486. itemTaskIndex
  8487. ].toolChoose.splice(i, 1);
  8488. _this.$message.success("删除成功");
  8489. })
  8490. .catch(() => {
  8491. return;
  8492. });
  8493. }
  8494. },
  8495. deleteSentence(i) {
  8496. var _this = this;
  8497. _this
  8498. .$confirm("确定删除此题目吗?", "提示", {
  8499. confirmButtonText: "确定",
  8500. cancelButtonText: "取消",
  8501. type: "warning",
  8502. })
  8503. .then(() => {
  8504. _this.sentenceList.splice(i, 1);
  8505. _this.$message.success("删除成功");
  8506. })
  8507. .catch(() => {
  8508. return;
  8509. });
  8510. },
  8511. deleteS(s, i, j) {
  8512. this.sentenceList[i].addSentence.splice(j, 1);
  8513. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  8514. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  8515. this.sentenceList[i].rightAnswer.splice(a, 1);
  8516. }
  8517. },
  8518. openT() {
  8519. top.postMessage({ tools: "25" }, "*");
  8520. },
  8521. deleteTask(i) {
  8522. var _this = this;
  8523. if (_this.time()) {
  8524. _this
  8525. .$confirm(
  8526. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  8527. 1 ==
  8528. i
  8529. ? "确定删除此任务吗?"
  8530. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  8531. "提示",
  8532. {
  8533. confirmButtonText: "确定",
  8534. cancelButtonText: "取消",
  8535. type: "warning",
  8536. }
  8537. )
  8538. .then(() => {
  8539. if (i == 0 && _this.courseState == 4) {
  8540. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8541. i + 1
  8542. ].chapterData = JSON.parse(
  8543. JSON.stringify(
  8544. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8545. .chapterData
  8546. )
  8547. );
  8548. }
  8549. _this.$forceUpdate();
  8550. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8551. i,
  8552. 1
  8553. );
  8554. _this.$message.success("删除成功");
  8555. })
  8556. .catch(() => {
  8557. return;
  8558. });
  8559. }
  8560. },
  8561. deleteTask2(i) {
  8562. var _this = this;
  8563. if (_this.time()) {
  8564. _this
  8565. .$confirm(
  8566. "确定删除此任务吗?",
  8567. "提示",
  8568. {
  8569. confirmButtonText: "确定",
  8570. cancelButtonText: "取消",
  8571. type: "warning",
  8572. }
  8573. )
  8574. .then(() => {
  8575. if (i == 0 && _this.courseState == 4) {
  8576. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8577. i + 1
  8578. ].chapterData = JSON.parse(
  8579. JSON.stringify(
  8580. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8581. .chapterData
  8582. )
  8583. );
  8584. }
  8585. _this.$forceUpdate();
  8586. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8587. i,
  8588. 1
  8589. );
  8590. _this.$message.success("删除成功");
  8591. })
  8592. .catch(() => {
  8593. return;
  8594. });
  8595. }
  8596. },
  8597. handlePictureCardPreview(file) {
  8598. this.dialogImageUrl = file.url;
  8599. },
  8600. clean(i, c) {
  8601. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  8602. },
  8603. handle_remove1(file, fileList, type) {
  8604. var _tmp = this.cover;
  8605. // for (var i = 0, len = _tmp.length; i < len; i++) {
  8606. // if (_tmp[i].uid == file.uid) {
  8607. // _tmp.splice(i, 1);
  8608. // break;
  8609. // }
  8610. // this.cover = _tmp;
  8611. // }
  8612. this.cover = [];
  8613. this.noneBtnImg = this.cover.length >= 1;
  8614. this.isSysPic = false;
  8615. this.isSysPic2 = false;
  8616. this.$forceUpdate();
  8617. },
  8618. addImg(e) {
  8619. var el = e.currentTarget;
  8620. el.getElementsByTagName("input")[0].click();
  8621. e.target.value = "";
  8622. },
  8623. addChaptersTools(i) {
  8624. this.chapTools = [
  8625. {
  8626. tools: [],
  8627. toolDetail: "",
  8628. },
  8629. ];
  8630. this.chapCount = i;
  8631. this.dialogVisible4 = true;
  8632. },
  8633. isNoFinsh() {
  8634. this.$message.warning("功能正在开发中");
  8635. },
  8636. addAttText(i) {
  8637. this.AttText = {
  8638. title: "",
  8639. text: "",
  8640. };
  8641. this.taskCount = i;
  8642. this.AttTextType = 0;
  8643. this.$forceUpdate();
  8644. this.dialogVisible6 = true;
  8645. setTimeout(() => {
  8646. this.$refs["fuInput"].focus();
  8647. }, 100);
  8648. },
  8649. openLine(i) {
  8650. this.line = "";
  8651. this.lineCount = i;
  8652. this.lineType = 0;
  8653. this.$forceUpdate();
  8654. this.dialogVisible7 = true;
  8655. },
  8656. pasteLine(i) {
  8657. navigator.clipboard
  8658. .readText()
  8659. .then((v) => {
  8660. console.log("获取剪贴板成功:", v);
  8661. const html = v;
  8662. const regex = /src="(.*?)"/g;
  8663. const match = regex.exec(html);
  8664. if (match && match[1]) {
  8665. console.log(match[1]);
  8666. this.$message.success("粘贴成功");
  8667. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8668. i
  8669. ].chapterData.unshift({
  8670. name: "链接",
  8671. title: "嵌入代码",
  8672. url: match[1],
  8673. type: 8,
  8674. });
  8675. } else {
  8676. // console.log("未找到包含 src 属性的 iframe");
  8677. this.$message.error(
  8678. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  8679. );
  8680. }
  8681. })
  8682. .catch((v) => {
  8683. console.log("获取剪贴板失败: ", v);
  8684. });
  8685. },
  8686. openSource(i) {
  8687. this.lineCount = i;
  8688. this.sourceData = {};
  8689. this.dialogVisibleSource = true;
  8690. this.updateSourcePan = false;
  8691. },
  8692. openAiCreate(i){
  8693. this.lineCount = i;
  8694. this.dialogVisibleAiCreate = true;
  8695. },
  8696. createAiPpt(json){
  8697. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8698. this.dialogVisibleAiCreate = false;
  8699. },
  8700. openAiCreateVideo(i){
  8701. this.lineCount = i;
  8702. this.dialogVisibleAiCreateVideo = true;
  8703. },
  8704. createAiVideo(json){
  8705. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8706. // this.dialogVisibleAiCreateVideo = false;
  8707. },
  8708. async createTeacherAn(index){
  8709. this.lineCount = index;
  8710. this.loading = true
  8711. let md = new MarkdownIt();
  8712. if(this.courseState == 4){
  8713. if(index == 0 || index){
  8714. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8715. let name = _task.task+'-教案'
  8716. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8717. await this.generate(name, _html, 0)
  8718. }else {
  8719. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8720. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8721. let name = _task.task+'-教案'
  8722. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8723. await this.generate(name, _html, 0)
  8724. }
  8725. }
  8726. }else if(this.courseState == 5){
  8727. if(index == 0 || index){
  8728. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8729. let name = _task.task+'-教案'
  8730. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8731. await this.generate(name, _html, index)
  8732. }else {
  8733. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8734. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8735. let name = _task.task+'-教案'
  8736. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8737. await this.generate(name, _html, i)
  8738. }
  8739. }
  8740. }
  8741. },
  8742. async generate(a, html, index) {
  8743. // <html lang="en">
  8744. // 将html文件中需要用到的数据挂载到store上
  8745. const content = `<!DOCTYPE html>
  8746. <html xmlns:v='urn:schemas-microsoft-com:vml'xmlns:o='urn:schemas-microsoft-com:office:office'xmlns:w='urn:schemas-microsoft-com:office:word'xmlns:m='http://schemas.microsoft.com/office/2004/12/omml'xmlns='http://www.w3.org/TR/REC-html40'>
  8747. <head>
  8748. <!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val='Cambria Math'/><m:brkBin m:val='before'/><m:brkBinSub m:val='--'/><m:smallFrac m:val='off'/><m:dispDef/><m:lMargin m:val='0'/> <m:rMargin m:val='0'/><m:defJc m:val='centerGroup'/><m:wrapIndent m:val='1440'/><m:intLim m:val='subSup'/><m:naryLim m:val='undOvr'/></m:mathPr></w:WordDocument></xml><![endif]-->
  8749. <meta charset="UTF-8">
  8750. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8751. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8752. <title>${a}</title>
  8753. <style>
  8754. table {
  8755. border-collapse: collapse; /* 折叠边框 */
  8756. width: 100%;
  8757. }
  8758. th, td {
  8759. border: 1px solid black; /* 线条样式 */
  8760. padding: 8px;
  8761. text-align: left;
  8762. }
  8763. </style>
  8764. </head>
  8765. <body>
  8766. ${html}
  8767. </body>
  8768. </html>`;
  8769. // debugger
  8770. let dname = a + ".doc";
  8771. // 创建文件流
  8772. // 创建bolb实例时,内容一定要放在[]中
  8773. const blob = new Blob([content], {
  8774. type: "text/plain;charset='utf-8'",
  8775. });
  8776. const file = new File([blob], dname, { type: 'application/msword' });
  8777. await this.beforeUploadHtml(file, index)
  8778. },
  8779. beforeUploadHtml(event, index) {
  8780. var file = event;
  8781. var credentials = {
  8782. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8783. secretAccessKey: "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",
  8784. }; //秘钥形式的登录上传
  8785. window.AWS.config.update(credentials);
  8786. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8787. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8788. var _this = this;
  8789. if (file) {
  8790. var params = {
  8791. Key:
  8792. file.name.split(".")[0] +
  8793. new Date().getTime() +
  8794. "." +
  8795. file.name.split(".")[file.name.split(".").length - 1],
  8796. ContentType: file.type,
  8797. Body: file,
  8798. "Access-Control-Allow-Credentials": "*",
  8799. ACL: "public-read",
  8800. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8801. var options = {
  8802. partSize: 2048 * 1024 * 1024,
  8803. queueSize: 2,
  8804. leavePartsOnError: true,
  8805. };
  8806. bucket
  8807. .upload(params, options)
  8808. .on("httpUploadProgress", function (evt) {
  8809. //这里可以写进度条
  8810. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8811. })
  8812. .send(function (err, data) {
  8813. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  8814. _this.loading = false
  8815. }
  8816. if(_this.courseState == 5){
  8817. _this.loading = false
  8818. }
  8819. if (err) {
  8820. _this.$message.error("上传失败");
  8821. } else {
  8822. let _index = 0
  8823. if(_this.lineCount == 0 || _this.lineCount){
  8824. _index = _this.lineCount
  8825. }else {
  8826. _index = index
  8827. }
  8828. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  8829.                   name: file.name,
  8830.                   url: data.Location,
  8831.                   type: 3,
  8832.                 })
  8833. console.log(data.Location);
  8834. }
  8835. });
  8836. }
  8837. },
  8838. async generate2(a, html, index, callback) {
  8839. // 将html文件中需要用到的数据挂载到store上
  8840. const content = `<!DOCTYPE html>
  8841. <html xmlns:v='urn:schemas-microsoft-com:vml'xmlns:o='urn:schemas-microsoft-com:office:office'xmlns:w='urn:schemas-microsoft-com:office:word'xmlns:m='http://schemas.microsoft.com/office/2004/12/omml'xmlns='http://www.w3.org/TR/REC-html40'>
  8842. <head>
  8843. <!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val='Cambria Math'/><m:brkBin m:val='before'/><m:brkBinSub m:val='--'/><m:smallFrac m:val='off'/><m:dispDef/><m:lMargin m:val='0'/> <m:rMargin m:val='0'/><m:defJc m:val='centerGroup'/><m:wrapIndent m:val='1440'/><m:intLim m:val='subSup'/><m:naryLim m:val='undOvr'/></m:mathPr></w:WordDocument></xml><![endif]-->
  8844. <meta charset="UTF-8">
  8845. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8846. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8847. <title>${a}</title>
  8848. <style>
  8849. table {
  8850. border-collapse: collapse; /* 折叠边框 */
  8851. width: 100%;
  8852. }
  8853. th, td {
  8854. border: 1px solid black; /* 线条样式 */
  8855. padding: 8px;
  8856. text-align: left;
  8857. }
  8858. </style>
  8859. </head>
  8860. <body>
  8861. ${html}
  8862. </body>
  8863. </html>`;
  8864. // debugger
  8865. let dname = a + ".doc";
  8866. // 创建文件流
  8867. // 创建bolb实例时,内容一定要放在[]中
  8868. const blob = new Blob([content], {
  8869. type: "text/plain;charset='utf-8'",
  8870. });
  8871. const file = new File([blob], dname, { type: 'application/msword' });
  8872. await this.beforeUploadHtml2(file, index, callback)
  8873. },
  8874. beforeUploadHtml2(event, index, callback) {
  8875. var file = event;
  8876. var credentials = {
  8877. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8878. secretAccessKey: "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",
  8879. }; //秘钥形式的登录上传
  8880. window.AWS.config.update(credentials);
  8881. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8882. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8883. var _this = this;
  8884. if (file) {
  8885. var params = {
  8886. Key:
  8887. file.name.split(".")[0] +
  8888. new Date().getTime() +
  8889. "." +
  8890. file.name.split(".")[file.name.split(".").length - 1],
  8891. ContentType: file.type,
  8892. Body: file,
  8893. "Access-Control-Allow-Credentials": "*",
  8894. ACL: "public-read",
  8895. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8896. var options = {
  8897. partSize: 2048 * 1024 * 1024,
  8898. queueSize: 2,
  8899. leavePartsOnError: true,
  8900. };
  8901. bucket
  8902. .upload(params, options)
  8903. .on("httpUploadProgress", function (evt) {
  8904. //这里可以写进度条
  8905. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  8906. })
  8907. .send(async function (err, data) {
  8908. if(_this.courseState == 5){
  8909. _this.loading = false
  8910. }
  8911. if (err) {
  8912. callback ? callback() : ''
  8913. _this.$message.error("上传失败");
  8914. } else {
  8915. let fileid = await _this.createFileid(data.Location)
  8916. // _this.cankaoInfoData.push({
  8917. //                   name: file.name,
  8918. //                   url: data.Location,
  8919. //                   type: 3,
  8920. // fileid: fileid,
  8921. //   })
  8922. _this.infoData2.push({
  8923.                   name: file.name,
  8924.                   url: data.Location,
  8925.                   type: 3,
  8926. fileid: fileid == 1 ? '' : fileid,
  8927.   })
  8928. console.log(data.Location);
  8929. callback ? callback() : ''
  8930. }
  8931. });
  8932. }
  8933. },
  8934. addSource() {
  8935. if (!Object.keys(this.sourceData).length) {
  8936. this.$message.error("请选择要上传的资源");
  8937. return;
  8938. }
  8939. let keys = Object.keys(this.sourceData);
  8940. for (var i = 0; i < keys.length; i++) {
  8941. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8942. this.lineCount
  8943. ].chapterData.unshift({
  8944. name: "链接",
  8945. title: this.sourceData[keys[i]].name,
  8946. url: this.sourceData[keys[i]].url,
  8947. type: 14,
  8948. id: keys[i],
  8949. });
  8950. }
  8951. this.$forceUpdate();
  8952. this.dialogVisibleSource = false;
  8953. },
  8954. updateSource() {
  8955. if (!Object.keys(this.sourceData).length) {
  8956. this.$message.error("请选择要上传的资源");
  8957. return;
  8958. }
  8959. let keys = Object.keys(this.sourceData);
  8960. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8961. this.taskCount
  8962. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  8963. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8964. this.taskCount
  8965. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  8966. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8967. this.taskCount
  8968. ].chapterData[this.lineCount].id = keys[0];
  8969. this.updateSourcePan = false;
  8970. this.$forceUpdate();
  8971. this.dialogVisibleSource = false;
  8972. },
  8973. deleteM(i, j) {
  8974. this.testJson.testJson[i].timuList.splice(j, 1);
  8975. },
  8976. beforeUploadTiMu(event, i) {
  8977. const loading = this.openLoading();
  8978. var file = event.target.files[0];
  8979. var credentials = {
  8980. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8981. secretAccessKey: "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",
  8982. }; //秘钥形式的登录上传
  8983. window.AWS.config.update(credentials);
  8984. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8985. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8986. var _this = this;
  8987. if (file) {
  8988. var params = {
  8989. Key:
  8990. file.name.split(".")[0] +
  8991. new Date().getTime() +
  8992. "." +
  8993. file.name.split(".")[file.name.split(".").length - 1],
  8994. ContentType: file.type,
  8995. Body: file,
  8996. "Access-Control-Allow-Credentials": "*",
  8997. ACL: "public-read",
  8998. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8999. var options = {
  9000. partSize: 2048 * 1024 * 1024,
  9001. queueSize: 2,
  9002. leavePartsOnError: true,
  9003. };
  9004. bucket
  9005. .upload(params, options)
  9006. .on("httpUploadProgress", function (evt) {
  9007. //这里可以写进度条
  9008. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9009. })
  9010. .send(function (err, data) {
  9011. loading.close();
  9012. if (err) {
  9013. _this.$message.error("上传失败");
  9014. } else {
  9015. if (_this.testJson.testJson[i].timuList) {
  9016. _this.testJson.testJson[i].timuList.push({
  9017. src: data.Location,
  9018. });
  9019. } else {
  9020. _this.testJson.testJson[i].timuList = [];
  9021. _this.testJson.testJson[i].timuList.push({
  9022. src: data.Location,
  9023. });
  9024. }
  9025. _this.imgChange3(i);
  9026. _this.$forceUpdate();
  9027. }
  9028. });
  9029. }
  9030. },
  9031. beforeUploadTi(event, i, j) {
  9032. const loading = this.openLoading();
  9033. var file = event.target.files[0];
  9034. var credentials = {
  9035. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9036. secretAccessKey: "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",
  9037. }; //秘钥形式的登录上传
  9038. window.AWS.config.update(credentials);
  9039. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9040. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9041. var _this = this;
  9042. if (file) {
  9043. var params = {
  9044. Key:
  9045. file.name.split(".")[0] +
  9046. new Date().getTime() +
  9047. "." +
  9048. file.name.split(".")[file.name.split(".").length - 1],
  9049. ContentType: file.type,
  9050. Body: file,
  9051. "Access-Control-Allow-Credentials": "*",
  9052. ACL: "public-read",
  9053. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9054. var options = {
  9055. partSize: 2048 * 1024 * 1024,
  9056. queueSize: 2,
  9057. leavePartsOnError: true,
  9058. };
  9059. bucket
  9060. .upload(params, options)
  9061. .on("httpUploadProgress", function (evt) {
  9062. //这里可以写进度条
  9063. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9064. })
  9065. .send(function (err, data) {
  9066. loading.close();
  9067. if (err) {
  9068. _this.$message.error("上传失败");
  9069. } else {
  9070. _this.testJson.testJson[i].checkList[j] = {};
  9071. _this.testJson.testJson[i].checkList[j].src = data.Location;
  9072. _this.testJson.testJson[i].checkList[j].imgType = 1;
  9073. _this.imgChange2(i, j);
  9074. _this.$forceUpdate();
  9075. }
  9076. });
  9077. }
  9078. },
  9079. beforeUpload1(event, type) {
  9080. // const loading = this.openLoading();
  9081. var file = event.target.files[0];
  9082. var credentials = {
  9083. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9084. secretAccessKey: "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",
  9085. }; //秘钥形式的登录上传
  9086. window.AWS.config.update(credentials);
  9087. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9088. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9089. var _this = this;
  9090. if (file) {
  9091. var params = {
  9092. Key:
  9093. file.name.split(".")[0] +
  9094. new Date().getTime() +
  9095. "." +
  9096. file.name.split(".")[file.name.split(".").length - 1],
  9097. ContentType: file.type,
  9098. Body: file,
  9099. "Access-Control-Allow-Credentials": "*",
  9100. ACL: "public-read",
  9101. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9102. var options = {
  9103. partSize: 2048 * 1024 * 1024,
  9104. queueSize: 2,
  9105. leavePartsOnError: true,
  9106. };
  9107. bucket
  9108. .upload(params, options)
  9109. .on("httpUploadProgress", function (evt) {
  9110. //这里可以写进度条
  9111. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9112. })
  9113. .send(function (err, data) {
  9114. // loading.close();
  9115. if (err) {
  9116. // var a = _this.$refs.upload1.uploadFiles;
  9117. // a.splice(a.length - 1, a.length);
  9118. _this.$message.error("上传失败");
  9119. } else {
  9120. // _this.cover.push({
  9121. // name: file.name,
  9122. // url: data.Location,
  9123. // uid: file.uid,
  9124. // });
  9125. _this.cover = [
  9126. {
  9127. name: file.name,
  9128. url: data.Location,
  9129. uid: file.uid,
  9130. },
  9131. ];
  9132. _this.imgChange1(null, null, 1, null);
  9133. _this.choosePicVisible = false;
  9134. console.log(data.Location);
  9135. }
  9136. });
  9137. }
  9138. },
  9139. beforeUploadSelect(event, type) {
  9140. // const loading = this.openLoading();
  9141. var file = event.target.files[0];
  9142. var credentials = {
  9143. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9144. secretAccessKey: "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",
  9145. }; //秘钥形式的登录上传
  9146. window.AWS.config.update(credentials);
  9147. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9148. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9149. var _this = this;
  9150. if (file) {
  9151. var params = {
  9152. Key:
  9153. file.name.split(".")[0] +
  9154. new Date().getTime() +
  9155. "." +
  9156. file.name.split(".")[file.name.split(".").length - 1],
  9157. ContentType: file.type,
  9158. Body: file,
  9159. "Access-Control-Allow-Credentials": "*",
  9160. ACL: "public-read",
  9161. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9162. var options = {
  9163. partSize: 2048 * 1024 * 1024,
  9164. queueSize: 2,
  9165. leavePartsOnError: true,
  9166. };
  9167. bucket
  9168. .upload(params, options)
  9169. .on("httpUploadProgress", function (evt) {
  9170. //这里可以写进度条
  9171. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9172. })
  9173. .send(function (err, data) {
  9174. // loading.close();
  9175. if (err) {
  9176. _this.$message.error("上传失败");
  9177. } else {
  9178. _this.selectJson.url = data.Location;
  9179. console.log(data.Location);
  9180. }
  9181. });
  9182. }
  9183. },
  9184. chooseSysPic(p) {
  9185. this.cover = [];
  9186. setTimeout(() => {
  9187. this.cover[0] = {
  9188. name: "系统图片.png",
  9189. url: p,
  9190. };
  9191. this.imgChange1(null, null, 1, null);
  9192. this.$forceUpdate();
  9193. }, 0);
  9194. this.isSysPic = true;
  9195. this.isSysPic2 = false;
  9196. this.sysPicVisible = false;
  9197. this.$forceUpdate();
  9198. },
  9199. chooseSysPic2(p) {
  9200. this.cover = [];
  9201. setTimeout(() => {
  9202. this.cover[0] = {
  9203. name: "网络图片.png",
  9204. url: p,
  9205. };
  9206. this.imgChange1(null, null, 1, null);
  9207. this.$forceUpdate();
  9208. }, 0);
  9209. this.isSysPic2 = true;
  9210. this.isSysPic = false;
  9211. this.sysPicVisible2 = false;
  9212. this.$forceUpdate();
  9213. },
  9214. beforeUpload(data) {
  9215. this.$refs.upload1.uploadFiles;
  9216. this.uploadLoading1 = true;
  9217. var file = data.file;
  9218. var credentials = {
  9219. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9220. secretAccessKey: "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",
  9221. }; //秘钥形式的登录上传
  9222. window.AWS.config.update(credentials);
  9223. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9224. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9225. var _this = this;
  9226. if (file) {
  9227. var params = {
  9228. Key:
  9229. file.name.split(".")[0] +
  9230. new Date().getTime() +
  9231. "." +
  9232. file.name.split(".")[file.name.split(".").length - 1],
  9233. ContentType: file.type,
  9234. Body: file,
  9235. "Access-Control-Allow-Credentials": "*",
  9236. ACL: "public-read",
  9237. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9238. var options = {
  9239. partSize: 2048 * 1024 * 1024,
  9240. queueSize: 2,
  9241. leavePartsOnError: true,
  9242. };
  9243. bucket
  9244. .upload(params, options)
  9245. .on("httpUploadProgress", function (evt) {
  9246. //这里可以写进度条
  9247. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9248. })
  9249. .send(function (err, data) {
  9250. _this.uploadLoading1 = false;
  9251. if (err) {
  9252. // var a = _this.$refs.upload1.uploadFiles;
  9253. // a.splice(a.length - 1, a.length);
  9254. _this.$message.error("上传失败");
  9255. } else {
  9256. //上传成功处理
  9257. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  9258. name: file.name,
  9259. url: data.Location,
  9260. uid: file.uid,
  9261. });
  9262. _this.imgChange();
  9263. console.log(data.Location);
  9264. }
  9265. });
  9266. }
  9267. },
  9268. onExceed() {
  9269. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  9270. },
  9271. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  9272. let file = "";
  9273. let cfindex2 = 0;
  9274. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9275. // var file = event.target.files[0];
  9276. file = event.target.files[cfindex];
  9277. let fileName = file.name
  9278. let fileUid = file.uid
  9279. // const loading = this.openLoading();
  9280. // var file = event.target.files[0];
  9281. var credentials = {
  9282. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9283. secretAccessKey: "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",
  9284. }; //秘钥形式的登录上传
  9285. window.AWS.config.update(credentials);
  9286. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9287. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9288. var _this = this;
  9289. if (type == 3) {
  9290. var b = [
  9291. "DOC",
  9292. "DOCX",
  9293. "DOCM",
  9294. "DOTM",
  9295. "DOTX",
  9296. "PPTX",
  9297. "PPSX",
  9298. "PPT",
  9299. "PPS",
  9300. "PPTM",
  9301. "POTM",
  9302. "PPAM",
  9303. "POTX",
  9304. "PPSM",
  9305. ];
  9306. if (
  9307. b.indexOf(
  9308. file.name
  9309. .split(".")
  9310. [file.name.split(".").length - 1].toLocaleUpperCase()
  9311. ) != -1
  9312. ) {
  9313. if (file.size / 1024 / 1024 > 80) {
  9314. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9315. this.inputShow = true;
  9316. // var a = _this.$refs.upload1.uploadFiles;
  9317. // a.splice(a.length - 1, a.length);
  9318. // loading.close();
  9319. return;
  9320. }
  9321. } else if (
  9322. file.name
  9323. .split(".")
  9324. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9325. ) {
  9326. if (file.size / 1024 / 1024 > 80) {
  9327. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9328. this.inputShow = true;
  9329. // var a = _this.$refs.upload1.uploadFiles;
  9330. // a.splice(a.length - 1, a.length);
  9331. // loading.close();
  9332. return;
  9333. }
  9334. }
  9335. }
  9336. this.inputShow = false;
  9337. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9338. // itemTaskIndex
  9339. // ].progress = 0;
  9340. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9341. itemTaskIndex
  9342. ].proVisible = true;
  9343. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9344. itemTaskIndex
  9345. ].isFinishSize = 0;
  9346. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9347. itemTaskIndex
  9348. ].isAllSize = event.target.files.length;
  9349. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9350. // itemTaskIndex
  9351. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9352. _this.$forceUpdate();
  9353. if (file) {
  9354. var params = {
  9355. Key:
  9356. file.name.split(".")[0] +
  9357. new Date().getTime() +
  9358. "." +
  9359. file.name.split(".")[file.name.split(".").length - 1],
  9360. ContentType: file.type,
  9361. Body: file,
  9362. "Access-Control-Allow-Credentials": "*",
  9363. ACL: "public-read",
  9364. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9365. var options = {
  9366. partSize: 2048 * 1024 * 1024,
  9367. queueSize: 2,
  9368. leavePartsOnError: true,
  9369. };
  9370. bucket
  9371. .upload(params, options)
  9372. .on("httpUploadProgress", function (evt) {
  9373. //这里可以写进度条
  9374. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9375. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9376. // itemTaskIndex
  9377. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  9378. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9379. // itemTaskIndex
  9380. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9381. // _this.$forceUpdate();
  9382. })
  9383. .send(function (err, data) {
  9384. cfindex2++
  9385. // loading.close();
  9386. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9387. // itemTaskIndex
  9388. // ].progress = 100;
  9389. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9390. itemTaskIndex
  9391. ].isFinishSize = cfindex2
  9392. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9393. // itemTaskIndex
  9394. // ].isAllSize;
  9395. _this.$forceUpdate();
  9396. setTimeout(() => {
  9397. if (
  9398. cfindex2 == event.target.files.length ||
  9399. cfindex2 > event.target.files.length
  9400. ) {
  9401. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9402. itemTaskIndex
  9403. ].proVisible = false;
  9404. }
  9405. _this.$forceUpdate();
  9406. }, 1000);
  9407. _this.inputShow = true;
  9408. if (err) {
  9409. // var a = _this.$refs.upload1.uploadFiles;
  9410. // a.splice(a.length - 1, a.length);
  9411. _this.$message.error("上传失败");
  9412. } else {
  9413. if (type == 13) {
  9414. let _type = 2;
  9415. var imgA = [
  9416. "png",
  9417. "jpg",
  9418. "jpeg",
  9419. "bmp",
  9420. "gif",
  9421. "webp",
  9422. "psd",
  9423. "svg",
  9424. "tiff",
  9425. ];
  9426. var fileA = [
  9427. "PDF",
  9428. "DOC",
  9429. "DOCX",
  9430. "DOCM",
  9431. "DOTM",
  9432. "DOTX",
  9433. "PPTX",
  9434. "PPSX",
  9435. "PPT",
  9436. "PPS",
  9437. "PPTM",
  9438. "POTM",
  9439. "PPAM",
  9440. "POTX",
  9441. "PPSM",
  9442. "XLSX",
  9443. "XLS",
  9444. ];
  9445. var videoA = [
  9446. "AVI",
  9447. "NAVI",
  9448. "MPEG",
  9449. "ASF",
  9450. "MOV",
  9451. "WMV",
  9452. "3GP",
  9453. "RM",
  9454. "RMVB",
  9455. "FLV",
  9456. "F4V",
  9457. "H.264",
  9458. "H.265",
  9459. "REAL VIDEO",
  9460. "MKV",
  9461. "WebM",
  9462. "HDDVD",
  9463. "MP4",
  9464. "MPG",
  9465. "M4V",
  9466. "MGV",
  9467. "OGV",
  9468. "QTM",
  9469. "STR",
  9470. "AMC",
  9471. "DVX",
  9472. "EVO",
  9473. "DAT",
  9474. "OGG",
  9475. "OGM",
  9476. ];
  9477. if (
  9478. fileA.indexOf(
  9479. data.Location.split(".")[
  9480. data.Location.split(".").length - 1
  9481. ].toLocaleUpperCase()
  9482. ) != -1
  9483. ) {
  9484. _type = 3;
  9485. } else if (
  9486. videoA.indexOf(
  9487. data.Location.split(".")[
  9488. data.Location.split(".").length - 1
  9489. ].toLocaleUpperCase()
  9490. ) != -1
  9491. ) {
  9492. _type = 2;
  9493. } else if (
  9494. imgA.indexOf(
  9495. data.Location.split(".")[
  9496. data.Location.split(".").length - 1
  9497. ].toLocaleLowerCase()
  9498. ) != -1
  9499. ) {
  9500. _type = 13;
  9501. } else {
  9502. _type = 12;
  9503. }
  9504. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9505. itemTaskIndex
  9506. ].chapterData.unshift({
  9507. name: fileName,
  9508. url: data.Location,
  9509. uid: fileUid,
  9510. type: _type,
  9511. });
  9512. _this.imgChange1(null, null, _type, itemTaskIndex);
  9513. } else if (type == 2 || type == 3 || type == 12) {
  9514. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9515. itemTaskIndex
  9516. ].chapterData.unshift({
  9517. name: fileName,
  9518. url: data.Location,
  9519. uid: fileUid,
  9520. type: type,
  9521. });
  9522. _this.imgChange1(null, null, type, itemTaskIndex);
  9523. } else if (type == 4) {
  9524. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9525. itemTaskIndex
  9526. ].fileList1.push({
  9527. name: fileName,
  9528. url: data.Location,
  9529. uid: fileUid,
  9530. });
  9531. _this.imgChange1(null, null, type, itemTaskIndex);
  9532. } else if (type == 5) {
  9533. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9534. itemTaskIndex
  9535. ].homeworkList.push({
  9536. name: fileName,
  9537. url: data.Location,
  9538. uid: fileUid,
  9539. });
  9540. _this.imgChange1(null, null, type, itemTaskIndex);
  9541. }
  9542. console.log(data.Location);
  9543. }
  9544. });
  9545. }
  9546. }
  9547. },
  9548. beforeUploadInfo2(event, type, tindex) {
  9549. // const loading = this.openLoading();
  9550. let file = "";
  9551. let cfindex2 = 0;
  9552. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9553. // var file = event.target.files[0];
  9554. file = event.target.files[cfindex];
  9555. let fileName = file.name
  9556. let fileUid = file.uid
  9557. var credentials = {
  9558. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9559. secretAccessKey: "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",
  9560. }; //秘钥形式的登录上传
  9561. window.AWS.config.update(credentials);
  9562. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9563. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9564. var _this = this;
  9565. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  9566. if (
  9567. ['DOC'].indexOf(
  9568. file.name
  9569. .split(".")
  9570. [file.name.split(".").length - 1].toLocaleUpperCase()
  9571. ) !== -1
  9572. ) {
  9573. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  9574. this.inputShow = true;
  9575. return;
  9576. }
  9577. if (
  9578. xianObj.indexOf(
  9579. file.name
  9580. .split(".")
  9581. [file.name.split(".").length - 1].toLocaleUpperCase()
  9582. ) == -1
  9583. ) {
  9584. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  9585. this.inputShow = true;
  9586. // var a = _this.$refs.upload1.uploadFiles;
  9587. // a.splice(a.length - 1, a.length);
  9588. // loading.close();
  9589. return;
  9590. }
  9591. if (type == 3) {
  9592. var b = [
  9593. "DOC",
  9594. "DOCX",
  9595. "DOCM",
  9596. "DOTM",
  9597. "DOTX",
  9598. "PPTX",
  9599. "PPSX",
  9600. "PPT",
  9601. "PPS",
  9602. "PPTM",
  9603. "POTM",
  9604. "PPAM",
  9605. "POTX",
  9606. "PPSM",
  9607. ];
  9608. if (
  9609. b.indexOf(
  9610. file.name
  9611. .split(".")
  9612. [file.name.split(".").length - 1].toLocaleUpperCase()
  9613. ) != -1
  9614. ) {
  9615. if (file.size / 1024 / 1024 > 80) {
  9616. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9617. this.inputShow = true;
  9618. // var a = _this.$refs.upload1.uploadFiles;
  9619. // a.splice(a.length - 1, a.length);
  9620. // loading.close();
  9621. return;
  9622. }
  9623. } else if (
  9624. file.name
  9625. .split(".")
  9626. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9627. ) {
  9628. if (file.size / 1024 / 1024 > 80) {
  9629. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9630. this.inputShow = true;
  9631. // var a = _this.$refs.upload1.uploadFiles;
  9632. // a.splice(a.length - 1, a.length);
  9633. // loading.close();
  9634. return;
  9635. }
  9636. }
  9637. }
  9638. this.inputShow = false;
  9639. if(type == 14){
  9640. // _this.teacherinfoprogress = 0;
  9641. _this.teacherinfoproVisible = true;
  9642. _this.teacherinfoisFinishSize = 0;
  9643. _this.teacherinfoisAllSize = event.target.files.length;
  9644. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9645. }else if(type == 16){
  9646. _this.mubiaoinfoprogress = 0;
  9647. _this.mubiaoinfoproVisible = true;
  9648. _this.mubiaoinfoisFinishSize = 0;
  9649. _this.mubiaoinfoisAllSize = event.target.files.length;
  9650. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9651. }else if(type == 17){
  9652. _this.xuanzeinfoprogress = 0;
  9653. _this.xuanzeinfoproVisible = true;
  9654. _this.xuanzeinfoisFinishSize = 0;
  9655. _this.xuanzeinfoisAllSize = event.target.files.length;
  9656. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9657. }else if(type == 18){
  9658. _this.pingjiainfoprogress[tindex] = 0;
  9659. _this.pingjiainfoproVisible[tindex] = true;
  9660. _this.pingjiainfoisFinishSize[tindex] = 0;
  9661. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  9662. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  9663. }else{
  9664. _this.infoprogress = 0;
  9665. _this.infoproVisible = true;
  9666. _this.infoisFinishSize = 0;
  9667. _this.infoisAllSize = event.target.files.length;
  9668. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9669. }
  9670. _this.$forceUpdate();
  9671. if (file) {
  9672. var params = {
  9673. Key:
  9674. file.name.split(".")[0] +
  9675. new Date().getTime() +
  9676. "." +
  9677. file.name.split(".")[file.name.split(".").length - 1],
  9678. ContentType: file.type,
  9679. Body: file,
  9680. "Access-Control-Allow-Credentials": "*",
  9681. ACL: "public-read",
  9682. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9683. var options = {
  9684. partSize: 2048 * 1024 * 1024,
  9685. queueSize: 2,
  9686. leavePartsOnError: true,
  9687. };
  9688. bucket
  9689. .upload(params, options)
  9690. .on("httpUploadProgress", function (evt) {
  9691. //这里可以写进度条
  9692. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9693. // if(type == 14){
  9694. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9695. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9696. // }else if(type == 16){
  9697. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9698. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9699. // }else if(type == 17){
  9700. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9701. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9702. // }else if(type == 18){
  9703. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  9704. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  9705. // }else {
  9706. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  9707. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9708. // }
  9709. _this.$forceUpdate();
  9710. })
  9711. .send(async function (err, data) {
  9712. // loading.close();
  9713. // if(type == 14){
  9714. // _this.teacherinfoprogress = 100;
  9715. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  9716. // }else if(type == 16){
  9717. // _this.mubiaoinfoprogress = 100;
  9718. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  9719. // }else if(type == 17){
  9720. // _this.xuanzeinfoprogress = 100;
  9721. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  9722. // }else if(type == 18){
  9723. // _this.pingjiainfoprogress[tindex] = 100;
  9724. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  9725. // }else {
  9726. // _this.infoprogress = 100;
  9727. // _this.infoisFinishSize = _this.infoisAllSize;
  9728. // }
  9729. _this.$forceUpdate();
  9730. _this.inputShow = true;
  9731. if (err) {
  9732. cfindex2++;
  9733. if(type == 14){
  9734. _this.teacherinfoisFinishSize = cfindex2;
  9735. }else if(type == 16){
  9736. _this.mubiaoinfoisFinishSize = cfindex2;
  9737. }else if(type == 17){
  9738. _this.xuanzeinfoisFinishSize = cfindex2;
  9739. }else if(type == 18){
  9740. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  9741. }else {
  9742. _this.infoisFinishSize = cfindex2;
  9743. }
  9744. setTimeout(() => {
  9745. if (
  9746. cfindex2 == event.target.files.length ||
  9747. cfindex2 > event.target.files.length
  9748. ) {
  9749. if(type == 14){
  9750. _this.teacherinfoproVisible = false;
  9751. }else if(type == 16){
  9752. _this.mubiaoinfoproVisible = false;
  9753. }else if(type == 17){
  9754. _this.xuanzeinfoproVisible = false;
  9755. }else if(type == 18){
  9756. _this.pingjiainfoproVisible[tindex] = false;
  9757. }else{
  9758. _this.infoproVisible = false;
  9759. }
  9760. }
  9761. _this.$forceUpdate();
  9762. }, 1000);
  9763. // var a = _this.$refs.upload1.uploadFiles;
  9764. // a.splice(a.length - 1, a.length);
  9765. _this.$message.error("上传失败");
  9766. } else {
  9767. let fileid = await _this.createFileid(data.Location)
  9768. if(fileid){
  9769. cfindex2++;
  9770. if(type == 14){
  9771. _this.teacherinfoisFinishSize = cfindex2;
  9772. }else if(type == 16){
  9773. _this.mubiaoinfoisFinishSize = cfindex2;
  9774. }else if(type == 17){
  9775. _this.xuanzeinfoisFinishSize = cfindex2;
  9776. }else if(type == 18){
  9777. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  9778. }else {
  9779. _this.infoisFinishSize = cfindex2;
  9780. }
  9781. if (
  9782. cfindex2 == event.target.files.length ||
  9783. cfindex2 > event.target.files.length
  9784. ) {
  9785. if(type == 14){
  9786. _this.teacherinfoproVisible = false;
  9787. }else if(type == 16){
  9788. _this.mubiaoinfoproVisible = false;
  9789. }else if(type == 17){
  9790. _this.xuanzeinfoproVisible = false;
  9791. }else if(type == 18){
  9792. _this.pingjiainfoproVisible[tindex] = false;
  9793. }else{
  9794. _this.infoproVisible = false;
  9795. }
  9796. }
  9797. _this.$forceUpdate();
  9798. }
  9799. if(fileid == 1){
  9800. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  9801. return;
  9802. }
  9803. var imgA = [
  9804. "png",
  9805. "jpg",
  9806. "jpeg",
  9807. "bmp",
  9808. "gif",
  9809. "webp",
  9810. "psd",
  9811. "svg",
  9812. "tiff",
  9813. ];
  9814. var fileA = [
  9815. "PDF",
  9816. "DOC",
  9817. "DOCX",
  9818. "DOCM",
  9819. "DOTM",
  9820. "DOTX",
  9821. "PPTX",
  9822. "PPSX",
  9823. "PPT",
  9824. "PPS",
  9825. "PPTM",
  9826. "POTM",
  9827. "PPAM",
  9828. "POTX",
  9829. "PPSM",
  9830. "XLSX",
  9831. "XLS",
  9832. ];
  9833. var videoA = [
  9834. "AVI",
  9835. "NAVI",
  9836. "MPEG",
  9837. "ASF",
  9838. "MOV",
  9839. "WMV",
  9840. "3GP",
  9841. "RM",
  9842. "RMVB",
  9843. "FLV",
  9844. "F4V",
  9845. "H.264",
  9846. "H.265",
  9847. "REAL VIDEO",
  9848. "MKV",
  9849. "WebM",
  9850. "HDDVD",
  9851. "MP4",
  9852. "MPG",
  9853. "M4V",
  9854. "MGV",
  9855. "OGV",
  9856. "QTM",
  9857. "STR",
  9858. "AMC",
  9859. "DVX",
  9860. "EVO",
  9861. "DAT",
  9862. "OGG",
  9863. "OGM",
  9864. ];
  9865. let _type = 2;
  9866. if (
  9867. fileA.indexOf(
  9868. data.Location.split(".")[
  9869. data.Location.split(".").length - 1
  9870. ].toLocaleUpperCase()
  9871. ) != -1
  9872. ) {
  9873. _type = 3;
  9874. } else if (
  9875. videoA.indexOf(
  9876. data.Location.split(".")[
  9877. data.Location.split(".").length - 1
  9878. ].toLocaleUpperCase()
  9879. ) != -1
  9880. ) {
  9881. _type = 2;
  9882. } else if (
  9883. imgA.indexOf(
  9884. data.Location.split(".")[
  9885. data.Location.split(".").length - 1
  9886. ].toLocaleLowerCase()
  9887. ) != -1
  9888. ) {
  9889. _type = 13;
  9890. } else {
  9891. _type = 12;
  9892. }
  9893. if (type == 13) {
  9894. _this.infoData.push({
  9895. name: fileName,
  9896. url: data.Location,
  9897. uid: fileUid,
  9898. type: _type,
  9899. fileid: fileid == 1 ? '' : fileid,
  9900. });
  9901. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9902. name: fileName,
  9903. url: data.Location,
  9904. uid: fileUid,
  9905. type: _type,
  9906. fileid: fileid == 1 ? '' : fileid,
  9907. })
  9908. }else if (type == 14) {
  9909. _this.teacherInfoData.push({
  9910. name: fileName,
  9911. url: data.Location,
  9912. uid: fileUid,
  9913. type: _type,
  9914. fileid: fileid == 1 ? '' : fileid,
  9915. });
  9916. _this.infoData2.push({
  9917. name: fileName,
  9918. url: data.Location,
  9919. uid: fileUid,
  9920. type: _type,
  9921. fileid: fileid == 1 ? '' : fileid,
  9922. });
  9923. _this.infoData.push({
  9924. name: fileName,
  9925. url: data.Location,
  9926. uid: fileUid,
  9927. type: _type,
  9928. fileid: fileid == 1 ? '' : fileid,
  9929. });
  9930. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9931. name: fileName,
  9932. url: data.Location,
  9933. uid: fileUid,
  9934. type: _type,
  9935. fileid: fileid == 1 ? '' : fileid,
  9936. })
  9937. }else if (type == 15) {
  9938. _this.infoData2.push({
  9939. name: fileName,
  9940. url: data.Location,
  9941. uid: fileUid,
  9942. type: _type,
  9943. fileid: fileid == 1 ? '' : fileid,
  9944. });
  9945. _this.infoData.push({
  9946. name: fileName,
  9947. url: data.Location,
  9948. uid: fileUid,
  9949. type: _type,
  9950. fileid: fileid == 1 ? '' : fileid,
  9951. });
  9952. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  9953. name: fileName,
  9954. url: data.Location,
  9955. uid: fileUid,
  9956. type: _type,
  9957. fileid: fileid == 1 ? '' : fileid,
  9958. })
  9959. }else if (type == 16) {
  9960. _this.mubiaoInfoData.push({
  9961. name: fileName,
  9962. url: data.Location,
  9963. uid: fileUid,
  9964. type: _type,
  9965. fileid: fileid == 1 ? '' : fileid,
  9966. });
  9967. }else if (type == 17) {
  9968. _this.xuanzeInfoData.push({
  9969. name: fileName,
  9970. url: data.Location,
  9971. uid: fileUid,
  9972. type: _type,
  9973. fileid: fileid == 1 ? '' : fileid,
  9974. });
  9975. }else if (type == 18) {
  9976. if(!_this.pingjiaInfoData[tindex]){
  9977. _this.pingjiaInfoData[tindex] = []
  9978. }
  9979. _this.pingjiaInfoData[tindex].push({
  9980. name: fileName,
  9981. url: data.Location,
  9982. uid: fileUid,
  9983. type: _type,
  9984. fileid: fileid == 1 ? '' : fileid,
  9985. });
  9986. }
  9987. console.log(data.Location);
  9988. console.log(fileid);
  9989. }
  9990. });
  9991. }
  9992. }
  9993. },
  9994. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  9995. // const loading = this.openLoading();
  9996. var file = event.target.files[0];
  9997. var credentials = {
  9998. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9999. secretAccessKey: "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",
  10000. }; //秘钥形式的登录上传
  10001. window.AWS.config.update(credentials);
  10002. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10003. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10004. var _this = this;
  10005. if (type == 3) {
  10006. var b = [
  10007. "DOC",
  10008. "DOCX",
  10009. "DOCM",
  10010. "DOTM",
  10011. "DOTX",
  10012. "PPTX",
  10013. "PPSX",
  10014. "PPT",
  10015. "PPS",
  10016. "PPTM",
  10017. "POTM",
  10018. "PPAM",
  10019. "POTX",
  10020. "PPSM",
  10021. ];
  10022. if (
  10023. b.indexOf(
  10024. file.name
  10025. .split(".")
  10026. [file.name.split(".").length - 1].toLocaleUpperCase()
  10027. ) != -1
  10028. ) {
  10029. if (file.size / 1024 / 1024 > 80) {
  10030. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10031. this.inputShow = true;
  10032. // var a = _this.$refs.upload1.uploadFiles;
  10033. // a.splice(a.length - 1, a.length);
  10034. // loading.close();
  10035. return;
  10036. }
  10037. } else if (
  10038. file.name
  10039. .split(".")
  10040. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10041. ) {
  10042. if (file.size / 1024 / 1024 > 80) {
  10043. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10044. this.inputShow = true;
  10045. // var a = _this.$refs.upload1.uploadFiles;
  10046. // a.splice(a.length - 1, a.length);
  10047. // loading.close();
  10048. return;
  10049. }
  10050. }
  10051. }
  10052. this.inputShow = false;
  10053. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10054. itemTaskIndex
  10055. ].progress = 0;
  10056. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10057. itemTaskIndex
  10058. ].proVisible = true;
  10059. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10060. itemTaskIndex
  10061. ].isFinishSize = 0;
  10062. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10063. itemTaskIndex
  10064. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10065. _this.$forceUpdate();
  10066. if (file) {
  10067. var params = {
  10068. Key:
  10069. file.name.split(".")[0] +
  10070. new Date().getTime() +
  10071. "." +
  10072. file.name.split(".")[file.name.split(".").length - 1],
  10073. ContentType: file.type,
  10074. Body: file,
  10075. "Access-Control-Allow-Credentials": "*",
  10076. ACL: "public-read",
  10077. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10078. var options = {
  10079. partSize: 2048 * 1024 * 1024,
  10080. queueSize: 2,
  10081. leavePartsOnError: true,
  10082. };
  10083. bucket
  10084. .upload(params, options)
  10085. .on("httpUploadProgress", function (evt) {
  10086. //这里可以写进度条
  10087. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10088. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10089. itemTaskIndex
  10090. ].progress = parseInt((evt.loaded / evt.total) * 100);
  10091. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10092. itemTaskIndex
  10093. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10094. _this.$forceUpdate();
  10095. })
  10096. .send(function (err, data) {
  10097. // loading.close();
  10098. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10099. itemTaskIndex
  10100. ].progress = 100;
  10101. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10102. itemTaskIndex
  10103. ].isFinishSize =
  10104. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10105. itemTaskIndex
  10106. ].isAllSize;
  10107. _this.$forceUpdate();
  10108. setTimeout(() => {
  10109. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10110. itemTaskIndex
  10111. ].proVisible = false;
  10112. _this.$forceUpdate();
  10113. }, 1000);
  10114. _this.inputShow = true;
  10115. if (err) {
  10116. // var a = _this.$refs.upload1.uploadFiles;
  10117. // a.splice(a.length - 1, a.length);
  10118. _this.$message.error("上传失败");
  10119. } else {
  10120. if (type == 2 || type == 3) {
  10121. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10122. itemTaskIndex
  10123. ].chapterData.unshift({
  10124. name: file.name,
  10125. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10126. // itemTaskIndex
  10127. // ].chapterData.length+1),
  10128. url: data.Location,
  10129. uid: file.uid,
  10130. type: type,
  10131. text: string,
  10132. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10133. // itemTaskIndex
  10134. // ].chapterData.length + 1),
  10135. });
  10136. _this.imgChange1(null, null, type, itemTaskIndex);
  10137. } else if (type == 4) {
  10138. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10139. itemTaskIndex
  10140. ].fileList1.push({
  10141. name: file.name,
  10142. url: data.Location,
  10143. uid: file.uid,
  10144. });
  10145. _this.imgChange1(null, null, type, itemTaskIndex);
  10146. } else if (type == 5) {
  10147. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10148. itemTaskIndex
  10149. ].homeworkList.push({
  10150. name: file.name,
  10151. url: data.Location,
  10152. uid: file.uid,
  10153. });
  10154. _this.imgChange1(null, null, type, itemTaskIndex);
  10155. }
  10156. console.log(data.Location);
  10157. }
  10158. });
  10159. }
  10160. },
  10161. addunit() {
  10162. this.unitJson.push({
  10163. dyName: "", //单元标题
  10164. isUpdate: 1,
  10165. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  10166. chapterInfo: [
  10167. {
  10168. isread: false,
  10169. chapterid: this.guid(),
  10170. title: "",
  10171. courseName: "",
  10172. taskJson: [
  10173. {
  10174. task: "",
  10175. taskDetail: "",
  10176. chapterData: [],
  10177. toolText: "",
  10178. toolChoose: [
  10179. {
  10180. tool: [],
  10181. toolDetail: "",
  10182. toolType: 0,
  10183. askCount: 1,
  10184. askTitle: "",
  10185. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10186. },
  10187. ],
  10188. isShowTools: false,
  10189. askCount: 1,
  10190. isFold: 1,
  10191. askTitle: "",
  10192. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10193. checkJson: [{ checkCount: [], checkPerent: [] }],
  10194. homeworkList: [],
  10195. },
  10196. ],
  10197. itemCount: 1,
  10198. fileList1: [],
  10199. video: [],
  10200. testData: [],
  10201. pData: [],
  10202. templateArray: [],
  10203. },
  10204. ],
  10205. });
  10206. this.addindex = this.unitJson.length - 1;
  10207. setTimeout(() => {
  10208. this.unitIndex = this.unitJson.length - 1;
  10209. setTimeout(() => {
  10210. console.log(this.$refs.dyInput);
  10211. this.$refs.dyInput[0].focus();
  10212. }, 100);
  10213. this.unitSet(this.unitIndex);
  10214. }, 0);
  10215. },
  10216. addToolFun(itemTaskIndex) {
  10217. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10218. itemTaskIndex
  10219. ].toolChoose.push({
  10220. tool: [],
  10221. toolDetail: "",
  10222. toolType: 0,
  10223. askCount: 1,
  10224. askTitle: "",
  10225. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10226. });
  10227. },
  10228. addTaskBorder() {
  10229. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  10230. task: "",
  10231. taskDetail: "",
  10232. chapterData: [],
  10233. toolText: "",
  10234. toolChoose: [
  10235. {
  10236. tool: [],
  10237. toolDetail: "",
  10238. toolType: 0,
  10239. askCount: 1,
  10240. askTitle: "",
  10241. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10242. },
  10243. ],
  10244. isShowTools: false,
  10245. askCount: 1,
  10246. isFold: 1, //任务收起状态
  10247. askTitle: "",
  10248. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10249. checkJson: [{ checkCount: [], checkPerent: [] }],
  10250. homeworkList: [],
  10251. });
  10252. setTimeout(() => {
  10253. this.checkEva(this.checkId);
  10254. setTimeout(() => {
  10255. this.checkEva(this.checkId);
  10256. }, 100);
  10257. }, 100);
  10258. },
  10259. addTaskBorder2(type, index) {
  10260. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  10261. this.$message({
  10262. message: "有大纲在生成请生成完之后才能使用此功能",
  10263. type: "warning"
  10264. });
  10265. return;
  10266. }
  10267. if(type == 1){
  10268. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  10269. task: "",
  10270. isTask2: true,
  10271. isTask3: true,
  10272. taskDetail: "",
  10273. chapterData: [],
  10274. toolText: "",
  10275. toolChoose: [
  10276. {
  10277. tool: [],
  10278. toolDetail: "",
  10279. toolType: 0,
  10280. askCount: 1,
  10281. askTitle: "",
  10282. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10283. },
  10284. ],
  10285. isShowTools: false,
  10286. askCount: 1,
  10287. isFold: 0, //任务收起状态
  10288. askTitle: "",
  10289. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10290. checkJson: [{ checkCount: [], checkPerent: [] }],
  10291. homeworkList: [],
  10292. })
  10293. }else if(type == 2){
  10294. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  10295. task: "",
  10296. isTask2: true,
  10297. isTask3: true,
  10298. taskDetail: "",
  10299. chapterData: [],
  10300. toolText: "",
  10301. toolChoose: [
  10302. {
  10303. tool: [],
  10304. toolDetail: "",
  10305. toolType: 0,
  10306. askCount: 1,
  10307. askTitle: "",
  10308. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10309. },
  10310. ],
  10311. isShowTools: false,
  10312. askCount: 1,
  10313. isFold: 0, //任务收起状态
  10314. askTitle: "",
  10315. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10316. checkJson: [{ checkCount: [], checkPerent: [] }],
  10317. homeworkList: [],
  10318. })
  10319. }
  10320. setTimeout(() => {
  10321. this.checkEva(this.checkId);
  10322. setTimeout(() => {
  10323. this.checkEva(this.checkId);
  10324. }, 100);
  10325. }, 100);
  10326. },
  10327. add(e, i) {
  10328. var el = e.currentTarget;
  10329. el.getElementsByTagName("input")[0].click();
  10330. },
  10331. fold(i, e) {
  10332. if (
  10333. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  10334. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  10335. ) {
  10336. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  10337. } else {
  10338. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  10339. }
  10340. },
  10341. fold2(i) {
  10342. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  10343. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10344. i
  10345. ].isFold2 = false;
  10346. } else {
  10347. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  10348. }
  10349. this.$forceUpdate();
  10350. },
  10351. foldEva(i) {
  10352. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  10353. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10354. i
  10355. ].isEvaFold = false;
  10356. } else {
  10357. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10358. i
  10359. ].isEvaFold = true;
  10360. setTimeout(() => {
  10361. this.checkEva(this.checkId);
  10362. setTimeout(() => {
  10363. this.checkEva(this.checkId);
  10364. }, 500);
  10365. }, 0);
  10366. }
  10367. this.$forceUpdate();
  10368. },
  10369. foldC(i) {
  10370. if (
  10371. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  10372. ) {
  10373. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10374. i
  10375. ].isFoldchapter = false;
  10376. } else {
  10377. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10378. i
  10379. ].isFoldchapter = true;
  10380. }
  10381. this.$forceUpdate();
  10382. },
  10383. fold3(i, ti) {
  10384. if (
  10385. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  10386. .isFold3
  10387. ) {
  10388. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10389. ti
  10390. ].isFold3 = false;
  10391. } else {
  10392. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10393. ti
  10394. ].isFold3 = true;
  10395. }
  10396. this.$forceUpdate();
  10397. },
  10398. deleteHomeworkBox(unitIndex, index, i) {
  10399. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  10400. this.taskCount
  10401. ].homeworkList.splice(i, 1);
  10402. },
  10403. getStudent() {
  10404. let params = {
  10405. oid: this.oid,
  10406. cu: "",
  10407. cn: this.searchPeople,
  10408. };
  10409. this.ajax
  10410. .get(this.$store.state.api + "selectStudentAdd", params)
  10411. .then((res) => {
  10412. this.studentJuri = res.data[0];
  10413. })
  10414. .catch((err) => {
  10415. this.isLoading = false;
  10416. console.error(err);
  10417. });
  10418. },
  10419. // 添加协同成员其他选项按钮
  10420. getTeacherCopy(){
  10421. this.CollLoading=true
  10422. this.collid = ''
  10423. this.collid = '1xpz'
  10424. let params = {
  10425. oid:
  10426. this.org && this.org != "undefined" && this.org != "null"
  10427. ? this.org
  10428. : this.oid,
  10429. cu: "",
  10430. cn: this.searchTN,
  10431. coll: ''
  10432. };
  10433. this.ajax
  10434. .get(
  10435. this.$store.state.api +
  10436. (this.org && this.org != "undefined" && this.org != "null"
  10437. ? "selectCollaborativeMembersOrg"
  10438. : "selectCollaborativeMembers"),
  10439. params
  10440. )
  10441. .then((res) => {
  10442. let teacherJuri = res.data[0];
  10443. this.CollaborativeTeaList = res.data[1];
  10444. for (var i = 0; i < teacherJuri.length; i++) {
  10445. if (teacherJuri[i].userid == this.userid) {
  10446. teacherJuri.splice(i, 1);
  10447. break;
  10448. }
  10449. }
  10450. this.teacherJuri = teacherJuri.filter((i,index)=>{
  10451. return (i.cclassid == '' || i.cclassid == null)
  10452. })
  10453. console.log(' this.teacherJuri', this.teacherJuri);
  10454. let _check = [];
  10455. let _check2 = [];
  10456. for (var i = 0; i < this.teacherJuri.length; i++) {
  10457. var gid = this.teacherJuri[i].userid;
  10458. _check.push(gid);
  10459. }
  10460. for (var i = 0; i < this.checkboxList3.length; i++) {
  10461. var _id = this.checkboxList3[i];
  10462. if (_check.indexOf(_id) !== -1) {
  10463. _check2.push(_id);
  10464. }
  10465. }
  10466. if (_check2.length==0 && _check.length==0) {
  10467. }else{
  10468. this.checkAll2 = _check2.length === _check.length;
  10469. }
  10470. this.CollLoading=false
  10471. })
  10472. .catch((err) => {
  10473. console.error(err);
  10474. this.CollLoading=false
  10475. });
  10476. },
  10477. getTeacher(val) {
  10478. this.CollLoading=true
  10479. this.collid = ''
  10480. this.collid = !val ? '' : val
  10481. let params = {
  10482. oid:
  10483. this.org && this.org != "undefined" && this.org != "null"
  10484. ? this.org
  10485. : this.oid,
  10486. cu: "",
  10487. cn: this.searchTN,
  10488. coll: this.collid
  10489. };
  10490. this.ajax
  10491. .get(
  10492. this.$store.state.api +
  10493. (this.org && this.org != "undefined" && this.org != "null"
  10494. ? "selectCollaborativeMembersOrg"
  10495. : "selectCollaborativeMembers"),
  10496. params
  10497. )
  10498. .then((res) => {
  10499. let teacherJuri = res.data[0];
  10500. this.CollaborativeTeaList = res.data[1];
  10501. for (var i = 0; i < teacherJuri.length; i++) {
  10502. if (teacherJuri[i].userid == this.userid) {
  10503. teacherJuri.splice(i, 1);
  10504. break;
  10505. }
  10506. }
  10507. this.teacherJuri = teacherJuri;
  10508. let _check = [];
  10509. let _check2 = [];
  10510. for (var i = 0; i < this.teacherJuri.length; i++) {
  10511. var gid = this.teacherJuri[i].userid;
  10512. _check.push(gid);
  10513. }
  10514. for (var i = 0; i < this.checkboxList3.length; i++) {
  10515. var _id = this.checkboxList3[i];
  10516. if (_check.indexOf(_id) !== -1) {
  10517. _check2.push(_id);
  10518. }
  10519. }
  10520. if (_check2.length==0 && _check.length==0) {
  10521. }else{
  10522. this.checkAll2 = _check2.length === _check.length;
  10523. }
  10524. this.CollLoading=false
  10525. })
  10526. .catch((err) => {
  10527. console.error(err);
  10528. this.CollLoading=false
  10529. });
  10530. },
  10531. searchStudent() {
  10532. this.getStudent();
  10533. },
  10534. selectGrage() {
  10535. let params = {
  10536. oid: this.oid,
  10537. };
  10538. this.ajax
  10539. .get(this.$store.state.api + "selectGrageBySchool", params)
  10540. .then((res) => {
  10541. this.gradeList = res.data[0];
  10542. })
  10543. .catch((err) => {
  10544. this.isLoading = false;
  10545. console.error(err);
  10546. });
  10547. },
  10548. //获取班级列表
  10549. getClass() {
  10550. let params = {
  10551. oid: this.oid,
  10552. gid: this.gradeId,
  10553. cn: this.classSearch,
  10554. };
  10555. this.ajax
  10556. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  10557. .then((res) => {
  10558. if (!this.grade.length) {
  10559. this.grade = res.data[0];
  10560. }
  10561. this.grade2 = res.data[0];
  10562. this.classJuri = res.data[0];
  10563. let _check = [];
  10564. let _check2 = [];
  10565. for (var i = 0; i < this.grade2.length; i++) {
  10566. var gid = this.grade2[i].id;
  10567. _check.push(gid);
  10568. }
  10569. for (var i = 0; i < this.checkboxList2.length; i++) {
  10570. var _id = this.checkboxList2[i];
  10571. if (_check.indexOf(_id) !== -1) {
  10572. _check2.push(_id);
  10573. }
  10574. }
  10575. this.checkAll = _check2.length === _check.length;
  10576. })
  10577. .catch((err) => {
  10578. this.isLoading = false;
  10579. console.error(err);
  10580. });
  10581. },
  10582. CourseType2Change(val) {
  10583. this.pTypeCheck = [];
  10584. for (var i = 0; i < this.CourseType2.length; i++) {
  10585. let typeA = this.CourseType2[i];
  10586. if (val.indexOf(typeA.name) != -1) {
  10587. this.pTypeCheck.push(...typeA.id);
  10588. }
  10589. }
  10590. },
  10591. getChapterData(e, i, j, ic, type) {
  10592. e.stopPropagation();
  10593. this.updataC = true;
  10594. this.icc = ic;
  10595. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  10596. console.log("还不能下载图片喔");
  10597. }
  10598. },
  10599. deleteChapterData(e, i, j, ic, taskI) {
  10600. e.stopPropagation();
  10601. let _this = this;
  10602. _this
  10603. .$confirm("确定删除此项?", "提示", {
  10604. confirmButtonText: "确定",
  10605. cancelButtonText: "取消",
  10606. type: "warning",
  10607. })
  10608. .then(() => {
  10609. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  10610. ic,
  10611. 1
  10612. );
  10613. })
  10614. .catch(() => {
  10615. return;
  10616. });
  10617. },
  10618. checkInfoData(fileid, file){
  10619. let type = 1
  10620. let index = 0
  10621. for(let i = 0; i < this.infoData.length; i++){
  10622. if(this.infoData[i].fileid == fileid){
  10623. type = 2
  10624. index = i
  10625. }
  10626. }
  10627. if(type == 2){
  10628. this.infoData.splice(index, 1)
  10629. }else {
  10630. this.infoData.push({...file})
  10631. }
  10632. },
  10633. deleteInfoData(e, ic) {
  10634. e.stopPropagation();
  10635. let _this = this;
  10636. _this
  10637. .$confirm("确定删除此项?", "提示", {
  10638. confirmButtonText: "确定",
  10639. cancelButtonText: "取消",
  10640. type: "warning",
  10641. })
  10642. .then(() => {
  10643. _this.infoData.splice(
  10644. ic,
  10645. 1
  10646. );
  10647. })
  10648. .catch(() => {
  10649. return;
  10650. });
  10651. },
  10652. deleteInfoData2(e, ic) {
  10653. e.stopPropagation();
  10654. let _this = this;
  10655. _this
  10656. .$confirm("确定删除此项?", "提示", {
  10657. confirmButtonText: "确定",
  10658. cancelButtonText: "取消",
  10659. type: "warning",
  10660. })
  10661. .then(() => {
  10662. _this.infoData2.splice(
  10663. ic,
  10664. 1
  10665. );
  10666. })
  10667. .catch(() => {
  10668. return;
  10669. });
  10670. },
  10671. deletemubiaoInfoData(e, ic) {
  10672. e.stopPropagation();
  10673. let _this = this;
  10674. _this
  10675. .$confirm("确定删除此项?", "提示", {
  10676. confirmButtonText: "确定",
  10677. cancelButtonText: "取消",
  10678. type: "warning",
  10679. })
  10680. .then(() => {
  10681. _this.mubiaoInfoData.splice(
  10682. ic,
  10683. 1
  10684. );
  10685. })
  10686. .catch(() => {
  10687. return;
  10688. });
  10689. },
  10690. deletexuanzeInfoData(e, ic) {
  10691. e.stopPropagation();
  10692. let _this = this;
  10693. _this
  10694. .$confirm("确定删除此项?", "提示", {
  10695. confirmButtonText: "确定",
  10696. cancelButtonText: "取消",
  10697. type: "warning",
  10698. })
  10699. .then(() => {
  10700. _this.xuanzeInfoData.splice(
  10701. ic,
  10702. 1
  10703. );
  10704. })
  10705. .catch(() => {
  10706. return;
  10707. });
  10708. },
  10709. deletepingjiaInfoData(e, ic, tindex) {
  10710. e.stopPropagation();
  10711. let _this = this;
  10712. _this
  10713. .$confirm("确定删除此项?", "提示", {
  10714. confirmButtonText: "确定",
  10715. cancelButtonText: "取消",
  10716. type: "warning",
  10717. })
  10718. .then(() => {
  10719. _this.pingjiaInfoData[tindex].splice(
  10720. ic,
  10721. 1
  10722. );
  10723. })
  10724. .catch(() => {
  10725. return;
  10726. });
  10727. },
  10728. deleteCankaoInfoData(e, ic) {
  10729. e.stopPropagation();
  10730. let _this = this;
  10731. _this
  10732. .$confirm("确定删除此项?", "提示", {
  10733. confirmButtonText: "确定",
  10734. cancelButtonText: "取消",
  10735. type: "warning",
  10736. })
  10737. .then(() => {
  10738. _this.cankaoInfoData.splice(
  10739. ic,
  10740. 1
  10741. );
  10742. })
  10743. .catch(() => {
  10744. return;
  10745. });
  10746. },
  10747. deleteTeacherInfoData(e, ic) {
  10748. e.stopPropagation();
  10749. let _this = this;
  10750. _this
  10751. .$confirm("确定删除此项?", "提示", {
  10752. confirmButtonText: "确定",
  10753. cancelButtonText: "取消",
  10754. type: "warning",
  10755. })
  10756. .then(() => {
  10757. _this.teacherInfoData.splice(
  10758. ic,
  10759. 1
  10760. );
  10761. })
  10762. .catch(() => {
  10763. return;
  10764. });
  10765. },
  10766. updataVideoT(e, i, j, ic) {
  10767. // e.stopPropagation();
  10768. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  10769. // ic
  10770. // ].name = JSON.parse(JSON.stringify(e.target.value));
  10771. this.line =
  10772. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  10773. this.taskCount = j;
  10774. this.lineCount = ic;
  10775. this.dialogVisibleupdataVideoT = true;
  10776. this.$forceUpdate();
  10777. },
  10778. checkChpater(e, i, j, ic){
  10779. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  10780. if(type == 3){
  10781. var fileA = [
  10782. "DOC",
  10783. "DOCX",
  10784. "DOCM",
  10785. "DOTM",
  10786. "DOTX",
  10787. "PPTX",
  10788. "PPSX",
  10789. "PPT",
  10790. "PPS",
  10791. "PPTM",
  10792. "POTM",
  10793. "PPAM",
  10794. "POTX",
  10795. "PPSM",
  10796. "XLSX",
  10797. "XLS"
  10798. ];
  10799. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  10800. if (
  10801. fileA.indexOf(
  10802. url.split(".")[
  10803. url.split(".").length - 1
  10804. ].toLocaleUpperCase()
  10805. ) != -1
  10806. ) {
  10807. this.dialogVisibleOffice = true
  10808. this.wurl = url
  10809. } else if (
  10810. "pdf".indexOf(
  10811. url.split(".")[
  10812. url.split(".").length - 1
  10813. ].toLocaleLowerCase()
  10814. ) != -1
  10815. ) {
  10816. this.dialogVisiblePdf = true
  10817. this.wurl = url
  10818. }
  10819. }
  10820. },
  10821. checkChpater2(e, ic){
  10822. let type = this.infoData2[ic].type
  10823. if(type == 3){
  10824. var fileA = [
  10825. "DOC",
  10826. "DOCX",
  10827. "DOCM",
  10828. "DOTM",
  10829. "DOTX",
  10830. "PPTX",
  10831. "PPSX",
  10832. "PPT",
  10833. "PPS",
  10834. "PPTM",
  10835. "POTM",
  10836. "PPAM",
  10837. "POTX",
  10838. "PPSM",
  10839. "XLSX",
  10840. "XLS"
  10841. ];
  10842. let url = this.infoData2[ic].url
  10843. if (
  10844. fileA.indexOf(
  10845. url.split(".")[
  10846. url.split(".").length - 1
  10847. ].toLocaleUpperCase()
  10848. ) != -1
  10849. ) {
  10850. this.dialogVisibleOffice = true
  10851. this.wurl = url
  10852. } else if (
  10853. "pdf".indexOf(
  10854. url.split(".")[
  10855. url.split(".").length - 1
  10856. ].toLocaleLowerCase()
  10857. ) != -1
  10858. ) {
  10859. this.dialogVisiblePdf = true
  10860. this.wurl = url
  10861. }
  10862. }
  10863. },
  10864. checkChpater3(e, ic, item){
  10865. let type = item.type
  10866. if(type == 3){
  10867. var fileA = [
  10868. "DOC",
  10869. "DOCX",
  10870. "DOCM",
  10871. "DOTM",
  10872. "DOTX",
  10873. "PPTX",
  10874. "PPSX",
  10875. "PPT",
  10876. "PPS",
  10877. "PPTM",
  10878. "POTM",
  10879. "PPAM",
  10880. "POTX",
  10881. "PPSM",
  10882. "XLSX",
  10883. "XLS"
  10884. ];
  10885. let url = item.url
  10886. if (
  10887. fileA.indexOf(
  10888. url.split(".")[
  10889. url.split(".").length - 1
  10890. ].toLocaleUpperCase()
  10891. ) != -1
  10892. ) {
  10893. this.dialogVisibleOffice = true
  10894. this.wurl = url
  10895. } else if (
  10896. "pdf".indexOf(
  10897. url.split(".")[
  10898. url.split(".").length - 1
  10899. ].toLocaleLowerCase()
  10900. ) != -1
  10901. ) {
  10902. this.dialogVisiblePdf = true
  10903. this.wurl = url
  10904. }
  10905. }
  10906. },
  10907. updataVideoC() {
  10908. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10909. this.taskCount
  10910. ].chapterData[this.lineCount].name = JSON.parse(
  10911. JSON.stringify(this.line)
  10912. );
  10913. this.dialogVisibleupdataVideoT = false;
  10914. this.$forceUpdate();
  10915. },
  10916. upCd(e, i, j, taskCount, ic) {
  10917. e.stopPropagation();
  10918. if (ic == 0) {
  10919. return;
  10920. }
  10921. var a = JSON.parse(
  10922. JSON.stringify(
  10923. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  10924. ic - 1
  10925. ]
  10926. )
  10927. );
  10928. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  10929. JSON.parse(
  10930. JSON.stringify(
  10931. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  10932. )
  10933. );
  10934. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  10935. this.$forceUpdate();
  10936. },
  10937. downCd(e, i, j, taskCount, ic) {
  10938. e.stopPropagation();
  10939. if (
  10940. ic ==
  10941. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  10942. 1
  10943. ) {
  10944. return;
  10945. }
  10946. var a = JSON.parse(
  10947. JSON.stringify(
  10948. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  10949. ic + 1
  10950. ]
  10951. )
  10952. );
  10953. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  10954. JSON.parse(
  10955. JSON.stringify(
  10956. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  10957. )
  10958. );
  10959. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  10960. this.$forceUpdate();
  10961. },
  10962. async upTool(e, i, j, tooli) {
  10963. e.stopPropagation();
  10964. if (tooli == 0) {
  10965. return;
  10966. }
  10967. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  10968. let count2 = await this.getWorksCount(3, i, j, tooli);
  10969. if (count1 > 0 || count2 > 0) {
  10970. this.$confirm(
  10971. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  10972. "提示",
  10973. {
  10974. confirmButtonText: "确定",
  10975. cancelButtonText: "取消",
  10976. type: "warning",
  10977. }
  10978. )
  10979. .then(() => {
  10980. var a = JSON.parse(
  10981. JSON.stringify(
  10982. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  10983. tooli - 1
  10984. ]
  10985. )
  10986. );
  10987. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  10988. JSON.parse(
  10989. JSON.stringify(
  10990. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  10991. )
  10992. );
  10993. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  10994. this.$forceUpdate();
  10995. })
  10996. .catch(() => {
  10997. return;
  10998. });
  10999. } else {
  11000. var a = JSON.parse(
  11001. JSON.stringify(
  11002. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  11003. )
  11004. );
  11005. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11006. JSON.parse(
  11007. JSON.stringify(
  11008. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11009. )
  11010. );
  11011. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11012. this.$forceUpdate();
  11013. }
  11014. },
  11015. async downTool(e, i, j, tooli) {
  11016. e.stopPropagation();
  11017. if (
  11018. tooli ==
  11019. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  11020. ) {
  11021. return;
  11022. }
  11023. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  11024. let count2 = await this.getWorksCount(3, i, j, tooli);
  11025. if (count1 > 0 || count2 > 0) {
  11026. this.$confirm(
  11027. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11028. "提示",
  11029. {
  11030. confirmButtonText: "确定",
  11031. cancelButtonText: "取消",
  11032. type: "warning",
  11033. }
  11034. )
  11035. .then(() => {
  11036. var a = JSON.parse(
  11037. JSON.stringify(
  11038. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11039. tooli + 1
  11040. ]
  11041. )
  11042. );
  11043. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11044. JSON.parse(
  11045. JSON.stringify(
  11046. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11047. )
  11048. );
  11049. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11050. this.$forceUpdate();
  11051. })
  11052. .catch(() => {
  11053. return;
  11054. });
  11055. } else {
  11056. var a = JSON.parse(
  11057. JSON.stringify(
  11058. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  11059. )
  11060. );
  11061. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11062. JSON.parse(
  11063. JSON.stringify(
  11064. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11065. )
  11066. );
  11067. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11068. this.$forceUpdate();
  11069. }
  11070. },
  11071. addWork(type) {
  11072. if(type == 2 && this.courseName == "") {
  11073. this.$message.error("请补充填写课程名称");
  11074. return;
  11075. }
  11076. let cPan = 1;
  11077. for (var i = 0; i < this.unitJson.length; i++) {
  11078. for (
  11079. var j = 0;
  11080. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11081. j++
  11082. ) {
  11083. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11084. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11085. if (
  11086. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11087. ) {
  11088. for (
  11089. var z = 0;
  11090. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11091. z++
  11092. ) {
  11093. if (
  11094. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11095. .length
  11096. ) {
  11097. this.$message.error("请把工具添加完整");
  11098. cPan = 2;
  11099. break;
  11100. }
  11101. }
  11102. }
  11103. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11104. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11105. i
  11106. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11107. return ele.value != "";
  11108. });
  11109. }
  11110. }
  11111. }
  11112. this.inputShow = true;
  11113. if (cPan == 2) {
  11114. this.steps--;
  11115. return;
  11116. }
  11117. for (var i = 0; i < this.unitJson.length; i++) {
  11118. delete this.unitJson[i].isUpdate;
  11119. }
  11120. if(!this.targetCourseText2){
  11121. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11122. }
  11123. let params = [
  11124. {
  11125. uid: this.userid,
  11126. title: this.courseName,
  11127. brief: this.courseText,
  11128. cover:
  11129. this.cover.length > 0
  11130. ? JSON.stringify(this.cover)
  11131. : JSON.stringify([
  11132. {
  11133. name: "noBanner.jpg",
  11134. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11135. uid: 1656409780264,
  11136. status: "success",
  11137. },
  11138. ]),
  11139. evaId: this.evalua,
  11140. astudent:
  11141. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11142. see: this.isTeacherSee == true ? 1 : 0,
  11143. chapters: JSON.stringify(this.unitJson),
  11144. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  11145. courseType: JSON.stringify(this.courseTypeId),
  11146. ateacher:
  11147. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11148. inviteCode: JSON.stringify(this.inviteCode),
  11149. refile: JSON.stringify(this.infoData),
  11150. reBrief: this.courseText2,
  11151. cpote: JSON.stringify(this.cpote),
  11152. setting: JSON.stringify({
  11153. courseJie: this.courseJie,
  11154. courseTime: this.courseTime,
  11155. teacherInfoData: this.teacherInfoData,
  11156. teacherCourseText: this.teacherCourseText,
  11157. targetCourseText: this.targetCourseText,
  11158. cankaoInfoData: this.cankaoInfoData,
  11159. mubiaoInfoData: this.mubiaoInfoData,
  11160. xuanzeInfoData: this.xuanzeInfoData,
  11161. pingjiaInfoData: this.pingjiaInfoData,
  11162. infoData2: this.infoData2,
  11163. isuseT: this.isuseT,
  11164. mode: this.mode,
  11165. targetCourseText2: this.targetCourseText2,
  11166. }),
  11167. iresearch: this.isFileSearch ? 1 : 2,
  11168. },
  11169. ];
  11170. this.ajax
  11171. .post(this.$store.state.api + "addWorkNew2AI3", params)
  11172. .then((res) => {
  11173. console.log(this.steps);
  11174. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11175. this.$message({
  11176. message: "新增成功",
  11177. type: "success",
  11178. });
  11179. }
  11180. this.number = res.data.ordernumber;
  11181. this.courseId = res.data.courseId;
  11182. this.cid = res.data.courseId;
  11183. this.courseUserid = this.userid;
  11184. this.islogin = true;
  11185. // this.updateCourseState(4);
  11186. this.updateCourseState(5);
  11187. this.addtips()
  11188. if(type == 2){
  11189. this.retrunCourse()
  11190. }
  11191. })
  11192. .catch((err) => {
  11193. this.$message.error("网络不佳");
  11194. console.error(err);
  11195. });
  11196. },
  11197. goCourse() {
  11198. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  11199. },
  11200. updateWork2() {
  11201. let _unitIndex = this.unitIndex;
  11202. let cPan = 1;
  11203. for (
  11204. var j = 0;
  11205. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11206. j++
  11207. ) {
  11208. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11209. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11210. j
  11211. ].proVisible2 = false;
  11212. if (
  11213. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11214. .length > 1
  11215. ) {
  11216. for (
  11217. var z = 0;
  11218. z <
  11219. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11220. .length;
  11221. z++
  11222. ) {
  11223. if (
  11224. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11225. z
  11226. ].tool.length
  11227. ) {
  11228. this.$message.error("请把工具添加完整");
  11229. cPan = 2;
  11230. break;
  11231. }
  11232. }
  11233. }
  11234. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11235. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11236. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11237. (ele) => {
  11238. return ele.value != "";
  11239. }
  11240. );
  11241. }
  11242. }
  11243. this.inputShow = true;
  11244. if (cPan == 2) {
  11245. this.steps--;
  11246. return;
  11247. }
  11248. let params = [
  11249. {
  11250. cid: this.cid,
  11251. chapters: JSON.stringify(this.unitJson),
  11252. uid: this.userid,
  11253. unitIndex: _unitIndex,
  11254. },
  11255. ];
  11256. this.ajax
  11257. .post(this.$store.state.api + "updateWorkNew4", params)
  11258. .then((res) => {
  11259. this.$message({
  11260. message: "修改成功",
  11261. type: "success",
  11262. });
  11263. this.courseId = this.cid;
  11264. this.addtips();
  11265. })
  11266. .catch((err) => {
  11267. this.$message.error("网络不佳");
  11268. console.error(err);
  11269. });
  11270. },
  11271. updateWork3(unitIndex) {
  11272. let _unitIndex = unitIndex;
  11273. let cPan = 1;
  11274. for (
  11275. var j = 0;
  11276. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11277. j++
  11278. ) {
  11279. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11280. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11281. j
  11282. ].proVisible2 = false;
  11283. if (
  11284. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11285. .length > 1
  11286. ) {
  11287. for (
  11288. var z = 0;
  11289. z <
  11290. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11291. .length;
  11292. z++
  11293. ) {
  11294. if (
  11295. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11296. z
  11297. ].tool.length
  11298. ) {
  11299. this.$message.error("请把工具添加完整");
  11300. cPan = 2;
  11301. break;
  11302. }
  11303. }
  11304. }
  11305. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11306. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11307. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11308. (ele) => {
  11309. return ele.value != "";
  11310. }
  11311. );
  11312. }
  11313. }
  11314. this.inputShow = true;
  11315. if (cPan == 2) {
  11316. this.steps--;
  11317. return;
  11318. }
  11319. let params = [
  11320. {
  11321. cid: this.cid,
  11322. chapters: JSON.stringify(this.unitJson),
  11323. uid: this.userid,
  11324. unitIndex: _unitIndex,
  11325. },
  11326. ];
  11327. this.ajax
  11328. .post(this.$store.state.api + "updateWorkNew4", params)
  11329. .then((res) => {
  11330. // this.$message({
  11331. // message: "修改成功",
  11332. // type: "success",
  11333. // });
  11334. this.courseId = this.cid;
  11335. this.addtips()
  11336. })
  11337. .catch((err) => {
  11338. this.$message.error("网络不佳");
  11339. console.error(err);
  11340. });
  11341. },
  11342. updateWork() {
  11343. let cPan = 1;
  11344. for (var i = 0; i < this.unitJson.length; i++) {
  11345. for (
  11346. var j = 0;
  11347. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11348. j++
  11349. ) {
  11350. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11351. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11352. if (
  11353. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11354. ) {
  11355. for (
  11356. var z = 0;
  11357. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11358. z++
  11359. ) {
  11360. if (
  11361. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11362. .length
  11363. ) {
  11364. this.$message.error("请把工具添加完整");
  11365. cPan = 2;
  11366. break;
  11367. }
  11368. }
  11369. }
  11370. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11371. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11372. i
  11373. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11374. return ele.value != "";
  11375. });
  11376. }
  11377. }
  11378. }
  11379. this.inputShow = true;
  11380. if (cPan == 2) {
  11381. this.steps--;
  11382. return;
  11383. }
  11384. for (var i = 0; i < this.unitJson.length; i++) {
  11385. delete this.unitJson[i].isUpdate;
  11386. }
  11387. if(!this.targetCourseText2){
  11388. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11389. }
  11390. let params = [
  11391. {
  11392. cid: this.cid,
  11393. title: this.courseName,
  11394. brief: this.courseText,
  11395. cover:
  11396. this.cover.length > 0
  11397. ? JSON.stringify(this.cover)
  11398. : JSON.stringify([
  11399. {
  11400. name: "noBanner.jpg",
  11401. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11402. uid: 1656409780264,
  11403. status: "success",
  11404. },
  11405. ]),
  11406. evaId: this.evalua,
  11407. astudent:
  11408. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11409. see: this.isTeacherSee == true ? 1 : 0,
  11410. chapters: JSON.stringify(this.unitJson),
  11411. template: this.myWord != "undefined" ? this.myWord : [],
  11412. uid: this.userid,
  11413. courseType: JSON.stringify(this.courseTypeId),
  11414. ateacher:
  11415. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11416. inviteCode: JSON.stringify(this.inviteCode),
  11417. refile: JSON.stringify(this.infoData),
  11418. reBrief: this.courseText2,
  11419. cpote: JSON.stringify(this.cpote),
  11420. setting: JSON.stringify({
  11421. courseJie: this.courseJie,
  11422. courseTime: this.courseTime,
  11423. teacherInfoData: this.teacherInfoData,
  11424. teacherCourseText: this.teacherCourseText,
  11425. targetCourseText: this.targetCourseText,
  11426. cankaoInfoData: this.cankaoInfoData,
  11427. mubiaoInfoData: this.mubiaoInfoData,
  11428. xuanzeInfoData: this.xuanzeInfoData,
  11429. pingjiaInfoData: this.pingjiaInfoData,
  11430. infoData2: this.infoData2,
  11431. isuseT: this.isuseT,
  11432. mode: this.mode,
  11433. targetCourseText2: this.targetCourseText2,
  11434. }),
  11435. iresearch: this.isFileSearch ? 1 : 2,
  11436. },
  11437. ];
  11438. this.ajax
  11439. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  11440. .then((res) => {
  11441. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11442. if (this.cidType == 1) {
  11443. this.$message({
  11444. message: "修改成功",
  11445. type: "success",
  11446. });
  11447. } else {
  11448. this.$message({
  11449. message: "新增成功",
  11450. type: "success",
  11451. });
  11452. }
  11453. }
  11454. this.number = this.nbOrder;
  11455. this.courseId = this.cid;
  11456. this.addtips()
  11457. })
  11458. .catch((err) => {
  11459. this.$message.error("网络不佳");
  11460. console.error(err);
  11461. });
  11462. },
  11463. insertWord() {
  11464. this.dialogVisible1 = true;
  11465. this.updateBoolean2 = false;
  11466. this.tTitle = "";
  11467. this.tdetail = "";
  11468. },
  11469. addWord() {
  11470. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  11471. name: this.tTitle,
  11472. content: this.tdetail,
  11473. uid: this.guid(),
  11474. });
  11475. this.dialogVisible1 = false;
  11476. },
  11477. upWord() { },
  11478. selectWord(uid, i, c) {
  11479. this.dialogVisible1 = true;
  11480. this.updateBoolean2 = true;
  11481. if (
  11482. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  11483. ) {
  11484. this.tTitle =
  11485. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  11486. this.tdetail =
  11487. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  11488. }
  11489. },
  11490. isAddPP() {
  11491. if (this.checkboxList.length > 0) {
  11492. this.$message({
  11493. message: "添加成功",
  11494. type: "success",
  11495. });
  11496. this.dialogVisible3 = false;
  11497. } else {
  11498. this.$message({
  11499. message: "请添加课程成员",
  11500. type: "error",
  11501. });
  11502. }
  11503. },
  11504. isAddClass() {
  11505. this.dialogVisibleClass = false;
  11506. },
  11507. isAddPPTeacher() {
  11508. this.dialogVisibleMember = false;
  11509. this.setMan();
  11510. },
  11511. getTipsTemplate(){
  11512. if(this.templateid){
  11513. let params = {
  11514. id: this.templateid
  11515. }
  11516. this.ajax
  11517. .get(this.$store.state.api + "selectTipsTemplateById", params)
  11518. .then((res) => {
  11519. if(res.data[0].length){
  11520. this.tipsJson = res.data[0][0]
  11521. this.aiJson = JSON.parse(res.data[0][0].tips)
  11522. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  11523. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  11524. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11525. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  11526. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  11527. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11528. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  11529. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  11530. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  11531. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  11532. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  11533. }
  11534. // this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  11535. // this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  11536. // this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  11537. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  11538. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  11539. // }
  11540. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  11541. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  11542. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11543. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  11544. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  11545. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  11546. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  11547. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  11548. // }
  11549. this.$forceUpdate();
  11550. }
  11551. })
  11552. .catch((err) => { });
  11553. }
  11554. },
  11555. getTemplate() {
  11556. this.ajax
  11557. .get(this.$store.state.api + "getCourseTemplateT", "")
  11558. .then((res) => {
  11559. this.templateArray = res.data[0];
  11560. this.getTemplateOid();
  11561. this.$forceUpdate();
  11562. })
  11563. .catch((err) => { });
  11564. },
  11565. getTemplateOid() {
  11566. let params = {
  11567. oid: this.oid,
  11568. };
  11569. this.ajax
  11570. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  11571. .then((res) => {
  11572. if (res.data[0].length) {
  11573. this.templateArray = [...res.data[0], ...this.templateArray];
  11574. }
  11575. this.getTemplateOrg();
  11576. this.$forceUpdate();
  11577. })
  11578. .catch((err) => { });
  11579. },
  11580. getTemplateOrg() {
  11581. let params = {
  11582. oid: this.org,
  11583. };
  11584. this.ajax
  11585. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  11586. .then((res) => {
  11587. if (res.data[0].length) {
  11588. this.templateArray = [...res.data[0], ...this.templateArray];
  11589. }
  11590. this.$forceUpdate();
  11591. })
  11592. .catch((err) => { });
  11593. },
  11594. clearChoose() {
  11595. this.clearArray.splice(this.templateC.id, 1);
  11596. this.dialogVisible2 = false;
  11597. },
  11598. clearAttText() {
  11599. this.AttText = {
  11600. title: "",
  11601. text: "",
  11602. };
  11603. this.dialogVisible6 = false;
  11604. },
  11605. clearLine() {
  11606. this.line = "";
  11607. this.dialogVisible7 = false;
  11608. },
  11609. openTemplate() {
  11610. this.ctJson = {};
  11611. this.templateDialog = true;
  11612. },
  11613. checkctJson(json) {
  11614. if (this.ctJson.id == json.id) {
  11615. this.ctJson = {};
  11616. } else {
  11617. this.ctJson = json;
  11618. }
  11619. },
  11620. addTemplate(res) {
  11621. let _this = this;
  11622. let _res = [];
  11623. if (res.id == 1) {
  11624. _res = [
  11625. {
  11626. dyName: "", //单元标题
  11627. easy: 1,
  11628. chapterInfo: [
  11629. {
  11630. isread: false,
  11631. chapterid: this.guid(),
  11632. title: "",
  11633. courseName: "",
  11634. taskJson: [
  11635. {
  11636. task: "",
  11637. taskDetail: "",
  11638. chapterData: [],
  11639. toolText: "",
  11640. toolChoose: [
  11641. {
  11642. tool: [],
  11643. toolDetail: "",
  11644. toolType: 0,
  11645. askCount: 1,
  11646. askTitle: "",
  11647. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11648. },
  11649. ],
  11650. isShowTools: false,
  11651. askCount: 1,
  11652. isFold: 1,
  11653. askTitle: "",
  11654. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11655. checkJson: [{ checkCount: [], checkPerent: [] }],
  11656. homeworkList: [],
  11657. },
  11658. ],
  11659. itemCount: 1,
  11660. fileList1: [],
  11661. video: [],
  11662. testData: [],
  11663. pData: [],
  11664. templateArray: [],
  11665. },
  11666. ],
  11667. },
  11668. ];
  11669. this.updateCourseState(1);
  11670. } else if (res.id == 2) {
  11671. let stageData = [];
  11672. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  11673. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  11674. if (!iframe && !iframe2) {
  11675. this.$message.error("请使用AI共创生成");
  11676. return;
  11677. }
  11678. let copyData = iframe ? iframe.contentWindow.copyData : false;
  11679. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  11680. if (
  11681. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  11682. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  11683. ) {
  11684. this.$message.error("请使用AI共创生成");
  11685. return;
  11686. }
  11687. stageData = copyData
  11688. ? copyData.stageData
  11689. : copyData2
  11690. ? copyData2.stageData
  11691. : [""];
  11692. for (var i = 0; i < stageData.length; i++) {
  11693. _res.push({
  11694. dyName: stageData[i], //单元标题
  11695. chapterInfo: [
  11696. {
  11697. isread: false,
  11698. chapterid: this.guid(),
  11699. title: "",
  11700. courseName: "",
  11701. taskJson: [
  11702. {
  11703. task: "",
  11704. taskDetail: "",
  11705. chapterData: [],
  11706. toolText: "",
  11707. toolChoose: [
  11708. {
  11709. tool: [],
  11710. toolDetail: "",
  11711. toolType: 0,
  11712. askCount: 1,
  11713. askTitle: "",
  11714. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11715. },
  11716. ],
  11717. isShowTools: false,
  11718. askCount: 1,
  11719. isFold: 1,
  11720. askTitle: "",
  11721. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11722. checkJson: [{ checkCount: [], checkPerent: [] }],
  11723. homeworkList: [],
  11724. },
  11725. ],
  11726. itemCount: 1,
  11727. fileList1: [],
  11728. video: [],
  11729. testData: [],
  11730. pData: [],
  11731. templateArray: [],
  11732. },
  11733. ],
  11734. });
  11735. }
  11736. this.updateCourseState(1);
  11737. } else if (!Object.keys(res).length) {
  11738. this.$message.error("请选择模板");
  11739. retrun;
  11740. } else {
  11741. _res = JSON.parse(res.chapters);
  11742. this.updateCourseState(parseInt(res.state));
  11743. }
  11744. _this
  11745. .$confirm(
  11746. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11747. "提示",
  11748. {
  11749. confirmButtonText: "确定",
  11750. cancelButtonText: "取消",
  11751. type: "warning",
  11752. }
  11753. )
  11754. .then(() => {
  11755. _this.unitJson = _res;
  11756. _this.updateWork();
  11757. // _this.steps++;
  11758. _this.templateDialog = false;
  11759. setTimeout(() => {
  11760. this.checkEva(this.checkId);
  11761. setTimeout(() => {
  11762. this.checkEva(this.checkId);
  11763. }, 100);
  11764. }, 1000);
  11765. })
  11766. .catch(() => {
  11767. return;
  11768. });
  11769. },
  11770. checkTemplate(res) {
  11771. let _this = this;
  11772. _this
  11773. .$confirm(
  11774. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11775. "提示",
  11776. {
  11777. confirmButtonText: "确定",
  11778. cancelButtonText: "取消",
  11779. type: "warning",
  11780. }
  11781. )
  11782. .then(() => {
  11783. _this.unitJson = JSON.parse(res.chapters);
  11784. _this.steps++;
  11785. setTimeout(() => {
  11786. this.checkEva(this.checkId);
  11787. setTimeout(() => {
  11788. this.checkEva(this.checkId);
  11789. }, 100);
  11790. }, 1000);
  11791. })
  11792. .catch(() => {
  11793. return;
  11794. });
  11795. },
  11796. checkTemplate1(w) {
  11797. this.steps++;
  11798. },
  11799. checkTemplate2() {
  11800. let _this = this;
  11801. _this
  11802. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  11803. confirmButtonText: "确定",
  11804. cancelButtonText: "取消",
  11805. type: "warning",
  11806. })
  11807. .then(() => {
  11808. _this.unitIndex = 0;
  11809. _this.unitJson = [
  11810. {
  11811. dyName: "", //单元标题
  11812. chapterInfo: [
  11813. {
  11814. isread: false,
  11815. chapterid: this.guid(),
  11816. title: "",
  11817. courseName: "",
  11818. taskJson: [
  11819. {
  11820. task: "",
  11821. taskDetail: "",
  11822. chapterData: [],
  11823. toolText: "",
  11824. toolChoose: [
  11825. {
  11826. tool: [],
  11827. toolDetail: "",
  11828. toolType: 0,
  11829. askCount: 1,
  11830. askTitle: "",
  11831. askJson: [
  11832. { askstitle: "", askItem: 1, checkList: [] },
  11833. ],
  11834. },
  11835. ],
  11836. isShowTools: false,
  11837. askCount: 1,
  11838. isFold: 1,
  11839. askTitle: "",
  11840. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11841. checkJson: [{ checkCount: [], checkPerent: [] }],
  11842. homeworkList: [],
  11843. },
  11844. ],
  11845. itemCount: 1,
  11846. fileList1: [],
  11847. video: [],
  11848. testData: [],
  11849. pData: [],
  11850. templateArray: [],
  11851. },
  11852. ],
  11853. },
  11854. ];
  11855. this.steps++;
  11856. setTimeout(() => {
  11857. this.checkEva(this.checkId);
  11858. setTimeout(() => {
  11859. this.checkEva(this.checkId);
  11860. }, 100);
  11861. }, 1000);
  11862. this.updateWork();
  11863. })
  11864. .catch(() => {
  11865. return;
  11866. });
  11867. },
  11868. checkTemplate3() {
  11869. let _this = this;
  11870. _this
  11871. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  11872. confirmButtonText: "确定",
  11873. cancelButtonText: "取消",
  11874. type: "warning",
  11875. })
  11876. .then(() => {
  11877. _this.unitIndex = 0;
  11878. _this.unitJson = [
  11879. {
  11880. dyName: "", //单元标题
  11881. easy: 1,
  11882. chapterInfo: [
  11883. {
  11884. isread: false,
  11885. chapterid: this.guid(),
  11886. title: "",
  11887. courseName: "",
  11888. taskJson: [
  11889. {
  11890. task: "",
  11891. taskDetail: "",
  11892. chapterData: [],
  11893. toolText: "",
  11894. toolChoose: [
  11895. {
  11896. tool: [],
  11897. toolDetail: "",
  11898. toolType: 0,
  11899. askCount: 1,
  11900. askTitle: "",
  11901. askJson: [
  11902. { askstitle: "", askItem: 1, checkList: [] },
  11903. ],
  11904. },
  11905. ],
  11906. isShowTools: false,
  11907. askCount: 1,
  11908. isFold: 1,
  11909. askTitle: "",
  11910. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11911. checkJson: [{ checkCount: [], checkPerent: [] }],
  11912. homeworkList: [],
  11913. },
  11914. ],
  11915. itemCount: 1,
  11916. fileList1: [],
  11917. video: [],
  11918. testData: [],
  11919. pData: [],
  11920. templateArray: [],
  11921. },
  11922. ],
  11923. },
  11924. ];
  11925. // this.steps++;
  11926. this.updateWork();
  11927. })
  11928. .catch(() => {
  11929. return;
  11930. });
  11931. },
  11932. checkTemplate4() {
  11933. let _this = this;
  11934. _this
  11935. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  11936. confirmButtonText: "确定",
  11937. cancelButtonText: "取消",
  11938. type: "warning",
  11939. })
  11940. .then(() => {
  11941. _this.unitIndex = 0;
  11942. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  11943. this.steps++;
  11944. this.updateWork();
  11945. })
  11946. .catch(() => {
  11947. return;
  11948. });
  11949. },
  11950. wordNext() {
  11951. this.dialogVisible2 = false;
  11952. },
  11953. isAddOrUpdateAttText() {
  11954. if (this.AttTextType == 0) {
  11955. this.addAttTextMessage();
  11956. } else {
  11957. this.updateAttText();
  11958. }
  11959. },
  11960. isAddOrUpdateLine() {
  11961. if (!this.lineTitle) {
  11962. this.$message.error("请填写链接标题");
  11963. return;
  11964. }
  11965. if (this.lineType == 0) {
  11966. this.addLine();
  11967. } else {
  11968. this.updateLine();
  11969. }
  11970. },
  11971. addAttTextMessage() {
  11972. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11973. this.taskCount
  11974. ].chapterData.unshift({
  11975. name: this.AttText.title,
  11976. url: this.AttText.text,
  11977. type: 6,
  11978. });
  11979. this.imgChange1(null, null, 6, this.taskCount);
  11980. this.dialogVisible6 = false;
  11981. },
  11982. selectAttText(itemTaskIndex, i) {
  11983. this.AttText.title =
  11984. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11985. itemTaskIndex
  11986. ].chapterData[i].name;
  11987. this.AttText.text =
  11988. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11989. itemTaskIndex
  11990. ].chapterData[i].url;
  11991. this.taskCount = itemTaskIndex;
  11992. this.AttTextIndex = i;
  11993. this.AttTextType = 1;
  11994. this.dialogVisible6 = true;
  11995. },
  11996. updateAttText() {
  11997. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11998. this.taskCount
  11999. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  12000. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12001. this.taskCount
  12002. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  12003. this.dialogVisible6 = false;
  12004. },
  12005. addLine() {
  12006. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12007. this.lineCount
  12008. ].chapterData.unshift({
  12009. name: "链接",
  12010. title: this.lineTitle,
  12011. url: this.line,
  12012. type: 8,
  12013. });
  12014. this.imgChange1(null, null, 8, this.lineCount);
  12015. this.dialogVisible7 = false;
  12016. },
  12017. selectLine(itemTaskIndex, i) {
  12018. this.line =
  12019. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12020. itemTaskIndex
  12021. ].chapterData[i].url;
  12022. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12023. itemTaskIndex
  12024. ].chapterData[i].title
  12025. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12026. .chapterData[i].title
  12027. : "";
  12028. this.taskCount = itemTaskIndex;
  12029. this.lineCount = i;
  12030. this.lineType = 1;
  12031. this.dialogVisible7 = true;
  12032. },
  12033. openUpdateSource(itemTaskIndex, i) {
  12034. this.sourceData = {};
  12035. let source =
  12036. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12037. .chapterData[i];
  12038. this.sourceData[source.id] = {};
  12039. this.sourceData[source.id].name = source.title;
  12040. this.sourceData[source.id].url = source.url;
  12041. this.dialogVisibleSource = true;
  12042. this.updateSourcePan = true;
  12043. this.taskCount = itemTaskIndex;
  12044. this.lineCount = i;
  12045. },
  12046. updateLine() {
  12047. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12048. this.taskCount
  12049. ].chapterData[this.lineCount].url = this.line;
  12050. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12051. this.taskCount
  12052. ].chapterData[this.lineCount].title = this.lineTitle;
  12053. this.dialogVisible7 = false;
  12054. },
  12055. addPP() {
  12056. this.dialogVisible3 = true;
  12057. },
  12058. goTo(path) {
  12059. this.$router.push(path);
  12060. },
  12061. openTools(itemTaskIndex, i, toolIndex) {
  12062. this.toolIndex = toolIndex;
  12063. this.taskCount = itemTaskIndex;
  12064. if (i == 4) {
  12065. if (toolIndex == null) {
  12066. var a =
  12067. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12068. .chapterData;
  12069. for (var i = 0; i < a.length; i++) {
  12070. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  12071. this.askJson =
  12072. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12073. itemTaskIndex
  12074. ].chapterData[i].askJson;
  12075. }
  12076. }
  12077. } else {
  12078. this.askJson = JSON.parse(
  12079. JSON.stringify(
  12080. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12081. itemTaskIndex
  12082. ].toolChoose[toolIndex]
  12083. )
  12084. );
  12085. }
  12086. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  12087. this.dialogVisible5 = true;
  12088. } else if (i == 45) {
  12089. if (
  12090. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12091. .toolChoose[toolIndex].testJson
  12092. ) {
  12093. this.testJson = JSON.parse(
  12094. JSON.stringify(
  12095. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12096. itemTaskIndex
  12097. ].toolChoose[toolIndex].testJson
  12098. )
  12099. );
  12100. } else {
  12101. var testJson = {
  12102. testCount: 1,
  12103. testTitle: "",
  12104. testJson: [
  12105. {
  12106. teststitle: "",
  12107. testItem: 1,
  12108. checkList: [],
  12109. timuList: [],
  12110. answer: [],
  12111. type: "1",
  12112. },
  12113. ],
  12114. };
  12115. this.testJson = testJson;
  12116. }
  12117. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  12118. this.dialogVisibleChoice = true;
  12119. } else if (i == 47) {
  12120. if (
  12121. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12122. .toolChoose[toolIndex].sentenceList
  12123. ) {
  12124. this.sentenceList = JSON.parse(
  12125. JSON.stringify(
  12126. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12127. itemTaskIndex
  12128. ].toolChoose[toolIndex].sentenceList
  12129. )
  12130. );
  12131. } else {
  12132. var sentenceList = [
  12133. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  12134. ];
  12135. this.sentenceList = sentenceList;
  12136. }
  12137. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  12138. this.dialogVisibleSentence = true;
  12139. } else if (i == 48) {
  12140. if (
  12141. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12142. .toolChoose[toolIndex].tableJson
  12143. ) {
  12144. this.tableJson = JSON.parse(
  12145. JSON.stringify(
  12146. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12147. itemTaskIndex
  12148. ].toolChoose[toolIndex].tableJson
  12149. )
  12150. );
  12151. } else {
  12152. var tableJson = { text: "" };
  12153. this.tableJson = tableJson;
  12154. }
  12155. this.dialogVisibleTable = true;
  12156. } else if (i == 52) {
  12157. if (
  12158. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12159. .toolChoose[toolIndex].wordJson
  12160. ) {
  12161. this.wordJson = JSON.parse(
  12162. JSON.stringify(
  12163. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12164. itemTaskIndex
  12165. ].toolChoose[toolIndex].wordJson
  12166. )
  12167. );
  12168. } else {
  12169. var wordJson = { text: "" };
  12170. this.wordJson = wordJson;
  12171. }
  12172. this.dialogVisibleWord = true;
  12173. // else if (i == 50) {
  12174. // if (
  12175. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12176. // .toolChoose[toolIndex].uploadJson
  12177. // ) {
  12178. // this.uploadJson = JSON.parse(
  12179. // JSON.stringify(
  12180. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12181. // itemTaskIndex
  12182. // ].toolChoose[toolIndex].uploadJson
  12183. // )
  12184. // );
  12185. // } else {
  12186. // var uploadJson = [];
  12187. // this.uploadJson = uploadJson;
  12188. // }
  12189. // this.dialogVisibleMoreUpload = true;
  12190. // }
  12191. } else if (i == 10) {
  12192. if (
  12193. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12194. .toolChoose[toolIndex].preTime
  12195. ) {
  12196. this.preTime = JSON.parse(
  12197. JSON.stringify(
  12198. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12199. itemTaskIndex
  12200. ].toolChoose[toolIndex].preTime
  12201. )
  12202. );
  12203. } else {
  12204. var preTime = 0;
  12205. this.preTime = preTime;
  12206. }
  12207. this.dialogVisiblePreTime = true;
  12208. } else if (i == 49) {
  12209. if (
  12210. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12211. .toolChoose[toolIndex].groupJson
  12212. ) {
  12213. this.groupJson = JSON.parse(
  12214. JSON.stringify(
  12215. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12216. itemTaskIndex
  12217. ].toolChoose[toolIndex].groupJson
  12218. )
  12219. );
  12220. } else {
  12221. var groupJson = {
  12222. group: [{ name: "第1组" }],
  12223. number: undefined,
  12224. islock: 1,
  12225. };
  12226. this.groupJson = groupJson;
  12227. }
  12228. this.dialogVisibleGroup = true;
  12229. } else if (i == 62) {
  12230. if (
  12231. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12232. .toolChoose[toolIndex].videoJson
  12233. ) {
  12234. this.videoJson = JSON.parse(
  12235. JSON.stringify(
  12236. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12237. itemTaskIndex
  12238. ].toolChoose[toolIndex].videoJson
  12239. )
  12240. );
  12241. } else {
  12242. var videoJson = {
  12243. video: "",
  12244. setting: [],
  12245. };
  12246. this.videoJson = videoJson;
  12247. }
  12248. this.dialogVisibleVideo = true;
  12249. } else if (i == 15) {
  12250. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12251. itemTaskIndex
  12252. ].toolChoose[toolIndex].answerQ
  12253. ? JSON.parse(
  12254. JSON.stringify(
  12255. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12256. itemTaskIndex
  12257. ].toolChoose[toolIndex].answerQ
  12258. )
  12259. )
  12260. : "";
  12261. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  12262. this.dialogVisible8 = true;
  12263. } else if (i == 40) {
  12264. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12265. itemTaskIndex
  12266. ].toolChoose[toolIndex].rateJson
  12267. ? JSON.parse(
  12268. JSON.stringify(
  12269. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12270. itemTaskIndex
  12271. ].toolChoose[toolIndex].rateJson
  12272. )
  12273. )
  12274. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  12275. this.selectSteps = 1;
  12276. this.dialogVisibleRate = true;
  12277. } else if (i == 42) {
  12278. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12279. itemTaskIndex
  12280. ].toolChoose[toolIndex].answerQ
  12281. ? JSON.parse(
  12282. JSON.stringify(
  12283. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12284. itemTaskIndex
  12285. ].toolChoose[toolIndex].answerQ
  12286. )
  12287. )
  12288. : "";
  12289. this.dialogVisibleMp3 = true;
  12290. } else if (i == 41) {
  12291. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12292. itemTaskIndex
  12293. ].toolChoose[toolIndex].selectJson
  12294. ? JSON.parse(
  12295. JSON.stringify(
  12296. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12297. itemTaskIndex
  12298. ].toolChoose[toolIndex].selectJson
  12299. )
  12300. )
  12301. : { url: "", select: [], answer: [] };
  12302. this.selectSteps = 1;
  12303. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  12304. this.dialogVisibleSelect = true;
  12305. } else if (i == 3) {
  12306. top.postMessage(
  12307. {
  12308. tools: "3y",
  12309. cid: this.cid,
  12310. stage: this.unitIndex,
  12311. task: itemTaskIndex,
  12312. tool: toolIndex,
  12313. },
  12314. "*"
  12315. );
  12316. } else if (i == 1) {
  12317. top.postMessage(
  12318. {
  12319. tools: "1y",
  12320. cid: this.cid,
  12321. stage: this.unitIndex,
  12322. task: itemTaskIndex,
  12323. tool: toolIndex,
  12324. },
  12325. "*"
  12326. );
  12327. } else if (i == 57) {
  12328. top.postMessage(
  12329. {
  12330. tools: "57y",
  12331. cid: this.cid,
  12332. stage: this.unitIndex,
  12333. task: itemTaskIndex,
  12334. tool: toolIndex,
  12335. },
  12336. "*"
  12337. );
  12338. } else if (i == 69) {
  12339. this.englishList = {};
  12340. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  12341. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  12342. ? JSON.parse(
  12343. JSON.stringify(
  12344. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12345. itemTaskIndex
  12346. ].toolChoose[toolIndex].englishList
  12347. )
  12348. )
  12349. : {};
  12350. this.$forceUpdate();
  12351. this.englishDialogVisible = true;
  12352. } else if (i == 70) {
  12353. this.englishVoiceJson = {};
  12354. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  12355. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  12356. ? JSON.parse(
  12357. JSON.stringify(
  12358. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12359. itemTaskIndex
  12360. ].toolChoose[toolIndex].englishVoiceJson
  12361. )
  12362. )
  12363. : {
  12364. title: '',
  12365. detail: '',
  12366. array: []
  12367. };
  12368. // {
  12369. // time: "",
  12370. // class: "",
  12371. // difficulty: 0,
  12372. // topic: "",
  12373. // isShow: false,
  12374. // eva: 0,
  12375. // aiEva: {
  12376. // isAiEva: false,
  12377. // aiEvaChoose: [],
  12378. // },
  12379. // allfType: [],
  12380. // englishJson: {},
  12381. // };
  12382. this.$forceUpdate();
  12383. this.EnglishVoiceDialog = true;
  12384. }
  12385. },
  12386. setEnglishVoiceJson(val) {
  12387. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12388. this.taskCount
  12389. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  12390. JSON.stringify(val)
  12391. );
  12392. this.$forceUpdate();
  12393. if (
  12394. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12395. .toolChoose[this.toolIndex].tool != 70
  12396. ) {
  12397. this.addTools(70, this.taskCount, this.toolIndex);
  12398. }
  12399. },
  12400. chapAddTools(i) {
  12401. if (this.chapTools[0].tools.length == 0) {
  12402. this.chapTools[0].tools.push(i);
  12403. } else {
  12404. if (this.chapTools[0].tools.indexOf(i) != -1) {
  12405. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  12406. } else {
  12407. this.chapTools[0].tools.push(i);
  12408. }
  12409. }
  12410. this.$forceUpdate();
  12411. },
  12412. addChaptersDataTools() {
  12413. if (this.chapTools[0].tools.indexOf(4) != -1) {
  12414. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12415. this.chapCount
  12416. ].chapterData.unshift({
  12417. name: this.chapTools[0].toolDetail,
  12418. url: this.chapTools[0].tools,
  12419. type: 7,
  12420. askJson: this.askJson,
  12421. });
  12422. } else {
  12423. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12424. this.chapCount
  12425. ].chapterData.unshift({
  12426. name: this.chapTools[0].toolDetail,
  12427. url: this.chapTools[0].tools,
  12428. type: 7,
  12429. });
  12430. }
  12431. this.imgChange1(null, null, 7, this.chapCount);
  12432. this.dialogVisible4 = false;
  12433. },
  12434. addTools(i, itemTaskIndex, toolIndex) {
  12435. // if (
  12436. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12437. // .toolChoose[toolIndex].tool.length == 0
  12438. // ) {
  12439. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12440. // itemTaskIndex
  12441. // ].toolChoose[toolIndex].tool.push(i);
  12442. // } else {
  12443. // if (
  12444. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12445. // itemTaskIndex
  12446. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  12447. // ) {
  12448. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12449. // itemTaskIndex
  12450. // ].toolChoose[toolIndex].tool.splice(
  12451. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12452. // itemTaskIndex
  12453. // ].toolChoose[toolIndex].tool.indexOf(i),
  12454. // 1
  12455. // );
  12456. // } else {
  12457. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12458. // itemTaskIndex
  12459. // ].toolChoose[toolIndex].tool.push(i);
  12460. // }
  12461. // console.log(
  12462. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12463. // .toolChoose[toolIndex].tool
  12464. // );
  12465. // }
  12466. if (i == 4) {
  12467. if (
  12468. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12469. .toolChoose[toolIndex].askJson.askTitle == "" ||
  12470. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12471. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  12472. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12473. .toolChoose[toolIndex].askJson[0].checkList < 2
  12474. ) {
  12475. this.openTools(itemTaskIndex, 4, toolIndex);
  12476. // this.$message({
  12477. // message: "请填写完整问卷内容",
  12478. // type: "error",
  12479. // });
  12480. return;
  12481. }
  12482. }
  12483. if (i == 45) {
  12484. if (
  12485. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12486. .toolChoose[toolIndex].testJson ||
  12487. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12488. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  12489. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12490. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  12491. ) {
  12492. this.openTools(itemTaskIndex, 45, toolIndex);
  12493. // this.$message({
  12494. // message: "请填写完整问卷内容",
  12495. // type: "error",
  12496. // });
  12497. return;
  12498. }
  12499. }
  12500. if (i == 47) {
  12501. if (
  12502. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12503. .toolChoose[toolIndex].sentenceList ||
  12504. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12505. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  12506. ) {
  12507. this.openTools(itemTaskIndex, 47, toolIndex);
  12508. return;
  12509. }
  12510. }
  12511. if (i == 69) {
  12512. if (
  12513. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12514. .toolChoose[toolIndex].englishList
  12515. ) {
  12516. this.openTools(itemTaskIndex, 69, toolIndex);
  12517. return;
  12518. }
  12519. }
  12520. if (i == 70) {
  12521. if (
  12522. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12523. .toolChoose[toolIndex].englishVoiceJson
  12524. ) {
  12525. this.openTools(itemTaskIndex, 70, toolIndex);
  12526. return;
  12527. }
  12528. }
  12529. // if (i == 48) {
  12530. // if (
  12531. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12532. // .toolChoose[toolIndex].tableJson
  12533. // ) {
  12534. // this.openTools(itemTaskIndex, 48, toolIndex);
  12535. // return;
  12536. // }
  12537. // }
  12538. // if (i == 50) {
  12539. // if (
  12540. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12541. // .toolChoose[toolIndex].uploadJson
  12542. // ) {
  12543. // this.openTools(itemTaskIndex, 50, toolIndex);
  12544. // return;
  12545. // }
  12546. // }
  12547. if (i == 49) {
  12548. if (
  12549. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12550. .toolChoose[toolIndex].groupJson
  12551. ) {
  12552. this.openTools(itemTaskIndex, 49, toolIndex);
  12553. return;
  12554. }
  12555. }
  12556. if (i == 62) {
  12557. if (
  12558. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12559. .toolChoose[toolIndex].videoJson
  12560. ) {
  12561. this.openTools(itemTaskIndex, 62, toolIndex);
  12562. return;
  12563. }
  12564. }
  12565. if (i == 15) {
  12566. if (
  12567. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12568. .toolChoose[toolIndex].answerQ ||
  12569. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12570. .toolChoose[toolIndex].answerQ == ""
  12571. ) {
  12572. this.openTools(itemTaskIndex, 15, toolIndex);
  12573. // this.$message({
  12574. // message: "请填写问答内容",
  12575. // type: "error",
  12576. // });
  12577. return;
  12578. }
  12579. }
  12580. if (i == 40) {
  12581. if (
  12582. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12583. .toolChoose[toolIndex].rateJson ||
  12584. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12585. .toolChoose[toolIndex].rateJson.length
  12586. ) {
  12587. this.openTools(itemTaskIndex, 40, toolIndex);
  12588. return;
  12589. }
  12590. }
  12591. if (i == 41) {
  12592. if (
  12593. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12594. .toolChoose[toolIndex].selectJson ||
  12595. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12596. .toolChoose[toolIndex].selectJson.url == "" ||
  12597. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12598. .toolChoose[toolIndex].selectJson.select.length ||
  12599. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12600. .toolChoose[toolIndex].selectJson.answer.length
  12601. ) {
  12602. this.openTools(itemTaskIndex, 41, toolIndex);
  12603. return;
  12604. }
  12605. }
  12606. if (i == 42) {
  12607. if (
  12608. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12609. .toolChoose[toolIndex].answerQ ||
  12610. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12611. .toolChoose[toolIndex].answerQ == ""
  12612. ) {
  12613. this.openTools(itemTaskIndex, 42, toolIndex);
  12614. return;
  12615. }
  12616. }
  12617. if (
  12618. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12619. .toolChoose[toolIndex].tool.length > 0
  12620. ) {
  12621. if (
  12622. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12623. itemTaskIndex
  12624. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  12625. ) {
  12626. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12627. itemTaskIndex
  12628. ].toolChoose[toolIndex].tool.splice(
  12629. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12630. itemTaskIndex
  12631. ].toolChoose[toolIndex].tool.indexOf(i),
  12632. 1
  12633. );
  12634. } else {
  12635. // this.$message({
  12636. // message: "每个工具只能添加一个",
  12637. // type: "error",
  12638. // });
  12639. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12640. itemTaskIndex
  12641. ].toolChoose[toolIndex].tool = [];
  12642. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12643. itemTaskIndex
  12644. ].toolChoose[toolIndex].tool.push(i);
  12645. }
  12646. } else {
  12647. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12648. itemTaskIndex
  12649. ].toolChoose[toolIndex].tool.push(i);
  12650. }
  12651. this.$forceUpdate();
  12652. },
  12653. addAskList(index) {
  12654. this.askJson.askJson.splice(index + 1, 0, {
  12655. askstitle: "",
  12656. askItem: 1,
  12657. checkList: [],
  12658. });
  12659. this.askJson.askCount++;
  12660. },
  12661. addTestList(index) {
  12662. this.testJson.testJson.splice(index + 1, 0, {
  12663. teststitle: "",
  12664. testItem: 1,
  12665. checkList: [],
  12666. timuList: [],
  12667. answer: [],
  12668. type: "1",
  12669. });
  12670. this.testJson.testCount++;
  12671. },
  12672. deleteAskList(index) {
  12673. if (
  12674. !this.askJson.askJson[index].askstitle &&
  12675. this.askJson.askJson[index].askItem == 1 &&
  12676. !this.askJson.askJson[index].checkList[0]
  12677. ) {
  12678. this.askJson.askJson.splice(index, 1);
  12679. this.askJson.askCount--;
  12680. } else {
  12681. let _this = this;
  12682. _this
  12683. .$confirm("此操作不可撤销,是否继续?", "提示", {
  12684. confirmButtonText: "确定",
  12685. cancelButtonText: "取消",
  12686. type: "warning",
  12687. })
  12688. .then(() => {
  12689. _this.askJson.askJson.splice(index, 1);
  12690. _this.askJson.askCount--;
  12691. })
  12692. .catch(() => {
  12693. return;
  12694. });
  12695. }
  12696. },
  12697. deleteTestList(index) {
  12698. if (
  12699. !this.testJson.testJson[index].teststitle &&
  12700. this.testJson.testJson[index].testItem == 1 &&
  12701. !this.testJson.testJson[index].checkList[0]
  12702. ) {
  12703. this.testJson.testJson.splice(index, 1);
  12704. this.testJson.testCount--;
  12705. } else {
  12706. let _this = this;
  12707. _this
  12708. .$confirm("此操作不可撤销,是否继续?", "提示", {
  12709. confirmButtonText: "确定",
  12710. cancelButtonText: "取消",
  12711. type: "warning",
  12712. })
  12713. .then(() => {
  12714. _this.testJson.testJson.splice(index, 1);
  12715. _this.testJson.testCount--;
  12716. })
  12717. .catch(() => {
  12718. return;
  12719. });
  12720. }
  12721. },
  12722. askMove(type, index) {
  12723. if (type == 1) {
  12724. if (index > 0) {
  12725. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  12726. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12727. this.askJson.askJson[index - 1] = b;
  12728. this.askJson.askJson[index] = a;
  12729. }
  12730. } else {
  12731. if (index < this.askJson.askJson.length - 1) {
  12732. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  12733. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12734. this.askJson.askJson[index + 1] = b;
  12735. this.askJson.askJson[index] = a;
  12736. }
  12737. }
  12738. this.$forceUpdate();
  12739. },
  12740. checkMove(type, index, checkIndex) {
  12741. if (type == 1) {
  12742. if (checkIndex > 0) {
  12743. let a = JSON.parse(
  12744. JSON.stringify(
  12745. this.askJson.askJson[index].checkList[checkIndex - 1]
  12746. )
  12747. );
  12748. let b = JSON.parse(
  12749. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12750. );
  12751. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  12752. this.askJson.askJson[index].checkList[checkIndex] = a;
  12753. }
  12754. } else {
  12755. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  12756. let a = JSON.parse(
  12757. JSON.stringify(
  12758. this.askJson.askJson[index].checkList[checkIndex + 1]
  12759. )
  12760. );
  12761. let b = JSON.parse(
  12762. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12763. );
  12764. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  12765. this.askJson.askJson[index].checkList[checkIndex] = a;
  12766. }
  12767. }
  12768. this.$forceUpdate();
  12769. },
  12770. testMove(type, index) {
  12771. if (type == 1) {
  12772. if (index > 0) {
  12773. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  12774. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12775. this.testJson.testJson[index - 1] = b;
  12776. this.testJson.testJson[index] = a;
  12777. }
  12778. } else {
  12779. if (index < this.testJson.testJson.length - 1) {
  12780. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  12781. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12782. this.testJson.testJson[index + 1] = b;
  12783. this.testJson.testJson[index] = a;
  12784. }
  12785. }
  12786. this.$forceUpdate();
  12787. },
  12788. tcheckMove(type, index, checkIndex) {
  12789. if (type == 1) {
  12790. if (checkIndex > 0) {
  12791. let a = JSON.parse(
  12792. JSON.stringify(
  12793. this.testJson.testJson[index].checkList[checkIndex - 1]
  12794. )
  12795. );
  12796. let b = JSON.parse(
  12797. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12798. );
  12799. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  12800. this.testJson.testJson[index].checkList[checkIndex] = a;
  12801. }
  12802. } else {
  12803. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  12804. let a = JSON.parse(
  12805. JSON.stringify(
  12806. this.testJson.testJson[index].checkList[checkIndex + 1]
  12807. )
  12808. );
  12809. let b = JSON.parse(
  12810. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12811. );
  12812. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  12813. this.testJson.testJson[index].checkList[checkIndex] = a;
  12814. }
  12815. }
  12816. this.$forceUpdate();
  12817. },
  12818. addcheckList(json, index) {
  12819. // json.checkList.length++;
  12820. json.checkList.splice(index + 1, 0, "");
  12821. json.askItem++;
  12822. this.$forceUpdate();
  12823. },
  12824. deletecheckList(json, index) {
  12825. // json.checkList.length--;
  12826. json.checkList.splice(index, 1);
  12827. json.askItem--;
  12828. this.$forceUpdate();
  12829. },
  12830. addTcheckList(json, index) {
  12831. // json.checkList.length++;
  12832. json.checkList.splice(index + 1, 0, "");
  12833. json.testItem++;
  12834. this.$forceUpdate();
  12835. },
  12836. deleteTcheckList(json, index) {
  12837. // json.checkList.length--;
  12838. json.checkList.splice(index, 1);
  12839. json.testItem--;
  12840. this.$forceUpdate();
  12841. },
  12842. checkTestType(type, json) {
  12843. json.type = type;
  12844. setTimeout(() => {
  12845. json.answer = [];
  12846. }, 100);
  12847. },
  12848. checkAskType(type, json) {
  12849. json.type = type;
  12850. // json.checkList = [];
  12851. this.$forceUpdate();
  12852. },
  12853. addSelectList(json) {
  12854. json.select.push("");
  12855. json.answer.push("");
  12856. },
  12857. deleteSelectList(json) {
  12858. // json.select.length--;
  12859. // json.answer.length--;
  12860. json.select.splice(json.select.length - 1, 1);
  12861. json.answer.splice(json.answer.length - 1, 1);
  12862. },
  12863. addAsk() {
  12864. if (this.askJson.askTitle === "") {
  12865. this.$message.error("标题不能为空!");
  12866. return;
  12867. }
  12868. var aj = this.askJson.askJson;
  12869. var b = 1;
  12870. for (var i = 0; i < aj.length; i++) {
  12871. if (aj[i].askstitle === "") {
  12872. var a = 1;
  12873. for (let index = 0; index < aj[i].askItem; index++) {
  12874. const element = aj[i].checkList[index]
  12875. ? aj[i].checkList[index]
  12876. : "";
  12877. if (element != "") {
  12878. b++;
  12879. this.$message.error(`请将题目${i + 1}填写完整。`);
  12880. return;
  12881. } else {
  12882. a++;
  12883. }
  12884. }
  12885. if (b == 1) {
  12886. this.$message.error("至少填写一个问题");
  12887. return;
  12888. }
  12889. } else if (aj[i].askstitle != "") {
  12890. for (let index = 0; index < aj[i].askItem; index++) {
  12891. const element = aj[i].checkList[index]
  12892. ? aj[i].checkList[index]
  12893. : "";
  12894. var index = 0;
  12895. for (var z = 0; z < aj[i].checkList.length; z++) {
  12896. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12897. if (checkC != "") {
  12898. index++;
  12899. } else {
  12900. this.$message.error(`题目${i + 1}选项不能为空!`);
  12901. return;
  12902. }
  12903. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12904. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12905. if (checkC == checkC2) {
  12906. this.$message.error(
  12907. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12908. );
  12909. return;
  12910. }
  12911. }
  12912. }
  12913. b++;
  12914. if (index < 2) {
  12915. this.$message.error("每道题目至少需要设置2个选项。");
  12916. return;
  12917. }
  12918. }
  12919. }
  12920. }
  12921. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  12922. var elc = el.checkList.filter((element) => {
  12923. return element != "";
  12924. });
  12925. return el.askstitle != "" && elc.length != 0;
  12926. });
  12927. if (!this.dialogVisible4) {
  12928. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12929. this.taskCount
  12930. ].toolChoose[this.toolIndex] = this.askJson;
  12931. }
  12932. this.dialogVisible5 = false;
  12933. if (
  12934. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12935. .toolChoose[this.toolIndex].tool != 4
  12936. ) {
  12937. this.addTools(4, this.taskCount, this.toolIndex);
  12938. }
  12939. },
  12940. addTest() {
  12941. // if (this.testJson.testTitle === "") {
  12942. // this.$message.error("标题不能为空!");
  12943. // return;
  12944. // }
  12945. var aj = this.testJson.testJson;
  12946. var b = 1;
  12947. for (var i = 0; i < aj.length; i++) {
  12948. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  12949. var a = 1;
  12950. for (let index = 0; index < aj[i].testItem; index++) {
  12951. const element = aj[i].checkList[index]
  12952. ? aj[i].checkList[index]
  12953. : "";
  12954. if (element != "") {
  12955. b++;
  12956. this.$message.error(`请将题目${i + 1}填写完整。`);
  12957. return;
  12958. } else {
  12959. a++;
  12960. }
  12961. }
  12962. if (b == 1) {
  12963. this.$message.error("至少填写一个问题");
  12964. return;
  12965. }
  12966. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  12967. for (let index = 0; index < aj[i].testItem; index++) {
  12968. const element = aj[i].checkList[index]
  12969. ? aj[i].checkList[index]
  12970. : "";
  12971. var index = 0;
  12972. for (var z = 0; z < aj[i].checkList.length; z++) {
  12973. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  12974. if (checkC != "") {
  12975. index++;
  12976. } else {
  12977. this.$message.error(`题目${i + 1}选项不能为空!`);
  12978. return;
  12979. }
  12980. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  12981. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  12982. if (checkC == checkC2) {
  12983. this.$message.error(
  12984. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  12985. );
  12986. return;
  12987. }
  12988. }
  12989. }
  12990. b++;
  12991. if (index < 2) {
  12992. this.$message.error("每道题目至少需要设置2个选项。");
  12993. return;
  12994. }
  12995. if (
  12996. (aj[i].type == "2" && !aj[i].answer.length) ||
  12997. (aj[i].type == "1" &&
  12998. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  12999. (aj[i].answer !== 0 && !aj[i].answer)))
  13000. ) {
  13001. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  13002. return;
  13003. }
  13004. }
  13005. }
  13006. }
  13007. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13008. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13009. var elc = el.checkList.filter((element) => {
  13010. return element != "";
  13011. });
  13012. return (
  13013. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  13014. );
  13015. });
  13016. isTestJson.testCount = isTestJson.testJson.length;
  13017. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13018. this.taskCount
  13019. ].toolChoose[this.toolIndex].testJson = isTestJson;
  13020. this.dialogVisibleChoice = false;
  13021. if (
  13022. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13023. .toolChoose[this.toolIndex].tool != 45
  13024. ) {
  13025. this.addTools(45, this.taskCount, this.toolIndex);
  13026. }
  13027. },
  13028. addVideoJson(videoJson) {
  13029. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13030. this.taskCount
  13031. ].toolChoose[this.toolIndex].videoJson = videoJson;
  13032. this.dialogVisibleVideo = false;
  13033. if (
  13034. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13035. .toolChoose[this.toolIndex].tool != 62
  13036. ) {
  13037. this.addTools(62, this.taskCount, this.toolIndex);
  13038. }
  13039. },
  13040. //自动获取剪贴板
  13041. pasteOption() {
  13042. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13043. if (!iframe) {
  13044. this.$message.error("请使用AI共创生成题目");
  13045. return;
  13046. }
  13047. let copyData = iframe.contentWindow.copyData;
  13048. if (!copyData || !copyData.selectData.length) {
  13049. this.$message.error("请使用AI共创生成题目");
  13050. return;
  13051. }
  13052. let selectData = copyData.selectData;
  13053. for (var i = 0; i < selectData.length; i++) {
  13054. let answer = 0;
  13055. switch (selectData[i].answer[0]) {
  13056. case "A":
  13057. answer = 0;
  13058. break;
  13059. case "B":
  13060. answer = 1;
  13061. break;
  13062. case "C":
  13063. answer = 2;
  13064. break;
  13065. case "D":
  13066. answer = 3;
  13067. break;
  13068. case "E":
  13069. answer = 4;
  13070. break;
  13071. default:
  13072. break;
  13073. }
  13074. this.testJson.testJson.push({
  13075. teststitle: selectData[i].subject,
  13076. testItem: selectData[i].options.length,
  13077. checkList: selectData[i].options,
  13078. timuList: [],
  13079. answer: answer,
  13080. type: "1",
  13081. });
  13082. this.testJson.testCount++;
  13083. }
  13084. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13085. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13086. var elc = el.checkList.filter((element) => {
  13087. return element != "";
  13088. });
  13089. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  13090. });
  13091. isTestJson.testCount = isTestJson.testJson.length;
  13092. if (!isTestJson.testCount) {
  13093. return;
  13094. }
  13095. this.testJson = isTestJson;
  13096. this.$forceUpdate();
  13097. },
  13098. pasteTask(taskJson) {
  13099. let stageTasksData = [];
  13100. if (taskJson) {
  13101. stageTasksData = taskJson;
  13102. } else {
  13103. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13104. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13105. if (!iframe && !iframe2) {
  13106. this.$message.error("请使用AI共创生成");
  13107. return;
  13108. }
  13109. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13110. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13111. if (
  13112. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  13113. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  13114. ) {
  13115. this.$message.error("请使用AI共创生成");
  13116. return;
  13117. }
  13118. stageTasksData = copyData
  13119. ? copyData.tasksData
  13120. : copyData2
  13121. ? copyData2.tasksData
  13122. : [{ taskName: "", taskDecs: "" }];
  13123. }
  13124. let taskA = [];
  13125. let tasks = stageTasksData;
  13126. for (var j = 0; j < tasks.length; j++) {
  13127. taskA.push({
  13128. task: tasks[j].taskName,
  13129. taskDetail: tasks[j].taskDecs,
  13130. chapterData: [],
  13131. toolText: "",
  13132. toolChoose: [
  13133. {
  13134. tool: [],
  13135. toolDetail: "",
  13136. toolType: 0,
  13137. askCount: 1,
  13138. askTitle: "",
  13139. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13140. },
  13141. ],
  13142. isShowTools: false,
  13143. askCount: 1,
  13144. isFold: 1,
  13145. askTitle: "",
  13146. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13147. checkJson: [{ checkCount: [], checkPerent: [] }],
  13148. homeworkList: [],
  13149. });
  13150. }
  13151. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  13152. this.$forceUpdate();
  13153. },
  13154. pasteStage(stageJson) {
  13155. let stageData = [];
  13156. if (stageJson) {
  13157. stageData = stageJson;
  13158. } else {
  13159. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13160. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13161. if (!iframe && !iframe2) {
  13162. this.$message.error("请使用AI共创生成");
  13163. return;
  13164. }
  13165. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13166. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13167. if (
  13168. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13169. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13170. ) {
  13171. this.$message.error("请使用AI共创生成");
  13172. return;
  13173. }
  13174. stageData = copyData
  13175. ? copyData.stageData
  13176. : copyData2
  13177. ? copyData2.stageData
  13178. : [""];
  13179. }
  13180. let stage = [];
  13181. for (var i = 0; i < stageData.length; i++) {
  13182. stage.push({
  13183. dyName: stageData[i], //单元标题
  13184. chapterInfo: [
  13185. {
  13186. isread: false,
  13187. chapterid: this.guid(),
  13188. title: "",
  13189. courseName: "",
  13190. taskJson: [
  13191. {
  13192. task: "",
  13193. taskDetail: "",
  13194. chapterData: [],
  13195. toolText: "",
  13196. toolChoose: [
  13197. {
  13198. tool: [],
  13199. toolDetail: "",
  13200. toolType: 0,
  13201. askCount: 1,
  13202. askTitle: "",
  13203. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13204. },
  13205. ],
  13206. isShowTools: false,
  13207. askCount: 1,
  13208. isFold: 1,
  13209. askTitle: "",
  13210. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13211. checkJson: [{ checkCount: [], checkPerent: [] }],
  13212. homeworkList: [],
  13213. },
  13214. ],
  13215. itemCount: 1,
  13216. fileList1: [],
  13217. video: [],
  13218. testData: [],
  13219. pData: [],
  13220. templateArray: [],
  13221. },
  13222. ],
  13223. });
  13224. }
  13225. let _this = this;
  13226. if (stageJson) {
  13227. if (!_this.cid) {
  13228. _this.unitJson = stage;
  13229. } else {
  13230. _this.unitIndex = 0;
  13231. _this.unitJson = stage;
  13232. _this.updateWork();
  13233. }
  13234. } else {
  13235. _this
  13236. .$confirm(
  13237. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  13238. "提示",
  13239. {
  13240. confirmButtonText: "确定",
  13241. cancelButtonText: "取消",
  13242. type: "warning",
  13243. }
  13244. )
  13245. .then(() => {
  13246. _this.unitIndex = 0;
  13247. _this.unitJson = stage;
  13248. // _this.steps++;
  13249. _this.updateWork();
  13250. })
  13251. .catch(() => {
  13252. return;
  13253. });
  13254. }
  13255. },
  13256. openStageBox() {
  13257. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  13258. this.dialogVisibleStageChange = true;
  13259. },
  13260. updateChange() {
  13261. this.$confirm(
  13262. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  13263. "提示",
  13264. {
  13265. confirmButtonText: "确定",
  13266. cancelButtonText: "取消",
  13267. type: "warning",
  13268. }
  13269. )
  13270. .then(() => {
  13271. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  13272. this.updateWork();
  13273. this.dialogVisibleStageChange = false;
  13274. })
  13275. .catch(() => {
  13276. return;
  13277. });
  13278. },
  13279. addAnswer() {
  13280. if (this.answerQ == "") {
  13281. this.$message.error("请输入您想要问的问题");
  13282. return;
  13283. }
  13284. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13285. this.taskCount
  13286. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13287. this.dialogVisible8 = false;
  13288. if (
  13289. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13290. .toolChoose[this.toolIndex].tool != 15
  13291. ) {
  13292. this.addTools(15, this.taskCount, this.toolIndex);
  13293. }
  13294. },
  13295. addMp3Answer() {
  13296. if (this.answerQ == "") {
  13297. this.$message.error("请输入您想要回答的问题");
  13298. return;
  13299. }
  13300. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13301. this.taskCount
  13302. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13303. this.dialogVisibleMp3 = false;
  13304. },
  13305. addRateAnswer() {
  13306. var a = 1;
  13307. for (var i = 0; i < this.rateJson.length; i++) {
  13308. if (this.rateJson[i].value == "") {
  13309. a = 2;
  13310. break;
  13311. }
  13312. }
  13313. if (a == 2) {
  13314. this.$message.error("请把评价信息填写完整");
  13315. return;
  13316. }
  13317. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13318. this.taskCount
  13319. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  13320. this.dialogVisibleRate = false;
  13321. if (
  13322. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13323. .toolChoose[this.toolIndex].tool != 40
  13324. ) {
  13325. this.addTools(40, this.taskCount, this.toolIndex);
  13326. }
  13327. },
  13328. addSelectAnswer() {
  13329. if (this.selectJson.url == "") {
  13330. this.$message.error("请上传题目");
  13331. return;
  13332. }
  13333. if (!this.selectJson.select.length) {
  13334. this.$message.error("请添加选项");
  13335. return;
  13336. }
  13337. if (!this.selectJson.answer.length) {
  13338. this.$message.error("请设置答案");
  13339. return;
  13340. }
  13341. var a = 1;
  13342. for (var i = 0; i < this.selectJson.answer.length; i++) {
  13343. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  13344. a = 2;
  13345. }
  13346. }
  13347. if (a == 2) {
  13348. this.$message.error("请设置答案");
  13349. return;
  13350. }
  13351. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13352. this.taskCount
  13353. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  13354. this.dialogVisibleSelect = false;
  13355. if (
  13356. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13357. .toolChoose[this.toolIndex].tool != 41
  13358. ) {
  13359. this.addTools(41, this.taskCount, this.toolIndex);
  13360. }
  13361. },
  13362. nextSelectSteps() {
  13363. if (this.selectJson.url == "") {
  13364. this.$message.error("请上传题目");
  13365. return;
  13366. }
  13367. if (!this.selectJson.select.length) {
  13368. this.$message.error("请添加选项");
  13369. return;
  13370. } else {
  13371. for (var z = 0; z < this.selectJson.select.length; z++) {
  13372. let checkC = this.selectJson.select[z];
  13373. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  13374. let checkC2 = this.selectJson.select[z2];
  13375. if (checkC == checkC2) {
  13376. this.$message.error(
  13377. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13378. );
  13379. return;
  13380. }
  13381. }
  13382. }
  13383. }
  13384. var a = 1;
  13385. for (var i = 0; i < this.selectJson.select.length; i++) {
  13386. if (!this.selectJson.select[i]) {
  13387. a = 2;
  13388. }
  13389. }
  13390. if (a == 2) {
  13391. this.$message.error("添加的选项不能为空");
  13392. return;
  13393. }
  13394. this.selectSteps++;
  13395. },
  13396. selectCourseDetail() {
  13397. if (this.cid == "" || this.cid == undefined) {
  13398. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  13399. this.isTeacherSee = true;
  13400. }
  13401. console.log("这是新增课程");
  13402. this.selectAllType();
  13403. } else {
  13404. this.isOutline = true
  13405. this.isOutline2 = true
  13406. this.cpoteType = 4
  13407. this.cidType = 1;
  13408. let params = {
  13409. cid: this.cid,
  13410. };
  13411. this.ajax
  13412. .get(this.$store.state.api + "select_course_detail", params)
  13413. .then((res) => {
  13414. this.unitJson = JSON.parse(res.data[0][0].chapters);
  13415. this.courseState = res.data[0][0].state;
  13416. for (var j = 0; j < this.unitJson.length; j++) {
  13417. for (
  13418. var k = 0;
  13419. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  13420. k++
  13421. ) {
  13422. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  13423. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13424. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13425. : [];
  13426. let _chapterData = [];
  13427. for (
  13428. var c = 0;
  13429. c <
  13430. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  13431. .length;
  13432. c++
  13433. ) {
  13434. if (
  13435. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13436. ) {
  13437. _chapterData.push(
  13438. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13439. );
  13440. }
  13441. }
  13442. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  13443. _chapterData;
  13444. }
  13445. }
  13446. this.$forceUpdate();
  13447. this.courseName = res.data[0][0].title;
  13448. this.courseText = res.data[0][0].brief;
  13449. this.courseText2 = res.data[0][0].reBrief;
  13450. this.evalua = res.data[0][0].evaId;
  13451. this.cover = JSON.parse(res.data[0][0].cover);
  13452. this.noneBtnImg = this.cover.length >= 1;
  13453. if (res.data[0][0].refile) {
  13454. this.infoData = JSON.parse(res.data[0][0].refile)
  13455. }
  13456. // this.checkboxList =
  13457. // res.data[0][0].course_student.length > 0
  13458. // ? JSON.parse(res.data[0][0].course_student)
  13459. // : [];
  13460. this.checkboxList2 = res.data[0][0].juri
  13461. ? res.data[0][0].juri.split(",")
  13462. : [];
  13463. this.inviteCode = [];
  13464. for (var i = 0; i < res.data[2].length; i++) {
  13465. this.inviteCode.push({
  13466. cid: res.data[2][i].classid,
  13467. ic: res.data[2][i].code,
  13468. });
  13469. }
  13470. this.checkboxList3 = res.data[0][0].course_teacher
  13471. ? res.data[0][0].course_teacher.split(",")
  13472. : [];
  13473. // this.isTeacherSee =
  13474. // res.data[0][0].is_teacher_look == 0 ? true : false;
  13475. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  13476. this.myWord = res.data[0][0].template;
  13477. this.templateC.id = "123";
  13478. this.courseUserid = res.data[0][0].userid;
  13479. // if(this.courseUserid == this.userid){
  13480. // this.InviteChange(this.checkboxList2)
  13481. // }
  13482. this.nbOrder = res.data[0][0].ordernumber;
  13483. this.courseTypeId = [];
  13484. for (var i = 0; i < res.data[1].length; i++) {
  13485. this.courseTypeId.push(res.data[1][i].typeid);
  13486. }
  13487. console.log(this.courseTypeId);
  13488. // if (this.timer) clearInterval(this.timer);
  13489. if (this.timer) clearTimeout(this.timer);
  13490. this.timer = null;
  13491. // this.timer = setInterval(() => {
  13492. if(res.data[3].length){
  13493. try {
  13494. this.aiJson = JSON.parse(res.data[3][0].tips);
  13495. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13496. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13497. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13498. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13499. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13500. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13501. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13502. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13503. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13504. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13505. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13506. }
  13507. this.templateid = res.data[3][0].template;
  13508. }catch(error){
  13509. console.error(error)
  13510. }
  13511. }
  13512. if(res.data[0][0].cpote){
  13513. try {
  13514. this.cpote = JSON.parse(res.data[0][0].cpote);
  13515. }catch(error){
  13516. console.error(error)
  13517. }
  13518. }
  13519. if(res.data[0][0].setting){
  13520. try {
  13521. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  13522. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  13523. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  13524. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  13525. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  13526. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  13527. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  13528. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  13529. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  13530. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  13531. this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
  13532. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  13533. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  13534. if(this.targetCourseText2 || (!this.teacherCourseText)){
  13535. this.courseTextBool = true
  13536. }
  13537. if(!this.teacherCourseText && !this.teacherCourseText){
  13538. this.isuseT = false
  13539. }
  13540. }catch(error){
  13541. console.error(error)
  13542. }
  13543. }
  13544. if(this.courseText){
  13545. this.courseTextB = false
  13546. }
  13547. if(this.teacherCourseText){
  13548. this.teacherCourseTextB = false
  13549. }
  13550. if(this.targetCourseText){
  13551. this.targetCourseTextB = false
  13552. }
  13553. if(this.targetCourseText2){
  13554. this.targetCourseText2B = false
  13555. }
  13556. this.isFileSearch = res.data[0][0].iresearch == 1
  13557. this.seleteCourseUpdate();
  13558. this.setMan();
  13559. this.selectAllType();
  13560. this.unitJson[
  13561. this.unitIndex
  13562. ].chapterInfo[0].taskJson[0].toolOpen = true;
  13563. // }, 5000);
  13564. this.$forceUpdate();
  13565. setTimeout(() => {
  13566. this.checkEva(this.evalua);
  13567. setTimeout(() => {
  13568. this.checkEva(this.evalua);
  13569. }, 100);
  13570. }, 100);
  13571. })
  13572. .catch((err) => {
  13573. console.error(err);
  13574. });
  13575. }
  13576. if(this.aiId){
  13577. let params = {
  13578. cid: this.aiId,
  13579. };
  13580. this.ajax
  13581. .get(this.$store.state.api + "select_course_detail", params)
  13582. .then((res) => {
  13583. let _unitJson = JSON.parse(res.data[0][0].chapters);
  13584. let fileInfo = []
  13585. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  13586. for(var i = 0; i < _unitJson.length; i++){
  13587. let tasks = _unitJson[i].chapterInfo[0].taskJson
  13588. for(var j = 0; j < tasks.length; j++){
  13589. let _infoData = tasks[j].chapterData.filter(el => {
  13590. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  13591. })
  13592. if(_infoData.length){
  13593. fileInfo = [...fileInfo, ..._infoData]
  13594. }
  13595. }
  13596. }
  13597. this.infoData = fileInfo
  13598. this.$forceUpdate();
  13599. this.courseName = res.data[0][0].title;
  13600. this.courseText = res.data[0][0].brief;
  13601. this.courseText2 = res.data[0][0].reBrief;
  13602. this.cover = JSON.parse(res.data[0][0].cover);
  13603. this.noneBtnImg = this.cover.length >= 1;
  13604. this.checkboxList2 = res.data[0][0].juri
  13605. ? res.data[0][0].juri.split(",")
  13606. : [];
  13607. this.inviteCode = [];
  13608. for (var i = 0; i < res.data[2].length; i++) {
  13609. this.inviteCode.push({
  13610. cid: res.data[2][i].classid,
  13611. ic: res.data[2][i].code,
  13612. });
  13613. }
  13614. this.checkboxList3 = res.data[0][0].course_teacher
  13615. ? res.data[0][0].course_teacher.split(",")
  13616. : [];
  13617. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  13618. this.myWord = res.data[0][0].template;
  13619. this.templateC.id = "123";
  13620. this.courseTypeId = [];
  13621. for (var i = 0; i < res.data[1].length; i++) {
  13622. this.courseTypeId.push(res.data[1][i].typeid);
  13623. }
  13624. console.log(this.courseTypeId);
  13625. if(res.data[3].length){
  13626. try {
  13627. this.aiJson = JSON.parse(res.data[3][0].tips);
  13628. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13629. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13630. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13631. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13632. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13633. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13634. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13635. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13636. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13637. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13638. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13639. }
  13640. this.templateid = res.data[3][0].template;
  13641. }catch(error){
  13642. console.error(error)
  13643. }
  13644. }
  13645. if(res.data[0][0].cpote){
  13646. try {
  13647. this.cpote = JSON.parse(res.data[0][0].cpote);
  13648. }catch(error){
  13649. console.error(error)
  13650. }
  13651. }
  13652. if(res.data[0][0].setting){
  13653. try {
  13654. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  13655. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  13656. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  13657. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  13658. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  13659. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  13660. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  13661. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  13662. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  13663. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  13664. this.isuseT = JSON.parse(res.data[0][0].setting).isuseT ? JSON.parse(res.data[0][0].setting).isuseT : JSON.parse(res.data[0][0].setting).isuseT === false ? false : false;
  13665. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  13666. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  13667. if(this.targetCourseText2 || (!this.teacherCourseText)){
  13668. this.courseTextBool = true
  13669. }
  13670. if(!this.teacherCourseText && !this.teacherCourseText){
  13671. this.isuseT = false
  13672. }
  13673. }catch(error){
  13674. console.error(error)
  13675. }
  13676. }
  13677. if(this.courseText){
  13678. this.courseTextB = false
  13679. }
  13680. if(this.teacherCourseText){
  13681. this.teacherCourseTextB = false
  13682. }
  13683. if(this.targetCourseText){
  13684. this.targetCourseTextB = false
  13685. }
  13686. if(this.targetCourseText2){
  13687. this.targetCourseText2B = false
  13688. }
  13689. this.setMan();
  13690. this.unitJson[
  13691. this.unitIndex
  13692. ].chapterInfo[0].taskJson[0].toolOpen = true;
  13693. this.$forceUpdate();
  13694. setTimeout(() => {
  13695. this.checkEva(this.evalua);
  13696. setTimeout(() => {
  13697. this.checkEva(this.evalua);
  13698. }, 100);
  13699. }, 100);
  13700. })
  13701. .catch((err) => {
  13702. console.error(err);
  13703. });
  13704. }
  13705. // if(this.cidType != 1 && this.templateid == ''){
  13706. // this.promptShow = true
  13707. // }
  13708. },
  13709. seleteCourseUpdate() {
  13710. let params = {
  13711. cid: this.cid,
  13712. };
  13713. this.ajax
  13714. .get(this.$store.state.api + "select_course_detail", params)
  13715. .then((res) => {
  13716. // console.log(this.unitJson);
  13717. let unitJson = JSON.parse(res.data[0][0].chapters);
  13718. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  13719. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  13720. let _unitJson = [];
  13721. let _chapAarry = [];
  13722. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  13723. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  13724. let index = 1;
  13725. let chapindex;
  13726. if (_unitJson2.length > unitJson.length) {
  13727. for (let c = 0; c < _unitJson2.length; c++) {
  13728. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  13729. }
  13730. for (let j = 0; j < unitJson.length; j++) {
  13731. let count = 0;
  13732. for (let k = 0; k < _unitJson2.length; k++) {
  13733. if (
  13734. unitJson[j].chapterInfo[0].chapterid ==
  13735. _unitJson2[k].chapterInfo[0].chapterid
  13736. ) {
  13737. count++;
  13738. _chapAarry.splice(
  13739. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13740. 1
  13741. );
  13742. _unitJson.push(unitJson[j]);
  13743. break;
  13744. }
  13745. }
  13746. // if(count === 0){
  13747. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13748. // }
  13749. }
  13750. for (let k = 0; k < _unitJson2.length; k++) {
  13751. if (_unitJson2[k].isUpdate == 1) {
  13752. _chapAarry.splice(
  13753. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13754. 1
  13755. );
  13756. _unitJson.push(_unitJson2[k]);
  13757. }
  13758. }
  13759. console.log(_chapAarry);
  13760. for (let d = 0; d < _unitJson2.length; d++) {
  13761. if (
  13762. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  13763. ) {
  13764. if (_unitIndex == d) {
  13765. index = 2;
  13766. }
  13767. chapindex = d;
  13768. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13769. }
  13770. }
  13771. } else {
  13772. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  13773. }
  13774. for (let i = 0; i < unitJson.length; i++) {
  13775. if (
  13776. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  13777. _unitJson[i].chapterInfo[0].chapterid !=
  13778. unitJson[i].chapterInfo[0].chapterid
  13779. ) {
  13780. if (i == _unitJson.length - 1) {
  13781. // this.unitIndex++
  13782. _unitIndex2++;
  13783. }
  13784. _unitJson.splice(i, 0, unitJson[i]);
  13785. } else if (i > _unitJson.length - 1) {
  13786. _unitJson.push(unitJson[i]);
  13787. } else if (
  13788. _unitJson[i].chapterInfo[0].chapterid ==
  13789. unitJson[i].chapterInfo[0].chapterid
  13790. ) {
  13791. _unitJson[i] = unitJson[i];
  13792. }
  13793. // if (i == _unitIndex) {
  13794. // continue;
  13795. // } else
  13796. }
  13797. if (_chapAarry.length && index != 2) {
  13798. if (chapindex < _unitIndex) {
  13799. this.isDelete = 2;
  13800. // this.unitIndex--;
  13801. _unitIndex2--;
  13802. } else if (
  13803. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  13804. _unitJson[_unitIndex].chapterInfo[0].chapterid
  13805. ) {
  13806. this.isDelete = 2;
  13807. for (let n = 0; n < _unitJson.length; n++) {
  13808. if (
  13809. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  13810. _unitJson[n].chapterInfo[0].chapterid
  13811. ) {
  13812. // this.unitIndex = n;
  13813. _unitIndex2 = n;
  13814. _unitJson[n] = _unitJson2[_unitIndex];
  13815. break;
  13816. }
  13817. }
  13818. }
  13819. } else if (index != 2) {
  13820. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  13821. _unitJson2[_unitIndex];
  13822. for (
  13823. var ci = 0;
  13824. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  13825. ci++
  13826. ) {
  13827. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  13828. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  13829. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13830. .toolChoose
  13831. : [];
  13832. let _chapterData = [];
  13833. for (
  13834. var c = 0;
  13835. c <
  13836. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  13837. .length;
  13838. c++
  13839. ) {
  13840. if (
  13841. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13842. .chapterData[c]
  13843. ) {
  13844. _chapterData.push(
  13845. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  13846. .chapterData[c]
  13847. );
  13848. }
  13849. }
  13850. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  13851. _chapterData;
  13852. }
  13853. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  13854. }
  13855. if (index == 1) {
  13856. this.unitJson = _unitJson;
  13857. this.$forceUpdate();
  13858. setTimeout(() => {
  13859. if (this.unitIndex != _unitIndex2) {
  13860. this.isDelete = 2;
  13861. this.unitIndex = _unitIndex2;
  13862. }
  13863. }, 0);
  13864. this.timer = setTimeout(() => {
  13865. this.seleteCourseUpdate();
  13866. }, 1000);
  13867. } else if (index == 2) {
  13868. let _this = this;
  13869. _this
  13870. .$confirm(
  13871. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  13872. "提示",
  13873. {
  13874. confirmButtonText: "需要",
  13875. cancelButtonText: "取消",
  13876. type: "warning",
  13877. }
  13878. )
  13879. .then(() => {
  13880. if (_this.time()) {
  13881. _this.restoreWork(
  13882. _chapAarry[0],
  13883. _unitJson,
  13884. chapindex,
  13885. _unitJson2,
  13886. _unitIndex2
  13887. );
  13888. }
  13889. })
  13890. .catch(() => {
  13891. _this.unitJson = _unitJson;
  13892. _this.$forceUpdate();
  13893. setTimeout(() => {
  13894. if (this.unitIndex != _unitIndex2) {
  13895. this.isDelete = 2;
  13896. this.unitIndex = _unitIndex2;
  13897. }
  13898. }, 0);
  13899. _this.timer = setTimeout(() => {
  13900. _this.seleteCourseUpdate();
  13901. }, 1000);
  13902. });
  13903. }
  13904. // 在复制操作之前记录滚动位置
  13905. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  13906. // 执行复制操作
  13907. // 复制操作完成后恢复滚动位置
  13908. this.$nextTick(() => {
  13909. if (this.$refs.scrollContainer) {
  13910. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  13911. }
  13912. });
  13913. })
  13914. .catch((err) => {
  13915. console.error(err);
  13916. });
  13917. },
  13918. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  13919. let params = [
  13920. {
  13921. cid: this.cid,
  13922. chapters: JSON.stringify(this.unitJson),
  13923. uid: this.userid,
  13924. chapid: chapid,
  13925. },
  13926. ];
  13927. this.ajax
  13928. .post(this.$store.state.api + "restoreWork", params)
  13929. .then((res) => {
  13930. this.$message({
  13931. message: "恢复成功",
  13932. type: "success",
  13933. });
  13934. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  13935. this.unitJson = unitJson;
  13936. this.$forceUpdate();
  13937. setTimeout(() => {
  13938. if (this.unitIndex != unitIndex2) {
  13939. this.isDelete = 2;
  13940. this.unitIndex = unitIndex2;
  13941. }
  13942. }, 0);
  13943. this.timer = setTimeout(() => {
  13944. this.seleteCourseUpdate();
  13945. }, 1000);
  13946. })
  13947. .catch((err) => {
  13948. this.$message.error("网络不佳");
  13949. console.error(err);
  13950. });
  13951. },
  13952. getTypeName() {
  13953. console.log(this.courseTypeId);
  13954. this.$forceUpdate();
  13955. },
  13956. selectAllType() {
  13957. let params = {
  13958. org: this.org && this.org != "" ? this.org : "",
  13959. oid: this.oid && this.oid != "" ? this.oid : "",
  13960. };
  13961. this.ajax
  13962. .get(this.$store.state.api + "selectAllType", params)
  13963. .then((res) => {
  13964. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  13965. res.data[0] = [...res.data[0], ...res.data[4]];
  13966. }
  13967. this.CourseType = res.data;
  13968. this.CourseType2 = [
  13969. { name: "智见课程", id: [] },
  13970. { name: "智行课程", id: [] },
  13971. { name: "智创课程", id: [] },
  13972. ];
  13973. for (var cti = 0; cti < res.data[0].length; cti++) {
  13974. if (
  13975. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  13976. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  13977. ) {
  13978. this.CourseType2[0].id.push(res.data[0][cti].id);
  13979. } else if (
  13980. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  13981. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  13982. ) {
  13983. this.CourseType2[1].id.push(res.data[0][cti].id);
  13984. } else if (
  13985. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  13986. ) {
  13987. this.CourseType2[2].id.push(res.data[0][cti].id);
  13988. }
  13989. if (
  13990. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  13991. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  13992. ) {
  13993. res.data[0][cti].name = "年级";
  13994. } else if (
  13995. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  13996. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  13997. ) {
  13998. res.data[0][cti].name = "学科";
  13999. } else if (
  14000. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14001. ) {
  14002. res.data[0][cti].name = "主题";
  14003. }
  14004. }
  14005. let _courseTypeId = [];
  14006. for (var i = 0; i < res.data[0].length; i++) {
  14007. if (!this.cid) {
  14008. this.courseTypeId[res.data[0][i].id] = [];
  14009. }
  14010. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  14011. // }
  14012. this.CourseTypeJson[res.data[0][i].id] = [];
  14013. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14014. if (res.data[0][i].name == "栏目") {
  14015. this.CourseType[0][i].name = "主题";
  14016. }
  14017. }
  14018. if (res.data[2].length == 0 && res.data[3].length == 0) {
  14019. for (var j = 0; j < res.data[1].length; j++) {
  14020. if (
  14021. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  14022. _courseTypeId.indexOf(res.data[1][j].id) == -1
  14023. ) {
  14024. _courseTypeId.push(res.data[1][j].id);
  14025. }
  14026. if (res.data[0][i].id == res.data[1][j].pid) {
  14027. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14028. }
  14029. }
  14030. } else {
  14031. if (res.data[2].length > 0) {
  14032. for (var j = 0; j < res.data[2].length; j++) {
  14033. if (
  14034. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  14035. _courseTypeId.indexOf(res.data[2][j].id) == -1
  14036. ) {
  14037. _courseTypeId.push(res.data[2][j].id);
  14038. }
  14039. if (res.data[0][i].id == res.data[2][j].pid) {
  14040. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14041. }
  14042. }
  14043. }
  14044. if (res.data[3].length > 0) {
  14045. for (var j = 0; j < res.data[3].length; j++) {
  14046. if (
  14047. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  14048. _courseTypeId.indexOf(res.data[3][j].id) == -1
  14049. ) {
  14050. _courseTypeId.push(res.data[3][j].id);
  14051. }
  14052. if (res.data[0][i].id == res.data[3][j].pid) {
  14053. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14054. }
  14055. }
  14056. }
  14057. }
  14058. }
  14059. this.courseTypeId = _courseTypeId;
  14060. })
  14061. .catch((err) => {
  14062. console.error(err);
  14063. });
  14064. },
  14065. selectType() {
  14066. this.ajax
  14067. .get(this.$store.state.api + "selectType")
  14068. .then((res) => {
  14069. this.CourseType = res.data;
  14070. for (var i = 0; i < res.data[0].length; i++) {
  14071. if (!this.cid) {
  14072. this.courseTypeId[res.data[0][i].id] = "";
  14073. }
  14074. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14075. if (res.data[0][i].name == "栏目") {
  14076. this.CourseType[0][i].name = "主题";
  14077. }
  14078. }
  14079. for (var j = 0; j < res.data[1].length; j++) {
  14080. if (res.data[0][i].id == res.data[1][j].pid) {
  14081. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14082. this.CourseTypeJson[res.data[0][i].id] = [];
  14083. }
  14084. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14085. }
  14086. }
  14087. }
  14088. this.selectTypeByOid();
  14089. this.selectTypeByOrg();
  14090. })
  14091. .catch((err) => {
  14092. console.error(err);
  14093. });
  14094. },
  14095. selectTypeByOid() {
  14096. let params = {
  14097. oid: this.oid,
  14098. };
  14099. this.ajax
  14100. .get(this.$store.state.api + "selectTypeByOid", params)
  14101. .then((res) => {
  14102. for (var i = 0; i < res.data[0].length; i++) {
  14103. for (var j = 0; j < res.data[1].length; j++) {
  14104. if (res.data[0][i].id == res.data[1][j].pid) {
  14105. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14106. this.CourseTypeJson[res.data[0][i].id] = [];
  14107. }
  14108. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14109. }
  14110. }
  14111. }
  14112. })
  14113. .catch((err) => {
  14114. console.error(err);
  14115. });
  14116. },
  14117. selectTypeByOrg() {
  14118. let params = {
  14119. oid: this.org,
  14120. };
  14121. this.ajax
  14122. .get(this.$store.state.api + "selectTypeByOrg", params)
  14123. .then((res) => {
  14124. for (var i = 0; i < res.data[0].length; i++) {
  14125. for (var j = 0; j < res.data[1].length; j++) {
  14126. if (res.data[0][i].id == res.data[1][j].pid) {
  14127. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14128. this.CourseTypeJson[res.data[0][i].id] = [];
  14129. }
  14130. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14131. }
  14132. }
  14133. }
  14134. this.$forceUpdate();
  14135. })
  14136. .catch((err) => {
  14137. console.error(err);
  14138. });
  14139. },
  14140. OtherMb(type, task) {
  14141. if (task === 0 || task) {
  14142. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14143. task
  14144. ].isEvaFold = true;
  14145. }
  14146. this.typeMode = type;
  14147. setTimeout(() => {
  14148. this.checkEva(this.checkId);
  14149. setTimeout(() => {
  14150. this.checkEva(this.checkId);
  14151. }, 100);
  14152. }, 100);
  14153. },
  14154. openMember() {
  14155. this.searchTN = "";
  14156. this.getTeacher();
  14157. this.dialogVisibleMember = true;
  14158. },
  14159. checkEva(id, type) {
  14160. this.dialogVisiblemb = false;
  14161. this.selectEva();
  14162. if (this.evalua != id && type == 2) {
  14163. this.$message.success("导入成功");
  14164. setTimeout(() => {
  14165. this.checkEva(id);
  14166. }, 100);
  14167. }
  14168. this.evalua = id;
  14169. this.checkId = id;
  14170. if (this.evalua != "") {
  14171. for (var i = 0; i < this.evaJuri.length; i++) {
  14172. if (this.evalua == this.evaJuri[i].id) {
  14173. this.eTitle = this.evaJuri[i].title;
  14174. this.eJson = JSON.parse(this.evaJuri[i].content);
  14175. }
  14176. }
  14177. this.data.data = [];
  14178. this.$forceUpdate();
  14179. setTimeout(() => {
  14180. this.setMindData();
  14181. }, 1000);
  14182. }
  14183. },
  14184. deleteEva() {
  14185. let _this = this;
  14186. if (_this.evalua == "") {
  14187. this.$message.warning("内容已经清空了,请勿重复清空");
  14188. return;
  14189. }
  14190. _this
  14191. .$confirm("确定删除此目标吗?", "提示", {
  14192. confirmButtonText: "确定",
  14193. cancelButtonText: "取消",
  14194. type: "warning",
  14195. })
  14196. .then(() => {
  14197. _this.evalua = "";
  14198. _this.checkId = "";
  14199. _this.eTitle = "";
  14200. let _unitJson = _this.unitJson;
  14201. for (var i = 0; i < _unitJson.length; i++) {
  14202. let _task = _unitJson[i].chapterInfo[0].taskJson;
  14203. for (var j = 0; j < _task.length; j++) {
  14204. let _eList = _task[j].eList;
  14205. for (var k = 0; k < _eList.length; k++) {
  14206. delete _eList[k].target;
  14207. }
  14208. }
  14209. }
  14210. _this.$forceUpdate();
  14211. if (_this.cid) {
  14212. _this.updateWork();
  14213. }
  14214. })
  14215. .catch(() => {
  14216. return;
  14217. });
  14218. },
  14219. selectEva() {
  14220. let params = {
  14221. oid: this.oid,
  14222. };
  14223. this.ajax
  14224. .get(this.$store.state.api + "selectAllEvaluation", params)
  14225. .then((res) => {
  14226. this.evaJuri = res.data[0];
  14227. // 在复制操作之前记录滚动位置
  14228. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14229. // 执行复制操作
  14230. // 复制操作完成后恢复滚动位置
  14231. this.$nextTick(() => {
  14232. if (this.$refs.scrollContainer) {
  14233. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14234. }
  14235. });
  14236. })
  14237. .catch((err) => {
  14238. console.error(err);
  14239. });
  14240. },
  14241. setMindData() {
  14242. let targetArray = [];
  14243. this.data.data = [];
  14244. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  14245. let _eJson = Object.keys(this.eJson);
  14246. let _e = this.eJson;
  14247. for (let i = 0; i < _eJson.length; i++) {
  14248. let element = _e[_eJson[i]];
  14249. this.data.data.push({
  14250. id: element.id,
  14251. parentid: "root",
  14252. topic: element.name,
  14253. });
  14254. // targetArray.push({
  14255. // id: element.id,
  14256. // parentid: "root",
  14257. // name: element.name,
  14258. // });
  14259. targetArray.push({
  14260. value: element.name,
  14261. label: element.name,
  14262. children: [],
  14263. });
  14264. let _eJsonc = Object.keys(element.child);
  14265. let _e2 = element.child;
  14266. for (let j = 0; j < _eJsonc.length; j++) {
  14267. let _ec = _e2[_eJsonc[j]];
  14268. this.data.data.push({
  14269. id: _ec.id,
  14270. parentid: element.id,
  14271. topic: _ec.name,
  14272. });
  14273. // targetArray.push({
  14274. // id: _ec.id,
  14275. // parentid: element.id,
  14276. // name: _ec.name,
  14277. // });
  14278. targetArray[i].children.push({
  14279. value: _ec.name,
  14280. label: _ec.name,
  14281. children: [],
  14282. });
  14283. let _eJsonz = Object.keys(_ec.child);
  14284. let _e3 = _ec.child;
  14285. for (let z = 0; z < _eJsonz.length; z++) {
  14286. let _ez = _e3[_eJsonz[z]];
  14287. this.data.data.push({
  14288. id: _ez.id,
  14289. parentid: _ec.id,
  14290. topic: _ez.name,
  14291. });
  14292. // targetArray.push({
  14293. // id: _ez.id,
  14294. // parentid: _ec.id,
  14295. // name: _ez.name,
  14296. // });
  14297. targetArray[i].children[j].children.push({
  14298. value: _ez.name,
  14299. label: _ez.name,
  14300. });
  14301. }
  14302. }
  14303. }
  14304. this.targetArray = targetArray;
  14305. this.$forceUpdate();
  14306. },
  14307. /*添加评价 */
  14308. addEList(index, tIndex) {
  14309. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  14310. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  14311. value: "",
  14312. detail: "",
  14313. score: 5,
  14314. })
  14315. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  14316. { value: "", detail: "", score: 5 },
  14317. ]);
  14318. this.$forceUpdate();
  14319. },
  14320. openEList(index, tIndex) {
  14321. this.evaIndex = index;
  14322. this.evatIndex = tIndex;
  14323. this.evaBoxDialog = true;
  14324. },
  14325. addCET(index, tIndex) {
  14326. this.cetIndex = index;
  14327. this.cettIndex = tIndex;
  14328. this.selectAllType1();
  14329. },
  14330. addCETemplate() {
  14331. var array =
  14332. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  14333. .eList;
  14334. let params = [
  14335. {
  14336. uid: this.userid,
  14337. n: this.templateName,
  14338. json: JSON.stringify(array),
  14339. t: 1,
  14340. oid: this.oid,
  14341. },
  14342. ];
  14343. this.ajax
  14344. .post(this.$store.state.api + "addCETShare", params)
  14345. .then((res) => {
  14346. this.addTypeByCET(res.data[0][0].id);
  14347. })
  14348. .catch((err) => {
  14349. this.$message.error("网络不佳");
  14350. console.error(err);
  14351. });
  14352. },
  14353. addTypeByCET(id) {
  14354. if (this.setTypeJson.two == "") {
  14355. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  14356. return;
  14357. }
  14358. let params = {
  14359. cid: id,
  14360. };
  14361. this.ajax
  14362. .get(this.$store.state.api + "deleteCETLabel", params)
  14363. .then((res) => {
  14364. for (var i = 0; i < 2; i++) {
  14365. let tid = "";
  14366. if (i == 0) {
  14367. tid = this.setTypeJson.one;
  14368. } else {
  14369. tid = this.setTypeJson.two;
  14370. }
  14371. let params = [
  14372. {
  14373. cid: id,
  14374. tid: tid,
  14375. uid: this.userid,
  14376. },
  14377. ];
  14378. this.ajax
  14379. .post(this.$store.state.api + "addCETLabel", params)
  14380. .then((res) => {
  14381. this.$message({
  14382. message: "添加成功",
  14383. type: "success",
  14384. });
  14385. this.close();
  14386. })
  14387. .catch((err) => {
  14388. this.$message.error("网络不佳");
  14389. console.error(err);
  14390. });
  14391. }
  14392. })
  14393. .catch((err) => {
  14394. this.$message.error("网络不佳");
  14395. console.error(err);
  14396. });
  14397. },
  14398. updateEvaJson(array) {
  14399. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  14400. this.evatIndex
  14401. ].eList = array;
  14402. },
  14403. forceUpdate() {
  14404. this.$forceUpdate();
  14405. },
  14406. deletEList(index, tIndex, eIndex) {
  14407. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  14408. eIndex,
  14409. 1
  14410. );
  14411. this.$forceUpdate();
  14412. },
  14413. getChoosePic(t) {
  14414. this.chooseType = t;
  14415. this.getAllBanner();
  14416. },
  14417. getAllBanner() {
  14418. this.sysPicVisible = true;
  14419. let params = {
  14420. t: this.chooseType,
  14421. };
  14422. this.ajax
  14423. .get(this.$store.state.api + "selectAllBanner", params)
  14424. .then((res) => {
  14425. this.sysPic = res.data[0];
  14426. })
  14427. .catch((err) => {
  14428. console.error(err);
  14429. });
  14430. },
  14431. // getClass() {
  14432. // let params = {
  14433. // oid: this.oid,
  14434. // };
  14435. // this.ajax
  14436. // .get(this.$store.state.api + "selectClassBySchool", params)
  14437. // .then((res) => {
  14438. // this.classJuri = res.data[0];
  14439. // })
  14440. // .catch((err) => {
  14441. // console.error(err);
  14442. // });
  14443. // },
  14444. deleteSysPic() {
  14445. this.cover = [];
  14446. this.isSysPic = false;
  14447. this.isSysPic2 = false;
  14448. },
  14449. deleteSelectPic() {
  14450. this.selectJson.url = "";
  14451. },
  14452. setEListStar() {
  14453. this.$forceUpdate();
  14454. },
  14455. deletRateList(i) {
  14456. this.rateJson.splice(i, 1);
  14457. },
  14458. addRateList() {
  14459. this.rateJson.push({ detail: "", score: 5, value: "" });
  14460. },
  14461. addSt() {
  14462. this.sentenceList.push({
  14463. sentenceTitle: "",
  14464. addSentence: [],
  14465. rightAnswer: [],
  14466. });
  14467. },
  14468. addSen(i) {
  14469. if (!this.sentenceList[i].sentenceTitle) {
  14470. this.$message.error("请填写卡片内容!");
  14471. return;
  14472. }
  14473. if (this.sentenceList[i].sentenceTitle.length > 10) {
  14474. this.$message.error("卡片内容字数不能超过10位");
  14475. return;
  14476. }
  14477. if (
  14478. this.sentenceList[i].addSentence.indexOf(
  14479. this.sentenceList[i].sentenceTitle
  14480. ) !== -1
  14481. ) {
  14482. this.$message.error("不能添加重复的卡片内容!");
  14483. return;
  14484. }
  14485. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  14486. // this.isPushTitleList.push(this.sentenceTitle);
  14487. this.sentenceList[i].sentenceTitle = "";
  14488. },
  14489. setRightAnswer(s, i, j) {
  14490. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  14491. this.sentenceList[i].rightAnswer.push(s);
  14492. }
  14493. },
  14494. returnCard(r, i, j) {
  14495. this.sentenceList[i].rightAnswer.splice(j, 1);
  14496. },
  14497. addSentenceTool() {
  14498. for (var i = 0; i < this.sentenceList.length; i++) {
  14499. if (this.sentenceList[i].rightAnswer.length == 0) {
  14500. this.$message.error(`请将题目${i + 1}设置完整。`);
  14501. return;
  14502. }
  14503. if (
  14504. this.sentenceList[i].addSentence.length !=
  14505. this.sentenceList[i].rightAnswer.length
  14506. ) {
  14507. this.$message.error(`请将题目${i + 1}设置完整。`);
  14508. return;
  14509. }
  14510. }
  14511. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14512. this.taskCount
  14513. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  14514. this.sentenceList = [
  14515. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14516. ];
  14517. this.dialogVisibleSentence = false;
  14518. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14519. // itemTaskIndex
  14520. // ].toolChoose[toolIndex].tool = [];
  14521. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14522. // itemTaskIndex
  14523. // ].toolChoose[toolIndex].tool.push(i);
  14524. if (
  14525. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14526. .toolChoose[this.toolIndex].tool != 47
  14527. ) {
  14528. this.addTools(47, this.taskCount, this.toolIndex);
  14529. }
  14530. },
  14531. addTableJson() {
  14532. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  14533. // this.$message.error("请将信息填写完整!");
  14534. // return;
  14535. // }
  14536. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14537. this.taskCount
  14538. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  14539. // this.tableJson = [{ text: "" }];
  14540. // this.dialogVisibleTable = false;
  14541. this.$message.success("上传成功");
  14542. if (
  14543. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14544. .toolChoose[this.toolIndex].tool != 48
  14545. ) {
  14546. this.addTools(48, this.taskCount, this.toolIndex);
  14547. }
  14548. },
  14549. addWordJson() {
  14550. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14551. this.taskCount
  14552. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  14553. // this.wordJson = [{ text: "" }];
  14554. // this.dialogVisibleWord = false;
  14555. this.$message.success("上传成功");
  14556. if (
  14557. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14558. .toolChoose[this.toolIndex].tool != 52
  14559. ) {
  14560. this.addTools(52, this.taskCount, this.toolIndex);
  14561. }
  14562. },
  14563. addMoreUpload() {
  14564. if (this.uploadJson.length == 0) {
  14565. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14566. this.taskCount
  14567. ].toolChoose[this.toolIndex].uploadJson = [];
  14568. } else {
  14569. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14570. this.taskCount
  14571. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  14572. }
  14573. this.uploadJson = [];
  14574. this.dialogVisibleMoreUpload = false;
  14575. if (
  14576. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14577. .toolChoose[this.toolIndex].tool != 50
  14578. ) {
  14579. this.addTools(50, this.taskCount, this.toolIndex);
  14580. }
  14581. },
  14582. addPreTime() {
  14583. if (this.preTime == 0) {
  14584. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14585. this.taskCount
  14586. ].toolChoose[this.toolIndex].preTime = 0;
  14587. } else {
  14588. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14589. this.taskCount
  14590. ].toolChoose[this.toolIndex].preTime = this.preTime;
  14591. }
  14592. this.preTime = 0;
  14593. this.dialogVisiblePreTime = false;
  14594. if (
  14595. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14596. .toolChoose[this.toolIndex].tool != 10
  14597. ) {
  14598. this.addTools(10, this.taskCount, this.toolIndex);
  14599. }
  14600. },
  14601. goToTask(i) {
  14602. this.toolIndexType = "";
  14603. if (this.isClickColor == i + 1) {
  14604. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14605. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14606. // } else {
  14607. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14608. i
  14609. ].toolOpen = true;
  14610. // }
  14611. this.$forceUpdate();
  14612. return;
  14613. }
  14614. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14615. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14616. // } else {
  14617. document.querySelectorAll(".basic_box")[0].scrollTop =
  14618. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  14619. this.isClickColor = i + 1;
  14620. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14621. // }
  14622. this.$forceUpdate();
  14623. },
  14624. taskOpen(i, stageIndex) {
  14625. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14626. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  14627. } else {
  14628. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14629. }
  14630. this.updateWork3(stageIndex);
  14631. this.$forceUpdate();
  14632. },
  14633. goToTask2(i, stage) {
  14634. this.toolIndexType = "";
  14635. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  14636. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14637. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14638. // } else {
  14639. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14640. i
  14641. ].toolOpen = true;
  14642. // }
  14643. this.$forceUpdate();
  14644. return;
  14645. }
  14646. if (this.unitIndex != stage) {
  14647. if (this.panUnitJson() == 2) {
  14648. return;
  14649. }
  14650. this.unitSet(stage);
  14651. }
  14652. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14653. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14654. // } else {
  14655. document.querySelectorAll(".basic_box")[0].scrollTop =
  14656. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  14657. this.isClickColor = i + 1;
  14658. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14659. // }
  14660. this.$forceUpdate();
  14661. },
  14662. taskMove(type, index) {
  14663. this.$confirm(
  14664. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  14665. "提示",
  14666. {
  14667. confirmButtonText: "确定",
  14668. cancelButtonText: "取消",
  14669. type: "warning",
  14670. }
  14671. )
  14672. .then(() => {
  14673. if (type == 1) {
  14674. if (index > 0) {
  14675. let a = JSON.parse(
  14676. JSON.stringify(
  14677. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14678. index - 1
  14679. ]
  14680. )
  14681. );
  14682. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  14683. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  14684. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  14685. }
  14686. } else {
  14687. if (
  14688. index <
  14689. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  14690. ) {
  14691. let a = JSON.parse(
  14692. JSON.stringify(
  14693. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14694. index + 1
  14695. ]
  14696. )
  14697. );
  14698. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  14699. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  14700. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  14701. }
  14702. }
  14703. this.$forceUpdate();
  14704. })
  14705. .catch(() => {
  14706. return;
  14707. });
  14708. },
  14709. stageMove(type, index) {
  14710. if (type == 1) {
  14711. if (index > 0) {
  14712. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  14713. let acid = JSON.parse(
  14714. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  14715. );
  14716. let bcid = JSON.parse(
  14717. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  14718. );
  14719. this.unitJson3[index - 1] = this.unitJson3[index];
  14720. this.unitJson3[index] = a;
  14721. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  14722. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  14723. }
  14724. } else {
  14725. if (index < this.unitJson3.length - 1) {
  14726. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  14727. let acid = JSON.parse(
  14728. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  14729. );
  14730. let bcid = JSON.parse(
  14731. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  14732. );
  14733. this.unitJson3[index + 1] = this.unitJson3[index];
  14734. this.unitJson3[index] = a;
  14735. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  14736. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  14737. }
  14738. }
  14739. this.$forceUpdate();
  14740. },
  14741. addGroup(i) {
  14742. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  14743. this.groupJson.group.push({
  14744. name: "第" + (this.groupJson.group.length + 1) + "组",
  14745. });
  14746. },
  14747. deleteGroup(i) {
  14748. this.groupJson.group.splice(i, 1);
  14749. },
  14750. numberPan() {
  14751. if (
  14752. /[^\d]/.test(this.groupJson.number) ||
  14753. this.groupJson.number < 2 ||
  14754. this.groupJson.number > 10
  14755. ) {
  14756. this.$message.error("请输入2-10的数字");
  14757. this.groupJson.number = "";
  14758. }
  14759. },
  14760. numberPanJie() {
  14761. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  14762. this.$message.error('请输入大于1的数字')
  14763. this.courseJie = 1
  14764. }
  14765. },
  14766. numberPanTime() {
  14767. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  14768. this.$message.error('请输入大于1的数字')
  14769. this.courseTime = 1
  14770. }
  14771. },
  14772. addGroupJson() {
  14773. for (var i = 0; i < this.groupJson.group.length; i++) {
  14774. if (!this.groupJson.group[i].name) {
  14775. this.$message.error("请将信息填写完整!");
  14776. return;
  14777. }
  14778. }
  14779. if (!this.groupJson.number) {
  14780. this.$message.error("请将信息填写完整!");
  14781. return;
  14782. }
  14783. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14784. this.taskCount
  14785. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  14786. JSON.stringify(this.groupJson)
  14787. );
  14788. this.dialogVisibleGroup = false;
  14789. this.groupJson = {};
  14790. if (
  14791. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14792. .toolChoose[this.toolIndex].tool != 49
  14793. ) {
  14794. this.addTools(49, this.taskCount, this.toolIndex);
  14795. }
  14796. },
  14797. updateTime(preTime) {
  14798. this.preTime = preTime;
  14799. },
  14800. InviteChange(val) {
  14801. console.log(val);
  14802. let _check = [];
  14803. let _check2 = [];
  14804. for (var i = 0; i < this.grade2.length; i++) {
  14805. var gid = this.grade2[i].id;
  14806. _check.push(gid);
  14807. }
  14808. for (var i = 0; i < this.checkboxList2.length; i++) {
  14809. var _id = this.checkboxList2[i];
  14810. if (_check.indexOf(_id) !== -1) {
  14811. _check2.push(_id);
  14812. }
  14813. }
  14814. this.checkAll = _check2.length === _check.length;
  14815. return;
  14816. let array = JSON.parse(JSON.stringify(val));
  14817. this.inviteCode = this.inviteCode.filter((el) => {
  14818. if (val.indexOf(el.cid) != -1) {
  14819. array.splice(array.indexOf(el.cid), 1);
  14820. return el;
  14821. }
  14822. });
  14823. for (var i = 0; i < array.length; i++) {
  14824. this.getInviteCode(array[i]);
  14825. }
  14826. },
  14827. InviteChange2(val) {
  14828. console.log(val);
  14829. let _check = [];
  14830. let _check2 = [];
  14831. for (var i = 0; i < this.teacherJuri.length; i++) {
  14832. var gid = this.teacherJuri[i].userid;
  14833. _check.push(gid);
  14834. }
  14835. for (var i = 0; i < this.checkboxList3.length; i++) {
  14836. var _id = this.checkboxList3[i];
  14837. if (_check.indexOf(_id) !== -1) {
  14838. _check2.push(_id);
  14839. }
  14840. }
  14841. this.checkAll2 = _check2.length === _check.length;
  14842. this.setMan();
  14843. return;
  14844. let array = JSON.parse(JSON.stringify(val));
  14845. this.inviteCode = this.inviteCode.filter((el) => {
  14846. if (val.indexOf(el.cid) != -1) {
  14847. array.splice(array.indexOf(el.cid), 1);
  14848. return el;
  14849. }
  14850. });
  14851. for (var i = 0; i < array.length; i++) {
  14852. this.getInviteCode(array[i]);
  14853. }
  14854. },
  14855. handleCheckAllChange(val) {
  14856. if (val) {
  14857. for (var i = 0; i < this.grade2.length; i++) {
  14858. var gid = this.grade2[i].id;
  14859. if (this.checkboxList2.indexOf(gid) === -1) {
  14860. this.checkboxList2.push(gid);
  14861. }
  14862. }
  14863. } else {
  14864. let _check = [];
  14865. let _check2 = [];
  14866. for (var i = 0; i < this.grade2.length; i++) {
  14867. var gid = this.grade2[i].id;
  14868. _check.push(gid);
  14869. }
  14870. for (var i = 0; i < this.checkboxList2.length; i++) {
  14871. var _id = this.checkboxList2[i];
  14872. if (_check.indexOf(_id) === -1) {
  14873. _check2.push(_id);
  14874. }
  14875. }
  14876. this.checkboxList2 = _check2;
  14877. }
  14878. this.isIndeterminate = false;
  14879. },
  14880. handleCheckAllChange2(val) {
  14881. if (val) {
  14882. for (var i = 0; i < this.teacherJuri.length; i++) {
  14883. var gid = this.teacherJuri[i].userid;
  14884. if (this.checkboxList3.indexOf(gid) === -1) {
  14885. this.checkboxList3.push(gid);
  14886. }
  14887. }
  14888. } else {
  14889. let _check = [];
  14890. let _check2 = [];
  14891. for (var i = 0; i < this.teacherJuri.length; i++) {
  14892. var gid = this.teacherJuri[i].userid;
  14893. _check.push(gid);
  14894. }
  14895. for (var i = 0; i < this.checkboxList3.length; i++) {
  14896. var _id = this.checkboxList3[i];
  14897. if (_check.indexOf(_id) === -1) {
  14898. _check2.push(_id);
  14899. }
  14900. }
  14901. this.checkboxList3 = _check2;
  14902. }
  14903. this.isIndeterminate2 = false;
  14904. },
  14905. async getInviteCode(cid) {
  14906. let code = this.randomNumber();
  14907. let params = {
  14908. code: code,
  14909. oid: this.oid,
  14910. };
  14911. let type = 1;
  14912. for (var i = 0; i < this.inviteCode.length; i++) {
  14913. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  14914. type = 2;
  14915. }
  14916. }
  14917. if (type == 2) {
  14918. this.getInviteCode(cid);
  14919. return;
  14920. }
  14921. const res = await this.ajax.get(
  14922. this.$store.state.api + "selectInviteCode2",
  14923. params
  14924. );
  14925. if (
  14926. res.data.length &&
  14927. res.data[0].length &&
  14928. res.data[0][0].courseId != this.cid
  14929. ) {
  14930. this.getInviteCode(cid);
  14931. return;
  14932. }
  14933. let array = [];
  14934. for (var i = 0; i < this.inviteCode.length; i++) {
  14935. array.push(this.inviteCode[i].cid);
  14936. }
  14937. if (array.indexOf(cid) != -1) {
  14938. this.inviteCode[array.indexOf(cid)].ic = code;
  14939. } else {
  14940. this.inviteCode.push({ cid: cid, ic: code });
  14941. }
  14942. },
  14943. OpenInviteD(cid) {
  14944. let array = [];
  14945. this.icode = "";
  14946. for (var i = 0; i < this.inviteCode.length; i++) {
  14947. array.push(this.inviteCode[i].cid);
  14948. }
  14949. if (array.indexOf(cid) != -1) {
  14950. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  14951. }
  14952. this.inviteId = cid;
  14953. this.dialogVisibleInvite = true;
  14954. },
  14955. addInvite() {
  14956. let reg = /^[A-Za-z0-9]{4,}$/;
  14957. if (!reg.test(this.icode)) {
  14958. this.$message.error("请输入至少四位数字或英文组合的随机码");
  14959. return;
  14960. }
  14961. let type = 1;
  14962. for (var i = 0; i < this.inviteCode.length; i++) {
  14963. if (
  14964. this.inviteCode[i].cid != this.inviteId &&
  14965. this.icode == this.inviteCode[i].ic
  14966. ) {
  14967. type = 2;
  14968. }
  14969. }
  14970. if (type == 2) {
  14971. this.$message.error("已有此随机码,不能重复");
  14972. return;
  14973. }
  14974. let params = {
  14975. code: this.icode,
  14976. oid: this.oid,
  14977. };
  14978. this.ajax
  14979. .get(this.$store.state.api + "selectInviteCode", params)
  14980. .then((res) => {
  14981. if (
  14982. res.data.length &&
  14983. res.data[0].length &&
  14984. res.data[0][0].courseId != this.cid
  14985. ) {
  14986. this.$message.error("已有此随机码,不能重复");
  14987. return;
  14988. }
  14989. let array = [];
  14990. for (var i = 0; i < this.inviteCode.length; i++) {
  14991. array.push(this.inviteCode[i].cid);
  14992. }
  14993. if (array.indexOf(this.inviteId) != -1) {
  14994. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  14995. } else {
  14996. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  14997. }
  14998. this.icode = "";
  14999. this.dialogVisibleInvite = false;
  15000. })
  15001. .catch((err) => {
  15002. console.error(err);
  15003. });
  15004. },
  15005. randomNumber() {
  15006. // 随机生成两位数
  15007. // let num = Math.floor(Math.random() * 900) + 100;
  15008. // 生成 0 到 99 之间的随机整数
  15009. const randomNumber = Math.floor(Math.random() * 100);
  15010. // 如果随机数小于 10,补上前导零
  15011. const num =
  15012. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  15013. // 随机生成两个大写字母
  15014. let letters = "";
  15015. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  15016. for (let i = 0; i < 3; i++) {
  15017. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  15018. }
  15019. // 随机生成两位数字和字母的组合
  15020. let mix = "";
  15021. let chars =
  15022. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  15023. for (let i = 0; i < 3; i++) {
  15024. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  15025. mix += char;
  15026. }
  15027. // 随机选择一种类型
  15028. let type = Math.floor(Math.random() * 3);
  15029. return num;
  15030. // 根据类型输出结果
  15031. switch (type) {
  15032. case 0:
  15033. console.log(num); // 输出两位数
  15034. return num;
  15035. case 1:
  15036. console.log(letters); // 输出两个大写字母
  15037. return letters;
  15038. case 2:
  15039. console.log(mix); // 输出两位数字和字母的组合
  15040. return mix;
  15041. }
  15042. },
  15043. getPaste() {
  15044. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15045. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15046. if (!iframe && !iframe2) {
  15047. return;
  15048. }
  15049. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15050. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15051. if (copyData && copyData.stageData && copyData.stageData.length) {
  15052. this.isPasteStage = true;
  15053. }
  15054. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  15055. this.isPasteStage = true;
  15056. }
  15057. if (copyData && copyData.selectData.length) {
  15058. this.isPasteChoice = true;
  15059. }
  15060. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  15061. this.isPasteTask = true;
  15062. }
  15063. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  15064. this.isPasteTask = true;
  15065. }
  15066. },
  15067. setCover() {
  15068. var _this = this;
  15069. if(_this.cover.length){
  15070. return;
  15071. }
  15072. _this.imageloading2 = true
  15073. _this.ajax
  15074. .post("https://gpt.cocorobo.cn/search_image", {
  15075. page: _this.ppage,
  15076. pagesize: 9,
  15077. query: _this.courseName,
  15078. })
  15079. .then(function (response) {
  15080. // console.log(response.data.data);
  15081. var data = response.data.FunctionResponse.result;
  15082. _this.cover = [];
  15083.       setTimeout(() => {
  15084.         _this.cover[0] = {
  15085.           name: "网络图片.png",
  15086.           url: data[0].thumbnail
  15087.         };
  15088.         _this.imgChange1(null, null, 1, null);
  15089.         _this.$forceUpdate();
  15090.       }, 0);
  15091. _this.imageloading2 = false
  15092. })
  15093. .catch(function (error) {
  15094. _this.imageloading2 = false
  15095. console.log(error);
  15096. });
  15097. },
  15098. searchImage() {
  15099. var _this = this;
  15100. _this.imageList = [];
  15101. if (!_this.searchImageValue) {
  15102. _this.sysPicVisible2 = true;
  15103. return;
  15104. }
  15105. _this.imageloading = true;
  15106. _this.ajax
  15107. .post("https://gpt.cocorobo.cn/search_image", {
  15108. page: _this.ppage,
  15109. pagesize: 9,
  15110. query: _this.searchImageValue,
  15111. })
  15112. .then(function (response) {
  15113. // console.log(response.data.data);
  15114. var data = response.data.FunctionResponse.result;
  15115. for (var i = 0; i < data.length; i++) {
  15116. _this.imageList.push({ url: data[i].thumbnail });
  15117. }
  15118. _this.imageloading = false;
  15119. })
  15120. .catch(function (error) {
  15121. console.log(error);
  15122. });
  15123. _this.sysPicVisible2 = true;
  15124. },
  15125. changePicture() {
  15126. this.ppage++;
  15127. this.searchImage();
  15128. },
  15129. resetImage() {
  15130. this.ppage = 1;
  15131. this.searchImage();
  15132. },
  15133. jumpGj(i, j) {
  15134. if (i + 1 != this.isClickColor) {
  15135. this.isClickColor = i + 1;
  15136. }
  15137. var a = document.scrollingElement;
  15138. this.toolIndexType = `gj${i}${j}`;
  15139. let target = document.querySelector(`#gj${i}${j}`);
  15140. if (target) {
  15141. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15142. setTimeout(() => {
  15143. target.scrollIntoView(true);
  15144. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15145. j
  15146. ].isFold3 = false;
  15147. setTimeout(() => {
  15148. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15149. }, 0);
  15150. }, 0);
  15151. }
  15152. },
  15153. jumpGj2(i, j, k) {
  15154. if (this.unitIndex != k) {
  15155. if (this.panUnitJson() == 2) {
  15156. return;
  15157. }
  15158. this.unitSet(k);
  15159. }
  15160. setTimeout(() => {
  15161. if (i + 1 != this.isClickColor) {
  15162. this.isClickColor = i + 1;
  15163. }
  15164. var a = document.scrollingElement;
  15165. this.toolIndexType = `gj${i}${j}${k}`;
  15166. let target = document.querySelector(`#gj${i}${j}`);
  15167. if (target) {
  15168. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15169. setTimeout(() => {
  15170. target.scrollIntoView(true);
  15171. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15172. j
  15173. ].isFold3 = false;
  15174. setTimeout(() => {
  15175. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15176. }, 0);
  15177. }, 0);
  15178. }
  15179. }, 0);
  15180. },
  15181. dragStart(val, i, j) {
  15182. console.log(this.taskCount);
  15183. this.dragType = "drag";
  15184. this.taskCount = j;
  15185. this.oldIndex = i;
  15186. this.oldData = val;
  15187. },
  15188. dragOver(i, j) {
  15189. this.typeIndex = "chapter-" + j + "-" + i;
  15190. this.newIndex = i;
  15191. },
  15192. dragEnd() {
  15193. if (this.dragType != "drag") {
  15194. this.typeIndex = "";
  15195. this.newIndex = "";
  15196. this.dragType = "";
  15197. this.isdrag = "";
  15198. return;
  15199. }
  15200. console.log(this.taskCount);
  15201. let newItems = [
  15202. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15203. .chapterData,
  15204. ];
  15205. // 删除老的节点
  15206. newItems.splice(this.oldIndex, 1);
  15207. // 在列表中目标位置增加新的节点
  15208. newItems.splice(this.newIndex, 0, this.oldData);
  15209. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15210. this.taskCount
  15211. ].chapterData = [...newItems];
  15212. this.typeIndex = "";
  15213. this.newIndex = "";
  15214. this.dragType = "";
  15215. this.isdrag = "";
  15216. this.$forceUpdate();
  15217. },
  15218. dragTaskStart(val, i, j) {
  15219. this.dragType = "task";
  15220. this.oldIndex = i;
  15221. this.oldData = val;
  15222. this.oldUnitIndex = j;
  15223. },
  15224. dragTaskOver(i, j) {
  15225. this.typeIndex = "task-" + i;
  15226. this.newIndex = i;
  15227. this.checkUnitIndex = j;
  15228. },
  15229. async dragTaskEnd() {
  15230. if (this.dragType != "task") {
  15231. this.newIndex = "";
  15232. this.dragType = "";
  15233. this.typeIndex = "";
  15234. this.checkUnitIndex = "";
  15235. this.isdrag = "";
  15236. return;
  15237. }
  15238. if (
  15239. this.newIndex == this.oldIndex &&
  15240. this.oldUnitIndex == this.checkUnitIndex
  15241. ) {
  15242. this.newIndex = "";
  15243. this.dragType = "";
  15244. this.typeIndex = "";
  15245. this.checkUnitIndex = "";
  15246. this.isdrag = "";
  15247. return;
  15248. }
  15249. let count1 = await this.getWorksCount(
  15250. 2,
  15251. this.checkUnitIndex,
  15252. this.newIndex,
  15253. 0
  15254. );
  15255. let count2 = await this.getWorksCount(
  15256. 2,
  15257. this.oldUnitIndex,
  15258. this.oldIndex,
  15259. 0
  15260. );
  15261. if (count1 > 0 || count2 > 0) {
  15262. this.$confirm(
  15263. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15264. "提示",
  15265. {
  15266. confirmButtonText: "确定",
  15267. cancelButtonText: "取消",
  15268. type: "warning",
  15269. }
  15270. )
  15271. .then(() => {
  15272. if (this.oldUnitIndex != this.checkUnitIndex) {
  15273. let newItems = [
  15274. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15275. ];
  15276. // 删除老的节点
  15277. newItems.splice(this.oldIndex, 1);
  15278. // 在列表中目标位置增加新的节点
  15279. let newItems2 = [
  15280. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15281. ];
  15282. newItems2.splice(this.newIndex, 0, this.oldData);
  15283. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15284. ...newItems,
  15285. ];
  15286. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15287. ...newItems2,
  15288. ];
  15289. } else {
  15290. let newItems = [
  15291. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15292. ];
  15293. let chapterData = []
  15294. if (this.oldIndex == 0) {
  15295. chapterData = newItems[this.oldIndex].chapterData
  15296. newItems[this.oldIndex].chapterData = []
  15297. } else if (this.newIndex == 0) {
  15298. chapterData = newItems[this.newIndex].chapterData
  15299. newItems[this.oldIndex].chapterData = []
  15300. }
  15301. // 删除老的节点
  15302. newItems.splice(this.oldIndex, 1);
  15303. // 在列表中目标位置增加新的节点
  15304. newItems.splice(this.newIndex, 0, this.oldData);
  15305. if (this.oldIndex == 0 || this.newIndex == 0) {
  15306. newItems[0].chapterData = chapterData
  15307. }
  15308. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15309. ...newItems,
  15310. ];
  15311. }
  15312. this.typeIndex = "";
  15313. this.newIndex = "";
  15314. this.dragType = "";
  15315. this.checkUnitIndex = "";
  15316. this.isdrag = "";
  15317. this.updateWork();
  15318. this.$forceUpdate();
  15319. })
  15320. .catch(() => {
  15321. this.newIndex = "";
  15322. this.dragType = "";
  15323. this.typeIndex = "";
  15324. this.checkUnitIndex = "";
  15325. this.isdrag = "";
  15326. return;
  15327. });
  15328. } else {
  15329. if (this.oldUnitIndex != this.checkUnitIndex) {
  15330. let newItems = [
  15331. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15332. ];
  15333. // 删除老的节点
  15334. newItems.splice(this.oldIndex, 1);
  15335. // 在列表中目标位置增加新的节点
  15336. let newItems2 = [
  15337. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15338. ];
  15339. newItems2.splice(this.newIndex, 0, this.oldData);
  15340. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15341. ...newItems,
  15342. ];
  15343. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15344. ...newItems2,
  15345. ];
  15346. } else {
  15347. let newItems = [
  15348. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15349. ];
  15350. let chapterData = []
  15351. if (this.oldIndex == 0) {
  15352. chapterData = newItems[this.oldIndex].chapterData
  15353. newItems[this.oldIndex].chapterData = []
  15354. } else if (this.newIndex == 0) {
  15355. chapterData = newItems[this.newIndex].chapterData
  15356. newItems[this.oldIndex].chapterData = []
  15357. }
  15358. // 删除老的节点
  15359. newItems.splice(this.oldIndex, 1);
  15360. // 在列表中目标位置增加新的节点
  15361. newItems.splice(this.newIndex, 0, this.oldData);
  15362. if (this.oldIndex == 0 || this.newIndex == 0) {
  15363. newItems[0].chapterData = chapterData
  15364. }
  15365. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15366. ...newItems,
  15367. ];
  15368. }
  15369. this.typeIndex = "";
  15370. this.newIndex = "";
  15371. this.dragType = "";
  15372. this.checkUnitIndex = "";
  15373. this.isdrag = "";
  15374. this.updateWork();
  15375. this.$forceUpdate();
  15376. }
  15377. },
  15378. dragUnitStart(val, i) {
  15379. this.dragType = "Unit";
  15380. this.oldIndex = i;
  15381. this.oldData = val;
  15382. },
  15383. dragUnitOver(i) {
  15384. this.typeIndex = "Unit-" + i;
  15385. this.newIndex = i;
  15386. console.log(i, this.unitJson[i].toolOpen);
  15387. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  15388. this.unitJson[i].toolOpen = true;
  15389. this.updateWork();
  15390. this.$forceUpdate();
  15391. }
  15392. },
  15393. async dragUnitEnd() {
  15394. if (this.dragType != "Unit") {
  15395. this.newIndex = "";
  15396. this.dragType = "";
  15397. this.typeIndex = "";
  15398. this.isdrag = "";
  15399. return;
  15400. }
  15401. if (this.newIndex == this.oldIndex) {
  15402. this.newIndex = "";
  15403. this.dragType = "";
  15404. this.typeIndex = "";
  15405. this.isdrag = "";
  15406. return;
  15407. }
  15408. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  15409. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  15410. console.log(count1, count2);
  15411. if (count1 > 0 || count2 > 0) {
  15412. this.$confirm(
  15413. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  15414. "提示",
  15415. {
  15416. confirmButtonText: "确定",
  15417. cancelButtonText: "取消",
  15418. type: "warning",
  15419. }
  15420. )
  15421. .then(() => {
  15422. let newItems = [...this.unitJson];
  15423. // 删除老的节点
  15424. newItems.splice(this.oldIndex, 1);
  15425. // 在列表中目标位置增加新的节点
  15426. newItems.splice(this.newIndex, 0, this.oldData);
  15427. this.unitJson = [...newItems];
  15428. this.typeIndex = "";
  15429. this.newIndex = "";
  15430. this.dragType = "";
  15431. this.isdrag = "";
  15432. this.updateWork();
  15433. this.$forceUpdate();
  15434. })
  15435. .catch(() => {
  15436. this.newIndex = "";
  15437. this.dragType = "";
  15438. this.typeIndex = "";
  15439. this.isdrag = "";
  15440. return;
  15441. });
  15442. } else {
  15443. let newItems = [...this.unitJson];
  15444. // 删除老的节点
  15445. newItems.splice(this.oldIndex, 1);
  15446. // 在列表中目标位置增加新的节点
  15447. newItems.splice(this.newIndex, 0, this.oldData);
  15448. this.unitJson = [...newItems];
  15449. this.typeIndex = "";
  15450. this.newIndex = "";
  15451. this.dragType = "";
  15452. this.isdrag = "";
  15453. this.updateWork();
  15454. this.$forceUpdate();
  15455. }
  15456. },
  15457. getWorksCount(type, stage, task, tool) {
  15458. return new Promise((resolve, reject) => {
  15459. let params = [
  15460. {
  15461. cid: this.cid,
  15462. stage: stage,
  15463. task: task,
  15464. tool: tool,
  15465. type: type,
  15466. },
  15467. ];
  15468. this.ajax
  15469. .post(this.$store.state.api + "getCourseWorkCount", params)
  15470. .then((res) => {
  15471. let count = res.data[0][0].count;
  15472. resolve(count);
  15473. })
  15474. .catch((err) => {
  15475. resolve(0);
  15476. this.$message.error("网络不佳");
  15477. console.error(err);
  15478. });
  15479. });
  15480. },
  15481. getTwoType(id) {
  15482. this.twoJson = [];
  15483. var array = this.CourseTypeJson1[
  15484. "3f8eed32-aba9-11ee-b534-005056b86db5"
  15485. ].filter((e) => {
  15486. return e.ppid == id;
  15487. });
  15488. this.twoJson = array;
  15489. this.$forceUpdate();
  15490. },
  15491. ctype() {
  15492. this.oneJson =
  15493. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  15494. },
  15495. selectAllType1() {
  15496. this.CourseType1 = [];
  15497. this.CourseTypeJson1 = {};
  15498. this.courseTypeId1 = {};
  15499. this.$forceUpdate();
  15500. let params = {
  15501. org: this.org && this.org != "" ? this.org : "",
  15502. oid: this.oid && this.oid != "" ? this.oid : "",
  15503. };
  15504. this.ajax
  15505. .get(this.$store.state.api + "selectAllEvaType", params)
  15506. .then((res) => {
  15507. this.CourseType1 = res.data;
  15508. for (var i = 0; i < res.data[0].length; i++) {
  15509. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  15510. res.data[0][i].name = "一级分类";
  15511. } else if (
  15512. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  15513. ) {
  15514. res.data[0][i].name = "二级分类";
  15515. }
  15516. if (!this.cid) {
  15517. this.courseTypeId1[res.data[0][i].id] = [];
  15518. }
  15519. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  15520. this.CourseTypeJson1[res.data[0][i].id] = [];
  15521. }
  15522. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  15523. for (var j = 0; j < res.data[1].length; j++) {
  15524. if (res.data[0][i].id == res.data[1][j].pid) {
  15525. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  15526. }
  15527. }
  15528. // } else {
  15529. if (res.data[2].length > 0) {
  15530. for (var j = 0; j < res.data[2].length; j++) {
  15531. if (res.data[0][i].id == res.data[2][j].pid) {
  15532. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  15533. }
  15534. }
  15535. }
  15536. if (res.data[3].length > 0) {
  15537. for (var j = 0; j < res.data[3].length; j++) {
  15538. if (res.data[0][i].id == res.data[3][j].pid) {
  15539. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  15540. }
  15541. }
  15542. }
  15543. // }
  15544. }
  15545. this.ctype();
  15546. this.cetBoxDialog = true;
  15547. })
  15548. .catch((err) => {
  15549. console.error(err);
  15550. });
  15551. },
  15552. setAiJson(pan,string,string2){
  15553. if(pan == 'aiTeacher2'){
  15554. this.aiJson['teacherDetail2'] = string
  15555. }else if(pan == 'aiRateRuleA'){
  15556. this.aiJson['aiRateRule'] = string
  15557. }else if(pan == 'aiOutline2'){
  15558. this.aiJson['aiOutlineTask'] = string
  15559. this.aiJson['aiOutlineDetail'] = string2
  15560. this.aiText2 = ''
  15561. }else if(pan == 'aiTeacher3'){
  15562. this.aiJson['aiCpoteTask'] = string
  15563. this.aiJson['teacherDetail2'] = string2
  15564. this.aiText2 = ''
  15565. }else if(pan == 'aiTask2'){
  15566. this.aiJson['aiTask'] = string
  15567. }else if(pan == 'aiteacherTextDetail'){
  15568. this.aiJson['aiAbstract'] = string
  15569. }else if(pan == 'aitargetTextDetail'){
  15570. this.aiJson['aiTarget'] = string
  15571. }else if(pan == 'aitargetTextDetail2'){
  15572. this.aiJson['aiTarget2'] = string
  15573. }else if(pan == 'aitargetTextDetail3'){
  15574. this.aiJson['aiTargetGet'] = string
  15575. this.aiJson['aiTarget2'] = string2
  15576. }else {
  15577. this.aiJson[pan] = string
  15578. }
  15579. this.$forceUpdate();
  15580. },
  15581. editTask3(index){
  15582. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  15583. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  15584. }else {
  15585. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  15586. }
  15587. this.$forceUpdate();
  15588. },
  15589. editTask2(index){
  15590. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  15591. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  15592. }else {
  15593. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  15594. }
  15595. this.$forceUpdate();
  15596. },
  15597. openRule(i, k){
  15598. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  15599. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  15600. }else {
  15601. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  15602. }
  15603. this.$forceUpdate();
  15604. },
  15605. editCpote(index){
  15606. if(this.cpote[index]){
  15607. this.cpote[index] = false
  15608. }else {
  15609. this.cpote[index] = true
  15610. }
  15611. this.$forceUpdate();
  15612. },
  15613. clickGenTT(){
  15614. if(!this.teacherInfoData.length){
  15615. this.$message.error("请上传教案");
  15616. return;
  15617. }
  15618. this.openAiDialog(2, 'aiteacherTextDetail',1)
  15619. setTimeout(() => {
  15620. this.openAiDialog(2, 'aitargetTextDetail',1)
  15621. }, 500);
  15622. },
  15623. clickGenTT2(){
  15624. if (this.courseName == "") {
  15625. this.$message.error("请补充填写课程名称");
  15626. return;
  15627. }
  15628. this.openAiDialog(2, 'aiDetail',1)
  15629. setTimeout(() => {
  15630. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  15631. this.openAiDialog(2, 'aitargetTextDetail3',1)
  15632. }, 500);
  15633. this.courseTextBool = true
  15634. },
  15635. openAiDialog2(clickType, type, callback, index, tindex){
  15636. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  15637. confirmButtonText: "确定",
  15638. cancelButtonText: "取消",
  15639. type: "warning",
  15640. })
  15641. .then(() => {
  15642. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  15643. // this.openAiDialog(clickType, 'aiTeacher')
  15644. // }else {
  15645. this.openAiDialog(clickType, type, callback, index, tindex)
  15646. // }
  15647. })
  15648. .catch(() => {
  15649. });
  15650. },
  15651. openAiDialog(clickType, type, callback, index, tindex) {
  15652. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  15653. this.$message.error("您没有权限修改/查看提示词");
  15654. return;
  15655. }
  15656. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  15657. this.$message.error("请上传教案");
  15658. return;
  15659. }
  15660. if (this.courseName == "") {
  15661. this.$message.error("请补充填写课程名称");
  15662. return;
  15663. }
  15664. this.aiText2 = ''
  15665. this.clickType = clickType
  15666. let sub = []
  15667. if (this.courseTypeId.length) {
  15668. for (var i = 0; i < this.courseTypeId.length; i++) {
  15669. let _sid = this.courseTypeId[i]
  15670. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15671. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15672. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15673. }
  15674. }
  15675. }
  15676. }
  15677. let mclass = []
  15678. if (this.courseTypeId.length) {
  15679. for (var i = 0; i < this.courseTypeId.length; i++) {
  15680. let _sid = this.courseTypeId[i]
  15681. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15682. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15683. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15684. }
  15685. }
  15686. }
  15687. }
  15688. if (type == "aiDetail") {
  15689. if (this.ttextLoading) {
  15690. this.$message({
  15691. message: "请回答完毕后再次发送",
  15692. type: "warning"
  15693. });
  15694. return;
  15695. }
  15696. this.aitype = "aiDetail"
  15697. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  15698. this.aiText = this.aiJson.aiDetail
  15699. this.aiCallBack = callback
  15700. } else if (type == "aiOutline") {
  15701. this.aitype = "aiOutline"
  15702. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  15703. this.aiText = this.aiJson.aiOutline
  15704. } else if (type == "aiOutline2") {
  15705. this.aitype = "aiOutline2"
  15706. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  15707. this.aiText = this.aiJson.aiOutlineTask
  15708. this.aiText2 = this.aiJson.aiOutlineDetail
  15709. } else if (type == "aiOutlineDetail2") {
  15710. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  15711. this.$message({
  15712. message: "请回答完毕后再次发送",
  15713. type: "warning"
  15714. });
  15715. return;
  15716. }
  15717. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  15718. this.$message.error('请输入任务名称')
  15719. return;
  15720. }
  15721. this.aitype = type
  15722. this.aiCallBack = callback
  15723. this.aiText = this.aiJson.aiOutlineDetail2
  15724. } else if (type == "aiTask") {
  15725. this.aitype = "aiTask"
  15726. var _text = ""
  15727. for (var i = 0; i < this.teacherText.length; i++) {
  15728. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  15729. }
  15730. // this.aiText = `请根据${_text}。`
  15731. this.aiText = this.aiJson.aiTask
  15732. this.aiCallBack = callback
  15733. } else if (type == "aiTask2") {
  15734. if (this.taskLoading[callback]) {
  15735. this.$message({
  15736. message: "请回答完毕后再次发送",
  15737. type: "warning"
  15738. });
  15739. return;
  15740. }
  15741. this.aitype = "aiTask2"
  15742. this.aiText = this.aiJson.aiTask
  15743. this.aiCallBack = [callback, index]
  15744. } else if (type == "aiDetail1") {
  15745. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  15746. this.$message({
  15747. message: "请回答完毕后再次发送",
  15748. type: "warning"
  15749. });
  15750. return;
  15751. }
  15752. this.aitype = "aiDetail1"
  15753. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  15754. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  15755. this.aiText = this.aiJson.aiDetail1
  15756. this.aiCallBack = callback
  15757. this.aiIndex = index
  15758. } else if (type == "aiDetail2") {
  15759. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  15760. this.$message({
  15761. message: "请回答完毕后再次发送",
  15762. type: "warning"
  15763. });
  15764. return;
  15765. }
  15766. this.aitype = "aiDetail2"
  15767. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  15768. this.aiText = this.aiJson.aiDetail2
  15769. this.aiCallBack = callback
  15770. this.aiIndex = index
  15771. } else if (type == "aiDetail3") {
  15772. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  15773. this.$message({
  15774. message: "请回答完毕后再次发送",
  15775. type: "warning"
  15776. });
  15777. return;
  15778. }
  15779. this.aitype = "aiDetail3"
  15780. this.aiText = this.aiJson.aiDetail3
  15781. this.aiIndex = index + '-' + tindex
  15782. } else if (type == "aiDetail4") {
  15783. var _text = ""
  15784. for (var i = 0; i < callback.length; i++) {
  15785. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  15786. }
  15787. this.aitype = "aiDetail4"
  15788. this.aiText = this.aiJson.aiDetail4
  15789. this.aiIndex = index
  15790. } else if (type == "aiTeacher") {
  15791. this.aitype = "aiTeacher"
  15792. var _text = ""
  15793. for (var i = 0; i < this.dArray.length; i++) {
  15794. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  15795. }
  15796. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15797. this.aiText = this.aiJson.aiTeacher
  15798. this.aiCallBack = callback
  15799. } else if (type == "aiTeacher2") {
  15800. this.aitype = "aiTeacher2"
  15801. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15802. } else if (type == "aiTeacher3") {
  15803. this.aitype = type
  15804. this.aiText = this.aiJson.aiCpoteTask
  15805. this.aiText2 = this.aiJson.teacherDetail2
  15806. } else if (type == "teacherDetail") {
  15807. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15808. this.$message({
  15809. message: "请回答完毕后再次发送",
  15810. type: "warning"
  15811. });
  15812. return;
  15813. }
  15814. this.aitype = "teacherDetail"
  15815. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15816. this.aiText = this.aiJson.teacherDetail
  15817. this.aiCallBack = callback
  15818. this.aiIndex = index
  15819. } else if (type == "teacherDetail2") {
  15820. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  15821. this.$message({
  15822. message: "请回答完毕后再次发送",
  15823. type: "warning"
  15824. });
  15825. return;
  15826. }
  15827. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  15828. this.$message.error('请输入任务名称')
  15829. return;
  15830. }
  15831. this.aitype = "teacherDetail2"
  15832. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  15833. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  15834. this.aiCallBack = callback
  15835. this.aiIndex = index
  15836. } else if (type == "aiCpote1") {
  15837. if (this.cpotetLoading.cpote1) {
  15838. this.$message({
  15839. message: "请回答完毕后再次发送",
  15840. type: "warning"
  15841. });
  15842. return;
  15843. }
  15844. this.aitype = "aiCpote1"
  15845. this.aiText = this.aiJson.cpote1
  15846. this.aiCallBack = callback
  15847. } else if (type == "aiCpote2") {
  15848. if (this.cpotetLoading.cpote2) {
  15849. this.$message({
  15850. message: "请回答完毕后再次发送",
  15851. type: "warning"
  15852. });
  15853. return;
  15854. }
  15855. this.aitype = "aiCpote2"
  15856. this.aiText = this.aiJson.cpote2
  15857. this.aiCallBack = callback
  15858. } else if (type == "aiCpote3") {
  15859. if (this.cpotetLoading.cpote3) {
  15860. this.$message({
  15861. message: "请回答完毕后再次发送",
  15862. type: "warning"
  15863. });
  15864. return;
  15865. }
  15866. this.aitype = "aiCpote3"
  15867. this.aiText = this.aiJson.cpote3
  15868. this.aiCallBack = callback
  15869. } else if (type == "aiCpote4") {
  15870. if (this.cpotetLoading.cpote4) {
  15871. this.$message({
  15872. message: "请回答完毕后再次发送",
  15873. type: "warning"
  15874. });
  15875. return;
  15876. }
  15877. this.aitype = "aiCpote4"
  15878. this.aiText = this.aiJson.cpote4
  15879. this.aiCallBack = callback
  15880. } else if (type == 'aiteacherTextDetail'){
  15881. if (this.tteacherTextLoading) {
  15882. this.$message({
  15883. message: "请回答完毕后再次发送",
  15884. type: "warning"
  15885. });
  15886. return;
  15887. }
  15888. this.aitype = type
  15889. this.aiText = this.aiJson.aiAbstract
  15890. this.aiCallBack = callback
  15891. } else if (type == 'aitargetTextDetail'){
  15892. if (this.ttargetTextLoading) {
  15893. this.$message({
  15894. message: "请回答完毕后再次发送",
  15895. type: "warning"
  15896. });
  15897. return;
  15898. }
  15899. this.aitype = type
  15900. this.aiText = this.aiJson.aiTarget
  15901. this.aiCallBack = callback
  15902. } else if (type == 'aitargetTextDetail2'){
  15903. if (this.ttargetTextLoading2) {
  15904. this.$message({
  15905. message: "请回答完毕后再次发送",
  15906. type: "warning"
  15907. });
  15908. return;
  15909. }
  15910. this.aitype = type
  15911. this.aiText = this.aiJson.aiTarget2
  15912. this.aiCallBack = callback
  15913. } else if (type == 'aitargetTextDetail3'){
  15914. if (this.ttargetTextLoading2) {
  15915. this.$message({
  15916. message: "请回答完毕后再次发送",
  15917. type: "warning"
  15918. });
  15919. return;
  15920. }
  15921. this.aitype = type
  15922. this.aiText = this.aiJson.aiTargetGet
  15923. this.aiText2 = this.aiJson.aiTarget2
  15924. this. aiCallBack= callback
  15925. } else if (type == 'aiSearchFile'){
  15926. if(this.fileSLoading) {
  15927. this.$message({
  15928. message: "请回答完毕后再次发送",
  15929. type: "warning"
  15930. });
  15931. return;
  15932. }
  15933. this.aitype = type
  15934. this.aiText = this.aiJson.aiSearchFile
  15935. } else if (type == 'aiRateRule'){
  15936. this.aitype = type
  15937. this.aiText = this.aiJson.aiRateRule
  15938. this.aiCallBack = [callback, index]
  15939. } else if (type == 'aiRateRuleA'){
  15940. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  15941. confirmButtonText: "生成所有",
  15942. cancelButtonText: "仅生成该任务",
  15943. distinguishCancelAndClose: true,
  15944. type: "warning",
  15945. })
  15946. .then(() => {
  15947. this.aitype = type
  15948. this.aiText = this.aiJson.aiRateRule
  15949. this.aiCallBack = [1,callback]
  15950. this.dialogVisibleAiD = true
  15951. }).catch((v) => {
  15952. console.log(v);
  15953. if (v == "cancel") {
  15954. this.aitype = type
  15955. this.aiText = this.aiJson.aiRateRule
  15956. this.aiCallBack = [2,callback]
  15957. this.dialogVisibleAiD = true
  15958. }
  15959. })
  15960. }
  15961. if(type != 'aiRateRuleA'){
  15962. this.dialogVisibleAiD = true
  15963. }
  15964. },
  15965. async aiConfirm(msg,msg2) {
  15966. let sub = []
  15967. if (this.courseTypeId.length) {
  15968. for (var i = 0; i < this.courseTypeId.length; i++) {
  15969. let _sid = this.courseTypeId[i]
  15970. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15971. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15972. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15973. }
  15974. }
  15975. }
  15976. }
  15977. let mclass = []
  15978. if (this.courseTypeId.length) {
  15979. for (var i = 0; i < this.courseTypeId.length; i++) {
  15980. let _sid = this.courseTypeId[i]
  15981. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15982. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15983. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15984. }
  15985. }
  15986. }
  15987. }
  15988. let url = []
  15989. if (this.infoData.length) {
  15990. for (var i = 0; i < this.infoData.length; i++) {
  15991. url.push(this.infoData[i].url)
  15992. }
  15993. }
  15994. if (this.aitype == "aiDetail") {
  15995. this.detailYou(msg)
  15996. } else if (this.aitype == "aiOutline") {
  15997. this.loading = true
  15998. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  15999. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16000. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  16001. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  16002. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16003. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16004. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16005. let message = `NOTICE
  16006. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16007. 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.
  16008. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16009. Instruction: Based on the context, follow "Format example", write content.
  16010. # Context
  16011. ## 要求
  16012. ${msg} 以及##参考资料
  16013. ## 参考资料
  16014. 课程名字:${this.courseName}
  16015. ${courseText ? '课程简要描述:' + courseText : ''}
  16016. ${sub.length ? '学科:' + sub.join(",") : ''}
  16017. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16018. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16019. detail输出不要输出成json,文本或者markdown都可以
  16020. # Format example
  16021. [{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"},{"task": "任务名称","detail": "${txt}"}]`
  16022. this.aiGet2(message, () => {
  16023. this.loading = false
  16024. this.isOutline = true
  16025. })
  16026. } else if (this.aitype == "aiOutline2") {
  16027. this.loading = true
  16028. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16029. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16030. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16031. let message = `NOTICE
  16032. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16033. 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.
  16034. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16035. Instruction: Based on the context, follow "Format example", write content.
  16036. # Context
  16037. ## 要求
  16038. ${msg} 以及##参考资料
  16039. ## 参考资料
  16040. 课程名字:${this.courseName}
  16041. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  16042. ${sub.length ? '学科:' + sub.join(",") : ''}
  16043. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16044. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16045. # Format example
  16046. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  16047. this.aiGetTask2(message, () => {
  16048. this.loading = false
  16049. this.isOutline = true
  16050. })
  16051. } else if (this.aitype == "aiOutlineDetail2") {
  16052. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  16053. } else if (this.aitype == "aiTask") {
  16054. var _text = ""
  16055. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16056. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16057. }
  16058. let message = `NOTICE
  16059. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16060. 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.
  16061. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16062. Instruction: Based on the context, follow "Format example", write content.
  16063. # Context
  16064. ## 要求
  16065. ${msg} 为**每个教学任务分别输出**以下内容。
  16066.  
  16067. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16068. ## 参考资料
  16069. 教学任务教案:${_text}
  16070. ## 格式要求
  16071. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  16072. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16073. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  16074. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16075. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16076. 出现选择题和问答题的概率提高
  16077. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  16078.  
  16079. # Format example
  16080. [{"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":"工具描述"}]}]`
  16081. this.loading = true
  16082. this.aiGet3(message, this.aiCallBack)
  16083. } else if (this.aitype == "aiTask2") {
  16084. if(this.aiCallBack[0] == 'all'){
  16085. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16086. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16087. let message = `NOTICE
  16088. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16089. 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.
  16090. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16091. Instruction: Based on the context, follow "Format example", write content.
  16092. # Context
  16093. ## 要求
  16094. ${msg} 为教学任务分别输出以下内容。
  16095.  
  16096. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16097. ## 参考资料
  16098. 教学任务教案:${_text}
  16099. ## 格式要求
  16100. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16101. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16102. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16103. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16104. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16105.  
  16106. # Format example
  16107. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16108. this.taskLoading[_task] = true
  16109. this.aiGet32(message, _task)
  16110. }
  16111. }else{
  16112. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16113. let message = `NOTICE
  16114. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16115. 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.
  16116. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16117. Instruction: Based on the context, follow "Format example", write content.
  16118. # Context
  16119. ## 要求
  16120. ${msg} 为教学任务分别输出以下内容。
  16121.  
  16122. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n#任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16123. ## 参考资料
  16124. 教学任务教案:${_text}
  16125. ## 格式要求
  16126. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16127. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16128. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16129. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16130. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16131.  
  16132. # Format example
  16133. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16134. this.taskLoading[this.aiCallBack] = true
  16135. this.aiGet32(message, this.aiCallBack[0])
  16136. }
  16137. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  16138. } else if (this.aitype == "aiDetail1") {
  16139. this.aiDetail(msg, this.aiIndex)
  16140. } else if (this.aitype == "aiDetail2") {
  16141. this.aiDetail2(msg, this.aiIndex)
  16142. } else if (this.aitype == "aiDetail3") {
  16143. let _index = this.aiIndex.split('-')
  16144. this.aiDetail3(msg, _index[0], _index[1])
  16145. } else if (this.aitype == "aiDetail4") {
  16146. this.aiDetail4(msg, this.aiIndex)
  16147. } else if (this.aitype == "teacherDetail") {
  16148. this.aiDetail5(msg, this.aiIndex)
  16149. } else if (this.aitype == "teacherDetail2") {
  16150. this.aiDetail52(msg, this.aiIndex)
  16151. } else if (this.aitype == "aiCpote1") {
  16152. this.aiCpote(msg, this.aiCallBack)
  16153. } else if (this.aitype == "aiCpote2") {
  16154. this.aiCpote(msg, this.aiCallBack)
  16155. } else if (this.aitype == "aiCpote3") {
  16156. this.aiCpote(msg, this.aiCallBack)
  16157. } else if (this.aitype == "aiCpote4") {
  16158. this.aiCpote(msg, this.aiCallBack)
  16159. } else if (this.aitype == "aiTeacher") {
  16160. this.loading = true
  16161. var _text = ""
  16162. for (var i = 0; i < this.dArray.length; i++) {
  16163. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  16164. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16165. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16166. let message = ` NOTICE
  16167. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16168. 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.
  16169. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16170. Instruction: Based on the context, follow "Format example", write content.
  16171. # Context
  16172. ## 要求
  16173. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  16174. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  16175. ${(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n## 任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16176. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16177. ## Format example
  16178. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  16179. this.aiGet4(message, () => {
  16180. this.loading = false
  16181. this.isOutline2 = true
  16182. })
  16183. } else if (this.aitype == "aiTeacher2"){
  16184. this.isOutline2 = true
  16185. setTimeout(()=>{
  16186. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16187. this.aiDetail52(msg, i)
  16188. }
  16189. }, 0)
  16190. } else if (this.aitype == "aiTeacher3"){
  16191. this.loading = true
  16192. let message = `NOTICE
  16193. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16194. 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.
  16195. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16196. Instruction: Based on the context, follow "Format example", write content.
  16197. # Context
  16198. ## 要求
  16199. ${msg} 以及##参考资料
  16200. ## 参考资料
  16201. 任务簇:${this.cpote.cpote4}
  16202. # Format example
  16203. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  16204. this.aiGetTask3(message, () => {
  16205. this.loading = false
  16206. this.isOutline2 = true
  16207. })
  16208. } else if (this.aitype == "aiteacherTextDetail") {
  16209. this.aiteacherTextDetail(msg)
  16210. } else if (this.aitype == "aitargetTextDetail") {
  16211. this.aitargetTextDetail(msg)
  16212. } else if (this.aitype == "aitargetTextDetail2") {
  16213. this.aitargetTextDetail2(msg)
  16214. } else if (this.aitype == "aitargetTextDetail3") {
  16215. this.aitargetTextDetail3(msg)
  16216. } else if (this.aitype == 'aiSearchFile'){
  16217. let messages = `NOTICE
  16218. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16219. 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.
  16220. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16221. Instruction: Based on the context, follow "Format example", write content.
  16222. ## 参考资料
  16223. 关键词:${this.courseName}
  16224. # Context
  16225. ## 要求
  16226. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  16227. # Format example
  16228. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  16229. this.fileSLoading = true
  16230. this.aiSearchFile(messages,()=>{
  16231. this.fileSLoading = false
  16232. })
  16233. } else if (this.aitype == 'aiRateRule'){
  16234. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  16235. } else if (this.aitype == 'aiRateRuleA'){
  16236. if(this.aiCallBack[0] == 1){
  16237. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16238. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  16239. for(var k = 0; k < task.eList.length; k++){
  16240. if(!task.eList[k].rule){
  16241. this.againEva(msg, i, k)
  16242. }
  16243. }
  16244. }
  16245. }else if(this.aiCallBack[0] == 2){
  16246. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  16247. for(var k = 0; k < task.eList.length; k++){
  16248. if(!task.eList[k].rule){
  16249. this.againEva(msg, this.aiCallBack[1], k)
  16250. }
  16251. }
  16252. }
  16253. }
  16254. this.setAiJson(this.aitype, msg, msg2)
  16255. },
  16256. detailYou(message) {
  16257. this.textLoading = true
  16258. this.ttextLoading = true
  16259. let sub = []
  16260. if (this.courseTypeId.length) {
  16261. for (var i = 0; i < this.courseTypeId.length; i++) {
  16262. let _sid = this.courseTypeId[i]
  16263. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16264. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16265. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16266. }
  16267. }
  16268. }
  16269. }
  16270. let mclass = []
  16271. if (this.courseTypeId.length) {
  16272. for (var i = 0; i < this.courseTypeId.length; i++) {
  16273. let _sid = this.courseTypeId[i]
  16274. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16275. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16276. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16277. }
  16278. }
  16279. }
  16280. }
  16281. let url = []
  16282. if (this.infoData.length) {
  16283. for (var i = 0; i < this.infoData.length; i++) {
  16284. url.push(this.infoData[i].url)
  16285. }
  16286. }
  16287. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16288. // --------
  16289. // ## 补充参考资料
  16290. // 补充资料:${url.join(",")}
  16291. // 补充描述:${this.courseText2} ##补充参考资料和
  16292. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16293. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16294. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16295. let msg = `NOTICE
  16296. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  16297. 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.
  16298. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16299. Instruction: Based on the context, follow "Format example", write content.
  16300. #Context
  16301. ## 参考资料
  16302. 课程名字:${this.courseName}
  16303. ${sub.length ? '学科:' + sub.join(",") : ''}
  16304. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16305. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  16306. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  16307. ${this.courseText && this.aiCallBack == 2 ? '参考内容:'+this.courseText : ''}
  16308. ## 要求
  16309. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  16310. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  16311. ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
  16312. 如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
  16313. this.aiGet(msg)
  16314. },
  16315. setUnitJson() {
  16316. 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 }] }
  16317. this.$forceUpdate()
  16318. },
  16319. async aiGet(messages) {
  16320. let _this = this
  16321. let fileid = []
  16322. if(!this.yiKeTemplateArray.includes(this.templateid)){
  16323. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  16324. if(_this.cankaoInfoData[i].fileid){
  16325. fileid.push(_this.cankaoInfoData[i].fileid)
  16326. }else {
  16327. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  16328. if(_fileid){
  16329. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  16330. _this.$forceUpdate();
  16331. if(_fileid != 1){
  16332. fileid.push(_fileid)
  16333. }
  16334. }
  16335. }
  16336. }
  16337. if(this.mode == 1){
  16338. for (var i = 0; i < _this.infoData.length; i++) {
  16339. if(_this.infoData[i].fileid){
  16340. fileid.push(_this.infoData[i].fileid)
  16341. }else {
  16342. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16343. if(_fileid){
  16344. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16345. _this.$forceUpdate();
  16346. if(_fileid != 1){
  16347. fileid.push(_fileid)
  16348. }
  16349. }
  16350. }
  16351. }
  16352. }
  16353. } else {
  16354. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16355. if (_this.infoData.length) {
  16356. for (var i = 0; i < _this.infoData.length; i++) {
  16357. if(_this.infoData[i].fileid){
  16358. fileid.push(_this.infoData[i].fileid)
  16359. }else {
  16360. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16361. if(_fileid){
  16362. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16363. _this.$forceUpdate();
  16364. if(_fileid != 1){
  16365. fileid.push(_fileid)
  16366. }
  16367. }
  16368. }
  16369. }
  16370. }
  16371. }
  16372. let _uuid = uuidv4();
  16373. // let params = JSON.stringify({
  16374. // // "model": "Chat",
  16375. // model: 'gpt-3.5-turbo',
  16376. // temperature: 0,
  16377. // max_tokens: 4096,
  16378. // top_p: 1,
  16379. // frequency_penalty: 0,
  16380. // presence_penalty: 0,
  16381. // messages: [{
  16382. // content: messages,
  16383. // role: 'user'
  16384. // }],
  16385. // uid: _uuid,
  16386. // mind_map_question: "",
  16387. // })
  16388. let params = {
  16389. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  16390. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16391. session_name: _uuid,
  16392. userId: _this.userid,
  16393. uid: _uuid,
  16394. file_ids: fileid.length ? [...fileid] : '',
  16395. model: 'gpt-4o-2024-08-06',
  16396. }
  16397. // let params = JSON.stringify({
  16398. // message: {
  16399. // anthropic_version: "bedrock-2023-05-31",
  16400. // max_tokens: 4096,
  16401. // temperature: 0,
  16402. // top_p: 1,
  16403. // messages: [{
  16404. // "role": "user",
  16405. // "content": messages
  16406. // }] ,
  16407. // },
  16408. // uid: _uuid,
  16409. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16410. // });
  16411. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16412. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  16413. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  16414. console.log(response);
  16415. // let data = response.data.FunctionResponse
  16416. // if (data.choices && data.choices.length && data.choices[0].message) {
  16417. // _this.courseText = data.choices[0].message.content
  16418. // }
  16419. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  16420. } else {
  16421. _this.$message.warning(response.data.FunctionResponse.result);
  16422. }
  16423. }).catch(function (error) {
  16424. _this.textLoading = false
  16425. _this.ttextLoading = false
  16426. console.log(error);
  16427. });
  16428. await _this.aiGetgetAiContent(_uuid)
  16429. },
  16430. aiGetgetAiContent(_uid) {
  16431. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16432. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16433. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16434. let _allText = "";
  16435. let _mdText = "";
  16436. let _iindex = 0
  16437. _source.onmessage = _e => {
  16438. let _eData = JSON.parse(_e.data).content;
  16439. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  16440. //对话已经完成
  16441. _mdText = _mdText.replace("_", "");
  16442. _source.close();
  16443. this.courseText = _mdText;
  16444. this.textLoading = false
  16445. this.ttextLoading = false
  16446. this.courseTextB = false
  16447. return;
  16448. } else {
  16449. _iindex++
  16450. //对话还在继续
  16451. let _text = "";
  16452. _text = _eData.replaceAll("'", "");
  16453. if (_allText == "") {
  16454. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  16455. } else {
  16456. _allText += _text;
  16457. }
  16458. _mdText = _allText + "_";
  16459. _mdText = _mdText.replace(/\\n/g, "\n");
  16460. _mdText = _mdText.replace(/\\/g, "");
  16461. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  16462. //转化返回的回复流数据
  16463. if(_iindex == 10){
  16464. this.courseText = _mdText;
  16465. _iindex = 0
  16466. }
  16467. this.textLoading = false
  16468. // 处理流数据
  16469. }
  16470. // this.$forceUpdate();
  16471. };
  16472. },
  16473. numberToChinese(number) {
  16474. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  16475. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  16476. let result = '';
  16477. let num = parseInt(number, 10);
  16478. let i = 0;
  16479. while (num > 0) {
  16480. result = chineseNum[num % 10] + chineseUnit[i] + result;
  16481. num = Math.floor(num / 10);
  16482. i++;
  16483. }
  16484. // 去除连续的零,保留一个零
  16485. result = result.replace(/零+/g, '零');
  16486. return result;
  16487. },
  16488. async aiGet2(messages, callback) {
  16489. let _this = this
  16490. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16491. if (_this.infoData.length) {
  16492. for (var i = 0; i < _this.infoData.length; i++) {
  16493. if(_this.infoData[i].fileid){
  16494. fileid.push(_this.infoData[i].fileid)
  16495. }else {
  16496. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16497. if(_fileid){
  16498. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16499. _this.$forceUpdate();
  16500. if(_fileid != 1){
  16501. fileid.push(_fileid)
  16502. }
  16503. }
  16504. }
  16505. }
  16506. }
  16507. console.log('fileid=========',fileid)
  16508. // let params = JSON.stringify({
  16509. // // "model": "Chat",
  16510. // model: 'gpt-3.5-turbo',
  16511. // temperature: 0,
  16512. // max_tokens: 4096,
  16513. // top_p: 1,
  16514. // frequency_penalty: 0,
  16515. // presence_penalty: 0,
  16516. // messages: [{
  16517. // content: messages,
  16518. // role: 'user'
  16519. // }],
  16520. // stream: false,
  16521. // uid: this.userid,
  16522. // mind_map_question: "",
  16523. // })
  16524. // // let params = JSON.stringify({
  16525. // // message: {
  16526. // // anthropic_version: "bedrock-2023-05-31",
  16527. // // max_tokens: 4096,
  16528. // // temperature: 0,
  16529. // // top_p: 1,
  16530. // // messages: [{
  16531. // // content: messages,
  16532. // // role: 'user'
  16533. // // }], //
  16534. // // },
  16535. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16536. // // });
  16537. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16538. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16539. // console.log(response);
  16540. // let data = response.data.FunctionResponse
  16541. // if (data.choices && data.choices.length && data.choices[0].message) {
  16542. // console.log(data.choices[0].message.content);
  16543. // let dArray = JSON.parse(data.choices[0].message.content)
  16544. // _this.dArray = dArray
  16545. // _this.unitJson[0].chapterInfo[0].taskJson = []
  16546. // for (var i = 0; i < dArray.length; i++) {
  16547. // let _task = dArray[i]
  16548. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16549. // task: _task.task,
  16550. // taskDetail: "",
  16551. // taskDetail2: _task.detail,
  16552. // taskDetail3: "",
  16553. // chapterData: [],
  16554. // toolText: "",
  16555. // toolChoose: [
  16556. // {
  16557. // tool: [],
  16558. // toolDetail: "",
  16559. // toolType: 0,
  16560. // askCount: 1,
  16561. // askTitle: "",
  16562. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16563. // },
  16564. // ],
  16565. // isShowTools: false,
  16566. // askCount: 1,
  16567. // isFold: 0,
  16568. // askTitle: "",
  16569. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16570. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16571. // homeworkList: [],
  16572. // })
  16573. // }
  16574. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16575. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16576. // _this.$forceUpdate();
  16577. // }
  16578. // // if (data.result) {
  16579. // // console.log(data.result);
  16580. // // let dArray = JSON.parse(data.result)
  16581. // // _this.dArray = dArray
  16582. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16583. // // for (var i = 0; i < dArray.length; i++) {
  16584. // // let _task = dArray[i]
  16585. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16586. // // task: _task.task,
  16587. // // taskDetail: "",
  16588. // // taskDetail2: _task.detail,
  16589. // // taskDetail3: "",
  16590. // // chapterData: [],
  16591. // // toolText: "",
  16592. // // toolChoose: [
  16593. // // {
  16594. // // tool: [],
  16595. // // toolDetail: "",
  16596. // // toolType: 0,
  16597. // // askCount: 1,
  16598. // // askTitle: "",
  16599. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16600. // // },
  16601. // // ],
  16602. // // isShowTools: false,
  16603. // // askCount: 1,
  16604. // // isFold: 1,
  16605. // // askTitle: "",
  16606. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16607. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16608. // // homeworkList: [],
  16609. // // })
  16610. // // }
  16611. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16612. // // _this.$forceUpdate();
  16613. // // }
  16614. // callback ? callback() : ''
  16615. // }).catch(function (error) {
  16616. // _this.loading = false
  16617. // console.log(error);
  16618. // });
  16619. this.isOutlineCancelToken = this.ajax.setCancelSource();
  16620. let parm = {
  16621. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16622. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16623. session_name: uuidv4(),
  16624. userId: this.userid,
  16625. file_ids: fileid.length ? [...fileid] : '',
  16626. model: 'gpt-4o-2024-08-06',
  16627. }
  16628. this.ajax
  16629. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  16630. .then((response) => {
  16631. console.log(response);
  16632. let data = response.data.FunctionResponse
  16633. if (data.message) {
  16634. console.log(data.message);
  16635. let dArray = {}
  16636. try {
  16637. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16638. } catch (error) {
  16639. console.log("error_________________" + error);
  16640. try {
  16641. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16642. let match = data.message.match(regex);
  16643. dArray = JSON.parse(match[0]);
  16644. // var message = data.message;
  16645. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16646. // var jsonEnd = message.indexOf("```", jsonStart);
  16647. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16648. // dArray = JSON.parse(jsonString);
  16649. } catch (error) {
  16650. try {
  16651. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16652. let match = data.message.match(regex);
  16653. // eval("var aaa = " + match[0])
  16654. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16655. } catch (error) {
  16656. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  16657. _this.aiGet2(messages, callback);
  16658. console.log("error_________________" + error);
  16659. }
  16660. console.log("error_________________" + error);
  16661. }
  16662. }
  16663. _this.dArray = dArray
  16664. console.log(dArray)
  16665. if(_this.panOutline() > 0){
  16666. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16667. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16668. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  16669. }
  16670. for (var i = 0; i < dArray.length; i++) {
  16671. let _task = dArray[i]
  16672. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16673. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  16674. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  16675. }else {
  16676. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16677. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  16678. taskDetail: "",
  16679. taskDetail2: _task.detail,
  16680. taskDetail3: "",
  16681. chapterData: [],
  16682. toolText: "",
  16683. toolChoose: [
  16684. {
  16685. tool: [],
  16686. toolDetail: "",
  16687. toolType: 0,
  16688. askCount: 1,
  16689. askTitle: "",
  16690. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16691. },
  16692. ],
  16693. isShowTools: false,
  16694. askCount: 1,
  16695. isFold: 0,
  16696. askTitle: "",
  16697. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16698. checkJson: [{ checkCount: [], checkPerent: [] }],
  16699. homeworkList: [],
  16700. })
  16701. }
  16702. }
  16703. }else {
  16704. _this.unitJson[0].chapterInfo[0].taskJson = []
  16705. for (var i = 0; i < dArray.length; i++) {
  16706. let _task = dArray[i]
  16707. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16708. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  16709. taskDetail: "",
  16710. taskDetail2: _task.detail,
  16711. taskDetail3: "",
  16712. chapterData: [],
  16713. toolText: "",
  16714. toolChoose: [
  16715. {
  16716. tool: [],
  16717. toolDetail: "",
  16718. toolType: 0,
  16719. askCount: 1,
  16720. askTitle: "",
  16721. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16722. },
  16723. ],
  16724. isShowTools: false,
  16725. askCount: 1,
  16726. isFold: 0,
  16727. askTitle: "",
  16728. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16729. checkJson: [{ checkCount: [], checkPerent: [] }],
  16730. homeworkList: [],
  16731. })
  16732. }
  16733. }
  16734. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16735. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16736. _this.$forceUpdate();
  16737. }
  16738. callback ? callback() : ''
  16739. })
  16740. .catch((error) => {
  16741. _this.loading = false
  16742. console.log(error);
  16743. });
  16744. },
  16745. cancelOutline(){
  16746. if (this.isOutlineCancelToken) {
  16747. this.$message.success("已经成功停止生成课程大纲")
  16748. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  16749. this.isOutlineCancelToken = null;
  16750. this.loading = false
  16751. }
  16752. },
  16753. async aiGetTask2(messages, callback) {
  16754. let _this = this
  16755. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16756. if (_this.infoData.length) {
  16757. for (var i = 0; i < _this.infoData.length; i++) {
  16758. if(_this.infoData[i].fileid){
  16759. fileid.push(_this.infoData[i].fileid)
  16760. }else {
  16761. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16762. if(_fileid){
  16763. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16764. _this.$forceUpdate();
  16765. if(_fileid != 1){
  16766. fileid.push(_fileid)
  16767. }
  16768. }
  16769. }
  16770. }
  16771. }
  16772. console.log('fileid=========',fileid)
  16773. // let params = JSON.stringify({
  16774. // // "model": "Chat",
  16775. // model: 'gpt-3.5-turbo',
  16776. // temperature: 0,
  16777. // max_tokens: 4096,
  16778. // top_p: 1,
  16779. // frequency_penalty: 0,
  16780. // presence_penalty: 0,
  16781. // messages: [{
  16782. // content: messages,
  16783. // role: 'user'
  16784. // }],
  16785. // stream: false,
  16786. // uid: this.userid,
  16787. // mind_map_question: "",
  16788. // })
  16789. // // let params = JSON.stringify({
  16790. // // message: {
  16791. // // anthropic_version: "bedrock-2023-05-31",
  16792. // // max_tokens: 4096,
  16793. // // temperature: 0,
  16794. // // top_p: 1,
  16795. // // messages: [{
  16796. // // content: messages,
  16797. // // role: 'user'
  16798. // // }], //
  16799. // // },
  16800. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16801. // // });
  16802. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16803. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  16804. // console.log(response);
  16805. // let data = response.data.FunctionResponse
  16806. // if (data.choices && data.choices.length && data.choices[0].message) {
  16807. // console.log(data.choices[0].message.content);
  16808. // let dArray = JSON.parse(data.choices[0].message.content)
  16809. // _this.dArray = dArray
  16810. // _this.unitJson[0].chapterInfo[0].taskJson = []
  16811. // for (var i = 0; i < dArray.length; i++) {
  16812. // let _task = dArray[i]
  16813. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16814. // task: _task.task,
  16815. // taskDetail: "",
  16816. // taskDetail2: _task.detail,
  16817. // taskDetail3: "",
  16818. // chapterData: [],
  16819. // toolText: "",
  16820. // toolChoose: [
  16821. // {
  16822. // tool: [],
  16823. // toolDetail: "",
  16824. // toolType: 0,
  16825. // askCount: 1,
  16826. // askTitle: "",
  16827. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16828. // },
  16829. // ],
  16830. // isShowTools: false,
  16831. // askCount: 1,
  16832. // isFold: 0,
  16833. // askTitle: "",
  16834. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16835. // checkJson: [{ checkCount: [], checkPerent: [] }],
  16836. // homeworkList: [],
  16837. // })
  16838. // }
  16839. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  16840. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16841. // _this.$forceUpdate();
  16842. // }
  16843. // // if (data.result) {
  16844. // // console.log(data.result);
  16845. // // let dArray = JSON.parse(data.result)
  16846. // // _this.dArray = dArray
  16847. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  16848. // // for (var i = 0; i < dArray.length; i++) {
  16849. // // let _task = dArray[i]
  16850. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  16851. // // task: _task.task,
  16852. // // taskDetail: "",
  16853. // // taskDetail2: _task.detail,
  16854. // // taskDetail3: "",
  16855. // // chapterData: [],
  16856. // // toolText: "",
  16857. // // toolChoose: [
  16858. // // {
  16859. // // tool: [],
  16860. // // toolDetail: "",
  16861. // // toolType: 0,
  16862. // // askCount: 1,
  16863. // // askTitle: "",
  16864. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16865. // // },
  16866. // // ],
  16867. // // isShowTools: false,
  16868. // // askCount: 1,
  16869. // // isFold: 1,
  16870. // // askTitle: "",
  16871. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16872. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  16873. // // homeworkList: [],
  16874. // // })
  16875. // // }
  16876. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16877. // // _this.$forceUpdate();
  16878. // // }
  16879. // callback ? callback() : ''
  16880. // }).catch(function (error) {
  16881. // _this.loading = false
  16882. // console.log(error);
  16883. // });
  16884. this.isOutlineCancelToken = this.ajax.setCancelSource();
  16885. let parm = {
  16886. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  16887. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16888. session_name: uuidv4(),
  16889. userId: this.userid,
  16890. file_ids: fileid.length ? [...fileid] : '',
  16891. model: 'gpt-4o-2024-08-06',
  16892. }
  16893. this.ajax
  16894. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  16895. .then((response) => {
  16896. console.log(response);
  16897. let data = response.data.FunctionResponse
  16898. if (data.message) {
  16899. console.log(data.message);
  16900. let dArray = {}
  16901. try {
  16902. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  16903. } catch (error) {
  16904. console.log("error_________________" + error);
  16905. try {
  16906. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16907. let match = data.message.match(regex);
  16908. dArray = JSON.parse(match[0]);
  16909. // var message = data.message;
  16910. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  16911. // var jsonEnd = message.indexOf("```", jsonStart);
  16912. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  16913. // dArray = JSON.parse(jsonString);
  16914. } catch (error) {
  16915. try {
  16916. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  16917. let match = data.message.match(regex);
  16918. // eval("var aaa = " + match[0])
  16919. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  16920. } catch (error) {
  16921. console.log("error_________________" + error);
  16922. }
  16923. console.log("error_________________" + error);
  16924. }
  16925. }
  16926. _this.dArray = dArray
  16927. if(_this.panOutline() > 0){
  16928. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16929. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  16930. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  16931. }
  16932. for (var i = 0; i < dArray.length; i++) {
  16933. let _task = dArray[i]
  16934. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  16935. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  16936. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  16937. }else {
  16938. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16939. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  16940. taskDetail: "",
  16941. taskDetail2: "",
  16942. taskDetail3: "",
  16943. chapterData: [],
  16944. toolText: "",
  16945. toolChoose: [
  16946. {
  16947. tool: [],
  16948. toolDetail: "",
  16949. toolType: 0,
  16950. askCount: 1,
  16951. askTitle: "",
  16952. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16953. },
  16954. ],
  16955. isShowTools: false,
  16956. askCount: 1,
  16957. isFold: 0,
  16958. askTitle: "",
  16959. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16960. checkJson: [{ checkCount: [], checkPerent: [] }],
  16961. homeworkList: [],
  16962. })
  16963. }
  16964. }
  16965. }else {
  16966. _this.unitJson[0].chapterInfo[0].taskJson = []
  16967. for (var i = 0; i < dArray.length; i++) {
  16968. let _task = dArray[i]
  16969. _this.unitJson[0].chapterInfo[0].taskJson.push({
  16970. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  16971. taskDetail: "",
  16972. taskDetail2: "",
  16973. taskDetail3: "",
  16974. chapterData: [],
  16975. toolText: "",
  16976. toolChoose: [
  16977. {
  16978. tool: [],
  16979. toolDetail: "",
  16980. toolType: 0,
  16981. askCount: 1,
  16982. askTitle: "",
  16983. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16984. },
  16985. ],
  16986. isShowTools: false,
  16987. askCount: 1,
  16988. isFold: 0,
  16989. askTitle: "",
  16990. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  16991. checkJson: [{ checkCount: [], checkPerent: [] }],
  16992. homeworkList: [],
  16993. })
  16994. }
  16995. }
  16996. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  16997. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  16998. _this.$forceUpdate();
  16999. setTimeout(()=>{
  17000. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17001. this.aiOutlineDetail('', i)
  17002. }
  17003. }, 0)
  17004. }
  17005. callback ? callback() : ''
  17006. })
  17007. .catch((error) => {
  17008. _this.loading = false
  17009. console.log(error);
  17010. });
  17011. },
  17012. async aiGetTask3(messages, callback) {
  17013. let _this = this
  17014. // let params = JSON.stringify({
  17015. // // "model": "Chat",
  17016. // model: 'gpt-3.5-turbo',
  17017. // temperature: 0,
  17018. // max_tokens: 4096,
  17019. // top_p: 1,
  17020. // frequency_penalty: 0,
  17021. // presence_penalty: 0,
  17022. // messages: [{
  17023. // content: messages,
  17024. // role: 'user'
  17025. // }],
  17026. // stream: false,
  17027. // uid: this.userid,
  17028. // mind_map_question: "",
  17029. // })
  17030. // // let params = JSON.stringify({
  17031. // // message: {
  17032. // // anthropic_version: "bedrock-2023-05-31",
  17033. // // max_tokens: 4096,
  17034. // // temperature: 0,
  17035. // // top_p: 1,
  17036. // // messages: [{
  17037. // // content: messages,
  17038. // // role: 'user'
  17039. // // }], //
  17040. // // },
  17041. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17042. // // });
  17043. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17044. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17045. // console.log(response);
  17046. // let data = response.data.FunctionResponse
  17047. // if (data.choices && data.choices.length && data.choices[0].message) {
  17048. // console.log(data.choices[0].message.content);
  17049. // let dArray = JSON.parse(data.choices[0].message.content)
  17050. // _this.dArray = dArray
  17051. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17052. // for (var i = 0; i < dArray.length; i++) {
  17053. // let _task = dArray[i]
  17054. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17055. // task: _task.task,
  17056. // taskDetail: "",
  17057. // taskDetail2: _task.detail,
  17058. // taskDetail3: "",
  17059. // chapterData: [],
  17060. // toolText: "",
  17061. // toolChoose: [
  17062. // {
  17063. // tool: [],
  17064. // toolDetail: "",
  17065. // toolType: 0,
  17066. // askCount: 1,
  17067. // askTitle: "",
  17068. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17069. // },
  17070. // ],
  17071. // isShowTools: false,
  17072. // askCount: 1,
  17073. // isFold: 0,
  17074. // askTitle: "",
  17075. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17076. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17077. // homeworkList: [],
  17078. // })
  17079. // }
  17080. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17081. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17082. // _this.$forceUpdate();
  17083. // }
  17084. // // if (data.result) {
  17085. // // console.log(data.result);
  17086. // // let dArray = JSON.parse(data.result)
  17087. // // _this.dArray = dArray
  17088. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17089. // // for (var i = 0; i < dArray.length; i++) {
  17090. // // let _task = dArray[i]
  17091. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17092. // // task: _task.task,
  17093. // // taskDetail: "",
  17094. // // taskDetail2: _task.detail,
  17095. // // taskDetail3: "",
  17096. // // chapterData: [],
  17097. // // toolText: "",
  17098. // // toolChoose: [
  17099. // // {
  17100. // // tool: [],
  17101. // // toolDetail: "",
  17102. // // toolType: 0,
  17103. // // askCount: 1,
  17104. // // askTitle: "",
  17105. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17106. // // },
  17107. // // ],
  17108. // // isShowTools: false,
  17109. // // askCount: 1,
  17110. // // isFold: 1,
  17111. // // askTitle: "",
  17112. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17113. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17114. // // homeworkList: [],
  17115. // // })
  17116. // // }
  17117. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17118. // // _this.$forceUpdate();
  17119. // // }
  17120. // callback ? callback() : ''
  17121. // }).catch(function (error) {
  17122. // _this.loading = false
  17123. // console.log(error);
  17124. // });
  17125. let parm = {
  17126. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17127. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17128. session_name: uuidv4(),
  17129. userId: this.userid,
  17130. file_ids: '',
  17131. model: 'gpt-4o-2024-08-06',
  17132. }
  17133. this.ajax
  17134. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17135. .then((response) => {
  17136. console.log(response);
  17137. let data = response.data.FunctionResponse
  17138. if (data.message) {
  17139. console.log(data.message);
  17140. let dArray = {}
  17141. try {
  17142. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17143. } catch (error) {
  17144. console.log("error_________________" + error);
  17145. try {
  17146. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17147. let match = data.message.match(regex);
  17148. dArray = JSON.parse(match[0]);
  17149. // var message = data.message;
  17150. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17151. // var jsonEnd = message.indexOf("```", jsonStart);
  17152. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17153. // dArray = JSON.parse(jsonString);
  17154. } catch (error) {
  17155. try {
  17156. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17157. let match = data.message.match(regex);
  17158. // eval("var aaa = " + match[0])
  17159. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17160. } catch (error) {
  17161. console.log("error_________________" + error);
  17162. }
  17163. console.log("error_________________" + error);
  17164. }
  17165. }
  17166. _this.dArray = dArray
  17167. if(_this.panOutline() > 0){
  17168. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17169. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17170. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  17171. }
  17172. for (var i = 0; i < dArray.length; i++) {
  17173. let _task = dArray[i]
  17174. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17175. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  17176. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  17177. }else {
  17178. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17179. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17180. taskDetail: "",
  17181. taskDetail2: "",
  17182. taskDetail3: "",
  17183. chapterData: [],
  17184. toolText: "",
  17185. toolChoose: [
  17186. {
  17187. tool: [],
  17188. toolDetail: "",
  17189. toolType: 0,
  17190. askCount: 1,
  17191. askTitle: "",
  17192. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17193. },
  17194. ],
  17195. isShowTools: false,
  17196. askCount: 1,
  17197. isFold: 0,
  17198. askTitle: "",
  17199. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17200. checkJson: [{ checkCount: [], checkPerent: [] }],
  17201. homeworkList: [],
  17202. })
  17203. }
  17204. }
  17205. }else {
  17206. _this.unitJson[0].chapterInfo[0].taskJson = []
  17207. for (var i = 0; i < dArray.length; i++) {
  17208. let _task = dArray[i]
  17209. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17210. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17211. taskDetail: "",
  17212. taskDetail2: "",
  17213. taskDetail3: "",
  17214. chapterData: [],
  17215. toolText: "",
  17216. toolChoose: [
  17217. {
  17218. tool: [],
  17219. toolDetail: "",
  17220. toolType: 0,
  17221. askCount: 1,
  17222. askTitle: "",
  17223. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17224. },
  17225. ],
  17226. isShowTools: false,
  17227. askCount: 1,
  17228. isFold: 0,
  17229. askTitle: "",
  17230. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17231. checkJson: [{ checkCount: [], checkPerent: [] }],
  17232. homeworkList: [],
  17233. })
  17234. }
  17235. }
  17236. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17237. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17238. _this.$forceUpdate();
  17239. setTimeout(()=>{
  17240. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17241. this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  17242. }
  17243. }, 0)
  17244. }
  17245. callback ? callback() : ''
  17246. })
  17247. .catch((error) => {
  17248. _this.loading = false
  17249. console.log(error);
  17250. });
  17251. },
  17252. async aiGet3(messages, callback) {
  17253. let _this = this
  17254. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17255. if (_this.infoData.length) {
  17256. for (var i = 0; i < _this.infoData.length; i++) {
  17257. if(_this.infoData[i].fileid){
  17258. fileid.push(_this.infoData[i].fileid)
  17259. }else {
  17260. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17261. if(_fileid){
  17262. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17263. _this.$forceUpdate();
  17264. if(_fileid != 1){
  17265. fileid.push(_fileid)
  17266. }
  17267. }
  17268. }
  17269. }
  17270. }
  17271. // let params = JSON.stringify({
  17272. // // "model": "Chat",
  17273. // model: 'gpt-3.5-turbo',
  17274. // temperature: 0,
  17275. // max_tokens: 4096,
  17276. // top_p: 1,
  17277. // frequency_penalty: 0,
  17278. // presence_penalty: 0,
  17279. // messages: [{
  17280. // content: messages,
  17281. // role: 'user'
  17282. // }],
  17283. // stream: false,
  17284. // uid: this.userid,
  17285. // mind_map_question: "",
  17286. // })
  17287. // // let params = JSON.stringify({
  17288. // // message: {
  17289. // // anthropic_version: "bedrock-2023-05-31",
  17290. // // max_tokens: 4096,
  17291. // // temperature: 0,
  17292. // // top_p: 1,
  17293. // // messages: [{
  17294. // // content: messages,
  17295. // // role: 'user'
  17296. // // }], //
  17297. // // },
  17298. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17299. // // });
  17300. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17301. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17302. // console.log(response);
  17303. // let data = response.data.FunctionResponse
  17304. // if (data.choices && data.choices.length && data.choices[0].message) {
  17305. // console.log(data.choices[0].message.content);
  17306. // let tArray = JSON.parse(data.choices[0].message.content)
  17307. // // _this.unitJson[0].chapterInfo[0].task = []
  17308. // let toolsJson = {
  17309. // "电子白板": { tool: 1, type: 1 },
  17310. // "文档": { tool: 52, type: 1 },
  17311. // "思维导图": { tool: 3, type: 1 },
  17312. // "表格": { tool: 48, type: 1 },
  17313. // "作业提交": { tool: 16, type: 2 }
  17314. // }
  17315. // for (var i = 0; i < tArray.length; i++) {
  17316. // let _task = tArray[i]
  17317. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17318. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17319. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17320. // if (_task.toolChoose.length) {
  17321. // for (var j = 0; j < _task.toolChoose.length; j++) {
  17322. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17323. // {
  17324. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17325. // toolDetail: _task.toolChoose[j].detail,
  17326. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17327. // askCount: 1,
  17328. // askTitle: "",
  17329. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17330. // },
  17331. // )
  17332. // }
  17333. // } else {
  17334. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17335. // {
  17336. // tool: [],
  17337. // toolDetail: "",
  17338. // toolType: 0,
  17339. // askCount: 1,
  17340. // askTitle: "",
  17341. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17342. // },
  17343. // )
  17344. // }
  17345. // }
  17346. // // if (_this.infoData.length) {
  17347. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17348. // // }
  17349. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17350. // _this.$forceUpdate();
  17351. // }
  17352. // // if (data.result) {
  17353. // // console.log(data.result);
  17354. // // let tArray = JSON.parse(data.result)
  17355. // // // _this.unitJson[0].chapterInfo[0].task = []
  17356. // // let toolsJson = {
  17357. // // "电子白板": { tool: 1, type: 1 },
  17358. // // "文档": { tool: 52, type: 1 },
  17359. // // "思维导图": { tool: 3, type: 1 },
  17360. // // "表格": { tool: 48, type: 1 },
  17361. // // "作业提交": { tool: 16, type: 2 }
  17362. // // }
  17363. // // for (var i = 0; i < tArray.length; i++) {
  17364. // // let _task = tArray[i]
  17365. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17366. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17367. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17368. // // if (_task.toolChoose.length) {
  17369. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  17370. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17371. // // {
  17372. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17373. // // toolDetail: _task.toolChoose[j].detail,
  17374. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17375. // // askCount: 1,
  17376. // // askTitle: "",
  17377. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17378. // // },
  17379. // // )
  17380. // // }
  17381. // // } else {
  17382. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17383. // // {
  17384. // // tool: [],
  17385. // // toolDetail: "",
  17386. // // toolType: 0,
  17387. // // askCount: 1,
  17388. // // askTitle: "",
  17389. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17390. // // },
  17391. // // )
  17392. // // }
  17393. // // }
  17394. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17395. // // _this.$forceUpdate();
  17396. // // }
  17397. // callback ? callback() : ''
  17398. // }).catch(function (error) {
  17399. // _this.loading = false
  17400. // console.log(error);
  17401. // });
  17402. let parm = {
  17403. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17404. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17405. session_name: uuidv4(),
  17406. userId: this.userid,
  17407. file_ids: fileid.length ? [...fileid] : '',
  17408. model: 'gpt-4o-2024-08-06',
  17409. }
  17410. this.ajax
  17411. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17412. .then(async (response) => {
  17413. console.log(response);
  17414. let data = response.data.FunctionResponse
  17415. if (data.message) {
  17416. console.log(data.message);
  17417. let tArray = {}
  17418. try {
  17419. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17420. } catch (error) {
  17421. console.log("error_________________" + error);
  17422. try {
  17423. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17424. let match = data.message.match(regex);
  17425. tArray = JSON.parse(match[0]);
  17426. // var message = data.message;
  17427. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17428. // var jsonEnd = message.indexOf("```", jsonStart);
  17429. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17430. // tArray = JSON.parse(jsonString);
  17431. } catch (error) {
  17432. try {
  17433. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17434. let match = data.message.match(regex);
  17435. // eval("var aaa = " + match[0])
  17436. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17437. } catch (error) {
  17438. console.log("error_________________" + error);
  17439. }
  17440. console.log("error_________________" + error);
  17441. }
  17442. }
  17443. let toolsJson = {
  17444. "电子白板": { tool: 1, type: 1 },
  17445. "文档": { tool: 52, type: 1 },
  17446. "思维导图": { tool: 3, type: 1 },
  17447. "表格": { tool: 48, type: 1 },
  17448. "作业提交": { tool: 16, type: 2 },
  17449. "问答": { tool: 15, type: 2 },
  17450. "选择题": { tool: 45, type: 2 },
  17451. }
  17452. // answerQ:"sssssssssssssss"
  17453. for (var i = 0; i < tArray.length; i++) {
  17454. let _task = tArray[i]
  17455. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17456. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17457. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17458. if (_task.toolChoose.length) {
  17459. for (var j = 0; j < _task.toolChoose.length; j++) {
  17460. let _json = {
  17461. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  17462. toolDetail: _task.toolChoose[j].detail,
  17463. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  17464. askCount: 1,
  17465. askTitle: "",
  17466. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17467. }
  17468. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  17469. let answerQ = await _this.aiCreateQuestion(15, i)
  17470. _json.answerQ = answerQ.answerQ
  17471. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  17472. let testJson = await _this.aiCreateQuestion(45, i)
  17473. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  17474. }
  17475. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  17476. }
  17477. } else {
  17478. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17479. {
  17480. tool: [],
  17481. toolDetail: "",
  17482. toolType: 0,
  17483. askCount: 1,
  17484. askTitle: "",
  17485. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17486. },
  17487. )
  17488. }
  17489. }
  17490. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17491. _this.$forceUpdate();
  17492. _this.createTeacherAn();
  17493. }
  17494. callback ? callback() : ''
  17495. })
  17496. .catch((error) => {
  17497. _this.loading = false
  17498. console.log(error);
  17499. });
  17500. },
  17501. async aiGet32(messages, index) {
  17502. let _this = this
  17503. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17504. if (_this.infoData.length) {
  17505. for (var i = 0; i < _this.infoData.length; i++) {
  17506. if(_this.infoData[i].fileid){
  17507. fileid.push(_this.infoData[i].fileid)
  17508. }else {
  17509. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17510. if(_fileid){
  17511. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17512. _this.$forceUpdate();
  17513. if(_fileid != 1){
  17514. fileid.push(_fileid)
  17515. }
  17516. }
  17517. }
  17518. }
  17519. }
  17520. // let params = JSON.stringify({
  17521. // // "model": "Chat",
  17522. // model: 'gpt-3.5-turbo',
  17523. // temperature: 0,
  17524. // max_tokens: 4096,
  17525. // top_p: 1,
  17526. // frequency_penalty: 0,
  17527. // presence_penalty: 0,
  17528. // messages: [{
  17529. // content: messages,
  17530. // role: 'user'
  17531. // }],
  17532. // stream: false,
  17533. // uid: this.userid,
  17534. // mind_map_question: "",
  17535. // })
  17536. // // let params = JSON.stringify({
  17537. // // message: {
  17538. // // anthropic_version: "bedrock-2023-05-31",
  17539. // // max_tokens: 4096,
  17540. // // temperature: 0,
  17541. // // top_p: 1,
  17542. // // messages: [{
  17543. // // content: messages,
  17544. // // role: 'user'
  17545. // // }], //
  17546. // // },
  17547. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17548. // // });
  17549. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17550. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17551. // console.log(response);
  17552. // let data = response.data.FunctionResponse
  17553. // if (data.choices && data.choices.length && data.choices[0].message) {
  17554. // console.log(data.choices[0].message.content);
  17555. // let tArray = JSON.parse(data.choices[0].message.content)
  17556. // // _this.unitJson[0].chapterInfo[0].task = []
  17557. // let toolsJson = {
  17558. // "电子白板": { tool: 1, type: 1 },
  17559. // "文档": { tool: 52, type: 1 },
  17560. // "思维导图": { tool: 3, type: 1 },
  17561. // "表格": { tool: 48, type: 1 },
  17562. // "作业提交": { tool: 16, type: 2 }
  17563. // }
  17564. // for (var i = 0; i < tArray.length; i++) {
  17565. // let _task = tArray[i]
  17566. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17567. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17568. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17569. // if (_task.toolChoose.length) {
  17570. // for (var j = 0; j < _task.toolChoose.length; j++) {
  17571. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17572. // {
  17573. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17574. // toolDetail: _task.toolChoose[j].detail,
  17575. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17576. // askCount: 1,
  17577. // askTitle: "",
  17578. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17579. // },
  17580. // )
  17581. // }
  17582. // } else {
  17583. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17584. // {
  17585. // tool: [],
  17586. // toolDetail: "",
  17587. // toolType: 0,
  17588. // askCount: 1,
  17589. // askTitle: "",
  17590. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17591. // },
  17592. // )
  17593. // }
  17594. // }
  17595. // // if (_this.infoData.length) {
  17596. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17597. // // }
  17598. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17599. // _this.$forceUpdate();
  17600. // }
  17601. // // if (data.result) {
  17602. // // console.log(data.result);
  17603. // // let tArray = JSON.parse(data.result)
  17604. // // // _this.unitJson[0].chapterInfo[0].task = []
  17605. // // let toolsJson = {
  17606. // // "电子白板": { tool: 1, type: 1 },
  17607. // // "文档": { tool: 52, type: 1 },
  17608. // // "思维导图": { tool: 3, type: 1 },
  17609. // // "表格": { tool: 48, type: 1 },
  17610. // // "作业提交": { tool: 16, type: 2 }
  17611. // // }
  17612. // // for (var i = 0; i < tArray.length; i++) {
  17613. // // let _task = tArray[i]
  17614. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17615. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17616. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17617. // // if (_task.toolChoose.length) {
  17618. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  17619. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17620. // // {
  17621. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17622. // // toolDetail: _task.toolChoose[j].detail,
  17623. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17624. // // askCount: 1,
  17625. // // askTitle: "",
  17626. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17627. // // },
  17628. // // )
  17629. // // }
  17630. // // } else {
  17631. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17632. // // {
  17633. // // tool: [],
  17634. // // toolDetail: "",
  17635. // // toolType: 0,
  17636. // // askCount: 1,
  17637. // // askTitle: "",
  17638. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17639. // // },
  17640. // // )
  17641. // // }
  17642. // // }
  17643. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17644. // // _this.$forceUpdate();
  17645. // // }
  17646. // callback ? callback() : ''
  17647. // }).catch(function (error) {
  17648. // _this.loading = false
  17649. // console.log(error);
  17650. // });
  17651. let parm = {
  17652. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17653. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17654. session_name: uuidv4(),
  17655. userId: this.userid,
  17656. file_ids: fileid.length ? [...fileid] : '',
  17657. model: 'gpt-4o-2024-08-06',
  17658. }
  17659. this.ajax
  17660. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17661. .then(async (response) => {
  17662. console.log(response);
  17663. let data = response.data.FunctionResponse
  17664. if (data.message) {
  17665. console.log(data.message);
  17666. let tArray = {}
  17667. try {
  17668. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17669. } catch (error) {
  17670. console.log("error_________________" + error);
  17671. try {
  17672. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17673. let match = data.message.match(regex);
  17674. tArray = JSON.parse(match[0]);
  17675. // var message = data.message;
  17676. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17677. // var jsonEnd = message.indexOf("```", jsonStart);
  17678. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17679. // tArray = JSON.parse(jsonString);
  17680. } catch (error) {
  17681. try {
  17682. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17683. let match = data.message.match(regex);
  17684. // eval("var aaa = " + match[0])
  17685. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17686. } catch (error) {
  17687. console.log("error_________________" + error);
  17688. }
  17689. console.log("error_________________" + error);
  17690. }
  17691. }
  17692. let toolsJson = {
  17693. "电子白板": { tool: 1, type: 1 },
  17694. "文档": { tool: 52, type: 1 },
  17695. "思维导图": { tool: 3, type: 1 },
  17696. "表格": { tool: 48, type: 1 },
  17697. "作业提交": { tool: 16, type: 2 },
  17698. "问答": { tool: 15, type: 2 },
  17699. "选择题": { tool: 45, type: 2 },
  17700. }
  17701. // answerQ:"sssssssssssssss"
  17702. // for (var i = 0; i < tArray.length; i++) {
  17703. let _task = tArray
  17704. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  17705. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  17706. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  17707. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  17708. console.log("error_________________JSON不对重新生成");
  17709. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17710. _this.aiGet32(messages, index)
  17711. return;
  17712. }
  17713. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  17714. if (_task.toolChoose && _task.toolChoose.length) {
  17715. for (var j = 0; j < _task.toolChoose.length; j++) {
  17716. let _json = {
  17717. tool: [],
  17718. toolDetail: _task.toolChoose[j].detail,
  17719. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  17720. askCount: 1,
  17721. askTitle: "",
  17722. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17723. }
  17724. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  17725. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  17726. let answerQ = await _this.aiCreateQuestion(15, index)
  17727. // _json.answerQ = answerQ.answerQ
  17728. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  17729. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  17730. let testJson = await _this.aiCreateQuestion(45, index)
  17731. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  17732. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  17733. }
  17734. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].tool = toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16]
  17735. _this.$forceUpdate();
  17736. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  17737. }
  17738. } else {
  17739. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  17740. {
  17741. tool: [],
  17742. toolDetail: "",
  17743. toolType: 0,
  17744. askCount: 1,
  17745. askTitle: "",
  17746. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17747. },
  17748. )
  17749. }
  17750. // }
  17751. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17752. _this.$forceUpdate();
  17753. _this.createTeacherAn(index);
  17754. }
  17755. // callback ? callback() : ''
  17756. _this.taskLoading[index] = false
  17757. })
  17758. .catch((error) => {
  17759. // _this.loading = false
  17760. _this.taskLoading[index] = false
  17761. console.log(error);
  17762. });
  17763. },
  17764. async aiCreateQuestion(type, task) {
  17765. let _this = this
  17766. return new Promise((resolve, reject) => {
  17767. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17768. if (_this.infoData.length) {
  17769. for (var i = 0; i < _this.infoData.length; i++) {
  17770. if(_this.infoData[i].fileid){
  17771. fileid.push(_this.infoData[i].fileid)
  17772. }
  17773. }
  17774. }
  17775. let sub = []
  17776. let mclass = []
  17777. if (this.courseTypeId.length) {
  17778. for (var i = 0; i < this.courseTypeId.length; i++) {
  17779. let _sid = this.courseTypeId[i]
  17780. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17781. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17782. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17783. }
  17784. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17785. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17786. }
  17787. }
  17788. }
  17789. }
  17790. let messages = ""
  17791. if(type == 15){
  17792. messages = `NOTICE
  17793. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17794. 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.
  17795. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17796. Instruction: Based on the context, follow "Format example", write content.
  17797. # Context
  17798. ## 任务
  17799. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  17800. ## 限制
  17801. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17802. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17803. ## 课程简介
  17804. 课程名字:${_this.courseName}
  17805. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17806. ${sub.length ? '学科:' + sub.join(",") : ''}
  17807. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17808. ## 教案
  17809. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17810. # Format example
  17811. {answerQ:"问题"}
  17812. `
  17813. }else if(type == 45){
  17814. messages = `NOTICE
  17815. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17816. 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.
  17817. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17818. Instruction: Based on the context, follow "Format example", write content.
  17819. # Context
  17820. ## 任务
  17821. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  17822. ## 限制
  17823. - 生成题目禁止重复。
  17824. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17825. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  17826. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17827. ## 课程简介
  17828. 课程名字:${_this.courseName}
  17829. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17830. ${sub.length ? '学科:' + sub.join(",") : ''}
  17831. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17832. ## 教案
  17833. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17834. # Format example
  17835. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  17836. `
  17837. }
  17838. let parm = {
  17839. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17840. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17841. session_name: uuidv4(),
  17842. userId: this.userid,
  17843. file_ids: fileid.length ? [...fileid] : '',
  17844. model: 'gpt-4o-2024-08-06',
  17845. }
  17846. this.ajax
  17847. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17848. .then((response) => {
  17849. console.log(response);
  17850. let data = response.data.FunctionResponse
  17851. if (data.message) {
  17852. console.log(data.message);
  17853. try {
  17854. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17855. let tArray = {}
  17856. try {
  17857. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17858. } catch (error) {
  17859. console.log("error_________________" + error);
  17860. try {
  17861. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17862. let match = data.message.match(regex);
  17863. tArray = JSON.parse(match[0]);
  17864. // var message = data.message;
  17865. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17866. // var jsonEnd = message.indexOf("```", jsonStart);
  17867. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17868. // tArray = JSON.parse(jsonString);
  17869. } catch (error) {
  17870. try {
  17871. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17872. let match = data.message.match(regex);
  17873. // eval("var aaa = " + match[0])
  17874. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17875. } catch (error) {
  17876. console.log("error_________________" + error);
  17877. }
  17878. console.log("error_________________" + error);
  17879. }
  17880. }
  17881. resolve(tArray)
  17882. } catch (error) {
  17883. if(type == 15){
  17884. resolve({answerQ: "题目"})
  17885. }else if(type == 45){
  17886. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17887. }
  17888. }
  17889. }else if(type == 15){
  17890. resolve({answerQ: "题目"})
  17891. }else if(type == 45){
  17892. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17893. }
  17894. })
  17895. .catch((error) => {
  17896. if(type == 15){
  17897. resolve({answerQ: "题目"})
  17898. }else if(type == 45){
  17899. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  17900. }
  17901. console.log(error);
  17902. });
  17903. });
  17904. },
  17905. async aiChoice(type){
  17906. if(type == 45){
  17907. this.choiceLoading = true
  17908. }
  17909. let _this = this
  17910. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17911. if (_this.infoData.length) {
  17912. for (var i = 0; i < _this.infoData.length; i++) {
  17913. if(_this.infoData[i].fileid){
  17914. fileid.push(_this.infoData[i].fileid)
  17915. }
  17916. }
  17917. }
  17918. if (_this.xuanzeInfoData.length) {
  17919. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  17920. if(_this.xuanzeInfoData[i].fileid){
  17921. fileid.push(_this.xuanzeInfoData[i].fileid)
  17922. }
  17923. }
  17924. }
  17925. let sub = []
  17926. let mclass = []
  17927. if (this.courseTypeId.length) {
  17928. for (var i = 0; i < this.courseTypeId.length; i++) {
  17929. let _sid = this.courseTypeId[i]
  17930. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17931. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17932. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17933. }
  17934. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17935. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17936. }
  17937. }
  17938. }
  17939. }
  17940. let messages = ""
  17941. if(type == 15){
  17942. messages = `NOTICE
  17943. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17944. 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.
  17945. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17946. Instruction: Based on the context, follow "Format example", write content.
  17947. # Context
  17948. ## 任务
  17949. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  17950. ## 限制
  17951. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17952. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17953. ## 课程简介
  17954. 课程名字:${_this.courseName}
  17955. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17956. ${sub.length ? '学科:' + sub.join(",") : ''}
  17957. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17958. ## 教案
  17959. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17960. # Format example
  17961. {answerQ:"问题"}
  17962. `
  17963. }else if(type == 45){
  17964. messages = `NOTICE
  17965. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17966. 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.
  17967. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17968. Instruction: Based on the context, follow "Format example", write content.
  17969. # Context
  17970. ## 任务
  17971. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  17972. ## 限制
  17973. - 生成题目禁止重复。
  17974. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  17975. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  17976. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  17977. ## 课程简介
  17978. 课程名字:${_this.courseName}
  17979. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  17980. ${sub.length ? '学科:' + sub.join(",") : ''}
  17981. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17982. ## 教案
  17983. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17984. # Format example
  17985. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  17986. `
  17987. }
  17988. let parm = {
  17989. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17990. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17991. session_name: uuidv4(),
  17992. userId: this.userid,
  17993. file_ids: fileid.length ? [...fileid] : '',
  17994. model: 'gpt-4o-2024-08-06',
  17995. }
  17996. this.ajax
  17997. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  17998. .then((response) => {
  17999. console.log(response);
  18000. let data = response.data.FunctionResponse
  18001. if (data.message) {
  18002. console.log(data.message);
  18003. try {
  18004. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18005. let tArray = {}
  18006. try {
  18007. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18008. } catch (error) {
  18009. console.log("error_________________" + error);
  18010. try {
  18011. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18012. let match = data.message.match(regex);
  18013. tArray = JSON.parse(match[0]);
  18014. // var message = data.message;
  18015. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18016. // var jsonEnd = message.indexOf("```", jsonStart);
  18017. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18018. // tArray = JSON.parse(jsonString);
  18019. } catch (error) {
  18020. try {
  18021. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18022. let match = data.message.match(regex);
  18023. // eval("var aaa = " + match[0])
  18024. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18025. } catch (error) {
  18026. console.log("error_________________" + error);
  18027. }
  18028. console.log("error_________________" + error);
  18029. }
  18030. }
  18031. if(type == 45){
  18032. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  18033. }
  18034. } catch (error) {
  18035. if(type == 15){
  18036. {answerQ: "题目"}
  18037. }else if(type == 45){
  18038. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18039. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18040. }
  18041. _this.choiceLoading = false
  18042. }
  18043. }else if(type == 15){
  18044. {answerQ: "题目"}
  18045. }else if(type == 45){
  18046. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18047. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18048. }
  18049. _this.choiceLoading = false
  18050. }).catch((error) => {
  18051. if(type == 15){
  18052. {answerQ: "题目"}
  18053. }else if(type == 45){
  18054. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18055. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18056. }
  18057. console.log(error);
  18058. _this.choiceLoading = false
  18059. });
  18060. },
  18061. async aiGet4(messages, callback, clickType) {
  18062. let _this = this
  18063. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18064. if (_this.infoData.length) {
  18065. for (var i = 0; i < _this.infoData.length; i++) {
  18066. if(_this.infoData[i].fileid){
  18067. fileid.push(_this.infoData[i].fileid)
  18068. }else {
  18069. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18070. if(_fileid){
  18071. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18072. _this.$forceUpdate();
  18073. if(_fileid != 1){
  18074. fileid.push(_fileid)
  18075. }
  18076. }
  18077. }
  18078. }
  18079. }
  18080. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  18081. if(_this.cankaoInfoData[i].fileid){
  18082. fileid.push(_this.cankaoInfoData[i].fileid)
  18083. }else {
  18084. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  18085. if(_fileid){
  18086. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  18087. _this.$forceUpdate();
  18088. if(_fileid != 1){
  18089. fileid.push(_fileid)
  18090. }
  18091. }
  18092. }
  18093. }
  18094. // let params = JSON.stringify({
  18095. // // "model": "Chat",
  18096. // model: 'gpt-3.5-turbo',
  18097. // temperature: 0,
  18098. // max_tokens: 4096,
  18099. // top_p: 1,
  18100. // frequency_penalty: 0,
  18101. // presence_penalty: 0,
  18102. // messages: [{
  18103. // content: messages,
  18104. // role: 'user'
  18105. // }],
  18106. // stream: false,
  18107. // uid: this.userid,
  18108. // mind_map_question: "",
  18109. // })
  18110. // // let params = JSON.stringify({
  18111. // // message: {
  18112. // // anthropic_version: "bedrock-2023-05-31",
  18113. // // max_tokens: 4096,
  18114. // // temperature: 0,
  18115. // // top_p: 1,
  18116. // // messages: [{
  18117. // // content: messages,
  18118. // // role: 'user'
  18119. // // }], //
  18120. // // },
  18121. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18122. // // });
  18123. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18124. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18125. // console.log(response);
  18126. // let data = response.data.FunctionResponse
  18127. // if (data.choices && data.choices.length && data.choices[0].message) {
  18128. // console.log(data.choices[0].message.content);
  18129. // let dArray = JSON.parse(data.choices[0].message.content)
  18130. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  18131. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  18132. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18133. // for (var i = 0; i < dArray.length; i++) {
  18134. // let _task = dArray[i]
  18135. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18136. // task: _task.task,
  18137. // taskDetail: "",
  18138. // taskDetail2: "",
  18139. // taskDetail3: _task.detail,
  18140. // chapterData: [],
  18141. // toolText: "",
  18142. // toolChoose: [
  18143. // {
  18144. // tool: [],
  18145. // toolDetail: "",
  18146. // toolType: 0,
  18147. // askCount: 1,
  18148. // askTitle: "",
  18149. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18150. // },
  18151. // ],
  18152. // isShowTools: false,
  18153. // askCount: 1,
  18154. // isFold: 0,
  18155. // askTitle: "",
  18156. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18157. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18158. // homeworkList: [],
  18159. // })
  18160. // }
  18161. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18162. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18163. // _this.$forceUpdate();
  18164. // } else {
  18165. // for (var i = 0; i < dArray.length; i++) {
  18166. // let _task = dArray[i]
  18167. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18168. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18169. // }else {
  18170. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  18171. // task: _task.task,
  18172. // taskDetail: "",
  18173. // taskDetail2: "",
  18174. // taskDetail3: _task.detail,
  18175. // chapterData: [],
  18176. // toolText: "",
  18177. // toolChoose: [
  18178. // {
  18179. // tool: [],
  18180. // toolDetail: "",
  18181. // toolType: 0,
  18182. // askCount: 1,
  18183. // askTitle: "",
  18184. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18185. // },
  18186. // ],
  18187. // isShowTools: false,
  18188. // askCount: 1,
  18189. // isFold: 0,
  18190. // askTitle: "",
  18191. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18192. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18193. // homeworkList: [],
  18194. // }
  18195. // }
  18196. // }
  18197. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18198. // _this.$forceUpdate();
  18199. // }
  18200. // }
  18201. // // if (data.result) {
  18202. // // console.log(data.result);
  18203. // // let dArray = JSON.parse(data.result)
  18204. // // _this.teacherText = JSON.parse(data.result)
  18205. // // for (var i = 0; i < dArray.length; i++) {
  18206. // // let _task = dArray[i]
  18207. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18208. // // }
  18209. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18210. // // _this.$forceUpdate();
  18211. // // }
  18212. // callback ? callback() : ''
  18213. // _this.loading = false
  18214. // }).catch(function (error) {
  18215. // _this.loading = false
  18216. // console.log(error);
  18217. // });
  18218. let parm = {
  18219. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18220. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18221. session_name: uuidv4(),
  18222. userId: this.userid,
  18223. file_ids: fileid.length ? [...fileid] : '',
  18224. model: 'gpt-4o-2024-08-06',
  18225. }
  18226. this.ajax
  18227. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18228. .then((response) => {
  18229. console.log(response);
  18230. let data = response.data.FunctionResponse
  18231. if (data.message) {
  18232. console.log(data.message);
  18233. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18234. let dArray = []
  18235. try {
  18236. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18237. } catch (error) {
  18238. console.log("error_________________" + error);
  18239. try {
  18240. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18241. let match = data.message.match(regex);
  18242. dArray = JSON.parse(match[0]);
  18243. // var message = data.message;
  18244. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18245. // var jsonEnd = message.indexOf("```", jsonStart);
  18246. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18247. // dArray = JSON.parse(jsonString);
  18248. } catch (error) {
  18249. _this.aiGet4(messages, callback)
  18250. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18251. console.log("error_________________" + error);
  18252. return;
  18253. console.log("error_________________" + error);
  18254. _this.loading = false
  18255. }
  18256. }
  18257. try {
  18258. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  18259. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  18260. if(_this.panTeacher() > 0){
  18261. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18262. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18263. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  18264. }
  18265. for (var i = 0; i < dArray.length; i++) {
  18266. let _task = dArray[i]
  18267. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18268. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18269. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18270. }else {
  18271. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18272. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18273. taskDetail: "",
  18274. taskDetail2: "",
  18275. taskDetail3: _task.detail,
  18276. chapterData: [],
  18277. toolText: "",
  18278. toolChoose: [
  18279. {
  18280. tool: [],
  18281. toolDetail: "",
  18282. toolType: 0,
  18283. askCount: 1,
  18284. askTitle: "",
  18285. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18286. },
  18287. ],
  18288. isShowTools: false,
  18289. askCount: 1,
  18290. isFold: 0,
  18291. askTitle: "",
  18292. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18293. checkJson: [{ checkCount: [], checkPerent: [] }],
  18294. homeworkList: [],
  18295. })
  18296. }
  18297. }
  18298. }else {
  18299. _this.unitJson[0].chapterInfo[0].taskJson = []
  18300. for (var i = 0; i < dArray.length; i++) {
  18301. let _task = dArray[i]
  18302. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18303. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18304. taskDetail: "",
  18305. taskDetail2: "",
  18306. taskDetail3: _task.detail,
  18307. chapterData: [],
  18308. toolText: "",
  18309. toolChoose: [
  18310. {
  18311. tool: [],
  18312. toolDetail: "",
  18313. toolType: 0,
  18314. askCount: 1,
  18315. askTitle: "",
  18316. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18317. },
  18318. ],
  18319. isShowTools: false,
  18320. askCount: 1,
  18321. isFold: 0,
  18322. askTitle: "",
  18323. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18324. checkJson: [{ checkCount: [], checkPerent: [] }],
  18325. homeworkList: [],
  18326. })
  18327. }
  18328. }
  18329. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18330. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18331. _this.$forceUpdate();
  18332. } else {
  18333. for (var i = 0; i < dArray.length; i++) {
  18334. let _task = dArray[i]
  18335. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18336. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  18337. }else {
  18338. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  18339. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18340. taskDetail: "",
  18341. taskDetail2: "",
  18342. taskDetail3: _task.detail,
  18343. chapterData: [],
  18344. toolText: "",
  18345. toolChoose: [
  18346. {
  18347. tool: [],
  18348. toolDetail: "",
  18349. toolType: 0,
  18350. askCount: 1,
  18351. askTitle: "",
  18352. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18353. },
  18354. ],
  18355. isShowTools: false,
  18356. askCount: 1,
  18357. isFold: 0,
  18358. askTitle: "",
  18359. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18360. checkJson: [{ checkCount: [], checkPerent: [] }],
  18361. homeworkList: [],
  18362. }
  18363. }
  18364. }
  18365. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18366. _this.$forceUpdate();
  18367. }
  18368. } catch (error) {
  18369. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18370. _this.aiGet4(messages, callback)
  18371. console.log("error_________________" + error);
  18372. return;
  18373. // _this.loading = false
  18374. }
  18375. }
  18376. callback ? callback() : ''
  18377. })
  18378. .catch((error) => {
  18379. _this.loading = false
  18380. console.log(error);
  18381. });
  18382. },
  18383. async aiDetail(msg, index) {
  18384. let _this = this
  18385. const _tindex = 'task-' + index
  18386. const _tindex2 = index
  18387. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18388. if (_this.infoData.length) {
  18389. for (var i = 0; i < _this.infoData.length; i++) {
  18390. if(_this.infoData[i].fileid){
  18391. fileid.push(_this.infoData[i].fileid)
  18392. }else {
  18393. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18394. if(_fileid){
  18395. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18396. _this.$forceUpdate();
  18397. if(_fileid != 1){
  18398. fileid.push(_fileid)
  18399. }
  18400. }
  18401. }
  18402. }
  18403. }
  18404. let url = []
  18405. if (this.infoData.length) {
  18406. for (var i = 0; i < this.infoData.length; i++) {
  18407. url.push(this.infoData[i].url)
  18408. }
  18409. }
  18410. let messages = `NOTICE
  18411. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  18412. 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.
  18413. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18414. Instruction: Based on the context, follow "Format example", write content.
  18415. #Context
  18416. ## 要求
  18417. ${msg}
  18418. ## 参考信息
  18419. 任务名称:${_this.aiCallBack.task}
  18420. ## 优化内容
  18421. 大纲描述:${_this.aiCallBack.taskDetail2}。 内容不要以markdown形式出现,只需要口语化的形式`
  18422. // -------- #补充参考资料和
  18423. // ## 补充参考资料
  18424. // - 补充资料:${url.join(",")}
  18425. // - 补充描述:${_this.courseText2}
  18426. _this.taskDetailLoading.push(_tindex)
  18427. _this.ttaskDetailLoading.push(_tindex)
  18428. let _uuid = uuidv4();
  18429. // let params = JSON.stringify({
  18430. // // "model": "Chat",
  18431. // model: 'gpt-3.5-turbo',
  18432. // temperature: 0,
  18433. // max_tokens: 4096,
  18434. // top_p: 1,
  18435. // frequency_penalty: 0,
  18436. // presence_penalty: 0,
  18437. // messages: [{
  18438. // content: messages,
  18439. // role: 'user'
  18440. // }],
  18441. // uid: _uuid,
  18442. // mind_map_question: "",
  18443. // })
  18444. let params = {
  18445. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18446. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18447. session_name: _uuid,
  18448. userId: _this.userid,
  18449. uid: _uuid,
  18450. file_ids: fileid.length ? [...fileid] : '',
  18451. model: 'gpt-4o-2024-08-06',
  18452. }
  18453. // let params = JSON.stringify({
  18454. // message: {
  18455. // anthropic_version: "bedrock-2023-05-31",
  18456. // max_tokens: 4096,
  18457. // temperature: 0,
  18458. // top_p: 1,
  18459. // messages: [{
  18460. // "role": "user",
  18461. // "content": messages
  18462. // }] ,
  18463. // },
  18464. // uid: _uuid,
  18465. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18466. // });
  18467. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18468. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18469. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18470. console.log(response);
  18471. // let data = response.data.FunctionResponse
  18472. // if (data.choices && data.choices.length && data.choices[0].message) {
  18473. // console.log(data.choices[0].message.content);
  18474. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  18475. // _this.$forceUpdate()
  18476. // }
  18477. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18478. } else {
  18479. _this.$message.warning(response.data.FunctionResponse.result);
  18480. }
  18481. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18482. }).catch(function (error) {
  18483. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18484. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  18485. console.log(error);
  18486. });
  18487. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  18488. },
  18489. aiDetailgetAiContent(_uid, loading, _tindex2) {
  18490. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18491. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18492. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18493. let _allText = "";
  18494. let _mdText = "";
  18495. let _iindex = 0
  18496. _source.onmessage = _e => {
  18497. let _eData = JSON.parse(_e.data).content;
  18498. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18499. //对话已经完成
  18500. _mdText = _mdText.replace("_", "");
  18501. _source.close();
  18502. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  18503. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  18504. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  18505. return;
  18506. } else {
  18507. _iindex++
  18508. //对话还在继续
  18509. let _text = "";
  18510. _text = _eData.replaceAll("'", "");
  18511. if (_allText == "") {
  18512. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18513. } else {
  18514. _allText += _text;
  18515. }
  18516. _mdText = _allText + "_";
  18517. _mdText = _mdText.replace(/\\n/g, "\n");
  18518. _mdText = _mdText.replace(/\\/g, "");
  18519. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18520. //转化返回的回复流数据.
  18521. if(_iindex == 10){
  18522. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  18523. _iindex = 0
  18524. }
  18525. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  18526. // 处理流数据
  18527. }
  18528. // this.$forceUpdate();
  18529. };
  18530. },
  18531. async aiOutlineDetail(msg, index) {
  18532. let _this = this
  18533. const _tindex = 'task-' + index
  18534. const _tindex2 = index
  18535. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18536. if (_this.infoData.length) {
  18537. for (var i = 0; i < _this.infoData.length; i++) {
  18538. if(_this.infoData[i].fileid){
  18539. fileid.push(_this.infoData[i].fileid)
  18540. }else {
  18541. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18542. if(_fileid){
  18543. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18544. _this.$forceUpdate();
  18545. if(_fileid != 1){
  18546. fileid.push(_fileid)
  18547. }
  18548. }
  18549. }
  18550. }
  18551. }
  18552. let url = []
  18553. if (this.infoData.length) {
  18554. for (var i = 0; i < this.infoData.length; i++) {
  18555. url.push(this.infoData[i].url)
  18556. }
  18557. }
  18558. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  18559. let messages = `NOTICE
  18560. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  18561. 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.
  18562. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18563. Instruction: Based on the context, follow "Format example", write content.
  18564. #Context
  18565. ## 要求
  18566. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  18567. ## 参考信息
  18568. 课程名字:${_this.courseName}
  18569. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18570. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18571. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18572. # Format example
  18573. 教学目标:教学目标。
  18574. 任务设计:任务设计。
  18575. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  18576. `
  18577. // -------- #补充参考资料和
  18578. // ## 补充参考资料
  18579. // - 补充资料:${url.join(",")}
  18580. // - 补充描述:${_this.courseText2}
  18581. _this.taskDetailLoading.push(_tindex)
  18582. _this.ttaskDetailLoading.push(_tindex)
  18583. let _uuid = uuidv4();
  18584. // let params = JSON.stringify({
  18585. // // "model": "Chat",
  18586. // model: 'gpt-3.5-turbo',
  18587. // temperature: 0,
  18588. // max_tokens: 4096,
  18589. // top_p: 1,
  18590. // frequency_penalty: 0,
  18591. // presence_penalty: 0,
  18592. // messages: [{
  18593. // content: messages,
  18594. // role: 'user'
  18595. // }],
  18596. // uid: _uuid,
  18597. // mind_map_question: "",
  18598. // })
  18599. let params = {
  18600. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18601. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18602. session_name: _uuid,
  18603. userId: _this.userid,
  18604. uid: _uuid,
  18605. file_ids: fileid.length ? [...fileid] : '',
  18606. model: 'gpt-4o-2024-08-06',
  18607. }
  18608. // let params = JSON.stringify({
  18609. // message: {
  18610. // anthropic_version: "bedrock-2023-05-31",
  18611. // max_tokens: 4096,
  18612. // temperature: 0,
  18613. // top_p: 1,
  18614. // messages: [{
  18615. // "role": "user",
  18616. // "content": messages
  18617. // }] ,
  18618. // },
  18619. // uid: _uuid,
  18620. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18621. // });
  18622. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18623. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18624. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18625. console.log(response);
  18626. // let data = response.data.FunctionResponse
  18627. // if (data.choices && data.choices.length && data.choices[0].message) {
  18628. // console.log(data.choices[0].message.content);
  18629. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  18630. // _this.$forceUpdate()
  18631. // }
  18632. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18633. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  18634. } else {
  18635. _this.$message.warning(response.data.FunctionResponse.result);
  18636. }
  18637. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18638. }).catch(function (error) {
  18639. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18640. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  18641. console.log(error);
  18642. });
  18643. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  18644. },
  18645. async aiOutlineDetail2(msg, index) {
  18646. let _this = this
  18647. const _tindex = 'task-' + index
  18648. const _tindex2 = index
  18649. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18650. if (_this.infoData.length) {
  18651. for (var i = 0; i < _this.infoData.length; i++) {
  18652. if(_this.infoData[i].fileid){
  18653. fileid.push(_this.infoData[i].fileid)
  18654. }else {
  18655. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18656. if(_fileid){
  18657. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18658. _this.$forceUpdate();
  18659. if(_fileid != 1){
  18660. fileid.push(_fileid)
  18661. }
  18662. }
  18663. }
  18664. }
  18665. }
  18666. let url = []
  18667. if (this.infoData.length) {
  18668. for (var i = 0; i < this.infoData.length; i++) {
  18669. url.push(this.infoData[i].url)
  18670. }
  18671. }
  18672. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  18673. let taskArray = []
  18674. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  18675. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  18676. if(k != index){
  18677. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  18678. }
  18679. }
  18680. let messages = `NOTICE
  18681. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  18682. 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.
  18683. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18684. Instruction: Based on the context, follow "Format example", write content.
  18685. #Context
  18686. ## 要求
  18687. ${msg}
  18688. ## 参考信息
  18689. 课程名字:${_this.courseName}
  18690. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18691. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18692. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  18693. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  18694. # Format example
  18695. 教学目标:教学目标。
  18696. 任务设计:任务设计。
  18697. 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  18698. `
  18699. // -------- #补充参考资料和
  18700. // ## 补充参考资料
  18701. // - 补充资料:${url.join(",")}
  18702. // - 补充描述:${_this.courseText2}
  18703. _this.taskDetailLoading.push(_tindex)
  18704. _this.ttaskDetailLoading.push(_tindex)
  18705. let _uuid = uuidv4();
  18706. // let params = JSON.stringify({
  18707. // // "model": "Chat",
  18708. // model: 'gpt-3.5-turbo',
  18709. // temperature: 0,
  18710. // max_tokens: 4096,
  18711. // top_p: 1,
  18712. // frequency_penalty: 0,
  18713. // presence_penalty: 0,
  18714. // messages: [{
  18715. // content: messages,
  18716. // role: 'user'
  18717. // }],
  18718. // uid: _uuid,
  18719. // mind_map_question: "",
  18720. // })
  18721. let params = {
  18722. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18723. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18724. session_name: _uuid,
  18725. userId: _this.userid,
  18726. uid: _uuid,
  18727. file_ids: fileid.length ? [...fileid] : '',
  18728. model: 'gpt-4o-2024-08-06',
  18729. }
  18730. // let params = JSON.stringify({
  18731. // message: {
  18732. // anthropic_version: "bedrock-2023-05-31",
  18733. // max_tokens: 4096,
  18734. // temperature: 0,
  18735. // top_p: 1,
  18736. // messages: [{
  18737. // "role": "user",
  18738. // "content": messages
  18739. // }] ,
  18740. // },
  18741. // uid: _uuid,
  18742. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18743. // });
  18744. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18745. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18746. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18747. console.log(response);
  18748. // let data = response.data.FunctionResponse
  18749. // if (data.choices && data.choices.length && data.choices[0].message) {
  18750. // console.log(data.choices[0].message.content);
  18751. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  18752. // _this.$forceUpdate()
  18753. // }
  18754. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18755. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  18756. } else {
  18757. _this.$message.warning(response.data.FunctionResponse.result);
  18758. }
  18759. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18760. }).catch(function (error) {
  18761. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18762. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  18763. console.log(error);
  18764. });
  18765. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  18766. },
  18767. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  18768. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18769. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18770. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18771. let _allText = "";
  18772. let _mdText = "";
  18773. let _iindex = 0
  18774. _source.onmessage = _e => {
  18775. let _eData = JSON.parse(_e.data).content;
  18776. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18777. //对话已经完成
  18778. _mdText = _mdText.replace("_", "");
  18779. _source.close();
  18780. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  18781. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  18782. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  18783. }
  18784. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  18785. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  18786. return;
  18787. } else {
  18788. _iindex++
  18789. //对话还在继续
  18790. let _text = "";
  18791. _text = _eData.replaceAll("'", "");
  18792. if (_allText == "") {
  18793. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18794. } else {
  18795. _allText += _text;
  18796. }
  18797. _mdText = _allText + "_";
  18798. _mdText = _mdText.replace(/\\n/g, "\n");
  18799. _mdText = _mdText.replace(/\\/g, "");
  18800. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18801. //转化返回的回复流数据.
  18802. if(_iindex == 10){
  18803. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  18804. _iindex = 0
  18805. }
  18806. if(this.taskDetailLoading.indexOf(loading) !== -1){
  18807. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  18808. }
  18809. // 处理流数据
  18810. }
  18811. // this.$forceUpdate();
  18812. };
  18813. },
  18814. async aiDetail2(msg, index) {
  18815. let _this = this
  18816. const _tindex = 'task-' + index
  18817. const _tindex2 = index
  18818. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18819. if (_this.infoData.length) {
  18820. for (var i = 0; i < _this.infoData.length; i++) {
  18821. if(_this.infoData[i].fileid){
  18822. fileid.push(_this.infoData[i].fileid)
  18823. }else {
  18824. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18825. if(_fileid){
  18826. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18827. _this.$forceUpdate();
  18828. if(_fileid != 1){
  18829. fileid.push(_fileid)
  18830. }
  18831. }
  18832. }
  18833. }
  18834. }
  18835. let messages = `NOTICE
  18836. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  18837. 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.
  18838. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18839. Instruction: Based on the context, follow "Format example", write content.
  18840. #Context
  18841. ## 要求
  18842. ${msg}
  18843. ## 参考资料
  18844. 任务名字: ${_this.aiCallBack.task}
  18845. ## 优化信息
  18846. ${_this.aiCallBack.taskDetail}
  18847. # Format example
  18848. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  18849. _this.taskDetailLoading2.push(_tindex)
  18850. _this.ttaskDetailLoading2.push(_tindex)
  18851. let _uuid = uuidv4();
  18852. // let params = JSON.stringify({
  18853. // // "model": "Chat",
  18854. // model: 'gpt-3.5-turbo',
  18855. // temperature: 0,
  18856. // max_tokens: 4096,
  18857. // top_p: 1,
  18858. // frequency_penalty: 0,
  18859. // presence_penalty: 0,
  18860. // messages: [{
  18861. // content: messages,
  18862. // role: 'user'
  18863. // }],
  18864. // uid: _uuid,
  18865. // mind_map_question: "",
  18866. // })
  18867. let params = {
  18868. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  18869. message: [{"type":"text", "text":messages.replaceAll('\n', " ")}],
  18870. session_name: _uuid,
  18871. userId: _this.userid,
  18872. uid: _uuid,
  18873. file_ids: fileid.length ? [...fileid] : '',
  18874. model: 'gpt-4o-2024-08-06',
  18875. }
  18876. // let params = JSON.stringify({
  18877. // message: {
  18878. // anthropic_version: "bedrock-2023-05-31",
  18879. // max_tokens: 4096,
  18880. // temperature: 0,
  18881. // top_p: 1,
  18882. // messages: [{
  18883. // "role": "user",
  18884. // "content": messages
  18885. // }] ,
  18886. // },
  18887. // uid: _uuid,
  18888. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18889. // });
  18890. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18891. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  18892. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  18893. console.log(response);
  18894. // let data = response.data.FunctionResponse
  18895. // if (data.choices && data.choices.length && data.choices[0].message) {
  18896. // console.log(data.choices[0].message.content);
  18897. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  18898. // _this.$forceUpdate()
  18899. // }
  18900. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  18901. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  18902. } else {
  18903. _this.$message.warning(response.data.FunctionResponse.result);
  18904. }
  18905. }).catch(function (error) {
  18906. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  18907. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  18908. console.log(error);
  18909. });
  18910. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  18911. },
  18912. aiDetail2getAiContent(_uid, loading, _tindex2) {
  18913. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18914. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18915. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  18916. let _allText = "";
  18917. let _mdText = "";
  18918. let _iindex = 0
  18919. _source.onmessage = _e => {
  18920. let _eData = JSON.parse(_e.data).content;
  18921. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  18922. //对话已经完成
  18923. _mdText = _mdText.replace("_", "");
  18924. _source.close();
  18925. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  18926. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  18927. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  18928. return;
  18929. } else {
  18930. _iindex++
  18931. //对话还在继续
  18932. let _text = "";
  18933. _text = _eData.replaceAll("'", "");
  18934. if (_allText == "") {
  18935. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  18936. } else {
  18937. _allText += _text;
  18938. }
  18939. _mdText = _allText + "_";
  18940. _mdText = _mdText.replace(/\\n/g, "\n");
  18941. _mdText = _mdText.replace(/\\/g, "");
  18942. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  18943. //转化返回的回复流数据
  18944. if(_iindex == 10){
  18945. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  18946. _iindex = 0
  18947. }
  18948. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  18949. // 处理流数据
  18950. }
  18951. // this.$forceUpdate();
  18952. };
  18953. },
  18954. async aiDetail3(msg, index, tindex) {
  18955. let _this = this
  18956. const _tindex = 'task-' + index + tindex
  18957. const _tindex2 = index
  18958. const _tindex3 = tindex
  18959. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18960. if (_this.infoData.length) {
  18961. for (var i = 0; i < _this.infoData.length; i++) {
  18962. if(_this.infoData[i].fileid){
  18963. fileid.push(_this.infoData[i].fileid)
  18964. }else {
  18965. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18966. if(_fileid){
  18967. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18968. _this.$forceUpdate();
  18969. if(_fileid != 1){
  18970. fileid.push(_fileid)
  18971. }
  18972. }
  18973. }
  18974. }
  18975. }
  18976. // **重点考虑该任务及工具名和工具内容的情况下*
  18977. let messages = `NOTICE
  18978. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  18979. 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.
  18980. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18981. Instruction: Based on the context, follow "Format example", write content.
  18982. #Context
  18983. ## 参考内容
  18984. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  18985. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  18986. 工具名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0] ? _this.toolsData[_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].tool[0]].name : '无'}
  18987. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  18988. ## 要求
  18989. ${msg} 输出格式和内容要求参考#格式与要求
  18990. # Format example
  18991. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  18992. _this.taskDetailLoading3.push(_tindex)
  18993. _this.ttaskDetailLoading3.push(_tindex)
  18994. let _uuid = uuidv4();
  18995. // let params = JSON.stringify({
  18996. // // "model": "Chat",
  18997. // model: 'gpt-3.5-turbo',
  18998. // temperature: 0,
  18999. // max_tokens: 4096,
  19000. // top_p: 1,
  19001. // frequency_penalty: 0,
  19002. // presence_penalty: 0,
  19003. // messages: [{
  19004. // content: messages,
  19005. // role: 'user'
  19006. // }],
  19007. // uid: _uuid,
  19008. // mind_map_question: "",
  19009. // })
  19010. let params = {
  19011. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19012. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19013. session_name: _uuid,
  19014. userId: _this.userid,
  19015. uid: _uuid,
  19016. file_ids: fileid.length ? [...fileid] : '',
  19017. model: 'gpt-4o-2024-08-06',
  19018. }
  19019. // let params = JSON.stringify({
  19020. // message: {
  19021. // anthropic_version: "bedrock-2023-05-31",
  19022. // max_tokens: 4096,
  19023. // temperature: 0,
  19024. // top_p: 1,
  19025. // messages: [{
  19026. // "role": "user",
  19027. // "content": messages
  19028. // }] ,
  19029. // },
  19030. // uid: _uuid,
  19031. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19032. // });
  19033. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19034. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19035. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19036. console.log(response);
  19037. let data = response.data.FunctionResponse
  19038. // if (data.choices && data.choices.length && data.choices[0].message) {
  19039. // console.log(data.choices[0].message.content);
  19040. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  19041. // _this.$forceUpdate()
  19042. // }
  19043. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  19044. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19045. } else {
  19046. _this.$message.warning(response.data.FunctionResponse.result);
  19047. }
  19048. }).catch(function (error) {
  19049. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  19050. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  19051. console.log(error);
  19052. });
  19053. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  19054. },
  19055. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  19056. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19057. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19058. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19059. let _allText = "";
  19060. let _mdText = "";
  19061. let _iindex = 0
  19062. _source.onmessage = _e => {
  19063. let _eData = JSON.parse(_e.data).content;
  19064. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19065. //对话已经完成
  19066. _mdText = _mdText.replace("_", "");
  19067. _source.close();
  19068. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  19069. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  19070. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  19071. return;
  19072. } else {
  19073. _iindex++
  19074. //对话还在继续
  19075. let _text = "";
  19076. _text = _eData.replaceAll("'", "");
  19077. if (_allText == "") {
  19078. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19079. } else {
  19080. _allText += _text;
  19081. }
  19082. _mdText = _allText + "_";
  19083. _mdText = _mdText.replace(/\\n/g, "\n");
  19084. _mdText = _mdText.replace(/\\/g, "");
  19085. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19086. //转化返回的回复流数据
  19087. if(_iindex == 10){
  19088. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  19089. _iindex = 0
  19090. }
  19091. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  19092. // 处理流数据
  19093. }
  19094. // this.$forceUpdate();
  19095. };
  19096. },
  19097. async aiDetail4(msg, index) {
  19098. if (!msg.length) {
  19099. this.$message.error("请添加评价后才能优化")
  19100. return
  19101. }
  19102. let _this = this
  19103. const _tindex = 'task-' + index
  19104. const _tindex2 = index
  19105. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19106. if (_this.infoData.length) {
  19107. for (var i = 0; i < _this.infoData.length; i++) {
  19108. if(_this.infoData[i].fileid){
  19109. fileid.push(_this.infoData[i].fileid)
  19110. }else {
  19111. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19112. if(_fileid){
  19113. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19114. _this.$forceUpdate();
  19115. if(_fileid != 1){
  19116. fileid.push(_fileid)
  19117. }
  19118. }
  19119. }
  19120. }
  19121. }
  19122. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  19123. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  19124. if(_this.pingjiaInfoData[index][i].fileid){
  19125. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  19126. }
  19127. }
  19128. }
  19129. var _text = ""
  19130. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  19131. _text += `评价维度:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 维度描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} `
  19132. }
  19133. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  19134. // **重点考虑该任务详情**
  19135. let messages = `
  19136. 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.
  19137. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  19138. #Context
  19139. ## 参考内容
  19140. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19141. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  19142. 评价设计:${_text}
  19143. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19144. ## 要求
  19145. ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  19146. # 格式与要求
  19147. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  19148. # Format example
  19149. [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  19150. _this.taskDetailLoading4.push(_tindex)
  19151. // let params = JSON.stringify({
  19152. // // "model": "Chat",
  19153. // model: 'gpt-3.5-turbo',
  19154. // temperature: 0,
  19155. // max_tokens: 4096,
  19156. // top_p: 1,
  19157. // frequency_penalty: 0,
  19158. // presence_penalty: 0,
  19159. // messages: [{
  19160. // content: messages,
  19161. // role: 'user'
  19162. // }],
  19163. // stream: false,
  19164. // uid: this.userid,
  19165. // mind_map_question: "",
  19166. // })
  19167. let params = {
  19168. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19169. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19170. session_name: uuidv4(),
  19171. userId: _this.userid,
  19172. file_ids: fileid.length ? [...fileid] : '',
  19173. model: 'gpt-4o-2024-08-06',
  19174. }
  19175. // let params = JSON.stringify({
  19176. // message: {
  19177. // anthropic_version: "bedrock-2023-05-31",
  19178. // max_tokens: 4096,
  19179. // temperature: 0,
  19180. // top_p: 1,
  19181. // messages: [{
  19182. // content: messages,
  19183. // role: 'user'
  19184. // }], //
  19185. // },
  19186. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19187. // });
  19188. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19189. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  19190. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19191. console.log(response);
  19192. let data = response.data.FunctionResponse
  19193. // if (data.choices && data.choices.length && data.choices[0].message) {
  19194. // console.log(data.choices[0].message.content);
  19195. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  19196. // _this.$forceUpdate()
  19197. // }
  19198. if (data.message) {
  19199. console.log(data.message);
  19200. try {
  19201. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  19202. } catch (e) {
  19203. console.log("error_________________" + e);
  19204. // _this.$message.error(data.message)
  19205. try {
  19206. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19207. let match = data.message.match(regex);
  19208. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(match[0]);
  19209. // var message = data.message;
  19210. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19211. // var jsonEnd = message.indexOf("```", jsonStart);
  19212. // if (jsonStart !== -1 && jsonEnd !== -1) {
  19213. // var jsonString = message
  19214. // .substring(jsonStart, jsonEnd)
  19215. // .trim();
  19216. // var _data2 = JSON.parse(jsonString);
  19217. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  19218. // }
  19219. } catch (error) {
  19220. }
  19221. }
  19222. _this.$forceUpdate()
  19223. }
  19224. // if (data.result) {
  19225. // console.log(data.result);
  19226. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  19227. // _this.$forceUpdate()
  19228. // }
  19229. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19230. }).catch(function (error) {
  19231. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19232. console.log(error);
  19233. });
  19234. },
  19235. async aiDetail5(msg, index) {
  19236. let _this = this
  19237. const _tindex = 'task-' + index
  19238. const _tindex2 = index
  19239. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19240. if (_this.infoData.length) {
  19241. for (var i = 0; i < _this.infoData.length; i++) {
  19242. if(_this.infoData[i].fileid){
  19243. fileid.push(_this.infoData[i].fileid)
  19244. }else {
  19245. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19246. if(_fileid){
  19247. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19248. _this.$forceUpdate();
  19249. if(_fileid != 1){
  19250. fileid.push(_fileid)
  19251. }
  19252. }
  19253. }
  19254. }
  19255. }
  19256. let url = []
  19257. if (this.infoData.length) {
  19258. for (var i = 0; i < this.infoData.length; i++) {
  19259. url.push(this.infoData[i].url)
  19260. }
  19261. }
  19262. var _text = ""
  19263. var _text2 = ""
  19264. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  19265. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19266. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  19267. }
  19268. let messages = `
  19269. 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.
  19270. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  19271. --------
  19272. ## 要求
  19273. ${msg}
  19274. -------
  19275. ## 本教案描述
  19276. ${_this.aiCallBack}
  19277. -------
  19278. ## 课程大纲
  19279. ${_text}
  19280. -------
  19281. ## 其他教学任务教案
  19282. ${_text2}`
  19283. // ## 补充参考资料
  19284. // - 补充资料:${url.join(",")}
  19285. // - 补充描述:${this.courseText2}
  19286. _this.taskDetailLoading5.push(_tindex)
  19287. _this.ttaskDetailLoading5.push(_tindex)
  19288. let _uuid = uuidv4();
  19289. // let params = JSON.stringify({
  19290. // // "model": "Chat",
  19291. // model: 'gpt-3.5-turbo',
  19292. // temperature: 0,
  19293. // max_tokens: 4096,
  19294. // top_p: 1,
  19295. // frequency_penalty: 0,
  19296. // presence_penalty: 0,
  19297. // messages: [{
  19298. // content: messages,
  19299. // role: 'user'
  19300. // }],
  19301. // uid: _uuid,
  19302. // mind_map_question: "",
  19303. // })
  19304. let params = {
  19305. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19306. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19307. session_name: _uuid,
  19308. userId: _this.userid,
  19309. uid: _uuid,
  19310. file_ids: fileid.length ? [...fileid] : '',
  19311. model: 'gpt-4o-2024-08-06',
  19312. }
  19313. // let params = JSON.stringify({
  19314. // message: {
  19315. // anthropic_version: "bedrock-2023-05-31",
  19316. // max_tokens: 4096,
  19317. // temperature: 0,
  19318. // top_p: 1,
  19319. // messages: [{
  19320. // "role": "user",
  19321. // "content": messages
  19322. // }] ,
  19323. // },
  19324. // uid: _uuid,
  19325. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19326. // });
  19327. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19328. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19329. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19330. console.log(response);
  19331. // let data = response.data.FunctionResponse
  19332. // if (data.choices && data.choices.length && data.choices[0].message) {
  19333. // console.log(data.choices[0].message.content);
  19334. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  19335. // _this.$forceUpdate()
  19336. // }
  19337. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19338. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19339. } else {
  19340. _this.$message.warning(response.data.FunctionResponse.result);
  19341. }
  19342. }).catch(function (error) {
  19343. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  19344. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  19345. console.log(error);
  19346. });
  19347. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  19348. },
  19349. aiDetail5getAiContent(_uid, loading, _tindex2) {
  19350. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19351. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19352. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19353. let _allText = "";
  19354. let _mdText = "";
  19355. let _iindex = 0
  19356. _source.onmessage = _e => {
  19357. let _eData = JSON.parse(_e.data).content;
  19358. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19359. //对话已经完成
  19360. _mdText = _mdText.replace("_", "");
  19361. _source.close();
  19362. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  19363. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  19364. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  19365. return;
  19366. } else {
  19367. _iindex++
  19368. //对话还在继续
  19369. let _text = "";
  19370. _text = _eData.replaceAll("'", "");
  19371. if (_allText == "") {
  19372. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19373. } else {
  19374. _allText += _text;
  19375. }
  19376. _mdText = _allText + "_";
  19377. _mdText = _mdText.replace(/\\n/g, "\n");
  19378. _mdText = _mdText.replace(/\\/g, "");
  19379. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19380. //转化返回的回复流数据
  19381. if(_iindex == 10){
  19382. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  19383. _iindex = 0
  19384. }
  19385. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  19386. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  19387. }
  19388. // 处理流数据
  19389. }
  19390. // this.$forceUpdate();
  19391. };
  19392. },
  19393. async aiDetail52(msg, index) {
  19394. let _this = this
  19395. const _tindex = 'task-' + index
  19396. const _tindex2 = index
  19397. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19398. if (_this.infoData.length) {
  19399. for (var i = 0; i < _this.infoData.length; i++) {
  19400. if(_this.infoData[i].fileid){
  19401. fileid.push(_this.infoData[i].fileid)
  19402. }else {
  19403. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19404. if(_fileid){
  19405. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19406. _this.$forceUpdate();
  19407. if(_fileid != 1){
  19408. fileid.push(_fileid)
  19409. }
  19410. }
  19411. }
  19412. }
  19413. }
  19414. let url = []
  19415. if (this.infoData.length) {
  19416. for (var i = 0; i < this.infoData.length; i++) {
  19417. url.push(this.infoData[i].url)
  19418. }
  19419. }
  19420. let taskN = []
  19421. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  19422. if(_tindex2 != ti){
  19423. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  19424. }
  19425. }
  19426. let messages = `NOTICE
  19427. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  19428. 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.
  19429. #Context
  19430. ## 要求
  19431. ${msg}
  19432. ## 补充描述
  19433. 课程简要描述:${_this.courseText}
  19434. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19435. 其他大纲的任务名:${taskN.join(",")}
  19436. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  19437. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19438. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19439. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19440. `
  19441. // ## 补充参考资料
  19442. // - 补充资料:${url.join(",")}
  19443. // - 补充描述:${this.courseText2}
  19444. _this.taskDetailLoading5.push(_tindex)
  19445. _this.ttaskDetailLoading5.push(_tindex)
  19446. let _uuid = uuidv4();
  19447. // let params = JSON.stringify({
  19448. // // "model": "Chat",
  19449. // model: 'gpt-3.5-turbo',
  19450. // temperature: 0,
  19451. // max_tokens: 4096,
  19452. // top_p: 1,
  19453. // frequency_penalty: 0,
  19454. // presence_penalty: 0,
  19455. // messages: [{
  19456. // content: messages,
  19457. // role: 'user'
  19458. // }],
  19459. // uid: _uuid,
  19460. // mind_map_question: "",
  19461. // })
  19462. let params = {
  19463. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19464. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19465. session_name: _uuid,
  19466. userId: _this.userid,
  19467. uid: _uuid,
  19468. file_ids: fileid.length ? [...fileid] : '',
  19469. model: 'gpt-4o-2024-08-06',
  19470. }
  19471. // let params = JSON.stringify({
  19472. // message: {
  19473. // anthropic_version: "bedrock-2023-05-31",
  19474. // max_tokens: 4096,
  19475. // temperature: 0,
  19476. // top_p: 1,
  19477. // messages: [{
  19478. // "role": "user",
  19479. // "content": messages
  19480. // }] ,
  19481. // },
  19482. // uid: _uuid,
  19483. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19484. // });
  19485. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19486. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19487. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19488. console.log(response);
  19489. // let data = response.data.FunctionResponse
  19490. // if (data.choices && data.choices.length && data.choices[0].message) {
  19491. // console.log(data.choices[0].message.content);
  19492. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  19493. // _this.$forceUpdate()
  19494. // }
  19495. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19496. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19497. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  19498. } else {
  19499. _this.$message.warning(response.data.FunctionResponse.result);
  19500. }
  19501. }).catch(function (error) {
  19502. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  19503. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  19504. console.log(error);
  19505. });
  19506. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  19507. },
  19508. aiDetail52getAiContent(_uid, loading, _tindex2) {
  19509. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19510. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19511. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19512. let _allText = "";
  19513. let _mdText = "";
  19514. this.allTextArray[_tindex2] = ""
  19515. let _iindex = 0
  19516. _source.onmessage = async (_e) => {
  19517. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  19518. let _eData = JSON.parse(_e.data).content;
  19519. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19520. //对话已经完成
  19521. _mdText = _mdText.replace("_", "");
  19522. _source.close();
  19523. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  19524. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  19525. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  19526. return;
  19527. } else {
  19528. _iindex++
  19529. //对话还在继续
  19530. let _text = "";
  19531. _text = _eData.replaceAll("'", "");
  19532. if (_allText == "") {
  19533. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19534. } else {
  19535. _allText += _text;
  19536. }
  19537. _mdText = _allText + "_";
  19538. _mdText = _mdText.replace(/\\n/g, "\n");
  19539. _mdText = _mdText.replace(/\\/g, "");
  19540. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19541. //转化返回的回复流数据
  19542. if(_iindex == 10){
  19543. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  19544. _iindex = 0
  19545. }
  19546. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  19547. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  19548. }
  19549. // 处理流数据
  19550. }
  19551. };
  19552. },
  19553. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  19554. let _mdText = "";
  19555. let _eData = JSON.parse(_e.data).content;
  19556. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19557. //对话已经完成
  19558. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "");
  19559. _source.close();
  19560. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  19561. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  19562. return;
  19563. } else {
  19564. //对话还在继续
  19565. let _text = "";
  19566. _text = _eData.replaceAll("'", "");
  19567. if (this.allTextArray[_tindex2] == "") {
  19568. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19569. } else {
  19570. this.allTextArray[_tindex2] += _text;
  19571. }
  19572. _mdText = this.allTextArray[_tindex2] + "_";
  19573. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  19574. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  19575. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  19576. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  19577. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  19578. // 处理流数据
  19579. }
  19580. },
  19581. async aiCpote(msg, callback) {
  19582. let _this = this
  19583. let _index = _this.aitype.replace("aiC","c")
  19584. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19585. if (_this.infoData.length) {
  19586. for (var i = 0; i < _this.infoData.length; i++) {
  19587. if(_this.infoData[i].fileid){
  19588. fileid.push(_this.infoData[i].fileid)
  19589. }else {
  19590. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19591. if(_fileid){
  19592. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19593. _this.$forceUpdate();
  19594. if(_fileid != 1){
  19595. fileid.push(_fileid)
  19596. }
  19597. }
  19598. }
  19599. }
  19600. }
  19601. let sub = []
  19602. if (this.courseTypeId.length) {
  19603. for (var i = 0; i < this.courseTypeId.length; i++) {
  19604. let _sid = this.courseTypeId[i]
  19605. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19606. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19607. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19608. }
  19609. }
  19610. }
  19611. }
  19612. let mclass = []
  19613. if (this.courseTypeId.length) {
  19614. for (var i = 0; i < this.courseTypeId.length; i++) {
  19615. let _sid = this.courseTypeId[i]
  19616. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19617. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19618. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19619. }
  19620. }
  19621. }
  19622. }
  19623. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  19624. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  19625. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  19626. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  19627. let messages = `NOTICE
  19628. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  19629. 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.
  19630. ${msg}
  19631. ## 课程简介
  19632. 课程名字:${this.courseName}
  19633. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19634. ${sub.length ? '学科:' + sub.join(",") : ''}
  19635. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19636. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19637. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  19638. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  19639. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  19640. _this.cpoteLoading[_index] = true
  19641. _this.cpotetLoading[_index] = true
  19642. let _uuid = uuidv4();
  19643. // let params = JSON.stringify({
  19644. // // "model": "Chat",
  19645. // model: 'gpt-3.5-turbo',
  19646. // temperature: 0,
  19647. // max_tokens: 4096,
  19648. // top_p: 1,
  19649. // frequency_penalty: 0,
  19650. // presence_penalty: 0,
  19651. // messages: [{
  19652. // content: messages,
  19653. // role: 'user'
  19654. // }],
  19655. // uid: _uuid,
  19656. // mind_map_question: "",
  19657. // })
  19658. let params = {
  19659. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19660. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19661. session_name: _uuid,
  19662. userId: _this.userid,
  19663. uid: _uuid,
  19664. file_ids: fileid.length ? [...fileid] : '',
  19665. model: 'gpt-4o-2024-08-06',
  19666. }
  19667. // let params = JSON.stringify({
  19668. // message: {
  19669. // anthropic_version: "bedrock-2023-05-31",
  19670. // max_tokens: 4096,
  19671. // temperature: 0,
  19672. // top_p: 1,
  19673. // messages: [{
  19674. // "role": "user",
  19675. // "content": messages
  19676. // }] ,
  19677. // },
  19678. // uid: _uuid,
  19679. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19680. // });
  19681. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19682. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19683. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19684. console.log(response);
  19685. // let data = response.data.FunctionResponse
  19686. // if (data.choices && data.choices.length && data.choices[0].message) {
  19687. // console.log(data.choices[0].message.content);
  19688. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  19689. // _this.$forceUpdate()
  19690. // }
  19691. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19692. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19693. } else {
  19694. _this.$message.warning(response.data.FunctionResponse.result);
  19695. }
  19696. }).catch(function (error) {
  19697. _this.cpoteLoading[_index] = false
  19698. _this.cpotetLoading[_index] = false
  19699. callback ? callback() : ''
  19700. console.log(error);
  19701. });
  19702. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  19703. },
  19704. aiCpotegetAiContent(_uid, loading, callback) {
  19705. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19706. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19707. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19708. let _allText = "";
  19709. let _mdText = "";
  19710. let _iindex = 0
  19711. _source.onmessage = _e => {
  19712. let _eData = JSON.parse(_e.data).content;
  19713. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19714. //对话已经完成
  19715. _mdText = _mdText.replace("_", "");
  19716. _source.close();
  19717. this.cpote[loading] = _mdText;
  19718. this.cpoteLoading[loading] = false
  19719. this.cpotetLoading[loading] = false
  19720. callback ? callback() : ''
  19721. return;
  19722. } else {
  19723. _iindex++
  19724. //对话还在继续
  19725. let _text = "";
  19726. _text = _eData.replaceAll("'", "");
  19727. if (_allText == "") {
  19728. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19729. } else {
  19730. _allText += _text;
  19731. }
  19732. _mdText = _allText + "_";
  19733. _mdText = _mdText.replace(/\\n/g, "\n");
  19734. _mdText = _mdText.replace(/\\/g, "");
  19735. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19736. //转化返回的回复流数据
  19737. if(_iindex == 10){
  19738. this.cpote[loading] = _mdText;
  19739. _iindex = 0
  19740. }
  19741. this.cpoteLoading[loading] = false
  19742. // 处理流数据
  19743. }
  19744. // this.$forceUpdate();
  19745. };
  19746. },
  19747. async aiteacherTextDetail(msg) {
  19748. let _this = this
  19749. let fileid = []
  19750. if (_this.teacherInfoData.length) {
  19751. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  19752. if(_this.teacherInfoData[i].fileid){
  19753. fileid.push(_this.teacherInfoData[i].fileid)
  19754. }else {
  19755. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  19756. if(_fileid){
  19757. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19758. _this.$forceUpdate();
  19759. if(_fileid != 1){
  19760. fileid.push(_fileid)
  19761. }
  19762. }
  19763. }
  19764. }
  19765. }
  19766. _this.teacherTextLoading = true
  19767. _this.tteacherTextLoading = true
  19768. let sub = []
  19769. if (_this.courseTypeId.length) {
  19770. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19771. let _sid = _this.courseTypeId[i]
  19772. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19773. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19774. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19775. }
  19776. }
  19777. }
  19778. }
  19779. let mclass = []
  19780. if (_this.courseTypeId.length) {
  19781. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19782. let _sid = _this.courseTypeId[i]
  19783. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19784. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19785. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19786. }
  19787. }
  19788. }
  19789. }
  19790. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19791. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19792. let messages = `NOTICE
  19793. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19794. 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.
  19795. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19796. Instruction: Based on the context, follow "Format example", write content.
  19797. #Context
  19798. ## 参考资料
  19799. 课程名字:${this.courseName}
  19800. ${sub.length ? '学科:' + sub.join(",") : ''}
  19801. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19802. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  19803. ## 要求
  19804. ${msg}
  19805. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19806. let _uuid = uuidv4();
  19807. // let params = JSON.stringify({
  19808. // // "model": "Chat",
  19809. // model: 'gpt-3.5-turbo',
  19810. // temperature: 0,
  19811. // max_tokens: 4096,
  19812. // top_p: 1,
  19813. // frequency_penalty: 0,
  19814. // presence_penalty: 0,
  19815. // messages: [{
  19816. // content: messages,
  19817. // role: 'user'
  19818. // }],
  19819. // uid: _uuid,
  19820. // mind_map_question: "",
  19821. // })
  19822. let params = {
  19823. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19824. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19825. session_name: _uuid,
  19826. userId: _this.userid,
  19827. uid: _uuid,
  19828. file_ids: fileid.length ? [...fileid] : '',
  19829. model: 'gpt-4o-2024-08-06',
  19830. }
  19831. // let params = JSON.stringify({
  19832. // message: {
  19833. // anthropic_version: "bedrock-2023-05-31",
  19834. // max_tokens: 4096,
  19835. // temperature: 0,
  19836. // top_p: 1,
  19837. // messages: [{
  19838. // "role": "user",
  19839. // "content": messages
  19840. // }] ,
  19841. // },
  19842. // uid: _uuid,
  19843. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19844. // });
  19845. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19846. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19847. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19848. console.log(response);
  19849. // let data = response.data.FunctionResponse
  19850. // if (data.choices && data.choices.length && data.choices[0].message) {
  19851. // _this.courseText = data.choices[0].message.content
  19852. // }
  19853. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19854. } else {
  19855. _this.$message.warning(response.data.FunctionResponse.result);
  19856. }
  19857. }).catch(function (error) {
  19858. _this.teacherTextLoading = false
  19859. _this.tteacherTextLoading = false
  19860. console.log(error);
  19861. });
  19862. await _this.aiteacherTextDetailgetAiContent(_uuid)
  19863. },
  19864. aiteacherTextDetailgetAiContent(_uid) {
  19865. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19866. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19867. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19868. let _allText = "";
  19869. let _mdText = "";
  19870. let _iindex = 0
  19871. _source.onmessage = _e => {
  19872. let _eData = JSON.parse(_e.data).content;
  19873. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19874. //对话已经完成
  19875. _mdText = _mdText.replace("_", "");
  19876. _source.close();
  19877. this.teacherCourseText = _mdText;
  19878. this.teacherTextLoading = false
  19879. this.tteacherTextLoading = false
  19880. this.teacherCourseTextB = false
  19881. return;
  19882. } else {
  19883. _iindex++
  19884. //对话还在继续
  19885. let _text = "";
  19886. _text = _eData.replaceAll("'", "");
  19887. if (_allText == "") {
  19888. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19889. } else {
  19890. _allText += _text;
  19891. }
  19892. _mdText = _allText + "_";
  19893. _mdText = _mdText.replace(/\\n/g, "\n");
  19894. _mdText = _mdText.replace(/\\/g, "");
  19895. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19896. //转化返回的回复流数据
  19897. if(_iindex == 10){
  19898. this.teacherCourseText = _mdText;
  19899. _iindex = 0
  19900. }
  19901. if(this.teacherTextLoading){
  19902. this.teacherTextLoading = false
  19903. }
  19904. // 处理流数据
  19905. }
  19906. // this.$forceUpdate();
  19907. };
  19908. },
  19909. async aitargetTextDetail(msg) {
  19910. let _this = this
  19911. let fileid = []
  19912. if (_this.teacherInfoData.length) {
  19913. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  19914. if(_this.teacherInfoData[i].fileid){
  19915. fileid.push(_this.teacherInfoData[i].fileid)
  19916. }else {
  19917. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  19918. if(_fileid){
  19919. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19920. _this.$forceUpdate();
  19921. if(_fileid != 1){
  19922. fileid.push(_fileid)
  19923. }
  19924. }
  19925. }
  19926. }
  19927. }
  19928. _this.targetTextLoading = true
  19929. _this.ttargetTextLoading = true
  19930. let sub = []
  19931. if (_this.courseTypeId.length) {
  19932. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19933. let _sid = _this.courseTypeId[i]
  19934. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19935. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19936. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19937. }
  19938. }
  19939. }
  19940. }
  19941. let mclass = []
  19942. if (_this.courseTypeId.length) {
  19943. for (var i = 0; i < _this.courseTypeId.length; i++) {
  19944. let _sid = _this.courseTypeId[i]
  19945. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19946. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19947. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19948. }
  19949. }
  19950. }
  19951. }
  19952. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  19953. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  19954. let messages = `NOTICE
  19955. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19956. 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.
  19957. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19958. Instruction: Based on the context, follow "Format example", write content.
  19959. #Context
  19960. ## 参考资料
  19961. 课程名字:${this.courseName}
  19962. ${sub.length ? '学科:' + sub.join(",") : ''}
  19963. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19964. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  19965. ## 要求
  19966. ${msg}
  19967. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  19968. let _uuid = uuidv4();
  19969. // let params = JSON.stringify({
  19970. // // "model": "Chat",
  19971. // model: 'gpt-3.5-turbo',
  19972. // temperature: 0,
  19973. // max_tokens: 4096,
  19974. // top_p: 1,
  19975. // frequency_penalty: 0,
  19976. // presence_penalty: 0,
  19977. // messages: [{
  19978. // content: messages,
  19979. // role: 'user'
  19980. // }],
  19981. // uid: _uuid,
  19982. // mind_map_question: "",
  19983. // })
  19984. let params = {
  19985. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19986. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19987. session_name: _uuid,
  19988. userId: _this.userid,
  19989. uid: _uuid,
  19990. file_ids: fileid.length ? [...fileid] : '',
  19991. model: 'gpt-4o-2024-08-06',
  19992. }
  19993. // let params = JSON.stringify({
  19994. // message: {
  19995. // anthropic_version: "bedrock-2023-05-31",
  19996. // max_tokens: 4096,
  19997. // temperature: 0,
  19998. // top_p: 1,
  19999. // messages: [{
  20000. // "role": "user",
  20001. // "content": messages
  20002. // }] ,
  20003. // },
  20004. // uid: _uuid,
  20005. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20006. // });
  20007. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20008. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20009. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20010. console.log(response);
  20011. // let data = response.data.FunctionResponse
  20012. // if (data.choices && data.choices.length && data.choices[0].message) {
  20013. // _this.courseText = data.choices[0].message.content
  20014. // }
  20015. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20016. } else {
  20017. _this.$message.warning(response.data.FunctionResponse.result);
  20018. }
  20019. }).catch(function (error) {
  20020. _this.targetTextLoading = false
  20021. _this.ttargetTextLoading = false
  20022. console.log(error);
  20023. });
  20024. await _this.aitargetTextDetailgetAiContent(_uuid)
  20025. },
  20026. aitargetTextDetailgetAiContent(_uid) {
  20027. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20028. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20029. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20030. let _allText = "";
  20031. let _mdText = "";
  20032. let _iindex = 0
  20033. _source.onmessage = _e => {
  20034. let _eData = JSON.parse(_e.data).content;
  20035. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20036. //对话已经完成
  20037. _mdText = _mdText.replace("_", "");
  20038. _source.close();
  20039. this.targetCourseText = _mdText;
  20040. this.targetTextLoading = false
  20041. this.ttargetTextLoading = false
  20042. this.targetCourseTextB = false
  20043. return;
  20044. } else {
  20045. _iindex++
  20046. //对话还在继续
  20047. let _text = "";
  20048. _text = _eData.replaceAll("'", "");
  20049. if (_allText == "") {
  20050. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20051. } else {
  20052. _allText += _text;
  20053. }
  20054. _mdText = _allText + "_";
  20055. _mdText = _mdText.replace(/\\n/g, "\n");
  20056. _mdText = _mdText.replace(/\\/g, "");
  20057. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20058. //转化返回的回复流数据
  20059. if(_iindex == 10){
  20060. this.targetCourseText = _mdText;
  20061. _iindex = 0
  20062. }
  20063. if(this.targetTextLoading){
  20064. this.targetTextLoading = false
  20065. }
  20066. // 处理流数据
  20067. }
  20068. // this.$forceUpdate();
  20069. };
  20070. },
  20071. async aitargetTextDetail2(msg) {
  20072. let _this = this
  20073. let fileid = []
  20074. if(_this.mubiaoInfoData.length){
  20075. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  20076. if(_this.mubiaoInfoData[i].fileid){
  20077. fileid.push(_this.mubiaoInfoData[i].fileid)
  20078. }else {
  20079. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  20080. if(_fileid){
  20081. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20082. _this.$forceUpdate();
  20083. if(_fileid != 1){
  20084. fileid.push(_fileid)
  20085. }
  20086. }
  20087. }
  20088. }
  20089. }
  20090. _this.targetTextLoading2 = true
  20091. _this.ttargetTextLoading2 = true
  20092. let sub = []
  20093. if (_this.courseTypeId.length) {
  20094. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20095. let _sid = _this.courseTypeId[i]
  20096. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20097. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20098. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20099. }
  20100. }
  20101. }
  20102. }
  20103. let mclass = []
  20104. if (_this.courseTypeId.length) {
  20105. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20106. let _sid = _this.courseTypeId[i]
  20107. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20108. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20109. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20110. }
  20111. }
  20112. }
  20113. }
  20114. if(sub.length){
  20115. let _fileid = _this.importFileid(sub)
  20116. fileid = [...fileid, ..._fileid]
  20117. }
  20118. let messages = `NOTICE
  20119. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20120. 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.
  20121. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20122. Instruction: Based on the context, follow "Format example", write content.
  20123. #Context
  20124. ## 参考资料
  20125. 课程标题:${this.courseName}
  20126. ${sub.length ? '学科:' + sub.join(",") : ''}
  20127. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20128. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  20129. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  20130. ## 要求
  20131. ${msg}
  20132. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  20133. let _uuid = uuidv4();
  20134. // let params = JSON.stringify({
  20135. // // "model": "Chat",
  20136. // model: 'gpt-3.5-turbo',
  20137. // temperature: 0,
  20138. // max_tokens: 4096,
  20139. // top_p: 1,
  20140. // frequency_penalty: 0,
  20141. // presence_penalty: 0,
  20142. // messages: [{
  20143. // content: messages,
  20144. // role: 'user'
  20145. // }],
  20146. // uid: _uuid,
  20147. // mind_map_question: "",
  20148. // })
  20149. let params = {
  20150. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20151. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20152. session_name: _uuid,
  20153. userId: _this.userid,
  20154. uid: _uuid,
  20155. file_ids: fileid.length ? [...fileid] : '',
  20156. model: 'gpt-4o-2024-08-06',
  20157. }
  20158. // let params = JSON.stringify({
  20159. // message: {
  20160. // anthropic_version: "bedrock-2023-05-31",
  20161. // max_tokens: 4096,
  20162. // temperature: 0,
  20163. // top_p: 1,
  20164. // messages: [{
  20165. // "role": "user",
  20166. // "content": messages
  20167. // }] ,
  20168. // },
  20169. // uid: _uuid,
  20170. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20171. // });
  20172. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20173. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20174. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20175. console.log(response);
  20176. // let data = response.data.FunctionResponse
  20177. // if (data.choices && data.choices.length && data.choices[0].message) {
  20178. // _this.courseText = data.choices[0].message.content
  20179. // }
  20180. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20181. } else {
  20182. _this.$message.warning(response.data.FunctionResponse.result);
  20183. }
  20184. }).catch(function (error) {
  20185. _this.targetTextLoading2 = false
  20186. _this.ttargetTextLoading2 = false
  20187. console.log(error);
  20188. });
  20189. await _this.aitargetTextDetail2getAiContent(_uuid)
  20190. },
  20191. importFileid(sub){
  20192. // file-SNthYVubrHGg4HjFcp3FPkZq 英语
  20193. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养
  20194. // file-nkAUyRCEMncICGuFBC1WXnM1 科学素养内涵
  20195. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文
  20196. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学核心素养
  20197. // file-35koyXrFO2T4FsrQe4qXm0io 数学素养内涵
  20198. let _sub = converter(sub.join(","))
  20199. let fileid = []
  20200. if(_sub.indexOf(converter('STEM')) != -1){
  20201. fileid.push('file-SNthYVubrHGg4HjFcp3FPkZq')
  20202. fileid.push('file-QOKhi8i84T8eR6DYhb9TaTlG')
  20203. fileid.push('file-nkAUyRCEMncICGuFBC1WXnM1')
  20204. fileid.push('file-aQmfmgrwdrHa9sCTTZkjvK7Z')
  20205. fileid.push('file-G1bRfSFnQaQtzA3c8dLshg0a')
  20206. fileid.push('file-35koyXrFO2T4FsrQe4qXm0io')
  20207. }
  20208. if(_sub.indexOf(converter('语文')) != -1){
  20209. if(fileid.indexOf('file-aQmfmgrwdrHa9sCTTZkjvK7Z') == -1){
  20210. fileid.push('file-aQmfmgrwdrHa9sCTTZkjvK7Z')
  20211. }
  20212. }
  20213. if(_sub.indexOf(converter('数学')) != -1){
  20214. if(fileid.indexOf('file-G1bRfSFnQaQtzA3c8dLshg0a') == -1){
  20215. fileid.push('file-G1bRfSFnQaQtzA3c8dLshg0a')
  20216. }
  20217. if(fileid.indexOf('file-35koyXrFO2T4FsrQe4qXm0io') == -1){
  20218. fileid.push('file-35koyXrFO2T4FsrQe4qXm0io')
  20219. }
  20220. }
  20221. if(_sub.indexOf(converter('英语')) != -1){
  20222. if(fileid.indexOf('file-SNthYVubrHGg4HjFcp3FPkZq') == -1){
  20223. fileid.push('file-SNthYVubrHGg4HjFcp3FPkZq')
  20224. }
  20225. }
  20226. if(_sub.indexOf(converter('科学')) != -1){
  20227. if(fileid.indexOf('file-QOKhi8i84T8eR6DYhb9TaTlG') == -1){
  20228. fileid.push('file-QOKhi8i84T8eR6DYhb9TaTlG')
  20229. }
  20230. if(fileid.indexOf('file-nkAUyRCEMncICGuFBC1WXnM1') == -1){
  20231. fileid.push('file-nkAUyRCEMncICGuFBC1WXnM1')
  20232. }
  20233. }
  20234. return fileid
  20235. },
  20236. async aitargetTextDetail22(msg,msg2) {
  20237. let _this = this
  20238. let fileid = []
  20239. _this.targetTextLoading2 = true
  20240. _this.ttargetTextLoading2 = true
  20241. let sub = []
  20242. if (_this.courseTypeId.length) {
  20243. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20244. let _sid = _this.courseTypeId[i]
  20245. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20246. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20247. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20248. }
  20249. }
  20250. }
  20251. }
  20252. let mclass = []
  20253. if (_this.courseTypeId.length) {
  20254. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20255. let _sid = _this.courseTypeId[i]
  20256. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20257. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20258. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20259. }
  20260. }
  20261. }
  20262. }
  20263. if(!msg2 && sub.length){
  20264. let _fileid = _this.importFileid(sub)
  20265. fileid = [...fileid, ..._fileid]
  20266. }
  20267. let messages = `NOTICE
  20268. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20269. 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.
  20270. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20271. Instruction: Based on the context, follow "Format example", write content.
  20272. #Context
  20273. ## 参考资料
  20274. 课程标题:${this.courseName}
  20275. ${sub.length ? '学科:' + sub.join(",") : ''}
  20276. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20277. 课程目标:${msg2}
  20278. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  20279. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  20280. ## 要求
  20281. ${msg}
  20282. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  20283. let _uuid = uuidv4();
  20284. // let params = JSON.stringify({
  20285. // // "model": "Chat",
  20286. // model: 'gpt-3.5-turbo',
  20287. // temperature: 0,
  20288. // max_tokens: 4096,
  20289. // top_p: 1,
  20290. // frequency_penalty: 0,
  20291. // presence_penalty: 0,
  20292. // messages: [{
  20293. // content: messages,
  20294. // role: 'user'
  20295. // }],
  20296. // uid: _uuid,
  20297. // mind_map_question: "",
  20298. // })
  20299. let params = {
  20300. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20301. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20302. session_name: _uuid,
  20303. userId: _this.userid,
  20304. uid: _uuid,
  20305. file_ids: fileid.length ? [...fileid] : '',
  20306. model: 'gpt-4o-2024-08-06',
  20307. }
  20308. // let params = JSON.stringify({
  20309. // message: {
  20310. // anthropic_version: "bedrock-2023-05-31",
  20311. // max_tokens: 4096,
  20312. // temperature: 0,
  20313. // top_p: 1,
  20314. // messages: [{
  20315. // "role": "user",
  20316. // "content": messages
  20317. // }] ,
  20318. // },
  20319. // uid: _uuid,
  20320. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20321. // });
  20322. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20323. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20324. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20325. console.log(response);
  20326. // let data = response.data.FunctionResponse
  20327. // if (data.choices && data.choices.length && data.choices[0].message) {
  20328. // _this.courseText = data.choices[0].message.content
  20329. // }
  20330. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20331. } else {
  20332. _this.$message.warning(response.data.FunctionResponse.result);
  20333. }
  20334. }).catch(function (error) {
  20335. _this.targetTextLoading2 = false
  20336. _this.ttargetTextLoading2 = false
  20337. console.log(error);
  20338. });
  20339. await _this.aitargetTextDetail2getAiContent(_uuid)
  20340. },
  20341. aitargetTextDetail2getAiContent(_uid) {
  20342. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20343. let _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20344. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20345. let _allText = "";
  20346. let _mdText = "";
  20347. let _iindex = 0
  20348. _source.onmessage = _e => {
  20349. let _eData = JSON.parse(_e.data).content;
  20350. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20351. //对话已经完成
  20352. _mdText = _mdText.replace("_", "");
  20353. _source.close();
  20354. this.targetCourseText2 = _mdText;
  20355. this.targetTextLoading2 = false
  20356. this.ttargetTextLoading2 = false
  20357. this.targetCourseText2B = false
  20358. return;
  20359. } else {
  20360. _iindex++
  20361. //对话还在继续
  20362. let _text = "";
  20363. _text = _eData.replaceAll("'", "");
  20364. if (_allText == "") {
  20365. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20366. } else {
  20367. _allText += _text;
  20368. }
  20369. _mdText = _allText + "_";
  20370. _mdText = _mdText.replace(/\\n/g, "\n");
  20371. _mdText = _mdText.replace(/\\/g, "");
  20372. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20373. //转化返回的回复流数据
  20374. if(_iindex == 10){
  20375. this.targetCourseText2 = _mdText;
  20376. _iindex = 0
  20377. }
  20378. if(this.targetTextLoading2){
  20379. this.targetTextLoading2 = false
  20380. }
  20381. // 处理流数据
  20382. }
  20383. // this.$forceUpdate();
  20384. };
  20385. },
  20386. async aitargetTextDetail3(msg) {
  20387. let _this = this
  20388. let fileid = []
  20389. if(_this.mubiaoInfoData.length){
  20390. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  20391. if(_this.mubiaoInfoData[i].fileid){
  20392. fileid.push(_this.mubiaoInfoData[i].fileid)
  20393. }else {
  20394. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  20395. if(_fileid){
  20396. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20397. _this.$forceUpdate();
  20398. if(_fileid != 1){
  20399. fileid.push(_fileid)
  20400. }
  20401. }
  20402. }
  20403. }
  20404. }
  20405. _this.targetTextLoading2 = true
  20406. _this.ttargetTextLoading2 = true
  20407. let sub = []
  20408. if (_this.courseTypeId.length) {
  20409. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20410. let _sid = _this.courseTypeId[i]
  20411. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20412. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20413. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20414. }
  20415. }
  20416. }
  20417. }
  20418. let mclass = []
  20419. if (_this.courseTypeId.length) {
  20420. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20421. let _sid = _this.courseTypeId[i]
  20422. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20423. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20424. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20425. }
  20426. }
  20427. }
  20428. }
  20429. if(sub.length){
  20430. let _fileid = _this.importFileid(sub)
  20431. fileid = [...fileid, ..._fileid]
  20432. }
  20433. let messages = `${msg}`
  20434. let _uuid = uuidv4();
  20435. // let params = JSON.stringify({
  20436. // // "model": "Chat",
  20437. // model: 'gpt-3.5-turbo',
  20438. // temperature: 0,
  20439. // max_tokens: 4096,
  20440. // top_p: 1,
  20441. // frequency_penalty: 0,
  20442. // presence_penalty: 0,
  20443. // messages: [{
  20444. // content: messages,
  20445. // role: 'user'
  20446. // }],
  20447. // uid: _uuid,
  20448. // mind_map_question: "",
  20449. // })
  20450. let params = {
  20451. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20452. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20453. session_name: _uuid,
  20454. userId: _this.userid,
  20455. uid: _uuid,
  20456. file_ids: fileid.length ? [...fileid] : '',
  20457. model: 'gpt-4o-2024-08-06',
  20458. }
  20459. // let params = JSON.stringify({
  20460. // message: {
  20461. // anthropic_version: "bedrock-2023-05-31",
  20462. // max_tokens: 4096,
  20463. // temperature: 0,
  20464. // top_p: 1,
  20465. // messages: [{
  20466. // "role": "user",
  20467. // "content": messages
  20468. // }] ,
  20469. // },
  20470. // uid: _uuid,
  20471. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20472. // });
  20473. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20474. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  20475. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20476. console.log(response);
  20477. // let data = response.data.FunctionResponse
  20478. // if (data.choices && data.choices.length && data.choices[0].message) {
  20479. // _this.courseText = data.choices[0].message.content
  20480. // }
  20481. console.log(response);
  20482. let data = response.data.FunctionResponse
  20483. // if (data.choices && data.choices.length && data.choices[0].message) {
  20484. // console.log(data.choices[0].message.content);
  20485. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  20486. // _this.$forceUpdate()
  20487. // }
  20488. if (data.message) {
  20489. console.log('返回回来的目标:',data.message);
  20490. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  20491. }
  20492. }).catch(function (error) {
  20493. _this.targetTextLoading2 = false
  20494. _this.ttargetTextLoading2 = false
  20495. console.log(error);
  20496. });
  20497. },
  20498. againEva(msg, i, k) {
  20499. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  20500. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  20501. return;
  20502. }
  20503. if (this.ruleLoading[i]) {
  20504. this.ruleLoading[i][k] = true
  20505. } else {
  20506. this.ruleLoading[i] = []
  20507. this.ruleLoading[i][k] = true
  20508. }
  20509. let message = `NOTICE
  20510. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  20511. 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.
  20512. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20513. Instruction: Based on the context, follow "Format example", write content.
  20514. #Context
  20515. ##要求
  20516. ${msg}
  20517. ##制定标准资料
  20518. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value}
  20519. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  20520. # Format example
  20521. ==
  20522. 0 星,作业内容与作业要求无关;
  20523. 1 星,没有识别问题和需求;
  20524. 2 星,问题或需求没有被清晰理解或准确识别;
  20525. 3 星,问题或需求的一部分被识别;
  20526. 4 星,问题或需求的大部分被识别;
  20527. 5 星,问题或需求都被识别。
  20528. ==
  20529. `
  20530. // let params = {
  20531. // // "model": "Chat",
  20532. // model: 'gpt-4o-2024-08-06',
  20533. // // model: "gpt-4o",
  20534. // temperature: 0,
  20535. // max_tokens: 4096,
  20536. // top_p: 1,
  20537. // frequency_penalty: 0,
  20538. // presence_penalty: 0,
  20539. // messages: [
  20540. // {
  20541. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  20542. // role: "user"
  20543. // }
  20544. // ],
  20545. // stream: false,
  20546. // uid: this.userid,
  20547. // mind_map_question: ""
  20548. // };
  20549. // this.ajax
  20550. // .post("https://gpt4.cocorobo.cn/chat", params)
  20551. // .then(response => {
  20552. // let data = response.data.FunctionResponse;
  20553. // console.log("data", data);
  20554. // if (data.choices && data.choices.length && data.choices[0].message) {
  20555. // let content = data.choices[0].message.content;
  20556. // var regex = new RegExp('==([^=]+)==');
  20557. // let match = content.match(regex);
  20558. // if (match) {
  20559. // content = match[1].trim().replaceAll(' ', '');
  20560. // // 获取匹配到的内容并去除两端空格
  20561. // console.log('contentInsideDoubleEquals', content);
  20562. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  20563. // console.log("未有星级。");
  20564. // this.againEva(msg, i, k)
  20565. // return
  20566. // }
  20567. // //  return
  20568. // } else {
  20569. // console.log("未找到匹配的内容。");
  20570. // this.againEva(msg, i, k)
  20571. // return
  20572. // }
  20573. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  20574. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  20575. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  20576. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  20577. // this.$forceUpdate();
  20578. // this.ruleLoading[i][k] = false
  20579. // }else{
  20580. // this.ruleLoading[i][k] = false
  20581. // }
  20582. // })
  20583. // .catch(error => {
  20584. // console.log(error);
  20585. // this.ruleLoading[i][k] = false
  20586. // });
  20587. let parm = {
  20588. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20589. message: [{"type":"text", "text":message.replaceAll('\n', " ").replaceAll('*', "")}],
  20590. session_name: uuidv4(),
  20591. userId: this.userid,
  20592. file_ids: [],
  20593. model: 'gpt-4o-2024-08-06',
  20594. }
  20595. this.ajax
  20596. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20597. .then(async (response) => {
  20598. console.log(response);
  20599. let data = response.data.FunctionResponse
  20600. if (data.message) {
  20601. console.log(data.message);
  20602. let content = data.message;
  20603. var regex = new RegExp('==([^=]+)==');
  20604. let match = content.match(regex);
  20605. if (match) {
  20606. content = match[1].trim().replaceAll(' ', '');
  20607. // 获取匹配到的内容并去除两端空格
  20608. console.log('contentInsideDoubleEquals', content);
  20609. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  20610. console.log("未有星级。");
  20611. this.againEva(msg, i, k)
  20612. return
  20613. }
  20614. //  return
  20615. } else {
  20616. console.log("未找到匹配的内容。");
  20617. this.againEva(msg, i, k)
  20618. return
  20619. }
  20620. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  20621. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  20622. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  20623. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  20624. this.$forceUpdate();
  20625. this.ruleLoading[i][k] = false
  20626. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  20627. }else {
  20628. this.ruleLoading[i][k] = false
  20629. }
  20630. })
  20631. .catch((error) => {
  20632. this.ruleLoading[i][k] = false
  20633. console.log(error);
  20634. });
  20635. },
  20636. async aiSearchFile(messages, callback) {
  20637. let _this = this
  20638. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20639. console.log('fileid=========',fileid)
  20640. // let params = JSON.stringify({
  20641. // // "model": "Chat",
  20642. // model: 'gpt-3.5-turbo',
  20643. // temperature: 0,
  20644. // max_tokens: 4096,
  20645. // top_p: 1,
  20646. // frequency_penalty: 0,
  20647. // presence_penalty: 0,
  20648. // messages: [{
  20649. // content: messages,
  20650. // role: 'user'
  20651. // }],
  20652. // stream: false,
  20653. // uid: this.userid,
  20654. // mind_map_question: "",
  20655. // })
  20656. // // let params = JSON.stringify({
  20657. // // message: {
  20658. // // anthropic_version: "bedrock-2023-05-31",
  20659. // // max_tokens: 4096,
  20660. // // temperature: 0,
  20661. // // top_p: 1,
  20662. // // messages: [{
  20663. // // content: messages,
  20664. // // role: 'user'
  20665. // // }], //
  20666. // // },
  20667. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20668. // // });
  20669. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20670. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20671. // console.log(response);
  20672. // let data = response.data.FunctionResponse
  20673. // if (data.choices && data.choices.length && data.choices[0].message) {
  20674. // console.log(data.choices[0].message.content);
  20675. // let dArray = JSON.parse(data.choices[0].message.content)
  20676. // _this.dArray = dArray
  20677. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20678. // for (var i = 0; i < dArray.length; i++) {
  20679. // let _task = dArray[i]
  20680. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20681. // task: _task.task,
  20682. // taskDetail: "",
  20683. // taskDetail2: _task.detail,
  20684. // taskDetail3: "",
  20685. // chapterData: [],
  20686. // toolText: "",
  20687. // toolChoose: [
  20688. // {
  20689. // tool: [],
  20690. // toolDetail: "",
  20691. // toolType: 0,
  20692. // askCount: 1,
  20693. // askTitle: "",
  20694. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20695. // },
  20696. // ],
  20697. // isShowTools: false,
  20698. // askCount: 1,
  20699. // isFold: 0,
  20700. // askTitle: "",
  20701. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20702. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20703. // homeworkList: [],
  20704. // })
  20705. // }
  20706. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20707. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20708. // _this.$forceUpdate();
  20709. // }
  20710. // // if (data.result) {
  20711. // // console.log(data.result);
  20712. // // let dArray = JSON.parse(data.result)
  20713. // // _this.dArray = dArray
  20714. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  20715. // // for (var i = 0; i < dArray.length; i++) {
  20716. // // let _task = dArray[i]
  20717. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20718. // // task: _task.task,
  20719. // // taskDetail: "",
  20720. // // taskDetail2: _task.detail,
  20721. // // taskDetail3: "",
  20722. // // chapterData: [],
  20723. // // toolText: "",
  20724. // // toolChoose: [
  20725. // // {
  20726. // // tool: [],
  20727. // // toolDetail: "",
  20728. // // toolType: 0,
  20729. // // askCount: 1,
  20730. // // askTitle: "",
  20731. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20732. // // },
  20733. // // ],
  20734. // // isShowTools: false,
  20735. // // askCount: 1,
  20736. // // isFold: 1,
  20737. // // askTitle: "",
  20738. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20739. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  20740. // // homeworkList: [],
  20741. // // })
  20742. // // }
  20743. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20744. // // _this.$forceUpdate();
  20745. // // }
  20746. // callback ? callback() : ''
  20747. // }).catch(function (error) {
  20748. // _this.loading = false
  20749. // console.log(error);
  20750. // });
  20751. let parm = {
  20752. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20753. message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20754. session_name: uuidv4(),
  20755. userId: this.userid,
  20756. file_ids: fileid.length ? [...fileid] : '',
  20757. model: 'gpt-4o-2024-08-06',
  20758. }
  20759. this.ajax
  20760. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20761. .then((response) => {
  20762. console.log(response);
  20763. let data = response.data.FunctionResponse
  20764. if (data.message) {
  20765. console.log(data.message);
  20766. let dArray = []
  20767. try {
  20768. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20769. } catch (error) {
  20770. // callback ? callback() : ''
  20771. console.log("error_________________" + error);
  20772. try {
  20773. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20774. let match = data.message.match(regex);
  20775. dArray = JSON.parse(match[0]);
  20776. } catch (error) {
  20777. callback ? callback() : ''
  20778. _this.$message.error("生成的json格式错误,请重新点击获取")
  20779. console.log("error_________________" + error);
  20780. }
  20781. }
  20782. for(let i = 0; i < dArray.length; i++){
  20783. let content = dArray[i].content
  20784. let name = '参考资料'+(i+1)
  20785. let md = new MarkdownIt();
  20786. let _html = content ? md.render(content) : ''
  20787. setTimeout(()=>{
  20788. if(i == (dArray.length - 1)){
  20789. _this.generate2(name, _html, i, callback)
  20790. }else {
  20791. _this.generate2(name, _html, i)
  20792. }
  20793. }, 500 * i)
  20794. }
  20795. _this.$forceUpdate();
  20796. }
  20797. })
  20798. .catch((error) => {
  20799. callback ? callback() : ''
  20800. console.log(error);
  20801. });
  20802. },
  20803. createFileid(url) {
  20804. let _this = this
  20805. return new Promise((resolve, reject) => {
  20806. try {
  20807. _this.ajax
  20808. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  20809. url: url,
  20810. })
  20811. .then((res) => {
  20812. let _data = res.data.FunctionResponse;
  20813. if (_data.result && _data.result.id) {
  20814. resolve(_data.result.id)
  20815. }else {
  20816. resolve(1)
  20817. }
  20818. }).catch(function (error) {
  20819. resolve(1)
  20820. });
  20821. }catch (e){
  20822. resolve(1)
  20823. }
  20824. });
  20825. }
  20826. },
  20827. beforeDestroy() {
  20828. clearTimeout(this.timer);
  20829. this.timer = null;
  20830. clearInterval(this.timer2);
  20831. this.timer2 = null;
  20832. clearInterval(this.pasteTimer);
  20833. this.pasteTimer = null;
  20834. },
  20835. beforeRouteLeave(to, from, next) {
  20836. clearTimeout(this.timer);
  20837. this.timer = null;
  20838. clearInterval(this.timer2);
  20839. this.timer2 = null;
  20840. clearInterval(this.pasteTimer);
  20841. this.pasteTimer = null;
  20842. next();
  20843. },
  20844. created() {
  20845. this.getStudent();
  20846. this.getTeacher();
  20847. this.getClass();
  20848. this.selectGrage();
  20849. this.getTemplate();
  20850. this.getTipsTemplate();
  20851. // this.selectType();
  20852. this.selectEva();
  20853. if(this.istemplate == 1){
  20854. this.isOutline = true
  20855. this.isOutline2 = true
  20856. this.courseTextBool = true
  20857. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  20858. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  20859. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  20860. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  20861. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  20862. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  20863. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  20864. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  20865. }
  20866. this.loading = false;
  20867. this.timer2 = setInterval(() => {
  20868. this.selectEva();
  20869. }, 5000);
  20870. this.pasteTimer = setInterval(() => {
  20871. this.getPaste();
  20872. }, 1000);
  20873. setTimeout(() => {
  20874. // this.selectAllType();
  20875. this.selectCourseDetail();
  20876. }, 500);
  20877. let _this = this;
  20878. window.pasteStage = function (json) {
  20879. _this.pasteStage(json);
  20880. };
  20881. window.pasteTask = function (json) {
  20882. _this.pasteTask(json);
  20883. };
  20884. },
  20885. };
  20886. </script>
  20887. <style scoped>
  20888. @media screen and (max-width: 1280px) {
  20889. .mbCss {
  20890. flex-direction: column !important;
  20891. }
  20892. .pjCss {
  20893. width: 100% !important;
  20894. }
  20895. .evaCss {
  20896. width: 100% !important;
  20897. margin-top: 10px;
  20898. }
  20899. }
  20900. .el-table>>>.even_row {
  20901. background-color: #f1f1f1 !important;
  20902. }
  20903. .dialog_diy>>>.el-dialog__header {
  20904. background: #3c3c3c !important;
  20905. padding: 15px 20px;
  20906. }
  20907. .dialog_diy>>>.el-dialog__title {
  20908. color: #fff;
  20909. }
  20910. .dialog_diy>>>.el-dialog__headerbtn {
  20911. top: 19px;
  20912. }
  20913. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  20914. color: #fff;
  20915. }
  20916. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  20917. color: #fff;
  20918. }
  20919. .dialog_diy>>>.el-dialog__body,
  20920. .dialog_diy>>>.el-dialog__footer {
  20921. background: #fafafa;
  20922. }
  20923. .dialog_diy3>>>.el-dialog__body,
  20924. .dialog_diy3>>>.el-dialog__footer {
  20925. background: #eee !important;
  20926. }
  20927. .dialog_diy3>>>.el-dialog__body {
  20928. padding: 20px 20px;
  20929. }
  20930. .dialog_diyStage>>>.el-dialog__body {
  20931. padding: 10px;
  20932. }
  20933. .source_diy>>>.el-dialog {
  20934. height: 100% !important;
  20935. margin: 0 auto !important;
  20936. }
  20937. .source_diy>>>.el-dialog__body {
  20938. height: calc(100% - 185px);
  20939. overflow: auto;
  20940. background: #e6eaf0;
  20941. }
  20942. .source_diy>>>.el-dialog__footer {
  20943. background: #e6eaf0 !important;
  20944. }
  20945. .left {
  20946. border-right: 1px solid rgb(60, 94, 143);
  20947. display: flex;
  20948. flex-direction: column;
  20949. align-items: center;
  20950. min-height: 600px;
  20951. width: 385px;
  20952. height: 80%;
  20953. }
  20954. .tips {
  20955. color: rgb(128, 128, 128);
  20956. font-size: 12px;
  20957. width: 270px;
  20958. margin: 40px;
  20959. }
  20960. .pb_content {
  20961. height: 100% !important;
  20962. /* margin: 0 20px 0 20px; */
  20963. }
  20964. .pb_content_body {
  20965. width: 100% !important;
  20966. height: 100%;
  20967. display: flex;
  20968. }
  20969. .info_solid {
  20970. width: 270px;
  20971. height: 30px;
  20972. border-left: 1px solid #bdbdbd;
  20973. margin: 10px 0px 10px 30px;
  20974. }
  20975. .info_steps {
  20976. width: 270px;
  20977. font-size: 0.875rem;
  20978. display: flex;
  20979. align-items: center;
  20980. }
  20981. .info_steps span:nth-child(1) {
  20982. width: 30px;
  20983. height: 30px;
  20984. background: rgba(0, 0, 0, 0.38);
  20985. display: block;
  20986. color: #fff;
  20987. border-radius: 40px;
  20988. text-align: center;
  20989. line-height: 30px;
  20990. }
  20991. .steps_active {
  20992. background: #3d67bc !important;
  20993. }
  20994. .info_steps span:nth-child(2) {
  20995. margin-left: 5px;
  20996. }
  20997. .right {
  20998. height: 100%;
  20999. width: 100%;
  21000. display: flex;
  21001. overflow: hidden;
  21002. flex-direction: column;
  21003. }
  21004. .leftBar{
  21005. width: 290px;
  21006. height: calc(100% - 50px);
  21007. overflow: auto;
  21008. border-radius: 5px;
  21009. margin: 25px auto;
  21010. box-sizing: border-box;
  21011. margin-right: 10px;
  21012. }
  21013. .basic_box {
  21014. margin: 0 auto;
  21015. position: relative;
  21016. padding: 0 20px 0 20px;
  21017. }
  21018. .basic_box_success {
  21019. width: 100%;
  21020. min-height: 455px;
  21021. padding: 50px 0;
  21022. position: relative;
  21023. text-align: center;
  21024. border-bottom: 1px solid #bfbfbf;
  21025. box-sizing: border-box;
  21026. display: flex;
  21027. align-items: center;
  21028. flex-direction: column;
  21029. justify-content: center;
  21030. }
  21031. .info_title {
  21032. font-size: 1.5em;
  21033. margin-right: 25px;
  21034. /* margin: 20px 30px 20px 30px; */
  21035. }
  21036. .bInfo_title {
  21037. text-align: left;
  21038. margin: 10px 0;
  21039. }
  21040. .small_title {
  21041. font-size: 14px;
  21042. line-height: 40px;
  21043. }
  21044. .chapter_beizhu {
  21045. font-size: 12px;
  21046. font-weight: bold;
  21047. float: right;
  21048. color: rgb(128, 128, 128);
  21049. margin-top: 5px;
  21050. }
  21051. .chapter_uploadBox1 {
  21052. text-align: left;
  21053. background-color: rgb(242, 242, 242);
  21054. width: 100%;
  21055. height: 67px;
  21056. padding: 0px 15px;
  21057. border-radius: 8px;
  21058. overflow: hidden;
  21059. font-size: 16px;
  21060. box-sizing: border-box;
  21061. position: relative;
  21062. }
  21063. .chapter_add {
  21064. width: 100%;
  21065. height: 32px;
  21066. margin-top: 15px;
  21067. cursor: pointer;
  21068. }
  21069. .chapter_add_l {
  21070. margin-left: 5px;
  21071. width: 30px;
  21072. height: 30px;
  21073. float: left;
  21074. border: 1px solid #aaa;
  21075. color: #aaa;
  21076. border-radius: 50%;
  21077. font-size: 25px;
  21078. text-align: center;
  21079. }
  21080. .chapter_add_r {
  21081. font-size: 18px;
  21082. height: 40px;
  21083. line-height: 30px;
  21084. text-indent: 10px;
  21085. color: #aaa;
  21086. }
  21087. .chapter_add_r span {
  21088. font-size: 12px;
  21089. color: rgb(204, 204, 204);
  21090. }
  21091. .chapter_add_input {
  21092. display: none;
  21093. }
  21094. .line {
  21095. width: 85%;
  21096. margin: 0 auto;
  21097. border-top: 1px solid #e5e5e5;
  21098. margin-top: 20px;
  21099. }
  21100. .info_btnBox {
  21101. width: calc(100%);
  21102. display: flex;
  21103. justify-content: center;
  21104. height: 80px;
  21105. align-items: center;
  21106. background: #fff;
  21107. margin: 0 auto;
  21108. border-top: 2px solid rgb(228, 232, 237);
  21109. box-sizing: border-box;
  21110. }
  21111. .info_btnBox2 {
  21112. width: calc(100%);
  21113. display: flex;
  21114. justify-content: center;
  21115. height: 20px;
  21116. align-items: center;
  21117. background: #fff;
  21118. margin: 0 auto;
  21119. border-top: 2px solid rgb(228, 232, 237);
  21120. box-sizing: border-box;
  21121. overflow: hidden;
  21122. cursor: pointer;
  21123. }
  21124. .info_btnBox3 {
  21125. width: calc(100%);
  21126. display: flex;
  21127. justify-content: flex-end;
  21128. padding: 0 20px;
  21129. height: 60px;
  21130. align-items: center;
  21131. background: unset;
  21132. margin: 0 auto;
  21133. /* border-top: 1px solid rgb(228, 232, 237); */
  21134. box-sizing: border-box;
  21135. overflow: hidden;
  21136. cursor: pointer;
  21137. background: #fff;
  21138. border-radius: 10px;
  21139. }
  21140. .info_btn+.info_btn {
  21141. margin-left: 15px;
  21142. }
  21143. .info_btn,
  21144. .teacherWord {
  21145. color: #fff;
  21146. background-color: #0f7eff;
  21147. padding: 8px 24px;
  21148. font-size: 0.9375rem;
  21149. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  21150. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  21151. min-width: 64px;
  21152. font-weight: 500;
  21153. border-radius: 4px;
  21154. box-sizing: border-box;
  21155. border: none;
  21156. cursor: pointer;
  21157. }
  21158. .teacherWord {
  21159. width: 105px !important;
  21160. text-align: center !important;
  21161. line-height: 36px !important;
  21162. padding: 0 !important;
  21163. font-size: 14px !important;
  21164. margin: 10px 0 !important;
  21165. }
  21166. .template_box {
  21167. display: flex;
  21168. flex-wrap: wrap;
  21169. }
  21170. .wordTeacher {
  21171. display: flex;
  21172. flex-direction: column;
  21173. width: 100px;
  21174. height: 100px;
  21175. text-align: center;
  21176. font-size: 13px;
  21177. margin: 0 20px 20px 0;
  21178. background: #f0f4fa;
  21179. position: relative;
  21180. border-radius: 5px;
  21181. align-items: center;
  21182. justify-content: center;
  21183. border: 1px solid #cad1dc;
  21184. color: #0e1e33;
  21185. /* padding: 25px 0px; */
  21186. cursor: pointer;
  21187. }
  21188. .wordTeacher::after {
  21189. content: "";
  21190. display: block;
  21191. position: absolute;
  21192. width: 15px;
  21193. height: 15px;
  21194. right: 10px;
  21195. top: 10px;
  21196. background-image: url(../../../assets/icon/new/choose_a.png);
  21197. background-size: 100% 100%;
  21198. }
  21199. .wordTeacherA::after {
  21200. background-image: url(../../../assets/icon/new/choose_b.png);
  21201. }
  21202. .wordTeacher:nth-child(5n) {
  21203. margin-right: 0px;
  21204. }
  21205. .wordPic {
  21206. margin: 0 auto;
  21207. width: 30px;
  21208. height: 30px;
  21209. cursor: pointer;
  21210. }
  21211. .deleteWord {
  21212. width: 22px;
  21213. height: 22px;
  21214. position: absolute;
  21215. right: 5px;
  21216. top: -15px;
  21217. cursor: pointer;
  21218. display: none;
  21219. z-index: 999;
  21220. }
  21221. .wordPic>img,
  21222. .deleteWord>img,
  21223. .addToolImg>img {
  21224. width: 100%;
  21225. height: 100%;
  21226. }
  21227. .info_btn:hover {
  21228. background-color: #4f7cd5 !important;
  21229. }
  21230. .cru_selectBox {
  21231. display: flex;
  21232. margin: 15px 0;
  21233. flex-wrap: nowrap;
  21234. white-space: nowrap;
  21235. overflow: auto;
  21236. position: relative;
  21237. height: 40px;
  21238. max-width: calc(100% - 175px);
  21239. }
  21240. .cru_selectBox::-webkit-scrollbar {
  21241. /*滚动条整体样式*/
  21242. width: 6px;
  21243. /*高宽分别对应横竖滚动条的尺寸*/
  21244. height: 6px;
  21245. }
  21246. /*定义滚动条轨道 内阴影+圆角*/
  21247. .cru_selectBox::-webkit-scrollbar-track {
  21248. border-radius: 10px;
  21249. background-color: #eee;
  21250. }
  21251. /*定义滑块 内阴影+圆角*/
  21252. .cru_selectBox::-webkit-scrollbar-thumb {
  21253. border-radius: 10px;
  21254. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  21255. background-color: rgba(0, 0, 0, 0.1);
  21256. }
  21257. .cru_line {
  21258. position: absolute;
  21259. bottom: 0px;
  21260. transition: all 0.5s;
  21261. left: 0px;
  21262. width: 50px;
  21263. height: 4px;
  21264. left: 10px;
  21265. border-radius: 2px;
  21266. background: #3681fc;
  21267. }
  21268. .cru_select {
  21269. font-size: 18px;
  21270. margin-right: 20px;
  21271. margin-left: 5px;
  21272. cursor: pointer;
  21273. color: #0e1e33;
  21274. }
  21275. .cru_select:hover {
  21276. color: #3681fc !important;
  21277. }
  21278. .cru_selected {
  21279. color: #3681fc !important;
  21280. font-weight: bold;
  21281. }
  21282. .chapter_box {
  21283. margin-top: 10px;
  21284. width: 100%;
  21285. padding: 10px 20px;
  21286. background: #fff;
  21287. border-radius: 8px;
  21288. box-sizing: border-box;
  21289. }
  21290. .chapter_contentbox {
  21291. display: flex;
  21292. align-items: center;
  21293. /* margin-top: 15px; */
  21294. }
  21295. .chapter_contentbox .cc_title {
  21296. margin: 0px;
  21297. color: black;
  21298. display: block;
  21299. white-space: nowrap;
  21300. overflow: hidden;
  21301. text-overflow: ellipsis;
  21302. margin-right: 20px;
  21303. font-size: 18px;
  21304. height: 20px;
  21305. line-height: 22px;
  21306. min-width: fit-content;
  21307. display: flex;
  21308. }
  21309. .chapter_contentbox .cc_title::before {
  21310. content: "";
  21311. height: 100%;
  21312. width: 3px;
  21313. background: #3681fc;
  21314. border-radius: 3px;
  21315. opacity: 1;
  21316. display: block;
  21317. margin-right: 10px;
  21318. }
  21319. .chapter_contentbox .cc_input {
  21320. width: 100%;
  21321. display: flex;
  21322. }
  21323. .show_taskD {
  21324. min-width: fit-content;
  21325. margin-left: 10px;
  21326. display: flex;
  21327. align-items: center;
  21328. font-size: 14px;
  21329. cursor: pointer;
  21330. color: #717c8d;
  21331. }
  21332. .show_taskD>img {
  21333. width: 15px;
  21334. margin-right: 5px;
  21335. transition: 0.2s all;
  21336. transform: rotate(-90deg);
  21337. }
  21338. .show_taskD.show>img {
  21339. transform: rotate(0deg);
  21340. }
  21341. .show_toolD {
  21342. min-width: fit-content;
  21343. margin-left: 10px;
  21344. display: flex;
  21345. align-items: center;
  21346. font-size: 14px;
  21347. cursor: pointer;
  21348. color: #717c8d;
  21349. /* position: absolute;
  21350. right: 45px;
  21351. top: 5px; */
  21352. }
  21353. .show_toolD>img {
  21354. width: 15px;
  21355. margin-right: 5px;
  21356. transition: 0.2s all;
  21357. transform: rotate(-90deg);
  21358. }
  21359. .show_toolD.show>img {
  21360. transform: rotate(0deg);
  21361. }
  21362. .remove {
  21363. background-image: url("../../../assets/icon/new/delete_u.png");
  21364. cursor: pointer;
  21365. opacity: 0.5;
  21366. width: 30px;
  21367. min-width: 30px;
  21368. height: 30px;
  21369. background-size: 100% 100%;
  21370. background-repeat: no-repeat;
  21371. margin-left: 10px;
  21372. }
  21373. .remove1 {
  21374. background-image: url("../../../assets/remove1.png");
  21375. background-repeat: no-repeat;
  21376. background-position: 5px 10px;
  21377. width: 40px;
  21378. height: 50px;
  21379. cursor: pointer;
  21380. margin-left: 10px;
  21381. }
  21382. .binfo_input {
  21383. width: 100%;
  21384. margin: 0;
  21385. padding: 12px 14px;
  21386. display: block;
  21387. min-width: 0;
  21388. outline: none;
  21389. box-sizing: border-box;
  21390. background: none;
  21391. border: none;
  21392. border-radius: 4px;
  21393. background: #fff;
  21394. font-size: 16px;
  21395. resize: none;
  21396. font-family: "Microsoft YaHei";
  21397. min-height: 48px;
  21398. /* border: 1px solid #3682fc00; */
  21399. border: 1.5px solid #cad1dc;
  21400. }
  21401. .binfo_textarea {
  21402. border: 1.5px solid #cad1dc;
  21403. font-size: 16px;
  21404. resize: none;
  21405. /* background: #f6f6f6; */
  21406. font-family: "Microsoft YaHei";
  21407. }
  21408. .binfo_input:focus-visible {
  21409. border: 1.5px solid #3681fc !important;
  21410. }
  21411. .time {
  21412. display: flex;
  21413. margin: 35px 0 80px 0;
  21414. }
  21415. .chapter_btnbox {
  21416. width: 160px;
  21417. border-radius: 5px;
  21418. border: 2px dashed gray;
  21419. display: flex;
  21420. padding: 8px 50px;
  21421. align-items: center;
  21422. justify-content: center;
  21423. margin: 30px auto 0;
  21424. cursor: pointer;
  21425. }
  21426. .icon_add {
  21427. position: relative;
  21428. width: 24px;
  21429. padding-top: 20px;
  21430. border-radius: 100%;
  21431. border-width: 2px;
  21432. border-style: solid;
  21433. border-color: gray;
  21434. }
  21435. .icon_add i:nth-child(1) {
  21436. position: absolute;
  21437. left: 50%;
  21438. top: 50%;
  21439. height: 60%;
  21440. transform: translate(-50%, -50%);
  21441. border-width: 1px;
  21442. border-style: solid;
  21443. border-color: inherit;
  21444. }
  21445. .icon_add i:nth-child(2) {
  21446. position: absolute;
  21447. top: 50%;
  21448. left: 50%;
  21449. width: 60%;
  21450. transform: translate(-50%, -50%);
  21451. border-width: 1px;
  21452. border-style: solid;
  21453. border-color: inherit;
  21454. }
  21455. .chapter_btn_w {
  21456. font-size: 0.9375rem;
  21457. font-weight: bold;
  21458. color: gray;
  21459. margin-left: 20px;
  21460. }
  21461. .disUoloadSty>>>.el-icon-plus {
  21462. display: none !important;
  21463. /* 上传按钮隐藏 */
  21464. }
  21465. .imgLeft {
  21466. margin: 15px 0;
  21467. }
  21468. .add_info_box {
  21469. margin: 0 0 0 auto;
  21470. display: flex;
  21471. flex-wrap: wrap;
  21472. }
  21473. .add_info_box button {
  21474. margin: 0 5px 10px 0;
  21475. }
  21476. .add_info_box2 {
  21477. display: flex;
  21478. align-items: center;
  21479. flex-wrap: wrap;
  21480. }
  21481. .add_info_box2::after {
  21482. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  21483. color: red;
  21484. font-size: 14px;
  21485. margin-bottom: 10px;
  21486. }
  21487. .add_chapters_box {
  21488. text-align: left;
  21489. background-color: #fff;
  21490. width: 100%;
  21491. border-radius: 4px;
  21492. font-size: 16px;
  21493. box-sizing: border-box;
  21494. position: relative;
  21495. padding: 0 15px;
  21496. height: auto;
  21497. overflow-y: auto;
  21498. overflow-x: hidden;
  21499. border: 1px solid #cad1dc;
  21500. }
  21501. .add_chapters_box.add_c_none {
  21502. display: flex;
  21503. justify-content: center;
  21504. align-items: center;
  21505. padding: 15px;
  21506. }
  21507. .add_c_none>img {
  21508. width: 25px;
  21509. }
  21510. .add_chapters_box.add_c_none>span {
  21511. font-size: 14px;
  21512. font-weight: 400;
  21513. margin: 0 0 5px 5px;
  21514. }
  21515. .homework_box {
  21516. display: flex;
  21517. align-items: flex-start;
  21518. flex-wrap: wrap;
  21519. margin: 15px 0 0 0;
  21520. flex-direction: column;
  21521. align-content: flex-start;
  21522. }
  21523. .course_homework {
  21524. display: flex;
  21525. justify-content: center;
  21526. flex-direction: row;
  21527. align-items: center;
  21528. margin: 0 10px 0 0;
  21529. }
  21530. .course_homework>>>.el-input__inner {
  21531. width: 140px;
  21532. margin-left: 15px;
  21533. }
  21534. .chapter_upload_move {
  21535. position: relative;
  21536. background-color: #fff;
  21537. position: absolute;
  21538. width: 100%;
  21539. top: 0px;
  21540. left: 0px;
  21541. border: 1px solid #eee;
  21542. border-radius: 5px;
  21543. transition: width 2s;
  21544. -moz-transition: width 2s;
  21545. -webkit-transition: width 2s;
  21546. -o-transition: width 2s;
  21547. }
  21548. .chapter_upload_l_i {
  21549. background-image: url("../../../assets/icon.png");
  21550. background-position: 3px -165px;
  21551. width: 30px;
  21552. height: 30px;
  21553. margin: 10px auto 0 auto;
  21554. }
  21555. .course_input_box {
  21556. display: flex;
  21557. margin-right: 20px;
  21558. width: 100%;
  21559. align-items: center;
  21560. position: relative;
  21561. }
  21562. .course_input_box>.binfo_input {
  21563. width: calc(100% - 0 - 200px - 20px);
  21564. margin: 0 10px;
  21565. }
  21566. .bb_courseIcon {
  21567. width: 57px;
  21568. height: 45px;
  21569. background: #f0f4fa;
  21570. border-radius: 5px 0px 0px 5px;
  21571. display: flex;
  21572. align-items: center;
  21573. justify-content: center;
  21574. border-right: 1.5px solid rgb(202, 209, 220);
  21575. box-sizing: border-box;
  21576. position: absolute;
  21577. left: 1.5px;
  21578. }
  21579. .bb_courseIcon>img {
  21580. width: 25px;
  21581. height: auto;
  21582. }
  21583. .big_box {
  21584. /* margin-top: 20px; */
  21585. display: flex;
  21586. justify-content: space-between;
  21587. /* border-bottom: 1px solid #E0E2ED; */
  21588. }
  21589. .left_first {
  21590. display: flex;
  21591. flex-direction: column;
  21592. flex-wrap: nowrap;
  21593. width: calc(100% - 310px);
  21594. padding: 20px;
  21595. box-sizing: border-box;
  21596. background: #fff;
  21597. border-radius: 5px;
  21598. }
  21599. .right_first {
  21600. width: 300px;
  21601. display: flex;
  21602. align-items: center;
  21603. justify-content: center;
  21604. /* border-left: 1px solid #E0E2ED; */
  21605. box-sizing: border-box;
  21606. padding: 20px;
  21607. flex-direction: column;
  21608. background: #fff;
  21609. border-radius: 5px;
  21610. }
  21611. .ai_box {
  21612. width: 204px;
  21613. display: flex;
  21614. justify-content: flex-end;
  21615. margin-bottom: 15px;
  21616. }
  21617. .ai_content {
  21618. display: flex;
  21619. align-items: center;
  21620. font-size: 14px;
  21621. padding: 7px 20px;
  21622. box-sizing: border-box;
  21623. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  21624. border-radius: 12px;
  21625. font-weight: 700;
  21626. cursor: pointer;
  21627. }
  21628. .ai_content>img {
  21629. width: 40px;
  21630. margin-right: 5px;
  21631. }
  21632. .c_info_title {
  21633. padding: 15px 0 15px 0;
  21634. font-size: 16px;
  21635. font-weight: bold;
  21636. margin: 0 0 0 20px;
  21637. box-sizing: border-box;
  21638. display: flex;
  21639. align-items: center;
  21640. line-height: 20px;
  21641. }
  21642. .c_info_title::before {
  21643. content: "";
  21644. display: block;
  21645. width: 3px;
  21646. height: 20px;
  21647. background: #0061ff;
  21648. border-radius: 3px;
  21649. margin: 0 5px 0 0;
  21650. }
  21651. .right_title {
  21652. height: 30px;
  21653. padding: 15px 0 15px 20px;
  21654. border-bottom: 1px solid #f2f2f2;
  21655. font-size: 1.5em;
  21656. font-weight: bold;
  21657. color: #0f7eff;
  21658. margin: 0 auto;
  21659. }
  21660. .people {
  21661. border: 1px solid rgb(229 229 229);
  21662. /* height: 495px; */
  21663. height: 350px;
  21664. border-radius: 5px;
  21665. width: 100%;
  21666. overflow: auto;
  21667. }
  21668. .people_top {
  21669. display: flex;
  21670. width: 100%;
  21671. /* justify-content: space-between; */
  21672. /* align-items: center; */
  21673. flex-direction: column;
  21674. padding: 10px 10px 0;
  21675. box-sizing: border-box;
  21676. }
  21677. .people_nav,
  21678. .people_top_right {
  21679. /* padding: 20px 0 0 20px; */
  21680. }
  21681. .people_top_right {
  21682. height: 40px;
  21683. margin-bottom: 10px;
  21684. }
  21685. .people_search {
  21686. display: flex;
  21687. position: relative;
  21688. }
  21689. .people_search>>>.el-input__inner {
  21690. /* height: 25px; */
  21691. width: 100%;
  21692. }
  21693. .search_img {
  21694. width: 20px;
  21695. height: 20px;
  21696. position: absolute;
  21697. right: 10px;
  21698. top: 50%;
  21699. transform: translateY(-50%);
  21700. }
  21701. .search_img>img {
  21702. width: 100%;
  21703. height: 100%;
  21704. }
  21705. .people_name {
  21706. display: flex;
  21707. justify-content: flex-start;
  21708. padding: 20px 10px;
  21709. flex-direction: column;
  21710. flex-wrap: wrap;
  21711. }
  21712. .p_box {
  21713. position: relative;
  21714. }
  21715. .people_name>>>.el-checkbox {
  21716. width: 100%;
  21717. display: flex;
  21718. align-items: center;
  21719. margin-bottom: 10px;
  21720. }
  21721. .people_name>>>.el-checkbox__label {
  21722. text-overflow: ellipsis;
  21723. overflow: hidden;
  21724. width: calc(100%);
  21725. }
  21726. .people_name2>>>.el-checkbox__label {
  21727. width: calc(100% - 130px);
  21728. }
  21729. .inviteCode {
  21730. position: absolute;
  21731. right: 30px;
  21732. color: #237ade;
  21733. top: 0;
  21734. cursor: pointer;
  21735. font-size: 13px;
  21736. }
  21737. .noneInvite {
  21738. color: #a8a8a8;
  21739. }
  21740. .inviteImg {
  21741. position: absolute;
  21742. right: 5px;
  21743. top: 0;
  21744. width: 20px;
  21745. }
  21746. .right_img {
  21747. width: 150px;
  21748. height: 150px;
  21749. margin: 0 auto;
  21750. }
  21751. .right_img>img {
  21752. width: 100%;
  21753. height: 100%;
  21754. }
  21755. .number {
  21756. margin-top: 20px;
  21757. color: #4aa6ff;
  21758. text-decoration: underline;
  21759. }
  21760. .success_button {
  21761. display: flex;
  21762. text-align: center;
  21763. margin: 5% 0 auto;
  21764. flex-direction: row;
  21765. justify-content: center;
  21766. }
  21767. .look_course {
  21768. margin-right: 40px;
  21769. background: #3d67bc;
  21770. width: 200px;
  21771. height: 35px;
  21772. line-height: 35px;
  21773. color: #fff;
  21774. text-align: center;
  21775. font-size: 14px;
  21776. border-radius: 5px;
  21777. cursor: pointer;
  21778. }
  21779. .attend_others {
  21780. width: 250px;
  21781. background: #4fb13c;
  21782. height: 35px;
  21783. line-height: 35px;
  21784. color: #fff;
  21785. text-align: center;
  21786. font-size: 14px;
  21787. border-radius: 5px;
  21788. cursor: pointer;
  21789. }
  21790. .dialog_diy2>>>.el-dialog__body {
  21791. text-align: center;
  21792. }
  21793. .write_togother {
  21794. position: absolute;
  21795. right: 45px;
  21796. display: flex;
  21797. top: 5%;
  21798. }
  21799. .write_people {
  21800. font-size: 14px;
  21801. line-height: 50px;
  21802. padding-right: 10px;
  21803. }
  21804. .end_write {
  21805. background: #3d67bc;
  21806. color: #fff;
  21807. width: 100px;
  21808. height: 35px;
  21809. line-height: 35px;
  21810. text-align: center;
  21811. font-size: 14px;
  21812. border-radius: 5px;
  21813. cursor: pointer;
  21814. }
  21815. .chapter_upload+.chapter_upload {
  21816. /* margin-top: 15px; */
  21817. border-top: 1px solid #e7ebf1;
  21818. }
  21819. .chapter_upload {
  21820. height: 45px;
  21821. position: relative;
  21822. display: flex;
  21823. align-items: center;
  21824. width: 100%;
  21825. min-height: 45px;
  21826. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  21827. /* border-radius: 4px; */
  21828. /* overflow: hidden; */
  21829. box-sizing: border-box;
  21830. }
  21831. .chapter_upload_drag {
  21832. position: absolute;
  21833. cursor: pointer;
  21834. width: 16px;
  21835. height: 16px;
  21836. left: -9px;
  21837. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  21838. background-size: 100% 100%;
  21839. z-index: 10;
  21840. display: none;
  21841. }
  21842. .isNavStage>.chapter_upload_drag {
  21843. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  21844. }
  21845. .chapter_upload_t {
  21846. background-color: #fff;
  21847. position: absolute;
  21848. height: 100%;
  21849. top: 0px;
  21850. left: 0px;
  21851. box-sizing: border-box;
  21852. }
  21853. .chapter_upload_o {
  21854. width: 100%;
  21855. height: 100%;
  21856. position: relative;
  21857. z-index: 1;
  21858. }
  21859. .chapter_upload_ic {
  21860. margin: 0 15px 0px auto;
  21861. display: flex;
  21862. align-items: center;
  21863. }
  21864. .chapter_upload_ic_l {
  21865. width: 50px;
  21866. height: 50px;
  21867. float: left;
  21868. }
  21869. .chapter_upload_ic_l div {
  21870. width: 30px;
  21871. height: 35px;
  21872. background: url("../../../assets/icon/icon.png");
  21873. }
  21874. .chapter_upload_ic_edit {
  21875. height: 100%;
  21876. display: flex;
  21877. align-items: center;
  21878. cursor: pointer;
  21879. margin: 0 10px 0 0;
  21880. }
  21881. .chapter_upload_ic_edit div {
  21882. width: 18px;
  21883. height: 18px;
  21884. background-image: url("../../../assets/icon/new/edit_u.png");
  21885. background-size: 100% 100%;
  21886. }
  21887. .chapter_upload_ic_check {
  21888. height: 100%;
  21889. display: flex;
  21890. align-items: center;
  21891. cursor: pointer;
  21892. margin: 0 10px 0 0;
  21893. }
  21894. .chapter_upload_ic_check div {
  21895. width: 18px;
  21896. height: 18px;
  21897. background-image: url("../../../assets/icon/course/lookeye.svg");
  21898. background-size: 100% 100%;
  21899. }
  21900. .chapter_upload_ic_r {
  21901. height: 100%;
  21902. display: flex;
  21903. align-items: center;
  21904. cursor: pointer;
  21905. }
  21906. .chapter_upload_ic_r div {
  21907. width: 18px;
  21908. height: 18px;
  21909. background-image: url("../../../assets/icon/new/delete_u.png");
  21910. background-size: 100% 100%;
  21911. }
  21912. .chapter_upload_n {
  21913. display: flex;
  21914. text-indent: 10px;
  21915. text-decoration: none;
  21916. text-overflow: ellipsis;
  21917. white-space: nowrap;
  21918. overflow: hidden;
  21919. width: 55%;
  21920. margin-left: 10px;
  21921. cursor: pointer;
  21922. margin-top: 2px;
  21923. align-items: center;
  21924. }
  21925. .chapter_upload_l_i2,
  21926. .chapter_upload_l_i3,
  21927. .chapter_upload_l_i8,
  21928. .chapter_upload_l_i6,
  21929. .chapter_upload_l_i12,
  21930. .chapter_upload_l_i14,
  21931. .chapter_upload_l_i13 {
  21932. width: 15px;
  21933. height: 15px;
  21934. background-size: 100% 100%;
  21935. }
  21936. .chapter_upload_l_i2 {
  21937. background-image: url("../../../assets/icon/new/u_word.png");
  21938. }
  21939. .chapter_upload_l_i3 {
  21940. background-image: url("../../../assets/icon/new/u_video.png");
  21941. }
  21942. .chapter_upload_l_i8 {
  21943. background-image: url("../../../assets/icon/new/u_url.png");
  21944. }
  21945. .chapter_upload_l_i14 {
  21946. background-image: url("../../../assets/icon/new/u_source.png");
  21947. }
  21948. .chapter_upload_l_i6 {
  21949. background-image: url("../../../assets/icon/new/u_picture.png");
  21950. }
  21951. .chapter_upload_l_i12 {
  21952. background-image: url("../../../assets/icon/new/u_word.png");
  21953. }
  21954. .chapter_upload_l_i13 {
  21955. background-image: url("../../../assets/icon/new/u_img.png");
  21956. }
  21957. .chapter_upload_noSee {
  21958. background-image: url("../../../assets/icon/new/u_noUpload.png");
  21959. width: 18px;
  21960. height: 18px;
  21961. background-size: 100% 100%;
  21962. display: block;
  21963. margin-right: 10px;
  21964. }
  21965. .chapter_upload_ud {
  21966. display: flex;
  21967. flex-direction: row;
  21968. justify-content: center;
  21969. margin: 0 10px 0 0;
  21970. }
  21971. .chapter_upload_ud>.chapter_upload_up {
  21972. margin-bottom: 0;
  21973. margin-right: 10px;
  21974. }
  21975. .chapter_upload_down,
  21976. .chapter_upload_up {
  21977. width: 20px;
  21978. height: 20px;
  21979. background: #e4eaf2;
  21980. cursor: pointer;
  21981. margin: 0 auto;
  21982. border-radius: 5px;
  21983. display: flex;
  21984. justify-content: center;
  21985. align-items: center;
  21986. }
  21987. .chapter_upload_up::after,
  21988. .chapter_upload_down::after {
  21989. content: "";
  21990. background-image: url("../../../assets/icon/new/downBtn.png");
  21991. width: 13px;
  21992. height: 13px;
  21993. background-size: 100% 100%;
  21994. display: block;
  21995. }
  21996. .chapter_upload_up::after {
  21997. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  21998. }
  21999. .chapter_upload_up {
  22000. margin-bottom: 5px;
  22001. }
  22002. .chapter_upload_ud2 {
  22003. display: flex;
  22004. flex-direction: row;
  22005. justify-content: center;
  22006. margin: 0 10px 0 0;
  22007. }
  22008. .chapter_upload_ud2>.chapter_upload_up2 {
  22009. margin-bottom: 0;
  22010. margin-right: 10px;
  22011. }
  22012. .chapter_upload_down2,
  22013. .chapter_upload_up2 {
  22014. cursor: pointer;
  22015. margin: 0 auto;
  22016. border-radius: 5px;
  22017. display: flex;
  22018. justify-content: center;
  22019. align-items: center;
  22020. color: #717c8d;
  22021. font-size: 14px;
  22022. }
  22023. .chapter_upload_up2 {
  22024. margin-right: 10px;
  22025. }
  22026. .chapter_upload_up2::before,
  22027. .chapter_upload_down2::before {
  22028. content: "";
  22029. background-image: url("../../../assets/icon/new/c_down.png");
  22030. width: 14px;
  22031. height: 14px;
  22032. background-size: 100% 100%;
  22033. display: block;
  22034. margin-right: 5px;
  22035. }
  22036. .chapter_upload_up2::before {
  22037. background-image: url("../../../assets/icon/new/c_up.png") !important;
  22038. }
  22039. .addWordStyle {
  22040. display: flex;
  22041. flex-direction: row;
  22042. justify-content: flex-start;
  22043. overflow-x: auto;
  22044. white-space: nowrap;
  22045. flex-wrap: wrap;
  22046. }
  22047. /* table 样式 */
  22048. .cont>>>table {
  22049. border-top: 1px solid #ccc;
  22050. border-left: 1px solid #ccc;
  22051. }
  22052. .cont>>>table td,
  22053. .cont>>>table th {
  22054. border-bottom: 1px solid #ccc;
  22055. border-right: 1px solid #ccc;
  22056. /* padding: 20px 5px; */
  22057. padding: 5px 10px;
  22058. max-width: 0px;
  22059. height: 30px;
  22060. vertical-align: baseline;
  22061. }
  22062. .cont>>>table th {
  22063. border-bottom: 2px solid #ccc;
  22064. text-align: center;
  22065. }
  22066. /* blockquote 样式 */
  22067. .cont>>>blockquote {
  22068. display: block;
  22069. border-left: 8px solid #d0e5f2;
  22070. padding: 5px 10px;
  22071. margin: 10px 0;
  22072. line-height: 1.4;
  22073. font-size: 100%;
  22074. background-color: #f1f1f1;
  22075. }
  22076. /* code 样式 */
  22077. .cont>>>code {
  22078. display: inline-block;
  22079. /* *display: inline; */
  22080. zoom: 1;
  22081. background-color: #f1f1f1;
  22082. border-radius: 3px;
  22083. padding: 3px 5px;
  22084. margin: 0 3px;
  22085. }
  22086. .cont>>>pre code {
  22087. display: block;
  22088. }
  22089. /* ul ol 样式 */
  22090. .cont>>>ul,
  22091. ol {
  22092. margin: 10px 0 10px 20px;
  22093. }
  22094. .wordbox {
  22095. display: flex;
  22096. flex-wrap: wrap;
  22097. cursor: pointer;
  22098. width: 100%;
  22099. }
  22100. .checkword {
  22101. width: 22px;
  22102. height: 22px;
  22103. margin: 10px auto 0;
  22104. cursor: pointer;
  22105. }
  22106. .checkword img {
  22107. width: 100%;
  22108. }
  22109. .stepBg {
  22110. display: flex;
  22111. justify-content: space-between;
  22112. align-items: center;
  22113. background: #fff;
  22114. width: calc(100%);
  22115. margin: 0 auto;
  22116. }
  22117. .stepBorder {
  22118. height: 3px !important;
  22119. background: #cad1dc;
  22120. width: 100px !important;
  22121. margin: 0 15px !important;
  22122. position: relative;
  22123. }
  22124. .border-active {
  22125. background: #3681fc !important;
  22126. }
  22127. .border-active::before,
  22128. .border-active::after {
  22129. border-color: #3681fc !important;
  22130. }
  22131. .stepBorder::before,
  22132. .stepBorder::after {
  22133. content: "";
  22134. width: 9px;
  22135. height: 9px;
  22136. background: #ffffff;
  22137. opacity: 1;
  22138. border: 2px solid #acb4bf;
  22139. display: block;
  22140. box-sizing: border-box;
  22141. border-radius: 50%;
  22142. position: absolute;
  22143. top: 50%;
  22144. transform: translateY(-50%);
  22145. }
  22146. .stepBorder::after {
  22147. right: -9px;
  22148. }
  22149. .stepTop {
  22150. width: 100%;
  22151. /* border-radius: 10px; */
  22152. display: flex;
  22153. justify-content: center;
  22154. align-items: center;
  22155. flex-wrap: nowrap;
  22156. background: #fff;
  22157. /* top: 18%; */
  22158. height: 80px;
  22159. border-bottom: 2px solid rgb(228, 232, 237);
  22160. box-sizing: border-box;
  22161. }
  22162. .stepTop2 {
  22163. width: 100%;
  22164. /* border-radius: 10px; */
  22165. display: flex;
  22166. justify-content: center;
  22167. align-items: center;
  22168. flex-wrap: nowrap;
  22169. background: #fff;
  22170. /* top: 18%; */
  22171. height: 20px;
  22172. border-bottom: 2px solid rgb(228, 232, 237);
  22173. box-sizing: border-box;
  22174. overflow: hidden;
  22175. cursor: pointer;
  22176. }
  22177. .stepTop>div img {
  22178. width: 100%;
  22179. }
  22180. .stepTop>div {
  22181. height: 50px;
  22182. width: 180px;
  22183. cursor: pointer;
  22184. margin: 10px 0;
  22185. border-radius: 10px;
  22186. }
  22187. .first,
  22188. .second,
  22189. .third,
  22190. .four {
  22191. background: #3681fc;
  22192. height: 90px;
  22193. color: #fff;
  22194. display: flex;
  22195. flex-direction: row;
  22196. align-items: center;
  22197. justify-content: center;
  22198. }
  22199. .first>div:nth-child(1),
  22200. .second>div:nth-child(1),
  22201. .third>div:nth-child(1),
  22202. .four>div:nth-child(1) {
  22203. margin: 5px 10px 0 0;
  22204. width: 2rem;
  22205. }
  22206. .firstNo,
  22207. .secondNo,
  22208. .thirdNo,
  22209. .fourNo {
  22210. background: #e7e7e7;
  22211. color: #adadad;
  22212. display: flex;
  22213. flex-direction: row;
  22214. align-items: center;
  22215. justify-content: center;
  22216. }
  22217. .firstNo>div:nth-child(1),
  22218. .secondNo>div:nth-child(1),
  22219. .thirdNo>div:nth-child(1),
  22220. .fourNo>div:nth-child(1) {
  22221. margin: 5px 10px 0 0;
  22222. width: 2rem;
  22223. }
  22224. .uploadWidth>>>.el-upload {
  22225. width: 60px;
  22226. height: 60px;
  22227. position: relative;
  22228. }
  22229. .addPeople {
  22230. background: #fa6060;
  22231. width: 150px;
  22232. height: 40px;
  22233. color: #fff;
  22234. border-radius: 5px;
  22235. text-align: center;
  22236. line-height: 40px;
  22237. font-size: 14px;
  22238. cursor: pointer;
  22239. }
  22240. .kcImg {
  22241. width: 60px;
  22242. margin-left: 10px;
  22243. }
  22244. .zyImg {
  22245. width: 55px;
  22246. margin: 0 10px;
  22247. }
  22248. .deleteZy {
  22249. width: 20px;
  22250. position: absolute;
  22251. top: 5px;
  22252. right: 5px;
  22253. cursor: pointer;
  22254. }
  22255. .kcImg>img,
  22256. .zyImg>img,
  22257. .deleteZy>img {
  22258. width: 100%;
  22259. height: 100%;
  22260. }
  22261. .zyBox {
  22262. display: flex;
  22263. flex-direction: row;
  22264. align-items: center;
  22265. background: #67d37d;
  22266. color: #fff;
  22267. width: 210px;
  22268. margin: 20px 20px 0 0;
  22269. border-radius: 10px;
  22270. height: 70px;
  22271. position: relative;
  22272. }
  22273. .upCss {
  22274. display: flex;
  22275. flex-direction: row;
  22276. justify-content: flex-start;
  22277. }
  22278. .upCss>>>.el-icon-plus {
  22279. position: none !important;
  22280. width: 200px;
  22281. height: 100px;
  22282. display: flex;
  22283. flex-wrap: nowrap;
  22284. flex-direction: column;
  22285. align-items: center;
  22286. justify-content: center;
  22287. border: 1px dashed #ccc;
  22288. min-width: 78px;
  22289. min-height: 100px;
  22290. z-index: 999;
  22291. }
  22292. .upCss>>>.el-upload-list__item-name {
  22293. width: 100px;
  22294. white-space: nowrap;
  22295. overflow: hidden;
  22296. text-overflow: ellipsis;
  22297. }
  22298. .upCss>>>.el-upload-list__item .el-icon-close {
  22299. font-size: 20px;
  22300. z-index: 9999;
  22301. }
  22302. .addStageImg {
  22303. min-width: 20px;
  22304. min-height: 20px;
  22305. width: 20px;
  22306. height: 20px;
  22307. cursor: pointer;
  22308. }
  22309. .addHW {
  22310. width: 28px;
  22311. height: 28px;
  22312. cursor: pointer;
  22313. }
  22314. .addStageImg>img,
  22315. .addHW>img {
  22316. width: 100%;
  22317. height: 100%;
  22318. }
  22319. .addNewPP>>>.el-dialog__body {
  22320. padding: 5px 20px;
  22321. }
  22322. .addNewPP>>>.el-dialog {
  22323. margin-top: 5vh !important;
  22324. }
  22325. .addNewPP2>>>.el-dialog__body {
  22326. padding: 5px 0;
  22327. }
  22328. .addNewPP2>>>.el-dialog {
  22329. margin-top: 5vh !important;
  22330. }
  22331. .isHeight {
  22332. height: 680px;
  22333. }
  22334. .toolChoose {
  22335. display: flex;
  22336. /* width: 100%; */
  22337. flex-direction: row;
  22338. flex-wrap: wrap;
  22339. }
  22340. .tool,
  22341. .isToolChoose {
  22342. display: flex;
  22343. flex-direction: column;
  22344. flex-wrap: nowrap;
  22345. width: fit-content;
  22346. margin: 10px 0 10px 0;
  22347. align-items: center;
  22348. border: 2px solid #dbdbdb00;
  22349. padding: 10px 20px;
  22350. border-radius: 5px;
  22351. cursor: pointer;
  22352. /* box-shadow: 0 0 2px 0px #dedede; */
  22353. position: relative;
  22354. box-sizing: border-box;
  22355. }
  22356. .tool:hover {
  22357. border: 2px solid #a5c7ff;
  22358. }
  22359. .tool:hover>.noCTool {
  22360. display: block;
  22361. opacity: 0.5;
  22362. }
  22363. .isToolChoose {
  22364. border: 2px solid #438aff !important;
  22365. box-shadow: 0 0 2px 0px #438aff;
  22366. opacity: 1 !important;
  22367. }
  22368. .isCTool,
  22369. .noCTool {
  22370. width: 30px;
  22371. height: 30px;
  22372. position: absolute;
  22373. top: -4px;
  22374. right: -4px;
  22375. }
  22376. .noCTool {
  22377. display: none;
  22378. }
  22379. .isCTool>img,
  22380. .noCTool>img {
  22381. width: 100%;
  22382. height: 100%;
  22383. }
  22384. .tool+.tool {
  22385. margin-right: 10px;
  22386. }
  22387. .whiteBIcon {
  22388. width: 80px;
  22389. cursor: pointer;
  22390. display: flex;
  22391. flex-direction: column;
  22392. flex-wrap: nowrap;
  22393. align-items: center;
  22394. font-size: 14px;
  22395. }
  22396. .whiteBIcon>img,
  22397. .toolIcon>img,
  22398. .arrow>img {
  22399. width: 100%;
  22400. height: 100%;
  22401. }
  22402. .check img {
  22403. width: 20px;
  22404. height: 20px;
  22405. }
  22406. .whiteBIcon>img {
  22407. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  22408. border-radius: 15px;
  22409. }
  22410. .whiteBIcon>div:nth-child(2) {
  22411. height: 20px;
  22412. line-height: 20px;
  22413. }
  22414. .check {
  22415. /* width: 20px;
  22416. height: 20px; */
  22417. cursor: pointer;
  22418. margin: 10px 0 0;
  22419. }
  22420. .checkDiv {
  22421. display: flex;
  22422. align-items: center;
  22423. }
  22424. .checkDiv span {
  22425. margin-left: 5px;
  22426. color: #858585;
  22427. }
  22428. .customWidth>>>.el-dialog {
  22429. min-width: 600px !important;
  22430. }
  22431. .CollaborativeCss {
  22432. width: 100%;
  22433. display: flex;
  22434. justify-content: center;
  22435. align-items: center;
  22436. box-sizing: border-box;
  22437. padding: 10px 0;
  22438. cursor: pointer;
  22439. }
  22440. .CollaborativeCss >>> .el-tooltip {
  22441. overflow: hidden;
  22442. white-space: nowrap;
  22443. text-overflow: ellipsis;
  22444. }
  22445. .CollaborativeCss2 {
  22446. background: #e0eafb;
  22447. color: #3681fc;
  22448. font-weight: 700;
  22449. border-radius: 5px;
  22450. }
  22451. .a_addBox {
  22452. margin: 10px 0;
  22453. background: #fff;
  22454. padding: 15px;
  22455. /* max-height: 600px; */
  22456. overflow: auto;
  22457. }
  22458. .a_add_box {
  22459. border-bottom: 2px solid #eee;
  22460. padding-bottom: 25px;
  22461. }
  22462. .a_add_head {
  22463. display: flex;
  22464. align-items: center;
  22465. justify-content: space-between;
  22466. margin: 10px 0 0 0;
  22467. font-size: 18px;
  22468. }
  22469. .a_add_checkType {
  22470. margin-top: 10px;
  22471. display: flex;
  22472. font-size: 14px;
  22473. align-items: center;
  22474. }
  22475. .a_add_checkType span {
  22476. box-sizing: border-box;
  22477. padding: 0 0 5px 0;
  22478. cursor: pointer;
  22479. }
  22480. .a_add_checkType span+span {
  22481. margin-left: 10px;
  22482. }
  22483. .a_add_checkType .active {
  22484. border-bottom: 2px solid #409eff;
  22485. color: #409eff;
  22486. }
  22487. .a_add_head .a_add_head_input {
  22488. /* width: 540px; */
  22489. width: 100%;
  22490. }
  22491. .a_add_head .a_add_head_div {
  22492. display: flex;
  22493. align-items: center;
  22494. justify-content: space-between;
  22495. }
  22496. .a_add_body {
  22497. display: flex;
  22498. /* align-items: center; */
  22499. align-items: flex-end;
  22500. }
  22501. .a_add_input {
  22502. display: flex;
  22503. align-items: center;
  22504. flex-wrap: wrap;
  22505. }
  22506. .a_add_input_choice {
  22507. flex-direction: column;
  22508. margin-right: 10px;
  22509. }
  22510. .a_add_input_choice>>>.el-radio {
  22511. display: flex;
  22512. align-items: center;
  22513. flex-direction: row-reverse;
  22514. margin: 30px 0 0 0;
  22515. position: relative;
  22516. }
  22517. .a_add_input_choice>>>.el-checkbox {
  22518. display: flex;
  22519. align-items: center;
  22520. flex-direction: row-reverse;
  22521. margin: 30px 0 0 0;
  22522. position: relative;
  22523. }
  22524. .width100 {
  22525. width: 100%;
  22526. }
  22527. .a_add_input .a_add_persent {
  22528. width: 100%;
  22529. }
  22530. .a_add_persent_div {
  22531. width: 100%;
  22532. display: flex;
  22533. align-items: center;
  22534. }
  22535. .a_add_persent_div span {
  22536. margin: 5px 0;
  22537. }
  22538. .a_add_persent_div span:nth-child(1) {
  22539. width: 30%;
  22540. }
  22541. .a_add_persent_div span:nth-child(2) {
  22542. width: 7%;
  22543. }
  22544. .a_add_persent_div span:nth-child(3) {
  22545. width: 40%;
  22546. }
  22547. .a_add_body_div {
  22548. display: flex;
  22549. align-items: center;
  22550. justify-content: center;
  22551. /* flex-direction: column; */
  22552. position: absolute;
  22553. right: -20px;
  22554. transform: translateX(100%);
  22555. }
  22556. .a_add_body_div>>>.el-button--primary {
  22557. background: #466b99;
  22558. border: none;
  22559. }
  22560. .all_choose {
  22561. display: flex;
  22562. flex-direction: row;
  22563. align-items: flex-start;
  22564. width: 100%;
  22565. }
  22566. .all_choose+.all_choose {
  22567. /* margin-top: 10px */
  22568. }
  22569. .all_choose>span {
  22570. min-width: fit-content;
  22571. display: block;
  22572. white-space: nowrap;
  22573. overflow: hidden;
  22574. text-overflow: ellipsis;
  22575. margin-right: 20px;
  22576. font-weight: bold;
  22577. font-size: 14px;
  22578. }
  22579. .all_choose>>>.el-checkbox-group {
  22580. display: flex;
  22581. flex-direction: row;
  22582. width: 100%;
  22583. flex-wrap: wrap;
  22584. align-content: center;
  22585. justify-content: flex-start;
  22586. align-items: center;
  22587. margin-top: 3px;
  22588. }
  22589. .all_choose>.el-checkbox-group>>>.el-checkbox {
  22590. margin-bottom: 10px;
  22591. display: flex;
  22592. flex-direction: row;
  22593. align-items: center;
  22594. margin-right: 10px;
  22595. }
  22596. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  22597. min-width: 80px;
  22598. overflow: hidden;
  22599. width: 80px;
  22600. text-overflow: ellipsis;
  22601. white-space: nowrap;
  22602. }
  22603. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  22604. width: auto;
  22605. }
  22606. .choose>div:nth-child(3)>span {
  22607. /* letter-spacing: 0 !important; */
  22608. }
  22609. .choose {
  22610. display: flex;
  22611. flex-direction: column;
  22612. flex-wrap: nowrap;
  22613. height: 100%;
  22614. justify-content: space-evenly;
  22615. align-items: flex-start;
  22616. }
  22617. .both {
  22618. display: flex;
  22619. flex-direction: row;
  22620. flex-wrap: wrap;
  22621. width: 100%;
  22622. align-items: center;
  22623. justify-content: flex-start;
  22624. margin: 15px 0;
  22625. }
  22626. .notice>>>.el-dialog {
  22627. width: 500px !important;
  22628. text-align: center;
  22629. }
  22630. .notice>>>.el-button {
  22631. margin-top: 20px;
  22632. }
  22633. .whiteBg {
  22634. /* background: #fff; */
  22635. border-radius: 10px;
  22636. }
  22637. .wb_j_box {
  22638. display: flex;
  22639. width: 100%;
  22640. padding: 0 20px 0;
  22641. box-sizing: border-box;
  22642. }
  22643. .wb_j_box_content {
  22644. width: calc(100% - 55% - 100px);
  22645. display: flex;
  22646. align-items: center;
  22647. }
  22648. .wb_j_box_p_box {
  22649. max-width: calc(100% - 200px);
  22650. word-break: break-all;
  22651. overflow: hidden;
  22652. margin: 0 0 0 10px;
  22653. font-size: 14px;
  22654. color: #6e6e6e;
  22655. z-index: 999;
  22656. }
  22657. .chooseWho {
  22658. display: flex;
  22659. width: 410px;
  22660. flex-direction: row;
  22661. flex-wrap: nowrap;
  22662. justify-content: space-between;
  22663. padding-bottom: 10px;
  22664. }
  22665. .chooseWho>div {
  22666. cursor: pointer;
  22667. padding-bottom: 10px;
  22668. font-weight: bold;
  22669. }
  22670. .isChooseActive {
  22671. color: #3e88f4;
  22672. border-bottom: 2px solid #2f80f3;
  22673. }
  22674. .toolSort {
  22675. display: flex;
  22676. flex-direction: row;
  22677. flex-wrap: wrap;
  22678. justify-content: flex-start;
  22679. align-items: flex-start;
  22680. }
  22681. .toolSort>div {
  22682. margin-right: 10px;
  22683. }
  22684. .tools {
  22685. width: 100%;
  22686. display: flex;
  22687. flex-direction: column;
  22688. flex-wrap: nowrap;
  22689. align-items: flex-start;
  22690. }
  22691. .leftTools,
  22692. .rightTools {
  22693. width: 50%;
  22694. }
  22695. .leftTools+.leftTools {
  22696. border-top: 1px solid #dbdbdb;
  22697. padding-top: 30px;
  22698. }
  22699. .rightTools {
  22700. display: flex;
  22701. flex-direction: row;
  22702. flex-wrap: nowrap;
  22703. justify-content: space-around;
  22704. }
  22705. .firstToolList {
  22706. display: flex;
  22707. flex-direction: column;
  22708. flex-wrap: nowrap;
  22709. align-items: center;
  22710. }
  22711. .iconList {
  22712. display: flex;
  22713. flex-direction: row;
  22714. flex-wrap: wrap;
  22715. justify-content: flex-start;
  22716. align-items: center;
  22717. margin: 20px 0 5px 0;
  22718. width: 240px;
  22719. min-width: 240px;
  22720. }
  22721. .iconTool {
  22722. display: flex;
  22723. flex-direction: column;
  22724. flex-wrap: nowrap;
  22725. align-items: center;
  22726. justify-content: flex-start;
  22727. margin: 15px 10px;
  22728. }
  22729. .toolIcon {
  22730. width: 50px;
  22731. }
  22732. .taskBorder {
  22733. /* border: 1px solid #CAD1DC; */
  22734. border-radius: 10px;
  22735. margin-top: 10px;
  22736. min-height: 670px;
  22737. position: relative;
  22738. background: #fff;
  22739. padding: 20px;
  22740. overflow: hidden;
  22741. box-sizing: border-box;
  22742. }
  22743. .smallTaskBorder {
  22744. height: 405px;
  22745. min-height: 405px !important;
  22746. overflow: hidden;
  22747. }
  22748. /* .taskBorder>div {
  22749. padding: 30px 30px 10px;
  22750. } */
  22751. .addTaskBorder {
  22752. /* border: 2px solid #5E9AFC; */
  22753. border-radius: 8px;
  22754. margin-top: 10px;
  22755. cursor: pointer;
  22756. /* height: 50px;
  22757. line-height: 50px; */
  22758. background: #fff;
  22759. padding: 15px 0;
  22760. display: flex;
  22761. align-items: center;
  22762. justify-content: center;
  22763. }
  22764. /* .addTaskBorder>div {
  22765. margin: 0 auto;
  22766. display: flex;
  22767. align-items: center;
  22768. justify-content: center;
  22769. }
  22770. .addTaskBorder>div>img {
  22771. width: 20px;
  22772. }
  22773. .addTaskBorder>div>span {
  22774. font-size: 16px;
  22775. margin-left: 10px;
  22776. color: #5E9AFC;
  22777. } */
  22778. .funBlock {
  22779. display: flex;
  22780. padding: 15px 0;
  22781. flex-direction: row;
  22782. justify-content: center;
  22783. align-items: center;
  22784. position: absolute;
  22785. right: 0;
  22786. bottom: 0;
  22787. background: #fff;
  22788. width: 100%;
  22789. height: 60px;
  22790. z-index: 9;
  22791. }
  22792. .fold {
  22793. display: flex;
  22794. margin: 0 20px;
  22795. flex-direction: row;
  22796. align-items: center;
  22797. cursor: pointer;
  22798. color: #2b7bff;
  22799. }
  22800. .arrow {
  22801. margin-right: 8px;
  22802. width: 16px;
  22803. height: 16px;
  22804. min-width: 16px;
  22805. min-height: 16px;
  22806. background-size: 100% 100%;
  22807. display: block;
  22808. background-image: url(../../../assets/icon/new/u_up.png);
  22809. /* border-left: 7px solid transparent;
  22810. border-bottom: 7px solid #717C8D;
  22811. border-top: 0px solid transparent;
  22812. border-right: 7px solid transparent; */
  22813. /* box-sizing: border-box; */
  22814. transition: all 0.3s;
  22815. }
  22816. .arrowZ {
  22817. transform: rotate(180deg);
  22818. }
  22819. .addToolFun {
  22820. display: flex;
  22821. width: 150px;
  22822. flex-direction: row;
  22823. align-items: center;
  22824. justify-content: center;
  22825. border: 2px dashed #cad1dc;
  22826. border-radius: 5px;
  22827. height: 50px;
  22828. margin: 35px auto 0;
  22829. cursor: pointer;
  22830. }
  22831. .addToolFun2 {
  22832. display: flex;
  22833. width: 150px;
  22834. border: 2px dashed #cad1dc;
  22835. flex-direction: row;
  22836. align-items: center;
  22837. justify-content: center;
  22838. border-radius: 5px;
  22839. height: 50px;
  22840. margin: 0 auto 0;
  22841. cursor: pointer;
  22842. }
  22843. .addToolFun2>div,
  22844. .addToolFun>div {
  22845. display: flex;
  22846. line-height: 50px;
  22847. }
  22848. .addToolImg {
  22849. width: 20px;
  22850. height: 20px;
  22851. margin-right: 10px;
  22852. }
  22853. .addToolsDia>>>.el-dialog__body {
  22854. padding: 20px;
  22855. }
  22856. .addToolsDia>>>.el-dialog__body>.toolChoose {
  22857. padding: 0;
  22858. }
  22859. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  22860. padding: 0;
  22861. border-bottom: none;
  22862. margin-bottom: 0;
  22863. }
  22864. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  22865. width: 100%;
  22866. }
  22867. .lineCss>>>.el-form-item__label {
  22868. width: auto !important;
  22869. }
  22870. .lineCss>>>.el-form-item__content {
  22871. margin-left: 50px !important;
  22872. }
  22873. .newSteps {
  22874. display: flex;
  22875. width: 100% !important;
  22876. /* height: 80px; */
  22877. cursor: pointer;
  22878. margin: 10px 0;
  22879. border-radius: 10px;
  22880. flex-direction: row;
  22881. align-content: center;
  22882. justify-content: center;
  22883. align-items: center;
  22884. margin: 0 !important;
  22885. }
  22886. /* 评价样式 */
  22887. .elist_css {
  22888. padding-bottom: 75px !important;
  22889. }
  22890. .elist_title {
  22891. margin-bottom: 10px;
  22892. }
  22893. .elist_input {
  22894. width: 100%;
  22895. }
  22896. .elist_input_box {
  22897. display: flex;
  22898. align-items: center;
  22899. flex-wrap: wrap;
  22900. }
  22901. .elist_input_box+.elist_input_box {
  22902. margin-top: 30px;
  22903. }
  22904. .elist_input .elist_input_box input {
  22905. font: inherit;
  22906. color: currentColor;
  22907. width: 100%;
  22908. /* max-width: calc(100% - 385px); */
  22909. max-width: calc(100% - 150px);
  22910. padding: 8px 14px;
  22911. display: block;
  22912. min-width: 0;
  22913. outline: none;
  22914. border: 1px solid rgba(0, 0, 0, 0.23);
  22915. border-radius: 4px;
  22916. box-sizing: border-box;
  22917. background: #fff;
  22918. margin: 0 20px 0 0;
  22919. }
  22920. .elist_input .elist_input_box span {
  22921. height: 36px;
  22922. line-height: 36px;
  22923. color: rgb(82, 82, 82);
  22924. min-width: 80px;
  22925. }
  22926. .elist_input .elist_input_box .remove {
  22927. height: 20px;
  22928. width: 20px;
  22929. min-height: 20px;
  22930. min-width: 20px;
  22931. background-size: 100% 100%;
  22932. background-position: unset;
  22933. margin-left: 5px;
  22934. }
  22935. .elist_input_box>>>.el-rate {
  22936. display: flex;
  22937. height: 36px;
  22938. align-items: center;
  22939. }
  22940. .elist_input_box .elist_inptu_text {
  22941. width: 100%;
  22942. display: flex;
  22943. align-items: center;
  22944. margin-top: 10px;
  22945. }
  22946. .elist_input_box .elist_inptu_text input {
  22947. /* width: 500px; */
  22948. width: 100%;
  22949. max-width: unset;
  22950. }
  22951. .elist_input_box>>>.el-rate__icon {
  22952. font-size: 24px;
  22953. }
  22954. .elist_btn {
  22955. margin-top: 10px;
  22956. }
  22957. .lineTitle {
  22958. /* margin-top: 15px; */
  22959. width: 110px;
  22960. font-size: 16px;
  22961. display: flex;
  22962. align-items: center;
  22963. line-height: 20px;
  22964. }
  22965. .lineTitle::before {
  22966. content: "";
  22967. display: block;
  22968. width: 3px;
  22969. height: 20px;
  22970. background: #0061ff;
  22971. border-radius: 3px;
  22972. margin: 0 5px 0 0;
  22973. }
  22974. .clineTitle::before {
  22975. content: "";
  22976. display: block;
  22977. min-width: 10px;
  22978. width: 10px;
  22979. height: 10px;
  22980. background: #0061ff;
  22981. border-radius: 50%;
  22982. margin: 0 5px 0 0;
  22983. }
  22984. .courseTop {
  22985. display: flex;
  22986. flex-direction: row;
  22987. justify-content: space-between;
  22988. align-items: center;
  22989. width: calc(100% - 40px);
  22990. margin: 0 auto;
  22991. padding: 10px 0;
  22992. }
  22993. .stepsNav {
  22994. display: flex;
  22995. flex-direction: row;
  22996. justify-content: flex-start;
  22997. align-items: center;
  22998. }
  22999. .stepsWord {
  23000. font-size: 18px;
  23001. color: #fff;
  23002. font-weight: bold;
  23003. margin-left: auto;
  23004. background: rgb(15, 126, 255);
  23005. border-radius: 5px;
  23006. padding: 3px 25px;
  23007. box-sizing: border-box;
  23008. }
  23009. .stepBox {
  23010. width: calc(100% - 40px);
  23011. height: calc(100% - 50px);
  23012. overflow: hidden;
  23013. border-radius: 5px;
  23014. margin: 0 auto;
  23015. }
  23016. .rightBox {
  23017. width: calc(100%);
  23018. background: #f0f2f5;
  23019. /* border-radius: 10px; */
  23020. overflow: auto;
  23021. height: calc(100% - 150px);
  23022. margin: 0 auto;
  23023. position: relative;
  23024. box-sizing: border-box;
  23025. }
  23026. .e_add_top {
  23027. display: flex;
  23028. justify-content: space-between;
  23029. background: #fff;
  23030. position: absolute;
  23031. right: 20px;
  23032. height: 50px;
  23033. align-items: center;
  23034. }
  23035. .e_add_title2 {
  23036. display: flex;
  23037. align-items: center;
  23038. }
  23039. .e_add_title2 span {
  23040. width: 40px;
  23041. }
  23042. .e_add_title {
  23043. display: flex;
  23044. align-items: center;
  23045. color: #b8b8b8;
  23046. font-size: 18px;
  23047. position: relative;
  23048. height: 40px;
  23049. }
  23050. .e_add_title span {
  23051. margin-right: 10px;
  23052. }
  23053. .e_add_title .el_input {
  23054. width: 300px;
  23055. }
  23056. .e_add_title>>>.el-input__inner {
  23057. width: 400px;
  23058. }
  23059. .e_add_btn {}
  23060. .e_add_content {
  23061. display: flex;
  23062. width: 100%;
  23063. }
  23064. .e_add_list {
  23065. background: #fff;
  23066. height: 500px;
  23067. width: 210px;
  23068. position: relative;
  23069. margin: 15px 5px 0 0;
  23070. flex-shrink: 0;
  23071. display: flex;
  23072. flex-direction: column;
  23073. }
  23074. .e_add_list_title {
  23075. font-size: 20px;
  23076. width: 100%;
  23077. box-sizing: border-box;
  23078. padding: 15px 40px;
  23079. text-align: center;
  23080. border-bottom: 1px solid #eaeaea;
  23081. position: relative;
  23082. display: flex;
  23083. align-items: center;
  23084. justify-content: center;
  23085. height: 57px;
  23086. background: #f6f6f6;
  23087. }
  23088. .e_add_list_title span {
  23089. overflow: hidden;
  23090. white-space: nowrap;
  23091. text-overflow: ellipsis;
  23092. }
  23093. .e_add_list_title img {
  23094. position: absolute;
  23095. right: 15px;
  23096. width: 25px;
  23097. cursor: pointer;
  23098. top: 50%;
  23099. transform: translateY(-50%);
  23100. }
  23101. .e_add_list_body {
  23102. height: calc(100% - 187px);
  23103. overflow: auto;
  23104. }
  23105. .e_add_list_child {
  23106. width: 100%;
  23107. display: flex;
  23108. align-items: center;
  23109. justify-content: center;
  23110. position: relative;
  23111. box-sizing: border-box;
  23112. padding: 15px 40px;
  23113. text-align: center;
  23114. }
  23115. .e_add_list_child span {
  23116. overflow: hidden;
  23117. white-space: nowrap;
  23118. text-overflow: ellipsis;
  23119. cursor: pointer;
  23120. }
  23121. .e_add_list_child img {
  23122. position: absolute;
  23123. right: 10px;
  23124. width: 21px;
  23125. cursor: pointer;
  23126. top: 50%;
  23127. transform: translateY(-50%);
  23128. }
  23129. .e_add_list_child+.e_add_list_child {
  23130. border-top: 1px solid #eaeaea;
  23131. }
  23132. .e_add_list_child .active {
  23133. color: #409eff;
  23134. }
  23135. .e_add_list_btn {
  23136. position: absolute;
  23137. bottom: 0;
  23138. height: 50px;
  23139. background: rgb(120, 120, 254);
  23140. width: 100%;
  23141. color: #fff;
  23142. font-size: 16px;
  23143. text-align: center;
  23144. line-height: 50px;
  23145. cursor: pointer;
  23146. }
  23147. .e_add_list_detail {
  23148. position: absolute;
  23149. bottom: 0;
  23150. height: 130px;
  23151. background: rgb(120, 120, 254);
  23152. width: 100%;
  23153. color: #fff;
  23154. font-size: 16px;
  23155. display: flex;
  23156. align-items: center;
  23157. justify-content: center;
  23158. }
  23159. .e_add_list_detail textarea {
  23160. height: 90%;
  23161. width: 95%;
  23162. border: none;
  23163. resize: none;
  23164. outline: none;
  23165. padding: 5px;
  23166. box-sizing: border-box;
  23167. }
  23168. .e_add_list_pbox {
  23169. width: 100%;
  23170. }
  23171. .e_add_list_pbox_title {
  23172. height: 50px;
  23173. background: #fff;
  23174. display: flex;
  23175. align-items: center;
  23176. width: 100%;
  23177. box-sizing: border-box;
  23178. padding: 0 20px;
  23179. flex-direction: row;
  23180. flex-wrap: wrap;
  23181. }
  23182. .type_title {
  23183. font-size: 18px;
  23184. font-weight: 700;
  23185. }
  23186. .type_content {
  23187. font-size: 16px;
  23188. margin-left: 30px;
  23189. }
  23190. .type_content span+span {
  23191. margin-left: 20px;
  23192. }
  23193. .type_content span {
  23194. cursor: pointer;
  23195. padding-bottom: 5px;
  23196. box-sizing: border-box;
  23197. }
  23198. .type_content .active {
  23199. color: #409eff;
  23200. border-bottom: 2px solid #409eff;
  23201. }
  23202. .e_add_list_pbox_content {
  23203. height: calc(100% - 50px);
  23204. display: flex;
  23205. align-items: center;
  23206. width: 100%;
  23207. background: #fff;
  23208. }
  23209. .mbCss {
  23210. width: 100%;
  23211. display: flex;
  23212. flex-direction: row;
  23213. flex-wrap: nowrap;
  23214. align-content: center;
  23215. align-items: flex-start;
  23216. justify-content: flex-start;
  23217. }
  23218. .pjCss {
  23219. /* width: 42%; */
  23220. width: calc(100% - 55%);
  23221. display: flex;
  23222. flex-direction: column;
  23223. flex-wrap: nowrap;
  23224. align-items: flex-start;
  23225. }
  23226. .e_box {
  23227. /* display: flex; */
  23228. flex-wrap: wrap;
  23229. max-height: 500px;
  23230. align-items: flex-start;
  23231. overflow: auto;
  23232. width: 100%;
  23233. }
  23234. .e_card {
  23235. border: 1px solid #ccc;
  23236. background: #fff;
  23237. margin-right: 20px;
  23238. width: 270px;
  23239. display: flex;
  23240. flex-direction: column;
  23241. align-items: center;
  23242. border-radius: 5px;
  23243. margin-top: 10px;
  23244. text-align: center;
  23245. }
  23246. .e_card_picture {
  23247. margin: 10px 0;
  23248. }
  23249. .e_card_picture>img {
  23250. width: 50px;
  23251. }
  23252. .e_card_name {
  23253. width: 100%;
  23254. padding: 0 10px;
  23255. box-sizing: border-box;
  23256. margin-bottom: 10px;
  23257. overflow: hidden;
  23258. text-overflow: ellipsis;
  23259. white-space: nowrap;
  23260. }
  23261. .e_card_time {
  23262. width: 100%;
  23263. padding: 0 10px;
  23264. box-sizing: border-box;
  23265. font-size: 15px;
  23266. color: #c3c3c3;
  23267. margin-bottom: 10px;
  23268. }
  23269. .e_card_btn {
  23270. height: 40px;
  23271. display: flex;
  23272. align-items: center;
  23273. width: 100%;
  23274. background: rgb(244, 244, 244);
  23275. }
  23276. .e_card_btn:hover {
  23277. background: rgb(221 221 221);
  23278. }
  23279. .e_card_btn span {
  23280. flex: 1 1 auto;
  23281. text-align: center;
  23282. cursor: pointer;
  23283. }
  23284. .addEva {
  23285. border: 1px solid #ccc;
  23286. background: #fff;
  23287. margin-right: 20px;
  23288. width: 270px;
  23289. height: 149px;
  23290. display: flex;
  23291. flex-direction: column;
  23292. align-items: center;
  23293. border-radius: 5px;
  23294. margin-top: 10px;
  23295. text-align: center;
  23296. cursor: pointer;
  23297. justify-content: center;
  23298. }
  23299. .addEva>img {
  23300. width: 50px;
  23301. object-fit: cover;
  23302. }
  23303. .uploadFm {
  23304. border: 1px dashed #ccc;
  23305. width: 100%;
  23306. height: 140px;
  23307. position: relative;
  23308. cursor: pointer;
  23309. display: flex;
  23310. flex-direction: column;
  23311. justify-content: center;
  23312. align-items: center;
  23313. font-size: 14px;
  23314. color: #6e6e6e;
  23315. position: relative;
  23316. }
  23317. .cover_p {
  23318. width: 100% !important;
  23319. height: 100%;
  23320. object-fit: cover;
  23321. }
  23322. .uploadFm2:hover .cover_mask {
  23323. display: flex !important;
  23324. }
  23325. .cover_mask {
  23326. display: none;
  23327. width: 100%;
  23328. height: 100%;
  23329. position: absolute;
  23330. background: #00000054;
  23331. align-items: center;
  23332. justify-content: center;
  23333. flex-direction: column;
  23334. }
  23335. .cover_mask>img {
  23336. width: 30px;
  23337. }
  23338. .cover_mask>span {
  23339. color: #fff;
  23340. font-size: 12px;
  23341. }
  23342. .uploadFm>img {
  23343. width: 50px;
  23344. }
  23345. .fileCss {
  23346. width: 100%;
  23347. display: flex;
  23348. flex-direction: row;
  23349. flex-wrap: nowrap;
  23350. justify-content: space-around;
  23351. align-items: center;
  23352. padding-top: 15px;
  23353. }
  23354. .fileCss>div {
  23355. display: flex;
  23356. flex-direction: column;
  23357. align-items: center;
  23358. }
  23359. .fileCss .spanName {
  23360. margin-top: 10px;
  23361. }
  23362. .sysPicBox {
  23363. display: flex;
  23364. flex-direction: row;
  23365. flex-wrap: wrap;
  23366. align-content: flex-start;
  23367. height: 435px;
  23368. overflow: auto;
  23369. position: relative;
  23370. }
  23371. .picNone {
  23372. position: absolute;
  23373. left: 50%;
  23374. top: 45%;
  23375. transform: translate(-50%, -50%);
  23376. width: fit-content;
  23377. color: #9c9c9c;
  23378. }
  23379. .sysPic {
  23380. width: 200px;
  23381. height: 115px;
  23382. margin: 0 20px 20px 0;
  23383. cursor: pointer;
  23384. }
  23385. .sysPic>img,
  23386. .isSysPic>img,
  23387. .deletePic>img {
  23388. width: 100%;
  23389. height: 100%;
  23390. object-fit: cover;
  23391. }
  23392. .isSysPic {
  23393. width: 200px;
  23394. height: 115px;
  23395. position: relative;
  23396. }
  23397. .deletePic {
  23398. width: 20px;
  23399. height: 20px;
  23400. position: absolute;
  23401. top: 0;
  23402. right: 0;
  23403. cursor: pointer;
  23404. }
  23405. .select_box1 {
  23406. height: 100%;
  23407. }
  23408. .select_box1_img {
  23409. background: #fff;
  23410. border-radius: 5px;
  23411. padding: 15px;
  23412. box-sizing: border-box;
  23413. margin-bottom: 20px;
  23414. }
  23415. .select_box1_title {
  23416. padding: 0 0 15px 0;
  23417. border-bottom: 1px solid #eee;
  23418. margin-bottom: 15px;
  23419. }
  23420. .select_box1_title span:nth-child(1) {
  23421. font-size: 16px;
  23422. margin-right: 20px;
  23423. color: #000;
  23424. }
  23425. .select_box1_title span:nth-child(2) {
  23426. font-size: 14px;
  23427. color: rgb(112, 112, 112);
  23428. }
  23429. .select_box1_add_img {}
  23430. .select_box1_select {
  23431. background: #fff;
  23432. border-radius: 5px;
  23433. padding: 15px;
  23434. box-sizing: border-box;
  23435. height: calc(100% - 200px);
  23436. overflow: auto;
  23437. }
  23438. .select_box2 {
  23439. height: 100%;
  23440. }
  23441. .select_box2_title {
  23442. background: #fff;
  23443. border-radius: 5px;
  23444. padding: 5px 10px;
  23445. box-sizing: border-box;
  23446. margin-bottom: 10px;
  23447. }
  23448. .select_box2_box {
  23449. display: flex;
  23450. height: calc(100% - 30px);
  23451. }
  23452. .select_box2_img {
  23453. width: calc(100% - 310px);
  23454. height: 100%;
  23455. overflow: auto;
  23456. background: #fff;
  23457. border-radius: 5px;
  23458. }
  23459. .select_box2_img img {
  23460. width: 100%;
  23461. }
  23462. .select_box2_answer {
  23463. background: #fff;
  23464. margin-left: 10px;
  23465. border-radius: 5px;
  23466. width: 300px;
  23467. overflow: auto;
  23468. height: 100%;
  23469. display: flex;
  23470. flex-direction: column;
  23471. align-items: center;
  23472. padding-top: 10px;
  23473. box-sizing: border-box;
  23474. }
  23475. .select_box2_answer_box {
  23476. margin: 0 0 10px 0;
  23477. width: 85%;
  23478. }
  23479. .rate_textarea {
  23480. font: inherit;
  23481. color: currentColor;
  23482. width: 100%;
  23483. padding: 8px 14px;
  23484. display: block;
  23485. min-width: 0;
  23486. outline: none;
  23487. border: 1px solid rgba(0, 0, 0, 0.23);
  23488. border-radius: 4px;
  23489. box-sizing: border-box;
  23490. background: #fff;
  23491. margin: 0 20px 0 0;
  23492. resize: none;
  23493. }
  23494. .select_answer_title {
  23495. text-align: left;
  23496. width: 85%;
  23497. margin-bottom: 10px;
  23498. font-size: 18px;
  23499. color: #8e8e8e;
  23500. }
  23501. .mask {
  23502. background-color: rgb(0 0 0 / 30%);
  23503. /* position: fixed; */
  23504. position: absolute;
  23505. top: 0;
  23506. left: 0;
  23507. width: 100%;
  23508. height: 100%;
  23509. z-index: 90;
  23510. display: flex;
  23511. align-items: center;
  23512. justify-content: center;
  23513. }
  23514. .progressBox {
  23515. width: 300px;
  23516. height: 150px;
  23517. background: #fff;
  23518. border-radius: 10px;
  23519. box-shadow: 0 0 6px 1px #bfbfbf;
  23520. display: flex;
  23521. align-items: center;
  23522. justify-content: center;
  23523. flex-direction: column;
  23524. position: relative;
  23525. color: #6c6c6c;
  23526. }
  23527. .progressBox>>>.el-progress-bar__outer {
  23528. background-color: #d1dfff !important;
  23529. }
  23530. .progressBox .lbox {
  23531. height: 50px;
  23532. font-size: 19px;
  23533. display: flex;
  23534. align-items: center;
  23535. color: #747474;
  23536. }
  23537. .progressBox .lbox img {
  23538. width: 40px;
  23539. margin-right: 20px;
  23540. }
  23541. .closeCss {
  23542. position: absolute;
  23543. top: 8px;
  23544. right: 8px;
  23545. cursor: pointer;
  23546. width: 20px;
  23547. height: 20px;
  23548. }
  23549. .closeCss>img {
  23550. width: 100%;
  23551. height: 100%;
  23552. }
  23553. .updateTips::before {
  23554. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  23555. font-size: 14px;
  23556. margin-left: 20px;
  23557. font-weight: 400;
  23558. color: #ff3a3a;
  23559. margin-bottom: 10px;
  23560. display: block;
  23561. }
  23562. .updateMask {
  23563. width: 100%;
  23564. z-index: 3;
  23565. top: 0;
  23566. position: absolute;
  23567. /* background-color: rgba(0,0,0,.3); */
  23568. }
  23569. .t_j_box {
  23570. display: flex;
  23571. }
  23572. .t_j_box span:nth-child(1) {
  23573. width: 15%;
  23574. overflow: hidden;
  23575. margin-right: 10px;
  23576. text-overflow: ellipsis;
  23577. white-space: nowrap;
  23578. }
  23579. .t_j_box span:nth-child(2) {
  23580. width: 30%;
  23581. overflow: hidden;
  23582. text-overflow: ellipsis;
  23583. margin-right: 10px;
  23584. }
  23585. .t_j_box span:nth-child(3) {
  23586. max-width: calc(55% - 20px);
  23587. overflow: hidden;
  23588. text-overflow: ellipsis;
  23589. }
  23590. .sentenBox {
  23591. background: #fff;
  23592. height: 600px;
  23593. overflow: auto;
  23594. background-image: url("../../../assets/icon/conSentences/csBg.png");
  23595. background-position: 102%;
  23596. background-repeat: no-repeat;
  23597. background-size: 60%;
  23598. }
  23599. .sentenBox>.sentenContent {
  23600. padding-bottom: 10px;
  23601. width: 97%;
  23602. margin: 0 auto;
  23603. }
  23604. .sentenBox>.sentenContent+.sentenContent {
  23605. border-top: 1px solid #cbcbcb;
  23606. }
  23607. .addSen {
  23608. background: #409efe;
  23609. width: 90px;
  23610. color: #fff;
  23611. height: 35px;
  23612. text-align: center;
  23613. line-height: 35px;
  23614. border-radius: 5px;
  23615. float: right;
  23616. margin: 10px 20px 0 0;
  23617. cursor: pointer;
  23618. }
  23619. .sentenTop {
  23620. display: flex;
  23621. flex-direction: row;
  23622. flex-wrap: nowrap;
  23623. align-items: center;
  23624. }
  23625. .sentenTop::before {
  23626. content: attr(index);
  23627. background: #3681fc;
  23628. border-radius: 50%;
  23629. color: #fff;
  23630. width: 25px;
  23631. height: 25px;
  23632. min-width: 25px;
  23633. min-height: 25px;
  23634. text-align: center;
  23635. line-height: 25px;
  23636. margin-right: 5px;
  23637. }
  23638. .sentenTop>div:nth-child(2) {
  23639. width: 300px;
  23640. margin: 0 15px;
  23641. }
  23642. .sentenTop>div:nth-child(3) {
  23643. background: #409efe;
  23644. color: #fff;
  23645. width: 65px;
  23646. height: 35px;
  23647. text-align: center;
  23648. line-height: 35px;
  23649. border-radius: 5px;
  23650. cursor: pointer;
  23651. }
  23652. .cardList {
  23653. padding: 30px 0 20px 0;
  23654. display: flex;
  23655. flex-direction: row;
  23656. flex-wrap: wrap;
  23657. align-items: center;
  23658. box-sizing: border-box;
  23659. border-bottom: 1px solid #f4f4f4;
  23660. width: 98%;
  23661. margin: 0 auto;
  23662. }
  23663. .rightCardList {
  23664. display: flex;
  23665. flex-wrap: wrap;
  23666. }
  23667. .cardBox {
  23668. display: flex;
  23669. flex-direction: row;
  23670. flex-wrap: wrap;
  23671. align-items: center;
  23672. align-content: center;
  23673. }
  23674. .isCard,
  23675. .isCard1 {
  23676. width: auto;
  23677. padding: 0 20px;
  23678. height: 65px;
  23679. text-align: center;
  23680. line-height: 65px;
  23681. font-size: 14px;
  23682. cursor: pointer;
  23683. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  23684. background-size: 100% 100%;
  23685. position: relative;
  23686. z-index: 99;
  23687. }
  23688. .isCard1 {
  23689. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  23690. }
  23691. .isCard:hover .deleteWord {
  23692. display: block;
  23693. }
  23694. .isCard>div:nth-child(1),
  23695. .isCard1>div:nth-child(1) {
  23696. white-space: nowrap;
  23697. overflow: hidden;
  23698. text-overflow: ellipsis;
  23699. width: 100%;
  23700. margin: 0 auto;
  23701. }
  23702. .card {
  23703. width: 140px;
  23704. height: 65px;
  23705. }
  23706. .card>img {
  23707. width: 100%;
  23708. height: 100%;
  23709. }
  23710. .rightCardBox {
  23711. width: 98%;
  23712. margin: 10px auto 0;
  23713. }
  23714. .rightCardBox>div:nth-child(1) {
  23715. margin-bottom: 10px;
  23716. }
  23717. .cardCss {
  23718. display: flex;
  23719. flex-direction: column;
  23720. flex-wrap: nowrap;
  23721. align-items: center;
  23722. border-bottom: 3px solid #b4c3d3;
  23723. padding: 0 0 5px 0;
  23724. /* margin-right: 10px; */
  23725. }
  23726. .cardCss>div:nth-child(2) {
  23727. background: #5b7b9d;
  23728. color: #fff;
  23729. width: 20px;
  23730. height: 20px;
  23731. border-radius: 50%;
  23732. text-align: center;
  23733. line-height: 20px;
  23734. }
  23735. .sentenTopBox {
  23736. display: flex;
  23737. flex-direction: row;
  23738. flex-wrap: nowrap;
  23739. align-items: center;
  23740. justify-content: space-between;
  23741. padding: 55px 0 0 20px;
  23742. box-sizing: border-box;
  23743. width: 85%;
  23744. }
  23745. .rb_c_ai_box,
  23746. .stepsBottom {
  23747. width: 100%;
  23748. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  23749. /* background: #f7f7f7; */
  23750. border-radius: 10px;
  23751. overflow: hidden;
  23752. /* height: 100%; */
  23753. height: calc(100% - 55px);
  23754. }
  23755. .navTop {
  23756. background: #53749b;
  23757. color: #fff;
  23758. height: 40px;
  23759. line-height: 40px;
  23760. padding-left: 15px;
  23761. font-size: 18px;
  23762. }
  23763. .navBottom {
  23764. /* background: #6b91b7; */
  23765. height: 100%;
  23766. overflow: auto;
  23767. padding: 10px 0;
  23768. }
  23769. .navStage {
  23770. display: flex;
  23771. flex-direction: row;
  23772. flex-wrap: nowrap;
  23773. align-items: center;
  23774. padding: 10px 10px 10px 0;
  23775. cursor: pointer;
  23776. background: #ffffff;
  23777. width: 95%;
  23778. margin: 5px auto 5px;
  23779. box-sizing: border-box;
  23780. border-radius: 5px;
  23781. flex-wrap: wrap;
  23782. position: relative;
  23783. }
  23784. .navStage:hover>.chapter_upload_drag {
  23785. display: block;
  23786. }
  23787. .navTask:hover>.chapter_upload_drag {
  23788. display: block;
  23789. }
  23790. .chapter_upload:hover>.chapter_upload_drag {
  23791. display: block;
  23792. }
  23793. .navStage::before {
  23794. content: "";
  23795. display: block;
  23796. width: 16px;
  23797. height: 16px;
  23798. background-image: url(../../../assets/icon/new/icon_stage.png);
  23799. background-size: 100%;
  23800. margin-left: 25px;
  23801. }
  23802. .navStage .chapter_unit_open {
  23803. content: "";
  23804. display: block;
  23805. width: 16px;
  23806. height: 16px;
  23807. background-image: url(../../../assets/icon/new/down.png);
  23808. transform: rotate(-90deg);
  23809. background-size: 100%;
  23810. margin-left: 10px;
  23811. transition: all 0.5s;
  23812. }
  23813. .isNavStageOpen .chapter_unit_open {
  23814. transform: rotate(0deg);
  23815. }
  23816. .isNavStage {
  23817. background: #0061ff;
  23818. }
  23819. .isNavStage::before {
  23820. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  23821. }
  23822. .isNavStage .chapter_unit_open {
  23823. background-image: url(../../../assets/icon/new/downC.png);
  23824. }
  23825. .isNavStage .nt_taskName {
  23826. font-weight: bold !important;
  23827. color: #ffffff !important;
  23828. }
  23829. .isNavStage .nt_taskTitle {
  23830. font-weight: bold !important;
  23831. color: #fff !important;
  23832. }
  23833. .navStage .nt_taskBox {
  23834. width: calc(100% - 68px);
  23835. padding: 0 0 0 5px;
  23836. box-sizing: border-box;
  23837. box-sizing: border-box;
  23838. display: flex;
  23839. flex-direction: row;
  23840. flex-wrap: nowrap;
  23841. align-items: baseline;
  23842. }
  23843. .navStage .nt_taskTitle {
  23844. color: #060e17;
  23845. line-height: 25px;
  23846. font-size: 16px;
  23847. }
  23848. .navStage .nt_taskName {
  23849. max-width: calc(100% - 82px);
  23850. white-space: nowrap;
  23851. overflow: hidden;
  23852. text-overflow: ellipsis;
  23853. font-size: 16px;
  23854. color: #060e17;
  23855. }
  23856. .navTask {
  23857. display: flex;
  23858. flex-direction: row;
  23859. flex-wrap: nowrap;
  23860. align-items: center;
  23861. padding: 10px 10px 10px 0;
  23862. cursor: pointer;
  23863. background: #ffffff;
  23864. width: 95%;
  23865. margin: 5px auto 5px;
  23866. box-sizing: border-box;
  23867. border-radius: 5px;
  23868. flex-wrap: wrap;
  23869. position: relative;
  23870. }
  23871. .navTask .chapter_upload_open {
  23872. content: "";
  23873. display: block;
  23874. width: 16px;
  23875. height: 16px;
  23876. background-image: url(../../../assets/icon/new/icon_arrow.png);
  23877. background-size: 100%;
  23878. margin-left: 23px;
  23879. }
  23880. .noImage .chapter_upload_open {
  23881. display: none;
  23882. background-image: unset !important;
  23883. }
  23884. .isNavOpen .chapter_upload_open {
  23885. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  23886. transform: rotate(90deg);
  23887. }
  23888. .isNavTask .chapter_upload_open {
  23889. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  23890. transform: rotate(-90deg);
  23891. }
  23892. .isNavTask.isNavOpen .chapter_upload_open {
  23893. transform: rotate(0deg);
  23894. }
  23895. .dragOverTop {
  23896. border-top: 2px solid #0061ff !important;
  23897. border-radius: 0 !important;
  23898. margin-top: 10px;
  23899. }
  23900. .dragOverBottom {
  23901. border-bottom: 2px solid #0061ff !important;
  23902. border-radius: 0 !important;
  23903. margin-top: 10px;
  23904. }
  23905. .dragOverTop2 {
  23906. border-top: 2px solid #0061ff !important;
  23907. border-radius: 0 !important;
  23908. }
  23909. .dragOverBottom2 {
  23910. border-bottom: 2px solid #0061ff !important;
  23911. border-radius: 0 !important;
  23912. }
  23913. .isNavTask {
  23914. /* background: #3681FC; */
  23915. background: #eef3fb;
  23916. }
  23917. .isNavTask>.chapter_upload_drag {
  23918. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  23919. }
  23920. .isNavTask .nt_taskName {
  23921. /* color: #fff !important; */
  23922. font-weight: bold !important;
  23923. color: #0061ff !important;
  23924. }
  23925. .isNavTask .nt_taskTitle {
  23926. /* color: #AECCFE !important; */
  23927. font-weight: bold !important;
  23928. color: #0061ff !important;
  23929. }
  23930. .navTask .nt_taskBox {
  23931. width: calc(100% - 40px);
  23932. padding: 0 0 0 5px;
  23933. box-sizing: border-box;
  23934. box-sizing: border-box;
  23935. display: flex;
  23936. flex-direction: row;
  23937. flex-wrap: nowrap;
  23938. align-items: baseline;
  23939. }
  23940. .navTask .nt_taskTitle {
  23941. /* color: #717C8D; */
  23942. color: #060e17;
  23943. line-height: 25px;
  23944. font-size: 16px;
  23945. /* min-width: 66px; */
  23946. }
  23947. .navTask .nt_taskName {
  23948. /* color: #fff; */
  23949. /* max-width: 130px; */
  23950. /* width: 100%; */
  23951. max-width: calc(100% - 66px);
  23952. font-size: 16px;
  23953. color: #060e17;
  23954. /* color: #0E1E33; */
  23955. }
  23956. .navTask .nt_taskName span {
  23957. width: 100%;
  23958. white-space: nowrap;
  23959. overflow: hidden;
  23960. text-overflow: ellipsis;
  23961. display: block;
  23962. }
  23963. .gjBox {
  23964. width: calc(100% - 25px);
  23965. padding: 0 0 0 0;
  23966. box-sizing: border-box;
  23967. border-left: 1px solid #cad1dc;
  23968. margin-left: 25px;
  23969. }
  23970. .gjBox>div {
  23971. display: flex;
  23972. align-items: center;
  23973. }
  23974. .gjBox>div::before {
  23975. content: "";
  23976. height: 1px;
  23977. width: 10px;
  23978. background: #cad1dc;
  23979. display: block;
  23980. margin-right: 5px;
  23981. }
  23982. .gjCss {
  23983. display: flex;
  23984. flex-direction: row;
  23985. flex-wrap: nowrap;
  23986. align-items: center;
  23987. padding: 15px 0;
  23988. box-sizing: border-box;
  23989. font-size: 14px;
  23990. cursor: pointer;
  23991. }
  23992. .isGjCss {
  23993. color: #0061ff;
  23994. }
  23995. .groupBox {}
  23996. .groupContent+.groupContent {
  23997. margin-top: 30px;
  23998. }
  23999. .groupTitle {
  24000. font-size: 24px;
  24001. color: rgb(80, 80, 80);
  24002. margin-bottom: 20px;
  24003. }
  24004. .groupName {
  24005. display: flex;
  24006. align-items: center;
  24007. }
  24008. .groupn {
  24009. font-size: 15px;
  24010. margin-right: 10px;
  24011. }
  24012. .groupName+.groupName {
  24013. margin-top: 15px;
  24014. }
  24015. .groupBtn {
  24016. margin-left: 10px;
  24017. }
  24018. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  24019. text-align: left;
  24020. }
  24021. .radioBox>div {
  24022. margin: 10px 0 0 10px;
  24023. }
  24024. .radioBox>>>.el-radio__input,
  24025. .radioBox>>>.el-checkbox__inner {
  24026. margin-left: 10px;
  24027. }
  24028. .radioBox>>>.el-radio__label,
  24029. .radioBox>>>.el-checkbox__label {
  24030. display: flex;
  24031. align-items: center;
  24032. }
  24033. .inImg {
  24034. width: 50px;
  24035. }
  24036. .inImg>img {
  24037. width: 100%;
  24038. height: 100%;
  24039. object-fit: cover;
  24040. }
  24041. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  24042. height: auto;
  24043. padding: 10px;
  24044. margin: 0;
  24045. }
  24046. .upCss>>>.el-upload-list {
  24047. width: 100%;
  24048. }
  24049. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  24050. width: 100%;
  24051. height: 120px;
  24052. object-fit: contain;
  24053. background: unset;
  24054. margin-left: 0;
  24055. }
  24056. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  24057. display: none;
  24058. }
  24059. .tcMember+.tcMember::before {
  24060. content: "、";
  24061. }
  24062. .xzUpImg {
  24063. width: 25px;
  24064. height: 25px;
  24065. min-width: 25px;
  24066. min-height: 25px;
  24067. cursor: pointer;
  24068. margin: 0 10px;
  24069. }
  24070. .xzUpImg>img {
  24071. width: 100%;
  24072. height: 100%;
  24073. }
  24074. .closeCss {
  24075. position: absolute;
  24076. top: 8px;
  24077. right: 8px;
  24078. cursor: pointer;
  24079. width: 20px;
  24080. height: 20px;
  24081. }
  24082. .closeCss>img {
  24083. width: 100%;
  24084. height: 100%;
  24085. }
  24086. .moveBtn {
  24087. display: flex;
  24088. flex-direction: row;
  24089. flex-wrap: nowrap;
  24090. align-items: center;
  24091. width: 55px;
  24092. }
  24093. .timuUpImg {
  24094. display: flex;
  24095. flex-direction: row;
  24096. align-items: center;
  24097. width: 100%;
  24098. margin-right: 10px;
  24099. }
  24100. .timuUpImg>div:nth-child(1) {
  24101. margin-right: 10px;
  24102. display: flex;
  24103. align-items: center;
  24104. width: 100%;
  24105. }
  24106. .timuImgBox {
  24107. margin: 10px 0;
  24108. display: flex;
  24109. flex-direction: column;
  24110. flex-wrap: wrap;
  24111. align-items: flex-start;
  24112. }
  24113. .timuImg {
  24114. width: 100px;
  24115. margin: 5px 0;
  24116. cursor: pointer;
  24117. position: relative;
  24118. }
  24119. .timuImg:hover .deleteWord {
  24120. display: block;
  24121. }
  24122. .deleteWord {
  24123. width: 25px;
  24124. height: 25px;
  24125. position: absolute;
  24126. right: -5px;
  24127. top: -5px;
  24128. cursor: pointer;
  24129. display: none;
  24130. }
  24131. .timuImg>img,
  24132. .deleteWord>img {
  24133. width: 100%;
  24134. height: 100%;
  24135. object-fit: cover;
  24136. }
  24137. .e_add_delete {
  24138. cursor: pointer;
  24139. margin-left: 10px;
  24140. }
  24141. .pType_box {
  24142. margin-top: 30px;
  24143. align-items: flex-end;
  24144. }
  24145. .noneBox {
  24146. height: 200px;
  24147. width: 100%;
  24148. display: flex;
  24149. align-items: center;
  24150. justify-content: center;
  24151. flex-direction: column;
  24152. /* margin-top: 150px; */
  24153. }
  24154. .noneBox>img {
  24155. width: 95px;
  24156. }
  24157. .noneBox>span {
  24158. margin-top: 10px;
  24159. color: #717c8d;
  24160. }
  24161. .rb_c_box {
  24162. width: 100%;
  24163. height: 100%;
  24164. display: flex;
  24165. /* padding: 20px; */
  24166. box-sizing: border-box;
  24167. justify-content: space-between;
  24168. }
  24169. .rb_c_box_left {
  24170. height: 100%;
  24171. background: #fff;
  24172. width: 270px;
  24173. min-width: 270px;
  24174. border-radius: 8px;
  24175. margin-right: 10px;
  24176. }
  24177. .rb_c_box_right {
  24178. height: 100%;
  24179. width: calc(100%);
  24180. overflow: hidden;
  24181. }
  24182. .rb_c_box_btn {
  24183. display: flex;
  24184. justify-content: flex-start;
  24185. height: 50px;
  24186. align-items: center;
  24187. }
  24188. .rb_c_box_right>.basic_box {
  24189. /* background: #fff; */
  24190. border-radius: 0;
  24191. height: calc(100% - 0px);
  24192. overflow: auto;
  24193. padding: 0;
  24194. }
  24195. .textarea_css {
  24196. display: block;
  24197. resize: none;
  24198. padding: 10px 15px;
  24199. line-height: 1.5;
  24200. box-sizing: border-box;
  24201. width: 100%;
  24202. font-size: 14px;
  24203. color: #606266;
  24204. background-color: #fff;
  24205. background-image: none;
  24206. border: 1px solid #dcdfe6;
  24207. border-radius: 4px;
  24208. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  24209. outline: none;
  24210. overflow: hidden;
  24211. height: 46px;
  24212. font-family: "Microsoft YaHei";
  24213. }
  24214. .textarea_css::-webkit-input-placeholder {
  24215. color: #c0c4cc;
  24216. }
  24217. .textarea_css:focus {
  24218. border-color: #409eff;
  24219. outline: 0;
  24220. }
  24221. .addEditor>>>.text {
  24222. height: auto;
  24223. min-height: 100px;
  24224. }
  24225. .addEditor>>>.w-e-text-container {
  24226. min-height: 100px;
  24227. }
  24228. .moveBtn2 {
  24229. flex-direction: column;
  24230. width: fit-content;
  24231. margin: 0 10px 0 10px;
  24232. }
  24233. .moveBtn2 .chapter_upload_down,
  24234. .moveBtn2 .chapter_upload_up {
  24235. width: 16px;
  24236. height: 16px;
  24237. }
  24238. .moveBtn2 .chapter_upload_up::after,
  24239. .moveBtn2 .chapter_upload_down::after {
  24240. width: 10px;
  24241. height: 10px;
  24242. }
  24243. .fullStyle>>>.el-dialog__body {
  24244. height: calc(100% - 125px) !important;
  24245. box-sizing: border-box;
  24246. }
  24247. .fullStyle1>>>.el-dialog__body {
  24248. height: auto !important;
  24249. }
  24250. .fullStyle>>>.el-dialog {
  24251. width: 100% !important;
  24252. max-width: 100% !important;
  24253. height: 100% !important;
  24254. margin: 0 !important;
  24255. }
  24256. .fullStyle {
  24257. width: 100% !important;
  24258. max-width: 100% !important;
  24259. height: 100% !important;
  24260. margin: 0 auto !important;
  24261. }
  24262. .wb_j_box_btn {
  24263. width: calc(100% - 30px);
  24264. display: flex;
  24265. height: 40px;
  24266. border: 1.5px solid #cad1dc;
  24267. border-radius: 4px;
  24268. box-sizing: border-box;
  24269. align-items: center;
  24270. font-size: 14px;
  24271. cursor: pointer;
  24272. overflow: hidden;
  24273. }
  24274. .wb_j_box_btn:hover {
  24275. border: 1.5px solid #0061ff;
  24276. }
  24277. .wb_j_box_title {
  24278. background: #f0f4fa;
  24279. height: 100%;
  24280. line-height: 40px;
  24281. width: 90px;
  24282. text-align: center;
  24283. color: #060e17;
  24284. border-right: 1.5px solid #cad1dc;
  24285. box-sizing: border-box;
  24286. }
  24287. .wb_j_box_btn_c {
  24288. width: calc(100% - 90px);
  24289. padding: 0 35px 0 10px;
  24290. box-sizing: border-box;
  24291. position: relative;
  24292. }
  24293. .wb_j_box_span {
  24294. width: 100%;
  24295. overflow: hidden;
  24296. white-space: nowrap;
  24297. text-overflow: ellipsis;
  24298. word-wrap: break-word;
  24299. color: #717c8d;
  24300. }
  24301. .wb_j_box_arrow {
  24302. content: "";
  24303. width: 14px;
  24304. height: 14px;
  24305. background: url(../../../assets/icon/new/u_arrow.png);
  24306. background-size: 100% 100%;
  24307. position: absolute;
  24308. right: 12px;
  24309. top: 50%;
  24310. transform: translateY(-50%);
  24311. }
  24312. .check_classBox {
  24313. height: 400px;
  24314. display: flex;
  24315. border-top: 1.5px solid #e7ebf1;
  24316. border-bottom: 1.5px solid #e7ebf1;
  24317. }
  24318. .check_class_right {
  24319. width: 130px;
  24320. border-right: 1px solid #e7ebf1;
  24321. display: flex;
  24322. align-items: center;
  24323. flex-direction: column;
  24324. height: 100%;
  24325. overflow: auto;
  24326. padding: 15px 0;
  24327. box-sizing: border-box;
  24328. }
  24329. .check_class {
  24330. width: 85%;
  24331. border-radius: 5px;
  24332. height: 30px;
  24333. min-height: 30px;
  24334. line-height: 30px;
  24335. text-align: center;
  24336. padding: 0 10px;
  24337. box-sizing: border-box;
  24338. cursor: pointer;
  24339. white-space: nowrap;
  24340. overflow: hidden;
  24341. text-overflow: ellipsis;
  24342. }
  24343. .check_class.activeX {
  24344. background: #e0eafb;
  24345. color: #3681fc;
  24346. font-weight: 700;
  24347. }
  24348. .check_class+.check_class {
  24349. margin-top: 15px;
  24350. }
  24351. .check_class_left {
  24352. background: #fafafa;
  24353. width: calc(100% - 130px);
  24354. padding: 15px;
  24355. box-sizing: border-box;
  24356. }
  24357. .check_class_all_box {
  24358. display: flex;
  24359. margin-bottom: 10px;
  24360. }
  24361. .all_check {
  24362. display: flex;
  24363. align-items: center;
  24364. padding: 2px 0 0;
  24365. margin-left: 10px;
  24366. }
  24367. .all_check>>>.el-checkbox__label {
  24368. line-height: 18px;
  24369. }
  24370. .check_class_left_title {
  24371. font-size: 16px;
  24372. font-weight: 700;
  24373. }
  24374. .check_class_item {
  24375. display: flex;
  24376. flex-wrap: wrap;
  24377. height: calc(100% - 45px);
  24378. overflow: auto;
  24379. justify-content: flex-start;
  24380. align-items: flex-start;
  24381. align-content: flex-start;
  24382. }
  24383. .class_item:first-child {
  24384. /* margin: 0 15px 15px 67px; */
  24385. }
  24386. .class_item {
  24387. margin: 0 15px 15px 0;
  24388. }
  24389. .class_item:hover>>>.el-checkbox__label {
  24390. color: #409eff;
  24391. }
  24392. .class_item>>>.el-checkbox__label {
  24393. color: #0e1e33;
  24394. }
  24395. .class_item:hover>>>.el-checkbox__inner {
  24396. border-color: #409eff;
  24397. }
  24398. .class_item>>>.el-checkbox,
  24399. .class_item>>>.el-checkbox__input {
  24400. display: flex;
  24401. align-items: center;
  24402. }
  24403. .taskTitle {
  24404. font-size: 20px;
  24405. font-weight: bold;
  24406. margin-bottom: 35px;
  24407. }
  24408. .taskTitle:after {
  24409. content: "";
  24410. width: 100%;
  24411. display: block;
  24412. height: 1px;
  24413. background: #cad1dc;
  24414. position: absolute;
  24415. left: 0;
  24416. margin: 15px 0 0;
  24417. }
  24418. .eva_btn_box {
  24419. margin: 20px 0px 0 0;
  24420. display: flex;
  24421. flex-direction: row;
  24422. flex-wrap: nowrap;
  24423. align-items: center;
  24424. justify-content: space-between;
  24425. width: 100%;
  24426. }
  24427. .eva_btn_left_box {
  24428. display: flex;
  24429. flex-direction: row;
  24430. flex-wrap: nowrap;
  24431. align-items: center;
  24432. }
  24433. .addTypeChoose {
  24434. display: flex;
  24435. flex-direction: row;
  24436. flex-wrap: nowrap;
  24437. align-items: center;
  24438. margin: 15px 0;
  24439. }
  24440. .addTypeBox {
  24441. display: flex;
  24442. flex-direction: column;
  24443. flex-wrap: nowrap;
  24444. align-items: center;
  24445. }
  24446. .addTypeChoose {
  24447. display: flex;
  24448. flex-direction: row;
  24449. flex-wrap: nowrap;
  24450. align-items: center;
  24451. margin: 15px 0;
  24452. }
  24453. .buchong_box {
  24454. background: #E0EAFB66;
  24455. width: calc(100% - 20px);
  24456. min-height: 50px;
  24457. display: flex;
  24458. align-items: center;
  24459. justify-content: center;
  24460. margin: 0 auto;
  24461. }
  24462. .outline {
  24463. width: calc(100% - 40px);
  24464. margin: 0 auto;
  24465. }
  24466. .task_outline {
  24467. width: calc(100% - 40px);
  24468. margin: 0 auto;
  24469. }
  24470. .outline_box+.outline_box {
  24471. margin: 30px 0 0px;
  24472. }
  24473. .outline_task {
  24474. display: flex;
  24475. align-items: center;
  24476. margin-bottom: 10px;
  24477. }
  24478. .outline_btn{
  24479. display: flex;
  24480. align-items: center;
  24481. min-width: fit-content;
  24482. margin-left: 10px;
  24483. }
  24484. .outline_task .title {
  24485. font-size: 18px;
  24486. font-weight: bold;
  24487. min-width: 80px;
  24488. }
  24489. .op_task_box,
  24490. .op_tool_box,
  24491. .outline_detail {
  24492. position: relative;
  24493. }
  24494. .op_task_box:hover .op_box,
  24495. .op_tool_box:hover .op_box,
  24496. .outline_detail:hover .op_box {
  24497. display: flex
  24498. }
  24499. .op_box {
  24500. position: absolute;
  24501. bottom: 10px;
  24502. display: none;
  24503. align-items: center;
  24504. justify-content: space-between;
  24505. width: calc(100% - 20px);
  24506. left: 50%;
  24507. transform: translateX(-50%);
  24508. }
  24509. .op_box .op_remark {
  24510. color: #8E8E8E;
  24511. font-size: 14px;
  24512. }
  24513. .rb_c_nav {
  24514. width: calc(100% - 20px);
  24515. margin: 15px auto 0;
  24516. font-size: 18px;
  24517. }
  24518. .rb_c_nav span {
  24519. cursor: pointer;
  24520. }
  24521. .rb_c_nav span+span {
  24522. margin-left: 10px;
  24523. }
  24524. .rb_c_nav span.active {
  24525. color: #0061FF
  24526. }
  24527. .text_panel>>>.text {
  24528. height: 400px;
  24529. }
  24530. .markBox{
  24531. padding: 20px 14px;
  24532. line-height: 29px;
  24533. font-size: 16px;
  24534. background: #f4f4f4;
  24535. border-radius: 5px;
  24536. }
  24537. .info_box_t{
  24538. display: flex;
  24539. align-items: center;
  24540. }
  24541. .info_box_t + .info_box_t{
  24542. margin-top: 10px;
  24543. }
  24544. .info_box_t_box{
  24545. display: flex;
  24546. align-items: center;
  24547. }
  24548. .info_box_t_box + .info_box_t_box{
  24549. margin-left: 10px;
  24550. }
  24551. .info_box_t_box > span{
  24552. width: fit-content
  24553. }
  24554. .info_box_t_box > input{
  24555. width: 150px !important;
  24556. margin: 0 5px 0 0;
  24557. }
  24558. .mode_box{
  24559. display: flex;
  24560. align-items: center;
  24561. }
  24562. .mode_box > span{
  24563. padding: 0px 5px;
  24564. cursor: pointer;
  24565. }
  24566. .mode_box > span.active{
  24567. color: #409eff;
  24568. }
  24569. .chapter_upload_check {
  24570. width: 15px;
  24571. height: 15px;
  24572. cursor: pointer;
  24573. background-image: url('../../../assets/icon/check.png');
  24574. background-size: 100% 100%;
  24575. }
  24576. .chapter_upload_check.checked{
  24577. background-image: url('../../../assets/icon/checked.png');
  24578. }
  24579. .ruleBtn {
  24580. width: fit-content;
  24581. height: 36px;
  24582. line-height: 36px;
  24583. cursor: pointer;
  24584. color: #0061FF;
  24585. }
  24586. .stopBtn{
  24587. z-index: 999999;
  24588. position: absolute;
  24589. left: 50%;
  24590. top: calc(50% + 70px);
  24591. transform: translateX(-50%);
  24592. }
  24593. .rateSwitch >>> .el-switch__label.is-active {
  24594. color: #0061FF;
  24595. }
  24596. .rateSwitch >>> .el-switch__label--left{
  24597. display: flex;
  24598. align-items: center;
  24599. }
  24600. .rateSwitch >>> .el-switch__label--left::before{
  24601. content: "";
  24602. width: 14px;
  24603. height: 14px;
  24604. min-width: 14px;
  24605. min-height: 14px;
  24606. background-size: 100% 100%;
  24607. display: block;
  24608. margin-right: 7px;
  24609. background-image: url(../../../assets/icon/new/u_op.png);
  24610. }
  24611. </style>