addCourse.vue 1.1 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止</div>
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken" @click="cancelAjax('teacherTask')">停止</div>
  5. <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
  6. <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  7. <div class="courseTop">
  8. <div class="stepsNav">
  9. <el-breadcrumb separator-class="el-icon-arrow-right">
  10. <el-breadcrumb-item :to="{
  11. path:
  12. '/course?userid=' +
  13. userid +
  14. '&oid=' +
  15. oid +
  16. '&org=' +
  17. org +
  18. '&role=' +
  19. role,
  20. }">课程管理</el-breadcrumb-item>
  21. <el-breadcrumb-item>
  22. <span style="color: rgb(15, 126, 255)">添加课程</span>
  23. </el-breadcrumb-item>
  24. </el-breadcrumb>
  25. </div>
  26. <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  27. </div>
  28. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  29. <!-- @mouseenter="stepDisplay(true)"
  30. @mouseleave="stepDisplay(false)" -->
  31. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  32. <div class="stepBg" v-if="false">
  33. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  34. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  35. <div>
  36. <img src="../../../assets/icon/first.png" alt />
  37. </div>
  38. <div>填写基本信息</div>
  39. </div>
  40. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  41. <div>
  42. <img src="../../../assets/icon/firstNo.png" alt />
  43. </div>
  44. <div>填写基本信息</div>
  45. </div>
  46. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  47. </div>
  48. <!-- <div
  49. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  50. class="second"
  51. @click="navSteps(2)"
  52. >
  53. <div style="margin: 5px 10px 0 0; width: 2rem">
  54. <img src="../../../assets/icon/second.png" alt />
  55. </div>
  56. <div>选择课程模板</div>
  57. </div>
  58. <div
  59. v-else-if="cidType === 0 && isStepDisplay"
  60. class="secondNo"
  61. @click="navSteps(2)"
  62. >
  63. <div>
  64. <img src="../../../assets/icon/secondNo.png" alt />
  65. </div>
  66. <div>选择课程模板</div>
  67. </div> -->
  68. <!-- <div
  69. v-if="isStepDisplay"
  70. class="stepBorder"
  71. :class="{ 'border-active': steps > 2 }"
  72. ></div> -->
  73. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  74. <div>
  75. <img src="../../../assets/icon/third.png" alt />
  76. </div>
  77. <div>上传课程内容</div>
  78. </div>
  79. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  80. <div>
  81. <img src="../../../assets/icon/thirdNo.png" alt />
  82. </div>
  83. <div>上传课程内容</div>
  84. </div>
  85. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  86. <div v-if="steps > 3 && isStepDisplay" class="four">
  87. <div>
  88. <img src="../../../assets/icon/four.png" alt />
  89. </div>
  90. <div>上传完成</div>
  91. </div>
  92. <div v-else-if="isStepDisplay" class="fourNo">
  93. <div>
  94. <img src="../../../assets/icon/fourNo.png" alt />
  95. </div>
  96. <div>上传完成</div>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  101. style="padding: 0" :style="{
  102. height:
  103. !isStepDisplay && !isBtnDisplay
  104. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  105. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  106. }">
  107. <!-- <div class="updateMask" :style="{
  108. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  109. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  110. <div class="whiteBg" style="background: unset; padding: 0">
  111. <div>
  112. <div class="basic_box" style="padding: 0">
  113. <div class="big_box">
  114. <div class="left_first">
  115. <div :class="{
  116. updateTips:
  117. cid && userid != courseUserid && role != '1',
  118. }">
  119. <div style="width: 100%">
  120. <div class="course_input_box2">
  121. <div class="course_input_box">
  122. <div class="bb_courseIcon">
  123. <img src="../../../assets/icon/new/course.png" />
  124. </div>
  125. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" @change="setCover" />
  126. </div>
  127. <div style=" margin-bottom: 15px; display:flex;">
  128. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  129. style="justify-content: center; min-width: 150px;"></el-switch>
  130. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  131. style="justify-content: center; min-width: 175px"></el-switch>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  137. <span>类型</span>
  138. <!-- 学科+ 主题+ 未来+ -->
  139. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  140. style="display: flex; align-items: center">
  141. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  142. :key="index">
  143. <el-radio :label="item.name">{{
  144. item.name
  145. }}</el-radio>
  146. </div>
  147. </el-radio-group>
  148. </div>
  149. <div class="both">
  150. <div class="choose">
  151. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  152. <span v-if="
  153. CourseTypeJson[item.id].length > 0 &&
  154. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  155. ? pTypeCheck.indexOf(item.id) != -1
  156. : true)
  157. ">{{ item.name }}:</span>
  158. <el-checkbox-group v-model="courseTypeId" @change="typeChange" v-if="
  159. CourseTypeJson[item.id].length > 0 &&
  160. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  161. ? pTypeCheck.indexOf(item.id) != -1
  162. : true)
  163. ">
  164. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  165. item1.name }}</el-checkbox>
  166. </el-checkbox-group>
  167. <!-- <div
  168. v-else
  169. style="font-size: 14px; margin-left: -8px"
  170. >
  171. 暂无
  172. </div> -->
  173. </div>
  174. </div>
  175. </div>
  176. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  177. <div class="info_box_t_box">
  178. <span>输出语言:</span>
  179. <el-radio-group v-model="languageSetting" style="display: flex; align-items: center" @change="changeLang">
  180. <div class="all_choose info_radio">
  181. <el-radio :label="0">简体中文</el-radio>
  182. </div>
  183. <div class="all_choose info_radio" style="margin-left: 10px">
  184. <el-radio :label="1">繁体中文</el-radio>
  185. </div>
  186. <div class="all_choose info_radio" style="margin-left: 10px">
  187. <el-radio :label="2">English</el-radio>
  188. </div>
  189. </el-radio-group>
  190. </div>
  191. </div>
  192. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  193. <div class="info_box_t_box">
  194. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  195. style="justify-content: center; min-width: 175px"></el-switch> -->
  196. <span>生成模式:</span>
  197. <el-radio-group v-model="isuseT" style="display: flex; align-items: center" @change="changeIsuseT">
  198. <div class="all_choose info_radio">
  199. <el-radio :label="1">对话模式生成</el-radio>
  200. </div>
  201. <div class="all_choose info_radio" style="margin-left: 10px">
  202. <el-radio :label="true">从已有教案生成</el-radio>
  203. </div>
  204. <div class="all_choose info_radio" style="margin-left: 10px">
  205. <el-radio :label="false">从零开始生成</el-radio>
  206. </div>
  207. </el-radio-group>
  208. </div>
  209. <div class="info_box_t_box">
  210. <span>生成风格:</span>
  211. <div class="mode_box">
  212. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  213. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  214. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  215. </div>
  216. </div>
  217. </div>
  218. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  219. <div class="info_box_t_box">
  220. <span>课程节数:</span>
  221. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  222. <span>节</span>
  223. </div>
  224. <div class="info_box_t_box">
  225. <span>课程时长:</span>
  226. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  227. <span>min</span>
  228. </div>
  229. </div> -->
  230. </div>
  231. <div class="right_first" v-loading="imageloading2">
  232. <!-- <div class="ai_box">
  233. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  234. </div> -->
  235. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  236. 上传封面
  237. </div>
  238. <div style="width: 100%">
  239. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  240. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  241. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  242. <div v-if="cover.length == 0">点击添加封面</div>
  243. <div class="cover_mask">
  244. <img src="../../../assets/icon/new/cover_update.png" /><span
  245. style="margin-top: 5px">修改封面</span>
  246. </div>
  247. </div>
  248. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  249. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  250. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  251. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  252. <i class="el-icon-plus"></i>
  253. </el-upload> -->
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  261. <div class="whiteBg" style="border-radius: 0">
  262. <div class="c_info_title">
  263. 课程权限设置
  264. </div>
  265. <div class="wb_j_box">
  266. <div class="wb_j_box_content">
  267. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  268. (dialogVisibleClass = true),
  269. (classSearch = ''),
  270. (gradeId = ''),
  271. getClass()
  272. ">添加班级</button>
  273. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  274. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  275. getClassC(tc) }}</span>
  276. </div> -->
  277. <div class="wb_j_box_btn" @click="
  278. (dialogVisibleClass = true),
  279. (classSearch = ''),
  280. (gradeId = ''),
  281. getClass()
  282. ">
  283. <div class="wb_j_box_title">授课班级</div>
  284. <div class="wb_j_box_btn_c">
  285. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  286. v-if="checkboxList2.length" popper-class="text_tooltip2">
  287. <div class="wb_j_box_span">
  288. {{ getListClassC(checkboxList2) }}
  289. </div>
  290. </el-tooltip>
  291. <div v-else class="wb_j_box_span">请选择授课班级</div>
  292. <div class="wb_j_box_arrow"></div>
  293. </div>
  294. </div>
  295. </div>
  296. <div class="wb_j_box_content">
  297. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  298. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  299. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  300. checkBoolean
  301. ? checkboxList3
  302. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  303. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  304. </div> -->
  305. <div class="wb_j_box_btn" @click="openMember">
  306. <div class="wb_j_box_title">协同人员</div>
  307. <div class="wb_j_box_btn_c">
  308. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  309. v-if="checkboxList3.length" popper-class="text_tooltip2">
  310. <div class="wb_j_box_span">
  311. {{ getListMan2(checkboxList3) }}
  312. </div>
  313. </el-tooltip>
  314. <div v-else class="wb_j_box_span">请选择协同人员</div>
  315. <div class="wb_j_box_arrow"></div>
  316. </div>
  317. </div>
  318. </div>
  319. </div>
  320. </div>
  321. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  322. <div class="c_info_title">目标管理</div>
  323. <div style="margin: 0 auto; padding: 0 20px">
  324. <div style="
  325. width: 95%;
  326. min-height: 200px;
  327. border: 1px solid #cad1dc;
  328. border-radius: 4px;
  329. position: relative;
  330. ">
  331. <div class="e_add_top">
  332. <div class="e_add_title">
  333. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  334. 清除
  335. </button>
  336. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  337. 添加
  338. </button>
  339. <!-- <span>当前使用目标管理</span>
  340. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  341. <img
  342. src="../../../assets/line.png"
  343. class="cru_line"
  344. style="
  345. width: 125px;
  346. height: 20px;
  347. bottom: -10px;
  348. left: 155px;
  349. "
  350. /> -->
  351. </div>
  352. <div style="
  353. display: flex;
  354. flex-direction: row;
  355. align-items: center;
  356. ">
  357. <!-- <el-button
  358. type="primary"
  359. size="small"
  360. @click="dialogVisiblemb = true"
  361. >添加目标管理</el-button
  362. >
  363. <el-button
  364. type="primary"
  365. size="small"
  366. @click="deleteEva()"
  367. >清除内容</el-button
  368. > -->
  369. <!-- <div class="e_add_delete" @click="deleteEva()">
  370. <img src="../../../assets/icon/delete.png" alt="" />
  371. </div> -->
  372. </div>
  373. </div>
  374. <div v-if="evalua == ''">
  375. <div class="noneBox">
  376. <img src="../../../assets/icon/new/eva_none.png" />
  377. <span>请添加目标管理</span>
  378. </div>
  379. </div>
  380. <div class="e_add_content" v-else>
  381. <div class="e_add_list_pbox">
  382. <div class="e_add_list_pbox_title">
  383. <span class="type_title">切换模式</span>
  384. <div class="type_content">
  385. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  386. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  387. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  388. </div>
  389. </div>
  390. <div class="e_add_list_pbox_content">
  391. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  392. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  393. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  394. v-if="typeMode == 3">
  395. </SeeBoard>
  396. </div>
  397. </div>
  398. </div>
  399. </div>
  400. </div>
  401. </div>
  402. </div>
  403. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  404. <div style="position: relative;
  405. background: #fff;
  406. box-sizing: border-box;
  407. padding: 1px 20px 10px;
  408. width: 100%;
  409. border-radius: 10px;">
  410. <div style="
  411. display: flex;
  412. flex-direction: row;
  413. justify-content: space-between;
  414. align-items: center;
  415. " :style="{
  416. margin: true
  417. ? '20px 0 10px'
  418. : '20px 0 0',
  419. }">
  420. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  421. 已有教案
  422. <div class="add_info_box" style="margin: 0 0 0 auto">
  423. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  424. 上传已有教案
  425. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  426. beforeUploadInfo2(
  427. $event,
  428. 14
  429. )
  430. " />
  431. </button>
  432. <button class="c_pub_button_add" @click="clickGenTT" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  433. 一键智能总结生成
  434. </button>
  435. </div>
  436. </div>
  437. </div>
  438. <div>
  439. <div class="add_chapters_box add_c_none" v-if="
  440. teacherInfoData &&
  441. teacherInfoData.length == 0
  442. ">
  443. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  444. <span>暂时还没有内容,快去添加吧</span>
  445. </div>
  446. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  447. <div @dragstart="
  448. dragStart(item1, index1, 0)
  449. " @dragover.prevent="
  450. dragOver(index1, 0)
  451. " @dragend="dragEnd()" :draggable="isdrag ==
  452. 'chapter-' + 0 + '-' + index1
  453. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  454. getChapterData(
  455. $event,
  456. index1,
  457. item1.type
  458. )
  459. " :class="{
  460. dragOverTop2:
  461. newIndex === index1 &&
  462. typeIndex ==
  463. 'chapter-' +
  464. 0 +
  465. '-' +
  466. index1 &&
  467. oldIndex > index1 &&
  468. dragType == 'drag',
  469. dragOverBottom2:
  470. newIndex === index1 &&
  471. typeIndex ==
  472. 'chapter-' +
  473. 0 +
  474. '-' +
  475. index1 &&
  476. oldIndex < index1 &&
  477. dragType == 'drag',
  478. }">
  479. <div class="chapter_upload_o" style="
  480. position: relative;
  481. display: flex;
  482. align-items: center;
  483. ">
  484. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  485. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  486. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  487. </div>
  488. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  489. </div>
  490. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  491. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  492. </div>
  493. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  494. </div>
  495. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  496. </div>
  497. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  498. </div>
  499. </div>
  500. <div class="chapter_upload_n">
  501. <input readonly="true" v-if="
  502. item1.type == 2 ||
  503. item1.type == 3 ||
  504. item1.type == 12 ||
  505. item1.type == 13 ||
  506. item1.type == 7
  507. " :placeholder="item1.name" style="
  508. border: none;
  509. outline: none;
  510. width: 80%;
  511. minwidth: 215px;
  512. z-index: 99;
  513. font-size: 14px;
  514. white-space: nowrap;
  515. overflow: hidden;
  516. text-overflow: ellipsis;
  517. " />
  518. </div>
  519. <div class="chapter_upload_ic">
  520. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  521. <div class="chapter_upload_ic_r" @click.stop="
  522. deleteTeacherInfoData(
  523. $event,
  524. index1
  525. )
  526. ">
  527. <div></div>
  528. </div>
  529. </div>
  530. </div>
  531. </div>
  532. </div>
  533. </div>
  534. <div v-if="
  535. teacherinfoproVisible
  536. " class="mask">
  537. <div class="progressBox">
  538. <div class="lbox">
  539. <img src="../../../assets/loading.gif" />上传中,请稍后
  540. </div>
  541. <div style="margin-bottom: 10px">
  542. <span>{{
  543. teacherinfoisFinishSize
  544. }}</span>
  545. /
  546. <span>{{
  547. teacherinfoisAllSize
  548. }}</span>
  549. </div>
  550. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  551. ? teacherinfoprogress
  552. : 0
  553. " style="width: 80%"></el-progress> -->
  554. </div>
  555. </div>
  556. </div>
  557. </div>
  558. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  559. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken" @click="cancelAjax('teacherText')">停止</div>
  560. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  561. <div class="c_info_title">
  562. 已有教案摘要
  563. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  564. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  565. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '右键已有教案摘要-提取摘要按钮')"
  566. @click="openAiDialog(2, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '点击已有教案摘要-提取摘要按钮')">提取摘要</button>
  567. </el-tooltip>
  568. </div>
  569. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  570. <div style="width: calc(100%);" class='op_task_box'>
  571. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  572. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  573. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  574. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  575. <div class="op_box" :class="{op_box_isquote: isQuote['aiteacherTextDetail']}">
  576. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  577. <div class="op_box_right">
  578. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  579. <div class="r_pub_button_op"
  580. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '右键已有教案摘要-智能优化按钮')"
  581. @click="openAiDialog(2, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '点击已有教案摘要-智能优化按钮')">智能优化</div>
  582. </el-tooltip>
  583. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击已有教案摘要-确定/编辑按钮')">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  584. <el-switch style="margin-left: 10px" v-model="isQuote['aiteacherTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiteacherTextDetail'), addCourseBehavior('courseBehavior', '点击已有教案摘要-引用按钮')"></el-switch>
  585. </div>
  586. </div>
  587. </div>
  588. </div>
  589. </div>
  590. </div>
  591. <div class="whiteBg" :style="{ minHeight: targetTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  592. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1" @click="cancelAjax('target1')">停止</div>
  593. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  594. <div class="c_info_title">
  595. 课程目标
  596. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  597. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  598. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '右键课程目标-提取目标按钮')"
  599. @click="openAiDialog(2, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '点击课程目标-提取目标按钮')">提取目标</button>
  600.                   </el-tooltip>
  601. </div>
  602. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  603. <div style="width: calc(100%);" class='op_task_box'>
  604. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  605. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  606. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  607. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  608. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail']}">
  609. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  610. <div class="op_box_right">
  611. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  612. <div class="r_pub_button_op"
  613. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  614. @click="openAiDialog(2, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">智能优化</div>
  615. </el-tooltip>
  616. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  617. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aitargetTextDetail'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  618. </div>
  619. </div>
  620. </div>
  621. </div>
  622. </div>
  623. </div>
  624. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  625. <div style="position: relative;
  626. background: #fff;
  627. box-sizing: border-box;
  628. padding: 1px 20px 10px;
  629. width: 100%;
  630. border-radius: 10px;">
  631. <div style="
  632. display: flex;
  633. flex-direction: row;
  634. justify-content: space-between;
  635. align-items: center;
  636. " :style="{
  637. margin: true
  638. ? '20px 0 10px'
  639. : '20px 0 0',
  640. }">
  641. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  642. 系统推荐参考资料
  643. <div class="add_info_box" style="margin: 0 0 0 auto">
  644. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  645. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  646. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  647. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  648.  </el-tooltip>
  649. </div>
  650. </div>
  651. </div>
  652. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  653. <div class="add_chapters_box add_c_none" v-if="
  654. cankaoInfoData &&
  655. cankaoInfoData.length == 0
  656. ">
  657. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  658. <span>暂时还没有内容,快去添加吧</span>
  659. </div>
  660. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  661. <div @dragstart="
  662. dragStart(item1, index1, 0)
  663. " @dragover.prevent="
  664. dragOver(index1, 0)
  665. " @dragend="dragEnd()" :draggable="isdrag ==
  666. 'chapter-' + 0 + '-' + index1
  667. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  668. getChapterData(
  669. $event,
  670. index1,
  671. item1.type
  672. )
  673. " :class="{
  674. dragOverTop2:
  675. newIndex === index1 &&
  676. typeIndex ==
  677. 'chapter-' +
  678. 0 +
  679. '-' +
  680. index1 &&
  681. oldIndex > index1 &&
  682. dragType == 'drag',
  683. dragOverBottom2:
  684. newIndex === index1 &&
  685. typeIndex ==
  686. 'chapter-' +
  687. 0 +
  688. '-' +
  689. index1 &&
  690. oldIndex < index1 &&
  691. dragType == 'drag',
  692. }">
  693. <div class="chapter_upload_o" style="
  694. position: relative;
  695. display: flex;
  696. align-items: center;
  697. ">
  698. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  699. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  700. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  701. </div>
  702. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  703. </div>
  704. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  705. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  706. </div>
  707. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  708. </div>
  709. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  710. </div>
  711. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  712. </div>
  713. </div>
  714. <div class="chapter_upload_n">
  715. <input readonly="true" v-if="
  716. item1.type == 2 ||
  717. item1.type == 3 ||
  718. item1.type == 12 ||
  719. item1.type == 13 ||
  720. item1.type == 7
  721. " :placeholder="item1.name" style="
  722. border: none;
  723. outline: none;
  724. width: 80%;
  725. minwidth: 215px;
  726. z-index: 99;
  727. font-size: 14px;
  728. white-space: nowrap;
  729. overflow: hidden;
  730. text-overflow: ellipsis;
  731. " />
  732. </div>
  733. <div class="chapter_upload_ic">
  734. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  735. <div class="chapter_upload_ic_r" @click.stop="
  736. deleteCankaoInfoData(
  737. $event,
  738. index1
  739. )
  740. ">
  741. <div></div>
  742. </div>
  743. </div>
  744. </div>
  745. </div>
  746. </div>
  747. </div>
  748. </div>
  749. </div>
  750. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  751. <div style="position: relative;
  752. background: #fff;
  753. box-sizing: border-box;
  754. padding: 1px 20px 10px;
  755. width: 100%;
  756. border-radius: 10px;">
  757. <div style="
  758. display: flex;
  759. flex-direction: row;
  760. justify-content: space-between;
  761. align-items: center;
  762. " :style="{
  763. margin: true
  764. ? '20px 0 10px'
  765. : '20px 0 0',
  766. }">
  767. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  768. 参考标准
  769. <div class="add_info_box" style="margin: 0 0 0 auto">
  770. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  771. 上传参考标准
  772. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  773. beforeUploadInfo2(
  774. $event,
  775. 19
  776. )
  777. " />
  778. </button>
  779. </div>
  780. </div>
  781. </div>
  782. <div>
  783. <div class="add_chapters_box add_c_none" v-if="
  784. knowInfoData &&
  785. knowInfoData.length == 0
  786. ">
  787. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  788. <span>暂时还没有内容,快去添加吧</span>
  789. </div>
  790. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  791. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  792. getChapterData(
  793. $event,
  794. index1,
  795. item1.type
  796. )
  797. " >
  798. <div class="chapter_upload_o" style="
  799. position: relative;
  800. display: flex;
  801. align-items: center;
  802. ">
  803. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData(item1.fileid)"></div>
  804. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  805. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  806. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  807. </div>
  808. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  809. </div>
  810. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  811. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  812. </div>
  813. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  814. </div>
  815. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  816. </div>
  817. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  818. </div>
  819. </div>
  820. <div class="chapter_upload_n">
  821. <input readonly="true" v-if="
  822. item1.type == 2 ||
  823. item1.type == 3 ||
  824. item1.type == 12 ||
  825. item1.type == 13 ||
  826. item1.type == 7
  827. " :placeholder="item1.name" @click.stop="
  828. checkChpater3($event, index1, item1)
  829. " style="
  830. border: none;
  831. outline: none;
  832. width: 80%;
  833. minwidth: 215px;
  834. z-index: 99;
  835. font-size: 14px;
  836. white-space: nowrap;
  837. overflow: hidden;
  838. text-overflow: ellipsis;
  839. " />
  840. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  841. border: none;
  842. outline: none;
  843. width: 80%;
  844. white-space: nowrap;
  845. overflow: hidden;
  846. text-overflow: ellipsis;
  847. " readonly="true" @click="
  848. selectAttText(index1)
  849. " />
  850. <input :placeholder="item1.title ? item1.title : '链接'
  851. " v-if="item1.type == 8" style="
  852. border: none;
  853. outline: none;
  854. width: 80%;
  855. white-space: nowrap;
  856. overflow: hidden;
  857. text-overflow: ellipsis;
  858. " readonly="true" @click="selectLine(index1)" />
  859. <input :placeholder="item1.title ? item1.title : '链接'
  860. " v-if="item1.type == 14" style="
  861. border: none;
  862. outline: none;
  863. width: 80%;
  864. white-space: nowrap;
  865. overflow: hidden;
  866. text-overflow: ellipsis;
  867. " readonly="true" @click="
  868. openUpdateSource(index1)
  869. " />
  870. </div>
  871. <div class="chapter_upload_ic">
  872. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  873. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  874. checkChpater3($event, index1, item1)
  875. ">
  876. <div></div>
  877. </div>
  878. <div class="chapter_upload_ic_r" @click.stop="
  879. deleteKnowInfoData(
  880. $event,
  881. index1
  882. )
  883. ">
  884. <div></div>
  885. </div>
  886. </div>
  887. </div>
  888. </div>
  889. </div>
  890. </div>
  891. <div v-if="
  892. knowinfoproVisible
  893. " class="mask">
  894. <div class="progressBox">
  895. <div class="lbox">
  896. <img src="../../../assets/loading.gif" />上传中,请稍后
  897. </div>
  898. <div style="margin-bottom: 10px">
  899. <span>{{
  900. knowinfoisFinishSize
  901. }}</span>
  902. /
  903. <span>{{
  904. knowinfoisAllSize
  905. }}</span>
  906. </div>
  907. </div>
  908. </div>
  909. </div>
  910. </div>
  911. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  912. <div style="position: relative;
  913. background: #fff;
  914. box-sizing: border-box;
  915. padding: 1px 20px 10px;
  916. width: 100%;
  917. border-radius: 10px;">
  918. <div style="
  919. display: flex;
  920. flex-direction: row;
  921. justify-content: space-between;
  922. align-items: center;
  923. " :style="{
  924. margin: true
  925. ? '20px 0 10px'
  926. : '20px 0 0',
  927. }">
  928. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  929. 检索资料
  930. <div class="add_info_box" style="margin: 0 0 0 auto;align-items:center">
  931. <input type="text" placeholder="请输入检索关键词" class="binfo_input" v-model="searchFileName" style="width: 200px;margin: 0 5px 10px 0;min-height: 36px;box-sizing: border-box;height: 36px;"/>
  932. <button class="c_pub_button_add" @click="findMatchingContents">
  933. 点击检索资料
  934. <!-- <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  935. beforeUploadInfo2(
  936. $event,
  937. 20
  938. )
  939. " /> -->
  940. </button>
  941. </div>
  942. </div>
  943. </div>
  944. <div v-loading="knowInfoDataLoading" element-loading-text="小可正在努力生成中,请稍等...">
  945. <div class="add_chapters_box add_c_none" v-if="
  946. knowInfoData2 &&
  947. knowInfoData2.length == 0
  948. ">
  949. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  950. <span>暂时还没有内容,快去添加吧</span>
  951. </div>
  952. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  953. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData2" :key="item1.id" @click="
  954. getChapterData(
  955. $event,
  956. index1,
  957. item1.type
  958. )
  959. " >
  960. <div class="chapter_upload_o" style="
  961. position: relative;
  962. display: flex;
  963. align-items: center;
  964. ">
  965. <div class="chapter_upload_check" :class="{ checked: knowFileids2.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData2(item1.fileid)"></div>
  966. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  967. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  968. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  969. </div>
  970. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  971. </div>
  972. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  973. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  974. </div>
  975. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  976. </div>
  977. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  978. </div>
  979. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  980. </div>
  981. </div>
  982. <div class="chapter_upload_n">
  983. <input readonly="true" v-if="
  984. item1.type == 2 ||
  985. item1.type == 3 ||
  986. item1.type == 12 ||
  987. item1.type == 13 ||
  988. item1.type == 7
  989. " :placeholder="item1.name" @click.stop="
  990. checkChpater3($event, index1, item1)
  991. " style="
  992. border: none;
  993. outline: none;
  994. width: 80%;
  995. minwidth: 215px;
  996. z-index: 99;
  997. font-size: 14px;
  998. white-space: nowrap;
  999. overflow: hidden;
  1000. text-overflow: ellipsis;
  1001. " />
  1002. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1003. border: none;
  1004. outline: none;
  1005. width: 80%;
  1006. white-space: nowrap;
  1007. overflow: hidden;
  1008. text-overflow: ellipsis;
  1009. " readonly="true" @click="
  1010. selectAttText(index1)
  1011. " />
  1012. <input :placeholder="item1.title ? item1.title : '链接'
  1013. " v-if="item1.type == 8" style="
  1014. border: none;
  1015. outline: none;
  1016. width: 80%;
  1017. white-space: nowrap;
  1018. overflow: hidden;
  1019. text-overflow: ellipsis;
  1020. " readonly="true" @click="selectLine(index1)" />
  1021. <input :placeholder="item1.title ? item1.title : '链接'
  1022. " v-if="item1.type == 14" style="
  1023. border: none;
  1024. outline: none;
  1025. width: 80%;
  1026. white-space: nowrap;
  1027. overflow: hidden;
  1028. text-overflow: ellipsis;
  1029. " readonly="true" @click="
  1030. openUpdateSource(index1)
  1031. " />
  1032. </div>
  1033. <div class="chapter_upload_ic">
  1034. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1035. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1036. checkChpater3($event, index1, item1)
  1037. ">
  1038. <div></div>
  1039. </div>
  1040. <div class="chapter_upload_ic_r" @click.stop="
  1041. deleteKnowInfoData2(
  1042. $event,
  1043. index1
  1044. )
  1045. ">
  1046. <div></div>
  1047. </div>
  1048. </div>
  1049. </div>
  1050. </div>
  1051. </div>
  1052. </div>
  1053. <div v-if="
  1054. knowinfoproVisible2
  1055. " class="mask">
  1056. <div class="progressBox">
  1057. <div class="lbox">
  1058. <img src="../../../assets/loading.gif" />上传中,请稍后
  1059. </div>
  1060. <div style="margin-bottom: 10px">
  1061. <span>{{
  1062. knowinfoisFinishSize2
  1063. }}</span>
  1064. /
  1065. <span>{{
  1066. knowinfoisAllSize2
  1067. }}</span>
  1068. </div>
  1069. </div>
  1070. </div>
  1071. </div>
  1072. </div>
  1073. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && infoData2.length">
  1074. <div style="position: relative;
  1075. background: #fff;
  1076. box-sizing: border-box;
  1077. padding: 1px 20px 10px;
  1078. width: 100%;
  1079. border-radius: 10px;">
  1080. <div style="
  1081. display: flex;
  1082. flex-direction: row;
  1083. justify-content: space-between;
  1084. align-items: center;
  1085. " :style="{
  1086. margin: true
  1087. ? '20px 0 10px'
  1088. : '20px 0 0',
  1089. }">
  1090. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1091. 知识库
  1092. <div class="add_info_box" style="margin: 0 0 0 auto">
  1093. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1094. 上传补充资料
  1095. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1096. beforeUploadInfo2(
  1097. $event,
  1098. 15
  1099. )
  1100. " />
  1101. </button>
  1102. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
  1103. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1104. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  1105. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  1106.  </el-tooltip> -->
  1107. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1108. @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">智能检索资料</button>
  1109. </div>
  1110. </div>
  1111. </div>
  1112. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..." :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  1113. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken" @click="cancelAjax('file')">停止</div>
  1114. <div class="add_chapters_box add_c_none" v-if="
  1115. infoData2 &&
  1116. infoData2.length == 0
  1117. ">
  1118. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1119. <span>暂时还没有内容,快去添加吧</span>
  1120. </div>
  1121. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1122. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  1123. getChapterData(
  1124. $event,
  1125. index1,
  1126. item1.type
  1127. )
  1128. " >
  1129. <div class="chapter_upload_o" style="
  1130. position: relative;
  1131. display: flex;
  1132. align-items: center;
  1133. ">
  1134. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  1135. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1136. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1137. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1138. </div>
  1139. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1140. </div>
  1141. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1142. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1143. </div>
  1144. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1145. </div>
  1146. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1147. </div>
  1148. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1149. </div>
  1150. </div>
  1151. <div class="chapter_upload_n">
  1152. <input readonly="true" v-if="
  1153. item1.type == 2 ||
  1154. item1.type == 3 ||
  1155. item1.type == 12 ||
  1156. item1.type == 13 ||
  1157. item1.type == 7
  1158. " :placeholder="item1.name" @click.stop="
  1159. checkChpater2($event, index1 )
  1160. " style="
  1161. border: none;
  1162. outline: none;
  1163. width: 80%;
  1164. minwidth: 215px;
  1165. z-index: 99;
  1166. font-size: 14px;
  1167. white-space: nowrap;
  1168. overflow: hidden;
  1169. text-overflow: ellipsis;
  1170. " />
  1171. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1172. border: none;
  1173. outline: none;
  1174. width: 80%;
  1175. white-space: nowrap;
  1176. overflow: hidden;
  1177. text-overflow: ellipsis;
  1178. " readonly="true" @click="
  1179. selectAttText(index1)
  1180. " />
  1181. <input :placeholder="item1.title ? item1.title : '链接'
  1182. " v-if="item1.type == 8" style="
  1183. border: none;
  1184. outline: none;
  1185. width: 80%;
  1186. white-space: nowrap;
  1187. overflow: hidden;
  1188. text-overflow: ellipsis;
  1189. " readonly="true" @click="selectLine(index1)" />
  1190. <input :placeholder="item1.title ? item1.title : '链接'
  1191. " v-if="item1.type == 14" style="
  1192. border: none;
  1193. outline: none;
  1194. width: 80%;
  1195. white-space: nowrap;
  1196. overflow: hidden;
  1197. text-overflow: ellipsis;
  1198. " readonly="true" @click="
  1199. openUpdateSource(index1)
  1200. " />
  1201. </div>
  1202. <div class="chapter_upload_ic">
  1203. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1204. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1205. checkChpater2($event, index1 )
  1206. ">
  1207. <div></div>
  1208. </div>
  1209. <div class="chapter_upload_ic_r" @click.stop="
  1210. deleteInfoData2(
  1211. $event,
  1212. index1
  1213. )
  1214. ">
  1215. <div></div>
  1216. </div>
  1217. </div>
  1218. </div>
  1219. </div>
  1220. </div>
  1221. </div>
  1222. <div v-if="
  1223. infoproVisible
  1224. " class="mask">
  1225. <div class="progressBox">
  1226. <div class="lbox">
  1227. <img src="../../../assets/loading.gif" />上传中,请稍后
  1228. </div>
  1229. <div style="margin-bottom: 10px">
  1230. <span>{{
  1231. infoisFinishSize
  1232. }}</span>
  1233. /
  1234. <span>{{
  1235. infoisAllSize
  1236. }}</span>
  1237. </div>
  1238. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1239. ? infoprogress
  1240. : 0
  1241. " style="width: 80%"></el-progress> -->
  1242. </div>
  1243. </div>
  1244. </div>
  1245. </div>
  1246. <div class="whiteBg" :style="{ minHeight: textLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!(isuseT === true) && !(isuseT === 1) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid))">
  1247. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken" @click="cancelAjax('text')">停止</div>
  1248. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1249. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  1250. 课程简要描述
  1251. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1252. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1253. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1), addCourseBehavior('courseBehavior', '右键课程简要描述-AI优化按钮')"
  1254. @click="openAiDialog(2, 'aiDetail',1), addCourseBehavior('courseBehavior', '点击课程简要描述-AI优化按钮')">AI优化</button>
  1255. </el-tooltip>
  1256. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">生成概况和目标</button>
  1257. </div>
  1258. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1259. <div style="width: calc(100%);" class='op_task_box'>
  1260. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1261. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  1262. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  1263. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  1264. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1265. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1266. <div class="op_box_right">
  1267. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1268. <div class="r_pub_button_op"
  1269. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2), addCourseBehavior('courseBehavior', '右键课程简要描述-智能优化按钮')"
  1270. @click="openAiDialog(2, 'aiDetail', 2), addCourseBehavior('courseBehavior', '点击课程简要描述-智能优化按钮')">智能优化</div>
  1271. </el-tooltip>
  1272. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程简要描述-确定/编辑按钮')">{{ courseTextB ? '确定' : '编辑'}}</div>
  1273. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程简要描述-引用按钮')"></el-switch>
  1274. </div>
  1275. </div>
  1276. </div>
  1277. </div>
  1278. </div>
  1279. </div>
  1280. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(isuseT === 1)">
  1281. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1282. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1283. 课程概况<span class="inter_setting" @click="openInterPanSetting"></span>
  1284. <div class="inter_setting_panel" v-show="interSetting">
  1285. <div class="panel_title">配置工作流</div>
  1286. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1287. <div class="panel_input">
  1288. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : '请输入agentid'" class="binfo_input" v-model="agentid"/>
  1289. </div>
  1290. <div class="panel_button">
  1291. <button class="c_pub_button_confirm" @click="setAgentid">确认</button>
  1292. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">复原</button>
  1293. <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
  1294. </div>
  1295. </div>
  1296. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1297. </div>
  1298. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1299. <div class="inter_box" v-show="interPan">
  1300. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl" frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  1301. </div>
  1302. <div style="width: calc(100%);height: 100%" class='op_task_box' :class="{inter_Detailbox: !courseTextB && interPan}">
  1303. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  1304. placeholder="请输入课程简要描述" v-if="courseTextB && interPan"></textarea>
  1305. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1306. placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan"></textarea>
  1307. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-else-if="textLoading"></div>
  1308. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-html="MarkdownT(courseText)" v-else></div>
  1309. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1310. <div class="op_remark"></div>
  1311. <div class="op_box_right">
  1312. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1313. <div class="r_pub_button_op"
  1314. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1315. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1316. </el-tooltip> -->
  1317. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程概况-确定/编辑按钮')">{{ courseTextB ? '确定' : '编辑'}}</div>
  1318. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程概况-引用按钮')"></el-switch>
  1319. </div>
  1320. </div>
  1321. </div>
  1322. </div>
  1323. </div>
  1324. </div>
  1325. <div class="whiteBg" :style="{ minHeight: targetTextLoading2 ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2" element-loading-text="小可正在努力生成中,请稍等..." v-if="((!(isuseT === true) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1326. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2" @click="cancelAjax('target2')">停止</div>
  1327. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1328. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  1329. 课程目标
  1330. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1331. 上传补充资料
  1332. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1333. beforeUploadInfo2(
  1334. $event,
  1335. 16
  1336. )
  1337. " />
  1338. </button>
  1339. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  1340. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1341. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1342. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  1343. </el-tooltip>
  1344. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1345. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1346. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '右键课程目标-生成目标按钮')"
  1347. @click="openAiDialog(2, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '点击课程目标-生成目标按钮')">生成目标</button>
  1348. </el-tooltip>
  1349. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1350. <div class="add_chapters_box add_c_none" v-if="
  1351. mubiaoInfoData &&
  1352. mubiaoInfoData.length == 0
  1353. ">
  1354. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1355. <span>暂时还没有内容,快去添加吧</span>
  1356. </div>
  1357. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1358. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1359. getChapterData(
  1360. $event,
  1361. index1,
  1362. item1.type
  1363. )
  1364. " >
  1365. <div class="chapter_upload_o" style="
  1366. position: relative;
  1367. display: flex;
  1368. align-items: center;
  1369. ">
  1370. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1371. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1372. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1373. </div>
  1374. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1375. </div>
  1376. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1377. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1378. </div>
  1379. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1380. </div>
  1381. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1382. </div>
  1383. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1384. </div>
  1385. </div>
  1386. <div class="chapter_upload_n">
  1387. <input readonly="true" v-if="
  1388. item1.type == 2 ||
  1389. item1.type == 3 ||
  1390. item1.type == 12 ||
  1391. item1.type == 13 ||
  1392. item1.type == 7
  1393. " :placeholder="item1.name" @click.stop="
  1394. checkChpater3($event, index1, item1)
  1395. " style="
  1396. border: none;
  1397. outline: none;
  1398. width: 80%;
  1399. minwidth: 215px;
  1400. z-index: 99;
  1401. font-size: 14px;
  1402. white-space: nowrap;
  1403. overflow: hidden;
  1404. text-overflow: ellipsis;
  1405. " />
  1406. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1407. border: none;
  1408. outline: none;
  1409. width: 80%;
  1410. white-space: nowrap;
  1411. overflow: hidden;
  1412. text-overflow: ellipsis;
  1413. " readonly="true" @click="
  1414. selectAttText(index1)
  1415. " />
  1416. <input :placeholder="item1.title ? item1.title : '链接'
  1417. " v-if="item1.type == 8" style="
  1418. border: none;
  1419. outline: none;
  1420. width: 80%;
  1421. white-space: nowrap;
  1422. overflow: hidden;
  1423. text-overflow: ellipsis;
  1424. " readonly="true" @click="selectLine(index1)" />
  1425. <input :placeholder="item1.title ? item1.title : '链接'
  1426. " v-if="item1.type == 14" style="
  1427. border: none;
  1428. outline: none;
  1429. width: 80%;
  1430. white-space: nowrap;
  1431. overflow: hidden;
  1432. text-overflow: ellipsis;
  1433. " readonly="true" @click="
  1434. openUpdateSource(index1)
  1435. " />
  1436. </div>
  1437. <div class="chapter_upload_ic">
  1438. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1439. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1440. checkChpater3($event, index1, item1)
  1441. ">
  1442. <div></div>
  1443. </div>
  1444. <div class="chapter_upload_ic_r" @click.stop="
  1445. deletemubiaoInfoData(
  1446. $event,
  1447. index1
  1448. )
  1449. ">
  1450. <div></div>
  1451. </div>
  1452. </div>
  1453. </div>
  1454. </div>
  1455. </div>
  1456. </div>
  1457. <div v-if="
  1458. mubiaoinfoproVisible
  1459. " class="mask">
  1460. <div class="progressBox">
  1461. <div class="lbox">
  1462. <img src="../../../assets/loading.gif" />上传中,请稍后
  1463. </div>
  1464. <div style="margin-bottom: 10px">
  1465. <span>{{
  1466. mubiaoinfoisFinishSize
  1467. }}</span>
  1468. /
  1469. <span>{{
  1470. mubiaoinfoisAllSize
  1471. }}</span>
  1472. </div>
  1473. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1474. ? mubiaoinfoprogress
  1475. : 0
  1476. " style="width: 80%"></el-progress> -->
  1477. </div>
  1478. </div>
  1479. </div>
  1480. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1481. <div style="width: calc(100%);" class='op_task_box'>
  1482. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  1483. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  1484. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  1485. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1486. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail2']}">
  1487. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1488. <div class="op_box_right">
  1489. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1490. <div class="r_pub_button_op"
  1491. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  1492. @click="openAiDialog(2, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">智能优化</div>
  1493. </el-tooltip>
  1494. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1495. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aitargetTextDetail2'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  1496. </div>
  1497. </div>
  1498. </div>
  1499. </div>
  1500. </div>
  1501. </div>
  1502. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  1503. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1504. <div class="c_info_title">
  1505. 补充资料
  1506. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1507. </div>
  1508. <div class="buchong_box">
  1509. <span>暂时还没有内容,快去添加吧~</span>
  1510. </div>
  1511. </div> -->
  1512. <div style="position: relative;
  1513. background: #fff;
  1514. box-sizing: border-box;
  1515. padding: 1px 20px 10px;
  1516. width: 100%;
  1517. border-radius: 10px;">
  1518. <div style="
  1519. display: flex;
  1520. flex-direction: row;
  1521. justify-content: space-between;
  1522. align-items: center;
  1523. " :style="{
  1524. margin: true
  1525. ? '20px 0 10px'
  1526. : '20px 0 0',
  1527. }">
  1528. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1529. 补充资料
  1530. <div class="add_info_box" style="margin: 0 0 0 auto">
  1531. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1532. 上传补充资料
  1533. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1534. beforeUploadInfo2(
  1535. $event,
  1536. 13
  1537. )
  1538. " />
  1539. </button>
  1540. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1541. 图文
  1542. </button>
  1543. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1544. 链接
  1545. </button>
  1546. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1547. 代码
  1548. </button>
  1549. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1550. 资源
  1551. </button> -->
  1552. </div>
  1553. </div>
  1554. </div>
  1555. <div>
  1556. <div class="add_chapters_box add_c_none" v-if="
  1557. infoData &&
  1558. infoData.length == 0
  1559. ">
  1560. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1561. <span>暂时还没有内容,快去添加吧</span>
  1562. </div>
  1563. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1564. <div @dragstart="
  1565. dragStart(item1, index1, 0)
  1566. " @dragover.prevent="
  1567. dragOver(index1, 0)
  1568. " @dragend="dragEnd()" :draggable="isdrag ==
  1569. 'chapter-' + 0 + '-' + index1
  1570. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1571. getChapterData(
  1572. $event,
  1573. index1,
  1574. item1.type
  1575. )
  1576. " :class="{
  1577. dragOverTop2:
  1578. newIndex === index1 &&
  1579. typeIndex ==
  1580. 'chapter-' +
  1581. 0 +
  1582. '-' +
  1583. index1 &&
  1584. oldIndex > index1 &&
  1585. dragType == 'drag',
  1586. dragOverBottom2:
  1587. newIndex === index1 &&
  1588. typeIndex ==
  1589. 'chapter-' +
  1590. 0 +
  1591. '-' +
  1592. index1 &&
  1593. oldIndex < index1 &&
  1594. dragType == 'drag',
  1595. }">
  1596. <!-- <div @mousedown="
  1597. isdrag =
  1598. 'chapter-' + 0 + '-' + index1
  1599. " @mouseup="isdrag = ''" @touchstart="
  1600. isdrag =
  1601. 'chapter-' + 0 + '-' + index1
  1602. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1603. <div class="chapter_upload_o" style="
  1604. position: relative;
  1605. display: flex;
  1606. align-items: center;
  1607. ">
  1608. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1609. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1610. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1611. </div>
  1612. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1613. </div>
  1614. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1615. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1616. </div>
  1617. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1618. </div>
  1619. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1620. </div>
  1621. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1622. </div>
  1623. </div>
  1624. <div class="chapter_upload_n">
  1625. <input readonly="true" v-if="
  1626. item1.type == 2 ||
  1627. item1.type == 3 ||
  1628. item1.type == 12 ||
  1629. item1.type == 13 ||
  1630. item1.type == 7
  1631. " :placeholder="item1.name" @click="
  1632. updataVideoT(
  1633. $event,
  1634. index1
  1635. )
  1636. " style="
  1637. border: none;
  1638. outline: none;
  1639. width: 80%;
  1640. minwidth: 215px;
  1641. z-index: 99;
  1642. font-size: 14px;
  1643. white-space: nowrap;
  1644. overflow: hidden;
  1645. text-overflow: ellipsis;
  1646. " />
  1647. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1648. border: none;
  1649. outline: none;
  1650. width: 80%;
  1651. white-space: nowrap;
  1652. overflow: hidden;
  1653. text-overflow: ellipsis;
  1654. " readonly="true" @click="
  1655. selectAttText(index1)
  1656. " />
  1657. <input :placeholder="item1.title ? item1.title : '链接'
  1658. " v-if="item1.type == 8" style="
  1659. border: none;
  1660. outline: none;
  1661. width: 80%;
  1662. white-space: nowrap;
  1663. overflow: hidden;
  1664. text-overflow: ellipsis;
  1665. " readonly="true" @click="selectLine(index1)" />
  1666. <input :placeholder="item1.title ? item1.title : '链接'
  1667. " v-if="item1.type == 14" style="
  1668. border: none;
  1669. outline: none;
  1670. width: 80%;
  1671. white-space: nowrap;
  1672. overflow: hidden;
  1673. text-overflow: ellipsis;
  1674. " readonly="true" @click="
  1675. openUpdateSource(index1)
  1676. " />
  1677. </div>
  1678. <div class="chapter_upload_ic">
  1679. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1680. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1681. <div class="chapter_upload_up" @click="
  1682. upCd(
  1683. $event,
  1684. index1
  1685. )
  1686. "></div>
  1687. <div class="chapter_upload_down" @click="
  1688. downCd(
  1689. $event,
  1690. index1
  1691. )
  1692. "></div>
  1693. </div>
  1694. <div class="chapter_upload_ic_edit" v-if="
  1695. item1.type == 2 ||
  1696. item1.type == 3 ||
  1697. item1.type == 12 ||
  1698. item1.type == 13 ||
  1699. item1.type == 7
  1700. " @click.stop="
  1701. updataVideoT(
  1702. $event,
  1703. index1
  1704. )
  1705. ">
  1706. <div></div>
  1707. </div>
  1708. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1709. selectAttText(index1)
  1710. ">
  1711. <div></div>
  1712. </div>
  1713. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1714. @click="selectLine(index1)">
  1715. <div></div>
  1716. </div>
  1717. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1718. openUpdateSource(index1)
  1719. ">
  1720. <div></div>
  1721. </div> -->
  1722. <div class="chapter_upload_ic_r" @click.stop="
  1723. deleteInfoData(
  1724. $event,
  1725. index1
  1726. )
  1727. ">
  1728. <div></div>
  1729. </div>
  1730. </div>
  1731. </div>
  1732. </div>
  1733. </div>
  1734. </div>
  1735. <div v-if="
  1736. infoproVisible
  1737. " class="mask">
  1738. <div class="progressBox">
  1739. <!-- <div id="closePro" class="closeCss">
  1740. <img src="../../../../assets/icon/close.png" alt />
  1741. </div> -->
  1742. <div class="lbox">
  1743. <img src="../../../assets/loading.gif" />上传中,请稍后
  1744. </div>
  1745. <div style="margin-bottom: 10px">
  1746. <span>{{
  1747. infoisFinishSize
  1748. }}M</span>
  1749. /
  1750. <span>{{
  1751. infoisAllSize
  1752. }}M</span>
  1753. </div>
  1754. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1755. ? infoprogress
  1756. : 0
  1757. " style="width: 80%"></el-progress>
  1758. </div>
  1759. </div>
  1760. </div>
  1761. </div>
  1762. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1763. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1764. <div class="c_info_title">
  1765. 补充描述
  1766. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1767. </div>
  1768. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1769. <div style="width: calc(100%)">
  1770. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1771. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1772. </div>
  1773. </div>
  1774. </div>
  1775. </div>
  1776. <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">
  1777. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1778. <div class="c_info_title">
  1779. 课程大纲
  1780. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1781. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1782. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1783. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1784. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1785. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1786. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1787. </el-tooltip>
  1788. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1789. @click="openAiDialog2(2, 'aiOutline'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1790. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1791. @click="openAiDialog2(2, 'aiOutline2'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1792. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1793. </div>
  1794. <div class="task_outline">
  1795. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1796. <div class="outline_task">
  1797. <div class="title">任务{{ index + 1 }}</div>
  1798. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1799. v-model="item.task" />
  1800. <div class="outline_btn">
  1801. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1802. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)" @click="openAiDialog(2, 'aiOutlineDetail2', index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-${item.taskDetail2 ? '重新生成任务' : '生成任务'}按钮`)">{{ item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  1803. </el-tooltip>
  1804. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在上面加入一个任务按钮`)">在上面加入一个任务</button>
  1805. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在下面加入一个任务按钮`)">在下面加入一个任务</button>
  1806. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="deleteTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-删除按钮`)" v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  1807. </div>
  1808. </div>
  1809. <div class="outline_detail" :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1810. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]" @click="cancelAjax('outlineTask', index)">停止</div>
  1811. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1812. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1813. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1814. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1815. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail1-'+index]}">
  1816. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1817. <div class="op_box_right">
  1818. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1819. <div class="r_pub_button_op"
  1820. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `右键课程大纲-任务${index + 1}-智能优化按钮`)"
  1821. @click="openAiDialog(2, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-智能优化按钮`)">智能优化</div>
  1822. </el-tooltip>
  1823. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-确定/编辑按钮`)">{{
  1824. item.isTask2 ? '确定' : '编辑'}}</div>
  1825. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail1-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail1-'+index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-引用按钮`)"></el-switch>
  1826. </div>
  1827. </div>
  1828. </div>
  1829. </div>
  1830. </div>
  1831. </div>
  1832. </div>
  1833. <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)">
  1834. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1835. <div class="c_info_title">
  1836. 概念群
  1837. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1838. @click="openAiDialog2(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-重新生成概念群按钮`)">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1839. </div>
  1840. <div class="task_outline">
  1841. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1842. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1843. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1844. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1845. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1846. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote1']}">
  1847. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1848. <div class="op_box_right">
  1849. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1850. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1'), addCourseBehavior('courseBehavior', `右键概念群-智能优化按钮`)"
  1851. @click="openAiDialog(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-智能优化按钮`)">智能优化</div>
  1852. </el-tooltip>
  1853. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s'), addCourseBehavior('courseBehavior', `点击概念群-确定/编辑按钮`)">{{
  1854. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1855. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote1']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-引用按钮`)"></el-switch>
  1856. </div>
  1857. </div>
  1858. </div>
  1859. </div>
  1860. </div>
  1861. </div>
  1862. <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)">
  1863. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1864. <div class="c_info_title">
  1865. 问题链
  1866. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1867. @click="openAiDialog2(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-重新生成问题链按钮`)">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1868. </div>
  1869. <div class="task_outline">
  1870. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1871. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1872. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1873. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1874. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1875. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote2']}">
  1876. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1877. <div class="op_box_right">
  1878. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1879. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2'), addCourseBehavior('courseBehavior', `右键问题链-智能优化按钮`)"
  1880. @click="openAiDialog(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-智能优化按钮`)">智能优化</div>
  1881. </el-tooltip>
  1882. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s'), addCourseBehavior('courseBehavior', `点击问题链-确定/编辑按钮`)">{{
  1883. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1884. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-引用按钮`)"></el-switch>
  1885. </div>
  1886. </div>
  1887. </div>
  1888. </div>
  1889. </div>
  1890. </div>
  1891. <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)">
  1892. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1893. <div class="c_info_title">
  1894. 目标层
  1895. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1896. @click="openAiDialog2(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-重新生成目标层按钮`)">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1897. </div>
  1898. <div class="task_outline">
  1899. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1900. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1901. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1902. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1903. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1904. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote3']}">
  1905. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1906. <div class="op_box_right">
  1907. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1908. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3'), addCourseBehavior('courseBehavior', `右键目标层-智能优化按钮`)"
  1909. @click="openAiDialog(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-智能优化按钮`)">智能优化</div>
  1910. </el-tooltip>
  1911. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s'), addCourseBehavior('courseBehavior', `点击目标层-确定/编辑按钮`)">{{
  1912. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1913. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote3']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-引用按钮`)"></el-switch>
  1914. </div>
  1915. </div>
  1916. </div>
  1917. </div>
  1918. </div>
  1919. </div>
  1920. <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)">
  1921. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1922. <div class="c_info_title">
  1923. 任务簇
  1924. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1925. @click="openAiDialog2(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-重新生成任务簇按钮`)">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1926. </div>
  1927. <div class="task_outline">
  1928. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1929. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1930. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1931. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1932. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1933. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote4']}">
  1934. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1935. <div class="op_box_right">
  1936. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1937. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4'), addCourseBehavior('courseBehavior', `右键任务簇-智能优化按钮`)"
  1938. @click="openAiDialog(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-智能优化按钮`)">智能优化</div>
  1939. </el-tooltip>
  1940. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s'), addCourseBehavior('courseBehavior', `点击任务簇-确定/编辑按钮`)">{{
  1941. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1942. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote4']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-引用按钮`)"></el-switch>
  1943. </div>
  1944. </div>
  1945. </div>
  1946. </div>
  1947. </div>
  1948. </div>
  1949. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1950. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1951. <div class="c_info_title">
  1952. 教案
  1953. <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'">
  1954. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1955. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1956. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1957. </el-tooltip>
  1958. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1959. @click="openAiDialog2(2, 'aiTeacher2'), addCourseBehavior('courseBehavior', `点击教案-重新生成教案按钮`)" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1960. <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')">
  1961. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1962. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1963. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1964. </el-tooltip>
  1965. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1966. </div>
  1967. <div class="task_outline">
  1968. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1969. <div class="outline_task">
  1970. <div class="title">任务{{ index + 1 }}</div>
  1971. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1972. v-model="item.task" />
  1973. </div>
  1974. <div class="outline_detail" :style="{ minHeight: taskDetailLoading5.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1975. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading5.indexOf('task-' + index) !== -1" @click="cancelAjax('teacherDetail2', index)">停止</div>
  1976. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1977. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1978. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1979. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1980. <div class="op_box" :class="{op_box_isquote: isQuote['teacherDetail2-'+index]}">
  1981. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1982. <div class="op_box_right">
  1983. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1984. <div class="r_pub_button_op"
  1985. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `右键教案-任务${index + 1}-智能优化按钮`)"
  1986. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-智能优化按钮`)">智能优化</div>
  1987. </el-tooltip>
  1988. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1989. item.isTask3 ? '确定' : '编辑'}}</div>
  1990. <el-switch style="margin-left: 10px" v-model="isQuote['teacherDetail2-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('teacherDetail2-'+index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-引用按钮`)"></el-switch>
  1991. </div>
  1992. </div>
  1993. </div>
  1994. </div>
  1995. </div>
  1996. </div>
  1997. </div>
  1998. <div class="info_btnBox3" v-if="istemplate != 1">
  1999. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2000. goTo(
  2001. '/course?userid=' +
  2002. userid +
  2003. '&oid=' +
  2004. oid +
  2005. '&org=' +
  2006. org +
  2007. '&role=' +
  2008. role
  2009. )
  2010. ">
  2011. 返回课程
  2012. </button>
  2013. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2014. {{ steps == 4 ? "返回课程" : "上一步" }}
  2015. </button>
  2016. <button class="c_pub_button_confirm" v-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" @click="clickGenTT2">
  2017. {{isuseT === true ? "重新生成概况和目标" : "生成概况和目标"}}
  2018. </button>
  2019. <button class="c_pub_button_confirm" v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  2020. {{isuseT === true ? "重新生成概况" : "生成概况"}}
  2021. </button>
  2022. <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
  2023. {{ "导出教案" }}
  2024. </button>
  2025. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  2026. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  2027. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  2028. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  2029. pub_btn_next_img: steps != 3,
  2030. pub_btn_finish_img: steps == 3,
  2031. }">
  2032. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  2033. </button>
  2034. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  2035. @contextmenu.prevent="nextSteps(1)" :class="{
  2036. pub_btn_next_img: steps != 3,
  2037. pub_btn_finish_img: steps == 3,
  2038. }">
  2039. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  2040. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  2041. : "下一步" }}
  2042. </button>
  2043. </el-tooltip>
  2044. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  2045. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  2046. pub_btn_next_img: steps != 3,
  2047. pub_btn_finish_img: steps == 3,
  2048. }">下一步2</button>
  2049. </el-tooltip> -->
  2050. </div>
  2051. </div>
  2052. <div class="rightBox" v-if="steps == 2" :style="{
  2053. height:
  2054. !isStepDisplay && !isBtnDisplay
  2055. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  2056. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2057. }">
  2058. <div class="basic_box" style="
  2059. padding: 20px 30px 0px !important;
  2060. box-sizing: border-box;
  2061. height: calc(100% - 80px);
  2062. overflow: auto;
  2063. background: #fff;
  2064. ">
  2065. <!-- <div
  2066. style="
  2067. color: #b8b8b8;
  2068. background: #fff;
  2069. width: 26%;
  2070. height: 40px;
  2071. border-radius: 15px;
  2072. padding-left: 20px;
  2073. line-height: 40px;
  2074. font-size: 17px;
  2075. box-shadow: 0px 1px 2px 2px #e0e0e0;
  2076. "
  2077. >-->
  2078. <div class="right_title" style="border: none; margin: 0; padding: 0">
  2079. 请选择合适的课程模板
  2080. </div>
  2081. <div class="wordbox">
  2082. <div class="wordTeacher" @click="checkTemplate2()">
  2083. <div class="wordPic">
  2084. <img src="../../../assets/icon/new/template_none.png" alt />
  2085. </div>
  2086. <div style="
  2087. margin-top: 10px;
  2088. line-height: 19px;
  2089. overflow: hidden;
  2090. text-overflow: ellipsis;
  2091. white-space: nowrap;
  2092. padding: 0 20px;
  2093. ">
  2094. 空白模板
  2095. </div>
  2096. </div>
  2097. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  2098. <div class="wordPic">
  2099. <img src="../../../assets/icon/new/template.png" alt />
  2100. </div>
  2101. <div style="
  2102. margin-top: 10px;
  2103. line-height: 19px;
  2104. overflow: hidden;
  2105. text-overflow: ellipsis;
  2106. white-space: nowrap;
  2107. padding: 0 20px;
  2108. ">
  2109. {{ aa.title }}
  2110. </div>
  2111. </div>
  2112. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  2113. <div class="wordPic">
  2114. <img src="../../../assets/icon/new/template.png" alt />
  2115. </div>
  2116. <div style="
  2117. margin-top: 10px;
  2118. line-height: 19px;
  2119. overflow: hidden;
  2120. text-overflow: ellipsis;
  2121. white-space: nowrap;
  2122. padding: 0 20px;
  2123. ">
  2124. 简易模板
  2125. </div>
  2126. </div>
  2127. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  2128. <div class="wordPic">
  2129. <img src="../../../assets/icon/new/template.png" alt />
  2130. </div>
  2131. <div style="
  2132. margin-top: 10px;
  2133. line-height: 19px;
  2134. overflow: hidden;
  2135. text-overflow: ellipsis;
  2136. white-space: nowrap;
  2137. padding: 0 20px;
  2138. ">
  2139. 智能粘贴模式
  2140. </div>
  2141. </div>
  2142. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  2143. <div class="wordPic">
  2144. <img src="../../../assets/icon/wordMub.png" alt />
  2145. </div>
  2146. <div style="
  2147. margin-top: 10px;
  2148. line-height: 19px;
  2149. overflow: hidden;
  2150. text-overflow: ellipsis;
  2151. white-space: nowrap;
  2152. padding: 0 20px;
  2153. ">
  2154. 未来小学课程设计
  2155. </div>
  2156. </div> -->
  2157. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  2158. <div class="wordPic">
  2159. <img src="../../../assets/icon/wordMub.png" alt />
  2160. </div>
  2161. <div style="
  2162. margin-top: 10px;
  2163. line-height: 19px;
  2164. overflow: hidden;
  2165. text-overflow: ellipsis;
  2166. white-space: nowrap;
  2167. padding: 0 20px;
  2168. ">
  2169. 我的课程
  2170. </div>
  2171. </div> -->
  2172. </div>
  2173. </div>
  2174. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  2175. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2176. goTo(
  2177. '/course?userid=' +
  2178. userid +
  2179. '&oid=' +
  2180. oid +
  2181. '&org=' +
  2182. org +
  2183. '&role=' +
  2184. role
  2185. )
  2186. ">
  2187. 返回课程
  2188. </button>
  2189. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2190. {{ steps == 4 ? "返回课程" : "上一步" }}
  2191. </button>
  2192. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  2193. pub_btn_next_img: steps != 3,
  2194. pub_btn_finish_img: steps == 3,
  2195. }">
  2196. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  2197. </button>
  2198. </div>
  2199. </div>
  2200. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  2201. height:
  2202. !isStepDisplay && !isBtnDisplay
  2203. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  2204. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2205. }">
  2206. <div class="rb_c_box">
  2207. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  2208. <div class="rb_c_nav">
  2209. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  2210. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  2211. </div>
  2212. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  2213. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  2214. position: istemplate == 1 ? 'sticky' : 'unset',
  2215. top: istemplate == 1 ? '0' : 'unset'
  2216. }">
  2217. <!-- <div class="navTop">辅助导航</div> -->
  2218. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  2219. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  2220. <div class="nt_taskBox" style="width: 100%;">
  2221. <div class="nt_taskTitle"
  2222. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  2223. unitIndex + 1 }}</div>
  2224. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  2225. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  2226. <span>{{ unitJson[unitIndex].dyName }}</span>
  2227. </el-tooltip>
  2228. </div>
  2229. </div>
  2230. </div> -->
  2231. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  2232. .taskJson" :key="tIndex" :class="{
  2233. dragOverTop:
  2234. newIndex === tIndex &&
  2235. typeIndex == 'task-' + tIndex &&
  2236. oldIndex > tIndex &&
  2237. dragType == 'task',
  2238. dragOverBottom:
  2239. newIndex === tIndex &&
  2240. typeIndex == 'task-' + tIndex &&
  2241. oldIndex < tIndex &&
  2242. dragType == 'task',
  2243. }">
  2244. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  2245. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  2246. class="navTask" :class="{
  2247. isNavTask:
  2248. isClickColor > 0 && isClickColor == tIndex + 1,
  2249. isNavOpen: t.toolOpen,
  2250. }">
  2251. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  2252. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  2253. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  2254. class="chapter_upload_drag"></div>
  2255. <div class="nt_taskBox">
  2256. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  2257. <div class="nt_taskName">
  2258. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2259. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  2260. </el-tooltip>
  2261. </div>
  2262. </div>
  2263. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  2264. 1
  2265. ">
  2266. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  2267. @click.stop="taskMove(1, tIndex)"></div>
  2268. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  2269. @click.stop="taskMove(2, tIndex)"></div>
  2270. </div> -->
  2271. </div>
  2272. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2273. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2274. @click="jumpGj(tIndex, toolIndex2)">
  2275. <div class="gjCss" :class="{
  2276. isGjCss:
  2277. toolIndexType == `gj${tIndex}${toolIndex2}`,
  2278. }">
  2279. <div>工具{{ toolIndex2 + 1 }}:</div>
  2280. <div>
  2281. {{
  2282. toolsData[tool.tool[0]] &&
  2283. toolsData[tool.tool[0]].name
  2284. }}
  2285. </div>
  2286. </div>
  2287. </div>
  2288. </div>
  2289. </div>
  2290. </div>
  2291. <div class="navBottom" v-if="courseState == 1">
  2292. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  2293. dragOverTop:
  2294. newIndex === stageIndex &&
  2295. typeIndex == 'Unit-' + stageIndex &&
  2296. oldIndex > stageIndex &&
  2297. dragType == 'Unit',
  2298. dragOverBottom:
  2299. newIndex === stageIndex &&
  2300. typeIndex == 'Unit-' + stageIndex &&
  2301. oldIndex < stageIndex &&
  2302. dragType == 'Unit',
  2303. }">
  2304. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  2305. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  2306. @click="unitSet2(stageIndex)" class="navStage" :class="{
  2307. isNavStage: stageIndex == unitIndex,
  2308. isNavStageOpen: stage.toolOpen,
  2309. }">
  2310. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  2311. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  2312. class="chapter_upload_drag"></div>
  2313. <div class="nt_taskBox">
  2314. <div class="nt_taskTitle">
  2315. 第{{ stageIndex + 1 }}阶段:
  2316. </div>
  2317. <div class="nt_taskName">
  2318. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  2319. " placement="top">
  2320. <span>{{
  2321. stage.dyName ? stage.dyName : "未命名阶段"
  2322. }}</span>
  2323. </el-tooltip>
  2324. </div>
  2325. </div>
  2326. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  2327. </div>
  2328. <div v-for="(t, tIndex) in unitJson[stageIndex]
  2329. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  2330. dragOverTop:
  2331. newIndex === tIndex &&
  2332. typeIndex == 'task-' + tIndex &&
  2333. ((oldIndex > tIndex &&
  2334. stageIndex == checkUnitIndex) ||
  2335. (oldIndex == tIndex &&
  2336. stageIndex == checkUnitIndex &&
  2337. checkUnitIndex != oldUnitIndex)) &&
  2338. dragType == 'task',
  2339. dragOverBottom:
  2340. newIndex === tIndex &&
  2341. typeIndex == 'task-' + tIndex &&
  2342. oldIndex < tIndex &&
  2343. stageIndex == checkUnitIndex &&
  2344. dragType == 'task',
  2345. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2346. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2347. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2348. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2349. isNavTask:
  2350. isClickColor > 0 &&
  2351. isClickColor == tIndex + 1 &&
  2352. stageIndex == unitIndex,
  2353. isNavOpen: t.toolOpen,
  2354. }">
  2355. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2356. <div @mousedown="
  2357. isdrag = 'task-' + stageIndex + '-' + tIndex
  2358. " @mouseup="isdrag = ''" @touchstart="
  2359. isdrag = 'task-' + stageIndex + '-' + tIndex
  2360. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2361. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2362. <div class="nt_taskTitle">
  2363. 任务{{ tIndex + 1 }}:
  2364. </div>
  2365. <div class="nt_taskName">
  2366. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2367. <span>{{
  2368. t.task ? t.task : "未命名任务"
  2369. }}</span>
  2370. </el-tooltip>
  2371. </div>
  2372. </div>
  2373. </div>
  2374. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2375. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2376. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2377. <div class="gjCss" :class="{
  2378. isGjCss:
  2379. toolIndexType ==
  2380. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2381. }">
  2382. <div>工具{{ toolIndex2 + 1 }}:</div>
  2383. <div>
  2384. {{
  2385. toolsData[tool.tool[0]] &&
  2386. toolsData[tool.tool[0]].name
  2387. }}
  2388. </div>
  2389. </div>
  2390. </div>
  2391. </div>
  2392. </div>
  2393. </div>
  2394. </div>
  2395. </div>
  2396. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2397. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2398. </div>
  2399. </div>
  2400. <div class="rb_c_box_right">
  2401. <!-- <div class="rb_c_box_btn">
  2402. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  2403. </div> -->
  2404. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2405. <div v-if="false" style="
  2406. display: flex;
  2407. flex-direction: row;
  2408. align-items: center;
  2409. position: sticky;
  2410. top: 0;
  2411. z-index: 99;
  2412. width: 100%;
  2413. padding: 0 20px 0 20px;
  2414. box-sizing: border-box;
  2415. background: #fff;
  2416. border-radius: 8px;
  2417. ">
  2418. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2419. <div class="cru_selectBox" :style="{
  2420. maxWidth: isPasteTask
  2421. ? 'calc(100% - 335px)'
  2422. : 'calc(100% - 190px)',
  2423. }" v-if="courseState == 1">
  2424. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2425. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2426. <!-- item.dyName ? item.dyName : -->
  2427. <span v-if="
  2428. unitJson[unitJson.length - 1].easy == 4 ||
  2429. unitJson[unitJson.length - 1].easy == 6
  2430. ">{{
  2431. item.dyName
  2432. ? item.dyName
  2433. : "第" + (index + 1) + "阶段"
  2434. }}</span>
  2435. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2436. </div>
  2437. <div class="cru_line" :style="{
  2438. left: offsetLetfPx + 'px',
  2439. }"></div>
  2440. </div>
  2441. <div class="addStageImg" @click="addunit()" v-if="
  2442. !(unitJson[unitJson.length - 1].easy == 4) &&
  2443. !(unitJson[unitJson.length - 1].easy == 6) &&
  2444. courseState == 1
  2445. ">
  2446. <img src="../../../assets/icon/new/addStage.png" alt />
  2447. </div>
  2448. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2449. v-if="courseState == 2" style="margin: 15px 0">
  2450. 新建阶段
  2451. </button>
  2452. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2453. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2454. 阶段顺序
  2455. </button>
  2456. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2457. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2458. 智能粘贴
  2459. </button>
  2460. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2461. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2462. }" style="padding: 0 12px">
  2463. 选择课程模板
  2464. </button>
  2465. </div>
  2466. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2467. :key="index">
  2468. <div v-if="courseState == 4" style="position: relative;
  2469. background: #fff;
  2470. box-sizing: border-box;
  2471. padding: 1px 20px 10px;
  2472. width: 100%;
  2473. border-radius: 10px;">
  2474. <div style="
  2475. display: flex;
  2476. flex-direction: row;
  2477. justify-content: space-between;
  2478. align-items: center;
  2479. " :style="{
  2480. margin: !item.taskJson[0].isFoldchapter
  2481. ? '20px 0 10px'
  2482. : '20px 0 0',
  2483. }">
  2484. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2485. 学习内容
  2486. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2487. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2488. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2489. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2490. </el-tooltip>
  2491. </div>
  2492. </div>
  2493. <div>
  2494. <div class="add_chapters_box add_c_none" v-if="
  2495. item.taskJson[0].chapterData &&
  2496. item.taskJson[0].chapterData.length == 0
  2497. ">
  2498. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  2499. <span>请添加学习内容</span>
  2500. </div>
  2501. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2502. <div @dragstart="
  2503. dragStart(item1, index1, 0)
  2504. " @dragover.prevent="
  2505. dragOver(index1, 0)
  2506. " @dragend="dragEnd()" :draggable="isdrag ==
  2507. 'chapter-' + 0 + '-' + index1
  2508. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2509. :key="item1.id" @click="
  2510. getChapterData(
  2511. $event,
  2512. unitIndex,
  2513. index,
  2514. index1,
  2515. item1.type
  2516. )
  2517. " :class="{
  2518. dragOverTop2:
  2519. newIndex === index1 &&
  2520. typeIndex ==
  2521. 'chapter-' +
  2522. 0 +
  2523. '-' +
  2524. index1 &&
  2525. oldIndex > index1 &&
  2526. dragType == 'drag',
  2527. dragOverBottom2:
  2528. newIndex === index1 &&
  2529. typeIndex ==
  2530. 'chapter-' +
  2531. 0 +
  2532. '-' +
  2533. index1 &&
  2534. oldIndex < index1 &&
  2535. dragType == 'drag',
  2536. }">
  2537. <div @mousedown="
  2538. isdrag =
  2539. 'chapter-' + 0 + '-' + index1
  2540. " @mouseup="isdrag = ''" @touchstart="
  2541. isdrag =
  2542. 'chapter-' + 0 + '-' + index1
  2543. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2544. <div class="chapter_upload_o" style="
  2545. position: relative;
  2546. display: flex;
  2547. align-items: center;
  2548. ">
  2549. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2550. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2551. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2552. </div>
  2553. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2554. </div>
  2555. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2556. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2557. </div>
  2558. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2559. </div>
  2560. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2561. </div>
  2562. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2563. </div>
  2564. </div>
  2565. <div class="chapter_upload_n">
  2566. <input readonly="true" v-if="
  2567. item1.type == 2 ||
  2568. item1.type == 3 ||
  2569. item1.type == 12 ||
  2570. item1.type == 13 ||
  2571. item1.type == 7
  2572. " :placeholder="item1.name" @click="
  2573. updataVideoT(
  2574. $event,
  2575. unitIndex,
  2576. 0,
  2577. index1
  2578. )
  2579. " style="
  2580. border: none;
  2581. outline: none;
  2582. width: 80%;
  2583. minwidth: 215px;
  2584. z-index: 99;
  2585. font-size: 14px;
  2586. white-space: nowrap;
  2587. overflow: hidden;
  2588. text-overflow: ellipsis;
  2589. " />
  2590. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2591. border: none;
  2592. outline: none;
  2593. width: 80%;
  2594. white-space: nowrap;
  2595. overflow: hidden;
  2596. text-overflow: ellipsis;
  2597. " readonly="true" @click="
  2598. selectAttText(0, index1)
  2599. " />
  2600. <input :placeholder="item1.title ? item1.title : '链接'
  2601. " v-if="item1.type == 8" style="
  2602. border: none;
  2603. outline: none;
  2604. width: 80%;
  2605. white-space: nowrap;
  2606. overflow: hidden;
  2607. text-overflow: ellipsis;
  2608. " readonly="true" @click="selectLine(0, index1)" />
  2609. <input :placeholder="item1.title ? item1.title : '链接'
  2610. " v-if="item1.type == 14" style="
  2611. border: none;
  2612. outline: none;
  2613. width: 80%;
  2614. white-space: nowrap;
  2615. overflow: hidden;
  2616. text-overflow: ellipsis;
  2617. " readonly="true" @click="
  2618. openUpdateSource(0, index1)
  2619. " />
  2620. </div>
  2621. <div class="chapter_upload_ic">
  2622. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2623. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2624. checkChpater( $event, unitIndex, 0, index1 )
  2625. ">
  2626. <div></div>
  2627. </div>
  2628. <div class="chapter_upload_ud" style="z-index: 99">
  2629. <div class="chapter_upload_up" @click="
  2630. upCd(
  2631. $event,
  2632. unitIndex,
  2633. index,
  2634. 0,
  2635. index1
  2636. )
  2637. "></div>
  2638. <div class="chapter_upload_down" @click="
  2639. downCd(
  2640. $event,
  2641. unitIndex,
  2642. index,
  2643. 0,
  2644. index1
  2645. )
  2646. "></div>
  2647. </div>
  2648. <div class="chapter_upload_ic_edit" v-if="
  2649. item1.type == 2 ||
  2650. item1.type == 3 ||
  2651. item1.type == 12 ||
  2652. item1.type == 13 ||
  2653. item1.type == 7
  2654. " @click.stop="
  2655. updataVideoT(
  2656. $event,
  2657. unitIndex,
  2658. 0,
  2659. index1
  2660. )
  2661. ">
  2662. <div></div>
  2663. </div>
  2664. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2665. selectAttText(0, index1)
  2666. ">
  2667. <div></div>
  2668. </div>
  2669. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2670. @click="selectLine(0, index1)">
  2671. <div></div>
  2672. </div>
  2673. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2674. openUpdateSource(0, index1)
  2675. ">
  2676. <div></div>
  2677. </div>
  2678. <div class="chapter_upload_ic_r" @click.stop="
  2679. deleteChapterData(
  2680. $event,
  2681. unitIndex,
  2682. index,
  2683. index1,
  2684. 0
  2685. )
  2686. ">
  2687. <div></div>
  2688. </div>
  2689. </div>
  2690. </div>
  2691. </div>
  2692. </div>
  2693. </div>
  2694. <div class="add_info_box" style="margin: 10px 0 0">
  2695. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2696. 文件
  2697. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2698. beforeUpload2(
  2699. $event,
  2700. unitIndex,
  2701. 13,
  2702. 0
  2703. )
  2704. " />
  2705. </button>
  2706. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2707. 图文
  2708. </button>
  2709. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2710. 链接
  2711. </button>
  2712. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2713. 代码
  2714. </button>
  2715. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2716. 资源
  2717. </button>
  2718. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2719. AI生成PPT
  2720. </button>
  2721. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2722. AI生成教案
  2723. </button>
  2724. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2725. 智能检索视频
  2726. </button>
  2727. </div>
  2728. <div v-if="
  2729. unitJson[unitIndex].chapterInfo[0].taskJson[
  2730. 0
  2731. ].proVisible
  2732. " class="mask">
  2733. <div class="progressBox">
  2734. <!-- <div id="closePro" class="closeCss">
  2735. <img src="../../../../assets/icon/close.png" alt />
  2736. </div> -->
  2737. <div class="lbox">
  2738. <img src="../../../assets/loading.gif" />上传中,请稍后
  2739. </div>
  2740. <div style="margin-bottom: 10px">
  2741. <span>{{
  2742. unitJson[unitIndex].chapterInfo[0].taskJson[
  2743. 0
  2744. ].isFinishSize
  2745. }}</span>
  2746. /
  2747. <span>{{
  2748. unitJson[unitIndex].chapterInfo[0].taskJson[
  2749. 0
  2750. ].isAllSize
  2751. }}</span>
  2752. </div>
  2753. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2754. 0
  2755. ].progress
  2756. ? unitJson[unitIndex].chapterInfo[0]
  2757. .taskJson[0].progress
  2758. : 0
  2759. " style="width: 80%"></el-progress> -->
  2760. </div>
  2761. </div>
  2762. </div>
  2763. <div class="chapter_box" v-if="courseState == 1">
  2764. <div class="chapter_contentbox">
  2765. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2766. <div class="cc_input">
  2767. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2768. v-model="unitJson[unitIndex].dyName" />
  2769. </div>
  2770. <div class="remove" v-if="
  2771. (unitJson.length > 1 || courseState != 2) &&
  2772. !(unitJson[unitJson.length - 1].easy == 4) &&
  2773. !(unitJson[unitJson.length - 1].easy == 6)
  2774. " @click="deleteUnit(unitIndex)"></div>
  2775. </div>
  2776. </div>
  2777. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2778. margin: 50px 0px 10px;
  2779. font-size: 1.5em;
  2780. font-weight: 700;
  2781. color: #0f7eff;
  2782. ">
  2783. 添加任务
  2784. </div> -->
  2785. <div class="taskBorder" :style="{
  2786. minHeight: unitJson[unitIndex].easy && 'unset',
  2787. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2788. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2789. <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
  2790. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" @click="cancelAjax('aiTaskGL1', itemTaskIndex)">停止</div>
  2791. <div class="taskTitle">
  2792. <div style="display: flex;width: 100%;justify-content: space-between;">
  2793. <span>任务{{ itemTaskIndex + 1 }}</span>
  2794. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2795. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2796. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2797. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2798. </el-tooltip> -->
  2799. <div style="display: flex">
  2800. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2801. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2802. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)"
  2803. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)">重新生成任务</button>
  2804. </el-tooltip>
  2805. <button v-if="itemTaskIndex == 0" class="c_pub_button_confirm" style="margin: 0 0 0 20px;" @click="openAiDialog2(2, 'aiTask3','all'), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</button>
  2806. </div>
  2807. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2808. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2809. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  2810. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  2811. </el-tooltip> -->
  2812. </div>
  2813. </div>
  2814. <!-- padding: 20px; -->
  2815. <div v-if="unitJson[unitIndex].easy != 1">
  2816. <div :style="{
  2817. marginBottom:
  2818. unitJson[unitIndex].easy == 3 ||
  2819. (unitJson[unitIndex].easy == 5 &&
  2820. itemTask.taskType == 1)
  2821. ? '75px'
  2822. : '0',
  2823. }">
  2824. <div style="
  2825. display: flex;
  2826. margin: 0px 0 20px;
  2827. flex-direction: row;
  2828. justify-content: flex-start;
  2829. align-items: center;
  2830. ">
  2831. <div class="lineTitle">任务概述</div>
  2832. </div>
  2833. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2834. flex-direction: row;
  2835. justify-content: flex-start;
  2836. align-items: center;
  2837. margin: 0;
  2838. ">
  2839. <!-- <div class="cc_title">
  2840. 任务{{ itemTaskIndex + 1 }}
  2841. </div> -->
  2842. <div class="cc_input">
  2843. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2844. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2845. itemTaskIndex
  2846. ].task
  2847. " />
  2848. </div>
  2849. <div class="remove" v-if="
  2850. item.taskJson.length > 1 &&
  2851. (!unitJson[unitIndex].easy ||
  2852. unitJson[unitIndex].easy == 6)
  2853. " @click="deleteTask(itemTaskIndex)"></div>
  2854. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2855. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2856. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2857. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2858. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2859. </div> -->
  2860. </div>
  2861. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2862. display: flex;
  2863. margin: 20px 0;
  2864. flex-direction: row;
  2865. justify-content: flex-start;
  2866. align-items: center;
  2867. ">
  2868. <div class="lineTitle">任务描述</div>
  2869. </div> && !itemTask.isFold2-->
  2870. <div v-if="
  2871. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2872. -1
  2873. " style="margin-top: 20px" class="op_task_box"
  2874. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2875. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2876. itemTaskIndex
  2877. ].taskDetail
  2878. " @change="change"></editor-bar> -->
  2879. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2880. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2881. itemTaskIndex
  2882. ].taskDetail
  2883. "></textarea>
  2884. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2885. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2886. itemTaskIndex
  2887. ].taskDetail
  2888. "></textarea> -->
  2889. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail2-'+itemTaskIndex]}">
  2890. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2891. <div class="op_box_right">
  2892. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2893. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2894. itemTaskIndex
  2895. ], itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2896. itemTaskIndex
  2897. ], itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)">智能优化</div>
  2898. </el-tooltip>
  2899. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail2-'+itemTaskIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail2-'+itemTaskIndex)"></el-switch>
  2900. </div>
  2901. </div>
  2902. </div>
  2903. </div>
  2904. </div>
  2905. <div
  2906. style="position: relative"
  2907. v-if="courseState == 5"
  2908. >
  2909. <div
  2910. style="
  2911. display: flex;
  2912. flex-direction: row;
  2913. justify-content: space-between;
  2914. align-items: center;
  2915. "
  2916. :style="{
  2917. margin: !itemTask.isFoldchapter
  2918. ? '20px 0 10px'
  2919. : '20px 0 0',
  2920. }"
  2921. >
  2922. <div
  2923. style="margin-bottom: 10px"
  2924. class="lineTitle clineTitle"
  2925. >
  2926. 学习内容
  2927. </div>
  2928. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2929. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2930. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2931. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2932. <!-- <div class="line"></div> -->
  2933. </div>
  2934. <!-- v-if="!itemTask.isFoldchapter" -->
  2935. <div>
  2936. <div
  2937. class="add_chapters_box add_c_none"
  2938. v-if="
  2939. itemTask.chapterData &&
  2940. itemTask.chapterData.length == 0
  2941. "
  2942. >
  2943. <!-- <img
  2944. src="../../../assets/icon/new/c_none.png"
  2945. alt
  2946. /> -->
  2947. <span>请添加学习内容</span>
  2948. </div>
  2949. <div
  2950. v-else
  2951. class="add_chapters_box"
  2952. style="display: flex; flex-direction: column"
  2953. >
  2954. <div
  2955. @dragstart="
  2956. dragStart(item1, index1, itemTaskIndex)
  2957. "
  2958. @dragover.prevent="
  2959. dragOver(index1, itemTaskIndex)
  2960. "
  2961. @dragend="dragEnd()"
  2962. :draggable="
  2963. isdrag ==
  2964. 'chapter-' + itemTaskIndex + '-' + index1
  2965. "
  2966. class="chapter_upload"
  2967. v-for="(item1, index1) in itemTask.chapterData"
  2968. :key="item1.id"
  2969. @click="
  2970. getChapterData(
  2971. $event,
  2972. unitIndex,
  2973. index,
  2974. index1,
  2975. item1.type
  2976. )
  2977. "
  2978. :class="{
  2979. dragOverTop2:
  2980. newIndex === index1 &&
  2981. typeIndex ==
  2982. 'chapter-' +
  2983. itemTaskIndex +
  2984. '-' +
  2985. index1 &&
  2986. oldIndex > index1 &&
  2987. dragType == 'drag',
  2988. dragOverBottom2:
  2989. newIndex === index1 &&
  2990. typeIndex ==
  2991. 'chapter-' +
  2992. itemTaskIndex +
  2993. '-' +
  2994. index1 &&
  2995. oldIndex < index1 &&
  2996. dragType == 'drag',
  2997. }"
  2998. >
  2999. <div
  3000. @mousedown="
  3001. isdrag =
  3002. 'chapter-' + itemTaskIndex + '-' + index1
  3003. "
  3004. @mouseup="isdrag = ''"
  3005. @touchstart="
  3006. isdrag =
  3007. 'chapter-' + itemTaskIndex + '-' + index1
  3008. "
  3009. @touchend="isdrag = ''"
  3010. class="chapter_upload_drag"
  3011. ></div>
  3012. <div
  3013. class="chapter_upload_o"
  3014. style="
  3015. position: relative;
  3016. display: flex;
  3017. align-items: center;
  3018. "
  3019. >
  3020. <div
  3021. class="chapter_upload_l"
  3022. style="padding: 1px 0 0 10px"
  3023. >
  3024. <div
  3025. v-if="item1.type == 2"
  3026. class="chapter_upload_l_i2"
  3027. ></div>
  3028. <div
  3029. v-if="item1.type == 3"
  3030. class="chapter_upload_l_i3"
  3031. style="margin-left: 1px"
  3032. ></div>
  3033. <div
  3034. v-if="item1.type == 6"
  3035. class="chapter_upload_l_i6"
  3036. style="margin-left: 1px"
  3037. ></div>
  3038. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3039. <div
  3040. v-if="item1.type == 8"
  3041. class="chapter_upload_l_i8"
  3042. style="margin-left: 1px"
  3043. ></div>
  3044. <div
  3045. v-if="item1.type == 14"
  3046. class="chapter_upload_l_i14"
  3047. style="margin-left: 1px"
  3048. ></div>
  3049. <div
  3050. v-if="item1.type == 12"
  3051. class="chapter_upload_l_i12"
  3052. style="margin-left: 1px"
  3053. ></div>
  3054. <div
  3055. v-if="item1.type == 13"
  3056. class="chapter_upload_l_i13"
  3057. style="margin-left: 1px"
  3058. ></div>
  3059. </div>
  3060. <div class="chapter_upload_n">
  3061. <input
  3062. readonly="true"
  3063. v-if="
  3064. item1.type == 2 ||
  3065. item1.type == 3 ||
  3066. item1.type == 12 ||
  3067. item1.type == 13 ||
  3068. item1.type == 7
  3069. "
  3070. :placeholder="item1.name"
  3071. @click="
  3072. updataVideoT(
  3073. $event,
  3074. unitIndex,
  3075. itemTaskIndex,
  3076. index1
  3077. )
  3078. "
  3079. style="
  3080. border: none;
  3081. outline: none;
  3082. width: 80%;
  3083. minwidth: 215px;
  3084. z-index: 99;
  3085. font-size: 14px;
  3086. white-space: nowrap;
  3087. overflow: hidden;
  3088. text-overflow: ellipsis;
  3089. "
  3090. />
  3091. <input
  3092. :placeholder="item1.name"
  3093. v-if="item1.type == 6"
  3094. style="
  3095. border: none;
  3096. outline: none;
  3097. width: 80%;
  3098. white-space: nowrap;
  3099. overflow: hidden;
  3100. text-overflow: ellipsis;
  3101. "
  3102. readonly="true"
  3103. @click="
  3104. selectAttText(itemTaskIndex, index1)
  3105. "
  3106. />
  3107. <input
  3108. :placeholder="
  3109. item1.title ? item1.title : '链接'
  3110. "
  3111. v-if="item1.type == 8"
  3112. style="
  3113. border: none;
  3114. outline: none;
  3115. width: 80%;
  3116. white-space: nowrap;
  3117. overflow: hidden;
  3118. text-overflow: ellipsis;
  3119. "
  3120. readonly="true"
  3121. @click="selectLine(itemTaskIndex, index1)"
  3122. />
  3123. <input
  3124. :placeholder="
  3125. item1.title ? item1.title : '链接'
  3126. "
  3127. v-if="item1.type == 14"
  3128. style="
  3129. border: none;
  3130. outline: none;
  3131. width: 80%;
  3132. white-space: nowrap;
  3133. overflow: hidden;
  3134. text-overflow: ellipsis;
  3135. "
  3136. readonly="true"
  3137. @click="
  3138. openUpdateSource(itemTaskIndex, index1)
  3139. "
  3140. />
  3141. </div>
  3142. <div class="chapter_upload_ic">
  3143. <div
  3144. class="chapter_upload_noSee"
  3145. v-if="item1.type == 12"
  3146. ></div>
  3147. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3148. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  3149. ">
  3150. <div></div>
  3151. </div>
  3152. <div
  3153. class="chapter_upload_ud"
  3154. style="z-index: 99"
  3155. >
  3156. <div
  3157. class="chapter_upload_up"
  3158. @click="
  3159. upCd(
  3160. $event,
  3161. unitIndex,
  3162. index,
  3163. itemTaskIndex,
  3164. index1
  3165. )
  3166. "
  3167. ></div>
  3168. <div
  3169. class="chapter_upload_down"
  3170. @click="
  3171. downCd(
  3172. $event,
  3173. unitIndex,
  3174. index,
  3175. itemTaskIndex,
  3176. index1
  3177. )
  3178. "
  3179. ></div>
  3180. </div>
  3181. <div
  3182. class="chapter_upload_ic_edit"
  3183. v-if="
  3184. item1.type == 2 ||
  3185. item1.type == 3 ||
  3186. item1.type == 12 ||
  3187. item1.type == 13 ||
  3188. item1.type == 7
  3189. "
  3190. @click.stop="
  3191. updataVideoT(
  3192. $event,
  3193. unitIndex,
  3194. itemTaskIndex,
  3195. index1
  3196. )
  3197. "
  3198. >
  3199. <div></div>
  3200. </div>
  3201. <div
  3202. class="chapter_upload_ic_edit"
  3203. v-if="item1.type == 6"
  3204. @click="
  3205. selectAttText(itemTaskIndex, index1)
  3206. "
  3207. >
  3208. <div></div>
  3209. </div>
  3210. <div
  3211. class="chapter_upload_ic_edit"
  3212. v-if="item1.type == 8"
  3213. @click="selectLine(itemTaskIndex, index1)"
  3214. >
  3215. <div></div>
  3216. </div>
  3217. <div
  3218. class="chapter_upload_ic_edit"
  3219. v-if="item1.type == 14"
  3220. @click="
  3221. openUpdateSource(itemTaskIndex, index1)
  3222. "
  3223. >
  3224. <div></div>
  3225. </div>
  3226. <div
  3227. class="chapter_upload_ic_r"
  3228. @click.stop="
  3229. deleteChapterData(
  3230. $event,
  3231. unitIndex,
  3232. index,
  3233. index1,
  3234. itemTaskIndex
  3235. )
  3236. "
  3237. >
  3238. <div></div>
  3239. </div>
  3240. </div>
  3241. </div>
  3242. </div>
  3243. </div>
  3244. </div>
  3245. <!-- v-if="!itemTask.isFoldchapter" -->
  3246. <div class="add_info_box" style="margin: 10px 0 0">
  3247. <button
  3248. class="c_pub_button_add pub_btn_add_img"
  3249. @click="addImg($event)"
  3250. >
  3251. 文件
  3252. <input
  3253. type="file"
  3254. accept="*"
  3255. style="display: none"
  3256. multiple="multiple"
  3257. v-if="inputShow"
  3258. @change="
  3259. beforeUpload2(
  3260. $event,
  3261. unitIndex,
  3262. 13,
  3263. itemTaskIndex
  3264. )
  3265. "
  3266. />
  3267. </button>
  3268. <button
  3269. class="c_pub_button_add pub_btn_add_img"
  3270. @click="addAttText(itemTaskIndex)"
  3271. >
  3272. 图文
  3273. </button>
  3274. <button
  3275. class="c_pub_button_add pub_btn_add_img"
  3276. @click="openLine(itemTaskIndex)"
  3277. >
  3278. 链接
  3279. </button>
  3280. <button
  3281. class="c_pub_button_add pub_btn_add_img"
  3282. @click="pasteLine(itemTaskIndex)"
  3283. >
  3284. 代码
  3285. </button>
  3286. <button
  3287. class="c_pub_button_add pub_btn_add_img"
  3288. @click="openSource(itemTaskIndex)"
  3289. >
  3290. 资源
  3291. </button>
  3292. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成PPT按钮`)">
  3293. AI生成PPT
  3294. </button>
  3295. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3296. AI生成教案
  3297. </button> -->
  3298. <button class="c_pub_button_add pub_btn_add_img" @click="createTaskAn(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成学历案按钮`)">
  3299. {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true ? '停止生成学历案' : 'AI生成学历案'}}
  3300. </button>
  3301. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-智能检索视频按钮`)">
  3302. 智能检索视频
  3303. </button>
  3304. </div>
  3305. <div
  3306. v-if="
  3307. unitJson[unitIndex].chapterInfo[0].taskJson[
  3308. itemTaskIndex
  3309. ].proVisible
  3310. "
  3311. class="mask"
  3312. >
  3313. <div class="progressBox">
  3314. <!-- <div id="closePro" class="closeCss">
  3315. <img src="../../../../assets/icon/close.png" alt />
  3316. </div> -->
  3317. <div class="lbox">
  3318. <img
  3319. src="../../../assets/loading.gif"
  3320. />上传中,请稍后
  3321. </div>
  3322. <div style="margin-bottom: 10px">
  3323. <span
  3324. >{{
  3325. unitJson[unitIndex].chapterInfo[0].taskJson[
  3326. itemTaskIndex
  3327. ].isFinishSize
  3328. }}</span
  3329. >
  3330. /
  3331. <span
  3332. >{{
  3333. unitJson[unitIndex].chapterInfo[0].taskJson[
  3334. itemTaskIndex
  3335. ].isAllSize
  3336. }}</span
  3337. >
  3338. </div>
  3339. <!-- <el-progress
  3340. :text-inside="true"
  3341. :stroke-width="20"
  3342. :percentage="
  3343. unitJson[unitIndex].chapterInfo[0].taskJson[
  3344. itemTaskIndex
  3345. ].progress
  3346. ? unitJson[unitIndex].chapterInfo[0]
  3347. .taskJson[itemTaskIndex].progress
  3348. : 0
  3349. "
  3350. style="width: 80%"
  3351. ></el-progress> -->
  3352. </div>
  3353. </div>
  3354. </div>
  3355. <div v-if="
  3356. unitJson[unitIndex].easy == 1 ||
  3357. (unitJson[unitIndex].easy == 5 &&
  3358. itemTask.taskType == 2)
  3359. ">
  3360. <div>
  3361. <div class="add_chapters_box add_c_none" v-if="
  3362. itemTask.chapterData &&
  3363. itemTask.chapterData.length == 0
  3364. ">
  3365. <img src="../../../assets/icon/new/c_none.png" alt />
  3366. </div>
  3367. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3368. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3369. dragOver(index1, itemTaskIndex)
  3370. " @dragend="dragEnd()" :draggable="isdrag ==
  3371. 'chapter-' + itemTaskIndex + '-' + index1
  3372. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3373. :key="item1.id" @click="
  3374. getChapterData(
  3375. $event,
  3376. unitIndex,
  3377. index,
  3378. index1,
  3379. item1.type
  3380. )
  3381. " :class="{
  3382. dragOverTop2:
  3383. newIndex === index1 &&
  3384. typeIndex ==
  3385. 'chapter-' +
  3386. itemTaskIndex +
  3387. '-' +
  3388. index1 &&
  3389. oldIndex > index1,
  3390. dragOverBottom2:
  3391. newIndex === index1 &&
  3392. typeIndex ==
  3393. 'chapter-' +
  3394. itemTaskIndex +
  3395. '-' +
  3396. index1 &&
  3397. oldIndex < index1,
  3398. }">
  3399. <div @mousedown="
  3400. isdrag =
  3401. 'chapter-' + itemTaskIndex + '-' + index1
  3402. " @mouseup="isdrag = ''" @touchstart="
  3403. isdrag =
  3404. 'chapter-' + itemTaskIndex + '-' + index1
  3405. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3406. <div class="chapter_upload_t" style="width: 100%"></div>
  3407. <div class="chapter_upload_o" style="
  3408. position: relative;
  3409. display: flex;
  3410. align-items: center;
  3411. ">
  3412. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3413. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3414. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3415. </div>
  3416. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3417. </div>
  3418. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3419. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3420. </div>
  3421. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3422. </div>
  3423. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3424. </div>
  3425. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3426. </div>
  3427. </div>
  3428. <div class="chapter_upload_n">
  3429. <span style="
  3430. font-size: 14px;
  3431. color: rgb(109, 109, 109);
  3432. height: 14px;
  3433. line-height: 14px;
  3434. " v-if="
  3435. item1.type == 2 ||
  3436. item1.type == 3 ||
  3437. item1.type == 7
  3438. ">{{ item1.text }}-</span>
  3439. <input readonly="true" v-if="
  3440. item1.type == 2 ||
  3441. item1.type == 3 ||
  3442. item1.type == 7
  3443. " :placeholder="item1.name" @click="
  3444. updataVideoT(
  3445. $event,
  3446. unitIndex,
  3447. itemTaskIndex,
  3448. index1
  3449. )
  3450. " style="
  3451. border: none;
  3452. outline: none;
  3453. width: 80%;
  3454. minwidth: 215px;
  3455. z-index: 99;
  3456. font-size: 14px;
  3457. white-space: nowrap;
  3458. overflow: hidden;
  3459. text-overflow: ellipsis;
  3460. " />
  3461. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3462. border: none;
  3463. outline: none;
  3464. width: 80%;
  3465. white-space: nowrap;
  3466. overflow: hidden;
  3467. text-overflow: ellipsis;
  3468. " readonly="true" @click="
  3469. selectAttText(itemTaskIndex, index1)
  3470. " />
  3471. <input :placeholder="item1.title ? item1.title : '链接'
  3472. " v-if="item1.type == 8 || item1.type == 14" style="
  3473. border: none;
  3474. outline: none;
  3475. width: 80%;
  3476. white-space: nowrap;
  3477. overflow: hidden;
  3478. text-overflow: ellipsis;
  3479. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3480. </div>
  3481. <div class="chapter_upload_ic">
  3482. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3483. <div class="chapter_upload_ud" style="z-index: 99">
  3484. <div class="chapter_upload_up" @click="
  3485. upCd(
  3486. $event,
  3487. unitIndex,
  3488. index,
  3489. itemTaskIndex,
  3490. index1
  3491. )
  3492. "></div>
  3493. <div class="chapter_upload_down" @click="
  3494. downCd(
  3495. $event,
  3496. unitIndex,
  3497. index,
  3498. itemTaskIndex,
  3499. index1
  3500. )
  3501. "></div>
  3502. </div>
  3503. <div class="chapter_upload_ic_edit" v-if="
  3504. item1.type == 2 ||
  3505. item1.type == 3 ||
  3506. item1.type == 12 ||
  3507. item1.type == 13 ||
  3508. item1.type == 7
  3509. " @click.stop="
  3510. updataVideoT(
  3511. $event,
  3512. unitIndex,
  3513. itemTaskIndex,
  3514. index1
  3515. )
  3516. ">
  3517. <div></div>
  3518. </div>
  3519. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3520. selectAttText(itemTaskIndex, index1)
  3521. ">
  3522. <div></div>
  3523. </div>
  3524. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3525. @click="selectLine(itemTaskIndex, index1)">
  3526. <div></div>
  3527. </div>
  3528. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3529. openUpdateSource(itemTaskIndex, index1)
  3530. ">
  3531. <div></div>
  3532. </div>
  3533. <div class="chapter_upload_ic_r" @click.stop="
  3534. deleteChapterData(
  3535. $event,
  3536. unitIndex,
  3537. index,
  3538. index1,
  3539. itemTaskIndex
  3540. )
  3541. ">
  3542. <div></div>
  3543. </div>
  3544. </div>
  3545. </div>
  3546. </div>
  3547. </div>
  3548. </div>
  3549. <div class="add_info_box" style="margin: 10px 0 0">
  3550. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3551. <span style="color: red">*</span>
  3552. 教学设计
  3553. <input type="file"
  3554. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3555. style="display: none" v-if="inputShow" @change="
  3556. beforeUpload3(
  3557. $event,
  3558. unitIndex,
  3559. 3,
  3560. itemTaskIndex,
  3561. '教学设计'
  3562. )
  3563. " />
  3564. </button>
  3565. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3566. <span style="color: red">*</span>
  3567. 教学课件
  3568. <input type="file"
  3569. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3570. style="display: none" v-if="inputShow" @change="
  3571. beforeUpload3(
  3572. $event,
  3573. unitIndex,
  3574. 3,
  3575. itemTaskIndex,
  3576. '教学课件'
  3577. )
  3578. " />
  3579. </button>
  3580. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3581. 教学视频
  3582. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3583. style="display: none" v-if="inputShow" @change="
  3584. beforeUpload3(
  3585. $event,
  3586. unitIndex,
  3587. 2,
  3588. itemTaskIndex,
  3589. '教学视频'
  3590. )
  3591. " />
  3592. </button>
  3593. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3594. 教学音频
  3595. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3596. beforeUpload3(
  3597. $event,
  3598. unitIndex,
  3599. 2,
  3600. itemTaskIndex,
  3601. '教学音频'
  3602. )
  3603. " />
  3604. </button>
  3605. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3606. 学习单
  3607. <input type="file"
  3608. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3609. style="display: none" v-if="inputShow" @change="
  3610. beforeUpload3(
  3611. $event,
  3612. unitIndex,
  3613. 3,
  3614. itemTaskIndex,
  3615. '学习单'
  3616. )
  3617. " />
  3618. </button>
  3619. </div>
  3620. <div v-if="
  3621. unitJson[unitIndex].chapterInfo[0].taskJson[
  3622. itemTaskIndex
  3623. ].proVisible
  3624. " class="mask">
  3625. <div class="progressBox">
  3626. <!-- <div id="closePro" class="closeCss">
  3627. <img src="../../../../assets/icon/close.png" alt />
  3628. </div> -->
  3629. <div class="lbox">
  3630. <img src="../../../assets/loading.gif" />上传中,请稍后
  3631. </div>
  3632. <div style="margin-bottom: 10px">
  3633. <span>{{
  3634. unitJson[unitIndex].chapterInfo[0].taskJson[
  3635. itemTaskIndex
  3636. ].isFinishSize
  3637. }}M</span>
  3638. /
  3639. <span>{{
  3640. unitJson[unitIndex].chapterInfo[0].taskJson[
  3641. itemTaskIndex
  3642. ].isAllSize
  3643. }}M</span>
  3644. </div>
  3645. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3646. itemTaskIndex
  3647. ].progress
  3648. ? unitJson[unitIndex].chapterInfo[0]
  3649. .taskJson[itemTaskIndex].progress
  3650. : 0
  3651. " style="width: 80%"></el-progress>
  3652. </div>
  3653. </div>
  3654. </div>
  3655. </div>
  3656. <!-- padding: 20px; -->
  3657. <div style="
  3658. background: #fff;
  3659. border-radius: 5px;
  3660. margin-top: 15px;
  3661. " :style="{paddingBottom: panTaskElist() == 0?'75px':''}">
  3662. <div v-if="
  3663. unitJson[unitIndex].easy == 6 ||
  3664. !unitJson[unitIndex].easy
  3665. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
  3666. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
  3667. <div v-if="
  3668. unitJson[unitIndex].easy != 3 &&
  3669. !(
  3670. unitJson[unitIndex].easy == 5 &&
  3671. itemTask.taskType == 1
  3672. )
  3673. " style="
  3674. flex-direction: row;
  3675. justify-content: flex-start;
  3676. align-items: center;
  3677. ">
  3678. <div style="
  3679. display: flex;
  3680. flex-direction: row;
  3681. align-items: center;
  3682. margin: 5px 0 20px;
  3683. ">
  3684. <div class="lineTitle clineTitle">
  3685. {{
  3686. !unitJson[unitIndex].easy ||
  3687. unitJson[unitIndex].easy == 6 ||
  3688. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3689. -1
  3690. ? "练习内容"
  3691. : "评价内容"
  3692. }}
  3693. </div>
  3694. <!-- <div class="line" style="width: 90%"></div> -->
  3695. </div>
  3696. </div>
  3697. <div class="tools">
  3698. <div class="leftTools" style="width: 100%" v-for="(
  3699. itemTool, toolIndex
  3700. ) in itemTask.toolChoose" :key="toolIndex">
  3701. <div style="
  3702. display: flex;
  3703. flex-direction: row;
  3704. align-items: baseline;
  3705. flex-wrap: nowrap;
  3706. justify-content: flex-start;
  3707. position: relative;
  3708. ">
  3709. <div style="margin-right: 20px; font-weight: bold"
  3710. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3711. 工具 {{ toolIndex + 1 }} :
  3712. </div>
  3713. <div class="chooseWho">
  3714. <div :class="itemTool.toolType == 0
  3715. ? 'isChooseActive'
  3716. : ''
  3717. " @click="
  3718. (itemTool.toolType = 0),
  3719. (itemTool.isFold3 = false),
  3720. $forceUpdate()
  3721. ">
  3722. 互动类
  3723. </div>
  3724. <div :class="itemTool.toolType == 1
  3725. ? 'isChooseActive'
  3726. : ''
  3727. " @click="
  3728. (itemTool.toolType = 1),
  3729. (itemTool.isFold3 = false),
  3730. $forceUpdate()
  3731. ">
  3732. 思维类
  3733. </div>
  3734. <div :class="itemTool.toolType == 6
  3735. ? 'isChooseActive'
  3736. : ''
  3737. " @click="
  3738. (itemTool.toolType = 6),
  3739. (itemTool.isFold3 = false),
  3740. $forceUpdate()
  3741. ">
  3742. 协作类
  3743. </div>
  3744. <div :class="itemTool.toolType == 2
  3745. ? 'isChooseActive'
  3746. : ''
  3747. " @click="
  3748. (itemTool.toolType = 2),
  3749. (itemTool.isFold3 = false),
  3750. $forceUpdate()
  3751. ">
  3752. 测评类
  3753. </div>
  3754. <div :class="itemTool.toolType == 7
  3755. ? 'isChooseActive'
  3756. : ''
  3757. " @click="
  3758. (itemTool.toolType = 7),
  3759. (itemTool.isFold3 = false),
  3760. $forceUpdate()
  3761. ">
  3762. 评价类
  3763. </div>
  3764. <div :class="itemTool.toolType == 3
  3765. ? 'isChooseActive'
  3766. : ''
  3767. " @click="
  3768. (itemTool.toolType = 3),
  3769. (itemTool.isFold3 = false),
  3770. $forceUpdate()
  3771. ">
  3772. 编程类
  3773. </div>
  3774. <div :class="itemTool.toolType == 5
  3775. ? 'isChooseActive'
  3776. : ''
  3777. " @click="
  3778. (itemTool.toolType = 5),
  3779. (itemTool.isFold3 = false),
  3780. $forceUpdate()
  3781. ">
  3782. 学科类
  3783. </div>
  3784. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3785. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3786. 其他
  3787. </div> -->
  3788. </div>
  3789. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3790. margin:
  3791. itemTask.toolChoose.length > 1
  3792. ? '0px 35px 0px auto'
  3793. : '0 0 0 auto',
  3794. }" v-if="itemTask.toolChoose.length > 1">
  3795. <div class="chapter_upload_up2" @click.stop="
  3796. upTool(
  3797. $event,
  3798. unitIndex,
  3799. itemTaskIndex,
  3800. toolIndex
  3801. )
  3802. ">
  3803. 上移
  3804. </div>
  3805. <div class="chapter_upload_down2" @click.stop="
  3806. downTool(
  3807. $event,
  3808. unitIndex,
  3809. itemTaskIndex,
  3810. toolIndex
  3811. )
  3812. ">
  3813. 下移
  3814. </div>
  3815. </div>
  3816. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3817. @click="fold3(itemTaskIndex, toolIndex)"
  3818. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3819. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3820. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3821. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3822. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3823. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3824. v-if="itemTask.toolChoose.length > 1" style="
  3825. position: absolute;
  3826. right: 0;
  3827. top: -5px;
  3828. "></div>
  3829. </div>
  3830. <!-- v-show="!itemTool.isFold3" -->
  3831. <div style="min-height: 163px">
  3832. <div class="toolSort" v-if="itemTool.toolType == 0">
  3833. <!-- <div class="tool">
  3834. <div
  3835. class="whiteBIcon"
  3836. @click="addTools(8, itemTaskIndex, toolIndex)"
  3837. >
  3838. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3839. <div style="margin: 5px 0">素材库</div>
  3840. </div>
  3841. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3842. <img
  3843. src="../../../assets/icon/checkNo.png"
  3844. alt
  3845. v-if="itemTool.tool.indexOf(8) == -1"
  3846. />
  3847. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3848. alt /><span>已选择</span></div>
  3849. </div>
  3850. </div>-->
  3851. <!-- <div class="tool">
  3852. <div
  3853. class="whiteBIcon"
  3854. @click="addTools(17, itemTaskIndex, toolIndex)"
  3855. >
  3856. <img
  3857. src="../../../assets/icon/secondToolList/library.png"
  3858. alt
  3859. />
  3860. <div style="margin: 5px 0">学习资料</div>
  3861. </div>
  3862. <div
  3863. class="check"
  3864. @click="addTools(17, itemTaskIndex, toolIndex)"
  3865. >
  3866. <img
  3867. src="../../../assets/icon/checkNo.png"
  3868. alt
  3869. v-if="itemTool.tool.indexOf(17) == -1"
  3870. />
  3871. <img
  3872. src="../../../assets/icon/checkedIs.png"
  3873. alt
  3874. v-else
  3875. />
  3876. </div>10
  3877. </div> -->
  3878. <div class="tool" :class="{
  3879. isToolChoose:
  3880. itemTool.tool.indexOf(10) != -1,
  3881. }" @click="
  3882. addTools(10, itemTaskIndex, toolIndex)
  3883. ">
  3884. <div class="whiteBIcon" @click.stop="
  3885. openTools(itemTaskIndex, 10, toolIndex)
  3886. ">
  3887. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3888. <div style="margin: 5px 0">倒计时</div>
  3889. </div>
  3890. <div class="noCTool">
  3891. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3892. </div>
  3893. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3894. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3895. </div>
  3896. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3897. <img src="../../../assets/icon/checkNo.png" alt
  3898. v-if="itemTool.tool.indexOf(10) == -1" />
  3899. <div class="checkDiv" v-else>
  3900. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3901. </div>
  3902. </div> -->
  3903. </div>
  3904. <div class="tool" :class="{
  3905. isToolChoose:
  3906. itemTool.tool.indexOf(65) != -1,
  3907. }" @click="
  3908. addTools(65, itemTaskIndex, toolIndex)
  3909. ">
  3910. <div class="whiteBIcon" @click.stop="
  3911. addTools(65, itemTaskIndex, toolIndex)
  3912. ">
  3913. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3914. <div style="margin: 5px 0">挑人</div>
  3915. </div>
  3916. <div class="noCTool">
  3917. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3918. </div>
  3919. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3920. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3921. </div>
  3922. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3923. <img src="../../../assets/icon/checkNo.png" alt
  3924. v-if="itemTool.tool.indexOf(65) == -1" />
  3925. <div class="checkDiv" v-else>
  3926. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3927. </div>
  3928. </div> -->
  3929. </div>
  3930. <!-- <div class="tool">
  3931. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3932. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3933. <div style="margin: 5px 0">学生分组</div>
  3934. </div>
  3935. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3936. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3937. <div class="checkDiv" v-else>
  3938. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3939. </div>
  3940. </div>
  3941. </div> -->
  3942. <!-- <div class="tool">
  3943. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3944. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3945. <div style="margin: 5px 0">交互视频</div>
  3946. </div>
  3947. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3948. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3949. <div class="checkDiv" v-else>
  3950. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3951. </div>
  3952. </div>
  3953. </div> -->
  3954. </div>
  3955. <div class="toolSort" v-if="itemTool.toolType == 1">
  3956. <div class="tool" :class="{
  3957. isToolChoose:
  3958. itemTool.tool.indexOf(7) != -1,
  3959. }" @click="
  3960. addTools(7, itemTaskIndex, toolIndex)
  3961. ">
  3962. <div class="whiteBIcon" @click.stop="
  3963. addTools(7, itemTaskIndex, toolIndex)
  3964. ">
  3965. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3966. <div style="margin: 5px 0">思维网格</div>
  3967. </div>
  3968. <div class="noCTool">
  3969. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3970. </div>
  3971. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3972. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3973. </div>
  3974. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3975. <img src="../../../assets/icon/checkNo.png" alt
  3976. v-if="itemTool.tool.indexOf(7) == -1" />
  3977. <div class="checkDiv" v-else>
  3978. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3979. </div>
  3980. </div> -->
  3981. </div>
  3982. <div class="tool" :class="{
  3983. isToolChoose:
  3984. itemTool.tool.indexOf(1) != -1,
  3985. }" @click="
  3986. addTools(1, itemTaskIndex, toolIndex)
  3987. ">
  3988. <div class="whiteBIcon" @click.stop="
  3989. openTools(itemTaskIndex, 1, toolIndex)
  3990. ">
  3991. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3992. <div style="margin: 5px 0">电子白板</div>
  3993. </div>
  3994. <div class="noCTool">
  3995. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3996. </div>
  3997. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3998. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3999. </div>
  4000. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  4001. <img src="../../../assets/icon/checkNo.png" alt
  4002. v-if="itemTool.tool.indexOf(1) == -1" />
  4003. <div class="checkDiv" v-else>
  4004. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4005. </div>
  4006. </div> -->
  4007. </div>
  4008. <!-- <div class="tool">
  4009. <div
  4010. class="whiteBIcon"
  4011. @click="addTools(2, itemTaskIndex, toolIndex)"
  4012. >
  4013. <img
  4014. src="../../../assets/icon/secondToolList/note.png"
  4015. alt
  4016. />
  4017. <div style="margin: 5px 0">便签</div>
  4018. </div>
  4019. <div
  4020. class="check"
  4021. @click="addTools(2, itemTaskIndex, toolIndex)"
  4022. >
  4023. <img
  4024. src="../../../assets/icon/checkNo.png"
  4025. alt
  4026. v-if="itemTool.tool.indexOf(2) == -1"
  4027. />
  4028. <div class="checkDiv" v-else>
  4029. <img
  4030. src="../../../assets/icon/checkedIs.png"
  4031. alt
  4032. /><span>已选择</span>
  4033. </div>
  4034. </div>
  4035. </div> -->
  4036. <!-- <div class="tool">
  4037. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  4038. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4039. <div style="margin: 5px 0">协同文档</div>
  4040. </div>
  4041. <div
  4042. class="check"
  4043. @click="addTools(6, itemTaskIndex, toolIndex)"
  4044. >
  4045. <img
  4046. src="../../../assets/icon/checkNo.png"
  4047. alt
  4048. v-if="itemTool.tool.indexOf(6) == -1"
  4049. />
  4050. <div class="checkDiv" v-else>
  4051. <img
  4052. src="../../../assets/icon/checkedIs.png"
  4053. alt
  4054. /><span>已选择</span>
  4055. </div>
  4056. </div>
  4057. </div> -->
  4058. <div class="tool" :class="{
  4059. isToolChoose:
  4060. itemTool.tool.indexOf(52) != -1,
  4061. }" @click="
  4062. addTools(52, itemTaskIndex, toolIndex)
  4063. ">
  4064. <div class="whiteBIcon" @click.stop="
  4065. openTools(itemTaskIndex, 52, toolIndex)
  4066. ">
  4067. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4068. <div style="margin: 5px 0">文档</div>
  4069. </div>
  4070. <div class="noCTool">
  4071. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4072. </div>
  4073. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  4074. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4075. </div>
  4076. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  4077. <img src="../../../assets/icon/checkNo.png" alt
  4078. v-if="itemTool.tool.indexOf(52) == -1" />
  4079. <div class="checkDiv" v-else>
  4080. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4081. </div>
  4082. </div> -->
  4083. </div>
  4084. <div class="tool" :class="{
  4085. isToolChoose:
  4086. itemTool.tool.indexOf(3) != -1,
  4087. }" @click="
  4088. addTools(3, itemTaskIndex, toolIndex)
  4089. ">
  4090. <div class="whiteBIcon" @click.stop="
  4091. openTools(itemTaskIndex, 3, toolIndex)
  4092. ">
  4093. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4094. <div style="margin: 5px 0">思维导图</div>
  4095. </div>
  4096. <div class="noCTool">
  4097. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4098. </div>
  4099. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  4100. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4101. </div>
  4102. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  4103. <img src="../../../assets/icon/checkNo.png" alt
  4104. v-if="itemTool.tool.indexOf(3) == -1" />
  4105. <div class="checkDiv" v-else>
  4106. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4107. </div>
  4108. </div> -->
  4109. </div>
  4110. <div class="tool" :class="{
  4111. isToolChoose:
  4112. itemTool.tool.indexOf(48) != -1,
  4113. }" @click="
  4114. addTools(48, itemTaskIndex, toolIndex)
  4115. ">
  4116. <div class="whiteBIcon" @click.stop="
  4117. openTools(itemTaskIndex, 48, toolIndex)
  4118. ">
  4119. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4120. <div style="margin: 5px 0">表格</div>
  4121. </div>
  4122. <div class="noCTool">
  4123. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4124. </div>
  4125. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  4126. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4127. </div>
  4128. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  4129. <img src="../../../assets/icon/checkNo.png" alt
  4130. v-if="itemTool.tool.indexOf(48) == -1" />
  4131. <div class="checkDiv" v-else>
  4132. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4133. </div>
  4134. </div> -->
  4135. </div>
  4136. </div>
  4137. <div class="toolSort" v-if="itemTool.toolType == 6">
  4138. <div class="tool" :class="{
  4139. isToolChoose:
  4140. itemTool.tool.indexOf(49) != -1,
  4141. }" @click="
  4142. addTools(49, itemTaskIndex, toolIndex)
  4143. ">
  4144. <div class="whiteBIcon" @click.stop="
  4145. openTools(itemTaskIndex, 49, toolIndex)
  4146. ">
  4147. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4148. <div style="margin: 5px 0">学生分组</div>
  4149. </div>
  4150. <div class="noCTool">
  4151. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4152. </div>
  4153. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  4154. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4155. </div>
  4156. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4157. <img src="../../../assets/icon/checkNo.png" alt
  4158. v-if="itemTool.tool.indexOf(49) == -1" />
  4159. <div class="checkDiv" v-else>
  4160. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4161. </div>
  4162. </div> -->
  4163. </div>
  4164. </div>
  4165. <div class="toolSort" v-if="itemTool.toolType == 2">
  4166. <!-- <div class="tool">
  4167. <div
  4168. class="whiteBIcon"
  4169. @click="addTools(5, itemTaskIndex, toolIndex)"
  4170. >
  4171. <img
  4172. src="../../../assets/icon/thirdToolList/score.png"
  4173. alt
  4174. />
  4175. <div style="margin: 5px 0">量规评分</div>
  4176. </div>
  4177. <div
  4178. class="check"
  4179. @click="addTools(5, itemTaskIndex, toolIndex)"
  4180. >
  4181. <img
  4182. src="../../../assets/icon/checkNo.png"
  4183. alt
  4184. v-if="itemTool.tool.indexOf(5) == -1"
  4185. />
  4186. <img
  4187. src="../../../assets/icon/checkedIs.png"
  4188. alt
  4189. v-else
  4190. />
  4191. </div>
  4192. </div>-->
  4193. <div class="tool" :class="{
  4194. isToolChoose:
  4195. itemTool.tool.indexOf(4) != -1,
  4196. }" @click="
  4197. addTools(4, itemTaskIndex, toolIndex)
  4198. ">
  4199. <div class="whiteBIcon" @click.stop="
  4200. openTools(itemTaskIndex, 4, toolIndex)
  4201. ">
  4202. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4203. <div style="margin: 5px 0">问卷调查</div>
  4204. </div>
  4205. <div class="noCTool">
  4206. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4207. </div>
  4208. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4209. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4210. </div>
  4211. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4212. <img src="../../../assets/icon/checkNo.png" alt
  4213. v-if="itemTool.tool.indexOf(4) == -1" />
  4214. <div class="checkDiv" v-else>
  4215. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4216. </div>
  4217. </div> -->
  4218. </div>
  4219. <div class="tool" :class="{
  4220. isToolChoose:
  4221. itemTool.tool.indexOf(45) != -1,
  4222. }" @click="
  4223. addTools(45, itemTaskIndex, toolIndex)
  4224. ">
  4225. <div class="whiteBIcon" @click="
  4226. openTools(itemTaskIndex, 45, toolIndex)
  4227. ">
  4228. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4229. <div style="margin: 5px 0">选择题</div>
  4230. </div>
  4231. <div class="noCTool">
  4232. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4233. </div>
  4234. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4235. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4236. </div>
  4237. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4238. <img src="../../../assets/icon/checkNo.png" alt
  4239. v-if="itemTool.tool.indexOf(45) == -1" />
  4240. <div class="checkDiv" v-else>
  4241. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4242. </div>
  4243. </div> -->
  4244. </div>
  4245. <div class="tool" :class="{
  4246. isToolChoose:
  4247. itemTool.tool.indexOf(15) != -1,
  4248. }" @click="
  4249. addTools(15, itemTaskIndex, toolIndex)
  4250. ">
  4251. <div class="whiteBIcon" @click.stop="
  4252. openTools(itemTaskIndex, 15, toolIndex)
  4253. ">
  4254. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4255. <div style="margin: 5px 0">问答</div>
  4256. </div>
  4257. <div class="noCTool">
  4258. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4259. </div>
  4260. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4261. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4262. </div>
  4263. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4264. <img src="../../../assets/icon/checkNo.png" alt
  4265. v-if="itemTool.tool.indexOf(15) == -1" />
  4266. <div class="checkDiv" v-else>
  4267. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4268. </div>
  4269. </div> -->
  4270. </div>
  4271. <div class="tool" :class="{
  4272. isToolChoose:
  4273. itemTool.tool.indexOf(16) != -1,
  4274. }" @click="
  4275. addTools(16, itemTaskIndex, toolIndex)
  4276. ">
  4277. <div class="whiteBIcon" @click.stop="
  4278. addTools(16, itemTaskIndex, toolIndex)
  4279. ">
  4280. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4281. <div style="margin: 5px 0">作业提交</div>
  4282. </div>
  4283. <div class="noCTool">
  4284. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4285. </div>
  4286. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4287. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4288. </div>
  4289. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4290. <img src="../../../assets/icon/checkNo.png" alt
  4291. v-if="itemTool.tool.indexOf(16) == -1" />
  4292. <div class="checkDiv" v-else>
  4293. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4294. </div>
  4295. </div> -->
  4296. </div>
  4297. <div class="tool" :class="{
  4298. isToolChoose:
  4299. itemTool.tool.indexOf(50) != -1,
  4300. }" @click="
  4301. addTools(50, itemTaskIndex, toolIndex)
  4302. ">
  4303. <div class="whiteBIcon" @click.stop="
  4304. addTools(50, itemTaskIndex, toolIndex)
  4305. ">
  4306. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4307. <div style="margin: 5px 0">批量上传</div>
  4308. </div>
  4309. <div class="noCTool">
  4310. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4311. </div>
  4312. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4313. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4314. </div>
  4315. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4316. <img src="../../../assets/icon/checkNo.png" alt
  4317. v-if="itemTool.tool.indexOf(50) == -1" />
  4318. <div class="checkDiv" v-else>
  4319. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4320. </div>
  4321. </div> -->
  4322. </div>
  4323. <!-- <div class="tool">
  4324. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4325. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4326. <div style="margin: 5px 0">个人评价</div>
  4327. </div>
  4328. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4329. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4330. <div class="checkDiv" v-else>
  4331. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4332. </div>
  4333. </div>
  4334. </div> -->
  4335. <div class="tool" :class="{
  4336. isToolChoose:
  4337. itemTool.tool.indexOf(41) != -1,
  4338. }" @click="
  4339. addTools(41, itemTaskIndex, toolIndex)
  4340. ">
  4341. <div class="whiteBIcon" @click.stop="
  4342. openTools(itemTaskIndex, 41, toolIndex)
  4343. ">
  4344. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4345. <div style="margin: 5px 0">选择匹配</div>
  4346. </div>
  4347. <div class="noCTool">
  4348. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4349. </div>
  4350. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4351. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4352. </div>
  4353. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4354. <img src="../../../assets/icon/checkNo.png" alt
  4355. v-if="itemTool.tool.indexOf(41) == -1" />
  4356. <div class="checkDiv" v-else>
  4357. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4358. </div>
  4359. </div> -->
  4360. </div>
  4361. <div class="tool" :class="{
  4362. isToolChoose:
  4363. itemTool.tool.indexOf(47) != -1,
  4364. }" @click="
  4365. addTools(47, itemTaskIndex, toolIndex)
  4366. ">
  4367. <div class="whiteBIcon" @click.stop="
  4368. openTools(itemTaskIndex, 47, toolIndex)
  4369. ">
  4370. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4371. <div style="margin: 5px 0">排序</div>
  4372. </div>
  4373. <div class="noCTool">
  4374. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4375. </div>
  4376. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4377. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4378. </div>
  4379. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4380. <img src="../../../assets/icon/checkNo.png" alt
  4381. v-if="itemTool.tool.indexOf(47) == -1" />
  4382. <div class="checkDiv" v-else>
  4383. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4384. </div>
  4385. </div> -->
  4386. </div>
  4387. <!-- <div class="tool">
  4388. <div
  4389. class="whiteBIcon"
  4390. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4391. >
  4392. <img
  4393. src="../../../assets/icon/thirdToolList/mp3.png"
  4394. alt
  4395. />
  4396. <div style="margin: 5px 0">上传音频</div>
  4397. </div>
  4398. <div
  4399. class="check"
  4400. @click="addTools(42, itemTaskIndex, toolIndex)"
  4401. >
  4402. <img
  4403. src="../../../assets/icon/checkNo.png"
  4404. alt
  4405. v-if="itemTool.tool.indexOf(42) == -1"
  4406. />
  4407. <img
  4408. src="../../../assets/icon/checkedIs.png"
  4409. alt
  4410. v-else
  4411. />
  4412. </div>
  4413. </div> -->
  4414. </div>
  4415. <div class="toolSort" v-if="itemTool.toolType == 3">
  4416. <div class="tool" :class="{
  4417. isToolChoose:
  4418. itemTool.tool.indexOf(18) != -1,
  4419. }" @click="
  4420. addTools(18, itemTaskIndex, toolIndex)
  4421. ">
  4422. <div class="whiteBIcon" @click.stop="
  4423. addTools(18, itemTaskIndex, toolIndex)
  4424. ">
  4425. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4426. <div style="margin: 5px 0">训练平台</div>
  4427. </div>
  4428. <div class="noCTool">
  4429. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4430. </div>
  4431. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4432. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4433. </div>
  4434. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4435. <img src="../../../assets/icon/checkNo.png" alt
  4436. v-if="itemTool.tool.indexOf(18) == -1" />
  4437. <div class="checkDiv" v-else>
  4438. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4439. </div>
  4440. </div> -->
  4441. </div>
  4442. <div class="tool" :class="{
  4443. isToolChoose:
  4444. itemTool.tool.indexOf(21) != -1,
  4445. }" @click="
  4446. addTools(21, itemTaskIndex, toolIndex)
  4447. ">
  4448. <div class="whiteBIcon" @click.stop="
  4449. addTools(21, itemTaskIndex, toolIndex)
  4450. ">
  4451. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4452. <div style="margin: 5px 0">
  4453. AIoT Blockly
  4454. </div>
  4455. </div>
  4456. <div class="noCTool">
  4457. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4458. </div>
  4459. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4460. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4461. </div>
  4462. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4463. <img src="../../../assets/icon/checkNo.png" alt
  4464. v-if="itemTool.tool.indexOf(21) == -1" />
  4465. <div class="checkDiv" v-else>
  4466. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4467. </div>
  4468. </div> -->
  4469. </div>
  4470. <!-- <div class="tool">
  4471. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4472. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4473. <div style="margin: 5px 0">AI体验</div>
  4474. </div>
  4475. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4476. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4477. <div class="checkDiv" v-else>
  4478. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4479. </div>
  4480. </div>
  4481. </div> -->
  4482. <div class="tool" :class="{
  4483. isToolChoose:
  4484. itemTool.tool.indexOf(23) != -1,
  4485. }" @click="
  4486. addTools(23, itemTaskIndex, toolIndex)
  4487. ">
  4488. <div class="whiteBIcon" @click.stop="
  4489. addTools(23, itemTaskIndex, toolIndex)
  4490. ">
  4491. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4492. <div style="margin: 5px 0">AI Python</div>
  4493. </div>
  4494. <div class="noCTool">
  4495. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4496. </div>
  4497. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4498. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4499. </div>
  4500. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4501. <img src="../../../assets/icon/checkNo.png" alt
  4502. v-if="itemTool.tool.indexOf(23) == -1" />
  4503. <div class="checkDiv" v-else>
  4504. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4505. </div>
  4506. </div> -->
  4507. </div>
  4508. <div class="tool" :class="{
  4509. isToolChoose:
  4510. itemTool.tool.indexOf(24) != -1,
  4511. }" @click="
  4512. addTools(24, itemTaskIndex, toolIndex)
  4513. ">
  4514. <div class="whiteBIcon" @click.stop="
  4515. addTools(24, itemTaskIndex, toolIndex)
  4516. ">
  4517. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4518. <div style="margin: 5px 0">
  4519. AI Blockly
  4520. </div>
  4521. </div>
  4522. <div class="noCTool">
  4523. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4524. </div>
  4525. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4526. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4527. </div>
  4528. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4529. <img src="../../../assets/icon/checkNo.png" alt
  4530. v-if="itemTool.tool.indexOf(24) == -1" />
  4531. <div class="checkDiv" v-else>
  4532. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4533. </div>
  4534. </div> -->
  4535. </div>
  4536. <div class="tool" :class="{
  4537. isToolChoose:
  4538. itemTool.tool.indexOf(32) != -1,
  4539. }" @click="
  4540. addTools(32, itemTaskIndex, toolIndex)
  4541. ">
  4542. <div class="whiteBIcon" @click.stop="
  4543. addTools(32, itemTaskIndex, toolIndex)
  4544. ">
  4545. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4546. <div style="margin: 5px 0">源码编辑</div>
  4547. </div>
  4548. <div class="noCTool">
  4549. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4550. </div>
  4551. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4552. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4553. </div>
  4554. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4555. <img src="../../../assets/icon/checkNo.png" alt
  4556. v-if="itemTool.tool.indexOf(32) == -1" />
  4557. <div class="checkDiv" v-else>
  4558. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4559. </div>
  4560. </div> -->
  4561. </div>
  4562. <div class="tool" :class="{
  4563. isToolChoose:
  4564. itemTool.tool.indexOf(57) != -1,
  4565. }" @click="
  4566. addTools(57, itemTaskIndex, toolIndex)
  4567. ">
  4568. <div class="whiteBIcon" @click.stop="
  4569. openTools(itemTaskIndex, 57, toolIndex)
  4570. ">
  4571. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4572. <div style="margin: 5px 0">CocoPi</div>
  4573. </div>
  4574. <div class="noCTool">
  4575. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4576. </div>
  4577. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4578. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4579. </div>
  4580. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4581. <img src="../../../assets/icon/checkNo.png" alt
  4582. v-if="itemTool.tool.indexOf(57) == -1" />
  4583. <div class="checkDiv" v-else>
  4584. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4585. </div>
  4586. </div> -->
  4587. </div>
  4588. <div class="tool" :class="{
  4589. isToolChoose:
  4590. itemTool.tool.indexOf(63) != -1,
  4591. }" @click="
  4592. addTools(63, itemTaskIndex, toolIndex)
  4593. ">
  4594. <div class="whiteBIcon" @click.stop="
  4595. addTools(63, itemTaskIndex, toolIndex)
  4596. ">
  4597. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4598. <div style="margin: 5px 0">海龟编程</div>
  4599. </div>
  4600. <div class="noCTool">
  4601. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4602. </div>
  4603. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4604. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4605. </div>
  4606. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4607. <img src="../../../assets/icon/checkNo.png" alt
  4608. v-if="itemTool.tool.indexOf(63) == -1" />
  4609. <div class="checkDiv" v-else>
  4610. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4611. </div>
  4612. </div> -->
  4613. </div>
  4614. <div class="tool" :class="{
  4615. isToolChoose:
  4616. itemTool.tool.indexOf(71) != -1,
  4617. }" @click="
  4618. addTools(71, itemTaskIndex, toolIndex)
  4619. ">
  4620. <div class="whiteBIcon" @click.stop="
  4621. addTools(71, itemTaskIndex, toolIndex)
  4622. ">
  4623. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4624. <div style="margin: 5px 0">AI智能体</div>
  4625. </div>
  4626. <div class="noCTool">
  4627. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4628. </div>
  4629. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4630. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4631. </div>
  4632. </div>
  4633. </div>
  4634. <div class="toolSort" v-if="itemTool.toolType == 7">
  4635. <div class="tool" :class="{
  4636. isToolChoose:
  4637. itemTool.tool.indexOf(40) != -1,
  4638. }" @click.stop="
  4639. addTools(40, itemTaskIndex, toolIndex)
  4640. ">
  4641. <div class="whiteBIcon" @click.stop="
  4642. openTools(itemTaskIndex, 40, toolIndex)
  4643. ">
  4644. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4645. <div style="margin: 5px 0">个人评价</div>
  4646. </div>
  4647. <div class="noCTool">
  4648. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4649. </div>
  4650. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4651. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4652. </div>
  4653. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4654. <img src="../../../assets/icon/checkNo.png" alt
  4655. v-if="itemTool.tool.indexOf(40) == -1" />
  4656. <div class="checkDiv" v-else>
  4657. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4658. </div>
  4659. </div> -->
  4660. </div>
  4661. </div>
  4662. <div class="toolSort" v-if="itemTool.toolType == 5">
  4663. <div class="tool" :class="{
  4664. isToolChoose:
  4665. itemTool.tool.indexOf(28) != -1,
  4666. }" @click="
  4667. addTools(28, itemTaskIndex, toolIndex)
  4668. ">
  4669. <div class="whiteBIcon" @click.stop="
  4670. addTools(28, itemTaskIndex, toolIndex)
  4671. ">
  4672. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4673. <div style="margin: 5px 0">翻译</div>
  4674. </div>
  4675. <div class="noCTool">
  4676. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4677. </div>
  4678. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4679. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4680. </div>
  4681. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4682. <img src="../../../assets/icon/checkNo.png" alt
  4683. v-if="itemTool.tool.indexOf(28) == -1" />
  4684. <div class="checkDiv" v-else>
  4685. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4686. </div>
  4687. </div> -->
  4688. </div>
  4689. <div class="tool" :class="{
  4690. isToolChoose:
  4691. itemTool.tool.indexOf(31) != -1,
  4692. }" @click="
  4693. addTools(31, itemTaskIndex, toolIndex)
  4694. ">
  4695. <div class="whiteBIcon" @click.stop="
  4696. addTools(31, itemTaskIndex, toolIndex)
  4697. ">
  4698. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4699. <div style="margin: 5px 0">数字画板</div>
  4700. </div>
  4701. <div class="noCTool">
  4702. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4703. </div>
  4704. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4705. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4706. </div>
  4707. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4708. <img src="../../../assets/icon/checkNo.png" alt
  4709. v-if="itemTool.tool.indexOf(31) == -1" />
  4710. <div class="checkDiv" v-else>
  4711. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4712. </div>
  4713. </div> -->
  4714. </div>
  4715. <div class="tool" :class="{
  4716. isToolChoose:
  4717. itemTool.tool.indexOf(39) != -1,
  4718. }" @click="
  4719. addTools(39, itemTaskIndex, toolIndex)
  4720. ">
  4721. <div class="whiteBIcon" @click.stop="
  4722. addTools(39, itemTaskIndex, toolIndex)
  4723. ">
  4724. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4725. <div style="margin: 5px 0">GeoGebra</div>
  4726. </div>
  4727. <div class="noCTool">
  4728. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4729. </div>
  4730. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4731. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4732. </div>
  4733. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4734. <img src="../../../assets/icon/checkNo.png" alt
  4735. v-if="itemTool.tool.indexOf(39) == -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" :class="{
  4742. isToolChoose:
  4743. itemTool.tool.indexOf(66) != -1,
  4744. }" @click="
  4745. addTools(66, itemTaskIndex, toolIndex)
  4746. ">
  4747. <div class="whiteBIcon" @click.stop="
  4748. addTools(66, itemTaskIndex, toolIndex)
  4749. ">
  4750. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4751. <div style="margin: 5px 0">公式编辑</div>
  4752. </div>
  4753. <div class="noCTool">
  4754. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4755. </div>
  4756. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4757. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4758. </div>
  4759. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4760. <img src="../../../assets/icon/checkNo.png" alt
  4761. v-if="itemTool.tool.indexOf(66) == -1" />
  4762. <div class="checkDiv" v-else>
  4763. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4764. </div>
  4765. </div> -->
  4766. </div>
  4767. <!-- <div class="tool">
  4768. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4769. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4770. <div style="margin: 5px 0">分子结构</div>
  4771. </div>
  4772. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4773. <img src="../../../assets/icon/checkNo.png" alt
  4774. v-if="itemTool.tool.indexOf(67) == -1" />
  4775. <div class="checkDiv" v-else>
  4776. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4777. </div>
  4778. </div>
  4779. </div> -->
  4780. <div class="tool" :class="{
  4781. isToolChoose:
  4782. itemTool.tool.indexOf(68) != -1,
  4783. }" @click="
  4784. addTools(68, itemTaskIndex, toolIndex)
  4785. ">
  4786. <div class="whiteBIcon" @click.stop="
  4787. addTools(68, itemTaskIndex, toolIndex)
  4788. ">
  4789. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4790. <div style="margin: 5px 0">时间轴</div>
  4791. </div>
  4792. <div class="noCTool">
  4793. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4794. </div>
  4795. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4796. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4797. </div>
  4798. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4799. <img src="../../../assets/icon/checkNo.png" alt
  4800. v-if="itemTool.tool.indexOf(68) == -1" />
  4801. <div class="checkDiv" v-else>
  4802. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4803. </div>
  4804. </div> -->
  4805. </div>
  4806. <div class="tool" :class="{
  4807. isToolChoose:
  4808. itemTool.tool.indexOf(69) != -1,
  4809. }" @click="
  4810. addTools(69, itemTaskIndex, toolIndex)
  4811. ">
  4812. <div class="whiteBIcon" @click.stop="
  4813. openTools(itemTaskIndex, 69, toolIndex)
  4814. ">
  4815. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4816. <div style="margin: 5px 0">英语写作</div>
  4817. </div>
  4818. <div class="noCTool">
  4819. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4820. </div>
  4821. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4822. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4823. </div>
  4824. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4825. <img src="../../../assets/icon/checkNo.png" alt
  4826. v-if="itemTool.tool.indexOf(4) == -1" />
  4827. <div class="checkDiv" v-else>
  4828. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4829. </div>
  4830. </div> -->
  4831. </div>
  4832. <div class="tool" :class="{
  4833. isToolChoose:
  4834. itemTool.tool.indexOf(70) != -1,
  4835. }" @click="
  4836. addTools(70, itemTaskIndex, toolIndex)
  4837. ">
  4838. <div class="whiteBIcon" @click.stop="
  4839. openTools(itemTaskIndex, 70, toolIndex)
  4840. ">
  4841. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4842. <div style="margin: 5px 0">英语口语</div>
  4843. </div>
  4844. <div class="noCTool">
  4845. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4846. </div>
  4847. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4848. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4849. </div>
  4850. </div>
  4851. <!-- <div class="tool">
  4852. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4853. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4854. <div style="margin: 5px 0">翻译</div>
  4855. </div>
  4856. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4857. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4858. <div class="checkDiv" v-else>
  4859. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4860. </div>
  4861. </div>
  4862. </div>
  4863. <div class="tool">
  4864. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4865. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4866. <div style="margin: 5px 0">魔盒识字</div>
  4867. </div>
  4868. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4869. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4870. <div class="checkDiv" v-else>
  4871. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4872. </div>
  4873. </div>
  4874. </div>
  4875. <div class="tool">
  4876. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4877. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4878. <div style="margin: 5px 0">24点</div>
  4879. </div>
  4880. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4881. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4882. <div class="checkDiv" v-else>
  4883. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4884. </div>
  4885. </div>
  4886. </div>
  4887. <div class="tool">
  4888. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4889. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4890. <div style="margin: 5px 0">数学画板</div>
  4891. </div>
  4892. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4893. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4894. <div class="checkDiv" v-else>
  4895. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4896. </div>
  4897. </div>
  4898. </div>
  4899. <div class="tool">
  4900. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4901. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4902. <div style="margin: 5px 0">GeoGebra</div>
  4903. </div>
  4904. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4905. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4906. <div class="checkDiv" v-else>
  4907. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4908. </div>
  4909. </div>
  4910. </div>
  4911. <div class="tool">
  4912. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4913. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4914. <div style="margin: 5px 0">模拟驾驶</div>
  4915. </div>
  4916. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4917. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4918. <div class="checkDiv" v-else>
  4919. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4920. </div>
  4921. </div>
  4922. </div>
  4923. <div class="tool">
  4924. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4925. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4926. <div style="margin: 5px 0">路径搜索</div>
  4927. </div>
  4928. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4929. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4930. <div class="checkDiv" v-else>
  4931. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4932. </div>
  4933. </div>
  4934. </div>
  4935. <div class="tool">
  4936. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4937. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4938. <div style="margin: 5px 0">深度学习</div>
  4939. </div>
  4940. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4941. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4942. <div class="checkDiv" v-else>
  4943. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4944. </div>
  4945. </div>
  4946. </div>
  4947. <div class="tool">
  4948. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4949. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4950. <div style="margin: 5px 0">全历史</div>
  4951. </div>
  4952. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4953. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4954. <div class="checkDiv" v-else>
  4955. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4956. </div>
  4957. </div>
  4958. </div>
  4959. </div>
  4960. <div class="toolSort" v-if="itemTool.toolType == 4">
  4961. <div class="tool">
  4962. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4963. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4964. <div style="margin: 5px 0">课程设计</div>
  4965. </div>
  4966. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4967. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4968. <div class="checkDiv" v-else>
  4969. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4970. </div>
  4971. </div>
  4972. </div>
  4973. <div class="tool">
  4974. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4975. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4976. <div style="margin: 5px 0">目标管理</div>
  4977. </div>
  4978. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4979. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4980. <div class="checkDiv" v-else>
  4981. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4982. </div>
  4983. </div>
  4984. </div> -->
  4985. <!-- <div class="tool">
  4986. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4987. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4988. <div style="margin: 5px 0">汉字宫</div>
  4989. </div>
  4990. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4991. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4992. <div class="checkDiv" v-else>
  4993. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4994. </div>
  4995. </div>
  4996. </div> -->
  4997. </div>
  4998. </div>
  4999. <!-- v-show="!itemTool.isFold3" -->
  5000. <div class="op_tool_box"
  5001. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  5002. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  5003. class="binfo_input" style="
  5004. margin: 0 0 20px 0;
  5005. width: 100% !important;
  5006. " v-model="itemTool.toolDetail"></textarea>
  5007. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]}">
  5008. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  5009. <div class="op_box_right">
  5010. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5011. <div class="r_pub_button_op"
  5012. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)"
  5013. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)">
  5014. 智能优化</div>
  5015. </el-tooltip>
  5016. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  5017. </div>
  5018. </div>
  5019. </div>
  5020. <evaList
  5021. :toolsData="toolsData"
  5022. :unitJson="unitJson"
  5023. :itemTaskIndex="itemTaskIndex"
  5024. :toolIndex="toolIndex"
  5025. :knowFileids="knowFileids"
  5026. :languageSetting="languageSetting"
  5027. :userid="userid"
  5028. :aiJson="aiJson"
  5029. @setEvaList="setEvaList"
  5030. @addCourseBehavior="addCourseBehavior"
  5031. v-if="panTaskElist() == 0 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  5032. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  5033. </div>
  5034. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具描述-添加按钮`)" style="
  5035. margin: 0 auto;
  5036. padding: 0 30px;
  5037. height: 45px;
  5038. ">
  5039. 添加工具
  5040. </button>
  5041. </div>
  5042. </div>
  5043. <div class="elist_css" v-if="panElist(itemTask) > 0">
  5044. <div class="elist_title">
  5045. <div style=" display: flex; flex-direction: row; align-items: center; margin: 20px 0; ">
  5046. <div class="lineTitle clineTitle" style="width: auto">任务评价体系</div>
  5047. </div>
  5048. <div>
  5049. <MindTask :showBar="false" :mindData="itemTask" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' " :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
  5050. </div>
  5051. </div>
  5052. </div>
  5053. <div class="elist_css" v-if="panTaskElist() > 0"
  5054. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])" element-loading-text="小可正在努力生成中,请稍等...">
  5055. <div class="elist_title">
  5056. <div style="
  5057. display: flex;
  5058. flex-direction: row;
  5059. align-items: center;
  5060. margin: 20px 0;
  5061. ">
  5062. <div class="lineTitle clineTitle">评价设置</div>
  5063. <div style="margin-left:auto;display: flex;">
  5064. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  5065. <div class="r_pub_button_op"
  5066. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5067. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  5068. </el-tooltip>
  5069. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  5070. <div class="r_pub_button_op" style="margin-left:10px;"
  5071. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5072. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  5073. </el-tooltip>
  5074. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5075. <div class="r_pub_button_op" style="margin-left:10px;"
  5076. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5077. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList && itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  5078. </el-tooltip>
  5079. </div>
  5080. <!-- <div class="line" style="width: 90%"></div> -->
  5081. </div>
  5082. </div>
  5083. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5084. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5085. 上传补充资料
  5086. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5087. beforeUploadInfo2(
  5088. $event,
  5089. 18,
  5090. itemTaskIndex
  5091. )
  5092. " />
  5093. </button>
  5094. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5095. <div class="add_chapters_box add_c_none" v-if="
  5096. pingjiaInfoData[itemTaskIndex] &&
  5097. pingjiaInfoData[itemTaskIndex].length == 0
  5098. ">
  5099. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5100. <span>暂时还没有内容,快去添加吧</span>
  5101. </div>
  5102. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5103. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  5104. getChapterData(
  5105. $event,
  5106. index1,
  5107. item1.type
  5108. )
  5109. " >
  5110. <div class="chapter_upload_o" style="
  5111. position: relative;
  5112. display: flex;
  5113. align-items: center;
  5114. ">
  5115. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5116. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5117. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5118. </div>
  5119. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5120. </div>
  5121. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5122. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5123. </div>
  5124. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5125. </div>
  5126. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5127. </div>
  5128. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5129. </div>
  5130. </div>
  5131. <div class="chapter_upload_n">
  5132. <input readonly="true" v-if="
  5133. item1.type == 2 ||
  5134. item1.type == 3 ||
  5135. item1.type == 12 ||
  5136. item1.type == 13 ||
  5137. item1.type == 7
  5138. " :placeholder="item1.name" @click.stop="
  5139. checkChpater3($event, index1, item1)
  5140. " style="
  5141. border: none;
  5142. outline: none;
  5143. width: 80%;
  5144. minwidth: 215px;
  5145. z-index: 99;
  5146. font-size: 14px;
  5147. white-space: nowrap;
  5148. overflow: hidden;
  5149. text-overflow: ellipsis;
  5150. " />
  5151. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5152. border: none;
  5153. outline: none;
  5154. width: 80%;
  5155. white-space: nowrap;
  5156. overflow: hidden;
  5157. text-overflow: ellipsis;
  5158. " readonly="true" @click="
  5159. selectAttText(index1)
  5160. " />
  5161. <input :placeholder="item1.title ? item1.title : '链接'
  5162. " v-if="item1.type == 8" style="
  5163. border: none;
  5164. outline: none;
  5165. width: 80%;
  5166. white-space: nowrap;
  5167. overflow: hidden;
  5168. text-overflow: ellipsis;
  5169. " readonly="true" @click="selectLine(index1)" />
  5170. <input :placeholder="item1.title ? item1.title : '链接'
  5171. " v-if="item1.type == 14" style="
  5172. border: none;
  5173. outline: none;
  5174. width: 80%;
  5175. white-space: nowrap;
  5176. overflow: hidden;
  5177. text-overflow: ellipsis;
  5178. " readonly="true" @click="
  5179. openUpdateSource(index1)
  5180. " />
  5181. </div>
  5182. <div class="chapter_upload_ic">
  5183. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5184. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5185. checkChpater3($event, index1, item1)
  5186. ">
  5187. <div></div>
  5188. </div>
  5189. <div class="chapter_upload_ic_r" @click.stop="
  5190. deletepingjiaInfoData(
  5191. $event,
  5192. index1,
  5193. itemTaskIndex
  5194. )
  5195. ">
  5196. <div></div>
  5197. </div>
  5198. </div>
  5199. </div>
  5200. </div>
  5201. </div>
  5202. </div>
  5203. <div v-if="
  5204. pingjiainfoproVisible[itemTaskIndex]
  5205. " class="mask">
  5206. <div class="progressBox">
  5207. <div class="lbox">
  5208. <img src="../../../assets/loading.gif" />上传中,请稍后
  5209. </div>
  5210. <div style="margin-bottom: 10px">
  5211. <span>{{
  5212. pingjiainfoisFinishSize[itemTaskIndex]
  5213. }}</span>
  5214. /
  5215. <span>{{
  5216. pingjiainfoisAllSize[itemTaskIndex]
  5217. }}</span>
  5218. </div>
  5219. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5220. ? pingjiainfoprogress[itemTaskIndex]
  5221. : 0
  5222. " style="width: 80%"></el-progress> -->
  5223. </div>
  5224. </div>
  5225. </div>
  5226. <div class="mbCss">
  5227. <div class="pjCss" :style="{
  5228. width: itemTask.isEvaFold
  5229. ? 'calc(100% - 55%)'
  5230. : 'calc(100% - 120px)',
  5231. }">
  5232. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5233. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5234. <div class="elist_inptu_text">
  5235. <span>目标:</span>
  5236. <!-- <span>核心素养:</span> -->
  5237. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  5238. <el-switch
  5239. @change="forceUpdate"
  5240. class="rateSwitch"
  5241. style="margin-left: auto;"
  5242. v-model="itemTask.eList[eIndex].isai"
  5243. active-color="#0061FF"
  5244. active-text="AI评分"
  5245. inactive-text=""
  5246. active-value="1"
  5247. inactive-value="2">
  5248. </el-switch>
  5249. </div>
  5250. <div class="elist_inptu_text" v-show="false">
  5251. <!-- <span>评价维度:</span> -->
  5252. <span>能力:</span>
  5253. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5254. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5255. <!-- </el-tooltip> -->
  5256. <!-- <span>评星等级:</span>
  5257. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5258. disabled></el-rate> -->
  5259. <div class="remove" @click="
  5260. deletEList(
  5261. unitIndex,
  5262. itemTaskIndex,
  5263. eIndex
  5264. )
  5265. "></div>
  5266. </div>
  5267. <div class="elist_inptu_text">
  5268. <!-- <span>维度描述:</span> -->
  5269. <span>评价标准:</span>
  5270. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5271. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5272. <div class="remove" @click="
  5273. deletEList(
  5274. unitIndex,
  5275. itemTaskIndex,
  5276. eIndex
  5277. )
  5278. "></div>
  5279. <!-- </el-tooltip> -->
  5280. </div>
  5281. <div class="elist_inptu_text" v-if="evalua">
  5282. <span>目标:</span>
  5283. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5284. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5285. @change="forceUpdate()">
  5286. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5287. :value="e.name">
  5288. </el-option>
  5289. </el-select> -->
  5290. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5291. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5292. </div>
  5293. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5294. <span>评价细则:</span>
  5295. <div style="width: calc(100%);">
  5296. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5297. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5298. <div class="ruleBtn"
  5299. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5300. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5301. </el-tooltip>
  5302. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5303. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5304. <div class="op_box">
  5305. <div class="op_remark"></div>
  5306. <div class="op_box_right">
  5307. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5308. <div class="r_pub_button_op"
  5309. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5310. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5311. </el-tooltip>
  5312. </div>
  5313. </div>
  5314. </div>
  5315. </div>
  5316. </div>
  5317. </div>
  5318. </div>
  5319. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5320. style="margin: 35px 35px 0 0">
  5321. <div class="addToolImg">
  5322. <img src="../../../assets/icon/add.png" alt />
  5323. </div>
  5324. <div>添加</div>
  5325. </div> -->
  5326. <div class="eva_btn_box">
  5327. <div class="eva_btn_left_box">
  5328. <button class="c_pub_button_add pub_btn_eval_img"
  5329. @click="addEList(unitIndex, itemTaskIndex)">
  5330. 添加
  5331. </button>
  5332. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5333. @click="openEList(unitIndex, itemTaskIndex)">
  5334. 资源
  5335. </button> -->
  5336. </div>
  5337. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5338. v-if="itemTask.eList && itemTask.eList.length">
  5339. 添加资源模板
  5340. </button>
  5341. </div>
  5342. </div>
  5343. <div v-if="evalua" style="
  5344. border: 1px solid #e5e5e5;
  5345. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5346. " :style="{
  5347. width: itemTask.isEvaFold ? '55%' : '116px',
  5348. }" class="evaCss">
  5349. <!-- <div class="e_add_top">
  5350. <div class="e_add_title">
  5351. <span>当前使用目标管理</span>
  5352. <span>{{ eTitle }}</span>
  5353. <img src="../../../assets/line.png" class="cru_line" style="
  5354. width: 125px;
  5355. height: 20px;
  5356. bottom: -10px;
  5357. left: 155px;
  5358. " />
  5359. </div>
  5360. </div> -->
  5361. <div class="e_add_content" style="width: 100%">
  5362. <div class="e_add_list_pbox" style="width: 100%">
  5363. <div class="e_add_list_pbox_title">
  5364. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5365. <div class="type_content" v-if="itemTask.isEvaFold">
  5366. <span :class="{ active: typeMode == 1 }"
  5367. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5368. <span :class="{ active: typeMode == 2 }"
  5369. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5370. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5371. </div>
  5372. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5373. @click="foldEva(itemTaskIndex)">
  5374. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5375. </div>
  5376. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5377. @click="foldEva(itemTaskIndex)">
  5378. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5379. </div>
  5380. </div>
  5381. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5382. style="min-height: 200px">
  5383. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5384. " v-if="typeMode == 1"></Mind>
  5385. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5386. </Sunburst>
  5387. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5388. v-if="typeMode == 3"></SeeBoard>
  5389. </div>
  5390. </div>
  5391. </div>
  5392. </div>
  5393. </div>
  5394. </div>
  5395. <div class="funBlock" style="padding: 0">
  5396. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5397. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5398. <div>
  5399. {{
  5400. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5401. }}
  5402. </div>
  5403. </div>
  5404. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5405. <div>展开</div>
  5406. <div class="arrow">
  5407. <img src="../../../assets/icon/expand.png" alt />
  5408. </div>
  5409. </div> -->
  5410. </div>
  5411. </div>
  5412. </div>
  5413. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5414. <!-- <div>
  5415. <img src="../../../../assets/icon/new/addStage.png" alt />
  5416. <span>添加任务</span>
  5417. </div> -->
  5418. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5419. 添加任务
  5420. </button>
  5421. </div>
  5422. </div>
  5423. <div class="info_btnBox3">
  5424. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5425. goTo(
  5426. '/course?userid=' +
  5427. userid +
  5428. '&oid=' +
  5429. oid +
  5430. '&org=' +
  5431. org +
  5432. '&role=' +
  5433. role
  5434. )
  5435. ">
  5436. 返回课程
  5437. </button>
  5438. <button class="c_pub_button_return pub_btn_last_img"
  5439. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5440. {{ steps == 4 ? "返回课程" : "上一步" }}
  5441. </button>
  5442. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5443. pub_btn_next_img: steps != 3,
  5444. pub_btn_finish_img: steps == 3,
  5445. }">
  5446. {{ steps == 3 ? "确认上传" : "下一步" }}
  5447. </button>
  5448. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5449. '修改模板' : '保存模板'}}</button>
  5450. </div>
  5451. </div>
  5452. </div>
  5453. </div>
  5454. </div>
  5455. <div style="
  5456. width: calc(100% - 20px);
  5457. background: rgb(255, 255, 255);
  5458. border-radius: 10px;
  5459. " v-if="steps == 4">
  5460. <div class="basic_box_success">
  5461. <div class="right_img">
  5462. <img src="../../../assets/icon/right.png" alt />
  5463. </div>
  5464. <div style="font-weight: bold">成功</div>
  5465. <!-- <div>您的课程编号</div>
  5466. <div class="number">{{ number }}</div>-->
  5467. <!-- <div class="success_button">
  5468. <div class="look_course" @click="isNoFinsh">
  5469. 邀请老师协同编辑
  5470. </div>
  5471. <div class="attend_others" @click="goCourse">预览课程</div>
  5472. </div> -->
  5473. </div>
  5474. </div>
  5475. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5476. @mouseleave="btnDisplay(false)" v-if="false">
  5477. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5478. goTo(
  5479. '/course?userid=' +
  5480. userid +
  5481. '&oid=' +
  5482. oid +
  5483. '&org=' +
  5484. org +
  5485. '&role=' +
  5486. role
  5487. )
  5488. ">
  5489. 返回课程
  5490. </button>
  5491. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5492. @click="lastSteps">
  5493. {{ steps == 4 ? "返回课程" : "上一步" }}
  5494. </button>
  5495. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5496. pub_btn_next_img: steps != 3,
  5497. pub_btn_finish_img: steps == 3,
  5498. }">
  5499. {{ steps == 3 ? "确认上传" : "下一步" }}
  5500. </button>
  5501. </div>
  5502. </div>
  5503. </div>
  5504. <div class="leftBar" v-if="istemplate == 1">
  5505. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5506. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5507. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5508. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5509. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5510. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5511. <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'"/>
  5512. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5513. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5514. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5515. <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'"/>
  5516. <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'"/>
  5517. <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'"/>
  5518. <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'"/>
  5519. <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'"/>
  5520. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5521. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5522. @setAiJson="setAiJson" /> -->
  5523. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5524. @setAiJson="setAiJson" />
  5525. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5526. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5527. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5528. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5529. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5530. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5531. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5532. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5533. </div>
  5534. <div class="leftBar2 resizable" v-show="istemplate != 1 && isDialog == 1 && chatid && isDisplay">
  5535. <div class="resizer"></div>
  5536. <aiBoxRight
  5537. :languageSetting="languageSetting"
  5538. :courseId="chatid"
  5539. :unitJson="unitJson"
  5540. :quoteArray="isQuote"
  5541. :teacherCourseText="teacherCourseText"
  5542. :targetCourseText="targetCourseText"
  5543. :courseText2="courseText"
  5544. :targetCourseText2="targetCourseText2"
  5545. :cpote="cpote"
  5546. @addCourseBehavior="addCourseBehavior"
  5547. @setIsQuote="setIsQuote"></aiBoxRight>
  5548. </div>
  5549. <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''" v-show="istemplate != 1 && isDialog == 1 && chatid">
  5550. <img src="../../../assets/icon/course/arrow.svg" >
  5551. </div>
  5552. </div>
  5553. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5554. class="dialog_diy2 customWidth">
  5555. <div>请复制该链接邀请协同编辑</div>
  5556. <div>http://www.boomyon.com/index-zhang.com</div>
  5557. <span slot="footer" class="dialog-footer">
  5558. <el-button type="primary">复制链接分享</el-button>
  5559. <el-button @click="dialogVisible = false">取消</el-button>
  5560. </span>
  5561. </el-dialog>
  5562. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5563. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5564. <el-form>
  5565. <el-form-item label="文档标题">
  5566. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5567. </el-form-item>
  5568. <div>文档简介</div>
  5569. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5570. </el-form>
  5571. <span slot="footer" class="dialog-footer">
  5572. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5573. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5574. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5575. </span>
  5576. </el-dialog>
  5577. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5578. :before-close="handleClose" class="dialog_diy">
  5579. <el-form>
  5580. <el-form-item label="文档标题">
  5581. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5582. </el-form-item>
  5583. <div>文档内容</div>
  5584. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5585. </el-form>
  5586. <span slot="footer" class="dialog-footer">
  5587. <el-button @click="clearChoose">取 消</el-button>
  5588. <el-button type="primary" @click="wordNext()">确定</el-button>
  5589. </span>
  5590. </el-dialog>
  5591. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5592. :before-close="handleClose" class="dialog_diy">
  5593. <el-form>
  5594. <el-form-item label="文本标题">
  5595. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5596. placeholder="请输入文本标题..."></el-input>
  5597. </el-form-item>
  5598. <!-- <div>富文本内容</div> -->
  5599. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5600. </el-form>
  5601. <span slot="footer" class="dialog-footer">
  5602. <el-button @click="clearAttText">取 消</el-button>
  5603. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5604. </span>
  5605. </el-dialog>
  5606. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5607. :before-close="handleClose" class="dialog_diy lineCss">
  5608. <el-form>
  5609. <el-form-item label="标题" :label-width="formLabelWidth">
  5610. <span>
  5611. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5612. </span>
  5613. </el-form-item>
  5614. <el-form-item label="链接" :label-width="formLabelWidth">
  5615. <span>
  5616. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5617. </span>
  5618. </el-form-item>
  5619. </el-form>
  5620. <span slot="footer" class="dialog-footer">
  5621. <el-button @click="clearLine">取 消</el-button>
  5622. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5623. </span>
  5624. </el-dialog>
  5625. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5626. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5627. <div>
  5628. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5629. </div>
  5630. <span slot="footer" class="dialog-footer">
  5631. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5632. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5633. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5634. </span>
  5635. </el-dialog>
  5636. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5637. :before-close="handleClose" class="addNewPP customWidth">
  5638. <div class="people">
  5639. <div class="people_top">
  5640. <div class="people_nav">选择成员</div>
  5641. <div class="people_top_right">
  5642. <div class="people_search">
  5643. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5644. <div class="search_img" @click="searchStudent">
  5645. <img src="../../../assets/icon/search.png" alt />
  5646. </div>
  5647. </div>
  5648. </div>
  5649. </div>
  5650. <el-checkbox-group v-model="checkboxList" class="people_name">
  5651. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5652. "暂无学生可选" }}</el-checkbox>
  5653. </el-checkbox-group>
  5654. </div>
  5655. <span slot="footer" class="dialog-footer">
  5656. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5657. <el-button type="primary" @click="isAddPP">确定</el-button>
  5658. </span>
  5659. </el-dialog>
  5660. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5661. :before-close="handleClose" class="addNewPP2">
  5662. <div class="check_classBox">
  5663. <div class="check_class_right">
  5664. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5665. 全部
  5666. </div>
  5667. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5668. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5669. {{ item.name }}
  5670. </div>
  5671. </el-tooltip>
  5672. </div>
  5673. <div class="check_class_left">
  5674. <div class="check_class_all_box">
  5675. <div class="check_class_left_title">选择班级</div>
  5676. <div style="display: flex; align-items: center; margin-left: auto">
  5677. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5678. </div>
  5679. </div>
  5680. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5681. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5682. </div> -->
  5683. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5684. v-if="grade2.length">
  5685. <div v-for="item in grade2" :key="item.id" class="class_item">
  5686. <el-checkbox :label="item.id">
  5687. {{ item.name }}
  5688. </el-checkbox>
  5689. </div>
  5690. </el-checkbox-group>
  5691. <div v-if="!grade2.length">暂无数据</div>
  5692. </div>
  5693. </div>
  5694. <span slot="footer" class="dialog-footer">
  5695. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5696. <el-button type="primary" @click="isAddClass">确定</el-button>
  5697. </span>
  5698. </el-dialog>
  5699. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5700. :before-close="handleClose" class="addNewPP customWidth">
  5701. <div style="display: flex;justify-content: space-between;">
  5702. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5703. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5704. 全部
  5705. </div>
  5706. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5707. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5708. <el-tooltip placement="top" :content="i.name">
  5709. <span>{{i.name}}</span>
  5710. </el-tooltip>
  5711. </div>
  5712. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5713. 其他
  5714. </div>
  5715. </div>
  5716. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5717. <div class="people">
  5718. <div class="people_top">
  5719. <div class="people_top_right">
  5720. <div class="people_search">
  5721. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5722. <div class="search_img" @click="getTeacher(collid)">
  5723. <img src="../../../assets/icon/search.png" alt />
  5724. </div>
  5725. </div>
  5726. </div>
  5727. <div class="people_nav" style="display: flex; align-items: center">
  5728. <div class="check_class_left_title">选择成员</div>
  5729. <div style="display: flex; align-items: center; margin-left: auto">
  5730. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5731. </div>
  5732. </div>
  5733. </div>
  5734. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5735. @change="InviteChange2">
  5736. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5737. <div class="t_j_box">
  5738. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5739. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5740. </el-tooltip>
  5741. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5742. <span>{{ item.username.split('@')[0] }}</span>
  5743. </el-tooltip>
  5744. <el-tooltip placement="top" :content="item.school">
  5745. <span>{{ item.school }}</span>
  5746. </el-tooltip>
  5747. </div>
  5748. </el-checkbox>
  5749. </el-checkbox-group>
  5750. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5751. </div>
  5752. </div>
  5753. </div>
  5754. <span slot="footer" class="dialog-footer">
  5755. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5756. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5757. </span>
  5758. </el-dialog>
  5759. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5760. closePan(4);
  5761. }
  5762. " class="dialog_diy fullStyle">
  5763. <div style="height: 100%">
  5764. <div class="a_add_title" style="
  5765. display: flex;
  5766. flex-direction: row;
  5767. align-items: center;
  5768. justify-content: center;
  5769. ">
  5770. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5771. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5772. </div>
  5773. <div class="a_addBox" style="height: calc(100% - 50px)">
  5774. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5775. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5776. <div class="a_add_checkType">
  5777. <span :class="{
  5778. active:
  5779. askJson.askJson[index1].type == '1' ||
  5780. !askJson.askJson[index1].type,
  5781. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5782. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5783. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5784. </div>
  5785. <div class="a_add_head">
  5786. <div style="
  5787. display: flex;
  5788. align-items: center;
  5789. width: 100%;
  5790. margin-right: 20px;
  5791. ">
  5792. <span style="min-width: fit-content">{{
  5793. index1 + 1 + "、"
  5794. }}</span>
  5795. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5796. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5797. $forceUpdate();
  5798. }
  5799. "></textarea>
  5800. </div>
  5801. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5802. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5803. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5804. </div>
  5805. <div class="a_add_head_div">
  5806. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5807. </el-button>
  5808. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5809. </div>
  5810. </div>
  5811. <div class="a_add_body">
  5812. <div class="a_add_input" style="flex-direction: column">
  5813. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5814. margin: 20px 10px 0 0;
  5815. display: flex;
  5816. align-items: center;
  5817. position: relative;
  5818. ">
  5819. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5820. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5821. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5822. @change="() => {
  5823. $forceUpdate();
  5824. }
  5825. "></textarea>
  5826. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5827. v-if="askJson.askJson[index1].askItem != 1">
  5828. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5829. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5830. </div>
  5831. <div class="a_add_body_div">
  5832. <el-button type="primary" size="small"
  5833. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5834. <el-button type="primary" size="small" @click="
  5835. deletecheckList(askJson.askJson[index1], checkIndex)
  5836. " v-if="askJson.askJson[index1].askItem != 1">删除
  5837. </el-button>
  5838. </div>
  5839. </div>
  5840. </div>
  5841. <!-- <div class="a_add_body_div">
  5842. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5843. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5844. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5845. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5846. </el-button>
  5847. </div> -->
  5848. </div>
  5849. </div>
  5850. </div>
  5851. </div>
  5852. <span slot="footer" class="dialog-footer">
  5853. <el-button @click="closePan(4)">取 消</el-button>
  5854. <el-button type="primary" @click="addAsk">确 定</el-button>
  5855. </span>
  5856. </el-dialog>
  5857. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5858. closePan(45);
  5859. }
  5860. " class="dialog_diy fullStyle">
  5861. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5862. <!-- <div class="a_add_title" style="
  5863. display: flex;
  5864. flex-direction: row;
  5865. align-items: center;
  5866. justify-content: center;
  5867. ">
  5868. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5869. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5870. </div> -->
  5871. <div class="a_addBox" style="height: 100%">
  5872. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5873. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5874. 上传补充资料
  5875. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5876. beforeUploadInfo2(
  5877. $event,
  5878. 17
  5879. )
  5880. " />
  5881. </button>
  5882. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  5883. <div class="add_chapters_box add_c_none" v-if="
  5884. xuanzeInfoData &&
  5885. xuanzeInfoData.length == 0
  5886. ">
  5887. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5888. <span>暂时还没有内容,快去添加吧</span>
  5889. </div>
  5890. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5891. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  5892. getChapterData(
  5893. $event,
  5894. index1,
  5895. item1.type
  5896. )
  5897. " >
  5898. <div class="chapter_upload_o" style="
  5899. position: relative;
  5900. display: flex;
  5901. align-items: center;
  5902. ">
  5903. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5904. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5905. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5906. </div>
  5907. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5908. </div>
  5909. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5910. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5911. </div>
  5912. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5913. </div>
  5914. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5915. </div>
  5916. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5917. </div>
  5918. </div>
  5919. <div class="chapter_upload_n">
  5920. <input readonly="true" v-if="
  5921. item1.type == 2 ||
  5922. item1.type == 3 ||
  5923. item1.type == 12 ||
  5924. item1.type == 13 ||
  5925. item1.type == 7
  5926. " :placeholder="item1.name" @click.stop="
  5927. checkChpater3($event, index1, item1)
  5928. " style="
  5929. border: none;
  5930. outline: none;
  5931. width: 80%;
  5932. minwidth: 215px;
  5933. z-index: 99;
  5934. font-size: 14px;
  5935. white-space: nowrap;
  5936. overflow: hidden;
  5937. text-overflow: ellipsis;
  5938. " />
  5939. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5940. border: none;
  5941. outline: none;
  5942. width: 80%;
  5943. white-space: nowrap;
  5944. overflow: hidden;
  5945. text-overflow: ellipsis;
  5946. " readonly="true" @click="
  5947. selectAttText(index1)
  5948. " />
  5949. <input :placeholder="item1.title ? item1.title : '链接'
  5950. " v-if="item1.type == 8" style="
  5951. border: none;
  5952. outline: none;
  5953. width: 80%;
  5954. white-space: nowrap;
  5955. overflow: hidden;
  5956. text-overflow: ellipsis;
  5957. " readonly="true" @click="selectLine(index1)" />
  5958. <input :placeholder="item1.title ? item1.title : '链接'
  5959. " v-if="item1.type == 14" style="
  5960. border: none;
  5961. outline: none;
  5962. width: 80%;
  5963. white-space: nowrap;
  5964. overflow: hidden;
  5965. text-overflow: ellipsis;
  5966. " readonly="true" @click="
  5967. openUpdateSource(index1)
  5968. " />
  5969. </div>
  5970. <div class="chapter_upload_ic">
  5971. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5972. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5973. checkChpater3($event, index1, item1)
  5974. ">
  5975. <div></div>
  5976. </div>
  5977. <div class="chapter_upload_ic_r" @click.stop="
  5978. deletexuanzeInfoData(
  5979. $event,
  5980. index1
  5981. )
  5982. ">
  5983. <div></div>
  5984. </div>
  5985. </div>
  5986. </div>
  5987. </div>
  5988. </div>
  5989. </div>
  5990. <div v-if="
  5991. xuanzeinfoproVisible
  5992. " class="mask">
  5993. <div class="progressBox">
  5994. <div class="lbox">
  5995. <img src="../../../assets/loading.gif" />上传中,请稍后
  5996. </div>
  5997. <div style="margin-bottom: 10px">
  5998. <span>{{
  5999. xuanzeinfoisFinishSize
  6000. }}</span>
  6001. /
  6002. <span>{{
  6003. xuanzeinfoisAllSize
  6004. }}</span>
  6005. </div>
  6006. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6007. ? xuanzeinfoprogress
  6008. : 0
  6009. " style="width: 80%"></el-progress> -->
  6010. </div>
  6011. </div>
  6012. </div>
  6013. <div style="
  6014. font-size: 16px;
  6015. color: #c7c7c7;
  6016. display: flex;
  6017. align-items: center;
  6018. justify-content: flex-end;
  6019. ">
  6020. <!-- 请输入题目内容 -->
  6021. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6022. 智能生成
  6023. </button>
  6024. <!-- 请输入题目内容 -->
  6025. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6026. v-if="isPasteChoice">
  6027. 智能粘贴
  6028. </button>
  6029. </div>
  6030. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6031. <div class="a_add_checkType">
  6032. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6033. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  6034. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6035. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  6036. </div>
  6037. <div class="a_add_head">
  6038. <div class="timuUpImg">
  6039. <div style="display: flex; align-items: center">
  6040. <span style="min-width: fit-content">{{
  6041. index1 + 1 + "、"
  6042. }}</span>
  6043. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6044. placeholder="请输入题目">
  6045. </el-input> -->
  6046. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6047. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  6048. $forceUpdate();
  6049. }
  6050. "></textarea>
  6051. </div>
  6052. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6053. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6054. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6055. </div>
  6056. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6057. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6058. <input type="file" accept="image/*" style="display: none"
  6059. @change="beforeUploadTiMu($event, index1)" />
  6060. </div>
  6061. </div>
  6062. <div class="a_add_head_div">
  6063. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  6064. </el-button>
  6065. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  6066. </div>
  6067. </div>
  6068. <div class="timuImgBox" v-if="
  6069. testJson.testJson[index1].timuList &&
  6070. testJson.testJson[index1].timuList.length
  6071. ">
  6072. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6073. @click.stop="previewImg(timg.src)">
  6074. <img :src="timg.src" alt="" />
  6075. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6076. <img src="../../../assets/icon/delete.png" alt="" />
  6077. </div>
  6078. </div>
  6079. </div>
  6080. <div class="a_add_body">
  6081. <div class="a_add_input a_add_input_choice">
  6082. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6083. @change="() => {
  6084. $forceUpdate();
  6085. }
  6086. ">
  6087. <div class="radioBox">
  6088. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6089. .testItem" :key="checkIndex" :label="checkIndex">
  6090. <div style="margin-right: 10px">
  6091. 选项{{ checkIndex + 1 }}
  6092. </div>
  6093. <div style="margin-right: 10px; width: 300px" v-if="
  6094. testJson.testJson[index1].checkList[checkIndex] &&
  6095. testJson.testJson[index1].checkList[checkIndex]
  6096. .imgType &&
  6097. testJson.testJson[index1].checkList[checkIndex]
  6098. .imgType == 1
  6099. ">
  6100. <div class="inImg" @click.stop="
  6101. previewImg(
  6102. testJson.testJson[index1].checkList[checkIndex]
  6103. .src
  6104. )
  6105. ">
  6106. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6107. .src
  6108. " lazy />
  6109. <!-- <img :src="
  6110. testJson.testJson[index1].checkList[checkIndex]
  6111. .src
  6112. " alt="" /> -->
  6113. </div>
  6114. </div>
  6115. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6116. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6117. $forceUpdate();
  6118. }
  6119. "></textarea>
  6120. <div class="xzUpImg" @click.stop="addImg($event)">
  6121. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6122. <input type="file" accept="image/*" style="display: none"
  6123. @change="beforeUploadTi($event, index1, checkIndex)" />
  6124. </div>
  6125. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6126. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6127. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6128. </div>
  6129. <div class="a_add_body_div">
  6130. <el-button type="primary" size="small" @click.stop="
  6131. addTcheckList(testJson.testJson[index1], checkIndex)
  6132. ">添加</el-button>
  6133. <el-button type="primary" size="small" @click.stop="
  6134. deleteTcheckList(
  6135. testJson.testJson[index1],
  6136. checkIndex
  6137. )
  6138. " v-if="testJson.testJson[index1].testItem != 1">删除
  6139. </el-button>
  6140. </div>
  6141. </el-radio>
  6142. </div>
  6143. </el-radio-group>
  6144. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6145. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6146. $forceUpdate();
  6147. }
  6148. ">
  6149. <div class="radioBox">
  6150. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6151. .testItem" :key="checkIndex1" :label="checkIndex1">
  6152. <div style="margin-right: 10px">
  6153. 选项{{ checkIndex1 + 1 }}
  6154. </div>
  6155. <div style="margin-right: 10px; width: 300px" v-if="
  6156. testJson.testJson[index1].checkList[checkIndex1] &&
  6157. testJson.testJson[index1].checkList[checkIndex1]
  6158. .imgType &&
  6159. testJson.testJson[index1].checkList[checkIndex1]
  6160. .imgType == 1
  6161. ">
  6162. <div class="inImg" @click.stop="
  6163. previewImg(
  6164. testJson.testJson[index1].checkList[checkIndex1]
  6165. .src
  6166. )
  6167. ">
  6168. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6169. .src
  6170. " lazy />
  6171. <!-- <img :src="
  6172. testJson.testJson[index1].checkList[checkIndex1]
  6173. .src
  6174. " alt="" /> -->
  6175. </div>
  6176. </div>
  6177. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6178. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6179. $forceUpdate();
  6180. }
  6181. "></textarea>
  6182. <div class="xzUpImg" @click.stop="addImg($event)">
  6183. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6184. <input type="file" accept="image/*" style="display: none"
  6185. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6186. </div>
  6187. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6188. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6189. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6190. </div>
  6191. <div class="a_add_body_div">
  6192. <el-button type="primary" size="small" @click.stop="
  6193. addTcheckList(
  6194. testJson.testJson[index1],
  6195. checkIndex1
  6196. )
  6197. ">添加</el-button>
  6198. <el-button type="primary" size="small" @click.stop="
  6199. deleteTcheckList(
  6200. testJson.testJson[index1],
  6201. checkIndex1
  6202. )
  6203. " v-if="testJson.testJson[index1].testItem != 1">删除
  6204. </el-button>
  6205. </div>
  6206. </el-checkbox>
  6207. </div>
  6208. </el-checkbox-group>
  6209. </div>
  6210. <!-- <div class="a_add_body_div">
  6211. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6212. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6213. v-if="testJson.testJson[index1].testItem != 1">删除
  6214. </el-button>
  6215. </div> -->
  6216. </div>
  6217. </div>
  6218. </div>
  6219. </div>
  6220. <span slot="footer" class="dialog-footer">
  6221. <el-button @click="closePan(45)">取 消</el-button>
  6222. <el-button type="primary" @click="addTest">确 定</el-button>
  6223. </span>
  6224. </el-dialog>
  6225. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6226. :before-close="handleClose" class="dialog_diy addToolsDia">
  6227. <div class="toolChoose">
  6228. <div class="tools">
  6229. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6230. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6231. <div style="
  6232. display: flex;
  6233. flex-direction: row;
  6234. align-items: baseline;
  6235. flex-wrap: nowrap;
  6236. justify-content: flex-start;
  6237. position: relative;
  6238. ">
  6239. <div class="chooseWho">
  6240. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6241. 互动类
  6242. </div>
  6243. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6244. 思维类
  6245. </div>
  6246. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6247. 评价类
  6248. </div>
  6249. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6250. 其他
  6251. </div>
  6252. </div>
  6253. </div>
  6254. <div style="min-height: 163px">
  6255. <div class="toolSort" v-if="chapToolsType == 0">
  6256. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6257. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6258. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6259. <div style="margin: 5px 0">素材库</div>
  6260. </div>
  6261. <div class="noCTool">
  6262. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6263. </div>
  6264. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6265. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6266. </div>
  6267. <!-- <div class="check" @click="chapAddTools(8)">
  6268. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6269. <div class="checkDiv" v-else>
  6270. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6271. </div>
  6272. </div> -->
  6273. </div>
  6274. </div>
  6275. <div class="toolSort" v-if="chapToolsType == 1">
  6276. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6277. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6278. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6279. <div style="margin: 5px 0">思维网格</div>
  6280. </div>
  6281. <div class="noCTool">
  6282. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6283. </div>
  6284. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6285. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6286. </div>
  6287. <!-- <div class="check" @click="chapAddTools(7)">
  6288. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6289. <div class="checkDiv" v-else>
  6290. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6291. </div>
  6292. </div> -->
  6293. </div>
  6294. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6295. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6296. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6297. <div style="margin: 5px 0">电子白板</div>
  6298. </div>
  6299. <div class="noCTool">
  6300. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6301. </div>
  6302. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6303. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6304. </div>
  6305. <!-- <div class="check" @click="chapAddTools(1)">
  6306. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6307. <div class="checkDiv" v-else>
  6308. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6309. </div>
  6310. </div> -->
  6311. </div>
  6312. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6313. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6314. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6315. <div style="margin: 5px 0">便签</div>
  6316. </div>
  6317. <div class="noCTool">
  6318. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6319. </div>
  6320. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6321. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6322. </div>
  6323. <!-- <div class="check" @click="chapAddTools(2)">
  6324. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6325. <div class="checkDiv" v-else>
  6326. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6327. </div>
  6328. </div> -->
  6329. </div>
  6330. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6331. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6332. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6333. <div style="margin: 5px 0">协同文档</div>
  6334. </div>
  6335. <div class="noCTool">
  6336. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6337. </div>
  6338. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6339. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6340. </div>
  6341. <!-- <div class="check" @click="chapAddTools(6)">
  6342. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6343. <div class="checkDiv" v-else>
  6344. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6345. </div>
  6346. </div> -->
  6347. </div>
  6348. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6349. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6350. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6351. <div style="margin: 5px 0">思维导图</div>
  6352. </div>
  6353. <div class="noCTool">
  6354. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6355. </div>
  6356. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6357. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6358. </div>
  6359. <!-- <div class="check" @click="chapAddTools(3)">
  6360. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6361. <div class="checkDiv" v-else>
  6362. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6363. </div>
  6364. </div> -->
  6365. </div>
  6366. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6367. @click="chapAddTools(31)">
  6368. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6369. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6370. <div style="margin: 5px 0">数学画板</div>
  6371. </div>
  6372. <div class="noCTool">
  6373. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6374. </div>
  6375. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6376. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6377. </div>
  6378. <!-- <div class="check" @click="chapAddTools(31)">
  6379. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6380. <div class="checkDiv" v-else>
  6381. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6382. </div>
  6383. </div> -->
  6384. </div>
  6385. </div>
  6386. <div class="toolSort" v-if="chapToolsType == 2">
  6387. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6388. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6389. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6390. <div style="margin: 5px 0">量规评分</div>
  6391. </div>
  6392. <div class="noCTool">
  6393. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6394. </div>
  6395. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6396. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6397. </div>
  6398. <!-- <div class="check" @click="chapAddTools(5)">
  6399. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6400. <div class="checkDiv" v-else>
  6401. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6402. </div>
  6403. </div> -->
  6404. </div>
  6405. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6406. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6407. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6408. <div style="margin: 5px 0">问卷调查</div>
  6409. </div>
  6410. <div class="noCTool">
  6411. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6412. </div>
  6413. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6414. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6415. </div>
  6416. <!-- <div class="check" @click="chapAddTools(4)">
  6417. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6418. <div class="checkDiv" v-else>
  6419. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6420. </div>
  6421. </div> -->
  6422. </div>
  6423. </div>
  6424. </div>
  6425. <div>
  6426. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6427. v-model="itemTools.toolDetail" />
  6428. </div>
  6429. </div>
  6430. </div>
  6431. </div>
  6432. <span slot="footer" class="dialog-footer">
  6433. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6434. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6435. </span>
  6436. </el-dialog>
  6437. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6438. closePan(15);
  6439. }
  6440. " class="dialog_diy">
  6441. <div>
  6442. <div class="a_add_title" style="
  6443. display: flex;
  6444. flex-direction: column;
  6445. align-items: flex-start;
  6446. justify-content: center;
  6447. ">
  6448. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6449. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6450. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6451. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6452. </div>
  6453. </div>
  6454. <span slot="footer" class="dialog-footer">
  6455. <el-button @click="closePan(15)">取 消</el-button>
  6456. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6457. </span>
  6458. </el-dialog>
  6459. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6460. :before-close="handleClose" class="dialog_diy">
  6461. <div>
  6462. <div class="a_add_title" style="
  6463. display: flex;
  6464. flex-direction: column;
  6465. align-items: flex-start;
  6466. justify-content: center;
  6467. ">
  6468. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6469. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6470. </div>
  6471. </div>
  6472. <span slot="footer" class="dialog-footer">
  6473. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6474. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6475. </span>
  6476. </el-dialog>
  6477. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6478. :before-close="handleClose" class="dialog_diy">
  6479. <div>
  6480. <div class="fileCss" style="padding-top: 20px">
  6481. <div>
  6482. <button class="info_btn" @click="addImg($event)">
  6483. 选择本地文件
  6484. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6485. </button>
  6486. <div class="spanName">选择本地文件</div>
  6487. </div>
  6488. <!-- <div>
  6489. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6490. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6491. <img :src="cover[0].url" alt="" />
  6492. <div class="deletePic" @click="deleteSysPic">
  6493. <img src="../../../assets/icon/delete.png" alt="" />
  6494. </div>
  6495. </div>
  6496. <div class="spanName">选择系统文件</div>
  6497. </div> -->
  6498. <div>
  6499. <el-button @click="(searchImageValue = courseName), resetImage()"
  6500. v-if="isSysPic2 == false">选择网络文件</el-button>
  6501. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6502. <img :src="cover[0].url" alt="" />
  6503. <div class="deletePic" @click="deleteSysPic">
  6504. <img src="../../../assets/icon/delete.png" alt="" />
  6505. </div>
  6506. </div>
  6507. <div class="spanName">选择网络文件</div>
  6508. </div>
  6509. </div>
  6510. <!-- <div class="fileCss">
  6511. </div> -->
  6512. </div>
  6513. <span slot="footer" class="dialog-footer">
  6514. <el-button @click="choosePicVisible = false">取 消</el-button>
  6515. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6516. </span>
  6517. </el-dialog>
  6518. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6519. :before-close="handleClose" class="dialog_diy">
  6520. <div class="cru_selectBox" style="margin: 0">
  6521. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6522. 绘画
  6523. </div>
  6524. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6525. 科技
  6526. </div>
  6527. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6528. 人文
  6529. </div>
  6530. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6531. 艺术
  6532. </div>
  6533. </div>
  6534. <div class="sysPicBox">
  6535. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6536. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6537. </div>
  6538. </div>
  6539. </el-dialog>
  6540. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6541. :before-close="handleClose" class="dialog_diy">
  6542. <div>
  6543. <div class="people_top_right" style="display: flex; align-items: center">
  6544. <div style="position: relative; width: 100%">
  6545. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6546. @keyup.enter.native="resetImage()"></el-input>
  6547. <div class="search_img" @click="resetImage" style="right: 10px">
  6548. <img src="../../../assets/icon/search.png" alt />
  6549. </div>
  6550. </div>
  6551. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6552. </div>
  6553. <div class="sysPicBox" v-loading="imageloading">
  6554. <div class="picNone" v-if="!imageList.length">
  6555. 请输入关键词搜索图片
  6556. </div>
  6557. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6558. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6559. </div>
  6560. </div>
  6561. </div>
  6562. </el-dialog>
  6563. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6564. closePan(41);
  6565. }
  6566. " class="dialog_diy dialog_diy3 fullStyle">
  6567. <div v-if="selectJson" style="height: 100%">
  6568. <div class="select_box1" v-if="selectSteps == 1">
  6569. <div class="select_box1_img">
  6570. <div class="select_box1_title">
  6571. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6572. </div>
  6573. <div class="select_box1_add_img">
  6574. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6575. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6576. <img src="../../../assets/icon/addPoster.png" alt="" />
  6577. </div>
  6578. <div class="isSysPic" v-else>
  6579. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6580. <div class="deletePic" @click="deleteSelectPic">
  6581. <img src="../../../assets/icon/delete.png" alt="" />
  6582. </div>
  6583. </div>
  6584. </div>
  6585. </div>
  6586. <div class="select_box1_select">
  6587. <div class="select_box1_title">
  6588. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6589. </div>
  6590. <div class="select_box1_select_box">
  6591. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6592. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6593. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6594. <div class="select_box1_select_box_add">
  6595. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6596. 添加</el-button>
  6597. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6598. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6599. </div>
  6600. </div>
  6601. </div>
  6602. </div>
  6603. <div v-if="selectSteps == 2" style="height: 100%">
  6604. <div class="select_box2">
  6605. <div class="select_box2_title">设置每道题目的正确选项</div>
  6606. <div class="select_box2_box">
  6607. <div class="select_box2_img">
  6608. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6609. </div>
  6610. <div class="select_box2_answer">
  6611. <div class="select_answer_title">根据题目选择对应答案</div>
  6612. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6613. <span>{{ checkIndex + 1 }}、</span>
  6614. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6615. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6616. </el-option>
  6617. </el-select>
  6618. </div>
  6619. </div>
  6620. </div>
  6621. </div>
  6622. </div>
  6623. </div>
  6624. <span slot="footer" class="dialog-footer">
  6625. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6626. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6627. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6628. </span>
  6629. </el-dialog>
  6630. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6631. :before-close="handleClose" class="dialog_diy">
  6632. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6633. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6634. <div class="pjCss" style="width: 100%">
  6635. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6636. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6637. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6638. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6639. <div class="remove" @click="deletRateList(eIndex)"></div>
  6640. <div style="width: 100%; display: flex">
  6641. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6642. <el-rate v-model="eItem.score" disabled></el-rate>
  6643. </div>
  6644. <div class="elist_inptu_text" style="align-items: flex-start">
  6645. <span style="min-width: 100px; text-align: right">描述:</span>
  6646. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6647. </div>
  6648. </div>
  6649. </div>
  6650. <div class="addToolFun" @click="addRateList()">
  6651. <div class="addToolImg">
  6652. <img src="../../../assets/icon/add.png" alt />
  6653. </div>
  6654. <div>添加</div>
  6655. </div>
  6656. </div>
  6657. </div>
  6658. <span slot="footer" class="dialog-footer">
  6659. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6660. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6661. </span>
  6662. </el-dialog>
  6663. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6664. closePan(47);
  6665. }
  6666. " class="dialog_diy dialog_diy3 fullStyle">
  6667. <div style="height: 100%">
  6668. <div class="sentenBox" style="height: 100%">
  6669. <div class="addSen" @click="addSt">添加题目</div>
  6670. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6671. <div class="sentenTopBox">
  6672. <div class="sentenTop" :index="stIndex + 1">
  6673. <div>题目设置</div>
  6674. <div>
  6675. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6676. </div>
  6677. <div @click="addSen(stIndex)">添加</div>
  6678. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6679. </div>
  6680. </div>
  6681. <div class="cardList">
  6682. <div v-if="st.addSentence.length > 0" class="cardBox">
  6683. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6684. @click="setRightAnswer(s, stIndex, sIndex)">
  6685. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6686. <div>{{ s }}</div>
  6687. </el-tooltip>
  6688. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6689. <img src="../../../assets/icon/delete.png" alt="" />
  6690. </div>
  6691. </div>
  6692. </div>
  6693. <div class="card">
  6694. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6695. </div>
  6696. </div>
  6697. <div class="rightCardBox">
  6698. <div>正确顺序</div>
  6699. <div class="rightCardList">
  6700. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6701. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6702. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6703. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6704. <div>{{ r }}</div>
  6705. </el-tooltip>
  6706. </div>
  6707. <div>{{ rIndex + 1 }}</div>
  6708. </div>
  6709. </div>
  6710. <div class="card" v-if="st.rightAnswer.length == 0">
  6711. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6712. </div>
  6713. <div class="card" v-else>
  6714. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6715. </div>
  6716. </div>
  6717. </div>
  6718. </div>
  6719. </div>
  6720. </div>
  6721. <span slot="footer" class="dialog-footer">
  6722. <el-button @click="closePan(47)">取 消</el-button>
  6723. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6724. </span>
  6725. </el-dialog>
  6726. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6727. :before-close="handleClose" class="dialog_diy">
  6728. <el-form>
  6729. <!-- <el-form-item label="文本标题">
  6730. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6731. </el-form-item> -->
  6732. <div>表格内容</div>
  6733. <Table v-model="tableJson.text" @change="change"></Table>
  6734. </el-form>
  6735. <span slot="footer" class="dialog-footer">
  6736. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6737. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6738. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6739. </span>
  6740. </el-dialog>
  6741. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6742. :before-close="handleClose" class="dialog_diy">
  6743. <el-form>
  6744. <!-- <el-form-item label="文本标题">
  6745. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6746. </el-form-item> -->
  6747. <div>文档内容</div>
  6748. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6749. </el-form>
  6750. <span slot="footer" class="dialog-footer">
  6751. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6752. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6753. </span>
  6754. </el-dialog>
  6755. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6756. :before-close="handleClose" class="dialog_diy">
  6757. <div style="
  6758. width: 100%;
  6759. display: flex;
  6760. flex-direction: row;
  6761. flex-wrap: nowrap;
  6762. align-items: center;
  6763. justify-content: center;
  6764. ">
  6765. <div>班级:</div>
  6766. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6767. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6768. </el-option>
  6769. </el-select>
  6770. </div>
  6771. <span slot="footer" class="dialog-footer">
  6772. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6773. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6774. </span>
  6775. </el-dialog>
  6776. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6777. :before-close="handleClose" class="dialog_diy">
  6778. <div style="
  6779. width: 100%;
  6780. display: flex;
  6781. flex-direction: row;
  6782. flex-wrap: nowrap;
  6783. align-items: center;
  6784. justify-content: center;
  6785. ">
  6786. <div>随机码:</div>
  6787. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6788. </div>
  6789. <span slot="footer" class="dialog-footer">
  6790. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6791. <el-button type="primary" @click="addInvite">确定</el-button>
  6792. </span>
  6793. </el-dialog>
  6794. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6795. :before-close="handleClose" class="dialog_diy">
  6796. <div>
  6797. <div style="margin-bottom: 20px; color: #999">
  6798. 提示:点击“+”或“-”修改倒计时时长。
  6799. </div>
  6800. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6801. </div>
  6802. <span slot="footer" class="dialog-footer">
  6803. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6804. <el-button type="primary" @click="addPreTime">确定</el-button>
  6805. </span>
  6806. </el-dialog>
  6807. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6808. :before-close="handleClose" class="dialog_diy">
  6809. <div>
  6810. <div style="
  6811. width: 100%;
  6812. display: flex;
  6813. flex-direction: row;
  6814. flex-wrap: nowrap;
  6815. align-content: center;
  6816. align-items: center;
  6817. justify-content: space-between;
  6818. ">
  6819. <div style="
  6820. display: flex;
  6821. flex-flow: row nowrap;
  6822. align-items: flex-start;
  6823. width: 100%;
  6824. flex-direction: column;
  6825. flex-wrap: nowrap;
  6826. position: relative;
  6827. ">
  6828. <div class="e_box">
  6829. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6830. <div class="e_card_picture">
  6831. <img src="../../../assets/e_picture.png" />
  6832. </div>
  6833. <div class="e_card_name">
  6834. <span>{{ item.title }}</span>
  6835. </div>
  6836. <div class="e_card_btn">
  6837. <span @click="checkEva(item.id, 2)">导入</span>
  6838. </div>
  6839. </div> -->
  6840. <!-- <div class="addEva" @click="openT">
  6841. <img src="../../../assets/icon/addEva.png" alt="" />
  6842. </div> -->
  6843. <div style="
  6844. display: flex;
  6845. justify-content: flex-end;
  6846. margin-bottom: 10px;
  6847. ">
  6848. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6849. </div>
  6850. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6851. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6852. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6853. </el-table-column>
  6854. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6855. </el-table-column>
  6856. <el-table-column label="操作" width="250px">
  6857. <template slot-scope="scope">
  6858. <div class="btnBox">
  6859. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6860. </div>
  6861. </template>
  6862. </el-table-column>
  6863. </el-table>
  6864. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6865. 暂无数据
  6866. </div>
  6867. </div>
  6868. </div>
  6869. </div>
  6870. </div>
  6871. <span slot="footer" class="dialog-footer">
  6872. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6873. </span>
  6874. </el-dialog>
  6875. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6876. :before-close="handleClose" class="dialog_diy">
  6877. <div class="groupBox">
  6878. <div v-if="groupJson.group" class="groupContent">
  6879. <div class="groupTitle">请设置小组数量及名称</div>
  6880. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6881. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6882. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6883. <div class="groupBtn">
  6884. <el-button type="primary" size="small" @click="addGroup(index)"
  6885. v-if="groupJson.group.length - 1 == index">
  6886. 添加</el-button>
  6887. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6888. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6889. </div>
  6890. </div>
  6891. </div>
  6892. <div class="groupContent">
  6893. <div class="groupTitle">请设置每组人数</div>
  6894. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6895. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6896. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6897. @change="numberPan"></el-input>
  6898. </div>
  6899. </div>
  6900. <span slot="footer" class="dialog-footer">
  6901. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6902. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6903. </span>
  6904. </el-dialog>
  6905. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6906. :before-close="handleClose" class="dialog_diy">
  6907. <div style="
  6908. width: 100%;
  6909. display: flex;
  6910. flex-direction: row;
  6911. flex-wrap: nowrap;
  6912. align-items: center;
  6913. justify-content: center;
  6914. ">
  6915. <div style="min-width: fit-content">文件名称:</div>
  6916. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6917. </div>
  6918. <span slot="footer" class="dialog-footer">
  6919. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6920. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6921. </span>
  6922. </el-dialog>
  6923. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6924. closePan(69);
  6925. }
  6926. " class="dialog_diy fullStyle fullStyle1">
  6927. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6928. <span slot="footer" class="dialog-footer">
  6929. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6930. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6931. </span>
  6932. </el-dialog>
  6933. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6934. :before-close="handleClose" class="dialog_diy">
  6935. <div class="template_box">
  6936. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6937. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6938. <div class="wordPic">
  6939. <img src="../../../assets/icon/new/course_template.png" alt />
  6940. </div>
  6941. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6942. <div style="
  6943. margin-top: 10px;
  6944. line-height: 19px;
  6945. overflow: hidden;
  6946. text-overflow: ellipsis;
  6947. white-space: nowrap;
  6948. padding: 0 10px;
  6949. box-sizing: border-box;
  6950. width: 100%;
  6951. ">
  6952. {{ aa.title }}
  6953. </div>
  6954. </el-tooltip>
  6955. </div>
  6956. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6957. :class="{ wordTeacherA: ctJson.id == 1 }">
  6958. <div class="wordPic">
  6959. <img src="../../../assets/icon/new/course_template.png" alt />
  6960. </div>
  6961. <div style="
  6962. margin-top: 10px;
  6963. line-height: 19px;
  6964. overflow: hidden;
  6965. text-overflow: ellipsis;
  6966. white-space: nowrap;
  6967. padding: 0 20px;
  6968. ">
  6969. 简易模板
  6970. </div>
  6971. </div>
  6972. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6973. :class="{ wordTeacherA: ctJson.id == 2 }">
  6974. <div class="wordPic">
  6975. <img src="../../../assets/icon/new/course_template.png" alt />
  6976. </div>
  6977. <div style="
  6978. margin-top: 10px;
  6979. line-height: 19px;
  6980. overflow: hidden;
  6981. text-overflow: ellipsis;
  6982. white-space: nowrap;
  6983. padding: 0 20px;
  6984. ">
  6985. 智能粘贴模式
  6986. </div>
  6987. </div>
  6988. </div>
  6989. <span slot="footer" class="dialog-footer">
  6990. <el-button @click="templateDialog = false">取 消</el-button>
  6991. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6992. </span>
  6993. </el-dialog>
  6994. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6995. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6996. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6997. <div class="change_stageBox">
  6998. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6999. <div class="nt_taskBox">
  7000. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  7001. <div class="nt_taskName">
  7002. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7003. <span>{{ t.dyName }}</span>
  7004. </el-tooltip>
  7005. </div>
  7006. </div>
  7007. <div class="moveBtn" v-if="unitJson3.length > 1">
  7008. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7009. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7010. </div>
  7011. </div>
  7012. </div>
  7013. <span slot="footer" class="dialog-footer">
  7014. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  7015. <el-button type="primary" @click="updateChange">确定</el-button>
  7016. </span>
  7017. </el-dialog>
  7018. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7019. :before-close="handleClose" class="dialog_diy">
  7020. <div class="addTypeChoose" style="justify-content: center">
  7021. <div style="min-width: 100px">模板名称:</div>
  7022. <el-input v-model="templateName" style="width: 200px"></el-input>
  7023. </div>
  7024. <div class="addTypeBox">
  7025. <div class="addTypeChoose">
  7026. <div style="min-width: 100px">选择一级分类:</div>
  7027. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  7028. style="width: 200px">
  7029. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7030. </el-option>
  7031. </el-select>
  7032. </div>
  7033. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7034. <div style="min-width: 100px">选择二级分类:</div>
  7035. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  7036. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7037. </el-option>
  7038. </el-select>
  7039. </div>
  7040. </div>
  7041. <span slot="footer" class="dialog-footer">
  7042. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  7043. <el-button @click="close()">关 闭</el-button>
  7044. </span>
  7045. </el-dialog>
  7046. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7047. </evaBox>
  7048. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7049. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7050. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3" @aiConfirm="aiConfirm" :clickType="clickType">
  7051. </aiDialog>
  7052. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7053. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7054. <div class="pptBox" :class="{'ppClass': pptBoxDialog && panPptCount() > 0 && pptCount.length}">
  7055. <div class="box" v-show="pptBoxDialog">
  7056. <aiCreateDialog
  7057. v-for="(item, index) in unitJson[unitIndex].chapterInfo[0].taskJson"
  7058. :key="index"
  7059. :languageSetting="languageSetting"
  7060. :dialogVisibleAiCreate="dialogVisibleAiCreate2.includes(index)"
  7061. :courseName="courseName"
  7062. @createAiPpt="createAiPpt"
  7063. @closeAiPpt="closeAiPpt"
  7064. :infoData="infoData"
  7065. :courseTypeId="courseTypeId"
  7066. :CourseTypeJson="CourseTypeJson"
  7067. :courseState="courseState"
  7068. :lineCount="index"
  7069. :unitJson="unitJson"
  7070. :ref="'ppt'+index"
  7071. v-show="dialogVisibleAiCreate2.includes(index) && pptCount.includes(index)"
  7072. ></aiCreateDialog>
  7073. </div>
  7074. <span v-show="panPptCount() > 0 && pptCount.length" class="r_pub_button_edit" :style="{marginTop: panPptCount() > 0 ? '10px' : '0'}" style="justify-content: flex-start;" @click="pptBoxDialog = !pptBoxDialog">{{ pptBoxDialog ? "收缩" : "展开" }}</span>
  7075. </div>
  7076. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  7077. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7078. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  7079. </div>
  7080. </template>
  7081. <script>
  7082. import "../../../common/aws-sdk-2.235.1.min.js";
  7083. import { tools as toolsData } from "../../../common/tools.js";
  7084. // import "../../../common/aws-sdk-2.99.0.min.js";
  7085. import $ from "jquery";
  7086. import EditorBar from "../../../components/tools/wangEnduit";
  7087. import Table from "../../../components/tools/table";
  7088. import Mind from "../../tools/jsmind2";
  7089. import Time from "../../tools/time.vue";
  7090. import Sunburst from "../../tools/sunburst";
  7091. import SeeBoard from "../../tools/seeBoard";
  7092. import weilaiData from "../components/weilai.js";
  7093. import sourceDialog from "../teacherSource/dialog.vue";
  7094. import interVideo from "../interVideo/index.vue";
  7095. import englishRight from "../components/englishRight.vue";
  7096. import evaBox from "../evaBox/index.vue";
  7097. import EnglishVoice from "../EnglishVoice/index.vue";
  7098. import aiBox from './aiBox.vue'
  7099. import aiBoxRight from './aiBoxRight.vue'
  7100. import aiDialog from './aiDialog'
  7101. import aiTips from './aiTips.vue'
  7102. import tipsDialog from './tipsDialog.vue'
  7103. import { v4 as uuidv4 } from "uuid";
  7104. import MarkdownIt from "markdown-it";
  7105. import aiCreateDialog from './aiCreateDialog.vue'
  7106. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7107. import wpdf from "../test/file/wPdf2.vue";
  7108. import wOffice from "../test/file/wOffice.vue";
  7109. import htmlDocx from "html-docx-js/dist/html-docx";
  7110. import TurndownService from 'turndown';
  7111. import JSZip from "jszip";
  7112. import evaList from "./evaList.vue";
  7113. import MindTask from "./jsmind2";
  7114. var OpenCC = require("opencc-js");
  7115. let converter = OpenCC.Converter({
  7116. from:'hk',
  7117. to:'cn'
  7118. })
  7119. let converter2 = OpenCC.Converter({
  7120. from:'cn',
  7121. to:'hk'
  7122. })
  7123. export default {
  7124. components: {
  7125. EditorBar,
  7126. Mind,
  7127. Time,
  7128. Sunburst,
  7129. SeeBoard,
  7130. Table,
  7131. sourceDialog,
  7132. interVideo,
  7133. englishRight,
  7134. evaBox,
  7135. EnglishVoice,
  7136. aiBox,
  7137. aiBoxRight,
  7138. aiDialog,
  7139. aiTips,
  7140. tipsDialog,
  7141. aiCreateDialog,
  7142. aiCreateVideoDialog,
  7143. wpdf,
  7144. wOffice,
  7145. evaList,
  7146. MindTask
  7147. },
  7148. data() {
  7149. return {
  7150. checkAll: false,
  7151. checkAll2: false,
  7152. chooseType: 1,
  7153. checkedCities: [],
  7154. isIndeterminate: true,
  7155. isIndeterminate2: true,
  7156. isSysPic: false,
  7157. isSysPic2: false,
  7158. steps: 1,
  7159. stepsNav: 1,
  7160. nbOrder: 0,
  7161. courseId: "",
  7162. chapToolsType: 0,
  7163. chapTools: [
  7164. {
  7165. tools: [],
  7166. toolDetail: "",
  7167. },
  7168. ],
  7169. line: "",
  7170. lineTitle: "",
  7171. sysPic: [],
  7172. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7173. sentenceList2: [],
  7174. isPushTitleList: [],
  7175. lineCount: 0,
  7176. lineType: 0,
  7177. chapCount: 0,
  7178. courseName: "",
  7179. isTeacherSee: false,
  7180. courseText: "",
  7181. textLoading: false,
  7182. ttextLoading: false,
  7183. courseText2: "",
  7184. preTime: 0,
  7185. formLabelWidth: "100px",
  7186. choosePicVisible: false,
  7187. sysPicVisible: false,
  7188. sysPicVisible2: false,
  7189. uploadLoading1: false,
  7190. noneBtnImg: false,
  7191. updateBoolean2: false,
  7192. unitIndex: 0,
  7193. taskCount: 0,
  7194. dialogVisible: false,
  7195. dialogVisible1: false,
  7196. dialogVisible2: false,
  7197. dialogVisible3: false,
  7198. dialogVisible4: false,
  7199. dialogVisible5: false,
  7200. dialogVisible6: false,
  7201. dialogVisible7: false,
  7202. dialogVisible8: false,
  7203. dialogVisible9: false,
  7204. dialogVisibleClass: false,
  7205. dialogVisibleMember: false,
  7206. dialogVisibleMp3: false,
  7207. dialogVisibleSelect: false,
  7208. dialogVisibleSentence: false,
  7209. dialogVisibleRate: false,
  7210. dialogVisibleChoice: false,
  7211. dialogVisiblemb: false,
  7212. dialogVisibleInvite: false,
  7213. dialogVisibleSource: false,
  7214. dialogVisibleVideo: false,
  7215. dialogVisibleStageChange: false,
  7216. dialogVisibleupdataVideoT: false,
  7217. englishDialogVisible: false,
  7218. templateDialog: false,
  7219. ctJson: {},
  7220. isClickColor: 1,
  7221. toolIndexType: "",
  7222. publicTool: 0,
  7223. searchPeople: "",
  7224. searchTN: "",
  7225. collid: '',
  7226. CollLoading: false,
  7227. userid: this.$route.query.userid,
  7228. oid: this.$route.query.oid,
  7229. org: this.$route.query.org,
  7230. role: this.$route.query.role,
  7231. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7232. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7233. dialogVisibleTable: false,
  7234. dialogVisibleWord: false,
  7235. tableJson: { text: "" },
  7236. wordJson: { text: "" },
  7237. dialogVisibleMoreUpload: false,
  7238. dialogVisiblePreTime: false,
  7239. uploadJson: [],
  7240. classJuri: [],
  7241. gradeList: [],
  7242. cover: [], //课程封面
  7243. myWord: [],
  7244. evaJuri: [],
  7245. evalua: "",
  7246. targetArray: [],
  7247. eTitle: "",
  7248. eJson: {},
  7249. fid: "", //一级
  7250. sid: "", //二级
  7251. tid: "", //二级
  7252. typeMode: 3,
  7253. eJSONNum: 0,
  7254. data: {
  7255. meta: {
  7256. name: "example",
  7257. author: "dd@163.com",
  7258. version: "0.2",
  7259. },
  7260. format: "node_array",
  7261. data: [{ id: "root", isroot: true, topic: "" }],
  7262. },
  7263. askJson: {
  7264. askCount: 1,
  7265. askTitle: "",
  7266. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7267. },
  7268. askJson2: {},
  7269. testJson: {},
  7270. testJson2: {},
  7271. selectJson: {},
  7272. selectJson2: {},
  7273. rateJson: [],
  7274. unitJson2: [],
  7275. unitJson3: [],
  7276. unitJson: [
  7277. {
  7278. dyName: "", //单元标题
  7279. chapterInfo: [
  7280. {
  7281. isread: false,
  7282. chapterid: this.guid(),
  7283. title: "",
  7284. courseName: "",
  7285. taskJson: [
  7286. {
  7287. task: "",
  7288. taskDetail: "",
  7289. chapterData: [],
  7290. toolText: "",
  7291. toolChoose: [
  7292. {
  7293. tool: [],
  7294. toolDetail: "",
  7295. toolType: 0,
  7296. askCount: 1,
  7297. askTitle: "",
  7298. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7299. },
  7300. ],
  7301. isShowTools: false,
  7302. askCount: 1,
  7303. isFold: 1,
  7304. askTitle: "",
  7305. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7306. checkJson: [{ checkCount: [], checkPerent: [] }],
  7307. homeworkList: [],
  7308. },
  7309. ],
  7310. itemCount: 1,
  7311. fileList1: [],
  7312. video: [],
  7313. testData: [],
  7314. pData: [],
  7315. templateArray: [],
  7316. },
  7317. ],
  7318. },
  7319. ],
  7320. templateArray: [],
  7321. studentJuri: [],
  7322. teacherJuri: [],
  7323. CollaborativeTeaList: [],
  7324. checkboxList: [],
  7325. checkboxList2: [],
  7326. checkboxList3: [],
  7327. classSearch: "",
  7328. gradeId: "",
  7329. number: "",
  7330. tTitle: "",
  7331. tdetail: "",
  7332. templateC: {},
  7333. AttText: {},
  7334. AttTextType: 0,
  7335. AttTextIndex: 0,
  7336. cTemplate: "",
  7337. CourseType: [],
  7338. CourseType1: [],
  7339. CourseType2: [],
  7340. CourseTypeJson: {},
  7341. CourseTypeJson1: {},
  7342. courseTypeId: [],
  7343. courseTypeId1: [],
  7344. courseTypeSon: [],
  7345. clearArray: [],
  7346. pTypeCheck: [],
  7347. pTypeCheckName: [],
  7348. loading: false,
  7349. toolType: 0,
  7350. inputShow: true,
  7351. inputShow2: true,
  7352. toolIndex: 0,
  7353. cidType: 0,
  7354. answerQ: "",
  7355. answerQ2: "",
  7356. grade: [],
  7357. grade2: [],
  7358. courseUserid: "",
  7359. timer: null,
  7360. timer2: null,
  7361. pasteTimer: null,
  7362. checkId: "",
  7363. isDelete: 1,
  7364. addindex: 0,
  7365. selectSteps: 1,
  7366. groupJson: {},
  7367. dialogVisibleGroup: false,
  7368. rightBoxHeight: 0,
  7369. ManAarray: [],
  7370. checkBoolean: false,
  7371. inviteCode: [],
  7372. inviteId: "",
  7373. icode: "",
  7374. easyArray: [2, 4],
  7375. sourceData: {},
  7376. updateSourcePan: false,
  7377. videoJson: {},
  7378. isBtnDisplay: false,
  7379. isStepDisplay: false,
  7380. isPasteStage: false,
  7381. isPasteTask: false,
  7382. isPasteChoice: false,
  7383. imageList: [],
  7384. imageloading: false,
  7385. imageloading2: false,
  7386. searchImageValue: "",
  7387. ppage: 1,
  7388. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7389. oldIndex: 0,
  7390. dragType: "",
  7391. oldUnitIndex: 0,
  7392. oldData: null,
  7393. newIndex: "",
  7394. englishList: {},
  7395. typeIndex: "",
  7396. courseState: 5,
  7397. taskJSONa: [
  7398. {
  7399. task: "",
  7400. taskDetail: "",
  7401. chapterData: [],
  7402. toolText: "",
  7403. toolChoose: [
  7404. {
  7405. tool: [],
  7406. toolDetail: "",
  7407. toolType: 0,
  7408. askCount: 1,
  7409. askTitle: "",
  7410. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7411. },
  7412. ],
  7413. isShowTools: false,
  7414. askCount: 1,
  7415. isFold: 1,
  7416. askTitle: "",
  7417. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7418. checkJson: [{ checkCount: [], checkPerent: [] }],
  7419. homeworkList: [],
  7420. },
  7421. ],
  7422. checkUnitIndex: 0,
  7423. isdrag: "",
  7424. evaIndex: "",
  7425. evatIndex: "",
  7426. evaBoxDialog: false,
  7427. EnglishVoiceDialog: false,
  7428. englishVoiceJson: {},
  7429. cetIndex: "",
  7430. cettIndex: "",
  7431. cetBoxDialog: false,
  7432. templateName: "",
  7433. setTypeJson: {
  7434. one: "",
  7435. two: "",
  7436. },
  7437. twoJson: [],
  7438. oneJson: [],
  7439. updateKey: 1,
  7440. isOutline: false,
  7441. isOutline2: false,
  7442. infoData: [],
  7443. infoproVisible: false,
  7444. infoisFinishSize: 0,
  7445. infoisAllSize: 0,
  7446. infoprogress: 0,
  7447. taskDetailLoading: [],
  7448. ttaskDetailLoading: [],
  7449. taskDetailLoading2: [],
  7450. ttaskDetailLoading2: [],
  7451. taskDetailLoading3: [],
  7452. ttaskDetailLoading3: [],
  7453. taskDetailLoading4: [],
  7454. taskDetailLoading5: [],
  7455. ttaskDetailLoading5: [],
  7456. dArray: [],
  7457. dialogVisibleAiD: false,
  7458. aitype: "",
  7459. aiJson: {
  7460. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7461. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7462. "aiTask": "请根据<教学任务教案>。",
  7463. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7464. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7465. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7466. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7467. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7468. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7469. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7470. },
  7471. aiText: "",
  7472. aiText2: "",
  7473. aiText3: "",
  7474. aiCallBack: "",
  7475. aiIndex: "",
  7476. clickType: 1,
  7477. promptShow: false,
  7478. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7479. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7480. dialogVisibleTips: false,
  7481. tipsJson: {},
  7482. cpote:{
  7483. cpote1: '',
  7484. cpote2: '',
  7485. cpote3: '',
  7486. cpote4: '',
  7487. },
  7488. cpoteLoading:{
  7489. cpote1: false,
  7490. cpote2: false,
  7491. cpote3: false,
  7492. cpote4: false,
  7493. },
  7494. cpotetLoading:{
  7495. cpote1: false,
  7496. cpote2: false,
  7497. cpote3: false,
  7498. cpote4: false,
  7499. },
  7500. cpoteType: 0,
  7501. dialogVisibleAiCreate: false,
  7502. dialogVisibleAiCreate2: [],
  7503. pptBoxDialog: true,
  7504. pptCount: [],
  7505. dialogVisibleAiCreateVideo: false,
  7506. teacherText: [],
  7507. isFileSearch: true,
  7508. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  7509. 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'],
  7510. courseJie:1,
  7511. courseTime:45,
  7512. allTextArray: [],
  7513. dialogVisiblePdf: false,
  7514. dialogVisibleOffice: false,
  7515. wurl: "",
  7516. choiceLoading: false,
  7517. teacherInfoData: [],
  7518. teacherinfoproVisible: false,
  7519. teacherinfoisFinishSize: 0,
  7520. teacherinfoisAllSize: 0,
  7521. teacherinfoprogress: 0,
  7522. teacherCourseText: "",
  7523. teacherTextLoading: false,
  7524. tteacherTextLoading: false,
  7525. targetCourseText: "",
  7526. targetTextLoading: false,
  7527. ttargetTextLoading: false,
  7528. cankaoInfoData: [],
  7529. fileSLoading: false,
  7530. infoData2: [],
  7531. isuseT: false,
  7532. mode: 1,
  7533. targetCourseText2: "",
  7534. targetTextLoading2: false,
  7535. ttargetTextLoading2: false,
  7536. courseTextBool: false,
  7537. teacherCourseTextB: true,
  7538. targetCourseTextB: true,
  7539. courseTextB: true,
  7540. targetCourseText2B: true,
  7541. // 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'],
  7542. yiKeTemplateArray:[],
  7543. taskLoading: [],
  7544. ruleLoading: [],
  7545. mubiaoInfoData: [],
  7546. mubiaoinfoproVisible: false,
  7547. mubiaoinfoisFinishSize: 0,
  7548. mubiaoinfoisAllSize: 0,
  7549. mubiaoinfoprogress: 0,
  7550. xuanzeInfoData: [],
  7551. xuanzeinfoproVisible: false,
  7552. xuanzeinfoisFinishSize: 0,
  7553. xuanzeinfoisAllSize: 0,
  7554. xuanzeinfoprogress: 0,
  7555. pingjiaInfoData: [],
  7556. pingjiainfoproVisible: [],
  7557. pingjiainfoisFinishSize: [],
  7558. pingjiainfoisAllSize: [],
  7559. pingjiainfoprogress: [],
  7560. taskGLoading: [],
  7561. isOutlineCancelToken: null,
  7562. isFileCancelToken: null,
  7563. isTargetCancelToken1: null,
  7564. isTargetCancelToken2: null,
  7565. isTextCancelToken: null,
  7566. isTeacherTextCancelToken: null,
  7567. isTeacherTaskCancelToken: null,
  7568. isOutlineTaskCancelToken: [],
  7569. isTeacherTaskCancelToken2: [],
  7570. isTeacherTaskCancelSource: [],
  7571. isTextCancelSource: null,
  7572. isOutlineTaskCancelSource: [],
  7573. isTeacherTextCancelSource: null,
  7574. isTargetCancelSource1: null,
  7575. isTargetCancelSource2: null,
  7576. fileidArray: [],
  7577. interPan: true,
  7578. interFlash: true,
  7579. agentid: "",
  7580. interSetting: false,
  7581. chatid: "",
  7582. languageSetting: 0, //0中文 1繁体 2英文
  7583. isQuote: {},
  7584. knowFileArray: [],
  7585. knowInfoData: [],
  7586. knowinfoproVisible: false,
  7587. knowinfoisFinishSize: 0,
  7588. knowinfoisAllSize: 0,
  7589. knowinfoprogress: 0,
  7590. knowFileids: [],
  7591. searchFileName: "",
  7592. knowInfoDataLoading: false,
  7593. knowInfoData2: [],
  7594. knowinfoproVisible2: false,
  7595. knowinfoisFinishSize2: 0,
  7596. knowinfoisAllSize2: 0,
  7597. knowinfoprogress2: 0,
  7598. knowFileids2: [],
  7599. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  7600. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41],
  7601. taskAnLoading: [],
  7602. taskAnCancelToken: [],
  7603. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  7604. taskCancelToken1: [],
  7605. taskCancelToken2: [],
  7606. isDisplay: true,
  7607. isDialog: 0,
  7608. };
  7609. },
  7610. directives: {
  7611. autoHeight: {
  7612. update(el, binding) {
  7613. const { value } = binding;
  7614. if (value && typeof value === "number") {
  7615. el.style.height = `${value}px`;
  7616. } else {
  7617. el.style.height = "auto";
  7618. }
  7619. },
  7620. componentUpdated(el) {
  7621. el.style.height = `${el.scrollHeight + 25}px`;
  7622. },
  7623. },
  7624. },
  7625. computed: {
  7626. // rightBoxHeight: function () {
  7627. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7628. // },
  7629. offsetLetfPx: function () {
  7630. //addnum可以直接在模板语法里面用,相当于data内的值
  7631. return (
  7632. $(".cru_select")[this.unitIndex] &&
  7633. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7634. );
  7635. },
  7636. getMan2() {
  7637. return function (people) {
  7638. let _people = people;
  7639. let _people2 = "";
  7640. if (this.ManAarray.length) {
  7641. for (var i = 0; i < this.ManAarray.length; i++) {
  7642. if (this.ManAarray[i].userid == people) {
  7643. _people2 = this.ManAarray[i].name;
  7644. break;
  7645. }
  7646. }
  7647. }
  7648. if (people == this.courseUserid) {
  7649. return "";
  7650. }
  7651. return this.ManAarray.length ? _people2 : "";
  7652. };
  7653. },
  7654. getListMan2() {
  7655. return function (list) {
  7656. let _people2 = [];
  7657. if (this.ManAarray.length) {
  7658. for (var j = 0; j < list.length; j++) {
  7659. let people = list[j];
  7660. for (var i = 0; i < this.ManAarray.length; i++) {
  7661. if (
  7662. this.ManAarray[i].userid == people &&
  7663. people != this.courseUserid
  7664. ) {
  7665. _people2.push(this.ManAarray[i].name);
  7666. break;
  7667. }
  7668. }
  7669. }
  7670. }
  7671. return this.ManAarray.length ? _people2.join("、") : "";
  7672. };
  7673. },
  7674. isInvite() {
  7675. return function (cid) {
  7676. let array = [];
  7677. for (var i = 0; i < this.inviteCode.length; i++) {
  7678. array.push(this.inviteCode[i].cid);
  7679. }
  7680. return array.indexOf(cid) != -1;
  7681. };
  7682. },
  7683. getInviteCodeC() {
  7684. return function (cid) {
  7685. let array = [];
  7686. for (var i = 0; i < this.inviteCode.length; i++) {
  7687. array.push(this.inviteCode[i].cid);
  7688. }
  7689. return this.inviteCode[array.indexOf(cid)].ic;
  7690. };
  7691. },
  7692. getClassC() {
  7693. return function (c) {
  7694. let _c2 = "";
  7695. if (this.grade.length) {
  7696. for (var i = 0; i < this.grade.length; i++) {
  7697. if (this.grade[i].id == c) {
  7698. _c2 = this.grade[i].name;
  7699. break;
  7700. }
  7701. }
  7702. }
  7703. return this.grade.length ? _c2 : "";
  7704. };
  7705. },
  7706. getListClassC() {
  7707. return function (list) {
  7708. let _c2 = [];
  7709. if (this.grade.length) {
  7710. for (var j = 0; j < list.length; j++) {
  7711. let c = list[j];
  7712. for (var i = 0; i < this.grade.length; i++) {
  7713. if (this.grade[i].id == c) {
  7714. _c2.push(this.grade[i].name);
  7715. break;
  7716. }
  7717. }
  7718. }
  7719. }
  7720. return this.grade.length ? _c2.join("、") : "";
  7721. };
  7722. },
  7723. MarkdownT() {
  7724. return function (c) {
  7725. let md = new MarkdownIt();
  7726. return c
  7727. ? md.render(c) : "";
  7728. };
  7729. },
  7730. panOutline(){
  7731. return function () {
  7732. let count = 0;
  7733. for(var i = 0; i < this.unitJson.length; i++){
  7734. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7735. for(var j = 0; j < _task.length; j++){
  7736. if(_task[j].taskDetail2){
  7737. count++
  7738. }
  7739. }
  7740. }
  7741. return count;
  7742. };
  7743. },
  7744. panTeacher(){
  7745. return function () {
  7746. let count = 0;
  7747. for(var i = 0; i < this.unitJson.length; i++){
  7748. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7749. for(var j = 0; j < _task.length; j++){
  7750. if(_task[j].taskDetail3){
  7751. count++
  7752. }
  7753. }
  7754. }
  7755. return count;
  7756. };
  7757. },
  7758. panTask(){
  7759. return function () {
  7760. let count = 0;
  7761. for(var i = 0; i < this.unitJson.length; i++){
  7762. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7763. for(var j = 0; j < _task.length; j++){
  7764. if(_task[j].taskDetail){
  7765. count++
  7766. }
  7767. }
  7768. }
  7769. return count;
  7770. };
  7771. },
  7772. panElist(){
  7773. return function (array) {
  7774. let count = 0;
  7775. for(var i = 0; i < array.toolChoose.length; i++){
  7776. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  7777. count++
  7778. }
  7779. }
  7780. return count;
  7781. };
  7782. },
  7783. panTaskElist(){
  7784. return function () {
  7785. let count = 0;
  7786. for(var i = 0; i < this.unitJson.length; i++){
  7787. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7788. for(var j = 0; j < _task.length; j++){
  7789. if(_task[j].eList && _task[j].eList.length){
  7790. count++
  7791. }
  7792. }
  7793. }
  7794. return count;
  7795. };
  7796. },
  7797. dataCheckPan(){
  7798. return function (fileid) {
  7799. for(let i = 0; i < this.infoData.length; i++){
  7800. if(this.infoData[i].fileid == fileid){
  7801. return true
  7802. }
  7803. }
  7804. return false;
  7805. };
  7806. },
  7807. interUrl: function () {
  7808. let agentid = this.aiJson.agentid
  7809. let sagentid = this.aiJson.sagentid
  7810. let url = ''
  7811. if(sagentid){
  7812. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7813. }else{
  7814. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7815. }
  7816. return url;
  7817. },
  7818. panPptCount(){
  7819. return function () {
  7820. let ppts = 0
  7821. for(var i = 0; i < this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length; i++){
  7822. let ppt = this.$refs['ppt'+i]
  7823. if(ppt && ppt[0].tanDialog){
  7824. ppts++
  7825. }
  7826. }
  7827. if(!this.pptCount.length){
  7828. this.pptBoxDialog = false
  7829. }
  7830. return ppts;
  7831. };
  7832. },
  7833. },
  7834. watch: {
  7835. unitIndex(newValue, oldValue) {
  7836. // return;
  7837. if (this.isDelete == 2) {
  7838. this.isDelete = 1;
  7839. return;
  7840. }
  7841. if (this.cid != "") {
  7842. let _unitIndex = oldValue;
  7843. if (
  7844. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7845. JSON.stringify(this.unitJson[_unitIndex])
  7846. ) {
  7847. this.$refs.rightboxR.scrollTop = 0;
  7848. return;
  7849. }
  7850. let cPan = 1;
  7851. for (
  7852. var j = 0;
  7853. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7854. j++
  7855. ) {
  7856. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7857. j
  7858. ].proVisible = false;
  7859. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7860. j
  7861. ].proVisible2 = false;
  7862. if (
  7863. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7864. .length > 1
  7865. ) {
  7866. for (
  7867. var z = 0;
  7868. z <
  7869. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7870. .length;
  7871. z++
  7872. ) {
  7873. if (
  7874. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7875. .toolChoose[z].tool.length
  7876. ) {
  7877. this.$message.error("请把工具添加完整");
  7878. cPan = 2;
  7879. break;
  7880. }
  7881. }
  7882. }
  7883. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7884. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7885. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7886. (ele) => {
  7887. return ele.value != "" || ele.detail != "" || ele.target != "";
  7888. }
  7889. );
  7890. }
  7891. }
  7892. if (cPan == 2) {
  7893. this.unitIndex = oldValue;
  7894. return;
  7895. }
  7896. for (var i = 0; i < this.unitJson.length; i++) {
  7897. if (this.addindex != i) {
  7898. delete this.unitJson[i].isUpdate;
  7899. }
  7900. }
  7901. this.$refs.rightboxR.scrollTop = 0;
  7902. this.addindex = -1;
  7903. let params = [
  7904. {
  7905. cid: this.cid,
  7906. chapters: JSON.stringify(this.unitJson),
  7907. uid: this.userid,
  7908. unitIndex: _unitIndex,
  7909. },
  7910. ];
  7911. this.ajax
  7912. .post(this.$store.state.api + "updateWorkNew4", params)
  7913. .then((res) => {
  7914. // this.$message({
  7915. // message: "修改成功",
  7916. // type: "success",
  7917. // });
  7918. // this.courseId = this.cid;
  7919. this.addtips()
  7920. })
  7921. .catch((err) => {
  7922. this.$message.error("网络不佳");
  7923. console.error(err);
  7924. });
  7925. }
  7926. },
  7927. steps(newValue, old) {
  7928. if(newValue == 2){
  7929. this.steps = old
  7930. }
  7931. if (newValue == 4) {
  7932. let cPan = 1;
  7933. for (var i = 0; i < this.unitJson.length; i++) {
  7934. for (
  7935. var j = 0;
  7936. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7937. j++
  7938. ) {
  7939. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7940. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7941. if (
  7942. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7943. ) {
  7944. for (
  7945. var z = 0;
  7946. z <
  7947. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7948. z++
  7949. ) {
  7950. if (
  7951. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7952. .tool.length
  7953. ) {
  7954. this.$message.error("请把工具添加完整");
  7955. cPan = 2;
  7956. break;
  7957. }
  7958. }
  7959. }
  7960. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7961. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7962. i
  7963. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7964. return ele.value != "" || ele.detail != "" || ele.target != "";
  7965. });
  7966. }
  7967. }
  7968. }
  7969. this.inputShow = true;
  7970. if (cPan == 2) {
  7971. this.steps = old;
  7972. return;
  7973. }
  7974. this.goTo(
  7975. "/course?userid=" +
  7976. this.userid +
  7977. "&oid=" +
  7978. this.oid +
  7979. "&org=" +
  7980. this.org +
  7981. "&role=" +
  7982. this.role
  7983. );
  7984. }
  7985. },
  7986. courseName(newVal, oldVal) {
  7987. this.setCourseInfo();
  7988. },
  7989. courseTypeId: {
  7990. immediate: true,
  7991. deep: true,
  7992. handler(newValue, oldValue) {
  7993. this.setCourseInfo();
  7994. }
  7995. },
  7996. knowFileids(newVal, oldVal) {
  7997. window.course_fileids = this.knowFileids
  7998. },
  7999. },
  8000. methods: {
  8001. tableRowClassName({ row, rowIndex }) {
  8002. if ((rowIndex + 1) % 2 === 0) {
  8003. return "even_row";
  8004. } else {
  8005. return "";
  8006. }
  8007. },
  8008. close() {
  8009. this.cetIndex = "";
  8010. this.cettIndex = "";
  8011. this.templateName = "";
  8012. this.cetBoxDialog = false;
  8013. },
  8014. openAI() {
  8015. top.postMessage({ tools: "64" }, "*");
  8016. },
  8017. setMan() {
  8018. // let teacherJuri = this.teacherJuri2;
  8019. this.ManAarray = [];
  8020. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  8021. if (_user.indexOf(this.userid) == -1) {
  8022. _user.push(this.userid);
  8023. }
  8024. if (_user.indexOf(this.courseUserid) == -1) {
  8025. _user.push(this.courseUserid);
  8026. }
  8027. let params = [{
  8028. uid: _user.join(","),
  8029. }];
  8030. this.ajax
  8031. .post(this.$store.state.api + "getAllUserByIdP", params)
  8032. .then((res) => {
  8033. let teacherJuri = res.data[0];
  8034. this.ManAarray = teacherJuri;
  8035. })
  8036. .catch((err) => {
  8037. console.error(err);
  8038. });
  8039. },
  8040. previewImg(url) {
  8041. this.$hevueImgPreview(url);
  8042. },
  8043. btnDisplay(bool) {
  8044. this.isBtnDisplay = bool;
  8045. },
  8046. stepDisplay(bool) {
  8047. this.isStepDisplay = bool;
  8048. },
  8049. scrollChange() {
  8050. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8051. },
  8052. addHw(e) {
  8053. var el = e.currentTarget;
  8054. el.getElementsByTagName("input")[0].click();
  8055. },
  8056. change(val) {
  8057. if (this.dialogVisible1) {
  8058. this.tdetail = val;
  8059. } else if (this.dialogVisible6) {
  8060. this.AttText.text = val;
  8061. } else if (this.dialogVisible2) {
  8062. this.cTemplate = val;
  8063. } else if (this.dialogVisibleTable) {
  8064. this.tableJson.text = val;
  8065. }
  8066. this.$forceUpdate();
  8067. console.log(val);
  8068. },
  8069. change2(val) {
  8070. console.log(val);
  8071. this.$forceUpdate();
  8072. },
  8073. handleClose(done) {
  8074. done();
  8075. },
  8076. closePan(tool) {
  8077. if (tool == 15) {
  8078. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8079. this.dialogVisible8 = false;
  8080. } else {
  8081. this.closeConfirm(tool);
  8082. }
  8083. } else if (tool == 4) {
  8084. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8085. this.dialogVisible5 = false;
  8086. } else {
  8087. this.closeConfirm(tool);
  8088. }
  8089. } else if (tool == 45) {
  8090. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8091. this.dialogVisibleChoice = false;
  8092. } else {
  8093. this.closeConfirm(tool);
  8094. }
  8095. } else if (tool == 41) {
  8096. if (
  8097. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8098. ) {
  8099. this.dialogVisibleSelect = false;
  8100. } else {
  8101. this.closeConfirm(tool);
  8102. }
  8103. } else if (tool == 47) {
  8104. if (
  8105. JSON.stringify(this.sentenceList) ==
  8106. JSON.stringify(this.sentenceList2)
  8107. ) {
  8108. this.dialogVisibleSentence = false;
  8109. } else {
  8110. this.closeConfirm(tool);
  8111. }
  8112. } else if (tool == 69) {
  8113. if (
  8114. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8115. ) {
  8116. this.englishDialogVisible = false;
  8117. } else {
  8118. this.closeConfirm(tool);
  8119. }
  8120. }
  8121. },
  8122. closeConfirm(tool) {
  8123. this.$confirm("是否保存已编辑内容?", "提示", {
  8124. confirmButtonText: "保存",
  8125. cancelButtonText: "不保存",
  8126. type: "warning",
  8127. })
  8128. .then(() => {
  8129. if (tool == 15) {
  8130. this.addAnswer();
  8131. } else if (tool == 4) {
  8132. this.addAsk();
  8133. } else if (tool == 45) {
  8134. this.addTest();
  8135. } else if (tool == 41) {
  8136. this.addSelectAnswer();
  8137. } else if (tool == 47) {
  8138. this.addSentenceTool();
  8139. } else if (tool == 69) {
  8140. this.addEnglish();
  8141. }
  8142. })
  8143. .catch(() => {
  8144. if (tool == 15) {
  8145. this.dialogVisible8 = false;
  8146. } else if (tool == 4) {
  8147. this.dialogVisible5 = false;
  8148. } else if (tool == 45) {
  8149. this.dialogVisibleChoice = false;
  8150. } else if (tool == 41) {
  8151. this.dialogVisibleSelect = false;
  8152. } else if (tool == 47) {
  8153. this.dialogVisibleSentence = false;
  8154. } else if (tool == 69) {
  8155. this.englishDialogVisible = false;
  8156. }
  8157. });
  8158. },
  8159. addEnglish(jsonType) {
  8160. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  8161. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  8162. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  8163. if (
  8164. this.englishList.engTitle == "" ||
  8165. this.englishList.englishText == ""
  8166. ) {
  8167. this.$message.error("请将内容填写完整!");
  8168. return;
  8169. }
  8170. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8171. this.taskCount
  8172. ].toolChoose[this.toolIndex].englishList = this.englishList;
  8173. this.englishList = {};
  8174. if (jsonType && jsonType == 1) {
  8175. this.englishDialogVisible = true;
  8176. } else {
  8177. this.englishDialogVisible = false;
  8178. }
  8179. if (
  8180. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  8181. .toolChoose[this.toolIndex].tool != 69
  8182. ) {
  8183. this.addTools(69, this.taskCount, this.toolIndex);
  8184. }
  8185. },
  8186. imgChange2(i, j) {
  8187. var _tmp = this.testJson.testJson[i].checkList[j];
  8188. this.noneBtnImg = _tmp.length >= 1;
  8189. },
  8190. imgChange3(i) {
  8191. var _tmp = this.testJson.testJson[i];
  8192. this.noneBtnImg = _tmp.length >= 1;
  8193. },
  8194. imgChange1(file, fileList, type, itemTaskIndex) {
  8195. if (type == 1) {
  8196. var _tmp = this.cover;
  8197. } else if (
  8198. type == 2 ||
  8199. type == 3 ||
  8200. type == 6 ||
  8201. type == 7 ||
  8202. type == 8
  8203. ) {
  8204. var _tmp =
  8205. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8206. .chapterData;
  8207. } else if (type == 4) {
  8208. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  8209. } else {
  8210. var _tmp =
  8211. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8212. .homeworkList;
  8213. }
  8214. this.noneBtnImg = _tmp.length >= 1;
  8215. },
  8216. goTo(path) {
  8217. this.$router.push(path);
  8218. },
  8219. guid() {
  8220. var _num,
  8221. i,
  8222. _guid = "";
  8223. for (i = 0; i < 32; i++) {
  8224. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  8225. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  8226. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  8227. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  8228. _guid += "-";
  8229. }
  8230. }
  8231. return _guid;
  8232. },
  8233. retrunCourse() {
  8234. if(this.istemplate == 1){
  8235. this.goTo(
  8236. "/course?userid=" +
  8237. this.userid +
  8238. "&oid=" +
  8239. this.oid +
  8240. "&org=" +
  8241. this.org +
  8242. "&role=" +
  8243. this.role
  8244. );
  8245. return
  8246. }
  8247. this.$confirm("是否保存已编辑内容?", "提示", {
  8248. confirmButtonText: "保存",
  8249. cancelButtonText: "不保存",
  8250. distinguishCancelAndClose: true,
  8251. type: "warning",
  8252. })
  8253. .then(() => {
  8254. if (this.taskLoading.length) {
  8255. let _pan = 1
  8256. for(var k = 0; k < this.taskLoading.length; k++){
  8257. if(this.taskLoading[k]){
  8258. this.$message({
  8259. message: `请等待任务${k+1}回答完毕后再保存`,
  8260. type: "warning"
  8261. });
  8262. _pan = 2
  8263. }
  8264. }
  8265. if(_pan == 2){
  8266. return
  8267. }
  8268. }
  8269. if(this.taskGLoading.length){
  8270. let _pan = 1
  8271. for(var k = 0; k < this.taskGLoading.length; k++){
  8272. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8273. this.$message({
  8274. message: `请等待任务${k+1}回答完毕后再保存`,
  8275. type: "warning"
  8276. });
  8277. _pan = 2
  8278. }
  8279. }
  8280. if(_pan == 2){
  8281. return
  8282. }
  8283. }
  8284. if (this.cid == "" || this.cid == undefined) {
  8285. if (this.courseName == "") {
  8286. this.$message.error("请补充填写课程名称");
  8287. return;
  8288. } else {
  8289. this.addWork();
  8290. }
  8291. this.steps = 4;
  8292. } else {
  8293. if (this.courseName == "") {
  8294. this.$message.error("请补充填写课程名称");
  8295. return;
  8296. } else {
  8297. if (this.userid != this.courseUserid && this.role != "1") {
  8298. this.updateWork2();
  8299. } else {
  8300. this.updateWork();
  8301. }
  8302. this.steps = 4;
  8303. }
  8304. }
  8305. })
  8306. .catch((v) => {
  8307. console.log(v);
  8308. if (v == "cancel") {
  8309. this.goTo(
  8310. "/course?userid=" +
  8311. this.userid +
  8312. "&oid=" +
  8313. this.oid +
  8314. "&org=" +
  8315. this.org +
  8316. "&role=" +
  8317. this.role
  8318. );
  8319. }
  8320. });
  8321. },
  8322. lastSteps() {
  8323. if (this.steps == 4) {
  8324. this.goTo(
  8325. "/course?userid=" +
  8326. this.userid +
  8327. "&oid=" +
  8328. this.oid +
  8329. "&org=" +
  8330. this.org +
  8331. "&role=" +
  8332. this.role
  8333. );
  8334. } else {
  8335. // if (this.cidType == 0) {
  8336. // this.steps--;
  8337. // if (this.steps == 1) {
  8338. // setTimeout(() => {
  8339. // this.checkEva(this.checkId);
  8340. // setTimeout(() => {
  8341. // this.checkEva(this.checkId);
  8342. // }, 100);
  8343. // }, 100);
  8344. // }
  8345. // } else {
  8346. if (this.steps == 3) {
  8347. this.steps = 1;
  8348. setTimeout(() => {
  8349. this.checkEva(this.checkId);
  8350. setTimeout(() => {
  8351. this.checkEva(this.checkId);
  8352. }, 100);
  8353. }, 100);
  8354. }
  8355. // }
  8356. }
  8357. },
  8358. navSteps(s) {
  8359. if (this.courseName == "") {
  8360. this.$message.error("请补充填写课程名称");
  8361. return;
  8362. }
  8363. if (this.cidType == 0) {
  8364. if (this.steps == 1) {
  8365. if (this.cid == "" || this.cid == undefined) {
  8366. this.addWork();
  8367. } else {
  8368. if (this.userid != this.courseUserid && this.role != "1") {
  8369. this.updateWork2();
  8370. } else {
  8371. this.updateWork();
  8372. }
  8373. }
  8374. }
  8375. if (s == 1) {
  8376. this.steps = 1;
  8377. setTimeout(() => {
  8378. this.checkEva(this.checkId);
  8379. setTimeout(() => {
  8380. this.checkEva(this.checkId);
  8381. }, 100);
  8382. }, 100);
  8383. }
  8384. if (s == 2) {
  8385. this.steps = 2;
  8386. }
  8387. if (s == 3) {
  8388. this.cTemplate = this.templateC.content;
  8389. this.dialogVisible2 = false;
  8390. this.steps = 3;
  8391. this.isClickColor = 1;
  8392. this.unitJson[
  8393. this.unitIndex
  8394. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8395. this.$forceUpdate();
  8396. setTimeout(() => {
  8397. this.checkEva(this.checkId);
  8398. setTimeout(() => {
  8399. this.checkEva(this.checkId);
  8400. }, 100);
  8401. }, 1000);
  8402. }
  8403. } else {
  8404. if (this.steps == 1) {
  8405. if (this.cid == "" || this.cid == undefined) {
  8406. this.addWork();
  8407. } else {
  8408. if (this.userid != this.courseUserid && this.role != "1") {
  8409. this.updateWork2();
  8410. } else {
  8411. this.updateWork();
  8412. }
  8413. }
  8414. }
  8415. if (s == 1) {
  8416. this.steps = 1;
  8417. setTimeout(() => {
  8418. this.checkEva(this.checkId);
  8419. setTimeout(() => {
  8420. this.checkEva(this.checkId);
  8421. }, 100);
  8422. }, 100);
  8423. }
  8424. if (s == 3) {
  8425. this.cTemplate = this.templateC.content;
  8426. this.dialogVisible2 = false;
  8427. this.steps = 3;
  8428. this.isClickColor = 1;
  8429. this.unitJson[
  8430. this.unitIndex
  8431. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8432. this.$forceUpdate();
  8433. setTimeout(() => {
  8434. this.checkEva(this.checkId);
  8435. setTimeout(() => {
  8436. this.checkEva(this.checkId);
  8437. }, 100);
  8438. }, 1000);
  8439. }
  8440. }
  8441. this.$refs.stepBox.scrollTop = 0;
  8442. },
  8443. setTipsIndex(){
  8444. // 使用 setTimeout 确保对话框已经渲染完成
  8445. this.$nextTick(() => {
  8446. const dialog = document.querySelector('.custom-confirm-box');
  8447. if (dialog) {
  8448. const parent = dialog.parentElement;
  8449. if (parent) {
  8450. parent.style.zIndex = 9999999;
  8451. const adjacentElement = parent.nextElementSibling;
  8452. if (adjacentElement) {
  8453. adjacentElement.style.zIndex = 9999998;
  8454. }
  8455. }
  8456. }
  8457. });
  8458. },
  8459. nextSteps(clickType, ttype) {
  8460. if(!this.time()){
  8461. return
  8462. }
  8463. // if (this.cidType == 1) {
  8464. if (this.steps == 1) {
  8465. if (this.courseName != "") {
  8466. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  8467. // this.$message({
  8468. // message: "请回答完毕后再次发送",
  8469. // type: "warning"
  8470. // });
  8471. if(this.ttaskDetailLoading.length){
  8472. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8473. this.$message({
  8474. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8475. type: "warning"
  8476. });
  8477. }
  8478. if(this.cpotetLoading.cpote1){
  8479. this.$message({
  8480. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8481. type: "warning"
  8482. });
  8483. }
  8484. if(this.cpotetLoading.cpote2){
  8485. this.$message({
  8486. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8487. type: "warning"
  8488. });
  8489. }
  8490. if(this.cpotetLoading.cpote3){
  8491. this.$message({
  8492. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8493. type: "warning"
  8494. });
  8495. }
  8496. if(this.cpotetLoading.cpote4){
  8497. this.$message({
  8498. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8499. type: "warning"
  8500. });
  8501. }
  8502. return;
  8503. }
  8504. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8505. if(!this.courseText && !this.teacherCourseText){
  8506. this.$message.error("请生成简要描述后再生成大纲");
  8507. return;
  8508. }
  8509. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8510. this.openAiDialog(clickType, 'aiOutline2')
  8511. if(clickType == 1){
  8512. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  8513. }else {
  8514. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  8515. }
  8516. }else {
  8517. this.openAiDialog(clickType, 'aiOutline')
  8518. if(clickType == 1){
  8519. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  8520. }else {
  8521. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  8522. }
  8523. }
  8524. return;
  8525. }
  8526. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8527. let _type = ''
  8528. if(this.cpoteType == 0){
  8529. _type = 'aiCpote1'
  8530. if(clickType == 1){
  8531. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  8532. }else {
  8533. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  8534. }
  8535. }else if(this.cpoteType == 1){
  8536. _type = 'aiCpote2'
  8537. if(clickType == 1){
  8538. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  8539. }else {
  8540. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  8541. }
  8542. }else if(this.cpoteType == 2){
  8543. _type = 'aiCpote3'
  8544. if(clickType == 1){
  8545. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  8546. }else {
  8547. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  8548. }
  8549. }else if(this.cpoteType == 3){
  8550. _type = 'aiCpote4'
  8551. if(clickType == 1){
  8552. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  8553. }else {
  8554. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  8555. }
  8556. }
  8557. this.cpoteType++
  8558. this.openAiDialog(clickType, _type)
  8559. return;
  8560. }
  8561. // if (!this.isOutline2) {
  8562. // this.openAiDialog(clickType, 'aiTeacher')
  8563. // return;
  8564. // }
  8565. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8566. this.openAiDialog(clickType, 'aiTeacher3')
  8567. if(clickType == 1){
  8568. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  8569. }else {
  8570. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  8571. }
  8572. return;
  8573. }
  8574. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8575. this.openAiDialog(clickType, 'aiTeacher2')
  8576. if(clickType == 1){
  8577. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  8578. }else {
  8579. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  8580. }
  8581. return;
  8582. }
  8583. let _pan2 = 1
  8584. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8585. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8586. _pan2 = 2
  8587. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8588. break;
  8589. }
  8590. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8591. _pan2 = 2
  8592. this.$message.error(`请完善任务${k+1}的课程教案`)
  8593. break;
  8594. }
  8595. }
  8596. if(_pan2 == 2){
  8597. return;
  8598. }
  8599. const functionA = () => {
  8600. setTimeout(() => {
  8601. this.loading = false
  8602. this.steps = 3;
  8603. }, 0)
  8604. this.isClickColor = 1;
  8605. this.unitJson[
  8606. this.unitIndex
  8607. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8608. this.$forceUpdate();
  8609. setTimeout(() => {
  8610. this.checkEva(this.checkId);
  8611. setTimeout(() => {
  8612. this.checkEva(this.checkId);
  8613. }, 100);
  8614. }, 1000);
  8615. if (this.cid == "" || this.cid == undefined) {
  8616. this.addWork();
  8617. } else {
  8618. if (this.userid != this.courseUserid && this.role != "1") {
  8619. this.updateWork2();
  8620. } else {
  8621. this.updateWork();
  8622. }
  8623. }
  8624. }
  8625. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  8626. if(this.ttaskDetailLoading5.length){
  8627. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8628. // this.$message({
  8629. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8630. // type: "warning"
  8631. // });
  8632. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  8633. confirmButtonText: "确定",
  8634. cancelButtonText: "取消",
  8635. distinguishCancelAndClose: true,
  8636. type: "warning",
  8637. customClass: 'custom-confirm-box'
  8638. })
  8639. .then(() => {
  8640. if(this.isTeacherTaskCancelToken2){
  8641. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  8642. if(this.isTeacherTaskCancelToken2[i]){
  8643. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  8644. this.isTeacherTaskCancelToken2[i] = null;
  8645. }
  8646. }
  8647. }
  8648. this.taskDetailLoading5 = []
  8649. this.ttaskDetailLoading5 = []
  8650. if(this.isTeacherTaskCancelSource){
  8651. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  8652. if(this.isTeacherTaskCancelSource[i]){
  8653. this.isTeacherTaskCancelSource[i].close()
  8654. this.isTeacherTaskCancelSource[i] = null
  8655. }
  8656. }
  8657. }
  8658. if (this.cid) {
  8659. this.loading = true
  8660. functionA()
  8661. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  8662. } else {
  8663. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8664. if(clickType == 1){
  8665. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  8666. }else {
  8667. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  8668. }
  8669. }
  8670. }).catch((v) => {
  8671. console.log(v);
  8672. })
  8673. setTimeout(() => {
  8674. this.setTipsIndex()
  8675. }, 500)
  8676. }
  8677. return;
  8678. }
  8679. if (this.cid && this.panTask() > 0) {
  8680. this.loading = true
  8681. functionA()
  8682. } else {
  8683. // if(ttype == 2){
  8684. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8685. // }else {
  8686. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  8687. // }
  8688. }
  8689. } else {
  8690. this.$message.error("请补充填写课程名称");
  8691. return;
  8692. }
  8693. } else if (this.steps == 3) {
  8694. if (this.taskLoading.length) {
  8695. let _pan = 1
  8696. for(var k = 0; k < this.taskLoading.length; k++){
  8697. if(this.taskLoading[k]){
  8698. this.$message({
  8699. message: `请等待任务${k+1}回答完毕后再上传`,
  8700. type: "warning"
  8701. });
  8702. _pan = 2
  8703. }
  8704. }
  8705. if(_pan == 2){
  8706. return
  8707. }
  8708. }
  8709. if(this.taskGLoading.length){
  8710. let _pan = 1
  8711. for(var k = 0; k < this.taskGLoading.length; k++){
  8712. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8713. this.$message({
  8714. message: `请等待任务${k+1}回答完毕后再保存`,
  8715. type: "warning"
  8716. });
  8717. _pan = 2
  8718. }
  8719. }
  8720. if(_pan == 2){
  8721. return
  8722. }
  8723. }
  8724. if (this.cid == "" || this.cid == undefined) {
  8725. if (this.courseName == "") {
  8726. this.$message.error("请补充填写课程名称");
  8727. return;
  8728. } else {
  8729. this.addWork();
  8730. this.steps++;
  8731. }
  8732. } else {
  8733. if (this.courseName == "") {
  8734. this.$message.error("请补充填写课程名称");
  8735. return;
  8736. } else {
  8737. if (this.userid != this.courseUserid && this.role != "1") {
  8738. this.updateWork2();
  8739. } else {
  8740. this.updateWork();
  8741. }
  8742. this.steps++;
  8743. }
  8744. }
  8745. }
  8746. // } else {
  8747. // if (this.steps == 1) {
  8748. // if (this.courseName != "") {
  8749. // if (this.cid == "" || this.cid == undefined) {
  8750. // this.addWork();
  8751. // } else {
  8752. // if (this.userid != this.courseUserid && this.role != "1") {
  8753. // // this.updateWork2();
  8754. // } else {
  8755. // this.updateWork();
  8756. // }
  8757. // }
  8758. // this.steps++;
  8759. // } else {
  8760. // this.$message.error("请补充填写课程名称");
  8761. // return;
  8762. // }
  8763. // } else if (this.steps == 2) {
  8764. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  8765. // this.cTemplate = this.templateC.content;
  8766. // }
  8767. // this.dialogVisible2 = false;
  8768. // this.steps++;
  8769. // setTimeout(() => {
  8770. // this.checkEva(this.checkId);
  8771. // setTimeout(() => {
  8772. // this.checkEva(this.checkId);
  8773. // }, 100);
  8774. // }, 1000);
  8775. // } else if (this.steps == 3) {
  8776. // if (this.cid == "" || this.cid == undefined) {
  8777. // if (this.courseName == "") {
  8778. // this.$message.error("请补充填写课程名称");
  8779. // return;
  8780. // } else {
  8781. // this.addWork();
  8782. // this.steps++;
  8783. // }
  8784. // } else {
  8785. // if (this.courseName == "") {
  8786. // this.$message.error("请补充填写课程名称");
  8787. // return;
  8788. // } else {
  8789. // if (this.userid != this.courseUserid && this.role != "1") {
  8790. // this.updateWork2();
  8791. // } else {
  8792. // this.updateWork();
  8793. // }
  8794. // this.steps++;
  8795. // }
  8796. // }
  8797. // }
  8798. // }
  8799. this.$refs.stepBox.scrollTop = 0;
  8800. },
  8801. unitSet(i) {
  8802. if (this.unitIndex == i) {
  8803. return;
  8804. }
  8805. this.unitIndex = i;
  8806. this.isClickColor = 1;
  8807. // this.$refs.rightboxR.scrollTop = 0;
  8808. this.$refs.unitBox.scrollTop = 0;
  8809. },
  8810. panUnitJson() {
  8811. let _unitIndex = this.unitIndex;
  8812. let cPan = 1;
  8813. for (
  8814. var j = 0;
  8815. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8816. j++
  8817. ) {
  8818. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8819. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8820. j
  8821. ].proVisible2 = false;
  8822. if (
  8823. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8824. .length > 1
  8825. ) {
  8826. for (
  8827. var z = 0;
  8828. z <
  8829. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8830. .length;
  8831. z++
  8832. ) {
  8833. if (
  8834. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8835. z
  8836. ].tool.length
  8837. ) {
  8838. this.$message.error("请把工具添加完整");
  8839. cPan = 2;
  8840. break;
  8841. }
  8842. }
  8843. }
  8844. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8845. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8846. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8847. (ele) => {
  8848. return ele.value != "" || ele.detail != "" || ele.target != "";
  8849. }
  8850. );
  8851. }
  8852. }
  8853. return cPan;
  8854. },
  8855. unitOpen(i) {
  8856. if (this.unitJson[i].toolOpen) {
  8857. this.unitJson[i].toolOpen = false;
  8858. } else {
  8859. this.unitJson[i].toolOpen = true;
  8860. }
  8861. this.updateWork();
  8862. this.$forceUpdate();
  8863. },
  8864. unitSet2(i) {
  8865. if (this.panUnitJson() == 2) {
  8866. return;
  8867. }
  8868. // if(this.unitJson[i].toolOpen){
  8869. // this.unitJson[i].toolOpen = false
  8870. // this.updateWork()
  8871. // this.$forceUpdate()
  8872. // return
  8873. // }else {
  8874. this.unitJson[i].toolOpen = true;
  8875. // }
  8876. this.$forceUpdate();
  8877. if (this.unitIndex == i) {
  8878. return;
  8879. }
  8880. this.unitIndex = i;
  8881. this.isClickColor = 1;
  8882. // this.$refs.rightboxR.scrollTop = 0;
  8883. this.$refs.unitBox.scrollTop = 0;
  8884. },
  8885. updateCourseState(i) {
  8886. let params = [
  8887. {
  8888. cid: this.cid,
  8889. state: i,
  8890. },
  8891. ];
  8892. this.ajax
  8893. .post(this.$store.state.api + "updateCourseMode", params)
  8894. .then((res) => {
  8895. this.courseState = i;
  8896. })
  8897. .catch((err) => {
  8898. this.$message.error("网络不佳");
  8899. console.error(err);
  8900. });
  8901. },
  8902. addtips(){
  8903. let params = [
  8904. {
  8905. cid: this.cid,
  8906. tips: JSON.stringify(this.aiJson),
  8907. tid: this.templateid
  8908. },
  8909. ];
  8910. this.ajax
  8911. .post(this.$store.state.api + "addTips", params)
  8912. .then((res) => {
  8913. })
  8914. .catch((err) => {
  8915. this.$message.error("网络不佳");
  8916. console.error(err);
  8917. });
  8918. },
  8919. openSaveTips(){
  8920. this.dialogVisibleTips = true
  8921. },
  8922. time() {
  8923. if (!this.now) {
  8924. this.now = new Date().getTime();
  8925. return true;
  8926. } else {
  8927. let time = new Date().getTime();
  8928. if (time - this.now > 1000) {
  8929. this.now = time;
  8930. return true;
  8931. } else {
  8932. return false;
  8933. }
  8934. }
  8935. },
  8936. deleteUnit(i) {
  8937. var _this = this;
  8938. if (i == 0 && _this.unitJson.length == 1) {
  8939. _this
  8940. .$confirm("确定切换成任务模式吗?", "提示", {
  8941. confirmButtonText: "确定",
  8942. cancelButtonText: "取消",
  8943. type: "warning",
  8944. })
  8945. .then(() => {
  8946. _this.unitJson[i].dyName = "";
  8947. // _this.updateCourseState(2);
  8948. })
  8949. .catch(() => {
  8950. return;
  8951. });
  8952. } else {
  8953. _this
  8954. .$confirm("确定删除此阶段吗?", "提示", {
  8955. confirmButtonText: "确定",
  8956. cancelButtonText: "取消",
  8957. type: "warning",
  8958. })
  8959. .then(() => {
  8960. _this.isDelete = 2;
  8961. // _this.unitIndex = _this.unitIndex - 1;
  8962. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  8963. // _this.$message.success("删除成功");
  8964. })
  8965. .catch(() => {
  8966. return;
  8967. });
  8968. }
  8969. },
  8970. deleteWork(chapid) {
  8971. let params = [
  8972. {
  8973. cid: this.cid,
  8974. chapters: JSON.stringify(this.unitJson),
  8975. uid: this.userid,
  8976. chapid: chapid,
  8977. },
  8978. ];
  8979. this.ajax
  8980. .post(this.$store.state.api + "deleteWork", params)
  8981. .then((res) => {
  8982. this.$message({
  8983. message: "删除成功",
  8984. type: "success",
  8985. });
  8986. let task = JSON.parse(
  8987. JSON.stringify(
  8988. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  8989. )
  8990. );
  8991. this.unitJson.splice(this.unitIndex, 1);
  8992. if (this.unitIndex == 0) {
  8993. this.unitIndex = 0;
  8994. } else {
  8995. this.unitIndex = this.unitIndex - 1;
  8996. }
  8997. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8998. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8999. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  9000. ...task,
  9001. ];
  9002. }
  9003. })
  9004. .catch((err) => {
  9005. this.$message.error("网络不佳");
  9006. console.error(err);
  9007. });
  9008. },
  9009. deleteTool(itemTaskIndex, i) {
  9010. var _this = this;
  9011. if (_this.time()) {
  9012. _this
  9013. .$confirm("确定删除此工具吗?", "提示", {
  9014. confirmButtonText: "确定",
  9015. cancelButtonText: "取消",
  9016. type: "warning",
  9017. })
  9018. .then(() => {
  9019. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9020. itemTaskIndex
  9021. ].toolChoose.splice(i, 1);
  9022. _this.$message.success("删除成功");
  9023. })
  9024. .catch(() => {
  9025. return;
  9026. });
  9027. }
  9028. },
  9029. deleteSentence(i) {
  9030. var _this = this;
  9031. _this
  9032. .$confirm("确定删除此题目吗?", "提示", {
  9033. confirmButtonText: "确定",
  9034. cancelButtonText: "取消",
  9035. type: "warning",
  9036. })
  9037. .then(() => {
  9038. _this.sentenceList.splice(i, 1);
  9039. _this.$message.success("删除成功");
  9040. })
  9041. .catch(() => {
  9042. return;
  9043. });
  9044. },
  9045. deleteS(s, i, j) {
  9046. this.sentenceList[i].addSentence.splice(j, 1);
  9047. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9048. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9049. this.sentenceList[i].rightAnswer.splice(a, 1);
  9050. }
  9051. },
  9052. openT() {
  9053. top.postMessage({ tools: "25" }, "*");
  9054. },
  9055. deleteTask(i) {
  9056. var _this = this;
  9057. if (_this.time()) {
  9058. _this
  9059. .$confirm(
  9060. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9061. 1 ==
  9062. i
  9063. ? "确定删除此任务吗?"
  9064. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  9065. "提示",
  9066. {
  9067. confirmButtonText: "确定",
  9068. cancelButtonText: "取消",
  9069. type: "warning",
  9070. }
  9071. )
  9072. .then(() => {
  9073. if (i == 0 && _this.courseState == 4) {
  9074. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9075. i + 1
  9076. ].chapterData = JSON.parse(
  9077. JSON.stringify(
  9078. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9079. .chapterData
  9080. )
  9081. );
  9082. }
  9083. _this.$forceUpdate();
  9084. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9085. i,
  9086. 1
  9087. );
  9088. _this.$message.success("删除成功");
  9089. })
  9090. .catch(() => {
  9091. return;
  9092. });
  9093. }
  9094. },
  9095. deleteTask2(i) {
  9096. var _this = this;
  9097. if (_this.time()) {
  9098. _this
  9099. .$confirm(
  9100. "确定删除此任务吗?",
  9101. "提示",
  9102. {
  9103. confirmButtonText: "确定",
  9104. cancelButtonText: "取消",
  9105. type: "warning",
  9106. }
  9107. )
  9108. .then(() => {
  9109. if (i == 0 && _this.courseState == 4) {
  9110. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9111. i + 1
  9112. ].chapterData = JSON.parse(
  9113. JSON.stringify(
  9114. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9115. .chapterData
  9116. )
  9117. );
  9118. }
  9119. _this.$forceUpdate();
  9120. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9121. i,
  9122. 1
  9123. );
  9124. _this.$message.success("删除成功");
  9125. })
  9126. .catch(() => {
  9127. return;
  9128. });
  9129. }
  9130. },
  9131. handlePictureCardPreview(file) {
  9132. this.dialogImageUrl = file.url;
  9133. },
  9134. clean(i, c) {
  9135. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  9136. },
  9137. handle_remove1(file, fileList, type) {
  9138. var _tmp = this.cover;
  9139. // for (var i = 0, len = _tmp.length; i < len; i++) {
  9140. // if (_tmp[i].uid == file.uid) {
  9141. // _tmp.splice(i, 1);
  9142. // break;
  9143. // }
  9144. // this.cover = _tmp;
  9145. // }
  9146. this.cover = [];
  9147. this.noneBtnImg = this.cover.length >= 1;
  9148. this.isSysPic = false;
  9149. this.isSysPic2 = false;
  9150. this.$forceUpdate();
  9151. },
  9152. addImg(e) {
  9153. var el = e.currentTarget;
  9154. el.getElementsByTagName("input")[0].click();
  9155. e.target.value = "";
  9156. },
  9157. addChaptersTools(i) {
  9158. this.chapTools = [
  9159. {
  9160. tools: [],
  9161. toolDetail: "",
  9162. },
  9163. ];
  9164. this.chapCount = i;
  9165. this.dialogVisible4 = true;
  9166. },
  9167. isNoFinsh() {
  9168. this.$message.warning("功能正在开发中");
  9169. },
  9170. addAttText(i) {
  9171. this.AttText = {
  9172. title: "",
  9173. text: "",
  9174. };
  9175. this.taskCount = i;
  9176. this.AttTextType = 0;
  9177. this.$forceUpdate();
  9178. this.dialogVisible6 = true;
  9179. setTimeout(() => {
  9180. this.$refs["fuInput"].focus();
  9181. }, 100);
  9182. },
  9183. openLine(i) {
  9184. this.line = "";
  9185. this.lineCount = i;
  9186. this.lineType = 0;
  9187. this.$forceUpdate();
  9188. this.dialogVisible7 = true;
  9189. },
  9190. pasteLine(i) {
  9191. navigator.clipboard
  9192. .readText()
  9193. .then((v) => {
  9194. console.log("获取剪贴板成功:", v);
  9195. const html = v;
  9196. const regex = /src="(.*?)"/g;
  9197. const match = regex.exec(html);
  9198. if (match && match[1]) {
  9199. console.log(match[1]);
  9200. this.$message.success("粘贴成功");
  9201. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9202. i
  9203. ].chapterData.unshift({
  9204. name: "链接",
  9205. title: "嵌入代码",
  9206. url: match[1],
  9207. type: 8,
  9208. });
  9209. } else {
  9210. // console.log("未找到包含 src 属性的 iframe");
  9211. this.$message.error(
  9212. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  9213. );
  9214. }
  9215. })
  9216. .catch((v) => {
  9217. console.log("获取剪贴板失败: ", v);
  9218. });
  9219. },
  9220. openSource(i) {
  9221. this.lineCount = i;
  9222. this.sourceData = {};
  9223. this.dialogVisibleSource = true;
  9224. this.updateSourcePan = false;
  9225. },
  9226. openAiCreate(i){
  9227. // this.lineCount = i;
  9228. // this.dialogVisibleAiCreate = true;
  9229. if(!this.pptCount.includes(i)){
  9230. this.pptCount.push(i)
  9231. this.dialogVisibleAiCreate2.push(i);
  9232. }else{
  9233. this.$refs['ppt'+i][0].tanDialog = false
  9234. this.$refs['ppt'+i][0].dialogVisibleAiCreate2 = true
  9235. }
  9236. this.pptBoxDialog = true
  9237. },
  9238. createAiPpt(json, i){
  9239. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9240. // this.dialogVisibleAiCreate = false;
  9241. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  9242. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  9243. },
  9244. closeAiPpt(i){
  9245. this.pptCount.splice(this.pptCount.indexOf(i), 1)
  9246. this.dialogVisibleAiCreate2.splice(this.dialogVisibleAiCreate2.indexOf(i), 1);
  9247. },
  9248. openAiCreateVideo(i){
  9249. this.lineCount = i;
  9250. this.dialogVisibleAiCreateVideo = true;
  9251. },
  9252. createAiVideo(json){
  9253. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9254. // this.dialogVisibleAiCreateVideo = false;
  9255. },
  9256. async createTeacherAn(index){
  9257. // this.lineCount = index;
  9258. this.loading = true
  9259. let md = new MarkdownIt();
  9260. if(this.courseState == 4){
  9261. // if(index == 0 || index){
  9262. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9263. // let name = _task.task+'-教案'
  9264. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9265. // await this.generate(name, _html, 0)
  9266. // }else {
  9267. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9268. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9269. let name = _task.task+'-教案'
  9270. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9271. await this.generate(name, _html, 0)
  9272. }
  9273. // }
  9274. }else if(this.courseState == 5){
  9275. if(index == 0 || index){
  9276. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9277. let name = _task.task+'-教案'
  9278. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9279. await this.generate(name, _html, index)
  9280. }else {
  9281. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9282. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9283. let name = _task.task+'-教案'
  9284. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9285. await this.generate(name, _html, i)
  9286. }
  9287. }
  9288. }
  9289. },
  9290. async createTaskAn(index){
  9291. // this.lineCount = index;
  9292. if(this.taskAnLoading[index]){
  9293. // this.$message.error('请等待当前学历案生成完成')
  9294. this.cancelAjax('taskAn', index)
  9295. return
  9296. }
  9297. this.taskAnLoading[index] = true
  9298. this.$forceUpdate()
  9299. let _this = this
  9300. let md = new MarkdownIt();
  9301. let messages = ""
  9302. messages = `NOTICE
  9303. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  9304. Language: ${this.getLang()}
  9305. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  9306. ## 任务教案
  9307. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  9308. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  9309. let parm = {
  9310. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  9311. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  9312. session_name: uuidv4(),
  9313. userId: this.userid,
  9314. file_ids: [],
  9315. model: 'gpt-4o-2024-08-06',
  9316. temperature: this.mode == 3 ? 0.5 : 0.1,
  9317. }
  9318. this.ajax
  9319. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  9320. .then(async (response) => {
  9321. console.log(response);
  9322. let data = response.data.FunctionResponse
  9323. if (data.message) {
  9324. console.log(data.message);
  9325. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  9326. let name = _task.task+'-学历案'
  9327. let _html = md.render(data.message)
  9328. await _this.generate(name, _html, index, ()=>{
  9329. _this.taskAnLoading[index] = false
  9330. _this.taskAnCancelToken[index] = null
  9331. })
  9332. }else{
  9333. _this.taskAnLoading[index] = false
  9334. _this.taskAnCancelToken[index] = null
  9335. }
  9336. }).catch((error) => {
  9337. console.log(error);
  9338. _this.taskAnLoading[index] = false
  9339. _this.taskAnCancelToken[index] = null
  9340. });
  9341. },
  9342. async generate(a, html, index, callback) {
  9343. // <html lang="en">
  9344. // 将html文件中需要用到的数据挂载到store上
  9345. const content = `<!DOCTYPE html>
  9346. <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'>
  9347. <head>
  9348. <!--[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]-->
  9349. <meta charset="UTF-8">
  9350. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9351. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9352. <title>${a}</title>
  9353. <style>
  9354. table {
  9355. border-collapse: collapse; /* 折叠边框 */
  9356. width: 100%;
  9357. }
  9358. th, td {
  9359. border: 1px solid black; /* 线条样式 */
  9360. padding: 8px;
  9361. text-align: left;
  9362. }
  9363. </style>
  9364. </head>
  9365. <body>
  9366. ${html}
  9367. </body>
  9368. </html>`;
  9369. // debugger
  9370. const blob = htmlDocx.asBlob(content)
  9371. // debugger
  9372. let dname = a + ".docx";
  9373. // 创建文件流
  9374. // 创建bolb实例时,内容一定要放在[]中
  9375. // const blob = new Blob([content], {
  9376. // type: "text/plain;charset='utf-8'",
  9377. // });
  9378. // const file = new File([blob], dname, { type: 'application/msword' });
  9379. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9380. await this.beforeUploadHtml(file, index, callback)
  9381. },
  9382. async generateExport(a, html, index) {
  9383. // <html lang="en">
  9384. // 将html文件中需要用到的数据挂载到store上
  9385. const content = `<!DOCTYPE html>
  9386. <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'>
  9387. <head>
  9388. <!--[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]-->
  9389. <meta charset="UTF-8">
  9390. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9391. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9392. <title>${a}</title>
  9393. <style>
  9394. table {
  9395. border-collapse: collapse; /* 折叠边框 */
  9396. width: 100%;
  9397. }
  9398. th, td {
  9399. border: 1px solid black; /* 线条样式 */
  9400. padding: 8px;
  9401. text-align: left;
  9402. }
  9403. </style>
  9404. </head>
  9405. <body>
  9406. ${html}
  9407. </body>
  9408. </html>`;
  9409. // debugger
  9410. const blob = htmlDocx.asBlob(content)
  9411. // debugger
  9412. const dname = `${a}.docx`;
  9413. // 创建文件流
  9414. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9415. return file
  9416. },
  9417. async generateExport2(a, html, index) {
  9418. return new Promise((resolve) => {
  9419. // <html lang="en">
  9420. // 将html文件中需要用到的数据挂载到store上
  9421. const content = `<!DOCTYPE html>
  9422. <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'>
  9423. <head>
  9424. <!--[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]-->
  9425. <meta charset="UTF-8">
  9426. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9427. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9428. <title>${a}</title>
  9429. <style>
  9430. table {
  9431. border-collapse: collapse; /* 折叠边框 */
  9432. width: 100%;
  9433. }
  9434. th, td {
  9435. border: 1px solid black; /* 线条样式 */
  9436. padding: 8px;
  9437. text-align: left;
  9438. }
  9439. </style>
  9440. </head>
  9441. <body>
  9442. ${html}
  9443. </body>
  9444. </html>`;
  9445. // debugger
  9446. const blob = htmlDocx.asBlob(content)
  9447. // debugger
  9448. const dname = `${a}`;
  9449. // 创建文件流
  9450. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9451. resolve(file); // 通过 Promise 返回 File 对象
  9452. });
  9453. },
  9454. beforeUploadHtml(event, index, callback) {
  9455. var file = event;
  9456. var credentials = {
  9457. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9458. secretAccessKey: "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",
  9459. }; //秘钥形式的登录上传
  9460. window.AWS.config.update(credentials);
  9461. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9462. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9463. var _this = this;
  9464. if (file) {
  9465. var params = {
  9466. Key:
  9467. file.name.split(".")[0] +
  9468. new Date().getTime() +
  9469. "." +
  9470. file.name.split(".")[file.name.split(".").length - 1],
  9471. ContentType: file.type,
  9472. Body: file,
  9473. "Access-Control-Allow-Credentials": "*",
  9474. ACL: "public-read",
  9475. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9476. var options = {
  9477. partSize: 2048 * 1024 * 1024,
  9478. queueSize: 2,
  9479. leavePartsOnError: true,
  9480. };
  9481. bucket
  9482. .upload(params, options)
  9483. .on("httpUploadProgress", function (evt) {
  9484. //这里可以写进度条
  9485. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9486. })
  9487. .send(function (err, data) {
  9488. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  9489. _this.loading = false
  9490. }
  9491. if(_this.courseState == 5){
  9492. _this.loading = false
  9493. }
  9494. callback ? callback() : ''
  9495. if (err) {
  9496. _this.$message.error("上传失败");
  9497. } else {
  9498. let _index = 0
  9499. // if(_this.lineCount == 0 || _this.lineCount){
  9500. // _index = _this.lineCount
  9501. // }else {
  9502. _index = index
  9503. // }
  9504. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  9505.                   name: file.name,
  9506.                   url: data.Location,
  9507.                   type: 3,
  9508.                 })
  9509. console.log(data.Location);
  9510. }
  9511. });
  9512. }
  9513. },
  9514. async generate2(a, html, index, callback) {
  9515. // 将html文件中需要用到的数据挂载到store上
  9516. const content = `<!DOCTYPE html>
  9517. <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'>
  9518. <head>
  9519. <!--[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]-->
  9520. <meta charset="UTF-8">
  9521. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9522. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9523. <title>${a}</title>
  9524. <style>
  9525. table {
  9526. border-collapse: collapse; /* 折叠边框 */
  9527. width: 100%;
  9528. }
  9529. th, td {
  9530. border: 1px solid black; /* 线条样式 */
  9531. padding: 8px;
  9532. text-align: left;
  9533. }
  9534. </style>
  9535. </head>
  9536. <body>
  9537. ${html}
  9538. </body>
  9539. </html>`;
  9540. const blob = htmlDocx.asBlob(content)
  9541. // debugger
  9542. let dname = a + ".docx";
  9543. // 创建文件流
  9544. // 创建bolb实例时,内容一定要放在[]中
  9545. // const blob = new Blob([content], {
  9546. // type: "text/plain;charset='utf-8'",
  9547. // });
  9548. // const file = new File([blob], dname, { type: 'application/msword' });
  9549. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9550. await this.beforeUploadHtml2(file, index, callback)
  9551. },
  9552. beforeUploadHtml2(event, index, callback) {
  9553. var file = event;
  9554. var credentials = {
  9555. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9556. secretAccessKey: "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",
  9557. }; //秘钥形式的登录上传
  9558. window.AWS.config.update(credentials);
  9559. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9560. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9561. var _this = this;
  9562. if (file) {
  9563. var params = {
  9564. Key:
  9565. file.name.split(".")[0] +
  9566. new Date().getTime() +
  9567. "." +
  9568. file.name.split(".")[file.name.split(".").length - 1],
  9569. ContentType: file.type,
  9570. Body: file,
  9571. "Access-Control-Allow-Credentials": "*",
  9572. ACL: "public-read",
  9573. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9574. var options = {
  9575. partSize: 2048 * 1024 * 1024,
  9576. queueSize: 2,
  9577. leavePartsOnError: true,
  9578. };
  9579. bucket
  9580. .upload(params, options)
  9581. .on("httpUploadProgress", function (evt) {
  9582. //这里可以写进度条
  9583. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9584. })
  9585. .send(async function (err, data) {
  9586. if(_this.courseState == 5){
  9587. _this.loading = false
  9588. }
  9589. if (err) {
  9590. callback ? callback() : ''
  9591. _this.$message.error("上传失败");
  9592. } else {
  9593. let fileid = await _this.createFileid(data.Location)
  9594. // _this.cankaoInfoData.push({
  9595. //                   name: file.name,
  9596. //                   url: data.Location,
  9597. //                   type: 3,
  9598. // fileid: fileid,
  9599. //   })
  9600. _this.infoData2.push({
  9601.                   name: file.name,
  9602.                   url: data.Location,
  9603.                   type: 3,
  9604. fileid: fileid == 1 ? '' : fileid,
  9605.   })
  9606. _this.infoData.push({
  9607. name: file.name,
  9608. url: data.Location,
  9609. type: 3,
  9610. fileid: fileid == 1 ? '' : fileid,
  9611. });
  9612. console.log(data.Location);
  9613. callback ? callback() : ''
  9614. }
  9615. });
  9616. }
  9617. },
  9618. addSource() {
  9619. if (!Object.keys(this.sourceData).length) {
  9620. this.$message.error("请选择要上传的资源");
  9621. return;
  9622. }
  9623. let keys = Object.keys(this.sourceData);
  9624. for (var i = 0; i < keys.length; i++) {
  9625. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9626. this.lineCount
  9627. ].chapterData.unshift({
  9628. name: "链接",
  9629. title: this.sourceData[keys[i]].name,
  9630. url: this.sourceData[keys[i]].url,
  9631. type: 14,
  9632. id: keys[i],
  9633. });
  9634. }
  9635. this.$forceUpdate();
  9636. this.dialogVisibleSource = false;
  9637. },
  9638. updateSource() {
  9639. if (!Object.keys(this.sourceData).length) {
  9640. this.$message.error("请选择要上传的资源");
  9641. return;
  9642. }
  9643. let keys = Object.keys(this.sourceData);
  9644. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9645. this.taskCount
  9646. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  9647. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9648. this.taskCount
  9649. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  9650. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9651. this.taskCount
  9652. ].chapterData[this.lineCount].id = keys[0];
  9653. this.updateSourcePan = false;
  9654. this.$forceUpdate();
  9655. this.dialogVisibleSource = false;
  9656. },
  9657. deleteM(i, j) {
  9658. this.testJson.testJson[i].timuList.splice(j, 1);
  9659. },
  9660. beforeUploadTiMu(event, i) {
  9661. const loading = this.openLoading();
  9662. var file = event.target.files[0];
  9663. var credentials = {
  9664. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9665. secretAccessKey: "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",
  9666. }; //秘钥形式的登录上传
  9667. window.AWS.config.update(credentials);
  9668. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9669. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9670. var _this = this;
  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. })
  9694. .send(function (err, data) {
  9695. loading.close();
  9696. if (err) {
  9697. _this.$message.error("上传失败");
  9698. } else {
  9699. if (_this.testJson.testJson[i].timuList) {
  9700. _this.testJson.testJson[i].timuList.push({
  9701. src: data.Location,
  9702. });
  9703. } else {
  9704. _this.testJson.testJson[i].timuList = [];
  9705. _this.testJson.testJson[i].timuList.push({
  9706. src: data.Location,
  9707. });
  9708. }
  9709. _this.imgChange3(i);
  9710. _this.$forceUpdate();
  9711. }
  9712. });
  9713. }
  9714. },
  9715. beforeUploadTi(event, i, j) {
  9716. const loading = this.openLoading();
  9717. var file = event.target.files[0];
  9718. var credentials = {
  9719. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9720. secretAccessKey: "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",
  9721. }; //秘钥形式的登录上传
  9722. window.AWS.config.update(credentials);
  9723. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9724. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9725. var _this = this;
  9726. if (file) {
  9727. var params = {
  9728. Key:
  9729. file.name.split(".")[0] +
  9730. new Date().getTime() +
  9731. "." +
  9732. file.name.split(".")[file.name.split(".").length - 1],
  9733. ContentType: file.type,
  9734. Body: file,
  9735. "Access-Control-Allow-Credentials": "*",
  9736. ACL: "public-read",
  9737. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9738. var options = {
  9739. partSize: 2048 * 1024 * 1024,
  9740. queueSize: 2,
  9741. leavePartsOnError: true,
  9742. };
  9743. bucket
  9744. .upload(params, options)
  9745. .on("httpUploadProgress", function (evt) {
  9746. //这里可以写进度条
  9747. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9748. })
  9749. .send(function (err, data) {
  9750. loading.close();
  9751. if (err) {
  9752. _this.$message.error("上传失败");
  9753. } else {
  9754. _this.testJson.testJson[i].checkList[j] = {};
  9755. _this.testJson.testJson[i].checkList[j].src = data.Location;
  9756. _this.testJson.testJson[i].checkList[j].imgType = 1;
  9757. _this.imgChange2(i, j);
  9758. _this.$forceUpdate();
  9759. }
  9760. });
  9761. }
  9762. },
  9763. beforeUpload1(event, type) {
  9764. // const loading = this.openLoading();
  9765. var file = event.target.files[0];
  9766. var credentials = {
  9767. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9768. secretAccessKey: "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",
  9769. }; //秘钥形式的登录上传
  9770. window.AWS.config.update(credentials);
  9771. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9772. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9773. var _this = this;
  9774. if (file) {
  9775. var params = {
  9776. Key:
  9777. file.name.split(".")[0] +
  9778. new Date().getTime() +
  9779. "." +
  9780. file.name.split(".")[file.name.split(".").length - 1],
  9781. ContentType: file.type,
  9782. Body: file,
  9783. "Access-Control-Allow-Credentials": "*",
  9784. ACL: "public-read",
  9785. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9786. var options = {
  9787. partSize: 2048 * 1024 * 1024,
  9788. queueSize: 2,
  9789. leavePartsOnError: true,
  9790. };
  9791. bucket
  9792. .upload(params, options)
  9793. .on("httpUploadProgress", function (evt) {
  9794. //这里可以写进度条
  9795. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9796. })
  9797. .send(function (err, data) {
  9798. // loading.close();
  9799. if (err) {
  9800. // var a = _this.$refs.upload1.uploadFiles;
  9801. // a.splice(a.length - 1, a.length);
  9802. _this.$message.error("上传失败");
  9803. } else {
  9804. // _this.cover.push({
  9805. // name: file.name,
  9806. // url: data.Location,
  9807. // uid: file.uid,
  9808. // });
  9809. _this.cover = [
  9810. {
  9811. name: file.name,
  9812. url: data.Location,
  9813. uid: file.uid,
  9814. },
  9815. ];
  9816. _this.imgChange1(null, null, 1, null);
  9817. _this.choosePicVisible = false;
  9818. console.log(data.Location);
  9819. }
  9820. });
  9821. }
  9822. },
  9823. beforeUploadSelect(event, type) {
  9824. // const loading = this.openLoading();
  9825. var file = event.target.files[0];
  9826. var credentials = {
  9827. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9828. secretAccessKey: "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",
  9829. }; //秘钥形式的登录上传
  9830. window.AWS.config.update(credentials);
  9831. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9832. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9833. var _this = this;
  9834. if (file) {
  9835. var params = {
  9836. Key:
  9837. file.name.split(".")[0] +
  9838. new Date().getTime() +
  9839. "." +
  9840. file.name.split(".")[file.name.split(".").length - 1],
  9841. ContentType: file.type,
  9842. Body: file,
  9843. "Access-Control-Allow-Credentials": "*",
  9844. ACL: "public-read",
  9845. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9846. var options = {
  9847. partSize: 2048 * 1024 * 1024,
  9848. queueSize: 2,
  9849. leavePartsOnError: true,
  9850. };
  9851. bucket
  9852. .upload(params, options)
  9853. .on("httpUploadProgress", function (evt) {
  9854. //这里可以写进度条
  9855. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9856. })
  9857. .send(function (err, data) {
  9858. // loading.close();
  9859. if (err) {
  9860. _this.$message.error("上传失败");
  9861. } else {
  9862. _this.selectJson.url = data.Location;
  9863. console.log(data.Location);
  9864. }
  9865. });
  9866. }
  9867. },
  9868. chooseSysPic(p) {
  9869. this.cover = [];
  9870. setTimeout(() => {
  9871. this.cover[0] = {
  9872. name: "系统图片.png",
  9873. url: p,
  9874. };
  9875. this.imgChange1(null, null, 1, null);
  9876. this.$forceUpdate();
  9877. }, 0);
  9878. this.isSysPic = true;
  9879. this.isSysPic2 = false;
  9880. this.sysPicVisible = false;
  9881. this.$forceUpdate();
  9882. },
  9883. chooseSysPic2(p) {
  9884. this.cover = [];
  9885. setTimeout(() => {
  9886. this.cover[0] = {
  9887. name: "网络图片.png",
  9888. url: p,
  9889. };
  9890. this.imgChange1(null, null, 1, null);
  9891. this.$forceUpdate();
  9892. }, 0);
  9893. this.isSysPic2 = true;
  9894. this.isSysPic = false;
  9895. this.sysPicVisible2 = false;
  9896. this.$forceUpdate();
  9897. },
  9898. beforeUpload(data) {
  9899. this.$refs.upload1.uploadFiles;
  9900. this.uploadLoading1 = true;
  9901. var file = data.file;
  9902. var credentials = {
  9903. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9904. secretAccessKey: "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",
  9905. }; //秘钥形式的登录上传
  9906. window.AWS.config.update(credentials);
  9907. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9908. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9909. var _this = this;
  9910. if (file) {
  9911. var params = {
  9912. Key:
  9913. file.name.split(".")[0] +
  9914. new Date().getTime() +
  9915. "." +
  9916. file.name.split(".")[file.name.split(".").length - 1],
  9917. ContentType: file.type,
  9918. Body: file,
  9919. "Access-Control-Allow-Credentials": "*",
  9920. ACL: "public-read",
  9921. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9922. var options = {
  9923. partSize: 2048 * 1024 * 1024,
  9924. queueSize: 2,
  9925. leavePartsOnError: true,
  9926. };
  9927. bucket
  9928. .upload(params, options)
  9929. .on("httpUploadProgress", function (evt) {
  9930. //这里可以写进度条
  9931. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9932. })
  9933. .send(function (err, data) {
  9934. _this.uploadLoading1 = false;
  9935. if (err) {
  9936. // var a = _this.$refs.upload1.uploadFiles;
  9937. // a.splice(a.length - 1, a.length);
  9938. _this.$message.error("上传失败");
  9939. } else {
  9940. //上传成功处理
  9941. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  9942. name: file.name,
  9943. url: data.Location,
  9944. uid: file.uid,
  9945. });
  9946. _this.imgChange();
  9947. console.log(data.Location);
  9948. }
  9949. });
  9950. }
  9951. },
  9952. onExceed() {
  9953. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  9954. },
  9955. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  9956. let file = "";
  9957. let cfindex2 = 0;
  9958. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9959. // var file = event.target.files[0];
  9960. file = event.target.files[cfindex];
  9961. let fileName = file.name
  9962. let fileUid = file.uid
  9963. // const loading = this.openLoading();
  9964. // var file = event.target.files[0];
  9965. var credentials = {
  9966. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9967. secretAccessKey: "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",
  9968. }; //秘钥形式的登录上传
  9969. window.AWS.config.update(credentials);
  9970. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9971. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9972. var _this = this;
  9973. if (type == 3) {
  9974. var b = [
  9975. "DOC",
  9976. "DOCX",
  9977. "DOCM",
  9978. "DOTM",
  9979. "DOTX",
  9980. "PPTX",
  9981. "PPSX",
  9982. "PPT",
  9983. "PPS",
  9984. "PPTM",
  9985. "POTM",
  9986. "PPAM",
  9987. "POTX",
  9988. "PPSM",
  9989. ];
  9990. if (
  9991. b.indexOf(
  9992. file.name
  9993. .split(".")
  9994. [file.name.split(".").length - 1].toLocaleUpperCase()
  9995. ) != -1
  9996. ) {
  9997. if (file.size / 1024 / 1024 > 80) {
  9998. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9999. this.inputShow = true;
  10000. // var a = _this.$refs.upload1.uploadFiles;
  10001. // a.splice(a.length - 1, a.length);
  10002. // loading.close();
  10003. return;
  10004. }
  10005. } else if (
  10006. file.name
  10007. .split(".")
  10008. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10009. ) {
  10010. if (file.size / 1024 / 1024 > 80) {
  10011. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10012. this.inputShow = true;
  10013. // var a = _this.$refs.upload1.uploadFiles;
  10014. // a.splice(a.length - 1, a.length);
  10015. // loading.close();
  10016. return;
  10017. }
  10018. }
  10019. }
  10020. this.inputShow = false;
  10021. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10022. // itemTaskIndex
  10023. // ].progress = 0;
  10024. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10025. itemTaskIndex
  10026. ].proVisible = true;
  10027. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10028. itemTaskIndex
  10029. ].isFinishSize = 0;
  10030. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10031. itemTaskIndex
  10032. ].isAllSize = event.target.files.length;
  10033. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10034. // itemTaskIndex
  10035. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10036. _this.$forceUpdate();
  10037. if (file) {
  10038. var params = {
  10039. Key:
  10040. file.name.split(".")[0] +
  10041. new Date().getTime() +
  10042. "." +
  10043. file.name.split(".")[file.name.split(".").length - 1],
  10044. ContentType: file.type,
  10045. Body: file,
  10046. "Access-Control-Allow-Credentials": "*",
  10047. ACL: "public-read",
  10048. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10049. var options = {
  10050. partSize: 2048 * 1024 * 1024,
  10051. queueSize: 2,
  10052. leavePartsOnError: true,
  10053. };
  10054. bucket
  10055. .upload(params, options)
  10056. .on("httpUploadProgress", function (evt) {
  10057. //这里可以写进度条
  10058. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10059. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10060. // itemTaskIndex
  10061. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  10062. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10063. // itemTaskIndex
  10064. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10065. // _this.$forceUpdate();
  10066. })
  10067. .send(function (err, data) {
  10068. cfindex2++
  10069. // loading.close();
  10070. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10071. // itemTaskIndex
  10072. // ].progress = 100;
  10073. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10074. itemTaskIndex
  10075. ].isFinishSize = cfindex2
  10076. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10077. // itemTaskIndex
  10078. // ].isAllSize;
  10079. _this.$forceUpdate();
  10080. setTimeout(() => {
  10081. if (
  10082. cfindex2 == event.target.files.length ||
  10083. cfindex2 > event.target.files.length
  10084. ) {
  10085. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10086. itemTaskIndex
  10087. ].proVisible = false;
  10088. }
  10089. _this.$forceUpdate();
  10090. }, 1000);
  10091. _this.inputShow = true;
  10092. if (err) {
  10093. // var a = _this.$refs.upload1.uploadFiles;
  10094. // a.splice(a.length - 1, a.length);
  10095. _this.$message.error("上传失败");
  10096. } else {
  10097. if (type == 13) {
  10098. let _type = 2;
  10099. var imgA = [
  10100. "png",
  10101. "jpg",
  10102. "jpeg",
  10103. "bmp",
  10104. "gif",
  10105. "webp",
  10106. "psd",
  10107. "svg",
  10108. "tiff",
  10109. ];
  10110. var fileA = [
  10111. "PDF",
  10112. "DOC",
  10113. "DOCX",
  10114. "DOCM",
  10115. "DOTM",
  10116. "DOTX",
  10117. "PPTX",
  10118. "PPSX",
  10119. "PPT",
  10120. "PPS",
  10121. "PPTM",
  10122. "POTM",
  10123. "PPAM",
  10124. "POTX",
  10125. "PPSM",
  10126. "XLSX",
  10127. "XLS",
  10128. ];
  10129. var videoA = [
  10130. "AVI",
  10131. "NAVI",
  10132. "MPEG",
  10133. "ASF",
  10134. "MOV",
  10135. "WMV",
  10136. "3GP",
  10137. "RM",
  10138. "RMVB",
  10139. "FLV",
  10140. "F4V",
  10141. "H.264",
  10142. "H.265",
  10143. "REAL VIDEO",
  10144. "MKV",
  10145. "WebM",
  10146. "HDDVD",
  10147. "MP4",
  10148. "MPG",
  10149. "M4V",
  10150. "MGV",
  10151. "OGV",
  10152. "QTM",
  10153. "STR",
  10154. "AMC",
  10155. "DVX",
  10156. "EVO",
  10157. "DAT",
  10158. "OGG",
  10159. "OGM",
  10160. ];
  10161. if (
  10162. fileA.indexOf(
  10163. data.Location.split(".")[
  10164. data.Location.split(".").length - 1
  10165. ].toLocaleUpperCase()
  10166. ) != -1
  10167. ) {
  10168. _type = 3;
  10169. } else if (
  10170. videoA.indexOf(
  10171. data.Location.split(".")[
  10172. data.Location.split(".").length - 1
  10173. ].toLocaleUpperCase()
  10174. ) != -1
  10175. ) {
  10176. _type = 2;
  10177. } else if (
  10178. imgA.indexOf(
  10179. data.Location.split(".")[
  10180. data.Location.split(".").length - 1
  10181. ].toLocaleLowerCase()
  10182. ) != -1
  10183. ) {
  10184. _type = 13;
  10185. } else {
  10186. _type = 12;
  10187. }
  10188. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10189. itemTaskIndex
  10190. ].chapterData.unshift({
  10191. name: fileName,
  10192. url: data.Location,
  10193. uid: fileUid,
  10194. type: _type,
  10195. });
  10196. _this.imgChange1(null, null, _type, itemTaskIndex);
  10197. } else if (type == 2 || type == 3 || type == 12) {
  10198. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10199. itemTaskIndex
  10200. ].chapterData.unshift({
  10201. name: fileName,
  10202. url: data.Location,
  10203. uid: fileUid,
  10204. type: type,
  10205. });
  10206. _this.imgChange1(null, null, type, itemTaskIndex);
  10207. } else if (type == 4) {
  10208. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10209. itemTaskIndex
  10210. ].fileList1.push({
  10211. name: fileName,
  10212. url: data.Location,
  10213. uid: fileUid,
  10214. });
  10215. _this.imgChange1(null, null, type, itemTaskIndex);
  10216. } else if (type == 5) {
  10217. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10218. itemTaskIndex
  10219. ].homeworkList.push({
  10220. name: fileName,
  10221. url: data.Location,
  10222. uid: fileUid,
  10223. });
  10224. _this.imgChange1(null, null, type, itemTaskIndex);
  10225. }
  10226. console.log(data.Location);
  10227. }
  10228. });
  10229. }
  10230. }
  10231. },
  10232. beforeUploadInfo2(event, type, tindex) {
  10233. // const loading = this.openLoading();
  10234. let file = "";
  10235. let cfindex2 = 0;
  10236. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10237. // var file = event.target.files[0];
  10238. file = event.target.files[cfindex];
  10239. let fileName = file.name
  10240. let fileUid = file.uid
  10241. var credentials = {
  10242. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10243. secretAccessKey: "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",
  10244. }; //秘钥形式的登录上传
  10245. window.AWS.config.update(credentials);
  10246. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10247. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10248. var _this = this;
  10249. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  10250. if (
  10251. ['DOC'].indexOf(
  10252. file.name
  10253. .split(".")
  10254. [file.name.split(".").length - 1].toLocaleUpperCase()
  10255. ) !== -1
  10256. ) {
  10257. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  10258. this.inputShow = true;
  10259. return;
  10260. }
  10261. if (
  10262. xianObj.indexOf(
  10263. file.name
  10264. .split(".")
  10265. [file.name.split(".").length - 1].toLocaleUpperCase()
  10266. ) == -1
  10267. ) {
  10268. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  10269. this.inputShow = true;
  10270. // var a = _this.$refs.upload1.uploadFiles;
  10271. // a.splice(a.length - 1, a.length);
  10272. // loading.close();
  10273. return;
  10274. }
  10275. if (type == 3) {
  10276. var b = [
  10277. "DOC",
  10278. "DOCX",
  10279. "DOCM",
  10280. "DOTM",
  10281. "DOTX",
  10282. "PPTX",
  10283. "PPSX",
  10284. "PPT",
  10285. "PPS",
  10286. "PPTM",
  10287. "POTM",
  10288. "PPAM",
  10289. "POTX",
  10290. "PPSM",
  10291. ];
  10292. if (
  10293. b.indexOf(
  10294. file.name
  10295. .split(".")
  10296. [file.name.split(".").length - 1].toLocaleUpperCase()
  10297. ) != -1
  10298. ) {
  10299. if (file.size / 1024 / 1024 > 80) {
  10300. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10301. this.inputShow = true;
  10302. // var a = _this.$refs.upload1.uploadFiles;
  10303. // a.splice(a.length - 1, a.length);
  10304. // loading.close();
  10305. return;
  10306. }
  10307. } else if (
  10308. file.name
  10309. .split(".")
  10310. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10311. ) {
  10312. if (file.size / 1024 / 1024 > 80) {
  10313. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10314. this.inputShow = true;
  10315. // var a = _this.$refs.upload1.uploadFiles;
  10316. // a.splice(a.length - 1, a.length);
  10317. // loading.close();
  10318. return;
  10319. }
  10320. }
  10321. }
  10322. this.inputShow = false;
  10323. if(type == 14){
  10324. // _this.teacherinfoprogress = 0;
  10325. _this.teacherinfoproVisible = true;
  10326. _this.teacherinfoisFinishSize = 0;
  10327. _this.teacherinfoisAllSize = event.target.files.length;
  10328. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  10329. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10330. }else if(type == 16){
  10331. _this.mubiaoinfoprogress = 0;
  10332. _this.mubiaoinfoproVisible = true;
  10333. _this.mubiaoinfoisFinishSize = 0;
  10334. _this.mubiaoinfoisAllSize = event.target.files.length;
  10335. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  10336. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10337. }else if(type == 17){
  10338. _this.xuanzeinfoprogress = 0;
  10339. _this.xuanzeinfoproVisible = true;
  10340. _this.xuanzeinfoisFinishSize = 0;
  10341. _this.xuanzeinfoisAllSize = event.target.files.length;
  10342. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10343. }else if(type == 18){
  10344. _this.pingjiainfoprogress[tindex] = 0;
  10345. _this.pingjiainfoproVisible[tindex] = true;
  10346. _this.pingjiainfoisFinishSize[tindex] = 0;
  10347. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  10348. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  10349. }else if(type == 19){
  10350. _this.knowinfoprogress = 0;
  10351. _this.knowinfoproVisible = true;
  10352. _this.knowinfoisFinishSize = 0;
  10353. _this.knowinfoisAllSize = event.target.files.length;
  10354. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  10355. }else if(type == 20){
  10356. _this.knowinfoprogress2 = 0;
  10357. _this.knowinfoproVisible2 = true;
  10358. _this.knowinfoisFinishSize2 = 0;
  10359. _this.knowinfoisAllSize2 = event.target.files.length;
  10360. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  10361. }else{
  10362. _this.infoprogress = 0;
  10363. _this.infoproVisible = true;
  10364. _this.infoisFinishSize = 0;
  10365. _this.infoisAllSize = event.target.files.length;
  10366. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10367. }
  10368. _this.$forceUpdate();
  10369. if (file) {
  10370. var params = {
  10371. Key:
  10372. file.name.split(".")[0] +
  10373. new Date().getTime() +
  10374. "." +
  10375. file.name.split(".")[file.name.split(".").length - 1],
  10376. ContentType: file.type,
  10377. Body: file,
  10378. "Access-Control-Allow-Credentials": "*",
  10379. ACL: "public-read",
  10380. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10381. var options = {
  10382. partSize: 2048 * 1024 * 1024,
  10383. queueSize: 2,
  10384. leavePartsOnError: true,
  10385. };
  10386. bucket
  10387. .upload(params, options)
  10388. .on("httpUploadProgress", function (evt) {
  10389. //这里可以写进度条
  10390. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10391. // if(type == 14){
  10392. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10393. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10394. // }else if(type == 16){
  10395. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10396. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10397. // }else if(type == 17){
  10398. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10399. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10400. // }else if(type == 18){
  10401. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  10402. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  10403. // }else {
  10404. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  10405. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10406. // }
  10407. _this.$forceUpdate();
  10408. })
  10409. .send(async function (err, data) {
  10410. // loading.close();
  10411. // if(type == 14){
  10412. // _this.teacherinfoprogress = 100;
  10413. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  10414. // }else if(type == 16){
  10415. // _this.mubiaoinfoprogress = 100;
  10416. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  10417. // }else if(type == 17){
  10418. // _this.xuanzeinfoprogress = 100;
  10419. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  10420. // }else if(type == 18){
  10421. // _this.pingjiainfoprogress[tindex] = 100;
  10422. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  10423. // }else {
  10424. // _this.infoprogress = 100;
  10425. // _this.infoisFinishSize = _this.infoisAllSize;
  10426. // }
  10427. _this.$forceUpdate();
  10428. _this.inputShow = true;
  10429. if (err) {
  10430. cfindex2++;
  10431. if(type == 14){
  10432. _this.teacherinfoisFinishSize = cfindex2;
  10433. }else if(type == 16){
  10434. _this.mubiaoinfoisFinishSize = cfindex2;
  10435. }else if(type == 17){
  10436. _this.xuanzeinfoisFinishSize = cfindex2;
  10437. }else if(type == 18){
  10438. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10439. }else if(type == 19){
  10440. _this.knowinfoisFinishSize = cfindex2;
  10441. }else if(type == 20){
  10442. _this.knowinfoisFinishSize2 = cfindex2;
  10443. }else {
  10444. _this.infoisFinishSize = cfindex2;
  10445. }
  10446. setTimeout(() => {
  10447. if (
  10448. cfindex2 == event.target.files.length ||
  10449. cfindex2 > event.target.files.length
  10450. ) {
  10451. if(type == 14){
  10452. _this.teacherinfoproVisible = false;
  10453. }else if(type == 16){
  10454. _this.mubiaoinfoproVisible = false;
  10455. }else if(type == 17){
  10456. _this.xuanzeinfoproVisible = false;
  10457. }else if(type == 18){
  10458. _this.pingjiainfoproVisible[tindex] = false;
  10459. }else if(type == 19){
  10460. _this.knowinfoproVisible = false;
  10461. }else if(type == 20){
  10462. _this.knowinfoproVisible2 = false;
  10463. }else{
  10464. _this.infoproVisible = false;
  10465. }
  10466. }
  10467. _this.$forceUpdate();
  10468. }, 1000);
  10469. // var a = _this.$refs.upload1.uploadFiles;
  10470. // a.splice(a.length - 1, a.length);
  10471. _this.$message.error("上传失败");
  10472. } else {
  10473. let fileid = await _this.createFileid(data.Location)
  10474. if(fileid){
  10475. cfindex2++;
  10476. if(type == 14){
  10477. _this.teacherinfoisFinishSize = cfindex2;
  10478. }else if(type == 16){
  10479. _this.mubiaoinfoisFinishSize = cfindex2;
  10480. }else if(type == 17){
  10481. _this.xuanzeinfoisFinishSize = cfindex2;
  10482. }else if(type == 18){
  10483. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10484. }else if(type == 19){
  10485. _this.knowinfoisFinishSize = cfindex2;
  10486. }else if(type == 20){
  10487. _this.knowinfoisFinishSize2 = cfindex2;
  10488. }else {
  10489. _this.infoisFinishSize = cfindex2;
  10490. }
  10491. if (
  10492. cfindex2 == event.target.files.length ||
  10493. cfindex2 > event.target.files.length
  10494. ) {
  10495. if(type == 14){
  10496. _this.teacherinfoproVisible = false;
  10497. }else if(type == 16){
  10498. _this.mubiaoinfoproVisible = false;
  10499. }else if(type == 17){
  10500. _this.xuanzeinfoproVisible = false;
  10501. }else if(type == 18){
  10502. _this.pingjiainfoproVisible[tindex] = false;
  10503. }else if(type == 19){
  10504. _this.knowinfoproVisible = false;
  10505. }else if(type == 20){
  10506. _this.knowinfoproVisible2 = false;
  10507. }else{
  10508. _this.infoproVisible = false;
  10509. }
  10510. }
  10511. _this.$forceUpdate();
  10512. }
  10513. if(fileid == 1){
  10514. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  10515. return;
  10516. }
  10517. var imgA = [
  10518. "png",
  10519. "jpg",
  10520. "jpeg",
  10521. "bmp",
  10522. "gif",
  10523. "webp",
  10524. "psd",
  10525. "svg",
  10526. "tiff",
  10527. ];
  10528. var fileA = [
  10529. "PDF",
  10530. "DOC",
  10531. "DOCX",
  10532. "DOCM",
  10533. "DOTM",
  10534. "DOTX",
  10535. "PPTX",
  10536. "PPSX",
  10537. "PPT",
  10538. "PPS",
  10539. "PPTM",
  10540. "POTM",
  10541. "PPAM",
  10542. "POTX",
  10543. "PPSM",
  10544. "XLSX",
  10545. "XLS",
  10546. ];
  10547. var videoA = [
  10548. "AVI",
  10549. "NAVI",
  10550. "MPEG",
  10551. "ASF",
  10552. "MOV",
  10553. "WMV",
  10554. "3GP",
  10555. "RM",
  10556. "RMVB",
  10557. "FLV",
  10558. "F4V",
  10559. "H.264",
  10560. "H.265",
  10561. "REAL VIDEO",
  10562. "MKV",
  10563. "WebM",
  10564. "HDDVD",
  10565. "MP4",
  10566. "MPG",
  10567. "M4V",
  10568. "MGV",
  10569. "OGV",
  10570. "QTM",
  10571. "STR",
  10572. "AMC",
  10573. "DVX",
  10574. "EVO",
  10575. "DAT",
  10576. "OGG",
  10577. "OGM",
  10578. ];
  10579. let _type = 2;
  10580. if (
  10581. fileA.indexOf(
  10582. data.Location.split(".")[
  10583. data.Location.split(".").length - 1
  10584. ].toLocaleUpperCase()
  10585. ) != -1
  10586. ) {
  10587. _type = 3;
  10588. } else if (
  10589. videoA.indexOf(
  10590. data.Location.split(".")[
  10591. data.Location.split(".").length - 1
  10592. ].toLocaleUpperCase()
  10593. ) != -1
  10594. ) {
  10595. _type = 2;
  10596. } else if (
  10597. imgA.indexOf(
  10598. data.Location.split(".")[
  10599. data.Location.split(".").length - 1
  10600. ].toLocaleLowerCase()
  10601. ) != -1
  10602. ) {
  10603. _type = 13;
  10604. } else {
  10605. _type = 12;
  10606. }
  10607. if (type == 13) {
  10608. _this.infoData.push({
  10609. name: fileName,
  10610. url: data.Location,
  10611. uid: fileUid,
  10612. type: _type,
  10613. fileid: fileid == 1 ? '' : fileid,
  10614. });
  10615. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10616. name: fileName,
  10617. url: data.Location,
  10618. uid: fileUid,
  10619. type: _type,
  10620. fileid: fileid == 1 ? '' : fileid,
  10621. })
  10622. }else if (type == 14) {
  10623. _this.teacherInfoData.push({
  10624. name: fileName,
  10625. url: data.Location,
  10626. uid: fileUid,
  10627. type: _type,
  10628. fileid: fileid == 1 ? '' : fileid,
  10629. });
  10630. _this.infoData2.push({
  10631. name: fileName,
  10632. url: data.Location,
  10633. uid: fileUid,
  10634. type: _type,
  10635. fileid: fileid == 1 ? '' : fileid,
  10636. });
  10637. _this.infoData.push({
  10638. name: fileName,
  10639. url: data.Location,
  10640. uid: fileUid,
  10641. type: _type,
  10642. fileid: fileid == 1 ? '' : fileid,
  10643. });
  10644. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10645. name: fileName,
  10646. url: data.Location,
  10647. uid: fileUid,
  10648. type: _type,
  10649. fileid: fileid == 1 ? '' : fileid,
  10650. })
  10651. }else if (type == 15) {
  10652. _this.infoData2.push({
  10653. name: fileName,
  10654. url: data.Location,
  10655. uid: fileUid,
  10656. type: _type,
  10657. fileid: fileid == 1 ? '' : fileid,
  10658. });
  10659. _this.infoData.push({
  10660. name: fileName,
  10661. url: data.Location,
  10662. uid: fileUid,
  10663. type: _type,
  10664. fileid: fileid == 1 ? '' : fileid,
  10665. });
  10666. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10667. name: fileName,
  10668. url: data.Location,
  10669. uid: fileUid,
  10670. type: _type,
  10671. fileid: fileid == 1 ? '' : fileid,
  10672. })
  10673. }else if (type == 16) {
  10674. _this.mubiaoInfoData.push({
  10675. name: fileName,
  10676. url: data.Location,
  10677. uid: fileUid,
  10678. type: _type,
  10679. fileid: fileid == 1 ? '' : fileid,
  10680. });
  10681. }else if (type == 17) {
  10682. _this.xuanzeInfoData.push({
  10683. name: fileName,
  10684. url: data.Location,
  10685. uid: fileUid,
  10686. type: _type,
  10687. fileid: fileid == 1 ? '' : fileid,
  10688. });
  10689. }else if (type == 18) {
  10690. if(!_this.pingjiaInfoData[tindex]){
  10691. _this.pingjiaInfoData[tindex] = []
  10692. }
  10693. _this.pingjiaInfoData[tindex].push({
  10694. name: fileName,
  10695. url: data.Location,
  10696. uid: fileUid,
  10697. type: _type,
  10698. fileid: fileid == 1 ? '' : fileid,
  10699. });
  10700. }else if (type == 19) {
  10701. _this.knowInfoData.push({
  10702. name: fileName,
  10703. url: data.Location,
  10704. uid: fileUid,
  10705. type: _type,
  10706. fileid: fileid == 1 ? '' : fileid,
  10707. });
  10708. if(fileid != 1){
  10709. _this.knowFileids.push(fileid)
  10710. }
  10711. }else if (type == 20) {
  10712. _this.knowInfoData2.push({
  10713. name: fileName,
  10714. url: data.Location,
  10715. uid: fileUid,
  10716. type: _type,
  10717. fileid: fileid == 1 ? '' : fileid,
  10718. });
  10719. if(fileid != 1){
  10720. _this.knowFileids2.push(fileid)
  10721. }
  10722. }
  10723. console.log(data.Location);
  10724. console.log(fileName,'----------',fileid);
  10725. }
  10726. });
  10727. }
  10728. }
  10729. },
  10730. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  10731. // const loading = this.openLoading();
  10732. var file = event.target.files[0];
  10733. var credentials = {
  10734. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10735. secretAccessKey: "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",
  10736. }; //秘钥形式的登录上传
  10737. window.AWS.config.update(credentials);
  10738. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10739. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10740. var _this = this;
  10741. if (type == 3) {
  10742. var b = [
  10743. "DOC",
  10744. "DOCX",
  10745. "DOCM",
  10746. "DOTM",
  10747. "DOTX",
  10748. "PPTX",
  10749. "PPSX",
  10750. "PPT",
  10751. "PPS",
  10752. "PPTM",
  10753. "POTM",
  10754. "PPAM",
  10755. "POTX",
  10756. "PPSM",
  10757. ];
  10758. if (
  10759. b.indexOf(
  10760. file.name
  10761. .split(".")
  10762. [file.name.split(".").length - 1].toLocaleUpperCase()
  10763. ) != -1
  10764. ) {
  10765. if (file.size / 1024 / 1024 > 80) {
  10766. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10767. this.inputShow = true;
  10768. // var a = _this.$refs.upload1.uploadFiles;
  10769. // a.splice(a.length - 1, a.length);
  10770. // loading.close();
  10771. return;
  10772. }
  10773. } else if (
  10774. file.name
  10775. .split(".")
  10776. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10777. ) {
  10778. if (file.size / 1024 / 1024 > 80) {
  10779. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10780. this.inputShow = true;
  10781. // var a = _this.$refs.upload1.uploadFiles;
  10782. // a.splice(a.length - 1, a.length);
  10783. // loading.close();
  10784. return;
  10785. }
  10786. }
  10787. }
  10788. this.inputShow = false;
  10789. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10790. itemTaskIndex
  10791. ].progress = 0;
  10792. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10793. itemTaskIndex
  10794. ].proVisible = true;
  10795. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10796. itemTaskIndex
  10797. ].isFinishSize = 0;
  10798. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10799. itemTaskIndex
  10800. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10801. _this.$forceUpdate();
  10802. if (file) {
  10803. var params = {
  10804. Key:
  10805. file.name.split(".")[0] +
  10806. new Date().getTime() +
  10807. "." +
  10808. file.name.split(".")[file.name.split(".").length - 1],
  10809. ContentType: file.type,
  10810. Body: file,
  10811. "Access-Control-Allow-Credentials": "*",
  10812. ACL: "public-read",
  10813. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10814. var options = {
  10815. partSize: 2048 * 1024 * 1024,
  10816. queueSize: 2,
  10817. leavePartsOnError: true,
  10818. };
  10819. bucket
  10820. .upload(params, options)
  10821. .on("httpUploadProgress", function (evt) {
  10822. //这里可以写进度条
  10823. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10824. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10825. itemTaskIndex
  10826. ].progress = parseInt((evt.loaded / evt.total) * 100);
  10827. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10828. itemTaskIndex
  10829. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10830. _this.$forceUpdate();
  10831. })
  10832. .send(function (err, data) {
  10833. // loading.close();
  10834. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10835. itemTaskIndex
  10836. ].progress = 100;
  10837. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10838. itemTaskIndex
  10839. ].isFinishSize =
  10840. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10841. itemTaskIndex
  10842. ].isAllSize;
  10843. _this.$forceUpdate();
  10844. setTimeout(() => {
  10845. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10846. itemTaskIndex
  10847. ].proVisible = false;
  10848. _this.$forceUpdate();
  10849. }, 1000);
  10850. _this.inputShow = true;
  10851. if (err) {
  10852. // var a = _this.$refs.upload1.uploadFiles;
  10853. // a.splice(a.length - 1, a.length);
  10854. _this.$message.error("上传失败");
  10855. } else {
  10856. if (type == 2 || type == 3) {
  10857. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10858. itemTaskIndex
  10859. ].chapterData.unshift({
  10860. name: file.name,
  10861. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10862. // itemTaskIndex
  10863. // ].chapterData.length+1),
  10864. url: data.Location,
  10865. uid: file.uid,
  10866. type: type,
  10867. text: string,
  10868. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10869. // itemTaskIndex
  10870. // ].chapterData.length + 1),
  10871. });
  10872. _this.imgChange1(null, null, type, itemTaskIndex);
  10873. } else if (type == 4) {
  10874. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10875. itemTaskIndex
  10876. ].fileList1.push({
  10877. name: file.name,
  10878. url: data.Location,
  10879. uid: file.uid,
  10880. });
  10881. _this.imgChange1(null, null, type, itemTaskIndex);
  10882. } else if (type == 5) {
  10883. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10884. itemTaskIndex
  10885. ].homeworkList.push({
  10886. name: file.name,
  10887. url: data.Location,
  10888. uid: file.uid,
  10889. });
  10890. _this.imgChange1(null, null, type, itemTaskIndex);
  10891. }
  10892. console.log(data.Location);
  10893. }
  10894. });
  10895. }
  10896. },
  10897. addunit() {
  10898. this.unitJson.push({
  10899. dyName: "", //单元标题
  10900. isUpdate: 1,
  10901. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  10902. chapterInfo: [
  10903. {
  10904. isread: false,
  10905. chapterid: this.guid(),
  10906. title: "",
  10907. courseName: "",
  10908. taskJson: [
  10909. {
  10910. task: "",
  10911. taskDetail: "",
  10912. chapterData: [],
  10913. toolText: "",
  10914. toolChoose: [
  10915. {
  10916. tool: [],
  10917. toolDetail: "",
  10918. toolType: 0,
  10919. askCount: 1,
  10920. askTitle: "",
  10921. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10922. },
  10923. ],
  10924. isShowTools: false,
  10925. askCount: 1,
  10926. isFold: 1,
  10927. askTitle: "",
  10928. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10929. checkJson: [{ checkCount: [], checkPerent: [] }],
  10930. homeworkList: [],
  10931. },
  10932. ],
  10933. itemCount: 1,
  10934. fileList1: [],
  10935. video: [],
  10936. testData: [],
  10937. pData: [],
  10938. templateArray: [],
  10939. },
  10940. ],
  10941. });
  10942. this.addindex = this.unitJson.length - 1;
  10943. setTimeout(() => {
  10944. this.unitIndex = this.unitJson.length - 1;
  10945. setTimeout(() => {
  10946. console.log(this.$refs.dyInput);
  10947. this.$refs.dyInput[0].focus();
  10948. }, 100);
  10949. this.unitSet(this.unitIndex);
  10950. }, 0);
  10951. },
  10952. addToolFun(itemTaskIndex) {
  10953. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10954. itemTaskIndex
  10955. ].toolChoose.push({
  10956. tool: [],
  10957. toolDetail: "",
  10958. toolType: 0,
  10959. askCount: 1,
  10960. askTitle: "",
  10961. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10962. });
  10963. },
  10964. addTaskBorder() {
  10965. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  10966. task: "",
  10967. taskDetail: "",
  10968. chapterData: [],
  10969. toolText: "",
  10970. toolChoose: [
  10971. {
  10972. tool: [],
  10973. toolDetail: "",
  10974. toolType: 0,
  10975. askCount: 1,
  10976. askTitle: "",
  10977. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10978. },
  10979. ],
  10980. isShowTools: false,
  10981. askCount: 1,
  10982. isFold: 1, //任务收起状态
  10983. askTitle: "",
  10984. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10985. checkJson: [{ checkCount: [], checkPerent: [] }],
  10986. homeworkList: [],
  10987. });
  10988. setTimeout(() => {
  10989. this.checkEva(this.checkId);
  10990. setTimeout(() => {
  10991. this.checkEva(this.checkId);
  10992. }, 100);
  10993. }, 100);
  10994. },
  10995. addTaskBorder2(type, index) {
  10996. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  10997. this.$message({
  10998. message: "有大纲在生成请生成完之后才能使用此功能",
  10999. type: "warning"
  11000. });
  11001. return;
  11002. }
  11003. if(type == 1){
  11004. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  11005. task: "",
  11006. isTask2: true,
  11007. isTask3: true,
  11008. taskDetail: "",
  11009. chapterData: [],
  11010. toolText: "",
  11011. toolChoose: [
  11012. {
  11013. tool: [],
  11014. toolDetail: "",
  11015. toolType: 0,
  11016. askCount: 1,
  11017. askTitle: "",
  11018. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11019. },
  11020. ],
  11021. isShowTools: false,
  11022. askCount: 1,
  11023. isFold: 0, //任务收起状态
  11024. askTitle: "",
  11025. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11026. checkJson: [{ checkCount: [], checkPerent: [] }],
  11027. homeworkList: [],
  11028. })
  11029. }else if(type == 2){
  11030. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  11031. task: "",
  11032. isTask2: true,
  11033. isTask3: true,
  11034. taskDetail: "",
  11035. chapterData: [],
  11036. toolText: "",
  11037. toolChoose: [
  11038. {
  11039. tool: [],
  11040. toolDetail: "",
  11041. toolType: 0,
  11042. askCount: 1,
  11043. askTitle: "",
  11044. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11045. },
  11046. ],
  11047. isShowTools: false,
  11048. askCount: 1,
  11049. isFold: 0, //任务收起状态
  11050. askTitle: "",
  11051. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11052. checkJson: [{ checkCount: [], checkPerent: [] }],
  11053. homeworkList: [],
  11054. })
  11055. }
  11056. setTimeout(() => {
  11057. this.checkEva(this.checkId);
  11058. setTimeout(() => {
  11059. this.checkEva(this.checkId);
  11060. }, 100);
  11061. }, 100);
  11062. },
  11063. add(e, i) {
  11064. var el = e.currentTarget;
  11065. el.getElementsByTagName("input")[0].click();
  11066. },
  11067. fold(i, e) {
  11068. if (
  11069. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  11070. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  11071. ) {
  11072. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  11073. } else {
  11074. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  11075. }
  11076. },
  11077. fold2(i) {
  11078. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  11079. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11080. i
  11081. ].isFold2 = false;
  11082. } else {
  11083. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  11084. }
  11085. this.$forceUpdate();
  11086. },
  11087. foldEva(i) {
  11088. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  11089. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11090. i
  11091. ].isEvaFold = false;
  11092. } else {
  11093. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11094. i
  11095. ].isEvaFold = true;
  11096. setTimeout(() => {
  11097. this.checkEva(this.checkId);
  11098. setTimeout(() => {
  11099. this.checkEva(this.checkId);
  11100. }, 500);
  11101. }, 0);
  11102. }
  11103. this.$forceUpdate();
  11104. },
  11105. foldC(i) {
  11106. if (
  11107. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  11108. ) {
  11109. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11110. i
  11111. ].isFoldchapter = false;
  11112. } else {
  11113. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11114. i
  11115. ].isFoldchapter = true;
  11116. }
  11117. this.$forceUpdate();
  11118. },
  11119. fold3(i, ti) {
  11120. if (
  11121. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  11122. .isFold3
  11123. ) {
  11124. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11125. ti
  11126. ].isFold3 = false;
  11127. } else {
  11128. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11129. ti
  11130. ].isFold3 = true;
  11131. }
  11132. this.$forceUpdate();
  11133. },
  11134. deleteHomeworkBox(unitIndex, index, i) {
  11135. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  11136. this.taskCount
  11137. ].homeworkList.splice(i, 1);
  11138. },
  11139. getStudent() {
  11140. let params = {
  11141. oid: this.oid,
  11142. cu: "",
  11143. cn: this.searchPeople,
  11144. };
  11145. this.ajax
  11146. .get(this.$store.state.api + "selectStudentAdd", params)
  11147. .then((res) => {
  11148. this.studentJuri = res.data[0];
  11149. })
  11150. .catch((err) => {
  11151. this.isLoading = false;
  11152. console.error(err);
  11153. });
  11154. },
  11155. // 添加协同成员其他选项按钮
  11156. getTeacherCopy(){
  11157. this.CollLoading=true
  11158. this.collid = ''
  11159. this.collid = '1xpz'
  11160. let params = {
  11161. oid:
  11162. this.org && this.org != "undefined" && this.org != "null"
  11163. ? this.org
  11164. : this.oid,
  11165. cu: "",
  11166. cn: this.searchTN,
  11167. coll: ''
  11168. };
  11169. this.ajax
  11170. .get(
  11171. this.$store.state.api +
  11172. (this.org && this.org != "undefined" && this.org != "null"
  11173. ? "selectCollaborativeMembersOrg"
  11174. : "selectCollaborativeMembers"),
  11175. params
  11176. )
  11177. .then((res) => {
  11178. let teacherJuri = res.data[0];
  11179. this.CollaborativeTeaList = res.data[1];
  11180. for (var i = 0; i < teacherJuri.length; i++) {
  11181. if (teacherJuri[i].userid == this.userid) {
  11182. teacherJuri.splice(i, 1);
  11183. break;
  11184. }
  11185. }
  11186. this.teacherJuri = teacherJuri.filter((i,index)=>{
  11187. return (i.cclassid == '' || i.cclassid == null)
  11188. })
  11189. console.log(' this.teacherJuri', this.teacherJuri);
  11190. let _check = [];
  11191. let _check2 = [];
  11192. for (var i = 0; i < this.teacherJuri.length; i++) {
  11193. var gid = this.teacherJuri[i].userid;
  11194. _check.push(gid);
  11195. }
  11196. for (var i = 0; i < this.checkboxList3.length; i++) {
  11197. var _id = this.checkboxList3[i];
  11198. if (_check.indexOf(_id) !== -1) {
  11199. _check2.push(_id);
  11200. }
  11201. }
  11202. if (_check2.length==0 && _check.length==0) {
  11203. }else{
  11204. this.checkAll2 = _check2.length === _check.length;
  11205. }
  11206. this.CollLoading=false
  11207. })
  11208. .catch((err) => {
  11209. console.error(err);
  11210. this.CollLoading=false
  11211. });
  11212. },
  11213. getTeacher(val) {
  11214. this.CollLoading=true
  11215. this.collid = ''
  11216. this.collid = !val ? '' : val
  11217. let params = {
  11218. oid:
  11219. this.org && this.org != "undefined" && this.org != "null"
  11220. ? this.org
  11221. : this.oid,
  11222. cu: "",
  11223. cn: this.searchTN,
  11224. coll: this.collid
  11225. };
  11226. this.ajax
  11227. .get(
  11228. this.$store.state.api +
  11229. (this.org && this.org != "undefined" && this.org != "null"
  11230. ? "selectCollaborativeMembersOrg"
  11231. : "selectCollaborativeMembers"),
  11232. params
  11233. )
  11234. .then((res) => {
  11235. let teacherJuri = res.data[0];
  11236. this.CollaborativeTeaList = res.data[1];
  11237. for (var i = 0; i < teacherJuri.length; i++) {
  11238. if (teacherJuri[i].userid == this.userid) {
  11239. teacherJuri.splice(i, 1);
  11240. break;
  11241. }
  11242. }
  11243. this.teacherJuri = teacherJuri;
  11244. let _check = [];
  11245. let _check2 = [];
  11246. for (var i = 0; i < this.teacherJuri.length; i++) {
  11247. var gid = this.teacherJuri[i].userid;
  11248. _check.push(gid);
  11249. }
  11250. for (var i = 0; i < this.checkboxList3.length; i++) {
  11251. var _id = this.checkboxList3[i];
  11252. if (_check.indexOf(_id) !== -1) {
  11253. _check2.push(_id);
  11254. }
  11255. }
  11256. if (_check2.length==0 && _check.length==0) {
  11257. }else{
  11258. this.checkAll2 = _check2.length === _check.length;
  11259. }
  11260. this.CollLoading=false
  11261. })
  11262. .catch((err) => {
  11263. console.error(err);
  11264. this.CollLoading=false
  11265. });
  11266. },
  11267. searchStudent() {
  11268. this.getStudent();
  11269. },
  11270. selectGrage() {
  11271. let params = {
  11272. oid: this.oid,
  11273. };
  11274. this.ajax
  11275. .get(this.$store.state.api + "selectGrageBySchool", params)
  11276. .then((res) => {
  11277. this.gradeList = res.data[0];
  11278. })
  11279. .catch((err) => {
  11280. this.isLoading = false;
  11281. console.error(err);
  11282. });
  11283. },
  11284. //获取班级列表
  11285. getClass() {
  11286. let params = {
  11287. oid: this.oid,
  11288. gid: this.gradeId,
  11289. cn: this.classSearch,
  11290. };
  11291. this.ajax
  11292. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  11293. .then((res) => {
  11294. if (!this.grade.length) {
  11295. this.grade = res.data[0];
  11296. }
  11297. this.grade2 = res.data[0];
  11298. this.classJuri = res.data[0];
  11299. let _check = [];
  11300. let _check2 = [];
  11301. for (var i = 0; i < this.grade2.length; i++) {
  11302. var gid = this.grade2[i].id;
  11303. _check.push(gid);
  11304. }
  11305. for (var i = 0; i < this.checkboxList2.length; i++) {
  11306. var _id = this.checkboxList2[i];
  11307. if (_check.indexOf(_id) !== -1) {
  11308. _check2.push(_id);
  11309. }
  11310. }
  11311. this.checkAll = _check2.length === _check.length;
  11312. })
  11313. .catch((err) => {
  11314. this.isLoading = false;
  11315. console.error(err);
  11316. });
  11317. },
  11318. CourseType2Change(val) {
  11319. this.pTypeCheck = [];
  11320. for (var i = 0; i < this.CourseType2.length; i++) {
  11321. let typeA = this.CourseType2[i];
  11322. if (val.indexOf(typeA.name) != -1) {
  11323. this.pTypeCheck.push(...typeA.id);
  11324. }
  11325. }
  11326. },
  11327. arrayToArray(arrayo, arrayt) {
  11328. let array1 = arrayo;
  11329. let array2 = arrayt;
  11330. let commonElements = [];
  11331. for (let i = 0; i < array1.length; i++) {
  11332. for (let j = 0; j < array2.length; j++) {
  11333. if (array1[i] === array2[j]) {
  11334. commonElements.push(array1[i]);
  11335. }
  11336. }
  11337. }
  11338. return commonElements;
  11339. },
  11340. typeChange(){
  11341. let sub = []
  11342. let mclass = []
  11343. if (this.courseTypeId.length) {
  11344. for (var i = 0; i < this.courseTypeId.length; i++) {
  11345. let _sid = this.courseTypeId[i]
  11346. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11347. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  11348. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  11349. }
  11350. }
  11351. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11352. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  11353. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  11354. }
  11355. }
  11356. }
  11357. }
  11358. sub = JSON.parse(converter(JSON.stringify(sub)))
  11359. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  11360. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  11361. let _file = this.knowFileArray[fi]
  11362. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  11363. let fileS = _file.name ? converter(_file.name).split('/') : 1
  11364. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  11365. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  11366. let fileids = this.knowInfoData.map((item) => item.fileid)
  11367. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11368. this.knowInfoData.push({
  11369. name: _file.filename,
  11370. url: _file.url,
  11371. uid: '',
  11372. type: 3,
  11373. fileid: _file.fileid,
  11374. });
  11375. this.knowFileids.push(_file.fileid)
  11376. }
  11377. fileids = this.knowInfoData.map((item) => item.fileid)
  11378. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11379. this.knowInfoData.push({
  11380. name: _file.filename,
  11381. url: _file.url,
  11382. uid: '',
  11383. type: 3,
  11384. fileid: _file.fileid,
  11385. });
  11386. this.knowFileids.push(_file.fileid)
  11387. }
  11388. fileids = this.knowInfoData.map((item) => item.fileid)
  11389. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11390. this.knowInfoData.push({
  11391. name: _file.filename,
  11392. url: _file.url,
  11393. uid: '',
  11394. type: 3,
  11395. fileid: _file.fileid,
  11396. });
  11397. this.knowFileids.push(_file.fileid)
  11398. }
  11399. fileids = this.knowInfoData.map((item) => item.fileid)
  11400. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11401. this.knowInfoData.push({
  11402. name: _file.filename,
  11403. url: _file.url,
  11404. uid: '',
  11405. type: 3,
  11406. fileid: _file.fileid,
  11407. });
  11408. this.knowFileids.push(_file.fileid)
  11409. }
  11410. fileids = this.knowInfoData.map((item) => item.fileid)
  11411. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  11412. this.knowInfoData.push({
  11413. name: _file.filename,
  11414. url: _file.url,
  11415. uid: '',
  11416. type: 3,
  11417. fileid: _file.fileid,
  11418. });
  11419. this.knowFileids.push(_file.fileid)
  11420. }
  11421. }
  11422. },
  11423. getChapterData(e, i, j, ic, type) {
  11424. e.stopPropagation();
  11425. this.updataC = true;
  11426. this.icc = ic;
  11427. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  11428. console.log("还不能下载图片喔");
  11429. }
  11430. },
  11431. deleteChapterData(e, i, j, ic, taskI) {
  11432. e.stopPropagation();
  11433. let _this = this;
  11434. _this
  11435. .$confirm("确定删除此项?", "提示", {
  11436. confirmButtonText: "确定",
  11437. cancelButtonText: "取消",
  11438. type: "warning",
  11439. })
  11440. .then(() => {
  11441. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  11442. ic,
  11443. 1
  11444. );
  11445. })
  11446. .catch(() => {
  11447. return;
  11448. });
  11449. },
  11450. checkInfoData(fileid, file){
  11451. let type = 1
  11452. let index = 0
  11453. for(let i = 0; i < this.infoData.length; i++){
  11454. if(this.infoData[i].fileid == fileid){
  11455. type = 2
  11456. index = i
  11457. }
  11458. }
  11459. if(type == 2){
  11460. this.infoData.splice(index, 1)
  11461. }else {
  11462. this.infoData.push({...file})
  11463. }
  11464. },
  11465. checkKnowInfoData(fileid){
  11466. if(this.knowFileids.indexOf(fileid) == -1){
  11467. this.knowFileids.push(fileid)
  11468. }else {
  11469. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  11470. }
  11471. },
  11472. checkKnowInfoData2(fileid){
  11473. if(this.knowFileids2.indexOf(fileid) == -1){
  11474. this.knowFileids2.push(fileid)
  11475. }else {
  11476. this.knowFileids2.splice(this.knowFileids.indexOf(fileid), 1)
  11477. }
  11478. },
  11479. deleteInfoData(e, ic) {
  11480. e.stopPropagation();
  11481. let _this = this;
  11482. _this
  11483. .$confirm("确定删除此项?", "提示", {
  11484. confirmButtonText: "确定",
  11485. cancelButtonText: "取消",
  11486. type: "warning",
  11487. })
  11488. .then(() => {
  11489. _this.infoData.splice(
  11490. ic,
  11491. 1
  11492. );
  11493. })
  11494. .catch(() => {
  11495. return;
  11496. });
  11497. },
  11498. deleteInfoData2(e, ic) {
  11499. e.stopPropagation();
  11500. let _this = this;
  11501. _this
  11502. .$confirm("确定删除此项?", "提示", {
  11503. confirmButtonText: "确定",
  11504. cancelButtonText: "取消",
  11505. type: "warning",
  11506. })
  11507. .then(() => {
  11508. let fileid = _this.infoData2[ic].fileid;
  11509. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  11510. _this.infoData2.splice(
  11511. ic,
  11512. 1
  11513. );
  11514. })
  11515. .catch(() => {
  11516. return;
  11517. });
  11518. },
  11519. deleteKnowInfoData(e, ic) {
  11520. e.stopPropagation();
  11521. let _this = this;
  11522. _this
  11523. .$confirm("确定删除此项?", "提示", {
  11524. confirmButtonText: "确定",
  11525. cancelButtonText: "取消",
  11526. type: "warning",
  11527. })
  11528. .then(() => {
  11529. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  11530. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  11531. }
  11532. _this.knowInfoData.splice(
  11533. ic,
  11534. 1
  11535. );
  11536. })
  11537. .catch(() => {
  11538. return;
  11539. });
  11540. },
  11541. deleteKnowInfoData2(e, ic) {
  11542. e.stopPropagation();
  11543. let _this = this;
  11544. _this
  11545. .$confirm("确定删除此项?", "提示", {
  11546. confirmButtonText: "确定",
  11547. cancelButtonText: "取消",
  11548. type: "warning",
  11549. })
  11550. .then(() => {
  11551. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  11552. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  11553. }
  11554. _this.knowInfoData.splice(
  11555. ic,
  11556. 1
  11557. );
  11558. })
  11559. .catch(() => {
  11560. return;
  11561. });
  11562. },
  11563. deletemubiaoInfoData(e, ic) {
  11564. e.stopPropagation();
  11565. let _this = this;
  11566. _this
  11567. .$confirm("确定删除此项?", "提示", {
  11568. confirmButtonText: "确定",
  11569. cancelButtonText: "取消",
  11570. type: "warning",
  11571. })
  11572. .then(() => {
  11573. _this.mubiaoInfoData.splice(
  11574. ic,
  11575. 1
  11576. );
  11577. })
  11578. .catch(() => {
  11579. return;
  11580. });
  11581. },
  11582. deletexuanzeInfoData(e, ic) {
  11583. e.stopPropagation();
  11584. let _this = this;
  11585. _this
  11586. .$confirm("确定删除此项?", "提示", {
  11587. confirmButtonText: "确定",
  11588. cancelButtonText: "取消",
  11589. type: "warning",
  11590. })
  11591. .then(() => {
  11592. _this.xuanzeInfoData.splice(
  11593. ic,
  11594. 1
  11595. );
  11596. })
  11597. .catch(() => {
  11598. return;
  11599. });
  11600. },
  11601. deletepingjiaInfoData(e, ic, tindex) {
  11602. e.stopPropagation();
  11603. let _this = this;
  11604. _this
  11605. .$confirm("确定删除此项?", "提示", {
  11606. confirmButtonText: "确定",
  11607. cancelButtonText: "取消",
  11608. type: "warning",
  11609. })
  11610. .then(() => {
  11611. _this.pingjiaInfoData[tindex].splice(
  11612. ic,
  11613. 1
  11614. );
  11615. })
  11616. .catch(() => {
  11617. return;
  11618. });
  11619. },
  11620. deleteCankaoInfoData(e, ic) {
  11621. e.stopPropagation();
  11622. let _this = this;
  11623. _this
  11624. .$confirm("确定删除此项?", "提示", {
  11625. confirmButtonText: "确定",
  11626. cancelButtonText: "取消",
  11627. type: "warning",
  11628. })
  11629. .then(() => {
  11630. _this.cankaoInfoData.splice(
  11631. ic,
  11632. 1
  11633. );
  11634. })
  11635. .catch(() => {
  11636. return;
  11637. });
  11638. },
  11639. deleteTeacherInfoData(e, ic) {
  11640. e.stopPropagation();
  11641. let _this = this;
  11642. _this
  11643. .$confirm("确定删除此项?", "提示", {
  11644. confirmButtonText: "确定",
  11645. cancelButtonText: "取消",
  11646. type: "warning",
  11647. })
  11648. .then(() => {
  11649. _this.teacherInfoData.splice(
  11650. ic,
  11651. 1
  11652. );
  11653. })
  11654. .catch(() => {
  11655. return;
  11656. });
  11657. },
  11658. updataVideoT(e, i, j, ic) {
  11659. // e.stopPropagation();
  11660. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  11661. // ic
  11662. // ].name = JSON.parse(JSON.stringify(e.target.value));
  11663. this.line =
  11664. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  11665. this.taskCount = j;
  11666. this.lineCount = ic;
  11667. this.dialogVisibleupdataVideoT = true;
  11668. this.$forceUpdate();
  11669. },
  11670. checkChpater(e, i, j, ic){
  11671. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  11672. if(type == 3){
  11673. var fileA = [
  11674. "DOC",
  11675. "DOCX",
  11676. "DOCM",
  11677. "DOTM",
  11678. "DOTX",
  11679. "PPTX",
  11680. "PPSX",
  11681. "PPT",
  11682. "PPS",
  11683. "PPTM",
  11684. "POTM",
  11685. "PPAM",
  11686. "POTX",
  11687. "PPSM",
  11688. "XLSX",
  11689. "XLS"
  11690. ];
  11691. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  11692. if (
  11693. fileA.indexOf(
  11694. url.split(".")[
  11695. url.split(".").length - 1
  11696. ].toLocaleUpperCase()
  11697. ) != -1
  11698. ) {
  11699. this.dialogVisibleOffice = true
  11700. this.wurl = url
  11701. } else if (
  11702. "pdf".indexOf(
  11703. url.split(".")[
  11704. url.split(".").length - 1
  11705. ].toLocaleLowerCase()
  11706. ) != -1
  11707. ) {
  11708. this.dialogVisiblePdf = true
  11709. this.wurl = url
  11710. }
  11711. }
  11712. },
  11713. checkChpater2(e, ic){
  11714. let type = this.infoData2[ic].type
  11715. if(type == 3){
  11716. var fileA = [
  11717. "DOC",
  11718. "DOCX",
  11719. "DOCM",
  11720. "DOTM",
  11721. "DOTX",
  11722. "PPTX",
  11723. "PPSX",
  11724. "PPT",
  11725. "PPS",
  11726. "PPTM",
  11727. "POTM",
  11728. "PPAM",
  11729. "POTX",
  11730. "PPSM",
  11731. "XLSX",
  11732. "XLS"
  11733. ];
  11734. let url = this.infoData2[ic].url
  11735. if (
  11736. fileA.indexOf(
  11737. url.split(".")[
  11738. url.split(".").length - 1
  11739. ].toLocaleUpperCase()
  11740. ) != -1
  11741. ) {
  11742. this.dialogVisibleOffice = true
  11743. this.wurl = url
  11744. } else if (
  11745. "pdf".indexOf(
  11746. url.split(".")[
  11747. url.split(".").length - 1
  11748. ].toLocaleLowerCase()
  11749. ) != -1
  11750. ) {
  11751. this.dialogVisiblePdf = true
  11752. this.wurl = url
  11753. }
  11754. }
  11755. },
  11756. checkChpater3(e, ic, item){
  11757. let type = item.type
  11758. if(type == 3){
  11759. var fileA = [
  11760. "DOC",
  11761. "DOCX",
  11762. "DOCM",
  11763. "DOTM",
  11764. "DOTX",
  11765. "PPTX",
  11766. "PPSX",
  11767. "PPT",
  11768. "PPS",
  11769. "PPTM",
  11770. "POTM",
  11771. "PPAM",
  11772. "POTX",
  11773. "PPSM",
  11774. "XLSX",
  11775. "XLS"
  11776. ];
  11777. let url = item.url
  11778. if (
  11779. fileA.indexOf(
  11780. url.split(".")[
  11781. url.split(".").length - 1
  11782. ].toLocaleUpperCase()
  11783. ) != -1
  11784. ) {
  11785. this.dialogVisibleOffice = true
  11786. this.wurl = url
  11787. } else if (
  11788. "pdf".indexOf(
  11789. url.split(".")[
  11790. url.split(".").length - 1
  11791. ].toLocaleLowerCase()
  11792. ) != -1
  11793. ) {
  11794. this.dialogVisiblePdf = true
  11795. this.wurl = url
  11796. }
  11797. }
  11798. },
  11799. updataVideoC() {
  11800. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11801. this.taskCount
  11802. ].chapterData[this.lineCount].name = JSON.parse(
  11803. JSON.stringify(this.line)
  11804. );
  11805. this.dialogVisibleupdataVideoT = false;
  11806. this.$forceUpdate();
  11807. },
  11808. upCd(e, i, j, taskCount, ic) {
  11809. e.stopPropagation();
  11810. if (ic == 0) {
  11811. return;
  11812. }
  11813. var a = JSON.parse(
  11814. JSON.stringify(
  11815. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11816. ic - 1
  11817. ]
  11818. )
  11819. );
  11820. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  11821. JSON.parse(
  11822. JSON.stringify(
  11823. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11824. )
  11825. );
  11826. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11827. this.$forceUpdate();
  11828. },
  11829. downCd(e, i, j, taskCount, ic) {
  11830. e.stopPropagation();
  11831. if (
  11832. ic ==
  11833. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  11834. 1
  11835. ) {
  11836. return;
  11837. }
  11838. var a = JSON.parse(
  11839. JSON.stringify(
  11840. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11841. ic + 1
  11842. ]
  11843. )
  11844. );
  11845. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  11846. JSON.parse(
  11847. JSON.stringify(
  11848. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11849. )
  11850. );
  11851. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11852. this.$forceUpdate();
  11853. },
  11854. async upTool(e, i, j, tooli) {
  11855. e.stopPropagation();
  11856. if (tooli == 0) {
  11857. return;
  11858. }
  11859. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  11860. let count2 = await this.getWorksCount(3, i, j, tooli);
  11861. if (count1 > 0 || count2 > 0) {
  11862. this.$confirm(
  11863. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11864. "提示",
  11865. {
  11866. confirmButtonText: "确定",
  11867. cancelButtonText: "取消",
  11868. type: "warning",
  11869. }
  11870. )
  11871. .then(() => {
  11872. var a = JSON.parse(
  11873. JSON.stringify(
  11874. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11875. tooli - 1
  11876. ]
  11877. )
  11878. );
  11879. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11880. JSON.parse(
  11881. JSON.stringify(
  11882. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11883. )
  11884. );
  11885. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11886. this.$forceUpdate();
  11887. })
  11888. .catch(() => {
  11889. return;
  11890. });
  11891. } else {
  11892. var a = JSON.parse(
  11893. JSON.stringify(
  11894. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  11895. )
  11896. );
  11897. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11898. JSON.parse(
  11899. JSON.stringify(
  11900. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11901. )
  11902. );
  11903. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11904. this.$forceUpdate();
  11905. }
  11906. },
  11907. async downTool(e, i, j, tooli) {
  11908. e.stopPropagation();
  11909. if (
  11910. tooli ==
  11911. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  11912. ) {
  11913. return;
  11914. }
  11915. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  11916. let count2 = await this.getWorksCount(3, i, j, tooli);
  11917. if (count1 > 0 || count2 > 0) {
  11918. this.$confirm(
  11919. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11920. "提示",
  11921. {
  11922. confirmButtonText: "确定",
  11923. cancelButtonText: "取消",
  11924. type: "warning",
  11925. }
  11926. )
  11927. .then(() => {
  11928. var a = JSON.parse(
  11929. JSON.stringify(
  11930. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11931. tooli + 1
  11932. ]
  11933. )
  11934. );
  11935. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11936. JSON.parse(
  11937. JSON.stringify(
  11938. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11939. )
  11940. );
  11941. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11942. this.$forceUpdate();
  11943. })
  11944. .catch(() => {
  11945. return;
  11946. });
  11947. } else {
  11948. var a = JSON.parse(
  11949. JSON.stringify(
  11950. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  11951. )
  11952. );
  11953. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11954. JSON.parse(
  11955. JSON.stringify(
  11956. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11957. )
  11958. );
  11959. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11960. this.$forceUpdate();
  11961. }
  11962. },
  11963. addWork(type) {
  11964. if(type == 2 && this.courseName == "") {
  11965. this.$message.error("请补充填写课程名称");
  11966. return;
  11967. }
  11968. let cPan = 1;
  11969. for (var i = 0; i < this.unitJson.length; i++) {
  11970. for (
  11971. var j = 0;
  11972. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11973. j++
  11974. ) {
  11975. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11976. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11977. if (
  11978. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11979. ) {
  11980. for (
  11981. var z = 0;
  11982. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11983. z++
  11984. ) {
  11985. if (
  11986. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11987. .length
  11988. ) {
  11989. this.$message.error("请把工具添加完整");
  11990. cPan = 2;
  11991. break;
  11992. }
  11993. }
  11994. }
  11995. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11996. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11997. i
  11998. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11999. return ele.value != "" || ele.detail != "" || ele.target != "";
  12000. });
  12001. }
  12002. }
  12003. }
  12004. this.inputShow = true;
  12005. if (cPan == 2) {
  12006. this.steps--;
  12007. return;
  12008. }
  12009. for (var i = 0; i < this.unitJson.length; i++) {
  12010. delete this.unitJson[i].isUpdate;
  12011. }
  12012. if(!this.targetCourseText2){
  12013. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  12014. }
  12015. let params = [
  12016. {
  12017. uid: this.userid,
  12018. title: this.courseName,
  12019. brief: this.courseText,
  12020. cover:
  12021. this.cover.length > 0
  12022. ? JSON.stringify(this.cover)
  12023. : JSON.stringify([
  12024. {
  12025. name: "noBanner.jpg",
  12026. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  12027. uid: 1656409780264,
  12028. status: "success",
  12029. },
  12030. ]),
  12031. evaId: this.evalua,
  12032. astudent:
  12033. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  12034. see: this.isTeacherSee == true ? 1 : 0,
  12035. chapters: JSON.stringify(this.unitJson),
  12036. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  12037. courseType: JSON.stringify(this.courseTypeId),
  12038. ateacher:
  12039. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  12040. inviteCode: JSON.stringify(this.inviteCode),
  12041. refile: JSON.stringify(this.infoData),
  12042. reBrief: this.courseText2,
  12043. cpote: JSON.stringify(this.cpote),
  12044. setting: JSON.stringify({
  12045. courseJie: this.courseJie,
  12046. courseTime: this.courseTime,
  12047. teacherInfoData: this.teacherInfoData,
  12048. teacherCourseText: this.teacherCourseText,
  12049. targetCourseText: this.targetCourseText,
  12050. cankaoInfoData: this.cankaoInfoData,
  12051. mubiaoInfoData: this.mubiaoInfoData,
  12052. xuanzeInfoData: this.xuanzeInfoData,
  12053. pingjiaInfoData: this.pingjiaInfoData,
  12054. infoData2: this.infoData2,
  12055. isuseT: this.isuseT,
  12056. mode: this.mode,
  12057. targetCourseText2: this.targetCourseText2,
  12058. chatid: this.chatid,
  12059. languageSetting: this.languageSetting,
  12060. knowInfoData: this.knowInfoData,
  12061. knowFileids: this.knowFileids,
  12062. knowInfoData2: this.knowInfoData2,
  12063. knowFileids2: this.knowFileids2,
  12064. }),
  12065. iresearch: this.isFileSearch ? 1 : 2,
  12066. },
  12067. ];
  12068. this.ajax
  12069. .post(this.$store.state.api + "addWorkNew2AI3", params)
  12070. .then((res) => {
  12071. console.log(this.steps);
  12072. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  12073. this.$message({
  12074. message: "新增成功",
  12075. type: "success",
  12076. });
  12077. }
  12078. this.number = res.data.ordernumber;
  12079. this.courseId = res.data.courseId;
  12080. this.cid = res.data.courseId;
  12081. this.courseUserid = this.userid;
  12082. this.islogin = true;
  12083. // this.updateCourseState(4);
  12084. this.updateCourseState(5);
  12085. this.addtips()
  12086. if(type == 2){
  12087. this.retrunCourse()
  12088. }
  12089. if(type == 3){
  12090. this.steps = 4
  12091. }
  12092. })
  12093. .catch((err) => {
  12094. this.$message.error("网络不佳");
  12095. console.error(err);
  12096. });
  12097. },
  12098. goCourse() {
  12099. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  12100. },
  12101. updateWork2() {
  12102. let _unitIndex = this.unitIndex;
  12103. let cPan = 1;
  12104. for (
  12105. var j = 0;
  12106. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  12107. j++
  12108. ) {
  12109. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  12110. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  12111. j
  12112. ].proVisible2 = false;
  12113. if (
  12114. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12115. .length > 1
  12116. ) {
  12117. for (
  12118. var z = 0;
  12119. z <
  12120. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12121. .length;
  12122. z++
  12123. ) {
  12124. if (
  12125. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  12126. z
  12127. ].tool.length
  12128. ) {
  12129. this.$message.error("请把工具添加完整");
  12130. cPan = 2;
  12131. break;
  12132. }
  12133. }
  12134. }
  12135. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  12136. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  12137. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  12138. (ele) => {
  12139. return ele.value != "" || ele.detail != "" || ele.target != "";
  12140. }
  12141. );
  12142. }
  12143. }
  12144. this.inputShow = true;
  12145. if (cPan == 2) {
  12146. this.steps--;
  12147. return;
  12148. }
  12149. let params = [
  12150. {
  12151. cid: this.cid,
  12152. chapters: JSON.stringify(this.unitJson),
  12153. uid: this.userid,
  12154. unitIndex: _unitIndex,
  12155. },
  12156. ];
  12157. this.ajax
  12158. .post(this.$store.state.api + "updateWorkNew4", params)
  12159. .then((res) => {
  12160. this.$message({
  12161. message: "修改成功",
  12162. type: "success",
  12163. });
  12164. this.courseId = this.cid;
  12165. this.addtips();
  12166. })
  12167. .catch((err) => {
  12168. this.$message.error("网络不佳");
  12169. console.error(err);
  12170. });
  12171. },
  12172. updateWork3(unitIndex) {
  12173. let _unitIndex = unitIndex;
  12174. let cPan = 1;
  12175. for (
  12176. var j = 0;
  12177. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  12178. j++
  12179. ) {
  12180. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  12181. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  12182. j
  12183. ].proVisible2 = false;
  12184. if (
  12185. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12186. .length > 1
  12187. ) {
  12188. for (
  12189. var z = 0;
  12190. z <
  12191. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12192. .length;
  12193. z++
  12194. ) {
  12195. if (
  12196. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  12197. z
  12198. ].tool.length
  12199. ) {
  12200. this.$message.error("请把工具添加完整");
  12201. cPan = 2;
  12202. break;
  12203. }
  12204. }
  12205. }
  12206. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  12207. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  12208. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  12209. (ele) => {
  12210. return ele.value != "" || ele.detail != "" || ele.target != "";
  12211. }
  12212. );
  12213. }
  12214. }
  12215. this.inputShow = true;
  12216. if (cPan == 2) {
  12217. this.steps--;
  12218. return;
  12219. }
  12220. let params = [
  12221. {
  12222. cid: this.cid,
  12223. chapters: JSON.stringify(this.unitJson),
  12224. uid: this.userid,
  12225. unitIndex: _unitIndex,
  12226. },
  12227. ];
  12228. this.ajax
  12229. .post(this.$store.state.api + "updateWorkNew4", params)
  12230. .then((res) => {
  12231. // this.$message({
  12232. // message: "修改成功",
  12233. // type: "success",
  12234. // });
  12235. this.courseId = this.cid;
  12236. this.addtips()
  12237. })
  12238. .catch((err) => {
  12239. this.$message.error("网络不佳");
  12240. console.error(err);
  12241. });
  12242. },
  12243. updateWork() {
  12244. let cPan = 1;
  12245. for (var i = 0; i < this.unitJson.length; i++) {
  12246. for (
  12247. var j = 0;
  12248. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  12249. j++
  12250. ) {
  12251. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  12252. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  12253. if (
  12254. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  12255. ) {
  12256. for (
  12257. var z = 0;
  12258. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  12259. z++
  12260. ) {
  12261. if (
  12262. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  12263. .length
  12264. ) {
  12265. this.$message.error("请把工具添加完整");
  12266. cPan = 2;
  12267. break;
  12268. }
  12269. }
  12270. }
  12271. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  12272. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  12273. i
  12274. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  12275. return ele.value != "" || ele.detail != "" || ele.target != "";
  12276. });
  12277. }
  12278. }
  12279. }
  12280. this.inputShow = true;
  12281. if (cPan == 2) {
  12282. this.steps--;
  12283. return;
  12284. }
  12285. for (var i = 0; i < this.unitJson.length; i++) {
  12286. delete this.unitJson[i].isUpdate;
  12287. }
  12288. if(!this.targetCourseText2){
  12289. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  12290. }
  12291. let params = [
  12292. {
  12293. cid: this.cid,
  12294. title: this.courseName,
  12295. brief: this.courseText,
  12296. cover:
  12297. this.cover.length > 0
  12298. ? JSON.stringify(this.cover)
  12299. : JSON.stringify([
  12300. {
  12301. name: "noBanner.jpg",
  12302. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  12303. uid: 1656409780264,
  12304. status: "success",
  12305. },
  12306. ]),
  12307. evaId: this.evalua,
  12308. astudent:
  12309. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  12310. see: this.isTeacherSee == true ? 1 : 0,
  12311. chapters: JSON.stringify(this.unitJson),
  12312. template: this.myWord != "undefined" ? this.myWord : [],
  12313. uid: this.userid,
  12314. courseType: JSON.stringify(this.courseTypeId),
  12315. ateacher:
  12316. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  12317. inviteCode: JSON.stringify(this.inviteCode),
  12318. refile: JSON.stringify(this.infoData),
  12319. reBrief: this.courseText2,
  12320. cpote: JSON.stringify(this.cpote),
  12321. setting: JSON.stringify({
  12322. courseJie: this.courseJie,
  12323. courseTime: this.courseTime,
  12324. teacherInfoData: this.teacherInfoData,
  12325. teacherCourseText: this.teacherCourseText,
  12326. targetCourseText: this.targetCourseText,
  12327. cankaoInfoData: this.cankaoInfoData,
  12328. mubiaoInfoData: this.mubiaoInfoData,
  12329. xuanzeInfoData: this.xuanzeInfoData,
  12330. pingjiaInfoData: this.pingjiaInfoData,
  12331. infoData2: this.infoData2,
  12332. isuseT: this.isuseT,
  12333. mode: this.mode,
  12334. targetCourseText2: this.targetCourseText2,
  12335. chatid: this.chatid,
  12336. languageSetting: this.languageSetting,
  12337. knowInfoData: this.knowInfoData,
  12338. knowFileids: this.knowFileids,
  12339. knowInfoData2: this.knowInfoData2,
  12340. knowFileids2: this.knowFileids2,
  12341. }),
  12342. iresearch: this.isFileSearch ? 1 : 2,
  12343. },
  12344. ];
  12345. this.ajax
  12346. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  12347. .then((res) => {
  12348. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  12349. if (this.cidType == 1) {
  12350. this.$message({
  12351. message: "修改成功",
  12352. type: "success",
  12353. });
  12354. } else {
  12355. this.$message({
  12356. message: "新增成功",
  12357. type: "success",
  12358. });
  12359. }
  12360. }
  12361. this.number = this.nbOrder;
  12362. this.courseId = this.cid;
  12363. this.addtips()
  12364. })
  12365. .catch((err) => {
  12366. this.$message.error("网络不佳");
  12367. console.error(err);
  12368. });
  12369. },
  12370. insertWord() {
  12371. this.dialogVisible1 = true;
  12372. this.updateBoolean2 = false;
  12373. this.tTitle = "";
  12374. this.tdetail = "";
  12375. },
  12376. addWord() {
  12377. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  12378. name: this.tTitle,
  12379. content: this.tdetail,
  12380. uid: this.guid(),
  12381. });
  12382. this.dialogVisible1 = false;
  12383. },
  12384. upWord() { },
  12385. selectWord(uid, i, c) {
  12386. this.dialogVisible1 = true;
  12387. this.updateBoolean2 = true;
  12388. if (
  12389. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  12390. ) {
  12391. this.tTitle =
  12392. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  12393. this.tdetail =
  12394. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  12395. }
  12396. },
  12397. isAddPP() {
  12398. if (this.checkboxList.length > 0) {
  12399. this.$message({
  12400. message: "添加成功",
  12401. type: "success",
  12402. });
  12403. this.dialogVisible3 = false;
  12404. } else {
  12405. this.$message({
  12406. message: "请添加课程成员",
  12407. type: "error",
  12408. });
  12409. }
  12410. },
  12411. isAddClass() {
  12412. this.dialogVisibleClass = false;
  12413. },
  12414. isAddPPTeacher() {
  12415. this.dialogVisibleMember = false;
  12416. this.setMan();
  12417. },
  12418. getTipsTemplate(){
  12419. if(this.templateid){
  12420. let params = {
  12421. id: this.templateid
  12422. }
  12423. this.ajax
  12424. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12425. .then((res) => {
  12426. if(res.data[0].length){
  12427. this.tipsJson = res.data[0][0]
  12428. this.aiJson = JSON.parse(res.data[0][0].tips)
  12429. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12430. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12431. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12432. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12433. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12434. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12435. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12436. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12437. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12438. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12439. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12440. }
  12441. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  12442. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  12443. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  12444. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  12445. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  12446. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  12447. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  12448. // }
  12449. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  12450. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12451. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12452. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12453. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  12454. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12455. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  12456. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12457. // }
  12458. this.$forceUpdate();
  12459. this.isDialog = res.data[0][0].isDialog
  12460. }
  12461. })
  12462. .catch((err) => { });
  12463. }
  12464. },
  12465. getTipsTemplateIsDialog(){
  12466. if(this.templateid){
  12467. let params = {
  12468. id: this.templateid
  12469. }
  12470. this.ajax
  12471. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12472. .then((res) => {
  12473. if(res.data[0].length){
  12474. this.isDialog = res.data[0][0].isDialog
  12475. }
  12476. })
  12477. .catch((err) => { });
  12478. }
  12479. },
  12480. getTemplate() {
  12481. this.ajax
  12482. .get(this.$store.state.api + "getCourseTemplateT", "")
  12483. .then((res) => {
  12484. this.templateArray = res.data[0];
  12485. this.getTemplateOid();
  12486. this.$forceUpdate();
  12487. })
  12488. .catch((err) => { });
  12489. },
  12490. getTemplateOid() {
  12491. let params = {
  12492. oid: this.oid,
  12493. };
  12494. this.ajax
  12495. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12496. .then((res) => {
  12497. if (res.data[0].length) {
  12498. this.templateArray = [...res.data[0], ...this.templateArray];
  12499. }
  12500. this.getTemplateOrg();
  12501. this.$forceUpdate();
  12502. })
  12503. .catch((err) => { });
  12504. },
  12505. getTemplateOrg() {
  12506. let params = {
  12507. oid: this.org,
  12508. };
  12509. this.ajax
  12510. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12511. .then((res) => {
  12512. if (res.data[0].length) {
  12513. this.templateArray = [...res.data[0], ...this.templateArray];
  12514. }
  12515. this.$forceUpdate();
  12516. })
  12517. .catch((err) => { });
  12518. },
  12519. clearChoose() {
  12520. this.clearArray.splice(this.templateC.id, 1);
  12521. this.dialogVisible2 = false;
  12522. },
  12523. clearAttText() {
  12524. this.AttText = {
  12525. title: "",
  12526. text: "",
  12527. };
  12528. this.dialogVisible6 = false;
  12529. },
  12530. clearLine() {
  12531. this.line = "";
  12532. this.dialogVisible7 = false;
  12533. },
  12534. openTemplate() {
  12535. this.ctJson = {};
  12536. this.templateDialog = true;
  12537. },
  12538. checkctJson(json) {
  12539. if (this.ctJson.id == json.id) {
  12540. this.ctJson = {};
  12541. } else {
  12542. this.ctJson = json;
  12543. }
  12544. },
  12545. addTemplate(res) {
  12546. let _this = this;
  12547. let _res = [];
  12548. if (res.id == 1) {
  12549. _res = [
  12550. {
  12551. dyName: "", //单元标题
  12552. easy: 1,
  12553. chapterInfo: [
  12554. {
  12555. isread: false,
  12556. chapterid: this.guid(),
  12557. title: "",
  12558. courseName: "",
  12559. taskJson: [
  12560. {
  12561. task: "",
  12562. taskDetail: "",
  12563. chapterData: [],
  12564. toolText: "",
  12565. toolChoose: [
  12566. {
  12567. tool: [],
  12568. toolDetail: "",
  12569. toolType: 0,
  12570. askCount: 1,
  12571. askTitle: "",
  12572. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12573. },
  12574. ],
  12575. isShowTools: false,
  12576. askCount: 1,
  12577. isFold: 1,
  12578. askTitle: "",
  12579. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12580. checkJson: [{ checkCount: [], checkPerent: [] }],
  12581. homeworkList: [],
  12582. },
  12583. ],
  12584. itemCount: 1,
  12585. fileList1: [],
  12586. video: [],
  12587. testData: [],
  12588. pData: [],
  12589. templateArray: [],
  12590. },
  12591. ],
  12592. },
  12593. ];
  12594. this.updateCourseState(1);
  12595. } else if (res.id == 2) {
  12596. let stageData = [];
  12597. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12598. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12599. if (!iframe && !iframe2) {
  12600. this.$message.error("请使用AI共创生成");
  12601. return;
  12602. }
  12603. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12604. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12605. if (
  12606. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  12607. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  12608. ) {
  12609. this.$message.error("请使用AI共创生成");
  12610. return;
  12611. }
  12612. stageData = copyData
  12613. ? copyData.stageData
  12614. : copyData2
  12615. ? copyData2.stageData
  12616. : [""];
  12617. for (var i = 0; i < stageData.length; i++) {
  12618. _res.push({
  12619. dyName: stageData[i], //单元标题
  12620. chapterInfo: [
  12621. {
  12622. isread: false,
  12623. chapterid: this.guid(),
  12624. title: "",
  12625. courseName: "",
  12626. taskJson: [
  12627. {
  12628. task: "",
  12629. taskDetail: "",
  12630. chapterData: [],
  12631. toolText: "",
  12632. toolChoose: [
  12633. {
  12634. tool: [],
  12635. toolDetail: "",
  12636. toolType: 0,
  12637. askCount: 1,
  12638. askTitle: "",
  12639. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12640. },
  12641. ],
  12642. isShowTools: false,
  12643. askCount: 1,
  12644. isFold: 1,
  12645. askTitle: "",
  12646. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12647. checkJson: [{ checkCount: [], checkPerent: [] }],
  12648. homeworkList: [],
  12649. },
  12650. ],
  12651. itemCount: 1,
  12652. fileList1: [],
  12653. video: [],
  12654. testData: [],
  12655. pData: [],
  12656. templateArray: [],
  12657. },
  12658. ],
  12659. });
  12660. }
  12661. this.updateCourseState(1);
  12662. } else if (!Object.keys(res).length) {
  12663. this.$message.error("请选择模板");
  12664. retrun;
  12665. } else {
  12666. _res = JSON.parse(res.chapters);
  12667. this.updateCourseState(parseInt(res.state));
  12668. }
  12669. _this
  12670. .$confirm(
  12671. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  12672. "提示",
  12673. {
  12674. confirmButtonText: "确定",
  12675. cancelButtonText: "取消",
  12676. type: "warning",
  12677. }
  12678. )
  12679. .then(() => {
  12680. _this.unitJson = _res;
  12681. _this.updateWork();
  12682. // _this.steps++;
  12683. _this.templateDialog = false;
  12684. setTimeout(() => {
  12685. this.checkEva(this.checkId);
  12686. setTimeout(() => {
  12687. this.checkEva(this.checkId);
  12688. }, 100);
  12689. }, 1000);
  12690. })
  12691. .catch(() => {
  12692. return;
  12693. });
  12694. },
  12695. checkTemplate(res) {
  12696. let _this = this;
  12697. _this
  12698. .$confirm(
  12699. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  12700. "提示",
  12701. {
  12702. confirmButtonText: "确定",
  12703. cancelButtonText: "取消",
  12704. type: "warning",
  12705. }
  12706. )
  12707. .then(() => {
  12708. _this.unitJson = JSON.parse(res.chapters);
  12709. _this.steps++;
  12710. setTimeout(() => {
  12711. this.checkEva(this.checkId);
  12712. setTimeout(() => {
  12713. this.checkEva(this.checkId);
  12714. }, 100);
  12715. }, 1000);
  12716. })
  12717. .catch(() => {
  12718. return;
  12719. });
  12720. },
  12721. checkTemplate1(w) {
  12722. this.steps++;
  12723. },
  12724. checkTemplate2() {
  12725. let _this = this;
  12726. _this
  12727. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  12728. confirmButtonText: "确定",
  12729. cancelButtonText: "取消",
  12730. type: "warning",
  12731. })
  12732. .then(() => {
  12733. _this.unitIndex = 0;
  12734. _this.unitJson = [
  12735. {
  12736. dyName: "", //单元标题
  12737. chapterInfo: [
  12738. {
  12739. isread: false,
  12740. chapterid: this.guid(),
  12741. title: "",
  12742. courseName: "",
  12743. taskJson: [
  12744. {
  12745. task: "",
  12746. taskDetail: "",
  12747. chapterData: [],
  12748. toolText: "",
  12749. toolChoose: [
  12750. {
  12751. tool: [],
  12752. toolDetail: "",
  12753. toolType: 0,
  12754. askCount: 1,
  12755. askTitle: "",
  12756. askJson: [
  12757. { askstitle: "", askItem: 1, checkList: [] },
  12758. ],
  12759. },
  12760. ],
  12761. isShowTools: false,
  12762. askCount: 1,
  12763. isFold: 1,
  12764. askTitle: "",
  12765. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12766. checkJson: [{ checkCount: [], checkPerent: [] }],
  12767. homeworkList: [],
  12768. },
  12769. ],
  12770. itemCount: 1,
  12771. fileList1: [],
  12772. video: [],
  12773. testData: [],
  12774. pData: [],
  12775. templateArray: [],
  12776. },
  12777. ],
  12778. },
  12779. ];
  12780. this.steps++;
  12781. setTimeout(() => {
  12782. this.checkEva(this.checkId);
  12783. setTimeout(() => {
  12784. this.checkEva(this.checkId);
  12785. }, 100);
  12786. }, 1000);
  12787. this.updateWork();
  12788. })
  12789. .catch(() => {
  12790. return;
  12791. });
  12792. },
  12793. checkTemplate3() {
  12794. let _this = this;
  12795. _this
  12796. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  12797. confirmButtonText: "确定",
  12798. cancelButtonText: "取消",
  12799. type: "warning",
  12800. })
  12801. .then(() => {
  12802. _this.unitIndex = 0;
  12803. _this.unitJson = [
  12804. {
  12805. dyName: "", //单元标题
  12806. easy: 1,
  12807. chapterInfo: [
  12808. {
  12809. isread: false,
  12810. chapterid: this.guid(),
  12811. title: "",
  12812. courseName: "",
  12813. taskJson: [
  12814. {
  12815. task: "",
  12816. taskDetail: "",
  12817. chapterData: [],
  12818. toolText: "",
  12819. toolChoose: [
  12820. {
  12821. tool: [],
  12822. toolDetail: "",
  12823. toolType: 0,
  12824. askCount: 1,
  12825. askTitle: "",
  12826. askJson: [
  12827. { askstitle: "", askItem: 1, checkList: [] },
  12828. ],
  12829. },
  12830. ],
  12831. isShowTools: false,
  12832. askCount: 1,
  12833. isFold: 1,
  12834. askTitle: "",
  12835. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12836. checkJson: [{ checkCount: [], checkPerent: [] }],
  12837. homeworkList: [],
  12838. },
  12839. ],
  12840. itemCount: 1,
  12841. fileList1: [],
  12842. video: [],
  12843. testData: [],
  12844. pData: [],
  12845. templateArray: [],
  12846. },
  12847. ],
  12848. },
  12849. ];
  12850. // this.steps++;
  12851. this.updateWork();
  12852. })
  12853. .catch(() => {
  12854. return;
  12855. });
  12856. },
  12857. checkTemplate4() {
  12858. let _this = this;
  12859. _this
  12860. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  12861. confirmButtonText: "确定",
  12862. cancelButtonText: "取消",
  12863. type: "warning",
  12864. })
  12865. .then(() => {
  12866. _this.unitIndex = 0;
  12867. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  12868. this.steps++;
  12869. this.updateWork();
  12870. })
  12871. .catch(() => {
  12872. return;
  12873. });
  12874. },
  12875. wordNext() {
  12876. this.dialogVisible2 = false;
  12877. },
  12878. isAddOrUpdateAttText() {
  12879. if (this.AttTextType == 0) {
  12880. this.addAttTextMessage();
  12881. } else {
  12882. this.updateAttText();
  12883. }
  12884. },
  12885. isAddOrUpdateLine() {
  12886. if (!this.lineTitle) {
  12887. this.$message.error("请填写链接标题");
  12888. return;
  12889. }
  12890. if (this.lineType == 0) {
  12891. this.addLine();
  12892. } else {
  12893. this.updateLine();
  12894. }
  12895. },
  12896. addAttTextMessage() {
  12897. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12898. this.taskCount
  12899. ].chapterData.unshift({
  12900. name: this.AttText.title,
  12901. url: this.AttText.text,
  12902. type: 6,
  12903. });
  12904. this.imgChange1(null, null, 6, this.taskCount);
  12905. this.dialogVisible6 = false;
  12906. },
  12907. selectAttText(itemTaskIndex, i) {
  12908. this.AttText.title =
  12909. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12910. itemTaskIndex
  12911. ].chapterData[i].name;
  12912. this.AttText.text =
  12913. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12914. itemTaskIndex
  12915. ].chapterData[i].url;
  12916. this.taskCount = itemTaskIndex;
  12917. this.AttTextIndex = i;
  12918. this.AttTextType = 1;
  12919. this.dialogVisible6 = true;
  12920. },
  12921. updateAttText() {
  12922. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12923. this.taskCount
  12924. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  12925. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12926. this.taskCount
  12927. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  12928. this.dialogVisible6 = false;
  12929. },
  12930. addLine() {
  12931. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12932. this.lineCount
  12933. ].chapterData.unshift({
  12934. name: "链接",
  12935. title: this.lineTitle,
  12936. url: this.line,
  12937. type: 8,
  12938. });
  12939. this.imgChange1(null, null, 8, this.lineCount);
  12940. this.dialogVisible7 = false;
  12941. },
  12942. selectLine(itemTaskIndex, i) {
  12943. this.line =
  12944. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12945. itemTaskIndex
  12946. ].chapterData[i].url;
  12947. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12948. itemTaskIndex
  12949. ].chapterData[i].title
  12950. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12951. .chapterData[i].title
  12952. : "";
  12953. this.taskCount = itemTaskIndex;
  12954. this.lineCount = i;
  12955. this.lineType = 1;
  12956. this.dialogVisible7 = true;
  12957. },
  12958. openUpdateSource(itemTaskIndex, i) {
  12959. this.sourceData = {};
  12960. let source =
  12961. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12962. .chapterData[i];
  12963. this.sourceData[source.id] = {};
  12964. this.sourceData[source.id].name = source.title;
  12965. this.sourceData[source.id].url = source.url;
  12966. this.dialogVisibleSource = true;
  12967. this.updateSourcePan = true;
  12968. this.taskCount = itemTaskIndex;
  12969. this.lineCount = i;
  12970. },
  12971. updateLine() {
  12972. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12973. this.taskCount
  12974. ].chapterData[this.lineCount].url = this.line;
  12975. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12976. this.taskCount
  12977. ].chapterData[this.lineCount].title = this.lineTitle;
  12978. this.dialogVisible7 = false;
  12979. },
  12980. addPP() {
  12981. this.dialogVisible3 = true;
  12982. },
  12983. goTo(path) {
  12984. this.$router.push(path);
  12985. },
  12986. openTools(itemTaskIndex, i, toolIndex) {
  12987. this.toolIndex = toolIndex;
  12988. this.taskCount = itemTaskIndex;
  12989. if (i == 4) {
  12990. if (toolIndex == null) {
  12991. var a =
  12992. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12993. .chapterData;
  12994. for (var i = 0; i < a.length; i++) {
  12995. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  12996. this.askJson =
  12997. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12998. itemTaskIndex
  12999. ].chapterData[i].askJson;
  13000. }
  13001. }
  13002. } else {
  13003. this.askJson = JSON.parse(
  13004. JSON.stringify(
  13005. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13006. itemTaskIndex
  13007. ].toolChoose[toolIndex]
  13008. )
  13009. );
  13010. }
  13011. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  13012. this.dialogVisible5 = true;
  13013. } else if (i == 45) {
  13014. if (
  13015. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13016. .toolChoose[toolIndex].testJson
  13017. ) {
  13018. this.testJson = JSON.parse(
  13019. JSON.stringify(
  13020. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13021. itemTaskIndex
  13022. ].toolChoose[toolIndex].testJson
  13023. )
  13024. );
  13025. } else {
  13026. var testJson = {
  13027. testCount: 1,
  13028. testTitle: "",
  13029. testJson: [
  13030. {
  13031. teststitle: "",
  13032. testItem: 1,
  13033. checkList: [],
  13034. timuList: [],
  13035. answer: [],
  13036. type: "1",
  13037. },
  13038. ],
  13039. };
  13040. this.testJson = testJson;
  13041. }
  13042. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  13043. this.dialogVisibleChoice = true;
  13044. } else if (i == 47) {
  13045. if (
  13046. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13047. .toolChoose[toolIndex].sentenceList
  13048. ) {
  13049. this.sentenceList = JSON.parse(
  13050. JSON.stringify(
  13051. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13052. itemTaskIndex
  13053. ].toolChoose[toolIndex].sentenceList
  13054. )
  13055. );
  13056. } else {
  13057. var sentenceList = [
  13058. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  13059. ];
  13060. this.sentenceList = sentenceList;
  13061. }
  13062. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  13063. this.dialogVisibleSentence = true;
  13064. } else if (i == 48) {
  13065. if (
  13066. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13067. .toolChoose[toolIndex].tableJson
  13068. ) {
  13069. this.tableJson = JSON.parse(
  13070. JSON.stringify(
  13071. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13072. itemTaskIndex
  13073. ].toolChoose[toolIndex].tableJson
  13074. )
  13075. );
  13076. } else {
  13077. var tableJson = { text: "" };
  13078. this.tableJson = tableJson;
  13079. }
  13080. this.dialogVisibleTable = true;
  13081. } else if (i == 52) {
  13082. if (
  13083. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13084. .toolChoose[toolIndex].wordJson
  13085. ) {
  13086. this.wordJson = JSON.parse(
  13087. JSON.stringify(
  13088. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13089. itemTaskIndex
  13090. ].toolChoose[toolIndex].wordJson
  13091. )
  13092. );
  13093. } else {
  13094. var wordJson = { text: "" };
  13095. this.wordJson = wordJson;
  13096. }
  13097. this.dialogVisibleWord = true;
  13098. // else if (i == 50) {
  13099. // if (
  13100. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13101. // .toolChoose[toolIndex].uploadJson
  13102. // ) {
  13103. // this.uploadJson = JSON.parse(
  13104. // JSON.stringify(
  13105. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13106. // itemTaskIndex
  13107. // ].toolChoose[toolIndex].uploadJson
  13108. // )
  13109. // );
  13110. // } else {
  13111. // var uploadJson = [];
  13112. // this.uploadJson = uploadJson;
  13113. // }
  13114. // this.dialogVisibleMoreUpload = true;
  13115. // }
  13116. } else if (i == 10) {
  13117. if (
  13118. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13119. .toolChoose[toolIndex].preTime
  13120. ) {
  13121. this.preTime = JSON.parse(
  13122. JSON.stringify(
  13123. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13124. itemTaskIndex
  13125. ].toolChoose[toolIndex].preTime
  13126. )
  13127. );
  13128. } else {
  13129. var preTime = 0;
  13130. this.preTime = preTime;
  13131. }
  13132. this.dialogVisiblePreTime = true;
  13133. } else if (i == 49) {
  13134. if (
  13135. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13136. .toolChoose[toolIndex].groupJson
  13137. ) {
  13138. this.groupJson = JSON.parse(
  13139. JSON.stringify(
  13140. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13141. itemTaskIndex
  13142. ].toolChoose[toolIndex].groupJson
  13143. )
  13144. );
  13145. } else {
  13146. var groupJson = {
  13147. group: [{ name: "第1组" }],
  13148. number: undefined,
  13149. islock: 1,
  13150. };
  13151. this.groupJson = groupJson;
  13152. }
  13153. this.dialogVisibleGroup = true;
  13154. } else if (i == 62) {
  13155. if (
  13156. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13157. .toolChoose[toolIndex].videoJson
  13158. ) {
  13159. this.videoJson = JSON.parse(
  13160. JSON.stringify(
  13161. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13162. itemTaskIndex
  13163. ].toolChoose[toolIndex].videoJson
  13164. )
  13165. );
  13166. } else {
  13167. var videoJson = {
  13168. video: "",
  13169. setting: [],
  13170. };
  13171. this.videoJson = videoJson;
  13172. }
  13173. this.dialogVisibleVideo = true;
  13174. } else if (i == 15) {
  13175. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13176. itemTaskIndex
  13177. ].toolChoose[toolIndex].answerQ
  13178. ? JSON.parse(
  13179. JSON.stringify(
  13180. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13181. itemTaskIndex
  13182. ].toolChoose[toolIndex].answerQ
  13183. )
  13184. )
  13185. : "";
  13186. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  13187. this.dialogVisible8 = true;
  13188. } else if (i == 40) {
  13189. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13190. itemTaskIndex
  13191. ].toolChoose[toolIndex].rateJson
  13192. ? JSON.parse(
  13193. JSON.stringify(
  13194. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13195. itemTaskIndex
  13196. ].toolChoose[toolIndex].rateJson
  13197. )
  13198. )
  13199. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  13200. this.selectSteps = 1;
  13201. this.dialogVisibleRate = true;
  13202. } else if (i == 42) {
  13203. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13204. itemTaskIndex
  13205. ].toolChoose[toolIndex].answerQ
  13206. ? JSON.parse(
  13207. JSON.stringify(
  13208. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13209. itemTaskIndex
  13210. ].toolChoose[toolIndex].answerQ
  13211. )
  13212. )
  13213. : "";
  13214. this.dialogVisibleMp3 = true;
  13215. } else if (i == 41) {
  13216. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13217. itemTaskIndex
  13218. ].toolChoose[toolIndex].selectJson
  13219. ? JSON.parse(
  13220. JSON.stringify(
  13221. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13222. itemTaskIndex
  13223. ].toolChoose[toolIndex].selectJson
  13224. )
  13225. )
  13226. : { url: "", select: [], answer: [] };
  13227. this.selectSteps = 1;
  13228. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  13229. this.dialogVisibleSelect = true;
  13230. } else if (i == 3) {
  13231. top.postMessage(
  13232. {
  13233. tools: "3y",
  13234. cid: this.cid,
  13235. stage: this.unitIndex,
  13236. task: itemTaskIndex,
  13237. tool: toolIndex,
  13238. },
  13239. "*"
  13240. );
  13241. } else if (i == 1) {
  13242. top.postMessage(
  13243. {
  13244. tools: "1y",
  13245. cid: this.cid,
  13246. stage: this.unitIndex,
  13247. task: itemTaskIndex,
  13248. tool: toolIndex,
  13249. },
  13250. "*"
  13251. );
  13252. } else if (i == 57) {
  13253. top.postMessage(
  13254. {
  13255. tools: "57y",
  13256. cid: this.cid,
  13257. stage: this.unitIndex,
  13258. task: itemTaskIndex,
  13259. tool: toolIndex,
  13260. },
  13261. "*"
  13262. );
  13263. } else if (i == 69) {
  13264. this.englishList = {};
  13265. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  13266. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  13267. ? JSON.parse(
  13268. JSON.stringify(
  13269. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13270. itemTaskIndex
  13271. ].toolChoose[toolIndex].englishList
  13272. )
  13273. )
  13274. : {};
  13275. this.$forceUpdate();
  13276. this.englishDialogVisible = true;
  13277. } else if (i == 70) {
  13278. this.englishVoiceJson = {};
  13279. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  13280. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  13281. ? JSON.parse(
  13282. JSON.stringify(
  13283. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13284. itemTaskIndex
  13285. ].toolChoose[toolIndex].englishVoiceJson
  13286. )
  13287. )
  13288. : {
  13289. title: '',
  13290. detail: '',
  13291. array: []
  13292. };
  13293. // {
  13294. // time: "",
  13295. // class: "",
  13296. // difficulty: 0,
  13297. // topic: "",
  13298. // isShow: false,
  13299. // eva: 0,
  13300. // aiEva: {
  13301. // isAiEva: false,
  13302. // aiEvaChoose: [],
  13303. // },
  13304. // allfType: [],
  13305. // englishJson: {},
  13306. // };
  13307. this.$forceUpdate();
  13308. this.EnglishVoiceDialog = true;
  13309. }
  13310. },
  13311. setEnglishVoiceJson(val) {
  13312. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13313. this.taskCount
  13314. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  13315. JSON.stringify(val)
  13316. );
  13317. this.$forceUpdate();
  13318. if (
  13319. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13320. .toolChoose[this.toolIndex].tool != 70
  13321. ) {
  13322. this.addTools(70, this.taskCount, this.toolIndex);
  13323. }
  13324. },
  13325. chapAddTools(i) {
  13326. if (this.chapTools[0].tools.length == 0) {
  13327. this.chapTools[0].tools.push(i);
  13328. } else {
  13329. if (this.chapTools[0].tools.indexOf(i) != -1) {
  13330. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  13331. } else {
  13332. this.chapTools[0].tools.push(i);
  13333. }
  13334. }
  13335. this.$forceUpdate();
  13336. },
  13337. addChaptersDataTools() {
  13338. if (this.chapTools[0].tools.indexOf(4) != -1) {
  13339. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13340. this.chapCount
  13341. ].chapterData.unshift({
  13342. name: this.chapTools[0].toolDetail,
  13343. url: this.chapTools[0].tools,
  13344. type: 7,
  13345. askJson: this.askJson,
  13346. });
  13347. } else {
  13348. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13349. this.chapCount
  13350. ].chapterData.unshift({
  13351. name: this.chapTools[0].toolDetail,
  13352. url: this.chapTools[0].tools,
  13353. type: 7,
  13354. });
  13355. }
  13356. this.imgChange1(null, null, 7, this.chapCount);
  13357. this.dialogVisible4 = false;
  13358. },
  13359. addTools(i, itemTaskIndex, toolIndex) {
  13360. // if (
  13361. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13362. // .toolChoose[toolIndex].tool.length == 0
  13363. // ) {
  13364. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13365. // itemTaskIndex
  13366. // ].toolChoose[toolIndex].tool.push(i);
  13367. // } else {
  13368. // if (
  13369. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13370. // itemTaskIndex
  13371. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  13372. // ) {
  13373. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13374. // itemTaskIndex
  13375. // ].toolChoose[toolIndex].tool.splice(
  13376. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13377. // itemTaskIndex
  13378. // ].toolChoose[toolIndex].tool.indexOf(i),
  13379. // 1
  13380. // );
  13381. // } else {
  13382. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13383. // itemTaskIndex
  13384. // ].toolChoose[toolIndex].tool.push(i);
  13385. // }
  13386. // console.log(
  13387. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13388. // .toolChoose[toolIndex].tool
  13389. // );
  13390. // }
  13391. if (i == 4) {
  13392. if (
  13393. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13394. .toolChoose[toolIndex].askJson.askTitle == "" ||
  13395. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13396. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  13397. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13398. .toolChoose[toolIndex].askJson[0].checkList < 2
  13399. ) {
  13400. this.openTools(itemTaskIndex, 4, toolIndex);
  13401. // this.$message({
  13402. // message: "请填写完整问卷内容",
  13403. // type: "error",
  13404. // });
  13405. return;
  13406. }
  13407. }
  13408. if (i == 45) {
  13409. if (
  13410. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13411. .toolChoose[toolIndex].testJson ||
  13412. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13413. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  13414. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13415. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  13416. ) {
  13417. this.openTools(itemTaskIndex, 45, toolIndex);
  13418. // this.$message({
  13419. // message: "请填写完整问卷内容",
  13420. // type: "error",
  13421. // });
  13422. return;
  13423. }
  13424. }
  13425. if (i == 47) {
  13426. if (
  13427. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13428. .toolChoose[toolIndex].sentenceList ||
  13429. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13430. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  13431. ) {
  13432. this.openTools(itemTaskIndex, 47, toolIndex);
  13433. return;
  13434. }
  13435. }
  13436. if (i == 69) {
  13437. if (
  13438. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13439. .toolChoose[toolIndex].englishList
  13440. ) {
  13441. this.openTools(itemTaskIndex, 69, toolIndex);
  13442. return;
  13443. }
  13444. }
  13445. if (i == 70) {
  13446. if (
  13447. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13448. .toolChoose[toolIndex].englishVoiceJson
  13449. ) {
  13450. this.openTools(itemTaskIndex, 70, toolIndex);
  13451. return;
  13452. }
  13453. }
  13454. // if (i == 48) {
  13455. // if (
  13456. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13457. // .toolChoose[toolIndex].tableJson
  13458. // ) {
  13459. // this.openTools(itemTaskIndex, 48, toolIndex);
  13460. // return;
  13461. // }
  13462. // }
  13463. // if (i == 50) {
  13464. // if (
  13465. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13466. // .toolChoose[toolIndex].uploadJson
  13467. // ) {
  13468. // this.openTools(itemTaskIndex, 50, toolIndex);
  13469. // return;
  13470. // }
  13471. // }
  13472. if (i == 49) {
  13473. if (
  13474. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13475. .toolChoose[toolIndex].groupJson
  13476. ) {
  13477. this.openTools(itemTaskIndex, 49, toolIndex);
  13478. return;
  13479. }
  13480. }
  13481. if (i == 62) {
  13482. if (
  13483. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13484. .toolChoose[toolIndex].videoJson
  13485. ) {
  13486. this.openTools(itemTaskIndex, 62, toolIndex);
  13487. return;
  13488. }
  13489. }
  13490. if (i == 15) {
  13491. if (
  13492. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13493. .toolChoose[toolIndex].answerQ ||
  13494. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13495. .toolChoose[toolIndex].answerQ == ""
  13496. ) {
  13497. this.openTools(itemTaskIndex, 15, toolIndex);
  13498. // this.$message({
  13499. // message: "请填写问答内容",
  13500. // type: "error",
  13501. // });
  13502. return;
  13503. }
  13504. }
  13505. if (i == 40) {
  13506. if (
  13507. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13508. .toolChoose[toolIndex].rateJson ||
  13509. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13510. .toolChoose[toolIndex].rateJson.length
  13511. ) {
  13512. this.openTools(itemTaskIndex, 40, toolIndex);
  13513. return;
  13514. }
  13515. }
  13516. if (i == 41) {
  13517. if (
  13518. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13519. .toolChoose[toolIndex].selectJson ||
  13520. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13521. .toolChoose[toolIndex].selectJson.url == "" ||
  13522. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13523. .toolChoose[toolIndex].selectJson.select.length ||
  13524. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13525. .toolChoose[toolIndex].selectJson.answer.length
  13526. ) {
  13527. this.openTools(itemTaskIndex, 41, toolIndex);
  13528. return;
  13529. }
  13530. }
  13531. if (i == 42) {
  13532. if (
  13533. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13534. .toolChoose[toolIndex].answerQ ||
  13535. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13536. .toolChoose[toolIndex].answerQ == ""
  13537. ) {
  13538. this.openTools(itemTaskIndex, 42, toolIndex);
  13539. return;
  13540. }
  13541. }
  13542. if (
  13543. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13544. .toolChoose[toolIndex].tool.length > 0
  13545. ) {
  13546. if (
  13547. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13548. itemTaskIndex
  13549. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  13550. ) {
  13551. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13552. itemTaskIndex
  13553. ].toolChoose[toolIndex].tool.splice(
  13554. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13555. itemTaskIndex
  13556. ].toolChoose[toolIndex].tool.indexOf(i),
  13557. 1
  13558. );
  13559. } else {
  13560. // this.$message({
  13561. // message: "每个工具只能添加一个",
  13562. // type: "error",
  13563. // });
  13564. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13565. itemTaskIndex
  13566. ].toolChoose[toolIndex].tool = [];
  13567. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13568. itemTaskIndex
  13569. ].toolChoose[toolIndex].tool.push(i);
  13570. }
  13571. } else {
  13572. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13573. itemTaskIndex
  13574. ].toolChoose[toolIndex].tool.push(i);
  13575. }
  13576. this.$forceUpdate();
  13577. },
  13578. addAskList(index) {
  13579. this.askJson.askJson.splice(index + 1, 0, {
  13580. askstitle: "",
  13581. askItem: 1,
  13582. checkList: [],
  13583. });
  13584. this.askJson.askCount++;
  13585. },
  13586. addTestList(index) {
  13587. this.testJson.testJson.splice(index + 1, 0, {
  13588. teststitle: "",
  13589. testItem: 1,
  13590. checkList: [],
  13591. timuList: [],
  13592. answer: [],
  13593. type: "1",
  13594. });
  13595. this.testJson.testCount++;
  13596. },
  13597. deleteAskList(index) {
  13598. if (
  13599. !this.askJson.askJson[index].askstitle &&
  13600. this.askJson.askJson[index].askItem == 1 &&
  13601. !this.askJson.askJson[index].checkList[0]
  13602. ) {
  13603. this.askJson.askJson.splice(index, 1);
  13604. this.askJson.askCount--;
  13605. } else {
  13606. let _this = this;
  13607. _this
  13608. .$confirm("此操作不可撤销,是否继续?", "提示", {
  13609. confirmButtonText: "确定",
  13610. cancelButtonText: "取消",
  13611. type: "warning",
  13612. })
  13613. .then(() => {
  13614. _this.askJson.askJson.splice(index, 1);
  13615. _this.askJson.askCount--;
  13616. })
  13617. .catch(() => {
  13618. return;
  13619. });
  13620. }
  13621. },
  13622. deleteTestList(index) {
  13623. if (
  13624. !this.testJson.testJson[index].teststitle &&
  13625. this.testJson.testJson[index].testItem == 1 &&
  13626. !this.testJson.testJson[index].checkList[0]
  13627. ) {
  13628. this.testJson.testJson.splice(index, 1);
  13629. this.testJson.testCount--;
  13630. } else {
  13631. let _this = this;
  13632. _this
  13633. .$confirm("此操作不可撤销,是否继续?", "提示", {
  13634. confirmButtonText: "确定",
  13635. cancelButtonText: "取消",
  13636. type: "warning",
  13637. })
  13638. .then(() => {
  13639. _this.testJson.testJson.splice(index, 1);
  13640. _this.testJson.testCount--;
  13641. })
  13642. .catch(() => {
  13643. return;
  13644. });
  13645. }
  13646. },
  13647. askMove(type, index) {
  13648. if (type == 1) {
  13649. if (index > 0) {
  13650. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  13651. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  13652. this.askJson.askJson[index - 1] = b;
  13653. this.askJson.askJson[index] = a;
  13654. }
  13655. } else {
  13656. if (index < this.askJson.askJson.length - 1) {
  13657. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  13658. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  13659. this.askJson.askJson[index + 1] = b;
  13660. this.askJson.askJson[index] = a;
  13661. }
  13662. }
  13663. this.$forceUpdate();
  13664. },
  13665. checkMove(type, index, checkIndex) {
  13666. if (type == 1) {
  13667. if (checkIndex > 0) {
  13668. let a = JSON.parse(
  13669. JSON.stringify(
  13670. this.askJson.askJson[index].checkList[checkIndex - 1]
  13671. )
  13672. );
  13673. let b = JSON.parse(
  13674. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  13675. );
  13676. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  13677. this.askJson.askJson[index].checkList[checkIndex] = a;
  13678. }
  13679. } else {
  13680. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  13681. let a = JSON.parse(
  13682. JSON.stringify(
  13683. this.askJson.askJson[index].checkList[checkIndex + 1]
  13684. )
  13685. );
  13686. let b = JSON.parse(
  13687. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  13688. );
  13689. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  13690. this.askJson.askJson[index].checkList[checkIndex] = a;
  13691. }
  13692. }
  13693. this.$forceUpdate();
  13694. },
  13695. testMove(type, index) {
  13696. if (type == 1) {
  13697. if (index > 0) {
  13698. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  13699. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  13700. this.testJson.testJson[index - 1] = b;
  13701. this.testJson.testJson[index] = a;
  13702. }
  13703. } else {
  13704. if (index < this.testJson.testJson.length - 1) {
  13705. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  13706. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  13707. this.testJson.testJson[index + 1] = b;
  13708. this.testJson.testJson[index] = a;
  13709. }
  13710. }
  13711. this.$forceUpdate();
  13712. },
  13713. tcheckMove(type, index, checkIndex) {
  13714. if (type == 1) {
  13715. if (checkIndex > 0) {
  13716. let a = JSON.parse(
  13717. JSON.stringify(
  13718. this.testJson.testJson[index].checkList[checkIndex - 1]
  13719. )
  13720. );
  13721. let b = JSON.parse(
  13722. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  13723. );
  13724. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  13725. this.testJson.testJson[index].checkList[checkIndex] = a;
  13726. }
  13727. } else {
  13728. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  13729. let a = JSON.parse(
  13730. JSON.stringify(
  13731. this.testJson.testJson[index].checkList[checkIndex + 1]
  13732. )
  13733. );
  13734. let b = JSON.parse(
  13735. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  13736. );
  13737. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  13738. this.testJson.testJson[index].checkList[checkIndex] = a;
  13739. }
  13740. }
  13741. this.$forceUpdate();
  13742. },
  13743. addcheckList(json, index) {
  13744. // json.checkList.length++;
  13745. json.checkList.splice(index + 1, 0, "");
  13746. json.askItem++;
  13747. this.$forceUpdate();
  13748. },
  13749. deletecheckList(json, index) {
  13750. // json.checkList.length--;
  13751. json.checkList.splice(index, 1);
  13752. json.askItem--;
  13753. this.$forceUpdate();
  13754. },
  13755. addTcheckList(json, index) {
  13756. // json.checkList.length++;
  13757. json.checkList.splice(index + 1, 0, "");
  13758. json.testItem++;
  13759. this.$forceUpdate();
  13760. },
  13761. deleteTcheckList(json, index) {
  13762. // json.checkList.length--;
  13763. json.checkList.splice(index, 1);
  13764. json.testItem--;
  13765. this.$forceUpdate();
  13766. },
  13767. checkTestType(type, json) {
  13768. json.type = type;
  13769. setTimeout(() => {
  13770. json.answer = [];
  13771. }, 100);
  13772. },
  13773. checkAskType(type, json) {
  13774. json.type = type;
  13775. // json.checkList = [];
  13776. this.$forceUpdate();
  13777. },
  13778. addSelectList(json) {
  13779. json.select.push("");
  13780. json.answer.push("");
  13781. },
  13782. deleteSelectList(json) {
  13783. // json.select.length--;
  13784. // json.answer.length--;
  13785. json.select.splice(json.select.length - 1, 1);
  13786. json.answer.splice(json.answer.length - 1, 1);
  13787. },
  13788. addAsk() {
  13789. if (this.askJson.askTitle === "") {
  13790. this.$message.error("标题不能为空!");
  13791. return;
  13792. }
  13793. var aj = this.askJson.askJson;
  13794. var b = 1;
  13795. for (var i = 0; i < aj.length; i++) {
  13796. if (aj[i].askstitle === "") {
  13797. var a = 1;
  13798. for (let index = 0; index < aj[i].askItem; index++) {
  13799. const element = aj[i].checkList[index]
  13800. ? aj[i].checkList[index]
  13801. : "";
  13802. if (element != "") {
  13803. b++;
  13804. this.$message.error(`请将题目${i + 1}填写完整。`);
  13805. return;
  13806. } else {
  13807. a++;
  13808. }
  13809. }
  13810. if (b == 1) {
  13811. this.$message.error("至少填写一个问题");
  13812. return;
  13813. }
  13814. } else if (aj[i].askstitle != "") {
  13815. for (let index = 0; index < aj[i].askItem; index++) {
  13816. const element = aj[i].checkList[index]
  13817. ? aj[i].checkList[index]
  13818. : "";
  13819. var index = 0;
  13820. for (var z = 0; z < aj[i].checkList.length; z++) {
  13821. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13822. if (checkC != "") {
  13823. index++;
  13824. } else {
  13825. this.$message.error(`题目${i + 1}选项不能为空!`);
  13826. return;
  13827. }
  13828. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13829. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13830. if (checkC == checkC2) {
  13831. this.$message.error(
  13832. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13833. );
  13834. return;
  13835. }
  13836. }
  13837. }
  13838. b++;
  13839. if (index < 2) {
  13840. this.$message.error("每道题目至少需要设置2个选项。");
  13841. return;
  13842. }
  13843. }
  13844. }
  13845. }
  13846. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  13847. var elc = el.checkList.filter((element) => {
  13848. return element != "";
  13849. });
  13850. return el.askstitle != "" && elc.length != 0;
  13851. });
  13852. if (!this.dialogVisible4) {
  13853. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13854. this.taskCount
  13855. ].toolChoose[this.toolIndex] = this.askJson;
  13856. }
  13857. this.dialogVisible5 = false;
  13858. if (
  13859. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13860. .toolChoose[this.toolIndex].tool != 4
  13861. ) {
  13862. this.addTools(4, this.taskCount, this.toolIndex);
  13863. }
  13864. },
  13865. addTest() {
  13866. // if (this.testJson.testTitle === "") {
  13867. // this.$message.error("标题不能为空!");
  13868. // return;
  13869. // }
  13870. var aj = this.testJson.testJson;
  13871. var b = 1;
  13872. for (var i = 0; i < aj.length; i++) {
  13873. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  13874. var a = 1;
  13875. for (let index = 0; index < aj[i].testItem; index++) {
  13876. const element = aj[i].checkList[index]
  13877. ? aj[i].checkList[index]
  13878. : "";
  13879. if (element != "") {
  13880. b++;
  13881. this.$message.error(`请将题目${i + 1}填写完整。`);
  13882. return;
  13883. } else {
  13884. a++;
  13885. }
  13886. }
  13887. if (b == 1) {
  13888. this.$message.error("至少填写一个问题");
  13889. return;
  13890. }
  13891. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  13892. for (let index = 0; index < aj[i].testItem; index++) {
  13893. const element = aj[i].checkList[index]
  13894. ? aj[i].checkList[index]
  13895. : "";
  13896. var index = 0;
  13897. for (var z = 0; z < aj[i].checkList.length; z++) {
  13898. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13899. if (checkC != "") {
  13900. index++;
  13901. } else {
  13902. this.$message.error(`题目${i + 1}选项不能为空!`);
  13903. return;
  13904. }
  13905. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13906. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13907. if (checkC == checkC2) {
  13908. this.$message.error(
  13909. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13910. );
  13911. return;
  13912. }
  13913. }
  13914. }
  13915. b++;
  13916. if (index < 2) {
  13917. this.$message.error("每道题目至少需要设置2个选项。");
  13918. return;
  13919. }
  13920. if (
  13921. (aj[i].type == "2" && !aj[i].answer.length) ||
  13922. (aj[i].type == "1" &&
  13923. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  13924. (aj[i].answer !== 0 && !aj[i].answer)))
  13925. ) {
  13926. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  13927. return;
  13928. }
  13929. }
  13930. }
  13931. }
  13932. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13933. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13934. var elc = el.checkList.filter((element) => {
  13935. return element != "";
  13936. });
  13937. return (
  13938. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  13939. );
  13940. });
  13941. isTestJson.testCount = isTestJson.testJson.length;
  13942. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13943. this.taskCount
  13944. ].toolChoose[this.toolIndex].testJson = isTestJson;
  13945. this.dialogVisibleChoice = false;
  13946. if (
  13947. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13948. .toolChoose[this.toolIndex].tool != 45
  13949. ) {
  13950. this.addTools(45, this.taskCount, this.toolIndex);
  13951. }
  13952. },
  13953. addVideoJson(videoJson) {
  13954. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13955. this.taskCount
  13956. ].toolChoose[this.toolIndex].videoJson = videoJson;
  13957. this.dialogVisibleVideo = false;
  13958. if (
  13959. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13960. .toolChoose[this.toolIndex].tool != 62
  13961. ) {
  13962. this.addTools(62, this.taskCount, this.toolIndex);
  13963. }
  13964. },
  13965. //自动获取剪贴板
  13966. pasteOption() {
  13967. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13968. if (!iframe) {
  13969. this.$message.error("请使用AI共创生成题目");
  13970. return;
  13971. }
  13972. let copyData = iframe.contentWindow.copyData;
  13973. if (!copyData || !copyData.selectData.length) {
  13974. this.$message.error("请使用AI共创生成题目");
  13975. return;
  13976. }
  13977. let selectData = copyData.selectData;
  13978. for (var i = 0; i < selectData.length; i++) {
  13979. let answer = 0;
  13980. switch (selectData[i].answer[0]) {
  13981. case "A":
  13982. answer = 0;
  13983. break;
  13984. case "B":
  13985. answer = 1;
  13986. break;
  13987. case "C":
  13988. answer = 2;
  13989. break;
  13990. case "D":
  13991. answer = 3;
  13992. break;
  13993. case "E":
  13994. answer = 4;
  13995. break;
  13996. default:
  13997. break;
  13998. }
  13999. this.testJson.testJson.push({
  14000. teststitle: selectData[i].subject,
  14001. testItem: selectData[i].options.length,
  14002. checkList: selectData[i].options,
  14003. timuList: [],
  14004. answer: answer,
  14005. type: "1",
  14006. });
  14007. this.testJson.testCount++;
  14008. }
  14009. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  14010. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  14011. var elc = el.checkList.filter((element) => {
  14012. return element != "";
  14013. });
  14014. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  14015. });
  14016. isTestJson.testCount = isTestJson.testJson.length;
  14017. if (!isTestJson.testCount) {
  14018. return;
  14019. }
  14020. this.testJson = isTestJson;
  14021. this.$forceUpdate();
  14022. },
  14023. pasteTask(taskJson) {
  14024. let stageTasksData = [];
  14025. if (taskJson) {
  14026. stageTasksData = taskJson;
  14027. } else {
  14028. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14029. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14030. if (!iframe && !iframe2) {
  14031. this.$message.error("请使用AI共创生成");
  14032. return;
  14033. }
  14034. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14035. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14036. if (
  14037. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  14038. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  14039. ) {
  14040. this.$message.error("请使用AI共创生成");
  14041. return;
  14042. }
  14043. stageTasksData = copyData
  14044. ? copyData.tasksData
  14045. : copyData2
  14046. ? copyData2.tasksData
  14047. : [{ taskName: "", taskDecs: "" }];
  14048. }
  14049. let taskA = [];
  14050. let tasks = stageTasksData;
  14051. for (var j = 0; j < tasks.length; j++) {
  14052. taskA.push({
  14053. task: tasks[j].taskName,
  14054. taskDetail: tasks[j].taskDecs,
  14055. chapterData: [],
  14056. toolText: "",
  14057. toolChoose: [
  14058. {
  14059. tool: [],
  14060. toolDetail: "",
  14061. toolType: 0,
  14062. askCount: 1,
  14063. askTitle: "",
  14064. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14065. },
  14066. ],
  14067. isShowTools: false,
  14068. askCount: 1,
  14069. isFold: 1,
  14070. askTitle: "",
  14071. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14072. checkJson: [{ checkCount: [], checkPerent: [] }],
  14073. homeworkList: [],
  14074. });
  14075. }
  14076. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  14077. this.$forceUpdate();
  14078. },
  14079. pasteStage(stageJson) {
  14080. let stageData = [];
  14081. if (stageJson) {
  14082. stageData = stageJson;
  14083. } else {
  14084. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14085. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14086. if (!iframe && !iframe2) {
  14087. this.$message.error("请使用AI共创生成");
  14088. return;
  14089. }
  14090. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14091. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14092. if (
  14093. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  14094. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  14095. ) {
  14096. this.$message.error("请使用AI共创生成");
  14097. return;
  14098. }
  14099. stageData = copyData
  14100. ? copyData.stageData
  14101. : copyData2
  14102. ? copyData2.stageData
  14103. : [""];
  14104. }
  14105. let stage = [];
  14106. for (var i = 0; i < stageData.length; i++) {
  14107. stage.push({
  14108. dyName: stageData[i], //单元标题
  14109. chapterInfo: [
  14110. {
  14111. isread: false,
  14112. chapterid: this.guid(),
  14113. title: "",
  14114. courseName: "",
  14115. taskJson: [
  14116. {
  14117. task: "",
  14118. taskDetail: "",
  14119. chapterData: [],
  14120. toolText: "",
  14121. toolChoose: [
  14122. {
  14123. tool: [],
  14124. toolDetail: "",
  14125. toolType: 0,
  14126. askCount: 1,
  14127. askTitle: "",
  14128. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14129. },
  14130. ],
  14131. isShowTools: false,
  14132. askCount: 1,
  14133. isFold: 1,
  14134. askTitle: "",
  14135. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14136. checkJson: [{ checkCount: [], checkPerent: [] }],
  14137. homeworkList: [],
  14138. },
  14139. ],
  14140. itemCount: 1,
  14141. fileList1: [],
  14142. video: [],
  14143. testData: [],
  14144. pData: [],
  14145. templateArray: [],
  14146. },
  14147. ],
  14148. });
  14149. }
  14150. let _this = this;
  14151. if (stageJson) {
  14152. if (!_this.cid) {
  14153. _this.unitJson = stage;
  14154. } else {
  14155. _this.unitIndex = 0;
  14156. _this.unitJson = stage;
  14157. _this.updateWork();
  14158. }
  14159. } else {
  14160. _this
  14161. .$confirm(
  14162. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  14163. "提示",
  14164. {
  14165. confirmButtonText: "确定",
  14166. cancelButtonText: "取消",
  14167. type: "warning",
  14168. }
  14169. )
  14170. .then(() => {
  14171. _this.unitIndex = 0;
  14172. _this.unitJson = stage;
  14173. // _this.steps++;
  14174. _this.updateWork();
  14175. })
  14176. .catch(() => {
  14177. return;
  14178. });
  14179. }
  14180. },
  14181. openStageBox() {
  14182. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  14183. this.dialogVisibleStageChange = true;
  14184. },
  14185. updateChange() {
  14186. this.$confirm(
  14187. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  14188. "提示",
  14189. {
  14190. confirmButtonText: "确定",
  14191. cancelButtonText: "取消",
  14192. type: "warning",
  14193. }
  14194. )
  14195. .then(() => {
  14196. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  14197. this.updateWork();
  14198. this.dialogVisibleStageChange = false;
  14199. })
  14200. .catch(() => {
  14201. return;
  14202. });
  14203. },
  14204. addAnswer() {
  14205. if (this.answerQ == "") {
  14206. this.$message.error("请输入您想要问的问题");
  14207. return;
  14208. }
  14209. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14210. this.taskCount
  14211. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  14212. this.dialogVisible8 = false;
  14213. if (
  14214. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14215. .toolChoose[this.toolIndex].tool != 15
  14216. ) {
  14217. this.addTools(15, this.taskCount, this.toolIndex);
  14218. }
  14219. },
  14220. addMp3Answer() {
  14221. if (this.answerQ == "") {
  14222. this.$message.error("请输入您想要回答的问题");
  14223. return;
  14224. }
  14225. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14226. this.taskCount
  14227. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  14228. this.dialogVisibleMp3 = false;
  14229. },
  14230. addRateAnswer() {
  14231. var a = 1;
  14232. for (var i = 0; i < this.rateJson.length; i++) {
  14233. if (this.rateJson[i].value == "") {
  14234. a = 2;
  14235. break;
  14236. }
  14237. }
  14238. if (a == 2) {
  14239. this.$message.error("请把评价信息填写完整");
  14240. return;
  14241. }
  14242. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14243. this.taskCount
  14244. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  14245. this.dialogVisibleRate = false;
  14246. if (
  14247. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14248. .toolChoose[this.toolIndex].tool != 40
  14249. ) {
  14250. this.addTools(40, this.taskCount, this.toolIndex);
  14251. }
  14252. },
  14253. addSelectAnswer() {
  14254. if (this.selectJson.url == "") {
  14255. this.$message.error("请上传题目");
  14256. return;
  14257. }
  14258. if (!this.selectJson.select.length) {
  14259. this.$message.error("请添加选项");
  14260. return;
  14261. }
  14262. if (!this.selectJson.answer.length) {
  14263. this.$message.error("请设置答案");
  14264. return;
  14265. }
  14266. var a = 1;
  14267. for (var i = 0; i < this.selectJson.answer.length; i++) {
  14268. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  14269. a = 2;
  14270. }
  14271. }
  14272. if (a == 2) {
  14273. this.$message.error("请设置答案");
  14274. return;
  14275. }
  14276. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14277. this.taskCount
  14278. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  14279. this.dialogVisibleSelect = false;
  14280. if (
  14281. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14282. .toolChoose[this.toolIndex].tool != 41
  14283. ) {
  14284. this.addTools(41, this.taskCount, this.toolIndex);
  14285. }
  14286. },
  14287. nextSelectSteps() {
  14288. if (this.selectJson.url == "") {
  14289. this.$message.error("请上传题目");
  14290. return;
  14291. }
  14292. if (!this.selectJson.select.length) {
  14293. this.$message.error("请添加选项");
  14294. return;
  14295. } else {
  14296. for (var z = 0; z < this.selectJson.select.length; z++) {
  14297. let checkC = this.selectJson.select[z];
  14298. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  14299. let checkC2 = this.selectJson.select[z2];
  14300. if (checkC == checkC2) {
  14301. this.$message.error(
  14302. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14303. );
  14304. return;
  14305. }
  14306. }
  14307. }
  14308. }
  14309. var a = 1;
  14310. for (var i = 0; i < this.selectJson.select.length; i++) {
  14311. if (!this.selectJson.select[i]) {
  14312. a = 2;
  14313. }
  14314. }
  14315. if (a == 2) {
  14316. this.$message.error("添加的选项不能为空");
  14317. return;
  14318. }
  14319. this.selectSteps++;
  14320. },
  14321. selectCourseDetail() {
  14322. if (this.cid == "" || this.cid == undefined) {
  14323. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  14324. this.isTeacherSee = true;
  14325. }
  14326. console.log("这是新增课程");
  14327. this.selectAllType();
  14328. this.chatid = uuidv4();
  14329. // this.courseTextB = false
  14330. } else {
  14331. this.isOutline = true
  14332. this.isOutline2 = true
  14333. this.cpoteType = 4
  14334. this.cidType = 1;
  14335. let params = {
  14336. cid: this.cid,
  14337. };
  14338. this.ajax
  14339. .get(this.$store.state.api + "select_course_detail", params)
  14340. .then((res) => {
  14341. this.unitJson = JSON.parse(res.data[0][0].chapters);
  14342. this.courseState = res.data[0][0].state;
  14343. for (var j = 0; j < this.unitJson.length; j++) {
  14344. for (
  14345. var k = 0;
  14346. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  14347. k++
  14348. ) {
  14349. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  14350. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14351. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14352. : [];
  14353. let _chapterData = [];
  14354. for (
  14355. var c = 0;
  14356. c <
  14357. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  14358. .length;
  14359. c++
  14360. ) {
  14361. if (
  14362. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14363. ) {
  14364. _chapterData.push(
  14365. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14366. );
  14367. }
  14368. }
  14369. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  14370. _chapterData;
  14371. }
  14372. }
  14373. this.$forceUpdate();
  14374. this.courseName = res.data[0][0].title;
  14375. this.courseText = res.data[0][0].brief;
  14376. this.courseText2 = res.data[0][0].reBrief;
  14377. this.evalua = res.data[0][0].evaId;
  14378. this.cover = JSON.parse(res.data[0][0].cover);
  14379. this.noneBtnImg = this.cover.length >= 1;
  14380. if (res.data[0][0].refile) {
  14381. this.infoData = JSON.parse(res.data[0][0].refile)
  14382. }
  14383. // this.checkboxList =
  14384. // res.data[0][0].course_student.length > 0
  14385. // ? JSON.parse(res.data[0][0].course_student)
  14386. // : [];
  14387. this.checkboxList2 = res.data[0][0].juri
  14388. ? res.data[0][0].juri.split(",")
  14389. : [];
  14390. this.inviteCode = [];
  14391. for (var i = 0; i < res.data[2].length; i++) {
  14392. this.inviteCode.push({
  14393. cid: res.data[2][i].classid,
  14394. ic: res.data[2][i].code,
  14395. });
  14396. }
  14397. this.checkboxList3 = res.data[0][0].course_teacher
  14398. ? res.data[0][0].course_teacher.split(",")
  14399. : [];
  14400. // this.isTeacherSee =
  14401. // res.data[0][0].is_teacher_look == 0 ? true : false;
  14402. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  14403. this.myWord = res.data[0][0].template;
  14404. this.templateC.id = "123";
  14405. this.courseUserid = res.data[0][0].userid;
  14406. // if(this.courseUserid == this.userid){
  14407. // this.InviteChange(this.checkboxList2)
  14408. // }
  14409. this.nbOrder = res.data[0][0].ordernumber;
  14410. this.courseTypeId = [];
  14411. for (var i = 0; i < res.data[1].length; i++) {
  14412. this.courseTypeId.push(res.data[1][i].typeid);
  14413. }
  14414. console.log(this.courseTypeId);
  14415. // if (this.timer) clearInterval(this.timer);
  14416. if (this.timer) clearTimeout(this.timer);
  14417. this.timer = null;
  14418. // this.timer = setInterval(() => {
  14419. if(res.data[3].length){
  14420. try {
  14421. this.aiJson = JSON.parse(res.data[3][0].tips);
  14422. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  14423. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  14424. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14425. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  14426. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  14427. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14428. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  14429. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  14430. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  14431. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  14432. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  14433. }
  14434. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  14435. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  14436. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  14437. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14438. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14439. this.templateid = res.data[3][0].template;
  14440. this.getTipsTemplateIsDialog()
  14441. }catch(error){
  14442. console.error(error)
  14443. }
  14444. }
  14445. if(res.data[0][0].cpote){
  14446. try {
  14447. this.cpote = JSON.parse(res.data[0][0].cpote);
  14448. }catch(error){
  14449. console.error(error)
  14450. }
  14451. }
  14452. if(res.data[0][0].setting){
  14453. try {
  14454. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14455. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14456. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  14457. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14458. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14459. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14460. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14461. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14462. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14463. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  14464. 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;
  14465. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14466. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14467. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14468. this.languageSetting = (JSON.parse(res.data[0][0].setting).languageSetting || JSON.parse(res.data[0][0].setting).languageSetting == 0) ? JSON.parse(res.data[0][0].setting).languageSetting : 0;
  14469. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  14470. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  14471. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  14472. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  14473. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14474. this.courseTextBool = true
  14475. }
  14476. // if(!this.teacherCourseText && !this.targetCourseText2){
  14477. // this.isuseT = 1
  14478. // }
  14479. }catch(error){
  14480. console.error(error)
  14481. }
  14482. }
  14483. if(this.courseText){
  14484. this.courseTextB = false
  14485. }
  14486. if(this.teacherCourseText){
  14487. this.teacherCourseTextB = false
  14488. }
  14489. if(this.targetCourseText){
  14490. this.targetCourseTextB = false
  14491. }
  14492. if(this.targetCourseText2){
  14493. this.targetCourseText2B = false
  14494. }
  14495. this.isFileSearch = res.data[0][0].iresearch == 1
  14496. // this.seleteCourseUpdate();
  14497. this.setMan();
  14498. this.selectAllType();
  14499. this.unitJson[
  14500. this.unitIndex
  14501. ].chapterInfo[0].taskJson[0].toolOpen = true;
  14502. // }, 5000);
  14503. this.$forceUpdate();
  14504. setTimeout(() => {
  14505. this.checkEva(this.evalua);
  14506. setTimeout(() => {
  14507. this.checkEva(this.evalua);
  14508. }, 100);
  14509. }, 100);
  14510. })
  14511. .catch((err) => {
  14512. console.error(err);
  14513. });
  14514. }
  14515. if(this.aiId){
  14516. let params = {
  14517. cid: this.aiId,
  14518. };
  14519. this.ajax
  14520. .get(this.$store.state.api + "select_course_detail", params)
  14521. .then((res) => {
  14522. let _unitJson = JSON.parse(res.data[0][0].chapters);
  14523. let fileInfo = []
  14524. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  14525. for(var i = 0; i < _unitJson.length; i++){
  14526. let tasks = _unitJson[i].chapterInfo[0].taskJson
  14527. for(var j = 0; j < tasks.length; j++){
  14528. let _infoData = tasks[j].chapterData.filter(el => {
  14529. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  14530. })
  14531. if(_infoData.length){
  14532. fileInfo = [...fileInfo, ..._infoData]
  14533. }
  14534. }
  14535. }
  14536. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  14537. this.$forceUpdate();
  14538. this.courseName = res.data[0][0].title;
  14539. this.courseText = res.data[0][0].brief;
  14540. this.courseText2 = res.data[0][0].reBrief;
  14541. this.cover = JSON.parse(res.data[0][0].cover);
  14542. this.noneBtnImg = this.cover.length >= 1;
  14543. this.checkboxList2 = res.data[0][0].juri
  14544. ? res.data[0][0].juri.split(",")
  14545. : [];
  14546. this.inviteCode = [];
  14547. for (var i = 0; i < res.data[2].length; i++) {
  14548. this.inviteCode.push({
  14549. cid: res.data[2][i].classid,
  14550. ic: res.data[2][i].code,
  14551. });
  14552. }
  14553. this.checkboxList3 = res.data[0][0].course_teacher
  14554. ? res.data[0][0].course_teacher.split(",")
  14555. : [];
  14556. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  14557. this.myWord = res.data[0][0].template;
  14558. this.templateC.id = "123";
  14559. this.courseTypeId = [];
  14560. for (var i = 0; i < res.data[1].length; i++) {
  14561. this.courseTypeId.push(res.data[1][i].typeid);
  14562. }
  14563. console.log(this.courseTypeId);
  14564. if(res.data[3].length){
  14565. try {
  14566. this.aiJson = JSON.parse(res.data[3][0].tips);
  14567. this.templateid = res.data[3][0].template;
  14568. this.getTipsTemplateIsDialog()
  14569. }catch(error){
  14570. console.error(error)
  14571. }
  14572. }
  14573. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  14574. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  14575. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14576. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  14577. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  14578. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14579. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  14580. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  14581. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  14582. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  14583. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  14584. }
  14585. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  14586. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  14587. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  14588. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14589. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14590. if(res.data[0][0].cpote){
  14591. try {
  14592. this.cpote = JSON.parse(res.data[0][0].cpote);
  14593. }catch(error){
  14594. console.error(error)
  14595. }
  14596. }
  14597. if(res.data[0][0].setting){
  14598. try {
  14599. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14600. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14601. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? this.teacherInfoData.length ? this.teacherInfoData : JSON.parse(res.data[0][0].setting).teacherInfoData : [...this.teacherInfoData];
  14602. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14603. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14604. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14605. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14606. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14607. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14608. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? this.infoData2.length ? this.infoData2 : JSON.parse(res.data[0][0].setting).infoData2 : [...this.infoData2];
  14609. 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;
  14610. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14611. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14612. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14613. this.languageSetting = (JSON.parse(res.data[0][0].setting).languageSetting || JSON.parse(res.data[0][0].setting).languageSetting == 0) ? JSON.parse(res.data[0][0].setting).languageSetting : 0;
  14614. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  14615. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  14616. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  14617. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  14618. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14619. this.courseTextBool = true
  14620. }
  14621. // if(!this.teacherCourseText && !this.targetCourseText2){
  14622. // this.isuseT = 1
  14623. // }
  14624. }catch(error){
  14625. console.error(error)
  14626. }
  14627. }
  14628. if(this.teacherInfoData.length){
  14629. this.isuseT = true
  14630. }
  14631. if(this.courseText){
  14632. this.courseTextB = false
  14633. }
  14634. if(this.teacherCourseText){
  14635. this.teacherCourseTextB = false
  14636. }
  14637. if(this.targetCourseText){
  14638. this.targetCourseTextB = false
  14639. }
  14640. if(this.targetCourseText2){
  14641. this.targetCourseText2B = false
  14642. }
  14643. this.setMan();
  14644. this.unitJson[
  14645. this.unitIndex
  14646. ].chapterInfo[0].taskJson[0].toolOpen = true;
  14647. this.$forceUpdate();
  14648. setTimeout(() => {
  14649. this.checkEva(this.evalua);
  14650. setTimeout(() => {
  14651. this.checkEva(this.evalua);
  14652. }, 100);
  14653. }, 100);
  14654. })
  14655. .catch((err) => {
  14656. console.error(err);
  14657. });
  14658. }
  14659. // if(this.cidType != 1 && this.templateid == ''){
  14660. // this.promptShow = true
  14661. // }
  14662. },
  14663. seleteCourseUpdate() {
  14664. let params = {
  14665. cid: this.cid,
  14666. };
  14667. this.ajax
  14668. .get(this.$store.state.api + "select_course_detail", params)
  14669. .then((res) => {
  14670. // console.log(this.unitJson);
  14671. let unitJson = JSON.parse(res.data[0][0].chapters);
  14672. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  14673. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  14674. let _unitJson = [];
  14675. let _chapAarry = [];
  14676. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  14677. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  14678. let index = 1;
  14679. let chapindex;
  14680. if (_unitJson2.length > unitJson.length) {
  14681. for (let c = 0; c < _unitJson2.length; c++) {
  14682. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  14683. }
  14684. for (let j = 0; j < unitJson.length; j++) {
  14685. let count = 0;
  14686. for (let k = 0; k < _unitJson2.length; k++) {
  14687. if (
  14688. unitJson[j].chapterInfo[0].chapterid ==
  14689. _unitJson2[k].chapterInfo[0].chapterid
  14690. ) {
  14691. count++;
  14692. _chapAarry.splice(
  14693. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  14694. 1
  14695. );
  14696. _unitJson.push(unitJson[j]);
  14697. break;
  14698. }
  14699. }
  14700. // if(count === 0){
  14701. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  14702. // }
  14703. }
  14704. for (let k = 0; k < _unitJson2.length; k++) {
  14705. if (_unitJson2[k].isUpdate == 1) {
  14706. _chapAarry.splice(
  14707. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  14708. 1
  14709. );
  14710. _unitJson.push(_unitJson2[k]);
  14711. }
  14712. }
  14713. console.log(_chapAarry);
  14714. for (let d = 0; d < _unitJson2.length; d++) {
  14715. if (
  14716. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  14717. ) {
  14718. if (_unitIndex == d) {
  14719. index = 2;
  14720. }
  14721. chapindex = d;
  14722. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  14723. }
  14724. }
  14725. } else {
  14726. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  14727. }
  14728. for (let i = 0; i < unitJson.length; i++) {
  14729. if (
  14730. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  14731. _unitJson[i].chapterInfo[0].chapterid !=
  14732. unitJson[i].chapterInfo[0].chapterid
  14733. ) {
  14734. if (i == _unitJson.length - 1) {
  14735. // this.unitIndex++
  14736. _unitIndex2++;
  14737. }
  14738. _unitJson.splice(i, 0, unitJson[i]);
  14739. } else if (i > _unitJson.length - 1) {
  14740. _unitJson.push(unitJson[i]);
  14741. } else if (
  14742. _unitJson[i].chapterInfo[0].chapterid ==
  14743. unitJson[i].chapterInfo[0].chapterid
  14744. ) {
  14745. _unitJson[i] = unitJson[i];
  14746. }
  14747. // if (i == _unitIndex) {
  14748. // continue;
  14749. // } else
  14750. }
  14751. if (_chapAarry.length && index != 2) {
  14752. if (chapindex < _unitIndex) {
  14753. this.isDelete = 2;
  14754. // this.unitIndex--;
  14755. _unitIndex2--;
  14756. } else if (
  14757. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  14758. _unitJson[_unitIndex].chapterInfo[0].chapterid
  14759. ) {
  14760. this.isDelete = 2;
  14761. for (let n = 0; n < _unitJson.length; n++) {
  14762. if (
  14763. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  14764. _unitJson[n].chapterInfo[0].chapterid
  14765. ) {
  14766. // this.unitIndex = n;
  14767. _unitIndex2 = n;
  14768. _unitJson[n] = _unitJson2[_unitIndex];
  14769. break;
  14770. }
  14771. }
  14772. }
  14773. } else if (index != 2) {
  14774. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  14775. _unitJson2[_unitIndex];
  14776. for (
  14777. var ci = 0;
  14778. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  14779. ci++
  14780. ) {
  14781. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  14782. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  14783. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14784. .toolChoose
  14785. : [];
  14786. let _chapterData = [];
  14787. for (
  14788. var c = 0;
  14789. c <
  14790. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  14791. .length;
  14792. c++
  14793. ) {
  14794. if (
  14795. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14796. .chapterData[c]
  14797. ) {
  14798. _chapterData.push(
  14799. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14800. .chapterData[c]
  14801. );
  14802. }
  14803. }
  14804. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  14805. _chapterData;
  14806. }
  14807. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  14808. }
  14809. if (index == 1) {
  14810. this.unitJson = _unitJson;
  14811. this.$forceUpdate();
  14812. setTimeout(() => {
  14813. if (this.unitIndex != _unitIndex2) {
  14814. this.isDelete = 2;
  14815. this.unitIndex = _unitIndex2;
  14816. }
  14817. }, 0);
  14818. this.timer = setTimeout(() => {
  14819. this.seleteCourseUpdate();
  14820. }, 1000);
  14821. } else if (index == 2) {
  14822. let _this = this;
  14823. _this
  14824. .$confirm(
  14825. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  14826. "提示",
  14827. {
  14828. confirmButtonText: "需要",
  14829. cancelButtonText: "取消",
  14830. type: "warning",
  14831. }
  14832. )
  14833. .then(() => {
  14834. if (_this.time()) {
  14835. _this.restoreWork(
  14836. _chapAarry[0],
  14837. _unitJson,
  14838. chapindex,
  14839. _unitJson2,
  14840. _unitIndex2
  14841. );
  14842. }
  14843. })
  14844. .catch(() => {
  14845. _this.unitJson = _unitJson;
  14846. _this.$forceUpdate();
  14847. setTimeout(() => {
  14848. if (this.unitIndex != _unitIndex2) {
  14849. this.isDelete = 2;
  14850. this.unitIndex = _unitIndex2;
  14851. }
  14852. }, 0);
  14853. _this.timer = setTimeout(() => {
  14854. _this.seleteCourseUpdate();
  14855. }, 1000);
  14856. });
  14857. }
  14858. // 在复制操作之前记录滚动位置
  14859. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14860. // 执行复制操作
  14861. // 复制操作完成后恢复滚动位置
  14862. this.$nextTick(() => {
  14863. if (this.$refs.scrollContainer) {
  14864. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14865. }
  14866. });
  14867. })
  14868. .catch((err) => {
  14869. console.error(err);
  14870. });
  14871. },
  14872. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  14873. let params = [
  14874. {
  14875. cid: this.cid,
  14876. chapters: JSON.stringify(this.unitJson),
  14877. uid: this.userid,
  14878. chapid: chapid,
  14879. },
  14880. ];
  14881. this.ajax
  14882. .post(this.$store.state.api + "restoreWork", params)
  14883. .then((res) => {
  14884. this.$message({
  14885. message: "恢复成功",
  14886. type: "success",
  14887. });
  14888. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  14889. this.unitJson = unitJson;
  14890. this.$forceUpdate();
  14891. setTimeout(() => {
  14892. if (this.unitIndex != unitIndex2) {
  14893. this.isDelete = 2;
  14894. this.unitIndex = unitIndex2;
  14895. }
  14896. }, 0);
  14897. this.timer = setTimeout(() => {
  14898. this.seleteCourseUpdate();
  14899. }, 1000);
  14900. })
  14901. .catch((err) => {
  14902. this.$message.error("网络不佳");
  14903. console.error(err);
  14904. });
  14905. },
  14906. getTypeName() {
  14907. console.log(this.courseTypeId);
  14908. this.$forceUpdate();
  14909. },
  14910. selectAllType() {
  14911. let params = {
  14912. org: this.org && this.org != "" ? this.org : "",
  14913. oid: this.oid && this.oid != "" ? this.oid : "",
  14914. stand: "cn"
  14915. };
  14916. this.ajax
  14917. .get(this.$store.state.api + "selectAllTypeStand", params)
  14918. .then((res) => {
  14919. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14920. res.data[0] = [...res.data[0], ...res.data[4]];
  14921. }
  14922. this.CourseType = res.data;
  14923. this.CourseType2 = [
  14924. { name: "智见课程", id: [] },
  14925. { name: "智行课程", id: [] },
  14926. { name: "智创课程", id: [] },
  14927. ];
  14928. for (var cti = 0; cti < res.data[0].length; cti++) {
  14929. if (
  14930. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14931. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  14932. ) {
  14933. this.CourseType2[0].id.push(res.data[0][cti].id);
  14934. } else if (
  14935. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  14936. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14937. ) {
  14938. this.CourseType2[1].id.push(res.data[0][cti].id);
  14939. } else if (
  14940. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14941. ) {
  14942. this.CourseType2[2].id.push(res.data[0][cti].id);
  14943. }
  14944. if (
  14945. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14946. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  14947. ) {
  14948. res.data[0][cti].name = "年级";
  14949. } else if (
  14950. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  14951. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14952. ) {
  14953. res.data[0][cti].name = "学科";
  14954. } else if (
  14955. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14956. ) {
  14957. res.data[0][cti].name = "主题";
  14958. }
  14959. }
  14960. let _courseTypeId = [];
  14961. for (var i = 0; i < res.data[0].length; i++) {
  14962. if (!this.cid) {
  14963. this.courseTypeId[res.data[0][i].id] = [];
  14964. }
  14965. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  14966. // }
  14967. this.CourseTypeJson[res.data[0][i].id] = [];
  14968. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14969. if (res.data[0][i].name == "栏目") {
  14970. this.CourseType[0][i].name = "主题";
  14971. }
  14972. }
  14973. if (res.data[2].length == 0 && res.data[3].length == 0) {
  14974. for (var j = 0; j < res.data[1].length; j++) {
  14975. if (
  14976. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  14977. _courseTypeId.indexOf(res.data[1][j].id) == -1
  14978. ) {
  14979. _courseTypeId.push(res.data[1][j].id);
  14980. }
  14981. if (res.data[0][i].id == res.data[1][j].pid) {
  14982. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14983. }
  14984. }
  14985. } else {
  14986. if (res.data[2].length > 0) {
  14987. for (var j = 0; j < res.data[2].length; j++) {
  14988. if (
  14989. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  14990. _courseTypeId.indexOf(res.data[2][j].id) == -1
  14991. ) {
  14992. _courseTypeId.push(res.data[2][j].id);
  14993. }
  14994. if (res.data[0][i].id == res.data[2][j].pid) {
  14995. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14996. }
  14997. }
  14998. }
  14999. if (res.data[3].length > 0) {
  15000. for (var j = 0; j < res.data[3].length; j++) {
  15001. if (
  15002. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  15003. _courseTypeId.indexOf(res.data[3][j].id) == -1
  15004. ) {
  15005. _courseTypeId.push(res.data[3][j].id);
  15006. }
  15007. if (res.data[0][i].id == res.data[3][j].pid) {
  15008. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  15009. }
  15010. }
  15011. }
  15012. }
  15013. }
  15014. this.courseTypeId = _courseTypeId;
  15015. })
  15016. .catch((err) => {
  15017. console.error(err);
  15018. });
  15019. },
  15020. selectType() {
  15021. this.ajax
  15022. .get(this.$store.state.api + "selectType")
  15023. .then((res) => {
  15024. this.CourseType = res.data;
  15025. for (var i = 0; i < res.data[0].length; i++) {
  15026. if (!this.cid) {
  15027. this.courseTypeId[res.data[0][i].id] = "";
  15028. }
  15029. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  15030. if (res.data[0][i].name == "栏目") {
  15031. this.CourseType[0][i].name = "主题";
  15032. }
  15033. }
  15034. for (var j = 0; j < res.data[1].length; j++) {
  15035. if (res.data[0][i].id == res.data[1][j].pid) {
  15036. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15037. this.CourseTypeJson[res.data[0][i].id] = [];
  15038. }
  15039. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  15040. }
  15041. }
  15042. }
  15043. this.selectTypeByOid();
  15044. this.selectTypeByOrg();
  15045. })
  15046. .catch((err) => {
  15047. console.error(err);
  15048. });
  15049. },
  15050. selectTypeByOid() {
  15051. let params = {
  15052. oid: this.oid,
  15053. };
  15054. this.ajax
  15055. .get(this.$store.state.api + "selectTypeByOid", params)
  15056. .then((res) => {
  15057. for (var i = 0; i < res.data[0].length; i++) {
  15058. for (var j = 0; j < res.data[1].length; j++) {
  15059. if (res.data[0][i].id == res.data[1][j].pid) {
  15060. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15061. this.CourseTypeJson[res.data[0][i].id] = [];
  15062. }
  15063. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  15064. }
  15065. }
  15066. }
  15067. })
  15068. .catch((err) => {
  15069. console.error(err);
  15070. });
  15071. },
  15072. selectTypeByOrg() {
  15073. let params = {
  15074. oid: this.org,
  15075. };
  15076. this.ajax
  15077. .get(this.$store.state.api + "selectTypeByOrg", params)
  15078. .then((res) => {
  15079. for (var i = 0; i < res.data[0].length; i++) {
  15080. for (var j = 0; j < res.data[1].length; j++) {
  15081. if (res.data[0][i].id == res.data[1][j].pid) {
  15082. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15083. this.CourseTypeJson[res.data[0][i].id] = [];
  15084. }
  15085. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  15086. }
  15087. }
  15088. }
  15089. this.$forceUpdate();
  15090. })
  15091. .catch((err) => {
  15092. console.error(err);
  15093. });
  15094. },
  15095. OtherMb(type, task) {
  15096. if (task === 0 || task) {
  15097. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15098. task
  15099. ].isEvaFold = true;
  15100. }
  15101. this.typeMode = type;
  15102. setTimeout(() => {
  15103. this.checkEva(this.checkId);
  15104. setTimeout(() => {
  15105. this.checkEva(this.checkId);
  15106. }, 100);
  15107. }, 100);
  15108. },
  15109. openMember() {
  15110. this.searchTN = "";
  15111. this.getTeacher();
  15112. this.dialogVisibleMember = true;
  15113. },
  15114. checkEva(id, type) {
  15115. this.dialogVisiblemb = false;
  15116. this.selectEva();
  15117. if (this.evalua != id && type == 2) {
  15118. this.$message.success("导入成功");
  15119. setTimeout(() => {
  15120. this.checkEva(id);
  15121. }, 100);
  15122. }
  15123. this.evalua = id;
  15124. this.checkId = id;
  15125. if (this.evalua != "") {
  15126. for (var i = 0; i < this.evaJuri.length; i++) {
  15127. if (this.evalua == this.evaJuri[i].id) {
  15128. this.eTitle = this.evaJuri[i].title;
  15129. this.eJson = JSON.parse(this.evaJuri[i].content);
  15130. }
  15131. }
  15132. this.data.data = [];
  15133. this.$forceUpdate();
  15134. setTimeout(() => {
  15135. this.setMindData();
  15136. }, 1000);
  15137. }
  15138. },
  15139. deleteEva() {
  15140. let _this = this;
  15141. if (_this.evalua == "") {
  15142. this.$message.warning("内容已经清空了,请勿重复清空");
  15143. return;
  15144. }
  15145. _this
  15146. .$confirm("确定删除此目标吗?", "提示", {
  15147. confirmButtonText: "确定",
  15148. cancelButtonText: "取消",
  15149. type: "warning",
  15150. })
  15151. .then(() => {
  15152. _this.evalua = "";
  15153. _this.checkId = "";
  15154. _this.eTitle = "";
  15155. let _unitJson = _this.unitJson;
  15156. for (var i = 0; i < _unitJson.length; i++) {
  15157. let _task = _unitJson[i].chapterInfo[0].taskJson;
  15158. for (var j = 0; j < _task.length; j++) {
  15159. let _eList = _task[j].eList;
  15160. for (var k = 0; k < _eList.length; k++) {
  15161. delete _eList[k].target;
  15162. }
  15163. }
  15164. }
  15165. _this.$forceUpdate();
  15166. if (_this.cid) {
  15167. _this.updateWork();
  15168. }
  15169. })
  15170. .catch(() => {
  15171. return;
  15172. });
  15173. },
  15174. selectEva() {
  15175. let params = {
  15176. oid: this.oid,
  15177. };
  15178. this.ajax
  15179. .get(this.$store.state.api + "selectAllEvaluation", params)
  15180. .then((res) => {
  15181. this.evaJuri = res.data[0];
  15182. // 在复制操作之前记录滚动位置
  15183. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  15184. // 执行复制操作
  15185. // 复制操作完成后恢复滚动位置
  15186. this.$nextTick(() => {
  15187. if (this.$refs.scrollContainer) {
  15188. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  15189. }
  15190. });
  15191. })
  15192. .catch((err) => {
  15193. console.error(err);
  15194. });
  15195. },
  15196. setMindData() {
  15197. let targetArray = [];
  15198. this.data.data = [];
  15199. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  15200. let _eJson = Object.keys(this.eJson);
  15201. let _e = this.eJson;
  15202. for (let i = 0; i < _eJson.length; i++) {
  15203. let element = _e[_eJson[i]];
  15204. this.data.data.push({
  15205. id: element.id,
  15206. parentid: "root",
  15207. topic: element.name,
  15208. });
  15209. // targetArray.push({
  15210. // id: element.id,
  15211. // parentid: "root",
  15212. // name: element.name,
  15213. // });
  15214. targetArray.push({
  15215. value: element.name,
  15216. label: element.name,
  15217. children: [],
  15218. });
  15219. let _eJsonc = Object.keys(element.child);
  15220. let _e2 = element.child;
  15221. for (let j = 0; j < _eJsonc.length; j++) {
  15222. let _ec = _e2[_eJsonc[j]];
  15223. this.data.data.push({
  15224. id: _ec.id,
  15225. parentid: element.id,
  15226. topic: _ec.name,
  15227. });
  15228. // targetArray.push({
  15229. // id: _ec.id,
  15230. // parentid: element.id,
  15231. // name: _ec.name,
  15232. // });
  15233. targetArray[i].children.push({
  15234. value: _ec.name,
  15235. label: _ec.name,
  15236. children: [],
  15237. });
  15238. let _eJsonz = Object.keys(_ec.child);
  15239. let _e3 = _ec.child;
  15240. for (let z = 0; z < _eJsonz.length; z++) {
  15241. let _ez = _e3[_eJsonz[z]];
  15242. this.data.data.push({
  15243. id: _ez.id,
  15244. parentid: _ec.id,
  15245. topic: _ez.name,
  15246. });
  15247. // targetArray.push({
  15248. // id: _ez.id,
  15249. // parentid: _ec.id,
  15250. // name: _ez.name,
  15251. // });
  15252. targetArray[i].children[j].children.push({
  15253. value: _ez.name,
  15254. label: _ez.name,
  15255. });
  15256. }
  15257. }
  15258. }
  15259. this.targetArray = targetArray;
  15260. this.$forceUpdate();
  15261. },
  15262. /*添加评价 */
  15263. addEList(index, tIndex) {
  15264. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  15265. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  15266. value: "",
  15267. detail: "",
  15268. score: 5,
  15269. isai: "1",
  15270. })
  15271. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  15272. { value: "", detail: "", score: 5,isai: "1", },
  15273. ]);
  15274. this.$forceUpdate();
  15275. },
  15276. openEList(index, tIndex) {
  15277. this.evaIndex = index;
  15278. this.evatIndex = tIndex;
  15279. this.evaBoxDialog = true;
  15280. },
  15281. addCET(index, tIndex) {
  15282. this.cetIndex = index;
  15283. this.cettIndex = tIndex;
  15284. this.selectAllType1();
  15285. },
  15286. addCETemplate() {
  15287. var array =
  15288. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  15289. .eList;
  15290. let params = [
  15291. {
  15292. uid: this.userid,
  15293. n: this.templateName,
  15294. json: JSON.stringify(array),
  15295. t: 1,
  15296. oid: this.oid,
  15297. },
  15298. ];
  15299. this.ajax
  15300. .post(this.$store.state.api + "addCETShare", params)
  15301. .then((res) => {
  15302. this.addTypeByCET(res.data[0][0].id);
  15303. })
  15304. .catch((err) => {
  15305. this.$message.error("网络不佳");
  15306. console.error(err);
  15307. });
  15308. },
  15309. addTypeByCET(id) {
  15310. if (this.setTypeJson.two == "") {
  15311. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  15312. return;
  15313. }
  15314. let params = {
  15315. cid: id,
  15316. };
  15317. this.ajax
  15318. .get(this.$store.state.api + "deleteCETLabel", params)
  15319. .then((res) => {
  15320. for (var i = 0; i < 2; i++) {
  15321. let tid = "";
  15322. if (i == 0) {
  15323. tid = this.setTypeJson.one;
  15324. } else {
  15325. tid = this.setTypeJson.two;
  15326. }
  15327. let params = [
  15328. {
  15329. cid: id,
  15330. tid: tid,
  15331. uid: this.userid,
  15332. },
  15333. ];
  15334. this.ajax
  15335. .post(this.$store.state.api + "addCETLabel", params)
  15336. .then((res) => {
  15337. this.$message({
  15338. message: "添加成功",
  15339. type: "success",
  15340. });
  15341. this.close();
  15342. })
  15343. .catch((err) => {
  15344. this.$message.error("网络不佳");
  15345. console.error(err);
  15346. });
  15347. }
  15348. })
  15349. .catch((err) => {
  15350. this.$message.error("网络不佳");
  15351. console.error(err);
  15352. });
  15353. },
  15354. updateEvaJson(array) {
  15355. array = array.filter((item) => {
  15356. item.isai = "1"
  15357. return item;
  15358. });
  15359. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  15360. this.evatIndex
  15361. ].eList = array;
  15362. },
  15363. forceUpdate() {
  15364. this.$forceUpdate();
  15365. },
  15366. forceUpdate2() {
  15367. setTimeout(() => {
  15368. this.courseText += "*0*%*";
  15369. setTimeout(() => {
  15370. this.courseText = this.courseText.replaceAll("*0*%*", "");
  15371. }, 0);
  15372. }, 100);
  15373. this.$forceUpdate();
  15374. },
  15375. deletEList(index, tIndex, eIndex) {
  15376. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  15377. eIndex,
  15378. 1
  15379. );
  15380. this.$forceUpdate();
  15381. },
  15382. getChoosePic(t) {
  15383. this.chooseType = t;
  15384. this.getAllBanner();
  15385. },
  15386. getAllBanner() {
  15387. this.sysPicVisible = true;
  15388. let params = {
  15389. t: this.chooseType,
  15390. };
  15391. this.ajax
  15392. .get(this.$store.state.api + "selectAllBanner", params)
  15393. .then((res) => {
  15394. this.sysPic = res.data[0];
  15395. })
  15396. .catch((err) => {
  15397. console.error(err);
  15398. });
  15399. },
  15400. // getClass() {
  15401. // let params = {
  15402. // oid: this.oid,
  15403. // };
  15404. // this.ajax
  15405. // .get(this.$store.state.api + "selectClassBySchool", params)
  15406. // .then((res) => {
  15407. // this.classJuri = res.data[0];
  15408. // })
  15409. // .catch((err) => {
  15410. // console.error(err);
  15411. // });
  15412. // },
  15413. deleteSysPic() {
  15414. this.cover = [];
  15415. this.isSysPic = false;
  15416. this.isSysPic2 = false;
  15417. },
  15418. deleteSelectPic() {
  15419. this.selectJson.url = "";
  15420. },
  15421. setEListStar() {
  15422. this.$forceUpdate();
  15423. },
  15424. deletRateList(i) {
  15425. this.rateJson.splice(i, 1);
  15426. },
  15427. addRateList() {
  15428. this.rateJson.push({ detail: "", score: 5, value: "" });
  15429. },
  15430. addSt() {
  15431. this.sentenceList.push({
  15432. sentenceTitle: "",
  15433. addSentence: [],
  15434. rightAnswer: [],
  15435. });
  15436. },
  15437. addSen(i) {
  15438. if (!this.sentenceList[i].sentenceTitle) {
  15439. this.$message.error("请填写卡片内容!");
  15440. return;
  15441. }
  15442. if (this.sentenceList[i].sentenceTitle.length > 10) {
  15443. this.$message.error("卡片内容字数不能超过10位");
  15444. return;
  15445. }
  15446. if (
  15447. this.sentenceList[i].addSentence.indexOf(
  15448. this.sentenceList[i].sentenceTitle
  15449. ) !== -1
  15450. ) {
  15451. this.$message.error("不能添加重复的卡片内容!");
  15452. return;
  15453. }
  15454. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  15455. // this.isPushTitleList.push(this.sentenceTitle);
  15456. this.sentenceList[i].sentenceTitle = "";
  15457. },
  15458. setRightAnswer(s, i, j) {
  15459. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  15460. this.sentenceList[i].rightAnswer.push(s);
  15461. }
  15462. },
  15463. returnCard(r, i, j) {
  15464. this.sentenceList[i].rightAnswer.splice(j, 1);
  15465. },
  15466. addSentenceTool() {
  15467. for (var i = 0; i < this.sentenceList.length; i++) {
  15468. if (this.sentenceList[i].rightAnswer.length == 0) {
  15469. this.$message.error(`请将题目${i + 1}设置完整。`);
  15470. return;
  15471. }
  15472. if (
  15473. this.sentenceList[i].addSentence.length !=
  15474. this.sentenceList[i].rightAnswer.length
  15475. ) {
  15476. this.$message.error(`请将题目${i + 1}设置完整。`);
  15477. return;
  15478. }
  15479. }
  15480. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15481. this.taskCount
  15482. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  15483. this.sentenceList = [
  15484. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  15485. ];
  15486. this.dialogVisibleSentence = false;
  15487. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15488. // itemTaskIndex
  15489. // ].toolChoose[toolIndex].tool = [];
  15490. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15491. // itemTaskIndex
  15492. // ].toolChoose[toolIndex].tool.push(i);
  15493. if (
  15494. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15495. .toolChoose[this.toolIndex].tool != 47
  15496. ) {
  15497. this.addTools(47, this.taskCount, this.toolIndex);
  15498. }
  15499. },
  15500. addTableJson() {
  15501. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  15502. // this.$message.error("请将信息填写完整!");
  15503. // return;
  15504. // }
  15505. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15506. this.taskCount
  15507. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  15508. // this.tableJson = [{ text: "" }];
  15509. // this.dialogVisibleTable = false;
  15510. this.$message.success("上传成功");
  15511. if (
  15512. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15513. .toolChoose[this.toolIndex].tool != 48
  15514. ) {
  15515. this.addTools(48, this.taskCount, this.toolIndex);
  15516. }
  15517. },
  15518. addWordJson() {
  15519. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15520. this.taskCount
  15521. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  15522. // this.wordJson = [{ text: "" }];
  15523. // this.dialogVisibleWord = false;
  15524. this.$message.success("上传成功");
  15525. if (
  15526. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15527. .toolChoose[this.toolIndex].tool != 52
  15528. ) {
  15529. this.addTools(52, this.taskCount, this.toolIndex);
  15530. }
  15531. },
  15532. addMoreUpload() {
  15533. if (this.uploadJson.length == 0) {
  15534. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15535. this.taskCount
  15536. ].toolChoose[this.toolIndex].uploadJson = [];
  15537. } else {
  15538. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15539. this.taskCount
  15540. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  15541. }
  15542. this.uploadJson = [];
  15543. this.dialogVisibleMoreUpload = false;
  15544. if (
  15545. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15546. .toolChoose[this.toolIndex].tool != 50
  15547. ) {
  15548. this.addTools(50, this.taskCount, this.toolIndex);
  15549. }
  15550. },
  15551. addPreTime() {
  15552. if (this.preTime == 0) {
  15553. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15554. this.taskCount
  15555. ].toolChoose[this.toolIndex].preTime = 0;
  15556. } else {
  15557. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15558. this.taskCount
  15559. ].toolChoose[this.toolIndex].preTime = this.preTime;
  15560. }
  15561. this.preTime = 0;
  15562. this.dialogVisiblePreTime = false;
  15563. if (
  15564. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15565. .toolChoose[this.toolIndex].tool != 10
  15566. ) {
  15567. this.addTools(10, this.taskCount, this.toolIndex);
  15568. }
  15569. },
  15570. goToTask(i) {
  15571. this.toolIndexType = "";
  15572. if (this.isClickColor == i + 1) {
  15573. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15574. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15575. // } else {
  15576. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15577. i
  15578. ].toolOpen = true;
  15579. // }
  15580. this.$forceUpdate();
  15581. return;
  15582. }
  15583. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15584. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15585. // } else {
  15586. document.querySelectorAll(".basic_box")[0].scrollTop =
  15587. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  15588. this.isClickColor = i + 1;
  15589. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15590. // }
  15591. this.$forceUpdate();
  15592. },
  15593. taskScroll(){
  15594. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  15595. const sections = document.querySelectorAll('.taskBorder');
  15596. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  15597. sections.forEach((section, index) => {
  15598. const offsetTop = section.offsetTop;
  15599. const offsetHeight = section.offsetHeight;
  15600. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  15601. this.isClickColor = index +1;
  15602. }
  15603. });
  15604. },
  15605. taskOpen(i, stageIndex) {
  15606. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15607. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  15608. } else {
  15609. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15610. }
  15611. this.updateWork3(stageIndex);
  15612. this.$forceUpdate();
  15613. },
  15614. goToTask2(i, stage) {
  15615. this.toolIndexType = "";
  15616. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  15617. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15618. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15619. // } else {
  15620. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15621. i
  15622. ].toolOpen = true;
  15623. // }
  15624. this.$forceUpdate();
  15625. return;
  15626. }
  15627. if (this.unitIndex != stage) {
  15628. if (this.panUnitJson() == 2) {
  15629. return;
  15630. }
  15631. this.unitSet(stage);
  15632. }
  15633. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15634. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15635. // } else {
  15636. document.querySelectorAll(".basic_box")[0].scrollTop =
  15637. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  15638. this.isClickColor = i + 1;
  15639. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15640. // }
  15641. this.$forceUpdate();
  15642. },
  15643. taskMove(type, index) {
  15644. this.$confirm(
  15645. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15646. "提示",
  15647. {
  15648. confirmButtonText: "确定",
  15649. cancelButtonText: "取消",
  15650. type: "warning",
  15651. }
  15652. )
  15653. .then(() => {
  15654. if (type == 1) {
  15655. if (index > 0) {
  15656. let a = JSON.parse(
  15657. JSON.stringify(
  15658. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15659. index - 1
  15660. ]
  15661. )
  15662. );
  15663. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  15664. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  15665. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  15666. }
  15667. } else {
  15668. if (
  15669. index <
  15670. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  15671. ) {
  15672. let a = JSON.parse(
  15673. JSON.stringify(
  15674. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15675. index + 1
  15676. ]
  15677. )
  15678. );
  15679. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  15680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  15681. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  15682. }
  15683. }
  15684. this.$forceUpdate();
  15685. })
  15686. .catch(() => {
  15687. return;
  15688. });
  15689. },
  15690. stageMove(type, index) {
  15691. if (type == 1) {
  15692. if (index > 0) {
  15693. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  15694. let acid = JSON.parse(
  15695. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  15696. );
  15697. let bcid = JSON.parse(
  15698. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  15699. );
  15700. this.unitJson3[index - 1] = this.unitJson3[index];
  15701. this.unitJson3[index] = a;
  15702. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  15703. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  15704. }
  15705. } else {
  15706. if (index < this.unitJson3.length - 1) {
  15707. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  15708. let acid = JSON.parse(
  15709. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  15710. );
  15711. let bcid = JSON.parse(
  15712. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  15713. );
  15714. this.unitJson3[index + 1] = this.unitJson3[index];
  15715. this.unitJson3[index] = a;
  15716. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  15717. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  15718. }
  15719. }
  15720. this.$forceUpdate();
  15721. },
  15722. addGroup(i) {
  15723. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  15724. this.groupJson.group.push({
  15725. name: "第" + (this.groupJson.group.length + 1) + "组",
  15726. });
  15727. },
  15728. deleteGroup(i) {
  15729. this.groupJson.group.splice(i, 1);
  15730. },
  15731. numberPan() {
  15732. if (
  15733. /[^\d]/.test(this.groupJson.number) ||
  15734. this.groupJson.number < 2 ||
  15735. this.groupJson.number > 10
  15736. ) {
  15737. this.$message.error("请输入2-10的数字");
  15738. this.groupJson.number = "";
  15739. }
  15740. },
  15741. numberPanJie() {
  15742. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  15743. this.$message.error('请输入大于1的数字')
  15744. this.courseJie = 1
  15745. }
  15746. },
  15747. numberPanTime() {
  15748. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  15749. this.$message.error('请输入大于1的数字')
  15750. this.courseTime = 1
  15751. }
  15752. },
  15753. addGroupJson() {
  15754. for (var i = 0; i < this.groupJson.group.length; i++) {
  15755. if (!this.groupJson.group[i].name) {
  15756. this.$message.error("请将信息填写完整!");
  15757. return;
  15758. }
  15759. }
  15760. if (!this.groupJson.number) {
  15761. this.$message.error("请将信息填写完整!");
  15762. return;
  15763. }
  15764. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15765. this.taskCount
  15766. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  15767. JSON.stringify(this.groupJson)
  15768. );
  15769. this.dialogVisibleGroup = false;
  15770. this.groupJson = {};
  15771. if (
  15772. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15773. .toolChoose[this.toolIndex].tool != 49
  15774. ) {
  15775. this.addTools(49, this.taskCount, this.toolIndex);
  15776. }
  15777. },
  15778. updateTime(preTime) {
  15779. this.preTime = preTime;
  15780. },
  15781. InviteChange(val) {
  15782. console.log(val);
  15783. let _check = [];
  15784. let _check2 = [];
  15785. for (var i = 0; i < this.grade2.length; i++) {
  15786. var gid = this.grade2[i].id;
  15787. _check.push(gid);
  15788. }
  15789. for (var i = 0; i < this.checkboxList2.length; i++) {
  15790. var _id = this.checkboxList2[i];
  15791. if (_check.indexOf(_id) !== -1) {
  15792. _check2.push(_id);
  15793. }
  15794. }
  15795. this.checkAll = _check2.length === _check.length;
  15796. return;
  15797. let array = JSON.parse(JSON.stringify(val));
  15798. this.inviteCode = this.inviteCode.filter((el) => {
  15799. if (val.indexOf(el.cid) != -1) {
  15800. array.splice(array.indexOf(el.cid), 1);
  15801. return el;
  15802. }
  15803. });
  15804. for (var i = 0; i < array.length; i++) {
  15805. this.getInviteCode(array[i]);
  15806. }
  15807. },
  15808. InviteChange2(val) {
  15809. console.log(val);
  15810. let _check = [];
  15811. let _check2 = [];
  15812. for (var i = 0; i < this.teacherJuri.length; i++) {
  15813. var gid = this.teacherJuri[i].userid;
  15814. _check.push(gid);
  15815. }
  15816. for (var i = 0; i < this.checkboxList3.length; i++) {
  15817. var _id = this.checkboxList3[i];
  15818. if (_check.indexOf(_id) !== -1) {
  15819. _check2.push(_id);
  15820. }
  15821. }
  15822. this.checkAll2 = _check2.length === _check.length;
  15823. this.setMan();
  15824. return;
  15825. let array = JSON.parse(JSON.stringify(val));
  15826. this.inviteCode = this.inviteCode.filter((el) => {
  15827. if (val.indexOf(el.cid) != -1) {
  15828. array.splice(array.indexOf(el.cid), 1);
  15829. return el;
  15830. }
  15831. });
  15832. for (var i = 0; i < array.length; i++) {
  15833. this.getInviteCode(array[i]);
  15834. }
  15835. },
  15836. handleCheckAllChange(val) {
  15837. if (val) {
  15838. for (var i = 0; i < this.grade2.length; i++) {
  15839. var gid = this.grade2[i].id;
  15840. if (this.checkboxList2.indexOf(gid) === -1) {
  15841. this.checkboxList2.push(gid);
  15842. }
  15843. }
  15844. } else {
  15845. let _check = [];
  15846. let _check2 = [];
  15847. for (var i = 0; i < this.grade2.length; i++) {
  15848. var gid = this.grade2[i].id;
  15849. _check.push(gid);
  15850. }
  15851. for (var i = 0; i < this.checkboxList2.length; i++) {
  15852. var _id = this.checkboxList2[i];
  15853. if (_check.indexOf(_id) === -1) {
  15854. _check2.push(_id);
  15855. }
  15856. }
  15857. this.checkboxList2 = _check2;
  15858. }
  15859. this.isIndeterminate = false;
  15860. },
  15861. handleCheckAllChange2(val) {
  15862. if (val) {
  15863. for (var i = 0; i < this.teacherJuri.length; i++) {
  15864. var gid = this.teacherJuri[i].userid;
  15865. if (this.checkboxList3.indexOf(gid) === -1) {
  15866. this.checkboxList3.push(gid);
  15867. }
  15868. }
  15869. } else {
  15870. let _check = [];
  15871. let _check2 = [];
  15872. for (var i = 0; i < this.teacherJuri.length; i++) {
  15873. var gid = this.teacherJuri[i].userid;
  15874. _check.push(gid);
  15875. }
  15876. for (var i = 0; i < this.checkboxList3.length; i++) {
  15877. var _id = this.checkboxList3[i];
  15878. if (_check.indexOf(_id) === -1) {
  15879. _check2.push(_id);
  15880. }
  15881. }
  15882. this.checkboxList3 = _check2;
  15883. }
  15884. this.isIndeterminate2 = false;
  15885. },
  15886. async getInviteCode(cid) {
  15887. let code = this.randomNumber();
  15888. let params = {
  15889. code: code,
  15890. oid: this.oid,
  15891. };
  15892. let type = 1;
  15893. for (var i = 0; i < this.inviteCode.length; i++) {
  15894. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  15895. type = 2;
  15896. }
  15897. }
  15898. if (type == 2) {
  15899. this.getInviteCode(cid);
  15900. return;
  15901. }
  15902. const res = await this.ajax.get(
  15903. this.$store.state.api + "selectInviteCode2",
  15904. params
  15905. );
  15906. if (
  15907. res.data.length &&
  15908. res.data[0].length &&
  15909. res.data[0][0].courseId != this.cid
  15910. ) {
  15911. this.getInviteCode(cid);
  15912. return;
  15913. }
  15914. let array = [];
  15915. for (var i = 0; i < this.inviteCode.length; i++) {
  15916. array.push(this.inviteCode[i].cid);
  15917. }
  15918. if (array.indexOf(cid) != -1) {
  15919. this.inviteCode[array.indexOf(cid)].ic = code;
  15920. } else {
  15921. this.inviteCode.push({ cid: cid, ic: code });
  15922. }
  15923. },
  15924. OpenInviteD(cid) {
  15925. let array = [];
  15926. this.icode = "";
  15927. for (var i = 0; i < this.inviteCode.length; i++) {
  15928. array.push(this.inviteCode[i].cid);
  15929. }
  15930. if (array.indexOf(cid) != -1) {
  15931. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  15932. }
  15933. this.inviteId = cid;
  15934. this.dialogVisibleInvite = true;
  15935. },
  15936. addInvite() {
  15937. let reg = /^[A-Za-z0-9]{4,}$/;
  15938. if (!reg.test(this.icode)) {
  15939. this.$message.error("请输入至少四位数字或英文组合的随机码");
  15940. return;
  15941. }
  15942. let type = 1;
  15943. for (var i = 0; i < this.inviteCode.length; i++) {
  15944. if (
  15945. this.inviteCode[i].cid != this.inviteId &&
  15946. this.icode == this.inviteCode[i].ic
  15947. ) {
  15948. type = 2;
  15949. }
  15950. }
  15951. if (type == 2) {
  15952. this.$message.error("已有此随机码,不能重复");
  15953. return;
  15954. }
  15955. let params = {
  15956. code: this.icode,
  15957. oid: this.oid,
  15958. };
  15959. this.ajax
  15960. .get(this.$store.state.api + "selectInviteCode", params)
  15961. .then((res) => {
  15962. if (
  15963. res.data.length &&
  15964. res.data[0].length &&
  15965. res.data[0][0].courseId != this.cid
  15966. ) {
  15967. this.$message.error("已有此随机码,不能重复");
  15968. return;
  15969. }
  15970. let array = [];
  15971. for (var i = 0; i < this.inviteCode.length; i++) {
  15972. array.push(this.inviteCode[i].cid);
  15973. }
  15974. if (array.indexOf(this.inviteId) != -1) {
  15975. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  15976. } else {
  15977. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  15978. }
  15979. this.icode = "";
  15980. this.dialogVisibleInvite = false;
  15981. })
  15982. .catch((err) => {
  15983. console.error(err);
  15984. });
  15985. },
  15986. randomNumber() {
  15987. // 随机生成两位数
  15988. // let num = Math.floor(Math.random() * 900) + 100;
  15989. // 生成 0 到 99 之间的随机整数
  15990. const randomNumber = Math.floor(Math.random() * 100);
  15991. // 如果随机数小于 10,补上前导零
  15992. const num =
  15993. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  15994. // 随机生成两个大写字母
  15995. let letters = "";
  15996. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  15997. for (let i = 0; i < 3; i++) {
  15998. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  15999. }
  16000. // 随机生成两位数字和字母的组合
  16001. let mix = "";
  16002. let chars =
  16003. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  16004. for (let i = 0; i < 3; i++) {
  16005. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  16006. mix += char;
  16007. }
  16008. // 随机选择一种类型
  16009. let type = Math.floor(Math.random() * 3);
  16010. return num;
  16011. // 根据类型输出结果
  16012. switch (type) {
  16013. case 0:
  16014. console.log(num); // 输出两位数
  16015. return num;
  16016. case 1:
  16017. console.log(letters); // 输出两个大写字母
  16018. return letters;
  16019. case 2:
  16020. console.log(mix); // 输出两位数字和字母的组合
  16021. return mix;
  16022. }
  16023. },
  16024. getPaste() {
  16025. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  16026. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  16027. if (!iframe && !iframe2) {
  16028. return;
  16029. }
  16030. let copyData = iframe ? iframe.contentWindow.copyData : false;
  16031. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  16032. if (copyData && copyData.stageData && copyData.stageData.length) {
  16033. this.isPasteStage = true;
  16034. }
  16035. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  16036. this.isPasteStage = true;
  16037. }
  16038. if (copyData && copyData.selectData.length) {
  16039. this.isPasteChoice = true;
  16040. }
  16041. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  16042. this.isPasteTask = true;
  16043. }
  16044. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  16045. this.isPasteTask = true;
  16046. }
  16047. },
  16048. getPaste2() {
  16049. let iframe = document.querySelectorAll(".interIframe")[0];
  16050. const turndownService = new TurndownService();
  16051. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  16052. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  16053. if(confirm_next_step){
  16054. this.courseText += turndownService.turndown(confirm_next_step)
  16055. iframe.contentWindow.confirm_next_step = ''
  16056. }
  16057. if(work_area_text && work_area_text.aiContent){
  16058. this.courseText += turndownService.turndown(work_area_text.aiContent)
  16059. iframe.contentWindow.work_area_text = ''
  16060. }
  16061. },
  16062. setCourseInfo(){
  16063. let courseInfo = ''
  16064. let sub = []
  16065. let mclass = []
  16066. if (this.courseTypeId.length) {
  16067. for (var i = 0; i < this.courseTypeId.length; i++) {
  16068. let _sid = this.courseTypeId[i]
  16069. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16070. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16071. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16072. }
  16073. }
  16074. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16075. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16076. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16077. }
  16078. }
  16079. }
  16080. }
  16081. if(this.courseName){
  16082. courseInfo = `课程名称:${this.courseName} `
  16083. }
  16084. if(mclass.length){
  16085. courseInfo += `年级:${mclass.join(',')} `
  16086. }
  16087. if(sub.length){
  16088. courseInfo += `学科:${sub.join(',')} `
  16089. }
  16090. console.log(courseInfo)
  16091. window.course_info = courseInfo
  16092. window.course_lang = this.languageSetting
  16093. },
  16094. setCover(attempts = 0) {
  16095. var _this = this;
  16096. if (_this.cover.length || attempts >= 3) {
  16097. return;
  16098. }
  16099. _this.imageloading2 = true;
  16100. _this.ajax
  16101. .post("https://gpt.cocorobo.cn/search_image", {
  16102. page: _this.ppage,
  16103. pagesize: 9,
  16104. query: _this.courseName,
  16105. })
  16106. .then(function (response) {
  16107. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  16108. if(data){
  16109. _this.cover = [];
  16110. setTimeout(() => {
  16111. _this.cover[0] = {
  16112. name: "网络图片.png",
  16113. url: data[0].thumbnail,
  16114. };
  16115. _this.imgChange1(null, null, 1, null);
  16116. _this.$forceUpdate();
  16117. }, 0);
  16118. _this.imageloading2 = false;
  16119. }else {
  16120. _this.imageloading2 = false;
  16121. _this.setCover(attempts + 1);
  16122. }
  16123. })
  16124. .catch(function (error) {
  16125. _this.imageloading2 = false;
  16126. _this.setCover(attempts + 1);
  16127. console.log(error);
  16128. });
  16129. },
  16130. searchImage() {
  16131. var _this = this;
  16132. _this.imageList = [];
  16133. if (!_this.searchImageValue) {
  16134. _this.sysPicVisible2 = true;
  16135. return;
  16136. }
  16137. _this.imageloading = true;
  16138. _this.ajax
  16139. .post("https://gpt.cocorobo.cn/search_image", {
  16140. page: _this.ppage,
  16141. pagesize: 9,
  16142. query: _this.searchImageValue,
  16143. })
  16144. .then(function (response) {
  16145. // console.log(response.data.data);
  16146. var data = response.data.FunctionResponse.result;
  16147. for (var i = 0; i < data.length; i++) {
  16148. _this.imageList.push({ url: data[i].thumbnail });
  16149. }
  16150. _this.imageloading = false;
  16151. })
  16152. .catch(function (error) {
  16153. console.log(error);
  16154. });
  16155. _this.sysPicVisible2 = true;
  16156. },
  16157. changePicture() {
  16158. this.ppage++;
  16159. this.searchImage();
  16160. },
  16161. resetImage() {
  16162. this.ppage = 1;
  16163. this.searchImage();
  16164. },
  16165. jumpGj(i, j) {
  16166. if (i + 1 != this.isClickColor) {
  16167. this.isClickColor = i + 1;
  16168. }
  16169. var a = document.scrollingElement;
  16170. this.toolIndexType = `gj${i}${j}`;
  16171. let target = document.querySelector(`#gj${i}${j}`);
  16172. if (target) {
  16173. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  16174. setTimeout(() => {
  16175. target.scrollIntoView(true);
  16176. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  16177. j
  16178. ].isFold3 = false;
  16179. setTimeout(() => {
  16180. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  16181. }, 0);
  16182. }, 0);
  16183. }
  16184. },
  16185. jumpGj2(i, j, k) {
  16186. if (this.unitIndex != k) {
  16187. if (this.panUnitJson() == 2) {
  16188. return;
  16189. }
  16190. this.unitSet(k);
  16191. }
  16192. setTimeout(() => {
  16193. if (i + 1 != this.isClickColor) {
  16194. this.isClickColor = i + 1;
  16195. }
  16196. var a = document.scrollingElement;
  16197. this.toolIndexType = `gj${i}${j}${k}`;
  16198. let target = document.querySelector(`#gj${i}${j}`);
  16199. if (target) {
  16200. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  16201. setTimeout(() => {
  16202. target.scrollIntoView(true);
  16203. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  16204. j
  16205. ].isFold3 = false;
  16206. setTimeout(() => {
  16207. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  16208. }, 0);
  16209. }, 0);
  16210. }
  16211. }, 0);
  16212. },
  16213. dragStart(val, i, j) {
  16214. console.log(this.taskCount);
  16215. this.dragType = "drag";
  16216. this.taskCount = j;
  16217. this.oldIndex = i;
  16218. this.oldData = val;
  16219. },
  16220. dragOver(i, j) {
  16221. this.typeIndex = "chapter-" + j + "-" + i;
  16222. this.newIndex = i;
  16223. },
  16224. dragEnd() {
  16225. if (this.dragType != "drag") {
  16226. this.typeIndex = "";
  16227. this.newIndex = "";
  16228. this.dragType = "";
  16229. this.isdrag = "";
  16230. return;
  16231. }
  16232. console.log(this.taskCount);
  16233. let newItems = [
  16234. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16235. .chapterData,
  16236. ];
  16237. // 删除老的节点
  16238. newItems.splice(this.oldIndex, 1);
  16239. // 在列表中目标位置增加新的节点
  16240. newItems.splice(this.newIndex, 0, this.oldData);
  16241. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16242. this.taskCount
  16243. ].chapterData = [...newItems];
  16244. this.typeIndex = "";
  16245. this.newIndex = "";
  16246. this.dragType = "";
  16247. this.isdrag = "";
  16248. this.$forceUpdate();
  16249. },
  16250. dragTaskStart(val, i, j) {
  16251. this.dragType = "task";
  16252. this.oldIndex = i;
  16253. this.oldData = val;
  16254. this.oldUnitIndex = j;
  16255. },
  16256. dragTaskOver(i, j) {
  16257. this.typeIndex = "task-" + i;
  16258. this.newIndex = i;
  16259. this.checkUnitIndex = j;
  16260. },
  16261. async dragTaskEnd() {
  16262. if (this.dragType != "task") {
  16263. this.newIndex = "";
  16264. this.dragType = "";
  16265. this.typeIndex = "";
  16266. this.checkUnitIndex = "";
  16267. this.isdrag = "";
  16268. return;
  16269. }
  16270. if (
  16271. this.newIndex == this.oldIndex &&
  16272. this.oldUnitIndex == this.checkUnitIndex
  16273. ) {
  16274. this.newIndex = "";
  16275. this.dragType = "";
  16276. this.typeIndex = "";
  16277. this.checkUnitIndex = "";
  16278. this.isdrag = "";
  16279. return;
  16280. }
  16281. let count1 = await this.getWorksCount(
  16282. 2,
  16283. this.checkUnitIndex,
  16284. this.newIndex,
  16285. 0
  16286. );
  16287. let count2 = await this.getWorksCount(
  16288. 2,
  16289. this.oldUnitIndex,
  16290. this.oldIndex,
  16291. 0
  16292. );
  16293. if (count1 > 0 || count2 > 0) {
  16294. this.$confirm(
  16295. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16296. "提示",
  16297. {
  16298. confirmButtonText: "确定",
  16299. cancelButtonText: "取消",
  16300. type: "warning",
  16301. }
  16302. )
  16303. .then(() => {
  16304. if (this.oldUnitIndex != this.checkUnitIndex) {
  16305. let newItems = [
  16306. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16307. ];
  16308. // 删除老的节点
  16309. newItems.splice(this.oldIndex, 1);
  16310. // 在列表中目标位置增加新的节点
  16311. let newItems2 = [
  16312. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  16313. ];
  16314. newItems2.splice(this.newIndex, 0, this.oldData);
  16315. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16316. ...newItems,
  16317. ];
  16318. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  16319. ...newItems2,
  16320. ];
  16321. } else {
  16322. let newItems = [
  16323. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16324. ];
  16325. let chapterData = []
  16326. if (this.oldIndex == 0) {
  16327. chapterData = newItems[this.oldIndex].chapterData
  16328. newItems[this.oldIndex].chapterData = []
  16329. } else if (this.newIndex == 0) {
  16330. chapterData = newItems[this.newIndex].chapterData
  16331. newItems[this.oldIndex].chapterData = []
  16332. }
  16333. // 删除老的节点
  16334. newItems.splice(this.oldIndex, 1);
  16335. // 在列表中目标位置增加新的节点
  16336. newItems.splice(this.newIndex, 0, this.oldData);
  16337. if (this.oldIndex == 0 || this.newIndex == 0) {
  16338. newItems[0].chapterData = chapterData
  16339. }
  16340. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16341. ...newItems,
  16342. ];
  16343. }
  16344. this.typeIndex = "";
  16345. this.newIndex = "";
  16346. this.dragType = "";
  16347. this.checkUnitIndex = "";
  16348. this.isdrag = "";
  16349. this.updateWork();
  16350. this.$forceUpdate();
  16351. })
  16352. .catch(() => {
  16353. this.newIndex = "";
  16354. this.dragType = "";
  16355. this.typeIndex = "";
  16356. this.checkUnitIndex = "";
  16357. this.isdrag = "";
  16358. return;
  16359. });
  16360. } else {
  16361. if (this.oldUnitIndex != this.checkUnitIndex) {
  16362. let newItems = [
  16363. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16364. ];
  16365. // 删除老的节点
  16366. newItems.splice(this.oldIndex, 1);
  16367. // 在列表中目标位置增加新的节点
  16368. let newItems2 = [
  16369. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  16370. ];
  16371. newItems2.splice(this.newIndex, 0, this.oldData);
  16372. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16373. ...newItems,
  16374. ];
  16375. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  16376. ...newItems2,
  16377. ];
  16378. } else {
  16379. let newItems = [
  16380. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16381. ];
  16382. let chapterData = []
  16383. if (this.oldIndex == 0) {
  16384. chapterData = newItems[this.oldIndex].chapterData
  16385. newItems[this.oldIndex].chapterData = []
  16386. } else if (this.newIndex == 0) {
  16387. chapterData = newItems[this.newIndex].chapterData
  16388. newItems[this.oldIndex].chapterData = []
  16389. }
  16390. // 删除老的节点
  16391. newItems.splice(this.oldIndex, 1);
  16392. // 在列表中目标位置增加新的节点
  16393. newItems.splice(this.newIndex, 0, this.oldData);
  16394. if (this.oldIndex == 0 || this.newIndex == 0) {
  16395. newItems[0].chapterData = chapterData
  16396. }
  16397. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16398. ...newItems,
  16399. ];
  16400. }
  16401. this.typeIndex = "";
  16402. this.newIndex = "";
  16403. this.dragType = "";
  16404. this.checkUnitIndex = "";
  16405. this.isdrag = "";
  16406. this.updateWork();
  16407. this.$forceUpdate();
  16408. }
  16409. },
  16410. dragUnitStart(val, i) {
  16411. this.dragType = "Unit";
  16412. this.oldIndex = i;
  16413. this.oldData = val;
  16414. },
  16415. dragUnitOver(i) {
  16416. this.typeIndex = "Unit-" + i;
  16417. this.newIndex = i;
  16418. console.log(i, this.unitJson[i].toolOpen);
  16419. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  16420. this.unitJson[i].toolOpen = true;
  16421. this.updateWork();
  16422. this.$forceUpdate();
  16423. }
  16424. },
  16425. async dragUnitEnd() {
  16426. if (this.dragType != "Unit") {
  16427. this.newIndex = "";
  16428. this.dragType = "";
  16429. this.typeIndex = "";
  16430. this.isdrag = "";
  16431. return;
  16432. }
  16433. if (this.newIndex == this.oldIndex) {
  16434. this.newIndex = "";
  16435. this.dragType = "";
  16436. this.typeIndex = "";
  16437. this.isdrag = "";
  16438. return;
  16439. }
  16440. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  16441. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  16442. console.log(count1, count2);
  16443. if (count1 > 0 || count2 > 0) {
  16444. this.$confirm(
  16445. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  16446. "提示",
  16447. {
  16448. confirmButtonText: "确定",
  16449. cancelButtonText: "取消",
  16450. type: "warning",
  16451. }
  16452. )
  16453. .then(() => {
  16454. let newItems = [...this.unitJson];
  16455. // 删除老的节点
  16456. newItems.splice(this.oldIndex, 1);
  16457. // 在列表中目标位置增加新的节点
  16458. newItems.splice(this.newIndex, 0, this.oldData);
  16459. this.unitJson = [...newItems];
  16460. this.typeIndex = "";
  16461. this.newIndex = "";
  16462. this.dragType = "";
  16463. this.isdrag = "";
  16464. this.updateWork();
  16465. this.$forceUpdate();
  16466. })
  16467. .catch(() => {
  16468. this.newIndex = "";
  16469. this.dragType = "";
  16470. this.typeIndex = "";
  16471. this.isdrag = "";
  16472. return;
  16473. });
  16474. } else {
  16475. let newItems = [...this.unitJson];
  16476. // 删除老的节点
  16477. newItems.splice(this.oldIndex, 1);
  16478. // 在列表中目标位置增加新的节点
  16479. newItems.splice(this.newIndex, 0, this.oldData);
  16480. this.unitJson = [...newItems];
  16481. this.typeIndex = "";
  16482. this.newIndex = "";
  16483. this.dragType = "";
  16484. this.isdrag = "";
  16485. this.updateWork();
  16486. this.$forceUpdate();
  16487. }
  16488. },
  16489. getWorksCount(type, stage, task, tool) {
  16490. return new Promise((resolve, reject) => {
  16491. let params = [
  16492. {
  16493. cid: this.cid,
  16494. stage: stage,
  16495. task: task,
  16496. tool: tool,
  16497. type: type,
  16498. },
  16499. ];
  16500. this.ajax
  16501. .post(this.$store.state.api + "getCourseWorkCount", params)
  16502. .then((res) => {
  16503. let count = res.data[0][0].count;
  16504. resolve(count);
  16505. })
  16506. .catch((err) => {
  16507. resolve(0);
  16508. this.$message.error("网络不佳");
  16509. console.error(err);
  16510. });
  16511. });
  16512. },
  16513. getTwoType(id) {
  16514. this.twoJson = [];
  16515. var array = this.CourseTypeJson1[
  16516. "3f8eed32-aba9-11ee-b534-005056b86db5"
  16517. ].filter((e) => {
  16518. return e.ppid == id;
  16519. });
  16520. this.twoJson = array;
  16521. this.$forceUpdate();
  16522. },
  16523. ctype() {
  16524. this.oneJson =
  16525. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  16526. },
  16527. selectAllType1() {
  16528. this.CourseType1 = [];
  16529. this.CourseTypeJson1 = {};
  16530. this.courseTypeId1 = {};
  16531. this.$forceUpdate();
  16532. let params = {
  16533. org: this.org && this.org != "" ? this.org : "",
  16534. oid: this.oid && this.oid != "" ? this.oid : "",
  16535. };
  16536. this.ajax
  16537. .get(this.$store.state.api + "selectAllEvaType", params)
  16538. .then((res) => {
  16539. this.CourseType1 = res.data;
  16540. for (var i = 0; i < res.data[0].length; i++) {
  16541. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  16542. res.data[0][i].name = "一级分类";
  16543. } else if (
  16544. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  16545. ) {
  16546. res.data[0][i].name = "二级分类";
  16547. }
  16548. if (!this.cid) {
  16549. this.courseTypeId1[res.data[0][i].id] = [];
  16550. }
  16551. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  16552. this.CourseTypeJson1[res.data[0][i].id] = [];
  16553. }
  16554. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  16555. for (var j = 0; j < res.data[1].length; j++) {
  16556. if (res.data[0][i].id == res.data[1][j].pid) {
  16557. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16558. }
  16559. }
  16560. // } else {
  16561. if (res.data[2].length > 0) {
  16562. for (var j = 0; j < res.data[2].length; j++) {
  16563. if (res.data[0][i].id == res.data[2][j].pid) {
  16564. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16565. }
  16566. }
  16567. }
  16568. if (res.data[3].length > 0) {
  16569. for (var j = 0; j < res.data[3].length; j++) {
  16570. if (res.data[0][i].id == res.data[3][j].pid) {
  16571. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16572. }
  16573. }
  16574. }
  16575. // }
  16576. }
  16577. this.ctype();
  16578. this.cetBoxDialog = true;
  16579. })
  16580. .catch((err) => {
  16581. console.error(err);
  16582. });
  16583. },
  16584. setAiJson(pan,string,string2,string3){
  16585. if(pan == 'aiTeacher2'){
  16586. this.aiJson['teacherDetail2'] = string
  16587. }else if(pan == 'aiRateRuleA'){
  16588. this.aiJson['aiRateRule'] = string
  16589. }else if(pan == 'aiOutline2'){
  16590. this.aiJson['aiOutlineTask'] = string
  16591. this.aiJson['aiOutlineDetail'] = string2
  16592. }else if(pan == 'aiTeacher3'){
  16593. this.aiJson['aiCpoteTask'] = string
  16594. this.aiJson['teacherDetail2'] = string2
  16595. }else if(pan == 'aiTask2'){
  16596. this.aiJson['aiTask'] = string
  16597. }else if(pan == 'aiTask3'){
  16598. this.aiJson['aiTaskG1'] = string
  16599. this.aiJson['aiTaskG2'] = string2
  16600. this.aiJson['aiTaskG3'] = string3
  16601. }else if(pan == 'aiteacherTextDetail'){
  16602. this.aiJson['aiAbstract'] = string
  16603. }else if(pan == 'aitargetTextDetail'){
  16604. this.aiJson['aiTarget'] = string
  16605. }else if(pan == 'aitargetTextDetail2'){
  16606. this.aiJson['aiTarget2'] = string
  16607. }else if(pan == 'aitargetTextDetail3'){
  16608. this.aiJson['aiTargetGet'] = string
  16609. this.aiJson['aiTarget2'] = string2
  16610. }else {
  16611. this.aiJson[pan] = string
  16612. }
  16613. this.aiText2 = ''
  16614. this.aiText3 = ''
  16615. this.$forceUpdate();
  16616. },
  16617. editTask3(index){
  16618. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  16619. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  16620. }else {
  16621. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  16622. }
  16623. setTimeout(() => {
  16624. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  16625. setTimeout(() => {
  16626. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  16627. }, 0);
  16628. }, 100);
  16629. this.$forceUpdate();
  16630. },
  16631. editTask2(index){
  16632. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  16633. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  16634. }else {
  16635. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  16636. }
  16637. setTimeout(() => {
  16638. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  16639. setTimeout(() => {
  16640. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  16641. }, 0);
  16642. }, 100);
  16643. this.$forceUpdate();
  16644. },
  16645. openRule(i, k){
  16646. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  16647. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  16648. }else {
  16649. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  16650. }
  16651. setTimeout(() => {
  16652. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  16653. setTimeout(() => {
  16654. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  16655. }, 0);
  16656. }, 200);
  16657. this.$forceUpdate();
  16658. },
  16659. editCpote(index){
  16660. if(this.cpote[index]){
  16661. this.cpote[index] = false
  16662. }else {
  16663. this.cpote[index] = true
  16664. }
  16665. setTimeout(() => {
  16666. this.cpote[index.replace('s','')] += "*0*%*";
  16667. setTimeout(() => {
  16668. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  16669. }, 0);
  16670. }, 100);
  16671. this.$forceUpdate();
  16672. },
  16673. clickGenTT(){
  16674. if(!this.teacherInfoData.length){
  16675. this.$message.error("请上传教案");
  16676. return;
  16677. }
  16678. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  16679. this.openAiDialog(2, 'aiteacherTextDetail',1)
  16680. setTimeout(() => {
  16681. this.openAiDialog(2, 'aitargetTextDetail',1)
  16682. }, 500);
  16683. },
  16684. async exportTeachPlan(){
  16685. this.loading = true
  16686. const zip = new JSZip();
  16687. let md = new MarkdownIt();
  16688. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16689. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  16690. let name = _task.task+'-教案'
  16691. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  16692. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  16693. await this.generate(name, _html, i)
  16694. }
  16695. let file = await this.generateExport(name, _html, i)
  16696. zip.file(`${name}.docx`, file, { binary: true })
  16697. }
  16698. zip.generateAsync({ type: "blob" }).then((content) => {
  16699. // 生成二进制流
  16700. saveAs(
  16701. content,
  16702. this.courseName + "-" + "教案.zip"
  16703. ); // 利用file-saver保存文件 自定义文件名
  16704. setTimeout(() => {
  16705. this.loading = false
  16706. // if(!this.cid){
  16707. // this.addWork(3)
  16708. // }else{
  16709. // this.updateWork();
  16710. // this.steps = 4;
  16711. // }
  16712. }, 2000);
  16713. });
  16714. },
  16715. clickGenTT2(){
  16716. if (this.courseName == "") {
  16717. this.$message.error("请补充填写课程名称");
  16718. return;
  16719. }
  16720. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  16721. let functionA = ''
  16722. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  16723. // setTimeout(() => {
  16724. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  16725. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  16726. // }, 500);
  16727. functionA = ()=>{
  16728. this.openAiDialog(2, 'aitargetTextDetail3',1)
  16729. }
  16730. }
  16731. this.openAiDialog(2, 'aiDetail',1, functionA)
  16732. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  16733. // setTimeout(() => {
  16734. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  16735. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  16736. // }, 500);
  16737. }
  16738. this.courseTextBool = true
  16739. },
  16740. changeIsuseT(){
  16741. if(this.isuseT == 1){
  16742. this.courseTextB = false
  16743. }else{
  16744. if(this.courseText){
  16745. this.courseTextB = false
  16746. }else{
  16747. this.courseTextB = true
  16748. }
  16749. }
  16750. },
  16751. changeLang(){
  16752. window.course_lang = this.languageSetting
  16753. },
  16754. openInterPanSetting(){
  16755. this.interSetting = !this.interSetting
  16756. if(this.interSetting){
  16757. if(this.istemplate == 1){
  16758. this.agentid = this.aiJson.agentid
  16759. }else {
  16760. this.agentid = this.aiJson.sagentid
  16761. }
  16762. }else {
  16763. this.agentid = ''
  16764. }
  16765. },
  16766. setAgentid(){
  16767. if(!this.agentid.trim()){
  16768. this.$message.error('请输入工作流链接')
  16769. return;
  16770. }
  16771. if(this.istemplate == 1){
  16772. this.aiJson.agentid = this.agentid.trim()
  16773. }else {
  16774. this.aiJson.sagentid = this.agentid.trim()
  16775. }
  16776. this.interFlash = false
  16777. setTimeout(() => {
  16778. this.interFlash = true
  16779. }, 100);
  16780. this.interSetting = false
  16781. },
  16782. rebuildAgentid(){
  16783. this.aiJson.sagentid = ''
  16784. this.interFlash = false
  16785. setTimeout(() => {
  16786. this.interFlash = true
  16787. }, 100);
  16788. this.interSetting = false
  16789. },
  16790. cancelInterSetting(){
  16791. this.agentid = ''
  16792. this.interSetting = false
  16793. },
  16794. openAiDialog2(clickType, type, callback, index, tindex){
  16795. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  16796. confirmButtonText: "确定",
  16797. cancelButtonText: "取消",
  16798. type: "warning",
  16799. })
  16800. .then(() => {
  16801. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  16802. // this.openAiDialog(clickType, 'aiTeacher')
  16803. // }else {
  16804. this.openAiDialog(clickType, type, callback, index, tindex)
  16805. // }
  16806. })
  16807. .catch(() => {
  16808. });
  16809. },
  16810. openAiDialog(clickType, type, callback, index, tindex) {
  16811. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  16812. this.$message.error("您没有权限修改/查看提示词");
  16813. return;
  16814. }
  16815. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  16816. this.$message.error("请上传教案");
  16817. return;
  16818. }
  16819. if (this.courseName == "") {
  16820. this.$message.error("请补充填写课程名称");
  16821. return;
  16822. }
  16823. this.aiText2 = ''
  16824. this.clickType = clickType
  16825. let sub = []
  16826. if (this.courseTypeId.length) {
  16827. for (var i = 0; i < this.courseTypeId.length; i++) {
  16828. let _sid = this.courseTypeId[i]
  16829. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16830. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16831. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16832. }
  16833. }
  16834. }
  16835. }
  16836. let mclass = []
  16837. if (this.courseTypeId.length) {
  16838. for (var i = 0; i < this.courseTypeId.length; i++) {
  16839. let _sid = this.courseTypeId[i]
  16840. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16841. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16842. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16843. }
  16844. }
  16845. }
  16846. }
  16847. if (type == "aiDetail") {
  16848. if (this.ttextLoading) {
  16849. this.$message({
  16850. message: "请回答完毕后再次发送",
  16851. type: "warning"
  16852. });
  16853. return;
  16854. }
  16855. this.aitype = "aiDetail"
  16856. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  16857. this.aiText = this.aiJson.aiDetail
  16858. this.aiCallBack = [callback, index]
  16859. } else if (type == "aiOutline") {
  16860. this.aitype = "aiOutline"
  16861. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16862. this.aiText = this.aiJson.aiOutline
  16863. } else if (type == "aiOutline2") {
  16864. this.aitype = "aiOutline2"
  16865. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16866. this.aiText = this.aiJson.aiOutlineTask
  16867. this.aiText2 = this.aiJson.aiOutlineDetail
  16868. } else if (type == "aiOutlineDetail2") {
  16869. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  16870. this.$message({
  16871. message: "请回答完毕后再次发送",
  16872. type: "warning"
  16873. });
  16874. return;
  16875. }
  16876. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  16877. this.$message.error('请输入任务名称')
  16878. return;
  16879. }
  16880. this.aitype = type
  16881. this.aiCallBack = callback
  16882. this.aiText = this.aiJson.aiOutlineDetail2
  16883. } else if (type == "aiTask") {
  16884. this.aitype = "aiTask"
  16885. var _text = ""
  16886. for (var i = 0; i < this.teacherText.length; i++) {
  16887. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  16888. }
  16889. // this.aiText = `请根据${_text}。`
  16890. this.aiText = this.aiJson.aiTask
  16891. this.aiCallBack = callback
  16892. } else if (type == "aiTask2") {
  16893. if (this.taskLoading[callback]) {
  16894. this.$message({
  16895. message: "请回答完毕后再次发送",
  16896. type: "warning"
  16897. });
  16898. return;
  16899. }
  16900. this.aitype = "aiTask2"
  16901. this.aiText = this.aiJson.aiTask
  16902. this.aiCallBack = [callback, index]
  16903. } else if (type == "aiTask3") {
  16904. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  16905. this.$message({
  16906. message: "请回答完毕后再次发送",
  16907. type: "warning"
  16908. });
  16909. return;
  16910. }
  16911. this.aitype = type
  16912. this.aiText = this.aiJson.aiTaskG1
  16913. this.aiText2 = this.aiJson.aiTaskG2
  16914. this.aiText3 = this.aiJson.aiTaskG3
  16915. this.aiCallBack = [callback, index]
  16916. } else if (type == "aiTaskG3") {
  16917. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][2])) {
  16918. this.$message({
  16919. message: "请回答完毕后再次发送",
  16920. type: "warning"
  16921. });
  16922. return;
  16923. }
  16924. this.aitype = type
  16925. this.aiText = this.aiJson.aiTaskG3
  16926. this.aiCallBack = callback
  16927. } else if (type == "aiDetail1") {
  16928. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  16929. this.$message({
  16930. message: "请回答完毕后再次发送",
  16931. type: "warning"
  16932. });
  16933. return;
  16934. }
  16935. this.aitype = "aiDetail1"
  16936. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  16937. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  16938. this.aiText = this.aiJson.aiDetail1
  16939. this.aiCallBack = callback
  16940. this.aiIndex = index
  16941. } else if (type == "aiDetail2") {
  16942. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  16943. this.$message({
  16944. message: "请回答完毕后再次发送",
  16945. type: "warning"
  16946. });
  16947. return;
  16948. }
  16949. this.aitype = "aiDetail2"
  16950. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  16951. this.aiText = this.aiJson.aiDetail2
  16952. this.aiCallBack = callback
  16953. this.aiIndex = index
  16954. } else if (type == "aiDetail3") {
  16955. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  16956. this.$message({
  16957. message: "请回答完毕后再次发送",
  16958. type: "warning"
  16959. });
  16960. return;
  16961. }
  16962. this.aitype = "aiDetail3"
  16963. this.aiText = this.aiJson.aiDetail3
  16964. this.aiIndex = index + '-' + tindex
  16965. } else if (type == "aiDetail4") {
  16966. var _text = ""
  16967. if(callback && callback.length){
  16968. for (var i = 0; i < callback.length; i++) {
  16969. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  16970. }
  16971. }
  16972. this.aitype = "aiDetail4"
  16973. this.aiText = this.aiJson.aiDetail4
  16974. this.aiIndex = index
  16975. } else if (type == "aiTeacher") {
  16976. this.aitype = "aiTeacher"
  16977. var _text = ""
  16978. for (var i = 0; i < this.dArray.length; i++) {
  16979. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  16980. }
  16981. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16982. this.aiText = this.aiJson.aiTeacher
  16983. this.aiCallBack = callback
  16984. } else if (type == "aiTeacher2") {
  16985. if(this.ttaskDetailLoading5.length){
  16986. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  16987. this.$message({
  16988. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  16989. type: "warning"
  16990. });
  16991. return
  16992. }
  16993. this.aitype = "aiTeacher2"
  16994. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16995. } else if (type == "aiTeacher3") {
  16996. this.aitype = type
  16997. this.aiText = this.aiJson.aiCpoteTask
  16998. this.aiText2 = this.aiJson.teacherDetail2
  16999. } else if (type == "teacherDetail") {
  17000. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  17001. this.$message({
  17002. message: "请回答完毕后再次发送",
  17003. type: "warning"
  17004. });
  17005. return;
  17006. }
  17007. this.aitype = "teacherDetail"
  17008. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17009. this.aiText = this.aiJson.teacherDetail
  17010. this.aiCallBack = callback
  17011. this.aiIndex = index
  17012. } else if (type == "teacherDetail2") {
  17013. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  17014. this.$message.error('请输入任务名称')
  17015. return;
  17016. }
  17017. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  17018. // this.$message({
  17019. // message: "请回答完毕后再次发送",
  17020. // type: "warning"
  17021. // });
  17022. // return;
  17023. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  17024. confirmButtonText: "确定重新生成",
  17025. cancelButtonText: "取消",
  17026. distinguishCancelAndClose: true,
  17027. type: "warning",
  17028. customClass: 'custom-confirm-box'
  17029. })
  17030. .then(() => {
  17031. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  17032. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  17033. this.isTeacherTaskCancelToken2[index] = null;
  17034. }
  17035. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  17036. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  17037. if(this.isTeacherTaskCancelSource[index]){
  17038. this.isTeacherTaskCancelSource[index].close()
  17039. this.isTeacherTaskCancelSource[index] = null
  17040. }
  17041. this.aitype = "teacherDetail2"
  17042. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17043. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  17044. this.aiCallBack = callback
  17045. this.aiIndex = index
  17046. this.dialogVisibleAiD = true
  17047. }).catch((v) => {
  17048. console.log(v);
  17049. })
  17050. setTimeout(() => {
  17051. this.setTipsIndex()
  17052. }, 500)
  17053. return;
  17054. }else {
  17055. this.aitype = "teacherDetail2"
  17056. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17057. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  17058. this.aiCallBack = callback
  17059. this.aiIndex = index
  17060. this.dialogVisibleAiD = true
  17061. }
  17062. } else if (type == "aiCpote1") {
  17063. if (this.cpotetLoading.cpote1) {
  17064. this.$message({
  17065. message: "请回答完毕后再次发送",
  17066. type: "warning"
  17067. });
  17068. return;
  17069. }
  17070. this.aitype = "aiCpote1"
  17071. this.aiText = this.aiJson.cpote1
  17072. this.aiCallBack = callback
  17073. } else if (type == "aiCpote2") {
  17074. if (this.cpotetLoading.cpote2) {
  17075. this.$message({
  17076. message: "请回答完毕后再次发送",
  17077. type: "warning"
  17078. });
  17079. return;
  17080. }
  17081. this.aitype = "aiCpote2"
  17082. this.aiText = this.aiJson.cpote2
  17083. this.aiCallBack = callback
  17084. } else if (type == "aiCpote3") {
  17085. if (this.cpotetLoading.cpote3) {
  17086. this.$message({
  17087. message: "请回答完毕后再次发送",
  17088. type: "warning"
  17089. });
  17090. return;
  17091. }
  17092. this.aitype = "aiCpote3"
  17093. this.aiText = this.aiJson.cpote3
  17094. this.aiCallBack = callback
  17095. } else if (type == "aiCpote4") {
  17096. if (this.cpotetLoading.cpote4) {
  17097. this.$message({
  17098. message: "请回答完毕后再次发送",
  17099. type: "warning"
  17100. });
  17101. return;
  17102. }
  17103. this.aitype = "aiCpote4"
  17104. this.aiText = this.aiJson.cpote4
  17105. this.aiCallBack = callback
  17106. } else if (type == 'aiteacherTextDetail'){
  17107. if (this.tteacherTextLoading) {
  17108. this.$message({
  17109. message: "请回答完毕后再次发送",
  17110. type: "warning"
  17111. });
  17112. return;
  17113. }
  17114. this.aitype = type
  17115. this.aiText = this.aiJson.aiAbstract
  17116. this.aiCallBack = callback
  17117. } else if (type == 'aitargetTextDetail'){
  17118. if (this.ttargetTextLoading) {
  17119. this.$message({
  17120. message: "请回答完毕后再次发送",
  17121. type: "warning"
  17122. });
  17123. return;
  17124. }
  17125. this.aitype = type
  17126. this.aiText = this.aiJson.aiTarget
  17127. this.aiCallBack = callback
  17128. } else if (type == 'aitargetTextDetail2'){
  17129. if (this.ttargetTextLoading2) {
  17130. this.$message({
  17131. message: "请回答完毕后再次发送",
  17132. type: "warning"
  17133. });
  17134. return;
  17135. }
  17136. this.aitype = type
  17137. this.aiText = this.aiJson.aiTarget2
  17138. this.aiCallBack = callback
  17139. } else if (type == 'aitargetTextDetail3'){
  17140. if (this.ttargetTextLoading2) {
  17141. this.$message({
  17142. message: "请回答完毕后再次发送",
  17143. type: "warning"
  17144. });
  17145. return;
  17146. }
  17147. if(!this.courseText){
  17148. this.$message.error("请生成简要描述后再生成目标");
  17149. return;
  17150. }
  17151. this.aitype = type
  17152. this.aiText = this.aiJson.aiTargetGet
  17153. this.aiText2 = this.aiJson.aiTarget2
  17154. this. aiCallBack= callback
  17155. } else if (type == 'aiSearchFile'){
  17156. if(this.fileSLoading) {
  17157. this.$message({
  17158. message: "请回答完毕后再次发送",
  17159. type: "warning"
  17160. });
  17161. return;
  17162. }
  17163. this.aitype = type
  17164. this.aiText = this.aiJson.aiSearchFile
  17165. } else if (type == 'aiSearchFile2'){
  17166. if(this.fileSLoading) {
  17167. this.$message({
  17168. message: "请回答完毕后再次发送",
  17169. type: "warning"
  17170. });
  17171. return;
  17172. }
  17173. this.aitype = type
  17174. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  17175. #输出样例
  17176. <学科1>:关键词
  17177. - 匹配到的内容1
  17178. - 匹配到的内容2
  17179. - 匹配到的内容3
  17180. - 匹配到的内容4
  17181. - 匹配到的内容5
  17182. <学科2>:关键词
  17183. - 匹配到的内容1
  17184. - 匹配到的内容2
  17185. - 匹配到的内容3
  17186. - 匹配到的内容4
  17187. - 匹配到的内容5
  17188. ...
  17189. <学科n>:关键词
  17190. - 匹配到的内容1
  17191. - 匹配到的内容2
  17192. - 匹配到的内容3
  17193. - 匹配到的内容4
  17194. - 匹配到的内容5
  17195. `
  17196. } else if (type == 'aiRateRule'){
  17197. this.aitype = type
  17198. this.aiText = this.aiJson.aiRateRule
  17199. this.aiCallBack = [callback, index]
  17200. } else if (type == 'aiRateRuleA'){
  17201. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  17202. confirmButtonText: "生成所有",
  17203. cancelButtonText: "仅生成该任务",
  17204. distinguishCancelAndClose: true,
  17205. type: "warning",
  17206. })
  17207. .then(() => {
  17208. this.aitype = type
  17209. this.aiText = this.aiJson.aiRateRule
  17210. this.aiCallBack = [1,callback]
  17211. this.dialogVisibleAiD = true
  17212. }).catch((v) => {
  17213. console.log(v);
  17214. if (v == "cancel") {
  17215. this.aitype = type
  17216. this.aiText = this.aiJson.aiRateRule
  17217. this.aiCallBack = [2,callback]
  17218. this.dialogVisibleAiD = true
  17219. }
  17220. })
  17221. }
  17222. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  17223. this.dialogVisibleAiD = true
  17224. }
  17225. },
  17226. async aiConfirm(msg,msg2,msg3) {
  17227. let sub = []
  17228. if (this.courseTypeId.length) {
  17229. for (var i = 0; i < this.courseTypeId.length; i++) {
  17230. let _sid = this.courseTypeId[i]
  17231. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17232. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17233. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17234. }
  17235. }
  17236. }
  17237. }
  17238. let mclass = []
  17239. if (this.courseTypeId.length) {
  17240. for (var i = 0; i < this.courseTypeId.length; i++) {
  17241. let _sid = this.courseTypeId[i]
  17242. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17243. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17244. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17245. }
  17246. }
  17247. }
  17248. }
  17249. let url = []
  17250. if (this.infoData.length) {
  17251. for (var i = 0; i < this.infoData.length; i++) {
  17252. url.push(this.infoData[i].url)
  17253. }
  17254. }
  17255. if (this.aitype == "aiDetail") {
  17256. this.detailYou(msg)
  17257. } else if (this.aitype == "aiOutline") {
  17258. this.loading = true
  17259. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  17260. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  17261. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  17262. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  17263. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  17264. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  17265. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  17266. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  17267. if(this.languageSetting == 2){
  17268. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  17269. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  17270. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  17271. }
  17272. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  17273. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17274. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  17275. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  17276. let message = `NOTICE
  17277. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17278. Output: Provide your output in json format.
  17279. Language: ${this.getLang()}
  17280. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17281. Instruction: Based on the context, follow "Format example", write content.
  17282. # Context
  17283. ## 要求
  17284. ${msg} 以及##参考资料
  17285. ## 参考资料
  17286. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17287. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17288. detail至少输出300tokens,markdown格式输出。
  17289. detail包含子教学目标、过程性成果、子评价标准
  17290. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  17291. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  17292. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  17293. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  17294. # Format example`
  17295. message = message.replaceAll('\n', ' ')
  17296. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  17297. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  17298. // detail输出不要输出成json,文本或者markdown都可以
  17299. this.aiGet2(message, () => {
  17300. this.loading = false
  17301. this.isOutline = true
  17302. })
  17303. } else if (this.aitype == "aiOutline2") {
  17304. this.loading = true
  17305. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17306. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  17307. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  17308. let message = `NOTICE
  17309. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17310. Language: ${this.getLang()}
  17311. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17312. Instruction: Based on the context, follow "Format example", write content.
  17313. # Context
  17314. ## 要求
  17315. ${msg} 以及##参考资料
  17316. ## 参考资料
  17317. 课程名字:${this.courseName}
  17318. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  17319. ${sub.length ? '学科:' + sub.join(",") : ''}
  17320. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17321. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17322. # Format example
  17323. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  17324. this.aiGetTask2(message, () => {
  17325. this.loading = false
  17326. this.isOutline = true
  17327. })
  17328. } else if (this.aitype == "aiOutlineDetail2") {
  17329. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  17330. } else if (this.aitype == "aiTask") {
  17331. var _text = ""
  17332. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17333. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  17334. }
  17335. let message = `NOTICE
  17336. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  17337. Language: ${this.getLang()}
  17338. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17339. Instruction: Based on the context, follow "Format example", write content.
  17340. # Context
  17341. ## 要求
  17342. ${msg} 为**每个教学任务分别输出**以下内容。
  17343.  
  17344. ${(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','') : ''}
  17345. ## 参考资料
  17346. 教学任务教案:${_text}
  17347. ## 格式要求
  17348. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  17349. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  17350. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  17351. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  17352. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  17353. 出现选择题和问答题的概率提高
  17354. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  17355.  
  17356. # Format example
  17357. [{"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":"工具描述"}]}]`
  17358. this.loading = true
  17359. this.aiGet3(message, this.aiCallBack)
  17360. } else if (this.aitype == "aiTask2") {
  17361. if(this.aiCallBack[0] == 'all'){
  17362. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  17363. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  17364. let message = `NOTICE
  17365. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  17366. Language: ${this.getLang()}
  17367. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17368. Instruction: Based on the context, follow "Format example", write content.
  17369. # Context
  17370. ## 要求
  17371. ${msg} 为教学任务分别输出以下内容。
  17372.  
  17373. ${(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','') : ''}
  17374. ## 参考资料
  17375. 教学任务教案:${_text}
  17376. ## 格式要求
  17377. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  17378. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  17379. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  17380. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  17381. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  17382.  
  17383. # Format example
  17384. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17385. this.taskLoading[_task] = true
  17386. this.aiGet32(message, _task)
  17387. }
  17388. }else{
  17389. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  17390. let message = `NOTICE
  17391. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  17392. Language: ${this.getLang()}
  17393. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17394. Instruction: Based on the context, follow "Format example", write content.
  17395. # Context
  17396. ## 要求
  17397. ${msg} 为教学任务分别输出以下内容。
  17398.  
  17399. ${(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','') : ''}
  17400. ## 参考资料
  17401. 教学任务教案:${_text}
  17402. ## 格式要求
  17403. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  17404. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  17405. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  17406. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  17407. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  17408.  
  17409. # Format example
  17410. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17411. this.taskLoading[this.aiCallBack[0]] = true
  17412. this.aiGet32(message, this.aiCallBack[0])
  17413. }
  17414. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17415. } else if (this.aitype == "aiTask3") {
  17416. if(this.aiCallBack[0] == 'all'){
  17417. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  17418. if(!this.taskGLoading[_task]){
  17419. this.taskGLoading[_task] = []
  17420. }
  17421. this.taskGLoading[_task][0] = true
  17422. this.taskGLoading[_task][1] = true
  17423. // this.taskGLoading[_task][2] = true
  17424. // this.aiGetG323(message3, _task)
  17425. }
  17426. let ij = 0;
  17427. let _this = this
  17428. function processNext() {
  17429. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  17430. if(!_this.taskGLoading[ij][0]){
  17431. ij++;
  17432. processNext();
  17433. return;
  17434. }
  17435. let message1 = `NOTICE
  17436. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17437. Language: ${_this.getLang()}
  17438. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17439. Instruction: Based on the context, follow "Format example", write content.
  17440. # Context
  17441. ## 要求
  17442. ${msg}
  17443.  
  17444. ## 参考资料
  17445. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17446. # 输出格式与要求
  17447. 任务描述(告诉学生他们需要做什么):
  17448. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  17449. # 范例
  17450. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  17451. # Format example
  17452. { "detail":"任务描述" }`
  17453. let message2 = `NOTICE
  17454. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17455. Language: ${_this.getLang()}
  17456. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17457. Instruction: Based on the context, follow "Format example", write content.
  17458. # Context
  17459. ## 要求
  17460. ${msg2}
  17461.  
  17462. ## 参考资料
  17463. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17464. # 输出格式与要求
  17465. 互动工具列表
  17466. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  17467. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  17468. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  17469. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  17470. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  17471. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  17472. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  17473. # Format example
  17474. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17475. let message3 = `NOTICE
  17476. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17477. Language: ${_this.getLang()}
  17478. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17479. Instruction: Based on the context, follow "Format example", write content.
  17480. # Context
  17481. ## 要求
  17482. ${msg3}
  17483.  
  17484. ## 参考资料
  17485. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17486. # 输出格式与要求
  17487. 核心素养:从教案中提取
  17488. 目标:从教案中提取
  17489. 评价标准:从教案中提取评价标准
  17490. # Format example
  17491. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17492. _this.aiGetG321(message1, ij, (callback2) => {
  17493. _this.aiGetG322(message2, ij, callback2);
  17494. }, () => {
  17495. // 回调函数,当前任务完成后执行
  17496. ij++;
  17497. processNext(); // 处理下一个任务
  17498. });
  17499. }
  17500. }
  17501. processNext(); // 启动处理
  17502. }else{
  17503. let message1 = `NOTICE
  17504. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17505. Language: ${this.getLang()}
  17506. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17507. Instruction: Based on the context, follow "Format example", write content.
  17508. # Context
  17509. ## 要求
  17510. ${msg}
  17511.  
  17512. ## 参考资料
  17513. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17514. # 输出格式与要求
  17515. 任务描述(告诉学生他们需要做什么):
  17516. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  17517. # 范例
  17518. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  17519. # Format example
  17520. { "detail":"任务描述" }`
  17521. let message2 = `NOTICE
  17522. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17523. Language: ${this.getLang()}
  17524. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17525. Instruction: Based on the context, follow "Format example", write content.
  17526. # Context
  17527. ## 要求
  17528. ${msg2}
  17529.  
  17530. ## 参考资料
  17531. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17532. # 输出格式与要求
  17533. 互动工具列表
  17534. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  17535. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  17536. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  17537. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  17538. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  17539. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  17540. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  17541. # Format example
  17542. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17543. let message3 = `NOTICE
  17544. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17545. Language: ${this.getLang()}
  17546. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17547. Instruction: Based on the context, follow "Format example", write content.
  17548. # Context
  17549. ## 要求
  17550. ${msg3}
  17551.  
  17552. ## 参考资料
  17553. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17554. # 输出格式与要求
  17555. 核心素养:从教案中提取
  17556. 目标:从教案中提取
  17557. 评价标准:从教案中提取评价标准
  17558. # Format example
  17559. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17560. if(!this.taskGLoading[this.aiCallBack[0]]){
  17561. this.taskGLoading[this.aiCallBack[0]] = []
  17562. }
  17563. this.taskGLoading[this.aiCallBack[0]][0] = true
  17564. this.taskGLoading[this.aiCallBack[0]][1] = true
  17565. // this.taskGLoading[this.aiCallBack[0]][2] = true
  17566. this.aiGetG321(message1, this.aiCallBack[0], () => {
  17567. this.aiGetG322(message2, this.aiCallBack[0])
  17568. })
  17569. // this.aiGetG323(message3, this.aiCallBack[0])
  17570. }
  17571. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17572. } else if (this.aitype == "aiTaskG3") {
  17573. let message3 = `NOTICE
  17574. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17575. Language: ${this.getLang()}
  17576. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17577. Instruction: Based on the context, follow "Format example", write content.
  17578. # Context
  17579. ## 要求
  17580. ${msg3}
  17581.  
  17582. ## 参考资料
  17583. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17584. # 输出格式与要求
  17585. 核心素养:从教案中提取
  17586. 目标:从教案中提取
  17587. 评价标准:从教案中提取评价标准
  17588. # Format example
  17589. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17590. if(!this.taskGLoading[this.aiCallBack]){
  17591. this.taskGLoading[this.aiCallBack] = []
  17592. }
  17593. this.taskGLoading[this.aiCallBack][2] = true
  17594. this.aiGetG323(message3, this.aiCallBack)
  17595. } else if (this.aitype == "aiDetail1") {
  17596. this.aiDetail(msg, this.aiIndex)
  17597. } else if (this.aitype == "aiDetail2") {
  17598. this.aiDetail2(msg, this.aiIndex)
  17599. } else if (this.aitype == "aiDetail3") {
  17600. let _index = this.aiIndex.split('-')
  17601. this.aiDetail3(msg, _index[0], _index[1])
  17602. } else if (this.aitype == "aiDetail4") {
  17603. this.aiDetail4(msg, this.aiIndex)
  17604. } else if (this.aitype == "teacherDetail") {
  17605. this.aiDetail5(msg, this.aiIndex)
  17606. } else if (this.aitype == "teacherDetail2") {
  17607. this.aiDetail52(msg, this.aiIndex)
  17608. } else if (this.aitype == "aiCpote1") {
  17609. this.aiCpote(msg, this.aiCallBack)
  17610. } else if (this.aitype == "aiCpote2") {
  17611. this.aiCpote(msg, this.aiCallBack)
  17612. } else if (this.aitype == "aiCpote3") {
  17613. this.aiCpote(msg, this.aiCallBack)
  17614. } else if (this.aitype == "aiCpote4") {
  17615. this.aiCpote(msg, this.aiCallBack)
  17616. } else if (this.aitype == "aiTeacher") {
  17617. this.loading = true
  17618. var _text = ""
  17619. for (var i = 0; i < this.dArray.length; i++) {
  17620. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  17621. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  17622. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17623. let message = ` NOTICE
  17624. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17625. Language: ${this.getLang()}
  17626. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17627. Instruction: Based on the context, follow "Format example", write content.
  17628. # Context
  17629. ## 要求
  17630. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  17631. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  17632. ${(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','') : ''}
  17633. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17634. ## Format example
  17635. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  17636. this.aiGet4(message, () => {
  17637. this.loading = false
  17638. this.isOutline2 = true
  17639. })
  17640. } else if (this.aitype == "aiTeacher2"){
  17641. this.isOutline2 = true
  17642. let _this = this
  17643. setTimeout(()=>{
  17644. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17645. const _tindex = 'task-' + i;
  17646. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  17647. _this.taskDetailLoading5.push(_tindex)
  17648. }
  17649. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  17650. _this.ttaskDetailLoading5.push(_tindex)
  17651. }
  17652. // this.aiDetail52(msg, i)
  17653. }
  17654. let ij = 0;
  17655. function processNext() {
  17656. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  17657. const _tindex = 'task-' + ij;
  17658. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  17659. ij++;
  17660. processNext();
  17661. return;
  17662. }
  17663. // 处理当前任务
  17664. _this.aiDetail52(msg, ij, function () {
  17665. // 回调函数,当前任务完成后执行
  17666. ij++;
  17667. processNext(); // 处理下一个任务
  17668. });
  17669. }
  17670. }
  17671. processNext(); // 启动处理
  17672. }, 0)
  17673. } else if (this.aitype == "aiTeacher3"){
  17674. this.loading = true
  17675. let message = `NOTICE
  17676. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17677. Language: ${this.getLang()}
  17678. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17679. Instruction: Based on the context, follow "Format example", write content.
  17680. # Context
  17681. ## 要求
  17682. ${msg} 以及##参考资料
  17683. ## 参考资料
  17684. 任务簇:${this.cpote.cpote4}
  17685. # Format example
  17686. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  17687. this.aiGetTask3(message, () => {
  17688. this.loading = false
  17689. this.isOutline2 = true
  17690. })
  17691. } else if (this.aitype == "aiteacherTextDetail") {
  17692. this.aiteacherTextDetail(msg)
  17693. } else if (this.aitype == "aitargetTextDetail") {
  17694. this.aitargetTextDetail(msg)
  17695. } else if (this.aitype == "aitargetTextDetail2") {
  17696. this.aitargetTextDetail2(msg)
  17697. } else if (this.aitype == "aitargetTextDetail3") {
  17698. this.aitargetTextDetail3(msg)
  17699. } else if (this.aitype == 'aiSearchFile'){
  17700. let messages = `NOTICE
  17701. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17702. Language: ${this.getLang()}
  17703. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17704. Instruction: Based on the context, follow "Format example", write content.
  17705. ## 参考资料
  17706. 关键词:${this.courseName}
  17707. # Context
  17708. ## 要求
  17709. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  17710. # Format example
  17711. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  17712. this.fileSLoading = true
  17713. this.aiSearchFile(messages,()=>{
  17714. this.fileSLoading = false
  17715. })
  17716. } else if (this.aitype == 'aiSearchFile2'){
  17717. let messages = `${msg}
  17718. 课程名字:${this.courseName}
  17719. ${sub.length ? '学科:' + sub.join(",") : ''}
  17720. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  17721. this.fileSLoading = true
  17722. this.aiSearchFile2(messages,()=>{
  17723. this.fileSLoading = false
  17724. })
  17725. } else if (this.aitype == 'aiRateRule'){
  17726. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  17727. } else if (this.aitype == 'aiRateRuleA'){
  17728. if(this.aiCallBack[0] == 1){
  17729. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17730. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17731. for(var k = 0; k < task.eList.length; k++){
  17732. if(!task.eList[k].rule){
  17733. this.againEva(msg, i, k)
  17734. }
  17735. }
  17736. }
  17737. }else if(this.aiCallBack[0] == 2){
  17738. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  17739. for(var k = 0; k < task.eList.length; k++){
  17740. if(!task.eList[k].rule){
  17741. this.againEva(msg, this.aiCallBack[1], k)
  17742. }
  17743. }
  17744. }
  17745. }
  17746. this.setAiJson(this.aitype, msg, msg2, msg3)
  17747. },
  17748. getLang(){
  17749. let lang = ''
  17750. if(this.languageSetting == 0){
  17751. lang = 'Chinese.'
  17752. }else if(this.languageSetting == 1){
  17753. lang = 'Traditional Chinese.'
  17754. }else if(this.languageSetting == 2){
  17755. lang = 'English.'
  17756. }
  17757. return lang
  17758. },
  17759. detailYou(message) {
  17760. this.textLoading = true
  17761. this.ttextLoading = true
  17762. let sub = []
  17763. if (this.courseTypeId.length) {
  17764. for (var i = 0; i < this.courseTypeId.length; i++) {
  17765. let _sid = this.courseTypeId[i]
  17766. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17767. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17768. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17769. }
  17770. }
  17771. }
  17772. }
  17773. let mclass = []
  17774. if (this.courseTypeId.length) {
  17775. for (var i = 0; i < this.courseTypeId.length; i++) {
  17776. let _sid = this.courseTypeId[i]
  17777. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17778. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17779. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17780. }
  17781. }
  17782. }
  17783. }
  17784. let url = []
  17785. if (this.infoData.length) {
  17786. for (var i = 0; i < this.infoData.length; i++) {
  17787. url.push(this.infoData[i].url)
  17788. }
  17789. }
  17790. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  17791. // --------
  17792. // ## 补充参考资料
  17793. // 补充资料:${url.join(",")}
  17794. // 补充描述:${this.courseText2} ##补充参考资料和
  17795. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17796. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  17797. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  17798. let msg = `NOTICE
  17799. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  17800. Language: ${this.getLang()}
  17801. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17802. Instruction: Based on the context, follow "Format example", write content.
  17803. #Context
  17804. ## 参考资料
  17805. 课程名字:${this.courseName}
  17806. ${sub.length ? '学科:' + sub.join(",") : ''}
  17807. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17808. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  17809. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  17810. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  17811. ## 要求
  17812. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  17813. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  17814. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  17815. this.aiGet(msg)
  17816. },
  17817. setUnitJson() {
  17818. 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 }] }
  17819. this.$forceUpdate()
  17820. },
  17821. async aiGet(messages) {
  17822. let _this = this
  17823. let fileid = []
  17824. if(!this.yiKeTemplateArray.includes(this.templateid)){
  17825. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  17826. if(_this.cankaoInfoData[i].fileid){
  17827. fileid.push(_this.cankaoInfoData[i].fileid)
  17828. }else {
  17829. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  17830. if(_fileid){
  17831. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  17832. _this.$forceUpdate();
  17833. if(_fileid != 1){
  17834. fileid.push(_fileid)
  17835. }
  17836. }
  17837. }
  17838. }
  17839. if(this.mode == 1){
  17840. for (var i = 0; i < _this.infoData.length; i++) {
  17841. if(_this.infoData[i].fileid){
  17842. fileid.push(_this.infoData[i].fileid)
  17843. }else {
  17844. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17845. if(_fileid){
  17846. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17847. _this.$forceUpdate();
  17848. if(_fileid != 1){
  17849. fileid.push(_fileid)
  17850. }
  17851. }
  17852. }
  17853. }
  17854. }
  17855. } else {
  17856. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17857. fileid = [...fileid]
  17858. if (_this.infoData.length) {
  17859. for (var i = 0; i < _this.infoData.length; i++) {
  17860. if(_this.infoData[i].fileid){
  17861. fileid.push(_this.infoData[i].fileid)
  17862. }else {
  17863. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17864. if(_fileid){
  17865. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17866. _this.$forceUpdate();
  17867. if(_fileid != 1){
  17868. fileid.push(_fileid)
  17869. }
  17870. }
  17871. }
  17872. }
  17873. }
  17874. }
  17875. _this.isTextCancelToken = _this.ajax.setCancelSource();
  17876. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  17877. let _uuid = uuidv4();
  17878. // let params = JSON.stringify({
  17879. // // "model": "Chat",
  17880. // model: 'gpt-3.5-turbo',
  17881. // temperature: this.mode == 3 ? 0.5 : 0.1,
  17882. // max_tokens: 4096,
  17883. // top_p: 1,
  17884. // frequency_penalty: 0,
  17885. // presence_penalty: 0,
  17886. // messages: [{
  17887. // content: messages,
  17888. // role: 'user'
  17889. // }],
  17890. // uid: _uuid,
  17891. // mind_map_question: "",
  17892. // })
  17893. let params = {
  17894. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17895. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17896. session_name: _uuid,
  17897. userId: _this.userid,
  17898. uid: _uuid,
  17899. file_ids: fileid.length ? [...fileid] : '',
  17900. model: 'gpt-4o-2024-08-06',
  17901. temperature: this.mode == 3 ? 0.5 : 0.1,
  17902. }
  17903. // let params = JSON.stringify({
  17904. // message: {
  17905. // anthropic_version: "bedrock-2023-05-31",
  17906. // max_tokens: 4096,
  17907. // temperature: this.mode == 3 ? 0.5 : 0.1,
  17908. // top_p: 1,
  17909. // messages: [{
  17910. // "role": "user",
  17911. // "content": messages
  17912. // }] ,
  17913. // },
  17914. // uid: _uuid,
  17915. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17916. // });
  17917. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17918. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  17919. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17920. console.log(response);
  17921. // let data = response.data.FunctionResponse
  17922. // if (data.choices && data.choices.length && data.choices[0].message) {
  17923. // _this.courseText = data.choices[0].message.content
  17924. // }
  17925. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17926. } else {
  17927. _this.$message.warning(response.data.FunctionResponse.result);
  17928. }
  17929. _this.isTextCancelToken = null
  17930. }).catch(function (error) {
  17931. _this.textLoading = false
  17932. _this.ttextLoading = false
  17933. _this.isTextCancelToken = null
  17934. if(error && error.message != 'Request canceled by the user.'){
  17935. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17936. }
  17937. console.log(error);
  17938. });
  17939. await _this.aiGetgetAiContent(_uuid)
  17940. },
  17941. aiGetgetAiContent(_uid) {
  17942. try {
  17943. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17944. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17945. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17946. } catch(error){
  17947. console.log('EventSource error:', error);
  17948. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17949. this.textLoading = false
  17950. this.ttextLoading = false
  17951. this.isTextCancelToken = null
  17952. return;
  17953. }
  17954. let _allText = "";
  17955. let _mdText = "";
  17956. let _iindex = 0
  17957. this.isTextCancelSource.onmessage = _e => {
  17958. let _eData = JSON.parse(_e.data).content;
  17959. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17960. //对话已经完成
  17961. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  17962. this.isTextCancelSource.close();
  17963. this.isTextCancelSource = null;
  17964. this.courseText = _mdText;
  17965. this.textLoading = false
  17966. this.ttextLoading = false
  17967. this.courseTextB = false
  17968. this.isTextCancelToken = null
  17969. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17970. return;
  17971. } else {
  17972. _iindex++
  17973. //对话还在继续
  17974. let _text = "";
  17975. _text = _eData.replaceAll("'", "");
  17976. if (_allText == "") {
  17977. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17978. } else {
  17979. _allText += _text;
  17980. }
  17981. _mdText = _allText + "_";
  17982. _mdText = _mdText.replace(/\\n/g, "\n");
  17983. _mdText = _mdText.replace(/\\/g, "");
  17984. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17985. //转化返回的回复流数据
  17986. if(_iindex == 10){
  17987. this.courseText = _mdText;
  17988. _iindex = 0
  17989. }
  17990. this.textLoading = false
  17991. // 处理流数据
  17992. }
  17993. // this.$forceUpdate();
  17994. };
  17995. let _this = this
  17996. this.isTextCancelSource.onerror = function(event) {
  17997. // 处理错误,可以尝试重新连接
  17998. console.log('EventSource error:', event);
  17999. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  18000. _this.textLoading = false
  18001. _this.ttextLoading = false
  18002. _this.isTextCancelToken = null
  18003. _this.isTextCancelSource.close();
  18004. _this.isTextCancelSource = null;
  18005. };
  18006. },
  18007. numberToChinese(number) {
  18008. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  18009. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  18010. let result = '';
  18011. let num = parseInt(number, 10);
  18012. let i = 0;
  18013. while (num > 0) {
  18014. result = chineseNum[num % 10] + chineseUnit[i] + result;
  18015. num = Math.floor(num / 10);
  18016. i++;
  18017. }
  18018. // 去除连续的零,保留一个零
  18019. result = result.replace(/零+/g, '零');
  18020. return result;
  18021. },
  18022. async aiGet2(messages, callback) {
  18023. let _this = this
  18024. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18025. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  18026. if (_this.infoData.length) {
  18027. for (var i = 0; i < _this.infoData.length; i++) {
  18028. if(_this.infoData[i].fileid){
  18029. fileid.push(_this.infoData[i].fileid)
  18030. }else {
  18031. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18032. if(_fileid){
  18033. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18034. _this.$forceUpdate();
  18035. if(_fileid != 1){
  18036. fileid.push(_fileid)
  18037. }
  18038. }
  18039. }
  18040. }
  18041. }
  18042. console.log('fileid=========',fileid)
  18043. // let params = JSON.stringify({
  18044. // // "model": "Chat",
  18045. // model: 'gpt-3.5-turbo',
  18046. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18047. // max_tokens: 4096,
  18048. // top_p: 1,
  18049. // frequency_penalty: 0,
  18050. // presence_penalty: 0,
  18051. // messages: [{
  18052. // content: messages,
  18053. // role: 'user'
  18054. // }],
  18055. // stream: false,
  18056. // uid: this.userid,
  18057. // mind_map_question: "",
  18058. // })
  18059. // // let params = JSON.stringify({
  18060. // // message: {
  18061. // // anthropic_version: "bedrock-2023-05-31",
  18062. // // max_tokens: 4096,
  18063. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18064. // // top_p: 1,
  18065. // // messages: [{
  18066. // // content: messages,
  18067. // // role: 'user'
  18068. // // }], //
  18069. // // },
  18070. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18071. // // });
  18072. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18073. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18074. // console.log(response);
  18075. // let data = response.data.FunctionResponse
  18076. // if (data.choices && data.choices.length && data.choices[0].message) {
  18077. // console.log(data.choices[0].message.content);
  18078. // let dArray = JSON.parse(data.choices[0].message.content)
  18079. // _this.dArray = dArray
  18080. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18081. // for (var i = 0; i < dArray.length; i++) {
  18082. // let _task = dArray[i]
  18083. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18084. // task: _task.task,
  18085. // taskDetail: "",
  18086. // taskDetail2: _task.detail,
  18087. // taskDetail3: "",
  18088. // chapterData: [],
  18089. // toolText: "",
  18090. // toolChoose: [
  18091. // {
  18092. // tool: [],
  18093. // toolDetail: "",
  18094. // toolType: 0,
  18095. // askCount: 1,
  18096. // askTitle: "",
  18097. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18098. // },
  18099. // ],
  18100. // isShowTools: false,
  18101. // askCount: 1,
  18102. // isFold: 0,
  18103. // askTitle: "",
  18104. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18105. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18106. // homeworkList: [],
  18107. // })
  18108. // }
  18109. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18110. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18111. // _this.$forceUpdate();
  18112. // }
  18113. // // if (data.result) {
  18114. // // console.log(data.result);
  18115. // // let dArray = JSON.parse(data.result)
  18116. // // _this.dArray = dArray
  18117. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18118. // // for (var i = 0; i < dArray.length; i++) {
  18119. // // let _task = dArray[i]
  18120. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18121. // // task: _task.task,
  18122. // // taskDetail: "",
  18123. // // taskDetail2: _task.detail,
  18124. // // taskDetail3: "",
  18125. // // chapterData: [],
  18126. // // toolText: "",
  18127. // // toolChoose: [
  18128. // // {
  18129. // // tool: [],
  18130. // // toolDetail: "",
  18131. // // toolType: 0,
  18132. // // askCount: 1,
  18133. // // askTitle: "",
  18134. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18135. // // },
  18136. // // ],
  18137. // // isShowTools: false,
  18138. // // askCount: 1,
  18139. // // isFold: 1,
  18140. // // askTitle: "",
  18141. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18142. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18143. // // homeworkList: [],
  18144. // // })
  18145. // // }
  18146. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18147. // // _this.$forceUpdate();
  18148. // // }
  18149. // callback ? callback() : ''
  18150. // }).catch(function (error) {
  18151. // _this.loading = false
  18152. // console.log(error);
  18153. // });
  18154. this.isOutlineCancelToken = this.ajax.setCancelSource();
  18155. let parm = {
  18156. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  18157. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  18158. session_name: uuidv4(),
  18159. userId: this.userid,
  18160. file_ids: fileid.length ? [...fileid] : '',
  18161. model: 'gpt-4o-2024-08-06',
  18162. temperature: this.mode == 3 ? 0.5 : 0.1,
  18163. }
  18164. this.ajax
  18165. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  18166. .then((response) => {
  18167. console.log(response);
  18168. let data = response.data.FunctionResponse
  18169. if (data.message) {
  18170. console.log(data.message);
  18171. let dArray = {}
  18172. try {
  18173. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18174. } catch (error) {
  18175. console.log("error_________________" + error);
  18176. try {
  18177. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18178. let match = data.message.match(regex);
  18179. dArray = JSON.parse(match[0]);
  18180. // var message = data.message;
  18181. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18182. // var jsonEnd = message.indexOf("```", jsonStart);
  18183. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18184. // dArray = JSON.parse(jsonString);
  18185. } catch (error) {
  18186. try {
  18187. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18188. let match = data.message.match(regex);
  18189. // eval("var aaa = " + match[0])
  18190. if(match && match[0]){
  18191. dArray = JSON.parse(match[0].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  18192. }else {
  18193. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  18194. }
  18195. } catch (error) {
  18196. _this.$message.error('返回json格式不正确')
  18197. // _this.aiGet2(messages, callback);
  18198. console.log("error_________________" + error);
  18199. }
  18200. console.log("error_________________" + error);
  18201. }
  18202. }
  18203. _this.dArray = dArray
  18204. console.log(dArray)
  18205. if(_this.panOutline() > 0){
  18206. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18207. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18208. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  18209. }
  18210. for (var i = 0; i < dArray.length; i++) {
  18211. let _task = dArray[i]
  18212. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18213. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  18214. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  18215. }else {
  18216. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18217. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  18218. taskDetail: "",
  18219. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  18220. taskDetail3: "",
  18221. chapterData: [],
  18222. toolText: "",
  18223. toolChoose: [
  18224. {
  18225. tool: [],
  18226. toolDetail: "",
  18227. toolType: 0,
  18228. askCount: 1,
  18229. askTitle: "",
  18230. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18231. },
  18232. ],
  18233. isShowTools: false,
  18234. askCount: 1,
  18235. isFold: 0,
  18236. askTitle: "",
  18237. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18238. checkJson: [{ checkCount: [], checkPerent: [] }],
  18239. homeworkList: [],
  18240. })
  18241. }
  18242. }
  18243. }else {
  18244. _this.unitJson[0].chapterInfo[0].taskJson = []
  18245. for (var i = 0; i < dArray.length; i++) {
  18246. let _task = dArray[i]
  18247. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18248. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  18249. taskDetail: "",
  18250. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  18251. taskDetail3: "",
  18252. chapterData: [],
  18253. toolText: "",
  18254. toolChoose: [
  18255. {
  18256. tool: [],
  18257. toolDetail: "",
  18258. toolType: 0,
  18259. askCount: 1,
  18260. askTitle: "",
  18261. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18262. },
  18263. ],
  18264. isShowTools: false,
  18265. askCount: 1,
  18266. isFold: 0,
  18267. askTitle: "",
  18268. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18269. checkJson: [{ checkCount: [], checkPerent: [] }],
  18270. homeworkList: [],
  18271. })
  18272. }
  18273. }
  18274. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18275. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18276. _this.$forceUpdate();
  18277. }
  18278. callback ? callback() : ''
  18279. _this.isOutlineCancelToken = null
  18280. })
  18281. .catch((error) => {
  18282. _this.loading = false
  18283. _this.isOutlineCancelToken = null
  18284. console.log(error);
  18285. });
  18286. },
  18287. cancelAjax(type, index){
  18288. if (this.isOutlineCancelToken && type == 'outline') {
  18289. this.$message.success("已经成功停止生成课程大纲")
  18290. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  18291. this.isOutlineCancelToken = null;
  18292. this.loading = false
  18293. }
  18294. if (this.isFileCancelToken && type == 'file') {
  18295. this.$message.success("已经成功停止智能生成检索资料")
  18296. this.isFileCancelToken.cancel('Request canceled by the user.');
  18297. this.isFileCancelToken = null;
  18298. this.fileSLoading = false
  18299. }
  18300. if(this.isTextCancelToken && type == 'text'){
  18301. this.$message.success("已经成功停止AI优化")
  18302. this.isTextCancelToken.cancel('Request canceled by the user.');
  18303. this.isTextCancelToken = null;
  18304. this.textLoading = false
  18305. this.ttextLoading = true
  18306. if(this.isTextCancelSource){
  18307. this.isTextCancelSource.close()
  18308. this.isTextCancelSource = null
  18309. }
  18310. }
  18311. if(this.isTargetCancelToken2 && type == 'target2'){
  18312. this.$message.success("已经成功停止生成目标")
  18313. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  18314. this.isTargetCancelToken2 = null;
  18315. this.targetTextLoading2 = false
  18316. this.ttargetTextLoading2 = false
  18317. if(this.isTargetCancelSource2){
  18318. this.isTargetCancelSource2.close()
  18319. this.isTargetCancelSource2 = null
  18320. }
  18321. }
  18322. if(this.isTargetCancelToken1 && type == 'target1'){
  18323. this.$message.success("已经成功停止生成目标")
  18324. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  18325. this.isTargetCancelToken1 = null;
  18326. this.targetTextLoading = false
  18327. this.ttargetTextLoading = false
  18328. if(this.isTargetCancelSource1){
  18329. this.isTargetCancelSource1.close()
  18330. this.isTargetCancelSource1 = null
  18331. }
  18332. }
  18333. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  18334. this.$message.success("已经成功停止提取摘要")
  18335. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  18336. this.isTeacherTextCancelToken = null;
  18337. this.teacherTextLoading = false
  18338. this.tteacherTextLoading = false
  18339. if(this.isTeacherTextCancelSource){
  18340. this.isTeacherTextCancelSource.close()
  18341. this.isTeacherTextCancelSource = null
  18342. }
  18343. }
  18344. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  18345. this.$message.success("已经成功停止生成教案")
  18346. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  18347. this.isTeacherTaskCancelToken = null;
  18348. this.loading = false
  18349. }
  18350. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  18351. this.$message.success("已经成功停止生成大纲")
  18352. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  18353. this.isOutlineTaskCancelToken[index] = null;
  18354. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  18355. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  18356. if(this.isOutlineTaskCancelSource[index]){
  18357. this.isOutlineTaskCancelSource[index].close()
  18358. this.isOutlineTaskCancelSource[index] = null
  18359. }
  18360. }
  18361. if(type == 'teacherDetail2'){
  18362. this.$message.success("已经成功停止生成教案")
  18363. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  18364. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  18365. this.isTeacherTaskCancelToken2[index] = null;
  18366. }
  18367. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  18368. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18369. }
  18370. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  18371. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  18372. }
  18373. if(this.isTeacherTaskCancelSource[index]){
  18374. this.isTeacherTaskCancelSource[index].close()
  18375. this.isTeacherTaskCancelSource[index] = null
  18376. }
  18377. }
  18378. if(type == 'aiTaskGL1'){
  18379. this.$message.success("已经成功停止生成任务概述")
  18380. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  18381. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  18382. this.taskCancelToken1[index] = null;
  18383. }
  18384. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  18385. this.taskGLoading[index][0] = false
  18386. }
  18387. setTimeout(() => {
  18388. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  18389. this.cancelAjax('aiTaskGL2', index)
  18390. }
  18391. }, 1000)
  18392. this.$forceUpdate()
  18393. }
  18394. if(type == 'aiTaskGL2'){
  18395. this.$message.success("已经成功停止生成任务工具")
  18396. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  18397. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  18398. this.taskCancelToken2[index] = null;
  18399. }
  18400. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  18401. this.taskGLoading[index][1] = false
  18402. }
  18403. this.$forceUpdate()
  18404. }
  18405. if(type == 'taskAn'){
  18406. this.$message.success("已经成功停止生成任务概述")
  18407. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  18408. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  18409. this.taskAnCancelToken[index] = null;
  18410. }
  18411. if(this.taskAnLoading[index]){
  18412. this.taskAnLoading[index] = false
  18413. }
  18414. this.$forceUpdate()
  18415. }
  18416. },
  18417. async aiGetTask2(messages, callback) {
  18418. let _this = this
  18419. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18420. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  18421. if (_this.infoData.length) {
  18422. for (var i = 0; i < _this.infoData.length; i++) {
  18423. if(_this.infoData[i].fileid){
  18424. fileid.push(_this.infoData[i].fileid)
  18425. }else {
  18426. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18427. if(_fileid){
  18428. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18429. _this.$forceUpdate();
  18430. if(_fileid != 1){
  18431. fileid.push(_fileid)
  18432. }
  18433. }
  18434. }
  18435. }
  18436. }
  18437. console.log('fileid=========',fileid)
  18438. // let params = JSON.stringify({
  18439. // // "model": "Chat",
  18440. // model: 'gpt-3.5-turbo',
  18441. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18442. // max_tokens: 4096,
  18443. // top_p: 1,
  18444. // frequency_penalty: 0,
  18445. // presence_penalty: 0,
  18446. // messages: [{
  18447. // content: messages,
  18448. // role: 'user'
  18449. // }],
  18450. // stream: false,
  18451. // uid: this.userid,
  18452. // mind_map_question: "",
  18453. // })
  18454. // // let params = JSON.stringify({
  18455. // // message: {
  18456. // // anthropic_version: "bedrock-2023-05-31",
  18457. // // max_tokens: 4096,
  18458. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18459. // // top_p: 1,
  18460. // // messages: [{
  18461. // // content: messages,
  18462. // // role: 'user'
  18463. // // }], //
  18464. // // },
  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://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18469. // console.log(response);
  18470. // let data = response.data.FunctionResponse
  18471. // if (data.choices && data.choices.length && data.choices[0].message) {
  18472. // console.log(data.choices[0].message.content);
  18473. // let dArray = JSON.parse(data.choices[0].message.content)
  18474. // _this.dArray = dArray
  18475. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18476. // for (var i = 0; i < dArray.length; i++) {
  18477. // let _task = dArray[i]
  18478. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18479. // task: _task.task,
  18480. // taskDetail: "",
  18481. // taskDetail2: _task.detail,
  18482. // taskDetail3: "",
  18483. // chapterData: [],
  18484. // toolText: "",
  18485. // toolChoose: [
  18486. // {
  18487. // tool: [],
  18488. // toolDetail: "",
  18489. // toolType: 0,
  18490. // askCount: 1,
  18491. // askTitle: "",
  18492. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18493. // },
  18494. // ],
  18495. // isShowTools: false,
  18496. // askCount: 1,
  18497. // isFold: 0,
  18498. // askTitle: "",
  18499. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18500. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18501. // homeworkList: [],
  18502. // })
  18503. // }
  18504. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18505. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18506. // _this.$forceUpdate();
  18507. // }
  18508. // // if (data.result) {
  18509. // // console.log(data.result);
  18510. // // let dArray = JSON.parse(data.result)
  18511. // // _this.dArray = dArray
  18512. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18513. // // for (var i = 0; i < dArray.length; i++) {
  18514. // // let _task = dArray[i]
  18515. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18516. // // task: _task.task,
  18517. // // taskDetail: "",
  18518. // // taskDetail2: _task.detail,
  18519. // // taskDetail3: "",
  18520. // // chapterData: [],
  18521. // // toolText: "",
  18522. // // toolChoose: [
  18523. // // {
  18524. // // tool: [],
  18525. // // toolDetail: "",
  18526. // // toolType: 0,
  18527. // // askCount: 1,
  18528. // // askTitle: "",
  18529. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18530. // // },
  18531. // // ],
  18532. // // isShowTools: false,
  18533. // // askCount: 1,
  18534. // // isFold: 1,
  18535. // // askTitle: "",
  18536. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18537. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18538. // // homeworkList: [],
  18539. // // })
  18540. // // }
  18541. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18542. // // _this.$forceUpdate();
  18543. // // }
  18544. // callback ? callback() : ''
  18545. // }).catch(function (error) {
  18546. // _this.loading = false
  18547. // console.log(error);
  18548. // });
  18549. this.isOutlineCancelToken = this.ajax.setCancelSource();
  18550. let parm = {
  18551. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18552. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18553. session_name: uuidv4(),
  18554. userId: this.userid,
  18555. file_ids: fileid.length ? [...fileid] : '',
  18556. model: 'gpt-4o-2024-08-06',
  18557. temperature: this.mode == 3 ? 0.5 : 0.1,
  18558. }
  18559. this.ajax
  18560. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  18561. .then((response) => {
  18562. console.log(response);
  18563. let data = response.data.FunctionResponse
  18564. if (data.message) {
  18565. console.log(data.message);
  18566. let dArray = {}
  18567. try {
  18568. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18569. } catch (error) {
  18570. console.log("error_________________" + error);
  18571. try {
  18572. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18573. let match = data.message.match(regex);
  18574. dArray = JSON.parse(match[0]);
  18575. // var message = data.message;
  18576. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18577. // var jsonEnd = message.indexOf("```", jsonStart);
  18578. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18579. // dArray = JSON.parse(jsonString);
  18580. } catch (error) {
  18581. try {
  18582. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18583. let match = data.message.match(regex);
  18584. // eval("var aaa = " + match[0])
  18585. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18586. } catch (error) {
  18587. console.log("error_________________" + error);
  18588. }
  18589. console.log("error_________________" + error);
  18590. }
  18591. }
  18592. _this.dArray = dArray
  18593. if(_this.panOutline() > 0){
  18594. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18595. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18596. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  18597. }
  18598. for (var i = 0; i < dArray.length; i++) {
  18599. let _task = dArray[i]
  18600. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18601. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18602. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  18603. }else {
  18604. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18605. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18606. taskDetail: "",
  18607. taskDetail2: "",
  18608. taskDetail3: "",
  18609. chapterData: [],
  18610. toolText: "",
  18611. toolChoose: [
  18612. {
  18613. tool: [],
  18614. toolDetail: "",
  18615. toolType: 0,
  18616. askCount: 1,
  18617. askTitle: "",
  18618. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18619. },
  18620. ],
  18621. isShowTools: false,
  18622. askCount: 1,
  18623. isFold: 0,
  18624. askTitle: "",
  18625. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18626. checkJson: [{ checkCount: [], checkPerent: [] }],
  18627. homeworkList: [],
  18628. })
  18629. }
  18630. }
  18631. }else {
  18632. _this.unitJson[0].chapterInfo[0].taskJson = []
  18633. for (var i = 0; i < dArray.length; i++) {
  18634. let _task = dArray[i]
  18635. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18636. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18637. taskDetail: "",
  18638. taskDetail2: "",
  18639. taskDetail3: "",
  18640. chapterData: [],
  18641. toolText: "",
  18642. toolChoose: [
  18643. {
  18644. tool: [],
  18645. toolDetail: "",
  18646. toolType: 0,
  18647. askCount: 1,
  18648. askTitle: "",
  18649. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18650. },
  18651. ],
  18652. isShowTools: false,
  18653. askCount: 1,
  18654. isFold: 0,
  18655. askTitle: "",
  18656. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18657. checkJson: [{ checkCount: [], checkPerent: [] }],
  18658. homeworkList: [],
  18659. })
  18660. }
  18661. }
  18662. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18663. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18664. _this.$forceUpdate();
  18665. setTimeout(()=>{
  18666. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18667. this.aiOutlineDetail('', i)
  18668. }
  18669. }, 0)
  18670. }
  18671. callback ? callback() : ''
  18672. _this.isOutlineCancelToken = null
  18673. })
  18674. .catch((error) => {
  18675. _this.loading = false
  18676. _this.isOutlineCancelToken = null
  18677. console.log(error);
  18678. });
  18679. },
  18680. async aiGetTask3(messages, callback) {
  18681. let _this = this
  18682. // let params = JSON.stringify({
  18683. // // "model": "Chat",
  18684. // model: 'gpt-3.5-turbo',
  18685. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18686. // max_tokens: 4096,
  18687. // top_p: 1,
  18688. // frequency_penalty: 0,
  18689. // presence_penalty: 0,
  18690. // messages: [{
  18691. // content: messages,
  18692. // role: 'user'
  18693. // }],
  18694. // stream: false,
  18695. // uid: this.userid,
  18696. // mind_map_question: "",
  18697. // })
  18698. // // let params = JSON.stringify({
  18699. // // message: {
  18700. // // anthropic_version: "bedrock-2023-05-31",
  18701. // // max_tokens: 4096,
  18702. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18703. // // top_p: 1,
  18704. // // messages: [{
  18705. // // content: messages,
  18706. // // role: 'user'
  18707. // // }], //
  18708. // // },
  18709. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18710. // // });
  18711. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18712. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18713. // console.log(response);
  18714. // let data = response.data.FunctionResponse
  18715. // if (data.choices && data.choices.length && data.choices[0].message) {
  18716. // console.log(data.choices[0].message.content);
  18717. // let dArray = JSON.parse(data.choices[0].message.content)
  18718. // _this.dArray = dArray
  18719. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18720. // for (var i = 0; i < dArray.length; i++) {
  18721. // let _task = dArray[i]
  18722. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18723. // task: _task.task,
  18724. // taskDetail: "",
  18725. // taskDetail2: _task.detail,
  18726. // taskDetail3: "",
  18727. // chapterData: [],
  18728. // toolText: "",
  18729. // toolChoose: [
  18730. // {
  18731. // tool: [],
  18732. // toolDetail: "",
  18733. // toolType: 0,
  18734. // askCount: 1,
  18735. // askTitle: "",
  18736. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18737. // },
  18738. // ],
  18739. // isShowTools: false,
  18740. // askCount: 1,
  18741. // isFold: 0,
  18742. // askTitle: "",
  18743. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18744. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18745. // homeworkList: [],
  18746. // })
  18747. // }
  18748. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18749. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18750. // _this.$forceUpdate();
  18751. // }
  18752. // // if (data.result) {
  18753. // // console.log(data.result);
  18754. // // let dArray = JSON.parse(data.result)
  18755. // // _this.dArray = dArray
  18756. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18757. // // for (var i = 0; i < dArray.length; i++) {
  18758. // // let _task = dArray[i]
  18759. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18760. // // task: _task.task,
  18761. // // taskDetail: "",
  18762. // // taskDetail2: _task.detail,
  18763. // // taskDetail3: "",
  18764. // // chapterData: [],
  18765. // // toolText: "",
  18766. // // toolChoose: [
  18767. // // {
  18768. // // tool: [],
  18769. // // toolDetail: "",
  18770. // // toolType: 0,
  18771. // // askCount: 1,
  18772. // // askTitle: "",
  18773. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18774. // // },
  18775. // // ],
  18776. // // isShowTools: false,
  18777. // // askCount: 1,
  18778. // // isFold: 1,
  18779. // // askTitle: "",
  18780. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18781. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18782. // // homeworkList: [],
  18783. // // })
  18784. // // }
  18785. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18786. // // _this.$forceUpdate();
  18787. // // }
  18788. // callback ? callback() : ''
  18789. // }).catch(function (error) {
  18790. // _this.loading = false
  18791. // console.log(error);
  18792. // });
  18793. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  18794. let parm = {
  18795. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18796. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18797. session_name: uuidv4(),
  18798. userId: this.userid,
  18799. file_ids: '',
  18800. model: 'gpt-4o-2024-08-06',
  18801. temperature: this.mode == 3 ? 0.5 : 0.1,
  18802. }
  18803. this.ajax
  18804. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  18805. .then((response) => {
  18806. console.log(response);
  18807. let data = response.data.FunctionResponse
  18808. if (data.message) {
  18809. console.log(data.message);
  18810. let dArray = {}
  18811. try {
  18812. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18813. } catch (error) {
  18814. console.log("error_________________" + error);
  18815. try {
  18816. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18817. let match = data.message.match(regex);
  18818. dArray = JSON.parse(match[0]);
  18819. // var message = data.message;
  18820. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18821. // var jsonEnd = message.indexOf("```", jsonStart);
  18822. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18823. // dArray = JSON.parse(jsonString);
  18824. } catch (error) {
  18825. try {
  18826. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18827. let match = data.message.match(regex);
  18828. // eval("var aaa = " + match[0])
  18829. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18830. } catch (error) {
  18831. console.log("error_________________" + error);
  18832. }
  18833. console.log("error_________________" + error);
  18834. }
  18835. }
  18836. _this.dArray = dArray
  18837. if(_this.panOutline() > 0){
  18838. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18839. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18840. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  18841. }
  18842. for (var i = 0; i < dArray.length; i++) {
  18843. let _task = dArray[i]
  18844. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18845. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18846. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  18847. }else {
  18848. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18849. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18850. taskDetail: "",
  18851. taskDetail2: "",
  18852. taskDetail3: "",
  18853. chapterData: [],
  18854. toolText: "",
  18855. toolChoose: [
  18856. {
  18857. tool: [],
  18858. toolDetail: "",
  18859. toolType: 0,
  18860. askCount: 1,
  18861. askTitle: "",
  18862. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18863. },
  18864. ],
  18865. isShowTools: false,
  18866. askCount: 1,
  18867. isFold: 0,
  18868. askTitle: "",
  18869. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18870. checkJson: [{ checkCount: [], checkPerent: [] }],
  18871. homeworkList: [],
  18872. })
  18873. }
  18874. }
  18875. }else {
  18876. _this.unitJson[0].chapterInfo[0].taskJson = []
  18877. for (var i = 0; i < dArray.length; i++) {
  18878. let _task = dArray[i]
  18879. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18880. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18881. taskDetail: "",
  18882. taskDetail2: "",
  18883. taskDetail3: "",
  18884. chapterData: [],
  18885. toolText: "",
  18886. toolChoose: [
  18887. {
  18888. tool: [],
  18889. toolDetail: "",
  18890. toolType: 0,
  18891. askCount: 1,
  18892. askTitle: "",
  18893. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18894. },
  18895. ],
  18896. isShowTools: false,
  18897. askCount: 1,
  18898. isFold: 0,
  18899. askTitle: "",
  18900. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18901. checkJson: [{ checkCount: [], checkPerent: [] }],
  18902. homeworkList: [],
  18903. })
  18904. }
  18905. }
  18906. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18907. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18908. _this.$forceUpdate();
  18909. // setTimeout(()=>{
  18910. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18911. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  18912. // }
  18913. // }, 0)
  18914. setTimeout(()=>{
  18915. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18916. const _tindex = 'task-' + i;
  18917. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  18918. _this.taskDetailLoading5.push(_tindex)
  18919. }
  18920. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  18921. _this.ttaskDetailLoading5.push(_tindex)
  18922. }
  18923. }
  18924. let ij = 0;
  18925. function processNext() {
  18926. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18927. const _tindex = 'task-' + ij;
  18928. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  18929. ij++;
  18930. processNext();
  18931. return;
  18932. }
  18933. // 处理当前任务
  18934. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  18935. // 回调函数,当前任务完成后执行
  18936. ij++;
  18937. processNext(); // 处理下一个任务
  18938. });
  18939. }
  18940. }
  18941. processNext(); // 启动处理
  18942. }, 0)
  18943. }
  18944. callback ? callback() : ''
  18945. _this.isTeacherTaskCancelToken = null
  18946. })
  18947. .catch((error) => {
  18948. _this.loading = false
  18949. _this.isTeacherTaskCancelToken = null
  18950. console.log(error);
  18951. });
  18952. },
  18953. async aiGet3(messages, callback) {
  18954. let _this = this
  18955. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18956. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  18957. if (_this.infoData.length) {
  18958. for (var i = 0; i < _this.infoData.length; i++) {
  18959. if(_this.infoData[i].fileid){
  18960. fileid.push(_this.infoData[i].fileid)
  18961. }else {
  18962. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18963. if(_fileid){
  18964. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18965. _this.$forceUpdate();
  18966. if(_fileid != 1){
  18967. fileid.push(_fileid)
  18968. }
  18969. }
  18970. }
  18971. }
  18972. }
  18973. // let params = JSON.stringify({
  18974. // // "model": "Chat",
  18975. // model: 'gpt-3.5-turbo',
  18976. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18977. // max_tokens: 4096,
  18978. // top_p: 1,
  18979. // frequency_penalty: 0,
  18980. // presence_penalty: 0,
  18981. // messages: [{
  18982. // content: messages,
  18983. // role: 'user'
  18984. // }],
  18985. // stream: false,
  18986. // uid: this.userid,
  18987. // mind_map_question: "",
  18988. // })
  18989. // // let params = JSON.stringify({
  18990. // // message: {
  18991. // // anthropic_version: "bedrock-2023-05-31",
  18992. // // max_tokens: 4096,
  18993. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18994. // // top_p: 1,
  18995. // // messages: [{
  18996. // // content: messages,
  18997. // // role: 'user'
  18998. // // }], //
  18999. // // },
  19000. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19001. // // });
  19002. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19003. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19004. // console.log(response);
  19005. // let data = response.data.FunctionResponse
  19006. // if (data.choices && data.choices.length && data.choices[0].message) {
  19007. // console.log(data.choices[0].message.content);
  19008. // let tArray = JSON.parse(data.choices[0].message.content)
  19009. // // _this.unitJson[0].chapterInfo[0].task = []
  19010. // let toolsJson = {
  19011. // "电子白板": { tool: 1, type: 1 },
  19012. // "文档": { tool: 52, type: 1 },
  19013. // "思维导图": { tool: 3, type: 1 },
  19014. // "表格": { tool: 48, type: 1 },
  19015. // "作业提交": { tool: 16, type: 2 }
  19016. // }
  19017. // for (var i = 0; i < tArray.length; i++) {
  19018. // let _task = tArray[i]
  19019. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19020. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19021. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19022. // if (_task.toolChoose.length) {
  19023. // for (var j = 0; j < _task.toolChoose.length; j++) {
  19024. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19025. // {
  19026. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  19027. // toolDetail: _task.toolChoose[j].detail,
  19028. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  19029. // askCount: 1,
  19030. // askTitle: "",
  19031. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19032. // },
  19033. // )
  19034. // }
  19035. // } else {
  19036. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19037. // {
  19038. // tool: [],
  19039. // toolDetail: "",
  19040. // toolType: 0,
  19041. // askCount: 1,
  19042. // askTitle: "",
  19043. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19044. // },
  19045. // )
  19046. // }
  19047. // }
  19048. // // if (_this.infoData.length) {
  19049. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19050. // // }
  19051. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19052. // _this.$forceUpdate();
  19053. // }
  19054. // // if (data.result) {
  19055. // // console.log(data.result);
  19056. // // let tArray = JSON.parse(data.result)
  19057. // // // _this.unitJson[0].chapterInfo[0].task = []
  19058. // // let toolsJson = {
  19059. // // "电子白板": { tool: 1, type: 1 },
  19060. // // "文档": { tool: 52, type: 1 },
  19061. // // "思维导图": { tool: 3, type: 1 },
  19062. // // "表格": { tool: 48, type: 1 },
  19063. // // "作业提交": { tool: 16, type: 2 }
  19064. // // }
  19065. // // for (var i = 0; i < tArray.length; i++) {
  19066. // // let _task = tArray[i]
  19067. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19068. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19069. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19070. // // if (_task.toolChoose.length) {
  19071. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  19072. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19073. // // {
  19074. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  19075. // // toolDetail: _task.toolChoose[j].detail,
  19076. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  19077. // // askCount: 1,
  19078. // // askTitle: "",
  19079. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19080. // // },
  19081. // // )
  19082. // // }
  19083. // // } else {
  19084. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19085. // // {
  19086. // // tool: [],
  19087. // // toolDetail: "",
  19088. // // toolType: 0,
  19089. // // askCount: 1,
  19090. // // askTitle: "",
  19091. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19092. // // },
  19093. // // )
  19094. // // }
  19095. // // }
  19096. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19097. // // _this.$forceUpdate();
  19098. // // }
  19099. // callback ? callback() : ''
  19100. // }).catch(function (error) {
  19101. // _this.loading = false
  19102. // console.log(error);
  19103. // });
  19104. let parm = {
  19105. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19106. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19107. session_name: uuidv4(),
  19108. userId: this.userid,
  19109. file_ids: fileid.length ? [...fileid] : '',
  19110. model: 'gpt-4o-2024-08-06',
  19111. temperature: this.mode == 3 ? 0.5 : 0.1,
  19112. }
  19113. this.ajax
  19114. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19115. .then(async (response) => {
  19116. console.log(response);
  19117. let data = response.data.FunctionResponse
  19118. if (data.message) {
  19119. console.log(data.message);
  19120. let tArray = {}
  19121. try {
  19122. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19123. } catch (error) {
  19124. console.log("error_________________" + error);
  19125. try {
  19126. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19127. let match = data.message.match(regex);
  19128. tArray = JSON.parse(match[0]);
  19129. // var message = data.message;
  19130. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19131. // var jsonEnd = message.indexOf("```", jsonStart);
  19132. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19133. // tArray = JSON.parse(jsonString);
  19134. } catch (error) {
  19135. try {
  19136. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19137. let match = data.message.match(regex);
  19138. // eval("var aaa = " + match[0])
  19139. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19140. } catch (error) {
  19141. console.log("error_________________" + error);
  19142. }
  19143. console.log("error_________________" + error);
  19144. }
  19145. }
  19146. let toolsJson = {
  19147. "电子白板": { tool: 1, type: 1 },
  19148. "文档": { tool: 52, type: 1 },
  19149. "思维导图": { tool: 3, type: 1 },
  19150. "表格": { tool: 48, type: 1 },
  19151. "作业提交": { tool: 16, type: 2 },
  19152. "问答": { tool: 15, type: 2 },
  19153. "选择题": { tool: 45, type: 2 },
  19154. }
  19155. // answerQ:"sssssssssssssss"
  19156. for (var i = 0; i < tArray.length; i++) {
  19157. let _task = tArray[i]
  19158. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19159. _task.elist = _task.elist.filter(el=>{
  19160. el.isai = "1"
  19161. return el
  19162. })
  19163. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19164. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19165. if (_task.toolChoose.length) {
  19166. for (var j = 0; j < _task.toolChoose.length; j++) {
  19167. let _json = {
  19168. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  19169. toolDetail: _task.toolChoose[j].detail,
  19170. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  19171. askCount: 1,
  19172. askTitle: "",
  19173. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19174. }
  19175. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  19176. let answerQ = await _this.aiCreateQuestion(15, i)
  19177. _json.answerQ = answerQ.answerQ
  19178. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  19179. let testJson = await _this.aiCreateQuestion(45, i)
  19180. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  19181. }
  19182. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  19183. }
  19184. } else {
  19185. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19186. {
  19187. tool: [],
  19188. toolDetail: "",
  19189. toolType: 0,
  19190. askCount: 1,
  19191. askTitle: "",
  19192. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19193. },
  19194. )
  19195. }
  19196. }
  19197. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19198. _this.$forceUpdate();
  19199. _this.createTeacherAn();
  19200. }
  19201. callback ? callback() : ''
  19202. })
  19203. .catch((error) => {
  19204. _this.loading = false
  19205. console.log(error);
  19206. });
  19207. },
  19208. async aiGet32(messages, index) {
  19209. let _this = this
  19210. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19211. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19212. if (_this.infoData.length) {
  19213. for (var i = 0; i < _this.infoData.length; i++) {
  19214. if(_this.infoData[i].fileid){
  19215. fileid.push(_this.infoData[i].fileid)
  19216. }else {
  19217. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19218. if(_fileid){
  19219. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19220. _this.$forceUpdate();
  19221. if(_fileid != 1){
  19222. fileid.push(_fileid)
  19223. }
  19224. }
  19225. }
  19226. }
  19227. }
  19228. // let params = JSON.stringify({
  19229. // // "model": "Chat",
  19230. // model: 'gpt-3.5-turbo',
  19231. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19232. // max_tokens: 4096,
  19233. // top_p: 1,
  19234. // frequency_penalty: 0,
  19235. // presence_penalty: 0,
  19236. // messages: [{
  19237. // content: messages,
  19238. // role: 'user'
  19239. // }],
  19240. // stream: false,
  19241. // uid: this.userid,
  19242. // mind_map_question: "",
  19243. // })
  19244. // // let params = JSON.stringify({
  19245. // // message: {
  19246. // // anthropic_version: "bedrock-2023-05-31",
  19247. // // max_tokens: 4096,
  19248. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19249. // // top_p: 1,
  19250. // // messages: [{
  19251. // // content: messages,
  19252. // // role: 'user'
  19253. // // }], //
  19254. // // },
  19255. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19256. // // });
  19257. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19258. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19259. // console.log(response);
  19260. // let data = response.data.FunctionResponse
  19261. // if (data.choices && data.choices.length && data.choices[0].message) {
  19262. // console.log(data.choices[0].message.content);
  19263. // let tArray = JSON.parse(data.choices[0].message.content)
  19264. // // _this.unitJson[0].chapterInfo[0].task = []
  19265. // let toolsJson = {
  19266. // "电子白板": { tool: 1, type: 1 },
  19267. // "文档": { tool: 52, type: 1 },
  19268. // "思维导图": { tool: 3, type: 1 },
  19269. // "表格": { tool: 48, type: 1 },
  19270. // "作业提交": { tool: 16, type: 2 }
  19271. // }
  19272. // for (var i = 0; i < tArray.length; i++) {
  19273. // let _task = tArray[i]
  19274. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19275. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19276. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19277. // if (_task.toolChoose.length) {
  19278. // for (var j = 0; j < _task.toolChoose.length; j++) {
  19279. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19280. // {
  19281. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  19282. // toolDetail: _task.toolChoose[j].detail,
  19283. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  19284. // askCount: 1,
  19285. // askTitle: "",
  19286. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19287. // },
  19288. // )
  19289. // }
  19290. // } else {
  19291. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19292. // {
  19293. // tool: [],
  19294. // toolDetail: "",
  19295. // toolType: 0,
  19296. // askCount: 1,
  19297. // askTitle: "",
  19298. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19299. // },
  19300. // )
  19301. // }
  19302. // }
  19303. // // if (_this.infoData.length) {
  19304. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19305. // // }
  19306. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19307. // _this.$forceUpdate();
  19308. // }
  19309. // // if (data.result) {
  19310. // // console.log(data.result);
  19311. // // let tArray = JSON.parse(data.result)
  19312. // // // _this.unitJson[0].chapterInfo[0].task = []
  19313. // // let toolsJson = {
  19314. // // "电子白板": { tool: 1, type: 1 },
  19315. // // "文档": { tool: 52, type: 1 },
  19316. // // "思维导图": { tool: 3, type: 1 },
  19317. // // "表格": { tool: 48, type: 1 },
  19318. // // "作业提交": { tool: 16, type: 2 }
  19319. // // }
  19320. // // for (var i = 0; i < tArray.length; i++) {
  19321. // // let _task = tArray[i]
  19322. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19323. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19324. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19325. // // if (_task.toolChoose.length) {
  19326. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  19327. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19328. // // {
  19329. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  19330. // // toolDetail: _task.toolChoose[j].detail,
  19331. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  19332. // // askCount: 1,
  19333. // // askTitle: "",
  19334. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19335. // // },
  19336. // // )
  19337. // // }
  19338. // // } else {
  19339. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19340. // // {
  19341. // // tool: [],
  19342. // // toolDetail: "",
  19343. // // toolType: 0,
  19344. // // askCount: 1,
  19345. // // askTitle: "",
  19346. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19347. // // },
  19348. // // )
  19349. // // }
  19350. // // }
  19351. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19352. // // _this.$forceUpdate();
  19353. // // }
  19354. // callback ? callback() : ''
  19355. // }).catch(function (error) {
  19356. // _this.loading = false
  19357. // console.log(error);
  19358. // });
  19359. let parm = {
  19360. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19361. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19362. session_name: uuidv4(),
  19363. userId: this.userid,
  19364. file_ids: fileid.length ? [...fileid] : '',
  19365. model: 'gpt-4o-2024-08-06',
  19366. temperature: this.mode == 3 ? 0.5 : 0.1,
  19367. }
  19368. this.ajax
  19369. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19370. .then(async (response) => {
  19371. console.log(response);
  19372. let data = response.data.FunctionResponse
  19373. if (data.message) {
  19374. console.log(data.message);
  19375. let tArray = {}
  19376. try {
  19377. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19378. } catch (error) {
  19379. console.log("error_________________" + error);
  19380. try {
  19381. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19382. let match = data.message.match(regex);
  19383. tArray = JSON.parse(match[0]);
  19384. // var message = data.message;
  19385. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19386. // var jsonEnd = message.indexOf("```", jsonStart);
  19387. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19388. // tArray = JSON.parse(jsonString);
  19389. } catch (error) {
  19390. try {
  19391. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19392. let match = data.message.match(regex);
  19393. // eval("var aaa = " + match[0])
  19394. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19395. } catch (error) {
  19396. console.log("error_________________" + error);
  19397. }
  19398. console.log("error_________________" + error);
  19399. }
  19400. }
  19401. let toolsJson = {
  19402. "电子白板": { tool: 1, type: 1 },
  19403. "文档": { tool: 52, type: 1 },
  19404. "思维导图": { tool: 3, type: 1 },
  19405. "表格": { tool: 48, type: 1 },
  19406. "作业提交": { tool: 16, type: 2 },
  19407. "问答": { tool: 15, type: 2 },
  19408. "选择题": { tool: 45, type: 2 },
  19409. }
  19410. // answerQ:"sssssssssssssss"
  19411. // for (var i = 0; i < tArray.length; i++) {
  19412. let _task = tArray
  19413. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  19414. _task.elist = _task.elist.filter(el=>{
  19415. el.isai = 1
  19416. return el
  19417. })
  19418. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  19419. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  19420. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  19421. console.log("error_________________JSON不对重新生成");
  19422. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19423. _this.aiGet32(messages, index)
  19424. return;
  19425. }
  19426. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  19427. if (_task.toolChoose && _task.toolChoose.length) {
  19428. for (var j = 0; j < _task.toolChoose.length; j++) {
  19429. let _json = {
  19430. tool: [],
  19431. toolDetail: _task.toolChoose[j].detail,
  19432. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  19433. askCount: 1,
  19434. askTitle: "",
  19435. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19436. }
  19437. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19438. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  19439. let answerQ = await _this.aiCreateQuestion(15, index)
  19440. // _json.answerQ = answerQ.answerQ
  19441. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  19442. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  19443. let testJson = await _this.aiCreateQuestion(45, index)
  19444. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  19445. _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}
  19446. }
  19447. _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]
  19448. _this.$forceUpdate();
  19449. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19450. }
  19451. } else {
  19452. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  19453. {
  19454. tool: [],
  19455. toolDetail: "",
  19456. toolType: 0,
  19457. askCount: 1,
  19458. askTitle: "",
  19459. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19460. },
  19461. )
  19462. }
  19463. // }
  19464. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19465. _this.$forceUpdate();
  19466. _this.createTeacherAn(index);
  19467. }
  19468. // callback ? callback() : ''
  19469. _this.taskLoading[index] = false
  19470. })
  19471. .catch((error) => {
  19472. // _this.loading = false
  19473. _this.taskLoading[index] = false
  19474. console.log(error);
  19475. });
  19476. },
  19477. async aiGetG321(messages, index, callback, callback2) {
  19478. let _this = this
  19479. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19480. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19481. if (_this.infoData.length) {
  19482. for (var i = 0; i < _this.infoData.length; i++) {
  19483. if(_this.infoData[i].fileid){
  19484. fileid.push(_this.infoData[i].fileid)
  19485. }else {
  19486. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19487. if(_fileid){
  19488. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19489. _this.$forceUpdate();
  19490. if(_fileid != 1){
  19491. fileid.push(_fileid)
  19492. }
  19493. }
  19494. }
  19495. }
  19496. }
  19497. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  19498. let parm = {
  19499. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19500. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19501. session_name: uuidv4(),
  19502. userId: this.userid,
  19503. file_ids: fileid.length ? [...fileid] : '',
  19504. model: 'gpt-4o-2024-08-06',
  19505. temperature: this.mode == 3 ? 0.5 : 0.1,
  19506. }
  19507. this.ajax
  19508. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  19509. .then(async (response) => {
  19510. console.log(response);
  19511. let data = response.data.FunctionResponse
  19512. if (data.message) {
  19513. let tArray = {}
  19514. try {
  19515. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19516. } catch (error) {
  19517. console.log("error_________________" + error);
  19518. try {
  19519. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19520. let match = data.message.match(regex);
  19521. tArray = JSON.parse(match[0]);
  19522. } catch (error) {
  19523. try {
  19524. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19525. let match = data.message.match(regex);
  19526. // eval("var aaa = " + match[0])
  19527. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19528. } catch (error) {
  19529. console.log("error_________________" + error);
  19530. }
  19531. console.log("error_________________" + error);
  19532. }
  19533. }
  19534. console.log(data.message);
  19535. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  19536. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  19537. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19538. _this.$forceUpdate();
  19539. _this.createTeacherAn(index);
  19540. }
  19541. callback ? callback(callback2) : ''
  19542. _this.taskGLoading[index][0] = false
  19543. _this.taskCancelToken1[index] = null
  19544. _this.$forceUpdate();
  19545. })
  19546. .catch((error) => {
  19547. // _this.loading = false
  19548. callback ? callback(callback2) : ''
  19549. _this.taskGLoading[index][0] = false
  19550. _this.taskCancelToken1[index] = null
  19551. _this.$forceUpdate();
  19552. console.log(error);
  19553. });
  19554. },
  19555. async aiGetG322(messages, index, callback) {
  19556. let _this = this
  19557. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19558. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19559. if (_this.infoData.length) {
  19560. for (var i = 0; i < _this.infoData.length; i++) {
  19561. if(_this.infoData[i].fileid){
  19562. fileid.push(_this.infoData[i].fileid)
  19563. }else {
  19564. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19565. if(_fileid){
  19566. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19567. _this.$forceUpdate();
  19568. if(_fileid != 1){
  19569. fileid.push(_fileid)
  19570. }
  19571. }
  19572. }
  19573. }
  19574. }
  19575. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  19576. let parm = {
  19577. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19578. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19579. session_name: uuidv4(),
  19580. userId: this.userid,
  19581. file_ids: fileid.length ? [...fileid] : '',
  19582. model: 'gpt-4o-2024-08-06',
  19583. temperature: this.mode == 3 ? 0.5 : 0.1,
  19584. }
  19585. this.ajax
  19586. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  19587. .then(async (response) => {
  19588. console.log(response);
  19589. let data = response.data.FunctionResponse
  19590. if (data.message) {
  19591. console.log(data.message);
  19592. let tArray = {}
  19593. try {
  19594. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19595. } catch (error) {
  19596. console.log("error_________________" + error);
  19597. try {
  19598. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19599. let match = data.message.match(regex);
  19600. tArray = JSON.parse(match[0]);
  19601. } catch (error) {
  19602. try {
  19603. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19604. let match = data.message.match(regex);
  19605. // eval("var aaa = " + match[0])
  19606. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19607. } catch (error) {
  19608. console.log("error_________________" + error);
  19609. }
  19610. console.log("error_________________" + error);
  19611. }
  19612. }
  19613. let toolsJson = {
  19614. "电子白板": { tool: 1, type: 1 },
  19615. "文档": { tool: 52, type: 1 },
  19616. "思维导图": { tool: 3, type: 1 },
  19617. "表格": { tool: 48, type: 1 },
  19618. "作业提交": { tool: 16, type: 2 },
  19619. "问答": { tool: 15, type: 2 },
  19620. "选择题": { tool: 45, type: 2 },
  19621. }
  19622. if(_this.languageSetting == 1){
  19623. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  19624. }else if(_this.languageSetting == 2){
  19625. toolsJson = {
  19626. "Mind Map Tool": { tool: 1, type: 1 },
  19627. "Document tool": { tool: 52, type: 1 },
  19628. "Diagram Tool": { tool: 3, type: 1 },
  19629. "Spreadsheet tool": { tool: 48, type: 1 },
  19630. "作业提交": { tool: 16, type: 2 },
  19631. "Q&A Tool": { tool: 15, type: 2 },
  19632. "Choice tool": { tool: 45, type: 2 },
  19633. }
  19634. }
  19635. let _task = tArray
  19636. if(!_task.toolChoose){
  19637. console.log("error_________________JSON不对重新生成");
  19638. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19639. _this.aiGet322(messages, index)
  19640. return;
  19641. }
  19642. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  19643. if (_task.toolChoose && _task.toolChoose.length) {
  19644. for (var j = 0; j < _task.toolChoose.length; j++) {
  19645. let _json = {
  19646. tool: [],
  19647. toolDetail: _task.toolChoose[j].detail,
  19648. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  19649. askCount: 1,
  19650. askTitle: "",
  19651. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19652. }
  19653. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19654. if(converter(_task.toolChoose[j].tool) == converter('问答') || _task.toolChoose[j].tool == 'Q&A Tool'){
  19655. let answerQ = await _this.aiCreateQuestion(15, index)
  19656. // _json.answerQ = answerQ.answerQ
  19657. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  19658. }else if(converter(_task.toolChoose[j].tool) == converter('选择题') || _task.toolChoose[j].tool == 'Choice tool'){
  19659. let testJson = await _this.aiCreateQuestion(45, index)
  19660. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  19661. _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}
  19662. }
  19663. _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]
  19664. _this.$forceUpdate();
  19665. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19666. }
  19667. } else {
  19668. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  19669. {
  19670. tool: [],
  19671. toolDetail: "",
  19672. toolType: 0,
  19673. askCount: 1,
  19674. askTitle: "",
  19675. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19676. },
  19677. )
  19678. }
  19679. //
  19680. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19681. _this.$forceUpdate();
  19682. _this.$nextTick(()=>{
  19683. setTimeout(() => {
  19684. for (var j = 0; j < _task.toolChoose.length; j++) {
  19685. if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  19686. _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  19687. }
  19688. }
  19689. }, 2000);
  19690. })
  19691. }
  19692. callback ? callback() : ''
  19693. _this.taskGLoading[index][1] = false
  19694. _this.taskCancelToken2[index] = null
  19695. _this.$forceUpdate();
  19696. })
  19697. .catch((error) => {
  19698. // _this.loading = false
  19699. callback ? callback() : ''
  19700. _this.taskGLoading[index][1] = false
  19701. _this.taskCancelToken2[index] = null
  19702. _this.$forceUpdate();
  19703. console.log(error);
  19704. });
  19705. },
  19706. async aiGetG323(messages, index) {
  19707. let _this = this
  19708. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19709. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19710. if (_this.infoData.length) {
  19711. for (var i = 0; i < _this.infoData.length; i++) {
  19712. if(_this.infoData[i].fileid){
  19713. fileid.push(_this.infoData[i].fileid)
  19714. }else {
  19715. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19716. if(_fileid){
  19717. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19718. _this.$forceUpdate();
  19719. if(_fileid != 1){
  19720. fileid.push(_fileid)
  19721. }
  19722. }
  19723. }
  19724. }
  19725. }
  19726. let parm = {
  19727. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19728. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19729. session_name: uuidv4(),
  19730. userId: this.userid,
  19731. file_ids: fileid.length ? [...fileid] : '',
  19732. model: 'gpt-4o-2024-08-06',
  19733. temperature: this.mode == 3 ? 0.5 : 0.1,
  19734. }
  19735. this.ajax
  19736. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19737. .then(async (response) => {
  19738. console.log(response);
  19739. let data = response.data.FunctionResponse
  19740. if (data.message) {
  19741. console.log(data.message);
  19742. let tArray = {}
  19743. try {
  19744. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19745. } catch (error) {
  19746. console.log("error_________________" + error);
  19747. try {
  19748. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19749. let match = data.message.match(regex);
  19750. tArray = JSON.parse(match[0]);
  19751. } catch (error) {
  19752. try {
  19753. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19754. let match = data.message.match(regex);
  19755. // eval("var aaa = " + match[0])
  19756. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19757. } catch (error) {
  19758. console.log("error_________________" + error);
  19759. }
  19760. console.log("error_________________" + error);
  19761. }
  19762. }
  19763. let _task = tArray
  19764. if(!_task.elist){
  19765. console.log("error_________________JSON不对重新生成");
  19766. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19767. _this.aiGet322(messages, index)
  19768. return;
  19769. }
  19770. _task.elist = _task.elist.filter(el=>{
  19771. el.isai = "1"
  19772. return el
  19773. })
  19774. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  19775. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19776. _this.$forceUpdate();
  19777. }
  19778. // callback ? callback() : ''
  19779. _this.taskGLoading[index][2] = false
  19780. })
  19781. .catch((error) => {
  19782. // _this.loading = false
  19783. _this.taskGLoading[index][2] = false
  19784. console.log(error);
  19785. });
  19786. },
  19787. async aiCreateQuestion(type, task) {
  19788. let _this = this
  19789. return new Promise((resolve, reject) => {
  19790. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19791. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19792. if (_this.infoData.length) {
  19793. for (var i = 0; i < _this.infoData.length; i++) {
  19794. if(_this.infoData[i].fileid){
  19795. fileid.push(_this.infoData[i].fileid)
  19796. }
  19797. }
  19798. }
  19799. let sub = []
  19800. let mclass = []
  19801. if (this.courseTypeId.length) {
  19802. for (var i = 0; i < this.courseTypeId.length; i++) {
  19803. let _sid = this.courseTypeId[i]
  19804. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19805. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19806. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19807. }
  19808. }
  19809. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19810. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19811. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19812. }
  19813. }
  19814. }
  19815. }
  19816. let messages = ""
  19817. if(type == 15){
  19818. messages = `NOTICE
  19819. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19820. Language: ${this.getLang()}
  19821. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19822. Instruction: Based on the context, follow "Format example", write content.
  19823. # Context
  19824. ## 任务
  19825. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  19826. ## 限制
  19827. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19828. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19829. ## 课程简介
  19830. 课程名字:${_this.courseName}
  19831. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19832. ${sub.length ? '学科:' + sub.join(",") : ''}
  19833. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19834. ## 教案
  19835. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19836. # Format example
  19837. {"answerQ":"问题"}
  19838. `
  19839. }else if(type == 45){
  19840. messages = `NOTICE
  19841. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19842. Language: ${this.getLang()}
  19843. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19844. Instruction: Based on the context, follow "Format example", write content.
  19845. # Context
  19846. ## 任务
  19847. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  19848. ## 限制
  19849. - 生成题目禁止重复。
  19850. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19851. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  19852. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19853. ## 课程简介
  19854. 课程名字:${_this.courseName}
  19855. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19856. ${sub.length ? '学科:' + sub.join(",") : ''}
  19857. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19858. ## 教案
  19859. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19860. # Format example
  19861. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  19862. `
  19863. }
  19864. let parm = {
  19865. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19866. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19867. session_name: uuidv4(),
  19868. userId: this.userid,
  19869. file_ids: fileid.length ? [...fileid] : '',
  19870. model: 'gpt-4o-2024-08-06',
  19871. temperature: this.mode == 3 ? 0.5 : 0.1,
  19872. }
  19873. this.ajax
  19874. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19875. .then((response) => {
  19876. console.log(response);
  19877. let data = response.data.FunctionResponse
  19878. if (data.message) {
  19879. console.log(data.message);
  19880. try {
  19881. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19882. let tArray = {}
  19883. try {
  19884. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19885. } catch (error) {
  19886. console.log("error_________________" + error);
  19887. try {
  19888. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19889. let match = data.message.match(regex);
  19890. tArray = JSON.parse(match[0]);
  19891. // var message = data.message;
  19892. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19893. // var jsonEnd = message.indexOf("```", jsonStart);
  19894. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19895. // tArray = JSON.parse(jsonString);
  19896. } catch (error) {
  19897. try {
  19898. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19899. let match = data.message.match(regex);
  19900. // eval("var aaa = " + match[0])
  19901. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19902. } catch (error) {
  19903. try {
  19904. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19905. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  19906. let match = data.message.match(regex.replace(regex2, '"$1"'));
  19907. // eval("var aaa = " + match[0])
  19908. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19909. } catch (error) {
  19910. console.log("error_________________" + error);
  19911. }
  19912. console.log("error_________________" + error);
  19913. }
  19914. console.log("error_________________" + error);
  19915. }
  19916. }
  19917. resolve(tArray)
  19918. } catch (error) {
  19919. if(type == 15){
  19920. resolve({answerQ: "题目"})
  19921. }else if(type == 45){
  19922. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19923. }
  19924. }
  19925. }else if(type == 15){
  19926. resolve({answerQ: "题目"})
  19927. }else if(type == 45){
  19928. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19929. }
  19930. })
  19931. .catch((error) => {
  19932. if(type == 15){
  19933. resolve({answerQ: "题目"})
  19934. }else if(type == 45){
  19935. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19936. }
  19937. console.log(error);
  19938. });
  19939. });
  19940. },
  19941. async aiChoice(type){
  19942. if(type == 45){
  19943. this.choiceLoading = true
  19944. }
  19945. let _this = this
  19946. let fileid = []
  19947. if (_this.xuanzeInfoData.length) {
  19948. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  19949. if(_this.xuanzeInfoData[i].fileid){
  19950. fileid.push(_this.xuanzeInfoData[i].fileid)
  19951. }
  19952. }
  19953. }else{
  19954. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19955. if (_this.infoData.length) {
  19956. for (var i = 0; i < _this.infoData.length; i++) {
  19957. if(_this.infoData[i].fileid){
  19958. fileid.push(_this.infoData[i].fileid)
  19959. }
  19960. }
  19961. }
  19962. }
  19963. let sub = []
  19964. let mclass = []
  19965. if (this.courseTypeId.length) {
  19966. for (var i = 0; i < this.courseTypeId.length; i++) {
  19967. let _sid = this.courseTypeId[i]
  19968. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19969. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19970. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19971. }
  19972. }
  19973. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19974. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19975. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19976. }
  19977. }
  19978. }
  19979. }
  19980. let messages = ""
  19981. if(type == 15){
  19982. messages = `NOTICE
  19983. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19984. Language: ${this.getLang()}
  19985. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19986. Instruction: Based on the context, follow "Format example", write content.
  19987. # Context
  19988. ## 任务
  19989. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  19990. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  19991. ## 限制
  19992. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19993. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19994. ## 课程简介
  19995. 课程名字:${_this.courseName}
  19996. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19997. ${sub.length ? '学科:' + sub.join(",") : ''}
  19998. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19999. ## 教案
  20000. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20001. # Format example
  20002. {"answerQ":"问题"}
  20003. `
  20004. }else if(type == 45){
  20005. messages = `NOTICE
  20006. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  20007. Language: ${this.getLang()}
  20008. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20009. Instruction: Based on the context, follow "Format example", write content.
  20010. # Context
  20011. ## 任务
  20012. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  20013. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  20014. ## 限制
  20015. - 生成题目禁止重复。
  20016. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  20017. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  20018. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  20019. ## 课程简介
  20020. 课程名字:${_this.courseName}
  20021. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20022. ${sub.length ? '学科:' + sub.join(",") : ''}
  20023. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20024. ## 教案
  20025. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20026. # Format example
  20027. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  20028. `
  20029. }
  20030. let parm = {
  20031. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20032. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20033. session_name: uuidv4(),
  20034. userId: this.userid,
  20035. file_ids: fileid.length ? [...fileid] : '',
  20036. model: 'gpt-4o-2024-08-06',
  20037. temperature: this.mode == 3 ? 0.5 : 0.1,
  20038. }
  20039. this.ajax
  20040. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20041. .then((response) => {
  20042. console.log(response);
  20043. let data = response.data.FunctionResponse
  20044. if (data.message) {
  20045. console.log(data.message);
  20046. try {
  20047. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20048. let tArray = {}
  20049. try {
  20050. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20051. } catch (error) {
  20052. console.log("error_________________" + error);
  20053. try {
  20054. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20055. let match = data.message.match(regex);
  20056. tArray = JSON.parse(match[0]);
  20057. // var message = data.message;
  20058. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20059. // var jsonEnd = message.indexOf("```", jsonStart);
  20060. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20061. // tArray = JSON.parse(jsonString);
  20062. } catch (error) {
  20063. try {
  20064. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20065. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  20066. let match = data.message.match(regex.replace(regex2, '"$1"'));
  20067. // eval("var aaa = " + match[0])
  20068. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20069. } catch (error) {
  20070. console.log("error_________________" + error);
  20071. }
  20072. console.log("error_________________" + error);
  20073. }
  20074. }
  20075. if(type == 45){
  20076. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  20077. }
  20078. } catch (error) {
  20079. if(type == 15){
  20080. {answerQ: "题目"}
  20081. }else if(type == 45){
  20082. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  20083. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  20084. }
  20085. _this.choiceLoading = false
  20086. }
  20087. }else if(type == 15){
  20088. {answerQ: "题目"}
  20089. }else if(type == 45){
  20090. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  20091. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  20092. }
  20093. _this.choiceLoading = false
  20094. }).catch((error) => {
  20095. if(type == 15){
  20096. {answerQ: "题目"}
  20097. }else if(type == 45){
  20098. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  20099. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  20100. }
  20101. console.log(error);
  20102. _this.choiceLoading = false
  20103. });
  20104. },
  20105. async aiGet4(messages, callback, clickType) {
  20106. let _this = this
  20107. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20108. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20109. if (_this.infoData.length) {
  20110. for (var i = 0; i < _this.infoData.length; i++) {
  20111. if(_this.infoData[i].fileid){
  20112. fileid.push(_this.infoData[i].fileid)
  20113. }else {
  20114. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20115. if(_fileid){
  20116. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20117. _this.$forceUpdate();
  20118. if(_fileid != 1){
  20119. fileid.push(_fileid)
  20120. }
  20121. }
  20122. }
  20123. }
  20124. }
  20125. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  20126. if(_this.cankaoInfoData[i].fileid){
  20127. fileid.push(_this.cankaoInfoData[i].fileid)
  20128. }else {
  20129. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  20130. if(_fileid){
  20131. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20132. _this.$forceUpdate();
  20133. if(_fileid != 1){
  20134. fileid.push(_fileid)
  20135. }
  20136. }
  20137. }
  20138. }
  20139. // let params = JSON.stringify({
  20140. // // "model": "Chat",
  20141. // model: 'gpt-3.5-turbo',
  20142. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20143. // max_tokens: 4096,
  20144. // top_p: 1,
  20145. // frequency_penalty: 0,
  20146. // presence_penalty: 0,
  20147. // messages: [{
  20148. // content: messages,
  20149. // role: 'user'
  20150. // }],
  20151. // stream: false,
  20152. // uid: this.userid,
  20153. // mind_map_question: "",
  20154. // })
  20155. // // let params = JSON.stringify({
  20156. // // message: {
  20157. // // anthropic_version: "bedrock-2023-05-31",
  20158. // // max_tokens: 4096,
  20159. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20160. // // top_p: 1,
  20161. // // messages: [{
  20162. // // content: messages,
  20163. // // role: 'user'
  20164. // // }], //
  20165. // // },
  20166. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20167. // // });
  20168. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20169. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20170. // console.log(response);
  20171. // let data = response.data.FunctionResponse
  20172. // if (data.choices && data.choices.length && data.choices[0].message) {
  20173. // console.log(data.choices[0].message.content);
  20174. // let dArray = JSON.parse(data.choices[0].message.content)
  20175. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  20176. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  20177. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20178. // for (var i = 0; i < dArray.length; i++) {
  20179. // let _task = dArray[i]
  20180. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20181. // task: _task.task,
  20182. // taskDetail: "",
  20183. // taskDetail2: "",
  20184. // taskDetail3: _task.detail,
  20185. // chapterData: [],
  20186. // toolText: "",
  20187. // toolChoose: [
  20188. // {
  20189. // tool: [],
  20190. // toolDetail: "",
  20191. // toolType: 0,
  20192. // askCount: 1,
  20193. // askTitle: "",
  20194. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20195. // },
  20196. // ],
  20197. // isShowTools: false,
  20198. // askCount: 1,
  20199. // isFold: 0,
  20200. // askTitle: "",
  20201. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20202. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20203. // homeworkList: [],
  20204. // })
  20205. // }
  20206. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20207. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20208. // _this.$forceUpdate();
  20209. // } else {
  20210. // for (var i = 0; i < dArray.length; i++) {
  20211. // let _task = dArray[i]
  20212. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20213. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  20214. // }else {
  20215. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  20216. // task: _task.task,
  20217. // taskDetail: "",
  20218. // taskDetail2: "",
  20219. // taskDetail3: _task.detail,
  20220. // chapterData: [],
  20221. // toolText: "",
  20222. // toolChoose: [
  20223. // {
  20224. // tool: [],
  20225. // toolDetail: "",
  20226. // toolType: 0,
  20227. // askCount: 1,
  20228. // askTitle: "",
  20229. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20230. // },
  20231. // ],
  20232. // isShowTools: false,
  20233. // askCount: 1,
  20234. // isFold: 0,
  20235. // askTitle: "",
  20236. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20237. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20238. // homeworkList: [],
  20239. // }
  20240. // }
  20241. // }
  20242. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20243. // _this.$forceUpdate();
  20244. // }
  20245. // }
  20246. // // if (data.result) {
  20247. // // console.log(data.result);
  20248. // // let dArray = JSON.parse(data.result)
  20249. // // _this.teacherText = JSON.parse(data.result)
  20250. // // for (var i = 0; i < dArray.length; i++) {
  20251. // // let _task = dArray[i]
  20252. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  20253. // // }
  20254. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20255. // // _this.$forceUpdate();
  20256. // // }
  20257. // callback ? callback() : ''
  20258. // _this.loading = false
  20259. // }).catch(function (error) {
  20260. // _this.loading = false
  20261. // console.log(error);
  20262. // });
  20263. let parm = {
  20264. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20265. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20266. session_name: uuidv4(),
  20267. userId: this.userid,
  20268. file_ids: fileid.length ? [...fileid] : '',
  20269. model: 'gpt-4o-2024-08-06',
  20270. temperature: this.mode == 3 ? 0.5 : 0.1,
  20271. }
  20272. this.ajax
  20273. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20274. .then((response) => {
  20275. console.log(response);
  20276. let data = response.data.FunctionResponse
  20277. if (data.message) {
  20278. console.log(data.message);
  20279. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20280. let dArray = []
  20281. try {
  20282. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20283. } catch (error) {
  20284. console.log("error_________________" + error);
  20285. try {
  20286. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20287. let match = data.message.match(regex);
  20288. dArray = JSON.parse(match[0]);
  20289. // var message = data.message;
  20290. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20291. // var jsonEnd = message.indexOf("```", jsonStart);
  20292. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20293. // dArray = JSON.parse(jsonString);
  20294. } catch (error) {
  20295. _this.aiGet4(messages, callback)
  20296. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20297. console.log("error_________________" + error);
  20298. return;
  20299. console.log("error_________________" + error);
  20300. _this.loading = false
  20301. }
  20302. }
  20303. try {
  20304. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  20305. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  20306. if(_this.panTeacher() > 0){
  20307. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20308. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20309. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  20310. }
  20311. for (var i = 0; i < dArray.length; i++) {
  20312. let _task = dArray[i]
  20313. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20314. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20315. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  20316. }else {
  20317. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20318. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20319. taskDetail: "",
  20320. taskDetail2: "",
  20321. taskDetail3: _task.detail,
  20322. chapterData: [],
  20323. toolText: "",
  20324. toolChoose: [
  20325. {
  20326. tool: [],
  20327. toolDetail: "",
  20328. toolType: 0,
  20329. askCount: 1,
  20330. askTitle: "",
  20331. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20332. },
  20333. ],
  20334. isShowTools: false,
  20335. askCount: 1,
  20336. isFold: 0,
  20337. askTitle: "",
  20338. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20339. checkJson: [{ checkCount: [], checkPerent: [] }],
  20340. homeworkList: [],
  20341. })
  20342. }
  20343. }
  20344. }else {
  20345. _this.unitJson[0].chapterInfo[0].taskJson = []
  20346. for (var i = 0; i < dArray.length; i++) {
  20347. let _task = dArray[i]
  20348. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20349. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20350. taskDetail: "",
  20351. taskDetail2: "",
  20352. taskDetail3: _task.detail,
  20353. chapterData: [],
  20354. toolText: "",
  20355. toolChoose: [
  20356. {
  20357. tool: [],
  20358. toolDetail: "",
  20359. toolType: 0,
  20360. askCount: 1,
  20361. askTitle: "",
  20362. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20363. },
  20364. ],
  20365. isShowTools: false,
  20366. askCount: 1,
  20367. isFold: 0,
  20368. askTitle: "",
  20369. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20370. checkJson: [{ checkCount: [], checkPerent: [] }],
  20371. homeworkList: [],
  20372. })
  20373. }
  20374. }
  20375. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20376. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20377. _this.$forceUpdate();
  20378. } else {
  20379. for (var i = 0; i < dArray.length; i++) {
  20380. let _task = dArray[i]
  20381. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20382. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  20383. }else {
  20384. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  20385. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20386. taskDetail: "",
  20387. taskDetail2: "",
  20388. taskDetail3: _task.detail,
  20389. chapterData: [],
  20390. toolText: "",
  20391. toolChoose: [
  20392. {
  20393. tool: [],
  20394. toolDetail: "",
  20395. toolType: 0,
  20396. askCount: 1,
  20397. askTitle: "",
  20398. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20399. },
  20400. ],
  20401. isShowTools: false,
  20402. askCount: 1,
  20403. isFold: 0,
  20404. askTitle: "",
  20405. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20406. checkJson: [{ checkCount: [], checkPerent: [] }],
  20407. homeworkList: [],
  20408. }
  20409. }
  20410. }
  20411. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20412. _this.$forceUpdate();
  20413. }
  20414. } catch (error) {
  20415. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20416. _this.aiGet4(messages, callback)
  20417. console.log("error_________________" + error);
  20418. return;
  20419. // _this.loading = false
  20420. }
  20421. }
  20422. callback ? callback() : ''
  20423. })
  20424. .catch((error) => {
  20425. _this.loading = false
  20426. console.log(error);
  20427. });
  20428. },
  20429. async aiDetail(msg, index) {
  20430. let _this = this
  20431. const _tindex = 'task-' + index
  20432. const _tindex2 = index
  20433. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20434. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20435. if (_this.infoData.length) {
  20436. for (var i = 0; i < _this.infoData.length; i++) {
  20437. if(_this.infoData[i].fileid){
  20438. fileid.push(_this.infoData[i].fileid)
  20439. }else {
  20440. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20441. if(_fileid){
  20442. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20443. _this.$forceUpdate();
  20444. if(_fileid != 1){
  20445. fileid.push(_fileid)
  20446. }
  20447. }
  20448. }
  20449. }
  20450. }
  20451. let url = []
  20452. if (this.infoData.length) {
  20453. for (var i = 0; i < this.infoData.length; i++) {
  20454. url.push(this.infoData[i].url)
  20455. }
  20456. }
  20457. let messages = `NOTICE
  20458. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20459. Language: ${this.getLang()}
  20460. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20461. Instruction: Based on the context, follow "Format example", write content.
  20462. #Context
  20463. ## 要求
  20464. ${msg}
  20465. ## 参考信息
  20466. 任务名称:${_this.aiCallBack.task}
  20467. ## 优化内容
  20468. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  20469. // -------- #补充参考资料和
  20470. // ## 补充参考资料
  20471. // - 补充资料:${url.join(",")}
  20472. // - 补充描述:${_this.courseText2}
  20473. _this.taskDetailLoading.push(_tindex)
  20474. _this.ttaskDetailLoading.push(_tindex)
  20475. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20476. let _uuid = uuidv4();
  20477. // let params = JSON.stringify({
  20478. // // "model": "Chat",
  20479. // model: 'gpt-3.5-turbo',
  20480. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20481. // max_tokens: 4096,
  20482. // top_p: 1,
  20483. // frequency_penalty: 0,
  20484. // presence_penalty: 0,
  20485. // messages: [{
  20486. // content: messages,
  20487. // role: 'user'
  20488. // }],
  20489. // uid: _uuid,
  20490. // mind_map_question: "",
  20491. // })
  20492. let params = {
  20493. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20494. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  20495. session_name: _uuid,
  20496. userId: _this.userid,
  20497. uid: _uuid,
  20498. file_ids: fileid.length ? [...fileid] : '',
  20499. model: 'gpt-4o-2024-08-06',
  20500. temperature: this.mode == 3 ? 0.5 : 0.1,
  20501. }
  20502. // let params = JSON.stringify({
  20503. // message: {
  20504. // anthropic_version: "bedrock-2023-05-31",
  20505. // max_tokens: 4096,
  20506. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20507. // top_p: 1,
  20508. // messages: [{
  20509. // "role": "user",
  20510. // "content": messages
  20511. // }] ,
  20512. // },
  20513. // uid: _uuid,
  20514. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20515. // });
  20516. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20517. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20518. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20519. console.log(response);
  20520. // let data = response.data.FunctionResponse
  20521. // if (data.choices && data.choices.length && data.choices[0].message) {
  20522. // console.log(data.choices[0].message.content);
  20523. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20524. // _this.$forceUpdate()
  20525. // }
  20526. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20527. } else {
  20528. _this.$message.warning(response.data.FunctionResponse.result);
  20529. }
  20530. _this.isOutlineTaskCancelToken[index] = null
  20531. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20532. }).catch(function (error) {
  20533. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20534. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20535. _this.isOutlineTaskCancelToken[index] = null
  20536. if(error && error.message != 'Request canceled by the user.'){
  20537. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20538. }
  20539. console.log(error);
  20540. });
  20541. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  20542. },
  20543. aiDetailgetAiContent(_uid, loading, _tindex2) {
  20544. try {
  20545. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20546. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20547. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20548. } catch(error){
  20549. console.log('EventSource error:', error);
  20550. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20551. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20552. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20553. this.isOutlineTaskCancelToken[_tindex2] = null
  20554. return;
  20555. }
  20556. let _allText = "";
  20557. let _mdText = "";
  20558. let _iindex = 0
  20559. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  20560. let _eData = JSON.parse(_e.data).content;
  20561. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20562. //对话已经完成
  20563. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20564. this.isOutlineTaskCancelSource[_tindex2].close();
  20565. this.isOutlineTaskCancelSource[_tindex2] = null;
  20566. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20567. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20568. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20569. this.isOutlineTaskCancelToken[_tindex2] = null
  20570. return;
  20571. } else {
  20572. _iindex++
  20573. //对话还在继续
  20574. let _text = "";
  20575. _text = _eData.replaceAll("'", "");
  20576. if (_allText == "") {
  20577. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20578. } else {
  20579. _allText += _text;
  20580. }
  20581. _mdText = _allText + "_";
  20582. _mdText = _mdText.replace(/\\n/g, "\n");
  20583. _mdText = _mdText.replace(/\\/g, "");
  20584. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20585. //转化返回的回复流数据.
  20586. if(_iindex == 10){
  20587. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20588. _iindex = 0
  20589. }
  20590. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20591. // 处理流数据
  20592. }
  20593. // this.$forceUpdate();
  20594. };
  20595. let _this = _this
  20596. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  20597. // 处理错误,可以尝试重新连接
  20598. console.log('EventSource error:', event);
  20599. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20600. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  20601. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  20602. _this.isOutlineTaskCancelToken[_tindex2] = null
  20603. _this.isOutlineTaskCancelSource[_tindex2].close();
  20604. _this.isOutlineTaskCancelSource[_tindex2] = null;
  20605. };
  20606. },
  20607. async aiOutlineDetail(msg, index) {
  20608. let _this = this
  20609. const _tindex = 'task-' + index
  20610. const _tindex2 = index
  20611. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20612. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20613. if (_this.infoData.length) {
  20614. for (var i = 0; i < _this.infoData.length; i++) {
  20615. if(_this.infoData[i].fileid){
  20616. fileid.push(_this.infoData[i].fileid)
  20617. }else {
  20618. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20619. if(_fileid){
  20620. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20621. _this.$forceUpdate();
  20622. if(_fileid != 1){
  20623. fileid.push(_fileid)
  20624. }
  20625. }
  20626. }
  20627. }
  20628. }
  20629. let url = []
  20630. if (this.infoData.length) {
  20631. for (var i = 0; i < this.infoData.length; i++) {
  20632. url.push(this.infoData[i].url)
  20633. }
  20634. }
  20635. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  20636. let messages = `NOTICE
  20637. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  20638. Language: ${this.getLang()}
  20639. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20640. Instruction: Based on the context, follow "Format example", write content.
  20641. #Context
  20642. ## 要求
  20643. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  20644. ## 参考信息
  20645. 课程名字:${_this.courseName}
  20646. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20647. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20648. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20649. # Format example
  20650. 子任务名称:名称应该总结了该任务是在做什么,
  20651. 子任务设计:任务设计。
  20652. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  20653. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  20654. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  20655. `
  20656. // 教学目标:教学目标。
  20657. // 任务设计:任务设计。
  20658. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  20659. // -------- #补充参考资料和
  20660. // ## 补充参考资料
  20661. // - 补充资料:${url.join(",")}
  20662. // - 补充描述:${_this.courseText2}
  20663. _this.taskDetailLoading.push(_tindex)
  20664. _this.ttaskDetailLoading.push(_tindex)
  20665. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20666. let _uuid = uuidv4();
  20667. // let params = JSON.stringify({
  20668. // // "model": "Chat",
  20669. // model: 'gpt-3.5-turbo',
  20670. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20671. // max_tokens: 4096,
  20672. // top_p: 1,
  20673. // frequency_penalty: 0,
  20674. // presence_penalty: 0,
  20675. // messages: [{
  20676. // content: messages,
  20677. // role: 'user'
  20678. // }],
  20679. // uid: _uuid,
  20680. // mind_map_question: "",
  20681. // })
  20682. let params = {
  20683. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20684. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20685. session_name: _uuid,
  20686. userId: _this.userid,
  20687. uid: _uuid,
  20688. file_ids: fileid.length ? [...fileid] : '',
  20689. model: 'gpt-4o-2024-08-06',
  20690. temperature: this.mode == 3 ? 0.5 : 0.1,
  20691. }
  20692. // let params = JSON.stringify({
  20693. // message: {
  20694. // anthropic_version: "bedrock-2023-05-31",
  20695. // max_tokens: 4096,
  20696. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20697. // top_p: 1,
  20698. // messages: [{
  20699. // "role": "user",
  20700. // "content": messages
  20701. // }] ,
  20702. // },
  20703. // uid: _uuid,
  20704. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20705. // });
  20706. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20707. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20708. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20709. console.log(response);
  20710. // let data = response.data.FunctionResponse
  20711. // if (data.choices && data.choices.length && data.choices[0].message) {
  20712. // console.log(data.choices[0].message.content);
  20713. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20714. // _this.$forceUpdate()
  20715. // }
  20716. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20717. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  20718. } else {
  20719. _this.$message.warning(response.data.FunctionResponse.result);
  20720. }
  20721. _this.isOutlineTaskCancelToken[index] = null
  20722. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20723. }).catch(function (error) {
  20724. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20725. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20726. _this.isOutlineTaskCancelToken[index] = null
  20727. if(error && error.message != 'Request canceled by the user.'){
  20728. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20729. }
  20730. console.log(error);
  20731. });
  20732. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  20733. },
  20734. async aiOutlineDetail2(msg, index) {
  20735. let _this = this
  20736. const _tindex = 'task-' + index
  20737. const _tindex2 = index
  20738. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20739. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20740. if (_this.infoData.length) {
  20741. for (var i = 0; i < _this.infoData.length; i++) {
  20742. if(_this.infoData[i].fileid){
  20743. fileid.push(_this.infoData[i].fileid)
  20744. }else {
  20745. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20746. if(_fileid){
  20747. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20748. _this.$forceUpdate();
  20749. if(_fileid != 1){
  20750. fileid.push(_fileid)
  20751. }
  20752. }
  20753. }
  20754. }
  20755. }
  20756. let url = []
  20757. if (this.infoData.length) {
  20758. for (var i = 0; i < this.infoData.length; i++) {
  20759. url.push(this.infoData[i].url)
  20760. }
  20761. }
  20762. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  20763. let taskArray = []
  20764. let taskArrayD = []
  20765. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  20766. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  20767. if(k != index){
  20768. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  20769. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  20770. }
  20771. }
  20772. let messages = `NOTICE
  20773. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  20774. Language: ${this.getLang()}
  20775. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20776. Instruction: Based on the context, follow "Format example", write content.
  20777. #Context
  20778. ## 要求
  20779. ${msg}
  20780. ## 参考信息
  20781. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20782. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20783. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20784. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  20785. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  20786. # Format example
  20787. **子任务标题**:环节+子任务名称
  20788. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  20789. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  20790. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  20791. `
  20792. // 教学目标:教学目标。
  20793. // 任务设计:任务设计。
  20794. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  20795. // -------- #补充参考资料和
  20796. // ## 补充参考资料
  20797. // - 补充资料:${url.join(",")}
  20798. // - 补充描述:${_this.courseText2}
  20799. _this.taskDetailLoading.push(_tindex)
  20800. _this.ttaskDetailLoading.push(_tindex)
  20801. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20802. let _uuid = uuidv4();
  20803. // let params = JSON.stringify({
  20804. // // "model": "Chat",
  20805. // model: 'gpt-3.5-turbo',
  20806. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20807. // max_tokens: 4096,
  20808. // top_p: 1,
  20809. // frequency_penalty: 0,
  20810. // presence_penalty: 0,
  20811. // messages: [{
  20812. // content: messages,
  20813. // role: 'user'
  20814. // }],
  20815. // uid: _uuid,
  20816. // mind_map_question: "",
  20817. // })
  20818. let params = {
  20819. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20820. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  20821. session_name: _uuid,
  20822. userId: _this.userid,
  20823. uid: _uuid,
  20824. file_ids: fileid.length ? [...fileid] : '',
  20825. model: 'gpt-4o-2024-08-06',
  20826. temperature: this.mode == 3 ? 0.5 : 0.1,
  20827. }
  20828. // let params = JSON.stringify({
  20829. // message: {
  20830. // anthropic_version: "bedrock-2023-05-31",
  20831. // max_tokens: 4096,
  20832. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20833. // top_p: 1,
  20834. // messages: [{
  20835. // "role": "user",
  20836. // "content": messages
  20837. // }] ,
  20838. // },
  20839. // uid: _uuid,
  20840. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20841. // });
  20842. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20843. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20844. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20845. console.log(response);
  20846. // let data = response.data.FunctionResponse
  20847. // if (data.choices && data.choices.length && data.choices[0].message) {
  20848. // console.log(data.choices[0].message.content);
  20849. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20850. // _this.$forceUpdate()
  20851. // }
  20852. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20853. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  20854. } else {
  20855. _this.$message.warning(response.data.FunctionResponse.result);
  20856. }
  20857. _this.isOutlineTaskCancelToken[index] = null
  20858. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20859. }).catch(function (error) {
  20860. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20861. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20862. _this.isOutlineTaskCancelToken[index] = null
  20863. if(error && error.message != 'Request canceled by the user.'){
  20864. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20865. }
  20866. console.log(error);
  20867. });
  20868. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  20869. },
  20870. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  20871. try {
  20872. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20873. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20874. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20875. } catch(error) {
  20876. console.log('EventSource error:', error);
  20877. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20878. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20879. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20880. this.isOutlineTaskCancelToken[_tindex2] = null
  20881. return;
  20882. }
  20883. let _allText = "";
  20884. let _mdText = "";
  20885. let _iindex = 0
  20886. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  20887. let _eData = JSON.parse(_e.data).content;
  20888. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20889. //对话已经完成
  20890. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20891. this.isOutlineTaskCancelSource[_tindex2].close();
  20892. this.isOutlineTaskCancelSource[_tindex2] = null;
  20893. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20894. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  20895. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  20896. }
  20897. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20898. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20899. this.isOutlineTaskCancelToken[_tindex2] = null
  20900. return;
  20901. } else {
  20902. _iindex++
  20903. //对话还在继续
  20904. let _text = "";
  20905. _text = _eData.replaceAll("'", "");
  20906. if (_allText == "") {
  20907. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20908. } else {
  20909. _allText += _text;
  20910. }
  20911. _mdText = _allText + "_";
  20912. _mdText = _mdText.replace(/\\n/g, "\n");
  20913. _mdText = _mdText.replace(/\\/g, "");
  20914. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20915. //转化返回的回复流数据.
  20916. if(_iindex == 10){
  20917. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20918. _iindex = 0
  20919. }
  20920. if(this.taskDetailLoading.indexOf(loading) !== -1){
  20921. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20922. }
  20923. // 处理流数据
  20924. }
  20925. // this.$forceUpdate();
  20926. };
  20927. let _this = this
  20928. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  20929. // 处理错误,可以尝试重新连接
  20930. console.log('EventSource error:', event);
  20931. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20932. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  20933. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  20934. _this.isOutlineTaskCancelToken[_tindex2] = null
  20935. _this.isOutlineTaskCancelSource[_tindex2].close();
  20936. _this.isOutlineTaskCancelSource[_tindex2] = null;
  20937. };
  20938. },
  20939. async aiDetail2(msg, index) {
  20940. let _this = this
  20941. const _tindex = 'task-' + index
  20942. const _tindex2 = index
  20943. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20944. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20945. if (_this.infoData.length) {
  20946. for (var i = 0; i < _this.infoData.length; i++) {
  20947. if(_this.infoData[i].fileid){
  20948. fileid.push(_this.infoData[i].fileid)
  20949. }else {
  20950. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20951. if(_fileid){
  20952. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20953. _this.$forceUpdate();
  20954. if(_fileid != 1){
  20955. fileid.push(_fileid)
  20956. }
  20957. }
  20958. }
  20959. }
  20960. }
  20961. let messages = `NOTICE
  20962. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  20963. Language: ${this.getLang()}
  20964. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20965. Instruction: Based on the context, follow "Format example", write content.
  20966. #Context
  20967. ## 要求
  20968. ${msg}
  20969. ## 参考资料
  20970. 任务名字: ${_this.aiCallBack.task}
  20971. ## 优化信息
  20972. ${_this.aiCallBack.taskDetail}
  20973. # Format example
  20974. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  20975. _this.taskDetailLoading2.push(_tindex)
  20976. _this.ttaskDetailLoading2.push(_tindex)
  20977. let _uuid = uuidv4();
  20978. // let params = JSON.stringify({
  20979. // // "model": "Chat",
  20980. // model: 'gpt-3.5-turbo',
  20981. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20982. // max_tokens: 4096,
  20983. // top_p: 1,
  20984. // frequency_penalty: 0,
  20985. // presence_penalty: 0,
  20986. // messages: [{
  20987. // content: messages,
  20988. // role: 'user'
  20989. // }],
  20990. // uid: _uuid,
  20991. // mind_map_question: "",
  20992. // })
  20993. let params = {
  20994. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20995. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  20996. session_name: _uuid,
  20997. userId: _this.userid,
  20998. uid: _uuid,
  20999. file_ids: fileid.length ? [...fileid] : '',
  21000. model: 'gpt-4o-2024-08-06',
  21001. temperature: this.mode == 3 ? 0.5 : 0.1,
  21002. }
  21003. // let params = JSON.stringify({
  21004. // message: {
  21005. // anthropic_version: "bedrock-2023-05-31",
  21006. // max_tokens: 4096,
  21007. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21008. // top_p: 1,
  21009. // messages: [{
  21010. // "role": "user",
  21011. // "content": messages
  21012. // }] ,
  21013. // },
  21014. // uid: _uuid,
  21015. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21016. // });
  21017. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21018. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21019. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21020. console.log(response);
  21021. // let data = response.data.FunctionResponse
  21022. // if (data.choices && data.choices.length && data.choices[0].message) {
  21023. // console.log(data.choices[0].message.content);
  21024. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21025. // _this.$forceUpdate()
  21026. // }
  21027. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21028. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21029. } else {
  21030. _this.$message.warning(response.data.FunctionResponse.result);
  21031. }
  21032. }).catch(function (error) {
  21033. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  21034. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  21035. if(error && error.message != 'Request canceled by the user.'){
  21036. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21037. }
  21038. console.log(error);
  21039. });
  21040. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  21041. },
  21042. aiDetail2getAiContent(_uid, loading, _tindex2) {
  21043. let _source;
  21044. try {
  21045. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21046. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21047. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21048. } catch(error) {
  21049. console.log('EventSource error:', error);
  21050. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21051. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  21052. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  21053. return;
  21054. }
  21055. let _allText = "";
  21056. let _mdText = "";
  21057. let _iindex = 0
  21058. _source.onmessage = _e => {
  21059. let _eData = JSON.parse(_e.data).content;
  21060. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21061. //对话已经完成
  21062. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21063. _source.close();
  21064. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  21065. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  21066. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  21067. return;
  21068. } else {
  21069. _iindex++
  21070. //对话还在继续
  21071. let _text = "";
  21072. _text = _eData.replaceAll("'", "");
  21073. if (_allText == "") {
  21074. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21075. } else {
  21076. _allText += _text;
  21077. }
  21078. _mdText = _allText + "_";
  21079. _mdText = _mdText.replace(/\\n/g, "\n");
  21080. _mdText = _mdText.replace(/\\/g, "");
  21081. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21082. //转化返回的回复流数据
  21083. if(_iindex == 10){
  21084. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  21085. _iindex = 0
  21086. }
  21087. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  21088. // 处理流数据
  21089. }
  21090. // this.$forceUpdate();
  21091. };
  21092. let _this = this
  21093. _source.onerror = function(event) {
  21094. // 处理错误,可以尝试重新连接
  21095. console.log('EventSource error:', event);
  21096. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21097. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  21098. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  21099. _source.close();
  21100. };
  21101. },
  21102. async aiDetail3(msg, index, tindex) {
  21103. let _this = this
  21104. const _tindex = 'task-' + index + tindex
  21105. const _tindex2 = index
  21106. const _tindex3 = tindex
  21107. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21108. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21109. if (_this.infoData.length) {
  21110. for (var i = 0; i < _this.infoData.length; i++) {
  21111. if(_this.infoData[i].fileid){
  21112. fileid.push(_this.infoData[i].fileid)
  21113. }else {
  21114. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21115. if(_fileid){
  21116. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21117. _this.$forceUpdate();
  21118. if(_fileid != 1){
  21119. fileid.push(_fileid)
  21120. }
  21121. }
  21122. }
  21123. }
  21124. }
  21125. // **重点考虑该任务及工具名和工具内容的情况下*
  21126. let messages = `NOTICE
  21127. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  21128. Language: ${this.getLang()}
  21129. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21130. Instruction: Based on the context, follow "Format example", write content.
  21131. #Context
  21132. ## 参考内容
  21133. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21134. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  21135. 工具名称:${_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 : '无'}
  21136. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  21137. ## 要求
  21138. ${msg} 输出格式和内容要求参考#格式与要求
  21139. # Format example
  21140. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  21141. _this.taskDetailLoading3.push(_tindex)
  21142. _this.ttaskDetailLoading3.push(_tindex)
  21143. let _uuid = uuidv4();
  21144. // let params = JSON.stringify({
  21145. // // "model": "Chat",
  21146. // model: 'gpt-3.5-turbo',
  21147. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21148. // max_tokens: 4096,
  21149. // top_p: 1,
  21150. // frequency_penalty: 0,
  21151. // presence_penalty: 0,
  21152. // messages: [{
  21153. // content: messages,
  21154. // role: 'user'
  21155. // }],
  21156. // uid: _uuid,
  21157. // mind_map_question: "",
  21158. // })
  21159. let params = {
  21160. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21161. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21162. session_name: _uuid,
  21163. userId: _this.userid,
  21164. uid: _uuid,
  21165. file_ids: fileid.length ? [...fileid] : '',
  21166. model: 'gpt-4o-2024-08-06',
  21167. temperature: this.mode == 3 ? 0.5 : 0.1,
  21168. }
  21169. // let params = JSON.stringify({
  21170. // message: {
  21171. // anthropic_version: "bedrock-2023-05-31",
  21172. // max_tokens: 4096,
  21173. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21174. // top_p: 1,
  21175. // messages: [{
  21176. // "role": "user",
  21177. // "content": messages
  21178. // }] ,
  21179. // },
  21180. // uid: _uuid,
  21181. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21182. // });
  21183. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21184. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21185. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21186. console.log(response);
  21187. let data = response.data.FunctionResponse
  21188. // if (data.choices && data.choices.length && data.choices[0].message) {
  21189. // console.log(data.choices[0].message.content);
  21190. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  21191. // _this.$forceUpdate()
  21192. // }
  21193. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  21194. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21195. } else {
  21196. _this.$message.warning(response.data.FunctionResponse.result);
  21197. }
  21198. }).catch(function (error) {
  21199. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  21200. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  21201. if(error && error.message != 'Request canceled by the user.'){
  21202. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21203. }
  21204. console.log(error);
  21205. });
  21206. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  21207. },
  21208. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  21209. let _source;
  21210. try {
  21211. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21212. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21213. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21214. } catch(error) {
  21215. console.log('EventSource error:', event);
  21216. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21217. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  21218. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  21219. return;
  21220. }
  21221. let _allText = "";
  21222. let _mdText = "";
  21223. let _iindex = 0
  21224. _source.onmessage = _e => {
  21225. let _eData = JSON.parse(_e.data).content;
  21226. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21227. //对话已经完成
  21228. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21229. _source.close();
  21230. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  21231. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  21232. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  21233. return;
  21234. } else {
  21235. _iindex++
  21236. //对话还在继续
  21237. let _text = "";
  21238. _text = _eData.replaceAll("'", "");
  21239. if (_allText == "") {
  21240. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21241. } else {
  21242. _allText += _text;
  21243. }
  21244. _mdText = _allText + "_";
  21245. _mdText = _mdText.replace(/\\n/g, "\n");
  21246. _mdText = _mdText.replace(/\\/g, "");
  21247. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21248. //转化返回的回复流数据
  21249. if(_iindex == 10){
  21250. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  21251. _iindex = 0
  21252. }
  21253. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  21254. // 处理流数据
  21255. }
  21256. // this.$forceUpdate();
  21257. };
  21258. let _this = this
  21259. _source.onerror = function(event) {
  21260. // 处理错误,可以尝试重新连接
  21261. console.log('EventSource error:', event);
  21262. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21263. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  21264. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  21265. _source.close();
  21266. };
  21267. },
  21268. async aiDetail4(msg, index) {
  21269. if (!msg.length) {
  21270. this.$message.error("请添加评价后才能优化")
  21271. return
  21272. }
  21273. let _this = this
  21274. const _tindex = 'task-' + index
  21275. const _tindex2 = index
  21276. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21277. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21278. if (_this.infoData.length) {
  21279. for (var i = 0; i < _this.infoData.length; i++) {
  21280. if(_this.infoData[i].fileid){
  21281. fileid.push(_this.infoData[i].fileid)
  21282. }else {
  21283. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21284. if(_fileid){
  21285. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21286. _this.$forceUpdate();
  21287. if(_fileid != 1){
  21288. fileid.push(_fileid)
  21289. }
  21290. }
  21291. }
  21292. }
  21293. }
  21294. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  21295. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  21296. if(_this.pingjiaInfoData[index][i].fileid){
  21297. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  21298. }
  21299. }
  21300. }
  21301. var _text = ""
  21302. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  21303. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  21304. // _text += `评价维度:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 维度描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} 目标:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].target ? _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].target : ''} `
  21305. _text += `目标:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].value} 评价标准:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].detail} 核心素养:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].target ? _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList[i].target : ''} `
  21306. }
  21307. }
  21308. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  21309. // **重点考虑该任务详情**
  21310. // let messages = `
  21311. // Language: ${this.getLang()}
  21312. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  21313. // #Context
  21314. // ## 参考内容
  21315. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21316. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  21317. // 评价设计:${_text}
  21318. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21319. // ## 要求
  21320. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  21321. // # 格式与要求
  21322. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  21323. // # Format example
  21324. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  21325. let messages = `
  21326. Language: ${this.getLang()}
  21327. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  21328. #Context
  21329. ## 参考内容
  21330. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21331. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  21332. ${_text ? '评价设计:'+_text : ''}
  21333. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21334. ## 要求
  21335. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  21336. # 格式与要求
  21337. 核心素养:从教案中提取
  21338. 目标:从教案中提取
  21339. 评价标准:从教案中提取评价标准
  21340. # Format example
  21341. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  21342. _this.taskDetailLoading4.push(_tindex)
  21343. // let params = JSON.stringify({
  21344. // // "model": "Chat",
  21345. // model: 'gpt-3.5-turbo',
  21346. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21347. // max_tokens: 4096,
  21348. // top_p: 1,
  21349. // frequency_penalty: 0,
  21350. // presence_penalty: 0,
  21351. // messages: [{
  21352. // content: messages,
  21353. // role: 'user'
  21354. // }],
  21355. // stream: false,
  21356. // uid: this.userid,
  21357. // mind_map_question: "",
  21358. // })
  21359. let params = {
  21360. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21361. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21362. session_name: uuidv4(),
  21363. userId: _this.userid,
  21364. file_ids: fileid.length ? [...fileid] : '',
  21365. model: 'gpt-4o-2024-08-06',
  21366. temperature: this.mode == 3 ? 0.5 : 0.1,
  21367. }
  21368. // let params = JSON.stringify({
  21369. // message: {
  21370. // anthropic_version: "bedrock-2023-05-31",
  21371. // max_tokens: 4096,
  21372. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21373. // top_p: 1,
  21374. // messages: [{
  21375. // content: messages,
  21376. // role: 'user'
  21377. // }], //
  21378. // },
  21379. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21380. // });
  21381. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21382. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  21383. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21384. console.log(response);
  21385. let data = response.data.FunctionResponse
  21386. // if (data.choices && data.choices.length && data.choices[0].message) {
  21387. // console.log(data.choices[0].message.content);
  21388. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  21389. // _this.$forceUpdate()
  21390. // }
  21391. if (data.message) {
  21392. console.log(data.message);
  21393. try {
  21394. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  21395. } catch (e) {
  21396. console.log("error_________________" + e);
  21397. // _this.$message.error(data.message)
  21398. try {
  21399. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21400. let match = data.message.match(regex);
  21401. let elist = JSON.parse(match[0])
  21402. elist = elist.filter(el=>{
  21403. el.isai = 1
  21404. return el
  21405. })
  21406. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  21407. // var message = data.message;
  21408. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21409. // var jsonEnd = message.indexOf("```", jsonStart);
  21410. // if (jsonStart !== -1 && jsonEnd !== -1) {
  21411. // var jsonString = message
  21412. // .substring(jsonStart, jsonEnd)
  21413. // .trim();
  21414. // var _data2 = JSON.parse(jsonString);
  21415. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  21416. // }
  21417. } catch (error) {
  21418. }
  21419. }
  21420. _this.$forceUpdate()
  21421. }
  21422. // if (data.result) {
  21423. // console.log(data.result);
  21424. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  21425. // _this.$forceUpdate()
  21426. // }
  21427. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21428. }).catch(function (error) {
  21429. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21430. if(error && error.message != 'Request canceled by the user.'){
  21431. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21432. }
  21433. console.log(error);
  21434. });
  21435. },
  21436. async aiDetail5(msg, index) {
  21437. let _this = this
  21438. const _tindex = 'task-' + index
  21439. const _tindex2 = index
  21440. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21441. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21442. if (_this.infoData.length) {
  21443. for (var i = 0; i < _this.infoData.length; i++) {
  21444. if(_this.infoData[i].fileid){
  21445. fileid.push(_this.infoData[i].fileid)
  21446. }else {
  21447. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21448. if(_fileid){
  21449. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21450. _this.$forceUpdate();
  21451. if(_fileid != 1){
  21452. fileid.push(_fileid)
  21453. }
  21454. }
  21455. }
  21456. }
  21457. }
  21458. let url = []
  21459. if (this.infoData.length) {
  21460. for (var i = 0; i < this.infoData.length; i++) {
  21461. url.push(this.infoData[i].url)
  21462. }
  21463. }
  21464. var _text = ""
  21465. var _text2 = ""
  21466. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  21467. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  21468. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  21469. }
  21470. let messages = `
  21471. Language: ${this.getLang()}
  21472. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  21473. --------
  21474. ## 要求
  21475. ${msg}
  21476. -------
  21477. ## 本教案描述
  21478. ${_this.aiCallBack}
  21479. -------
  21480. ## 课程大纲
  21481. ${_text}
  21482. -------
  21483. ## 其他教学任务教案
  21484. ${_text2}`
  21485. // ## 补充参考资料
  21486. // - 补充资料:${url.join(",")}
  21487. // - 补充描述:${this.courseText2}
  21488. _this.taskDetailLoading5.push(_tindex)
  21489. _this.ttaskDetailLoading5.push(_tindex)
  21490. let _uuid = uuidv4();
  21491. // let params = JSON.stringify({
  21492. // // "model": "Chat",
  21493. // model: 'gpt-3.5-turbo',
  21494. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21495. // max_tokens: 4096,
  21496. // top_p: 1,
  21497. // frequency_penalty: 0,
  21498. // presence_penalty: 0,
  21499. // messages: [{
  21500. // content: messages,
  21501. // role: 'user'
  21502. // }],
  21503. // uid: _uuid,
  21504. // mind_map_question: "",
  21505. // })
  21506. let params = {
  21507. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21508. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21509. session_name: _uuid,
  21510. userId: _this.userid,
  21511. uid: _uuid,
  21512. file_ids: fileid.length ? [...fileid] : '',
  21513. model: 'gpt-4o-2024-08-06',
  21514. temperature: this.mode == 3 ? 0.5 : 0.1,
  21515. }
  21516. // let params = JSON.stringify({
  21517. // message: {
  21518. // anthropic_version: "bedrock-2023-05-31",
  21519. // max_tokens: 4096,
  21520. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21521. // top_p: 1,
  21522. // messages: [{
  21523. // "role": "user",
  21524. // "content": messages
  21525. // }] ,
  21526. // },
  21527. // uid: _uuid,
  21528. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21529. // });
  21530. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21531. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21532. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21533. console.log(response);
  21534. // let data = response.data.FunctionResponse
  21535. // if (data.choices && data.choices.length && data.choices[0].message) {
  21536. // console.log(data.choices[0].message.content);
  21537. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21538. // _this.$forceUpdate()
  21539. // }
  21540. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21541. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21542. } else {
  21543. _this.$message.warning(response.data.FunctionResponse.result);
  21544. }
  21545. }).catch(function (error) {
  21546. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  21547. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21548. }
  21549. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  21550. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21551. }
  21552. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21553. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21554. if(error && error.message != 'Request canceled by the user.'){
  21555. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21556. }
  21557. console.log(error);
  21558. });
  21559. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  21560. },
  21561. aiDetail5getAiContent(_uid, loading, _tindex2) {
  21562. let _source;
  21563. try {
  21564. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21565. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21566. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21567. } catch(error){
  21568. console.log('EventSource error:', error);
  21569. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21570. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21571. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21572. }
  21573. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21574. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21575. }
  21576. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21577. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21578. return;
  21579. }
  21580. let _allText = "";
  21581. let _mdText = "";
  21582. let _iindex = 0
  21583. _source.onmessage = _e => {
  21584. let _eData = JSON.parse(_e.data).content;
  21585. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21586. //对话已经完成
  21587. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21588. _source.close();
  21589. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21590. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21591. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21592. }
  21593. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21594. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21595. }
  21596. return;
  21597. } else {
  21598. _iindex++
  21599. //对话还在继续
  21600. let _text = "";
  21601. _text = _eData.replaceAll("'", "");
  21602. if (_allText == "") {
  21603. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21604. } else {
  21605. _allText += _text;
  21606. }
  21607. _mdText = _allText + "_";
  21608. _mdText = _mdText.replace(/\\n/g, "\n");
  21609. _mdText = _mdText.replace(/\\/g, "");
  21610. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21611. //转化返回的回复流数据
  21612. if(_iindex == 10){
  21613. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21614. _iindex = 0
  21615. }
  21616. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  21617. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21618. }
  21619. // 处理流数据
  21620. }
  21621. // this.$forceUpdate();
  21622. };
  21623. let _this = this
  21624. _source.onerror = function(event) {
  21625. // 处理错误,可以尝试重新连接
  21626. console.log('EventSource error:', event);
  21627. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21628. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  21629. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  21630. }
  21631. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  21632. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  21633. }
  21634. _source.close();
  21635. };
  21636. },
  21637. async aiDetail52(msg, index, callback) {
  21638. let _this = this
  21639. const _tindex = 'task-' + index
  21640. const _tindex2 = index
  21641. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21642. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21643. if (_this.infoData.length) {
  21644. for (var i = 0; i < _this.infoData.length; i++) {
  21645. if(_this.infoData[i].fileid){
  21646. fileid.push(_this.infoData[i].fileid)
  21647. }else {
  21648. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21649. if(_fileid){
  21650. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21651. _this.$forceUpdate();
  21652. if(_fileid != 1){
  21653. fileid.push(_fileid)
  21654. }
  21655. }
  21656. }
  21657. }
  21658. }
  21659. let url = []
  21660. if (this.infoData.length) {
  21661. for (var i = 0; i < this.infoData.length; i++) {
  21662. url.push(this.infoData[i].url)
  21663. }
  21664. }
  21665. let taskN = []
  21666. let taskD = []
  21667. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  21668. if(_tindex2 != ti){
  21669. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  21670. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  21671. }
  21672. }
  21673. let messages = `NOTICE
  21674. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  21675. Language: ${this.getLang()}
  21676. ATTENTION: follow "Language"
  21677. #Context
  21678. ## 要求
  21679. ${msg}
  21680. ## 补充描述
  21681. 课程简要描述:${_this.courseText}
  21682. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21683. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  21684. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  21685. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21686. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  21687. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21688. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21689. `
  21690. // ## 补充参考资料
  21691. // - 补充资料:${url.join(",")}
  21692. // - 补充描述:${this.courseText2}
  21693. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  21694. _this.taskDetailLoading5.push(_tindex)
  21695. }
  21696. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  21697. _this.ttaskDetailLoading5.push(_tindex)
  21698. }
  21699. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  21700. let _uuid = uuidv4();
  21701. // let params = JSON.stringify({
  21702. // // "model": "Chat",
  21703. // model: 'gpt-3.5-turbo',
  21704. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21705. // max_tokens: 4096,
  21706. // top_p: 1,
  21707. // frequency_penalty: 0,
  21708. // presence_penalty: 0,
  21709. // messages: [{
  21710. // content: messages,
  21711. // role: 'user'
  21712. // }],
  21713. // uid: _uuid,
  21714. // mind_map_question: "",
  21715. // })
  21716. let params = {
  21717. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21718. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21719. session_name: _uuid,
  21720. userId: _this.userid,
  21721. uid: _uuid,
  21722. file_ids: fileid.length ? [...fileid] : '',
  21723. model: 'gpt-4o-2024-08-06',
  21724. temperature: this.mode == 3 ? 0.5 : 0.1,
  21725. }
  21726. // let params = JSON.stringify({
  21727. // message: {
  21728. // anthropic_version: "bedrock-2023-05-31",
  21729. // max_tokens: 4096,
  21730. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21731. // top_p: 1,
  21732. // messages: [{
  21733. // "role": "user",
  21734. // "content": messages
  21735. // }] ,
  21736. // },
  21737. // uid: _uuid,
  21738. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21739. // });
  21740. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21741. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  21742. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21743. console.log(response);
  21744. // let data = response.data.FunctionResponse
  21745. // if (data.choices && data.choices.length && data.choices[0].message) {
  21746. // console.log(data.choices[0].message.content);
  21747. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21748. // _this.$forceUpdate()
  21749. // }
  21750. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21751. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21752. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  21753. } else {
  21754. _this.$message.warning(response.data.FunctionResponse.result);
  21755. }
  21756. _this.isTeacherTaskCancelToken2[index] = null
  21757. }).catch(function (error) {
  21758. if(error && error.message != 'Request canceled by the user.'){
  21759. _this.isTeacherTaskCancelToken2[index] = null
  21760. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  21761. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21762. }
  21763. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  21764. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21765. }
  21766. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21767. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21768. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21769. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21770. confirmButtonText: "确定",
  21771. cancelButtonText: "取消",
  21772. distinguishCancelAndClose: true,
  21773. type: "warning",
  21774. customClass: 'custom-confirm-box'
  21775. })
  21776. .then(() => {
  21777. _this.aiDetail52(msg, index, callback)
  21778. }).catch((v) => {
  21779. console.log(v);
  21780. callback ? callback() : ''
  21781. })
  21782. setTimeout(() => {
  21783. _this.setTipsIndex()
  21784. }, 500)
  21785. }
  21786. console.log(error);
  21787. });
  21788. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  21789. },
  21790. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  21791. try {
  21792. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21793. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21794. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21795. } catch(error) {
  21796. console.log('EventSource error:', error);
  21797. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21798. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21799. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21800. }
  21801. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21802. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21803. }
  21804. this.isTeacherTaskCancelToken2[_tindex2] = null
  21805. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21806. confirmButtonText: "确定",
  21807. cancelButtonText: "取消",
  21808. distinguishCancelAndClose: true,
  21809. type: "warning",
  21810. customClass: 'custom-confirm-box'
  21811. })
  21812. .then(() => {
  21813. _this.aiDetail52(msg, _tindex2, callback)
  21814. }).catch((v) => {
  21815. console.log(v);
  21816. callback ? callback() : ''
  21817. })
  21818. setTimeout(() => {
  21819. _this.setTipsIndex()
  21820. }, 500)
  21821. return;
  21822. }
  21823. let _allText = "";
  21824. let _mdText = "";
  21825. this.allTextArray[_tindex2] = ""
  21826. let _iindex = 0
  21827. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  21828. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  21829. let _eData = JSON.parse(_e.data).content;
  21830. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21831. //对话已经完成
  21832. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21833. this.isTeacherTaskCancelSource[_tindex2].close();
  21834. this.isTeacherTaskCancelSource[_tindex2] = null;
  21835. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21836. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21837. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21838. }
  21839. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21840. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21841. }
  21842. this.isTeacherTaskCancelToken2[_tindex2] = null
  21843. callback ? callback() : ''
  21844. return;
  21845. } else {
  21846. _iindex++
  21847. //对话还在继续
  21848. let _text = "";
  21849. _text = _eData.replaceAll("'", "");
  21850. if (_allText == "") {
  21851. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21852. } else {
  21853. _allText += _text;
  21854. }
  21855. _mdText = _allText + "_";
  21856. _mdText = _mdText.replace(/\\n/g, "\n");
  21857. _mdText = _mdText.replace(/\\/g, "");
  21858. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21859. //转化返回的回复流数据
  21860. if(_iindex == 10){
  21861. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21862. _iindex = 0
  21863. }
  21864. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  21865. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21866. }
  21867. // 处理流数据
  21868. }
  21869. };
  21870. let _this = this
  21871. _this.isTeacherTaskCancelSource.onerror = function(event) {
  21872. // 处理错误,可以尝试重新连接
  21873. console.log('EventSource error:', event);
  21874. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21875. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  21876. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  21877. }
  21878. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  21879. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  21880. }
  21881. _this.isTeacherTaskCancelSource[_tindex2].close();
  21882. _this.isTeacherTaskCancelSource[_tindex2] = null;
  21883. _this.isTeacherTaskCancelToken2[_tindex2] = null
  21884. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21885. confirmButtonText: "确定",
  21886. cancelButtonText: "取消",
  21887. distinguishCancelAndClose: true,
  21888. type: "warning",
  21889. customClass: 'custom-confirm-box'
  21890. })
  21891. .then(() => {
  21892. _this.aiDetail52(msg, _tindex2, callback)
  21893. }).catch((v) => {
  21894. console.log(v);
  21895. callback ? callback() : ''
  21896. })
  21897. setTimeout(() => {
  21898. _this.setTipsIndex()
  21899. }, 500)
  21900. };
  21901. },
  21902. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  21903. let _mdText = "";
  21904. let _eData = JSON.parse(_e.data).content;
  21905. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21906. //对话已经完成
  21907. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21908. _source.close();
  21909. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21910. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21911. return;
  21912. } else {
  21913. //对话还在继续
  21914. let _text = "";
  21915. _text = _eData.replaceAll("'", "");
  21916. if (this.allTextArray[_tindex2] == "") {
  21917. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21918. } else {
  21919. this.allTextArray[_tindex2] += _text;
  21920. }
  21921. _mdText = this.allTextArray[_tindex2] + "_";
  21922. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  21923. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  21924. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  21925. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  21926. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21927. // 处理流数据
  21928. }
  21929. },
  21930. async aiCpote(msg, callback) {
  21931. let _this = this
  21932. let _index = _this.aitype.replace("aiC","c")
  21933. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21934. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21935. if (_this.infoData.length) {
  21936. for (var i = 0; i < _this.infoData.length; i++) {
  21937. if(_this.infoData[i].fileid){
  21938. fileid.push(_this.infoData[i].fileid)
  21939. }else {
  21940. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21941. if(_fileid){
  21942. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21943. _this.$forceUpdate();
  21944. if(_fileid != 1){
  21945. fileid.push(_fileid)
  21946. }
  21947. }
  21948. }
  21949. }
  21950. }
  21951. let sub = []
  21952. if (this.courseTypeId.length) {
  21953. for (var i = 0; i < this.courseTypeId.length; i++) {
  21954. let _sid = this.courseTypeId[i]
  21955. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21956. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21957. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21958. }
  21959. }
  21960. }
  21961. }
  21962. let mclass = []
  21963. if (this.courseTypeId.length) {
  21964. for (var i = 0; i < this.courseTypeId.length; i++) {
  21965. let _sid = this.courseTypeId[i]
  21966. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21967. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21968. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21969. }
  21970. }
  21971. }
  21972. }
  21973. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  21974. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  21975. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  21976. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  21977. let messages = `NOTICE
  21978. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  21979. Language: ${this.getLang()}
  21980. ATTENTION: follow "Language"
  21981. ${msg}
  21982. ## 课程简介
  21983. 课程名字:${this.courseName}
  21984. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21985. ${sub.length ? '学科:' + sub.join(",") : ''}
  21986. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21987. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21988. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  21989. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  21990. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  21991. _this.cpoteLoading[_index] = true
  21992. _this.cpotetLoading[_index] = true
  21993. let _uuid = uuidv4();
  21994. // let params = JSON.stringify({
  21995. // // "model": "Chat",
  21996. // model: 'gpt-3.5-turbo',
  21997. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21998. // max_tokens: 4096,
  21999. // top_p: 1,
  22000. // frequency_penalty: 0,
  22001. // presence_penalty: 0,
  22002. // messages: [{
  22003. // content: messages,
  22004. // role: 'user'
  22005. // }],
  22006. // uid: _uuid,
  22007. // mind_map_question: "",
  22008. // })
  22009. let params = {
  22010. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22011. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22012. session_name: _uuid,
  22013. userId: _this.userid,
  22014. uid: _uuid,
  22015. file_ids: fileid.length ? [...fileid] : '',
  22016. model: 'gpt-4o-2024-08-06',
  22017. temperature: this.mode == 3 ? 0.5 : 0.1,
  22018. }
  22019. // let params = JSON.stringify({
  22020. // message: {
  22021. // anthropic_version: "bedrock-2023-05-31",
  22022. // max_tokens: 4096,
  22023. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22024. // top_p: 1,
  22025. // messages: [{
  22026. // "role": "user",
  22027. // "content": messages
  22028. // }] ,
  22029. // },
  22030. // uid: _uuid,
  22031. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22032. // });
  22033. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22034. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  22035. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22036. console.log(response);
  22037. // let data = response.data.FunctionResponse
  22038. // if (data.choices && data.choices.length && data.choices[0].message) {
  22039. // console.log(data.choices[0].message.content);
  22040. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  22041. // _this.$forceUpdate()
  22042. // }
  22043. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  22044. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22045. } else {
  22046. _this.$message.warning(response.data.FunctionResponse.result);
  22047. }
  22048. }).catch(function (error) {
  22049. _this.cpoteLoading[_index] = false
  22050. _this.cpotetLoading[_index] = false
  22051. callback ? callback() : ''
  22052. if(error && error.message != 'Request canceled by the user.'){
  22053. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22054. }
  22055. console.log(error);
  22056. });
  22057. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  22058. },
  22059. aiCpotegetAiContent(_uid, loading, callback) {
  22060. let _source;
  22061. try {
  22062. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22063. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22064. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22065. } catch(error){
  22066. console.log('EventSource error:', error);
  22067. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22068. this.cpoteLoading[loading] = false
  22069. this.cpotetLoading[loading] = false
  22070. return;
  22071. }
  22072. let _allText = "";
  22073. let _mdText = "";
  22074. let _iindex = 0
  22075. _source.onmessage = _e => {
  22076. let _eData = JSON.parse(_e.data).content;
  22077. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22078. //对话已经完成
  22079. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22080. _source.close();
  22081. this.cpote[loading] = _mdText;
  22082. this.cpoteLoading[loading] = false
  22083. this.cpotetLoading[loading] = false
  22084. callback ? callback() : ''
  22085. return;
  22086. } else {
  22087. _iindex++
  22088. //对话还在继续
  22089. let _text = "";
  22090. _text = _eData.replaceAll("'", "");
  22091. if (_allText == "") {
  22092. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22093. } else {
  22094. _allText += _text;
  22095. }
  22096. _mdText = _allText + "_";
  22097. _mdText = _mdText.replace(/\\n/g, "\n");
  22098. _mdText = _mdText.replace(/\\/g, "");
  22099. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22100. //转化返回的回复流数据
  22101. if(_iindex == 10){
  22102. this.cpote[loading] = _mdText;
  22103. _iindex = 0
  22104. }
  22105. this.cpoteLoading[loading] = false
  22106. // 处理流数据
  22107. }
  22108. // this.$forceUpdate();
  22109. };
  22110. let _this = this
  22111. _source.onerror = function(event) {
  22112. // 处理错误,可以尝试重新连接
  22113. console.log('EventSource error:', event);
  22114. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22115. _this.cpoteLoading[loading] = false
  22116. _this.cpotetLoading[loading] = false
  22117. _source.close();
  22118. };
  22119. },
  22120. async aiteacherTextDetail(msg) {
  22121. let _this = this
  22122. let fileid = []
  22123. if (_this.teacherInfoData.length) {
  22124. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  22125. if(_this.teacherInfoData[i].fileid){
  22126. fileid.push(_this.teacherInfoData[i].fileid)
  22127. }else {
  22128. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  22129. if(_fileid){
  22130. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22131. _this.$forceUpdate();
  22132. if(_fileid != 1){
  22133. fileid.push(_fileid)
  22134. }
  22135. }
  22136. }
  22137. }
  22138. }
  22139. _this.teacherTextLoading = true
  22140. _this.tteacherTextLoading = true
  22141. let sub = []
  22142. if (_this.courseTypeId.length) {
  22143. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22144. let _sid = _this.courseTypeId[i]
  22145. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22146. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22147. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22148. }
  22149. }
  22150. }
  22151. }
  22152. let mclass = []
  22153. if (_this.courseTypeId.length) {
  22154. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22155. let _sid = _this.courseTypeId[i]
  22156. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22157. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22158. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22159. }
  22160. }
  22161. }
  22162. }
  22163. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  22164. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  22165. let messages = `NOTICE
  22166. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22167. Language: ${this.getLang()}
  22168. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22169. Instruction: Based on the context, follow "Format example", write content.
  22170. #Context
  22171. ## 参考资料
  22172. 课程名字:${this.courseName}
  22173. ${sub.length ? '学科:' + sub.join(",") : ''}
  22174. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22175. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  22176. ## 要求
  22177. ${msg}
  22178. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22179. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  22180. let _uuid = uuidv4();
  22181. // let params = JSON.stringify({
  22182. // // "model": "Chat",
  22183. // model: 'gpt-3.5-turbo',
  22184. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22185. // max_tokens: 4096,
  22186. // top_p: 1,
  22187. // frequency_penalty: 0,
  22188. // presence_penalty: 0,
  22189. // messages: [{
  22190. // content: messages,
  22191. // role: 'user'
  22192. // }],
  22193. // uid: _uuid,
  22194. // mind_map_question: "",
  22195. // })
  22196. let params = {
  22197. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22198. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22199. session_name: _uuid,
  22200. userId: _this.userid,
  22201. uid: _uuid,
  22202. file_ids: fileid.length ? [...fileid] : '',
  22203. model: 'gpt-4o-2024-08-06',
  22204. temperature: this.mode == 3 ? 0.5 : 0.1,
  22205. }
  22206. // let params = JSON.stringify({
  22207. // message: {
  22208. // anthropic_version: "bedrock-2023-05-31",
  22209. // max_tokens: 4096,
  22210. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22211. // top_p: 1,
  22212. // messages: [{
  22213. // "role": "user",
  22214. // "content": messages
  22215. // }] ,
  22216. // },
  22217. // uid: _uuid,
  22218. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22219. // });
  22220. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22221. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  22222. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22223. console.log(response);
  22224. // let data = response.data.FunctionResponse
  22225. // if (data.choices && data.choices.length && data.choices[0].message) {
  22226. // _this.courseText = data.choices[0].message.content
  22227. // }
  22228. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22229. } else {
  22230. _this.$message.warning(response.data.FunctionResponse.result);
  22231. }
  22232. _this.isTeacherTextCancelToken = null
  22233. }).catch(function (error) {
  22234. _this.teacherTextLoading = false
  22235. _this.tteacherTextLoading = false
  22236. _this.isTeacherTextCancelToken = null
  22237. if(error && error.message != 'Request canceled by the user.'){
  22238. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22239. }
  22240. console.log(error);
  22241. });
  22242. await _this.aiteacherTextDetailgetAiContent(_uuid)
  22243. },
  22244. aiteacherTextDetailgetAiContent(_uid) {
  22245. try {
  22246. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22247. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22248. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22249. } catch(error) {
  22250. console.log('EventSource error:', event);
  22251. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22252. this.teacherTextLoading = false
  22253. this.tteacherTextLoading = false
  22254. this.isTeacherTextCancelToken = null
  22255. return;
  22256. }
  22257. let _allText = "";
  22258. let _mdText = "";
  22259. let _iindex = 0
  22260. this.isTeacherTextCancelSource.onmessage = _e => {
  22261. let _eData = JSON.parse(_e.data).content;
  22262. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22263. //对话已经完成
  22264. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22265. this.isTeacherTextCancelSource.close();
  22266. this.isTeacherTextCancelSource = null;
  22267. this.teacherCourseText = _mdText;
  22268. this.teacherTextLoading = false
  22269. this.tteacherTextLoading = false
  22270. this.teacherCourseTextB = false
  22271. this.isTeacherTextCancelToken = null
  22272. return;
  22273. } else {
  22274. _iindex++
  22275. //对话还在继续
  22276. let _text = "";
  22277. _text = _eData.replaceAll("'", "");
  22278. if (_allText == "") {
  22279. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22280. } else {
  22281. _allText += _text;
  22282. }
  22283. _mdText = _allText + "_";
  22284. _mdText = _mdText.replace(/\\n/g, "\n");
  22285. _mdText = _mdText.replace(/\\/g, "");
  22286. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22287. //转化返回的回复流数据
  22288. if(_iindex == 10){
  22289. this.teacherCourseText = _mdText;
  22290. _iindex = 0
  22291. }
  22292. if(this.teacherTextLoading){
  22293. this.teacherTextLoading = false
  22294. }
  22295. // 处理流数据
  22296. }
  22297. // this.$forceUpdate();
  22298. };
  22299. let _this = this
  22300. this.isTeacherTextCancelSource.onerror = function(event) {
  22301. // 处理错误,可以尝试重新连接
  22302. console.log('EventSource error:', event);
  22303. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22304. _this.teacherTextLoading = false
  22305. _this.tteacherTextLoading = false
  22306. _this.isTeacherTextCancelToken = null
  22307. _this.isTeacherTextCancelSource.close();
  22308. _this.isTeacherTextCancelSource = null;
  22309. };
  22310. },
  22311. async aitargetTextDetail(msg) {
  22312. let _this = this
  22313. let fileid = []
  22314. if (_this.teacherInfoData.length) {
  22315. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  22316. if(_this.teacherInfoData[i].fileid){
  22317. fileid.push(_this.teacherInfoData[i].fileid)
  22318. }else {
  22319. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  22320. if(_fileid){
  22321. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22322. _this.$forceUpdate();
  22323. if(_fileid != 1){
  22324. fileid.push(_fileid)
  22325. }
  22326. }
  22327. }
  22328. }
  22329. }
  22330. _this.targetTextLoading = true
  22331. _this.ttargetTextLoading = true
  22332. let sub = []
  22333. if (_this.courseTypeId.length) {
  22334. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22335. let _sid = _this.courseTypeId[i]
  22336. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22337. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22338. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22339. }
  22340. }
  22341. }
  22342. }
  22343. let mclass = []
  22344. if (_this.courseTypeId.length) {
  22345. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22346. let _sid = _this.courseTypeId[i]
  22347. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22348. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22349. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22350. }
  22351. }
  22352. }
  22353. }
  22354. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  22355. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  22356. let messages = `NOTICE
  22357. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22358. Language: ${this.getLang()}
  22359. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22360. Instruction: Based on the context, follow "Format example", write content.
  22361. #Context
  22362. ## 参考资料
  22363. 课程名字:${this.courseName}
  22364. ${sub.length ? '学科:' + sub.join(",") : ''}
  22365. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22366. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22367. ## 要求
  22368. ${msg}
  22369. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22370. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  22371. let _uuid = uuidv4();
  22372. // let params = JSON.stringify({
  22373. // // "model": "Chat",
  22374. // model: 'gpt-3.5-turbo',
  22375. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22376. // max_tokens: 4096,
  22377. // top_p: 1,
  22378. // frequency_penalty: 0,
  22379. // presence_penalty: 0,
  22380. // messages: [{
  22381. // content: messages,
  22382. // role: 'user'
  22383. // }],
  22384. // uid: _uuid,
  22385. // mind_map_question: "",
  22386. // })
  22387. let params = {
  22388. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22389. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22390. session_name: _uuid,
  22391. userId: _this.userid,
  22392. uid: _uuid,
  22393. file_ids: fileid.length ? [...fileid] : '',
  22394. model: 'gpt-4o-2024-08-06',
  22395. temperature: this.mode == 3 ? 0.5 : 0.1,
  22396. }
  22397. // let params = JSON.stringify({
  22398. // message: {
  22399. // anthropic_version: "bedrock-2023-05-31",
  22400. // max_tokens: 4096,
  22401. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22402. // top_p: 1,
  22403. // messages: [{
  22404. // "role": "user",
  22405. // "content": messages
  22406. // }] ,
  22407. // },
  22408. // uid: _uuid,
  22409. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22410. // });
  22411. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22412. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  22413. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22414. console.log(response);
  22415. // let data = response.data.FunctionResponse
  22416. // if (data.choices && data.choices.length && data.choices[0].message) {
  22417. // _this.courseText = data.choices[0].message.content
  22418. // }
  22419. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22420. } else {
  22421. _this.$message.warning(response.data.FunctionResponse.result);
  22422. }
  22423. _this.isTargetCancelToken1 = null
  22424. }).catch(function (error) {
  22425. _this.targetTextLoading = false
  22426. _this.ttargetTextLoading = false
  22427. _this.isTargetCancelToken1 = null
  22428. if(error && error.message != 'Request canceled by the user.'){
  22429. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22430. }
  22431. console.log(error);
  22432. });
  22433. await _this.aitargetTextDetailgetAiContent(_uuid)
  22434. },
  22435. aitargetTextDetailgetAiContent(_uid) {
  22436. try {
  22437. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22438. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22439. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22440. } catch (error) {
  22441. console.log('EventSource error:', error);
  22442. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22443. this.targetTextLoading = false
  22444. this.ttargetTextLoading = false
  22445. this.isTargetCancelToken1 = null
  22446. return;
  22447. }
  22448. let _allText = "";
  22449. let _mdText = "";
  22450. let _iindex = 0
  22451. this.isTargetCancelSource1.onmessage = _e => {
  22452. let _eData = JSON.parse(_e.data).content;
  22453. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22454. //对话已经完成
  22455. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22456. this.isTargetCancelSource1.close();
  22457. this.isTargetCancelSource1 = null;
  22458. this.targetCourseText = _mdText;
  22459. this.targetTextLoading = false
  22460. this.ttargetTextLoading = false
  22461. this.targetCourseTextB = false
  22462. this.isTargetCancelToken1 = null
  22463. return;
  22464. } else {
  22465. _iindex++
  22466. //对话还在继续
  22467. let _text = "";
  22468. _text = _eData.replaceAll("'", "");
  22469. if (_allText == "") {
  22470. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22471. } else {
  22472. _allText += _text;
  22473. }
  22474. _mdText = _allText + "_";
  22475. _mdText = _mdText.replace(/\\n/g, "\n");
  22476. _mdText = _mdText.replace(/\\/g, "");
  22477. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22478. //转化返回的回复流数据
  22479. if(_iindex == 10){
  22480. this.targetCourseText = _mdText;
  22481. _iindex = 0
  22482. }
  22483. if(this.targetTextLoading){
  22484. this.targetTextLoading = false
  22485. }
  22486. // 处理流数据
  22487. }
  22488. // this.$forceUpdate();
  22489. };
  22490. let _this = this
  22491. this.isTargetCancelSource1.onerror = function(event) {
  22492. // 处理错误,可以尝试重新连接
  22493. console.log('EventSource error:', event);
  22494. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22495. _this.targetTextLoading = false
  22496. _this.ttargetTextLoading = false
  22497. _this.isTargetCancelToken1 = null
  22498. _this.isTargetCancelSource1.close();
  22499. _this.isTargetCancelSource1 = null;
  22500. };
  22501. },
  22502. async aitargetTextDetail2(msg) {
  22503. let _this = this
  22504. let fileid = []
  22505. if(_this.mubiaoInfoData.length){
  22506. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  22507. if(_this.mubiaoInfoData[i].fileid){
  22508. fileid.push(_this.mubiaoInfoData[i].fileid)
  22509. }else {
  22510. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  22511. if(_fileid){
  22512. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22513. _this.$forceUpdate();
  22514. if(_fileid != 1){
  22515. fileid.push(_fileid)
  22516. }
  22517. }
  22518. }
  22519. }
  22520. }
  22521. _this.targetTextLoading2 = true
  22522. _this.ttargetTextLoading2 = true
  22523. let sub = []
  22524. if (_this.courseTypeId.length) {
  22525. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22526. let _sid = _this.courseTypeId[i]
  22527. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22528. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22529. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22530. }
  22531. }
  22532. }
  22533. }
  22534. let mclass = []
  22535. if (_this.courseTypeId.length) {
  22536. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22537. let _sid = _this.courseTypeId[i]
  22538. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22539. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22540. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22541. }
  22542. }
  22543. }
  22544. }
  22545. if(sub.length){
  22546. let _fileid = _this.importFileid(sub)
  22547. fileid = [...fileid, ..._fileid]
  22548. }
  22549. let messages = `NOTICE
  22550. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22551. Language: ${this.getLang()}
  22552. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22553. Instruction: Based on the context, follow "Format example", write content.
  22554. #Context
  22555. ## 参考资料
  22556. 课程标题:${this.courseName}
  22557. ${sub.length ? '学科:' + sub.join(",") : ''}
  22558. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22559. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  22560. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22561. ## 要求
  22562. ${msg}
  22563. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22564. let _uuid = uuidv4();
  22565. // let params = JSON.stringify({
  22566. // // "model": "Chat",
  22567. // model: 'gpt-3.5-turbo',
  22568. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22569. // max_tokens: 4096,
  22570. // top_p: 1,
  22571. // frequency_penalty: 0,
  22572. // presence_penalty: 0,
  22573. // messages: [{
  22574. // content: messages,
  22575. // role: 'user'
  22576. // }],
  22577. // uid: _uuid,
  22578. // mind_map_question: "",
  22579. // })
  22580. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22581. let params = {
  22582. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22583. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22584. session_name: _uuid,
  22585. userId: _this.userid,
  22586. uid: _uuid,
  22587. file_ids: fileid.length ? [...fileid] : '',
  22588. model: 'gpt-4o-2024-08-06',
  22589. temperature: this.mode == 3 ? 0.5 : 0.1,
  22590. }
  22591. // let params = JSON.stringify({
  22592. // message: {
  22593. // anthropic_version: "bedrock-2023-05-31",
  22594. // max_tokens: 4096,
  22595. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22596. // top_p: 1,
  22597. // messages: [{
  22598. // "role": "user",
  22599. // "content": messages
  22600. // }] ,
  22601. // },
  22602. // uid: _uuid,
  22603. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22604. // });
  22605. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22606. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  22607. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22608. console.log(response);
  22609. // let data = response.data.FunctionResponse
  22610. // if (data.choices && data.choices.length && data.choices[0].message) {
  22611. // _this.courseText = data.choices[0].message.content
  22612. // }
  22613. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22614. } else {
  22615. _this.$message.warning(response.data.FunctionResponse.result);
  22616. }
  22617. _this.isTargetCancelToken2 = null
  22618. }).catch(function (error) {
  22619. _this.targetTextLoading2 = false
  22620. _this.ttargetTextLoading2 = false
  22621. _this.isTargetCancelToken2 = null
  22622. if(error && error.message != 'Request canceled by the user.'){
  22623. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22624. }
  22625. console.log(error);
  22626. });
  22627. await _this.aitargetTextDetail2getAiContent(_uuid)
  22628. },
  22629. importFileid(sub){
  22630. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  22631. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  22632. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  22633. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  22634. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  22635. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  22636. let _sub = converter(sub.join(","))
  22637. let fileid = []
  22638. for(var i = 0; i < this.fileidArray.length; i++){
  22639. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  22640. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  22641. fileid.push(this.fileidArray[i].fileid)
  22642. }
  22643. }
  22644. }
  22645. return fileid
  22646. },
  22647. selectFileid(){
  22648. let params = {
  22649. oid: this.oid,
  22650. };
  22651. this.ajax
  22652. .get(this.$store.state.api + "selectFileid", params)
  22653. .then((res) => {
  22654. this.fileidArray = res.data[0]
  22655. if(res.data[1].length){
  22656. this.fileidArray = res.data[1]
  22657. }
  22658. if(res.data[2].length){
  22659. this.fileidArray = res.data[2]
  22660. }
  22661. })
  22662. .catch((err) => {
  22663. console.error(err);
  22664. });
  22665. },
  22666. selectAiFileid(){
  22667. let params = {
  22668. oid: this.oid,
  22669. };
  22670. this.ajax
  22671. .get(this.$store.state.api + "selectAiFileid", params)
  22672. .then((res) => {
  22673. let fileIds = []
  22674. for(var i = 0; i < res.data[0].length; i++){
  22675. fileIds.push(res.data[0][i].fileid)
  22676. }
  22677. this.fileIds = fileIds
  22678. if(res.data[1].length){
  22679. fileIds = []
  22680. for(var i = 0; i < res.data[1].length; i++){
  22681. fileIds.push(res.data[0][i].fileid)
  22682. }
  22683. this.fileIds = fileIds
  22684. }
  22685. if(res.data[2].length){
  22686. fileIds = []
  22687. for(var i = 0; i < res.data[2].length; i++){
  22688. fileIds.push(res.data[0][i].fileid)
  22689. }
  22690. this.fileIds = fileIds
  22691. }
  22692. })
  22693. .catch((err) => {
  22694. console.error(err);
  22695. });
  22696. },
  22697. selectKnowFileid(){
  22698. let params = {
  22699. oid: this.oid,
  22700. sta: 'cn'
  22701. };
  22702. this.ajax
  22703. .get(this.$store.state.api + "selectKnowFileid", params)
  22704. .then((res) => {
  22705. this.knowFileArray = res.data[0]
  22706. if(res.data[1].length){
  22707. this.knowFileArray = res.data[1]
  22708. }
  22709. if(res.data[2].length){
  22710. this.knowFileArray = res.data[2]
  22711. }
  22712. })
  22713. .catch((err) => {
  22714. console.error(err);
  22715. });
  22716. },
  22717. async aitargetTextDetail22(msg,msg2) {
  22718. let _this = this
  22719. let fileid = []
  22720. _this.targetTextLoading2 = true
  22721. _this.ttargetTextLoading2 = true
  22722. let sub = []
  22723. if (_this.courseTypeId.length) {
  22724. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22725. let _sid = _this.courseTypeId[i]
  22726. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22727. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22728. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22729. }
  22730. }
  22731. }
  22732. }
  22733. let mclass = []
  22734. if (_this.courseTypeId.length) {
  22735. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22736. let _sid = _this.courseTypeId[i]
  22737. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22738. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22739. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22740. }
  22741. }
  22742. }
  22743. }
  22744. if(!msg2 && sub.length){
  22745. // let _fileid = _this.importFileid(sub)
  22746. // fileid = [...fileid, ..._fileid]
  22747. }
  22748. let messages = `NOTICE
  22749. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22750. Language: ${this.getLang()}
  22751. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22752. Instruction: Based on the context, follow "Format example", write content.
  22753. #Context
  22754. ## 参考资料
  22755. 课程标题:${this.courseName}
  22756. ${sub.length ? '学科:' + sub.join(",") : ''}
  22757. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22758. 课程目标:${msg2}
  22759. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  22760. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22761. ## 要求
  22762. ${msg}
  22763. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22764. let _uuid = uuidv4();
  22765. // let params = JSON.stringify({
  22766. // // "model": "Chat",
  22767. // model: 'gpt-3.5-turbo',
  22768. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22769. // max_tokens: 4096,
  22770. // top_p: 1,
  22771. // frequency_penalty: 0,
  22772. // presence_penalty: 0,
  22773. // messages: [{
  22774. // content: messages,
  22775. // role: 'user'
  22776. // }],
  22777. // uid: _uuid,
  22778. // mind_map_question: "",
  22779. // })
  22780. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22781. let params = {
  22782. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  22783. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22784. session_name: _uuid,
  22785. userId: _this.userid,
  22786. uid: _uuid,
  22787. file_ids: fileid.length ? [...fileid] : '',
  22788. model: 'gpt-4o-2024-08-06',
  22789. temperature: this.mode == 3 ? 0.5 : 0.1,
  22790. }
  22791. // let params = JSON.stringify({
  22792. // message: {
  22793. // anthropic_version: "bedrock-2023-05-31",
  22794. // max_tokens: 4096,
  22795. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22796. // top_p: 1,
  22797. // messages: [{
  22798. // "role": "user",
  22799. // "content": messages
  22800. // }] ,
  22801. // },
  22802. // uid: _uuid,
  22803. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22804. // });
  22805. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22806. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  22807. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22808. console.log(response);
  22809. // let data = response.data.FunctionResponse
  22810. // if (data.choices && data.choices.length && data.choices[0].message) {
  22811. // _this.courseText = data.choices[0].message.content
  22812. // }
  22813. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22814. } else {
  22815. _this.$message.warning(response.data.FunctionResponse.result);
  22816. }
  22817. _this.isTargetCancelToken2 = null
  22818. }).catch(function (error) {
  22819. _this.targetTextLoading2 = false
  22820. _this.ttargetTextLoading2 = false
  22821. _this.isTargetCancelToken2 = null
  22822. if(error && error.message != 'Request canceled by the user.'){
  22823. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22824. }
  22825. console.log(error);
  22826. });
  22827. await _this.aitargetTextDetail2getAiContent(_uuid)
  22828. },
  22829. aitargetTextDetail2getAiContent(_uid) {
  22830. try {
  22831. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22832. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22833. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22834. } catch(error) {
  22835. console.log('EventSource error:', error);
  22836. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22837. this.targetTextLoading2 = false
  22838. this.ttargetTextLoading2 = false
  22839. this.isTargetCancelToken2 = null
  22840. return;
  22841. }
  22842. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  22843. let _allText = "";
  22844. let _mdText = "";
  22845. let _iindex = 0
  22846. this.isTargetCancelSource2.onmessage = _e => {
  22847. let _eData = JSON.parse(_e.data).content;
  22848. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22849. //对话已经完成
  22850. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22851. this.isTargetCancelSource2.close();
  22852. this.isTargetCancelSource2 = null;
  22853. this.targetCourseText2 = text1+' \n '+_mdText;
  22854. this.targetTextLoading2 = false
  22855. this.ttargetTextLoading2 = false
  22856. this.targetCourseText2B = false
  22857. this.isTargetCancelToken2 = null
  22858. return;
  22859. } else {
  22860. _iindex++
  22861. //对话还在继续
  22862. let _text = "";
  22863. _text = _eData.replaceAll("'", "");
  22864. if (_allText == "") {
  22865. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22866. } else {
  22867. _allText += _text;
  22868. }
  22869. _mdText = _allText + "_";
  22870. _mdText = _mdText.replace(/\\n/g, "\n");
  22871. _mdText = _mdText.replace(/\\/g, "");
  22872. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22873. //转化返回的回复流数据
  22874. if(_iindex == 10){
  22875. this.targetCourseText2 = text1+' \n '+_mdText;
  22876. _iindex = 0
  22877. }
  22878. if(this.targetTextLoading2){
  22879. this.targetTextLoading2 = false
  22880. }
  22881. // 处理流数据
  22882. }
  22883. // this.$forceUpdate();
  22884. };
  22885. let _this = this
  22886. this.isTargetCancelSource2.onerror = function(event) {
  22887. // 处理错误,可以尝试重新连接
  22888. console.log('EventSource error:', event);
  22889. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22890. _this.targetTextLoading2 = false
  22891. _this.ttargetTextLoading2 = false
  22892. _this.isTargetCancelToken2 = null
  22893. _this.isTargetCancelSource2.close();
  22894. _this.isTargetCancelSource2 = null;
  22895. };
  22896. },
  22897. async aitargetTextDetail3(msg) {
  22898. let _this = this
  22899. let fileid = []
  22900. if(_this.mubiaoInfoData.length){
  22901. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  22902. if(_this.mubiaoInfoData[i].fileid){
  22903. fileid.push(_this.mubiaoInfoData[i].fileid)
  22904. }else {
  22905. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  22906. if(_fileid){
  22907. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22908. _this.$forceUpdate();
  22909. if(_fileid != 1){
  22910. fileid.push(_fileid)
  22911. }
  22912. }
  22913. }
  22914. }
  22915. }
  22916. _this.targetTextLoading2 = true
  22917. _this.ttargetTextLoading2 = true
  22918. let sub = []
  22919. if (_this.courseTypeId.length) {
  22920. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22921. let _sid = _this.courseTypeId[i]
  22922. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22923. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22924. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22925. }
  22926. }
  22927. }
  22928. }
  22929. let mclass = []
  22930. if (_this.courseTypeId.length) {
  22931. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22932. let _sid = _this.courseTypeId[i]
  22933. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22934. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22935. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22936. }
  22937. }
  22938. }
  22939. }
  22940. // if(sub.length){
  22941. // let _fileid = _this.importFileid(sub)
  22942. // fileid = [...fileid, ..._fileid]
  22943. // }
  22944. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22945. if (_this.infoData.length) {
  22946. for (var i = 0; i < _this.infoData.length; i++) {
  22947. if(_this.infoData[i].fileid){
  22948. fileid.push(_this.infoData[i].fileid)
  22949. }else {
  22950. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22951. if(_fileid){
  22952. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22953. _this.$forceUpdate();
  22954. if(_fileid != 1){
  22955. fileid.push(_fileid)
  22956. }
  22957. }
  22958. }
  22959. }
  22960. }
  22961. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22962. let messages = `Language: ${this.getLang()}
  22963. ${msg}
  22964. ## 课程信息
  22965. 课程名字:${this.courseName}
  22966. 课程概况:${this.courseText}
  22967. ${sub.length ? '学科:' + sub.join(",") : ''}
  22968. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  22969. let _uuid = uuidv4();
  22970. // let params = JSON.stringify({
  22971. // // "model": "Chat",
  22972. // model: 'gpt-3.5-turbo',
  22973. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22974. // max_tokens: 4096,
  22975. // top_p: 1,
  22976. // frequency_penalty: 0,
  22977. // presence_penalty: 0,
  22978. // messages: [{
  22979. // content: messages,
  22980. // role: 'user'
  22981. // }],
  22982. // uid: _uuid,
  22983. // mind_map_question: "",
  22984. // })
  22985. let params = {
  22986. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22987. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22988. session_name: _uuid,
  22989. userId: _this.userid,
  22990. uid: _uuid,
  22991. file_ids: fileid.length ? [...fileid] : '',
  22992. model: 'gpt-4o-2024-08-06',
  22993. temperature: this.mode == 3 ? 0.5 : 0.1,
  22994. }
  22995. // let params = JSON.stringify({
  22996. // message: {
  22997. // anthropic_version: "bedrock-2023-05-31",
  22998. // max_tokens: 4096,
  22999. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23000. // top_p: 1,
  23001. // messages: [{
  23002. // "role": "user",
  23003. // "content": messages
  23004. // }] ,
  23005. // },
  23006. // uid: _uuid,
  23007. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23008. // });
  23009. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23010. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  23011. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  23012. console.log(response);
  23013. // let data = response.data.FunctionResponse
  23014. // if (data.choices && data.choices.length && data.choices[0].message) {
  23015. // _this.courseText = data.choices[0].message.content
  23016. // }
  23017. console.log(response);
  23018. let data = response.data.FunctionResponse
  23019. // if (data.choices && data.choices.length && data.choices[0].message) {
  23020. // console.log(data.choices[0].message.content);
  23021. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  23022. // _this.$forceUpdate()
  23023. // }
  23024. if (data.message) {
  23025. console.log('返回回来的目标:',data.message);
  23026. _this.targetCourseText2 = data.message
  23027. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  23028. }
  23029. _this.isTargetCancelToken2 = null
  23030. }).catch(function (error) {
  23031. _this.targetTextLoading2 = false
  23032. _this.ttargetTextLoading2 = false
  23033. _this.isTargetCancelToken2 = null
  23034. if(error && error.message != 'Request canceled by the user.'){
  23035. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  23036. }
  23037. console.log(error);
  23038. });
  23039. },
  23040. againEva(msg, i, k) {
  23041. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  23042. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  23043. return;
  23044. }
  23045. if (this.ruleLoading[i]) {
  23046. this.ruleLoading[i][k] = true
  23047. } else {
  23048. this.ruleLoading[i] = []
  23049. this.ruleLoading[i][k] = true
  23050. }
  23051. let message = `NOTICE
  23052. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  23053. Language: ${this.getLang()}
  23054. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23055. Instruction: Based on the context, follow "Format example", write content.
  23056. #Context
  23057. ##要求
  23058. ${msg}
  23059. ##制定标准资料
  23060. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  23061. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  23062. # Format example
  23063. ==
  23064. 0 星,作业内容与作业要求无关;
  23065. 1 星,没有识别问题和需求;
  23066. 2 星,问题或需求没有被清晰理解或准确识别;
  23067. 3 星,问题或需求的一部分被识别;
  23068. 4 星,问题或需求的大部分被识别;
  23069. 5 星,问题或需求都被识别。
  23070. ==
  23071. `
  23072. // let params = {
  23073. // // "model": "Chat",
  23074. // model: 'gpt-4o-2024-08-06',
  23075. // // model: "gpt-4o",
  23076. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23077. // max_tokens: 4096,
  23078. // top_p: 1,
  23079. // frequency_penalty: 0,
  23080. // presence_penalty: 0,
  23081. // messages: [
  23082. // {
  23083. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  23084. // role: "user"
  23085. // }
  23086. // ],
  23087. // stream: false,
  23088. // uid: this.userid,
  23089. // mind_map_question: ""
  23090. // };
  23091. // this.ajax
  23092. // .post("https://gpt4.cocorobo.cn/chat", params)
  23093. // .then(response => {
  23094. // let data = response.data.FunctionResponse;
  23095. // console.log("data", data);
  23096. // if (data.choices && data.choices.length && data.choices[0].message) {
  23097. // let content = data.choices[0].message.content;
  23098. // var regex = new RegExp('==([^=]+)==');
  23099. // let match = content.match(regex);
  23100. // if (match) {
  23101. // content = match[1].trim().replaceAll(' ', '');
  23102. // // 获取匹配到的内容并去除两端空格
  23103. // console.log('contentInsideDoubleEquals', content);
  23104. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  23105. // console.log("未有星级。");
  23106. // this.againEva(msg, i, k)
  23107. // return
  23108. // }
  23109. // //  return
  23110. // } else {
  23111. // console.log("未找到匹配的内容。");
  23112. // this.againEva(msg, i, k)
  23113. // return
  23114. // }
  23115. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  23116. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  23117. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  23118. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  23119. // this.$forceUpdate();
  23120. // this.ruleLoading[i][k] = false
  23121. // }else{
  23122. // this.ruleLoading[i][k] = false
  23123. // }
  23124. // })
  23125. // .catch(error => {
  23126. // console.log(error);
  23127. // this.ruleLoading[i][k] = false
  23128. // });
  23129. let parm = {
  23130. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23131. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  23132. session_name: uuidv4(),
  23133. userId: this.userid,
  23134. file_ids: [],
  23135. model: 'gpt-4o-2024-08-06',
  23136. temperature: this.mode == 3 ? 0.5 : 0.1,
  23137. }
  23138. this.ajax
  23139. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  23140. .then(async (response) => {
  23141. console.log(response);
  23142. let data = response.data.FunctionResponse
  23143. if (data.message) {
  23144. console.log(data.message);
  23145. let content = data.message;
  23146. var regex = new RegExp('==([^=]+)==');
  23147. let match = content.match(regex);
  23148. if (match) {
  23149. content = match[1].trim().replaceAll(' ', '');
  23150. // 获取匹配到的内容并去除两端空格
  23151. console.log('contentInsideDoubleEquals', content);
  23152. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  23153. console.log("未有星级。");
  23154. this.againEva(msg, i, k)
  23155. return
  23156. }
  23157. //  return
  23158. } else {
  23159. console.log("未找到匹配的内容。");
  23160. this.againEva(msg, i, k)
  23161. return
  23162. }
  23163. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  23164. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  23165. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  23166. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  23167. this.$forceUpdate();
  23168. this.ruleLoading[i][k] = false
  23169. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  23170. }else {
  23171. this.ruleLoading[i][k] = false
  23172. }
  23173. })
  23174. .catch((error) => {
  23175. this.ruleLoading[i][k] = false
  23176. console.log(error);
  23177. });
  23178. },
  23179. async aiSearchFile(messages, callback) {
  23180. let _this = this
  23181. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23182. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23183. console.log('fileid=========',fileid)
  23184. // let params = JSON.stringify({
  23185. // // "model": "Chat",
  23186. // model: 'gpt-3.5-turbo',
  23187. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23188. // max_tokens: 4096,
  23189. // top_p: 1,
  23190. // frequency_penalty: 0,
  23191. // presence_penalty: 0,
  23192. // messages: [{
  23193. // content: messages,
  23194. // role: 'user'
  23195. // }],
  23196. // stream: false,
  23197. // uid: this.userid,
  23198. // mind_map_question: "",
  23199. // })
  23200. // // let params = JSON.stringify({
  23201. // // message: {
  23202. // // anthropic_version: "bedrock-2023-05-31",
  23203. // // max_tokens: 4096,
  23204. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  23205. // // top_p: 1,
  23206. // // messages: [{
  23207. // // content: messages,
  23208. // // role: 'user'
  23209. // // }], //
  23210. // // },
  23211. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23212. // // });
  23213. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23214. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  23215. // console.log(response);
  23216. // let data = response.data.FunctionResponse
  23217. // if (data.choices && data.choices.length && data.choices[0].message) {
  23218. // console.log(data.choices[0].message.content);
  23219. // let dArray = JSON.parse(data.choices[0].message.content)
  23220. // _this.dArray = dArray
  23221. // _this.unitJson[0].chapterInfo[0].taskJson = []
  23222. // for (var i = 0; i < dArray.length; i++) {
  23223. // let _task = dArray[i]
  23224. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  23225. // task: _task.task,
  23226. // taskDetail: "",
  23227. // taskDetail2: _task.detail,
  23228. // taskDetail3: "",
  23229. // chapterData: [],
  23230. // toolText: "",
  23231. // toolChoose: [
  23232. // {
  23233. // tool: [],
  23234. // toolDetail: "",
  23235. // toolType: 0,
  23236. // askCount: 1,
  23237. // askTitle: "",
  23238. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  23239. // },
  23240. // ],
  23241. // isShowTools: false,
  23242. // askCount: 1,
  23243. // isFold: 0,
  23244. // askTitle: "",
  23245. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  23246. // checkJson: [{ checkCount: [], checkPerent: [] }],
  23247. // homeworkList: [],
  23248. // })
  23249. // }
  23250. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  23251. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  23252. // _this.$forceUpdate();
  23253. // }
  23254. // // if (data.result) {
  23255. // // console.log(data.result);
  23256. // // let dArray = JSON.parse(data.result)
  23257. // // _this.dArray = dArray
  23258. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  23259. // // for (var i = 0; i < dArray.length; i++) {
  23260. // // let _task = dArray[i]
  23261. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  23262. // // task: _task.task,
  23263. // // taskDetail: "",
  23264. // // taskDetail2: _task.detail,
  23265. // // taskDetail3: "",
  23266. // // chapterData: [],
  23267. // // toolText: "",
  23268. // // toolChoose: [
  23269. // // {
  23270. // // tool: [],
  23271. // // toolDetail: "",
  23272. // // toolType: 0,
  23273. // // askCount: 1,
  23274. // // askTitle: "",
  23275. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  23276. // // },
  23277. // // ],
  23278. // // isShowTools: false,
  23279. // // askCount: 1,
  23280. // // isFold: 1,
  23281. // // askTitle: "",
  23282. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  23283. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  23284. // // homeworkList: [],
  23285. // // })
  23286. // // }
  23287. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  23288. // // _this.$forceUpdate();
  23289. // // }
  23290. // callback ? callback() : ''
  23291. // }).catch(function (error) {
  23292. // _this.loading = false
  23293. // console.log(error);
  23294. // });
  23295. this.isFileCancelToken = this.ajax.setCancelSource();
  23296. let parm = {
  23297. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  23298. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23299. session_name: uuidv4(),
  23300. userId: this.userid,
  23301. file_ids: fileid.length ? [...fileid] : '',
  23302. model: 'gpt-4o-2024-08-06',
  23303. temperature: this.mode == 3 ? 0.5 : 0.1,
  23304. }
  23305. this.ajax
  23306. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  23307. .then((response) => {
  23308. console.log(response);
  23309. let data = response.data.FunctionResponse
  23310. if (data.message) {
  23311. console.log(data.message);
  23312. let dArray = []
  23313. try {
  23314. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  23315. let regex3 = new RegExp('(?<!")content(?!")','g')
  23316. //
  23317. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  23318. } catch (error) {
  23319. // callback ? callback() : ''
  23320. console.log("error_________________" + error);
  23321. try {
  23322. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  23323. let match = data.message.match(regex);
  23324. dArray = JSON.parse(match[0]);
  23325. } catch (error) {
  23326. // callback ? callback() : ''
  23327. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  23328. console.log("error_________________" + error);
  23329. _this.isFileCancelToken = null;
  23330. _this.aiSearchFile(messages, callback)
  23331. return
  23332. }
  23333. }
  23334. for(let i = 0; i < dArray.length; i++){
  23335. let content = dArray[i].content
  23336. let name = '参考资料'+(i+1)
  23337. let md = new MarkdownIt();
  23338. let _html = content ? md.render(content) : ''
  23339. setTimeout(()=>{
  23340. if(i == (dArray.length - 1)){
  23341. _this.generate2(name, _html, i, callback)
  23342. }else {
  23343. _this.generate2(name, _html, i)
  23344. }
  23345. }, 500 * i)
  23346. }
  23347. _this.isFileCancelToken = null
  23348. _this.$forceUpdate();
  23349. }
  23350. })
  23351. .catch((error) => {
  23352. callback ? callback() : ''
  23353. _this.isFileCancelToken = null
  23354. console.log(error);
  23355. });
  23356. },
  23357. async aiSearchFile2(messages, callback) {
  23358. let _this = this
  23359. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  23360. console.log('fileid=========',fileid)
  23361. this.isFileCancelToken = this.ajax.setCancelSource();
  23362. let parm = {
  23363. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23364. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23365. session_name: uuidv4(),
  23366. userId: this.userid,
  23367. file_ids: fileid.length ? [...fileid] : '',
  23368. model: 'gpt-4o-2024-08-06',
  23369. temperature: this.mode == 3 ? 0.5 : 0.1,
  23370. }
  23371. this.ajax
  23372. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  23373. .then((response) => {
  23374. console.log(response);
  23375. let data = response.data.FunctionResponse
  23376. if (data.message) {
  23377. console.log(data.message);
  23378. let content = data.message
  23379. let name = '参考资料'
  23380. let md = new MarkdownIt();
  23381. let _html = content ? md.render(content) : ''
  23382. _this.generate2(name, _html, 0, callback)
  23383. _this.isFileCancelToken = null
  23384. _this.$forceUpdate();
  23385. }
  23386. })
  23387. .catch((error) => {
  23388. callback ? callback() : ''
  23389. _this.isFileCancelToken = null
  23390. console.log(error);
  23391. });
  23392. },
  23393. createFileid(url) {
  23394. let _this = this
  23395. return new Promise((resolve, reject) => {
  23396. try {
  23397. _this.ajax
  23398. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  23399. url: url,
  23400. })
  23401. .then((res) => {
  23402. let _data = res.data.FunctionResponse;
  23403. if (_data.result && _data.result.id) {
  23404. resolve(_data.result.id)
  23405. }else {
  23406. resolve(1)
  23407. }
  23408. }).catch(function (error) {
  23409. resolve(1)
  23410. });
  23411. }catch (e){
  23412. resolve(1)
  23413. }
  23414. });
  23415. },
  23416. handleSwitchChange(string){
  23417. // let area = ''
  23418. // let text = ''
  23419. // if(string == 'aiteacherTextDetail'){
  23420. // area = '已有教案摘要'
  23421. // text = this.teacherCourseText
  23422. // }else if(string == 'aitargetTextDetail'){
  23423. // area = '课程目标'
  23424. // text = this.targetCourseText
  23425. // }else if(string == 'aiDetail'){
  23426. // area = '课程简要描述'
  23427. // text = this.courseText
  23428. // }else if(string == 'aitargetTextDetail2'){
  23429. // area = '课程目标'
  23430. // text = this.targetCourseText2
  23431. // }else if(string.indexOf('aiDetail1') != -1){
  23432. // let index = parseInt(string.split('aiDetail1-')[1])
  23433. // area = `任务${index+1}课程大纲`
  23434. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  23435. // }else if(string == 'aiCpote1'){
  23436. // area = '概念群'
  23437. // text = this.cpote.cpote1
  23438. // }else if(string == 'aiCpote2'){
  23439. // area = '问题链'
  23440. // text = this.cpote.cpote2
  23441. // }else if(string == 'aiCpote3'){
  23442. // area = '目标层'
  23443. // text = this.cpote.cpote3
  23444. // }else if(string == 'aiCpote4'){
  23445. // area = '任务簇'
  23446. // text = this.cpote.cpote4
  23447. // }else if(string.indexOf('teacherDetail2') != -1){
  23448. // let index = parseInt(string.split('teacherDetail2-')[1])
  23449. // area = `任务${index+1}教案`
  23450. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  23451. // }else if(string.indexOf('aiDetail2') != -1){
  23452. // let index = parseInt(string.split('aiDetail2-')[1])
  23453. // area = `任务${index+1}任务描述`
  23454. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  23455. // }else if(string.indexOf('aiDetail3') != -1){
  23456. // let index = parseInt(string.split('-')[1])
  23457. // let index2 = parseInt(string.split('-')[2])
  23458. // area = `任务${index+1}工具${index2+1}的工具描述`
  23459. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  23460. // }
  23461. // if(this.isQuote[string] && text){
  23462. // this.quoteArray.push({
  23463. // string,
  23464. // area,
  23465. // value: text
  23466. // })
  23467. // }
  23468. console.log(this.isQuote)
  23469. },
  23470. setIsQuote(string){
  23471. this.isQuote[string] = false
  23472. },
  23473. setEvaList(task, tool, elist){
  23474. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  23475. this.$forceUpdate()
  23476. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  23477. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  23478. }
  23479. },
  23480. closeRight(){
  23481. this.isDisplay = !this.isDisplay;
  23482. },
  23483. addCourseBehavior(type, _html) { // 保存行为操作
  23484. let params = [{
  23485. uid: this.userid,
  23486. courseId: '',
  23487. type: type,
  23488. content: _html,
  23489. }];
  23490. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  23491. if (res.data == 1) {
  23492. console.log('保存操作成功');
  23493. } else {
  23494. console.log('保存操作失败');
  23495. }
  23496. }).catch(e => {
  23497. console.log('保存操作失败');
  23498. console.log(e);
  23499. });
  23500. },
  23501. findMatchingContents(){
  23502. if(!this.searchFileName){
  23503. this.$message.error('请输入检索关键词')
  23504. return
  23505. }
  23506. if(this.knowInfoDataLoading){
  23507. this.$message.error('检索中请稍后')
  23508. return
  23509. }
  23510. let sub = []
  23511. if (this.courseTypeId.length) {
  23512. for (var i = 0; i < this.courseTypeId.length; i++) {
  23513. let _sid = this.courseTypeId[i]
  23514. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23515. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23516. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23517. }
  23518. }
  23519. }
  23520. }
  23521. this.knowInfoDataLoading = true
  23522. let params = {
  23523. type: sub.join(","),
  23524. string: this.searchFileName,
  23525. };
  23526. let md = new MarkdownIt();
  23527. this.ajax.get(this.$store.state.api + 'findMatchingContents', params).then(async res => {
  23528. console.log(res)
  23529. if(res.data.length){
  23530. let files = []
  23531. for (var i = 0; i < res.data.length; i++) {
  23532. // files.push(await this.generateExport2(el.title, md.render(el.content)));
  23533. let el = res.data[i];
  23534. let url = 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn' + el.file_url;
  23535. let extension = url.split('.').pop().toLowerCase();
  23536. let _type = 2; // 默认类型为2
  23537. // 定义文件类型数组
  23538. let imgA = ["png", "jpg", "jpeg", "bmp", "gif", "webp", "psd", "svg", "tiff"];
  23539. let fileA = ["PDF", "DOC", "DOCX", "DOCM", "DOTM", "DOTX", "PPTX", "PPSX", "PPT", "PPS", "PPTM", "POTM", "PPAM", "POTX", "PPSM", "XLSX", "XLS"];
  23540. let videoA = ["AVI", "NAVI", "MPEG", "ASF", "MOV", "WMV", "3GP", "RM", "RMVB", "FLV", "F4V", "H.264", "H.265", "REAL VIDEO", "MKV", "WebM", "HDDVD", "MP4", "MPG", "M4V", "MGV", "OGV", "QTM", "STR", "AMC", "DVX", "EVO", "DAT", "OGG", "OGM"];
  23541. // 根据文件扩展名判断文件类型
  23542. if (fileA.includes(extension.toUpperCase())) {
  23543. _type = 3;
  23544. } else if (videoA.includes(extension.toUpperCase())) {
  23545. _type = 2;
  23546. } else if (imgA.includes(extension)) {
  23547. _type = 13;
  23548. } else {
  23549. _type = 12;
  23550. }
  23551. let fileid = await this.createFileid(url)
  23552. this.knowInfoData2.push({
  23553. name: el.title,
  23554. url: url,
  23555. uid: '',
  23556. type: _type,
  23557. fileid: fileid == 1 ? '' : fileid,
  23558. });
  23559. if(fileid != 1){
  23560. this.knowFileids2.push(fileid)
  23561. }
  23562. }
  23563. // let data = {
  23564. // target:{
  23565. // files: files
  23566. // }
  23567. // }
  23568. console.log(data)
  23569. // this.beforeUploadInfo2(data, 20)
  23570. }else{
  23571. this.$message.error('未检索出内容')
  23572. }
  23573. this.knowInfoDataLoading = false
  23574. }).catch(e => {
  23575. console.log('查询失败');
  23576. this.knowInfoDataLoading = false
  23577. console.log(e);
  23578. });
  23579. }
  23580. },
  23581. beforeDestroy() {
  23582. // clearTimeout(this.timer);
  23583. // this.timer = null;
  23584. // clearInterval(this.timer2);
  23585. // this.timer2 = null;
  23586. clearInterval(this.pasteTimer);
  23587. this.pasteTimer = null;
  23588. },
  23589. beforeRouteLeave(to, from, next) {
  23590. // clearTimeout(this.timer);
  23591. // this.timer = null;
  23592. // clearInterval(this.timer2);
  23593. // this.timer2 = null;
  23594. clearInterval(this.pasteTimer);
  23595. this.pasteTimer = null;
  23596. next();
  23597. },
  23598. mounted(){
  23599. const resizable = this.$el.querySelector('.resizable');
  23600. const resizer = this.$el.querySelector('.resizer');
  23601. const maxWidth = document.body.offsetWidth / 2;
  23602. const maxWidth2 = window.innerWidth / 2;
  23603. let startX, startWidth;
  23604. const mouseMoveHandler = (e) => {
  23605. e.preventDefault(); // 添加此行以防止选中其他文本
  23606. const dx = startX - e.clientX;
  23607. const newWidth = startWidth + dx;
  23608. if (newWidth >= 350 && newWidth <= maxWidth) {
  23609. resizable.style.minWidth = `${newWidth}px`;
  23610. }
  23611. };
  23612. const mouseUpHandler = () => {
  23613. document.removeEventListener('mousemove', mouseMoveHandler);
  23614. document.removeEventListener('mouseup', mouseUpHandler);
  23615. document.body.style.cursor = 'default';
  23616. };
  23617. const mouseDownHandler = (e) => {
  23618. e.preventDefault(); // 添加此行以防止选中其他文本
  23619. startX = e.clientX;
  23620. startWidth = resizable.getBoundingClientRect().width;
  23621. document.addEventListener('mousemove', mouseMoveHandler);
  23622. document.addEventListener('mouseup', mouseUpHandler);
  23623. document.body.style.cursor = 'ew-resize';
  23624. };
  23625. resizer.addEventListener('mousedown', mouseDownHandler);
  23626. const touchMoveHandler = (e) => {
  23627. e.preventDefault(); // 添加此行以防止选中其他文本
  23628. const dx = startX - e.touches[0].clientX;
  23629. const newWidth = startWidth + dx;
  23630. if (newWidth >= 350 && newWidth <= maxWidth2) {
  23631. resizable.style.minWidth = `${newWidth}px`;
  23632. }
  23633. };
  23634. const touchEndHandler = () => {
  23635. document.removeEventListener('touchmove', touchMoveHandler);
  23636. document.removeEventListener('touchend', touchEndHandler);
  23637. document.body.style.cursor = 'default';
  23638. };
  23639. const touchStartHandler = (e) => {
  23640. e.preventDefault(); // 添加此行以防止选中其他文本
  23641. startX = e.touches[0].clientX;
  23642. startWidth = resizable.getBoundingClientRect().width;
  23643. document.addEventListener('touchmove', touchMoveHandler);
  23644. document.addEventListener('touchend', touchEndHandler);
  23645. document.body.style.cursor = 'ew-resize';
  23646. };
  23647. resizer.addEventListener('touchstart', touchStartHandler);
  23648. },
  23649. created() {
  23650. this.selectFileid();
  23651. // this.selectAiFileid();
  23652. this.selectKnowFileid();
  23653. this.getStudent();
  23654. this.getTeacher();
  23655. this.getClass();
  23656. this.selectGrage();
  23657. this.getTemplate();
  23658. this.getTipsTemplate();
  23659. // this.selectType();
  23660. this.selectEva();
  23661. if(this.istemplate == 1){
  23662. this.isOutline = true
  23663. this.isOutline2 = true
  23664. this.courseTextBool = true
  23665. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  23666. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  23667. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  23668. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  23669. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  23670. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  23671. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  23672. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  23673. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  23674. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  23675. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  23676. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  23677. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  23678. }
  23679. this.loading = false;
  23680. // this.timer2 = setInterval(() => {
  23681. // this.selectEva();
  23682. // }, 5000);
  23683. // this.pasteTimer = setInterval(() => {
  23684. // this.getPaste();
  23685. // }, 1000);
  23686. this.pasteTimer = setInterval(() => {
  23687. this.getPaste2();
  23688. }, 500);
  23689. setTimeout(() => {
  23690. // this.selectAllType();
  23691. this.selectCourseDetail();
  23692. }, 500);
  23693. let _this = this;
  23694. window.pasteStage = function (json) {
  23695. _this.pasteStage(json);
  23696. };
  23697. window.pasteTask = function (json) {
  23698. _this.pasteTask(json);
  23699. };
  23700. },
  23701. };
  23702. </script>
  23703. <style scoped>
  23704. @media screen and (max-width: 1280px) {
  23705. .mbCss {
  23706. flex-direction: column !important;
  23707. }
  23708. .pjCss {
  23709. width: 100% !important;
  23710. }
  23711. .evaCss {
  23712. width: 100% !important;
  23713. margin-top: 10px;
  23714. }
  23715. }
  23716. .el-table>>>.even_row {
  23717. background-color: #f1f1f1 !important;
  23718. }
  23719. .dialog_diy>>>.el-dialog__header {
  23720. background: #3c3c3c !important;
  23721. padding: 15px 20px;
  23722. }
  23723. .dialog_diy>>>.el-dialog__title {
  23724. color: #fff;
  23725. }
  23726. .dialog_diy>>>.el-dialog__headerbtn {
  23727. top: 19px;
  23728. }
  23729. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  23730. color: #fff;
  23731. }
  23732. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  23733. color: #fff;
  23734. }
  23735. .dialog_diy>>>.el-dialog__body,
  23736. .dialog_diy>>>.el-dialog__footer {
  23737. background: #fafafa;
  23738. }
  23739. .dialog_diy3>>>.el-dialog__body,
  23740. .dialog_diy3>>>.el-dialog__footer {
  23741. background: #eee !important;
  23742. }
  23743. .dialog_diy3>>>.el-dialog__body {
  23744. padding: 20px 20px;
  23745. }
  23746. .dialog_diyStage>>>.el-dialog__body {
  23747. padding: 10px;
  23748. }
  23749. .source_diy>>>.el-dialog {
  23750. height: 100% !important;
  23751. margin: 0 auto !important;
  23752. }
  23753. .source_diy>>>.el-dialog__body {
  23754. height: calc(100% - 185px);
  23755. overflow: auto;
  23756. background: #e6eaf0;
  23757. }
  23758. .source_diy>>>.el-dialog__footer {
  23759. background: #e6eaf0 !important;
  23760. }
  23761. .left {
  23762. border-right: 1px solid rgb(60, 94, 143);
  23763. display: flex;
  23764. flex-direction: column;
  23765. align-items: center;
  23766. min-height: 600px;
  23767. width: 385px;
  23768. height: 80%;
  23769. }
  23770. .tips {
  23771. color: rgb(128, 128, 128);
  23772. font-size: 12px;
  23773. width: 270px;
  23774. margin: 40px;
  23775. }
  23776. .pb_content {
  23777. height: 100% !important;
  23778. /* margin: 0 20px 0 20px; */
  23779. }
  23780. .pb_content_body {
  23781. width: 100% !important;
  23782. height: 100%;
  23783. display: flex;
  23784. }
  23785. .info_solid {
  23786. width: 270px;
  23787. height: 30px;
  23788. border-left: 1px solid #bdbdbd;
  23789. margin: 10px 0px 10px 30px;
  23790. }
  23791. .info_steps {
  23792. width: 270px;
  23793. font-size: 0.875rem;
  23794. display: flex;
  23795. align-items: center;
  23796. }
  23797. .info_steps span:nth-child(1) {
  23798. width: 30px;
  23799. height: 30px;
  23800. background: rgba(0, 0, 0, 0.38);
  23801. display: block;
  23802. color: #fff;
  23803. border-radius: 40px;
  23804. text-align: center;
  23805. line-height: 30px;
  23806. }
  23807. .steps_active {
  23808. background: #3d67bc !important;
  23809. }
  23810. .info_steps span:nth-child(2) {
  23811. margin-left: 5px;
  23812. }
  23813. .right {
  23814. height: 100%;
  23815. width: 100%;
  23816. display: flex;
  23817. overflow: hidden;
  23818. flex-direction: column;
  23819. }
  23820. .leftBar{
  23821. width: 290px;
  23822. height: calc(100% - 50px);
  23823. overflow: auto;
  23824. border-radius: 5px;
  23825. margin: 25px auto;
  23826. box-sizing: border-box;
  23827. margin-right: 10px;
  23828. }
  23829. .leftBar2{
  23830. width: 400px;
  23831. min-width: 400px;
  23832. height: calc(100% - 50px);
  23833. overflow: auto;
  23834. border-radius: 5px;
  23835. margin: 25px auto;
  23836. box-sizing: border-box;
  23837. margin-right: 10px;
  23838. background: #fff;
  23839. padding: 5px;
  23840. border-radius: 5px;
  23841. }
  23842. .basic_box {
  23843. margin: 0 auto;
  23844. position: relative;
  23845. padding: 0 20px 0 20px;
  23846. }
  23847. .basic_box_success {
  23848. width: 100%;
  23849. min-height: 455px;
  23850. padding: 50px 0;
  23851. position: relative;
  23852. text-align: center;
  23853. border-bottom: 1px solid #bfbfbf;
  23854. box-sizing: border-box;
  23855. display: flex;
  23856. align-items: center;
  23857. flex-direction: column;
  23858. justify-content: center;
  23859. }
  23860. .info_title {
  23861. font-size: 1.5em;
  23862. margin-right: 25px;
  23863. /* margin: 20px 30px 20px 30px; */
  23864. }
  23865. .bInfo_title {
  23866. text-align: left;
  23867. margin: 10px 0;
  23868. }
  23869. .small_title {
  23870. font-size: 14px;
  23871. line-height: 40px;
  23872. }
  23873. .chapter_beizhu {
  23874. font-size: 12px;
  23875. font-weight: bold;
  23876. float: right;
  23877. color: rgb(128, 128, 128);
  23878. margin-top: 5px;
  23879. }
  23880. .chapter_uploadBox1 {
  23881. text-align: left;
  23882. background-color: rgb(242, 242, 242);
  23883. width: 100%;
  23884. height: 67px;
  23885. padding: 0px 15px;
  23886. border-radius: 8px;
  23887. overflow: hidden;
  23888. font-size: 16px;
  23889. box-sizing: border-box;
  23890. position: relative;
  23891. }
  23892. .chapter_add {
  23893. width: 100%;
  23894. height: 32px;
  23895. margin-top: 15px;
  23896. cursor: pointer;
  23897. }
  23898. .chapter_add_l {
  23899. margin-left: 5px;
  23900. width: 30px;
  23901. height: 30px;
  23902. float: left;
  23903. border: 1px solid #aaa;
  23904. color: #aaa;
  23905. border-radius: 50%;
  23906. font-size: 25px;
  23907. text-align: center;
  23908. }
  23909. .chapter_add_r {
  23910. font-size: 18px;
  23911. height: 40px;
  23912. line-height: 30px;
  23913. text-indent: 10px;
  23914. color: #aaa;
  23915. }
  23916. .chapter_add_r span {
  23917. font-size: 12px;
  23918. color: rgb(204, 204, 204);
  23919. }
  23920. .chapter_add_input {
  23921. display: none;
  23922. }
  23923. .line {
  23924. width: 85%;
  23925. margin: 0 auto;
  23926. border-top: 1px solid #e5e5e5;
  23927. margin-top: 20px;
  23928. }
  23929. .info_btnBox {
  23930. width: calc(100%);
  23931. display: flex;
  23932. justify-content: center;
  23933. height: 80px;
  23934. align-items: center;
  23935. background: #fff;
  23936. margin: 0 auto;
  23937. border-top: 2px solid rgb(228, 232, 237);
  23938. box-sizing: border-box;
  23939. }
  23940. .info_btnBox2 {
  23941. width: calc(100%);
  23942. display: flex;
  23943. justify-content: center;
  23944. height: 20px;
  23945. align-items: center;
  23946. background: #fff;
  23947. margin: 0 auto;
  23948. border-top: 2px solid rgb(228, 232, 237);
  23949. box-sizing: border-box;
  23950. overflow: hidden;
  23951. cursor: pointer;
  23952. }
  23953. .info_btnBox3 {
  23954. width: calc(100%);
  23955. display: flex;
  23956. justify-content: flex-end;
  23957. padding: 0 20px;
  23958. height: 60px;
  23959. align-items: center;
  23960. background: unset;
  23961. margin: 0 auto;
  23962. /* border-top: 1px solid rgb(228, 232, 237); */
  23963. box-sizing: border-box;
  23964. overflow: hidden;
  23965. cursor: pointer;
  23966. background: #fff;
  23967. border-radius: 10px;
  23968. }
  23969. .info_btn+.info_btn {
  23970. margin-left: 15px;
  23971. }
  23972. .info_btn,
  23973. .teacherWord {
  23974. color: #fff;
  23975. background-color: #0f7eff;
  23976. padding: 8px 24px;
  23977. font-size: 0.9375rem;
  23978. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  23979. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  23980. min-width: 64px;
  23981. font-weight: 500;
  23982. border-radius: 4px;
  23983. box-sizing: border-box;
  23984. border: none;
  23985. cursor: pointer;
  23986. }
  23987. .teacherWord {
  23988. width: 105px !important;
  23989. text-align: center !important;
  23990. line-height: 36px !important;
  23991. padding: 0 !important;
  23992. font-size: 14px !important;
  23993. margin: 10px 0 !important;
  23994. }
  23995. .template_box {
  23996. display: flex;
  23997. flex-wrap: wrap;
  23998. }
  23999. .wordTeacher {
  24000. display: flex;
  24001. flex-direction: column;
  24002. width: 100px;
  24003. height: 100px;
  24004. text-align: center;
  24005. font-size: 13px;
  24006. margin: 0 20px 20px 0;
  24007. background: #f0f4fa;
  24008. position: relative;
  24009. border-radius: 5px;
  24010. align-items: center;
  24011. justify-content: center;
  24012. border: 1px solid #cad1dc;
  24013. color: #0e1e33;
  24014. /* padding: 25px 0px; */
  24015. cursor: pointer;
  24016. }
  24017. .wordTeacher::after {
  24018. content: "";
  24019. display: block;
  24020. position: absolute;
  24021. width: 15px;
  24022. height: 15px;
  24023. right: 10px;
  24024. top: 10px;
  24025. background-image: url(../../../assets/icon/new/choose_a.png);
  24026. background-size: 100% 100%;
  24027. }
  24028. .wordTeacherA::after {
  24029. background-image: url(../../../assets/icon/new/choose_b.png);
  24030. }
  24031. .wordTeacher:nth-child(5n) {
  24032. margin-right: 0px;
  24033. }
  24034. .wordPic {
  24035. margin: 0 auto;
  24036. width: 30px;
  24037. height: 30px;
  24038. cursor: pointer;
  24039. }
  24040. .deleteWord {
  24041. width: 22px;
  24042. height: 22px;
  24043. position: absolute;
  24044. right: 5px;
  24045. top: -15px;
  24046. cursor: pointer;
  24047. display: none;
  24048. z-index: 999;
  24049. }
  24050. .wordPic>img,
  24051. .deleteWord>img,
  24052. .addToolImg>img {
  24053. width: 100%;
  24054. height: 100%;
  24055. }
  24056. .info_btn:hover {
  24057. background-color: #4f7cd5 !important;
  24058. }
  24059. .cru_selectBox {
  24060. display: flex;
  24061. margin: 15px 0;
  24062. flex-wrap: nowrap;
  24063. white-space: nowrap;
  24064. overflow: auto;
  24065. position: relative;
  24066. height: 40px;
  24067. max-width: calc(100% - 175px);
  24068. }
  24069. .cru_selectBox::-webkit-scrollbar {
  24070. /*滚动条整体样式*/
  24071. width: 6px;
  24072. /*高宽分别对应横竖滚动条的尺寸*/
  24073. height: 6px;
  24074. }
  24075. /*定义滚动条轨道 内阴影+圆角*/
  24076. .cru_selectBox::-webkit-scrollbar-track {
  24077. border-radius: 10px;
  24078. background-color: #eee;
  24079. }
  24080. /*定义滑块 内阴影+圆角*/
  24081. .cru_selectBox::-webkit-scrollbar-thumb {
  24082. border-radius: 10px;
  24083. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  24084. background-color: rgba(0, 0, 0, 0.1);
  24085. }
  24086. .cru_line {
  24087. position: absolute;
  24088. bottom: 0px;
  24089. transition: all 0.5s;
  24090. left: 0px;
  24091. width: 50px;
  24092. height: 4px;
  24093. left: 10px;
  24094. border-radius: 2px;
  24095. background: #3681fc;
  24096. }
  24097. .cru_select {
  24098. font-size: 18px;
  24099. margin-right: 20px;
  24100. margin-left: 5px;
  24101. cursor: pointer;
  24102. color: #0e1e33;
  24103. }
  24104. .cru_select:hover {
  24105. color: #3681fc !important;
  24106. }
  24107. .cru_selected {
  24108. color: #3681fc !important;
  24109. font-weight: bold;
  24110. }
  24111. .chapter_box {
  24112. margin-top: 10px;
  24113. width: 100%;
  24114. padding: 10px 20px;
  24115. background: #fff;
  24116. border-radius: 8px;
  24117. box-sizing: border-box;
  24118. }
  24119. .chapter_contentbox {
  24120. display: flex;
  24121. align-items: center;
  24122. /* margin-top: 15px; */
  24123. }
  24124. .chapter_contentbox .cc_title {
  24125. margin: 0px;
  24126. color: black;
  24127. display: block;
  24128. white-space: nowrap;
  24129. overflow: hidden;
  24130. text-overflow: ellipsis;
  24131. margin-right: 20px;
  24132. font-size: 18px;
  24133. height: 20px;
  24134. line-height: 22px;
  24135. min-width: fit-content;
  24136. display: flex;
  24137. }
  24138. .chapter_contentbox .cc_title::before {
  24139. content: "";
  24140. height: 100%;
  24141. width: 3px;
  24142. background: #3681fc;
  24143. border-radius: 3px;
  24144. opacity: 1;
  24145. display: block;
  24146. margin-right: 10px;
  24147. }
  24148. .chapter_contentbox .cc_input {
  24149. width: 100%;
  24150. display: flex;
  24151. }
  24152. .show_taskD {
  24153. min-width: fit-content;
  24154. margin-left: 10px;
  24155. display: flex;
  24156. align-items: center;
  24157. font-size: 14px;
  24158. cursor: pointer;
  24159. color: #717c8d;
  24160. }
  24161. .show_taskD>img {
  24162. width: 15px;
  24163. margin-right: 5px;
  24164. transition: 0.2s all;
  24165. transform: rotate(-90deg);
  24166. }
  24167. .show_taskD.show>img {
  24168. transform: rotate(0deg);
  24169. }
  24170. .show_toolD {
  24171. min-width: fit-content;
  24172. margin-left: 10px;
  24173. display: flex;
  24174. align-items: center;
  24175. font-size: 14px;
  24176. cursor: pointer;
  24177. color: #717c8d;
  24178. /* position: absolute;
  24179. right: 45px;
  24180. top: 5px; */
  24181. }
  24182. .show_toolD>img {
  24183. width: 15px;
  24184. margin-right: 5px;
  24185. transition: 0.2s all;
  24186. transform: rotate(-90deg);
  24187. }
  24188. .show_toolD.show>img {
  24189. transform: rotate(0deg);
  24190. }
  24191. .remove {
  24192. background-image: url("../../../assets/icon/new/delete_u.png");
  24193. cursor: pointer;
  24194. opacity: 0.5;
  24195. width: 30px;
  24196. min-width: 30px;
  24197. height: 30px;
  24198. background-size: 100% 100%;
  24199. background-repeat: no-repeat;
  24200. margin-left: 10px;
  24201. }
  24202. .remove1 {
  24203. background-image: url("../../../assets/remove1.png");
  24204. background-repeat: no-repeat;
  24205. background-position: 5px 10px;
  24206. width: 40px;
  24207. height: 50px;
  24208. cursor: pointer;
  24209. margin-left: 10px;
  24210. }
  24211. .binfo_input {
  24212. width: 100%;
  24213. margin: 0;
  24214. padding: 12px 14px;
  24215. display: block;
  24216. min-width: 0;
  24217. outline: none;
  24218. box-sizing: border-box;
  24219. background: none;
  24220. border: none;
  24221. border-radius: 4px;
  24222. background: #fff;
  24223. font-size: 16px;
  24224. resize: none;
  24225. font-family: "Microsoft YaHei";
  24226. min-height: 48px;
  24227. /* border: 1px solid #3682fc00; */
  24228. border: 1.5px solid #cad1dc;
  24229. }
  24230. .binfo_textarea {
  24231. border: 1.5px solid #cad1dc;
  24232. font-size: 16px;
  24233. resize: none;
  24234. /* background: #f6f6f6; */
  24235. font-family: "Microsoft YaHei";
  24236. }
  24237. .binfo_input:focus-visible {
  24238. border: 1.5px solid #3681fc !important;
  24239. }
  24240. .time {
  24241. display: flex;
  24242. margin: 35px 0 80px 0;
  24243. }
  24244. .chapter_btnbox {
  24245. width: 160px;
  24246. border-radius: 5px;
  24247. border: 2px dashed gray;
  24248. display: flex;
  24249. padding: 8px 50px;
  24250. align-items: center;
  24251. justify-content: center;
  24252. margin: 30px auto 0;
  24253. cursor: pointer;
  24254. }
  24255. .icon_add {
  24256. position: relative;
  24257. width: 24px;
  24258. padding-top: 20px;
  24259. border-radius: 100%;
  24260. border-width: 2px;
  24261. border-style: solid;
  24262. border-color: gray;
  24263. }
  24264. .icon_add i:nth-child(1) {
  24265. position: absolute;
  24266. left: 50%;
  24267. top: 50%;
  24268. height: 60%;
  24269. transform: translate(-50%, -50%);
  24270. border-width: 1px;
  24271. border-style: solid;
  24272. border-color: inherit;
  24273. }
  24274. .icon_add i:nth-child(2) {
  24275. position: absolute;
  24276. top: 50%;
  24277. left: 50%;
  24278. width: 60%;
  24279. transform: translate(-50%, -50%);
  24280. border-width: 1px;
  24281. border-style: solid;
  24282. border-color: inherit;
  24283. }
  24284. .chapter_btn_w {
  24285. font-size: 0.9375rem;
  24286. font-weight: bold;
  24287. color: gray;
  24288. margin-left: 20px;
  24289. }
  24290. .disUoloadSty>>>.el-icon-plus {
  24291. display: none !important;
  24292. /* 上传按钮隐藏 */
  24293. }
  24294. .imgLeft {
  24295. margin: 15px 0;
  24296. }
  24297. .add_info_box {
  24298. margin: 0 0 0 auto;
  24299. display: flex;
  24300. flex-wrap: wrap;
  24301. }
  24302. .add_info_box button {
  24303. margin: 0 5px 10px 0;
  24304. }
  24305. .add_info_box2 {
  24306. display: flex;
  24307. align-items: center;
  24308. flex-wrap: wrap;
  24309. }
  24310. .add_info_box2::after {
  24311. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  24312. color: red;
  24313. font-size: 14px;
  24314. margin-bottom: 10px;
  24315. }
  24316. .add_chapters_box {
  24317. text-align: left;
  24318. background-color: #fff;
  24319. width: 100%;
  24320. border-radius: 4px;
  24321. font-size: 16px;
  24322. box-sizing: border-box;
  24323. position: relative;
  24324. padding: 0 15px;
  24325. height: auto;
  24326. overflow-y: auto;
  24327. overflow-x: hidden;
  24328. border: 1px solid #cad1dc;
  24329. }
  24330. .add_chapters_box.add_c_none {
  24331. display: flex;
  24332. justify-content: center;
  24333. align-items: center;
  24334. padding: 15px;
  24335. }
  24336. .add_c_none>img {
  24337. width: 25px;
  24338. }
  24339. .add_chapters_box.add_c_none>span {
  24340. font-size: 14px;
  24341. font-weight: 400;
  24342. margin: 0 0 5px 5px;
  24343. }
  24344. .homework_box {
  24345. display: flex;
  24346. align-items: flex-start;
  24347. flex-wrap: wrap;
  24348. margin: 15px 0 0 0;
  24349. flex-direction: column;
  24350. align-content: flex-start;
  24351. }
  24352. .course_homework {
  24353. display: flex;
  24354. justify-content: center;
  24355. flex-direction: row;
  24356. align-items: center;
  24357. margin: 0 10px 0 0;
  24358. }
  24359. .course_homework>>>.el-input__inner {
  24360. width: 140px;
  24361. margin-left: 15px;
  24362. }
  24363. .chapter_upload_move {
  24364. position: relative;
  24365. background-color: #fff;
  24366. position: absolute;
  24367. width: 100%;
  24368. top: 0px;
  24369. left: 0px;
  24370. border: 1px solid #eee;
  24371. border-radius: 5px;
  24372. transition: width 2s;
  24373. -moz-transition: width 2s;
  24374. -webkit-transition: width 2s;
  24375. -o-transition: width 2s;
  24376. }
  24377. .chapter_upload_l_i {
  24378. background-image: url("../../../assets/icon.png");
  24379. background-position: 3px -165px;
  24380. width: 30px;
  24381. height: 30px;
  24382. margin: 10px auto 0 auto;
  24383. }
  24384. .course_input_box {
  24385. display: flex;
  24386. margin-right: 20px;
  24387. min-width: 400px;
  24388. width: calc(100% - 350px);
  24389. align-items: center;
  24390. position: relative;
  24391. margin-bottom: 15px;
  24392. }
  24393. .course_input_box2 {
  24394. display: flex;
  24395. width: 100%;
  24396. align-items: center;
  24397. position: relative;
  24398. flex-wrap: wrap;
  24399. }
  24400. .course_input_box>.binfo_input {
  24401. width: calc(100%);
  24402. margin: 0;
  24403. border: 1.5px solid rgb(202, 209, 220);
  24404. border-radius: 5px;
  24405. font-weight: 600;
  24406. padding: 12px 14px 12px 71px;
  24407. }
  24408. .bb_courseIcon {
  24409. width: 57px;
  24410. height: 45px;
  24411. background: #f0f4fa;
  24412. border-radius: 5px 0px 0px 5px;
  24413. display: flex;
  24414. align-items: center;
  24415. justify-content: center;
  24416. border-right: 1.5px solid rgb(202, 209, 220);
  24417. box-sizing: border-box;
  24418. position: absolute;
  24419. left: 1.5px;
  24420. }
  24421. .bb_courseIcon>img {
  24422. width: 25px;
  24423. height: auto;
  24424. }
  24425. .big_box {
  24426. /* margin-top: 20px; */
  24427. display: flex;
  24428. justify-content: space-between;
  24429. /* border-bottom: 1px solid #E0E2ED; */
  24430. }
  24431. .left_first {
  24432. display: flex;
  24433. flex-direction: column;
  24434. flex-wrap: nowrap;
  24435. width: calc(100% - 310px);
  24436. padding: 20px;
  24437. box-sizing: border-box;
  24438. background: #fff;
  24439. border-radius: 5px;
  24440. }
  24441. .right_first {
  24442. width: 300px;
  24443. display: flex;
  24444. align-items: center;
  24445. justify-content: center;
  24446. /* border-left: 1px solid #E0E2ED; */
  24447. box-sizing: border-box;
  24448. padding: 20px;
  24449. flex-direction: column;
  24450. background: #fff;
  24451. border-radius: 5px;
  24452. }
  24453. .ai_box {
  24454. width: 204px;
  24455. display: flex;
  24456. justify-content: flex-end;
  24457. margin-bottom: 15px;
  24458. }
  24459. .ai_content {
  24460. display: flex;
  24461. align-items: center;
  24462. font-size: 14px;
  24463. padding: 7px 20px;
  24464. box-sizing: border-box;
  24465. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  24466. border-radius: 12px;
  24467. font-weight: 700;
  24468. cursor: pointer;
  24469. }
  24470. .ai_content>img {
  24471. width: 40px;
  24472. margin-right: 5px;
  24473. }
  24474. .c_info_title {
  24475. padding: 15px 0 15px 0;
  24476. font-size: 16px;
  24477. font-weight: bold;
  24478. margin: 0 0 0 20px;
  24479. box-sizing: border-box;
  24480. display: flex;
  24481. align-items: center;
  24482. line-height: 20px;
  24483. }
  24484. .c_info_title::before {
  24485. content: "";
  24486. display: block;
  24487. width: 3px;
  24488. height: 20px;
  24489. background: #0061ff;
  24490. border-radius: 3px;
  24491. margin: 0 5px 0 0;
  24492. }
  24493. .right_title {
  24494. height: 30px;
  24495. padding: 15px 0 15px 20px;
  24496. border-bottom: 1px solid #f2f2f2;
  24497. font-size: 1.5em;
  24498. font-weight: bold;
  24499. color: #0f7eff;
  24500. margin: 0 auto;
  24501. }
  24502. .people {
  24503. border: 1px solid rgb(229 229 229);
  24504. /* height: 495px; */
  24505. height: 350px;
  24506. border-radius: 5px;
  24507. width: 100%;
  24508. overflow: auto;
  24509. }
  24510. .people_top {
  24511. display: flex;
  24512. width: 100%;
  24513. /* justify-content: space-between; */
  24514. /* align-items: center; */
  24515. flex-direction: column;
  24516. padding: 10px 10px 0;
  24517. box-sizing: border-box;
  24518. }
  24519. .people_nav,
  24520. .people_top_right {
  24521. /* padding: 20px 0 0 20px; */
  24522. }
  24523. .people_top_right {
  24524. height: 40px;
  24525. margin-bottom: 10px;
  24526. }
  24527. .people_search {
  24528. display: flex;
  24529. position: relative;
  24530. }
  24531. .people_search>>>.el-input__inner {
  24532. /* height: 25px; */
  24533. width: 100%;
  24534. }
  24535. .search_img {
  24536. width: 20px;
  24537. height: 20px;
  24538. position: absolute;
  24539. right: 10px;
  24540. top: 50%;
  24541. transform: translateY(-50%);
  24542. }
  24543. .search_img>img {
  24544. width: 100%;
  24545. height: 100%;
  24546. }
  24547. .people_name {
  24548. display: flex;
  24549. justify-content: flex-start;
  24550. padding: 20px 10px;
  24551. flex-direction: column;
  24552. flex-wrap: wrap;
  24553. }
  24554. .p_box {
  24555. position: relative;
  24556. }
  24557. .people_name>>>.el-checkbox {
  24558. width: 100%;
  24559. display: flex;
  24560. align-items: center;
  24561. margin-bottom: 10px;
  24562. }
  24563. .people_name>>>.el-checkbox__label {
  24564. text-overflow: ellipsis;
  24565. overflow: hidden;
  24566. width: calc(100%);
  24567. }
  24568. .people_name2>>>.el-checkbox__label {
  24569. width: calc(100% - 130px);
  24570. }
  24571. .inviteCode {
  24572. position: absolute;
  24573. right: 30px;
  24574. color: #237ade;
  24575. top: 0;
  24576. cursor: pointer;
  24577. font-size: 13px;
  24578. }
  24579. .noneInvite {
  24580. color: #a8a8a8;
  24581. }
  24582. .inviteImg {
  24583. position: absolute;
  24584. right: 5px;
  24585. top: 0;
  24586. width: 20px;
  24587. }
  24588. .right_img {
  24589. width: 150px;
  24590. height: 150px;
  24591. margin: 0 auto;
  24592. }
  24593. .right_img>img {
  24594. width: 100%;
  24595. height: 100%;
  24596. }
  24597. .number {
  24598. margin-top: 20px;
  24599. color: #4aa6ff;
  24600. text-decoration: underline;
  24601. }
  24602. .success_button {
  24603. display: flex;
  24604. text-align: center;
  24605. margin: 5% 0 auto;
  24606. flex-direction: row;
  24607. justify-content: center;
  24608. }
  24609. .look_course {
  24610. margin-right: 40px;
  24611. background: #3d67bc;
  24612. width: 200px;
  24613. height: 35px;
  24614. line-height: 35px;
  24615. color: #fff;
  24616. text-align: center;
  24617. font-size: 14px;
  24618. border-radius: 5px;
  24619. cursor: pointer;
  24620. }
  24621. .attend_others {
  24622. width: 250px;
  24623. background: #4fb13c;
  24624. height: 35px;
  24625. line-height: 35px;
  24626. color: #fff;
  24627. text-align: center;
  24628. font-size: 14px;
  24629. border-radius: 5px;
  24630. cursor: pointer;
  24631. }
  24632. .dialog_diy2>>>.el-dialog__body {
  24633. text-align: center;
  24634. }
  24635. .write_togother {
  24636. position: absolute;
  24637. right: 45px;
  24638. display: flex;
  24639. top: 5%;
  24640. }
  24641. .write_people {
  24642. font-size: 14px;
  24643. line-height: 50px;
  24644. padding-right: 10px;
  24645. }
  24646. .end_write {
  24647. background: #3d67bc;
  24648. color: #fff;
  24649. width: 100px;
  24650. height: 35px;
  24651. line-height: 35px;
  24652. text-align: center;
  24653. font-size: 14px;
  24654. border-radius: 5px;
  24655. cursor: pointer;
  24656. }
  24657. .chapter_upload+.chapter_upload {
  24658. /* margin-top: 15px; */
  24659. border-top: 1px solid #e7ebf1;
  24660. }
  24661. .chapter_upload {
  24662. height: 45px;
  24663. position: relative;
  24664. display: flex;
  24665. align-items: center;
  24666. width: 100%;
  24667. min-height: 45px;
  24668. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  24669. /* border-radius: 4px; */
  24670. /* overflow: hidden; */
  24671. box-sizing: border-box;
  24672. }
  24673. .chapter_upload_drag {
  24674. position: absolute;
  24675. cursor: pointer;
  24676. width: 16px;
  24677. height: 16px;
  24678. left: -9px;
  24679. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  24680. background-size: 100% 100%;
  24681. z-index: 10;
  24682. display: none;
  24683. }
  24684. .isNavStage>.chapter_upload_drag {
  24685. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  24686. }
  24687. .chapter_upload_t {
  24688. background-color: #fff;
  24689. position: absolute;
  24690. height: 100%;
  24691. top: 0px;
  24692. left: 0px;
  24693. box-sizing: border-box;
  24694. }
  24695. .chapter_upload_o {
  24696. width: 100%;
  24697. height: 100%;
  24698. position: relative;
  24699. z-index: 1;
  24700. }
  24701. .chapter_upload_ic {
  24702. margin: 0 15px 0px auto;
  24703. display: flex;
  24704. align-items: center;
  24705. }
  24706. .chapter_upload_ic_l {
  24707. width: 50px;
  24708. height: 50px;
  24709. float: left;
  24710. }
  24711. .chapter_upload_ic_l div {
  24712. width: 30px;
  24713. height: 35px;
  24714. background: url("../../../assets/icon/icon.png");
  24715. }
  24716. .chapter_upload_ic_edit {
  24717. height: 100%;
  24718. display: flex;
  24719. align-items: center;
  24720. cursor: pointer;
  24721. margin: 0 10px 0 0;
  24722. }
  24723. .chapter_upload_ic_edit div {
  24724. width: 18px;
  24725. height: 18px;
  24726. background-image: url("../../../assets/icon/new/edit_u.png");
  24727. background-size: 100% 100%;
  24728. }
  24729. .chapter_upload_ic_check {
  24730. height: 100%;
  24731. display: flex;
  24732. align-items: center;
  24733. cursor: pointer;
  24734. margin: 0 10px 0 0;
  24735. }
  24736. .chapter_upload_ic_check div {
  24737. width: 18px;
  24738. height: 18px;
  24739. background-image: url("../../../assets/icon/course/lookeye.svg");
  24740. background-size: 100% 100%;
  24741. }
  24742. .chapter_upload_ic_r {
  24743. height: 100%;
  24744. display: flex;
  24745. align-items: center;
  24746. cursor: pointer;
  24747. }
  24748. .chapter_upload_ic_r div {
  24749. width: 18px;
  24750. height: 18px;
  24751. background-image: url("../../../assets/icon/new/delete_u.png");
  24752. background-size: 100% 100%;
  24753. }
  24754. .chapter_upload_n {
  24755. display: flex;
  24756. text-indent: 10px;
  24757. text-decoration: none;
  24758. text-overflow: ellipsis;
  24759. white-space: nowrap;
  24760. overflow: hidden;
  24761. width: 55%;
  24762. margin-left: 10px;
  24763. cursor: pointer;
  24764. margin-top: 2px;
  24765. align-items: center;
  24766. }
  24767. .chapter_upload_l_i2,
  24768. .chapter_upload_l_i3,
  24769. .chapter_upload_l_i8,
  24770. .chapter_upload_l_i6,
  24771. .chapter_upload_l_i12,
  24772. .chapter_upload_l_i14,
  24773. .chapter_upload_l_i13 {
  24774. width: 15px;
  24775. height: 15px;
  24776. background-size: 100% 100%;
  24777. }
  24778. .chapter_upload_l_i2 {
  24779. background-image: url("../../../assets/icon/new/u_word.png");
  24780. }
  24781. .chapter_upload_l_i3 {
  24782. background-image: url("../../../assets/icon/new/u_video.png");
  24783. }
  24784. .chapter_upload_l_i8 {
  24785. background-image: url("../../../assets/icon/new/u_url.png");
  24786. }
  24787. .chapter_upload_l_i14 {
  24788. background-image: url("../../../assets/icon/new/u_source.png");
  24789. }
  24790. .chapter_upload_l_i6 {
  24791. background-image: url("../../../assets/icon/new/u_picture.png");
  24792. }
  24793. .chapter_upload_l_i12 {
  24794. background-image: url("../../../assets/icon/new/u_word.png");
  24795. }
  24796. .chapter_upload_l_i13 {
  24797. background-image: url("../../../assets/icon/new/u_img.png");
  24798. }
  24799. .chapter_upload_noSee {
  24800. background-image: url("../../../assets/icon/new/u_noUpload.png");
  24801. width: 18px;
  24802. height: 18px;
  24803. background-size: 100% 100%;
  24804. display: block;
  24805. margin-right: 10px;
  24806. }
  24807. .chapter_upload_ud {
  24808. display: flex;
  24809. flex-direction: row;
  24810. justify-content: center;
  24811. margin: 0 10px 0 0;
  24812. }
  24813. .chapter_upload_ud>.chapter_upload_up {
  24814. margin-bottom: 0;
  24815. margin-right: 10px;
  24816. }
  24817. .chapter_upload_down,
  24818. .chapter_upload_up {
  24819. width: 20px;
  24820. height: 20px;
  24821. background: #e4eaf2;
  24822. cursor: pointer;
  24823. margin: 0 auto;
  24824. border-radius: 5px;
  24825. display: flex;
  24826. justify-content: center;
  24827. align-items: center;
  24828. }
  24829. .chapter_upload_up::after,
  24830. .chapter_upload_down::after {
  24831. content: "";
  24832. background-image: url("../../../assets/icon/new/downBtn.png");
  24833. width: 13px;
  24834. height: 13px;
  24835. background-size: 100% 100%;
  24836. display: block;
  24837. }
  24838. .chapter_upload_up::after {
  24839. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  24840. }
  24841. .chapter_upload_up {
  24842. margin-bottom: 5px;
  24843. }
  24844. .chapter_upload_ud2 {
  24845. display: flex;
  24846. flex-direction: row;
  24847. justify-content: center;
  24848. margin: 0 10px 0 0;
  24849. }
  24850. .chapter_upload_ud2>.chapter_upload_up2 {
  24851. margin-bottom: 0;
  24852. margin-right: 10px;
  24853. }
  24854. .chapter_upload_down2,
  24855. .chapter_upload_up2 {
  24856. cursor: pointer;
  24857. margin: 0 auto;
  24858. border-radius: 5px;
  24859. display: flex;
  24860. justify-content: center;
  24861. align-items: center;
  24862. color: #717c8d;
  24863. font-size: 14px;
  24864. }
  24865. .chapter_upload_up2 {
  24866. margin-right: 10px;
  24867. }
  24868. .chapter_upload_up2::before,
  24869. .chapter_upload_down2::before {
  24870. content: "";
  24871. background-image: url("../../../assets/icon/new/c_down.png");
  24872. width: 14px;
  24873. height: 14px;
  24874. background-size: 100% 100%;
  24875. display: block;
  24876. margin-right: 5px;
  24877. }
  24878. .chapter_upload_up2::before {
  24879. background-image: url("../../../assets/icon/new/c_up.png") !important;
  24880. }
  24881. .addWordStyle {
  24882. display: flex;
  24883. flex-direction: row;
  24884. justify-content: flex-start;
  24885. overflow-x: auto;
  24886. white-space: nowrap;
  24887. flex-wrap: wrap;
  24888. }
  24889. /* table 样式 */
  24890. .cont>>>table {
  24891. border-top: 1px solid #ccc;
  24892. border-left: 1px solid #ccc;
  24893. }
  24894. .cont>>>table td,
  24895. .cont>>>table th {
  24896. border-bottom: 1px solid #ccc;
  24897. border-right: 1px solid #ccc;
  24898. /* padding: 20px 5px; */
  24899. padding: 5px 10px;
  24900. max-width: 0px;
  24901. height: 30px;
  24902. vertical-align: baseline;
  24903. }
  24904. .cont>>>table th {
  24905. border-bottom: 2px solid #ccc;
  24906. text-align: center;
  24907. }
  24908. /* blockquote 样式 */
  24909. .cont>>>blockquote {
  24910. display: block;
  24911. border-left: 8px solid #d0e5f2;
  24912. padding: 5px 10px;
  24913. margin: 10px 0;
  24914. line-height: 1.4;
  24915. font-size: 100%;
  24916. background-color: #f1f1f1;
  24917. }
  24918. /* code 样式 */
  24919. .cont>>>code {
  24920. display: inline-block;
  24921. /* *display: inline; */
  24922. zoom: 1;
  24923. background-color: #f1f1f1;
  24924. border-radius: 3px;
  24925. padding: 3px 5px;
  24926. margin: 0 3px;
  24927. }
  24928. .cont>>>pre code {
  24929. display: block;
  24930. }
  24931. /* ul ol 样式 */
  24932. .cont>>>ul,
  24933. ol {
  24934. margin: 10px 0 10px 20px;
  24935. }
  24936. .wordbox {
  24937. display: flex;
  24938. flex-wrap: wrap;
  24939. cursor: pointer;
  24940. width: 100%;
  24941. }
  24942. .checkword {
  24943. width: 22px;
  24944. height: 22px;
  24945. margin: 10px auto 0;
  24946. cursor: pointer;
  24947. }
  24948. .checkword img {
  24949. width: 100%;
  24950. }
  24951. .stepBg {
  24952. display: flex;
  24953. justify-content: space-between;
  24954. align-items: center;
  24955. background: #fff;
  24956. width: calc(100%);
  24957. margin: 0 auto;
  24958. }
  24959. .stepBorder {
  24960. height: 3px !important;
  24961. background: #cad1dc;
  24962. width: 100px !important;
  24963. margin: 0 15px !important;
  24964. position: relative;
  24965. }
  24966. .border-active {
  24967. background: #3681fc !important;
  24968. }
  24969. .border-active::before,
  24970. .border-active::after {
  24971. border-color: #3681fc !important;
  24972. }
  24973. .stepBorder::before,
  24974. .stepBorder::after {
  24975. content: "";
  24976. width: 9px;
  24977. height: 9px;
  24978. background: #ffffff;
  24979. opacity: 1;
  24980. border: 2px solid #acb4bf;
  24981. display: block;
  24982. box-sizing: border-box;
  24983. border-radius: 50%;
  24984. position: absolute;
  24985. top: 50%;
  24986. transform: translateY(-50%);
  24987. }
  24988. .stepBorder::after {
  24989. right: -9px;
  24990. }
  24991. .stepTop {
  24992. width: 100%;
  24993. /* border-radius: 10px; */
  24994. display: flex;
  24995. justify-content: center;
  24996. align-items: center;
  24997. flex-wrap: nowrap;
  24998. background: #fff;
  24999. /* top: 18%; */
  25000. height: 80px;
  25001. border-bottom: 2px solid rgb(228, 232, 237);
  25002. box-sizing: border-box;
  25003. }
  25004. .stepTop2 {
  25005. width: 100%;
  25006. /* border-radius: 10px; */
  25007. display: flex;
  25008. justify-content: center;
  25009. align-items: center;
  25010. flex-wrap: nowrap;
  25011. background: #fff;
  25012. /* top: 18%; */
  25013. height: 20px;
  25014. border-bottom: 2px solid rgb(228, 232, 237);
  25015. box-sizing: border-box;
  25016. overflow: hidden;
  25017. cursor: pointer;
  25018. }
  25019. .stepTop>div img {
  25020. width: 100%;
  25021. }
  25022. .stepTop>div {
  25023. height: 50px;
  25024. width: 180px;
  25025. cursor: pointer;
  25026. margin: 10px 0;
  25027. border-radius: 10px;
  25028. }
  25029. .first,
  25030. .second,
  25031. .third,
  25032. .four {
  25033. background: #3681fc;
  25034. height: 90px;
  25035. color: #fff;
  25036. display: flex;
  25037. flex-direction: row;
  25038. align-items: center;
  25039. justify-content: center;
  25040. }
  25041. .first>div:nth-child(1),
  25042. .second>div:nth-child(1),
  25043. .third>div:nth-child(1),
  25044. .four>div:nth-child(1) {
  25045. margin: 5px 10px 0 0;
  25046. width: 2rem;
  25047. }
  25048. .firstNo,
  25049. .secondNo,
  25050. .thirdNo,
  25051. .fourNo {
  25052. background: #e7e7e7;
  25053. color: #adadad;
  25054. display: flex;
  25055. flex-direction: row;
  25056. align-items: center;
  25057. justify-content: center;
  25058. }
  25059. .firstNo>div:nth-child(1),
  25060. .secondNo>div:nth-child(1),
  25061. .thirdNo>div:nth-child(1),
  25062. .fourNo>div:nth-child(1) {
  25063. margin: 5px 10px 0 0;
  25064. width: 2rem;
  25065. }
  25066. .uploadWidth>>>.el-upload {
  25067. width: 60px;
  25068. height: 60px;
  25069. position: relative;
  25070. }
  25071. .addPeople {
  25072. background: #fa6060;
  25073. width: 150px;
  25074. height: 40px;
  25075. color: #fff;
  25076. border-radius: 5px;
  25077. text-align: center;
  25078. line-height: 40px;
  25079. font-size: 14px;
  25080. cursor: pointer;
  25081. }
  25082. .kcImg {
  25083. width: 60px;
  25084. margin-left: 10px;
  25085. }
  25086. .zyImg {
  25087. width: 55px;
  25088. margin: 0 10px;
  25089. }
  25090. .deleteZy {
  25091. width: 20px;
  25092. position: absolute;
  25093. top: 5px;
  25094. right: 5px;
  25095. cursor: pointer;
  25096. }
  25097. .kcImg>img,
  25098. .zyImg>img,
  25099. .deleteZy>img {
  25100. width: 100%;
  25101. height: 100%;
  25102. }
  25103. .zyBox {
  25104. display: flex;
  25105. flex-direction: row;
  25106. align-items: center;
  25107. background: #67d37d;
  25108. color: #fff;
  25109. width: 210px;
  25110. margin: 20px 20px 0 0;
  25111. border-radius: 10px;
  25112. height: 70px;
  25113. position: relative;
  25114. }
  25115. .upCss {
  25116. display: flex;
  25117. flex-direction: row;
  25118. justify-content: flex-start;
  25119. }
  25120. .upCss>>>.el-icon-plus {
  25121. position: none !important;
  25122. width: 200px;
  25123. height: 100px;
  25124. display: flex;
  25125. flex-wrap: nowrap;
  25126. flex-direction: column;
  25127. align-items: center;
  25128. justify-content: center;
  25129. border: 1px dashed #ccc;
  25130. min-width: 78px;
  25131. min-height: 100px;
  25132. z-index: 999;
  25133. }
  25134. .upCss>>>.el-upload-list__item-name {
  25135. width: 100px;
  25136. white-space: nowrap;
  25137. overflow: hidden;
  25138. text-overflow: ellipsis;
  25139. }
  25140. .upCss>>>.el-upload-list__item .el-icon-close {
  25141. font-size: 20px;
  25142. z-index: 9999;
  25143. }
  25144. .addStageImg {
  25145. min-width: 20px;
  25146. min-height: 20px;
  25147. width: 20px;
  25148. height: 20px;
  25149. cursor: pointer;
  25150. }
  25151. .addHW {
  25152. width: 28px;
  25153. height: 28px;
  25154. cursor: pointer;
  25155. }
  25156. .addStageImg>img,
  25157. .addHW>img {
  25158. width: 100%;
  25159. height: 100%;
  25160. }
  25161. .addNewPP>>>.el-dialog__body {
  25162. padding: 5px 20px;
  25163. }
  25164. .addNewPP>>>.el-dialog {
  25165. margin-top: 5vh !important;
  25166. }
  25167. .addNewPP2>>>.el-dialog__body {
  25168. padding: 5px 0;
  25169. }
  25170. .addNewPP2>>>.el-dialog {
  25171. margin-top: 5vh !important;
  25172. }
  25173. .isHeight {
  25174. height: 680px;
  25175. }
  25176. .toolChoose {
  25177. display: flex;
  25178. /* width: 100%; */
  25179. flex-direction: row;
  25180. flex-wrap: wrap;
  25181. }
  25182. .tool,
  25183. .isToolChoose {
  25184. display: flex;
  25185. flex-direction: column;
  25186. flex-wrap: nowrap;
  25187. width: fit-content;
  25188. margin: 10px 0 10px 0;
  25189. align-items: center;
  25190. border: 2px solid #dbdbdb00;
  25191. padding: 10px 20px;
  25192. border-radius: 5px;
  25193. cursor: pointer;
  25194. /* box-shadow: 0 0 2px 0px #dedede; */
  25195. position: relative;
  25196. box-sizing: border-box;
  25197. }
  25198. .tool:hover {
  25199. border: 2px solid #a5c7ff;
  25200. }
  25201. .tool:hover>.noCTool {
  25202. display: block;
  25203. opacity: 0.5;
  25204. }
  25205. .isToolChoose {
  25206. border: 2px solid #438aff !important;
  25207. box-shadow: 0 0 2px 0px #438aff;
  25208. opacity: 1 !important;
  25209. }
  25210. .isCTool,
  25211. .noCTool {
  25212. width: 30px;
  25213. height: 30px;
  25214. position: absolute;
  25215. top: -4px;
  25216. right: -4px;
  25217. }
  25218. .noCTool {
  25219. display: none;
  25220. }
  25221. .isCTool>img,
  25222. .noCTool>img {
  25223. width: 100%;
  25224. height: 100%;
  25225. }
  25226. .tool+.tool {
  25227. margin-right: 10px;
  25228. }
  25229. .whiteBIcon {
  25230. width: 80px;
  25231. cursor: pointer;
  25232. display: flex;
  25233. flex-direction: column;
  25234. flex-wrap: nowrap;
  25235. align-items: center;
  25236. font-size: 14px;
  25237. }
  25238. .whiteBIcon>img,
  25239. .toolIcon>img,
  25240. .arrow>img {
  25241. width: 100%;
  25242. height: 100%;
  25243. }
  25244. .check img {
  25245. width: 20px;
  25246. height: 20px;
  25247. }
  25248. .whiteBIcon>img {
  25249. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  25250. border-radius: 15px;
  25251. }
  25252. .whiteBIcon>div:nth-child(2) {
  25253. height: 20px;
  25254. line-height: 20px;
  25255. }
  25256. .check {
  25257. /* width: 20px;
  25258. height: 20px; */
  25259. cursor: pointer;
  25260. margin: 10px 0 0;
  25261. }
  25262. .checkDiv {
  25263. display: flex;
  25264. align-items: center;
  25265. }
  25266. .checkDiv span {
  25267. margin-left: 5px;
  25268. color: #858585;
  25269. }
  25270. .customWidth>>>.el-dialog {
  25271. min-width: 600px !important;
  25272. }
  25273. .CollaborativeCss {
  25274. width: 100%;
  25275. display: flex;
  25276. justify-content: center;
  25277. align-items: center;
  25278. box-sizing: border-box;
  25279. padding: 10px 0;
  25280. cursor: pointer;
  25281. }
  25282. .CollaborativeCss >>> .el-tooltip {
  25283. overflow: hidden;
  25284. white-space: nowrap;
  25285. text-overflow: ellipsis;
  25286. }
  25287. .CollaborativeCss2 {
  25288. background: #e0eafb;
  25289. color: #3681fc;
  25290. font-weight: 700;
  25291. border-radius: 5px;
  25292. }
  25293. .a_addBox {
  25294. margin: 10px 0;
  25295. background: #fff;
  25296. padding: 15px;
  25297. /* max-height: 600px; */
  25298. overflow: auto;
  25299. }
  25300. .a_add_box {
  25301. border-bottom: 2px solid #eee;
  25302. padding-bottom: 25px;
  25303. }
  25304. .a_add_head {
  25305. display: flex;
  25306. align-items: center;
  25307. justify-content: space-between;
  25308. margin: 10px 0 0 0;
  25309. font-size: 18px;
  25310. }
  25311. .a_add_checkType {
  25312. margin-top: 10px;
  25313. display: flex;
  25314. font-size: 14px;
  25315. align-items: center;
  25316. }
  25317. .a_add_checkType span {
  25318. box-sizing: border-box;
  25319. padding: 0 0 5px 0;
  25320. cursor: pointer;
  25321. }
  25322. .a_add_checkType span+span {
  25323. margin-left: 10px;
  25324. }
  25325. .a_add_checkType .active {
  25326. border-bottom: 2px solid #409eff;
  25327. color: #409eff;
  25328. }
  25329. .a_add_head .a_add_head_input {
  25330. /* width: 540px; */
  25331. width: 100%;
  25332. }
  25333. .a_add_head .a_add_head_div {
  25334. display: flex;
  25335. align-items: center;
  25336. justify-content: space-between;
  25337. }
  25338. .a_add_body {
  25339. display: flex;
  25340. /* align-items: center; */
  25341. align-items: flex-end;
  25342. }
  25343. .a_add_input {
  25344. display: flex;
  25345. align-items: center;
  25346. flex-wrap: wrap;
  25347. }
  25348. .a_add_input_choice {
  25349. flex-direction: column;
  25350. margin-right: 10px;
  25351. }
  25352. .a_add_input_choice>>>.el-radio {
  25353. display: flex;
  25354. align-items: center;
  25355. flex-direction: row-reverse;
  25356. margin: 30px 0 0 0;
  25357. position: relative;
  25358. }
  25359. .a_add_input_choice>>>.el-checkbox {
  25360. display: flex;
  25361. align-items: center;
  25362. flex-direction: row-reverse;
  25363. margin: 30px 0 0 0;
  25364. position: relative;
  25365. }
  25366. .width100 {
  25367. width: 100%;
  25368. }
  25369. .a_add_input .a_add_persent {
  25370. width: 100%;
  25371. }
  25372. .a_add_persent_div {
  25373. width: 100%;
  25374. display: flex;
  25375. align-items: center;
  25376. }
  25377. .a_add_persent_div span {
  25378. margin: 5px 0;
  25379. }
  25380. .a_add_persent_div span:nth-child(1) {
  25381. width: 30%;
  25382. }
  25383. .a_add_persent_div span:nth-child(2) {
  25384. width: 7%;
  25385. }
  25386. .a_add_persent_div span:nth-child(3) {
  25387. width: 40%;
  25388. }
  25389. .a_add_body_div {
  25390. display: flex;
  25391. align-items: center;
  25392. justify-content: center;
  25393. /* flex-direction: column; */
  25394. position: absolute;
  25395. right: -20px;
  25396. transform: translateX(100%);
  25397. }
  25398. .a_add_body_div>>>.el-button--primary {
  25399. background: #466b99;
  25400. border: none;
  25401. }
  25402. .all_choose {
  25403. display: flex;
  25404. flex-direction: row;
  25405. align-items: flex-start;
  25406. width: 100%;
  25407. }
  25408. .all_choose+.all_choose {
  25409. /* margin-top: 10px */
  25410. }
  25411. .all_choose>span {
  25412. min-width: fit-content;
  25413. display: block;
  25414. white-space: nowrap;
  25415. overflow: hidden;
  25416. text-overflow: ellipsis;
  25417. margin-right: 20px;
  25418. font-weight: bold;
  25419. font-size: 14px;
  25420. }
  25421. .all_choose>>>.el-checkbox-group {
  25422. display: flex;
  25423. flex-direction: row;
  25424. width: 100%;
  25425. flex-wrap: wrap;
  25426. align-content: center;
  25427. justify-content: flex-start;
  25428. align-items: center;
  25429. margin-top: 3px;
  25430. }
  25431. .all_choose>.el-checkbox-group>>>.el-checkbox {
  25432. margin-bottom: 10px;
  25433. display: flex;
  25434. flex-direction: row;
  25435. align-items: center;
  25436. margin-right: 10px;
  25437. }
  25438. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  25439. min-width: 80px;
  25440. overflow: hidden;
  25441. width: 80px;
  25442. text-overflow: ellipsis;
  25443. white-space: nowrap;
  25444. }
  25445. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  25446. width: auto;
  25447. }
  25448. .choose>div:nth-child(3)>span {
  25449. /* letter-spacing: 0 !important; */
  25450. }
  25451. .choose {
  25452. display: flex;
  25453. flex-direction: column;
  25454. flex-wrap: nowrap;
  25455. height: 100%;
  25456. justify-content: space-evenly;
  25457. align-items: flex-start;
  25458. }
  25459. .both {
  25460. display: flex;
  25461. flex-direction: row;
  25462. flex-wrap: wrap;
  25463. width: 100%;
  25464. align-items: center;
  25465. justify-content: flex-start;
  25466. margin: 0 0 15px;
  25467. }
  25468. .notice>>>.el-dialog {
  25469. width: 500px !important;
  25470. text-align: center;
  25471. }
  25472. .notice>>>.el-button {
  25473. margin-top: 20px;
  25474. }
  25475. .whiteBg {
  25476. /* background: #fff; */
  25477. border-radius: 10px;
  25478. }
  25479. .wb_j_box {
  25480. display: flex;
  25481. width: 100%;
  25482. padding: 0 20px 0;
  25483. box-sizing: border-box;
  25484. }
  25485. .wb_j_box_content {
  25486. width: calc(100% - 55% - 100px);
  25487. display: flex;
  25488. align-items: center;
  25489. }
  25490. .wb_j_box_p_box {
  25491. max-width: calc(100% - 200px);
  25492. word-break: break-all;
  25493. overflow: hidden;
  25494. margin: 0 0 0 10px;
  25495. font-size: 14px;
  25496. color: #6e6e6e;
  25497. z-index: 999;
  25498. }
  25499. .chooseWho {
  25500. display: flex;
  25501. width: 410px;
  25502. flex-direction: row;
  25503. flex-wrap: nowrap;
  25504. justify-content: space-between;
  25505. padding-bottom: 10px;
  25506. }
  25507. .chooseWho>div {
  25508. cursor: pointer;
  25509. padding-bottom: 10px;
  25510. font-weight: bold;
  25511. }
  25512. .isChooseActive {
  25513. color: #3e88f4;
  25514. border-bottom: 2px solid #2f80f3;
  25515. }
  25516. .toolSort {
  25517. display: flex;
  25518. flex-direction: row;
  25519. flex-wrap: wrap;
  25520. justify-content: flex-start;
  25521. align-items: flex-start;
  25522. }
  25523. .toolSort>div {
  25524. margin-right: 10px;
  25525. }
  25526. .tools {
  25527. width: 100%;
  25528. display: flex;
  25529. flex-direction: column;
  25530. flex-wrap: nowrap;
  25531. align-items: flex-start;
  25532. }
  25533. .leftTools,
  25534. .rightTools {
  25535. width: 50%;
  25536. }
  25537. .leftTools+.leftTools {
  25538. border-top: 1px solid #dbdbdb;
  25539. padding-top: 30px;
  25540. }
  25541. .rightTools {
  25542. display: flex;
  25543. flex-direction: row;
  25544. flex-wrap: nowrap;
  25545. justify-content: space-around;
  25546. }
  25547. .firstToolList {
  25548. display: flex;
  25549. flex-direction: column;
  25550. flex-wrap: nowrap;
  25551. align-items: center;
  25552. }
  25553. .iconList {
  25554. display: flex;
  25555. flex-direction: row;
  25556. flex-wrap: wrap;
  25557. justify-content: flex-start;
  25558. align-items: center;
  25559. margin: 20px 0 5px 0;
  25560. width: 240px;
  25561. min-width: 240px;
  25562. }
  25563. .iconTool {
  25564. display: flex;
  25565. flex-direction: column;
  25566. flex-wrap: nowrap;
  25567. align-items: center;
  25568. justify-content: flex-start;
  25569. margin: 15px 10px;
  25570. }
  25571. .toolIcon {
  25572. width: 50px;
  25573. }
  25574. .taskBorder {
  25575. /* border: 1px solid #CAD1DC; */
  25576. border-radius: 10px;
  25577. margin-top: 10px;
  25578. min-height: 670px;
  25579. position: relative;
  25580. background: #fff;
  25581. padding: 20px;
  25582. overflow: hidden;
  25583. box-sizing: border-box;
  25584. }
  25585. .smallTaskBorder {
  25586. height: 405px;
  25587. min-height: 405px !important;
  25588. overflow: hidden;
  25589. }
  25590. /* .taskBorder>div {
  25591. padding: 30px 30px 10px;
  25592. } */
  25593. .addTaskBorder {
  25594. /* border: 2px solid #5E9AFC; */
  25595. border-radius: 8px;
  25596. margin-top: 10px;
  25597. cursor: pointer;
  25598. /* height: 50px;
  25599. line-height: 50px; */
  25600. background: #fff;
  25601. padding: 15px 0;
  25602. display: flex;
  25603. align-items: center;
  25604. justify-content: center;
  25605. }
  25606. /* .addTaskBorder>div {
  25607. margin: 0 auto;
  25608. display: flex;
  25609. align-items: center;
  25610. justify-content: center;
  25611. }
  25612. .addTaskBorder>div>img {
  25613. width: 20px;
  25614. }
  25615. .addTaskBorder>div>span {
  25616. font-size: 16px;
  25617. margin-left: 10px;
  25618. color: #5E9AFC;
  25619. } */
  25620. .funBlock {
  25621. display: flex;
  25622. padding: 15px 0;
  25623. flex-direction: row;
  25624. justify-content: center;
  25625. align-items: center;
  25626. position: absolute;
  25627. right: 0;
  25628. bottom: 0;
  25629. background: #fff;
  25630. width: 100%;
  25631. height: 60px;
  25632. z-index: 9;
  25633. }
  25634. .fold {
  25635. display: flex;
  25636. margin: 0 20px;
  25637. flex-direction: row;
  25638. align-items: center;
  25639. cursor: pointer;
  25640. color: #2b7bff;
  25641. }
  25642. .arrow {
  25643. margin-right: 8px;
  25644. width: 16px;
  25645. height: 16px;
  25646. min-width: 16px;
  25647. min-height: 16px;
  25648. background-size: 100% 100%;
  25649. display: block;
  25650. background-image: url(../../../assets/icon/new/u_up.png);
  25651. /* border-left: 7px solid transparent;
  25652. border-bottom: 7px solid #717C8D;
  25653. border-top: 0px solid transparent;
  25654. border-right: 7px solid transparent; */
  25655. /* box-sizing: border-box; */
  25656. transition: all 0.3s;
  25657. }
  25658. .arrowZ {
  25659. transform: rotate(180deg);
  25660. }
  25661. .addToolFun {
  25662. display: flex;
  25663. width: 150px;
  25664. flex-direction: row;
  25665. align-items: center;
  25666. justify-content: center;
  25667. border: 2px dashed #cad1dc;
  25668. border-radius: 5px;
  25669. height: 50px;
  25670. margin: 35px auto 0;
  25671. cursor: pointer;
  25672. }
  25673. .addToolFun2 {
  25674. display: flex;
  25675. width: 150px;
  25676. border: 2px dashed #cad1dc;
  25677. flex-direction: row;
  25678. align-items: center;
  25679. justify-content: center;
  25680. border-radius: 5px;
  25681. height: 50px;
  25682. margin: 0 auto 0;
  25683. cursor: pointer;
  25684. }
  25685. .addToolFun2>div,
  25686. .addToolFun>div {
  25687. display: flex;
  25688. line-height: 50px;
  25689. }
  25690. .addToolImg {
  25691. width: 20px;
  25692. height: 20px;
  25693. margin-right: 10px;
  25694. }
  25695. .addToolsDia>>>.el-dialog__body {
  25696. padding: 20px;
  25697. }
  25698. .addToolsDia>>>.el-dialog__body>.toolChoose {
  25699. padding: 0;
  25700. }
  25701. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  25702. padding: 0;
  25703. border-bottom: none;
  25704. margin-bottom: 0;
  25705. }
  25706. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  25707. width: 100%;
  25708. }
  25709. .lineCss>>>.el-form-item__label {
  25710. width: auto !important;
  25711. }
  25712. .lineCss>>>.el-form-item__content {
  25713. margin-left: 50px !important;
  25714. }
  25715. .newSteps {
  25716. display: flex;
  25717. width: 100% !important;
  25718. /* height: 80px; */
  25719. cursor: pointer;
  25720. margin: 10px 0;
  25721. border-radius: 10px;
  25722. flex-direction: row;
  25723. align-content: center;
  25724. justify-content: center;
  25725. align-items: center;
  25726. margin: 0 !important;
  25727. }
  25728. /* 评价样式 */
  25729. .elist_css {
  25730. padding-bottom: 75px !important;
  25731. }
  25732. .elist_title {
  25733. margin-bottom: 10px;
  25734. }
  25735. .elist_input {
  25736. width: 100%;
  25737. }
  25738. .elist_input_box {
  25739. display: flex;
  25740. align-items: center;
  25741. flex-wrap: wrap;
  25742. }
  25743. .elist_input_box+.elist_input_box {
  25744. margin-top: 30px;
  25745. }
  25746. .elist_input .elist_input_box input {
  25747. font: inherit;
  25748. color: currentColor;
  25749. width: 100%;
  25750. /* max-width: calc(100% - 385px); */
  25751. max-width: calc(100% - 150px);
  25752. padding: 8px 14px;
  25753. display: block;
  25754. min-width: 0;
  25755. outline: none;
  25756. border: 1px solid rgba(0, 0, 0, 0.23);
  25757. border-radius: 4px;
  25758. box-sizing: border-box;
  25759. background: #fff;
  25760. margin: 0 20px 0 0;
  25761. }
  25762. .elist_input .elist_input_box span {
  25763. height: 36px;
  25764. line-height: 36px;
  25765. color: rgb(82, 82, 82);
  25766. min-width: 80px;
  25767. }
  25768. .elist_input .elist_input_box .remove {
  25769. height: 20px;
  25770. width: 20px;
  25771. min-height: 20px;
  25772. min-width: 20px;
  25773. background-size: 100% 100%;
  25774. background-position: unset;
  25775. margin-left: 5px;
  25776. }
  25777. .elist_input_box>>>.el-rate {
  25778. display: flex;
  25779. height: 36px;
  25780. align-items: center;
  25781. }
  25782. .elist_input_box .elist_inptu_text {
  25783. width: 100%;
  25784. display: flex;
  25785. align-items: center;
  25786. margin-top: 10px;
  25787. }
  25788. .elist_input_box .elist_inptu_text input {
  25789. /* width: 500px; */
  25790. width: 100%;
  25791. max-width: unset;
  25792. }
  25793. .elist_input_box>>>.el-rate__icon {
  25794. font-size: 24px;
  25795. }
  25796. .elist_btn {
  25797. margin-top: 10px;
  25798. }
  25799. .lineTitle {
  25800. /* margin-top: 15px; */
  25801. width: 110px;
  25802. font-size: 16px;
  25803. display: flex;
  25804. align-items: center;
  25805. line-height: 20px;
  25806. }
  25807. .lineTitle::before {
  25808. content: "";
  25809. display: block;
  25810. width: 3px;
  25811. height: 20px;
  25812. background: #0061ff;
  25813. border-radius: 3px;
  25814. margin: 0 5px 0 0;
  25815. }
  25816. .clineTitle::before {
  25817. content: "";
  25818. display: block;
  25819. min-width: 10px;
  25820. width: 10px;
  25821. height: 10px;
  25822. background: #0061ff;
  25823. border-radius: 50%;
  25824. margin: 0 5px 0 0;
  25825. }
  25826. .courseTop {
  25827. display: flex;
  25828. flex-direction: row;
  25829. justify-content: space-between;
  25830. align-items: center;
  25831. width: calc(100% - 40px);
  25832. margin: 0 auto;
  25833. padding: 10px 0;
  25834. }
  25835. .stepsNav {
  25836. display: flex;
  25837. flex-direction: row;
  25838. justify-content: flex-start;
  25839. align-items: center;
  25840. }
  25841. .stepsWord {
  25842. font-size: 18px;
  25843. color: #fff;
  25844. font-weight: bold;
  25845. margin-left: auto;
  25846. background: rgb(15, 126, 255);
  25847. border-radius: 5px;
  25848. padding: 3px 25px;
  25849. box-sizing: border-box;
  25850. }
  25851. .stepBox {
  25852. width: calc(100% - 40px);
  25853. height: calc(100% - 50px);
  25854. overflow: hidden;
  25855. border-radius: 5px;
  25856. margin: 0 auto;
  25857. }
  25858. .rightBox {
  25859. width: calc(100%);
  25860. background: #f0f2f5;
  25861. /* border-radius: 10px; */
  25862. overflow: auto;
  25863. height: calc(100% - 150px);
  25864. margin: 0 auto;
  25865. position: relative;
  25866. box-sizing: border-box;
  25867. }
  25868. .e_add_top {
  25869. display: flex;
  25870. justify-content: space-between;
  25871. background: #fff;
  25872. position: absolute;
  25873. right: 20px;
  25874. height: 50px;
  25875. align-items: center;
  25876. }
  25877. .e_add_title2 {
  25878. display: flex;
  25879. align-items: center;
  25880. }
  25881. .e_add_title2 span {
  25882. width: 40px;
  25883. }
  25884. .e_add_title {
  25885. display: flex;
  25886. align-items: center;
  25887. color: #b8b8b8;
  25888. font-size: 18px;
  25889. position: relative;
  25890. height: 40px;
  25891. }
  25892. .e_add_title span {
  25893. margin-right: 10px;
  25894. }
  25895. .e_add_title .el_input {
  25896. width: 300px;
  25897. }
  25898. .e_add_title>>>.el-input__inner {
  25899. width: 400px;
  25900. }
  25901. .e_add_btn {}
  25902. .e_add_content {
  25903. display: flex;
  25904. width: 100%;
  25905. }
  25906. .e_add_list {
  25907. background: #fff;
  25908. height: 500px;
  25909. width: 210px;
  25910. position: relative;
  25911. margin: 15px 5px 0 0;
  25912. flex-shrink: 0;
  25913. display: flex;
  25914. flex-direction: column;
  25915. }
  25916. .e_add_list_title {
  25917. font-size: 20px;
  25918. width: 100%;
  25919. box-sizing: border-box;
  25920. padding: 15px 40px;
  25921. text-align: center;
  25922. border-bottom: 1px solid #eaeaea;
  25923. position: relative;
  25924. display: flex;
  25925. align-items: center;
  25926. justify-content: center;
  25927. height: 57px;
  25928. background: #f6f6f6;
  25929. }
  25930. .e_add_list_title span {
  25931. overflow: hidden;
  25932. white-space: nowrap;
  25933. text-overflow: ellipsis;
  25934. }
  25935. .e_add_list_title img {
  25936. position: absolute;
  25937. right: 15px;
  25938. width: 25px;
  25939. cursor: pointer;
  25940. top: 50%;
  25941. transform: translateY(-50%);
  25942. }
  25943. .e_add_list_body {
  25944. height: calc(100% - 187px);
  25945. overflow: auto;
  25946. }
  25947. .e_add_list_child {
  25948. width: 100%;
  25949. display: flex;
  25950. align-items: center;
  25951. justify-content: center;
  25952. position: relative;
  25953. box-sizing: border-box;
  25954. padding: 15px 40px;
  25955. text-align: center;
  25956. }
  25957. .e_add_list_child span {
  25958. overflow: hidden;
  25959. white-space: nowrap;
  25960. text-overflow: ellipsis;
  25961. cursor: pointer;
  25962. }
  25963. .e_add_list_child img {
  25964. position: absolute;
  25965. right: 10px;
  25966. width: 21px;
  25967. cursor: pointer;
  25968. top: 50%;
  25969. transform: translateY(-50%);
  25970. }
  25971. .e_add_list_child+.e_add_list_child {
  25972. border-top: 1px solid #eaeaea;
  25973. }
  25974. .e_add_list_child .active {
  25975. color: #409eff;
  25976. }
  25977. .e_add_list_btn {
  25978. position: absolute;
  25979. bottom: 0;
  25980. height: 50px;
  25981. background: rgb(120, 120, 254);
  25982. width: 100%;
  25983. color: #fff;
  25984. font-size: 16px;
  25985. text-align: center;
  25986. line-height: 50px;
  25987. cursor: pointer;
  25988. }
  25989. .e_add_list_detail {
  25990. position: absolute;
  25991. bottom: 0;
  25992. height: 130px;
  25993. background: rgb(120, 120, 254);
  25994. width: 100%;
  25995. color: #fff;
  25996. font-size: 16px;
  25997. display: flex;
  25998. align-items: center;
  25999. justify-content: center;
  26000. }
  26001. .e_add_list_detail textarea {
  26002. height: 90%;
  26003. width: 95%;
  26004. border: none;
  26005. resize: none;
  26006. outline: none;
  26007. padding: 5px;
  26008. box-sizing: border-box;
  26009. }
  26010. .e_add_list_pbox {
  26011. width: 100%;
  26012. }
  26013. .e_add_list_pbox_title {
  26014. height: 50px;
  26015. background: #fff;
  26016. display: flex;
  26017. align-items: center;
  26018. width: 100%;
  26019. box-sizing: border-box;
  26020. padding: 0 20px;
  26021. flex-direction: row;
  26022. flex-wrap: wrap;
  26023. }
  26024. .type_title {
  26025. font-size: 18px;
  26026. font-weight: 700;
  26027. }
  26028. .type_content {
  26029. font-size: 16px;
  26030. margin-left: 30px;
  26031. }
  26032. .type_content span+span {
  26033. margin-left: 20px;
  26034. }
  26035. .type_content span {
  26036. cursor: pointer;
  26037. padding-bottom: 5px;
  26038. box-sizing: border-box;
  26039. }
  26040. .type_content .active {
  26041. color: #409eff;
  26042. border-bottom: 2px solid #409eff;
  26043. }
  26044. .e_add_list_pbox_content {
  26045. height: calc(100% - 50px);
  26046. display: flex;
  26047. align-items: center;
  26048. width: 100%;
  26049. background: #fff;
  26050. }
  26051. .mbCss {
  26052. width: 100%;
  26053. display: flex;
  26054. flex-direction: row;
  26055. flex-wrap: nowrap;
  26056. align-content: center;
  26057. align-items: flex-start;
  26058. justify-content: flex-start;
  26059. }
  26060. .pjCss {
  26061. /* width: 42%; */
  26062. width: calc(100% - 55%);
  26063. display: flex;
  26064. flex-direction: column;
  26065. flex-wrap: nowrap;
  26066. align-items: flex-start;
  26067. }
  26068. .e_box {
  26069. /* display: flex; */
  26070. flex-wrap: wrap;
  26071. max-height: 500px;
  26072. align-items: flex-start;
  26073. overflow: auto;
  26074. width: 100%;
  26075. }
  26076. .e_card {
  26077. border: 1px solid #ccc;
  26078. background: #fff;
  26079. margin-right: 20px;
  26080. width: 270px;
  26081. display: flex;
  26082. flex-direction: column;
  26083. align-items: center;
  26084. border-radius: 5px;
  26085. margin-top: 10px;
  26086. text-align: center;
  26087. }
  26088. .e_card_picture {
  26089. margin: 10px 0;
  26090. }
  26091. .e_card_picture>img {
  26092. width: 50px;
  26093. }
  26094. .e_card_name {
  26095. width: 100%;
  26096. padding: 0 10px;
  26097. box-sizing: border-box;
  26098. margin-bottom: 10px;
  26099. overflow: hidden;
  26100. text-overflow: ellipsis;
  26101. white-space: nowrap;
  26102. }
  26103. .e_card_time {
  26104. width: 100%;
  26105. padding: 0 10px;
  26106. box-sizing: border-box;
  26107. font-size: 15px;
  26108. color: #c3c3c3;
  26109. margin-bottom: 10px;
  26110. }
  26111. .e_card_btn {
  26112. height: 40px;
  26113. display: flex;
  26114. align-items: center;
  26115. width: 100%;
  26116. background: rgb(244, 244, 244);
  26117. }
  26118. .e_card_btn:hover {
  26119. background: rgb(221 221 221);
  26120. }
  26121. .e_card_btn span {
  26122. flex: 1 1 auto;
  26123. text-align: center;
  26124. cursor: pointer;
  26125. }
  26126. .addEva {
  26127. border: 1px solid #ccc;
  26128. background: #fff;
  26129. margin-right: 20px;
  26130. width: 270px;
  26131. height: 149px;
  26132. display: flex;
  26133. flex-direction: column;
  26134. align-items: center;
  26135. border-radius: 5px;
  26136. margin-top: 10px;
  26137. text-align: center;
  26138. cursor: pointer;
  26139. justify-content: center;
  26140. }
  26141. .addEva>img {
  26142. width: 50px;
  26143. object-fit: cover;
  26144. }
  26145. .uploadFm {
  26146. border: 1px dashed #ccc;
  26147. width: 100%;
  26148. height: 140px;
  26149. position: relative;
  26150. cursor: pointer;
  26151. display: flex;
  26152. flex-direction: column;
  26153. justify-content: center;
  26154. align-items: center;
  26155. font-size: 14px;
  26156. color: #6e6e6e;
  26157. position: relative;
  26158. }
  26159. .cover_p {
  26160. width: 100% !important;
  26161. height: 100%;
  26162. object-fit: cover;
  26163. }
  26164. .uploadFm2:hover .cover_mask {
  26165. display: flex !important;
  26166. }
  26167. .cover_mask {
  26168. display: none;
  26169. width: 100%;
  26170. height: 100%;
  26171. position: absolute;
  26172. background: #00000054;
  26173. align-items: center;
  26174. justify-content: center;
  26175. flex-direction: column;
  26176. }
  26177. .cover_mask>img {
  26178. width: 30px;
  26179. }
  26180. .cover_mask>span {
  26181. color: #fff;
  26182. font-size: 12px;
  26183. }
  26184. .uploadFm>img {
  26185. width: 50px;
  26186. }
  26187. .fileCss {
  26188. width: 100%;
  26189. display: flex;
  26190. flex-direction: row;
  26191. flex-wrap: nowrap;
  26192. justify-content: space-around;
  26193. align-items: center;
  26194. padding-top: 15px;
  26195. }
  26196. .fileCss>div {
  26197. display: flex;
  26198. flex-direction: column;
  26199. align-items: center;
  26200. }
  26201. .fileCss .spanName {
  26202. margin-top: 10px;
  26203. }
  26204. .sysPicBox {
  26205. display: flex;
  26206. flex-direction: row;
  26207. flex-wrap: wrap;
  26208. align-content: flex-start;
  26209. height: 435px;
  26210. overflow: auto;
  26211. position: relative;
  26212. }
  26213. .picNone {
  26214. position: absolute;
  26215. left: 50%;
  26216. top: 45%;
  26217. transform: translate(-50%, -50%);
  26218. width: fit-content;
  26219. color: #9c9c9c;
  26220. }
  26221. .sysPic {
  26222. width: 200px;
  26223. height: 115px;
  26224. margin: 0 20px 20px 0;
  26225. cursor: pointer;
  26226. }
  26227. .sysPic>img,
  26228. .isSysPic>img,
  26229. .deletePic>img {
  26230. width: 100%;
  26231. height: 100%;
  26232. object-fit: cover;
  26233. }
  26234. .isSysPic {
  26235. width: 200px;
  26236. height: 115px;
  26237. position: relative;
  26238. }
  26239. .deletePic {
  26240. width: 20px;
  26241. height: 20px;
  26242. position: absolute;
  26243. top: 0;
  26244. right: 0;
  26245. cursor: pointer;
  26246. }
  26247. .select_box1 {
  26248. height: 100%;
  26249. }
  26250. .select_box1_img {
  26251. background: #fff;
  26252. border-radius: 5px;
  26253. padding: 15px;
  26254. box-sizing: border-box;
  26255. margin-bottom: 20px;
  26256. }
  26257. .select_box1_title {
  26258. padding: 0 0 15px 0;
  26259. border-bottom: 1px solid #eee;
  26260. margin-bottom: 15px;
  26261. }
  26262. .select_box1_title span:nth-child(1) {
  26263. font-size: 16px;
  26264. margin-right: 20px;
  26265. color: #000;
  26266. }
  26267. .select_box1_title span:nth-child(2) {
  26268. font-size: 14px;
  26269. color: rgb(112, 112, 112);
  26270. }
  26271. .select_box1_add_img {}
  26272. .select_box1_select {
  26273. background: #fff;
  26274. border-radius: 5px;
  26275. padding: 15px;
  26276. box-sizing: border-box;
  26277. height: calc(100% - 200px);
  26278. overflow: auto;
  26279. }
  26280. .select_box2 {
  26281. height: 100%;
  26282. }
  26283. .select_box2_title {
  26284. background: #fff;
  26285. border-radius: 5px;
  26286. padding: 5px 10px;
  26287. box-sizing: border-box;
  26288. margin-bottom: 10px;
  26289. }
  26290. .select_box2_box {
  26291. display: flex;
  26292. height: calc(100% - 30px);
  26293. }
  26294. .select_box2_img {
  26295. width: calc(100% - 310px);
  26296. height: 100%;
  26297. overflow: auto;
  26298. background: #fff;
  26299. border-radius: 5px;
  26300. }
  26301. .select_box2_img img {
  26302. width: 100%;
  26303. }
  26304. .select_box2_answer {
  26305. background: #fff;
  26306. margin-left: 10px;
  26307. border-radius: 5px;
  26308. width: 300px;
  26309. overflow: auto;
  26310. height: 100%;
  26311. display: flex;
  26312. flex-direction: column;
  26313. align-items: center;
  26314. padding-top: 10px;
  26315. box-sizing: border-box;
  26316. }
  26317. .select_box2_answer_box {
  26318. margin: 0 0 10px 0;
  26319. width: 85%;
  26320. }
  26321. .rate_textarea {
  26322. font: inherit;
  26323. color: currentColor;
  26324. width: 100%;
  26325. padding: 8px 14px;
  26326. display: block;
  26327. min-width: 0;
  26328. outline: none;
  26329. border: 1px solid rgba(0, 0, 0, 0.23);
  26330. border-radius: 4px;
  26331. box-sizing: border-box;
  26332. background: #fff;
  26333. margin: 0 20px 0 0;
  26334. resize: none;
  26335. }
  26336. .select_answer_title {
  26337. text-align: left;
  26338. width: 85%;
  26339. margin-bottom: 10px;
  26340. font-size: 18px;
  26341. color: #8e8e8e;
  26342. }
  26343. .mask {
  26344. background-color: rgb(0 0 0 / 30%);
  26345. /* position: fixed; */
  26346. position: absolute;
  26347. top: 0;
  26348. left: 0;
  26349. width: 100%;
  26350. height: 100%;
  26351. z-index: 90;
  26352. display: flex;
  26353. align-items: center;
  26354. justify-content: center;
  26355. }
  26356. .progressBox {
  26357. width: 300px;
  26358. height: 150px;
  26359. background: #fff;
  26360. border-radius: 10px;
  26361. box-shadow: 0 0 6px 1px #bfbfbf;
  26362. display: flex;
  26363. align-items: center;
  26364. justify-content: center;
  26365. flex-direction: column;
  26366. position: relative;
  26367. color: #6c6c6c;
  26368. }
  26369. .progressBox>>>.el-progress-bar__outer {
  26370. background-color: #d1dfff !important;
  26371. }
  26372. .progressBox .lbox {
  26373. height: 50px;
  26374. font-size: 19px;
  26375. display: flex;
  26376. align-items: center;
  26377. color: #747474;
  26378. }
  26379. .progressBox .lbox img {
  26380. width: 40px;
  26381. margin-right: 20px;
  26382. }
  26383. .closeCss {
  26384. position: absolute;
  26385. top: 8px;
  26386. right: 8px;
  26387. cursor: pointer;
  26388. width: 20px;
  26389. height: 20px;
  26390. }
  26391. .closeCss>img {
  26392. width: 100%;
  26393. height: 100%;
  26394. }
  26395. .updateTips::before {
  26396. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  26397. font-size: 14px;
  26398. margin-left: 20px;
  26399. font-weight: 400;
  26400. color: #ff3a3a;
  26401. margin-bottom: 10px;
  26402. display: block;
  26403. }
  26404. .updateMask {
  26405. width: 100%;
  26406. z-index: 3;
  26407. top: 0;
  26408. position: absolute;
  26409. /* background-color: rgba(0,0,0,.3); */
  26410. }
  26411. .t_j_box {
  26412. display: flex;
  26413. }
  26414. .t_j_box span:nth-child(1) {
  26415. width: 15%;
  26416. overflow: hidden;
  26417. margin-right: 10px;
  26418. text-overflow: ellipsis;
  26419. white-space: nowrap;
  26420. }
  26421. .t_j_box span:nth-child(2) {
  26422. width: 30%;
  26423. overflow: hidden;
  26424. text-overflow: ellipsis;
  26425. margin-right: 10px;
  26426. }
  26427. .t_j_box span:nth-child(3) {
  26428. max-width: calc(55% - 20px);
  26429. overflow: hidden;
  26430. text-overflow: ellipsis;
  26431. }
  26432. .sentenBox {
  26433. background: #fff;
  26434. height: 600px;
  26435. overflow: auto;
  26436. background-image: url("../../../assets/icon/conSentences/csBg.png");
  26437. background-position: 102%;
  26438. background-repeat: no-repeat;
  26439. background-size: 60%;
  26440. }
  26441. .sentenBox>.sentenContent {
  26442. padding-bottom: 10px;
  26443. width: 97%;
  26444. margin: 0 auto;
  26445. }
  26446. .sentenBox>.sentenContent+.sentenContent {
  26447. border-top: 1px solid #cbcbcb;
  26448. }
  26449. .addSen {
  26450. background: #409efe;
  26451. width: 90px;
  26452. color: #fff;
  26453. height: 35px;
  26454. text-align: center;
  26455. line-height: 35px;
  26456. border-radius: 5px;
  26457. float: right;
  26458. margin: 10px 20px 0 0;
  26459. cursor: pointer;
  26460. }
  26461. .sentenTop {
  26462. display: flex;
  26463. flex-direction: row;
  26464. flex-wrap: nowrap;
  26465. align-items: center;
  26466. }
  26467. .sentenTop::before {
  26468. content: attr(index);
  26469. background: #3681fc;
  26470. border-radius: 50%;
  26471. color: #fff;
  26472. width: 25px;
  26473. height: 25px;
  26474. min-width: 25px;
  26475. min-height: 25px;
  26476. text-align: center;
  26477. line-height: 25px;
  26478. margin-right: 5px;
  26479. }
  26480. .sentenTop>div:nth-child(2) {
  26481. width: 300px;
  26482. margin: 0 15px;
  26483. }
  26484. .sentenTop>div:nth-child(3) {
  26485. background: #409efe;
  26486. color: #fff;
  26487. width: 65px;
  26488. height: 35px;
  26489. text-align: center;
  26490. line-height: 35px;
  26491. border-radius: 5px;
  26492. cursor: pointer;
  26493. }
  26494. .cardList {
  26495. padding: 30px 0 20px 0;
  26496. display: flex;
  26497. flex-direction: row;
  26498. flex-wrap: wrap;
  26499. align-items: center;
  26500. box-sizing: border-box;
  26501. border-bottom: 1px solid #f4f4f4;
  26502. width: 98%;
  26503. margin: 0 auto;
  26504. }
  26505. .rightCardList {
  26506. display: flex;
  26507. flex-wrap: wrap;
  26508. }
  26509. .cardBox {
  26510. display: flex;
  26511. flex-direction: row;
  26512. flex-wrap: wrap;
  26513. align-items: center;
  26514. align-content: center;
  26515. }
  26516. .isCard,
  26517. .isCard1 {
  26518. width: auto;
  26519. padding: 0 20px;
  26520. height: 65px;
  26521. text-align: center;
  26522. line-height: 65px;
  26523. font-size: 14px;
  26524. cursor: pointer;
  26525. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  26526. background-size: 100% 100%;
  26527. position: relative;
  26528. z-index: 99;
  26529. }
  26530. .isCard1 {
  26531. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  26532. }
  26533. .isCard:hover .deleteWord {
  26534. display: block;
  26535. }
  26536. .isCard>div:nth-child(1),
  26537. .isCard1>div:nth-child(1) {
  26538. white-space: nowrap;
  26539. overflow: hidden;
  26540. text-overflow: ellipsis;
  26541. width: 100%;
  26542. margin: 0 auto;
  26543. }
  26544. .card {
  26545. width: 140px;
  26546. height: 65px;
  26547. }
  26548. .card>img {
  26549. width: 100%;
  26550. height: 100%;
  26551. }
  26552. .rightCardBox {
  26553. width: 98%;
  26554. margin: 10px auto 0;
  26555. }
  26556. .rightCardBox>div:nth-child(1) {
  26557. margin-bottom: 10px;
  26558. }
  26559. .cardCss {
  26560. display: flex;
  26561. flex-direction: column;
  26562. flex-wrap: nowrap;
  26563. align-items: center;
  26564. border-bottom: 3px solid #b4c3d3;
  26565. padding: 0 0 5px 0;
  26566. /* margin-right: 10px; */
  26567. }
  26568. .cardCss>div:nth-child(2) {
  26569. background: #5b7b9d;
  26570. color: #fff;
  26571. width: 20px;
  26572. height: 20px;
  26573. border-radius: 50%;
  26574. text-align: center;
  26575. line-height: 20px;
  26576. }
  26577. .sentenTopBox {
  26578. display: flex;
  26579. flex-direction: row;
  26580. flex-wrap: nowrap;
  26581. align-items: center;
  26582. justify-content: space-between;
  26583. padding: 55px 0 0 20px;
  26584. box-sizing: border-box;
  26585. width: 85%;
  26586. }
  26587. .rb_c_ai_box,
  26588. .stepsBottom {
  26589. width: 100%;
  26590. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  26591. /* background: #f7f7f7; */
  26592. border-radius: 10px;
  26593. overflow: hidden;
  26594. /* height: 100%; */
  26595. height: calc(100% - 55px);
  26596. }
  26597. .navTop {
  26598. background: #53749b;
  26599. color: #fff;
  26600. height: 40px;
  26601. line-height: 40px;
  26602. padding-left: 15px;
  26603. font-size: 18px;
  26604. }
  26605. .navBottom {
  26606. /* background: #6b91b7; */
  26607. height: 100%;
  26608. overflow: auto;
  26609. padding: 10px 0;
  26610. }
  26611. .navStage {
  26612. display: flex;
  26613. flex-direction: row;
  26614. flex-wrap: nowrap;
  26615. align-items: center;
  26616. padding: 10px 10px 10px 0;
  26617. cursor: pointer;
  26618. background: #ffffff;
  26619. width: 95%;
  26620. margin: 5px auto 5px;
  26621. box-sizing: border-box;
  26622. border-radius: 5px;
  26623. flex-wrap: wrap;
  26624. position: relative;
  26625. }
  26626. .navStage:hover>.chapter_upload_drag {
  26627. display: block;
  26628. }
  26629. .navTask:hover>.chapter_upload_drag {
  26630. display: block;
  26631. }
  26632. .chapter_upload:hover>.chapter_upload_drag {
  26633. display: block;
  26634. }
  26635. .navStage::before {
  26636. content: "";
  26637. display: block;
  26638. width: 16px;
  26639. height: 16px;
  26640. background-image: url(../../../assets/icon/new/icon_stage.png);
  26641. background-size: 100%;
  26642. margin-left: 25px;
  26643. }
  26644. .navStage .chapter_unit_open {
  26645. content: "";
  26646. display: block;
  26647. width: 16px;
  26648. height: 16px;
  26649. background-image: url(../../../assets/icon/new/down.png);
  26650. transform: rotate(-90deg);
  26651. background-size: 100%;
  26652. margin-left: 10px;
  26653. transition: all 0.5s;
  26654. }
  26655. .isNavStageOpen .chapter_unit_open {
  26656. transform: rotate(0deg);
  26657. }
  26658. .isNavStage {
  26659. background: #0061ff;
  26660. }
  26661. .isNavStage::before {
  26662. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  26663. }
  26664. .isNavStage .chapter_unit_open {
  26665. background-image: url(../../../assets/icon/new/downC.png);
  26666. }
  26667. .isNavStage .nt_taskName {
  26668. font-weight: bold !important;
  26669. color: #ffffff !important;
  26670. }
  26671. .isNavStage .nt_taskTitle {
  26672. font-weight: bold !important;
  26673. color: #fff !important;
  26674. }
  26675. .navStage .nt_taskBox {
  26676. width: calc(100% - 68px);
  26677. padding: 0 0 0 5px;
  26678. box-sizing: border-box;
  26679. box-sizing: border-box;
  26680. display: flex;
  26681. flex-direction: row;
  26682. flex-wrap: nowrap;
  26683. align-items: baseline;
  26684. }
  26685. .navStage .nt_taskTitle {
  26686. color: #060e17;
  26687. line-height: 25px;
  26688. font-size: 16px;
  26689. }
  26690. .navStage .nt_taskName {
  26691. max-width: calc(100% - 82px);
  26692. white-space: nowrap;
  26693. overflow: hidden;
  26694. text-overflow: ellipsis;
  26695. font-size: 16px;
  26696. color: #060e17;
  26697. }
  26698. .navTask {
  26699. display: flex;
  26700. flex-direction: row;
  26701. flex-wrap: nowrap;
  26702. align-items: center;
  26703. padding: 10px 10px 10px 0;
  26704. cursor: pointer;
  26705. background: #ffffff;
  26706. width: 95%;
  26707. margin: 5px auto 5px;
  26708. box-sizing: border-box;
  26709. border-radius: 5px;
  26710. flex-wrap: wrap;
  26711. position: relative;
  26712. }
  26713. .navTask .chapter_upload_open {
  26714. content: "";
  26715. display: block;
  26716. width: 16px;
  26717. height: 16px;
  26718. background-image: url(../../../assets/icon/new/icon_arrow.png);
  26719. background-size: 100%;
  26720. margin-left: 23px;
  26721. }
  26722. .noImage .chapter_upload_open {
  26723. display: none;
  26724. background-image: unset !important;
  26725. }
  26726. .isNavOpen .chapter_upload_open {
  26727. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  26728. transform: rotate(90deg);
  26729. }
  26730. .isNavTask .chapter_upload_open {
  26731. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  26732. transform: rotate(-90deg);
  26733. }
  26734. .isNavTask.isNavOpen .chapter_upload_open {
  26735. transform: rotate(0deg);
  26736. }
  26737. .dragOverTop {
  26738. border-top: 2px solid #0061ff !important;
  26739. border-radius: 0 !important;
  26740. margin-top: 10px;
  26741. }
  26742. .dragOverBottom {
  26743. border-bottom: 2px solid #0061ff !important;
  26744. border-radius: 0 !important;
  26745. margin-top: 10px;
  26746. }
  26747. .dragOverTop2 {
  26748. border-top: 2px solid #0061ff !important;
  26749. border-radius: 0 !important;
  26750. }
  26751. .dragOverBottom2 {
  26752. border-bottom: 2px solid #0061ff !important;
  26753. border-radius: 0 !important;
  26754. }
  26755. .isNavTask {
  26756. /* background: #3681FC; */
  26757. background: #eef3fb;
  26758. }
  26759. .isNavTask>.chapter_upload_drag {
  26760. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  26761. }
  26762. .isNavTask .nt_taskName {
  26763. /* color: #fff !important; */
  26764. font-weight: bold !important;
  26765. color: #0061ff !important;
  26766. }
  26767. .isNavTask .nt_taskTitle {
  26768. /* color: #AECCFE !important; */
  26769. font-weight: bold !important;
  26770. color: #0061ff !important;
  26771. }
  26772. .navTask .nt_taskBox {
  26773. width: calc(100% - 40px);
  26774. padding: 0 0 0 5px;
  26775. box-sizing: border-box;
  26776. box-sizing: border-box;
  26777. display: flex;
  26778. flex-direction: row;
  26779. flex-wrap: nowrap;
  26780. align-items: baseline;
  26781. }
  26782. .navTask .nt_taskTitle {
  26783. /* color: #717C8D; */
  26784. color: #060e17;
  26785. line-height: 25px;
  26786. font-size: 16px;
  26787. /* min-width: 66px; */
  26788. }
  26789. .navTask .nt_taskName {
  26790. /* color: #fff; */
  26791. /* max-width: 130px; */
  26792. /* width: 100%; */
  26793. max-width: calc(100% - 66px);
  26794. font-size: 16px;
  26795. color: #060e17;
  26796. /* color: #0E1E33; */
  26797. }
  26798. .navTask .nt_taskName span {
  26799. width: 100%;
  26800. white-space: nowrap;
  26801. overflow: hidden;
  26802. text-overflow: ellipsis;
  26803. display: block;
  26804. }
  26805. .gjBox {
  26806. width: calc(100% - 25px);
  26807. padding: 0 0 0 0;
  26808. box-sizing: border-box;
  26809. border-left: 1px solid #cad1dc;
  26810. margin-left: 25px;
  26811. }
  26812. .gjBox>div {
  26813. display: flex;
  26814. align-items: center;
  26815. }
  26816. .gjBox>div::before {
  26817. content: "";
  26818. height: 1px;
  26819. width: 10px;
  26820. background: #cad1dc;
  26821. display: block;
  26822. margin-right: 5px;
  26823. }
  26824. .gjCss {
  26825. display: flex;
  26826. flex-direction: row;
  26827. flex-wrap: nowrap;
  26828. align-items: center;
  26829. padding: 15px 0;
  26830. box-sizing: border-box;
  26831. font-size: 14px;
  26832. cursor: pointer;
  26833. }
  26834. .isGjCss {
  26835. color: #0061ff;
  26836. }
  26837. .groupBox {}
  26838. .groupContent+.groupContent {
  26839. margin-top: 30px;
  26840. }
  26841. .groupTitle {
  26842. font-size: 24px;
  26843. color: rgb(80, 80, 80);
  26844. margin-bottom: 20px;
  26845. }
  26846. .groupName {
  26847. display: flex;
  26848. align-items: center;
  26849. }
  26850. .groupn {
  26851. font-size: 15px;
  26852. margin-right: 10px;
  26853. }
  26854. .groupName+.groupName {
  26855. margin-top: 15px;
  26856. }
  26857. .groupBtn {
  26858. margin-left: 10px;
  26859. }
  26860. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  26861. text-align: left;
  26862. }
  26863. .radioBox>div {
  26864. margin: 10px 0 0 10px;
  26865. }
  26866. .radioBox>>>.el-radio__input,
  26867. .radioBox>>>.el-checkbox__inner {
  26868. margin-left: 10px;
  26869. }
  26870. .radioBox>>>.el-radio__label,
  26871. .radioBox>>>.el-checkbox__label {
  26872. display: flex;
  26873. align-items: center;
  26874. }
  26875. .inImg {
  26876. width: 50px;
  26877. }
  26878. .inImg>img {
  26879. width: 100%;
  26880. height: 100%;
  26881. object-fit: cover;
  26882. }
  26883. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  26884. height: auto;
  26885. padding: 10px;
  26886. margin: 0;
  26887. }
  26888. .upCss>>>.el-upload-list {
  26889. width: 100%;
  26890. }
  26891. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  26892. width: 100%;
  26893. height: 120px;
  26894. object-fit: contain;
  26895. background: unset;
  26896. margin-left: 0;
  26897. }
  26898. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  26899. display: none;
  26900. }
  26901. .tcMember+.tcMember::before {
  26902. content: "、";
  26903. }
  26904. .xzUpImg {
  26905. width: 25px;
  26906. height: 25px;
  26907. min-width: 25px;
  26908. min-height: 25px;
  26909. cursor: pointer;
  26910. margin: 0 10px;
  26911. }
  26912. .xzUpImg>img {
  26913. width: 100%;
  26914. height: 100%;
  26915. }
  26916. .closeCss {
  26917. position: absolute;
  26918. top: 8px;
  26919. right: 8px;
  26920. cursor: pointer;
  26921. width: 20px;
  26922. height: 20px;
  26923. }
  26924. .closeCss>img {
  26925. width: 100%;
  26926. height: 100%;
  26927. }
  26928. .moveBtn {
  26929. display: flex;
  26930. flex-direction: row;
  26931. flex-wrap: nowrap;
  26932. align-items: center;
  26933. width: 55px;
  26934. }
  26935. .timuUpImg {
  26936. display: flex;
  26937. flex-direction: row;
  26938. align-items: center;
  26939. width: 100%;
  26940. margin-right: 10px;
  26941. }
  26942. .timuUpImg>div:nth-child(1) {
  26943. margin-right: 10px;
  26944. display: flex;
  26945. align-items: center;
  26946. width: 100%;
  26947. }
  26948. .timuImgBox {
  26949. margin: 10px 0;
  26950. display: flex;
  26951. flex-direction: column;
  26952. flex-wrap: wrap;
  26953. align-items: flex-start;
  26954. }
  26955. .timuImg {
  26956. width: 100px;
  26957. margin: 5px 0;
  26958. cursor: pointer;
  26959. position: relative;
  26960. }
  26961. .timuImg:hover .deleteWord {
  26962. display: block;
  26963. }
  26964. .deleteWord {
  26965. width: 25px;
  26966. height: 25px;
  26967. position: absolute;
  26968. right: -5px;
  26969. top: -5px;
  26970. cursor: pointer;
  26971. display: none;
  26972. }
  26973. .timuImg>img,
  26974. .deleteWord>img {
  26975. width: 100%;
  26976. height: 100%;
  26977. object-fit: cover;
  26978. }
  26979. .e_add_delete {
  26980. cursor: pointer;
  26981. margin-left: 10px;
  26982. }
  26983. .pType_box {
  26984. margin: 15px 0;
  26985. align-items: flex-end;
  26986. }
  26987. .noneBox {
  26988. height: 200px;
  26989. width: 100%;
  26990. display: flex;
  26991. align-items: center;
  26992. justify-content: center;
  26993. flex-direction: column;
  26994. /* margin-top: 150px; */
  26995. }
  26996. .noneBox>img {
  26997. width: 95px;
  26998. }
  26999. .noneBox>span {
  27000. margin-top: 10px;
  27001. color: #717c8d;
  27002. }
  27003. .rb_c_box {
  27004. width: 100%;
  27005. height: 100%;
  27006. display: flex;
  27007. /* padding: 20px; */
  27008. box-sizing: border-box;
  27009. justify-content: space-between;
  27010. }
  27011. .rb_c_box_left {
  27012. height: 100%;
  27013. background: #fff;
  27014. width: 270px;
  27015. min-width: 270px;
  27016. border-radius: 8px;
  27017. margin-right: 10px;
  27018. }
  27019. .rb_c_box_right {
  27020. height: 100%;
  27021. width: calc(100%);
  27022. overflow: hidden;
  27023. }
  27024. .rb_c_box_btn {
  27025. display: flex;
  27026. justify-content: flex-start;
  27027. height: 50px;
  27028. align-items: center;
  27029. }
  27030. .rb_c_box_right>.basic_box {
  27031. /* background: #fff; */
  27032. border-radius: 0;
  27033. height: calc(100% - 0px);
  27034. overflow: auto;
  27035. padding: 0;
  27036. }
  27037. .textarea_css {
  27038. display: block;
  27039. resize: none;
  27040. padding: 10px 15px;
  27041. line-height: 1.5;
  27042. box-sizing: border-box;
  27043. width: 100%;
  27044. font-size: 14px;
  27045. color: #606266;
  27046. background-color: #fff;
  27047. background-image: none;
  27048. border: 1px solid #dcdfe6;
  27049. border-radius: 4px;
  27050. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  27051. outline: none;
  27052. overflow: hidden;
  27053. height: 46px;
  27054. font-family: "Microsoft YaHei";
  27055. }
  27056. .textarea_css::-webkit-input-placeholder {
  27057. color: #c0c4cc;
  27058. }
  27059. .textarea_css:focus {
  27060. border-color: #409eff;
  27061. outline: 0;
  27062. }
  27063. .addEditor>>>.text {
  27064. height: auto;
  27065. min-height: 100px;
  27066. }
  27067. .addEditor>>>.w-e-text-container {
  27068. min-height: 100px;
  27069. }
  27070. .moveBtn2 {
  27071. flex-direction: column;
  27072. width: fit-content;
  27073. margin: 0 10px 0 10px;
  27074. }
  27075. .moveBtn2 .chapter_upload_down,
  27076. .moveBtn2 .chapter_upload_up {
  27077. width: 16px;
  27078. height: 16px;
  27079. }
  27080. .moveBtn2 .chapter_upload_up::after,
  27081. .moveBtn2 .chapter_upload_down::after {
  27082. width: 10px;
  27083. height: 10px;
  27084. }
  27085. .fullStyle>>>.el-dialog__body {
  27086. height: calc(100% - 125px) !important;
  27087. box-sizing: border-box;
  27088. }
  27089. .fullStyle1>>>.el-dialog__body {
  27090. height: auto !important;
  27091. }
  27092. .fullStyle>>>.el-dialog {
  27093. width: 100% !important;
  27094. max-width: 100% !important;
  27095. height: 100% !important;
  27096. margin: 0 !important;
  27097. }
  27098. .fullStyle {
  27099. width: 100% !important;
  27100. max-width: 100% !important;
  27101. height: 100% !important;
  27102. margin: 0 auto !important;
  27103. }
  27104. .wb_j_box_btn {
  27105. width: calc(100% - 30px);
  27106. display: flex;
  27107. height: 40px;
  27108. border: 1.5px solid #cad1dc;
  27109. border-radius: 4px;
  27110. box-sizing: border-box;
  27111. align-items: center;
  27112. font-size: 14px;
  27113. cursor: pointer;
  27114. overflow: hidden;
  27115. }
  27116. .wb_j_box_btn:hover {
  27117. border: 1.5px solid #0061ff;
  27118. }
  27119. .wb_j_box_title {
  27120. background: #f0f4fa;
  27121. height: 100%;
  27122. line-height: 40px;
  27123. width: 90px;
  27124. text-align: center;
  27125. color: #060e17;
  27126. border-right: 1.5px solid #cad1dc;
  27127. box-sizing: border-box;
  27128. }
  27129. .wb_j_box_btn_c {
  27130. width: calc(100% - 90px);
  27131. padding: 0 35px 0 10px;
  27132. box-sizing: border-box;
  27133. position: relative;
  27134. }
  27135. .wb_j_box_span {
  27136. width: 100%;
  27137. overflow: hidden;
  27138. white-space: nowrap;
  27139. text-overflow: ellipsis;
  27140. word-wrap: break-word;
  27141. color: #717c8d;
  27142. }
  27143. .wb_j_box_arrow {
  27144. content: "";
  27145. width: 14px;
  27146. height: 14px;
  27147. background: url(../../../assets/icon/new/u_arrow.png);
  27148. background-size: 100% 100%;
  27149. position: absolute;
  27150. right: 12px;
  27151. top: 50%;
  27152. transform: translateY(-50%);
  27153. }
  27154. .check_classBox {
  27155. height: 400px;
  27156. display: flex;
  27157. border-top: 1.5px solid #e7ebf1;
  27158. border-bottom: 1.5px solid #e7ebf1;
  27159. }
  27160. .check_class_right {
  27161. width: 130px;
  27162. border-right: 1px solid #e7ebf1;
  27163. display: flex;
  27164. align-items: center;
  27165. flex-direction: column;
  27166. height: 100%;
  27167. overflow: auto;
  27168. padding: 15px 0;
  27169. box-sizing: border-box;
  27170. }
  27171. .check_class {
  27172. width: 85%;
  27173. border-radius: 5px;
  27174. height: 30px;
  27175. min-height: 30px;
  27176. line-height: 30px;
  27177. text-align: center;
  27178. padding: 0 10px;
  27179. box-sizing: border-box;
  27180. cursor: pointer;
  27181. white-space: nowrap;
  27182. overflow: hidden;
  27183. text-overflow: ellipsis;
  27184. }
  27185. .check_class.activeX {
  27186. background: #e0eafb;
  27187. color: #3681fc;
  27188. font-weight: 700;
  27189. }
  27190. .check_class+.check_class {
  27191. margin-top: 15px;
  27192. }
  27193. .check_class_left {
  27194. background: #fafafa;
  27195. width: calc(100% - 130px);
  27196. padding: 15px;
  27197. box-sizing: border-box;
  27198. }
  27199. .check_class_all_box {
  27200. display: flex;
  27201. margin-bottom: 10px;
  27202. }
  27203. .all_check {
  27204. display: flex;
  27205. align-items: center;
  27206. padding: 2px 0 0;
  27207. margin-left: 10px;
  27208. }
  27209. .all_check>>>.el-checkbox__label {
  27210. line-height: 18px;
  27211. }
  27212. .check_class_left_title {
  27213. font-size: 16px;
  27214. font-weight: 700;
  27215. }
  27216. .check_class_item {
  27217. display: flex;
  27218. flex-wrap: wrap;
  27219. height: calc(100% - 45px);
  27220. overflow: auto;
  27221. justify-content: flex-start;
  27222. align-items: flex-start;
  27223. align-content: flex-start;
  27224. }
  27225. .class_item:first-child {
  27226. /* margin: 0 15px 15px 67px; */
  27227. }
  27228. .class_item {
  27229. margin: 0 15px 15px 0;
  27230. }
  27231. .class_item:hover>>>.el-checkbox__label {
  27232. color: #409eff;
  27233. }
  27234. .class_item>>>.el-checkbox__label {
  27235. color: #0e1e33;
  27236. }
  27237. .class_item:hover>>>.el-checkbox__inner {
  27238. border-color: #409eff;
  27239. }
  27240. .class_item>>>.el-checkbox,
  27241. .class_item>>>.el-checkbox__input {
  27242. display: flex;
  27243. align-items: center;
  27244. }
  27245. .taskTitle {
  27246. font-size: 20px;
  27247. font-weight: bold;
  27248. margin-bottom: 35px;
  27249. }
  27250. .taskTitle:after {
  27251. content: "";
  27252. width: 100%;
  27253. display: block;
  27254. height: 1px;
  27255. background: #cad1dc;
  27256. position: absolute;
  27257. left: 0;
  27258. margin: 15px 0 0;
  27259. }
  27260. .eva_btn_box {
  27261. margin: 20px 0px 0 0;
  27262. display: flex;
  27263. flex-direction: row;
  27264. flex-wrap: nowrap;
  27265. align-items: center;
  27266. justify-content: space-between;
  27267. width: 100%;
  27268. }
  27269. .eva_btn_left_box {
  27270. display: flex;
  27271. flex-direction: row;
  27272. flex-wrap: nowrap;
  27273. align-items: center;
  27274. }
  27275. .addTypeChoose {
  27276. display: flex;
  27277. flex-direction: row;
  27278. flex-wrap: nowrap;
  27279. align-items: center;
  27280. margin: 15px 0;
  27281. }
  27282. .addTypeBox {
  27283. display: flex;
  27284. flex-direction: column;
  27285. flex-wrap: nowrap;
  27286. align-items: center;
  27287. }
  27288. .addTypeChoose {
  27289. display: flex;
  27290. flex-direction: row;
  27291. flex-wrap: nowrap;
  27292. align-items: center;
  27293. margin: 15px 0;
  27294. }
  27295. .buchong_box {
  27296. background: #E0EAFB66;
  27297. width: calc(100% - 20px);
  27298. min-height: 50px;
  27299. display: flex;
  27300. align-items: center;
  27301. justify-content: center;
  27302. margin: 0 auto;
  27303. }
  27304. .outline {
  27305. width: calc(100% - 40px);
  27306. margin: 0 auto;
  27307. }
  27308. .task_outline {
  27309. width: calc(100% - 40px);
  27310. margin: 0 auto;
  27311. }
  27312. .outline_box+.outline_box {
  27313. margin: 30px 0 0px;
  27314. }
  27315. .outline_task {
  27316. display: flex;
  27317. align-items: center;
  27318. margin-bottom: 10px;
  27319. }
  27320. .outline_btn{
  27321. display: flex;
  27322. align-items: center;
  27323. min-width: fit-content;
  27324. margin-left: 10px;
  27325. }
  27326. .outline_task .title {
  27327. font-size: 18px;
  27328. font-weight: bold;
  27329. min-width: 80px;
  27330. }
  27331. .op_task_box,
  27332. .op_tool_box,
  27333. .outline_detail {
  27334. position: relative;
  27335. }
  27336. .op_task_box:hover .op_box,
  27337. .op_tool_box:hover .op_box,
  27338. .outline_detail:hover .op_box {
  27339. display: flex
  27340. }
  27341. .op_box {
  27342. position: absolute;
  27343. bottom: 10px;
  27344. display: none;
  27345. align-items: center;
  27346. justify-content: space-between;
  27347. width: calc(100% - 20px);
  27348. left: 50%;
  27349. transform: translateX(-50%);
  27350. }
  27351. .op_box .op_remark {
  27352. color: #8E8E8E;
  27353. font-size: 14px;
  27354. }
  27355. .op_box_right{
  27356. display: flex;
  27357. }
  27358. .op_box_isquote{
  27359. display: flex;
  27360. }
  27361. .op_box_isquote *{
  27362. display: none;
  27363. }
  27364. .op_box_isquote .op_box_right,
  27365. .op_box_isquote .custom-switch{
  27366. display: flex;
  27367. margin-left: auto;
  27368. }
  27369. .op_task_box:hover .op_box_isquote *{
  27370. display: flex;
  27371. }
  27372. .op_task_box:hover .op_box_isquote .op_box_right,
  27373. .op_task_box:hover .op_box_isquote .custom-switch{
  27374. display: flex;
  27375. margin-left: unset;
  27376. }
  27377. .rb_c_nav {
  27378. width: calc(100% - 20px);
  27379. margin: 15px auto 0;
  27380. font-size: 18px;
  27381. }
  27382. .rb_c_nav span {
  27383. cursor: pointer;
  27384. }
  27385. .rb_c_nav span+span {
  27386. margin-left: 10px;
  27387. }
  27388. .rb_c_nav span.active {
  27389. color: #0061FF
  27390. }
  27391. .text_panel>>>.text {
  27392. height: 400px;
  27393. }
  27394. .markBox{
  27395. padding: 20px 14px;
  27396. line-height: 29px;
  27397. font-size: 16px;
  27398. background: #f4f4f4;
  27399. border-radius: 5px;
  27400. word-break: break-word;
  27401. }
  27402. .info_box_t {
  27403. display: flex;
  27404. align-items: center;
  27405. flex-wrap: wrap;
  27406. }
  27407. .info_box_t + .info_box_t {
  27408. margin-top: 10px;
  27409. }
  27410. .info_box_t_box {
  27411. display: flex;
  27412. align-items: center;
  27413. flex-wrap: wrap;
  27414. margin-bottom: 5px;
  27415. }
  27416. .info_box_t_box + .info_box_t_box{
  27417. margin-left: 10px;
  27418. }
  27419. .info_box_t_box > span{
  27420. width: fit-content
  27421. }
  27422. .info_box_t_box > input{
  27423. width: 150px !important;
  27424. margin: 0 5px 0 0;
  27425. }
  27426. .info_radio >>> .el-radio, .el-radio__input{
  27427. line-height: 18px;
  27428. height: 18px;
  27429. }
  27430. .mode_box{
  27431. display: flex;
  27432. align-items: center;
  27433. }
  27434. .mode_box > span{
  27435. padding: 0px 5px;
  27436. cursor: pointer;
  27437. }
  27438. .mode_box > span.active{
  27439. color: #409eff;
  27440. }
  27441. .chapter_upload_check {
  27442. width: 15px;
  27443. height: 15px;
  27444. cursor: pointer;
  27445. background-image: url('../../../assets/icon/check.png');
  27446. background-size: 100% 100%;
  27447. }
  27448. .chapter_upload_check.checked{
  27449. background-image: url('../../../assets/icon/checked.png');
  27450. }
  27451. .ruleBtn {
  27452. width: fit-content;
  27453. height: 36px;
  27454. line-height: 36px;
  27455. cursor: pointer;
  27456. color: #0061FF;
  27457. }
  27458. .stopBtn{
  27459. z-index: 999999;
  27460. position: absolute;
  27461. left: 50%;
  27462. top: calc(50% + 70px);
  27463. transform: translateX(-50%);
  27464. }
  27465. .rateSwitch >>> .el-switch__label.is-active {
  27466. color: #0061FF;
  27467. }
  27468. .rateSwitch >>> .el-switch__label--right{
  27469. display: flex;
  27470. align-items: center;
  27471. }
  27472. .rateSwitch >>> .el-switch__label--right::before{
  27473. content: "";
  27474. width: 14px;
  27475. height: 14px;
  27476. min-width: 14px;
  27477. min-height: 14px;
  27478. background-size: 100% 100%;
  27479. display: block;
  27480. margin-right: 7px;
  27481. background-image: url(../../../assets/icon/new/u_op2.png);
  27482. }
  27483. .rateSwitch >>> .el-switch__label--right.is-active::before{
  27484. background-image: url(../../../assets/icon/new/u_op.png);
  27485. }
  27486. .inter_box{
  27487. min-width: calc(50%);
  27488. min-height: 500px;
  27489. margin-right: 10px;
  27490. border: 1px solid #c7c7c7;
  27491. border-radius: 0px 5px 5px 5px;
  27492. overflow: hidden;
  27493. position: relative;
  27494. box-sizing: border-box;
  27495. }
  27496. .inter_box::before{
  27497. content:'对话区';
  27498. position: absolute;
  27499. left: 0;
  27500. top: 0;
  27501. display: block;
  27502. padding: 8px 10px;
  27503. background: #e0eafb;
  27504. color: #98a0ac;
  27505. font-size: 14px;
  27506. border-radius: 0 15px 15px 0;
  27507. }
  27508. .inter_Detailbox{
  27509. border: 1px solid #c7c7c7;
  27510. border-radius: 0px 5px 5px 5px;
  27511. overflow: hidden;
  27512. position: relative;
  27513. box-sizing: border-box;
  27514. }
  27515. .inter_Detailbox::before{
  27516. content:'编辑区';
  27517. position: absolute;
  27518. left: 0;
  27519. top: 0;
  27520. display: block;
  27521. padding: 8px 10px;
  27522. background: #e0eafb;
  27523. color: #98a0ac;
  27524. font-size: 14px;
  27525. border-radius: 0 15px 15px 0;
  27526. }
  27527. .inter_box > iframe{
  27528. width: 100%;
  27529. height: 100%;
  27530. border: none;
  27531. }
  27532. .inter_setting{
  27533. display: block;
  27534. background-image: url(../../../assets/icon/course/setting.svg);
  27535. background-size: 100% 100%;
  27536. width: 20px;
  27537. height: 20px;
  27538. cursor: pointer;
  27539. margin-left: 10px;
  27540. }
  27541. .inter_setting_panel{
  27542. position: absolute;
  27543. left: 110px;
  27544. top: 30px;
  27545. background: #fff;
  27546. border-radius: 5px;
  27547. box-shadow: 0px 0px 2px 1px #00000017;
  27548. padding: 10px;
  27549. z-index: 999;
  27550. }
  27551. .panel_title{
  27552. text-align: center;
  27553. font-size: 18px;
  27554. margin-bottom: 10px;
  27555. }
  27556. .panel_tips{
  27557. font-weight: 500;
  27558. font-size: 14px;
  27559. text-align: center;
  27560. margin-bottom: 10px;
  27561. color: #6d6d6d;
  27562. }
  27563. .panel_input{
  27564. margin-bottom: 10px;
  27565. }
  27566. .panel_button{
  27567. display: flex;
  27568. justify-content: space-between;
  27569. }
  27570. .custom-switch >>> .el-switch__label.is-active {
  27571. color: #0061FF;
  27572. }
  27573. .close_btn{
  27574. position: absolute;
  27575. top: 40px;
  27576. right: 10px;
  27577. box-shadow: 0 0 4px 2px #00000033;
  27578. border-radius: 70px 0 0 70px;
  27579. display: flex;
  27580. align-items: center;
  27581. padding-left: 5px;
  27582. padding: 10px 7px 10px 12px;
  27583. background: #fff;
  27584. cursor: pointer;
  27585. }
  27586. .close_btn > img {
  27587. width: 15px;
  27588. transition: 0.3s;
  27589. transform: rotate(0deg);
  27590. }
  27591. .close_btn_voice > img{
  27592. transform: rotate(180deg);
  27593. }
  27594. .resizable {
  27595. position: relative;
  27596. min-width: 350px; /* 最小宽度 */
  27597. max-width: 50%; /* 最大宽度 */
  27598. }
  27599. .resizer {
  27600. width: 5px;
  27601. height: 35px;
  27602. background: #ccc;
  27603. position: absolute;
  27604. top: 50%;
  27605. left: 0;
  27606. cursor: ew-resize;
  27607. transform: translateY(-50%);
  27608. border-radius: 43px;
  27609. }
  27610. .pptBox{
  27611. position: fixed;
  27612. bottom: 10px;
  27613. left: 20px;
  27614. padding: 10px;
  27615. }
  27616. .pptBox > .box > div + div{
  27617. margin-top: 10px;
  27618. }
  27619. .ppClass{
  27620. background: #fff;
  27621. border-radius: 5px;
  27622. box-shadow: 0 0 6px 3px #00000030;
  27623. overflow: hidden;
  27624. }
  27625. </style>