addCourse.vue 1.1 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="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">
  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_box">
  121. <div class="bb_courseIcon">
  122. <img src="../../../assets/icon/new/course.png" />
  123. </div>
  124. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" style="
  125. border: 1.5px solid rgb(202, 209, 220);
  126. margin: 0px 10px 0px 0px;
  127. border-radius: 5px;
  128. font-weight: 600;
  129. padding: 12px 14px 12px 71px;
  130. " @change="setCover" />
  131. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  132. style="justify-content: center; min-width: 150px"></el-switch>
  133. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  134. style="justify-content: center; min-width: 175px"></el-switch>
  135. </div>
  136. </div>
  137. </div>
  138. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  139. <span>类型</span>
  140. <!-- 学科+ 主题+ 未来+ -->
  141. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  142. style="display: flex; align-items: center">
  143. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  144. :key="index">
  145. <el-radio :label="item.name">{{
  146. item.name
  147. }}</el-radio>
  148. </div>
  149. </el-radio-group>
  150. </div>
  151. <div class="both">
  152. <div class="choose">
  153. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  154. <span v-if="
  155. CourseTypeJson[item.id].length > 0 &&
  156. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  157. ? pTypeCheck.indexOf(item.id) != -1
  158. : true)
  159. ">{{ item.name }}:</span>
  160. <el-checkbox-group v-model="courseTypeId" v-if="
  161. CourseTypeJson[item.id].length > 0 &&
  162. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  163. ? pTypeCheck.indexOf(item.id) != -1
  164. : true)
  165. ">
  166. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  167. item1.name }}</el-checkbox>
  168. </el-checkbox-group>
  169. <!-- <div
  170. v-else
  171. style="font-size: 14px; margin-left: -8px"
  172. >
  173. 暂无
  174. </div> -->
  175. </div>
  176. </div>
  177. </div>
  178. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  179. <div class="info_box_t_box">
  180. <span>输出语言:</span>
  181. <el-radio-group v-model="languageSetting" style="display: flex; align-items: center" @change="changeIsuseT">
  182. <div class="all_choose info_radio">
  183. <el-radio :label="0">简体中文</el-radio>
  184. </div>
  185. <div class="all_choose info_radio" style="margin-left: 10px">
  186. <el-radio :label="1">繁体中文</el-radio>
  187. </div>
  188. <div class="all_choose info_radio" style="margin-left: 10px">
  189. <el-radio :label="2">English</el-radio>
  190. </div>
  191. </el-radio-group>
  192. </div>
  193. </div>
  194. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  195. <div class="info_box_t_box">
  196. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  197. style="justify-content: center; min-width: 175px"></el-switch> -->
  198. <span>生成模式:</span>
  199. <el-radio-group v-model="isuseT" style="display: flex; align-items: center" @change="changeIsuseT">
  200. <div class="all_choose info_radio">
  201. <el-radio :label="1">引导模式生成</el-radio>
  202. </div>
  203. <div class="all_choose info_radio" style="margin-left: 10px">
  204. <el-radio :label="true">从已有教案生成</el-radio>
  205. </div>
  206. <div class="all_choose info_radio" style="margin-left: 10px">
  207. <el-radio :label="false">从零开始生成</el-radio>
  208. </div>
  209. </el-radio-group>
  210. </div>
  211. <div class="info_box_t_box">
  212. <span>生成风格:</span>
  213. <div class="mode_box">
  214. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  215. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  216. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  217. </div>
  218. </div>
  219. </div>
  220. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  221. <div class="info_box_t_box">
  222. <span>课程节数:</span>
  223. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  224. <span>节</span>
  225. </div>
  226. <div class="info_box_t_box">
  227. <span>课程时长:</span>
  228. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  229. <span>min</span>
  230. </div>
  231. </div> -->
  232. </div>
  233. <div class="right_first" v-loading="imageloading2">
  234. <!-- <div class="ai_box">
  235. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  236. </div> -->
  237. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  238. 上传封面
  239. </div>
  240. <div style="width: 100%">
  241. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  242. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  243. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  244. <div v-if="cover.length == 0">点击添加封面</div>
  245. <div class="cover_mask">
  246. <img src="../../../assets/icon/new/cover_update.png" /><span
  247. style="margin-top: 5px">修改封面</span>
  248. </div>
  249. </div>
  250. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  251. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  252. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  253. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  254. <i class="el-icon-plus"></i>
  255. </el-upload> -->
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  263. <div class="whiteBg" style="border-radius: 0">
  264. <div class="c_info_title">
  265. 课程权限设置
  266. </div>
  267. <div class="wb_j_box">
  268. <div class="wb_j_box_content">
  269. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  270. (dialogVisibleClass = true),
  271. (classSearch = ''),
  272. (gradeId = ''),
  273. getClass()
  274. ">添加班级</button>
  275. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  276. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  277. getClassC(tc) }}</span>
  278. </div> -->
  279. <div class="wb_j_box_btn" @click="
  280. (dialogVisibleClass = true),
  281. (classSearch = ''),
  282. (gradeId = ''),
  283. getClass()
  284. ">
  285. <div class="wb_j_box_title">授课班级</div>
  286. <div class="wb_j_box_btn_c">
  287. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  288. v-if="checkboxList2.length" popper-class="text_tooltip2">
  289. <div class="wb_j_box_span">
  290. {{ getListClassC(checkboxList2) }}
  291. </div>
  292. </el-tooltip>
  293. <div v-else class="wb_j_box_span">请选择授课班级</div>
  294. <div class="wb_j_box_arrow"></div>
  295. </div>
  296. </div>
  297. </div>
  298. <div class="wb_j_box_content">
  299. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  300. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  301. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  302. checkBoolean
  303. ? checkboxList3
  304. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  305. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  306. </div> -->
  307. <div class="wb_j_box_btn" @click="openMember">
  308. <div class="wb_j_box_title">协同人员</div>
  309. <div class="wb_j_box_btn_c">
  310. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  311. v-if="checkboxList3.length" popper-class="text_tooltip2">
  312. <div class="wb_j_box_span">
  313. {{ getListMan2(checkboxList3) }}
  314. </div>
  315. </el-tooltip>
  316. <div v-else class="wb_j_box_span">请选择协同人员</div>
  317. <div class="wb_j_box_arrow"></div>
  318. </div>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  324. <div class="c_info_title">目标管理</div>
  325. <div style="margin: 0 auto; padding: 0 20px">
  326. <div style="
  327. width: 95%;
  328. min-height: 200px;
  329. border: 1px solid #cad1dc;
  330. border-radius: 4px;
  331. position: relative;
  332. ">
  333. <div class="e_add_top">
  334. <div class="e_add_title">
  335. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  336. 清除
  337. </button>
  338. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  339. 添加
  340. </button>
  341. <!-- <span>当前使用目标管理</span>
  342. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  343. <img
  344. src="../../../assets/line.png"
  345. class="cru_line"
  346. style="
  347. width: 125px;
  348. height: 20px;
  349. bottom: -10px;
  350. left: 155px;
  351. "
  352. /> -->
  353. </div>
  354. <div style="
  355. display: flex;
  356. flex-direction: row;
  357. align-items: center;
  358. ">
  359. <!-- <el-button
  360. type="primary"
  361. size="small"
  362. @click="dialogVisiblemb = true"
  363. >添加目标管理</el-button
  364. >
  365. <el-button
  366. type="primary"
  367. size="small"
  368. @click="deleteEva()"
  369. >清除内容</el-button
  370. > -->
  371. <!-- <div class="e_add_delete" @click="deleteEva()">
  372. <img src="../../../assets/icon/delete.png" alt="" />
  373. </div> -->
  374. </div>
  375. </div>
  376. <div v-if="evalua == ''">
  377. <div class="noneBox">
  378. <img src="../../../assets/icon/new/eva_none.png" />
  379. <span>请添加目标管理</span>
  380. </div>
  381. </div>
  382. <div class="e_add_content" v-else>
  383. <div class="e_add_list_pbox">
  384. <div class="e_add_list_pbox_title">
  385. <span class="type_title">切换模式</span>
  386. <div class="type_content">
  387. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  388. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  389. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  390. </div>
  391. </div>
  392. <div class="e_add_list_pbox_content">
  393. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  394. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  395. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  396. v-if="typeMode == 3">
  397. </SeeBoard>
  398. </div>
  399. </div>
  400. </div>
  401. </div>
  402. </div>
  403. </div>
  404. </div>
  405. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  406. <div style="position: relative;
  407. background: #fff;
  408. box-sizing: border-box;
  409. padding: 1px 20px 10px;
  410. width: 100%;
  411. border-radius: 10px;">
  412. <div style="
  413. display: flex;
  414. flex-direction: row;
  415. justify-content: space-between;
  416. align-items: center;
  417. " :style="{
  418. margin: true
  419. ? '20px 0 10px'
  420. : '20px 0 0',
  421. }">
  422. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  423. 已有教案
  424. <div class="add_info_box" style="margin: 0 0 0 auto">
  425. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  426. 上传已有教案
  427. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  428. beforeUploadInfo2(
  429. $event,
  430. 14
  431. )
  432. " />
  433. </button>
  434. <button class="c_pub_button_add" @click="clickGenTT" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  435. 一键智能总结生成
  436. </button>
  437. </div>
  438. </div>
  439. </div>
  440. <div>
  441. <div class="add_chapters_box add_c_none" v-if="
  442. teacherInfoData &&
  443. teacherInfoData.length == 0
  444. ">
  445. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  446. </div>
  447. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  448. <div @dragstart="
  449. dragStart(item1, index1, 0)
  450. " @dragover.prevent="
  451. dragOver(index1, 0)
  452. " @dragend="dragEnd()" :draggable="isdrag ==
  453. 'chapter-' + 0 + '-' + index1
  454. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  455. getChapterData(
  456. $event,
  457. index1,
  458. item1.type
  459. )
  460. " :class="{
  461. dragOverTop2:
  462. newIndex === index1 &&
  463. typeIndex ==
  464. 'chapter-' +
  465. 0 +
  466. '-' +
  467. index1 &&
  468. oldIndex > index1 &&
  469. dragType == 'drag',
  470. dragOverBottom2:
  471. newIndex === index1 &&
  472. typeIndex ==
  473. 'chapter-' +
  474. 0 +
  475. '-' +
  476. index1 &&
  477. oldIndex < index1 &&
  478. dragType == 'drag',
  479. }">
  480. <div class="chapter_upload_o" style="
  481. position: relative;
  482. display: flex;
  483. align-items: center;
  484. ">
  485. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  486. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  487. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  488. </div>
  489. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  490. </div>
  491. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  492. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  493. </div>
  494. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  495. </div>
  496. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  497. </div>
  498. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  499. </div>
  500. </div>
  501. <div class="chapter_upload_n">
  502. <input readonly="true" v-if="
  503. item1.type == 2 ||
  504. item1.type == 3 ||
  505. item1.type == 12 ||
  506. item1.type == 13 ||
  507. item1.type == 7
  508. " :placeholder="item1.name" style="
  509. border: none;
  510. outline: none;
  511. width: 80%;
  512. minwidth: 215px;
  513. z-index: 99;
  514. font-size: 14px;
  515. white-space: nowrap;
  516. overflow: hidden;
  517. text-overflow: ellipsis;
  518. " />
  519. </div>
  520. <div class="chapter_upload_ic">
  521. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  522. <div class="chapter_upload_ic_r" @click.stop="
  523. deleteTeacherInfoData(
  524. $event,
  525. index1
  526. )
  527. ">
  528. <div></div>
  529. </div>
  530. </div>
  531. </div>
  532. </div>
  533. </div>
  534. </div>
  535. <div v-if="
  536. teacherinfoproVisible
  537. " class="mask">
  538. <div class="progressBox">
  539. <div class="lbox">
  540. <img src="../../../assets/loading.gif" />上传中,请稍后
  541. </div>
  542. <div style="margin-bottom: 10px">
  543. <span>{{
  544. teacherinfoisFinishSize
  545. }}</span>
  546. /
  547. <span>{{
  548. teacherinfoisAllSize
  549. }}</span>
  550. </div>
  551. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  552. ? teacherinfoprogress
  553. : 0
  554. " style="width: 80%"></el-progress> -->
  555. </div>
  556. </div>
  557. </div>
  558. </div>
  559. <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">
  560. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken" @click="cancelAjax('teacherText')">停止</div>
  561. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  562. <div class="c_info_title">
  563. 已有教案摘要
  564. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  565. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  566. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1)"
  567. @click="openAiDialog(2, 'aiteacherTextDetail',1)">提取摘要</button>
  568. </el-tooltip>
  569. </div>
  570. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  571. <div style="width: calc(100%);" class='op_task_box'>
  572. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  573. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  574. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  575. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  576. <div class="op_box">
  577. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  578. <div style="display: flex;">
  579. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  580. <div class="r_pub_button_op"
  581. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
  582. @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
  583. </el-tooltip>
  584. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2()">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  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)"
  599. @click="openAiDialog(2, 'aitargetTextDetail',1)">提取目标</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">
  609. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  610. <div style="display: flex;">
  611. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  612. <div class="r_pub_button_op"
  613. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
  614. @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
  615. </el-tooltip>
  616. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB,forceUpdate2()">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  617. </div>
  618. </div>
  619. </div>
  620. </div>
  621. </div>
  622. </div>
  623. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  624. <div style="position: relative;
  625. background: #fff;
  626. box-sizing: border-box;
  627. padding: 1px 20px 10px;
  628. width: 100%;
  629. border-radius: 10px;">
  630. <div style="
  631. display: flex;
  632. flex-direction: row;
  633. justify-content: space-between;
  634. align-items: center;
  635. " :style="{
  636. margin: true
  637. ? '20px 0 10px'
  638. : '20px 0 0',
  639. }">
  640. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  641. 系统推荐参考资料
  642. <div class="add_info_box" style="margin: 0 0 0 auto">
  643. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  644. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  645. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  646. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  647.  </el-tooltip>
  648. </div>
  649. </div>
  650. </div>
  651. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  652. <div class="add_chapters_box add_c_none" v-if="
  653. cankaoInfoData &&
  654. cankaoInfoData.length == 0
  655. ">
  656. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  657. </div>
  658. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  659. <div @dragstart="
  660. dragStart(item1, index1, 0)
  661. " @dragover.prevent="
  662. dragOver(index1, 0)
  663. " @dragend="dragEnd()" :draggable="isdrag ==
  664. 'chapter-' + 0 + '-' + index1
  665. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  666. getChapterData(
  667. $event,
  668. index1,
  669. item1.type
  670. )
  671. " :class="{
  672. dragOverTop2:
  673. newIndex === index1 &&
  674. typeIndex ==
  675. 'chapter-' +
  676. 0 +
  677. '-' +
  678. index1 &&
  679. oldIndex > index1 &&
  680. dragType == 'drag',
  681. dragOverBottom2:
  682. newIndex === index1 &&
  683. typeIndex ==
  684. 'chapter-' +
  685. 0 +
  686. '-' +
  687. index1 &&
  688. oldIndex < index1 &&
  689. dragType == 'drag',
  690. }">
  691. <div class="chapter_upload_o" style="
  692. position: relative;
  693. display: flex;
  694. align-items: center;
  695. ">
  696. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  697. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  698. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  699. </div>
  700. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  701. </div>
  702. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  703. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  704. </div>
  705. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  706. </div>
  707. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  708. </div>
  709. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  710. </div>
  711. </div>
  712. <div class="chapter_upload_n">
  713. <input readonly="true" v-if="
  714. item1.type == 2 ||
  715. item1.type == 3 ||
  716. item1.type == 12 ||
  717. item1.type == 13 ||
  718. item1.type == 7
  719. " :placeholder="item1.name" style="
  720. border: none;
  721. outline: none;
  722. width: 80%;
  723. minwidth: 215px;
  724. z-index: 99;
  725. font-size: 14px;
  726. white-space: nowrap;
  727. overflow: hidden;
  728. text-overflow: ellipsis;
  729. " />
  730. </div>
  731. <div class="chapter_upload_ic">
  732. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  733. <div class="chapter_upload_ic_r" @click.stop="
  734. deleteCankaoInfoData(
  735. $event,
  736. index1
  737. )
  738. ">
  739. <div></div>
  740. </div>
  741. </div>
  742. </div>
  743. </div>
  744. </div>
  745. </div>
  746. </div>
  747. </div>
  748. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  749. <div style="position: relative;
  750. background: #fff;
  751. box-sizing: border-box;
  752. padding: 1px 20px 10px;
  753. width: 100%;
  754. border-radius: 10px;">
  755. <div style="
  756. display: flex;
  757. flex-direction: row;
  758. justify-content: space-between;
  759. align-items: center;
  760. " :style="{
  761. margin: true
  762. ? '20px 0 10px'
  763. : '20px 0 0',
  764. }">
  765. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  766. 知识库
  767. <div class="add_info_box" style="margin: 0 0 0 auto">
  768. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  769. 上传补充资料
  770. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  771. beforeUploadInfo2(
  772. $event,
  773. 15
  774. )
  775. " />
  776. </button>
  777. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  778. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  779. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  780. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  781.  </el-tooltip>
  782. </div>
  783. </div>
  784. </div>
  785. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..." :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  786. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken" @click="cancelAjax('file')">停止</div>
  787. <div class="add_chapters_box add_c_none" v-if="
  788. infoData2 &&
  789. infoData2.length == 0
  790. ">
  791. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  792. </div>
  793. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  794. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  795. getChapterData(
  796. $event,
  797. index1,
  798. item1.type
  799. )
  800. " >
  801. <div class="chapter_upload_o" style="
  802. position: relative;
  803. display: flex;
  804. align-items: center;
  805. ">
  806. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  807. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  808. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  809. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  810. </div>
  811. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  812. </div>
  813. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  814. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  815. </div>
  816. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  817. </div>
  818. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  819. </div>
  820. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  821. </div>
  822. </div>
  823. <div class="chapter_upload_n">
  824. <input readonly="true" v-if="
  825. item1.type == 2 ||
  826. item1.type == 3 ||
  827. item1.type == 12 ||
  828. item1.type == 13 ||
  829. item1.type == 7
  830. " :placeholder="item1.name" @click.stop="
  831. checkChpater2($event, index1 )
  832. " style="
  833. border: none;
  834. outline: none;
  835. width: 80%;
  836. minwidth: 215px;
  837. z-index: 99;
  838. font-size: 14px;
  839. white-space: nowrap;
  840. overflow: hidden;
  841. text-overflow: ellipsis;
  842. " />
  843. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  844. border: none;
  845. outline: none;
  846. width: 80%;
  847. white-space: nowrap;
  848. overflow: hidden;
  849. text-overflow: ellipsis;
  850. " readonly="true" @click="
  851. selectAttText(index1)
  852. " />
  853. <input :placeholder="item1.title ? item1.title : '链接'
  854. " v-if="item1.type == 8" style="
  855. border: none;
  856. outline: none;
  857. width: 80%;
  858. white-space: nowrap;
  859. overflow: hidden;
  860. text-overflow: ellipsis;
  861. " readonly="true" @click="selectLine(index1)" />
  862. <input :placeholder="item1.title ? item1.title : '链接'
  863. " v-if="item1.type == 14" style="
  864. border: none;
  865. outline: none;
  866. width: 80%;
  867. white-space: nowrap;
  868. overflow: hidden;
  869. text-overflow: ellipsis;
  870. " readonly="true" @click="
  871. openUpdateSource(index1)
  872. " />
  873. </div>
  874. <div class="chapter_upload_ic">
  875. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  876. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  877. checkChpater2($event, index1 )
  878. ">
  879. <div></div>
  880. </div>
  881. <div class="chapter_upload_ic_r" @click.stop="
  882. deleteInfoData2(
  883. $event,
  884. index1
  885. )
  886. ">
  887. <div></div>
  888. </div>
  889. </div>
  890. </div>
  891. </div>
  892. </div>
  893. </div>
  894. <div v-if="
  895. infoproVisible
  896. " class="mask">
  897. <div class="progressBox">
  898. <div class="lbox">
  899. <img src="../../../assets/loading.gif" />上传中,请稍后
  900. </div>
  901. <div style="margin-bottom: 10px">
  902. <span>{{
  903. infoisFinishSize
  904. }}</span>
  905. /
  906. <span>{{
  907. infoisAllSize
  908. }}</span>
  909. </div>
  910. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  911. ? infoprogress
  912. : 0
  913. " style="width: 80%"></el-progress> -->
  914. </div>
  915. </div>
  916. </div>
  917. </div>
  918. <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))">
  919. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken" @click="cancelAjax('text')">停止</div>
  920. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  921. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  922. 课程简要描述
  923. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  924. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  925. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
  926. @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
  927. </el-tooltip>
  928. <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>
  929. </div>
  930. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  931. <div style="width: calc(100%);" class='op_task_box'>
  932. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  933. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  934. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  935. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  936. <div class="op_box">
  937. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  938. <div style="display: flex;">
  939. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  940. <div class="r_pub_button_op"
  941. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  942. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  943. </el-tooltip>
  944. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2()">{{ courseTextB ? '确定' : '编辑'}}</div>
  945. </div>
  946. </div>
  947. </div>
  948. </div>
  949. </div>
  950. </div>
  951. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(isuseT === 1)">
  952. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  953. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  954. 课程概况<span class="inter_setting" @click="openInterPanSetting"></span>
  955. <div class="inter_setting_panel" v-show="interSetting">
  956. <div class="panel_title">配置工作流</div>
  957. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  958. <div class="panel_input">
  959. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : '请输入agentid'" class="binfo_input" v-model="agentid"/>
  960. </div>
  961. <div class="panel_button">
  962. <button class="c_pub_button_confirm" @click="setAgentid">确认</button>
  963. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">复原</button>
  964. <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
  965. </div>
  966. </div>
  967. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  968. </div>
  969. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  970. <div class="inter_box" v-show="interPan">
  971. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl" frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  972. </div>
  973. <div style="width: calc(100%);height: 100%" class='op_task_box' :class="{inter_Detailbox: !courseTextB && interPan}">
  974. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  975. placeholder="请输入课程简要描述" v-if="courseTextB && interPan"></textarea>
  976. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  977. placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan"></textarea>
  978. <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>
  979. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-html="MarkdownT(courseText)" v-else></div>
  980. <div class="op_box">
  981. <div class="op_remark"></div>
  982. <div style="display: flex;">
  983. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  984. <div class="r_pub_button_op"
  985. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  986. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  987. </el-tooltip> -->
  988. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2()">{{ courseTextB ? '确定' : '编辑'}}</div>
  989. </div>
  990. </div>
  991. </div>
  992. </div>
  993. </div>
  994. </div>
  995. <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'">
  996. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2" @click="cancelAjax('target2')">停止</div>
  997. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  998. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  999. 课程目标
  1000. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1001. 上传补充资料
  1002. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1003. beforeUploadInfo2(
  1004. $event,
  1005. 16
  1006. )
  1007. " />
  1008. </button>
  1009. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  1010. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1011. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1012. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  1013. </el-tooltip>
  1014. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1015. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1016. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1)"
  1017. @click="openAiDialog(2, 'aitargetTextDetail3',1)">生成目标</button>
  1018. </el-tooltip>
  1019. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1020. <div class="add_chapters_box add_c_none" v-if="
  1021. mubiaoInfoData &&
  1022. mubiaoInfoData.length == 0
  1023. ">
  1024. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  1025. </div>
  1026. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1027. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1028. getChapterData(
  1029. $event,
  1030. index1,
  1031. item1.type
  1032. )
  1033. " >
  1034. <div class="chapter_upload_o" style="
  1035. position: relative;
  1036. display: flex;
  1037. align-items: center;
  1038. ">
  1039. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1040. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1041. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1042. </div>
  1043. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1044. </div>
  1045. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1046. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1047. </div>
  1048. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1049. </div>
  1050. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1051. </div>
  1052. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1053. </div>
  1054. </div>
  1055. <div class="chapter_upload_n">
  1056. <input readonly="true" v-if="
  1057. item1.type == 2 ||
  1058. item1.type == 3 ||
  1059. item1.type == 12 ||
  1060. item1.type == 13 ||
  1061. item1.type == 7
  1062. " :placeholder="item1.name" @click.stop="
  1063. checkChpater3($event, index1, item1)
  1064. " style="
  1065. border: none;
  1066. outline: none;
  1067. width: 80%;
  1068. minwidth: 215px;
  1069. z-index: 99;
  1070. font-size: 14px;
  1071. white-space: nowrap;
  1072. overflow: hidden;
  1073. text-overflow: ellipsis;
  1074. " />
  1075. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1076. border: none;
  1077. outline: none;
  1078. width: 80%;
  1079. white-space: nowrap;
  1080. overflow: hidden;
  1081. text-overflow: ellipsis;
  1082. " readonly="true" @click="
  1083. selectAttText(index1)
  1084. " />
  1085. <input :placeholder="item1.title ? item1.title : '链接'
  1086. " v-if="item1.type == 8" style="
  1087. border: none;
  1088. outline: none;
  1089. width: 80%;
  1090. white-space: nowrap;
  1091. overflow: hidden;
  1092. text-overflow: ellipsis;
  1093. " readonly="true" @click="selectLine(index1)" />
  1094. <input :placeholder="item1.title ? item1.title : '链接'
  1095. " v-if="item1.type == 14" style="
  1096. border: none;
  1097. outline: none;
  1098. width: 80%;
  1099. white-space: nowrap;
  1100. overflow: hidden;
  1101. text-overflow: ellipsis;
  1102. " readonly="true" @click="
  1103. openUpdateSource(index1)
  1104. " />
  1105. </div>
  1106. <div class="chapter_upload_ic">
  1107. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1108. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1109. checkChpater3($event, index1, item1)
  1110. ">
  1111. <div></div>
  1112. </div>
  1113. <div class="chapter_upload_ic_r" @click.stop="
  1114. deletemubiaoInfoData(
  1115. $event,
  1116. index1
  1117. )
  1118. ">
  1119. <div></div>
  1120. </div>
  1121. </div>
  1122. </div>
  1123. </div>
  1124. </div>
  1125. </div>
  1126. <div v-if="
  1127. mubiaoinfoproVisible
  1128. " class="mask">
  1129. <div class="progressBox">
  1130. <div class="lbox">
  1131. <img src="../../../assets/loading.gif" />上传中,请稍后
  1132. </div>
  1133. <div style="margin-bottom: 10px">
  1134. <span>{{
  1135. mubiaoinfoisFinishSize
  1136. }}</span>
  1137. /
  1138. <span>{{
  1139. mubiaoinfoisAllSize
  1140. }}</span>
  1141. </div>
  1142. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1143. ? mubiaoinfoprogress
  1144. : 0
  1145. " style="width: 80%"></el-progress> -->
  1146. </div>
  1147. </div>
  1148. </div>
  1149. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1150. <div style="width: calc(100%);" class='op_task_box'>
  1151. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  1152. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  1153. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  1154. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1155. <div class="op_box">
  1156. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1157. <div style="display: flex;">
  1158. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1159. <div class="r_pub_button_op"
  1160. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
  1161. @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
  1162. </el-tooltip>
  1163. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B,forceUpdate2()">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1164. </div>
  1165. </div>
  1166. </div>
  1167. </div>
  1168. </div>
  1169. </div>
  1170. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  1171. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1172. <div class="c_info_title">
  1173. 补充资料
  1174. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1175. </div>
  1176. <div class="buchong_box">
  1177. <span>暂时还没有内容,快去添加吧~</span>
  1178. </div>
  1179. </div> -->
  1180. <div style="position: relative;
  1181. background: #fff;
  1182. box-sizing: border-box;
  1183. padding: 1px 20px 10px;
  1184. width: 100%;
  1185. border-radius: 10px;">
  1186. <div style="
  1187. display: flex;
  1188. flex-direction: row;
  1189. justify-content: space-between;
  1190. align-items: center;
  1191. " :style="{
  1192. margin: true
  1193. ? '20px 0 10px'
  1194. : '20px 0 0',
  1195. }">
  1196. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1197. 补充资料
  1198. <div class="add_info_box" style="margin: 0 0 0 auto">
  1199. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1200. 上传补充资料
  1201. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1202. beforeUploadInfo2(
  1203. $event,
  1204. 13
  1205. )
  1206. " />
  1207. </button>
  1208. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1209. 图文
  1210. </button>
  1211. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1212. 链接
  1213. </button>
  1214. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1215. 代码
  1216. </button>
  1217. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1218. 资源
  1219. </button> -->
  1220. </div>
  1221. </div>
  1222. </div>
  1223. <div>
  1224. <div class="add_chapters_box add_c_none" v-if="
  1225. infoData &&
  1226. infoData.length == 0
  1227. ">
  1228. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  1229. </div>
  1230. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1231. <div @dragstart="
  1232. dragStart(item1, index1, 0)
  1233. " @dragover.prevent="
  1234. dragOver(index1, 0)
  1235. " @dragend="dragEnd()" :draggable="isdrag ==
  1236. 'chapter-' + 0 + '-' + index1
  1237. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1238. getChapterData(
  1239. $event,
  1240. index1,
  1241. item1.type
  1242. )
  1243. " :class="{
  1244. dragOverTop2:
  1245. newIndex === index1 &&
  1246. typeIndex ==
  1247. 'chapter-' +
  1248. 0 +
  1249. '-' +
  1250. index1 &&
  1251. oldIndex > index1 &&
  1252. dragType == 'drag',
  1253. dragOverBottom2:
  1254. newIndex === index1 &&
  1255. typeIndex ==
  1256. 'chapter-' +
  1257. 0 +
  1258. '-' +
  1259. index1 &&
  1260. oldIndex < index1 &&
  1261. dragType == 'drag',
  1262. }">
  1263. <!-- <div @mousedown="
  1264. isdrag =
  1265. 'chapter-' + 0 + '-' + index1
  1266. " @mouseup="isdrag = ''" @touchstart="
  1267. isdrag =
  1268. 'chapter-' + 0 + '-' + index1
  1269. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1270. <div class="chapter_upload_o" style="
  1271. position: relative;
  1272. display: flex;
  1273. align-items: center;
  1274. ">
  1275. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1276. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1277. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1278. </div>
  1279. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1280. </div>
  1281. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1282. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1283. </div>
  1284. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1285. </div>
  1286. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1287. </div>
  1288. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1289. </div>
  1290. </div>
  1291. <div class="chapter_upload_n">
  1292. <input readonly="true" v-if="
  1293. item1.type == 2 ||
  1294. item1.type == 3 ||
  1295. item1.type == 12 ||
  1296. item1.type == 13 ||
  1297. item1.type == 7
  1298. " :placeholder="item1.name" @click="
  1299. updataVideoT(
  1300. $event,
  1301. index1
  1302. )
  1303. " style="
  1304. border: none;
  1305. outline: none;
  1306. width: 80%;
  1307. minwidth: 215px;
  1308. z-index: 99;
  1309. font-size: 14px;
  1310. white-space: nowrap;
  1311. overflow: hidden;
  1312. text-overflow: ellipsis;
  1313. " />
  1314. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1315. border: none;
  1316. outline: none;
  1317. width: 80%;
  1318. white-space: nowrap;
  1319. overflow: hidden;
  1320. text-overflow: ellipsis;
  1321. " readonly="true" @click="
  1322. selectAttText(index1)
  1323. " />
  1324. <input :placeholder="item1.title ? item1.title : '链接'
  1325. " v-if="item1.type == 8" style="
  1326. border: none;
  1327. outline: none;
  1328. width: 80%;
  1329. white-space: nowrap;
  1330. overflow: hidden;
  1331. text-overflow: ellipsis;
  1332. " readonly="true" @click="selectLine(index1)" />
  1333. <input :placeholder="item1.title ? item1.title : '链接'
  1334. " v-if="item1.type == 14" style="
  1335. border: none;
  1336. outline: none;
  1337. width: 80%;
  1338. white-space: nowrap;
  1339. overflow: hidden;
  1340. text-overflow: ellipsis;
  1341. " readonly="true" @click="
  1342. openUpdateSource(index1)
  1343. " />
  1344. </div>
  1345. <div class="chapter_upload_ic">
  1346. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1347. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1348. <div class="chapter_upload_up" @click="
  1349. upCd(
  1350. $event,
  1351. index1
  1352. )
  1353. "></div>
  1354. <div class="chapter_upload_down" @click="
  1355. downCd(
  1356. $event,
  1357. index1
  1358. )
  1359. "></div>
  1360. </div>
  1361. <div class="chapter_upload_ic_edit" v-if="
  1362. item1.type == 2 ||
  1363. item1.type == 3 ||
  1364. item1.type == 12 ||
  1365. item1.type == 13 ||
  1366. item1.type == 7
  1367. " @click.stop="
  1368. updataVideoT(
  1369. $event,
  1370. index1
  1371. )
  1372. ">
  1373. <div></div>
  1374. </div>
  1375. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1376. selectAttText(index1)
  1377. ">
  1378. <div></div>
  1379. </div>
  1380. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1381. @click="selectLine(index1)">
  1382. <div></div>
  1383. </div>
  1384. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1385. openUpdateSource(index1)
  1386. ">
  1387. <div></div>
  1388. </div> -->
  1389. <div class="chapter_upload_ic_r" @click.stop="
  1390. deleteInfoData(
  1391. $event,
  1392. index1
  1393. )
  1394. ">
  1395. <div></div>
  1396. </div>
  1397. </div>
  1398. </div>
  1399. </div>
  1400. </div>
  1401. </div>
  1402. <div v-if="
  1403. infoproVisible
  1404. " class="mask">
  1405. <div class="progressBox">
  1406. <!-- <div id="closePro" class="closeCss">
  1407. <img src="../../../../assets/icon/close.png" alt />
  1408. </div> -->
  1409. <div class="lbox">
  1410. <img src="../../../assets/loading.gif" />上传中,请稍后
  1411. </div>
  1412. <div style="margin-bottom: 10px">
  1413. <span>{{
  1414. infoisFinishSize
  1415. }}M</span>
  1416. /
  1417. <span>{{
  1418. infoisAllSize
  1419. }}M</span>
  1420. </div>
  1421. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1422. ? infoprogress
  1423. : 0
  1424. " style="width: 80%"></el-progress>
  1425. </div>
  1426. </div>
  1427. </div>
  1428. </div>
  1429. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1430. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1431. <div class="c_info_title">
  1432. 补充描述
  1433. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1434. </div>
  1435. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1436. <div style="width: calc(100%)">
  1437. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1438. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1439. </div>
  1440. </div>
  1441. </div>
  1442. </div>
  1443. <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">
  1444. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1445. <div class="c_info_title">
  1446. 课程大纲
  1447. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1448. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1449. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1450. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1451. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1452. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1453. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1454. </el-tooltip>
  1455. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1456. @click="openAiDialog2(2, 'aiOutline')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1457. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1458. @click="openAiDialog2(2, 'aiOutline2')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1459. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1460. </div>
  1461. <div class="task_outline">
  1462. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1463. <div class="outline_task">
  1464. <div class="title">任务{{ index + 1 }}</div>
  1465. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1466. v-model="item.task" />
  1467. <div class="outline_btn">
  1468. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1469. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)" @click="openAiDialog(2, 'aiOutlineDetail2', index)">{{ item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  1470. </el-tooltip>
  1471. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index)">在上面加入一个任务</button>
  1472. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index)">在下面加入一个任务</button>
  1473. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="deleteTask2(index)" v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  1474. </div>
  1475. </div>
  1476. <div class="outline_detail" :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1477. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]" @click="cancelAjax('outlineTask', index)">停止</div>
  1478. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1479. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1480. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1481. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1482. <div class="op_box">
  1483. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1484. <div style="display: flex;">
  1485. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1486. <div class="r_pub_button_op"
  1487. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  1488. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  1489. </el-tooltip>
  1490. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index)">{{
  1491. item.isTask2 ? '确定' : '编辑'}}</div>
  1492. </div>
  1493. </div>
  1494. </div>
  1495. </div>
  1496. </div>
  1497. </div>
  1498. </div>
  1499. <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)">
  1500. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1501. <div class="c_info_title">
  1502. 概念群
  1503. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1504. @click="openAiDialog2(2, 'aiCpote1')">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1505. </div>
  1506. <div class="task_outline">
  1507. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1508. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1509. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1510. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1511. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1512. <div class="op_box">
  1513. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1514. <div style="display: flex;">
  1515. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1516. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  1517. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1518. </el-tooltip>
  1519. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  1520. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1521. </div>
  1522. </div>
  1523. </div>
  1524. </div>
  1525. </div>
  1526. </div>
  1527. <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)">
  1528. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1529. <div class="c_info_title">
  1530. 问题链
  1531. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1532. @click="openAiDialog2(2, 'aiCpote2')">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1533. </div>
  1534. <div class="task_outline">
  1535. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1536. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1537. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1538. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1539. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1540. <div class="op_box">
  1541. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1542. <div style="display: flex;">
  1543. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1544. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  1545. @click="openAiDialog(2, 'aiCpote2')">智能优化</div>
  1546. </el-tooltip>
  1547. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  1548. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1549. </div>
  1550. </div>
  1551. </div>
  1552. </div>
  1553. </div>
  1554. </div>
  1555. <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)">
  1556. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1557. <div class="c_info_title">
  1558. 目标层
  1559. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1560. @click="openAiDialog2(2, 'aiCpote3')">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1561. </div>
  1562. <div class="task_outline">
  1563. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1564. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1565. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1566. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1567. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1568. <div class="op_box">
  1569. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1570. <div style="display: flex;">
  1571. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1572. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  1573. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  1574. </el-tooltip>
  1575. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  1576. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1577. </div>
  1578. </div>
  1579. </div>
  1580. </div>
  1581. </div>
  1582. </div>
  1583. <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)">
  1584. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1585. <div class="c_info_title">
  1586. 任务簇
  1587. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1588. @click="openAiDialog2(2, 'aiCpote4')">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1589. </div>
  1590. <div class="task_outline">
  1591. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1592. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1593. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1594. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1595. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1596. <div class="op_box">
  1597. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1598. <div style="display: flex;">
  1599. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1600. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  1601. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  1602. </el-tooltip>
  1603. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  1604. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1605. </div>
  1606. </div>
  1607. </div>
  1608. </div>
  1609. </div>
  1610. </div>
  1611. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1612. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1613. <div class="c_info_title">
  1614. 教案
  1615. <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'">
  1616. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1617. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1618. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1619. </el-tooltip>
  1620. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1621. @click="openAiDialog2(2, 'aiTeacher2')" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1622. <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')">
  1623. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1624. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1625. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1626. </el-tooltip>
  1627. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1628. </div>
  1629. <div class="task_outline">
  1630. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1631. <div class="outline_task">
  1632. <div class="title">任务{{ index + 1 }}</div>
  1633. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1634. v-model="item.task" />
  1635. </div>
  1636. <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1637. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1638. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1639. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1640. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1641. <div class="op_box">
  1642. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1643. <div style="display: flex;">
  1644. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1645. <div class="r_pub_button_op"
  1646. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  1647. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  1648. </el-tooltip>
  1649. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1650. item.isTask3 ? '确定' : '编辑'}}</div>
  1651. </div>
  1652. </div>
  1653. </div>
  1654. </div>
  1655. </div>
  1656. </div>
  1657. </div>
  1658. <div class="info_btnBox3" v-if="istemplate != 1">
  1659. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1660. goTo(
  1661. '/course?userid=' +
  1662. userid +
  1663. '&oid=' +
  1664. oid +
  1665. '&org=' +
  1666. org +
  1667. '&role=' +
  1668. role
  1669. )
  1670. ">
  1671. 返回课程
  1672. </button>
  1673. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1674. {{ steps == 4 ? "返回课程" : "上一步" }}
  1675. </button>
  1676. <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">
  1677. {{isuseT === true ? "重新生成概况和目标" : "生成概况和目标"}}
  1678. </button>
  1679. <button class="c_pub_button_confirm" v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  1680. {{isuseT === true ? "重新生成概况" : "生成概况"}}
  1681. </button>
  1682. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  1683. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  1684. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  1685. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  1686. pub_btn_next_img: steps != 3,
  1687. pub_btn_finish_img: steps == 3,
  1688. }">
  1689. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  1690. </button>
  1691. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  1692. @contextmenu.prevent="nextSteps(1)" :class="{
  1693. pub_btn_next_img: steps != 3,
  1694. pub_btn_finish_img: steps == 3,
  1695. }">
  1696. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  1697. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  1698. : "下一步" }}
  1699. </button>
  1700. </el-tooltip>
  1701. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  1702. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  1703. pub_btn_next_img: steps != 3,
  1704. pub_btn_finish_img: steps == 3,
  1705. }">下一步2</button>
  1706. </el-tooltip> -->
  1707. </div>
  1708. </div>
  1709. <div class="rightBox" v-if="steps == 2" :style="{
  1710. height:
  1711. !isStepDisplay && !isBtnDisplay
  1712. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1713. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1714. }">
  1715. <div class="basic_box" style="
  1716. padding: 20px 30px 0px !important;
  1717. box-sizing: border-box;
  1718. height: calc(100% - 80px);
  1719. overflow: auto;
  1720. background: #fff;
  1721. ">
  1722. <!-- <div
  1723. style="
  1724. color: #b8b8b8;
  1725. background: #fff;
  1726. width: 26%;
  1727. height: 40px;
  1728. border-radius: 15px;
  1729. padding-left: 20px;
  1730. line-height: 40px;
  1731. font-size: 17px;
  1732. box-shadow: 0px 1px 2px 2px #e0e0e0;
  1733. "
  1734. >-->
  1735. <div class="right_title" style="border: none; margin: 0; padding: 0">
  1736. 请选择合适的课程模板
  1737. </div>
  1738. <div class="wordbox">
  1739. <div class="wordTeacher" @click="checkTemplate2()">
  1740. <div class="wordPic">
  1741. <img src="../../../assets/icon/new/template_none.png" alt />
  1742. </div>
  1743. <div style="
  1744. margin-top: 10px;
  1745. line-height: 19px;
  1746. overflow: hidden;
  1747. text-overflow: ellipsis;
  1748. white-space: nowrap;
  1749. padding: 0 20px;
  1750. ">
  1751. 空白模板
  1752. </div>
  1753. </div>
  1754. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  1755. <div class="wordPic">
  1756. <img src="../../../assets/icon/new/template.png" alt />
  1757. </div>
  1758. <div style="
  1759. margin-top: 10px;
  1760. line-height: 19px;
  1761. overflow: hidden;
  1762. text-overflow: ellipsis;
  1763. white-space: nowrap;
  1764. padding: 0 20px;
  1765. ">
  1766. {{ aa.title }}
  1767. </div>
  1768. </div>
  1769. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  1770. <div class="wordPic">
  1771. <img src="../../../assets/icon/new/template.png" alt />
  1772. </div>
  1773. <div style="
  1774. margin-top: 10px;
  1775. line-height: 19px;
  1776. overflow: hidden;
  1777. text-overflow: ellipsis;
  1778. white-space: nowrap;
  1779. padding: 0 20px;
  1780. ">
  1781. 简易模板
  1782. </div>
  1783. </div>
  1784. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  1785. <div class="wordPic">
  1786. <img src="../../../assets/icon/new/template.png" alt />
  1787. </div>
  1788. <div style="
  1789. margin-top: 10px;
  1790. line-height: 19px;
  1791. overflow: hidden;
  1792. text-overflow: ellipsis;
  1793. white-space: nowrap;
  1794. padding: 0 20px;
  1795. ">
  1796. 智能粘贴模式
  1797. </div>
  1798. </div>
  1799. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  1800. <div class="wordPic">
  1801. <img src="../../../assets/icon/wordMub.png" alt />
  1802. </div>
  1803. <div style="
  1804. margin-top: 10px;
  1805. line-height: 19px;
  1806. overflow: hidden;
  1807. text-overflow: ellipsis;
  1808. white-space: nowrap;
  1809. padding: 0 20px;
  1810. ">
  1811. 未来小学课程设计
  1812. </div>
  1813. </div> -->
  1814. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  1815. <div class="wordPic">
  1816. <img src="../../../assets/icon/wordMub.png" alt />
  1817. </div>
  1818. <div style="
  1819. margin-top: 10px;
  1820. line-height: 19px;
  1821. overflow: hidden;
  1822. text-overflow: ellipsis;
  1823. white-space: nowrap;
  1824. padding: 0 20px;
  1825. ">
  1826. 我的课程
  1827. </div>
  1828. </div> -->
  1829. </div>
  1830. </div>
  1831. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  1832. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1833. goTo(
  1834. '/course?userid=' +
  1835. userid +
  1836. '&oid=' +
  1837. oid +
  1838. '&org=' +
  1839. org +
  1840. '&role=' +
  1841. role
  1842. )
  1843. ">
  1844. 返回课程
  1845. </button>
  1846. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1847. {{ steps == 4 ? "返回课程" : "上一步" }}
  1848. </button>
  1849. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  1850. pub_btn_next_img: steps != 3,
  1851. pub_btn_finish_img: steps == 3,
  1852. }">
  1853. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  1854. </button>
  1855. </div>
  1856. </div>
  1857. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  1858. height:
  1859. !isStepDisplay && !isBtnDisplay
  1860. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1861. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1862. }">
  1863. <div class="rb_c_box">
  1864. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  1865. <div class="rb_c_nav">
  1866. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  1867. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  1868. </div>
  1869. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  1870. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  1871. position: istemplate == 1 ? 'sticky' : 'unset',
  1872. top: istemplate == 1 ? '0' : 'unset'
  1873. }">
  1874. <!-- <div class="navTop">辅助导航</div> -->
  1875. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  1876. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  1877. <div class="nt_taskBox" style="width: 100%;">
  1878. <div class="nt_taskTitle"
  1879. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  1880. unitIndex + 1 }}</div>
  1881. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  1882. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  1883. <span>{{ unitJson[unitIndex].dyName }}</span>
  1884. </el-tooltip>
  1885. </div>
  1886. </div>
  1887. </div> -->
  1888. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  1889. .taskJson" :key="tIndex" :class="{
  1890. dragOverTop:
  1891. newIndex === tIndex &&
  1892. typeIndex == 'task-' + tIndex &&
  1893. oldIndex > tIndex &&
  1894. dragType == 'task',
  1895. dragOverBottom:
  1896. newIndex === tIndex &&
  1897. typeIndex == 'task-' + tIndex &&
  1898. oldIndex < tIndex &&
  1899. dragType == 'task',
  1900. }">
  1901. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  1902. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  1903. class="navTask" :class="{
  1904. isNavTask:
  1905. isClickColor > 0 && isClickColor == tIndex + 1,
  1906. isNavOpen: t.toolOpen,
  1907. }">
  1908. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  1909. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  1910. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  1911. class="chapter_upload_drag"></div>
  1912. <div class="nt_taskBox">
  1913. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  1914. <div class="nt_taskName">
  1915. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  1916. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  1917. </el-tooltip>
  1918. </div>
  1919. </div>
  1920. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  1921. 1
  1922. ">
  1923. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  1924. @click.stop="taskMove(1, tIndex)"></div>
  1925. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  1926. @click.stop="taskMove(2, tIndex)"></div>
  1927. </div> -->
  1928. </div>
  1929. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  1930. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  1931. @click="jumpGj(tIndex, toolIndex2)">
  1932. <div class="gjCss" :class="{
  1933. isGjCss:
  1934. toolIndexType == `gj${tIndex}${toolIndex2}`,
  1935. }">
  1936. <div>工具{{ toolIndex2 + 1 }}:</div>
  1937. <div>
  1938. {{
  1939. toolsData[tool.tool[0]] &&
  1940. toolsData[tool.tool[0]].name
  1941. }}
  1942. </div>
  1943. </div>
  1944. </div>
  1945. </div>
  1946. </div>
  1947. </div>
  1948. <div class="navBottom" v-if="courseState == 1">
  1949. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  1950. dragOverTop:
  1951. newIndex === stageIndex &&
  1952. typeIndex == 'Unit-' + stageIndex &&
  1953. oldIndex > stageIndex &&
  1954. dragType == 'Unit',
  1955. dragOverBottom:
  1956. newIndex === stageIndex &&
  1957. typeIndex == 'Unit-' + stageIndex &&
  1958. oldIndex < stageIndex &&
  1959. dragType == 'Unit',
  1960. }">
  1961. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  1962. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  1963. @click="unitSet2(stageIndex)" class="navStage" :class="{
  1964. isNavStage: stageIndex == unitIndex,
  1965. isNavStageOpen: stage.toolOpen,
  1966. }">
  1967. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  1968. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  1969. class="chapter_upload_drag"></div>
  1970. <div class="nt_taskBox">
  1971. <div class="nt_taskTitle">
  1972. 第{{ stageIndex + 1 }}阶段:
  1973. </div>
  1974. <div class="nt_taskName">
  1975. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  1976. " placement="top">
  1977. <span>{{
  1978. stage.dyName ? stage.dyName : "未命名阶段"
  1979. }}</span>
  1980. </el-tooltip>
  1981. </div>
  1982. </div>
  1983. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  1984. </div>
  1985. <div v-for="(t, tIndex) in unitJson[stageIndex]
  1986. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  1987. dragOverTop:
  1988. newIndex === tIndex &&
  1989. typeIndex == 'task-' + tIndex &&
  1990. ((oldIndex > tIndex &&
  1991. stageIndex == checkUnitIndex) ||
  1992. (oldIndex == tIndex &&
  1993. stageIndex == checkUnitIndex &&
  1994. checkUnitIndex != oldUnitIndex)) &&
  1995. dragType == 'task',
  1996. dragOverBottom:
  1997. newIndex === tIndex &&
  1998. typeIndex == 'task-' + tIndex &&
  1999. oldIndex < tIndex &&
  2000. stageIndex == checkUnitIndex &&
  2001. dragType == 'task',
  2002. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2003. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2004. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2005. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2006. isNavTask:
  2007. isClickColor > 0 &&
  2008. isClickColor == tIndex + 1 &&
  2009. stageIndex == unitIndex,
  2010. isNavOpen: t.toolOpen,
  2011. }">
  2012. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2013. <div @mousedown="
  2014. isdrag = 'task-' + stageIndex + '-' + tIndex
  2015. " @mouseup="isdrag = ''" @touchstart="
  2016. isdrag = 'task-' + stageIndex + '-' + tIndex
  2017. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2018. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2019. <div class="nt_taskTitle">
  2020. 任务{{ tIndex + 1 }}:
  2021. </div>
  2022. <div class="nt_taskName">
  2023. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2024. <span>{{
  2025. t.task ? t.task : "未命名任务"
  2026. }}</span>
  2027. </el-tooltip>
  2028. </div>
  2029. </div>
  2030. </div>
  2031. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2032. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2033. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2034. <div class="gjCss" :class="{
  2035. isGjCss:
  2036. toolIndexType ==
  2037. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2038. }">
  2039. <div>工具{{ toolIndex2 + 1 }}:</div>
  2040. <div>
  2041. {{
  2042. toolsData[tool.tool[0]] &&
  2043. toolsData[tool.tool[0]].name
  2044. }}
  2045. </div>
  2046. </div>
  2047. </div>
  2048. </div>
  2049. </div>
  2050. </div>
  2051. </div>
  2052. </div>
  2053. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2054. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2055. </div>
  2056. </div>
  2057. <div class="rb_c_box_right">
  2058. <!-- <div class="rb_c_box_btn">
  2059. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  2060. </div> -->
  2061. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2062. <div v-if="false" style="
  2063. display: flex;
  2064. flex-direction: row;
  2065. align-items: center;
  2066. position: sticky;
  2067. top: 0;
  2068. z-index: 99;
  2069. width: 100%;
  2070. padding: 0 20px 0 20px;
  2071. box-sizing: border-box;
  2072. background: #fff;
  2073. border-radius: 8px;
  2074. ">
  2075. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2076. <div class="cru_selectBox" :style="{
  2077. maxWidth: isPasteTask
  2078. ? 'calc(100% - 335px)'
  2079. : 'calc(100% - 190px)',
  2080. }" v-if="courseState == 1">
  2081. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2082. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2083. <!-- item.dyName ? item.dyName : -->
  2084. <span v-if="
  2085. unitJson[unitJson.length - 1].easy == 4 ||
  2086. unitJson[unitJson.length - 1].easy == 6
  2087. ">{{
  2088. item.dyName
  2089. ? item.dyName
  2090. : "第" + (index + 1) + "阶段"
  2091. }}</span>
  2092. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2093. </div>
  2094. <div class="cru_line" :style="{
  2095. left: offsetLetfPx + 'px',
  2096. }"></div>
  2097. </div>
  2098. <div class="addStageImg" @click="addunit()" v-if="
  2099. !(unitJson[unitJson.length - 1].easy == 4) &&
  2100. !(unitJson[unitJson.length - 1].easy == 6) &&
  2101. courseState == 1
  2102. ">
  2103. <img src="../../../assets/icon/new/addStage.png" alt />
  2104. </div>
  2105. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2106. v-if="courseState == 2" style="margin: 15px 0">
  2107. 新建阶段
  2108. </button>
  2109. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2110. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2111. 阶段顺序
  2112. </button>
  2113. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2114. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2115. 智能粘贴
  2116. </button>
  2117. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2118. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2119. }" style="padding: 0 12px">
  2120. 选择课程模板
  2121. </button>
  2122. </div>
  2123. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2124. :key="index">
  2125. <div v-if="courseState == 4" style="position: relative;
  2126. background: #fff;
  2127. box-sizing: border-box;
  2128. padding: 1px 20px 10px;
  2129. width: 100%;
  2130. border-radius: 10px;">
  2131. <div style="
  2132. display: flex;
  2133. flex-direction: row;
  2134. justify-content: space-between;
  2135. align-items: center;
  2136. " :style="{
  2137. margin: !item.taskJson[0].isFoldchapter
  2138. ? '20px 0 10px'
  2139. : '20px 0 0',
  2140. }">
  2141. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2142. 学习内容
  2143. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2144. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2145. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2146. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2147. </el-tooltip>
  2148. </div>
  2149. </div>
  2150. <div>
  2151. <div class="add_chapters_box add_c_none" v-if="
  2152. item.taskJson[0].chapterData &&
  2153. item.taskJson[0].chapterData.length == 0
  2154. ">
  2155. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  2156. </div>
  2157. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2158. <div @dragstart="
  2159. dragStart(item1, index1, 0)
  2160. " @dragover.prevent="
  2161. dragOver(index1, 0)
  2162. " @dragend="dragEnd()" :draggable="isdrag ==
  2163. 'chapter-' + 0 + '-' + index1
  2164. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2165. :key="item1.id" @click="
  2166. getChapterData(
  2167. $event,
  2168. unitIndex,
  2169. index,
  2170. index1,
  2171. item1.type
  2172. )
  2173. " :class="{
  2174. dragOverTop2:
  2175. newIndex === index1 &&
  2176. typeIndex ==
  2177. 'chapter-' +
  2178. 0 +
  2179. '-' +
  2180. index1 &&
  2181. oldIndex > index1 &&
  2182. dragType == 'drag',
  2183. dragOverBottom2:
  2184. newIndex === index1 &&
  2185. typeIndex ==
  2186. 'chapter-' +
  2187. 0 +
  2188. '-' +
  2189. index1 &&
  2190. oldIndex < index1 &&
  2191. dragType == 'drag',
  2192. }">
  2193. <div @mousedown="
  2194. isdrag =
  2195. 'chapter-' + 0 + '-' + index1
  2196. " @mouseup="isdrag = ''" @touchstart="
  2197. isdrag =
  2198. 'chapter-' + 0 + '-' + index1
  2199. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2200. <div class="chapter_upload_o" style="
  2201. position: relative;
  2202. display: flex;
  2203. align-items: center;
  2204. ">
  2205. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2206. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2207. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2208. </div>
  2209. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2210. </div>
  2211. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2212. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2213. </div>
  2214. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2215. </div>
  2216. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2217. </div>
  2218. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2219. </div>
  2220. </div>
  2221. <div class="chapter_upload_n">
  2222. <input readonly="true" v-if="
  2223. item1.type == 2 ||
  2224. item1.type == 3 ||
  2225. item1.type == 12 ||
  2226. item1.type == 13 ||
  2227. item1.type == 7
  2228. " :placeholder="item1.name" @click="
  2229. updataVideoT(
  2230. $event,
  2231. unitIndex,
  2232. 0,
  2233. index1
  2234. )
  2235. " style="
  2236. border: none;
  2237. outline: none;
  2238. width: 80%;
  2239. minwidth: 215px;
  2240. z-index: 99;
  2241. font-size: 14px;
  2242. white-space: nowrap;
  2243. overflow: hidden;
  2244. text-overflow: ellipsis;
  2245. " />
  2246. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2247. border: none;
  2248. outline: none;
  2249. width: 80%;
  2250. white-space: nowrap;
  2251. overflow: hidden;
  2252. text-overflow: ellipsis;
  2253. " readonly="true" @click="
  2254. selectAttText(0, index1)
  2255. " />
  2256. <input :placeholder="item1.title ? item1.title : '链接'
  2257. " v-if="item1.type == 8" style="
  2258. border: none;
  2259. outline: none;
  2260. width: 80%;
  2261. white-space: nowrap;
  2262. overflow: hidden;
  2263. text-overflow: ellipsis;
  2264. " readonly="true" @click="selectLine(0, index1)" />
  2265. <input :placeholder="item1.title ? item1.title : '链接'
  2266. " v-if="item1.type == 14" style="
  2267. border: none;
  2268. outline: none;
  2269. width: 80%;
  2270. white-space: nowrap;
  2271. overflow: hidden;
  2272. text-overflow: ellipsis;
  2273. " readonly="true" @click="
  2274. openUpdateSource(0, index1)
  2275. " />
  2276. </div>
  2277. <div class="chapter_upload_ic">
  2278. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2279. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2280. checkChpater( $event, unitIndex, 0, index1 )
  2281. ">
  2282. <div></div>
  2283. </div>
  2284. <div class="chapter_upload_ud" style="z-index: 99">
  2285. <div class="chapter_upload_up" @click="
  2286. upCd(
  2287. $event,
  2288. unitIndex,
  2289. index,
  2290. 0,
  2291. index1
  2292. )
  2293. "></div>
  2294. <div class="chapter_upload_down" @click="
  2295. downCd(
  2296. $event,
  2297. unitIndex,
  2298. index,
  2299. 0,
  2300. index1
  2301. )
  2302. "></div>
  2303. </div>
  2304. <div class="chapter_upload_ic_edit" v-if="
  2305. item1.type == 2 ||
  2306. item1.type == 3 ||
  2307. item1.type == 12 ||
  2308. item1.type == 13 ||
  2309. item1.type == 7
  2310. " @click.stop="
  2311. updataVideoT(
  2312. $event,
  2313. unitIndex,
  2314. 0,
  2315. index1
  2316. )
  2317. ">
  2318. <div></div>
  2319. </div>
  2320. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2321. selectAttText(0, index1)
  2322. ">
  2323. <div></div>
  2324. </div>
  2325. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2326. @click="selectLine(0, index1)">
  2327. <div></div>
  2328. </div>
  2329. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2330. openUpdateSource(0, index1)
  2331. ">
  2332. <div></div>
  2333. </div>
  2334. <div class="chapter_upload_ic_r" @click.stop="
  2335. deleteChapterData(
  2336. $event,
  2337. unitIndex,
  2338. index,
  2339. index1,
  2340. 0
  2341. )
  2342. ">
  2343. <div></div>
  2344. </div>
  2345. </div>
  2346. </div>
  2347. </div>
  2348. </div>
  2349. </div>
  2350. <div class="add_info_box" style="margin: 10px 0 0">
  2351. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2352. 文件
  2353. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2354. beforeUpload2(
  2355. $event,
  2356. unitIndex,
  2357. 13,
  2358. 0
  2359. )
  2360. " />
  2361. </button>
  2362. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2363. 图文
  2364. </button>
  2365. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2366. 链接
  2367. </button>
  2368. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2369. 代码
  2370. </button>
  2371. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2372. 资源
  2373. </button>
  2374. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2375. AI生成PPT
  2376. </button>
  2377. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2378. AI生成教案
  2379. </button>
  2380. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2381. 智能检索视频
  2382. </button>
  2383. </div>
  2384. <div v-if="
  2385. unitJson[unitIndex].chapterInfo[0].taskJson[
  2386. 0
  2387. ].proVisible
  2388. " class="mask">
  2389. <div class="progressBox">
  2390. <!-- <div id="closePro" class="closeCss">
  2391. <img src="../../../../assets/icon/close.png" alt />
  2392. </div> -->
  2393. <div class="lbox">
  2394. <img src="../../../assets/loading.gif" />上传中,请稍后
  2395. </div>
  2396. <div style="margin-bottom: 10px">
  2397. <span>{{
  2398. unitJson[unitIndex].chapterInfo[0].taskJson[
  2399. 0
  2400. ].isFinishSize
  2401. }}</span>
  2402. /
  2403. <span>{{
  2404. unitJson[unitIndex].chapterInfo[0].taskJson[
  2405. 0
  2406. ].isAllSize
  2407. }}</span>
  2408. </div>
  2409. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2410. 0
  2411. ].progress
  2412. ? unitJson[unitIndex].chapterInfo[0]
  2413. .taskJson[0].progress
  2414. : 0
  2415. " style="width: 80%"></el-progress> -->
  2416. </div>
  2417. </div>
  2418. </div>
  2419. <div class="chapter_box" v-if="courseState == 1">
  2420. <div class="chapter_contentbox">
  2421. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2422. <div class="cc_input">
  2423. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2424. v-model="unitJson[unitIndex].dyName" />
  2425. </div>
  2426. <div class="remove" v-if="
  2427. (unitJson.length > 1 || courseState != 2) &&
  2428. !(unitJson[unitJson.length - 1].easy == 4) &&
  2429. !(unitJson[unitJson.length - 1].easy == 6)
  2430. " @click="deleteUnit(unitIndex)"></div>
  2431. </div>
  2432. </div>
  2433. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2434. margin: 50px 0px 10px;
  2435. font-size: 1.5em;
  2436. font-weight: 700;
  2437. color: #0f7eff;
  2438. ">
  2439. 添加任务
  2440. </div> -->
  2441. <div class="taskBorder" :style="{
  2442. minHeight: unitJson[unitIndex].easy && 'unset',
  2443. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2444. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2445. <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
  2446. <div class="taskTitle">
  2447. <div style="display: flex;width: 100%;justify-content: space-between;">
  2448. <span>任务{{ itemTaskIndex + 1 }}</span>
  2449. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2450. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2451. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2452. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2453. </el-tooltip> -->
  2454. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2455. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2456. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex)"
  2457. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex)">重新生成任务</button>
  2458. </el-tooltip>
  2459. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2460. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2461. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  2462. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  2463. </el-tooltip> -->
  2464. </div>
  2465. </div>
  2466. <!-- padding: 20px; -->
  2467. <div v-if="unitJson[unitIndex].easy != 1">
  2468. <div :style="{
  2469. marginBottom:
  2470. unitJson[unitIndex].easy == 3 ||
  2471. (unitJson[unitIndex].easy == 5 &&
  2472. itemTask.taskType == 1)
  2473. ? '75px'
  2474. : '0',
  2475. }">
  2476. <div style="
  2477. display: flex;
  2478. margin: 0px 0 20px;
  2479. flex-direction: row;
  2480. justify-content: flex-start;
  2481. align-items: center;
  2482. ">
  2483. <div class="lineTitle">任务概述</div>
  2484. </div>
  2485. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2486. flex-direction: row;
  2487. justify-content: flex-start;
  2488. align-items: center;
  2489. margin: 0;
  2490. ">
  2491. <!-- <div class="cc_title">
  2492. 任务{{ itemTaskIndex + 1 }}
  2493. </div> -->
  2494. <div class="cc_input">
  2495. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2496. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2497. itemTaskIndex
  2498. ].task
  2499. " />
  2500. </div>
  2501. <div class="remove" v-if="
  2502. item.taskJson.length > 1 &&
  2503. (!unitJson[unitIndex].easy ||
  2504. unitJson[unitIndex].easy == 6)
  2505. " @click="deleteTask(itemTaskIndex)"></div>
  2506. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2507. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2508. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2509. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2510. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2511. </div> -->
  2512. </div>
  2513. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2514. display: flex;
  2515. margin: 20px 0;
  2516. flex-direction: row;
  2517. justify-content: flex-start;
  2518. align-items: center;
  2519. ">
  2520. <div class="lineTitle">任务描述</div>
  2521. </div> && !itemTask.isFold2-->
  2522. <div v-if="
  2523. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2524. -1
  2525. " style="margin-top: 20px" class="op_task_box"
  2526. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2527. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2528. itemTaskIndex
  2529. ].taskDetail
  2530. " @change="change"></editor-bar> -->
  2531. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2532. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2533. itemTaskIndex
  2534. ].taskDetail
  2535. "></textarea>
  2536. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2537. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2538. itemTaskIndex
  2539. ].taskDetail
  2540. "></textarea> -->
  2541. <div class="op_box">
  2542. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2543. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2544. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2545. itemTaskIndex
  2546. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2547. itemTaskIndex
  2548. ], itemTaskIndex)">智能优化</div>
  2549. </el-tooltip>
  2550. </div>
  2551. </div>
  2552. </div>
  2553. </div>
  2554. <div
  2555. style="position: relative"
  2556. v-if="courseState == 5"
  2557. >
  2558. <div
  2559. style="
  2560. display: flex;
  2561. flex-direction: row;
  2562. justify-content: space-between;
  2563. align-items: center;
  2564. "
  2565. :style="{
  2566. margin: !itemTask.isFoldchapter
  2567. ? '20px 0 10px'
  2568. : '20px 0 0',
  2569. }"
  2570. >
  2571. <div
  2572. style="margin-bottom: 10px"
  2573. class="lineTitle clineTitle"
  2574. >
  2575. 学习内容
  2576. </div>
  2577. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2578. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2579. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2580. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2581. <!-- <div class="line"></div> -->
  2582. </div>
  2583. <!-- v-if="!itemTask.isFoldchapter" -->
  2584. <div>
  2585. <div
  2586. class="add_chapters_box add_c_none"
  2587. v-if="
  2588. itemTask.chapterData &&
  2589. itemTask.chapterData.length == 0
  2590. "
  2591. >
  2592. <img
  2593. src="../../../assets/icon/new/c_none.png"
  2594. alt
  2595. /><span>请添加学习内容</span>
  2596. </div>
  2597. <div
  2598. v-else
  2599. class="add_chapters_box"
  2600. style="display: flex; flex-direction: column"
  2601. >
  2602. <div
  2603. @dragstart="
  2604. dragStart(item1, index1, itemTaskIndex)
  2605. "
  2606. @dragover.prevent="
  2607. dragOver(index1, itemTaskIndex)
  2608. "
  2609. @dragend="dragEnd()"
  2610. :draggable="
  2611. isdrag ==
  2612. 'chapter-' + itemTaskIndex + '-' + index1
  2613. "
  2614. class="chapter_upload"
  2615. v-for="(item1, index1) in itemTask.chapterData"
  2616. :key="item1.id"
  2617. @click="
  2618. getChapterData(
  2619. $event,
  2620. unitIndex,
  2621. index,
  2622. index1,
  2623. item1.type
  2624. )
  2625. "
  2626. :class="{
  2627. dragOverTop2:
  2628. newIndex === index1 &&
  2629. typeIndex ==
  2630. 'chapter-' +
  2631. itemTaskIndex +
  2632. '-' +
  2633. index1 &&
  2634. oldIndex > index1 &&
  2635. dragType == 'drag',
  2636. dragOverBottom2:
  2637. newIndex === index1 &&
  2638. typeIndex ==
  2639. 'chapter-' +
  2640. itemTaskIndex +
  2641. '-' +
  2642. index1 &&
  2643. oldIndex < index1 &&
  2644. dragType == 'drag',
  2645. }"
  2646. >
  2647. <div
  2648. @mousedown="
  2649. isdrag =
  2650. 'chapter-' + itemTaskIndex + '-' + index1
  2651. "
  2652. @mouseup="isdrag = ''"
  2653. @touchstart="
  2654. isdrag =
  2655. 'chapter-' + itemTaskIndex + '-' + index1
  2656. "
  2657. @touchend="isdrag = ''"
  2658. class="chapter_upload_drag"
  2659. ></div>
  2660. <div
  2661. class="chapter_upload_o"
  2662. style="
  2663. position: relative;
  2664. display: flex;
  2665. align-items: center;
  2666. "
  2667. >
  2668. <div
  2669. class="chapter_upload_l"
  2670. style="padding: 1px 0 0 10px"
  2671. >
  2672. <div
  2673. v-if="item1.type == 2"
  2674. class="chapter_upload_l_i2"
  2675. ></div>
  2676. <div
  2677. v-if="item1.type == 3"
  2678. class="chapter_upload_l_i3"
  2679. style="margin-left: 1px"
  2680. ></div>
  2681. <div
  2682. v-if="item1.type == 6"
  2683. class="chapter_upload_l_i6"
  2684. style="margin-left: 1px"
  2685. ></div>
  2686. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2687. <div
  2688. v-if="item1.type == 8"
  2689. class="chapter_upload_l_i8"
  2690. style="margin-left: 1px"
  2691. ></div>
  2692. <div
  2693. v-if="item1.type == 14"
  2694. class="chapter_upload_l_i14"
  2695. style="margin-left: 1px"
  2696. ></div>
  2697. <div
  2698. v-if="item1.type == 12"
  2699. class="chapter_upload_l_i12"
  2700. style="margin-left: 1px"
  2701. ></div>
  2702. <div
  2703. v-if="item1.type == 13"
  2704. class="chapter_upload_l_i13"
  2705. style="margin-left: 1px"
  2706. ></div>
  2707. </div>
  2708. <div class="chapter_upload_n">
  2709. <input
  2710. readonly="true"
  2711. v-if="
  2712. item1.type == 2 ||
  2713. item1.type == 3 ||
  2714. item1.type == 12 ||
  2715. item1.type == 13 ||
  2716. item1.type == 7
  2717. "
  2718. :placeholder="item1.name"
  2719. @click="
  2720. updataVideoT(
  2721. $event,
  2722. unitIndex,
  2723. itemTaskIndex,
  2724. index1
  2725. )
  2726. "
  2727. style="
  2728. border: none;
  2729. outline: none;
  2730. width: 80%;
  2731. minwidth: 215px;
  2732. z-index: 99;
  2733. font-size: 14px;
  2734. white-space: nowrap;
  2735. overflow: hidden;
  2736. text-overflow: ellipsis;
  2737. "
  2738. />
  2739. <input
  2740. :placeholder="item1.name"
  2741. v-if="item1.type == 6"
  2742. style="
  2743. border: none;
  2744. outline: none;
  2745. width: 80%;
  2746. white-space: nowrap;
  2747. overflow: hidden;
  2748. text-overflow: ellipsis;
  2749. "
  2750. readonly="true"
  2751. @click="
  2752. selectAttText(itemTaskIndex, index1)
  2753. "
  2754. />
  2755. <input
  2756. :placeholder="
  2757. item1.title ? item1.title : '链接'
  2758. "
  2759. v-if="item1.type == 8"
  2760. style="
  2761. border: none;
  2762. outline: none;
  2763. width: 80%;
  2764. white-space: nowrap;
  2765. overflow: hidden;
  2766. text-overflow: ellipsis;
  2767. "
  2768. readonly="true"
  2769. @click="selectLine(itemTaskIndex, index1)"
  2770. />
  2771. <input
  2772. :placeholder="
  2773. item1.title ? item1.title : '链接'
  2774. "
  2775. v-if="item1.type == 14"
  2776. style="
  2777. border: none;
  2778. outline: none;
  2779. width: 80%;
  2780. white-space: nowrap;
  2781. overflow: hidden;
  2782. text-overflow: ellipsis;
  2783. "
  2784. readonly="true"
  2785. @click="
  2786. openUpdateSource(itemTaskIndex, index1)
  2787. "
  2788. />
  2789. </div>
  2790. <div class="chapter_upload_ic">
  2791. <div
  2792. class="chapter_upload_noSee"
  2793. v-if="item1.type == 12"
  2794. ></div>
  2795. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2796. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  2797. ">
  2798. <div></div>
  2799. </div>
  2800. <div
  2801. class="chapter_upload_ud"
  2802. style="z-index: 99"
  2803. >
  2804. <div
  2805. class="chapter_upload_up"
  2806. @click="
  2807. upCd(
  2808. $event,
  2809. unitIndex,
  2810. index,
  2811. itemTaskIndex,
  2812. index1
  2813. )
  2814. "
  2815. ></div>
  2816. <div
  2817. class="chapter_upload_down"
  2818. @click="
  2819. downCd(
  2820. $event,
  2821. unitIndex,
  2822. index,
  2823. itemTaskIndex,
  2824. index1
  2825. )
  2826. "
  2827. ></div>
  2828. </div>
  2829. <div
  2830. class="chapter_upload_ic_edit"
  2831. v-if="
  2832. item1.type == 2 ||
  2833. item1.type == 3 ||
  2834. item1.type == 12 ||
  2835. item1.type == 13 ||
  2836. item1.type == 7
  2837. "
  2838. @click.stop="
  2839. updataVideoT(
  2840. $event,
  2841. unitIndex,
  2842. itemTaskIndex,
  2843. index1
  2844. )
  2845. "
  2846. >
  2847. <div></div>
  2848. </div>
  2849. <div
  2850. class="chapter_upload_ic_edit"
  2851. v-if="item1.type == 6"
  2852. @click="
  2853. selectAttText(itemTaskIndex, index1)
  2854. "
  2855. >
  2856. <div></div>
  2857. </div>
  2858. <div
  2859. class="chapter_upload_ic_edit"
  2860. v-if="item1.type == 8"
  2861. @click="selectLine(itemTaskIndex, index1)"
  2862. >
  2863. <div></div>
  2864. </div>
  2865. <div
  2866. class="chapter_upload_ic_edit"
  2867. v-if="item1.type == 14"
  2868. @click="
  2869. openUpdateSource(itemTaskIndex, index1)
  2870. "
  2871. >
  2872. <div></div>
  2873. </div>
  2874. <div
  2875. class="chapter_upload_ic_r"
  2876. @click.stop="
  2877. deleteChapterData(
  2878. $event,
  2879. unitIndex,
  2880. index,
  2881. index1,
  2882. itemTaskIndex
  2883. )
  2884. "
  2885. >
  2886. <div></div>
  2887. </div>
  2888. </div>
  2889. </div>
  2890. </div>
  2891. </div>
  2892. </div>
  2893. <!-- v-if="!itemTask.isFoldchapter" -->
  2894. <div class="add_info_box" style="margin: 10px 0 0">
  2895. <button
  2896. class="c_pub_button_add pub_btn_add_img"
  2897. @click="addImg($event)"
  2898. >
  2899. 文件
  2900. <input
  2901. type="file"
  2902. accept="*"
  2903. style="display: none"
  2904. multiple="multiple"
  2905. v-if="inputShow"
  2906. @change="
  2907. beforeUpload2(
  2908. $event,
  2909. unitIndex,
  2910. 13,
  2911. itemTaskIndex
  2912. )
  2913. "
  2914. />
  2915. </button>
  2916. <button
  2917. class="c_pub_button_add pub_btn_add_img"
  2918. @click="addAttText(itemTaskIndex)"
  2919. >
  2920. 图文
  2921. </button>
  2922. <button
  2923. class="c_pub_button_add pub_btn_add_img"
  2924. @click="openLine(itemTaskIndex)"
  2925. >
  2926. 链接
  2927. </button>
  2928. <button
  2929. class="c_pub_button_add pub_btn_add_img"
  2930. @click="pasteLine(itemTaskIndex)"
  2931. >
  2932. 代码
  2933. </button>
  2934. <button
  2935. class="c_pub_button_add pub_btn_add_img"
  2936. @click="openSource(itemTaskIndex)"
  2937. >
  2938. 资源
  2939. </button>
  2940. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  2941. AI生成PPT
  2942. </button>
  2943. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  2944. AI生成教案
  2945. </button>
  2946. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  2947. 智能检索视频
  2948. </button>
  2949. </div>
  2950. <div
  2951. v-if="
  2952. unitJson[unitIndex].chapterInfo[0].taskJson[
  2953. itemTaskIndex
  2954. ].proVisible
  2955. "
  2956. class="mask"
  2957. >
  2958. <div class="progressBox">
  2959. <!-- <div id="closePro" class="closeCss">
  2960. <img src="../../../../assets/icon/close.png" alt />
  2961. </div> -->
  2962. <div class="lbox">
  2963. <img
  2964. src="../../../assets/loading.gif"
  2965. />上传中,请稍后
  2966. </div>
  2967. <div style="margin-bottom: 10px">
  2968. <span
  2969. >{{
  2970. unitJson[unitIndex].chapterInfo[0].taskJson[
  2971. itemTaskIndex
  2972. ].isFinishSize
  2973. }}</span
  2974. >
  2975. /
  2976. <span
  2977. >{{
  2978. unitJson[unitIndex].chapterInfo[0].taskJson[
  2979. itemTaskIndex
  2980. ].isAllSize
  2981. }}</span
  2982. >
  2983. </div>
  2984. <!-- <el-progress
  2985. :text-inside="true"
  2986. :stroke-width="20"
  2987. :percentage="
  2988. unitJson[unitIndex].chapterInfo[0].taskJson[
  2989. itemTaskIndex
  2990. ].progress
  2991. ? unitJson[unitIndex].chapterInfo[0]
  2992. .taskJson[itemTaskIndex].progress
  2993. : 0
  2994. "
  2995. style="width: 80%"
  2996. ></el-progress> -->
  2997. </div>
  2998. </div>
  2999. </div>
  3000. <div v-if="
  3001. unitJson[unitIndex].easy == 1 ||
  3002. (unitJson[unitIndex].easy == 5 &&
  3003. itemTask.taskType == 2)
  3004. ">
  3005. <div>
  3006. <div class="add_chapters_box add_c_none" v-if="
  3007. itemTask.chapterData &&
  3008. itemTask.chapterData.length == 0
  3009. ">
  3010. <img src="../../../assets/icon/new/c_none.png" alt />
  3011. </div>
  3012. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3013. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3014. dragOver(index1, itemTaskIndex)
  3015. " @dragend="dragEnd()" :draggable="isdrag ==
  3016. 'chapter-' + itemTaskIndex + '-' + index1
  3017. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3018. :key="item1.id" @click="
  3019. getChapterData(
  3020. $event,
  3021. unitIndex,
  3022. index,
  3023. index1,
  3024. item1.type
  3025. )
  3026. " :class="{
  3027. dragOverTop2:
  3028. newIndex === index1 &&
  3029. typeIndex ==
  3030. 'chapter-' +
  3031. itemTaskIndex +
  3032. '-' +
  3033. index1 &&
  3034. oldIndex > index1,
  3035. dragOverBottom2:
  3036. newIndex === index1 &&
  3037. typeIndex ==
  3038. 'chapter-' +
  3039. itemTaskIndex +
  3040. '-' +
  3041. index1 &&
  3042. oldIndex < index1,
  3043. }">
  3044. <div @mousedown="
  3045. isdrag =
  3046. 'chapter-' + itemTaskIndex + '-' + index1
  3047. " @mouseup="isdrag = ''" @touchstart="
  3048. isdrag =
  3049. 'chapter-' + itemTaskIndex + '-' + index1
  3050. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3051. <div class="chapter_upload_t" style="width: 100%"></div>
  3052. <div class="chapter_upload_o" style="
  3053. position: relative;
  3054. display: flex;
  3055. align-items: center;
  3056. ">
  3057. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3058. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3059. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3060. </div>
  3061. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3062. </div>
  3063. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3064. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3065. </div>
  3066. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3067. </div>
  3068. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3069. </div>
  3070. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3071. </div>
  3072. </div>
  3073. <div class="chapter_upload_n">
  3074. <span style="
  3075. font-size: 14px;
  3076. color: rgb(109, 109, 109);
  3077. height: 14px;
  3078. line-height: 14px;
  3079. " v-if="
  3080. item1.type == 2 ||
  3081. item1.type == 3 ||
  3082. item1.type == 7
  3083. ">{{ item1.text }}-</span>
  3084. <input readonly="true" v-if="
  3085. item1.type == 2 ||
  3086. item1.type == 3 ||
  3087. item1.type == 7
  3088. " :placeholder="item1.name" @click="
  3089. updataVideoT(
  3090. $event,
  3091. unitIndex,
  3092. itemTaskIndex,
  3093. index1
  3094. )
  3095. " style="
  3096. border: none;
  3097. outline: none;
  3098. width: 80%;
  3099. minwidth: 215px;
  3100. z-index: 99;
  3101. font-size: 14px;
  3102. white-space: nowrap;
  3103. overflow: hidden;
  3104. text-overflow: ellipsis;
  3105. " />
  3106. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3107. border: none;
  3108. outline: none;
  3109. width: 80%;
  3110. white-space: nowrap;
  3111. overflow: hidden;
  3112. text-overflow: ellipsis;
  3113. " readonly="true" @click="
  3114. selectAttText(itemTaskIndex, index1)
  3115. " />
  3116. <input :placeholder="item1.title ? item1.title : '链接'
  3117. " v-if="item1.type == 8 || item1.type == 14" style="
  3118. border: none;
  3119. outline: none;
  3120. width: 80%;
  3121. white-space: nowrap;
  3122. overflow: hidden;
  3123. text-overflow: ellipsis;
  3124. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3125. </div>
  3126. <div class="chapter_upload_ic">
  3127. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3128. <div class="chapter_upload_ud" style="z-index: 99">
  3129. <div class="chapter_upload_up" @click="
  3130. upCd(
  3131. $event,
  3132. unitIndex,
  3133. index,
  3134. itemTaskIndex,
  3135. index1
  3136. )
  3137. "></div>
  3138. <div class="chapter_upload_down" @click="
  3139. downCd(
  3140. $event,
  3141. unitIndex,
  3142. index,
  3143. itemTaskIndex,
  3144. index1
  3145. )
  3146. "></div>
  3147. </div>
  3148. <div class="chapter_upload_ic_edit" v-if="
  3149. item1.type == 2 ||
  3150. item1.type == 3 ||
  3151. item1.type == 12 ||
  3152. item1.type == 13 ||
  3153. item1.type == 7
  3154. " @click.stop="
  3155. updataVideoT(
  3156. $event,
  3157. unitIndex,
  3158. itemTaskIndex,
  3159. index1
  3160. )
  3161. ">
  3162. <div></div>
  3163. </div>
  3164. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3165. selectAttText(itemTaskIndex, index1)
  3166. ">
  3167. <div></div>
  3168. </div>
  3169. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3170. @click="selectLine(itemTaskIndex, index1)">
  3171. <div></div>
  3172. </div>
  3173. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3174. openUpdateSource(itemTaskIndex, index1)
  3175. ">
  3176. <div></div>
  3177. </div>
  3178. <div class="chapter_upload_ic_r" @click.stop="
  3179. deleteChapterData(
  3180. $event,
  3181. unitIndex,
  3182. index,
  3183. index1,
  3184. itemTaskIndex
  3185. )
  3186. ">
  3187. <div></div>
  3188. </div>
  3189. </div>
  3190. </div>
  3191. </div>
  3192. </div>
  3193. </div>
  3194. <div class="add_info_box" style="margin: 10px 0 0">
  3195. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3196. <span style="color: red">*</span>
  3197. 教学设计
  3198. <input type="file"
  3199. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3200. style="display: none" v-if="inputShow" @change="
  3201. beforeUpload3(
  3202. $event,
  3203. unitIndex,
  3204. 3,
  3205. itemTaskIndex,
  3206. '教学设计'
  3207. )
  3208. " />
  3209. </button>
  3210. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3211. <span style="color: red">*</span>
  3212. 教学课件
  3213. <input type="file"
  3214. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3215. style="display: none" v-if="inputShow" @change="
  3216. beforeUpload3(
  3217. $event,
  3218. unitIndex,
  3219. 3,
  3220. itemTaskIndex,
  3221. '教学课件'
  3222. )
  3223. " />
  3224. </button>
  3225. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3226. 教学视频
  3227. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3228. style="display: none" v-if="inputShow" @change="
  3229. beforeUpload3(
  3230. $event,
  3231. unitIndex,
  3232. 2,
  3233. itemTaskIndex,
  3234. '教学视频'
  3235. )
  3236. " />
  3237. </button>
  3238. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3239. 教学音频
  3240. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3241. beforeUpload3(
  3242. $event,
  3243. unitIndex,
  3244. 2,
  3245. itemTaskIndex,
  3246. '教学音频'
  3247. )
  3248. " />
  3249. </button>
  3250. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3251. 学习单
  3252. <input type="file"
  3253. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3254. style="display: none" v-if="inputShow" @change="
  3255. beforeUpload3(
  3256. $event,
  3257. unitIndex,
  3258. 3,
  3259. itemTaskIndex,
  3260. '学习单'
  3261. )
  3262. " />
  3263. </button>
  3264. </div>
  3265. <div v-if="
  3266. unitJson[unitIndex].chapterInfo[0].taskJson[
  3267. itemTaskIndex
  3268. ].proVisible
  3269. " class="mask">
  3270. <div class="progressBox">
  3271. <!-- <div id="closePro" class="closeCss">
  3272. <img src="../../../../assets/icon/close.png" alt />
  3273. </div> -->
  3274. <div class="lbox">
  3275. <img src="../../../assets/loading.gif" />上传中,请稍后
  3276. </div>
  3277. <div style="margin-bottom: 10px">
  3278. <span>{{
  3279. unitJson[unitIndex].chapterInfo[0].taskJson[
  3280. itemTaskIndex
  3281. ].isFinishSize
  3282. }}M</span>
  3283. /
  3284. <span>{{
  3285. unitJson[unitIndex].chapterInfo[0].taskJson[
  3286. itemTaskIndex
  3287. ].isAllSize
  3288. }}M</span>
  3289. </div>
  3290. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3291. itemTaskIndex
  3292. ].progress
  3293. ? unitJson[unitIndex].chapterInfo[0]
  3294. .taskJson[itemTaskIndex].progress
  3295. : 0
  3296. " style="width: 80%"></el-progress>
  3297. </div>
  3298. </div>
  3299. </div>
  3300. </div>
  3301. <!-- padding: 20px; -->
  3302. <div style="
  3303. background: #fff;
  3304. border-radius: 5px;
  3305. margin-top: 15px;
  3306. ">
  3307. <div v-if="
  3308. unitJson[unitIndex].easy == 6 ||
  3309. !unitJson[unitIndex].easy
  3310. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
  3311. <div v-if="
  3312. unitJson[unitIndex].easy != 3 &&
  3313. !(
  3314. unitJson[unitIndex].easy == 5 &&
  3315. itemTask.taskType == 1
  3316. )
  3317. " style="
  3318. flex-direction: row;
  3319. justify-content: flex-start;
  3320. align-items: center;
  3321. ">
  3322. <div style="
  3323. display: flex;
  3324. flex-direction: row;
  3325. align-items: center;
  3326. margin: 5px 0 20px;
  3327. ">
  3328. <div class="lineTitle clineTitle">
  3329. {{
  3330. !unitJson[unitIndex].easy ||
  3331. unitJson[unitIndex].easy == 6 ||
  3332. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3333. -1
  3334. ? "练习内容"
  3335. : "评价内容"
  3336. }}
  3337. </div>
  3338. <!-- <div class="line" style="width: 90%"></div> -->
  3339. </div>
  3340. </div>
  3341. <div class="tools">
  3342. <div class="leftTools" style="width: 100%" v-for="(
  3343. itemTool, toolIndex
  3344. ) in itemTask.toolChoose" :key="toolIndex">
  3345. <div style="
  3346. display: flex;
  3347. flex-direction: row;
  3348. align-items: baseline;
  3349. flex-wrap: nowrap;
  3350. justify-content: flex-start;
  3351. position: relative;
  3352. ">
  3353. <div style="margin-right: 20px; font-weight: bold"
  3354. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3355. 工具 {{ toolIndex + 1 }} :
  3356. </div>
  3357. <div class="chooseWho">
  3358. <div :class="itemTool.toolType == 0
  3359. ? 'isChooseActive'
  3360. : ''
  3361. " @click="
  3362. (itemTool.toolType = 0),
  3363. (itemTool.isFold3 = false),
  3364. $forceUpdate()
  3365. ">
  3366. 互动类
  3367. </div>
  3368. <div :class="itemTool.toolType == 1
  3369. ? 'isChooseActive'
  3370. : ''
  3371. " @click="
  3372. (itemTool.toolType = 1),
  3373. (itemTool.isFold3 = false),
  3374. $forceUpdate()
  3375. ">
  3376. 思维类
  3377. </div>
  3378. <div :class="itemTool.toolType == 6
  3379. ? 'isChooseActive'
  3380. : ''
  3381. " @click="
  3382. (itemTool.toolType = 6),
  3383. (itemTool.isFold3 = false),
  3384. $forceUpdate()
  3385. ">
  3386. 协作类
  3387. </div>
  3388. <div :class="itemTool.toolType == 2
  3389. ? 'isChooseActive'
  3390. : ''
  3391. " @click="
  3392. (itemTool.toolType = 2),
  3393. (itemTool.isFold3 = false),
  3394. $forceUpdate()
  3395. ">
  3396. 测评类
  3397. </div>
  3398. <div :class="itemTool.toolType == 7
  3399. ? 'isChooseActive'
  3400. : ''
  3401. " @click="
  3402. (itemTool.toolType = 7),
  3403. (itemTool.isFold3 = false),
  3404. $forceUpdate()
  3405. ">
  3406. 评价类
  3407. </div>
  3408. <div :class="itemTool.toolType == 3
  3409. ? 'isChooseActive'
  3410. : ''
  3411. " @click="
  3412. (itemTool.toolType = 3),
  3413. (itemTool.isFold3 = false),
  3414. $forceUpdate()
  3415. ">
  3416. 编程类
  3417. </div>
  3418. <div :class="itemTool.toolType == 5
  3419. ? 'isChooseActive'
  3420. : ''
  3421. " @click="
  3422. (itemTool.toolType = 5),
  3423. (itemTool.isFold3 = false),
  3424. $forceUpdate()
  3425. ">
  3426. 学科类
  3427. </div>
  3428. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3429. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3430. 其他
  3431. </div> -->
  3432. </div>
  3433. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3434. margin:
  3435. itemTask.toolChoose.length > 1
  3436. ? '0px 35px 0px auto'
  3437. : '0 0 0 auto',
  3438. }" v-if="itemTask.toolChoose.length > 1">
  3439. <div class="chapter_upload_up2" @click.stop="
  3440. upTool(
  3441. $event,
  3442. unitIndex,
  3443. itemTaskIndex,
  3444. toolIndex
  3445. )
  3446. ">
  3447. 上移
  3448. </div>
  3449. <div class="chapter_upload_down2" @click.stop="
  3450. downTool(
  3451. $event,
  3452. unitIndex,
  3453. itemTaskIndex,
  3454. toolIndex
  3455. )
  3456. ">
  3457. 下移
  3458. </div>
  3459. </div>
  3460. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3461. @click="fold3(itemTaskIndex, toolIndex)"
  3462. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3463. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3464. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3465. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3466. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3467. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3468. v-if="itemTask.toolChoose.length > 1" style="
  3469. position: absolute;
  3470. right: 0;
  3471. top: -5px;
  3472. "></div>
  3473. </div>
  3474. <!-- v-show="!itemTool.isFold3" -->
  3475. <div style="min-height: 163px">
  3476. <div class="toolSort" v-if="itemTool.toolType == 0">
  3477. <!-- <div class="tool">
  3478. <div
  3479. class="whiteBIcon"
  3480. @click="addTools(8, itemTaskIndex, toolIndex)"
  3481. >
  3482. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3483. <div style="margin: 5px 0">素材库</div>
  3484. </div>
  3485. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3486. <img
  3487. src="../../../assets/icon/checkNo.png"
  3488. alt
  3489. v-if="itemTool.tool.indexOf(8) == -1"
  3490. />
  3491. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3492. alt /><span>已选择</span></div>
  3493. </div>
  3494. </div>-->
  3495. <!-- <div class="tool">
  3496. <div
  3497. class="whiteBIcon"
  3498. @click="addTools(17, itemTaskIndex, toolIndex)"
  3499. >
  3500. <img
  3501. src="../../../assets/icon/secondToolList/library.png"
  3502. alt
  3503. />
  3504. <div style="margin: 5px 0">学习资料</div>
  3505. </div>
  3506. <div
  3507. class="check"
  3508. @click="addTools(17, itemTaskIndex, toolIndex)"
  3509. >
  3510. <img
  3511. src="../../../assets/icon/checkNo.png"
  3512. alt
  3513. v-if="itemTool.tool.indexOf(17) == -1"
  3514. />
  3515. <img
  3516. src="../../../assets/icon/checkedIs.png"
  3517. alt
  3518. v-else
  3519. />
  3520. </div>10
  3521. </div> -->
  3522. <div class="tool" :class="{
  3523. isToolChoose:
  3524. itemTool.tool.indexOf(10) != -1,
  3525. }" @click="
  3526. addTools(10, itemTaskIndex, toolIndex)
  3527. ">
  3528. <div class="whiteBIcon" @click.stop="
  3529. openTools(itemTaskIndex, 10, toolIndex)
  3530. ">
  3531. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3532. <div style="margin: 5px 0">倒计时</div>
  3533. </div>
  3534. <div class="noCTool">
  3535. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3536. </div>
  3537. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3538. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3539. </div>
  3540. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3541. <img src="../../../assets/icon/checkNo.png" alt
  3542. v-if="itemTool.tool.indexOf(10) == -1" />
  3543. <div class="checkDiv" v-else>
  3544. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3545. </div>
  3546. </div> -->
  3547. </div>
  3548. <div class="tool" :class="{
  3549. isToolChoose:
  3550. itemTool.tool.indexOf(65) != -1,
  3551. }" @click="
  3552. addTools(65, itemTaskIndex, toolIndex)
  3553. ">
  3554. <div class="whiteBIcon" @click.stop="
  3555. addTools(65, itemTaskIndex, toolIndex)
  3556. ">
  3557. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3558. <div style="margin: 5px 0">挑人</div>
  3559. </div>
  3560. <div class="noCTool">
  3561. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3562. </div>
  3563. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3564. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3565. </div>
  3566. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3567. <img src="../../../assets/icon/checkNo.png" alt
  3568. v-if="itemTool.tool.indexOf(65) == -1" />
  3569. <div class="checkDiv" v-else>
  3570. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3571. </div>
  3572. </div> -->
  3573. </div>
  3574. <!-- <div class="tool">
  3575. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3576. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3577. <div style="margin: 5px 0">学生分组</div>
  3578. </div>
  3579. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3580. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3581. <div class="checkDiv" v-else>
  3582. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3583. </div>
  3584. </div>
  3585. </div> -->
  3586. <!-- <div class="tool">
  3587. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3588. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3589. <div style="margin: 5px 0">交互视频</div>
  3590. </div>
  3591. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3592. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3593. <div class="checkDiv" v-else>
  3594. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3595. </div>
  3596. </div>
  3597. </div> -->
  3598. </div>
  3599. <div class="toolSort" v-if="itemTool.toolType == 1">
  3600. <div class="tool" :class="{
  3601. isToolChoose:
  3602. itemTool.tool.indexOf(7) != -1,
  3603. }" @click="
  3604. addTools(7, itemTaskIndex, toolIndex)
  3605. ">
  3606. <div class="whiteBIcon" @click.stop="
  3607. addTools(7, itemTaskIndex, toolIndex)
  3608. ">
  3609. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3610. <div style="margin: 5px 0">思维网格</div>
  3611. </div>
  3612. <div class="noCTool">
  3613. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3614. </div>
  3615. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3616. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3617. </div>
  3618. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3619. <img src="../../../assets/icon/checkNo.png" alt
  3620. v-if="itemTool.tool.indexOf(7) == -1" />
  3621. <div class="checkDiv" v-else>
  3622. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3623. </div>
  3624. </div> -->
  3625. </div>
  3626. <div class="tool" :class="{
  3627. isToolChoose:
  3628. itemTool.tool.indexOf(1) != -1,
  3629. }" @click="
  3630. addTools(1, itemTaskIndex, toolIndex)
  3631. ">
  3632. <div class="whiteBIcon" @click.stop="
  3633. openTools(itemTaskIndex, 1, toolIndex)
  3634. ">
  3635. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3636. <div style="margin: 5px 0">电子白板</div>
  3637. </div>
  3638. <div class="noCTool">
  3639. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3640. </div>
  3641. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3642. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3643. </div>
  3644. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  3645. <img src="../../../assets/icon/checkNo.png" alt
  3646. v-if="itemTool.tool.indexOf(1) == -1" />
  3647. <div class="checkDiv" v-else>
  3648. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3649. </div>
  3650. </div> -->
  3651. </div>
  3652. <!-- <div class="tool">
  3653. <div
  3654. class="whiteBIcon"
  3655. @click="addTools(2, itemTaskIndex, toolIndex)"
  3656. >
  3657. <img
  3658. src="../../../assets/icon/secondToolList/note.png"
  3659. alt
  3660. />
  3661. <div style="margin: 5px 0">便签</div>
  3662. </div>
  3663. <div
  3664. class="check"
  3665. @click="addTools(2, itemTaskIndex, toolIndex)"
  3666. >
  3667. <img
  3668. src="../../../assets/icon/checkNo.png"
  3669. alt
  3670. v-if="itemTool.tool.indexOf(2) == -1"
  3671. />
  3672. <div class="checkDiv" v-else>
  3673. <img
  3674. src="../../../assets/icon/checkedIs.png"
  3675. alt
  3676. /><span>已选择</span>
  3677. </div>
  3678. </div>
  3679. </div> -->
  3680. <!-- <div class="tool">
  3681. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  3682. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  3683. <div style="margin: 5px 0">协同文档</div>
  3684. </div>
  3685. <div
  3686. class="check"
  3687. @click="addTools(6, itemTaskIndex, toolIndex)"
  3688. >
  3689. <img
  3690. src="../../../assets/icon/checkNo.png"
  3691. alt
  3692. v-if="itemTool.tool.indexOf(6) == -1"
  3693. />
  3694. <div class="checkDiv" v-else>
  3695. <img
  3696. src="../../../assets/icon/checkedIs.png"
  3697. alt
  3698. /><span>已选择</span>
  3699. </div>
  3700. </div>
  3701. </div> -->
  3702. <div class="tool" :class="{
  3703. isToolChoose:
  3704. itemTool.tool.indexOf(52) != -1,
  3705. }" @click="
  3706. addTools(52, itemTaskIndex, toolIndex)
  3707. ">
  3708. <div class="whiteBIcon" @click.stop="
  3709. openTools(itemTaskIndex, 52, toolIndex)
  3710. ">
  3711. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3712. <div style="margin: 5px 0">文档</div>
  3713. </div>
  3714. <div class="noCTool">
  3715. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3716. </div>
  3717. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  3718. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3719. </div>
  3720. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  3721. <img src="../../../assets/icon/checkNo.png" alt
  3722. v-if="itemTool.tool.indexOf(52) == -1" />
  3723. <div class="checkDiv" v-else>
  3724. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3725. </div>
  3726. </div> -->
  3727. </div>
  3728. <div class="tool" :class="{
  3729. isToolChoose:
  3730. itemTool.tool.indexOf(3) != -1,
  3731. }" @click="
  3732. addTools(3, itemTaskIndex, toolIndex)
  3733. ">
  3734. <div class="whiteBIcon" @click.stop="
  3735. openTools(itemTaskIndex, 3, toolIndex)
  3736. ">
  3737. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3738. <div style="margin: 5px 0">思维导图</div>
  3739. </div>
  3740. <div class="noCTool">
  3741. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3742. </div>
  3743. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  3744. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3745. </div>
  3746. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  3747. <img src="../../../assets/icon/checkNo.png" alt
  3748. v-if="itemTool.tool.indexOf(3) == -1" />
  3749. <div class="checkDiv" v-else>
  3750. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3751. </div>
  3752. </div> -->
  3753. </div>
  3754. <div class="tool" :class="{
  3755. isToolChoose:
  3756. itemTool.tool.indexOf(48) != -1,
  3757. }" @click="
  3758. addTools(48, itemTaskIndex, toolIndex)
  3759. ">
  3760. <div class="whiteBIcon" @click.stop="
  3761. openTools(itemTaskIndex, 48, toolIndex)
  3762. ">
  3763. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3764. <div style="margin: 5px 0">表格</div>
  3765. </div>
  3766. <div class="noCTool">
  3767. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3768. </div>
  3769. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  3770. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3771. </div>
  3772. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  3773. <img src="../../../assets/icon/checkNo.png" alt
  3774. v-if="itemTool.tool.indexOf(48) == -1" />
  3775. <div class="checkDiv" v-else>
  3776. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3777. </div>
  3778. </div> -->
  3779. </div>
  3780. </div>
  3781. <div class="toolSort" v-if="itemTool.toolType == 6">
  3782. <div class="tool" :class="{
  3783. isToolChoose:
  3784. itemTool.tool.indexOf(49) != -1,
  3785. }" @click="
  3786. addTools(49, itemTaskIndex, toolIndex)
  3787. ">
  3788. <div class="whiteBIcon" @click.stop="
  3789. openTools(itemTaskIndex, 49, toolIndex)
  3790. ">
  3791. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3792. <div style="margin: 5px 0">学生分组</div>
  3793. </div>
  3794. <div class="noCTool">
  3795. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3796. </div>
  3797. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  3798. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3799. </div>
  3800. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3801. <img src="../../../assets/icon/checkNo.png" alt
  3802. v-if="itemTool.tool.indexOf(49) == -1" />
  3803. <div class="checkDiv" v-else>
  3804. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3805. </div>
  3806. </div> -->
  3807. </div>
  3808. </div>
  3809. <div class="toolSort" v-if="itemTool.toolType == 2">
  3810. <!-- <div class="tool">
  3811. <div
  3812. class="whiteBIcon"
  3813. @click="addTools(5, itemTaskIndex, toolIndex)"
  3814. >
  3815. <img
  3816. src="../../../assets/icon/thirdToolList/score.png"
  3817. alt
  3818. />
  3819. <div style="margin: 5px 0">量规评分</div>
  3820. </div>
  3821. <div
  3822. class="check"
  3823. @click="addTools(5, itemTaskIndex, toolIndex)"
  3824. >
  3825. <img
  3826. src="../../../assets/icon/checkNo.png"
  3827. alt
  3828. v-if="itemTool.tool.indexOf(5) == -1"
  3829. />
  3830. <img
  3831. src="../../../assets/icon/checkedIs.png"
  3832. alt
  3833. v-else
  3834. />
  3835. </div>
  3836. </div>-->
  3837. <div class="tool" :class="{
  3838. isToolChoose:
  3839. itemTool.tool.indexOf(4) != -1,
  3840. }" @click="
  3841. addTools(4, itemTaskIndex, toolIndex)
  3842. ">
  3843. <div class="whiteBIcon" @click.stop="
  3844. openTools(itemTaskIndex, 4, toolIndex)
  3845. ">
  3846. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  3847. <div style="margin: 5px 0">问卷调查</div>
  3848. </div>
  3849. <div class="noCTool">
  3850. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3851. </div>
  3852. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  3853. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3854. </div>
  3855. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  3856. <img src="../../../assets/icon/checkNo.png" alt
  3857. v-if="itemTool.tool.indexOf(4) == -1" />
  3858. <div class="checkDiv" v-else>
  3859. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3860. </div>
  3861. </div> -->
  3862. </div>
  3863. <div class="tool" :class="{
  3864. isToolChoose:
  3865. itemTool.tool.indexOf(45) != -1,
  3866. }" @click="
  3867. addTools(45, itemTaskIndex, toolIndex)
  3868. ">
  3869. <div class="whiteBIcon" @click="
  3870. openTools(itemTaskIndex, 45, toolIndex)
  3871. ">
  3872. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  3873. <div style="margin: 5px 0">选择题</div>
  3874. </div>
  3875. <div class="noCTool">
  3876. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3877. </div>
  3878. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  3879. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3880. </div>
  3881. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  3882. <img src="../../../assets/icon/checkNo.png" alt
  3883. v-if="itemTool.tool.indexOf(45) == -1" />
  3884. <div class="checkDiv" v-else>
  3885. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3886. </div>
  3887. </div> -->
  3888. </div>
  3889. <div class="tool" :class="{
  3890. isToolChoose:
  3891. itemTool.tool.indexOf(15) != -1,
  3892. }" @click="
  3893. addTools(15, itemTaskIndex, toolIndex)
  3894. ">
  3895. <div class="whiteBIcon" @click.stop="
  3896. openTools(itemTaskIndex, 15, toolIndex)
  3897. ">
  3898. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  3899. <div style="margin: 5px 0">问答</div>
  3900. </div>
  3901. <div class="noCTool">
  3902. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3903. </div>
  3904. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  3905. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3906. </div>
  3907. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  3908. <img src="../../../assets/icon/checkNo.png" alt
  3909. v-if="itemTool.tool.indexOf(15) == -1" />
  3910. <div class="checkDiv" v-else>
  3911. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3912. </div>
  3913. </div> -->
  3914. </div>
  3915. <div class="tool" :class="{
  3916. isToolChoose:
  3917. itemTool.tool.indexOf(16) != -1,
  3918. }" @click="
  3919. addTools(16, itemTaskIndex, toolIndex)
  3920. ">
  3921. <div class="whiteBIcon" @click.stop="
  3922. addTools(16, itemTaskIndex, toolIndex)
  3923. ">
  3924. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  3925. <div style="margin: 5px 0">作业提交</div>
  3926. </div>
  3927. <div class="noCTool">
  3928. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3929. </div>
  3930. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  3931. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3932. </div>
  3933. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  3934. <img src="../../../assets/icon/checkNo.png" alt
  3935. v-if="itemTool.tool.indexOf(16) == -1" />
  3936. <div class="checkDiv" v-else>
  3937. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3938. </div>
  3939. </div> -->
  3940. </div>
  3941. <div class="tool" :class="{
  3942. isToolChoose:
  3943. itemTool.tool.indexOf(50) != -1,
  3944. }" @click="
  3945. addTools(50, itemTaskIndex, toolIndex)
  3946. ">
  3947. <div class="whiteBIcon" @click.stop="
  3948. addTools(50, itemTaskIndex, toolIndex)
  3949. ">
  3950. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  3951. <div style="margin: 5px 0">批量上传</div>
  3952. </div>
  3953. <div class="noCTool">
  3954. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3955. </div>
  3956. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  3957. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3958. </div>
  3959. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  3960. <img src="../../../assets/icon/checkNo.png" alt
  3961. v-if="itemTool.tool.indexOf(50) == -1" />
  3962. <div class="checkDiv" v-else>
  3963. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3964. </div>
  3965. </div> -->
  3966. </div>
  3967. <!-- <div class="tool">
  3968. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  3969. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  3970. <div style="margin: 5px 0">个人评价</div>
  3971. </div>
  3972. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  3973. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  3974. <div class="checkDiv" v-else>
  3975. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3976. </div>
  3977. </div>
  3978. </div> -->
  3979. <div class="tool" :class="{
  3980. isToolChoose:
  3981. itemTool.tool.indexOf(41) != -1,
  3982. }" @click="
  3983. addTools(41, itemTaskIndex, toolIndex)
  3984. ">
  3985. <div class="whiteBIcon" @click.stop="
  3986. openTools(itemTaskIndex, 41, toolIndex)
  3987. ">
  3988. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  3989. <div style="margin: 5px 0">选择匹配</div>
  3990. </div>
  3991. <div class="noCTool">
  3992. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3993. </div>
  3994. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  3995. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3996. </div>
  3997. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  3998. <img src="../../../assets/icon/checkNo.png" alt
  3999. v-if="itemTool.tool.indexOf(41) == -1" />
  4000. <div class="checkDiv" v-else>
  4001. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4002. </div>
  4003. </div> -->
  4004. </div>
  4005. <div class="tool" :class="{
  4006. isToolChoose:
  4007. itemTool.tool.indexOf(47) != -1,
  4008. }" @click="
  4009. addTools(47, itemTaskIndex, toolIndex)
  4010. ">
  4011. <div class="whiteBIcon" @click.stop="
  4012. openTools(itemTaskIndex, 47, toolIndex)
  4013. ">
  4014. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4015. <div style="margin: 5px 0">排序</div>
  4016. </div>
  4017. <div class="noCTool">
  4018. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4019. </div>
  4020. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4021. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4022. </div>
  4023. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4024. <img src="../../../assets/icon/checkNo.png" alt
  4025. v-if="itemTool.tool.indexOf(47) == -1" />
  4026. <div class="checkDiv" v-else>
  4027. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4028. </div>
  4029. </div> -->
  4030. </div>
  4031. <!-- <div class="tool">
  4032. <div
  4033. class="whiteBIcon"
  4034. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4035. >
  4036. <img
  4037. src="../../../assets/icon/thirdToolList/mp3.png"
  4038. alt
  4039. />
  4040. <div style="margin: 5px 0">上传音频</div>
  4041. </div>
  4042. <div
  4043. class="check"
  4044. @click="addTools(42, itemTaskIndex, toolIndex)"
  4045. >
  4046. <img
  4047. src="../../../assets/icon/checkNo.png"
  4048. alt
  4049. v-if="itemTool.tool.indexOf(42) == -1"
  4050. />
  4051. <img
  4052. src="../../../assets/icon/checkedIs.png"
  4053. alt
  4054. v-else
  4055. />
  4056. </div>
  4057. </div> -->
  4058. </div>
  4059. <div class="toolSort" v-if="itemTool.toolType == 3">
  4060. <div class="tool" :class="{
  4061. isToolChoose:
  4062. itemTool.tool.indexOf(18) != -1,
  4063. }" @click="
  4064. addTools(18, itemTaskIndex, toolIndex)
  4065. ">
  4066. <div class="whiteBIcon" @click.stop="
  4067. addTools(18, itemTaskIndex, toolIndex)
  4068. ">
  4069. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4070. <div style="margin: 5px 0">训练平台</div>
  4071. </div>
  4072. <div class="noCTool">
  4073. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4074. </div>
  4075. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4076. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4077. </div>
  4078. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4079. <img src="../../../assets/icon/checkNo.png" alt
  4080. v-if="itemTool.tool.indexOf(18) == -1" />
  4081. <div class="checkDiv" v-else>
  4082. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4083. </div>
  4084. </div> -->
  4085. </div>
  4086. <div class="tool" :class="{
  4087. isToolChoose:
  4088. itemTool.tool.indexOf(21) != -1,
  4089. }" @click="
  4090. addTools(21, itemTaskIndex, toolIndex)
  4091. ">
  4092. <div class="whiteBIcon" @click.stop="
  4093. addTools(21, itemTaskIndex, toolIndex)
  4094. ">
  4095. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4096. <div style="margin: 5px 0">
  4097. AIoT Blockly
  4098. </div>
  4099. </div>
  4100. <div class="noCTool">
  4101. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4102. </div>
  4103. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4104. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4105. </div>
  4106. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4107. <img src="../../../assets/icon/checkNo.png" alt
  4108. v-if="itemTool.tool.indexOf(21) == -1" />
  4109. <div class="checkDiv" v-else>
  4110. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4111. </div>
  4112. </div> -->
  4113. </div>
  4114. <!-- <div class="tool">
  4115. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4116. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4117. <div style="margin: 5px 0">AI体验</div>
  4118. </div>
  4119. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4120. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4121. <div class="checkDiv" v-else>
  4122. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4123. </div>
  4124. </div>
  4125. </div> -->
  4126. <div class="tool" :class="{
  4127. isToolChoose:
  4128. itemTool.tool.indexOf(23) != -1,
  4129. }" @click="
  4130. addTools(23, itemTaskIndex, toolIndex)
  4131. ">
  4132. <div class="whiteBIcon" @click.stop="
  4133. addTools(23, itemTaskIndex, toolIndex)
  4134. ">
  4135. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4136. <div style="margin: 5px 0">AI Python</div>
  4137. </div>
  4138. <div class="noCTool">
  4139. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4140. </div>
  4141. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4142. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4143. </div>
  4144. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4145. <img src="../../../assets/icon/checkNo.png" alt
  4146. v-if="itemTool.tool.indexOf(23) == -1" />
  4147. <div class="checkDiv" v-else>
  4148. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4149. </div>
  4150. </div> -->
  4151. </div>
  4152. <div class="tool" :class="{
  4153. isToolChoose:
  4154. itemTool.tool.indexOf(24) != -1,
  4155. }" @click="
  4156. addTools(24, itemTaskIndex, toolIndex)
  4157. ">
  4158. <div class="whiteBIcon" @click.stop="
  4159. addTools(24, itemTaskIndex, toolIndex)
  4160. ">
  4161. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4162. <div style="margin: 5px 0">
  4163. AI Blockly
  4164. </div>
  4165. </div>
  4166. <div class="noCTool">
  4167. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4168. </div>
  4169. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4170. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4171. </div>
  4172. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4173. <img src="../../../assets/icon/checkNo.png" alt
  4174. v-if="itemTool.tool.indexOf(24) == -1" />
  4175. <div class="checkDiv" v-else>
  4176. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4177. </div>
  4178. </div> -->
  4179. </div>
  4180. <div class="tool" :class="{
  4181. isToolChoose:
  4182. itemTool.tool.indexOf(32) != -1,
  4183. }" @click="
  4184. addTools(32, itemTaskIndex, toolIndex)
  4185. ">
  4186. <div class="whiteBIcon" @click.stop="
  4187. addTools(32, itemTaskIndex, toolIndex)
  4188. ">
  4189. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4190. <div style="margin: 5px 0">源码编辑</div>
  4191. </div>
  4192. <div class="noCTool">
  4193. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4194. </div>
  4195. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4196. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4197. </div>
  4198. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4199. <img src="../../../assets/icon/checkNo.png" alt
  4200. v-if="itemTool.tool.indexOf(32) == -1" />
  4201. <div class="checkDiv" v-else>
  4202. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4203. </div>
  4204. </div> -->
  4205. </div>
  4206. <div class="tool" :class="{
  4207. isToolChoose:
  4208. itemTool.tool.indexOf(57) != -1,
  4209. }" @click="
  4210. addTools(57, itemTaskIndex, toolIndex)
  4211. ">
  4212. <div class="whiteBIcon" @click.stop="
  4213. openTools(itemTaskIndex, 57, toolIndex)
  4214. ">
  4215. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4216. <div style="margin: 5px 0">CocoPi</div>
  4217. </div>
  4218. <div class="noCTool">
  4219. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4220. </div>
  4221. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4222. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4223. </div>
  4224. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4225. <img src="../../../assets/icon/checkNo.png" alt
  4226. v-if="itemTool.tool.indexOf(57) == -1" />
  4227. <div class="checkDiv" v-else>
  4228. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4229. </div>
  4230. </div> -->
  4231. </div>
  4232. <div class="tool" :class="{
  4233. isToolChoose:
  4234. itemTool.tool.indexOf(63) != -1,
  4235. }" @click="
  4236. addTools(63, itemTaskIndex, toolIndex)
  4237. ">
  4238. <div class="whiteBIcon" @click.stop="
  4239. addTools(63, itemTaskIndex, toolIndex)
  4240. ">
  4241. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4242. <div style="margin: 5px 0">海龟编程</div>
  4243. </div>
  4244. <div class="noCTool">
  4245. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4246. </div>
  4247. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4248. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4249. </div>
  4250. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4251. <img src="../../../assets/icon/checkNo.png" alt
  4252. v-if="itemTool.tool.indexOf(63) == -1" />
  4253. <div class="checkDiv" v-else>
  4254. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4255. </div>
  4256. </div> -->
  4257. </div>
  4258. <div class="tool" :class="{
  4259. isToolChoose:
  4260. itemTool.tool.indexOf(71) != -1,
  4261. }" @click="
  4262. addTools(71, itemTaskIndex, toolIndex)
  4263. ">
  4264. <div class="whiteBIcon" @click.stop="
  4265. addTools(71, itemTaskIndex, toolIndex)
  4266. ">
  4267. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4268. <div style="margin: 5px 0">AI智能体</div>
  4269. </div>
  4270. <div class="noCTool">
  4271. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4272. </div>
  4273. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4274. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4275. </div>
  4276. </div>
  4277. </div>
  4278. <div class="toolSort" v-if="itemTool.toolType == 7">
  4279. <div class="tool" :class="{
  4280. isToolChoose:
  4281. itemTool.tool.indexOf(40) != -1,
  4282. }" @click.stop="
  4283. addTools(40, itemTaskIndex, toolIndex)
  4284. ">
  4285. <div class="whiteBIcon" @click.stop="
  4286. openTools(itemTaskIndex, 40, toolIndex)
  4287. ">
  4288. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4289. <div style="margin: 5px 0">个人评价</div>
  4290. </div>
  4291. <div class="noCTool">
  4292. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4293. </div>
  4294. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4295. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4296. </div>
  4297. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4298. <img src="../../../assets/icon/checkNo.png" alt
  4299. v-if="itemTool.tool.indexOf(40) == -1" />
  4300. <div class="checkDiv" v-else>
  4301. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4302. </div>
  4303. </div> -->
  4304. </div>
  4305. </div>
  4306. <div class="toolSort" v-if="itemTool.toolType == 5">
  4307. <div class="tool" :class="{
  4308. isToolChoose:
  4309. itemTool.tool.indexOf(28) != -1,
  4310. }" @click="
  4311. addTools(28, itemTaskIndex, toolIndex)
  4312. ">
  4313. <div class="whiteBIcon" @click.stop="
  4314. addTools(28, itemTaskIndex, toolIndex)
  4315. ">
  4316. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4317. <div style="margin: 5px 0">翻译</div>
  4318. </div>
  4319. <div class="noCTool">
  4320. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4321. </div>
  4322. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4323. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4324. </div>
  4325. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4326. <img src="../../../assets/icon/checkNo.png" alt
  4327. v-if="itemTool.tool.indexOf(28) == -1" />
  4328. <div class="checkDiv" v-else>
  4329. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4330. </div>
  4331. </div> -->
  4332. </div>
  4333. <div class="tool" :class="{
  4334. isToolChoose:
  4335. itemTool.tool.indexOf(31) != -1,
  4336. }" @click="
  4337. addTools(31, itemTaskIndex, toolIndex)
  4338. ">
  4339. <div class="whiteBIcon" @click.stop="
  4340. addTools(31, itemTaskIndex, toolIndex)
  4341. ">
  4342. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4343. <div style="margin: 5px 0">数字画板</div>
  4344. </div>
  4345. <div class="noCTool">
  4346. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4347. </div>
  4348. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4349. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4350. </div>
  4351. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4352. <img src="../../../assets/icon/checkNo.png" alt
  4353. v-if="itemTool.tool.indexOf(31) == -1" />
  4354. <div class="checkDiv" v-else>
  4355. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4356. </div>
  4357. </div> -->
  4358. </div>
  4359. <div class="tool" :class="{
  4360. isToolChoose:
  4361. itemTool.tool.indexOf(39) != -1,
  4362. }" @click="
  4363. addTools(39, itemTaskIndex, toolIndex)
  4364. ">
  4365. <div class="whiteBIcon" @click.stop="
  4366. addTools(39, itemTaskIndex, toolIndex)
  4367. ">
  4368. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4369. <div style="margin: 5px 0">GeoGebra</div>
  4370. </div>
  4371. <div class="noCTool">
  4372. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4373. </div>
  4374. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4375. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4376. </div>
  4377. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4378. <img src="../../../assets/icon/checkNo.png" alt
  4379. v-if="itemTool.tool.indexOf(39) == -1" />
  4380. <div class="checkDiv" v-else>
  4381. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4382. </div>
  4383. </div> -->
  4384. </div>
  4385. <div class="tool" :class="{
  4386. isToolChoose:
  4387. itemTool.tool.indexOf(66) != -1,
  4388. }" @click="
  4389. addTools(66, itemTaskIndex, toolIndex)
  4390. ">
  4391. <div class="whiteBIcon" @click.stop="
  4392. addTools(66, itemTaskIndex, toolIndex)
  4393. ">
  4394. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4395. <div style="margin: 5px 0">公式编辑</div>
  4396. </div>
  4397. <div class="noCTool">
  4398. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4399. </div>
  4400. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4401. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4402. </div>
  4403. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4404. <img src="../../../assets/icon/checkNo.png" alt
  4405. v-if="itemTool.tool.indexOf(66) == -1" />
  4406. <div class="checkDiv" v-else>
  4407. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4408. </div>
  4409. </div> -->
  4410. </div>
  4411. <!-- <div class="tool">
  4412. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4413. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4414. <div style="margin: 5px 0">分子结构</div>
  4415. </div>
  4416. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4417. <img src="../../../assets/icon/checkNo.png" alt
  4418. v-if="itemTool.tool.indexOf(67) == -1" />
  4419. <div class="checkDiv" v-else>
  4420. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4421. </div>
  4422. </div>
  4423. </div> -->
  4424. <div class="tool" :class="{
  4425. isToolChoose:
  4426. itemTool.tool.indexOf(68) != -1,
  4427. }" @click="
  4428. addTools(68, itemTaskIndex, toolIndex)
  4429. ">
  4430. <div class="whiteBIcon" @click.stop="
  4431. addTools(68, itemTaskIndex, toolIndex)
  4432. ">
  4433. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4434. <div style="margin: 5px 0">时间轴</div>
  4435. </div>
  4436. <div class="noCTool">
  4437. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4438. </div>
  4439. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4440. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4441. </div>
  4442. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4443. <img src="../../../assets/icon/checkNo.png" alt
  4444. v-if="itemTool.tool.indexOf(68) == -1" />
  4445. <div class="checkDiv" v-else>
  4446. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4447. </div>
  4448. </div> -->
  4449. </div>
  4450. <div class="tool" :class="{
  4451. isToolChoose:
  4452. itemTool.tool.indexOf(69) != -1,
  4453. }" @click="
  4454. addTools(69, itemTaskIndex, toolIndex)
  4455. ">
  4456. <div class="whiteBIcon" @click.stop="
  4457. openTools(itemTaskIndex, 69, toolIndex)
  4458. ">
  4459. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4460. <div style="margin: 5px 0">英语写作</div>
  4461. </div>
  4462. <div class="noCTool">
  4463. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4464. </div>
  4465. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4466. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4467. </div>
  4468. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4469. <img src="../../../assets/icon/checkNo.png" alt
  4470. v-if="itemTool.tool.indexOf(4) == -1" />
  4471. <div class="checkDiv" v-else>
  4472. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4473. </div>
  4474. </div> -->
  4475. </div>
  4476. <div class="tool" :class="{
  4477. isToolChoose:
  4478. itemTool.tool.indexOf(70) != -1,
  4479. }" @click="
  4480. addTools(70, itemTaskIndex, toolIndex)
  4481. ">
  4482. <div class="whiteBIcon" @click.stop="
  4483. openTools(itemTaskIndex, 70, toolIndex)
  4484. ">
  4485. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4486. <div style="margin: 5px 0">英语口语</div>
  4487. </div>
  4488. <div class="noCTool">
  4489. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4490. </div>
  4491. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4492. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4493. </div>
  4494. </div>
  4495. <!-- <div class="tool">
  4496. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4497. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4498. <div style="margin: 5px 0">翻译</div>
  4499. </div>
  4500. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4501. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4502. <div class="checkDiv" v-else>
  4503. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4504. </div>
  4505. </div>
  4506. </div>
  4507. <div class="tool">
  4508. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4509. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4510. <div style="margin: 5px 0">魔盒识字</div>
  4511. </div>
  4512. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4513. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4514. <div class="checkDiv" v-else>
  4515. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4516. </div>
  4517. </div>
  4518. </div>
  4519. <div class="tool">
  4520. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4521. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4522. <div style="margin: 5px 0">24点</div>
  4523. </div>
  4524. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4525. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4526. <div class="checkDiv" v-else>
  4527. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4528. </div>
  4529. </div>
  4530. </div>
  4531. <div class="tool">
  4532. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4533. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4534. <div style="margin: 5px 0">数学画板</div>
  4535. </div>
  4536. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4537. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4538. <div class="checkDiv" v-else>
  4539. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4540. </div>
  4541. </div>
  4542. </div>
  4543. <div class="tool">
  4544. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4545. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4546. <div style="margin: 5px 0">GeoGebra</div>
  4547. </div>
  4548. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4549. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4550. <div class="checkDiv" v-else>
  4551. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4552. </div>
  4553. </div>
  4554. </div>
  4555. <div class="tool">
  4556. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4557. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4558. <div style="margin: 5px 0">模拟驾驶</div>
  4559. </div>
  4560. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4561. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4562. <div class="checkDiv" v-else>
  4563. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4564. </div>
  4565. </div>
  4566. </div>
  4567. <div class="tool">
  4568. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4569. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4570. <div style="margin: 5px 0">路径搜索</div>
  4571. </div>
  4572. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4573. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4574. <div class="checkDiv" v-else>
  4575. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4576. </div>
  4577. </div>
  4578. </div>
  4579. <div class="tool">
  4580. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4581. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4582. <div style="margin: 5px 0">深度学习</div>
  4583. </div>
  4584. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4585. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4586. <div class="checkDiv" v-else>
  4587. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4588. </div>
  4589. </div>
  4590. </div>
  4591. <div class="tool">
  4592. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4593. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4594. <div style="margin: 5px 0">全历史</div>
  4595. </div>
  4596. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4597. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4598. <div class="checkDiv" v-else>
  4599. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4600. </div>
  4601. </div>
  4602. </div>
  4603. </div>
  4604. <div class="toolSort" v-if="itemTool.toolType == 4">
  4605. <div class="tool">
  4606. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4607. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4608. <div style="margin: 5px 0">课程设计</div>
  4609. </div>
  4610. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4611. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4612. <div class="checkDiv" v-else>
  4613. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4614. </div>
  4615. </div>
  4616. </div>
  4617. <div class="tool">
  4618. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4619. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4620. <div style="margin: 5px 0">目标管理</div>
  4621. </div>
  4622. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4623. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4624. <div class="checkDiv" v-else>
  4625. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4626. </div>
  4627. </div>
  4628. </div> -->
  4629. <!-- <div class="tool">
  4630. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4631. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4632. <div style="margin: 5px 0">汉字宫</div>
  4633. </div>
  4634. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4635. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4636. <div class="checkDiv" v-else>
  4637. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4638. </div>
  4639. </div>
  4640. </div> -->
  4641. </div>
  4642. </div>
  4643. <!-- v-show="!itemTool.isFold3" -->
  4644. <div class="op_tool_box"
  4645. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4646. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  4647. class="binfo_input" style="
  4648. margin: 0 0 20px 0;
  4649. width: 100% !important;
  4650. " v-model="itemTool.toolDetail"></textarea>
  4651. <div class="op_box">
  4652. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  4653. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4654. <div class="r_pub_button_op"
  4655. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  4656. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  4657. 智能优化</div>
  4658.                              
  4659. </el-tooltip>
  4660. </div>
  4661. </div>
  4662. </div>
  4663. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  4664. <div class="addToolImg">
  4665. <img src="../../../assets/icon/add.png" alt />
  4666. </div>
  4667. <div>添加工具</div>
  4668. </div> -->
  4669. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  4670. margin: 0 auto;
  4671. padding: 0 30px;
  4672. height: 45px;
  4673. ">
  4674. 添加工具
  4675. </button>
  4676. </div>
  4677. </div>
  4678. <div v-else-if="
  4679. unitJson[unitIndex].easy == 2 ||
  4680. unitJson[unitIndex].easy == 4
  4681. " class="toolChoose" style="padding: 0 0 40px">
  4682. <div class="tools">
  4683. <div class="leftTools" style="width: 100%" v-for="(
  4684. itemTool, toolIndex
  4685. ) in itemTask.toolChoose" :key="toolIndex">
  4686. <div>
  4687. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  4688. margin: 0 0 20px 0;
  4689. width: 100% !important;
  4690. " v-model="itemTool.toolDetail"></textarea>
  4691. </div>
  4692. <div style="
  4693. display: flex;
  4694. flex-direction: row;
  4695. align-items: baseline;
  4696. flex-wrap: nowrap;
  4697. justify-content: flex-start;
  4698. position: relative;
  4699. ">
  4700. <div style="margin-right: 20px; font-weight: bold"
  4701. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4702. 工具 {{ toolIndex + 1 }} :
  4703. </div>
  4704. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4705. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  4706. </div>
  4707. <div style="min-height: 163px">
  4708. <div class="toolSort">
  4709. <div class="tool">
  4710. <div class="whiteBIcon" @click="
  4711. openTools(itemTaskIndex, 1, toolIndex)
  4712. ">
  4713. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4714. <div style="margin: 5px 0">电子白板</div>
  4715. </div>
  4716. <div class="check" @click="
  4717. addTools(1, itemTaskIndex, toolIndex)
  4718. ">
  4719. <img src="../../../assets/icon/checkNo.png" alt
  4720. v-if="itemTool.tool.indexOf(1) == -1" />
  4721. <div class="checkDiv" v-else>
  4722. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4723. </div>
  4724. </div>
  4725. </div>
  4726. <div class="tool">
  4727. <div class="whiteBIcon" @click="
  4728. openTools(itemTaskIndex, 52, toolIndex)
  4729. ">
  4730. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4731. <div style="margin: 5px 0">文档</div>
  4732. </div>
  4733. <div class="check" @click="
  4734. addTools(52, itemTaskIndex, toolIndex)
  4735. ">
  4736. <img src="../../../assets/icon/checkNo.png" alt
  4737. v-if="itemTool.tool.indexOf(52) == -1" />
  4738. <div class="checkDiv" v-else>
  4739. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4740. </div>
  4741. </div>
  4742. </div>
  4743. <div class="tool">
  4744. <div class="whiteBIcon" @click="
  4745. openTools(itemTaskIndex, 3, toolIndex)
  4746. ">
  4747. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4748. <div style="margin: 5px 0">思维导图</div>
  4749. </div>
  4750. <div class="check" @click="
  4751. addTools(3, itemTaskIndex, toolIndex)
  4752. ">
  4753. <img src="../../../assets/icon/checkNo.png" alt
  4754. v-if="itemTool.tool.indexOf(3) == -1" />
  4755. <div class="checkDiv" v-else>
  4756. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4757. </div>
  4758. </div>
  4759. </div>
  4760. <div class="tool">
  4761. <div class="whiteBIcon" @click="
  4762. openTools(itemTaskIndex, 4, toolIndex)
  4763. ">
  4764. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4765. <div style="margin: 5px 0">问卷调查</div>
  4766. </div>
  4767. <div class="check" @click="
  4768. addTools(4, itemTaskIndex, toolIndex)
  4769. ">
  4770. <img src="../../../assets/icon/checkNo.png" alt
  4771. v-if="itemTool.tool.indexOf(4) == -1" />
  4772. <div class="checkDiv" v-else>
  4773. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4774. </div>
  4775. </div>
  4776. </div>
  4777. <div class="tool">
  4778. <div class="whiteBIcon" @click="
  4779. openTools(itemTaskIndex, 45, toolIndex)
  4780. ">
  4781. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4782. <div style="margin: 5px 0">选择题</div>
  4783. </div>
  4784. <div class="check" @click="
  4785. addTools(45, itemTaskIndex, toolIndex)
  4786. ">
  4787. <img src="../../../assets/icon/checkNo.png" alt
  4788. v-if="itemTool.tool.indexOf(45) == -1" />
  4789. <div class="checkDiv" v-else>
  4790. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4791. </div>
  4792. </div>
  4793. </div>
  4794. <div class="tool">
  4795. <div class="whiteBIcon" @click="
  4796. openTools(itemTaskIndex, 15, toolIndex)
  4797. ">
  4798. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4799. <div style="margin: 5px 0">问答</div>
  4800. </div>
  4801. <div class="check" @click="
  4802. addTools(15, itemTaskIndex, toolIndex)
  4803. ">
  4804. <img src="../../../assets/icon/checkNo.png" alt
  4805. v-if="itemTool.tool.indexOf(15) == -1" />
  4806. <div class="checkDiv" v-else>
  4807. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4808. </div>
  4809. </div>
  4810. </div>
  4811. <div class="tool">
  4812. <div class="whiteBIcon" @click="
  4813. addTools(16, itemTaskIndex, toolIndex)
  4814. ">
  4815. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4816. <div style="margin: 5px 0">作业提交</div>
  4817. </div>
  4818. <div class="check" @click="
  4819. addTools(16, itemTaskIndex, toolIndex)
  4820. ">
  4821. <img src="../../../assets/icon/checkNo.png" alt
  4822. v-if="itemTool.tool.indexOf(16) == -1" />
  4823. <div class="checkDiv" v-else>
  4824. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4825. </div>
  4826. </div>
  4827. </div>
  4828. <div class="tool">
  4829. <div class="whiteBIcon" @click="
  4830. openTools(itemTaskIndex, 50, toolIndex)
  4831. ">
  4832. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4833. <div style="margin: 5px 0">批量上传</div>
  4834. </div>
  4835. <div class="check" @click="
  4836. addTools(50, itemTaskIndex, toolIndex)
  4837. ">
  4838. <img src="../../../assets/icon/checkNo.png" alt
  4839. v-if="itemTool.tool.indexOf(50) == -1" />
  4840. <div class="checkDiv" v-else>
  4841. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4842. </div>
  4843. </div>
  4844. </div>
  4845. <div class="tool">
  4846. <div class="whiteBIcon" @click="
  4847. openTools(itemTaskIndex, 41, toolIndex)
  4848. ">
  4849. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4850. <div style="margin: 5px 0">选择匹配</div>
  4851. </div>
  4852. <div class="check" @click="
  4853. addTools(41, itemTaskIndex, toolIndex)
  4854. ">
  4855. <img src="../../../assets/icon/checkNo.png" alt
  4856. v-if="itemTool.tool.indexOf(41) == -1" />
  4857. <div class="checkDiv" v-else>
  4858. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4859. </div>
  4860. </div>
  4861. </div>
  4862. <div class="tool">
  4863. <div class="whiteBIcon" @click="
  4864. openTools(itemTaskIndex, 47, toolIndex)
  4865. ">
  4866. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4867. <div style="margin: 5px 0">排序</div>
  4868. </div>
  4869. <div class="check" @click="
  4870. addTools(47, itemTaskIndex, toolIndex)
  4871. ">
  4872. <img src="../../../assets/icon/checkNo.png" alt
  4873. v-if="itemTool.tool.indexOf(47) == -1" />
  4874. <div class="checkDiv" v-else>
  4875. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4876. </div>
  4877. </div>
  4878. </div>
  4879. <div class="tool">
  4880. <div class="whiteBIcon" @click="
  4881. openTools(itemTaskIndex, 48, toolIndex)
  4882. ">
  4883. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4884. <div style="margin: 5px 0">表格</div>
  4885. </div>
  4886. <div class="check" @click="
  4887. addTools(48, itemTaskIndex, toolIndex)
  4888. ">
  4889. <img src="../../../assets/icon/checkNo.png" alt
  4890. v-if="itemTool.tool.indexOf(48) == -1" />
  4891. <div class="checkDiv" v-else>
  4892. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4893. </div>
  4894. </div>
  4895. </div>
  4896. </div>
  4897. </div>
  4898. </div>
  4899. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  4900. <div class="addToolImg">
  4901. <img src="../../../assets/icon/add.png" alt />
  4902. </div>
  4903. <div>添加工具</div>
  4904. </div> -->
  4905. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  4906. style="margin: 35px auto 20px">
  4907. 添加工具
  4908. </button>
  4909. </div>
  4910. </div>
  4911. <div v-else-if="
  4912. unitJson[unitIndex].easy == 1 ||
  4913. (unitJson[unitIndex].easy == 5 &&
  4914. itemTask.taskType == 2)
  4915. " class="toolChoose" style="padding: 0 0 40px">
  4916. <div class="tools">
  4917. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  4918. itemTool, toolIndex
  4919. ) in itemTask.toolChoose" :key="toolIndex">
  4920. <div style="min-height: 163px">
  4921. <div class="toolSort">
  4922. <div class="tool">
  4923. <div class="whiteBIcon" @click="
  4924. openTools(itemTaskIndex, 50, toolIndex)
  4925. ">
  4926. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4927. <div style="margin: 5px 0">批量上传</div>
  4928. </div>
  4929. <div class="check" @click="
  4930. addTools(50, itemTaskIndex, toolIndex)
  4931. ">
  4932. <img src="../../../assets/icon/checkNo.png" alt
  4933. v-if="itemTool.tool.indexOf(50) == -1" />
  4934. <div class="checkDiv" v-else>
  4935. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4936. </div>
  4937. </div>
  4938. </div>
  4939. </div>
  4940. </div>
  4941. </div>
  4942. </div>
  4943. </div>
  4944. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  4945. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])" element-loading-text="小可正在努力生成中,请稍等...">
  4946. <div class="elist_title">
  4947. <div style="
  4948. display: flex;
  4949. flex-direction: row;
  4950. align-items: center;
  4951. margin: 20px 0;
  4952. ">
  4953. <div class="lineTitle clineTitle">评价设置</div>
  4954. <div style="margin-left:auto;display: flex;">
  4955. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4956. <div class="r_pub_button_op"
  4957. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  4958. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  4959. </el-tooltip>
  4960. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4961. <div class="r_pub_button_op" style="margin-left:10px;"
  4962. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  4963. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  4964. </el-tooltip>
  4965. </div>
  4966. <!-- <div class="line" style="width: 90%"></div> -->
  4967. </div>
  4968. </div>
  4969. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  4970. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  4971. 上传补充资料
  4972. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  4973. beforeUploadInfo2(
  4974. $event,
  4975. 18,
  4976. itemTaskIndex
  4977. )
  4978. " />
  4979. </button>
  4980. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  4981. <div class="add_chapters_box add_c_none" v-if="
  4982. pingjiaInfoData[itemTaskIndex] &&
  4983. pingjiaInfoData[itemTaskIndex].length == 0
  4984. ">
  4985. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  4986. </div>
  4987. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  4988. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  4989. getChapterData(
  4990. $event,
  4991. index1,
  4992. item1.type
  4993. )
  4994. " >
  4995. <div class="chapter_upload_o" style="
  4996. position: relative;
  4997. display: flex;
  4998. align-items: center;
  4999. ">
  5000. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5001. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5002. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5003. </div>
  5004. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5005. </div>
  5006. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5007. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5008. </div>
  5009. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5010. </div>
  5011. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5012. </div>
  5013. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5014. </div>
  5015. </div>
  5016. <div class="chapter_upload_n">
  5017. <input readonly="true" v-if="
  5018. item1.type == 2 ||
  5019. item1.type == 3 ||
  5020. item1.type == 12 ||
  5021. item1.type == 13 ||
  5022. item1.type == 7
  5023. " :placeholder="item1.name" @click.stop="
  5024. checkChpater3($event, index1, item1)
  5025. " style="
  5026. border: none;
  5027. outline: none;
  5028. width: 80%;
  5029. minwidth: 215px;
  5030. z-index: 99;
  5031. font-size: 14px;
  5032. white-space: nowrap;
  5033. overflow: hidden;
  5034. text-overflow: ellipsis;
  5035. " />
  5036. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5037. border: none;
  5038. outline: none;
  5039. width: 80%;
  5040. white-space: nowrap;
  5041. overflow: hidden;
  5042. text-overflow: ellipsis;
  5043. " readonly="true" @click="
  5044. selectAttText(index1)
  5045. " />
  5046. <input :placeholder="item1.title ? item1.title : '链接'
  5047. " v-if="item1.type == 8" style="
  5048. border: none;
  5049. outline: none;
  5050. width: 80%;
  5051. white-space: nowrap;
  5052. overflow: hidden;
  5053. text-overflow: ellipsis;
  5054. " readonly="true" @click="selectLine(index1)" />
  5055. <input :placeholder="item1.title ? item1.title : '链接'
  5056. " v-if="item1.type == 14" style="
  5057. border: none;
  5058. outline: none;
  5059. width: 80%;
  5060. white-space: nowrap;
  5061. overflow: hidden;
  5062. text-overflow: ellipsis;
  5063. " readonly="true" @click="
  5064. openUpdateSource(index1)
  5065. " />
  5066. </div>
  5067. <div class="chapter_upload_ic">
  5068. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5069. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5070. checkChpater3($event, index1, item1)
  5071. ">
  5072. <div></div>
  5073. </div>
  5074. <div class="chapter_upload_ic_r" @click.stop="
  5075. deletepingjiaInfoData(
  5076. $event,
  5077. index1,
  5078. itemTaskIndex
  5079. )
  5080. ">
  5081. <div></div>
  5082. </div>
  5083. </div>
  5084. </div>
  5085. </div>
  5086. </div>
  5087. </div>
  5088. <div v-if="
  5089. pingjiainfoproVisible[itemTaskIndex]
  5090. " class="mask">
  5091. <div class="progressBox">
  5092. <div class="lbox">
  5093. <img src="../../../assets/loading.gif" />上传中,请稍后
  5094. </div>
  5095. <div style="margin-bottom: 10px">
  5096. <span>{{
  5097. pingjiainfoisFinishSize[itemTaskIndex]
  5098. }}</span>
  5099. /
  5100. <span>{{
  5101. pingjiainfoisAllSize[itemTaskIndex]
  5102. }}</span>
  5103. </div>
  5104. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5105. ? pingjiainfoprogress[itemTaskIndex]
  5106. : 0
  5107. " style="width: 80%"></el-progress> -->
  5108. </div>
  5109. </div>
  5110. </div>
  5111. <div class="mbCss">
  5112. <div class="pjCss" :style="{
  5113. width: itemTask.isEvaFold
  5114. ? 'calc(100% - 55%)'
  5115. : 'calc(100% - 120px)',
  5116. }">
  5117. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5118. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5119. <div class="elist_inptu_text">
  5120. <span>目标:</span>
  5121. <!-- <span>核心素养:</span> -->
  5122. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  5123. <el-switch
  5124. @change="forceUpdate"
  5125. class="rateSwitch"
  5126. style="margin-left: auto;"
  5127. v-model="itemTask.eList[eIndex].isai"
  5128. active-color="#0061FF"
  5129. active-text="AI评分"
  5130. inactive-text=""
  5131. active-value="1"
  5132. inactive-value="2">
  5133. </el-switch>
  5134. </div>
  5135. <div class="elist_inptu_text" v-show="false">
  5136. <!-- <span>评价维度:</span> -->
  5137. <span>能力:</span>
  5138. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5139. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5140. <!-- </el-tooltip> -->
  5141. <!-- <span>评星等级:</span>
  5142. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5143. disabled></el-rate> -->
  5144. <div class="remove" @click="
  5145. deletEList(
  5146. unitIndex,
  5147. itemTaskIndex,
  5148. eIndex
  5149. )
  5150. "></div>
  5151. </div>
  5152. <div class="elist_inptu_text">
  5153. <!-- <span>维度描述:</span> -->
  5154. <span>评价标准:</span>
  5155. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5156. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5157. <div class="remove" @click="
  5158. deletEList(
  5159. unitIndex,
  5160. itemTaskIndex,
  5161. eIndex
  5162. )
  5163. "></div>
  5164. <!-- </el-tooltip> -->
  5165. </div>
  5166. <div class="elist_inptu_text" v-if="evalua">
  5167. <span>目标:</span>
  5168. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5169. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5170. @change="forceUpdate()">
  5171. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5172. :value="e.name">
  5173. </el-option>
  5174. </el-select> -->
  5175. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5176. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5177. </div>
  5178. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5179. <span>评价细则:</span>
  5180. <div style="width: calc(100%);">
  5181. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5182. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5183. <div class="ruleBtn"
  5184. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5185. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5186. </el-tooltip>
  5187. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5188. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5189. <div class="op_box">
  5190. <div class="op_remark"></div>
  5191. <div style="display: flex;">
  5192. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5193. <div class="r_pub_button_op"
  5194. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5195. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5196. </el-tooltip>
  5197. </div>
  5198. </div>
  5199. </div>
  5200. </div>
  5201. </div>
  5202. </div>
  5203. </div>
  5204. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5205. style="margin: 35px 35px 0 0">
  5206. <div class="addToolImg">
  5207. <img src="../../../assets/icon/add.png" alt />
  5208. </div>
  5209. <div>添加</div>
  5210. </div> -->
  5211. <div class="eva_btn_box">
  5212. <div class="eva_btn_left_box">
  5213. <button class="c_pub_button_add pub_btn_eval_img"
  5214. @click="addEList(unitIndex, itemTaskIndex)">
  5215. 添加
  5216. </button>
  5217. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5218. @click="openEList(unitIndex, itemTaskIndex)">
  5219. 资源
  5220. </button> -->
  5221. </div>
  5222. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5223. v-if="itemTask.eList && itemTask.eList.length">
  5224. 添加资源模板
  5225. </button>
  5226. </div>
  5227. </div>
  5228. <div v-if="evalua" style="
  5229. border: 1px solid #e5e5e5;
  5230. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5231. " :style="{
  5232. width: itemTask.isEvaFold ? '55%' : '116px',
  5233. }" class="evaCss">
  5234. <!-- <div class="e_add_top">
  5235. <div class="e_add_title">
  5236. <span>当前使用目标管理</span>
  5237. <span>{{ eTitle }}</span>
  5238. <img src="../../../assets/line.png" class="cru_line" style="
  5239. width: 125px;
  5240. height: 20px;
  5241. bottom: -10px;
  5242. left: 155px;
  5243. " />
  5244. </div>
  5245. </div> -->
  5246. <div class="e_add_content" style="width: 100%">
  5247. <div class="e_add_list_pbox" style="width: 100%">
  5248. <div class="e_add_list_pbox_title">
  5249. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5250. <div class="type_content" v-if="itemTask.isEvaFold">
  5251. <span :class="{ active: typeMode == 1 }"
  5252. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5253. <span :class="{ active: typeMode == 2 }"
  5254. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5255. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5256. </div>
  5257. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5258. @click="foldEva(itemTaskIndex)">
  5259. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5260. </div>
  5261. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5262. @click="foldEva(itemTaskIndex)">
  5263. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5264. </div>
  5265. </div>
  5266. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5267. style="min-height: 200px">
  5268. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5269. " v-if="typeMode == 1"></Mind>
  5270. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5271. </Sunburst>
  5272. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5273. v-if="typeMode == 3"></SeeBoard>
  5274. </div>
  5275. </div>
  5276. </div>
  5277. </div>
  5278. </div>
  5279. </div>
  5280. <div class="funBlock" style="padding: 0">
  5281. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5282. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5283. <div>
  5284. {{
  5285. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5286. }}
  5287. </div>
  5288. </div>
  5289. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5290. <div>展开</div>
  5291. <div class="arrow">
  5292. <img src="../../../assets/icon/expand.png" alt />
  5293. </div>
  5294. </div> -->
  5295. </div>
  5296. </div>
  5297. </div>
  5298. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5299. <!-- <div>
  5300. <img src="../../../../assets/icon/new/addStage.png" alt />
  5301. <span>添加任务</span>
  5302. </div> -->
  5303. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5304. 添加任务
  5305. </button>
  5306. </div>
  5307. </div>
  5308. <div class="info_btnBox3">
  5309. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5310. goTo(
  5311. '/course?userid=' +
  5312. userid +
  5313. '&oid=' +
  5314. oid +
  5315. '&org=' +
  5316. org +
  5317. '&role=' +
  5318. role
  5319. )
  5320. ">
  5321. 返回课程
  5322. </button>
  5323. <button class="c_pub_button_return pub_btn_last_img"
  5324. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5325. {{ steps == 4 ? "返回课程" : "上一步" }}
  5326. </button>
  5327. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5328. pub_btn_next_img: steps != 3,
  5329. pub_btn_finish_img: steps == 3,
  5330. }">
  5331. {{ steps == 3 ? "确认上传" : "下一步" }}
  5332. </button>
  5333. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5334. '修改模板' : '保存模板'}}</button>
  5335. </div>
  5336. </div>
  5337. </div>
  5338. </div>
  5339. </div>
  5340. <div style="
  5341. width: calc(100% - 20px);
  5342. background: rgb(255, 255, 255);
  5343. border-radius: 10px;
  5344. " v-if="steps == 4">
  5345. <div class="basic_box_success">
  5346. <div class="right_img">
  5347. <img src="../../../assets/icon/right.png" alt />
  5348. </div>
  5349. <div style="font-weight: bold">成功</div>
  5350. <!-- <div>您的课程编号</div>
  5351. <div class="number">{{ number }}</div>-->
  5352. <!-- <div class="success_button">
  5353. <div class="look_course" @click="isNoFinsh">
  5354. 邀请老师协同编辑
  5355. </div>
  5356. <div class="attend_others" @click="goCourse">预览课程</div>
  5357. </div> -->
  5358. </div>
  5359. </div>
  5360. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5361. @mouseleave="btnDisplay(false)" v-if="false">
  5362. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5363. goTo(
  5364. '/course?userid=' +
  5365. userid +
  5366. '&oid=' +
  5367. oid +
  5368. '&org=' +
  5369. org +
  5370. '&role=' +
  5371. role
  5372. )
  5373. ">
  5374. 返回课程
  5375. </button>
  5376. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5377. @click="lastSteps">
  5378. {{ steps == 4 ? "返回课程" : "上一步" }}
  5379. </button>
  5380. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5381. pub_btn_next_img: steps != 3,
  5382. pub_btn_finish_img: steps == 3,
  5383. }">
  5384. {{ steps == 3 ? "确认上传" : "下一步" }}
  5385. </button>
  5386. </div>
  5387. </div>
  5388. </div>
  5389. <div class="leftBar" v-if="istemplate == 1">
  5390. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5391. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5392. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5393. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5394. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5395. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5396. <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'"/>
  5397. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5398. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5399. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5400. <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'"/>
  5401. <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'"/>
  5402. <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'"/>
  5403. <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'"/>
  5404. <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'"/>
  5405. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5406. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5407. @setAiJson="setAiJson" /> -->
  5408. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5409. @setAiJson="setAiJson" />
  5410. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5411. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5412. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5413. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5414. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5415. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5416. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5417. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5418. </div>
  5419. <div class="leftBar2" v-if="istemplate != 1 && templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2' && chatid">
  5420. <aiBoxRight :courseId="chatid" :unitJson="unitJson"></aiBoxRight>
  5421. </div>
  5422. </div>
  5423. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5424. class="dialog_diy2 customWidth">
  5425. <div>请复制该链接邀请协同编辑</div>
  5426. <div>http://www.boomyon.com/index-zhang.com</div>
  5427. <span slot="footer" class="dialog-footer">
  5428. <el-button type="primary">复制链接分享</el-button>
  5429. <el-button @click="dialogVisible = false">取消</el-button>
  5430. </span>
  5431. </el-dialog>
  5432. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5433. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5434. <el-form>
  5435. <el-form-item label="文档标题">
  5436. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5437. </el-form-item>
  5438. <div>文档简介</div>
  5439. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5440. </el-form>
  5441. <span slot="footer" class="dialog-footer">
  5442. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5443. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5444. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5445. </span>
  5446. </el-dialog>
  5447. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5448. :before-close="handleClose" class="dialog_diy">
  5449. <el-form>
  5450. <el-form-item label="文档标题">
  5451. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5452. </el-form-item>
  5453. <div>文档内容</div>
  5454. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5455. </el-form>
  5456. <span slot="footer" class="dialog-footer">
  5457. <el-button @click="clearChoose">取 消</el-button>
  5458. <el-button type="primary" @click="wordNext()">确定</el-button>
  5459. </span>
  5460. </el-dialog>
  5461. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5462. :before-close="handleClose" class="dialog_diy">
  5463. <el-form>
  5464. <el-form-item label="文本标题">
  5465. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5466. placeholder="请输入文本标题..."></el-input>
  5467. </el-form-item>
  5468. <!-- <div>富文本内容</div> -->
  5469. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5470. </el-form>
  5471. <span slot="footer" class="dialog-footer">
  5472. <el-button @click="clearAttText">取 消</el-button>
  5473. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5474. </span>
  5475. </el-dialog>
  5476. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5477. :before-close="handleClose" class="dialog_diy lineCss">
  5478. <el-form>
  5479. <el-form-item label="标题" :label-width="formLabelWidth">
  5480. <span>
  5481. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5482. </span>
  5483. </el-form-item>
  5484. <el-form-item label="链接" :label-width="formLabelWidth">
  5485. <span>
  5486. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5487. </span>
  5488. </el-form-item>
  5489. </el-form>
  5490. <span slot="footer" class="dialog-footer">
  5491. <el-button @click="clearLine">取 消</el-button>
  5492. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5493. </span>
  5494. </el-dialog>
  5495. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5496. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5497. <div>
  5498. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5499. </div>
  5500. <span slot="footer" class="dialog-footer">
  5501. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5502. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5503. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5504. </span>
  5505. </el-dialog>
  5506. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5507. :before-close="handleClose" class="addNewPP customWidth">
  5508. <div class="people">
  5509. <div class="people_top">
  5510. <div class="people_nav">选择成员</div>
  5511. <div class="people_top_right">
  5512. <div class="people_search">
  5513. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5514. <div class="search_img" @click="searchStudent">
  5515. <img src="../../../assets/icon/search.png" alt />
  5516. </div>
  5517. </div>
  5518. </div>
  5519. </div>
  5520. <el-checkbox-group v-model="checkboxList" class="people_name">
  5521. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5522. "暂无学生可选" }}</el-checkbox>
  5523. </el-checkbox-group>
  5524. </div>
  5525. <span slot="footer" class="dialog-footer">
  5526. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5527. <el-button type="primary" @click="isAddPP">确定</el-button>
  5528. </span>
  5529. </el-dialog>
  5530. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5531. :before-close="handleClose" class="addNewPP2">
  5532. <div class="check_classBox">
  5533. <div class="check_class_right">
  5534. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5535. 全部
  5536. </div>
  5537. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5538. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5539. {{ item.name }}
  5540. </div>
  5541. </el-tooltip>
  5542. </div>
  5543. <div class="check_class_left">
  5544. <div class="check_class_all_box">
  5545. <div class="check_class_left_title">选择班级</div>
  5546. <div style="display: flex; align-items: center; margin-left: auto">
  5547. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5548. </div>
  5549. </div>
  5550. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5551. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5552. </div> -->
  5553. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5554. v-if="grade2.length">
  5555. <div v-for="item in grade2" :key="item.id" class="class_item">
  5556. <el-checkbox :label="item.id">
  5557. {{ item.name }}
  5558. </el-checkbox>
  5559. </div>
  5560. </el-checkbox-group>
  5561. <div v-if="!grade2.length">暂无数据</div>
  5562. </div>
  5563. </div>
  5564. <span slot="footer" class="dialog-footer">
  5565. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5566. <el-button type="primary" @click="isAddClass">确定</el-button>
  5567. </span>
  5568. </el-dialog>
  5569. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5570. :before-close="handleClose" class="addNewPP customWidth">
  5571. <div style="display: flex;justify-content: space-between;">
  5572. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5573. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5574. 全部
  5575. </div>
  5576. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5577. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5578. <el-tooltip placement="top" :content="i.name">
  5579. <span>{{i.name}}</span>
  5580. </el-tooltip>
  5581. </div>
  5582. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5583. 其他
  5584. </div>
  5585. </div>
  5586. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5587. <div class="people">
  5588. <div class="people_top">
  5589. <div class="people_top_right">
  5590. <div class="people_search">
  5591. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5592. <div class="search_img" @click="getTeacher(collid)">
  5593. <img src="../../../assets/icon/search.png" alt />
  5594. </div>
  5595. </div>
  5596. </div>
  5597. <div class="people_nav" style="display: flex; align-items: center">
  5598. <div class="check_class_left_title">选择成员</div>
  5599. <div style="display: flex; align-items: center; margin-left: auto">
  5600. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5601. </div>
  5602. </div>
  5603. </div>
  5604. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5605. @change="InviteChange2">
  5606. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5607. <div class="t_j_box">
  5608. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5609. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5610. </el-tooltip>
  5611. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5612. <span>{{ item.username.split('@')[0] }}</span>
  5613. </el-tooltip>
  5614. <el-tooltip placement="top" :content="item.school">
  5615. <span>{{ item.school }}</span>
  5616. </el-tooltip>
  5617. </div>
  5618. </el-checkbox>
  5619. </el-checkbox-group>
  5620. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5621. </div>
  5622. </div>
  5623. </div>
  5624. <span slot="footer" class="dialog-footer">
  5625. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5626. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5627. </span>
  5628. </el-dialog>
  5629. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5630. closePan(4);
  5631. }
  5632. " class="dialog_diy fullStyle">
  5633. <div style="height: 100%">
  5634. <div class="a_add_title" style="
  5635. display: flex;
  5636. flex-direction: row;
  5637. align-items: center;
  5638. justify-content: center;
  5639. ">
  5640. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5641. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5642. </div>
  5643. <div class="a_addBox" style="height: calc(100% - 50px)">
  5644. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5645. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5646. <div class="a_add_checkType">
  5647. <span :class="{
  5648. active:
  5649. askJson.askJson[index1].type == '1' ||
  5650. !askJson.askJson[index1].type,
  5651. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5652. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5653. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5654. </div>
  5655. <div class="a_add_head">
  5656. <div style="
  5657. display: flex;
  5658. align-items: center;
  5659. width: 100%;
  5660. margin-right: 20px;
  5661. ">
  5662. <span style="min-width: fit-content">{{
  5663. index1 + 1 + "、"
  5664. }}</span>
  5665. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5666. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5667. $forceUpdate();
  5668. }
  5669. "></textarea>
  5670. </div>
  5671. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5672. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5673. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5674. </div>
  5675. <div class="a_add_head_div">
  5676. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5677. </el-button>
  5678. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5679. </div>
  5680. </div>
  5681. <div class="a_add_body">
  5682. <div class="a_add_input" style="flex-direction: column">
  5683. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5684. margin: 20px 10px 0 0;
  5685. display: flex;
  5686. align-items: center;
  5687. position: relative;
  5688. ">
  5689. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5690. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5691. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5692. @change="() => {
  5693. $forceUpdate();
  5694. }
  5695. "></textarea>
  5696. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5697. v-if="askJson.askJson[index1].askItem != 1">
  5698. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5699. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5700. </div>
  5701. <div class="a_add_body_div">
  5702. <el-button type="primary" size="small"
  5703. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5704. <el-button type="primary" size="small" @click="
  5705. deletecheckList(askJson.askJson[index1], checkIndex)
  5706. " v-if="askJson.askJson[index1].askItem != 1">删除
  5707. </el-button>
  5708. </div>
  5709. </div>
  5710. </div>
  5711. <!-- <div class="a_add_body_div">
  5712. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5713. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5714. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5715. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5716. </el-button>
  5717. </div> -->
  5718. </div>
  5719. </div>
  5720. </div>
  5721. </div>
  5722. <span slot="footer" class="dialog-footer">
  5723. <el-button @click="closePan(4)">取 消</el-button>
  5724. <el-button type="primary" @click="addAsk">确 定</el-button>
  5725. </span>
  5726. </el-dialog>
  5727. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5728. closePan(45);
  5729. }
  5730. " class="dialog_diy fullStyle">
  5731. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5732. <!-- <div class="a_add_title" style="
  5733. display: flex;
  5734. flex-direction: row;
  5735. align-items: center;
  5736. justify-content: center;
  5737. ">
  5738. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5739. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5740. </div> -->
  5741. <div class="a_addBox" style="height: 100%">
  5742. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5743. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5744. 上传补充资料
  5745. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5746. beforeUploadInfo2(
  5747. $event,
  5748. 17
  5749. )
  5750. " />
  5751. </button>
  5752. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  5753. <div class="add_chapters_box add_c_none" v-if="
  5754. xuanzeInfoData &&
  5755. xuanzeInfoData.length == 0
  5756. ">
  5757. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  5758. </div>
  5759. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5760. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  5761. getChapterData(
  5762. $event,
  5763. index1,
  5764. item1.type
  5765. )
  5766. " >
  5767. <div class="chapter_upload_o" style="
  5768. position: relative;
  5769. display: flex;
  5770. align-items: center;
  5771. ">
  5772. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5773. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5774. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5775. </div>
  5776. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5777. </div>
  5778. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5779. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5780. </div>
  5781. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5782. </div>
  5783. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5784. </div>
  5785. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5786. </div>
  5787. </div>
  5788. <div class="chapter_upload_n">
  5789. <input readonly="true" v-if="
  5790. item1.type == 2 ||
  5791. item1.type == 3 ||
  5792. item1.type == 12 ||
  5793. item1.type == 13 ||
  5794. item1.type == 7
  5795. " :placeholder="item1.name" @click.stop="
  5796. checkChpater3($event, index1, item1)
  5797. " style="
  5798. border: none;
  5799. outline: none;
  5800. width: 80%;
  5801. minwidth: 215px;
  5802. z-index: 99;
  5803. font-size: 14px;
  5804. white-space: nowrap;
  5805. overflow: hidden;
  5806. text-overflow: ellipsis;
  5807. " />
  5808. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5809. border: none;
  5810. outline: none;
  5811. width: 80%;
  5812. white-space: nowrap;
  5813. overflow: hidden;
  5814. text-overflow: ellipsis;
  5815. " readonly="true" @click="
  5816. selectAttText(index1)
  5817. " />
  5818. <input :placeholder="item1.title ? item1.title : '链接'
  5819. " v-if="item1.type == 8" style="
  5820. border: none;
  5821. outline: none;
  5822. width: 80%;
  5823. white-space: nowrap;
  5824. overflow: hidden;
  5825. text-overflow: ellipsis;
  5826. " readonly="true" @click="selectLine(index1)" />
  5827. <input :placeholder="item1.title ? item1.title : '链接'
  5828. " v-if="item1.type == 14" style="
  5829. border: none;
  5830. outline: none;
  5831. width: 80%;
  5832. white-space: nowrap;
  5833. overflow: hidden;
  5834. text-overflow: ellipsis;
  5835. " readonly="true" @click="
  5836. openUpdateSource(index1)
  5837. " />
  5838. </div>
  5839. <div class="chapter_upload_ic">
  5840. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5841. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5842. checkChpater3($event, index1, item1)
  5843. ">
  5844. <div></div>
  5845. </div>
  5846. <div class="chapter_upload_ic_r" @click.stop="
  5847. deletexuanzeInfoData(
  5848. $event,
  5849. index1
  5850. )
  5851. ">
  5852. <div></div>
  5853. </div>
  5854. </div>
  5855. </div>
  5856. </div>
  5857. </div>
  5858. </div>
  5859. <div v-if="
  5860. xuanzeinfoproVisible
  5861. " class="mask">
  5862. <div class="progressBox">
  5863. <div class="lbox">
  5864. <img src="../../../assets/loading.gif" />上传中,请稍后
  5865. </div>
  5866. <div style="margin-bottom: 10px">
  5867. <span>{{
  5868. xuanzeinfoisFinishSize
  5869. }}</span>
  5870. /
  5871. <span>{{
  5872. xuanzeinfoisAllSize
  5873. }}</span>
  5874. </div>
  5875. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  5876. ? xuanzeinfoprogress
  5877. : 0
  5878. " style="width: 80%"></el-progress> -->
  5879. </div>
  5880. </div>
  5881. </div>
  5882. <div style="
  5883. font-size: 16px;
  5884. color: #c7c7c7;
  5885. display: flex;
  5886. align-items: center;
  5887. justify-content: flex-end;
  5888. ">
  5889. <!-- 请输入题目内容 -->
  5890. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  5891. 智能生成
  5892. </button>
  5893. <!-- 请输入题目内容 -->
  5894. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  5895. v-if="isPasteChoice">
  5896. 智能粘贴
  5897. </button>
  5898. </div>
  5899. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  5900. <div class="a_add_checkType">
  5901. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  5902. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  5903. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  5904. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  5905. </div>
  5906. <div class="a_add_head">
  5907. <div class="timuUpImg">
  5908. <div style="display: flex; align-items: center">
  5909. <span style="min-width: fit-content">{{
  5910. index1 + 1 + "、"
  5911. }}</span>
  5912. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  5913. placeholder="请输入题目">
  5914. </el-input> -->
  5915. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5916. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  5917. $forceUpdate();
  5918. }
  5919. "></textarea>
  5920. </div>
  5921. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  5922. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  5923. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  5924. </div>
  5925. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  5926. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5927. <input type="file" accept="image/*" style="display: none"
  5928. @change="beforeUploadTiMu($event, index1)" />
  5929. </div>
  5930. </div>
  5931. <div class="a_add_head_div">
  5932. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  5933. </el-button>
  5934. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  5935. </div>
  5936. </div>
  5937. <div class="timuImgBox" v-if="
  5938. testJson.testJson[index1].timuList &&
  5939. testJson.testJson[index1].timuList.length
  5940. ">
  5941. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  5942. @click.stop="previewImg(timg.src)">
  5943. <img :src="timg.src" alt="" />
  5944. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  5945. <img src="../../../assets/icon/delete.png" alt="" />
  5946. </div>
  5947. </div>
  5948. </div>
  5949. <div class="a_add_body">
  5950. <div class="a_add_input a_add_input_choice">
  5951. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  5952. @change="() => {
  5953. $forceUpdate();
  5954. }
  5955. ">
  5956. <div class="radioBox">
  5957. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  5958. .testItem" :key="checkIndex" :label="checkIndex">
  5959. <div style="margin-right: 10px">
  5960. 选项{{ checkIndex + 1 }}
  5961. </div>
  5962. <div style="margin-right: 10px; width: 300px" v-if="
  5963. testJson.testJson[index1].checkList[checkIndex] &&
  5964. testJson.testJson[index1].checkList[checkIndex]
  5965. .imgType &&
  5966. testJson.testJson[index1].checkList[checkIndex]
  5967. .imgType == 1
  5968. ">
  5969. <div class="inImg" @click.stop="
  5970. previewImg(
  5971. testJson.testJson[index1].checkList[checkIndex]
  5972. .src
  5973. )
  5974. ">
  5975. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  5976. .src
  5977. " lazy />
  5978. <!-- <img :src="
  5979. testJson.testJson[index1].checkList[checkIndex]
  5980. .src
  5981. " alt="" /> -->
  5982. </div>
  5983. </div>
  5984. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  5985. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5986. $forceUpdate();
  5987. }
  5988. "></textarea>
  5989. <div class="xzUpImg" @click.stop="addImg($event)">
  5990. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5991. <input type="file" accept="image/*" style="display: none"
  5992. @change="beforeUploadTi($event, index1, checkIndex)" />
  5993. </div>
  5994. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5995. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  5996. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  5997. </div>
  5998. <div class="a_add_body_div">
  5999. <el-button type="primary" size="small" @click.stop="
  6000. addTcheckList(testJson.testJson[index1], checkIndex)
  6001. ">添加</el-button>
  6002. <el-button type="primary" size="small" @click.stop="
  6003. deleteTcheckList(
  6004. testJson.testJson[index1],
  6005. checkIndex
  6006. )
  6007. " v-if="testJson.testJson[index1].testItem != 1">删除
  6008. </el-button>
  6009. </div>
  6010. </el-radio>
  6011. </div>
  6012. </el-radio-group>
  6013. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6014. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6015. $forceUpdate();
  6016. }
  6017. ">
  6018. <div class="radioBox">
  6019. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6020. .testItem" :key="checkIndex1" :label="checkIndex1">
  6021. <div style="margin-right: 10px">
  6022. 选项{{ checkIndex1 + 1 }}
  6023. </div>
  6024. <div style="margin-right: 10px; width: 300px" v-if="
  6025. testJson.testJson[index1].checkList[checkIndex1] &&
  6026. testJson.testJson[index1].checkList[checkIndex1]
  6027. .imgType &&
  6028. testJson.testJson[index1].checkList[checkIndex1]
  6029. .imgType == 1
  6030. ">
  6031. <div class="inImg" @click.stop="
  6032. previewImg(
  6033. testJson.testJson[index1].checkList[checkIndex1]
  6034. .src
  6035. )
  6036. ">
  6037. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6038. .src
  6039. " lazy />
  6040. <!-- <img :src="
  6041. testJson.testJson[index1].checkList[checkIndex1]
  6042. .src
  6043. " alt="" /> -->
  6044. </div>
  6045. </div>
  6046. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6047. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6048. $forceUpdate();
  6049. }
  6050. "></textarea>
  6051. <div class="xzUpImg" @click.stop="addImg($event)">
  6052. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6053. <input type="file" accept="image/*" style="display: none"
  6054. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6055. </div>
  6056. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6057. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6058. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6059. </div>
  6060. <div class="a_add_body_div">
  6061. <el-button type="primary" size="small" @click.stop="
  6062. addTcheckList(
  6063. testJson.testJson[index1],
  6064. checkIndex1
  6065. )
  6066. ">添加</el-button>
  6067. <el-button type="primary" size="small" @click.stop="
  6068. deleteTcheckList(
  6069. testJson.testJson[index1],
  6070. checkIndex1
  6071. )
  6072. " v-if="testJson.testJson[index1].testItem != 1">删除
  6073. </el-button>
  6074. </div>
  6075. </el-checkbox>
  6076. </div>
  6077. </el-checkbox-group>
  6078. </div>
  6079. <!-- <div class="a_add_body_div">
  6080. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6081. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6082. v-if="testJson.testJson[index1].testItem != 1">删除
  6083. </el-button>
  6084. </div> -->
  6085. </div>
  6086. </div>
  6087. </div>
  6088. </div>
  6089. <span slot="footer" class="dialog-footer">
  6090. <el-button @click="closePan(45)">取 消</el-button>
  6091. <el-button type="primary" @click="addTest">确 定</el-button>
  6092. </span>
  6093. </el-dialog>
  6094. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6095. :before-close="handleClose" class="dialog_diy addToolsDia">
  6096. <div class="toolChoose">
  6097. <div class="tools">
  6098. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6099. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6100. <div style="
  6101. display: flex;
  6102. flex-direction: row;
  6103. align-items: baseline;
  6104. flex-wrap: nowrap;
  6105. justify-content: flex-start;
  6106. position: relative;
  6107. ">
  6108. <div class="chooseWho">
  6109. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6110. 互动类
  6111. </div>
  6112. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6113. 思维类
  6114. </div>
  6115. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6116. 评价类
  6117. </div>
  6118. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6119. 其他
  6120. </div>
  6121. </div>
  6122. </div>
  6123. <div style="min-height: 163px">
  6124. <div class="toolSort" v-if="chapToolsType == 0">
  6125. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6126. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6127. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6128. <div style="margin: 5px 0">素材库</div>
  6129. </div>
  6130. <div class="noCTool">
  6131. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6132. </div>
  6133. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6134. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6135. </div>
  6136. <!-- <div class="check" @click="chapAddTools(8)">
  6137. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6138. <div class="checkDiv" v-else>
  6139. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6140. </div>
  6141. </div> -->
  6142. </div>
  6143. </div>
  6144. <div class="toolSort" v-if="chapToolsType == 1">
  6145. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6146. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6147. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6148. <div style="margin: 5px 0">思维网格</div>
  6149. </div>
  6150. <div class="noCTool">
  6151. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6152. </div>
  6153. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6154. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6155. </div>
  6156. <!-- <div class="check" @click="chapAddTools(7)">
  6157. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6158. <div class="checkDiv" v-else>
  6159. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6160. </div>
  6161. </div> -->
  6162. </div>
  6163. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6164. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6165. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6166. <div style="margin: 5px 0">电子白板</div>
  6167. </div>
  6168. <div class="noCTool">
  6169. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6170. </div>
  6171. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6172. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6173. </div>
  6174. <!-- <div class="check" @click="chapAddTools(1)">
  6175. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6176. <div class="checkDiv" v-else>
  6177. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6178. </div>
  6179. </div> -->
  6180. </div>
  6181. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6182. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6183. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6184. <div style="margin: 5px 0">便签</div>
  6185. </div>
  6186. <div class="noCTool">
  6187. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6188. </div>
  6189. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6190. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6191. </div>
  6192. <!-- <div class="check" @click="chapAddTools(2)">
  6193. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6194. <div class="checkDiv" v-else>
  6195. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6196. </div>
  6197. </div> -->
  6198. </div>
  6199. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6200. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6201. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6202. <div style="margin: 5px 0">协同文档</div>
  6203. </div>
  6204. <div class="noCTool">
  6205. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6206. </div>
  6207. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6208. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6209. </div>
  6210. <!-- <div class="check" @click="chapAddTools(6)">
  6211. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6212. <div class="checkDiv" v-else>
  6213. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6214. </div>
  6215. </div> -->
  6216. </div>
  6217. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6218. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6219. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6220. <div style="margin: 5px 0">思维导图</div>
  6221. </div>
  6222. <div class="noCTool">
  6223. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6224. </div>
  6225. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6226. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6227. </div>
  6228. <!-- <div class="check" @click="chapAddTools(3)">
  6229. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6230. <div class="checkDiv" v-else>
  6231. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6232. </div>
  6233. </div> -->
  6234. </div>
  6235. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6236. @click="chapAddTools(31)">
  6237. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6238. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6239. <div style="margin: 5px 0">数学画板</div>
  6240. </div>
  6241. <div class="noCTool">
  6242. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6243. </div>
  6244. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6245. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6246. </div>
  6247. <!-- <div class="check" @click="chapAddTools(31)">
  6248. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6249. <div class="checkDiv" v-else>
  6250. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6251. </div>
  6252. </div> -->
  6253. </div>
  6254. </div>
  6255. <div class="toolSort" v-if="chapToolsType == 2">
  6256. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6257. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6258. <img src="../../../assets/icon/thirdToolList/score.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(5) != -1">
  6265. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6266. </div>
  6267. <!-- <div class="check" @click="chapAddTools(5)">
  6268. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -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 class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6275. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6276. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6277. <div style="margin: 5px 0">问卷调查</div>
  6278. </div>
  6279. <div class="noCTool">
  6280. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6281. </div>
  6282. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6283. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6284. </div>
  6285. <!-- <div class="check" @click="chapAddTools(4)">
  6286. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6287. <div class="checkDiv" v-else>
  6288. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6289. </div>
  6290. </div> -->
  6291. </div>
  6292. </div>
  6293. </div>
  6294. <div>
  6295. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6296. v-model="itemTools.toolDetail" />
  6297. </div>
  6298. </div>
  6299. </div>
  6300. </div>
  6301. <span slot="footer" class="dialog-footer">
  6302. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6303. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6304. </span>
  6305. </el-dialog>
  6306. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6307. closePan(15);
  6308. }
  6309. " class="dialog_diy">
  6310. <div>
  6311. <div class="a_add_title" style="
  6312. display: flex;
  6313. flex-direction: column;
  6314. align-items: flex-start;
  6315. justify-content: center;
  6316. ">
  6317. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6318. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6319. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6320. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6321. </div>
  6322. </div>
  6323. <span slot="footer" class="dialog-footer">
  6324. <el-button @click="closePan(15)">取 消</el-button>
  6325. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6326. </span>
  6327. </el-dialog>
  6328. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6329. :before-close="handleClose" class="dialog_diy">
  6330. <div>
  6331. <div class="a_add_title" style="
  6332. display: flex;
  6333. flex-direction: column;
  6334. align-items: flex-start;
  6335. justify-content: center;
  6336. ">
  6337. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6338. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6339. </div>
  6340. </div>
  6341. <span slot="footer" class="dialog-footer">
  6342. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6343. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6344. </span>
  6345. </el-dialog>
  6346. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6347. :before-close="handleClose" class="dialog_diy">
  6348. <div>
  6349. <div class="fileCss" style="padding-top: 20px">
  6350. <div>
  6351. <button class="info_btn" @click="addImg($event)">
  6352. 选择本地文件
  6353. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6354. </button>
  6355. <div class="spanName">选择本地文件</div>
  6356. </div>
  6357. <!-- <div>
  6358. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6359. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6360. <img :src="cover[0].url" alt="" />
  6361. <div class="deletePic" @click="deleteSysPic">
  6362. <img src="../../../assets/icon/delete.png" alt="" />
  6363. </div>
  6364. </div>
  6365. <div class="spanName">选择系统文件</div>
  6366. </div> -->
  6367. <div>
  6368. <el-button @click="(searchImageValue = courseName), resetImage()"
  6369. v-if="isSysPic2 == false">选择网络文件</el-button>
  6370. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6371. <img :src="cover[0].url" alt="" />
  6372. <div class="deletePic" @click="deleteSysPic">
  6373. <img src="../../../assets/icon/delete.png" alt="" />
  6374. </div>
  6375. </div>
  6376. <div class="spanName">选择网络文件</div>
  6377. </div>
  6378. </div>
  6379. <!-- <div class="fileCss">
  6380. </div> -->
  6381. </div>
  6382. <span slot="footer" class="dialog-footer">
  6383. <el-button @click="choosePicVisible = false">取 消</el-button>
  6384. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6385. </span>
  6386. </el-dialog>
  6387. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6388. :before-close="handleClose" class="dialog_diy">
  6389. <div class="cru_selectBox" style="margin: 0">
  6390. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6391. 绘画
  6392. </div>
  6393. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6394. 科技
  6395. </div>
  6396. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6397. 人文
  6398. </div>
  6399. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6400. 艺术
  6401. </div>
  6402. </div>
  6403. <div class="sysPicBox">
  6404. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6405. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6406. </div>
  6407. </div>
  6408. </el-dialog>
  6409. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6410. :before-close="handleClose" class="dialog_diy">
  6411. <div>
  6412. <div class="people_top_right" style="display: flex; align-items: center">
  6413. <div style="position: relative; width: 100%">
  6414. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6415. @keyup.enter.native="resetImage()"></el-input>
  6416. <div class="search_img" @click="resetImage" style="right: 10px">
  6417. <img src="../../../assets/icon/search.png" alt />
  6418. </div>
  6419. </div>
  6420. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6421. </div>
  6422. <div class="sysPicBox" v-loading="imageloading">
  6423. <div class="picNone" v-if="!imageList.length">
  6424. 请输入关键词搜索图片
  6425. </div>
  6426. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6427. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6428. </div>
  6429. </div>
  6430. </div>
  6431. </el-dialog>
  6432. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6433. closePan(41);
  6434. }
  6435. " class="dialog_diy dialog_diy3 fullStyle">
  6436. <div v-if="selectJson" style="height: 100%">
  6437. <div class="select_box1" v-if="selectSteps == 1">
  6438. <div class="select_box1_img">
  6439. <div class="select_box1_title">
  6440. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6441. </div>
  6442. <div class="select_box1_add_img">
  6443. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6444. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6445. <img src="../../../assets/icon/addPoster.png" alt="" />
  6446. </div>
  6447. <div class="isSysPic" v-else>
  6448. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6449. <div class="deletePic" @click="deleteSelectPic">
  6450. <img src="../../../assets/icon/delete.png" alt="" />
  6451. </div>
  6452. </div>
  6453. </div>
  6454. </div>
  6455. <div class="select_box1_select">
  6456. <div class="select_box1_title">
  6457. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6458. </div>
  6459. <div class="select_box1_select_box">
  6460. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6461. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6462. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6463. <div class="select_box1_select_box_add">
  6464. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6465. 添加</el-button>
  6466. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6467. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6468. </div>
  6469. </div>
  6470. </div>
  6471. </div>
  6472. <div v-if="selectSteps == 2" style="height: 100%">
  6473. <div class="select_box2">
  6474. <div class="select_box2_title">设置每道题目的正确选项</div>
  6475. <div class="select_box2_box">
  6476. <div class="select_box2_img">
  6477. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6478. </div>
  6479. <div class="select_box2_answer">
  6480. <div class="select_answer_title">根据题目选择对应答案</div>
  6481. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6482. <span>{{ checkIndex + 1 }}、</span>
  6483. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6484. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6485. </el-option>
  6486. </el-select>
  6487. </div>
  6488. </div>
  6489. </div>
  6490. </div>
  6491. </div>
  6492. </div>
  6493. <span slot="footer" class="dialog-footer">
  6494. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6495. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6496. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6497. </span>
  6498. </el-dialog>
  6499. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6500. :before-close="handleClose" class="dialog_diy">
  6501. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6502. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6503. <div class="pjCss" style="width: 100%">
  6504. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6505. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6506. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6507. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6508. <div class="remove" @click="deletRateList(eIndex)"></div>
  6509. <div style="width: 100%; display: flex">
  6510. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6511. <el-rate v-model="eItem.score" disabled></el-rate>
  6512. </div>
  6513. <div class="elist_inptu_text" style="align-items: flex-start">
  6514. <span style="min-width: 100px; text-align: right">描述:</span>
  6515. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6516. </div>
  6517. </div>
  6518. </div>
  6519. <div class="addToolFun" @click="addRateList()">
  6520. <div class="addToolImg">
  6521. <img src="../../../assets/icon/add.png" alt />
  6522. </div>
  6523. <div>添加</div>
  6524. </div>
  6525. </div>
  6526. </div>
  6527. <span slot="footer" class="dialog-footer">
  6528. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6529. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6530. </span>
  6531. </el-dialog>
  6532. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6533. closePan(47);
  6534. }
  6535. " class="dialog_diy dialog_diy3 fullStyle">
  6536. <div style="height: 100%">
  6537. <div class="sentenBox" style="height: 100%">
  6538. <div class="addSen" @click="addSt">添加题目</div>
  6539. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6540. <div class="sentenTopBox">
  6541. <div class="sentenTop" :index="stIndex + 1">
  6542. <div>题目设置</div>
  6543. <div>
  6544. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6545. </div>
  6546. <div @click="addSen(stIndex)">添加</div>
  6547. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6548. </div>
  6549. </div>
  6550. <div class="cardList">
  6551. <div v-if="st.addSentence.length > 0" class="cardBox">
  6552. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6553. @click="setRightAnswer(s, stIndex, sIndex)">
  6554. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6555. <div>{{ s }}</div>
  6556. </el-tooltip>
  6557. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6558. <img src="../../../assets/icon/delete.png" alt="" />
  6559. </div>
  6560. </div>
  6561. </div>
  6562. <div class="card">
  6563. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6564. </div>
  6565. </div>
  6566. <div class="rightCardBox">
  6567. <div>正确顺序</div>
  6568. <div class="rightCardList">
  6569. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6570. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6571. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6572. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6573. <div>{{ r }}</div>
  6574. </el-tooltip>
  6575. </div>
  6576. <div>{{ rIndex + 1 }}</div>
  6577. </div>
  6578. </div>
  6579. <div class="card" v-if="st.rightAnswer.length == 0">
  6580. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6581. </div>
  6582. <div class="card" v-else>
  6583. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6584. </div>
  6585. </div>
  6586. </div>
  6587. </div>
  6588. </div>
  6589. </div>
  6590. <span slot="footer" class="dialog-footer">
  6591. <el-button @click="closePan(47)">取 消</el-button>
  6592. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6593. </span>
  6594. </el-dialog>
  6595. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6596. :before-close="handleClose" class="dialog_diy">
  6597. <el-form>
  6598. <!-- <el-form-item label="文本标题">
  6599. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6600. </el-form-item> -->
  6601. <div>表格内容</div>
  6602. <Table v-model="tableJson.text" @change="change"></Table>
  6603. </el-form>
  6604. <span slot="footer" class="dialog-footer">
  6605. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6606. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6607. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6608. </span>
  6609. </el-dialog>
  6610. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6611. :before-close="handleClose" class="dialog_diy">
  6612. <el-form>
  6613. <!-- <el-form-item label="文本标题">
  6614. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6615. </el-form-item> -->
  6616. <div>文档内容</div>
  6617. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6618. </el-form>
  6619. <span slot="footer" class="dialog-footer">
  6620. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6621. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6622. </span>
  6623. </el-dialog>
  6624. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6625. :before-close="handleClose" class="dialog_diy">
  6626. <div style="
  6627. width: 100%;
  6628. display: flex;
  6629. flex-direction: row;
  6630. flex-wrap: nowrap;
  6631. align-items: center;
  6632. justify-content: center;
  6633. ">
  6634. <div>班级:</div>
  6635. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6636. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6637. </el-option>
  6638. </el-select>
  6639. </div>
  6640. <span slot="footer" class="dialog-footer">
  6641. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6642. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6643. </span>
  6644. </el-dialog>
  6645. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6646. :before-close="handleClose" class="dialog_diy">
  6647. <div style="
  6648. width: 100%;
  6649. display: flex;
  6650. flex-direction: row;
  6651. flex-wrap: nowrap;
  6652. align-items: center;
  6653. justify-content: center;
  6654. ">
  6655. <div>随机码:</div>
  6656. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6657. </div>
  6658. <span slot="footer" class="dialog-footer">
  6659. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6660. <el-button type="primary" @click="addInvite">确定</el-button>
  6661. </span>
  6662. </el-dialog>
  6663. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6664. :before-close="handleClose" class="dialog_diy">
  6665. <div>
  6666. <div style="margin-bottom: 20px; color: #999">
  6667. 提示:点击“+”或“-”修改倒计时时长。
  6668. </div>
  6669. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6670. </div>
  6671. <span slot="footer" class="dialog-footer">
  6672. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6673. <el-button type="primary" @click="addPreTime">确定</el-button>
  6674. </span>
  6675. </el-dialog>
  6676. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6677. :before-close="handleClose" class="dialog_diy">
  6678. <div>
  6679. <div style="
  6680. width: 100%;
  6681. display: flex;
  6682. flex-direction: row;
  6683. flex-wrap: nowrap;
  6684. align-content: center;
  6685. align-items: center;
  6686. justify-content: space-between;
  6687. ">
  6688. <div style="
  6689. display: flex;
  6690. flex-flow: row nowrap;
  6691. align-items: flex-start;
  6692. width: 100%;
  6693. flex-direction: column;
  6694. flex-wrap: nowrap;
  6695. position: relative;
  6696. ">
  6697. <div class="e_box">
  6698. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6699. <div class="e_card_picture">
  6700. <img src="../../../assets/e_picture.png" />
  6701. </div>
  6702. <div class="e_card_name">
  6703. <span>{{ item.title }}</span>
  6704. </div>
  6705. <div class="e_card_btn">
  6706. <span @click="checkEva(item.id, 2)">导入</span>
  6707. </div>
  6708. </div> -->
  6709. <!-- <div class="addEva" @click="openT">
  6710. <img src="../../../assets/icon/addEva.png" alt="" />
  6711. </div> -->
  6712. <div style="
  6713. display: flex;
  6714. justify-content: flex-end;
  6715. margin-bottom: 10px;
  6716. ">
  6717. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6718. </div>
  6719. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6720. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6721. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6722. </el-table-column>
  6723. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6724. </el-table-column>
  6725. <el-table-column label="操作" width="250px">
  6726. <template slot-scope="scope">
  6727. <div class="btnBox">
  6728. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6729. </div>
  6730. </template>
  6731. </el-table-column>
  6732. </el-table>
  6733. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6734. 暂无数据
  6735. </div>
  6736. </div>
  6737. </div>
  6738. </div>
  6739. </div>
  6740. <span slot="footer" class="dialog-footer">
  6741. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6742. </span>
  6743. </el-dialog>
  6744. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6745. :before-close="handleClose" class="dialog_diy">
  6746. <div class="groupBox">
  6747. <div v-if="groupJson.group" class="groupContent">
  6748. <div class="groupTitle">请设置小组数量及名称</div>
  6749. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6750. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6751. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6752. <div class="groupBtn">
  6753. <el-button type="primary" size="small" @click="addGroup(index)"
  6754. v-if="groupJson.group.length - 1 == index">
  6755. 添加</el-button>
  6756. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6757. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6758. </div>
  6759. </div>
  6760. </div>
  6761. <div class="groupContent">
  6762. <div class="groupTitle">请设置每组人数</div>
  6763. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6764. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6765. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6766. @change="numberPan"></el-input>
  6767. </div>
  6768. </div>
  6769. <span slot="footer" class="dialog-footer">
  6770. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6771. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6772. </span>
  6773. </el-dialog>
  6774. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6775. :before-close="handleClose" class="dialog_diy">
  6776. <div style="
  6777. width: 100%;
  6778. display: flex;
  6779. flex-direction: row;
  6780. flex-wrap: nowrap;
  6781. align-items: center;
  6782. justify-content: center;
  6783. ">
  6784. <div style="min-width: fit-content">文件名称:</div>
  6785. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6786. </div>
  6787. <span slot="footer" class="dialog-footer">
  6788. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6789. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6790. </span>
  6791. </el-dialog>
  6792. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6793. closePan(69);
  6794. }
  6795. " class="dialog_diy fullStyle fullStyle1">
  6796. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6797. <span slot="footer" class="dialog-footer">
  6798. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6799. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6800. </span>
  6801. </el-dialog>
  6802. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6803. :before-close="handleClose" class="dialog_diy">
  6804. <div class="template_box">
  6805. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6806. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6807. <div class="wordPic">
  6808. <img src="../../../assets/icon/new/course_template.png" alt />
  6809. </div>
  6810. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6811. <div style="
  6812. margin-top: 10px;
  6813. line-height: 19px;
  6814. overflow: hidden;
  6815. text-overflow: ellipsis;
  6816. white-space: nowrap;
  6817. padding: 0 10px;
  6818. box-sizing: border-box;
  6819. width: 100%;
  6820. ">
  6821. {{ aa.title }}
  6822. </div>
  6823. </el-tooltip>
  6824. </div>
  6825. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6826. :class="{ wordTeacherA: ctJson.id == 1 }">
  6827. <div class="wordPic">
  6828. <img src="../../../assets/icon/new/course_template.png" alt />
  6829. </div>
  6830. <div style="
  6831. margin-top: 10px;
  6832. line-height: 19px;
  6833. overflow: hidden;
  6834. text-overflow: ellipsis;
  6835. white-space: nowrap;
  6836. padding: 0 20px;
  6837. ">
  6838. 简易模板
  6839. </div>
  6840. </div>
  6841. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6842. :class="{ wordTeacherA: ctJson.id == 2 }">
  6843. <div class="wordPic">
  6844. <img src="../../../assets/icon/new/course_template.png" alt />
  6845. </div>
  6846. <div style="
  6847. margin-top: 10px;
  6848. line-height: 19px;
  6849. overflow: hidden;
  6850. text-overflow: ellipsis;
  6851. white-space: nowrap;
  6852. padding: 0 20px;
  6853. ">
  6854. 智能粘贴模式
  6855. </div>
  6856. </div>
  6857. </div>
  6858. <span slot="footer" class="dialog-footer">
  6859. <el-button @click="templateDialog = false">取 消</el-button>
  6860. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6861. </span>
  6862. </el-dialog>
  6863. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6864. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6865. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6866. <div class="change_stageBox">
  6867. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6868. <div class="nt_taskBox">
  6869. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  6870. <div class="nt_taskName">
  6871. <el-tooltip effect="light" :content="t.dyName" placement="top">
  6872. <span>{{ t.dyName }}</span>
  6873. </el-tooltip>
  6874. </div>
  6875. </div>
  6876. <div class="moveBtn" v-if="unitJson3.length > 1">
  6877. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  6878. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  6879. </div>
  6880. </div>
  6881. </div>
  6882. <span slot="footer" class="dialog-footer">
  6883. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  6884. <el-button type="primary" @click="updateChange">确定</el-button>
  6885. </span>
  6886. </el-dialog>
  6887. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  6888. :before-close="handleClose" class="dialog_diy">
  6889. <div class="addTypeChoose" style="justify-content: center">
  6890. <div style="min-width: 100px">模板名称:</div>
  6891. <el-input v-model="templateName" style="width: 200px"></el-input>
  6892. </div>
  6893. <div class="addTypeBox">
  6894. <div class="addTypeChoose">
  6895. <div style="min-width: 100px">选择一级分类:</div>
  6896. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  6897. style="width: 200px">
  6898. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  6899. </el-option>
  6900. </el-select>
  6901. </div>
  6902. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  6903. <div style="min-width: 100px">选择二级分类:</div>
  6904. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  6905. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  6906. </el-option>
  6907. </el-select>
  6908. </div>
  6909. </div>
  6910. <span slot="footer" class="dialog-footer">
  6911. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  6912. <el-button @click="close()">关 闭</el-button>
  6913. </span>
  6914. </el-dialog>
  6915. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  6916. </evaBox>
  6917. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  6918. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  6919. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3" @aiConfirm="aiConfirm" :clickType="clickType">
  6920. </aiDialog>
  6921. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  6922. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  6923. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  6924. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  6925. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  6926. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  6927. </div>
  6928. </template>
  6929. <script>
  6930. import "../../../common/aws-sdk-2.235.1.min.js";
  6931. import { tools as toolsData } from "../../../common/tools.js";
  6932. // import "../../../common/aws-sdk-2.99.0.min.js";
  6933. import $ from "jquery";
  6934. import EditorBar from "../../../components/tools/wangEnduit";
  6935. import Table from "../../../components/tools/table";
  6936. import Mind from "../../tools/jsmind2";
  6937. import Time from "../../tools/time.vue";
  6938. import Sunburst from "../../tools/sunburst";
  6939. import SeeBoard from "../../tools/seeBoard";
  6940. import weilaiData from "../components/weilai.js";
  6941. import sourceDialog from "../teacherSource/dialog.vue";
  6942. import interVideo from "../interVideo/index.vue";
  6943. import englishRight from "../components/englishRight.vue";
  6944. import evaBox from "../evaBox/index.vue";
  6945. import EnglishVoice from "../EnglishVoice/index.vue";
  6946. import aiBox from './aiBox.vue'
  6947. import aiBoxRight from './aiBoxRight.vue'
  6948. import aiDialog from './aiDialog'
  6949. import aiTips from './aiTips.vue'
  6950. import tipsDialog from './tipsDialog.vue'
  6951. import { v4 as uuidv4 } from "uuid";
  6952. import MarkdownIt from "markdown-it";
  6953. import aiCreateDialog from './aiCreateDialog.vue'
  6954. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  6955. import wpdf from "../test/file/wPdf2.vue";
  6956. import wOffice from "../test/file/wOffice.vue";
  6957. import htmlDocx from "html-docx-js/dist/html-docx";
  6958. import TurndownService from 'turndown';
  6959. var OpenCC = require("opencc-js");
  6960. let converter = OpenCC.Converter({
  6961. from:'hk',
  6962. to:'cn'
  6963. })
  6964. let converter2 = OpenCC.Converter({
  6965. from:'cn',
  6966. to:'hk'
  6967. })
  6968. export default {
  6969. components: {
  6970. EditorBar,
  6971. Mind,
  6972. Time,
  6973. Sunburst,
  6974. SeeBoard,
  6975. Table,
  6976. sourceDialog,
  6977. interVideo,
  6978. englishRight,
  6979. evaBox,
  6980. EnglishVoice,
  6981. aiBox,
  6982. aiBoxRight,
  6983. aiDialog,
  6984. aiTips,
  6985. tipsDialog,
  6986. aiCreateDialog,
  6987. aiCreateVideoDialog,
  6988. wpdf,
  6989. wOffice,
  6990. },
  6991. data() {
  6992. return {
  6993. checkAll: false,
  6994. checkAll2: false,
  6995. chooseType: 1,
  6996. checkedCities: [],
  6997. isIndeterminate: true,
  6998. isIndeterminate2: true,
  6999. isSysPic: false,
  7000. isSysPic2: false,
  7001. steps: 1,
  7002. stepsNav: 1,
  7003. nbOrder: 0,
  7004. courseId: "",
  7005. chapToolsType: 0,
  7006. chapTools: [
  7007. {
  7008. tools: [],
  7009. toolDetail: "",
  7010. },
  7011. ],
  7012. line: "",
  7013. lineTitle: "",
  7014. sysPic: [],
  7015. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7016. sentenceList2: [],
  7017. isPushTitleList: [],
  7018. lineCount: 0,
  7019. lineType: 0,
  7020. chapCount: 0,
  7021. courseName: "",
  7022. isTeacherSee: false,
  7023. courseText: "",
  7024. textLoading: false,
  7025. ttextLoading: false,
  7026. courseText2: "",
  7027. preTime: 0,
  7028. formLabelWidth: "100px",
  7029. choosePicVisible: false,
  7030. sysPicVisible: false,
  7031. sysPicVisible2: false,
  7032. uploadLoading1: false,
  7033. noneBtnImg: false,
  7034. updateBoolean2: false,
  7035. unitIndex: 0,
  7036. taskCount: 0,
  7037. dialogVisible: false,
  7038. dialogVisible1: false,
  7039. dialogVisible2: false,
  7040. dialogVisible3: false,
  7041. dialogVisible4: false,
  7042. dialogVisible5: false,
  7043. dialogVisible6: false,
  7044. dialogVisible7: false,
  7045. dialogVisible8: false,
  7046. dialogVisible9: false,
  7047. dialogVisibleClass: false,
  7048. dialogVisibleMember: false,
  7049. dialogVisibleMp3: false,
  7050. dialogVisibleSelect: false,
  7051. dialogVisibleSentence: false,
  7052. dialogVisibleRate: false,
  7053. dialogVisibleChoice: false,
  7054. dialogVisiblemb: false,
  7055. dialogVisibleInvite: false,
  7056. dialogVisibleSource: false,
  7057. dialogVisibleVideo: false,
  7058. dialogVisibleStageChange: false,
  7059. dialogVisibleupdataVideoT: false,
  7060. englishDialogVisible: false,
  7061. templateDialog: false,
  7062. ctJson: {},
  7063. isClickColor: 1,
  7064. toolIndexType: "",
  7065. publicTool: 0,
  7066. searchPeople: "",
  7067. searchTN: "",
  7068. collid: '',
  7069. CollLoading: false,
  7070. userid: this.$route.query.userid,
  7071. oid: this.$route.query.oid,
  7072. org: this.$route.query.org,
  7073. role: this.$route.query.role,
  7074. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7075. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7076. dialogVisibleTable: false,
  7077. dialogVisibleWord: false,
  7078. tableJson: { text: "" },
  7079. wordJson: { text: "" },
  7080. dialogVisibleMoreUpload: false,
  7081. dialogVisiblePreTime: false,
  7082. uploadJson: [],
  7083. classJuri: [],
  7084. gradeList: [],
  7085. cover: [], //课程封面
  7086. myWord: [],
  7087. evaJuri: [],
  7088. evalua: "",
  7089. targetArray: [],
  7090. eTitle: "",
  7091. eJson: {},
  7092. fid: "", //一级
  7093. sid: "", //二级
  7094. tid: "", //二级
  7095. typeMode: 3,
  7096. eJSONNum: 0,
  7097. data: {
  7098. meta: {
  7099. name: "example",
  7100. author: "dd@163.com",
  7101. version: "0.2",
  7102. },
  7103. format: "node_array",
  7104. data: [{ id: "root", isroot: true, topic: "" }],
  7105. },
  7106. askJson: {
  7107. askCount: 1,
  7108. askTitle: "",
  7109. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7110. },
  7111. askJson2: {},
  7112. testJson: {},
  7113. testJson2: {},
  7114. selectJson: {},
  7115. selectJson2: {},
  7116. rateJson: [],
  7117. unitJson2: [],
  7118. unitJson3: [],
  7119. unitJson: [
  7120. {
  7121. dyName: "", //单元标题
  7122. chapterInfo: [
  7123. {
  7124. isread: false,
  7125. chapterid: this.guid(),
  7126. title: "",
  7127. courseName: "",
  7128. taskJson: [
  7129. {
  7130. task: "",
  7131. taskDetail: "",
  7132. chapterData: [],
  7133. toolText: "",
  7134. toolChoose: [
  7135. {
  7136. tool: [],
  7137. toolDetail: "",
  7138. toolType: 0,
  7139. askCount: 1,
  7140. askTitle: "",
  7141. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7142. },
  7143. ],
  7144. isShowTools: false,
  7145. askCount: 1,
  7146. isFold: 1,
  7147. askTitle: "",
  7148. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7149. checkJson: [{ checkCount: [], checkPerent: [] }],
  7150. homeworkList: [],
  7151. },
  7152. ],
  7153. itemCount: 1,
  7154. fileList1: [],
  7155. video: [],
  7156. testData: [],
  7157. pData: [],
  7158. templateArray: [],
  7159. },
  7160. ],
  7161. },
  7162. ],
  7163. templateArray: [],
  7164. studentJuri: [],
  7165. teacherJuri: [],
  7166. CollaborativeTeaList: [],
  7167. checkboxList: [],
  7168. checkboxList2: [],
  7169. checkboxList3: [],
  7170. classSearch: "",
  7171. gradeId: "",
  7172. number: "",
  7173. tTitle: "",
  7174. tdetail: "",
  7175. templateC: {},
  7176. AttText: {},
  7177. AttTextType: 0,
  7178. AttTextIndex: 0,
  7179. cTemplate: "",
  7180. CourseType: [],
  7181. CourseType1: [],
  7182. CourseType2: [],
  7183. CourseTypeJson: {},
  7184. CourseTypeJson1: {},
  7185. courseTypeId: [],
  7186. courseTypeId1: [],
  7187. courseTypeSon: [],
  7188. clearArray: [],
  7189. pTypeCheck: [],
  7190. pTypeCheckName: [],
  7191. loading: false,
  7192. toolType: 0,
  7193. inputShow: true,
  7194. inputShow2: true,
  7195. toolIndex: 0,
  7196. cidType: 0,
  7197. answerQ: "",
  7198. answerQ2: "",
  7199. grade: [],
  7200. grade2: [],
  7201. courseUserid: "",
  7202. timer: null,
  7203. timer2: null,
  7204. pasteTimer: null,
  7205. checkId: "",
  7206. isDelete: 1,
  7207. addindex: 0,
  7208. selectSteps: 1,
  7209. groupJson: {},
  7210. dialogVisibleGroup: false,
  7211. rightBoxHeight: 0,
  7212. ManAarray: [],
  7213. checkBoolean: false,
  7214. inviteCode: [],
  7215. inviteId: "",
  7216. icode: "",
  7217. easyArray: [2, 4],
  7218. sourceData: {},
  7219. updateSourcePan: false,
  7220. videoJson: {},
  7221. isBtnDisplay: false,
  7222. isStepDisplay: false,
  7223. isPasteStage: false,
  7224. isPasteTask: false,
  7225. isPasteChoice: false,
  7226. imageList: [],
  7227. imageloading: false,
  7228. imageloading2: false,
  7229. searchImageValue: "",
  7230. ppage: 1,
  7231. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7232. oldIndex: 0,
  7233. dragType: "",
  7234. oldUnitIndex: 0,
  7235. oldData: null,
  7236. newIndex: "",
  7237. englishList: {},
  7238. typeIndex: "",
  7239. courseState: 5,
  7240. taskJSONa: [
  7241. {
  7242. task: "",
  7243. taskDetail: "",
  7244. chapterData: [],
  7245. toolText: "",
  7246. toolChoose: [
  7247. {
  7248. tool: [],
  7249. toolDetail: "",
  7250. toolType: 0,
  7251. askCount: 1,
  7252. askTitle: "",
  7253. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7254. },
  7255. ],
  7256. isShowTools: false,
  7257. askCount: 1,
  7258. isFold: 1,
  7259. askTitle: "",
  7260. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7261. checkJson: [{ checkCount: [], checkPerent: [] }],
  7262. homeworkList: [],
  7263. },
  7264. ],
  7265. checkUnitIndex: 0,
  7266. isdrag: "",
  7267. evaIndex: "",
  7268. evatIndex: "",
  7269. evaBoxDialog: false,
  7270. EnglishVoiceDialog: false,
  7271. englishVoiceJson: {},
  7272. cetIndex: "",
  7273. cettIndex: "",
  7274. cetBoxDialog: false,
  7275. templateName: "",
  7276. setTypeJson: {
  7277. one: "",
  7278. two: "",
  7279. },
  7280. twoJson: [],
  7281. oneJson: [],
  7282. updateKey: 1,
  7283. isOutline: false,
  7284. isOutline2: false,
  7285. infoData: [],
  7286. infoproVisible: false,
  7287. infoisFinishSize: 0,
  7288. infoisAllSize: 0,
  7289. infoprogress: 0,
  7290. taskDetailLoading: [],
  7291. ttaskDetailLoading: [],
  7292. taskDetailLoading2: [],
  7293. ttaskDetailLoading2: [],
  7294. taskDetailLoading3: [],
  7295. ttaskDetailLoading3: [],
  7296. taskDetailLoading4: [],
  7297. taskDetailLoading5: [],
  7298. ttaskDetailLoading5: [],
  7299. dArray: [],
  7300. dialogVisibleAiD: false,
  7301. aitype: "",
  7302. aiJson: {
  7303. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7304. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7305. "aiTask": "请根据<教学任务教案>。",
  7306. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7307. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7308. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7309. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7310. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7311. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7312. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7313. },
  7314. aiText: "",
  7315. aiText2: "",
  7316. aiText3: "",
  7317. aiCallBack: "",
  7318. aiIndex: "",
  7319. clickType: 1,
  7320. promptShow: false,
  7321. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7322. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7323. dialogVisibleTips: false,
  7324. tipsJson: {},
  7325. cpote:{
  7326. cpote1: '',
  7327. cpote2: '',
  7328. cpote3: '',
  7329. cpote4: '',
  7330. },
  7331. cpoteLoading:{
  7332. cpote1: false,
  7333. cpote2: false,
  7334. cpote3: false,
  7335. cpote4: false,
  7336. },
  7337. cpotetLoading:{
  7338. cpote1: false,
  7339. cpote2: false,
  7340. cpote3: false,
  7341. cpote4: false,
  7342. },
  7343. cpoteType: 0,
  7344. dialogVisibleAiCreate: false,
  7345. dialogVisibleAiCreateVideo: false,
  7346. teacherText: [],
  7347. isFileSearch: true,
  7348. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  7349. 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'],
  7350. courseJie:1,
  7351. courseTime:45,
  7352. allTextArray: [],
  7353. dialogVisiblePdf: false,
  7354. dialogVisibleOffice: false,
  7355. wurl: "",
  7356. choiceLoading: false,
  7357. teacherInfoData: [],
  7358. teacherinfoproVisible: false,
  7359. teacherinfoisFinishSize: 0,
  7360. teacherinfoisAllSize: 0,
  7361. teacherinfoprogress: 0,
  7362. teacherCourseText: "",
  7363. teacherTextLoading: false,
  7364. tteacherTextLoading: false,
  7365. targetCourseText: "",
  7366. targetTextLoading: false,
  7367. ttargetTextLoading: false,
  7368. cankaoInfoData: [],
  7369. fileSLoading: false,
  7370. infoData2: [],
  7371. isuseT: false,
  7372. mode: 1,
  7373. targetCourseText2: "",
  7374. targetTextLoading2: false,
  7375. ttargetTextLoading2: false,
  7376. courseTextBool: false,
  7377. teacherCourseTextB: true,
  7378. targetCourseTextB: true,
  7379. courseTextB: true,
  7380. targetCourseText2B: true,
  7381. // 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'],
  7382. yiKeTemplateArray:[],
  7383. taskLoading: [],
  7384. ruleLoading: [],
  7385. mubiaoInfoData: [],
  7386. mubiaoinfoproVisible: false,
  7387. mubiaoinfoisFinishSize: 0,
  7388. mubiaoinfoisAllSize: 0,
  7389. mubiaoinfoprogress: 0,
  7390. xuanzeInfoData: [],
  7391. xuanzeinfoproVisible: false,
  7392. xuanzeinfoisFinishSize: 0,
  7393. xuanzeinfoisAllSize: 0,
  7394. xuanzeinfoprogress: 0,
  7395. pingjiaInfoData: [],
  7396. pingjiainfoproVisible: [],
  7397. pingjiainfoisFinishSize: [],
  7398. pingjiainfoisAllSize: [],
  7399. pingjiainfoprogress: [],
  7400. taskGLoading: [],
  7401. isOutlineCancelToken: null,
  7402. isFileCancelToken: null,
  7403. isTargetCancelToken1: null,
  7404. isTargetCancelToken2: null,
  7405. isTextCancelToken: null,
  7406. isTeacherTextCancelToken: null,
  7407. isTeacherTaskCancelToken: null,
  7408. isOutlineTaskCancelToken: [],
  7409. isTextCancelSource: null,
  7410. isOutlineTaskCancelSource: [],
  7411. isTeacherTextCancelSource: null,
  7412. isTargetCancelSource1: null,
  7413. isTargetCancelSource2: null,
  7414. fileidArray: [],
  7415. interPan: true,
  7416. interFlash: true,
  7417. agentid: "",
  7418. interSetting: false,
  7419. chatid: "",
  7420. languageSetting: 0, //0中文 1繁体 2英文
  7421. };
  7422. },
  7423. directives: {
  7424. autoHeight: {
  7425. update(el, binding) {
  7426. const { value } = binding;
  7427. if (value && typeof value === "number") {
  7428. el.style.height = `${value}px`;
  7429. } else {
  7430. el.style.height = "auto";
  7431. }
  7432. },
  7433. componentUpdated(el) {
  7434. el.style.height = `${el.scrollHeight + 25}px`;
  7435. },
  7436. },
  7437. },
  7438. computed: {
  7439. // rightBoxHeight: function () {
  7440. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7441. // },
  7442. offsetLetfPx: function () {
  7443. //addnum可以直接在模板语法里面用,相当于data内的值
  7444. return (
  7445. $(".cru_select")[this.unitIndex] &&
  7446. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7447. );
  7448. },
  7449. getMan2() {
  7450. return function (people) {
  7451. let _people = people;
  7452. let _people2 = "";
  7453. if (this.ManAarray.length) {
  7454. for (var i = 0; i < this.ManAarray.length; i++) {
  7455. if (this.ManAarray[i].userid == people) {
  7456. _people2 = this.ManAarray[i].name;
  7457. break;
  7458. }
  7459. }
  7460. }
  7461. if (people == this.courseUserid) {
  7462. return "";
  7463. }
  7464. return this.ManAarray.length ? _people2 : "";
  7465. };
  7466. },
  7467. getListMan2() {
  7468. return function (list) {
  7469. let _people2 = [];
  7470. if (this.ManAarray.length) {
  7471. for (var j = 0; j < list.length; j++) {
  7472. let people = list[j];
  7473. for (var i = 0; i < this.ManAarray.length; i++) {
  7474. if (
  7475. this.ManAarray[i].userid == people &&
  7476. people != this.courseUserid
  7477. ) {
  7478. _people2.push(this.ManAarray[i].name);
  7479. break;
  7480. }
  7481. }
  7482. }
  7483. }
  7484. return this.ManAarray.length ? _people2.join("、") : "";
  7485. };
  7486. },
  7487. isInvite() {
  7488. return function (cid) {
  7489. let array = [];
  7490. for (var i = 0; i < this.inviteCode.length; i++) {
  7491. array.push(this.inviteCode[i].cid);
  7492. }
  7493. return array.indexOf(cid) != -1;
  7494. };
  7495. },
  7496. getInviteCodeC() {
  7497. return function (cid) {
  7498. let array = [];
  7499. for (var i = 0; i < this.inviteCode.length; i++) {
  7500. array.push(this.inviteCode[i].cid);
  7501. }
  7502. return this.inviteCode[array.indexOf(cid)].ic;
  7503. };
  7504. },
  7505. getClassC() {
  7506. return function (c) {
  7507. let _c2 = "";
  7508. if (this.grade.length) {
  7509. for (var i = 0; i < this.grade.length; i++) {
  7510. if (this.grade[i].id == c) {
  7511. _c2 = this.grade[i].name;
  7512. break;
  7513. }
  7514. }
  7515. }
  7516. return this.grade.length ? _c2 : "";
  7517. };
  7518. },
  7519. getListClassC() {
  7520. return function (list) {
  7521. let _c2 = [];
  7522. if (this.grade.length) {
  7523. for (var j = 0; j < list.length; j++) {
  7524. let c = list[j];
  7525. for (var i = 0; i < this.grade.length; i++) {
  7526. if (this.grade[i].id == c) {
  7527. _c2.push(this.grade[i].name);
  7528. break;
  7529. }
  7530. }
  7531. }
  7532. }
  7533. return this.grade.length ? _c2.join("、") : "";
  7534. };
  7535. },
  7536. MarkdownT() {
  7537. return function (c) {
  7538. let md = new MarkdownIt();
  7539. return c
  7540. ? md.render(c) : "";
  7541. };
  7542. },
  7543. panOutline(){
  7544. return function () {
  7545. let count = 0;
  7546. for(var i = 0; i < this.unitJson.length; i++){
  7547. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7548. for(var j = 0; j < _task.length; j++){
  7549. if(_task[j].taskDetail2){
  7550. count++
  7551. }
  7552. }
  7553. }
  7554. return count;
  7555. };
  7556. },
  7557. panTeacher(){
  7558. return function () {
  7559. let count = 0;
  7560. for(var i = 0; i < this.unitJson.length; i++){
  7561. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7562. for(var j = 0; j < _task.length; j++){
  7563. if(_task[j].taskDetail3){
  7564. count++
  7565. }
  7566. }
  7567. }
  7568. return count;
  7569. };
  7570. },
  7571. dataCheckPan(){
  7572. return function (fileid) {
  7573. for(let i = 0; i < this.infoData.length; i++){
  7574. if(this.infoData[i].fileid == fileid){
  7575. return true
  7576. }
  7577. }
  7578. return false;
  7579. };
  7580. },
  7581. interUrl: function () {
  7582. let agentid = this.aiJson.agentid
  7583. let sagentid = this.aiJson.sagentid
  7584. let url = ''
  7585. if(sagentid){
  7586. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7587. }else{
  7588. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7589. }
  7590. return url;
  7591. },
  7592. },
  7593. watch: {
  7594. unitIndex(newValue, oldValue) {
  7595. // return;
  7596. if (this.isDelete == 2) {
  7597. this.isDelete = 1;
  7598. return;
  7599. }
  7600. if (this.cid != "") {
  7601. let _unitIndex = oldValue;
  7602. if (
  7603. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7604. JSON.stringify(this.unitJson[_unitIndex])
  7605. ) {
  7606. this.$refs.rightboxR.scrollTop = 0;
  7607. return;
  7608. }
  7609. let cPan = 1;
  7610. for (
  7611. var j = 0;
  7612. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7613. j++
  7614. ) {
  7615. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7616. j
  7617. ].proVisible = false;
  7618. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7619. j
  7620. ].proVisible2 = false;
  7621. if (
  7622. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7623. .length > 1
  7624. ) {
  7625. for (
  7626. var z = 0;
  7627. z <
  7628. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7629. .length;
  7630. z++
  7631. ) {
  7632. if (
  7633. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7634. .toolChoose[z].tool.length
  7635. ) {
  7636. this.$message.error("请把工具添加完整");
  7637. cPan = 2;
  7638. break;
  7639. }
  7640. }
  7641. }
  7642. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7643. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7644. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7645. (ele) => {
  7646. return ele.value != "" || ele.detail != "" || ele.target != "";
  7647. }
  7648. );
  7649. }
  7650. }
  7651. if (cPan == 2) {
  7652. this.unitIndex = oldValue;
  7653. return;
  7654. }
  7655. for (var i = 0; i < this.unitJson.length; i++) {
  7656. if (this.addindex != i) {
  7657. delete this.unitJson[i].isUpdate;
  7658. }
  7659. }
  7660. this.$refs.rightboxR.scrollTop = 0;
  7661. this.addindex = -1;
  7662. let params = [
  7663. {
  7664. cid: this.cid,
  7665. chapters: JSON.stringify(this.unitJson),
  7666. uid: this.userid,
  7667. unitIndex: _unitIndex,
  7668. },
  7669. ];
  7670. this.ajax
  7671. .post(this.$store.state.api + "updateWorkNew4", params)
  7672. .then((res) => {
  7673. // this.$message({
  7674. // message: "修改成功",
  7675. // type: "success",
  7676. // });
  7677. // this.courseId = this.cid;
  7678. this.addtips()
  7679. })
  7680. .catch((err) => {
  7681. this.$message.error("网络不佳");
  7682. console.error(err);
  7683. });
  7684. }
  7685. },
  7686. steps(newValue, old) {
  7687. if(newValue == 2){
  7688. this.steps = old
  7689. }
  7690. if (newValue == 4) {
  7691. let cPan = 1;
  7692. for (var i = 0; i < this.unitJson.length; i++) {
  7693. for (
  7694. var j = 0;
  7695. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7696. j++
  7697. ) {
  7698. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7699. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7700. if (
  7701. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7702. ) {
  7703. for (
  7704. var z = 0;
  7705. z <
  7706. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7707. z++
  7708. ) {
  7709. if (
  7710. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7711. .tool.length
  7712. ) {
  7713. this.$message.error("请把工具添加完整");
  7714. cPan = 2;
  7715. break;
  7716. }
  7717. }
  7718. }
  7719. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7720. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7721. i
  7722. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7723. return ele.value != "" || ele.detail != "" || ele.target != "";
  7724. });
  7725. }
  7726. }
  7727. }
  7728. this.inputShow = true;
  7729. if (cPan == 2) {
  7730. this.steps = old;
  7731. return;
  7732. }
  7733. this.goTo(
  7734. "/course?userid=" +
  7735. this.userid +
  7736. "&oid=" +
  7737. this.oid +
  7738. "&org=" +
  7739. this.org +
  7740. "&role=" +
  7741. this.role
  7742. );
  7743. }
  7744. },
  7745. courseName(newVal, oldVal) {
  7746. this.setCourseInfo();
  7747. },
  7748. courseTypeId: {
  7749. immediate: true,
  7750. deep: true,
  7751. handler(newValue, oldValue) {
  7752. this.setCourseInfo();
  7753. }
  7754. }
  7755. },
  7756. methods: {
  7757. tableRowClassName({ row, rowIndex }) {
  7758. if ((rowIndex + 1) % 2 === 0) {
  7759. return "even_row";
  7760. } else {
  7761. return "";
  7762. }
  7763. },
  7764. close() {
  7765. this.cetIndex = "";
  7766. this.cettIndex = "";
  7767. this.templateName = "";
  7768. this.cetBoxDialog = false;
  7769. },
  7770. openAI() {
  7771. top.postMessage({ tools: "64" }, "*");
  7772. },
  7773. setMan() {
  7774. // let teacherJuri = this.teacherJuri2;
  7775. this.ManAarray = [];
  7776. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7777. if (_user.indexOf(this.userid) == -1) {
  7778. _user.push(this.userid);
  7779. }
  7780. if (_user.indexOf(this.courseUserid) == -1) {
  7781. _user.push(this.courseUserid);
  7782. }
  7783. let params = {
  7784. uid: _user.join(","),
  7785. };
  7786. this.ajax
  7787. .get(this.$store.state.api + "getAllUserById", params)
  7788. .then((res) => {
  7789. let teacherJuri = res.data[0];
  7790. this.ManAarray = teacherJuri;
  7791. })
  7792. .catch((err) => {
  7793. console.error(err);
  7794. });
  7795. },
  7796. previewImg(url) {
  7797. this.$hevueImgPreview(url);
  7798. },
  7799. btnDisplay(bool) {
  7800. this.isBtnDisplay = bool;
  7801. },
  7802. stepDisplay(bool) {
  7803. this.isStepDisplay = bool;
  7804. },
  7805. scrollChange() {
  7806. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  7807. },
  7808. addHw(e) {
  7809. var el = e.currentTarget;
  7810. el.getElementsByTagName("input")[0].click();
  7811. },
  7812. change(val) {
  7813. if (this.dialogVisible1) {
  7814. this.tdetail = val;
  7815. } else if (this.dialogVisible6) {
  7816. this.AttText.text = val;
  7817. } else if (this.dialogVisible2) {
  7818. this.cTemplate = val;
  7819. } else if (this.dialogVisibleTable) {
  7820. this.tableJson.text = val;
  7821. }
  7822. this.$forceUpdate();
  7823. console.log(val);
  7824. },
  7825. change2(val) {
  7826. console.log(val);
  7827. this.$forceUpdate();
  7828. },
  7829. handleClose(done) {
  7830. done();
  7831. },
  7832. closePan(tool) {
  7833. if (tool == 15) {
  7834. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  7835. this.dialogVisible8 = false;
  7836. } else {
  7837. this.closeConfirm(tool);
  7838. }
  7839. } else if (tool == 4) {
  7840. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  7841. this.dialogVisible5 = false;
  7842. } else {
  7843. this.closeConfirm(tool);
  7844. }
  7845. } else if (tool == 45) {
  7846. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  7847. this.dialogVisibleChoice = false;
  7848. } else {
  7849. this.closeConfirm(tool);
  7850. }
  7851. } else if (tool == 41) {
  7852. if (
  7853. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  7854. ) {
  7855. this.dialogVisibleSelect = false;
  7856. } else {
  7857. this.closeConfirm(tool);
  7858. }
  7859. } else if (tool == 47) {
  7860. if (
  7861. JSON.stringify(this.sentenceList) ==
  7862. JSON.stringify(this.sentenceList2)
  7863. ) {
  7864. this.dialogVisibleSentence = false;
  7865. } else {
  7866. this.closeConfirm(tool);
  7867. }
  7868. } else if (tool == 69) {
  7869. if (
  7870. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  7871. ) {
  7872. this.englishDialogVisible = false;
  7873. } else {
  7874. this.closeConfirm(tool);
  7875. }
  7876. }
  7877. },
  7878. closeConfirm(tool) {
  7879. this.$confirm("是否保存已编辑内容?", "提示", {
  7880. confirmButtonText: "保存",
  7881. cancelButtonText: "不保存",
  7882. type: "warning",
  7883. })
  7884. .then(() => {
  7885. if (tool == 15) {
  7886. this.addAnswer();
  7887. } else if (tool == 4) {
  7888. this.addAsk();
  7889. } else if (tool == 45) {
  7890. this.addTest();
  7891. } else if (tool == 41) {
  7892. this.addSelectAnswer();
  7893. } else if (tool == 47) {
  7894. this.addSentenceTool();
  7895. } else if (tool == 69) {
  7896. this.addEnglish();
  7897. }
  7898. })
  7899. .catch(() => {
  7900. if (tool == 15) {
  7901. this.dialogVisible8 = false;
  7902. } else if (tool == 4) {
  7903. this.dialogVisible5 = false;
  7904. } else if (tool == 45) {
  7905. this.dialogVisibleChoice = false;
  7906. } else if (tool == 41) {
  7907. this.dialogVisibleSelect = false;
  7908. } else if (tool == 47) {
  7909. this.dialogVisibleSentence = false;
  7910. } else if (tool == 69) {
  7911. this.englishDialogVisible = false;
  7912. }
  7913. });
  7914. },
  7915. addEnglish(jsonType) {
  7916. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  7917. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  7918. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  7919. if (
  7920. this.englishList.engTitle == "" ||
  7921. this.englishList.englishText == ""
  7922. ) {
  7923. this.$message.error("请将内容填写完整!");
  7924. return;
  7925. }
  7926. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7927. this.taskCount
  7928. ].toolChoose[this.toolIndex].englishList = this.englishList;
  7929. this.englishList = {};
  7930. if (jsonType && jsonType == 1) {
  7931. this.englishDialogVisible = true;
  7932. } else {
  7933. this.englishDialogVisible = false;
  7934. }
  7935. if (
  7936. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  7937. .toolChoose[this.toolIndex].tool != 69
  7938. ) {
  7939. this.addTools(69, this.taskCount, this.toolIndex);
  7940. }
  7941. },
  7942. imgChange2(i, j) {
  7943. var _tmp = this.testJson.testJson[i].checkList[j];
  7944. this.noneBtnImg = _tmp.length >= 1;
  7945. },
  7946. imgChange3(i) {
  7947. var _tmp = this.testJson.testJson[i];
  7948. this.noneBtnImg = _tmp.length >= 1;
  7949. },
  7950. imgChange1(file, fileList, type, itemTaskIndex) {
  7951. if (type == 1) {
  7952. var _tmp = this.cover;
  7953. } else if (
  7954. type == 2 ||
  7955. type == 3 ||
  7956. type == 6 ||
  7957. type == 7 ||
  7958. type == 8
  7959. ) {
  7960. var _tmp =
  7961. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7962. .chapterData;
  7963. } else if (type == 4) {
  7964. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  7965. } else {
  7966. var _tmp =
  7967. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7968. .homeworkList;
  7969. }
  7970. this.noneBtnImg = _tmp.length >= 1;
  7971. },
  7972. goTo(path) {
  7973. this.$router.push(path);
  7974. },
  7975. guid() {
  7976. var _num,
  7977. i,
  7978. _guid = "";
  7979. for (i = 0; i < 32; i++) {
  7980. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  7981. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  7982. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  7983. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  7984. _guid += "-";
  7985. }
  7986. }
  7987. return _guid;
  7988. },
  7989. retrunCourse() {
  7990. if(this.istemplate == 1){
  7991. this.goTo(
  7992. "/course?userid=" +
  7993. this.userid +
  7994. "&oid=" +
  7995. this.oid +
  7996. "&org=" +
  7997. this.org +
  7998. "&role=" +
  7999. this.role
  8000. );
  8001. return
  8002. }
  8003. this.$confirm("是否保存已编辑内容?", "提示", {
  8004. confirmButtonText: "保存",
  8005. cancelButtonText: "不保存",
  8006. distinguishCancelAndClose: true,
  8007. type: "warning",
  8008. })
  8009. .then(() => {
  8010. if (this.taskLoading.length) {
  8011. let _pan = 1
  8012. for(var k = 0; k < this.taskLoading.length; k++){
  8013. if(this.taskLoading[k]){
  8014. this.$message({
  8015. message: `请等待任务${k+1}回答完毕后再保存`,
  8016. type: "warning"
  8017. });
  8018. _pan = 2
  8019. }
  8020. }
  8021. if(_pan == 2){
  8022. return
  8023. }
  8024. }
  8025. if(this.taskGLoading.length){
  8026. let _pan = 1
  8027. for(var k = 0; k < this.taskGLoading.length; k++){
  8028. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8029. this.$message({
  8030. message: `请等待任务${k+1}回答完毕后再保存`,
  8031. type: "warning"
  8032. });
  8033. _pan = 2
  8034. }
  8035. }
  8036. if(_pan == 2){
  8037. return
  8038. }
  8039. }
  8040. if (this.cid == "" || this.cid == undefined) {
  8041. if (this.courseName == "") {
  8042. this.$message.error("请补充填写课程名称");
  8043. return;
  8044. } else {
  8045. this.addWork();
  8046. }
  8047. this.steps = 4;
  8048. } else {
  8049. if (this.courseName == "") {
  8050. this.$message.error("请补充填写课程名称");
  8051. return;
  8052. } else {
  8053. if (this.userid != this.courseUserid && this.role != "1") {
  8054. this.updateWork2();
  8055. } else {
  8056. this.updateWork();
  8057. }
  8058. this.steps = 4;
  8059. }
  8060. }
  8061. })
  8062. .catch((v) => {
  8063. console.log(v);
  8064. if (v == "cancel") {
  8065. this.goTo(
  8066. "/course?userid=" +
  8067. this.userid +
  8068. "&oid=" +
  8069. this.oid +
  8070. "&org=" +
  8071. this.org +
  8072. "&role=" +
  8073. this.role
  8074. );
  8075. }
  8076. });
  8077. },
  8078. lastSteps() {
  8079. if (this.steps == 4) {
  8080. this.goTo(
  8081. "/course?userid=" +
  8082. this.userid +
  8083. "&oid=" +
  8084. this.oid +
  8085. "&org=" +
  8086. this.org +
  8087. "&role=" +
  8088. this.role
  8089. );
  8090. } else {
  8091. // if (this.cidType == 0) {
  8092. // this.steps--;
  8093. // if (this.steps == 1) {
  8094. // setTimeout(() => {
  8095. // this.checkEva(this.checkId);
  8096. // setTimeout(() => {
  8097. // this.checkEva(this.checkId);
  8098. // }, 100);
  8099. // }, 100);
  8100. // }
  8101. // } else {
  8102. if (this.steps == 3) {
  8103. this.steps = 1;
  8104. setTimeout(() => {
  8105. this.checkEva(this.checkId);
  8106. setTimeout(() => {
  8107. this.checkEva(this.checkId);
  8108. }, 100);
  8109. }, 100);
  8110. }
  8111. // }
  8112. }
  8113. },
  8114. navSteps(s) {
  8115. if (this.courseName == "") {
  8116. this.$message.error("请补充填写课程名称");
  8117. return;
  8118. }
  8119. if (this.cidType == 0) {
  8120. if (this.steps == 1) {
  8121. if (this.cid == "" || this.cid == undefined) {
  8122. this.addWork();
  8123. } else {
  8124. if (this.userid != this.courseUserid && this.role != "1") {
  8125. this.updateWork2();
  8126. } else {
  8127. this.updateWork();
  8128. }
  8129. }
  8130. }
  8131. if (s == 1) {
  8132. this.steps = 1;
  8133. setTimeout(() => {
  8134. this.checkEva(this.checkId);
  8135. setTimeout(() => {
  8136. this.checkEva(this.checkId);
  8137. }, 100);
  8138. }, 100);
  8139. }
  8140. if (s == 2) {
  8141. this.steps = 2;
  8142. }
  8143. if (s == 3) {
  8144. this.cTemplate = this.templateC.content;
  8145. this.dialogVisible2 = false;
  8146. this.steps = 3;
  8147. this.isClickColor = 1;
  8148. this.unitJson[
  8149. this.unitIndex
  8150. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8151. this.$forceUpdate();
  8152. setTimeout(() => {
  8153. this.checkEva(this.checkId);
  8154. setTimeout(() => {
  8155. this.checkEva(this.checkId);
  8156. }, 100);
  8157. }, 1000);
  8158. }
  8159. } else {
  8160. if (this.steps == 1) {
  8161. if (this.cid == "" || this.cid == undefined) {
  8162. this.addWork();
  8163. } else {
  8164. if (this.userid != this.courseUserid && this.role != "1") {
  8165. this.updateWork2();
  8166. } else {
  8167. this.updateWork();
  8168. }
  8169. }
  8170. }
  8171. if (s == 1) {
  8172. this.steps = 1;
  8173. setTimeout(() => {
  8174. this.checkEva(this.checkId);
  8175. setTimeout(() => {
  8176. this.checkEva(this.checkId);
  8177. }, 100);
  8178. }, 100);
  8179. }
  8180. if (s == 3) {
  8181. this.cTemplate = this.templateC.content;
  8182. this.dialogVisible2 = false;
  8183. this.steps = 3;
  8184. this.isClickColor = 1;
  8185. this.unitJson[
  8186. this.unitIndex
  8187. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8188. this.$forceUpdate();
  8189. setTimeout(() => {
  8190. this.checkEva(this.checkId);
  8191. setTimeout(() => {
  8192. this.checkEva(this.checkId);
  8193. }, 100);
  8194. }, 1000);
  8195. }
  8196. }
  8197. this.$refs.stepBox.scrollTop = 0;
  8198. },
  8199. nextSteps(clickType, ttype) {
  8200. if(!this.time()){
  8201. return
  8202. }
  8203. // if (this.cidType == 1) {
  8204. if (this.steps == 1) {
  8205. if (this.courseName != "") {
  8206. if ((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1) || (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  8207. // this.$message({
  8208. // message: "请回答完毕后再次发送",
  8209. // type: "warning"
  8210. // });
  8211. if(this.ttaskDetailLoading5.length){
  8212. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8213. this.$message({
  8214. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8215. type: "warning"
  8216. });
  8217. }
  8218. if(this.ttaskDetailLoading.length){
  8219. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8220. this.$message({
  8221. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8222. type: "warning"
  8223. });
  8224. }
  8225. if(this.cpotetLoading.cpote1){
  8226. this.$message({
  8227. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8228. type: "warning"
  8229. });
  8230. }
  8231. if(this.cpotetLoading.cpote2){
  8232. this.$message({
  8233. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8234. type: "warning"
  8235. });
  8236. }
  8237. if(this.cpotetLoading.cpote3){
  8238. this.$message({
  8239. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8240. type: "warning"
  8241. });
  8242. }
  8243. if(this.cpotetLoading.cpote4){
  8244. this.$message({
  8245. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8246. type: "warning"
  8247. });
  8248. }
  8249. return;
  8250. }
  8251. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8252. if(!this.courseText && !this.teacherCourseText){
  8253. this.$message.error("请生成简要描述后再生成大纲");
  8254. return;
  8255. }
  8256. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8257. this.openAiDialog(clickType, 'aiOutline2')
  8258. }else {
  8259. this.openAiDialog(clickType, 'aiOutline')
  8260. }
  8261. return;
  8262. }
  8263. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8264. let _type = ''
  8265. if(this.cpoteType == 0){
  8266. _type = 'aiCpote1'
  8267. }else if(this.cpoteType == 1){
  8268. _type = 'aiCpote2'
  8269. }else if(this.cpoteType == 2){
  8270. _type = 'aiCpote3'
  8271. }else if(this.cpoteType == 3){
  8272. _type = 'aiCpote4'
  8273. }
  8274. this.cpoteType++
  8275. this.openAiDialog(clickType, _type)
  8276. return;
  8277. }
  8278. // if (!this.isOutline2) {
  8279. // this.openAiDialog(clickType, 'aiTeacher')
  8280. // return;
  8281. // }
  8282. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8283. this.openAiDialog(clickType, 'aiTeacher3')
  8284. return;
  8285. }
  8286. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8287. this.openAiDialog(clickType, 'aiTeacher2')
  8288. return;
  8289. }
  8290. let _pan2 = 1
  8291. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8292. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8293. _pan2 = 2
  8294. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8295. break;
  8296. }
  8297. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8298. _pan2 = 2
  8299. this.$message.error(`请完善任务${k+1}的课程教案`)
  8300. break;
  8301. }
  8302. }
  8303. if(_pan2 == 2){
  8304. return;
  8305. }
  8306. const functionA = () => {
  8307. setTimeout(() => {
  8308. this.loading = false
  8309. this.steps = 3;
  8310. }, 0)
  8311. this.isClickColor = 1;
  8312. this.unitJson[
  8313. this.unitIndex
  8314. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8315. this.$forceUpdate();
  8316. setTimeout(() => {
  8317. this.checkEva(this.checkId);
  8318. setTimeout(() => {
  8319. this.checkEva(this.checkId);
  8320. }, 100);
  8321. }, 1000);
  8322. if (this.cid == "" || this.cid == undefined) {
  8323. this.addWork();
  8324. } else {
  8325. if (this.userid != this.courseUserid && this.role != "1") {
  8326. this.updateWork2();
  8327. } else {
  8328. this.updateWork();
  8329. }
  8330. }
  8331. }
  8332. if (this.cid) {
  8333. this.loading = true
  8334. functionA()
  8335. } else {
  8336. // if(ttype == 2){
  8337. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8338. // }else {
  8339. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  8340. // }
  8341. }
  8342. } else {
  8343. this.$message.error("请补充填写课程名称");
  8344. return;
  8345. }
  8346. } else if (this.steps == 3) {
  8347. if (this.taskLoading.length) {
  8348. let _pan = 1
  8349. for(var k = 0; k < this.taskLoading.length; k++){
  8350. if(this.taskLoading[k]){
  8351. this.$message({
  8352. message: `请等待任务${k+1}回答完毕后再上传`,
  8353. type: "warning"
  8354. });
  8355. _pan = 2
  8356. }
  8357. }
  8358. if(_pan == 2){
  8359. return
  8360. }
  8361. }
  8362. if(this.taskGLoading.length){
  8363. let _pan = 1
  8364. for(var k = 0; k < this.taskGLoading.length; k++){
  8365. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8366. this.$message({
  8367. message: `请等待任务${k+1}回答完毕后再保存`,
  8368. type: "warning"
  8369. });
  8370. _pan = 2
  8371. }
  8372. }
  8373. if(_pan == 2){
  8374. return
  8375. }
  8376. }
  8377. if (this.cid == "" || this.cid == undefined) {
  8378. if (this.courseName == "") {
  8379. this.$message.error("请补充填写课程名称");
  8380. return;
  8381. } else {
  8382. this.addWork();
  8383. this.steps++;
  8384. }
  8385. } else {
  8386. if (this.courseName == "") {
  8387. this.$message.error("请补充填写课程名称");
  8388. return;
  8389. } else {
  8390. if (this.userid != this.courseUserid && this.role != "1") {
  8391. this.updateWork2();
  8392. } else {
  8393. this.updateWork();
  8394. }
  8395. this.steps++;
  8396. }
  8397. }
  8398. }
  8399. // } else {
  8400. // if (this.steps == 1) {
  8401. // if (this.courseName != "") {
  8402. // if (this.cid == "" || this.cid == undefined) {
  8403. // this.addWork();
  8404. // } else {
  8405. // if (this.userid != this.courseUserid && this.role != "1") {
  8406. // // this.updateWork2();
  8407. // } else {
  8408. // this.updateWork();
  8409. // }
  8410. // }
  8411. // this.steps++;
  8412. // } else {
  8413. // this.$message.error("请补充填写课程名称");
  8414. // return;
  8415. // }
  8416. // } else if (this.steps == 2) {
  8417. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  8418. // this.cTemplate = this.templateC.content;
  8419. // }
  8420. // this.dialogVisible2 = false;
  8421. // this.steps++;
  8422. // setTimeout(() => {
  8423. // this.checkEva(this.checkId);
  8424. // setTimeout(() => {
  8425. // this.checkEva(this.checkId);
  8426. // }, 100);
  8427. // }, 1000);
  8428. // } else if (this.steps == 3) {
  8429. // if (this.cid == "" || this.cid == undefined) {
  8430. // if (this.courseName == "") {
  8431. // this.$message.error("请补充填写课程名称");
  8432. // return;
  8433. // } else {
  8434. // this.addWork();
  8435. // this.steps++;
  8436. // }
  8437. // } else {
  8438. // if (this.courseName == "") {
  8439. // this.$message.error("请补充填写课程名称");
  8440. // return;
  8441. // } else {
  8442. // if (this.userid != this.courseUserid && this.role != "1") {
  8443. // this.updateWork2();
  8444. // } else {
  8445. // this.updateWork();
  8446. // }
  8447. // this.steps++;
  8448. // }
  8449. // }
  8450. // }
  8451. // }
  8452. this.$refs.stepBox.scrollTop = 0;
  8453. },
  8454. unitSet(i) {
  8455. if (this.unitIndex == i) {
  8456. return;
  8457. }
  8458. this.unitIndex = i;
  8459. this.isClickColor = 1;
  8460. // this.$refs.rightboxR.scrollTop = 0;
  8461. this.$refs.unitBox.scrollTop = 0;
  8462. },
  8463. panUnitJson() {
  8464. let _unitIndex = this.unitIndex;
  8465. let cPan = 1;
  8466. for (
  8467. var j = 0;
  8468. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8469. j++
  8470. ) {
  8471. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8472. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8473. j
  8474. ].proVisible2 = false;
  8475. if (
  8476. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8477. .length > 1
  8478. ) {
  8479. for (
  8480. var z = 0;
  8481. z <
  8482. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8483. .length;
  8484. z++
  8485. ) {
  8486. if (
  8487. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8488. z
  8489. ].tool.length
  8490. ) {
  8491. this.$message.error("请把工具添加完整");
  8492. cPan = 2;
  8493. break;
  8494. }
  8495. }
  8496. }
  8497. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8498. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8499. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8500. (ele) => {
  8501. return ele.value != "" || ele.detail != "" || ele.target != "";
  8502. }
  8503. );
  8504. }
  8505. }
  8506. return cPan;
  8507. },
  8508. unitOpen(i) {
  8509. if (this.unitJson[i].toolOpen) {
  8510. this.unitJson[i].toolOpen = false;
  8511. } else {
  8512. this.unitJson[i].toolOpen = true;
  8513. }
  8514. this.updateWork();
  8515. this.$forceUpdate();
  8516. },
  8517. unitSet2(i) {
  8518. if (this.panUnitJson() == 2) {
  8519. return;
  8520. }
  8521. // if(this.unitJson[i].toolOpen){
  8522. // this.unitJson[i].toolOpen = false
  8523. // this.updateWork()
  8524. // this.$forceUpdate()
  8525. // return
  8526. // }else {
  8527. this.unitJson[i].toolOpen = true;
  8528. // }
  8529. this.$forceUpdate();
  8530. if (this.unitIndex == i) {
  8531. return;
  8532. }
  8533. this.unitIndex = i;
  8534. this.isClickColor = 1;
  8535. // this.$refs.rightboxR.scrollTop = 0;
  8536. this.$refs.unitBox.scrollTop = 0;
  8537. },
  8538. updateCourseState(i) {
  8539. let params = [
  8540. {
  8541. cid: this.cid,
  8542. state: i,
  8543. },
  8544. ];
  8545. this.ajax
  8546. .post(this.$store.state.api + "updateCourseMode", params)
  8547. .then((res) => {
  8548. this.courseState = i;
  8549. })
  8550. .catch((err) => {
  8551. this.$message.error("网络不佳");
  8552. console.error(err);
  8553. });
  8554. },
  8555. addtips(){
  8556. let params = [
  8557. {
  8558. cid: this.cid,
  8559. tips: JSON.stringify(this.aiJson),
  8560. tid: this.templateid
  8561. },
  8562. ];
  8563. this.ajax
  8564. .post(this.$store.state.api + "addTips", params)
  8565. .then((res) => {
  8566. })
  8567. .catch((err) => {
  8568. this.$message.error("网络不佳");
  8569. console.error(err);
  8570. });
  8571. },
  8572. openSaveTips(){
  8573. this.dialogVisibleTips = true
  8574. },
  8575. time() {
  8576. if (!this.now) {
  8577. this.now = new Date().getTime();
  8578. return true;
  8579. } else {
  8580. let time = new Date().getTime();
  8581. if (time - this.now > 1000) {
  8582. this.now = time;
  8583. return true;
  8584. } else {
  8585. return false;
  8586. }
  8587. }
  8588. },
  8589. deleteUnit(i) {
  8590. var _this = this;
  8591. if (i == 0 && _this.unitJson.length == 1) {
  8592. _this
  8593. .$confirm("确定切换成任务模式吗?", "提示", {
  8594. confirmButtonText: "确定",
  8595. cancelButtonText: "取消",
  8596. type: "warning",
  8597. })
  8598. .then(() => {
  8599. _this.unitJson[i].dyName = "";
  8600. // _this.updateCourseState(2);
  8601. })
  8602. .catch(() => {
  8603. return;
  8604. });
  8605. } else {
  8606. _this
  8607. .$confirm("确定删除此阶段吗?", "提示", {
  8608. confirmButtonText: "确定",
  8609. cancelButtonText: "取消",
  8610. type: "warning",
  8611. })
  8612. .then(() => {
  8613. _this.isDelete = 2;
  8614. // _this.unitIndex = _this.unitIndex - 1;
  8615. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  8616. // _this.$message.success("删除成功");
  8617. })
  8618. .catch(() => {
  8619. return;
  8620. });
  8621. }
  8622. },
  8623. deleteWork(chapid) {
  8624. let params = [
  8625. {
  8626. cid: this.cid,
  8627. chapters: JSON.stringify(this.unitJson),
  8628. uid: this.userid,
  8629. chapid: chapid,
  8630. },
  8631. ];
  8632. this.ajax
  8633. .post(this.$store.state.api + "deleteWork", params)
  8634. .then((res) => {
  8635. this.$message({
  8636. message: "删除成功",
  8637. type: "success",
  8638. });
  8639. let task = JSON.parse(
  8640. JSON.stringify(
  8641. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  8642. )
  8643. );
  8644. this.unitJson.splice(this.unitIndex, 1);
  8645. if (this.unitIndex == 0) {
  8646. this.unitIndex = 0;
  8647. } else {
  8648. this.unitIndex = this.unitIndex - 1;
  8649. }
  8650. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8651. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8652. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  8653. ...task,
  8654. ];
  8655. }
  8656. })
  8657. .catch((err) => {
  8658. this.$message.error("网络不佳");
  8659. console.error(err);
  8660. });
  8661. },
  8662. deleteTool(itemTaskIndex, i) {
  8663. var _this = this;
  8664. if (_this.time()) {
  8665. _this
  8666. .$confirm("确定删除此工具吗?", "提示", {
  8667. confirmButtonText: "确定",
  8668. cancelButtonText: "取消",
  8669. type: "warning",
  8670. })
  8671. .then(() => {
  8672. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8673. itemTaskIndex
  8674. ].toolChoose.splice(i, 1);
  8675. _this.$message.success("删除成功");
  8676. })
  8677. .catch(() => {
  8678. return;
  8679. });
  8680. }
  8681. },
  8682. deleteSentence(i) {
  8683. var _this = this;
  8684. _this
  8685. .$confirm("确定删除此题目吗?", "提示", {
  8686. confirmButtonText: "确定",
  8687. cancelButtonText: "取消",
  8688. type: "warning",
  8689. })
  8690. .then(() => {
  8691. _this.sentenceList.splice(i, 1);
  8692. _this.$message.success("删除成功");
  8693. })
  8694. .catch(() => {
  8695. return;
  8696. });
  8697. },
  8698. deleteS(s, i, j) {
  8699. this.sentenceList[i].addSentence.splice(j, 1);
  8700. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  8701. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  8702. this.sentenceList[i].rightAnswer.splice(a, 1);
  8703. }
  8704. },
  8705. openT() {
  8706. top.postMessage({ tools: "25" }, "*");
  8707. },
  8708. deleteTask(i) {
  8709. var _this = this;
  8710. if (_this.time()) {
  8711. _this
  8712. .$confirm(
  8713. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  8714. 1 ==
  8715. i
  8716. ? "确定删除此任务吗?"
  8717. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  8718. "提示",
  8719. {
  8720. confirmButtonText: "确定",
  8721. cancelButtonText: "取消",
  8722. type: "warning",
  8723. }
  8724. )
  8725. .then(() => {
  8726. if (i == 0 && _this.courseState == 4) {
  8727. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8728. i + 1
  8729. ].chapterData = JSON.parse(
  8730. JSON.stringify(
  8731. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8732. .chapterData
  8733. )
  8734. );
  8735. }
  8736. _this.$forceUpdate();
  8737. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8738. i,
  8739. 1
  8740. );
  8741. _this.$message.success("删除成功");
  8742. })
  8743. .catch(() => {
  8744. return;
  8745. });
  8746. }
  8747. },
  8748. deleteTask2(i) {
  8749. var _this = this;
  8750. if (_this.time()) {
  8751. _this
  8752. .$confirm(
  8753. "确定删除此任务吗?",
  8754. "提示",
  8755. {
  8756. confirmButtonText: "确定",
  8757. cancelButtonText: "取消",
  8758. type: "warning",
  8759. }
  8760. )
  8761. .then(() => {
  8762. if (i == 0 && _this.courseState == 4) {
  8763. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8764. i + 1
  8765. ].chapterData = JSON.parse(
  8766. JSON.stringify(
  8767. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8768. .chapterData
  8769. )
  8770. );
  8771. }
  8772. _this.$forceUpdate();
  8773. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8774. i,
  8775. 1
  8776. );
  8777. _this.$message.success("删除成功");
  8778. })
  8779. .catch(() => {
  8780. return;
  8781. });
  8782. }
  8783. },
  8784. handlePictureCardPreview(file) {
  8785. this.dialogImageUrl = file.url;
  8786. },
  8787. clean(i, c) {
  8788. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  8789. },
  8790. handle_remove1(file, fileList, type) {
  8791. var _tmp = this.cover;
  8792. // for (var i = 0, len = _tmp.length; i < len; i++) {
  8793. // if (_tmp[i].uid == file.uid) {
  8794. // _tmp.splice(i, 1);
  8795. // break;
  8796. // }
  8797. // this.cover = _tmp;
  8798. // }
  8799. this.cover = [];
  8800. this.noneBtnImg = this.cover.length >= 1;
  8801. this.isSysPic = false;
  8802. this.isSysPic2 = false;
  8803. this.$forceUpdate();
  8804. },
  8805. addImg(e) {
  8806. var el = e.currentTarget;
  8807. el.getElementsByTagName("input")[0].click();
  8808. e.target.value = "";
  8809. },
  8810. addChaptersTools(i) {
  8811. this.chapTools = [
  8812. {
  8813. tools: [],
  8814. toolDetail: "",
  8815. },
  8816. ];
  8817. this.chapCount = i;
  8818. this.dialogVisible4 = true;
  8819. },
  8820. isNoFinsh() {
  8821. this.$message.warning("功能正在开发中");
  8822. },
  8823. addAttText(i) {
  8824. this.AttText = {
  8825. title: "",
  8826. text: "",
  8827. };
  8828. this.taskCount = i;
  8829. this.AttTextType = 0;
  8830. this.$forceUpdate();
  8831. this.dialogVisible6 = true;
  8832. setTimeout(() => {
  8833. this.$refs["fuInput"].focus();
  8834. }, 100);
  8835. },
  8836. openLine(i) {
  8837. this.line = "";
  8838. this.lineCount = i;
  8839. this.lineType = 0;
  8840. this.$forceUpdate();
  8841. this.dialogVisible7 = true;
  8842. },
  8843. pasteLine(i) {
  8844. navigator.clipboard
  8845. .readText()
  8846. .then((v) => {
  8847. console.log("获取剪贴板成功:", v);
  8848. const html = v;
  8849. const regex = /src="(.*?)"/g;
  8850. const match = regex.exec(html);
  8851. if (match && match[1]) {
  8852. console.log(match[1]);
  8853. this.$message.success("粘贴成功");
  8854. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8855. i
  8856. ].chapterData.unshift({
  8857. name: "链接",
  8858. title: "嵌入代码",
  8859. url: match[1],
  8860. type: 8,
  8861. });
  8862. } else {
  8863. // console.log("未找到包含 src 属性的 iframe");
  8864. this.$message.error(
  8865. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  8866. );
  8867. }
  8868. })
  8869. .catch((v) => {
  8870. console.log("获取剪贴板失败: ", v);
  8871. });
  8872. },
  8873. openSource(i) {
  8874. this.lineCount = i;
  8875. this.sourceData = {};
  8876. this.dialogVisibleSource = true;
  8877. this.updateSourcePan = false;
  8878. },
  8879. openAiCreate(i){
  8880. this.lineCount = i;
  8881. this.dialogVisibleAiCreate = true;
  8882. },
  8883. createAiPpt(json){
  8884. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8885. this.dialogVisibleAiCreate = false;
  8886. },
  8887. openAiCreateVideo(i){
  8888. this.lineCount = i;
  8889. this.dialogVisibleAiCreateVideo = true;
  8890. },
  8891. createAiVideo(json){
  8892. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8893. // this.dialogVisibleAiCreateVideo = false;
  8894. },
  8895. async createTeacherAn(index){
  8896. // this.lineCount = index;
  8897. this.loading = true
  8898. let md = new MarkdownIt();
  8899. if(this.courseState == 4){
  8900. // if(index == 0 || index){
  8901. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8902. // let name = _task.task+'-教案'
  8903. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8904. // await this.generate(name, _html, 0)
  8905. // }else {
  8906. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8907. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8908. let name = _task.task+'-教案'
  8909. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8910. await this.generate(name, _html, 0)
  8911. }
  8912. // }
  8913. }else if(this.courseState == 5){
  8914. if(index == 0 || index){
  8915. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8916. let name = _task.task+'-教案'
  8917. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8918. await this.generate(name, _html, index)
  8919. }else {
  8920. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8921. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8922. let name = _task.task+'-教案'
  8923. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8924. await this.generate(name, _html, i)
  8925. }
  8926. }
  8927. }
  8928. },
  8929. async generate(a, html, index) {
  8930. // <html lang="en">
  8931. // 将html文件中需要用到的数据挂载到store上
  8932. const content = `<!DOCTYPE html>
  8933. <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'>
  8934. <head>
  8935. <!--[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]-->
  8936. <meta charset="UTF-8">
  8937. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8938. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8939. <title>${a}</title>
  8940. <style>
  8941. table {
  8942. border-collapse: collapse; /* 折叠边框 */
  8943. width: 100%;
  8944. }
  8945. th, td {
  8946. border: 1px solid black; /* 线条样式 */
  8947. padding: 8px;
  8948. text-align: left;
  8949. }
  8950. </style>
  8951. </head>
  8952. <body>
  8953. ${html}
  8954. </body>
  8955. </html>`;
  8956. // debugger
  8957. const blob = htmlDocx.asBlob(content)
  8958. // debugger
  8959. let dname = a + ".docx";
  8960. // 创建文件流
  8961. // 创建bolb实例时,内容一定要放在[]中
  8962. // const blob = new Blob([content], {
  8963. // type: "text/plain;charset='utf-8'",
  8964. // });
  8965. // const file = new File([blob], dname, { type: 'application/msword' });
  8966. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  8967. await this.beforeUploadHtml(file, index)
  8968. },
  8969. beforeUploadHtml(event, index) {
  8970. var file = event;
  8971. var credentials = {
  8972. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  8973. secretAccessKey: "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",
  8974. }; //秘钥形式的登录上传
  8975. window.AWS.config.update(credentials);
  8976. window.AWS.config.region = "cn-northwest-1"; //设置区域
  8977. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  8978. var _this = this;
  8979. if (file) {
  8980. var params = {
  8981. Key:
  8982. file.name.split(".")[0] +
  8983. new Date().getTime() +
  8984. "." +
  8985. file.name.split(".")[file.name.split(".").length - 1],
  8986. ContentType: file.type,
  8987. Body: file,
  8988. "Access-Control-Allow-Credentials": "*",
  8989. ACL: "public-read",
  8990. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  8991. var options = {
  8992. partSize: 2048 * 1024 * 1024,
  8993. queueSize: 2,
  8994. leavePartsOnError: true,
  8995. };
  8996. bucket
  8997. .upload(params, options)
  8998. .on("httpUploadProgress", function (evt) {
  8999. //这里可以写进度条
  9000. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9001. })
  9002. .send(function (err, data) {
  9003. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  9004. _this.loading = false
  9005. }
  9006. if(_this.courseState == 5){
  9007. _this.loading = false
  9008. }
  9009. if (err) {
  9010. _this.$message.error("上传失败");
  9011. } else {
  9012. let _index = 0
  9013. // if(_this.lineCount == 0 || _this.lineCount){
  9014. // _index = _this.lineCount
  9015. // }else {
  9016. _index = index
  9017. // }
  9018. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  9019.                   name: file.name,
  9020.                   url: data.Location,
  9021.                   type: 3,
  9022.                 })
  9023. console.log(data.Location);
  9024. }
  9025. });
  9026. }
  9027. },
  9028. async generate2(a, html, index, callback) {
  9029. // 将html文件中需要用到的数据挂载到store上
  9030. const content = `<!DOCTYPE html>
  9031. <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'>
  9032. <head>
  9033. <!--[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]-->
  9034. <meta charset="UTF-8">
  9035. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9036. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9037. <title>${a}</title>
  9038. <style>
  9039. table {
  9040. border-collapse: collapse; /* 折叠边框 */
  9041. width: 100%;
  9042. }
  9043. th, td {
  9044. border: 1px solid black; /* 线条样式 */
  9045. padding: 8px;
  9046. text-align: left;
  9047. }
  9048. </style>
  9049. </head>
  9050. <body>
  9051. ${html}
  9052. </body>
  9053. </html>`;
  9054. const blob = htmlDocx.asBlob(content)
  9055. // debugger
  9056. let dname = a + ".docx";
  9057. // 创建文件流
  9058. // 创建bolb实例时,内容一定要放在[]中
  9059. // const blob = new Blob([content], {
  9060. // type: "text/plain;charset='utf-8'",
  9061. // });
  9062. // const file = new File([blob], dname, { type: 'application/msword' });
  9063. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9064. await this.beforeUploadHtml2(file, index, callback)
  9065. },
  9066. beforeUploadHtml2(event, index, callback) {
  9067. var file = event;
  9068. var credentials = {
  9069. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9070. secretAccessKey: "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",
  9071. }; //秘钥形式的登录上传
  9072. window.AWS.config.update(credentials);
  9073. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9074. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9075. var _this = this;
  9076. if (file) {
  9077. var params = {
  9078. Key:
  9079. file.name.split(".")[0] +
  9080. new Date().getTime() +
  9081. "." +
  9082. file.name.split(".")[file.name.split(".").length - 1],
  9083. ContentType: file.type,
  9084. Body: file,
  9085. "Access-Control-Allow-Credentials": "*",
  9086. ACL: "public-read",
  9087. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9088. var options = {
  9089. partSize: 2048 * 1024 * 1024,
  9090. queueSize: 2,
  9091. leavePartsOnError: true,
  9092. };
  9093. bucket
  9094. .upload(params, options)
  9095. .on("httpUploadProgress", function (evt) {
  9096. //这里可以写进度条
  9097. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9098. })
  9099. .send(async function (err, data) {
  9100. if(_this.courseState == 5){
  9101. _this.loading = false
  9102. }
  9103. if (err) {
  9104. callback ? callback() : ''
  9105. _this.$message.error("上传失败");
  9106. } else {
  9107. let fileid = await _this.createFileid(data.Location)
  9108. // _this.cankaoInfoData.push({
  9109. //                   name: file.name,
  9110. //                   url: data.Location,
  9111. //                   type: 3,
  9112. // fileid: fileid,
  9113. //   })
  9114. _this.infoData2.push({
  9115.                   name: file.name,
  9116.                   url: data.Location,
  9117.                   type: 3,
  9118. fileid: fileid == 1 ? '' : fileid,
  9119.   })
  9120. console.log(data.Location);
  9121. callback ? callback() : ''
  9122. }
  9123. });
  9124. }
  9125. },
  9126. addSource() {
  9127. if (!Object.keys(this.sourceData).length) {
  9128. this.$message.error("请选择要上传的资源");
  9129. return;
  9130. }
  9131. let keys = Object.keys(this.sourceData);
  9132. for (var i = 0; i < keys.length; i++) {
  9133. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9134. this.lineCount
  9135. ].chapterData.unshift({
  9136. name: "链接",
  9137. title: this.sourceData[keys[i]].name,
  9138. url: this.sourceData[keys[i]].url,
  9139. type: 14,
  9140. id: keys[i],
  9141. });
  9142. }
  9143. this.$forceUpdate();
  9144. this.dialogVisibleSource = false;
  9145. },
  9146. updateSource() {
  9147. if (!Object.keys(this.sourceData).length) {
  9148. this.$message.error("请选择要上传的资源");
  9149. return;
  9150. }
  9151. let keys = Object.keys(this.sourceData);
  9152. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9153. this.taskCount
  9154. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  9155. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9156. this.taskCount
  9157. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  9158. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9159. this.taskCount
  9160. ].chapterData[this.lineCount].id = keys[0];
  9161. this.updateSourcePan = false;
  9162. this.$forceUpdate();
  9163. this.dialogVisibleSource = false;
  9164. },
  9165. deleteM(i, j) {
  9166. this.testJson.testJson[i].timuList.splice(j, 1);
  9167. },
  9168. beforeUploadTiMu(event, i) {
  9169. const loading = this.openLoading();
  9170. var file = event.target.files[0];
  9171. var credentials = {
  9172. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9173. secretAccessKey: "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",
  9174. }; //秘钥形式的登录上传
  9175. window.AWS.config.update(credentials);
  9176. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9177. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9178. var _this = this;
  9179. if (file) {
  9180. var params = {
  9181. Key:
  9182. file.name.split(".")[0] +
  9183. new Date().getTime() +
  9184. "." +
  9185. file.name.split(".")[file.name.split(".").length - 1],
  9186. ContentType: file.type,
  9187. Body: file,
  9188. "Access-Control-Allow-Credentials": "*",
  9189. ACL: "public-read",
  9190. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9191. var options = {
  9192. partSize: 2048 * 1024 * 1024,
  9193. queueSize: 2,
  9194. leavePartsOnError: true,
  9195. };
  9196. bucket
  9197. .upload(params, options)
  9198. .on("httpUploadProgress", function (evt) {
  9199. //这里可以写进度条
  9200. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9201. })
  9202. .send(function (err, data) {
  9203. loading.close();
  9204. if (err) {
  9205. _this.$message.error("上传失败");
  9206. } else {
  9207. if (_this.testJson.testJson[i].timuList) {
  9208. _this.testJson.testJson[i].timuList.push({
  9209. src: data.Location,
  9210. });
  9211. } else {
  9212. _this.testJson.testJson[i].timuList = [];
  9213. _this.testJson.testJson[i].timuList.push({
  9214. src: data.Location,
  9215. });
  9216. }
  9217. _this.imgChange3(i);
  9218. _this.$forceUpdate();
  9219. }
  9220. });
  9221. }
  9222. },
  9223. beforeUploadTi(event, i, j) {
  9224. const loading = this.openLoading();
  9225. var file = event.target.files[0];
  9226. var credentials = {
  9227. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9228. secretAccessKey: "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",
  9229. }; //秘钥形式的登录上传
  9230. window.AWS.config.update(credentials);
  9231. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9232. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9233. var _this = this;
  9234. if (file) {
  9235. var params = {
  9236. Key:
  9237. file.name.split(".")[0] +
  9238. new Date().getTime() +
  9239. "." +
  9240. file.name.split(".")[file.name.split(".").length - 1],
  9241. ContentType: file.type,
  9242. Body: file,
  9243. "Access-Control-Allow-Credentials": "*",
  9244. ACL: "public-read",
  9245. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9246. var options = {
  9247. partSize: 2048 * 1024 * 1024,
  9248. queueSize: 2,
  9249. leavePartsOnError: true,
  9250. };
  9251. bucket
  9252. .upload(params, options)
  9253. .on("httpUploadProgress", function (evt) {
  9254. //这里可以写进度条
  9255. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9256. })
  9257. .send(function (err, data) {
  9258. loading.close();
  9259. if (err) {
  9260. _this.$message.error("上传失败");
  9261. } else {
  9262. _this.testJson.testJson[i].checkList[j] = {};
  9263. _this.testJson.testJson[i].checkList[j].src = data.Location;
  9264. _this.testJson.testJson[i].checkList[j].imgType = 1;
  9265. _this.imgChange2(i, j);
  9266. _this.$forceUpdate();
  9267. }
  9268. });
  9269. }
  9270. },
  9271. beforeUpload1(event, type) {
  9272. // const loading = this.openLoading();
  9273. var file = event.target.files[0];
  9274. var credentials = {
  9275. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9276. secretAccessKey: "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",
  9277. }; //秘钥形式的登录上传
  9278. window.AWS.config.update(credentials);
  9279. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9280. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9281. var _this = this;
  9282. if (file) {
  9283. var params = {
  9284. Key:
  9285. file.name.split(".")[0] +
  9286. new Date().getTime() +
  9287. "." +
  9288. file.name.split(".")[file.name.split(".").length - 1],
  9289. ContentType: file.type,
  9290. Body: file,
  9291. "Access-Control-Allow-Credentials": "*",
  9292. ACL: "public-read",
  9293. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9294. var options = {
  9295. partSize: 2048 * 1024 * 1024,
  9296. queueSize: 2,
  9297. leavePartsOnError: true,
  9298. };
  9299. bucket
  9300. .upload(params, options)
  9301. .on("httpUploadProgress", function (evt) {
  9302. //这里可以写进度条
  9303. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9304. })
  9305. .send(function (err, data) {
  9306. // loading.close();
  9307. if (err) {
  9308. // var a = _this.$refs.upload1.uploadFiles;
  9309. // a.splice(a.length - 1, a.length);
  9310. _this.$message.error("上传失败");
  9311. } else {
  9312. // _this.cover.push({
  9313. // name: file.name,
  9314. // url: data.Location,
  9315. // uid: file.uid,
  9316. // });
  9317. _this.cover = [
  9318. {
  9319. name: file.name,
  9320. url: data.Location,
  9321. uid: file.uid,
  9322. },
  9323. ];
  9324. _this.imgChange1(null, null, 1, null);
  9325. _this.choosePicVisible = false;
  9326. console.log(data.Location);
  9327. }
  9328. });
  9329. }
  9330. },
  9331. beforeUploadSelect(event, type) {
  9332. // const loading = this.openLoading();
  9333. var file = event.target.files[0];
  9334. var credentials = {
  9335. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9336. secretAccessKey: "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",
  9337. }; //秘钥形式的登录上传
  9338. window.AWS.config.update(credentials);
  9339. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9340. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9341. var _this = this;
  9342. if (file) {
  9343. var params = {
  9344. Key:
  9345. file.name.split(".")[0] +
  9346. new Date().getTime() +
  9347. "." +
  9348. file.name.split(".")[file.name.split(".").length - 1],
  9349. ContentType: file.type,
  9350. Body: file,
  9351. "Access-Control-Allow-Credentials": "*",
  9352. ACL: "public-read",
  9353. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9354. var options = {
  9355. partSize: 2048 * 1024 * 1024,
  9356. queueSize: 2,
  9357. leavePartsOnError: true,
  9358. };
  9359. bucket
  9360. .upload(params, options)
  9361. .on("httpUploadProgress", function (evt) {
  9362. //这里可以写进度条
  9363. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9364. })
  9365. .send(function (err, data) {
  9366. // loading.close();
  9367. if (err) {
  9368. _this.$message.error("上传失败");
  9369. } else {
  9370. _this.selectJson.url = data.Location;
  9371. console.log(data.Location);
  9372. }
  9373. });
  9374. }
  9375. },
  9376. chooseSysPic(p) {
  9377. this.cover = [];
  9378. setTimeout(() => {
  9379. this.cover[0] = {
  9380. name: "系统图片.png",
  9381. url: p,
  9382. };
  9383. this.imgChange1(null, null, 1, null);
  9384. this.$forceUpdate();
  9385. }, 0);
  9386. this.isSysPic = true;
  9387. this.isSysPic2 = false;
  9388. this.sysPicVisible = false;
  9389. this.$forceUpdate();
  9390. },
  9391. chooseSysPic2(p) {
  9392. this.cover = [];
  9393. setTimeout(() => {
  9394. this.cover[0] = {
  9395. name: "网络图片.png",
  9396. url: p,
  9397. };
  9398. this.imgChange1(null, null, 1, null);
  9399. this.$forceUpdate();
  9400. }, 0);
  9401. this.isSysPic2 = true;
  9402. this.isSysPic = false;
  9403. this.sysPicVisible2 = false;
  9404. this.$forceUpdate();
  9405. },
  9406. beforeUpload(data) {
  9407. this.$refs.upload1.uploadFiles;
  9408. this.uploadLoading1 = true;
  9409. var file = data.file;
  9410. var credentials = {
  9411. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9412. secretAccessKey: "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",
  9413. }; //秘钥形式的登录上传
  9414. window.AWS.config.update(credentials);
  9415. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9416. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9417. var _this = this;
  9418. if (file) {
  9419. var params = {
  9420. Key:
  9421. file.name.split(".")[0] +
  9422. new Date().getTime() +
  9423. "." +
  9424. file.name.split(".")[file.name.split(".").length - 1],
  9425. ContentType: file.type,
  9426. Body: file,
  9427. "Access-Control-Allow-Credentials": "*",
  9428. ACL: "public-read",
  9429. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9430. var options = {
  9431. partSize: 2048 * 1024 * 1024,
  9432. queueSize: 2,
  9433. leavePartsOnError: true,
  9434. };
  9435. bucket
  9436. .upload(params, options)
  9437. .on("httpUploadProgress", function (evt) {
  9438. //这里可以写进度条
  9439. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9440. })
  9441. .send(function (err, data) {
  9442. _this.uploadLoading1 = false;
  9443. if (err) {
  9444. // var a = _this.$refs.upload1.uploadFiles;
  9445. // a.splice(a.length - 1, a.length);
  9446. _this.$message.error("上传失败");
  9447. } else {
  9448. //上传成功处理
  9449. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  9450. name: file.name,
  9451. url: data.Location,
  9452. uid: file.uid,
  9453. });
  9454. _this.imgChange();
  9455. console.log(data.Location);
  9456. }
  9457. });
  9458. }
  9459. },
  9460. onExceed() {
  9461. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  9462. },
  9463. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  9464. let file = "";
  9465. let cfindex2 = 0;
  9466. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9467. // var file = event.target.files[0];
  9468. file = event.target.files[cfindex];
  9469. let fileName = file.name
  9470. let fileUid = file.uid
  9471. // const loading = this.openLoading();
  9472. // var file = event.target.files[0];
  9473. var credentials = {
  9474. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9475. secretAccessKey: "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",
  9476. }; //秘钥形式的登录上传
  9477. window.AWS.config.update(credentials);
  9478. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9479. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9480. var _this = this;
  9481. if (type == 3) {
  9482. var b = [
  9483. "DOC",
  9484. "DOCX",
  9485. "DOCM",
  9486. "DOTM",
  9487. "DOTX",
  9488. "PPTX",
  9489. "PPSX",
  9490. "PPT",
  9491. "PPS",
  9492. "PPTM",
  9493. "POTM",
  9494. "PPAM",
  9495. "POTX",
  9496. "PPSM",
  9497. ];
  9498. if (
  9499. b.indexOf(
  9500. file.name
  9501. .split(".")
  9502. [file.name.split(".").length - 1].toLocaleUpperCase()
  9503. ) != -1
  9504. ) {
  9505. if (file.size / 1024 / 1024 > 80) {
  9506. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9507. this.inputShow = true;
  9508. // var a = _this.$refs.upload1.uploadFiles;
  9509. // a.splice(a.length - 1, a.length);
  9510. // loading.close();
  9511. return;
  9512. }
  9513. } else if (
  9514. file.name
  9515. .split(".")
  9516. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9517. ) {
  9518. if (file.size / 1024 / 1024 > 80) {
  9519. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9520. this.inputShow = true;
  9521. // var a = _this.$refs.upload1.uploadFiles;
  9522. // a.splice(a.length - 1, a.length);
  9523. // loading.close();
  9524. return;
  9525. }
  9526. }
  9527. }
  9528. this.inputShow = false;
  9529. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9530. // itemTaskIndex
  9531. // ].progress = 0;
  9532. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9533. itemTaskIndex
  9534. ].proVisible = true;
  9535. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9536. itemTaskIndex
  9537. ].isFinishSize = 0;
  9538. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9539. itemTaskIndex
  9540. ].isAllSize = event.target.files.length;
  9541. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9542. // itemTaskIndex
  9543. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9544. _this.$forceUpdate();
  9545. if (file) {
  9546. var params = {
  9547. Key:
  9548. file.name.split(".")[0] +
  9549. new Date().getTime() +
  9550. "." +
  9551. file.name.split(".")[file.name.split(".").length - 1],
  9552. ContentType: file.type,
  9553. Body: file,
  9554. "Access-Control-Allow-Credentials": "*",
  9555. ACL: "public-read",
  9556. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9557. var options = {
  9558. partSize: 2048 * 1024 * 1024,
  9559. queueSize: 2,
  9560. leavePartsOnError: true,
  9561. };
  9562. bucket
  9563. .upload(params, options)
  9564. .on("httpUploadProgress", function (evt) {
  9565. //这里可以写进度条
  9566. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9567. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9568. // itemTaskIndex
  9569. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  9570. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9571. // itemTaskIndex
  9572. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9573. // _this.$forceUpdate();
  9574. })
  9575. .send(function (err, data) {
  9576. cfindex2++
  9577. // loading.close();
  9578. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9579. // itemTaskIndex
  9580. // ].progress = 100;
  9581. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9582. itemTaskIndex
  9583. ].isFinishSize = cfindex2
  9584. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9585. // itemTaskIndex
  9586. // ].isAllSize;
  9587. _this.$forceUpdate();
  9588. setTimeout(() => {
  9589. if (
  9590. cfindex2 == event.target.files.length ||
  9591. cfindex2 > event.target.files.length
  9592. ) {
  9593. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9594. itemTaskIndex
  9595. ].proVisible = false;
  9596. }
  9597. _this.$forceUpdate();
  9598. }, 1000);
  9599. _this.inputShow = true;
  9600. if (err) {
  9601. // var a = _this.$refs.upload1.uploadFiles;
  9602. // a.splice(a.length - 1, a.length);
  9603. _this.$message.error("上传失败");
  9604. } else {
  9605. if (type == 13) {
  9606. let _type = 2;
  9607. var imgA = [
  9608. "png",
  9609. "jpg",
  9610. "jpeg",
  9611. "bmp",
  9612. "gif",
  9613. "webp",
  9614. "psd",
  9615. "svg",
  9616. "tiff",
  9617. ];
  9618. var fileA = [
  9619. "PDF",
  9620. "DOC",
  9621. "DOCX",
  9622. "DOCM",
  9623. "DOTM",
  9624. "DOTX",
  9625. "PPTX",
  9626. "PPSX",
  9627. "PPT",
  9628. "PPS",
  9629. "PPTM",
  9630. "POTM",
  9631. "PPAM",
  9632. "POTX",
  9633. "PPSM",
  9634. "XLSX",
  9635. "XLS",
  9636. ];
  9637. var videoA = [
  9638. "AVI",
  9639. "NAVI",
  9640. "MPEG",
  9641. "ASF",
  9642. "MOV",
  9643. "WMV",
  9644. "3GP",
  9645. "RM",
  9646. "RMVB",
  9647. "FLV",
  9648. "F4V",
  9649. "H.264",
  9650. "H.265",
  9651. "REAL VIDEO",
  9652. "MKV",
  9653. "WebM",
  9654. "HDDVD",
  9655. "MP4",
  9656. "MPG",
  9657. "M4V",
  9658. "MGV",
  9659. "OGV",
  9660. "QTM",
  9661. "STR",
  9662. "AMC",
  9663. "DVX",
  9664. "EVO",
  9665. "DAT",
  9666. "OGG",
  9667. "OGM",
  9668. ];
  9669. if (
  9670. fileA.indexOf(
  9671. data.Location.split(".")[
  9672. data.Location.split(".").length - 1
  9673. ].toLocaleUpperCase()
  9674. ) != -1
  9675. ) {
  9676. _type = 3;
  9677. } else if (
  9678. videoA.indexOf(
  9679. data.Location.split(".")[
  9680. data.Location.split(".").length - 1
  9681. ].toLocaleUpperCase()
  9682. ) != -1
  9683. ) {
  9684. _type = 2;
  9685. } else if (
  9686. imgA.indexOf(
  9687. data.Location.split(".")[
  9688. data.Location.split(".").length - 1
  9689. ].toLocaleLowerCase()
  9690. ) != -1
  9691. ) {
  9692. _type = 13;
  9693. } else {
  9694. _type = 12;
  9695. }
  9696. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9697. itemTaskIndex
  9698. ].chapterData.unshift({
  9699. name: fileName,
  9700. url: data.Location,
  9701. uid: fileUid,
  9702. type: _type,
  9703. });
  9704. _this.imgChange1(null, null, _type, itemTaskIndex);
  9705. } else if (type == 2 || type == 3 || type == 12) {
  9706. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9707. itemTaskIndex
  9708. ].chapterData.unshift({
  9709. name: fileName,
  9710. url: data.Location,
  9711. uid: fileUid,
  9712. type: type,
  9713. });
  9714. _this.imgChange1(null, null, type, itemTaskIndex);
  9715. } else if (type == 4) {
  9716. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9717. itemTaskIndex
  9718. ].fileList1.push({
  9719. name: fileName,
  9720. url: data.Location,
  9721. uid: fileUid,
  9722. });
  9723. _this.imgChange1(null, null, type, itemTaskIndex);
  9724. } else if (type == 5) {
  9725. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9726. itemTaskIndex
  9727. ].homeworkList.push({
  9728. name: fileName,
  9729. url: data.Location,
  9730. uid: fileUid,
  9731. });
  9732. _this.imgChange1(null, null, type, itemTaskIndex);
  9733. }
  9734. console.log(data.Location);
  9735. }
  9736. });
  9737. }
  9738. }
  9739. },
  9740. beforeUploadInfo2(event, type, tindex) {
  9741. // const loading = this.openLoading();
  9742. let file = "";
  9743. let cfindex2 = 0;
  9744. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9745. // var file = event.target.files[0];
  9746. file = event.target.files[cfindex];
  9747. let fileName = file.name
  9748. let fileUid = file.uid
  9749. var credentials = {
  9750. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9751. secretAccessKey: "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",
  9752. }; //秘钥形式的登录上传
  9753. window.AWS.config.update(credentials);
  9754. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9755. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9756. var _this = this;
  9757. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  9758. if (
  9759. ['DOC'].indexOf(
  9760. file.name
  9761. .split(".")
  9762. [file.name.split(".").length - 1].toLocaleUpperCase()
  9763. ) !== -1
  9764. ) {
  9765. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  9766. this.inputShow = true;
  9767. return;
  9768. }
  9769. if (
  9770. xianObj.indexOf(
  9771. file.name
  9772. .split(".")
  9773. [file.name.split(".").length - 1].toLocaleUpperCase()
  9774. ) == -1
  9775. ) {
  9776. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  9777. this.inputShow = true;
  9778. // var a = _this.$refs.upload1.uploadFiles;
  9779. // a.splice(a.length - 1, a.length);
  9780. // loading.close();
  9781. return;
  9782. }
  9783. if (type == 3) {
  9784. var b = [
  9785. "DOC",
  9786. "DOCX",
  9787. "DOCM",
  9788. "DOTM",
  9789. "DOTX",
  9790. "PPTX",
  9791. "PPSX",
  9792. "PPT",
  9793. "PPS",
  9794. "PPTM",
  9795. "POTM",
  9796. "PPAM",
  9797. "POTX",
  9798. "PPSM",
  9799. ];
  9800. if (
  9801. b.indexOf(
  9802. file.name
  9803. .split(".")
  9804. [file.name.split(".").length - 1].toLocaleUpperCase()
  9805. ) != -1
  9806. ) {
  9807. if (file.size / 1024 / 1024 > 80) {
  9808. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9809. this.inputShow = true;
  9810. // var a = _this.$refs.upload1.uploadFiles;
  9811. // a.splice(a.length - 1, a.length);
  9812. // loading.close();
  9813. return;
  9814. }
  9815. } else if (
  9816. file.name
  9817. .split(".")
  9818. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9819. ) {
  9820. if (file.size / 1024 / 1024 > 80) {
  9821. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9822. this.inputShow = true;
  9823. // var a = _this.$refs.upload1.uploadFiles;
  9824. // a.splice(a.length - 1, a.length);
  9825. // loading.close();
  9826. return;
  9827. }
  9828. }
  9829. }
  9830. this.inputShow = false;
  9831. if(type == 14){
  9832. // _this.teacherinfoprogress = 0;
  9833. _this.teacherinfoproVisible = true;
  9834. _this.teacherinfoisFinishSize = 0;
  9835. _this.teacherinfoisAllSize = event.target.files.length;
  9836. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9837. }else if(type == 16){
  9838. _this.mubiaoinfoprogress = 0;
  9839. _this.mubiaoinfoproVisible = true;
  9840. _this.mubiaoinfoisFinishSize = 0;
  9841. _this.mubiaoinfoisAllSize = event.target.files.length;
  9842. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9843. }else if(type == 17){
  9844. _this.xuanzeinfoprogress = 0;
  9845. _this.xuanzeinfoproVisible = true;
  9846. _this.xuanzeinfoisFinishSize = 0;
  9847. _this.xuanzeinfoisAllSize = event.target.files.length;
  9848. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9849. }else if(type == 18){
  9850. _this.pingjiainfoprogress[tindex] = 0;
  9851. _this.pingjiainfoproVisible[tindex] = true;
  9852. _this.pingjiainfoisFinishSize[tindex] = 0;
  9853. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  9854. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  9855. }else{
  9856. _this.infoprogress = 0;
  9857. _this.infoproVisible = true;
  9858. _this.infoisFinishSize = 0;
  9859. _this.infoisAllSize = event.target.files.length;
  9860. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9861. }
  9862. _this.$forceUpdate();
  9863. if (file) {
  9864. var params = {
  9865. Key:
  9866. file.name.split(".")[0] +
  9867. new Date().getTime() +
  9868. "." +
  9869. file.name.split(".")[file.name.split(".").length - 1],
  9870. ContentType: file.type,
  9871. Body: file,
  9872. "Access-Control-Allow-Credentials": "*",
  9873. ACL: "public-read",
  9874. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9875. var options = {
  9876. partSize: 2048 * 1024 * 1024,
  9877. queueSize: 2,
  9878. leavePartsOnError: true,
  9879. };
  9880. bucket
  9881. .upload(params, options)
  9882. .on("httpUploadProgress", function (evt) {
  9883. //这里可以写进度条
  9884. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9885. // if(type == 14){
  9886. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9887. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9888. // }else if(type == 16){
  9889. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9890. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9891. // }else if(type == 17){
  9892. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  9893. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9894. // }else if(type == 18){
  9895. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  9896. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  9897. // }else {
  9898. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  9899. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9900. // }
  9901. _this.$forceUpdate();
  9902. })
  9903. .send(async function (err, data) {
  9904. // loading.close();
  9905. // if(type == 14){
  9906. // _this.teacherinfoprogress = 100;
  9907. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  9908. // }else if(type == 16){
  9909. // _this.mubiaoinfoprogress = 100;
  9910. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  9911. // }else if(type == 17){
  9912. // _this.xuanzeinfoprogress = 100;
  9913. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  9914. // }else if(type == 18){
  9915. // _this.pingjiainfoprogress[tindex] = 100;
  9916. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  9917. // }else {
  9918. // _this.infoprogress = 100;
  9919. // _this.infoisFinishSize = _this.infoisAllSize;
  9920. // }
  9921. _this.$forceUpdate();
  9922. _this.inputShow = true;
  9923. if (err) {
  9924. cfindex2++;
  9925. if(type == 14){
  9926. _this.teacherinfoisFinishSize = cfindex2;
  9927. }else if(type == 16){
  9928. _this.mubiaoinfoisFinishSize = cfindex2;
  9929. }else if(type == 17){
  9930. _this.xuanzeinfoisFinishSize = cfindex2;
  9931. }else if(type == 18){
  9932. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  9933. }else {
  9934. _this.infoisFinishSize = cfindex2;
  9935. }
  9936. setTimeout(() => {
  9937. if (
  9938. cfindex2 == event.target.files.length ||
  9939. cfindex2 > event.target.files.length
  9940. ) {
  9941. if(type == 14){
  9942. _this.teacherinfoproVisible = false;
  9943. }else if(type == 16){
  9944. _this.mubiaoinfoproVisible = false;
  9945. }else if(type == 17){
  9946. _this.xuanzeinfoproVisible = false;
  9947. }else if(type == 18){
  9948. _this.pingjiainfoproVisible[tindex] = false;
  9949. }else{
  9950. _this.infoproVisible = false;
  9951. }
  9952. }
  9953. _this.$forceUpdate();
  9954. }, 1000);
  9955. // var a = _this.$refs.upload1.uploadFiles;
  9956. // a.splice(a.length - 1, a.length);
  9957. _this.$message.error("上传失败");
  9958. } else {
  9959. let fileid = await _this.createFileid(data.Location)
  9960. if(fileid){
  9961. cfindex2++;
  9962. if(type == 14){
  9963. _this.teacherinfoisFinishSize = cfindex2;
  9964. }else if(type == 16){
  9965. _this.mubiaoinfoisFinishSize = cfindex2;
  9966. }else if(type == 17){
  9967. _this.xuanzeinfoisFinishSize = cfindex2;
  9968. }else if(type == 18){
  9969. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  9970. }else {
  9971. _this.infoisFinishSize = cfindex2;
  9972. }
  9973. if (
  9974. cfindex2 == event.target.files.length ||
  9975. cfindex2 > event.target.files.length
  9976. ) {
  9977. if(type == 14){
  9978. _this.teacherinfoproVisible = false;
  9979. }else if(type == 16){
  9980. _this.mubiaoinfoproVisible = false;
  9981. }else if(type == 17){
  9982. _this.xuanzeinfoproVisible = false;
  9983. }else if(type == 18){
  9984. _this.pingjiainfoproVisible[tindex] = false;
  9985. }else{
  9986. _this.infoproVisible = false;
  9987. }
  9988. }
  9989. _this.$forceUpdate();
  9990. }
  9991. if(fileid == 1){
  9992. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  9993. return;
  9994. }
  9995. var imgA = [
  9996. "png",
  9997. "jpg",
  9998. "jpeg",
  9999. "bmp",
  10000. "gif",
  10001. "webp",
  10002. "psd",
  10003. "svg",
  10004. "tiff",
  10005. ];
  10006. var fileA = [
  10007. "PDF",
  10008. "DOC",
  10009. "DOCX",
  10010. "DOCM",
  10011. "DOTM",
  10012. "DOTX",
  10013. "PPTX",
  10014. "PPSX",
  10015. "PPT",
  10016. "PPS",
  10017. "PPTM",
  10018. "POTM",
  10019. "PPAM",
  10020. "POTX",
  10021. "PPSM",
  10022. "XLSX",
  10023. "XLS",
  10024. ];
  10025. var videoA = [
  10026. "AVI",
  10027. "NAVI",
  10028. "MPEG",
  10029. "ASF",
  10030. "MOV",
  10031. "WMV",
  10032. "3GP",
  10033. "RM",
  10034. "RMVB",
  10035. "FLV",
  10036. "F4V",
  10037. "H.264",
  10038. "H.265",
  10039. "REAL VIDEO",
  10040. "MKV",
  10041. "WebM",
  10042. "HDDVD",
  10043. "MP4",
  10044. "MPG",
  10045. "M4V",
  10046. "MGV",
  10047. "OGV",
  10048. "QTM",
  10049. "STR",
  10050. "AMC",
  10051. "DVX",
  10052. "EVO",
  10053. "DAT",
  10054. "OGG",
  10055. "OGM",
  10056. ];
  10057. let _type = 2;
  10058. if (
  10059. fileA.indexOf(
  10060. data.Location.split(".")[
  10061. data.Location.split(".").length - 1
  10062. ].toLocaleUpperCase()
  10063. ) != -1
  10064. ) {
  10065. _type = 3;
  10066. } else if (
  10067. videoA.indexOf(
  10068. data.Location.split(".")[
  10069. data.Location.split(".").length - 1
  10070. ].toLocaleUpperCase()
  10071. ) != -1
  10072. ) {
  10073. _type = 2;
  10074. } else if (
  10075. imgA.indexOf(
  10076. data.Location.split(".")[
  10077. data.Location.split(".").length - 1
  10078. ].toLocaleLowerCase()
  10079. ) != -1
  10080. ) {
  10081. _type = 13;
  10082. } else {
  10083. _type = 12;
  10084. }
  10085. if (type == 13) {
  10086. _this.infoData.push({
  10087. name: fileName,
  10088. url: data.Location,
  10089. uid: fileUid,
  10090. type: _type,
  10091. fileid: fileid == 1 ? '' : fileid,
  10092. });
  10093. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10094. name: fileName,
  10095. url: data.Location,
  10096. uid: fileUid,
  10097. type: _type,
  10098. fileid: fileid == 1 ? '' : fileid,
  10099. })
  10100. }else if (type == 14) {
  10101. _this.teacherInfoData.push({
  10102. name: fileName,
  10103. url: data.Location,
  10104. uid: fileUid,
  10105. type: _type,
  10106. fileid: fileid == 1 ? '' : fileid,
  10107. });
  10108. _this.infoData2.push({
  10109. name: fileName,
  10110. url: data.Location,
  10111. uid: fileUid,
  10112. type: _type,
  10113. fileid: fileid == 1 ? '' : fileid,
  10114. });
  10115. _this.infoData.push({
  10116. name: fileName,
  10117. url: data.Location,
  10118. uid: fileUid,
  10119. type: _type,
  10120. fileid: fileid == 1 ? '' : fileid,
  10121. });
  10122. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10123. name: fileName,
  10124. url: data.Location,
  10125. uid: fileUid,
  10126. type: _type,
  10127. fileid: fileid == 1 ? '' : fileid,
  10128. })
  10129. }else if (type == 15) {
  10130. _this.infoData2.push({
  10131. name: fileName,
  10132. url: data.Location,
  10133. uid: fileUid,
  10134. type: _type,
  10135. fileid: fileid == 1 ? '' : fileid,
  10136. });
  10137. _this.infoData.push({
  10138. name: fileName,
  10139. url: data.Location,
  10140. uid: fileUid,
  10141. type: _type,
  10142. fileid: fileid == 1 ? '' : fileid,
  10143. });
  10144. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10145. name: fileName,
  10146. url: data.Location,
  10147. uid: fileUid,
  10148. type: _type,
  10149. fileid: fileid == 1 ? '' : fileid,
  10150. })
  10151. }else if (type == 16) {
  10152. _this.mubiaoInfoData.push({
  10153. name: fileName,
  10154. url: data.Location,
  10155. uid: fileUid,
  10156. type: _type,
  10157. fileid: fileid == 1 ? '' : fileid,
  10158. });
  10159. }else if (type == 17) {
  10160. _this.xuanzeInfoData.push({
  10161. name: fileName,
  10162. url: data.Location,
  10163. uid: fileUid,
  10164. type: _type,
  10165. fileid: fileid == 1 ? '' : fileid,
  10166. });
  10167. }else if (type == 18) {
  10168. if(!_this.pingjiaInfoData[tindex]){
  10169. _this.pingjiaInfoData[tindex] = []
  10170. }
  10171. _this.pingjiaInfoData[tindex].push({
  10172. name: fileName,
  10173. url: data.Location,
  10174. uid: fileUid,
  10175. type: _type,
  10176. fileid: fileid == 1 ? '' : fileid,
  10177. });
  10178. }
  10179. console.log(data.Location);
  10180. console.log(fileid);
  10181. }
  10182. });
  10183. }
  10184. }
  10185. },
  10186. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  10187. // const loading = this.openLoading();
  10188. var file = event.target.files[0];
  10189. var credentials = {
  10190. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10191. secretAccessKey: "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",
  10192. }; //秘钥形式的登录上传
  10193. window.AWS.config.update(credentials);
  10194. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10195. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10196. var _this = this;
  10197. if (type == 3) {
  10198. var b = [
  10199. "DOC",
  10200. "DOCX",
  10201. "DOCM",
  10202. "DOTM",
  10203. "DOTX",
  10204. "PPTX",
  10205. "PPSX",
  10206. "PPT",
  10207. "PPS",
  10208. "PPTM",
  10209. "POTM",
  10210. "PPAM",
  10211. "POTX",
  10212. "PPSM",
  10213. ];
  10214. if (
  10215. b.indexOf(
  10216. file.name
  10217. .split(".")
  10218. [file.name.split(".").length - 1].toLocaleUpperCase()
  10219. ) != -1
  10220. ) {
  10221. if (file.size / 1024 / 1024 > 80) {
  10222. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10223. this.inputShow = true;
  10224. // var a = _this.$refs.upload1.uploadFiles;
  10225. // a.splice(a.length - 1, a.length);
  10226. // loading.close();
  10227. return;
  10228. }
  10229. } else if (
  10230. file.name
  10231. .split(".")
  10232. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10233. ) {
  10234. if (file.size / 1024 / 1024 > 80) {
  10235. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10236. this.inputShow = true;
  10237. // var a = _this.$refs.upload1.uploadFiles;
  10238. // a.splice(a.length - 1, a.length);
  10239. // loading.close();
  10240. return;
  10241. }
  10242. }
  10243. }
  10244. this.inputShow = false;
  10245. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10246. itemTaskIndex
  10247. ].progress = 0;
  10248. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10249. itemTaskIndex
  10250. ].proVisible = true;
  10251. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10252. itemTaskIndex
  10253. ].isFinishSize = 0;
  10254. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10255. itemTaskIndex
  10256. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10257. _this.$forceUpdate();
  10258. if (file) {
  10259. var params = {
  10260. Key:
  10261. file.name.split(".")[0] +
  10262. new Date().getTime() +
  10263. "." +
  10264. file.name.split(".")[file.name.split(".").length - 1],
  10265. ContentType: file.type,
  10266. Body: file,
  10267. "Access-Control-Allow-Credentials": "*",
  10268. ACL: "public-read",
  10269. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10270. var options = {
  10271. partSize: 2048 * 1024 * 1024,
  10272. queueSize: 2,
  10273. leavePartsOnError: true,
  10274. };
  10275. bucket
  10276. .upload(params, options)
  10277. .on("httpUploadProgress", function (evt) {
  10278. //这里可以写进度条
  10279. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10280. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10281. itemTaskIndex
  10282. ].progress = parseInt((evt.loaded / evt.total) * 100);
  10283. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10284. itemTaskIndex
  10285. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10286. _this.$forceUpdate();
  10287. })
  10288. .send(function (err, data) {
  10289. // loading.close();
  10290. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10291. itemTaskIndex
  10292. ].progress = 100;
  10293. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10294. itemTaskIndex
  10295. ].isFinishSize =
  10296. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10297. itemTaskIndex
  10298. ].isAllSize;
  10299. _this.$forceUpdate();
  10300. setTimeout(() => {
  10301. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10302. itemTaskIndex
  10303. ].proVisible = false;
  10304. _this.$forceUpdate();
  10305. }, 1000);
  10306. _this.inputShow = true;
  10307. if (err) {
  10308. // var a = _this.$refs.upload1.uploadFiles;
  10309. // a.splice(a.length - 1, a.length);
  10310. _this.$message.error("上传失败");
  10311. } else {
  10312. if (type == 2 || type == 3) {
  10313. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10314. itemTaskIndex
  10315. ].chapterData.unshift({
  10316. name: file.name,
  10317. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10318. // itemTaskIndex
  10319. // ].chapterData.length+1),
  10320. url: data.Location,
  10321. uid: file.uid,
  10322. type: type,
  10323. text: string,
  10324. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10325. // itemTaskIndex
  10326. // ].chapterData.length + 1),
  10327. });
  10328. _this.imgChange1(null, null, type, itemTaskIndex);
  10329. } else if (type == 4) {
  10330. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10331. itemTaskIndex
  10332. ].fileList1.push({
  10333. name: file.name,
  10334. url: data.Location,
  10335. uid: file.uid,
  10336. });
  10337. _this.imgChange1(null, null, type, itemTaskIndex);
  10338. } else if (type == 5) {
  10339. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10340. itemTaskIndex
  10341. ].homeworkList.push({
  10342. name: file.name,
  10343. url: data.Location,
  10344. uid: file.uid,
  10345. });
  10346. _this.imgChange1(null, null, type, itemTaskIndex);
  10347. }
  10348. console.log(data.Location);
  10349. }
  10350. });
  10351. }
  10352. },
  10353. addunit() {
  10354. this.unitJson.push({
  10355. dyName: "", //单元标题
  10356. isUpdate: 1,
  10357. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  10358. chapterInfo: [
  10359. {
  10360. isread: false,
  10361. chapterid: this.guid(),
  10362. title: "",
  10363. courseName: "",
  10364. taskJson: [
  10365. {
  10366. task: "",
  10367. taskDetail: "",
  10368. chapterData: [],
  10369. toolText: "",
  10370. toolChoose: [
  10371. {
  10372. tool: [],
  10373. toolDetail: "",
  10374. toolType: 0,
  10375. askCount: 1,
  10376. askTitle: "",
  10377. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10378. },
  10379. ],
  10380. isShowTools: false,
  10381. askCount: 1,
  10382. isFold: 1,
  10383. askTitle: "",
  10384. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10385. checkJson: [{ checkCount: [], checkPerent: [] }],
  10386. homeworkList: [],
  10387. },
  10388. ],
  10389. itemCount: 1,
  10390. fileList1: [],
  10391. video: [],
  10392. testData: [],
  10393. pData: [],
  10394. templateArray: [],
  10395. },
  10396. ],
  10397. });
  10398. this.addindex = this.unitJson.length - 1;
  10399. setTimeout(() => {
  10400. this.unitIndex = this.unitJson.length - 1;
  10401. setTimeout(() => {
  10402. console.log(this.$refs.dyInput);
  10403. this.$refs.dyInput[0].focus();
  10404. }, 100);
  10405. this.unitSet(this.unitIndex);
  10406. }, 0);
  10407. },
  10408. addToolFun(itemTaskIndex) {
  10409. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10410. itemTaskIndex
  10411. ].toolChoose.push({
  10412. tool: [],
  10413. toolDetail: "",
  10414. toolType: 0,
  10415. askCount: 1,
  10416. askTitle: "",
  10417. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10418. });
  10419. },
  10420. addTaskBorder() {
  10421. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  10422. task: "",
  10423. taskDetail: "",
  10424. chapterData: [],
  10425. toolText: "",
  10426. toolChoose: [
  10427. {
  10428. tool: [],
  10429. toolDetail: "",
  10430. toolType: 0,
  10431. askCount: 1,
  10432. askTitle: "",
  10433. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10434. },
  10435. ],
  10436. isShowTools: false,
  10437. askCount: 1,
  10438. isFold: 1, //任务收起状态
  10439. askTitle: "",
  10440. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10441. checkJson: [{ checkCount: [], checkPerent: [] }],
  10442. homeworkList: [],
  10443. });
  10444. setTimeout(() => {
  10445. this.checkEva(this.checkId);
  10446. setTimeout(() => {
  10447. this.checkEva(this.checkId);
  10448. }, 100);
  10449. }, 100);
  10450. },
  10451. addTaskBorder2(type, index) {
  10452. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  10453. this.$message({
  10454. message: "有大纲在生成请生成完之后才能使用此功能",
  10455. type: "warning"
  10456. });
  10457. return;
  10458. }
  10459. if(type == 1){
  10460. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  10461. task: "",
  10462. isTask2: true,
  10463. isTask3: true,
  10464. taskDetail: "",
  10465. chapterData: [],
  10466. toolText: "",
  10467. toolChoose: [
  10468. {
  10469. tool: [],
  10470. toolDetail: "",
  10471. toolType: 0,
  10472. askCount: 1,
  10473. askTitle: "",
  10474. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10475. },
  10476. ],
  10477. isShowTools: false,
  10478. askCount: 1,
  10479. isFold: 0, //任务收起状态
  10480. askTitle: "",
  10481. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10482. checkJson: [{ checkCount: [], checkPerent: [] }],
  10483. homeworkList: [],
  10484. })
  10485. }else if(type == 2){
  10486. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  10487. task: "",
  10488. isTask2: true,
  10489. isTask3: true,
  10490. taskDetail: "",
  10491. chapterData: [],
  10492. toolText: "",
  10493. toolChoose: [
  10494. {
  10495. tool: [],
  10496. toolDetail: "",
  10497. toolType: 0,
  10498. askCount: 1,
  10499. askTitle: "",
  10500. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10501. },
  10502. ],
  10503. isShowTools: false,
  10504. askCount: 1,
  10505. isFold: 0, //任务收起状态
  10506. askTitle: "",
  10507. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10508. checkJson: [{ checkCount: [], checkPerent: [] }],
  10509. homeworkList: [],
  10510. })
  10511. }
  10512. setTimeout(() => {
  10513. this.checkEva(this.checkId);
  10514. setTimeout(() => {
  10515. this.checkEva(this.checkId);
  10516. }, 100);
  10517. }, 100);
  10518. },
  10519. add(e, i) {
  10520. var el = e.currentTarget;
  10521. el.getElementsByTagName("input")[0].click();
  10522. },
  10523. fold(i, e) {
  10524. if (
  10525. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  10526. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  10527. ) {
  10528. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  10529. } else {
  10530. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  10531. }
  10532. },
  10533. fold2(i) {
  10534. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  10535. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10536. i
  10537. ].isFold2 = false;
  10538. } else {
  10539. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  10540. }
  10541. this.$forceUpdate();
  10542. },
  10543. foldEva(i) {
  10544. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  10545. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10546. i
  10547. ].isEvaFold = false;
  10548. } else {
  10549. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10550. i
  10551. ].isEvaFold = true;
  10552. setTimeout(() => {
  10553. this.checkEva(this.checkId);
  10554. setTimeout(() => {
  10555. this.checkEva(this.checkId);
  10556. }, 500);
  10557. }, 0);
  10558. }
  10559. this.$forceUpdate();
  10560. },
  10561. foldC(i) {
  10562. if (
  10563. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  10564. ) {
  10565. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10566. i
  10567. ].isFoldchapter = false;
  10568. } else {
  10569. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10570. i
  10571. ].isFoldchapter = true;
  10572. }
  10573. this.$forceUpdate();
  10574. },
  10575. fold3(i, ti) {
  10576. if (
  10577. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  10578. .isFold3
  10579. ) {
  10580. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10581. ti
  10582. ].isFold3 = false;
  10583. } else {
  10584. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10585. ti
  10586. ].isFold3 = true;
  10587. }
  10588. this.$forceUpdate();
  10589. },
  10590. deleteHomeworkBox(unitIndex, index, i) {
  10591. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  10592. this.taskCount
  10593. ].homeworkList.splice(i, 1);
  10594. },
  10595. getStudent() {
  10596. let params = {
  10597. oid: this.oid,
  10598. cu: "",
  10599. cn: this.searchPeople,
  10600. };
  10601. this.ajax
  10602. .get(this.$store.state.api + "selectStudentAdd", params)
  10603. .then((res) => {
  10604. this.studentJuri = res.data[0];
  10605. })
  10606. .catch((err) => {
  10607. this.isLoading = false;
  10608. console.error(err);
  10609. });
  10610. },
  10611. // 添加协同成员其他选项按钮
  10612. getTeacherCopy(){
  10613. this.CollLoading=true
  10614. this.collid = ''
  10615. this.collid = '1xpz'
  10616. let params = {
  10617. oid:
  10618. this.org && this.org != "undefined" && this.org != "null"
  10619. ? this.org
  10620. : this.oid,
  10621. cu: "",
  10622. cn: this.searchTN,
  10623. coll: ''
  10624. };
  10625. this.ajax
  10626. .get(
  10627. this.$store.state.api +
  10628. (this.org && this.org != "undefined" && this.org != "null"
  10629. ? "selectCollaborativeMembersOrg"
  10630. : "selectCollaborativeMembers"),
  10631. params
  10632. )
  10633. .then((res) => {
  10634. let teacherJuri = res.data[0];
  10635. this.CollaborativeTeaList = res.data[1];
  10636. for (var i = 0; i < teacherJuri.length; i++) {
  10637. if (teacherJuri[i].userid == this.userid) {
  10638. teacherJuri.splice(i, 1);
  10639. break;
  10640. }
  10641. }
  10642. this.teacherJuri = teacherJuri.filter((i,index)=>{
  10643. return (i.cclassid == '' || i.cclassid == null)
  10644. })
  10645. console.log(' this.teacherJuri', this.teacherJuri);
  10646. let _check = [];
  10647. let _check2 = [];
  10648. for (var i = 0; i < this.teacherJuri.length; i++) {
  10649. var gid = this.teacherJuri[i].userid;
  10650. _check.push(gid);
  10651. }
  10652. for (var i = 0; i < this.checkboxList3.length; i++) {
  10653. var _id = this.checkboxList3[i];
  10654. if (_check.indexOf(_id) !== -1) {
  10655. _check2.push(_id);
  10656. }
  10657. }
  10658. if (_check2.length==0 && _check.length==0) {
  10659. }else{
  10660. this.checkAll2 = _check2.length === _check.length;
  10661. }
  10662. this.CollLoading=false
  10663. })
  10664. .catch((err) => {
  10665. console.error(err);
  10666. this.CollLoading=false
  10667. });
  10668. },
  10669. getTeacher(val) {
  10670. this.CollLoading=true
  10671. this.collid = ''
  10672. this.collid = !val ? '' : val
  10673. let params = {
  10674. oid:
  10675. this.org && this.org != "undefined" && this.org != "null"
  10676. ? this.org
  10677. : this.oid,
  10678. cu: "",
  10679. cn: this.searchTN,
  10680. coll: this.collid
  10681. };
  10682. this.ajax
  10683. .get(
  10684. this.$store.state.api +
  10685. (this.org && this.org != "undefined" && this.org != "null"
  10686. ? "selectCollaborativeMembersOrg"
  10687. : "selectCollaborativeMembers"),
  10688. params
  10689. )
  10690. .then((res) => {
  10691. let teacherJuri = res.data[0];
  10692. this.CollaborativeTeaList = res.data[1];
  10693. for (var i = 0; i < teacherJuri.length; i++) {
  10694. if (teacherJuri[i].userid == this.userid) {
  10695. teacherJuri.splice(i, 1);
  10696. break;
  10697. }
  10698. }
  10699. this.teacherJuri = teacherJuri;
  10700. let _check = [];
  10701. let _check2 = [];
  10702. for (var i = 0; i < this.teacherJuri.length; i++) {
  10703. var gid = this.teacherJuri[i].userid;
  10704. _check.push(gid);
  10705. }
  10706. for (var i = 0; i < this.checkboxList3.length; i++) {
  10707. var _id = this.checkboxList3[i];
  10708. if (_check.indexOf(_id) !== -1) {
  10709. _check2.push(_id);
  10710. }
  10711. }
  10712. if (_check2.length==0 && _check.length==0) {
  10713. }else{
  10714. this.checkAll2 = _check2.length === _check.length;
  10715. }
  10716. this.CollLoading=false
  10717. })
  10718. .catch((err) => {
  10719. console.error(err);
  10720. this.CollLoading=false
  10721. });
  10722. },
  10723. searchStudent() {
  10724. this.getStudent();
  10725. },
  10726. selectGrage() {
  10727. let params = {
  10728. oid: this.oid,
  10729. };
  10730. this.ajax
  10731. .get(this.$store.state.api + "selectGrageBySchool", params)
  10732. .then((res) => {
  10733. this.gradeList = res.data[0];
  10734. })
  10735. .catch((err) => {
  10736. this.isLoading = false;
  10737. console.error(err);
  10738. });
  10739. },
  10740. //获取班级列表
  10741. getClass() {
  10742. let params = {
  10743. oid: this.oid,
  10744. gid: this.gradeId,
  10745. cn: this.classSearch,
  10746. };
  10747. this.ajax
  10748. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  10749. .then((res) => {
  10750. if (!this.grade.length) {
  10751. this.grade = res.data[0];
  10752. }
  10753. this.grade2 = res.data[0];
  10754. this.classJuri = res.data[0];
  10755. let _check = [];
  10756. let _check2 = [];
  10757. for (var i = 0; i < this.grade2.length; i++) {
  10758. var gid = this.grade2[i].id;
  10759. _check.push(gid);
  10760. }
  10761. for (var i = 0; i < this.checkboxList2.length; i++) {
  10762. var _id = this.checkboxList2[i];
  10763. if (_check.indexOf(_id) !== -1) {
  10764. _check2.push(_id);
  10765. }
  10766. }
  10767. this.checkAll = _check2.length === _check.length;
  10768. })
  10769. .catch((err) => {
  10770. this.isLoading = false;
  10771. console.error(err);
  10772. });
  10773. },
  10774. CourseType2Change(val) {
  10775. this.pTypeCheck = [];
  10776. for (var i = 0; i < this.CourseType2.length; i++) {
  10777. let typeA = this.CourseType2[i];
  10778. if (val.indexOf(typeA.name) != -1) {
  10779. this.pTypeCheck.push(...typeA.id);
  10780. }
  10781. }
  10782. },
  10783. getChapterData(e, i, j, ic, type) {
  10784. e.stopPropagation();
  10785. this.updataC = true;
  10786. this.icc = ic;
  10787. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  10788. console.log("还不能下载图片喔");
  10789. }
  10790. },
  10791. deleteChapterData(e, i, j, ic, taskI) {
  10792. e.stopPropagation();
  10793. let _this = this;
  10794. _this
  10795. .$confirm("确定删除此项?", "提示", {
  10796. confirmButtonText: "确定",
  10797. cancelButtonText: "取消",
  10798. type: "warning",
  10799. })
  10800. .then(() => {
  10801. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  10802. ic,
  10803. 1
  10804. );
  10805. })
  10806. .catch(() => {
  10807. return;
  10808. });
  10809. },
  10810. checkInfoData(fileid, file){
  10811. let type = 1
  10812. let index = 0
  10813. for(let i = 0; i < this.infoData.length; i++){
  10814. if(this.infoData[i].fileid == fileid){
  10815. type = 2
  10816. index = i
  10817. }
  10818. }
  10819. if(type == 2){
  10820. this.infoData.splice(index, 1)
  10821. }else {
  10822. this.infoData.push({...file})
  10823. }
  10824. },
  10825. deleteInfoData(e, ic) {
  10826. e.stopPropagation();
  10827. let _this = this;
  10828. _this
  10829. .$confirm("确定删除此项?", "提示", {
  10830. confirmButtonText: "确定",
  10831. cancelButtonText: "取消",
  10832. type: "warning",
  10833. })
  10834. .then(() => {
  10835. _this.infoData.splice(
  10836. ic,
  10837. 1
  10838. );
  10839. })
  10840. .catch(() => {
  10841. return;
  10842. });
  10843. },
  10844. deleteInfoData2(e, ic) {
  10845. e.stopPropagation();
  10846. let _this = this;
  10847. _this
  10848. .$confirm("确定删除此项?", "提示", {
  10849. confirmButtonText: "确定",
  10850. cancelButtonText: "取消",
  10851. type: "warning",
  10852. })
  10853. .then(() => {
  10854. _this.infoData2.splice(
  10855. ic,
  10856. 1
  10857. );
  10858. })
  10859. .catch(() => {
  10860. return;
  10861. });
  10862. },
  10863. deletemubiaoInfoData(e, ic) {
  10864. e.stopPropagation();
  10865. let _this = this;
  10866. _this
  10867. .$confirm("确定删除此项?", "提示", {
  10868. confirmButtonText: "确定",
  10869. cancelButtonText: "取消",
  10870. type: "warning",
  10871. })
  10872. .then(() => {
  10873. _this.mubiaoInfoData.splice(
  10874. ic,
  10875. 1
  10876. );
  10877. })
  10878. .catch(() => {
  10879. return;
  10880. });
  10881. },
  10882. deletexuanzeInfoData(e, ic) {
  10883. e.stopPropagation();
  10884. let _this = this;
  10885. _this
  10886. .$confirm("确定删除此项?", "提示", {
  10887. confirmButtonText: "确定",
  10888. cancelButtonText: "取消",
  10889. type: "warning",
  10890. })
  10891. .then(() => {
  10892. _this.xuanzeInfoData.splice(
  10893. ic,
  10894. 1
  10895. );
  10896. })
  10897. .catch(() => {
  10898. return;
  10899. });
  10900. },
  10901. deletepingjiaInfoData(e, ic, tindex) {
  10902. e.stopPropagation();
  10903. let _this = this;
  10904. _this
  10905. .$confirm("确定删除此项?", "提示", {
  10906. confirmButtonText: "确定",
  10907. cancelButtonText: "取消",
  10908. type: "warning",
  10909. })
  10910. .then(() => {
  10911. _this.pingjiaInfoData[tindex].splice(
  10912. ic,
  10913. 1
  10914. );
  10915. })
  10916. .catch(() => {
  10917. return;
  10918. });
  10919. },
  10920. deleteCankaoInfoData(e, ic) {
  10921. e.stopPropagation();
  10922. let _this = this;
  10923. _this
  10924. .$confirm("确定删除此项?", "提示", {
  10925. confirmButtonText: "确定",
  10926. cancelButtonText: "取消",
  10927. type: "warning",
  10928. })
  10929. .then(() => {
  10930. _this.cankaoInfoData.splice(
  10931. ic,
  10932. 1
  10933. );
  10934. })
  10935. .catch(() => {
  10936. return;
  10937. });
  10938. },
  10939. deleteTeacherInfoData(e, ic) {
  10940. e.stopPropagation();
  10941. let _this = this;
  10942. _this
  10943. .$confirm("确定删除此项?", "提示", {
  10944. confirmButtonText: "确定",
  10945. cancelButtonText: "取消",
  10946. type: "warning",
  10947. })
  10948. .then(() => {
  10949. _this.teacherInfoData.splice(
  10950. ic,
  10951. 1
  10952. );
  10953. })
  10954. .catch(() => {
  10955. return;
  10956. });
  10957. },
  10958. updataVideoT(e, i, j, ic) {
  10959. // e.stopPropagation();
  10960. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  10961. // ic
  10962. // ].name = JSON.parse(JSON.stringify(e.target.value));
  10963. this.line =
  10964. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  10965. this.taskCount = j;
  10966. this.lineCount = ic;
  10967. this.dialogVisibleupdataVideoT = true;
  10968. this.$forceUpdate();
  10969. },
  10970. checkChpater(e, i, j, ic){
  10971. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  10972. if(type == 3){
  10973. var fileA = [
  10974. "DOC",
  10975. "DOCX",
  10976. "DOCM",
  10977. "DOTM",
  10978. "DOTX",
  10979. "PPTX",
  10980. "PPSX",
  10981. "PPT",
  10982. "PPS",
  10983. "PPTM",
  10984. "POTM",
  10985. "PPAM",
  10986. "POTX",
  10987. "PPSM",
  10988. "XLSX",
  10989. "XLS"
  10990. ];
  10991. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  10992. if (
  10993. fileA.indexOf(
  10994. url.split(".")[
  10995. url.split(".").length - 1
  10996. ].toLocaleUpperCase()
  10997. ) != -1
  10998. ) {
  10999. this.dialogVisibleOffice = true
  11000. this.wurl = url
  11001. } else if (
  11002. "pdf".indexOf(
  11003. url.split(".")[
  11004. url.split(".").length - 1
  11005. ].toLocaleLowerCase()
  11006. ) != -1
  11007. ) {
  11008. this.dialogVisiblePdf = true
  11009. this.wurl = url
  11010. }
  11011. }
  11012. },
  11013. checkChpater2(e, ic){
  11014. let type = this.infoData2[ic].type
  11015. if(type == 3){
  11016. var fileA = [
  11017. "DOC",
  11018. "DOCX",
  11019. "DOCM",
  11020. "DOTM",
  11021. "DOTX",
  11022. "PPTX",
  11023. "PPSX",
  11024. "PPT",
  11025. "PPS",
  11026. "PPTM",
  11027. "POTM",
  11028. "PPAM",
  11029. "POTX",
  11030. "PPSM",
  11031. "XLSX",
  11032. "XLS"
  11033. ];
  11034. let url = this.infoData2[ic].url
  11035. if (
  11036. fileA.indexOf(
  11037. url.split(".")[
  11038. url.split(".").length - 1
  11039. ].toLocaleUpperCase()
  11040. ) != -1
  11041. ) {
  11042. this.dialogVisibleOffice = true
  11043. this.wurl = url
  11044. } else if (
  11045. "pdf".indexOf(
  11046. url.split(".")[
  11047. url.split(".").length - 1
  11048. ].toLocaleLowerCase()
  11049. ) != -1
  11050. ) {
  11051. this.dialogVisiblePdf = true
  11052. this.wurl = url
  11053. }
  11054. }
  11055. },
  11056. checkChpater3(e, ic, item){
  11057. let type = item.type
  11058. if(type == 3){
  11059. var fileA = [
  11060. "DOC",
  11061. "DOCX",
  11062. "DOCM",
  11063. "DOTM",
  11064. "DOTX",
  11065. "PPTX",
  11066. "PPSX",
  11067. "PPT",
  11068. "PPS",
  11069. "PPTM",
  11070. "POTM",
  11071. "PPAM",
  11072. "POTX",
  11073. "PPSM",
  11074. "XLSX",
  11075. "XLS"
  11076. ];
  11077. let url = item.url
  11078. if (
  11079. fileA.indexOf(
  11080. url.split(".")[
  11081. url.split(".").length - 1
  11082. ].toLocaleUpperCase()
  11083. ) != -1
  11084. ) {
  11085. this.dialogVisibleOffice = true
  11086. this.wurl = url
  11087. } else if (
  11088. "pdf".indexOf(
  11089. url.split(".")[
  11090. url.split(".").length - 1
  11091. ].toLocaleLowerCase()
  11092. ) != -1
  11093. ) {
  11094. this.dialogVisiblePdf = true
  11095. this.wurl = url
  11096. }
  11097. }
  11098. },
  11099. updataVideoC() {
  11100. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11101. this.taskCount
  11102. ].chapterData[this.lineCount].name = JSON.parse(
  11103. JSON.stringify(this.line)
  11104. );
  11105. this.dialogVisibleupdataVideoT = false;
  11106. this.$forceUpdate();
  11107. },
  11108. upCd(e, i, j, taskCount, ic) {
  11109. e.stopPropagation();
  11110. if (ic == 0) {
  11111. return;
  11112. }
  11113. var a = JSON.parse(
  11114. JSON.stringify(
  11115. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11116. ic - 1
  11117. ]
  11118. )
  11119. );
  11120. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  11121. JSON.parse(
  11122. JSON.stringify(
  11123. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11124. )
  11125. );
  11126. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11127. this.$forceUpdate();
  11128. },
  11129. downCd(e, i, j, taskCount, ic) {
  11130. e.stopPropagation();
  11131. if (
  11132. ic ==
  11133. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  11134. 1
  11135. ) {
  11136. return;
  11137. }
  11138. var a = JSON.parse(
  11139. JSON.stringify(
  11140. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11141. ic + 1
  11142. ]
  11143. )
  11144. );
  11145. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  11146. JSON.parse(
  11147. JSON.stringify(
  11148. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11149. )
  11150. );
  11151. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11152. this.$forceUpdate();
  11153. },
  11154. async upTool(e, i, j, tooli) {
  11155. e.stopPropagation();
  11156. if (tooli == 0) {
  11157. return;
  11158. }
  11159. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  11160. let count2 = await this.getWorksCount(3, i, j, tooli);
  11161. if (count1 > 0 || count2 > 0) {
  11162. this.$confirm(
  11163. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11164. "提示",
  11165. {
  11166. confirmButtonText: "确定",
  11167. cancelButtonText: "取消",
  11168. type: "warning",
  11169. }
  11170. )
  11171. .then(() => {
  11172. var a = JSON.parse(
  11173. JSON.stringify(
  11174. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11175. tooli - 1
  11176. ]
  11177. )
  11178. );
  11179. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11180. JSON.parse(
  11181. JSON.stringify(
  11182. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11183. )
  11184. );
  11185. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11186. this.$forceUpdate();
  11187. })
  11188. .catch(() => {
  11189. return;
  11190. });
  11191. } else {
  11192. var a = JSON.parse(
  11193. JSON.stringify(
  11194. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  11195. )
  11196. );
  11197. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11198. JSON.parse(
  11199. JSON.stringify(
  11200. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11201. )
  11202. );
  11203. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11204. this.$forceUpdate();
  11205. }
  11206. },
  11207. async downTool(e, i, j, tooli) {
  11208. e.stopPropagation();
  11209. if (
  11210. tooli ==
  11211. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  11212. ) {
  11213. return;
  11214. }
  11215. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  11216. let count2 = await this.getWorksCount(3, i, j, tooli);
  11217. if (count1 > 0 || count2 > 0) {
  11218. this.$confirm(
  11219. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11220. "提示",
  11221. {
  11222. confirmButtonText: "确定",
  11223. cancelButtonText: "取消",
  11224. type: "warning",
  11225. }
  11226. )
  11227. .then(() => {
  11228. var a = JSON.parse(
  11229. JSON.stringify(
  11230. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11231. tooli + 1
  11232. ]
  11233. )
  11234. );
  11235. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11236. JSON.parse(
  11237. JSON.stringify(
  11238. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11239. )
  11240. );
  11241. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11242. this.$forceUpdate();
  11243. })
  11244. .catch(() => {
  11245. return;
  11246. });
  11247. } else {
  11248. var a = JSON.parse(
  11249. JSON.stringify(
  11250. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  11251. )
  11252. );
  11253. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11254. JSON.parse(
  11255. JSON.stringify(
  11256. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11257. )
  11258. );
  11259. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11260. this.$forceUpdate();
  11261. }
  11262. },
  11263. addWork(type) {
  11264. if(type == 2 && this.courseName == "") {
  11265. this.$message.error("请补充填写课程名称");
  11266. return;
  11267. }
  11268. let cPan = 1;
  11269. for (var i = 0; i < this.unitJson.length; i++) {
  11270. for (
  11271. var j = 0;
  11272. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11273. j++
  11274. ) {
  11275. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11276. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11277. if (
  11278. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11279. ) {
  11280. for (
  11281. var z = 0;
  11282. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11283. z++
  11284. ) {
  11285. if (
  11286. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11287. .length
  11288. ) {
  11289. this.$message.error("请把工具添加完整");
  11290. cPan = 2;
  11291. break;
  11292. }
  11293. }
  11294. }
  11295. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11296. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11297. i
  11298. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11299. return ele.value != "" || ele.detail != "" || ele.target != "";
  11300. });
  11301. }
  11302. }
  11303. }
  11304. this.inputShow = true;
  11305. if (cPan == 2) {
  11306. this.steps--;
  11307. return;
  11308. }
  11309. for (var i = 0; i < this.unitJson.length; i++) {
  11310. delete this.unitJson[i].isUpdate;
  11311. }
  11312. if(!this.targetCourseText2){
  11313. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11314. }
  11315. let params = [
  11316. {
  11317. uid: this.userid,
  11318. title: this.courseName,
  11319. brief: this.courseText,
  11320. cover:
  11321. this.cover.length > 0
  11322. ? JSON.stringify(this.cover)
  11323. : JSON.stringify([
  11324. {
  11325. name: "noBanner.jpg",
  11326. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11327. uid: 1656409780264,
  11328. status: "success",
  11329. },
  11330. ]),
  11331. evaId: this.evalua,
  11332. astudent:
  11333. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11334. see: this.isTeacherSee == true ? 1 : 0,
  11335. chapters: JSON.stringify(this.unitJson),
  11336. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  11337. courseType: JSON.stringify(this.courseTypeId),
  11338. ateacher:
  11339. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11340. inviteCode: JSON.stringify(this.inviteCode),
  11341. refile: JSON.stringify(this.infoData),
  11342. reBrief: this.courseText2,
  11343. cpote: JSON.stringify(this.cpote),
  11344. setting: JSON.stringify({
  11345. courseJie: this.courseJie,
  11346. courseTime: this.courseTime,
  11347. teacherInfoData: this.teacherInfoData,
  11348. teacherCourseText: this.teacherCourseText,
  11349. targetCourseText: this.targetCourseText,
  11350. cankaoInfoData: this.cankaoInfoData,
  11351. mubiaoInfoData: this.mubiaoInfoData,
  11352. xuanzeInfoData: this.xuanzeInfoData,
  11353. pingjiaInfoData: this.pingjiaInfoData,
  11354. infoData2: this.infoData2,
  11355. isuseT: this.isuseT,
  11356. mode: this.mode,
  11357. targetCourseText2: this.targetCourseText2,
  11358. chatid: this.chatid,
  11359. languageSetting: this.languageSetting,
  11360. }),
  11361. iresearch: this.isFileSearch ? 1 : 2,
  11362. },
  11363. ];
  11364. this.ajax
  11365. .post(this.$store.state.api + "addWorkNew2AI3", params)
  11366. .then((res) => {
  11367. console.log(this.steps);
  11368. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11369. this.$message({
  11370. message: "新增成功",
  11371. type: "success",
  11372. });
  11373. }
  11374. this.number = res.data.ordernumber;
  11375. this.courseId = res.data.courseId;
  11376. this.cid = res.data.courseId;
  11377. this.courseUserid = this.userid;
  11378. this.islogin = true;
  11379. // this.updateCourseState(4);
  11380. this.updateCourseState(5);
  11381. this.addtips()
  11382. if(type == 2){
  11383. this.retrunCourse()
  11384. }
  11385. })
  11386. .catch((err) => {
  11387. this.$message.error("网络不佳");
  11388. console.error(err);
  11389. });
  11390. },
  11391. goCourse() {
  11392. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  11393. },
  11394. updateWork2() {
  11395. let _unitIndex = this.unitIndex;
  11396. let cPan = 1;
  11397. for (
  11398. var j = 0;
  11399. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11400. j++
  11401. ) {
  11402. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11403. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11404. j
  11405. ].proVisible2 = false;
  11406. if (
  11407. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11408. .length > 1
  11409. ) {
  11410. for (
  11411. var z = 0;
  11412. z <
  11413. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11414. .length;
  11415. z++
  11416. ) {
  11417. if (
  11418. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11419. z
  11420. ].tool.length
  11421. ) {
  11422. this.$message.error("请把工具添加完整");
  11423. cPan = 2;
  11424. break;
  11425. }
  11426. }
  11427. }
  11428. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11429. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11430. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11431. (ele) => {
  11432. return ele.value != "" || ele.detail != "" || ele.target != "";
  11433. }
  11434. );
  11435. }
  11436. }
  11437. this.inputShow = true;
  11438. if (cPan == 2) {
  11439. this.steps--;
  11440. return;
  11441. }
  11442. let params = [
  11443. {
  11444. cid: this.cid,
  11445. chapters: JSON.stringify(this.unitJson),
  11446. uid: this.userid,
  11447. unitIndex: _unitIndex,
  11448. },
  11449. ];
  11450. this.ajax
  11451. .post(this.$store.state.api + "updateWorkNew4", params)
  11452. .then((res) => {
  11453. this.$message({
  11454. message: "修改成功",
  11455. type: "success",
  11456. });
  11457. this.courseId = this.cid;
  11458. this.addtips();
  11459. })
  11460. .catch((err) => {
  11461. this.$message.error("网络不佳");
  11462. console.error(err);
  11463. });
  11464. },
  11465. updateWork3(unitIndex) {
  11466. let _unitIndex = unitIndex;
  11467. let cPan = 1;
  11468. for (
  11469. var j = 0;
  11470. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11471. j++
  11472. ) {
  11473. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11474. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11475. j
  11476. ].proVisible2 = false;
  11477. if (
  11478. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11479. .length > 1
  11480. ) {
  11481. for (
  11482. var z = 0;
  11483. z <
  11484. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11485. .length;
  11486. z++
  11487. ) {
  11488. if (
  11489. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11490. z
  11491. ].tool.length
  11492. ) {
  11493. this.$message.error("请把工具添加完整");
  11494. cPan = 2;
  11495. break;
  11496. }
  11497. }
  11498. }
  11499. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11500. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11501. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11502. (ele) => {
  11503. return ele.value != "" || ele.detail != "" || ele.target != "";
  11504. }
  11505. );
  11506. }
  11507. }
  11508. this.inputShow = true;
  11509. if (cPan == 2) {
  11510. this.steps--;
  11511. return;
  11512. }
  11513. let params = [
  11514. {
  11515. cid: this.cid,
  11516. chapters: JSON.stringify(this.unitJson),
  11517. uid: this.userid,
  11518. unitIndex: _unitIndex,
  11519. },
  11520. ];
  11521. this.ajax
  11522. .post(this.$store.state.api + "updateWorkNew4", params)
  11523. .then((res) => {
  11524. // this.$message({
  11525. // message: "修改成功",
  11526. // type: "success",
  11527. // });
  11528. this.courseId = this.cid;
  11529. this.addtips()
  11530. })
  11531. .catch((err) => {
  11532. this.$message.error("网络不佳");
  11533. console.error(err);
  11534. });
  11535. },
  11536. updateWork() {
  11537. let cPan = 1;
  11538. for (var i = 0; i < this.unitJson.length; i++) {
  11539. for (
  11540. var j = 0;
  11541. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11542. j++
  11543. ) {
  11544. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11545. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11546. if (
  11547. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11548. ) {
  11549. for (
  11550. var z = 0;
  11551. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11552. z++
  11553. ) {
  11554. if (
  11555. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11556. .length
  11557. ) {
  11558. this.$message.error("请把工具添加完整");
  11559. cPan = 2;
  11560. break;
  11561. }
  11562. }
  11563. }
  11564. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11565. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11566. i
  11567. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11568. return ele.value != "" || ele.detail != "" || ele.target != "";
  11569. });
  11570. }
  11571. }
  11572. }
  11573. this.inputShow = true;
  11574. if (cPan == 2) {
  11575. this.steps--;
  11576. return;
  11577. }
  11578. for (var i = 0; i < this.unitJson.length; i++) {
  11579. delete this.unitJson[i].isUpdate;
  11580. }
  11581. if(!this.targetCourseText2){
  11582. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11583. }
  11584. let params = [
  11585. {
  11586. cid: this.cid,
  11587. title: this.courseName,
  11588. brief: this.courseText,
  11589. cover:
  11590. this.cover.length > 0
  11591. ? JSON.stringify(this.cover)
  11592. : JSON.stringify([
  11593. {
  11594. name: "noBanner.jpg",
  11595. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11596. uid: 1656409780264,
  11597. status: "success",
  11598. },
  11599. ]),
  11600. evaId: this.evalua,
  11601. astudent:
  11602. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11603. see: this.isTeacherSee == true ? 1 : 0,
  11604. chapters: JSON.stringify(this.unitJson),
  11605. template: this.myWord != "undefined" ? this.myWord : [],
  11606. uid: this.userid,
  11607. courseType: JSON.stringify(this.courseTypeId),
  11608. ateacher:
  11609. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11610. inviteCode: JSON.stringify(this.inviteCode),
  11611. refile: JSON.stringify(this.infoData),
  11612. reBrief: this.courseText2,
  11613. cpote: JSON.stringify(this.cpote),
  11614. setting: JSON.stringify({
  11615. courseJie: this.courseJie,
  11616. courseTime: this.courseTime,
  11617. teacherInfoData: this.teacherInfoData,
  11618. teacherCourseText: this.teacherCourseText,
  11619. targetCourseText: this.targetCourseText,
  11620. cankaoInfoData: this.cankaoInfoData,
  11621. mubiaoInfoData: this.mubiaoInfoData,
  11622. xuanzeInfoData: this.xuanzeInfoData,
  11623. pingjiaInfoData: this.pingjiaInfoData,
  11624. infoData2: this.infoData2,
  11625. isuseT: this.isuseT,
  11626. mode: this.mode,
  11627. targetCourseText2: this.targetCourseText2,
  11628. chatid: this.chatid,
  11629. languageSetting: this.languageSetting,
  11630. }),
  11631. iresearch: this.isFileSearch ? 1 : 2,
  11632. },
  11633. ];
  11634. this.ajax
  11635. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  11636. .then((res) => {
  11637. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11638. if (this.cidType == 1) {
  11639. this.$message({
  11640. message: "修改成功",
  11641. type: "success",
  11642. });
  11643. } else {
  11644. this.$message({
  11645. message: "新增成功",
  11646. type: "success",
  11647. });
  11648. }
  11649. }
  11650. this.number = this.nbOrder;
  11651. this.courseId = this.cid;
  11652. this.addtips()
  11653. })
  11654. .catch((err) => {
  11655. this.$message.error("网络不佳");
  11656. console.error(err);
  11657. });
  11658. },
  11659. insertWord() {
  11660. this.dialogVisible1 = true;
  11661. this.updateBoolean2 = false;
  11662. this.tTitle = "";
  11663. this.tdetail = "";
  11664. },
  11665. addWord() {
  11666. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  11667. name: this.tTitle,
  11668. content: this.tdetail,
  11669. uid: this.guid(),
  11670. });
  11671. this.dialogVisible1 = false;
  11672. },
  11673. upWord() { },
  11674. selectWord(uid, i, c) {
  11675. this.dialogVisible1 = true;
  11676. this.updateBoolean2 = true;
  11677. if (
  11678. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  11679. ) {
  11680. this.tTitle =
  11681. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  11682. this.tdetail =
  11683. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  11684. }
  11685. },
  11686. isAddPP() {
  11687. if (this.checkboxList.length > 0) {
  11688. this.$message({
  11689. message: "添加成功",
  11690. type: "success",
  11691. });
  11692. this.dialogVisible3 = false;
  11693. } else {
  11694. this.$message({
  11695. message: "请添加课程成员",
  11696. type: "error",
  11697. });
  11698. }
  11699. },
  11700. isAddClass() {
  11701. this.dialogVisibleClass = false;
  11702. },
  11703. isAddPPTeacher() {
  11704. this.dialogVisibleMember = false;
  11705. this.setMan();
  11706. },
  11707. getTipsTemplate(){
  11708. if(this.templateid){
  11709. let params = {
  11710. id: this.templateid
  11711. }
  11712. this.ajax
  11713. .get(this.$store.state.api + "selectTipsTemplateById", params)
  11714. .then((res) => {
  11715. if(res.data[0].length){
  11716. this.tipsJson = res.data[0][0]
  11717. this.aiJson = JSON.parse(res.data[0][0].tips)
  11718. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  11719. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  11720. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11721. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  11722. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  11723. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11724. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  11725. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  11726. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  11727. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  11728. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  11729. }
  11730. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  11731. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  11732. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  11733. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  11734. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  11735. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  11736. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  11737. // }
  11738. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  11739. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  11740. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  11741. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  11742. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  11743. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  11744. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  11745. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  11746. // }
  11747. this.$forceUpdate();
  11748. }
  11749. })
  11750. .catch((err) => { });
  11751. }
  11752. },
  11753. getTemplate() {
  11754. this.ajax
  11755. .get(this.$store.state.api + "getCourseTemplateT", "")
  11756. .then((res) => {
  11757. this.templateArray = res.data[0];
  11758. this.getTemplateOid();
  11759. this.$forceUpdate();
  11760. })
  11761. .catch((err) => { });
  11762. },
  11763. getTemplateOid() {
  11764. let params = {
  11765. oid: this.oid,
  11766. };
  11767. this.ajax
  11768. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  11769. .then((res) => {
  11770. if (res.data[0].length) {
  11771. this.templateArray = [...res.data[0], ...this.templateArray];
  11772. }
  11773. this.getTemplateOrg();
  11774. this.$forceUpdate();
  11775. })
  11776. .catch((err) => { });
  11777. },
  11778. getTemplateOrg() {
  11779. let params = {
  11780. oid: this.org,
  11781. };
  11782. this.ajax
  11783. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  11784. .then((res) => {
  11785. if (res.data[0].length) {
  11786. this.templateArray = [...res.data[0], ...this.templateArray];
  11787. }
  11788. this.$forceUpdate();
  11789. })
  11790. .catch((err) => { });
  11791. },
  11792. clearChoose() {
  11793. this.clearArray.splice(this.templateC.id, 1);
  11794. this.dialogVisible2 = false;
  11795. },
  11796. clearAttText() {
  11797. this.AttText = {
  11798. title: "",
  11799. text: "",
  11800. };
  11801. this.dialogVisible6 = false;
  11802. },
  11803. clearLine() {
  11804. this.line = "";
  11805. this.dialogVisible7 = false;
  11806. },
  11807. openTemplate() {
  11808. this.ctJson = {};
  11809. this.templateDialog = true;
  11810. },
  11811. checkctJson(json) {
  11812. if (this.ctJson.id == json.id) {
  11813. this.ctJson = {};
  11814. } else {
  11815. this.ctJson = json;
  11816. }
  11817. },
  11818. addTemplate(res) {
  11819. let _this = this;
  11820. let _res = [];
  11821. if (res.id == 1) {
  11822. _res = [
  11823. {
  11824. dyName: "", //单元标题
  11825. easy: 1,
  11826. chapterInfo: [
  11827. {
  11828. isread: false,
  11829. chapterid: this.guid(),
  11830. title: "",
  11831. courseName: "",
  11832. taskJson: [
  11833. {
  11834. task: "",
  11835. taskDetail: "",
  11836. chapterData: [],
  11837. toolText: "",
  11838. toolChoose: [
  11839. {
  11840. tool: [],
  11841. toolDetail: "",
  11842. toolType: 0,
  11843. askCount: 1,
  11844. askTitle: "",
  11845. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11846. },
  11847. ],
  11848. isShowTools: false,
  11849. askCount: 1,
  11850. isFold: 1,
  11851. askTitle: "",
  11852. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11853. checkJson: [{ checkCount: [], checkPerent: [] }],
  11854. homeworkList: [],
  11855. },
  11856. ],
  11857. itemCount: 1,
  11858. fileList1: [],
  11859. video: [],
  11860. testData: [],
  11861. pData: [],
  11862. templateArray: [],
  11863. },
  11864. ],
  11865. },
  11866. ];
  11867. this.updateCourseState(1);
  11868. } else if (res.id == 2) {
  11869. let stageData = [];
  11870. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  11871. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  11872. if (!iframe && !iframe2) {
  11873. this.$message.error("请使用AI共创生成");
  11874. return;
  11875. }
  11876. let copyData = iframe ? iframe.contentWindow.copyData : false;
  11877. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  11878. if (
  11879. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  11880. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  11881. ) {
  11882. this.$message.error("请使用AI共创生成");
  11883. return;
  11884. }
  11885. stageData = copyData
  11886. ? copyData.stageData
  11887. : copyData2
  11888. ? copyData2.stageData
  11889. : [""];
  11890. for (var i = 0; i < stageData.length; i++) {
  11891. _res.push({
  11892. dyName: stageData[i], //单元标题
  11893. chapterInfo: [
  11894. {
  11895. isread: false,
  11896. chapterid: this.guid(),
  11897. title: "",
  11898. courseName: "",
  11899. taskJson: [
  11900. {
  11901. task: "",
  11902. taskDetail: "",
  11903. chapterData: [],
  11904. toolText: "",
  11905. toolChoose: [
  11906. {
  11907. tool: [],
  11908. toolDetail: "",
  11909. toolType: 0,
  11910. askCount: 1,
  11911. askTitle: "",
  11912. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11913. },
  11914. ],
  11915. isShowTools: false,
  11916. askCount: 1,
  11917. isFold: 1,
  11918. askTitle: "",
  11919. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  11920. checkJson: [{ checkCount: [], checkPerent: [] }],
  11921. homeworkList: [],
  11922. },
  11923. ],
  11924. itemCount: 1,
  11925. fileList1: [],
  11926. video: [],
  11927. testData: [],
  11928. pData: [],
  11929. templateArray: [],
  11930. },
  11931. ],
  11932. });
  11933. }
  11934. this.updateCourseState(1);
  11935. } else if (!Object.keys(res).length) {
  11936. this.$message.error("请选择模板");
  11937. retrun;
  11938. } else {
  11939. _res = JSON.parse(res.chapters);
  11940. this.updateCourseState(parseInt(res.state));
  11941. }
  11942. _this
  11943. .$confirm(
  11944. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11945. "提示",
  11946. {
  11947. confirmButtonText: "确定",
  11948. cancelButtonText: "取消",
  11949. type: "warning",
  11950. }
  11951. )
  11952. .then(() => {
  11953. _this.unitJson = _res;
  11954. _this.updateWork();
  11955. // _this.steps++;
  11956. _this.templateDialog = false;
  11957. setTimeout(() => {
  11958. this.checkEva(this.checkId);
  11959. setTimeout(() => {
  11960. this.checkEva(this.checkId);
  11961. }, 100);
  11962. }, 1000);
  11963. })
  11964. .catch(() => {
  11965. return;
  11966. });
  11967. },
  11968. checkTemplate(res) {
  11969. let _this = this;
  11970. _this
  11971. .$confirm(
  11972. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  11973. "提示",
  11974. {
  11975. confirmButtonText: "确定",
  11976. cancelButtonText: "取消",
  11977. type: "warning",
  11978. }
  11979. )
  11980. .then(() => {
  11981. _this.unitJson = JSON.parse(res.chapters);
  11982. _this.steps++;
  11983. setTimeout(() => {
  11984. this.checkEva(this.checkId);
  11985. setTimeout(() => {
  11986. this.checkEva(this.checkId);
  11987. }, 100);
  11988. }, 1000);
  11989. })
  11990. .catch(() => {
  11991. return;
  11992. });
  11993. },
  11994. checkTemplate1(w) {
  11995. this.steps++;
  11996. },
  11997. checkTemplate2() {
  11998. let _this = this;
  11999. _this
  12000. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  12001. confirmButtonText: "确定",
  12002. cancelButtonText: "取消",
  12003. type: "warning",
  12004. })
  12005. .then(() => {
  12006. _this.unitIndex = 0;
  12007. _this.unitJson = [
  12008. {
  12009. dyName: "", //单元标题
  12010. chapterInfo: [
  12011. {
  12012. isread: false,
  12013. chapterid: this.guid(),
  12014. title: "",
  12015. courseName: "",
  12016. taskJson: [
  12017. {
  12018. task: "",
  12019. taskDetail: "",
  12020. chapterData: [],
  12021. toolText: "",
  12022. toolChoose: [
  12023. {
  12024. tool: [],
  12025. toolDetail: "",
  12026. toolType: 0,
  12027. askCount: 1,
  12028. askTitle: "",
  12029. askJson: [
  12030. { askstitle: "", askItem: 1, checkList: [] },
  12031. ],
  12032. },
  12033. ],
  12034. isShowTools: false,
  12035. askCount: 1,
  12036. isFold: 1,
  12037. askTitle: "",
  12038. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12039. checkJson: [{ checkCount: [], checkPerent: [] }],
  12040. homeworkList: [],
  12041. },
  12042. ],
  12043. itemCount: 1,
  12044. fileList1: [],
  12045. video: [],
  12046. testData: [],
  12047. pData: [],
  12048. templateArray: [],
  12049. },
  12050. ],
  12051. },
  12052. ];
  12053. this.steps++;
  12054. setTimeout(() => {
  12055. this.checkEva(this.checkId);
  12056. setTimeout(() => {
  12057. this.checkEva(this.checkId);
  12058. }, 100);
  12059. }, 1000);
  12060. this.updateWork();
  12061. })
  12062. .catch(() => {
  12063. return;
  12064. });
  12065. },
  12066. checkTemplate3() {
  12067. let _this = this;
  12068. _this
  12069. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  12070. confirmButtonText: "确定",
  12071. cancelButtonText: "取消",
  12072. type: "warning",
  12073. })
  12074. .then(() => {
  12075. _this.unitIndex = 0;
  12076. _this.unitJson = [
  12077. {
  12078. dyName: "", //单元标题
  12079. easy: 1,
  12080. chapterInfo: [
  12081. {
  12082. isread: false,
  12083. chapterid: this.guid(),
  12084. title: "",
  12085. courseName: "",
  12086. taskJson: [
  12087. {
  12088. task: "",
  12089. taskDetail: "",
  12090. chapterData: [],
  12091. toolText: "",
  12092. toolChoose: [
  12093. {
  12094. tool: [],
  12095. toolDetail: "",
  12096. toolType: 0,
  12097. askCount: 1,
  12098. askTitle: "",
  12099. askJson: [
  12100. { askstitle: "", askItem: 1, checkList: [] },
  12101. ],
  12102. },
  12103. ],
  12104. isShowTools: false,
  12105. askCount: 1,
  12106. isFold: 1,
  12107. askTitle: "",
  12108. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12109. checkJson: [{ checkCount: [], checkPerent: [] }],
  12110. homeworkList: [],
  12111. },
  12112. ],
  12113. itemCount: 1,
  12114. fileList1: [],
  12115. video: [],
  12116. testData: [],
  12117. pData: [],
  12118. templateArray: [],
  12119. },
  12120. ],
  12121. },
  12122. ];
  12123. // this.steps++;
  12124. this.updateWork();
  12125. })
  12126. .catch(() => {
  12127. return;
  12128. });
  12129. },
  12130. checkTemplate4() {
  12131. let _this = this;
  12132. _this
  12133. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  12134. confirmButtonText: "确定",
  12135. cancelButtonText: "取消",
  12136. type: "warning",
  12137. })
  12138. .then(() => {
  12139. _this.unitIndex = 0;
  12140. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  12141. this.steps++;
  12142. this.updateWork();
  12143. })
  12144. .catch(() => {
  12145. return;
  12146. });
  12147. },
  12148. wordNext() {
  12149. this.dialogVisible2 = false;
  12150. },
  12151. isAddOrUpdateAttText() {
  12152. if (this.AttTextType == 0) {
  12153. this.addAttTextMessage();
  12154. } else {
  12155. this.updateAttText();
  12156. }
  12157. },
  12158. isAddOrUpdateLine() {
  12159. if (!this.lineTitle) {
  12160. this.$message.error("请填写链接标题");
  12161. return;
  12162. }
  12163. if (this.lineType == 0) {
  12164. this.addLine();
  12165. } else {
  12166. this.updateLine();
  12167. }
  12168. },
  12169. addAttTextMessage() {
  12170. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12171. this.taskCount
  12172. ].chapterData.unshift({
  12173. name: this.AttText.title,
  12174. url: this.AttText.text,
  12175. type: 6,
  12176. });
  12177. this.imgChange1(null, null, 6, this.taskCount);
  12178. this.dialogVisible6 = false;
  12179. },
  12180. selectAttText(itemTaskIndex, i) {
  12181. this.AttText.title =
  12182. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12183. itemTaskIndex
  12184. ].chapterData[i].name;
  12185. this.AttText.text =
  12186. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12187. itemTaskIndex
  12188. ].chapterData[i].url;
  12189. this.taskCount = itemTaskIndex;
  12190. this.AttTextIndex = i;
  12191. this.AttTextType = 1;
  12192. this.dialogVisible6 = true;
  12193. },
  12194. updateAttText() {
  12195. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12196. this.taskCount
  12197. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  12198. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12199. this.taskCount
  12200. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  12201. this.dialogVisible6 = false;
  12202. },
  12203. addLine() {
  12204. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12205. this.lineCount
  12206. ].chapterData.unshift({
  12207. name: "链接",
  12208. title: this.lineTitle,
  12209. url: this.line,
  12210. type: 8,
  12211. });
  12212. this.imgChange1(null, null, 8, this.lineCount);
  12213. this.dialogVisible7 = false;
  12214. },
  12215. selectLine(itemTaskIndex, i) {
  12216. this.line =
  12217. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12218. itemTaskIndex
  12219. ].chapterData[i].url;
  12220. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12221. itemTaskIndex
  12222. ].chapterData[i].title
  12223. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12224. .chapterData[i].title
  12225. : "";
  12226. this.taskCount = itemTaskIndex;
  12227. this.lineCount = i;
  12228. this.lineType = 1;
  12229. this.dialogVisible7 = true;
  12230. },
  12231. openUpdateSource(itemTaskIndex, i) {
  12232. this.sourceData = {};
  12233. let source =
  12234. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12235. .chapterData[i];
  12236. this.sourceData[source.id] = {};
  12237. this.sourceData[source.id].name = source.title;
  12238. this.sourceData[source.id].url = source.url;
  12239. this.dialogVisibleSource = true;
  12240. this.updateSourcePan = true;
  12241. this.taskCount = itemTaskIndex;
  12242. this.lineCount = i;
  12243. },
  12244. updateLine() {
  12245. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12246. this.taskCount
  12247. ].chapterData[this.lineCount].url = this.line;
  12248. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12249. this.taskCount
  12250. ].chapterData[this.lineCount].title = this.lineTitle;
  12251. this.dialogVisible7 = false;
  12252. },
  12253. addPP() {
  12254. this.dialogVisible3 = true;
  12255. },
  12256. goTo(path) {
  12257. this.$router.push(path);
  12258. },
  12259. openTools(itemTaskIndex, i, toolIndex) {
  12260. this.toolIndex = toolIndex;
  12261. this.taskCount = itemTaskIndex;
  12262. if (i == 4) {
  12263. if (toolIndex == null) {
  12264. var a =
  12265. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12266. .chapterData;
  12267. for (var i = 0; i < a.length; i++) {
  12268. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  12269. this.askJson =
  12270. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12271. itemTaskIndex
  12272. ].chapterData[i].askJson;
  12273. }
  12274. }
  12275. } else {
  12276. this.askJson = JSON.parse(
  12277. JSON.stringify(
  12278. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12279. itemTaskIndex
  12280. ].toolChoose[toolIndex]
  12281. )
  12282. );
  12283. }
  12284. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  12285. this.dialogVisible5 = true;
  12286. } else if (i == 45) {
  12287. if (
  12288. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12289. .toolChoose[toolIndex].testJson
  12290. ) {
  12291. this.testJson = JSON.parse(
  12292. JSON.stringify(
  12293. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12294. itemTaskIndex
  12295. ].toolChoose[toolIndex].testJson
  12296. )
  12297. );
  12298. } else {
  12299. var testJson = {
  12300. testCount: 1,
  12301. testTitle: "",
  12302. testJson: [
  12303. {
  12304. teststitle: "",
  12305. testItem: 1,
  12306. checkList: [],
  12307. timuList: [],
  12308. answer: [],
  12309. type: "1",
  12310. },
  12311. ],
  12312. };
  12313. this.testJson = testJson;
  12314. }
  12315. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  12316. this.dialogVisibleChoice = true;
  12317. } else if (i == 47) {
  12318. if (
  12319. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12320. .toolChoose[toolIndex].sentenceList
  12321. ) {
  12322. this.sentenceList = JSON.parse(
  12323. JSON.stringify(
  12324. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12325. itemTaskIndex
  12326. ].toolChoose[toolIndex].sentenceList
  12327. )
  12328. );
  12329. } else {
  12330. var sentenceList = [
  12331. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  12332. ];
  12333. this.sentenceList = sentenceList;
  12334. }
  12335. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  12336. this.dialogVisibleSentence = true;
  12337. } else if (i == 48) {
  12338. if (
  12339. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12340. .toolChoose[toolIndex].tableJson
  12341. ) {
  12342. this.tableJson = JSON.parse(
  12343. JSON.stringify(
  12344. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12345. itemTaskIndex
  12346. ].toolChoose[toolIndex].tableJson
  12347. )
  12348. );
  12349. } else {
  12350. var tableJson = { text: "" };
  12351. this.tableJson = tableJson;
  12352. }
  12353. this.dialogVisibleTable = true;
  12354. } else if (i == 52) {
  12355. if (
  12356. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12357. .toolChoose[toolIndex].wordJson
  12358. ) {
  12359. this.wordJson = JSON.parse(
  12360. JSON.stringify(
  12361. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12362. itemTaskIndex
  12363. ].toolChoose[toolIndex].wordJson
  12364. )
  12365. );
  12366. } else {
  12367. var wordJson = { text: "" };
  12368. this.wordJson = wordJson;
  12369. }
  12370. this.dialogVisibleWord = true;
  12371. // else if (i == 50) {
  12372. // if (
  12373. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12374. // .toolChoose[toolIndex].uploadJson
  12375. // ) {
  12376. // this.uploadJson = JSON.parse(
  12377. // JSON.stringify(
  12378. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12379. // itemTaskIndex
  12380. // ].toolChoose[toolIndex].uploadJson
  12381. // )
  12382. // );
  12383. // } else {
  12384. // var uploadJson = [];
  12385. // this.uploadJson = uploadJson;
  12386. // }
  12387. // this.dialogVisibleMoreUpload = true;
  12388. // }
  12389. } else if (i == 10) {
  12390. if (
  12391. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12392. .toolChoose[toolIndex].preTime
  12393. ) {
  12394. this.preTime = JSON.parse(
  12395. JSON.stringify(
  12396. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12397. itemTaskIndex
  12398. ].toolChoose[toolIndex].preTime
  12399. )
  12400. );
  12401. } else {
  12402. var preTime = 0;
  12403. this.preTime = preTime;
  12404. }
  12405. this.dialogVisiblePreTime = true;
  12406. } else if (i == 49) {
  12407. if (
  12408. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12409. .toolChoose[toolIndex].groupJson
  12410. ) {
  12411. this.groupJson = JSON.parse(
  12412. JSON.stringify(
  12413. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12414. itemTaskIndex
  12415. ].toolChoose[toolIndex].groupJson
  12416. )
  12417. );
  12418. } else {
  12419. var groupJson = {
  12420. group: [{ name: "第1组" }],
  12421. number: undefined,
  12422. islock: 1,
  12423. };
  12424. this.groupJson = groupJson;
  12425. }
  12426. this.dialogVisibleGroup = true;
  12427. } else if (i == 62) {
  12428. if (
  12429. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12430. .toolChoose[toolIndex].videoJson
  12431. ) {
  12432. this.videoJson = JSON.parse(
  12433. JSON.stringify(
  12434. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12435. itemTaskIndex
  12436. ].toolChoose[toolIndex].videoJson
  12437. )
  12438. );
  12439. } else {
  12440. var videoJson = {
  12441. video: "",
  12442. setting: [],
  12443. };
  12444. this.videoJson = videoJson;
  12445. }
  12446. this.dialogVisibleVideo = true;
  12447. } else if (i == 15) {
  12448. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12449. itemTaskIndex
  12450. ].toolChoose[toolIndex].answerQ
  12451. ? JSON.parse(
  12452. JSON.stringify(
  12453. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12454. itemTaskIndex
  12455. ].toolChoose[toolIndex].answerQ
  12456. )
  12457. )
  12458. : "";
  12459. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  12460. this.dialogVisible8 = true;
  12461. } else if (i == 40) {
  12462. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12463. itemTaskIndex
  12464. ].toolChoose[toolIndex].rateJson
  12465. ? JSON.parse(
  12466. JSON.stringify(
  12467. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12468. itemTaskIndex
  12469. ].toolChoose[toolIndex].rateJson
  12470. )
  12471. )
  12472. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  12473. this.selectSteps = 1;
  12474. this.dialogVisibleRate = true;
  12475. } else if (i == 42) {
  12476. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12477. itemTaskIndex
  12478. ].toolChoose[toolIndex].answerQ
  12479. ? JSON.parse(
  12480. JSON.stringify(
  12481. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12482. itemTaskIndex
  12483. ].toolChoose[toolIndex].answerQ
  12484. )
  12485. )
  12486. : "";
  12487. this.dialogVisibleMp3 = true;
  12488. } else if (i == 41) {
  12489. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12490. itemTaskIndex
  12491. ].toolChoose[toolIndex].selectJson
  12492. ? JSON.parse(
  12493. JSON.stringify(
  12494. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12495. itemTaskIndex
  12496. ].toolChoose[toolIndex].selectJson
  12497. )
  12498. )
  12499. : { url: "", select: [], answer: [] };
  12500. this.selectSteps = 1;
  12501. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  12502. this.dialogVisibleSelect = true;
  12503. } else if (i == 3) {
  12504. top.postMessage(
  12505. {
  12506. tools: "3y",
  12507. cid: this.cid,
  12508. stage: this.unitIndex,
  12509. task: itemTaskIndex,
  12510. tool: toolIndex,
  12511. },
  12512. "*"
  12513. );
  12514. } else if (i == 1) {
  12515. top.postMessage(
  12516. {
  12517. tools: "1y",
  12518. cid: this.cid,
  12519. stage: this.unitIndex,
  12520. task: itemTaskIndex,
  12521. tool: toolIndex,
  12522. },
  12523. "*"
  12524. );
  12525. } else if (i == 57) {
  12526. top.postMessage(
  12527. {
  12528. tools: "57y",
  12529. cid: this.cid,
  12530. stage: this.unitIndex,
  12531. task: itemTaskIndex,
  12532. tool: toolIndex,
  12533. },
  12534. "*"
  12535. );
  12536. } else if (i == 69) {
  12537. this.englishList = {};
  12538. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  12539. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  12540. ? JSON.parse(
  12541. JSON.stringify(
  12542. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12543. itemTaskIndex
  12544. ].toolChoose[toolIndex].englishList
  12545. )
  12546. )
  12547. : {};
  12548. this.$forceUpdate();
  12549. this.englishDialogVisible = true;
  12550. } else if (i == 70) {
  12551. this.englishVoiceJson = {};
  12552. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  12553. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  12554. ? JSON.parse(
  12555. JSON.stringify(
  12556. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12557. itemTaskIndex
  12558. ].toolChoose[toolIndex].englishVoiceJson
  12559. )
  12560. )
  12561. : {
  12562. title: '',
  12563. detail: '',
  12564. array: []
  12565. };
  12566. // {
  12567. // time: "",
  12568. // class: "",
  12569. // difficulty: 0,
  12570. // topic: "",
  12571. // isShow: false,
  12572. // eva: 0,
  12573. // aiEva: {
  12574. // isAiEva: false,
  12575. // aiEvaChoose: [],
  12576. // },
  12577. // allfType: [],
  12578. // englishJson: {},
  12579. // };
  12580. this.$forceUpdate();
  12581. this.EnglishVoiceDialog = true;
  12582. }
  12583. },
  12584. setEnglishVoiceJson(val) {
  12585. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12586. this.taskCount
  12587. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  12588. JSON.stringify(val)
  12589. );
  12590. this.$forceUpdate();
  12591. if (
  12592. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12593. .toolChoose[this.toolIndex].tool != 70
  12594. ) {
  12595. this.addTools(70, this.taskCount, this.toolIndex);
  12596. }
  12597. },
  12598. chapAddTools(i) {
  12599. if (this.chapTools[0].tools.length == 0) {
  12600. this.chapTools[0].tools.push(i);
  12601. } else {
  12602. if (this.chapTools[0].tools.indexOf(i) != -1) {
  12603. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  12604. } else {
  12605. this.chapTools[0].tools.push(i);
  12606. }
  12607. }
  12608. this.$forceUpdate();
  12609. },
  12610. addChaptersDataTools() {
  12611. if (this.chapTools[0].tools.indexOf(4) != -1) {
  12612. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12613. this.chapCount
  12614. ].chapterData.unshift({
  12615. name: this.chapTools[0].toolDetail,
  12616. url: this.chapTools[0].tools,
  12617. type: 7,
  12618. askJson: this.askJson,
  12619. });
  12620. } else {
  12621. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12622. this.chapCount
  12623. ].chapterData.unshift({
  12624. name: this.chapTools[0].toolDetail,
  12625. url: this.chapTools[0].tools,
  12626. type: 7,
  12627. });
  12628. }
  12629. this.imgChange1(null, null, 7, this.chapCount);
  12630. this.dialogVisible4 = false;
  12631. },
  12632. addTools(i, itemTaskIndex, toolIndex) {
  12633. // if (
  12634. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12635. // .toolChoose[toolIndex].tool.length == 0
  12636. // ) {
  12637. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12638. // itemTaskIndex
  12639. // ].toolChoose[toolIndex].tool.push(i);
  12640. // } else {
  12641. // if (
  12642. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12643. // itemTaskIndex
  12644. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  12645. // ) {
  12646. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12647. // itemTaskIndex
  12648. // ].toolChoose[toolIndex].tool.splice(
  12649. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12650. // itemTaskIndex
  12651. // ].toolChoose[toolIndex].tool.indexOf(i),
  12652. // 1
  12653. // );
  12654. // } else {
  12655. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12656. // itemTaskIndex
  12657. // ].toolChoose[toolIndex].tool.push(i);
  12658. // }
  12659. // console.log(
  12660. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12661. // .toolChoose[toolIndex].tool
  12662. // );
  12663. // }
  12664. if (i == 4) {
  12665. if (
  12666. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12667. .toolChoose[toolIndex].askJson.askTitle == "" ||
  12668. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12669. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  12670. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12671. .toolChoose[toolIndex].askJson[0].checkList < 2
  12672. ) {
  12673. this.openTools(itemTaskIndex, 4, toolIndex);
  12674. // this.$message({
  12675. // message: "请填写完整问卷内容",
  12676. // type: "error",
  12677. // });
  12678. return;
  12679. }
  12680. }
  12681. if (i == 45) {
  12682. if (
  12683. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12684. .toolChoose[toolIndex].testJson ||
  12685. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12686. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  12687. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12688. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  12689. ) {
  12690. this.openTools(itemTaskIndex, 45, toolIndex);
  12691. // this.$message({
  12692. // message: "请填写完整问卷内容",
  12693. // type: "error",
  12694. // });
  12695. return;
  12696. }
  12697. }
  12698. if (i == 47) {
  12699. if (
  12700. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12701. .toolChoose[toolIndex].sentenceList ||
  12702. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12703. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  12704. ) {
  12705. this.openTools(itemTaskIndex, 47, toolIndex);
  12706. return;
  12707. }
  12708. }
  12709. if (i == 69) {
  12710. if (
  12711. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12712. .toolChoose[toolIndex].englishList
  12713. ) {
  12714. this.openTools(itemTaskIndex, 69, toolIndex);
  12715. return;
  12716. }
  12717. }
  12718. if (i == 70) {
  12719. if (
  12720. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12721. .toolChoose[toolIndex].englishVoiceJson
  12722. ) {
  12723. this.openTools(itemTaskIndex, 70, toolIndex);
  12724. return;
  12725. }
  12726. }
  12727. // if (i == 48) {
  12728. // if (
  12729. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12730. // .toolChoose[toolIndex].tableJson
  12731. // ) {
  12732. // this.openTools(itemTaskIndex, 48, toolIndex);
  12733. // return;
  12734. // }
  12735. // }
  12736. // if (i == 50) {
  12737. // if (
  12738. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12739. // .toolChoose[toolIndex].uploadJson
  12740. // ) {
  12741. // this.openTools(itemTaskIndex, 50, toolIndex);
  12742. // return;
  12743. // }
  12744. // }
  12745. if (i == 49) {
  12746. if (
  12747. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12748. .toolChoose[toolIndex].groupJson
  12749. ) {
  12750. this.openTools(itemTaskIndex, 49, toolIndex);
  12751. return;
  12752. }
  12753. }
  12754. if (i == 62) {
  12755. if (
  12756. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12757. .toolChoose[toolIndex].videoJson
  12758. ) {
  12759. this.openTools(itemTaskIndex, 62, toolIndex);
  12760. return;
  12761. }
  12762. }
  12763. if (i == 15) {
  12764. if (
  12765. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12766. .toolChoose[toolIndex].answerQ ||
  12767. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12768. .toolChoose[toolIndex].answerQ == ""
  12769. ) {
  12770. this.openTools(itemTaskIndex, 15, toolIndex);
  12771. // this.$message({
  12772. // message: "请填写问答内容",
  12773. // type: "error",
  12774. // });
  12775. return;
  12776. }
  12777. }
  12778. if (i == 40) {
  12779. if (
  12780. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12781. .toolChoose[toolIndex].rateJson ||
  12782. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12783. .toolChoose[toolIndex].rateJson.length
  12784. ) {
  12785. this.openTools(itemTaskIndex, 40, toolIndex);
  12786. return;
  12787. }
  12788. }
  12789. if (i == 41) {
  12790. if (
  12791. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12792. .toolChoose[toolIndex].selectJson ||
  12793. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12794. .toolChoose[toolIndex].selectJson.url == "" ||
  12795. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12796. .toolChoose[toolIndex].selectJson.select.length ||
  12797. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12798. .toolChoose[toolIndex].selectJson.answer.length
  12799. ) {
  12800. this.openTools(itemTaskIndex, 41, toolIndex);
  12801. return;
  12802. }
  12803. }
  12804. if (i == 42) {
  12805. if (
  12806. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12807. .toolChoose[toolIndex].answerQ ||
  12808. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12809. .toolChoose[toolIndex].answerQ == ""
  12810. ) {
  12811. this.openTools(itemTaskIndex, 42, toolIndex);
  12812. return;
  12813. }
  12814. }
  12815. if (
  12816. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12817. .toolChoose[toolIndex].tool.length > 0
  12818. ) {
  12819. if (
  12820. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12821. itemTaskIndex
  12822. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  12823. ) {
  12824. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12825. itemTaskIndex
  12826. ].toolChoose[toolIndex].tool.splice(
  12827. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12828. itemTaskIndex
  12829. ].toolChoose[toolIndex].tool.indexOf(i),
  12830. 1
  12831. );
  12832. } else {
  12833. // this.$message({
  12834. // message: "每个工具只能添加一个",
  12835. // type: "error",
  12836. // });
  12837. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12838. itemTaskIndex
  12839. ].toolChoose[toolIndex].tool = [];
  12840. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12841. itemTaskIndex
  12842. ].toolChoose[toolIndex].tool.push(i);
  12843. }
  12844. } else {
  12845. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12846. itemTaskIndex
  12847. ].toolChoose[toolIndex].tool.push(i);
  12848. }
  12849. this.$forceUpdate();
  12850. },
  12851. addAskList(index) {
  12852. this.askJson.askJson.splice(index + 1, 0, {
  12853. askstitle: "",
  12854. askItem: 1,
  12855. checkList: [],
  12856. });
  12857. this.askJson.askCount++;
  12858. },
  12859. addTestList(index) {
  12860. this.testJson.testJson.splice(index + 1, 0, {
  12861. teststitle: "",
  12862. testItem: 1,
  12863. checkList: [],
  12864. timuList: [],
  12865. answer: [],
  12866. type: "1",
  12867. });
  12868. this.testJson.testCount++;
  12869. },
  12870. deleteAskList(index) {
  12871. if (
  12872. !this.askJson.askJson[index].askstitle &&
  12873. this.askJson.askJson[index].askItem == 1 &&
  12874. !this.askJson.askJson[index].checkList[0]
  12875. ) {
  12876. this.askJson.askJson.splice(index, 1);
  12877. this.askJson.askCount--;
  12878. } else {
  12879. let _this = this;
  12880. _this
  12881. .$confirm("此操作不可撤销,是否继续?", "提示", {
  12882. confirmButtonText: "确定",
  12883. cancelButtonText: "取消",
  12884. type: "warning",
  12885. })
  12886. .then(() => {
  12887. _this.askJson.askJson.splice(index, 1);
  12888. _this.askJson.askCount--;
  12889. })
  12890. .catch(() => {
  12891. return;
  12892. });
  12893. }
  12894. },
  12895. deleteTestList(index) {
  12896. if (
  12897. !this.testJson.testJson[index].teststitle &&
  12898. this.testJson.testJson[index].testItem == 1 &&
  12899. !this.testJson.testJson[index].checkList[0]
  12900. ) {
  12901. this.testJson.testJson.splice(index, 1);
  12902. this.testJson.testCount--;
  12903. } else {
  12904. let _this = this;
  12905. _this
  12906. .$confirm("此操作不可撤销,是否继续?", "提示", {
  12907. confirmButtonText: "确定",
  12908. cancelButtonText: "取消",
  12909. type: "warning",
  12910. })
  12911. .then(() => {
  12912. _this.testJson.testJson.splice(index, 1);
  12913. _this.testJson.testCount--;
  12914. })
  12915. .catch(() => {
  12916. return;
  12917. });
  12918. }
  12919. },
  12920. askMove(type, index) {
  12921. if (type == 1) {
  12922. if (index > 0) {
  12923. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  12924. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12925. this.askJson.askJson[index - 1] = b;
  12926. this.askJson.askJson[index] = a;
  12927. }
  12928. } else {
  12929. if (index < this.askJson.askJson.length - 1) {
  12930. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  12931. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  12932. this.askJson.askJson[index + 1] = b;
  12933. this.askJson.askJson[index] = a;
  12934. }
  12935. }
  12936. this.$forceUpdate();
  12937. },
  12938. checkMove(type, index, checkIndex) {
  12939. if (type == 1) {
  12940. if (checkIndex > 0) {
  12941. let a = JSON.parse(
  12942. JSON.stringify(
  12943. this.askJson.askJson[index].checkList[checkIndex - 1]
  12944. )
  12945. );
  12946. let b = JSON.parse(
  12947. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12948. );
  12949. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  12950. this.askJson.askJson[index].checkList[checkIndex] = a;
  12951. }
  12952. } else {
  12953. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  12954. let a = JSON.parse(
  12955. JSON.stringify(
  12956. this.askJson.askJson[index].checkList[checkIndex + 1]
  12957. )
  12958. );
  12959. let b = JSON.parse(
  12960. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  12961. );
  12962. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  12963. this.askJson.askJson[index].checkList[checkIndex] = a;
  12964. }
  12965. }
  12966. this.$forceUpdate();
  12967. },
  12968. testMove(type, index) {
  12969. if (type == 1) {
  12970. if (index > 0) {
  12971. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  12972. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12973. this.testJson.testJson[index - 1] = b;
  12974. this.testJson.testJson[index] = a;
  12975. }
  12976. } else {
  12977. if (index < this.testJson.testJson.length - 1) {
  12978. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  12979. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  12980. this.testJson.testJson[index + 1] = b;
  12981. this.testJson.testJson[index] = a;
  12982. }
  12983. }
  12984. this.$forceUpdate();
  12985. },
  12986. tcheckMove(type, index, checkIndex) {
  12987. if (type == 1) {
  12988. if (checkIndex > 0) {
  12989. let a = JSON.parse(
  12990. JSON.stringify(
  12991. this.testJson.testJson[index].checkList[checkIndex - 1]
  12992. )
  12993. );
  12994. let b = JSON.parse(
  12995. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  12996. );
  12997. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  12998. this.testJson.testJson[index].checkList[checkIndex] = a;
  12999. }
  13000. } else {
  13001. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  13002. let a = JSON.parse(
  13003. JSON.stringify(
  13004. this.testJson.testJson[index].checkList[checkIndex + 1]
  13005. )
  13006. );
  13007. let b = JSON.parse(
  13008. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  13009. );
  13010. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  13011. this.testJson.testJson[index].checkList[checkIndex] = a;
  13012. }
  13013. }
  13014. this.$forceUpdate();
  13015. },
  13016. addcheckList(json, index) {
  13017. // json.checkList.length++;
  13018. json.checkList.splice(index + 1, 0, "");
  13019. json.askItem++;
  13020. this.$forceUpdate();
  13021. },
  13022. deletecheckList(json, index) {
  13023. // json.checkList.length--;
  13024. json.checkList.splice(index, 1);
  13025. json.askItem--;
  13026. this.$forceUpdate();
  13027. },
  13028. addTcheckList(json, index) {
  13029. // json.checkList.length++;
  13030. json.checkList.splice(index + 1, 0, "");
  13031. json.testItem++;
  13032. this.$forceUpdate();
  13033. },
  13034. deleteTcheckList(json, index) {
  13035. // json.checkList.length--;
  13036. json.checkList.splice(index, 1);
  13037. json.testItem--;
  13038. this.$forceUpdate();
  13039. },
  13040. checkTestType(type, json) {
  13041. json.type = type;
  13042. setTimeout(() => {
  13043. json.answer = [];
  13044. }, 100);
  13045. },
  13046. checkAskType(type, json) {
  13047. json.type = type;
  13048. // json.checkList = [];
  13049. this.$forceUpdate();
  13050. },
  13051. addSelectList(json) {
  13052. json.select.push("");
  13053. json.answer.push("");
  13054. },
  13055. deleteSelectList(json) {
  13056. // json.select.length--;
  13057. // json.answer.length--;
  13058. json.select.splice(json.select.length - 1, 1);
  13059. json.answer.splice(json.answer.length - 1, 1);
  13060. },
  13061. addAsk() {
  13062. if (this.askJson.askTitle === "") {
  13063. this.$message.error("标题不能为空!");
  13064. return;
  13065. }
  13066. var aj = this.askJson.askJson;
  13067. var b = 1;
  13068. for (var i = 0; i < aj.length; i++) {
  13069. if (aj[i].askstitle === "") {
  13070. var a = 1;
  13071. for (let index = 0; index < aj[i].askItem; index++) {
  13072. const element = aj[i].checkList[index]
  13073. ? aj[i].checkList[index]
  13074. : "";
  13075. if (element != "") {
  13076. b++;
  13077. this.$message.error(`请将题目${i + 1}填写完整。`);
  13078. return;
  13079. } else {
  13080. a++;
  13081. }
  13082. }
  13083. if (b == 1) {
  13084. this.$message.error("至少填写一个问题");
  13085. return;
  13086. }
  13087. } else if (aj[i].askstitle != "") {
  13088. for (let index = 0; index < aj[i].askItem; index++) {
  13089. const element = aj[i].checkList[index]
  13090. ? aj[i].checkList[index]
  13091. : "";
  13092. var index = 0;
  13093. for (var z = 0; z < aj[i].checkList.length; z++) {
  13094. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13095. if (checkC != "") {
  13096. index++;
  13097. } else {
  13098. this.$message.error(`题目${i + 1}选项不能为空!`);
  13099. return;
  13100. }
  13101. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13102. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13103. if (checkC == checkC2) {
  13104. this.$message.error(
  13105. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13106. );
  13107. return;
  13108. }
  13109. }
  13110. }
  13111. b++;
  13112. if (index < 2) {
  13113. this.$message.error("每道题目至少需要设置2个选项。");
  13114. return;
  13115. }
  13116. }
  13117. }
  13118. }
  13119. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  13120. var elc = el.checkList.filter((element) => {
  13121. return element != "";
  13122. });
  13123. return el.askstitle != "" && elc.length != 0;
  13124. });
  13125. if (!this.dialogVisible4) {
  13126. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13127. this.taskCount
  13128. ].toolChoose[this.toolIndex] = this.askJson;
  13129. }
  13130. this.dialogVisible5 = false;
  13131. if (
  13132. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13133. .toolChoose[this.toolIndex].tool != 4
  13134. ) {
  13135. this.addTools(4, this.taskCount, this.toolIndex);
  13136. }
  13137. },
  13138. addTest() {
  13139. // if (this.testJson.testTitle === "") {
  13140. // this.$message.error("标题不能为空!");
  13141. // return;
  13142. // }
  13143. var aj = this.testJson.testJson;
  13144. var b = 1;
  13145. for (var i = 0; i < aj.length; i++) {
  13146. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  13147. var a = 1;
  13148. for (let index = 0; index < aj[i].testItem; index++) {
  13149. const element = aj[i].checkList[index]
  13150. ? aj[i].checkList[index]
  13151. : "";
  13152. if (element != "") {
  13153. b++;
  13154. this.$message.error(`请将题目${i + 1}填写完整。`);
  13155. return;
  13156. } else {
  13157. a++;
  13158. }
  13159. }
  13160. if (b == 1) {
  13161. this.$message.error("至少填写一个问题");
  13162. return;
  13163. }
  13164. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  13165. for (let index = 0; index < aj[i].testItem; index++) {
  13166. const element = aj[i].checkList[index]
  13167. ? aj[i].checkList[index]
  13168. : "";
  13169. var index = 0;
  13170. for (var z = 0; z < aj[i].checkList.length; z++) {
  13171. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13172. if (checkC != "") {
  13173. index++;
  13174. } else {
  13175. this.$message.error(`题目${i + 1}选项不能为空!`);
  13176. return;
  13177. }
  13178. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13179. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13180. if (checkC == checkC2) {
  13181. this.$message.error(
  13182. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13183. );
  13184. return;
  13185. }
  13186. }
  13187. }
  13188. b++;
  13189. if (index < 2) {
  13190. this.$message.error("每道题目至少需要设置2个选项。");
  13191. return;
  13192. }
  13193. if (
  13194. (aj[i].type == "2" && !aj[i].answer.length) ||
  13195. (aj[i].type == "1" &&
  13196. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  13197. (aj[i].answer !== 0 && !aj[i].answer)))
  13198. ) {
  13199. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  13200. return;
  13201. }
  13202. }
  13203. }
  13204. }
  13205. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13206. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13207. var elc = el.checkList.filter((element) => {
  13208. return element != "";
  13209. });
  13210. return (
  13211. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  13212. );
  13213. });
  13214. isTestJson.testCount = isTestJson.testJson.length;
  13215. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13216. this.taskCount
  13217. ].toolChoose[this.toolIndex].testJson = isTestJson;
  13218. this.dialogVisibleChoice = false;
  13219. if (
  13220. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13221. .toolChoose[this.toolIndex].tool != 45
  13222. ) {
  13223. this.addTools(45, this.taskCount, this.toolIndex);
  13224. }
  13225. },
  13226. addVideoJson(videoJson) {
  13227. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13228. this.taskCount
  13229. ].toolChoose[this.toolIndex].videoJson = videoJson;
  13230. this.dialogVisibleVideo = false;
  13231. if (
  13232. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13233. .toolChoose[this.toolIndex].tool != 62
  13234. ) {
  13235. this.addTools(62, this.taskCount, this.toolIndex);
  13236. }
  13237. },
  13238. //自动获取剪贴板
  13239. pasteOption() {
  13240. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13241. if (!iframe) {
  13242. this.$message.error("请使用AI共创生成题目");
  13243. return;
  13244. }
  13245. let copyData = iframe.contentWindow.copyData;
  13246. if (!copyData || !copyData.selectData.length) {
  13247. this.$message.error("请使用AI共创生成题目");
  13248. return;
  13249. }
  13250. let selectData = copyData.selectData;
  13251. for (var i = 0; i < selectData.length; i++) {
  13252. let answer = 0;
  13253. switch (selectData[i].answer[0]) {
  13254. case "A":
  13255. answer = 0;
  13256. break;
  13257. case "B":
  13258. answer = 1;
  13259. break;
  13260. case "C":
  13261. answer = 2;
  13262. break;
  13263. case "D":
  13264. answer = 3;
  13265. break;
  13266. case "E":
  13267. answer = 4;
  13268. break;
  13269. default:
  13270. break;
  13271. }
  13272. this.testJson.testJson.push({
  13273. teststitle: selectData[i].subject,
  13274. testItem: selectData[i].options.length,
  13275. checkList: selectData[i].options,
  13276. timuList: [],
  13277. answer: answer,
  13278. type: "1",
  13279. });
  13280. this.testJson.testCount++;
  13281. }
  13282. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13283. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13284. var elc = el.checkList.filter((element) => {
  13285. return element != "";
  13286. });
  13287. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  13288. });
  13289. isTestJson.testCount = isTestJson.testJson.length;
  13290. if (!isTestJson.testCount) {
  13291. return;
  13292. }
  13293. this.testJson = isTestJson;
  13294. this.$forceUpdate();
  13295. },
  13296. pasteTask(taskJson) {
  13297. let stageTasksData = [];
  13298. if (taskJson) {
  13299. stageTasksData = taskJson;
  13300. } else {
  13301. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13302. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13303. if (!iframe && !iframe2) {
  13304. this.$message.error("请使用AI共创生成");
  13305. return;
  13306. }
  13307. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13308. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13309. if (
  13310. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  13311. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  13312. ) {
  13313. this.$message.error("请使用AI共创生成");
  13314. return;
  13315. }
  13316. stageTasksData = copyData
  13317. ? copyData.tasksData
  13318. : copyData2
  13319. ? copyData2.tasksData
  13320. : [{ taskName: "", taskDecs: "" }];
  13321. }
  13322. let taskA = [];
  13323. let tasks = stageTasksData;
  13324. for (var j = 0; j < tasks.length; j++) {
  13325. taskA.push({
  13326. task: tasks[j].taskName,
  13327. taskDetail: tasks[j].taskDecs,
  13328. chapterData: [],
  13329. toolText: "",
  13330. toolChoose: [
  13331. {
  13332. tool: [],
  13333. toolDetail: "",
  13334. toolType: 0,
  13335. askCount: 1,
  13336. askTitle: "",
  13337. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13338. },
  13339. ],
  13340. isShowTools: false,
  13341. askCount: 1,
  13342. isFold: 1,
  13343. askTitle: "",
  13344. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13345. checkJson: [{ checkCount: [], checkPerent: [] }],
  13346. homeworkList: [],
  13347. });
  13348. }
  13349. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  13350. this.$forceUpdate();
  13351. },
  13352. pasteStage(stageJson) {
  13353. let stageData = [];
  13354. if (stageJson) {
  13355. stageData = stageJson;
  13356. } else {
  13357. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13358. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13359. if (!iframe && !iframe2) {
  13360. this.$message.error("请使用AI共创生成");
  13361. return;
  13362. }
  13363. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13364. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13365. if (
  13366. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13367. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13368. ) {
  13369. this.$message.error("请使用AI共创生成");
  13370. return;
  13371. }
  13372. stageData = copyData
  13373. ? copyData.stageData
  13374. : copyData2
  13375. ? copyData2.stageData
  13376. : [""];
  13377. }
  13378. let stage = [];
  13379. for (var i = 0; i < stageData.length; i++) {
  13380. stage.push({
  13381. dyName: stageData[i], //单元标题
  13382. chapterInfo: [
  13383. {
  13384. isread: false,
  13385. chapterid: this.guid(),
  13386. title: "",
  13387. courseName: "",
  13388. taskJson: [
  13389. {
  13390. task: "",
  13391. taskDetail: "",
  13392. chapterData: [],
  13393. toolText: "",
  13394. toolChoose: [
  13395. {
  13396. tool: [],
  13397. toolDetail: "",
  13398. toolType: 0,
  13399. askCount: 1,
  13400. askTitle: "",
  13401. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13402. },
  13403. ],
  13404. isShowTools: false,
  13405. askCount: 1,
  13406. isFold: 1,
  13407. askTitle: "",
  13408. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13409. checkJson: [{ checkCount: [], checkPerent: [] }],
  13410. homeworkList: [],
  13411. },
  13412. ],
  13413. itemCount: 1,
  13414. fileList1: [],
  13415. video: [],
  13416. testData: [],
  13417. pData: [],
  13418. templateArray: [],
  13419. },
  13420. ],
  13421. });
  13422. }
  13423. let _this = this;
  13424. if (stageJson) {
  13425. if (!_this.cid) {
  13426. _this.unitJson = stage;
  13427. } else {
  13428. _this.unitIndex = 0;
  13429. _this.unitJson = stage;
  13430. _this.updateWork();
  13431. }
  13432. } else {
  13433. _this
  13434. .$confirm(
  13435. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  13436. "提示",
  13437. {
  13438. confirmButtonText: "确定",
  13439. cancelButtonText: "取消",
  13440. type: "warning",
  13441. }
  13442. )
  13443. .then(() => {
  13444. _this.unitIndex = 0;
  13445. _this.unitJson = stage;
  13446. // _this.steps++;
  13447. _this.updateWork();
  13448. })
  13449. .catch(() => {
  13450. return;
  13451. });
  13452. }
  13453. },
  13454. openStageBox() {
  13455. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  13456. this.dialogVisibleStageChange = true;
  13457. },
  13458. updateChange() {
  13459. this.$confirm(
  13460. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  13461. "提示",
  13462. {
  13463. confirmButtonText: "确定",
  13464. cancelButtonText: "取消",
  13465. type: "warning",
  13466. }
  13467. )
  13468. .then(() => {
  13469. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  13470. this.updateWork();
  13471. this.dialogVisibleStageChange = false;
  13472. })
  13473. .catch(() => {
  13474. return;
  13475. });
  13476. },
  13477. addAnswer() {
  13478. if (this.answerQ == "") {
  13479. this.$message.error("请输入您想要问的问题");
  13480. return;
  13481. }
  13482. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13483. this.taskCount
  13484. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13485. this.dialogVisible8 = false;
  13486. if (
  13487. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13488. .toolChoose[this.toolIndex].tool != 15
  13489. ) {
  13490. this.addTools(15, this.taskCount, this.toolIndex);
  13491. }
  13492. },
  13493. addMp3Answer() {
  13494. if (this.answerQ == "") {
  13495. this.$message.error("请输入您想要回答的问题");
  13496. return;
  13497. }
  13498. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13499. this.taskCount
  13500. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13501. this.dialogVisibleMp3 = false;
  13502. },
  13503. addRateAnswer() {
  13504. var a = 1;
  13505. for (var i = 0; i < this.rateJson.length; i++) {
  13506. if (this.rateJson[i].value == "") {
  13507. a = 2;
  13508. break;
  13509. }
  13510. }
  13511. if (a == 2) {
  13512. this.$message.error("请把评价信息填写完整");
  13513. return;
  13514. }
  13515. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13516. this.taskCount
  13517. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  13518. this.dialogVisibleRate = false;
  13519. if (
  13520. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13521. .toolChoose[this.toolIndex].tool != 40
  13522. ) {
  13523. this.addTools(40, this.taskCount, this.toolIndex);
  13524. }
  13525. },
  13526. addSelectAnswer() {
  13527. if (this.selectJson.url == "") {
  13528. this.$message.error("请上传题目");
  13529. return;
  13530. }
  13531. if (!this.selectJson.select.length) {
  13532. this.$message.error("请添加选项");
  13533. return;
  13534. }
  13535. if (!this.selectJson.answer.length) {
  13536. this.$message.error("请设置答案");
  13537. return;
  13538. }
  13539. var a = 1;
  13540. for (var i = 0; i < this.selectJson.answer.length; i++) {
  13541. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  13542. a = 2;
  13543. }
  13544. }
  13545. if (a == 2) {
  13546. this.$message.error("请设置答案");
  13547. return;
  13548. }
  13549. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13550. this.taskCount
  13551. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  13552. this.dialogVisibleSelect = false;
  13553. if (
  13554. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13555. .toolChoose[this.toolIndex].tool != 41
  13556. ) {
  13557. this.addTools(41, this.taskCount, this.toolIndex);
  13558. }
  13559. },
  13560. nextSelectSteps() {
  13561. if (this.selectJson.url == "") {
  13562. this.$message.error("请上传题目");
  13563. return;
  13564. }
  13565. if (!this.selectJson.select.length) {
  13566. this.$message.error("请添加选项");
  13567. return;
  13568. } else {
  13569. for (var z = 0; z < this.selectJson.select.length; z++) {
  13570. let checkC = this.selectJson.select[z];
  13571. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  13572. let checkC2 = this.selectJson.select[z2];
  13573. if (checkC == checkC2) {
  13574. this.$message.error(
  13575. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13576. );
  13577. return;
  13578. }
  13579. }
  13580. }
  13581. }
  13582. var a = 1;
  13583. for (var i = 0; i < this.selectJson.select.length; i++) {
  13584. if (!this.selectJson.select[i]) {
  13585. a = 2;
  13586. }
  13587. }
  13588. if (a == 2) {
  13589. this.$message.error("添加的选项不能为空");
  13590. return;
  13591. }
  13592. this.selectSteps++;
  13593. },
  13594. selectCourseDetail() {
  13595. if (this.cid == "" || this.cid == undefined) {
  13596. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  13597. this.isTeacherSee = true;
  13598. }
  13599. console.log("这是新增课程");
  13600. this.selectAllType();
  13601. this.chatid = uuidv4();
  13602. // this.courseTextB = false
  13603. } else {
  13604. this.isOutline = true
  13605. this.isOutline2 = true
  13606. this.cpoteType = 4
  13607. this.cidType = 1;
  13608. let params = {
  13609. cid: this.cid,
  13610. };
  13611. this.ajax
  13612. .get(this.$store.state.api + "select_course_detail", params)
  13613. .then((res) => {
  13614. this.unitJson = JSON.parse(res.data[0][0].chapters);
  13615. this.courseState = res.data[0][0].state;
  13616. for (var j = 0; j < this.unitJson.length; j++) {
  13617. for (
  13618. var k = 0;
  13619. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  13620. k++
  13621. ) {
  13622. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  13623. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13624. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13625. : [];
  13626. let _chapterData = [];
  13627. for (
  13628. var c = 0;
  13629. c <
  13630. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  13631. .length;
  13632. c++
  13633. ) {
  13634. if (
  13635. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13636. ) {
  13637. _chapterData.push(
  13638. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13639. );
  13640. }
  13641. }
  13642. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  13643. _chapterData;
  13644. }
  13645. }
  13646. this.$forceUpdate();
  13647. this.courseName = res.data[0][0].title;
  13648. this.courseText = res.data[0][0].brief;
  13649. this.courseText2 = res.data[0][0].reBrief;
  13650. this.evalua = res.data[0][0].evaId;
  13651. this.cover = JSON.parse(res.data[0][0].cover);
  13652. this.noneBtnImg = this.cover.length >= 1;
  13653. if (res.data[0][0].refile) {
  13654. this.infoData = JSON.parse(res.data[0][0].refile)
  13655. }
  13656. // this.checkboxList =
  13657. // res.data[0][0].course_student.length > 0
  13658. // ? JSON.parse(res.data[0][0].course_student)
  13659. // : [];
  13660. this.checkboxList2 = res.data[0][0].juri
  13661. ? res.data[0][0].juri.split(",")
  13662. : [];
  13663. this.inviteCode = [];
  13664. for (var i = 0; i < res.data[2].length; i++) {
  13665. this.inviteCode.push({
  13666. cid: res.data[2][i].classid,
  13667. ic: res.data[2][i].code,
  13668. });
  13669. }
  13670. this.checkboxList3 = res.data[0][0].course_teacher
  13671. ? res.data[0][0].course_teacher.split(",")
  13672. : [];
  13673. // this.isTeacherSee =
  13674. // res.data[0][0].is_teacher_look == 0 ? true : false;
  13675. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  13676. this.myWord = res.data[0][0].template;
  13677. this.templateC.id = "123";
  13678. this.courseUserid = res.data[0][0].userid;
  13679. // if(this.courseUserid == this.userid){
  13680. // this.InviteChange(this.checkboxList2)
  13681. // }
  13682. this.nbOrder = res.data[0][0].ordernumber;
  13683. this.courseTypeId = [];
  13684. for (var i = 0; i < res.data[1].length; i++) {
  13685. this.courseTypeId.push(res.data[1][i].typeid);
  13686. }
  13687. console.log(this.courseTypeId);
  13688. // if (this.timer) clearInterval(this.timer);
  13689. if (this.timer) clearTimeout(this.timer);
  13690. this.timer = null;
  13691. // this.timer = setInterval(() => {
  13692. if(res.data[3].length){
  13693. try {
  13694. this.aiJson = JSON.parse(res.data[3][0].tips);
  13695. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13696. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13697. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13698. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13699. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13700. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13701. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13702. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13703. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13704. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13705. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13706. }
  13707. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13708. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13709. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13710. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  13711. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  13712. this.templateid = res.data[3][0].template;
  13713. }catch(error){
  13714. console.error(error)
  13715. }
  13716. }
  13717. if(res.data[0][0].cpote){
  13718. try {
  13719. this.cpote = JSON.parse(res.data[0][0].cpote);
  13720. }catch(error){
  13721. console.error(error)
  13722. }
  13723. }
  13724. if(res.data[0][0].setting){
  13725. try {
  13726. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  13727. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  13728. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  13729. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  13730. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  13731. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  13732. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  13733. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  13734. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  13735. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  13736. 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;
  13737. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  13738. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  13739. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  13740. 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;
  13741. if(this.targetCourseText2 || (!this.teacherCourseText)){
  13742. this.courseTextBool = true
  13743. }
  13744. // if(!this.teacherCourseText && !this.targetCourseText2){
  13745. // this.isuseT = 1
  13746. // }
  13747. }catch(error){
  13748. console.error(error)
  13749. }
  13750. }
  13751. if(this.courseText){
  13752. this.courseTextB = false
  13753. }
  13754. if(this.teacherCourseText){
  13755. this.teacherCourseTextB = false
  13756. }
  13757. if(this.targetCourseText){
  13758. this.targetCourseTextB = false
  13759. }
  13760. if(this.targetCourseText2){
  13761. this.targetCourseText2B = false
  13762. }
  13763. this.isFileSearch = res.data[0][0].iresearch == 1
  13764. // this.seleteCourseUpdate();
  13765. this.setMan();
  13766. this.selectAllType();
  13767. this.unitJson[
  13768. this.unitIndex
  13769. ].chapterInfo[0].taskJson[0].toolOpen = true;
  13770. // }, 5000);
  13771. this.$forceUpdate();
  13772. setTimeout(() => {
  13773. this.checkEva(this.evalua);
  13774. setTimeout(() => {
  13775. this.checkEva(this.evalua);
  13776. }, 100);
  13777. }, 100);
  13778. })
  13779. .catch((err) => {
  13780. console.error(err);
  13781. });
  13782. }
  13783. if(this.aiId){
  13784. let params = {
  13785. cid: this.aiId,
  13786. };
  13787. this.ajax
  13788. .get(this.$store.state.api + "select_course_detail", params)
  13789. .then((res) => {
  13790. let _unitJson = JSON.parse(res.data[0][0].chapters);
  13791. let fileInfo = []
  13792. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  13793. for(var i = 0; i < _unitJson.length; i++){
  13794. let tasks = _unitJson[i].chapterInfo[0].taskJson
  13795. for(var j = 0; j < tasks.length; j++){
  13796. let _infoData = tasks[j].chapterData.filter(el => {
  13797. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  13798. })
  13799. if(_infoData.length){
  13800. fileInfo = [...fileInfo, ..._infoData]
  13801. }
  13802. }
  13803. }
  13804. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  13805. this.$forceUpdate();
  13806. this.courseName = res.data[0][0].title;
  13807. this.courseText = res.data[0][0].brief;
  13808. this.courseText2 = res.data[0][0].reBrief;
  13809. this.cover = JSON.parse(res.data[0][0].cover);
  13810. this.noneBtnImg = this.cover.length >= 1;
  13811. this.checkboxList2 = res.data[0][0].juri
  13812. ? res.data[0][0].juri.split(",")
  13813. : [];
  13814. this.inviteCode = [];
  13815. for (var i = 0; i < res.data[2].length; i++) {
  13816. this.inviteCode.push({
  13817. cid: res.data[2][i].classid,
  13818. ic: res.data[2][i].code,
  13819. });
  13820. }
  13821. this.checkboxList3 = res.data[0][0].course_teacher
  13822. ? res.data[0][0].course_teacher.split(",")
  13823. : [];
  13824. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  13825. this.myWord = res.data[0][0].template;
  13826. this.templateC.id = "123";
  13827. this.courseTypeId = [];
  13828. for (var i = 0; i < res.data[1].length; i++) {
  13829. this.courseTypeId.push(res.data[1][i].typeid);
  13830. }
  13831. console.log(this.courseTypeId);
  13832. if(res.data[3].length){
  13833. try {
  13834. this.aiJson = JSON.parse(res.data[3][0].tips);
  13835. this.templateid = res.data[3][0].template;
  13836. }catch(error){
  13837. console.error(error)
  13838. }
  13839. }
  13840. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13841. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13842. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13843. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13844. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13845. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13846. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13847. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13848. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13849. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13850. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13851. }
  13852. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13853. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13854. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13855. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  13856. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  13857. if(res.data[0][0].cpote){
  13858. try {
  13859. this.cpote = JSON.parse(res.data[0][0].cpote);
  13860. }catch(error){
  13861. console.error(error)
  13862. }
  13863. }
  13864. if(res.data[0][0].setting){
  13865. try {
  13866. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  13867. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  13868. 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];
  13869. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  13870. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  13871. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  13872. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  13873. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  13874. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  13875. 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];
  13876. 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;
  13877. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  13878. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  13879. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  13880. 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;
  13881. if(this.targetCourseText2 || (!this.teacherCourseText)){
  13882. this.courseTextBool = true
  13883. }
  13884. // if(!this.teacherCourseText && !this.targetCourseText2){
  13885. // this.isuseT = 1
  13886. // }
  13887. }catch(error){
  13888. console.error(error)
  13889. }
  13890. }
  13891. if(this.teacherInfoData.length){
  13892. this.isuseT = true
  13893. }
  13894. if(this.courseText){
  13895. this.courseTextB = false
  13896. }
  13897. if(this.teacherCourseText){
  13898. this.teacherCourseTextB = false
  13899. }
  13900. if(this.targetCourseText){
  13901. this.targetCourseTextB = false
  13902. }
  13903. if(this.targetCourseText2){
  13904. this.targetCourseText2B = false
  13905. }
  13906. this.setMan();
  13907. this.unitJson[
  13908. this.unitIndex
  13909. ].chapterInfo[0].taskJson[0].toolOpen = true;
  13910. this.$forceUpdate();
  13911. setTimeout(() => {
  13912. this.checkEva(this.evalua);
  13913. setTimeout(() => {
  13914. this.checkEva(this.evalua);
  13915. }, 100);
  13916. }, 100);
  13917. })
  13918. .catch((err) => {
  13919. console.error(err);
  13920. });
  13921. }
  13922. // if(this.cidType != 1 && this.templateid == ''){
  13923. // this.promptShow = true
  13924. // }
  13925. },
  13926. seleteCourseUpdate() {
  13927. let params = {
  13928. cid: this.cid,
  13929. };
  13930. this.ajax
  13931. .get(this.$store.state.api + "select_course_detail", params)
  13932. .then((res) => {
  13933. // console.log(this.unitJson);
  13934. let unitJson = JSON.parse(res.data[0][0].chapters);
  13935. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  13936. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  13937. let _unitJson = [];
  13938. let _chapAarry = [];
  13939. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  13940. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  13941. let index = 1;
  13942. let chapindex;
  13943. if (_unitJson2.length > unitJson.length) {
  13944. for (let c = 0; c < _unitJson2.length; c++) {
  13945. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  13946. }
  13947. for (let j = 0; j < unitJson.length; j++) {
  13948. let count = 0;
  13949. for (let k = 0; k < _unitJson2.length; k++) {
  13950. if (
  13951. unitJson[j].chapterInfo[0].chapterid ==
  13952. _unitJson2[k].chapterInfo[0].chapterid
  13953. ) {
  13954. count++;
  13955. _chapAarry.splice(
  13956. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13957. 1
  13958. );
  13959. _unitJson.push(unitJson[j]);
  13960. break;
  13961. }
  13962. }
  13963. // if(count === 0){
  13964. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13965. // }
  13966. }
  13967. for (let k = 0; k < _unitJson2.length; k++) {
  13968. if (_unitJson2[k].isUpdate == 1) {
  13969. _chapAarry.splice(
  13970. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  13971. 1
  13972. );
  13973. _unitJson.push(_unitJson2[k]);
  13974. }
  13975. }
  13976. console.log(_chapAarry);
  13977. for (let d = 0; d < _unitJson2.length; d++) {
  13978. if (
  13979. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  13980. ) {
  13981. if (_unitIndex == d) {
  13982. index = 2;
  13983. }
  13984. chapindex = d;
  13985. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  13986. }
  13987. }
  13988. } else {
  13989. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  13990. }
  13991. for (let i = 0; i < unitJson.length; i++) {
  13992. if (
  13993. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  13994. _unitJson[i].chapterInfo[0].chapterid !=
  13995. unitJson[i].chapterInfo[0].chapterid
  13996. ) {
  13997. if (i == _unitJson.length - 1) {
  13998. // this.unitIndex++
  13999. _unitIndex2++;
  14000. }
  14001. _unitJson.splice(i, 0, unitJson[i]);
  14002. } else if (i > _unitJson.length - 1) {
  14003. _unitJson.push(unitJson[i]);
  14004. } else if (
  14005. _unitJson[i].chapterInfo[0].chapterid ==
  14006. unitJson[i].chapterInfo[0].chapterid
  14007. ) {
  14008. _unitJson[i] = unitJson[i];
  14009. }
  14010. // if (i == _unitIndex) {
  14011. // continue;
  14012. // } else
  14013. }
  14014. if (_chapAarry.length && index != 2) {
  14015. if (chapindex < _unitIndex) {
  14016. this.isDelete = 2;
  14017. // this.unitIndex--;
  14018. _unitIndex2--;
  14019. } else if (
  14020. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  14021. _unitJson[_unitIndex].chapterInfo[0].chapterid
  14022. ) {
  14023. this.isDelete = 2;
  14024. for (let n = 0; n < _unitJson.length; n++) {
  14025. if (
  14026. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  14027. _unitJson[n].chapterInfo[0].chapterid
  14028. ) {
  14029. // this.unitIndex = n;
  14030. _unitIndex2 = n;
  14031. _unitJson[n] = _unitJson2[_unitIndex];
  14032. break;
  14033. }
  14034. }
  14035. }
  14036. } else if (index != 2) {
  14037. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  14038. _unitJson2[_unitIndex];
  14039. for (
  14040. var ci = 0;
  14041. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  14042. ci++
  14043. ) {
  14044. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  14045. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  14046. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14047. .toolChoose
  14048. : [];
  14049. let _chapterData = [];
  14050. for (
  14051. var c = 0;
  14052. c <
  14053. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  14054. .length;
  14055. c++
  14056. ) {
  14057. if (
  14058. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14059. .chapterData[c]
  14060. ) {
  14061. _chapterData.push(
  14062. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14063. .chapterData[c]
  14064. );
  14065. }
  14066. }
  14067. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  14068. _chapterData;
  14069. }
  14070. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  14071. }
  14072. if (index == 1) {
  14073. this.unitJson = _unitJson;
  14074. this.$forceUpdate();
  14075. setTimeout(() => {
  14076. if (this.unitIndex != _unitIndex2) {
  14077. this.isDelete = 2;
  14078. this.unitIndex = _unitIndex2;
  14079. }
  14080. }, 0);
  14081. this.timer = setTimeout(() => {
  14082. this.seleteCourseUpdate();
  14083. }, 1000);
  14084. } else if (index == 2) {
  14085. let _this = this;
  14086. _this
  14087. .$confirm(
  14088. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  14089. "提示",
  14090. {
  14091. confirmButtonText: "需要",
  14092. cancelButtonText: "取消",
  14093. type: "warning",
  14094. }
  14095. )
  14096. .then(() => {
  14097. if (_this.time()) {
  14098. _this.restoreWork(
  14099. _chapAarry[0],
  14100. _unitJson,
  14101. chapindex,
  14102. _unitJson2,
  14103. _unitIndex2
  14104. );
  14105. }
  14106. })
  14107. .catch(() => {
  14108. _this.unitJson = _unitJson;
  14109. _this.$forceUpdate();
  14110. setTimeout(() => {
  14111. if (this.unitIndex != _unitIndex2) {
  14112. this.isDelete = 2;
  14113. this.unitIndex = _unitIndex2;
  14114. }
  14115. }, 0);
  14116. _this.timer = setTimeout(() => {
  14117. _this.seleteCourseUpdate();
  14118. }, 1000);
  14119. });
  14120. }
  14121. // 在复制操作之前记录滚动位置
  14122. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14123. // 执行复制操作
  14124. // 复制操作完成后恢复滚动位置
  14125. this.$nextTick(() => {
  14126. if (this.$refs.scrollContainer) {
  14127. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14128. }
  14129. });
  14130. })
  14131. .catch((err) => {
  14132. console.error(err);
  14133. });
  14134. },
  14135. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  14136. let params = [
  14137. {
  14138. cid: this.cid,
  14139. chapters: JSON.stringify(this.unitJson),
  14140. uid: this.userid,
  14141. chapid: chapid,
  14142. },
  14143. ];
  14144. this.ajax
  14145. .post(this.$store.state.api + "restoreWork", params)
  14146. .then((res) => {
  14147. this.$message({
  14148. message: "恢复成功",
  14149. type: "success",
  14150. });
  14151. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  14152. this.unitJson = unitJson;
  14153. this.$forceUpdate();
  14154. setTimeout(() => {
  14155. if (this.unitIndex != unitIndex2) {
  14156. this.isDelete = 2;
  14157. this.unitIndex = unitIndex2;
  14158. }
  14159. }, 0);
  14160. this.timer = setTimeout(() => {
  14161. this.seleteCourseUpdate();
  14162. }, 1000);
  14163. })
  14164. .catch((err) => {
  14165. this.$message.error("网络不佳");
  14166. console.error(err);
  14167. });
  14168. },
  14169. getTypeName() {
  14170. console.log(this.courseTypeId);
  14171. this.$forceUpdate();
  14172. },
  14173. selectAllType() {
  14174. let params = {
  14175. org: this.org && this.org != "" ? this.org : "",
  14176. oid: this.oid && this.oid != "" ? this.oid : "",
  14177. };
  14178. this.ajax
  14179. .get(this.$store.state.api + "selectAllType", params)
  14180. .then((res) => {
  14181. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14182. res.data[0] = [...res.data[0], ...res.data[4]];
  14183. }
  14184. this.CourseType = res.data;
  14185. this.CourseType2 = [
  14186. { name: "智见课程", id: [] },
  14187. { name: "智行课程", id: [] },
  14188. { name: "智创课程", id: [] },
  14189. ];
  14190. for (var cti = 0; cti < res.data[0].length; cti++) {
  14191. if (
  14192. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14193. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  14194. ) {
  14195. this.CourseType2[0].id.push(res.data[0][cti].id);
  14196. } else if (
  14197. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  14198. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14199. ) {
  14200. this.CourseType2[1].id.push(res.data[0][cti].id);
  14201. } else if (
  14202. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14203. ) {
  14204. this.CourseType2[2].id.push(res.data[0][cti].id);
  14205. }
  14206. if (
  14207. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14208. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  14209. ) {
  14210. res.data[0][cti].name = "年级";
  14211. } else if (
  14212. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  14213. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14214. ) {
  14215. res.data[0][cti].name = "学科";
  14216. } else if (
  14217. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14218. ) {
  14219. res.data[0][cti].name = "主题";
  14220. }
  14221. }
  14222. let _courseTypeId = [];
  14223. for (var i = 0; i < res.data[0].length; i++) {
  14224. if (!this.cid) {
  14225. this.courseTypeId[res.data[0][i].id] = [];
  14226. }
  14227. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  14228. // }
  14229. this.CourseTypeJson[res.data[0][i].id] = [];
  14230. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14231. if (res.data[0][i].name == "栏目") {
  14232. this.CourseType[0][i].name = "主题";
  14233. }
  14234. }
  14235. if (res.data[2].length == 0 && res.data[3].length == 0) {
  14236. for (var j = 0; j < res.data[1].length; j++) {
  14237. if (
  14238. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  14239. _courseTypeId.indexOf(res.data[1][j].id) == -1
  14240. ) {
  14241. _courseTypeId.push(res.data[1][j].id);
  14242. }
  14243. if (res.data[0][i].id == res.data[1][j].pid) {
  14244. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14245. }
  14246. }
  14247. } else {
  14248. if (res.data[2].length > 0) {
  14249. for (var j = 0; j < res.data[2].length; j++) {
  14250. if (
  14251. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  14252. _courseTypeId.indexOf(res.data[2][j].id) == -1
  14253. ) {
  14254. _courseTypeId.push(res.data[2][j].id);
  14255. }
  14256. if (res.data[0][i].id == res.data[2][j].pid) {
  14257. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14258. }
  14259. }
  14260. }
  14261. if (res.data[3].length > 0) {
  14262. for (var j = 0; j < res.data[3].length; j++) {
  14263. if (
  14264. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  14265. _courseTypeId.indexOf(res.data[3][j].id) == -1
  14266. ) {
  14267. _courseTypeId.push(res.data[3][j].id);
  14268. }
  14269. if (res.data[0][i].id == res.data[3][j].pid) {
  14270. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14271. }
  14272. }
  14273. }
  14274. }
  14275. }
  14276. this.courseTypeId = _courseTypeId;
  14277. })
  14278. .catch((err) => {
  14279. console.error(err);
  14280. });
  14281. },
  14282. selectType() {
  14283. this.ajax
  14284. .get(this.$store.state.api + "selectType")
  14285. .then((res) => {
  14286. this.CourseType = res.data;
  14287. for (var i = 0; i < res.data[0].length; i++) {
  14288. if (!this.cid) {
  14289. this.courseTypeId[res.data[0][i].id] = "";
  14290. }
  14291. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14292. if (res.data[0][i].name == "栏目") {
  14293. this.CourseType[0][i].name = "主题";
  14294. }
  14295. }
  14296. for (var j = 0; j < res.data[1].length; j++) {
  14297. if (res.data[0][i].id == res.data[1][j].pid) {
  14298. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14299. this.CourseTypeJson[res.data[0][i].id] = [];
  14300. }
  14301. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14302. }
  14303. }
  14304. }
  14305. this.selectTypeByOid();
  14306. this.selectTypeByOrg();
  14307. })
  14308. .catch((err) => {
  14309. console.error(err);
  14310. });
  14311. },
  14312. selectTypeByOid() {
  14313. let params = {
  14314. oid: this.oid,
  14315. };
  14316. this.ajax
  14317. .get(this.$store.state.api + "selectTypeByOid", params)
  14318. .then((res) => {
  14319. for (var i = 0; i < res.data[0].length; i++) {
  14320. for (var j = 0; j < res.data[1].length; j++) {
  14321. if (res.data[0][i].id == res.data[1][j].pid) {
  14322. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14323. this.CourseTypeJson[res.data[0][i].id] = [];
  14324. }
  14325. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14326. }
  14327. }
  14328. }
  14329. })
  14330. .catch((err) => {
  14331. console.error(err);
  14332. });
  14333. },
  14334. selectTypeByOrg() {
  14335. let params = {
  14336. oid: this.org,
  14337. };
  14338. this.ajax
  14339. .get(this.$store.state.api + "selectTypeByOrg", params)
  14340. .then((res) => {
  14341. for (var i = 0; i < res.data[0].length; i++) {
  14342. for (var j = 0; j < res.data[1].length; j++) {
  14343. if (res.data[0][i].id == res.data[1][j].pid) {
  14344. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14345. this.CourseTypeJson[res.data[0][i].id] = [];
  14346. }
  14347. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14348. }
  14349. }
  14350. }
  14351. this.$forceUpdate();
  14352. })
  14353. .catch((err) => {
  14354. console.error(err);
  14355. });
  14356. },
  14357. OtherMb(type, task) {
  14358. if (task === 0 || task) {
  14359. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14360. task
  14361. ].isEvaFold = true;
  14362. }
  14363. this.typeMode = type;
  14364. setTimeout(() => {
  14365. this.checkEva(this.checkId);
  14366. setTimeout(() => {
  14367. this.checkEva(this.checkId);
  14368. }, 100);
  14369. }, 100);
  14370. },
  14371. openMember() {
  14372. this.searchTN = "";
  14373. this.getTeacher();
  14374. this.dialogVisibleMember = true;
  14375. },
  14376. checkEva(id, type) {
  14377. this.dialogVisiblemb = false;
  14378. this.selectEva();
  14379. if (this.evalua != id && type == 2) {
  14380. this.$message.success("导入成功");
  14381. setTimeout(() => {
  14382. this.checkEva(id);
  14383. }, 100);
  14384. }
  14385. this.evalua = id;
  14386. this.checkId = id;
  14387. if (this.evalua != "") {
  14388. for (var i = 0; i < this.evaJuri.length; i++) {
  14389. if (this.evalua == this.evaJuri[i].id) {
  14390. this.eTitle = this.evaJuri[i].title;
  14391. this.eJson = JSON.parse(this.evaJuri[i].content);
  14392. }
  14393. }
  14394. this.data.data = [];
  14395. this.$forceUpdate();
  14396. setTimeout(() => {
  14397. this.setMindData();
  14398. }, 1000);
  14399. }
  14400. },
  14401. deleteEva() {
  14402. let _this = this;
  14403. if (_this.evalua == "") {
  14404. this.$message.warning("内容已经清空了,请勿重复清空");
  14405. return;
  14406. }
  14407. _this
  14408. .$confirm("确定删除此目标吗?", "提示", {
  14409. confirmButtonText: "确定",
  14410. cancelButtonText: "取消",
  14411. type: "warning",
  14412. })
  14413. .then(() => {
  14414. _this.evalua = "";
  14415. _this.checkId = "";
  14416. _this.eTitle = "";
  14417. let _unitJson = _this.unitJson;
  14418. for (var i = 0; i < _unitJson.length; i++) {
  14419. let _task = _unitJson[i].chapterInfo[0].taskJson;
  14420. for (var j = 0; j < _task.length; j++) {
  14421. let _eList = _task[j].eList;
  14422. for (var k = 0; k < _eList.length; k++) {
  14423. delete _eList[k].target;
  14424. }
  14425. }
  14426. }
  14427. _this.$forceUpdate();
  14428. if (_this.cid) {
  14429. _this.updateWork();
  14430. }
  14431. })
  14432. .catch(() => {
  14433. return;
  14434. });
  14435. },
  14436. selectEva() {
  14437. let params = {
  14438. oid: this.oid,
  14439. };
  14440. this.ajax
  14441. .get(this.$store.state.api + "selectAllEvaluation", params)
  14442. .then((res) => {
  14443. this.evaJuri = res.data[0];
  14444. // 在复制操作之前记录滚动位置
  14445. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14446. // 执行复制操作
  14447. // 复制操作完成后恢复滚动位置
  14448. this.$nextTick(() => {
  14449. if (this.$refs.scrollContainer) {
  14450. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14451. }
  14452. });
  14453. })
  14454. .catch((err) => {
  14455. console.error(err);
  14456. });
  14457. },
  14458. setMindData() {
  14459. let targetArray = [];
  14460. this.data.data = [];
  14461. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  14462. let _eJson = Object.keys(this.eJson);
  14463. let _e = this.eJson;
  14464. for (let i = 0; i < _eJson.length; i++) {
  14465. let element = _e[_eJson[i]];
  14466. this.data.data.push({
  14467. id: element.id,
  14468. parentid: "root",
  14469. topic: element.name,
  14470. });
  14471. // targetArray.push({
  14472. // id: element.id,
  14473. // parentid: "root",
  14474. // name: element.name,
  14475. // });
  14476. targetArray.push({
  14477. value: element.name,
  14478. label: element.name,
  14479. children: [],
  14480. });
  14481. let _eJsonc = Object.keys(element.child);
  14482. let _e2 = element.child;
  14483. for (let j = 0; j < _eJsonc.length; j++) {
  14484. let _ec = _e2[_eJsonc[j]];
  14485. this.data.data.push({
  14486. id: _ec.id,
  14487. parentid: element.id,
  14488. topic: _ec.name,
  14489. });
  14490. // targetArray.push({
  14491. // id: _ec.id,
  14492. // parentid: element.id,
  14493. // name: _ec.name,
  14494. // });
  14495. targetArray[i].children.push({
  14496. value: _ec.name,
  14497. label: _ec.name,
  14498. children: [],
  14499. });
  14500. let _eJsonz = Object.keys(_ec.child);
  14501. let _e3 = _ec.child;
  14502. for (let z = 0; z < _eJsonz.length; z++) {
  14503. let _ez = _e3[_eJsonz[z]];
  14504. this.data.data.push({
  14505. id: _ez.id,
  14506. parentid: _ec.id,
  14507. topic: _ez.name,
  14508. });
  14509. // targetArray.push({
  14510. // id: _ez.id,
  14511. // parentid: _ec.id,
  14512. // name: _ez.name,
  14513. // });
  14514. targetArray[i].children[j].children.push({
  14515. value: _ez.name,
  14516. label: _ez.name,
  14517. });
  14518. }
  14519. }
  14520. }
  14521. this.targetArray = targetArray;
  14522. this.$forceUpdate();
  14523. },
  14524. /*添加评价 */
  14525. addEList(index, tIndex) {
  14526. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  14527. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  14528. value: "",
  14529. detail: "",
  14530. score: 5,
  14531. isai: "1",
  14532. })
  14533. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  14534. { value: "", detail: "", score: 5,isai: "1", },
  14535. ]);
  14536. this.$forceUpdate();
  14537. },
  14538. openEList(index, tIndex) {
  14539. this.evaIndex = index;
  14540. this.evatIndex = tIndex;
  14541. this.evaBoxDialog = true;
  14542. },
  14543. addCET(index, tIndex) {
  14544. this.cetIndex = index;
  14545. this.cettIndex = tIndex;
  14546. this.selectAllType1();
  14547. },
  14548. addCETemplate() {
  14549. var array =
  14550. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  14551. .eList;
  14552. let params = [
  14553. {
  14554. uid: this.userid,
  14555. n: this.templateName,
  14556. json: JSON.stringify(array),
  14557. t: 1,
  14558. oid: this.oid,
  14559. },
  14560. ];
  14561. this.ajax
  14562. .post(this.$store.state.api + "addCETShare", params)
  14563. .then((res) => {
  14564. this.addTypeByCET(res.data[0][0].id);
  14565. })
  14566. .catch((err) => {
  14567. this.$message.error("网络不佳");
  14568. console.error(err);
  14569. });
  14570. },
  14571. addTypeByCET(id) {
  14572. if (this.setTypeJson.two == "") {
  14573. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  14574. return;
  14575. }
  14576. let params = {
  14577. cid: id,
  14578. };
  14579. this.ajax
  14580. .get(this.$store.state.api + "deleteCETLabel", params)
  14581. .then((res) => {
  14582. for (var i = 0; i < 2; i++) {
  14583. let tid = "";
  14584. if (i == 0) {
  14585. tid = this.setTypeJson.one;
  14586. } else {
  14587. tid = this.setTypeJson.two;
  14588. }
  14589. let params = [
  14590. {
  14591. cid: id,
  14592. tid: tid,
  14593. uid: this.userid,
  14594. },
  14595. ];
  14596. this.ajax
  14597. .post(this.$store.state.api + "addCETLabel", params)
  14598. .then((res) => {
  14599. this.$message({
  14600. message: "添加成功",
  14601. type: "success",
  14602. });
  14603. this.close();
  14604. })
  14605. .catch((err) => {
  14606. this.$message.error("网络不佳");
  14607. console.error(err);
  14608. });
  14609. }
  14610. })
  14611. .catch((err) => {
  14612. this.$message.error("网络不佳");
  14613. console.error(err);
  14614. });
  14615. },
  14616. updateEvaJson(array) {
  14617. array = array.filter((item) => {
  14618. item.isai = "1"
  14619. return item;
  14620. });
  14621. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  14622. this.evatIndex
  14623. ].eList = array;
  14624. },
  14625. forceUpdate() {
  14626. this.$forceUpdate();
  14627. },
  14628. forceUpdate2() {
  14629. setTimeout(() => {
  14630. this.courseText += "*0*%*";
  14631. setTimeout(() => {
  14632. this.courseText = this.courseText.replaceAll("*0*%*", "");
  14633. }, 0);
  14634. }, 100);
  14635. this.$forceUpdate();
  14636. },
  14637. deletEList(index, tIndex, eIndex) {
  14638. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  14639. eIndex,
  14640. 1
  14641. );
  14642. this.$forceUpdate();
  14643. },
  14644. getChoosePic(t) {
  14645. this.chooseType = t;
  14646. this.getAllBanner();
  14647. },
  14648. getAllBanner() {
  14649. this.sysPicVisible = true;
  14650. let params = {
  14651. t: this.chooseType,
  14652. };
  14653. this.ajax
  14654. .get(this.$store.state.api + "selectAllBanner", params)
  14655. .then((res) => {
  14656. this.sysPic = res.data[0];
  14657. })
  14658. .catch((err) => {
  14659. console.error(err);
  14660. });
  14661. },
  14662. // getClass() {
  14663. // let params = {
  14664. // oid: this.oid,
  14665. // };
  14666. // this.ajax
  14667. // .get(this.$store.state.api + "selectClassBySchool", params)
  14668. // .then((res) => {
  14669. // this.classJuri = res.data[0];
  14670. // })
  14671. // .catch((err) => {
  14672. // console.error(err);
  14673. // });
  14674. // },
  14675. deleteSysPic() {
  14676. this.cover = [];
  14677. this.isSysPic = false;
  14678. this.isSysPic2 = false;
  14679. },
  14680. deleteSelectPic() {
  14681. this.selectJson.url = "";
  14682. },
  14683. setEListStar() {
  14684. this.$forceUpdate();
  14685. },
  14686. deletRateList(i) {
  14687. this.rateJson.splice(i, 1);
  14688. },
  14689. addRateList() {
  14690. this.rateJson.push({ detail: "", score: 5, value: "" });
  14691. },
  14692. addSt() {
  14693. this.sentenceList.push({
  14694. sentenceTitle: "",
  14695. addSentence: [],
  14696. rightAnswer: [],
  14697. });
  14698. },
  14699. addSen(i) {
  14700. if (!this.sentenceList[i].sentenceTitle) {
  14701. this.$message.error("请填写卡片内容!");
  14702. return;
  14703. }
  14704. if (this.sentenceList[i].sentenceTitle.length > 10) {
  14705. this.$message.error("卡片内容字数不能超过10位");
  14706. return;
  14707. }
  14708. if (
  14709. this.sentenceList[i].addSentence.indexOf(
  14710. this.sentenceList[i].sentenceTitle
  14711. ) !== -1
  14712. ) {
  14713. this.$message.error("不能添加重复的卡片内容!");
  14714. return;
  14715. }
  14716. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  14717. // this.isPushTitleList.push(this.sentenceTitle);
  14718. this.sentenceList[i].sentenceTitle = "";
  14719. },
  14720. setRightAnswer(s, i, j) {
  14721. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  14722. this.sentenceList[i].rightAnswer.push(s);
  14723. }
  14724. },
  14725. returnCard(r, i, j) {
  14726. this.sentenceList[i].rightAnswer.splice(j, 1);
  14727. },
  14728. addSentenceTool() {
  14729. for (var i = 0; i < this.sentenceList.length; i++) {
  14730. if (this.sentenceList[i].rightAnswer.length == 0) {
  14731. this.$message.error(`请将题目${i + 1}设置完整。`);
  14732. return;
  14733. }
  14734. if (
  14735. this.sentenceList[i].addSentence.length !=
  14736. this.sentenceList[i].rightAnswer.length
  14737. ) {
  14738. this.$message.error(`请将题目${i + 1}设置完整。`);
  14739. return;
  14740. }
  14741. }
  14742. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14743. this.taskCount
  14744. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  14745. this.sentenceList = [
  14746. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  14747. ];
  14748. this.dialogVisibleSentence = false;
  14749. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14750. // itemTaskIndex
  14751. // ].toolChoose[toolIndex].tool = [];
  14752. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14753. // itemTaskIndex
  14754. // ].toolChoose[toolIndex].tool.push(i);
  14755. if (
  14756. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14757. .toolChoose[this.toolIndex].tool != 47
  14758. ) {
  14759. this.addTools(47, this.taskCount, this.toolIndex);
  14760. }
  14761. },
  14762. addTableJson() {
  14763. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  14764. // this.$message.error("请将信息填写完整!");
  14765. // return;
  14766. // }
  14767. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14768. this.taskCount
  14769. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  14770. // this.tableJson = [{ text: "" }];
  14771. // this.dialogVisibleTable = false;
  14772. this.$message.success("上传成功");
  14773. if (
  14774. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14775. .toolChoose[this.toolIndex].tool != 48
  14776. ) {
  14777. this.addTools(48, this.taskCount, this.toolIndex);
  14778. }
  14779. },
  14780. addWordJson() {
  14781. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14782. this.taskCount
  14783. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  14784. // this.wordJson = [{ text: "" }];
  14785. // this.dialogVisibleWord = false;
  14786. this.$message.success("上传成功");
  14787. if (
  14788. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14789. .toolChoose[this.toolIndex].tool != 52
  14790. ) {
  14791. this.addTools(52, this.taskCount, this.toolIndex);
  14792. }
  14793. },
  14794. addMoreUpload() {
  14795. if (this.uploadJson.length == 0) {
  14796. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14797. this.taskCount
  14798. ].toolChoose[this.toolIndex].uploadJson = [];
  14799. } else {
  14800. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14801. this.taskCount
  14802. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  14803. }
  14804. this.uploadJson = [];
  14805. this.dialogVisibleMoreUpload = false;
  14806. if (
  14807. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14808. .toolChoose[this.toolIndex].tool != 50
  14809. ) {
  14810. this.addTools(50, this.taskCount, this.toolIndex);
  14811. }
  14812. },
  14813. addPreTime() {
  14814. if (this.preTime == 0) {
  14815. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14816. this.taskCount
  14817. ].toolChoose[this.toolIndex].preTime = 0;
  14818. } else {
  14819. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14820. this.taskCount
  14821. ].toolChoose[this.toolIndex].preTime = this.preTime;
  14822. }
  14823. this.preTime = 0;
  14824. this.dialogVisiblePreTime = false;
  14825. if (
  14826. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14827. .toolChoose[this.toolIndex].tool != 10
  14828. ) {
  14829. this.addTools(10, this.taskCount, this.toolIndex);
  14830. }
  14831. },
  14832. goToTask(i) {
  14833. this.toolIndexType = "";
  14834. if (this.isClickColor == i + 1) {
  14835. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14836. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14837. // } else {
  14838. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14839. i
  14840. ].toolOpen = true;
  14841. // }
  14842. this.$forceUpdate();
  14843. return;
  14844. }
  14845. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14846. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14847. // } else {
  14848. document.querySelectorAll(".basic_box")[0].scrollTop =
  14849. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  14850. this.isClickColor = i + 1;
  14851. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14852. // }
  14853. this.$forceUpdate();
  14854. },
  14855. taskScroll(){
  14856. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  14857. const sections = document.querySelectorAll('.taskBorder');
  14858. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  14859. sections.forEach((section, index) => {
  14860. const offsetTop = section.offsetTop;
  14861. const offsetHeight = section.offsetHeight;
  14862. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  14863. this.isClickColor = index +1;
  14864. }
  14865. });
  14866. },
  14867. taskOpen(i, stageIndex) {
  14868. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14869. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  14870. } else {
  14871. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14872. }
  14873. this.updateWork3(stageIndex);
  14874. this.$forceUpdate();
  14875. },
  14876. goToTask2(i, stage) {
  14877. this.toolIndexType = "";
  14878. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  14879. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14880. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14881. // } else {
  14882. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14883. i
  14884. ].toolOpen = true;
  14885. // }
  14886. this.$forceUpdate();
  14887. return;
  14888. }
  14889. if (this.unitIndex != stage) {
  14890. if (this.panUnitJson() == 2) {
  14891. return;
  14892. }
  14893. this.unitSet(stage);
  14894. }
  14895. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  14896. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  14897. // } else {
  14898. document.querySelectorAll(".basic_box")[0].scrollTop =
  14899. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  14900. this.isClickColor = i + 1;
  14901. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  14902. // }
  14903. this.$forceUpdate();
  14904. },
  14905. taskMove(type, index) {
  14906. this.$confirm(
  14907. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  14908. "提示",
  14909. {
  14910. confirmButtonText: "确定",
  14911. cancelButtonText: "取消",
  14912. type: "warning",
  14913. }
  14914. )
  14915. .then(() => {
  14916. if (type == 1) {
  14917. if (index > 0) {
  14918. let a = JSON.parse(
  14919. JSON.stringify(
  14920. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14921. index - 1
  14922. ]
  14923. )
  14924. );
  14925. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  14926. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  14927. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  14928. }
  14929. } else {
  14930. if (
  14931. index <
  14932. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  14933. ) {
  14934. let a = JSON.parse(
  14935. JSON.stringify(
  14936. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14937. index + 1
  14938. ]
  14939. )
  14940. );
  14941. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  14942. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  14943. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  14944. }
  14945. }
  14946. this.$forceUpdate();
  14947. })
  14948. .catch(() => {
  14949. return;
  14950. });
  14951. },
  14952. stageMove(type, index) {
  14953. if (type == 1) {
  14954. if (index > 0) {
  14955. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  14956. let acid = JSON.parse(
  14957. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  14958. );
  14959. let bcid = JSON.parse(
  14960. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  14961. );
  14962. this.unitJson3[index - 1] = this.unitJson3[index];
  14963. this.unitJson3[index] = a;
  14964. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  14965. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  14966. }
  14967. } else {
  14968. if (index < this.unitJson3.length - 1) {
  14969. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  14970. let acid = JSON.parse(
  14971. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  14972. );
  14973. let bcid = JSON.parse(
  14974. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  14975. );
  14976. this.unitJson3[index + 1] = this.unitJson3[index];
  14977. this.unitJson3[index] = a;
  14978. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  14979. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  14980. }
  14981. }
  14982. this.$forceUpdate();
  14983. },
  14984. addGroup(i) {
  14985. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  14986. this.groupJson.group.push({
  14987. name: "第" + (this.groupJson.group.length + 1) + "组",
  14988. });
  14989. },
  14990. deleteGroup(i) {
  14991. this.groupJson.group.splice(i, 1);
  14992. },
  14993. numberPan() {
  14994. if (
  14995. /[^\d]/.test(this.groupJson.number) ||
  14996. this.groupJson.number < 2 ||
  14997. this.groupJson.number > 10
  14998. ) {
  14999. this.$message.error("请输入2-10的数字");
  15000. this.groupJson.number = "";
  15001. }
  15002. },
  15003. numberPanJie() {
  15004. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  15005. this.$message.error('请输入大于1的数字')
  15006. this.courseJie = 1
  15007. }
  15008. },
  15009. numberPanTime() {
  15010. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  15011. this.$message.error('请输入大于1的数字')
  15012. this.courseTime = 1
  15013. }
  15014. },
  15015. addGroupJson() {
  15016. for (var i = 0; i < this.groupJson.group.length; i++) {
  15017. if (!this.groupJson.group[i].name) {
  15018. this.$message.error("请将信息填写完整!");
  15019. return;
  15020. }
  15021. }
  15022. if (!this.groupJson.number) {
  15023. this.$message.error("请将信息填写完整!");
  15024. return;
  15025. }
  15026. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15027. this.taskCount
  15028. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  15029. JSON.stringify(this.groupJson)
  15030. );
  15031. this.dialogVisibleGroup = false;
  15032. this.groupJson = {};
  15033. if (
  15034. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15035. .toolChoose[this.toolIndex].tool != 49
  15036. ) {
  15037. this.addTools(49, this.taskCount, this.toolIndex);
  15038. }
  15039. },
  15040. updateTime(preTime) {
  15041. this.preTime = preTime;
  15042. },
  15043. InviteChange(val) {
  15044. console.log(val);
  15045. let _check = [];
  15046. let _check2 = [];
  15047. for (var i = 0; i < this.grade2.length; i++) {
  15048. var gid = this.grade2[i].id;
  15049. _check.push(gid);
  15050. }
  15051. for (var i = 0; i < this.checkboxList2.length; i++) {
  15052. var _id = this.checkboxList2[i];
  15053. if (_check.indexOf(_id) !== -1) {
  15054. _check2.push(_id);
  15055. }
  15056. }
  15057. this.checkAll = _check2.length === _check.length;
  15058. return;
  15059. let array = JSON.parse(JSON.stringify(val));
  15060. this.inviteCode = this.inviteCode.filter((el) => {
  15061. if (val.indexOf(el.cid) != -1) {
  15062. array.splice(array.indexOf(el.cid), 1);
  15063. return el;
  15064. }
  15065. });
  15066. for (var i = 0; i < array.length; i++) {
  15067. this.getInviteCode(array[i]);
  15068. }
  15069. },
  15070. InviteChange2(val) {
  15071. console.log(val);
  15072. let _check = [];
  15073. let _check2 = [];
  15074. for (var i = 0; i < this.teacherJuri.length; i++) {
  15075. var gid = this.teacherJuri[i].userid;
  15076. _check.push(gid);
  15077. }
  15078. for (var i = 0; i < this.checkboxList3.length; i++) {
  15079. var _id = this.checkboxList3[i];
  15080. if (_check.indexOf(_id) !== -1) {
  15081. _check2.push(_id);
  15082. }
  15083. }
  15084. this.checkAll2 = _check2.length === _check.length;
  15085. this.setMan();
  15086. return;
  15087. let array = JSON.parse(JSON.stringify(val));
  15088. this.inviteCode = this.inviteCode.filter((el) => {
  15089. if (val.indexOf(el.cid) != -1) {
  15090. array.splice(array.indexOf(el.cid), 1);
  15091. return el;
  15092. }
  15093. });
  15094. for (var i = 0; i < array.length; i++) {
  15095. this.getInviteCode(array[i]);
  15096. }
  15097. },
  15098. handleCheckAllChange(val) {
  15099. if (val) {
  15100. for (var i = 0; i < this.grade2.length; i++) {
  15101. var gid = this.grade2[i].id;
  15102. if (this.checkboxList2.indexOf(gid) === -1) {
  15103. this.checkboxList2.push(gid);
  15104. }
  15105. }
  15106. } else {
  15107. let _check = [];
  15108. let _check2 = [];
  15109. for (var i = 0; i < this.grade2.length; i++) {
  15110. var gid = this.grade2[i].id;
  15111. _check.push(gid);
  15112. }
  15113. for (var i = 0; i < this.checkboxList2.length; i++) {
  15114. var _id = this.checkboxList2[i];
  15115. if (_check.indexOf(_id) === -1) {
  15116. _check2.push(_id);
  15117. }
  15118. }
  15119. this.checkboxList2 = _check2;
  15120. }
  15121. this.isIndeterminate = false;
  15122. },
  15123. handleCheckAllChange2(val) {
  15124. if (val) {
  15125. for (var i = 0; i < this.teacherJuri.length; i++) {
  15126. var gid = this.teacherJuri[i].userid;
  15127. if (this.checkboxList3.indexOf(gid) === -1) {
  15128. this.checkboxList3.push(gid);
  15129. }
  15130. }
  15131. } else {
  15132. let _check = [];
  15133. let _check2 = [];
  15134. for (var i = 0; i < this.teacherJuri.length; i++) {
  15135. var gid = this.teacherJuri[i].userid;
  15136. _check.push(gid);
  15137. }
  15138. for (var i = 0; i < this.checkboxList3.length; i++) {
  15139. var _id = this.checkboxList3[i];
  15140. if (_check.indexOf(_id) === -1) {
  15141. _check2.push(_id);
  15142. }
  15143. }
  15144. this.checkboxList3 = _check2;
  15145. }
  15146. this.isIndeterminate2 = false;
  15147. },
  15148. async getInviteCode(cid) {
  15149. let code = this.randomNumber();
  15150. let params = {
  15151. code: code,
  15152. oid: this.oid,
  15153. };
  15154. let type = 1;
  15155. for (var i = 0; i < this.inviteCode.length; i++) {
  15156. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  15157. type = 2;
  15158. }
  15159. }
  15160. if (type == 2) {
  15161. this.getInviteCode(cid);
  15162. return;
  15163. }
  15164. const res = await this.ajax.get(
  15165. this.$store.state.api + "selectInviteCode2",
  15166. params
  15167. );
  15168. if (
  15169. res.data.length &&
  15170. res.data[0].length &&
  15171. res.data[0][0].courseId != this.cid
  15172. ) {
  15173. this.getInviteCode(cid);
  15174. return;
  15175. }
  15176. let array = [];
  15177. for (var i = 0; i < this.inviteCode.length; i++) {
  15178. array.push(this.inviteCode[i].cid);
  15179. }
  15180. if (array.indexOf(cid) != -1) {
  15181. this.inviteCode[array.indexOf(cid)].ic = code;
  15182. } else {
  15183. this.inviteCode.push({ cid: cid, ic: code });
  15184. }
  15185. },
  15186. OpenInviteD(cid) {
  15187. let array = [];
  15188. this.icode = "";
  15189. for (var i = 0; i < this.inviteCode.length; i++) {
  15190. array.push(this.inviteCode[i].cid);
  15191. }
  15192. if (array.indexOf(cid) != -1) {
  15193. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  15194. }
  15195. this.inviteId = cid;
  15196. this.dialogVisibleInvite = true;
  15197. },
  15198. addInvite() {
  15199. let reg = /^[A-Za-z0-9]{4,}$/;
  15200. if (!reg.test(this.icode)) {
  15201. this.$message.error("请输入至少四位数字或英文组合的随机码");
  15202. return;
  15203. }
  15204. let type = 1;
  15205. for (var i = 0; i < this.inviteCode.length; i++) {
  15206. if (
  15207. this.inviteCode[i].cid != this.inviteId &&
  15208. this.icode == this.inviteCode[i].ic
  15209. ) {
  15210. type = 2;
  15211. }
  15212. }
  15213. if (type == 2) {
  15214. this.$message.error("已有此随机码,不能重复");
  15215. return;
  15216. }
  15217. let params = {
  15218. code: this.icode,
  15219. oid: this.oid,
  15220. };
  15221. this.ajax
  15222. .get(this.$store.state.api + "selectInviteCode", params)
  15223. .then((res) => {
  15224. if (
  15225. res.data.length &&
  15226. res.data[0].length &&
  15227. res.data[0][0].courseId != this.cid
  15228. ) {
  15229. this.$message.error("已有此随机码,不能重复");
  15230. return;
  15231. }
  15232. let array = [];
  15233. for (var i = 0; i < this.inviteCode.length; i++) {
  15234. array.push(this.inviteCode[i].cid);
  15235. }
  15236. if (array.indexOf(this.inviteId) != -1) {
  15237. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  15238. } else {
  15239. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  15240. }
  15241. this.icode = "";
  15242. this.dialogVisibleInvite = false;
  15243. })
  15244. .catch((err) => {
  15245. console.error(err);
  15246. });
  15247. },
  15248. randomNumber() {
  15249. // 随机生成两位数
  15250. // let num = Math.floor(Math.random() * 900) + 100;
  15251. // 生成 0 到 99 之间的随机整数
  15252. const randomNumber = Math.floor(Math.random() * 100);
  15253. // 如果随机数小于 10,补上前导零
  15254. const num =
  15255. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  15256. // 随机生成两个大写字母
  15257. let letters = "";
  15258. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  15259. for (let i = 0; i < 3; i++) {
  15260. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  15261. }
  15262. // 随机生成两位数字和字母的组合
  15263. let mix = "";
  15264. let chars =
  15265. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  15266. for (let i = 0; i < 3; i++) {
  15267. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  15268. mix += char;
  15269. }
  15270. // 随机选择一种类型
  15271. let type = Math.floor(Math.random() * 3);
  15272. return num;
  15273. // 根据类型输出结果
  15274. switch (type) {
  15275. case 0:
  15276. console.log(num); // 输出两位数
  15277. return num;
  15278. case 1:
  15279. console.log(letters); // 输出两个大写字母
  15280. return letters;
  15281. case 2:
  15282. console.log(mix); // 输出两位数字和字母的组合
  15283. return mix;
  15284. }
  15285. },
  15286. getPaste() {
  15287. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15288. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15289. if (!iframe && !iframe2) {
  15290. return;
  15291. }
  15292. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15293. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15294. if (copyData && copyData.stageData && copyData.stageData.length) {
  15295. this.isPasteStage = true;
  15296. }
  15297. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  15298. this.isPasteStage = true;
  15299. }
  15300. if (copyData && copyData.selectData.length) {
  15301. this.isPasteChoice = true;
  15302. }
  15303. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  15304. this.isPasteTask = true;
  15305. }
  15306. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  15307. this.isPasteTask = true;
  15308. }
  15309. },
  15310. getPaste2() {
  15311. let iframe = document.querySelectorAll(".interIframe")[0];
  15312. const turndownService = new TurndownService();
  15313. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  15314. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  15315. if(confirm_next_step){
  15316. this.courseText += turndownService.turndown(confirm_next_step)
  15317. iframe.contentWindow.confirm_next_step = ''
  15318. }
  15319. if(work_area_text && work_area_text.aiContent){
  15320. this.courseText += turndownService.turndown(work_area_text.aiContent)
  15321. iframe.contentWindow.work_area_text = ''
  15322. }
  15323. },
  15324. setCourseInfo(){
  15325. let courseInfo = ''
  15326. let sub = []
  15327. let mclass = []
  15328. if (this.courseTypeId.length) {
  15329. for (var i = 0; i < this.courseTypeId.length; i++) {
  15330. let _sid = this.courseTypeId[i]
  15331. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15332. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15333. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15334. }
  15335. }
  15336. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15337. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15338. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15339. }
  15340. }
  15341. }
  15342. }
  15343. if(this.courseName){
  15344. courseInfo = `课程名称:${this.courseName} `
  15345. }
  15346. if(mclass.length){
  15347. courseInfo += `年级:${mclass.join(',')} `
  15348. }
  15349. if(sub.length){
  15350. courseInfo += `学科:${sub.join(',')} `
  15351. }
  15352. console.log(courseInfo)
  15353. window.course_info = courseInfo
  15354. },
  15355. setCover() {
  15356. var _this = this;
  15357. if(_this.cover.length){
  15358. return;
  15359. }
  15360. _this.imageloading2 = true
  15361. _this.ajax
  15362. .post("https://gpt.cocorobo.cn/search_image", {
  15363. page: _this.ppage,
  15364. pagesize: 9,
  15365. query: _this.courseName,
  15366. })
  15367. .then(function (response) {
  15368. // console.log(response.data.data);
  15369. var data = response.data.FunctionResponse.result;
  15370. _this.cover = [];
  15371.       setTimeout(() => {
  15372.         _this.cover[0] = {
  15373.           name: "网络图片.png",
  15374.           url: data[0].thumbnail
  15375.         };
  15376.         _this.imgChange1(null, null, 1, null);
  15377.         _this.$forceUpdate();
  15378.       }, 0);
  15379. _this.imageloading2 = false
  15380. })
  15381. .catch(function (error) {
  15382. _this.imageloading2 = false
  15383. console.log(error);
  15384. });
  15385. },
  15386. searchImage() {
  15387. var _this = this;
  15388. _this.imageList = [];
  15389. if (!_this.searchImageValue) {
  15390. _this.sysPicVisible2 = true;
  15391. return;
  15392. }
  15393. _this.imageloading = true;
  15394. _this.ajax
  15395. .post("https://gpt.cocorobo.cn/search_image", {
  15396. page: _this.ppage,
  15397. pagesize: 9,
  15398. query: _this.searchImageValue,
  15399. })
  15400. .then(function (response) {
  15401. // console.log(response.data.data);
  15402. var data = response.data.FunctionResponse.result;
  15403. for (var i = 0; i < data.length; i++) {
  15404. _this.imageList.push({ url: data[i].thumbnail });
  15405. }
  15406. _this.imageloading = false;
  15407. })
  15408. .catch(function (error) {
  15409. console.log(error);
  15410. });
  15411. _this.sysPicVisible2 = true;
  15412. },
  15413. changePicture() {
  15414. this.ppage++;
  15415. this.searchImage();
  15416. },
  15417. resetImage() {
  15418. this.ppage = 1;
  15419. this.searchImage();
  15420. },
  15421. jumpGj(i, j) {
  15422. if (i + 1 != this.isClickColor) {
  15423. this.isClickColor = i + 1;
  15424. }
  15425. var a = document.scrollingElement;
  15426. this.toolIndexType = `gj${i}${j}`;
  15427. let target = document.querySelector(`#gj${i}${j}`);
  15428. if (target) {
  15429. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15430. setTimeout(() => {
  15431. target.scrollIntoView(true);
  15432. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15433. j
  15434. ].isFold3 = false;
  15435. setTimeout(() => {
  15436. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15437. }, 0);
  15438. }, 0);
  15439. }
  15440. },
  15441. jumpGj2(i, j, k) {
  15442. if (this.unitIndex != k) {
  15443. if (this.panUnitJson() == 2) {
  15444. return;
  15445. }
  15446. this.unitSet(k);
  15447. }
  15448. setTimeout(() => {
  15449. if (i + 1 != this.isClickColor) {
  15450. this.isClickColor = i + 1;
  15451. }
  15452. var a = document.scrollingElement;
  15453. this.toolIndexType = `gj${i}${j}${k}`;
  15454. let target = document.querySelector(`#gj${i}${j}`);
  15455. if (target) {
  15456. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15457. setTimeout(() => {
  15458. target.scrollIntoView(true);
  15459. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15460. j
  15461. ].isFold3 = false;
  15462. setTimeout(() => {
  15463. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15464. }, 0);
  15465. }, 0);
  15466. }
  15467. }, 0);
  15468. },
  15469. dragStart(val, i, j) {
  15470. console.log(this.taskCount);
  15471. this.dragType = "drag";
  15472. this.taskCount = j;
  15473. this.oldIndex = i;
  15474. this.oldData = val;
  15475. },
  15476. dragOver(i, j) {
  15477. this.typeIndex = "chapter-" + j + "-" + i;
  15478. this.newIndex = i;
  15479. },
  15480. dragEnd() {
  15481. if (this.dragType != "drag") {
  15482. this.typeIndex = "";
  15483. this.newIndex = "";
  15484. this.dragType = "";
  15485. this.isdrag = "";
  15486. return;
  15487. }
  15488. console.log(this.taskCount);
  15489. let newItems = [
  15490. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15491. .chapterData,
  15492. ];
  15493. // 删除老的节点
  15494. newItems.splice(this.oldIndex, 1);
  15495. // 在列表中目标位置增加新的节点
  15496. newItems.splice(this.newIndex, 0, this.oldData);
  15497. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15498. this.taskCount
  15499. ].chapterData = [...newItems];
  15500. this.typeIndex = "";
  15501. this.newIndex = "";
  15502. this.dragType = "";
  15503. this.isdrag = "";
  15504. this.$forceUpdate();
  15505. },
  15506. dragTaskStart(val, i, j) {
  15507. this.dragType = "task";
  15508. this.oldIndex = i;
  15509. this.oldData = val;
  15510. this.oldUnitIndex = j;
  15511. },
  15512. dragTaskOver(i, j) {
  15513. this.typeIndex = "task-" + i;
  15514. this.newIndex = i;
  15515. this.checkUnitIndex = j;
  15516. },
  15517. async dragTaskEnd() {
  15518. if (this.dragType != "task") {
  15519. this.newIndex = "";
  15520. this.dragType = "";
  15521. this.typeIndex = "";
  15522. this.checkUnitIndex = "";
  15523. this.isdrag = "";
  15524. return;
  15525. }
  15526. if (
  15527. this.newIndex == this.oldIndex &&
  15528. this.oldUnitIndex == this.checkUnitIndex
  15529. ) {
  15530. this.newIndex = "";
  15531. this.dragType = "";
  15532. this.typeIndex = "";
  15533. this.checkUnitIndex = "";
  15534. this.isdrag = "";
  15535. return;
  15536. }
  15537. let count1 = await this.getWorksCount(
  15538. 2,
  15539. this.checkUnitIndex,
  15540. this.newIndex,
  15541. 0
  15542. );
  15543. let count2 = await this.getWorksCount(
  15544. 2,
  15545. this.oldUnitIndex,
  15546. this.oldIndex,
  15547. 0
  15548. );
  15549. if (count1 > 0 || count2 > 0) {
  15550. this.$confirm(
  15551. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15552. "提示",
  15553. {
  15554. confirmButtonText: "确定",
  15555. cancelButtonText: "取消",
  15556. type: "warning",
  15557. }
  15558. )
  15559. .then(() => {
  15560. if (this.oldUnitIndex != this.checkUnitIndex) {
  15561. let newItems = [
  15562. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15563. ];
  15564. // 删除老的节点
  15565. newItems.splice(this.oldIndex, 1);
  15566. // 在列表中目标位置增加新的节点
  15567. let newItems2 = [
  15568. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15569. ];
  15570. newItems2.splice(this.newIndex, 0, this.oldData);
  15571. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15572. ...newItems,
  15573. ];
  15574. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15575. ...newItems2,
  15576. ];
  15577. } else {
  15578. let newItems = [
  15579. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15580. ];
  15581. let chapterData = []
  15582. if (this.oldIndex == 0) {
  15583. chapterData = newItems[this.oldIndex].chapterData
  15584. newItems[this.oldIndex].chapterData = []
  15585. } else if (this.newIndex == 0) {
  15586. chapterData = newItems[this.newIndex].chapterData
  15587. newItems[this.oldIndex].chapterData = []
  15588. }
  15589. // 删除老的节点
  15590. newItems.splice(this.oldIndex, 1);
  15591. // 在列表中目标位置增加新的节点
  15592. newItems.splice(this.newIndex, 0, this.oldData);
  15593. if (this.oldIndex == 0 || this.newIndex == 0) {
  15594. newItems[0].chapterData = chapterData
  15595. }
  15596. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15597. ...newItems,
  15598. ];
  15599. }
  15600. this.typeIndex = "";
  15601. this.newIndex = "";
  15602. this.dragType = "";
  15603. this.checkUnitIndex = "";
  15604. this.isdrag = "";
  15605. this.updateWork();
  15606. this.$forceUpdate();
  15607. })
  15608. .catch(() => {
  15609. this.newIndex = "";
  15610. this.dragType = "";
  15611. this.typeIndex = "";
  15612. this.checkUnitIndex = "";
  15613. this.isdrag = "";
  15614. return;
  15615. });
  15616. } else {
  15617. if (this.oldUnitIndex != this.checkUnitIndex) {
  15618. let newItems = [
  15619. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15620. ];
  15621. // 删除老的节点
  15622. newItems.splice(this.oldIndex, 1);
  15623. // 在列表中目标位置增加新的节点
  15624. let newItems2 = [
  15625. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15626. ];
  15627. newItems2.splice(this.newIndex, 0, this.oldData);
  15628. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15629. ...newItems,
  15630. ];
  15631. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15632. ...newItems2,
  15633. ];
  15634. } else {
  15635. let newItems = [
  15636. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15637. ];
  15638. let chapterData = []
  15639. if (this.oldIndex == 0) {
  15640. chapterData = newItems[this.oldIndex].chapterData
  15641. newItems[this.oldIndex].chapterData = []
  15642. } else if (this.newIndex == 0) {
  15643. chapterData = newItems[this.newIndex].chapterData
  15644. newItems[this.oldIndex].chapterData = []
  15645. }
  15646. // 删除老的节点
  15647. newItems.splice(this.oldIndex, 1);
  15648. // 在列表中目标位置增加新的节点
  15649. newItems.splice(this.newIndex, 0, this.oldData);
  15650. if (this.oldIndex == 0 || this.newIndex == 0) {
  15651. newItems[0].chapterData = chapterData
  15652. }
  15653. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15654. ...newItems,
  15655. ];
  15656. }
  15657. this.typeIndex = "";
  15658. this.newIndex = "";
  15659. this.dragType = "";
  15660. this.checkUnitIndex = "";
  15661. this.isdrag = "";
  15662. this.updateWork();
  15663. this.$forceUpdate();
  15664. }
  15665. },
  15666. dragUnitStart(val, i) {
  15667. this.dragType = "Unit";
  15668. this.oldIndex = i;
  15669. this.oldData = val;
  15670. },
  15671. dragUnitOver(i) {
  15672. this.typeIndex = "Unit-" + i;
  15673. this.newIndex = i;
  15674. console.log(i, this.unitJson[i].toolOpen);
  15675. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  15676. this.unitJson[i].toolOpen = true;
  15677. this.updateWork();
  15678. this.$forceUpdate();
  15679. }
  15680. },
  15681. async dragUnitEnd() {
  15682. if (this.dragType != "Unit") {
  15683. this.newIndex = "";
  15684. this.dragType = "";
  15685. this.typeIndex = "";
  15686. this.isdrag = "";
  15687. return;
  15688. }
  15689. if (this.newIndex == this.oldIndex) {
  15690. this.newIndex = "";
  15691. this.dragType = "";
  15692. this.typeIndex = "";
  15693. this.isdrag = "";
  15694. return;
  15695. }
  15696. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  15697. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  15698. console.log(count1, count2);
  15699. if (count1 > 0 || count2 > 0) {
  15700. this.$confirm(
  15701. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  15702. "提示",
  15703. {
  15704. confirmButtonText: "确定",
  15705. cancelButtonText: "取消",
  15706. type: "warning",
  15707. }
  15708. )
  15709. .then(() => {
  15710. let newItems = [...this.unitJson];
  15711. // 删除老的节点
  15712. newItems.splice(this.oldIndex, 1);
  15713. // 在列表中目标位置增加新的节点
  15714. newItems.splice(this.newIndex, 0, this.oldData);
  15715. this.unitJson = [...newItems];
  15716. this.typeIndex = "";
  15717. this.newIndex = "";
  15718. this.dragType = "";
  15719. this.isdrag = "";
  15720. this.updateWork();
  15721. this.$forceUpdate();
  15722. })
  15723. .catch(() => {
  15724. this.newIndex = "";
  15725. this.dragType = "";
  15726. this.typeIndex = "";
  15727. this.isdrag = "";
  15728. return;
  15729. });
  15730. } else {
  15731. let newItems = [...this.unitJson];
  15732. // 删除老的节点
  15733. newItems.splice(this.oldIndex, 1);
  15734. // 在列表中目标位置增加新的节点
  15735. newItems.splice(this.newIndex, 0, this.oldData);
  15736. this.unitJson = [...newItems];
  15737. this.typeIndex = "";
  15738. this.newIndex = "";
  15739. this.dragType = "";
  15740. this.isdrag = "";
  15741. this.updateWork();
  15742. this.$forceUpdate();
  15743. }
  15744. },
  15745. getWorksCount(type, stage, task, tool) {
  15746. return new Promise((resolve, reject) => {
  15747. let params = [
  15748. {
  15749. cid: this.cid,
  15750. stage: stage,
  15751. task: task,
  15752. tool: tool,
  15753. type: type,
  15754. },
  15755. ];
  15756. this.ajax
  15757. .post(this.$store.state.api + "getCourseWorkCount", params)
  15758. .then((res) => {
  15759. let count = res.data[0][0].count;
  15760. resolve(count);
  15761. })
  15762. .catch((err) => {
  15763. resolve(0);
  15764. this.$message.error("网络不佳");
  15765. console.error(err);
  15766. });
  15767. });
  15768. },
  15769. getTwoType(id) {
  15770. this.twoJson = [];
  15771. var array = this.CourseTypeJson1[
  15772. "3f8eed32-aba9-11ee-b534-005056b86db5"
  15773. ].filter((e) => {
  15774. return e.ppid == id;
  15775. });
  15776. this.twoJson = array;
  15777. this.$forceUpdate();
  15778. },
  15779. ctype() {
  15780. this.oneJson =
  15781. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  15782. },
  15783. selectAllType1() {
  15784. this.CourseType1 = [];
  15785. this.CourseTypeJson1 = {};
  15786. this.courseTypeId1 = {};
  15787. this.$forceUpdate();
  15788. let params = {
  15789. org: this.org && this.org != "" ? this.org : "",
  15790. oid: this.oid && this.oid != "" ? this.oid : "",
  15791. };
  15792. this.ajax
  15793. .get(this.$store.state.api + "selectAllEvaType", params)
  15794. .then((res) => {
  15795. this.CourseType1 = res.data;
  15796. for (var i = 0; i < res.data[0].length; i++) {
  15797. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  15798. res.data[0][i].name = "一级分类";
  15799. } else if (
  15800. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  15801. ) {
  15802. res.data[0][i].name = "二级分类";
  15803. }
  15804. if (!this.cid) {
  15805. this.courseTypeId1[res.data[0][i].id] = [];
  15806. }
  15807. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  15808. this.CourseTypeJson1[res.data[0][i].id] = [];
  15809. }
  15810. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  15811. for (var j = 0; j < res.data[1].length; j++) {
  15812. if (res.data[0][i].id == res.data[1][j].pid) {
  15813. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  15814. }
  15815. }
  15816. // } else {
  15817. if (res.data[2].length > 0) {
  15818. for (var j = 0; j < res.data[2].length; j++) {
  15819. if (res.data[0][i].id == res.data[2][j].pid) {
  15820. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  15821. }
  15822. }
  15823. }
  15824. if (res.data[3].length > 0) {
  15825. for (var j = 0; j < res.data[3].length; j++) {
  15826. if (res.data[0][i].id == res.data[3][j].pid) {
  15827. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  15828. }
  15829. }
  15830. }
  15831. // }
  15832. }
  15833. this.ctype();
  15834. this.cetBoxDialog = true;
  15835. })
  15836. .catch((err) => {
  15837. console.error(err);
  15838. });
  15839. },
  15840. setAiJson(pan,string,string2,string3){
  15841. if(pan == 'aiTeacher2'){
  15842. this.aiJson['teacherDetail2'] = string
  15843. }else if(pan == 'aiRateRuleA'){
  15844. this.aiJson['aiRateRule'] = string
  15845. }else if(pan == 'aiOutline2'){
  15846. this.aiJson['aiOutlineTask'] = string
  15847. this.aiJson['aiOutlineDetail'] = string2
  15848. this.aiText2 = ''
  15849. }else if(pan == 'aiTeacher3'){
  15850. this.aiJson['aiCpoteTask'] = string
  15851. this.aiJson['teacherDetail2'] = string2
  15852. this.aiText2 = ''
  15853. }else if(pan == 'aiTask2'){
  15854. this.aiJson['aiTask'] = string
  15855. }else if(pan == 'aiTask3'){
  15856. this.aiJson['aiTaskG1'] = string
  15857. this.aiJson['aiTaskG2'] = string2
  15858. this.aiJson['aiTaskG3'] = string3
  15859. }else if(pan == 'aiteacherTextDetail'){
  15860. this.aiJson['aiAbstract'] = string
  15861. }else if(pan == 'aitargetTextDetail'){
  15862. this.aiJson['aiTarget'] = string
  15863. }else if(pan == 'aitargetTextDetail2'){
  15864. this.aiJson['aiTarget2'] = string
  15865. }else if(pan == 'aitargetTextDetail3'){
  15866. this.aiJson['aiTargetGet'] = string
  15867. this.aiJson['aiTarget2'] = string2
  15868. }else {
  15869. this.aiJson[pan] = string
  15870. }
  15871. this.$forceUpdate();
  15872. },
  15873. editTask3(index){
  15874. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  15875. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  15876. }else {
  15877. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  15878. }
  15879. setTimeout(() => {
  15880. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  15881. setTimeout(() => {
  15882. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  15883. }, 0);
  15884. }, 100);
  15885. this.$forceUpdate();
  15886. },
  15887. editTask2(index){
  15888. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  15889. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  15890. }else {
  15891. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  15892. }
  15893. setTimeout(() => {
  15894. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  15895. setTimeout(() => {
  15896. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  15897. }, 0);
  15898. }, 100);
  15899. this.$forceUpdate();
  15900. },
  15901. openRule(i, k){
  15902. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  15903. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  15904. }else {
  15905. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  15906. }
  15907. this.$forceUpdate();
  15908. },
  15909. editCpote(index){
  15910. if(this.cpote[index]){
  15911. this.cpote[index] = false
  15912. }else {
  15913. this.cpote[index] = true
  15914. }
  15915. setTimeout(() => {
  15916. this.cpote[index.replace('s','')] += "*0*%*";
  15917. setTimeout(() => {
  15918. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  15919. }, 0);
  15920. }, 100);
  15921. this.$forceUpdate();
  15922. },
  15923. clickGenTT(){
  15924. if(!this.teacherInfoData.length){
  15925. this.$message.error("请上传教案");
  15926. return;
  15927. }
  15928. this.openAiDialog(2, 'aiteacherTextDetail',1)
  15929. setTimeout(() => {
  15930. this.openAiDialog(2, 'aitargetTextDetail',1)
  15931. }, 500);
  15932. },
  15933. clickGenTT2(){
  15934. if (this.courseName == "") {
  15935. this.$message.error("请补充填写课程名称");
  15936. return;
  15937. }
  15938. this.openAiDialog(2, 'aiDetail',1)
  15939. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  15940. setTimeout(() => {
  15941. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  15942. this.openAiDialog(2, 'aitargetTextDetail3',1)
  15943. }, 500);
  15944. }
  15945. this.courseTextBool = true
  15946. },
  15947. changeIsuseT(){
  15948. if(this.isuseT == 1){
  15949. this.courseTextB = false
  15950. }else{
  15951. if(this.courseText){
  15952. this.courseTextB = false
  15953. }else{
  15954. this.courseTextB = true
  15955. }
  15956. }
  15957. },
  15958. openInterPanSetting(){
  15959. this.interSetting = !this.interSetting
  15960. if(this.interSetting){
  15961. if(this.istemplate == 1){
  15962. this.agentid = this.aiJson.agentid
  15963. }else {
  15964. this.agentid = this.aiJson.sagentid
  15965. }
  15966. }else {
  15967. this.agentid = ''
  15968. }
  15969. },
  15970. setAgentid(){
  15971. if(!this.agentid.trim()){
  15972. this.$message.error('请输入工作流链接')
  15973. return;
  15974. }
  15975. if(this.istemplate == 1){
  15976. this.aiJson.agentid = this.agentid.trim()
  15977. }else {
  15978. this.aiJson.sagentid = this.agentid.trim()
  15979. }
  15980. this.interFlash = false
  15981. setTimeout(() => {
  15982. this.interFlash = true
  15983. }, 100);
  15984. this.interSetting = false
  15985. },
  15986. rebuildAgentid(){
  15987. this.aiJson.sagentid = ''
  15988. this.interFlash = false
  15989. setTimeout(() => {
  15990. this.interFlash = true
  15991. }, 100);
  15992. this.interSetting = false
  15993. },
  15994. cancelInterSetting(){
  15995. this.agentid = ''
  15996. this.interSetting = false
  15997. },
  15998. openAiDialog2(clickType, type, callback, index, tindex){
  15999. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  16000. confirmButtonText: "确定",
  16001. cancelButtonText: "取消",
  16002. type: "warning",
  16003. })
  16004. .then(() => {
  16005. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  16006. // this.openAiDialog(clickType, 'aiTeacher')
  16007. // }else {
  16008. this.openAiDialog(clickType, type, callback, index, tindex)
  16009. // }
  16010. })
  16011. .catch(() => {
  16012. });
  16013. },
  16014. openAiDialog(clickType, type, callback, index, tindex) {
  16015. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  16016. this.$message.error("您没有权限修改/查看提示词");
  16017. return;
  16018. }
  16019. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  16020. this.$message.error("请上传教案");
  16021. return;
  16022. }
  16023. if (this.courseName == "") {
  16024. this.$message.error("请补充填写课程名称");
  16025. return;
  16026. }
  16027. this.aiText2 = ''
  16028. this.clickType = clickType
  16029. let sub = []
  16030. if (this.courseTypeId.length) {
  16031. for (var i = 0; i < this.courseTypeId.length; i++) {
  16032. let _sid = this.courseTypeId[i]
  16033. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16034. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16035. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16036. }
  16037. }
  16038. }
  16039. }
  16040. let mclass = []
  16041. if (this.courseTypeId.length) {
  16042. for (var i = 0; i < this.courseTypeId.length; i++) {
  16043. let _sid = this.courseTypeId[i]
  16044. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16045. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16046. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16047. }
  16048. }
  16049. }
  16050. }
  16051. if (type == "aiDetail") {
  16052. if (this.ttextLoading) {
  16053. this.$message({
  16054. message: "请回答完毕后再次发送",
  16055. type: "warning"
  16056. });
  16057. return;
  16058. }
  16059. this.aitype = "aiDetail"
  16060. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  16061. this.aiText = this.aiJson.aiDetail
  16062. this.aiCallBack = callback
  16063. } else if (type == "aiOutline") {
  16064. this.aitype = "aiOutline"
  16065. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16066. this.aiText = this.aiJson.aiOutline
  16067. } else if (type == "aiOutline2") {
  16068. this.aitype = "aiOutline2"
  16069. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16070. this.aiText = this.aiJson.aiOutlineTask
  16071. this.aiText2 = this.aiJson.aiOutlineDetail
  16072. } else if (type == "aiOutlineDetail2") {
  16073. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  16074. this.$message({
  16075. message: "请回答完毕后再次发送",
  16076. type: "warning"
  16077. });
  16078. return;
  16079. }
  16080. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  16081. this.$message.error('请输入任务名称')
  16082. return;
  16083. }
  16084. this.aitype = type
  16085. this.aiCallBack = callback
  16086. this.aiText = this.aiJson.aiOutlineDetail2
  16087. } else if (type == "aiTask") {
  16088. this.aitype = "aiTask"
  16089. var _text = ""
  16090. for (var i = 0; i < this.teacherText.length; i++) {
  16091. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  16092. }
  16093. // this.aiText = `请根据${_text}。`
  16094. this.aiText = this.aiJson.aiTask
  16095. this.aiCallBack = callback
  16096. } else if (type == "aiTask2") {
  16097. if (this.taskLoading[callback]) {
  16098. this.$message({
  16099. message: "请回答完毕后再次发送",
  16100. type: "warning"
  16101. });
  16102. return;
  16103. }
  16104. this.aitype = "aiTask2"
  16105. this.aiText = this.aiJson.aiTask
  16106. this.aiCallBack = [callback, index]
  16107. } else if (type == "aiTask3") {
  16108. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  16109. this.$message({
  16110. message: "请回答完毕后再次发送",
  16111. type: "warning"
  16112. });
  16113. return;
  16114. }
  16115. this.aitype = type
  16116. this.aiText = this.aiJson.aiTaskG1
  16117. this.aiText2 = this.aiJson.aiTaskG2
  16118. this.aiText3 = this.aiJson.aiTaskG3
  16119. this.aiCallBack = [callback, index]
  16120. } else if (type == "aiDetail1") {
  16121. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  16122. this.$message({
  16123. message: "请回答完毕后再次发送",
  16124. type: "warning"
  16125. });
  16126. return;
  16127. }
  16128. this.aitype = "aiDetail1"
  16129. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  16130. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  16131. this.aiText = this.aiJson.aiDetail1
  16132. this.aiCallBack = callback
  16133. this.aiIndex = index
  16134. } else if (type == "aiDetail2") {
  16135. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  16136. this.$message({
  16137. message: "请回答完毕后再次发送",
  16138. type: "warning"
  16139. });
  16140. return;
  16141. }
  16142. this.aitype = "aiDetail2"
  16143. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  16144. this.aiText = this.aiJson.aiDetail2
  16145. this.aiCallBack = callback
  16146. this.aiIndex = index
  16147. } else if (type == "aiDetail3") {
  16148. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  16149. this.$message({
  16150. message: "请回答完毕后再次发送",
  16151. type: "warning"
  16152. });
  16153. return;
  16154. }
  16155. this.aitype = "aiDetail3"
  16156. this.aiText = this.aiJson.aiDetail3
  16157. this.aiIndex = index + '-' + tindex
  16158. } else if (type == "aiDetail4") {
  16159. var _text = ""
  16160. if(callback && callback.length){
  16161. for (var i = 0; i < callback.length; i++) {
  16162. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  16163. }
  16164. }
  16165. this.aitype = "aiDetail4"
  16166. this.aiText = this.aiJson.aiDetail4
  16167. this.aiIndex = index
  16168. } else if (type == "aiTeacher") {
  16169. this.aitype = "aiTeacher"
  16170. var _text = ""
  16171. for (var i = 0; i < this.dArray.length; i++) {
  16172. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  16173. }
  16174. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16175. this.aiText = this.aiJson.aiTeacher
  16176. this.aiCallBack = callback
  16177. } else if (type == "aiTeacher2") {
  16178. if(this.ttaskDetailLoading5.length){
  16179. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  16180. this.$message({
  16181. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  16182. type: "warning"
  16183. });
  16184. }
  16185. this.aitype = "aiTeacher2"
  16186. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16187. } else if (type == "aiTeacher3") {
  16188. this.aitype = type
  16189. this.aiText = this.aiJson.aiCpoteTask
  16190. this.aiText2 = this.aiJson.teacherDetail2
  16191. } else if (type == "teacherDetail") {
  16192. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  16193. this.$message({
  16194. message: "请回答完毕后再次发送",
  16195. type: "warning"
  16196. });
  16197. return;
  16198. }
  16199. this.aitype = "teacherDetail"
  16200. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16201. this.aiText = this.aiJson.teacherDetail
  16202. this.aiCallBack = callback
  16203. this.aiIndex = index
  16204. } else if (type == "teacherDetail2") {
  16205. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  16206. this.$message({
  16207. message: "请回答完毕后再次发送",
  16208. type: "warning"
  16209. });
  16210. return;
  16211. }
  16212. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  16213. this.$message.error('请输入任务名称')
  16214. return;
  16215. }
  16216. this.aitype = "teacherDetail2"
  16217. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16218. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16219. this.aiCallBack = callback
  16220. this.aiIndex = index
  16221. } else if (type == "aiCpote1") {
  16222. if (this.cpotetLoading.cpote1) {
  16223. this.$message({
  16224. message: "请回答完毕后再次发送",
  16225. type: "warning"
  16226. });
  16227. return;
  16228. }
  16229. this.aitype = "aiCpote1"
  16230. this.aiText = this.aiJson.cpote1
  16231. this.aiCallBack = callback
  16232. } else if (type == "aiCpote2") {
  16233. if (this.cpotetLoading.cpote2) {
  16234. this.$message({
  16235. message: "请回答完毕后再次发送",
  16236. type: "warning"
  16237. });
  16238. return;
  16239. }
  16240. this.aitype = "aiCpote2"
  16241. this.aiText = this.aiJson.cpote2
  16242. this.aiCallBack = callback
  16243. } else if (type == "aiCpote3") {
  16244. if (this.cpotetLoading.cpote3) {
  16245. this.$message({
  16246. message: "请回答完毕后再次发送",
  16247. type: "warning"
  16248. });
  16249. return;
  16250. }
  16251. this.aitype = "aiCpote3"
  16252. this.aiText = this.aiJson.cpote3
  16253. this.aiCallBack = callback
  16254. } else if (type == "aiCpote4") {
  16255. if (this.cpotetLoading.cpote4) {
  16256. this.$message({
  16257. message: "请回答完毕后再次发送",
  16258. type: "warning"
  16259. });
  16260. return;
  16261. }
  16262. this.aitype = "aiCpote4"
  16263. this.aiText = this.aiJson.cpote4
  16264. this.aiCallBack = callback
  16265. } else if (type == 'aiteacherTextDetail'){
  16266. if (this.tteacherTextLoading) {
  16267. this.$message({
  16268. message: "请回答完毕后再次发送",
  16269. type: "warning"
  16270. });
  16271. return;
  16272. }
  16273. this.aitype = type
  16274. this.aiText = this.aiJson.aiAbstract
  16275. this.aiCallBack = callback
  16276. } else if (type == 'aitargetTextDetail'){
  16277. if (this.ttargetTextLoading) {
  16278. this.$message({
  16279. message: "请回答完毕后再次发送",
  16280. type: "warning"
  16281. });
  16282. return;
  16283. }
  16284. this.aitype = type
  16285. this.aiText = this.aiJson.aiTarget
  16286. this.aiCallBack = callback
  16287. } else if (type == 'aitargetTextDetail2'){
  16288. if (this.ttargetTextLoading2) {
  16289. this.$message({
  16290. message: "请回答完毕后再次发送",
  16291. type: "warning"
  16292. });
  16293. return;
  16294. }
  16295. this.aitype = type
  16296. this.aiText = this.aiJson.aiTarget2
  16297. this.aiCallBack = callback
  16298. } else if (type == 'aitargetTextDetail3'){
  16299. if (this.ttargetTextLoading2) {
  16300. this.$message({
  16301. message: "请回答完毕后再次发送",
  16302. type: "warning"
  16303. });
  16304. return;
  16305. }
  16306. this.aitype = type
  16307. this.aiText = this.aiJson.aiTargetGet
  16308. this.aiText2 = this.aiJson.aiTarget2
  16309. this. aiCallBack= callback
  16310. } else if (type == 'aiSearchFile'){
  16311. if(this.fileSLoading) {
  16312. this.$message({
  16313. message: "请回答完毕后再次发送",
  16314. type: "warning"
  16315. });
  16316. return;
  16317. }
  16318. this.aitype = type
  16319. this.aiText = this.aiJson.aiSearchFile
  16320. } else if (type == 'aiRateRule'){
  16321. this.aitype = type
  16322. this.aiText = this.aiJson.aiRateRule
  16323. this.aiCallBack = [callback, index]
  16324. } else if (type == 'aiRateRuleA'){
  16325. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  16326. confirmButtonText: "生成所有",
  16327. cancelButtonText: "仅生成该任务",
  16328. distinguishCancelAndClose: true,
  16329. type: "warning",
  16330. })
  16331. .then(() => {
  16332. this.aitype = type
  16333. this.aiText = this.aiJson.aiRateRule
  16334. this.aiCallBack = [1,callback]
  16335. this.dialogVisibleAiD = true
  16336. }).catch((v) => {
  16337. console.log(v);
  16338. if (v == "cancel") {
  16339. this.aitype = type
  16340. this.aiText = this.aiJson.aiRateRule
  16341. this.aiCallBack = [2,callback]
  16342. this.dialogVisibleAiD = true
  16343. }
  16344. })
  16345. }
  16346. if(type != 'aiRateRuleA'){
  16347. this.dialogVisibleAiD = true
  16348. }
  16349. },
  16350. async aiConfirm(msg,msg2,msg3) {
  16351. let sub = []
  16352. if (this.courseTypeId.length) {
  16353. for (var i = 0; i < this.courseTypeId.length; i++) {
  16354. let _sid = this.courseTypeId[i]
  16355. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16356. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16357. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16358. }
  16359. }
  16360. }
  16361. }
  16362. let mclass = []
  16363. if (this.courseTypeId.length) {
  16364. for (var i = 0; i < this.courseTypeId.length; i++) {
  16365. let _sid = this.courseTypeId[i]
  16366. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16367. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16368. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16369. }
  16370. }
  16371. }
  16372. }
  16373. let url = []
  16374. if (this.infoData.length) {
  16375. for (var i = 0; i < this.infoData.length; i++) {
  16376. url.push(this.infoData[i].url)
  16377. }
  16378. }
  16379. if (this.aitype == "aiDetail") {
  16380. this.detailYou(msg)
  16381. } else if (this.aitype == "aiOutline") {
  16382. this.loading = true
  16383. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16384. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16385. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  16386. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16387. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16388. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16389. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16390. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  16391. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  16392. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16393. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16394. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16395. let message = `NOTICE
  16396. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16397. Language: ${this.getLang()}
  16398. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16399. Instruction: Based on the context, follow "Format example", write content.
  16400. # Context
  16401. ## 要求
  16402. ${msg} 以及##参考资料
  16403. ## 参考资料
  16404. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16405. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16406. detail至少输出300tokens,markdown格式输出。
  16407. detail包含子教学目标、过程性成果、子评价标准
  16408. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16409. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16410. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  16411. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  16412. # Format example
  16413. [{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]`
  16414. // detail输出不要输出成json,文本或者markdown都可以
  16415. this.aiGet2(message, () => {
  16416. this.loading = false
  16417. this.isOutline = true
  16418. })
  16419. } else if (this.aitype == "aiOutline2") {
  16420. this.loading = true
  16421. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16422. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16423. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16424. let message = `NOTICE
  16425. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16426. Language: ${this.getLang()}
  16427. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16428. Instruction: Based on the context, follow "Format example", write content.
  16429. # Context
  16430. ## 要求
  16431. ${msg} 以及##参考资料
  16432. ## 参考资料
  16433. 课程名字:${this.courseName}
  16434. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  16435. ${sub.length ? '学科:' + sub.join(",") : ''}
  16436. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16437. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16438. # Format example
  16439. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  16440. this.aiGetTask2(message, () => {
  16441. this.loading = false
  16442. this.isOutline = true
  16443. })
  16444. } else if (this.aitype == "aiOutlineDetail2") {
  16445. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  16446. } else if (this.aitype == "aiTask") {
  16447. var _text = ""
  16448. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16449. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16450. }
  16451. let message = `NOTICE
  16452. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16453. Language: ${this.getLang()}
  16454. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16455. Instruction: Based on the context, follow "Format example", write content.
  16456. # Context
  16457. ## 要求
  16458. ${msg} 为**每个教学任务分别输出**以下内容。
  16459.  
  16460. ${(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','') : ''}
  16461. ## 参考资料
  16462. 教学任务教案:${_text}
  16463. ## 格式要求
  16464. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  16465. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16466. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  16467. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16468. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16469. 出现选择题和问答题的概率提高
  16470. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  16471.  
  16472. # Format example
  16473. [{"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":"工具描述"}]}]`
  16474. this.loading = true
  16475. this.aiGet3(message, this.aiCallBack)
  16476. } else if (this.aitype == "aiTask2") {
  16477. if(this.aiCallBack[0] == 'all'){
  16478. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16479. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16480. let message = `NOTICE
  16481. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16482. Language: ${this.getLang()}
  16483. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16484. Instruction: Based on the context, follow "Format example", write content.
  16485. # Context
  16486. ## 要求
  16487. ${msg} 为教学任务分别输出以下内容。
  16488.  
  16489. ${(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','') : ''}
  16490. ## 参考资料
  16491. 教学任务教案:${_text}
  16492. ## 格式要求
  16493. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16494. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16495. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16496. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16497. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16498.  
  16499. # Format example
  16500. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16501. this.taskLoading[_task] = true
  16502. this.aiGet32(message, _task)
  16503. }
  16504. }else{
  16505. 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`
  16506. let message = `NOTICE
  16507. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16508. Language: ${this.getLang()}
  16509. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16510. Instruction: Based on the context, follow "Format example", write content.
  16511. # Context
  16512. ## 要求
  16513. ${msg} 为教学任务分别输出以下内容。
  16514.  
  16515. ${(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','') : ''}
  16516. ## 参考资料
  16517. 教学任务教案:${_text}
  16518. ## 格式要求
  16519. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16520. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16521. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16522. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16523. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16524.  
  16525. # Format example
  16526. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16527. this.taskLoading[this.aiCallBack[0]] = true
  16528. this.aiGet32(message, this.aiCallBack[0])
  16529. }
  16530. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  16531. } else if (this.aitype == "aiTask3") {
  16532. if(this.aiCallBack[0] == 'all'){
  16533. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16534. let message1 = `NOTICE
  16535. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16536. Language: ${this.getLang()}
  16537. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16538. Instruction: Based on the context, follow "Format example", write content.
  16539. # Context
  16540. ## 要求
  16541. ${msg}
  16542.  
  16543. ## 参考资料
  16544. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16545. # 输出格式与要求
  16546. 任务描述(告诉学生他们需要做什么):
  16547. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  16548. # 范例
  16549. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  16550. # Format example
  16551. { "detail":"任务描述" }`
  16552. let message2 = `NOTICE
  16553. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16554. Language: ${this.getLang()}
  16555. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16556. Instruction: Based on the context, follow "Format example", write content.
  16557. # Context
  16558. ## 要求
  16559. ${msg2}
  16560.  
  16561. ## 参考资料
  16562. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16563. # 输出格式与要求
  16564. 互动工具列表
  16565. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  16566. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  16567. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  16568. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  16569. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  16570. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  16571. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  16572. # Format example
  16573. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16574. let message3 = `NOTICE
  16575. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16576. Language: ${this.getLang()}
  16577. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16578. Instruction: Based on the context, follow "Format example", write content.
  16579. # Context
  16580. ## 要求
  16581. ${msg3}
  16582.  
  16583. ## 参考资料
  16584. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16585. # 输出格式与要求
  16586. 核心素养:从教案中提取
  16587. 目标:从教案中提取
  16588. 评价标准:从教案中提取评价标准
  16589. # Format example
  16590. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  16591. if(!this.taskGLoading[_task]){
  16592. this.taskGLoading[_task] = []
  16593. }
  16594. this.taskGLoading[_task][0] = true
  16595. this.taskGLoading[_task][1] = true
  16596. this.taskGLoading[_task][2] = true
  16597. this.aiGetG321(message1, _task)
  16598. this.aiGetG322(message2, _task)
  16599. this.aiGetG323(message3, _task)
  16600. }
  16601. }else{
  16602. let message1 = `NOTICE
  16603. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16604. Language: ${this.getLang()}
  16605. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16606. Instruction: Based on the context, follow "Format example", write content.
  16607. # Context
  16608. ## 要求
  16609. ${msg}
  16610.  
  16611. ## 参考资料
  16612. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16613. # 输出格式与要求
  16614. 任务描述(告诉学生他们需要做什么):
  16615. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  16616. # 范例
  16617. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  16618. # Format example
  16619. { "detail":"任务描述" }`
  16620. let message2 = `NOTICE
  16621. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16622. Language: ${this.getLang()}
  16623. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16624. Instruction: Based on the context, follow "Format example", write content.
  16625. # Context
  16626. ## 要求
  16627. ${msg2}
  16628.  
  16629. ## 参考资料
  16630. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16631. # 输出格式与要求
  16632. 互动工具列表
  16633. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  16634. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  16635. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  16636. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  16637. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  16638. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  16639. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  16640. # Format example
  16641. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16642. let message3 = `NOTICE
  16643. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16644. Language: ${this.getLang()}
  16645. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16646. Instruction: Based on the context, follow "Format example", write content.
  16647. # Context
  16648. ## 要求
  16649. ${msg3}
  16650.  
  16651. ## 参考资料
  16652. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16653. # 输出格式与要求
  16654. 核心素养:从教案中提取
  16655. 目标:从教案中提取
  16656. 评价标准:从教案中提取评价标准
  16657. # Format example
  16658. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  16659. if(!this.taskGLoading[this.aiCallBack[0]]){
  16660. this.taskGLoading[this.aiCallBack[0]] = []
  16661. }
  16662. this.taskGLoading[this.aiCallBack[0]][0] = true
  16663. this.taskGLoading[this.aiCallBack[0]][1] = true
  16664. this.taskGLoading[this.aiCallBack[0]][2] = true
  16665. this.aiGetG321(message1, this.aiCallBack[0])
  16666. this.aiGetG322(message2, this.aiCallBack[0])
  16667. this.aiGetG323(message3, this.aiCallBack[0])
  16668. }
  16669. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  16670. } else if (this.aitype == "aiDetail1") {
  16671. this.aiDetail(msg, this.aiIndex)
  16672. } else if (this.aitype == "aiDetail2") {
  16673. this.aiDetail2(msg, this.aiIndex)
  16674. } else if (this.aitype == "aiDetail3") {
  16675. let _index = this.aiIndex.split('-')
  16676. this.aiDetail3(msg, _index[0], _index[1])
  16677. } else if (this.aitype == "aiDetail4") {
  16678. this.aiDetail4(msg, this.aiIndex)
  16679. } else if (this.aitype == "teacherDetail") {
  16680. this.aiDetail5(msg, this.aiIndex)
  16681. } else if (this.aitype == "teacherDetail2") {
  16682. this.aiDetail52(msg, this.aiIndex)
  16683. } else if (this.aitype == "aiCpote1") {
  16684. this.aiCpote(msg, this.aiCallBack)
  16685. } else if (this.aitype == "aiCpote2") {
  16686. this.aiCpote(msg, this.aiCallBack)
  16687. } else if (this.aitype == "aiCpote3") {
  16688. this.aiCpote(msg, this.aiCallBack)
  16689. } else if (this.aitype == "aiCpote4") {
  16690. this.aiCpote(msg, this.aiCallBack)
  16691. } else if (this.aitype == "aiTeacher") {
  16692. this.loading = true
  16693. var _text = ""
  16694. for (var i = 0; i < this.dArray.length; i++) {
  16695. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  16696. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16697. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16698. let message = ` NOTICE
  16699. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16700. Language: ${this.getLang()}
  16701. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16702. Instruction: Based on the context, follow "Format example", write content.
  16703. # Context
  16704. ## 要求
  16705. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  16706. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  16707. ${(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','') : ''}
  16708. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16709. ## Format example
  16710. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  16711. this.aiGet4(message, () => {
  16712. this.loading = false
  16713. this.isOutline2 = true
  16714. })
  16715. } else if (this.aitype == "aiTeacher2"){
  16716. this.isOutline2 = true
  16717. setTimeout(()=>{
  16718. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16719. this.aiDetail52(msg, i)
  16720. }
  16721. }, 0)
  16722. } else if (this.aitype == "aiTeacher3"){
  16723. this.loading = true
  16724. let message = `NOTICE
  16725. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16726. Language: ${this.getLang()}
  16727. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16728. Instruction: Based on the context, follow "Format example", write content.
  16729. # Context
  16730. ## 要求
  16731. ${msg} 以及##参考资料
  16732. ## 参考资料
  16733. 任务簇:${this.cpote.cpote4}
  16734. # Format example
  16735. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  16736. this.aiGetTask3(message, () => {
  16737. this.loading = false
  16738. this.isOutline2 = true
  16739. })
  16740. } else if (this.aitype == "aiteacherTextDetail") {
  16741. this.aiteacherTextDetail(msg)
  16742. } else if (this.aitype == "aitargetTextDetail") {
  16743. this.aitargetTextDetail(msg)
  16744. } else if (this.aitype == "aitargetTextDetail2") {
  16745. this.aitargetTextDetail2(msg)
  16746. } else if (this.aitype == "aitargetTextDetail3") {
  16747. this.aitargetTextDetail3(msg)
  16748. } else if (this.aitype == 'aiSearchFile'){
  16749. let messages = `NOTICE
  16750. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16751. Language: ${this.getLang()}
  16752. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16753. Instruction: Based on the context, follow "Format example", write content.
  16754. ## 参考资料
  16755. 关键词:${this.courseName}
  16756. # Context
  16757. ## 要求
  16758. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  16759. # Format example
  16760. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  16761. this.fileSLoading = true
  16762. this.aiSearchFile(messages,()=>{
  16763. this.fileSLoading = false
  16764. })
  16765. } else if (this.aitype == 'aiRateRule'){
  16766. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  16767. } else if (this.aitype == 'aiRateRuleA'){
  16768. if(this.aiCallBack[0] == 1){
  16769. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16770. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  16771. for(var k = 0; k < task.eList.length; k++){
  16772. if(!task.eList[k].rule){
  16773. this.againEva(msg, i, k)
  16774. }
  16775. }
  16776. }
  16777. }else if(this.aiCallBack[0] == 2){
  16778. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  16779. for(var k = 0; k < task.eList.length; k++){
  16780. if(!task.eList[k].rule){
  16781. this.againEva(msg, this.aiCallBack[1], k)
  16782. }
  16783. }
  16784. }
  16785. }
  16786. this.setAiJson(this.aitype, msg, msg2, msg3)
  16787. },
  16788. getLang(){
  16789. let lang = ''
  16790. if(this.languageSetting == 0){
  16791. lang = 'Chinese.'
  16792. }else if(this.languageSetting == 1){
  16793. lang = 'Traditional Chinese.'
  16794. }else if(this.languageSetting == 2){
  16795. lang = 'English.'
  16796. }
  16797. return lang
  16798. },
  16799. detailYou(message) {
  16800. this.textLoading = true
  16801. this.ttextLoading = true
  16802. let sub = []
  16803. if (this.courseTypeId.length) {
  16804. for (var i = 0; i < this.courseTypeId.length; i++) {
  16805. let _sid = this.courseTypeId[i]
  16806. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16807. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16808. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16809. }
  16810. }
  16811. }
  16812. }
  16813. let mclass = []
  16814. if (this.courseTypeId.length) {
  16815. for (var i = 0; i < this.courseTypeId.length; i++) {
  16816. let _sid = this.courseTypeId[i]
  16817. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16818. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16819. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16820. }
  16821. }
  16822. }
  16823. }
  16824. let url = []
  16825. if (this.infoData.length) {
  16826. for (var i = 0; i < this.infoData.length; i++) {
  16827. url.push(this.infoData[i].url)
  16828. }
  16829. }
  16830. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16831. // --------
  16832. // ## 补充参考资料
  16833. // 补充资料:${url.join(",")}
  16834. // 补充描述:${this.courseText2} ##补充参考资料和
  16835. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16836. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16837. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16838. let msg = `NOTICE
  16839. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  16840. Language: ${this.getLang()}
  16841. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16842. Instruction: Based on the context, follow "Format example", write content.
  16843. #Context
  16844. ## 参考资料
  16845. 课程名字:${this.courseName}
  16846. ${sub.length ? '学科:' + sub.join(",") : ''}
  16847. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16848. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  16849. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  16850. ${this.courseText && this.aiCallBack == 2 ? '参考内容:'+this.courseText : ''}
  16851. ## 要求
  16852. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  16853. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  16854. ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
  16855. 如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
  16856. this.aiGet(msg)
  16857. },
  16858. setUnitJson() {
  16859. 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 }] }
  16860. this.$forceUpdate()
  16861. },
  16862. async aiGet(messages) {
  16863. let _this = this
  16864. let fileid = []
  16865. if(!this.yiKeTemplateArray.includes(this.templateid)){
  16866. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  16867. if(_this.cankaoInfoData[i].fileid){
  16868. fileid.push(_this.cankaoInfoData[i].fileid)
  16869. }else {
  16870. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  16871. if(_fileid){
  16872. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  16873. _this.$forceUpdate();
  16874. if(_fileid != 1){
  16875. fileid.push(_fileid)
  16876. }
  16877. }
  16878. }
  16879. }
  16880. if(this.mode == 1){
  16881. for (var i = 0; i < _this.infoData.length; i++) {
  16882. if(_this.infoData[i].fileid){
  16883. fileid.push(_this.infoData[i].fileid)
  16884. }else {
  16885. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16886. if(_fileid){
  16887. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16888. _this.$forceUpdate();
  16889. if(_fileid != 1){
  16890. fileid.push(_fileid)
  16891. }
  16892. }
  16893. }
  16894. }
  16895. }
  16896. } else {
  16897. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  16898. if (_this.infoData.length) {
  16899. for (var i = 0; i < _this.infoData.length; i++) {
  16900. if(_this.infoData[i].fileid){
  16901. fileid.push(_this.infoData[i].fileid)
  16902. }else {
  16903. let _fileid = await _this.createFileid(_this.infoData[i].url)
  16904. if(_fileid){
  16905. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  16906. _this.$forceUpdate();
  16907. if(_fileid != 1){
  16908. fileid.push(_fileid)
  16909. }
  16910. }
  16911. }
  16912. }
  16913. }
  16914. }
  16915. _this.isTextCancelToken = _this.ajax.setCancelSource();
  16916. let _uuid = uuidv4();
  16917. // let params = JSON.stringify({
  16918. // // "model": "Chat",
  16919. // model: 'gpt-3.5-turbo',
  16920. // temperature: 0.1,
  16921. // max_tokens: 4096,
  16922. // top_p: 1,
  16923. // frequency_penalty: 0,
  16924. // presence_penalty: 0,
  16925. // messages: [{
  16926. // content: messages,
  16927. // role: 'user'
  16928. // }],
  16929. // uid: _uuid,
  16930. // mind_map_question: "",
  16931. // })
  16932. let params = {
  16933. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  16934. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  16935. session_name: _uuid,
  16936. userId: _this.userid,
  16937. uid: _uuid,
  16938. file_ids: fileid.length ? [...fileid] : '',
  16939. model: 'gpt-4o-2024-08-06',
  16940. temperature: 0.1,
  16941. }
  16942. // let params = JSON.stringify({
  16943. // message: {
  16944. // anthropic_version: "bedrock-2023-05-31",
  16945. // max_tokens: 4096,
  16946. // temperature: 0.1,
  16947. // top_p: 1,
  16948. // messages: [{
  16949. // "role": "user",
  16950. // "content": messages
  16951. // }] ,
  16952. // },
  16953. // uid: _uuid,
  16954. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  16955. // });
  16956. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  16957. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  16958. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  16959. console.log(response);
  16960. // let data = response.data.FunctionResponse
  16961. // if (data.choices && data.choices.length && data.choices[0].message) {
  16962. // _this.courseText = data.choices[0].message.content
  16963. // }
  16964. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  16965. } else {
  16966. _this.$message.warning(response.data.FunctionResponse.result);
  16967. }
  16968. _this.isTextCancelToken = null
  16969. }).catch(function (error) {
  16970. _this.textLoading = false
  16971. _this.ttextLoading = false
  16972. _this.isTextCancelToken = null
  16973. if(error && error.message != 'Request canceled by the user.'){
  16974. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  16975. }
  16976. console.log(error);
  16977. });
  16978. await _this.aiGetgetAiContent(_uuid)
  16979. },
  16980. aiGetgetAiContent(_uid) {
  16981. try {
  16982. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16983. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16984. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  16985. } catch(error){
  16986. console.log('EventSource error:', error);
  16987. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  16988. this.textLoading = false
  16989. this.ttextLoading = false
  16990. this.isTextCancelToken = null
  16991. return;
  16992. }
  16993. let _allText = "";
  16994. let _mdText = "";
  16995. let _iindex = 0
  16996. this.isTextCancelSource.onmessage = _e => {
  16997. let _eData = JSON.parse(_e.data).content;
  16998. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  16999. //对话已经完成
  17000. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  17001. this.isTextCancelSource.close();
  17002. this.isTextCancelSource = null;
  17003. this.courseText = _mdText;
  17004. this.textLoading = false
  17005. this.ttextLoading = false
  17006. this.courseTextB = false
  17007. this.isTextCancelToken = null
  17008. return;
  17009. } else {
  17010. _iindex++
  17011. //对话还在继续
  17012. let _text = "";
  17013. _text = _eData.replaceAll("'", "");
  17014. if (_allText == "") {
  17015. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17016. } else {
  17017. _allText += _text;
  17018. }
  17019. _mdText = _allText + "_";
  17020. _mdText = _mdText.replace(/\\n/g, "\n");
  17021. _mdText = _mdText.replace(/\\/g, "");
  17022. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17023. //转化返回的回复流数据
  17024. if(_iindex == 10){
  17025. this.courseText = _mdText;
  17026. _iindex = 0
  17027. }
  17028. this.textLoading = false
  17029. // 处理流数据
  17030. }
  17031. // this.$forceUpdate();
  17032. };
  17033. let _this = this
  17034. this.isTextCancelSource.onerror = function(event) {
  17035. // 处理错误,可以尝试重新连接
  17036. console.log('EventSource error:', event);
  17037. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17038. _this.textLoading = false
  17039. _this.ttextLoading = false
  17040. _this.isTextCancelToken = null
  17041. _this.isTextCancelSource.close();
  17042. _this.isTextCancelSource = null;
  17043. };
  17044. },
  17045. numberToChinese(number) {
  17046. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  17047. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  17048. let result = '';
  17049. let num = parseInt(number, 10);
  17050. let i = 0;
  17051. while (num > 0) {
  17052. result = chineseNum[num % 10] + chineseUnit[i] + result;
  17053. num = Math.floor(num / 10);
  17054. i++;
  17055. }
  17056. // 去除连续的零,保留一个零
  17057. result = result.replace(/零+/g, '零');
  17058. return result;
  17059. },
  17060. async aiGet2(messages, callback) {
  17061. let _this = this
  17062. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17063. if (_this.infoData.length) {
  17064. for (var i = 0; i < _this.infoData.length; i++) {
  17065. if(_this.infoData[i].fileid){
  17066. fileid.push(_this.infoData[i].fileid)
  17067. }else {
  17068. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17069. if(_fileid){
  17070. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17071. _this.$forceUpdate();
  17072. if(_fileid != 1){
  17073. fileid.push(_fileid)
  17074. }
  17075. }
  17076. }
  17077. }
  17078. }
  17079. console.log('fileid=========',fileid)
  17080. // let params = JSON.stringify({
  17081. // // "model": "Chat",
  17082. // model: 'gpt-3.5-turbo',
  17083. // temperature: 0.1,
  17084. // max_tokens: 4096,
  17085. // top_p: 1,
  17086. // frequency_penalty: 0,
  17087. // presence_penalty: 0,
  17088. // messages: [{
  17089. // content: messages,
  17090. // role: 'user'
  17091. // }],
  17092. // stream: false,
  17093. // uid: this.userid,
  17094. // mind_map_question: "",
  17095. // })
  17096. // // let params = JSON.stringify({
  17097. // // message: {
  17098. // // anthropic_version: "bedrock-2023-05-31",
  17099. // // max_tokens: 4096,
  17100. // // temperature: 0.1,
  17101. // // top_p: 1,
  17102. // // messages: [{
  17103. // // content: messages,
  17104. // // role: 'user'
  17105. // // }], //
  17106. // // },
  17107. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17108. // // });
  17109. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17110. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17111. // console.log(response);
  17112. // let data = response.data.FunctionResponse
  17113. // if (data.choices && data.choices.length && data.choices[0].message) {
  17114. // console.log(data.choices[0].message.content);
  17115. // let dArray = JSON.parse(data.choices[0].message.content)
  17116. // _this.dArray = dArray
  17117. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17118. // for (var i = 0; i < dArray.length; i++) {
  17119. // let _task = dArray[i]
  17120. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17121. // task: _task.task,
  17122. // taskDetail: "",
  17123. // taskDetail2: _task.detail,
  17124. // taskDetail3: "",
  17125. // chapterData: [],
  17126. // toolText: "",
  17127. // toolChoose: [
  17128. // {
  17129. // tool: [],
  17130. // toolDetail: "",
  17131. // toolType: 0,
  17132. // askCount: 1,
  17133. // askTitle: "",
  17134. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17135. // },
  17136. // ],
  17137. // isShowTools: false,
  17138. // askCount: 1,
  17139. // isFold: 0,
  17140. // askTitle: "",
  17141. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17142. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17143. // homeworkList: [],
  17144. // })
  17145. // }
  17146. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17147. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17148. // _this.$forceUpdate();
  17149. // }
  17150. // // if (data.result) {
  17151. // // console.log(data.result);
  17152. // // let dArray = JSON.parse(data.result)
  17153. // // _this.dArray = dArray
  17154. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17155. // // for (var i = 0; i < dArray.length; i++) {
  17156. // // let _task = dArray[i]
  17157. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17158. // // task: _task.task,
  17159. // // taskDetail: "",
  17160. // // taskDetail2: _task.detail,
  17161. // // taskDetail3: "",
  17162. // // chapterData: [],
  17163. // // toolText: "",
  17164. // // toolChoose: [
  17165. // // {
  17166. // // tool: [],
  17167. // // toolDetail: "",
  17168. // // toolType: 0,
  17169. // // askCount: 1,
  17170. // // askTitle: "",
  17171. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17172. // // },
  17173. // // ],
  17174. // // isShowTools: false,
  17175. // // askCount: 1,
  17176. // // isFold: 1,
  17177. // // askTitle: "",
  17178. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17179. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17180. // // homeworkList: [],
  17181. // // })
  17182. // // }
  17183. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17184. // // _this.$forceUpdate();
  17185. // // }
  17186. // callback ? callback() : ''
  17187. // }).catch(function (error) {
  17188. // _this.loading = false
  17189. // console.log(error);
  17190. // });
  17191. this.isOutlineCancelToken = this.ajax.setCancelSource();
  17192. let parm = {
  17193. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  17194. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  17195. session_name: uuidv4(),
  17196. userId: this.userid,
  17197. file_ids: fileid.length ? [...fileid] : '',
  17198. model: 'gpt-4o-2024-08-06',
  17199. temperature: 0.1,
  17200. }
  17201. this.ajax
  17202. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  17203. .then((response) => {
  17204. console.log(response);
  17205. let data = response.data.FunctionResponse
  17206. if (data.message) {
  17207. console.log(data.message);
  17208. let dArray = {}
  17209. try {
  17210. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17211. } catch (error) {
  17212. console.log("error_________________" + error);
  17213. try {
  17214. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17215. let match = data.message.match(regex);
  17216. dArray = JSON.parse(match[0]);
  17217. // var message = data.message;
  17218. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17219. // var jsonEnd = message.indexOf("```", jsonStart);
  17220. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17221. // dArray = JSON.parse(jsonString);
  17222. } catch (error) {
  17223. try {
  17224. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17225. let match = data.message.match(regex);
  17226. // eval("var aaa = " + match[0])
  17227. dArray = JSON.parse(match[0].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  17228. } catch (error) {
  17229. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17230. _this.aiGet2(messages, callback);
  17231. console.log("error_________________" + error);
  17232. }
  17233. console.log("error_________________" + error);
  17234. }
  17235. }
  17236. _this.dArray = dArray
  17237. console.log(dArray)
  17238. if(_this.panOutline() > 0){
  17239. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17240. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17241. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  17242. }
  17243. for (var i = 0; i < dArray.length; i++) {
  17244. let _task = dArray[i]
  17245. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17246. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  17247. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  17248. }else {
  17249. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17250. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  17251. taskDetail: "",
  17252. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  17253. taskDetail3: "",
  17254. chapterData: [],
  17255. toolText: "",
  17256. toolChoose: [
  17257. {
  17258. tool: [],
  17259. toolDetail: "",
  17260. toolType: 0,
  17261. askCount: 1,
  17262. askTitle: "",
  17263. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17264. },
  17265. ],
  17266. isShowTools: false,
  17267. askCount: 1,
  17268. isFold: 0,
  17269. askTitle: "",
  17270. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17271. checkJson: [{ checkCount: [], checkPerent: [] }],
  17272. homeworkList: [],
  17273. })
  17274. }
  17275. }
  17276. }else {
  17277. _this.unitJson[0].chapterInfo[0].taskJson = []
  17278. for (var i = 0; i < dArray.length; i++) {
  17279. let _task = dArray[i]
  17280. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17281. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  17282. taskDetail: "",
  17283. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  17284. taskDetail3: "",
  17285. chapterData: [],
  17286. toolText: "",
  17287. toolChoose: [
  17288. {
  17289. tool: [],
  17290. toolDetail: "",
  17291. toolType: 0,
  17292. askCount: 1,
  17293. askTitle: "",
  17294. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17295. },
  17296. ],
  17297. isShowTools: false,
  17298. askCount: 1,
  17299. isFold: 0,
  17300. askTitle: "",
  17301. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17302. checkJson: [{ checkCount: [], checkPerent: [] }],
  17303. homeworkList: [],
  17304. })
  17305. }
  17306. }
  17307. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17308. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17309. _this.$forceUpdate();
  17310. }
  17311. callback ? callback() : ''
  17312. _this.isOutlineCancelToken = null
  17313. })
  17314. .catch((error) => {
  17315. _this.loading = false
  17316. _this.isOutlineCancelToken = null
  17317. console.log(error);
  17318. });
  17319. },
  17320. cancelAjax(type, index){
  17321. if (this.isOutlineCancelToken && type == 'outline') {
  17322. this.$message.success("已经成功停止生成课程大纲")
  17323. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  17324. this.isOutlineCancelToken = null;
  17325. this.loading = false
  17326. }
  17327. if (this.isFileCancelToken && type == 'file') {
  17328. this.$message.success("已经成功停止智能生成检索资料")
  17329. this.isFileCancelToken.cancel('Request canceled by the user.');
  17330. this.isFileCancelToken = null;
  17331. this.fileSLoading = false
  17332. }
  17333. if(this.isTextCancelToken && type == 'text'){
  17334. this.$message.success("已经成功停止AI优化")
  17335. this.isTextCancelToken.cancel('Request canceled by the user.');
  17336. this.isTextCancelToken = null;
  17337. this.textLoading = false
  17338. this.ttextLoading = true
  17339. if(this.isTextCancelSource){
  17340. this.isTextCancelSource.close()
  17341. this.isTextCancelSource = null
  17342. }
  17343. }
  17344. if(this.isTargetCancelToken2 && type == 'target2'){
  17345. this.$message.success("已经成功停止生成目标")
  17346. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  17347. this.isTargetCancelToken2 = null;
  17348. this.targetTextLoading2 = false
  17349. this.ttargetTextLoading2 = false
  17350. if(this.isTargetCancelSource2){
  17351. this.isTargetCancelSource2.close()
  17352. this.isTargetCancelSource2 = null
  17353. }
  17354. }
  17355. if(this.isTargetCancelToken1 && type == 'target1'){
  17356. this.$message.success("已经成功停止生成目标")
  17357. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  17358. this.isTargetCancelToken1 = null;
  17359. this.targetTextLoading = false
  17360. this.ttargetTextLoading = false
  17361. if(this.isTargetCancelSource1){
  17362. this.isTargetCancelSource1.close()
  17363. this.isTargetCancelSource1 = null
  17364. }
  17365. }
  17366. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  17367. this.$message.success("已经成功停止提取摘要")
  17368. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  17369. this.isTeacherTextCancelToken = null;
  17370. this.teacherTextLoading = false
  17371. this.tteacherTextLoading = false
  17372. if(this.isTeacherTextCancelSource){
  17373. this.isTeacherTextCancelSource.close()
  17374. this.isTeacherTextCancelSource = null
  17375. }
  17376. }
  17377. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  17378. this.$message.success("已经成功停止生成教案")
  17379. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  17380. this.isTeacherTaskCancelToken = null;
  17381. this.loading = false
  17382. }
  17383. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  17384. this.$message.success("已经成功停止生成大纲")
  17385. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  17386. this.isOutlineTaskCancelToken[index] = null;
  17387. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  17388. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  17389. if(this.isOutlineTaskCancelSource[index]){
  17390. this.isOutlineTaskCancelSource[index].close()
  17391. this.isOutlineTaskCancelSource[index] = null
  17392. }
  17393. }
  17394. },
  17395. async aiGetTask2(messages, callback) {
  17396. let _this = this
  17397. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17398. if (_this.infoData.length) {
  17399. for (var i = 0; i < _this.infoData.length; i++) {
  17400. if(_this.infoData[i].fileid){
  17401. fileid.push(_this.infoData[i].fileid)
  17402. }else {
  17403. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17404. if(_fileid){
  17405. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17406. _this.$forceUpdate();
  17407. if(_fileid != 1){
  17408. fileid.push(_fileid)
  17409. }
  17410. }
  17411. }
  17412. }
  17413. }
  17414. console.log('fileid=========',fileid)
  17415. // let params = JSON.stringify({
  17416. // // "model": "Chat",
  17417. // model: 'gpt-3.5-turbo',
  17418. // temperature: 0.1,
  17419. // max_tokens: 4096,
  17420. // top_p: 1,
  17421. // frequency_penalty: 0,
  17422. // presence_penalty: 0,
  17423. // messages: [{
  17424. // content: messages,
  17425. // role: 'user'
  17426. // }],
  17427. // stream: false,
  17428. // uid: this.userid,
  17429. // mind_map_question: "",
  17430. // })
  17431. // // let params = JSON.stringify({
  17432. // // message: {
  17433. // // anthropic_version: "bedrock-2023-05-31",
  17434. // // max_tokens: 4096,
  17435. // // temperature: 0.1,
  17436. // // top_p: 1,
  17437. // // messages: [{
  17438. // // content: messages,
  17439. // // role: 'user'
  17440. // // }], //
  17441. // // },
  17442. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17443. // // });
  17444. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17445. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17446. // console.log(response);
  17447. // let data = response.data.FunctionResponse
  17448. // if (data.choices && data.choices.length && data.choices[0].message) {
  17449. // console.log(data.choices[0].message.content);
  17450. // let dArray = JSON.parse(data.choices[0].message.content)
  17451. // _this.dArray = dArray
  17452. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17453. // for (var i = 0; i < dArray.length; i++) {
  17454. // let _task = dArray[i]
  17455. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17456. // task: _task.task,
  17457. // taskDetail: "",
  17458. // taskDetail2: _task.detail,
  17459. // taskDetail3: "",
  17460. // chapterData: [],
  17461. // toolText: "",
  17462. // toolChoose: [
  17463. // {
  17464. // tool: [],
  17465. // toolDetail: "",
  17466. // toolType: 0,
  17467. // askCount: 1,
  17468. // askTitle: "",
  17469. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17470. // },
  17471. // ],
  17472. // isShowTools: false,
  17473. // askCount: 1,
  17474. // isFold: 0,
  17475. // askTitle: "",
  17476. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17477. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17478. // homeworkList: [],
  17479. // })
  17480. // }
  17481. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17482. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17483. // _this.$forceUpdate();
  17484. // }
  17485. // // if (data.result) {
  17486. // // console.log(data.result);
  17487. // // let dArray = JSON.parse(data.result)
  17488. // // _this.dArray = dArray
  17489. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17490. // // for (var i = 0; i < dArray.length; i++) {
  17491. // // let _task = dArray[i]
  17492. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17493. // // task: _task.task,
  17494. // // taskDetail: "",
  17495. // // taskDetail2: _task.detail,
  17496. // // taskDetail3: "",
  17497. // // chapterData: [],
  17498. // // toolText: "",
  17499. // // toolChoose: [
  17500. // // {
  17501. // // tool: [],
  17502. // // toolDetail: "",
  17503. // // toolType: 0,
  17504. // // askCount: 1,
  17505. // // askTitle: "",
  17506. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17507. // // },
  17508. // // ],
  17509. // // isShowTools: false,
  17510. // // askCount: 1,
  17511. // // isFold: 1,
  17512. // // askTitle: "",
  17513. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17514. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17515. // // homeworkList: [],
  17516. // // })
  17517. // // }
  17518. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17519. // // _this.$forceUpdate();
  17520. // // }
  17521. // callback ? callback() : ''
  17522. // }).catch(function (error) {
  17523. // _this.loading = false
  17524. // console.log(error);
  17525. // });
  17526. this.isOutlineCancelToken = this.ajax.setCancelSource();
  17527. let parm = {
  17528. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17529. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17530. session_name: uuidv4(),
  17531. userId: this.userid,
  17532. file_ids: fileid.length ? [...fileid] : '',
  17533. model: 'gpt-4o-2024-08-06',
  17534. temperature: 0.1,
  17535. }
  17536. this.ajax
  17537. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  17538. .then((response) => {
  17539. console.log(response);
  17540. let data = response.data.FunctionResponse
  17541. if (data.message) {
  17542. console.log(data.message);
  17543. let dArray = {}
  17544. try {
  17545. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17546. } catch (error) {
  17547. console.log("error_________________" + error);
  17548. try {
  17549. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17550. let match = data.message.match(regex);
  17551. dArray = JSON.parse(match[0]);
  17552. // var message = data.message;
  17553. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17554. // var jsonEnd = message.indexOf("```", jsonStart);
  17555. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17556. // dArray = JSON.parse(jsonString);
  17557. } catch (error) {
  17558. try {
  17559. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17560. let match = data.message.match(regex);
  17561. // eval("var aaa = " + match[0])
  17562. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17563. } catch (error) {
  17564. console.log("error_________________" + error);
  17565. }
  17566. console.log("error_________________" + error);
  17567. }
  17568. }
  17569. _this.dArray = dArray
  17570. if(_this.panOutline() > 0){
  17571. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17572. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17573. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  17574. }
  17575. for (var i = 0; i < dArray.length; i++) {
  17576. let _task = dArray[i]
  17577. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17578. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  17579. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  17580. }else {
  17581. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17582. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17583. taskDetail: "",
  17584. taskDetail2: "",
  17585. taskDetail3: "",
  17586. chapterData: [],
  17587. toolText: "",
  17588. toolChoose: [
  17589. {
  17590. tool: [],
  17591. toolDetail: "",
  17592. toolType: 0,
  17593. askCount: 1,
  17594. askTitle: "",
  17595. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17596. },
  17597. ],
  17598. isShowTools: false,
  17599. askCount: 1,
  17600. isFold: 0,
  17601. askTitle: "",
  17602. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17603. checkJson: [{ checkCount: [], checkPerent: [] }],
  17604. homeworkList: [],
  17605. })
  17606. }
  17607. }
  17608. }else {
  17609. _this.unitJson[0].chapterInfo[0].taskJson = []
  17610. for (var i = 0; i < dArray.length; i++) {
  17611. let _task = dArray[i]
  17612. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17613. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17614. taskDetail: "",
  17615. taskDetail2: "",
  17616. taskDetail3: "",
  17617. chapterData: [],
  17618. toolText: "",
  17619. toolChoose: [
  17620. {
  17621. tool: [],
  17622. toolDetail: "",
  17623. toolType: 0,
  17624. askCount: 1,
  17625. askTitle: "",
  17626. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17627. },
  17628. ],
  17629. isShowTools: false,
  17630. askCount: 1,
  17631. isFold: 0,
  17632. askTitle: "",
  17633. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17634. checkJson: [{ checkCount: [], checkPerent: [] }],
  17635. homeworkList: [],
  17636. })
  17637. }
  17638. }
  17639. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17640. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17641. _this.$forceUpdate();
  17642. setTimeout(()=>{
  17643. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17644. this.aiOutlineDetail('', i)
  17645. }
  17646. }, 0)
  17647. }
  17648. callback ? callback() : ''
  17649. _this.isOutlineCancelToken = null
  17650. })
  17651. .catch((error) => {
  17652. _this.loading = false
  17653. _this.isOutlineCancelToken = null
  17654. console.log(error);
  17655. });
  17656. },
  17657. async aiGetTask3(messages, callback) {
  17658. let _this = this
  17659. // let params = JSON.stringify({
  17660. // // "model": "Chat",
  17661. // model: 'gpt-3.5-turbo',
  17662. // temperature: 0.1,
  17663. // max_tokens: 4096,
  17664. // top_p: 1,
  17665. // frequency_penalty: 0,
  17666. // presence_penalty: 0,
  17667. // messages: [{
  17668. // content: messages,
  17669. // role: 'user'
  17670. // }],
  17671. // stream: false,
  17672. // uid: this.userid,
  17673. // mind_map_question: "",
  17674. // })
  17675. // // let params = JSON.stringify({
  17676. // // message: {
  17677. // // anthropic_version: "bedrock-2023-05-31",
  17678. // // max_tokens: 4096,
  17679. // // temperature: 0.1,
  17680. // // top_p: 1,
  17681. // // messages: [{
  17682. // // content: messages,
  17683. // // role: 'user'
  17684. // // }], //
  17685. // // },
  17686. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17687. // // });
  17688. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17689. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17690. // console.log(response);
  17691. // let data = response.data.FunctionResponse
  17692. // if (data.choices && data.choices.length && data.choices[0].message) {
  17693. // console.log(data.choices[0].message.content);
  17694. // let dArray = JSON.parse(data.choices[0].message.content)
  17695. // _this.dArray = dArray
  17696. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17697. // for (var i = 0; i < dArray.length; i++) {
  17698. // let _task = dArray[i]
  17699. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17700. // task: _task.task,
  17701. // taskDetail: "",
  17702. // taskDetail2: _task.detail,
  17703. // taskDetail3: "",
  17704. // chapterData: [],
  17705. // toolText: "",
  17706. // toolChoose: [
  17707. // {
  17708. // tool: [],
  17709. // toolDetail: "",
  17710. // toolType: 0,
  17711. // askCount: 1,
  17712. // askTitle: "",
  17713. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17714. // },
  17715. // ],
  17716. // isShowTools: false,
  17717. // askCount: 1,
  17718. // isFold: 0,
  17719. // askTitle: "",
  17720. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17721. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17722. // homeworkList: [],
  17723. // })
  17724. // }
  17725. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17726. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17727. // _this.$forceUpdate();
  17728. // }
  17729. // // if (data.result) {
  17730. // // console.log(data.result);
  17731. // // let dArray = JSON.parse(data.result)
  17732. // // _this.dArray = dArray
  17733. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17734. // // for (var i = 0; i < dArray.length; i++) {
  17735. // // let _task = dArray[i]
  17736. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17737. // // task: _task.task,
  17738. // // taskDetail: "",
  17739. // // taskDetail2: _task.detail,
  17740. // // taskDetail3: "",
  17741. // // chapterData: [],
  17742. // // toolText: "",
  17743. // // toolChoose: [
  17744. // // {
  17745. // // tool: [],
  17746. // // toolDetail: "",
  17747. // // toolType: 0,
  17748. // // askCount: 1,
  17749. // // askTitle: "",
  17750. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17751. // // },
  17752. // // ],
  17753. // // isShowTools: false,
  17754. // // askCount: 1,
  17755. // // isFold: 1,
  17756. // // askTitle: "",
  17757. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17758. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17759. // // homeworkList: [],
  17760. // // })
  17761. // // }
  17762. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17763. // // _this.$forceUpdate();
  17764. // // }
  17765. // callback ? callback() : ''
  17766. // }).catch(function (error) {
  17767. // _this.loading = false
  17768. // console.log(error);
  17769. // });
  17770. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  17771. let parm = {
  17772. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  17773. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17774. session_name: uuidv4(),
  17775. userId: this.userid,
  17776. file_ids: '',
  17777. model: 'gpt-4o-2024-08-06',
  17778. temperature: 0.1,
  17779. }
  17780. this.ajax
  17781. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  17782. .then((response) => {
  17783. console.log(response);
  17784. let data = response.data.FunctionResponse
  17785. if (data.message) {
  17786. console.log(data.message);
  17787. let dArray = {}
  17788. try {
  17789. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17790. } catch (error) {
  17791. console.log("error_________________" + error);
  17792. try {
  17793. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17794. let match = data.message.match(regex);
  17795. dArray = JSON.parse(match[0]);
  17796. // var message = data.message;
  17797. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17798. // var jsonEnd = message.indexOf("```", jsonStart);
  17799. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17800. // dArray = JSON.parse(jsonString);
  17801. } catch (error) {
  17802. try {
  17803. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17804. let match = data.message.match(regex);
  17805. // eval("var aaa = " + match[0])
  17806. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  17807. } catch (error) {
  17808. console.log("error_________________" + error);
  17809. }
  17810. console.log("error_________________" + error);
  17811. }
  17812. }
  17813. _this.dArray = dArray
  17814. if(_this.panOutline() > 0){
  17815. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17816. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17817. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  17818. }
  17819. for (var i = 0; i < dArray.length; i++) {
  17820. let _task = dArray[i]
  17821. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17822. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  17823. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  17824. }else {
  17825. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17826. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17827. taskDetail: "",
  17828. taskDetail2: "",
  17829. taskDetail3: "",
  17830. chapterData: [],
  17831. toolText: "",
  17832. toolChoose: [
  17833. {
  17834. tool: [],
  17835. toolDetail: "",
  17836. toolType: 0,
  17837. askCount: 1,
  17838. askTitle: "",
  17839. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17840. },
  17841. ],
  17842. isShowTools: false,
  17843. askCount: 1,
  17844. isFold: 0,
  17845. askTitle: "",
  17846. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17847. checkJson: [{ checkCount: [], checkPerent: [] }],
  17848. homeworkList: [],
  17849. })
  17850. }
  17851. }
  17852. }else {
  17853. _this.unitJson[0].chapterInfo[0].taskJson = []
  17854. for (var i = 0; i < dArray.length; i++) {
  17855. let _task = dArray[i]
  17856. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17857. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  17858. taskDetail: "",
  17859. taskDetail2: "",
  17860. taskDetail3: "",
  17861. chapterData: [],
  17862. toolText: "",
  17863. toolChoose: [
  17864. {
  17865. tool: [],
  17866. toolDetail: "",
  17867. toolType: 0,
  17868. askCount: 1,
  17869. askTitle: "",
  17870. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17871. },
  17872. ],
  17873. isShowTools: false,
  17874. askCount: 1,
  17875. isFold: 0,
  17876. askTitle: "",
  17877. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17878. checkJson: [{ checkCount: [], checkPerent: [] }],
  17879. homeworkList: [],
  17880. })
  17881. }
  17882. }
  17883. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17884. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17885. _this.$forceUpdate();
  17886. setTimeout(()=>{
  17887. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17888. this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  17889. }
  17890. }, 0)
  17891. }
  17892. callback ? callback() : ''
  17893. _this.isTeacherTaskCancelToken = null
  17894. })
  17895. .catch((error) => {
  17896. _this.loading = false
  17897. _this.isTeacherTaskCancelToken = null
  17898. console.log(error);
  17899. });
  17900. },
  17901. async aiGet3(messages, callback) {
  17902. let _this = this
  17903. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17904. if (_this.infoData.length) {
  17905. for (var i = 0; i < _this.infoData.length; i++) {
  17906. if(_this.infoData[i].fileid){
  17907. fileid.push(_this.infoData[i].fileid)
  17908. }else {
  17909. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17910. if(_fileid){
  17911. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17912. _this.$forceUpdate();
  17913. if(_fileid != 1){
  17914. fileid.push(_fileid)
  17915. }
  17916. }
  17917. }
  17918. }
  17919. }
  17920. // let params = JSON.stringify({
  17921. // // "model": "Chat",
  17922. // model: 'gpt-3.5-turbo',
  17923. // temperature: 0.1,
  17924. // max_tokens: 4096,
  17925. // top_p: 1,
  17926. // frequency_penalty: 0,
  17927. // presence_penalty: 0,
  17928. // messages: [{
  17929. // content: messages,
  17930. // role: 'user'
  17931. // }],
  17932. // stream: false,
  17933. // uid: this.userid,
  17934. // mind_map_question: "",
  17935. // })
  17936. // // let params = JSON.stringify({
  17937. // // message: {
  17938. // // anthropic_version: "bedrock-2023-05-31",
  17939. // // max_tokens: 4096,
  17940. // // temperature: 0.1,
  17941. // // top_p: 1,
  17942. // // messages: [{
  17943. // // content: messages,
  17944. // // role: 'user'
  17945. // // }], //
  17946. // // },
  17947. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17948. // // });
  17949. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17950. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17951. // console.log(response);
  17952. // let data = response.data.FunctionResponse
  17953. // if (data.choices && data.choices.length && data.choices[0].message) {
  17954. // console.log(data.choices[0].message.content);
  17955. // let tArray = JSON.parse(data.choices[0].message.content)
  17956. // // _this.unitJson[0].chapterInfo[0].task = []
  17957. // let toolsJson = {
  17958. // "电子白板": { tool: 1, type: 1 },
  17959. // "文档": { tool: 52, type: 1 },
  17960. // "思维导图": { tool: 3, type: 1 },
  17961. // "表格": { tool: 48, type: 1 },
  17962. // "作业提交": { tool: 16, type: 2 }
  17963. // }
  17964. // for (var i = 0; i < tArray.length; i++) {
  17965. // let _task = tArray[i]
  17966. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  17967. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  17968. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  17969. // if (_task.toolChoose.length) {
  17970. // for (var j = 0; j < _task.toolChoose.length; j++) {
  17971. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17972. // {
  17973. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  17974. // toolDetail: _task.toolChoose[j].detail,
  17975. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  17976. // askCount: 1,
  17977. // askTitle: "",
  17978. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17979. // },
  17980. // )
  17981. // }
  17982. // } else {
  17983. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  17984. // {
  17985. // tool: [],
  17986. // toolDetail: "",
  17987. // toolType: 0,
  17988. // askCount: 1,
  17989. // askTitle: "",
  17990. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17991. // },
  17992. // )
  17993. // }
  17994. // }
  17995. // // if (_this.infoData.length) {
  17996. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17997. // // }
  17998. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17999. // _this.$forceUpdate();
  18000. // }
  18001. // // if (data.result) {
  18002. // // console.log(data.result);
  18003. // // let tArray = JSON.parse(data.result)
  18004. // // // _this.unitJson[0].chapterInfo[0].task = []
  18005. // // let toolsJson = {
  18006. // // "电子白板": { tool: 1, type: 1 },
  18007. // // "文档": { tool: 52, type: 1 },
  18008. // // "思维导图": { tool: 3, type: 1 },
  18009. // // "表格": { tool: 48, type: 1 },
  18010. // // "作业提交": { tool: 16, type: 2 }
  18011. // // }
  18012. // // for (var i = 0; i < tArray.length; i++) {
  18013. // // let _task = tArray[i]
  18014. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18015. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18016. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18017. // // if (_task.toolChoose.length) {
  18018. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  18019. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18020. // // {
  18021. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18022. // // toolDetail: _task.toolChoose[j].detail,
  18023. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18024. // // askCount: 1,
  18025. // // askTitle: "",
  18026. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18027. // // },
  18028. // // )
  18029. // // }
  18030. // // } else {
  18031. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18032. // // {
  18033. // // tool: [],
  18034. // // toolDetail: "",
  18035. // // toolType: 0,
  18036. // // askCount: 1,
  18037. // // askTitle: "",
  18038. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18039. // // },
  18040. // // )
  18041. // // }
  18042. // // }
  18043. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18044. // // _this.$forceUpdate();
  18045. // // }
  18046. // callback ? callback() : ''
  18047. // }).catch(function (error) {
  18048. // _this.loading = false
  18049. // console.log(error);
  18050. // });
  18051. let parm = {
  18052. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18053. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18054. session_name: uuidv4(),
  18055. userId: this.userid,
  18056. file_ids: fileid.length ? [...fileid] : '',
  18057. model: 'gpt-4o-2024-08-06',
  18058. temperature: 0.1,
  18059. }
  18060. this.ajax
  18061. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18062. .then(async (response) => {
  18063. console.log(response);
  18064. let data = response.data.FunctionResponse
  18065. if (data.message) {
  18066. console.log(data.message);
  18067. let tArray = {}
  18068. try {
  18069. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18070. } catch (error) {
  18071. console.log("error_________________" + error);
  18072. try {
  18073. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18074. let match = data.message.match(regex);
  18075. tArray = JSON.parse(match[0]);
  18076. // var message = data.message;
  18077. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18078. // var jsonEnd = message.indexOf("```", jsonStart);
  18079. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18080. // tArray = JSON.parse(jsonString);
  18081. } catch (error) {
  18082. try {
  18083. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18084. let match = data.message.match(regex);
  18085. // eval("var aaa = " + match[0])
  18086. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18087. } catch (error) {
  18088. console.log("error_________________" + error);
  18089. }
  18090. console.log("error_________________" + error);
  18091. }
  18092. }
  18093. let toolsJson = {
  18094. "电子白板": { tool: 1, type: 1 },
  18095. "文档": { tool: 52, type: 1 },
  18096. "思维导图": { tool: 3, type: 1 },
  18097. "表格": { tool: 48, type: 1 },
  18098. "作业提交": { tool: 16, type: 2 },
  18099. "问答": { tool: 15, type: 2 },
  18100. "选择题": { tool: 45, type: 2 },
  18101. }
  18102. // answerQ:"sssssssssssssss"
  18103. for (var i = 0; i < tArray.length; i++) {
  18104. let _task = tArray[i]
  18105. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18106. _task.elist = _task.elist.filter(el=>{
  18107. el.isai = "1"
  18108. return el
  18109. })
  18110. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18111. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18112. if (_task.toolChoose.length) {
  18113. for (var j = 0; j < _task.toolChoose.length; j++) {
  18114. let _json = {
  18115. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  18116. toolDetail: _task.toolChoose[j].detail,
  18117. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18118. askCount: 1,
  18119. askTitle: "",
  18120. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18121. }
  18122. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18123. let answerQ = await _this.aiCreateQuestion(15, i)
  18124. _json.answerQ = answerQ.answerQ
  18125. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18126. let testJson = await _this.aiCreateQuestion(45, i)
  18127. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18128. }
  18129. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  18130. }
  18131. } else {
  18132. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18133. {
  18134. tool: [],
  18135. toolDetail: "",
  18136. toolType: 0,
  18137. askCount: 1,
  18138. askTitle: "",
  18139. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18140. },
  18141. )
  18142. }
  18143. }
  18144. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18145. _this.$forceUpdate();
  18146. _this.createTeacherAn();
  18147. }
  18148. callback ? callback() : ''
  18149. })
  18150. .catch((error) => {
  18151. _this.loading = false
  18152. console.log(error);
  18153. });
  18154. },
  18155. async aiGet32(messages, index) {
  18156. let _this = this
  18157. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18158. if (_this.infoData.length) {
  18159. for (var i = 0; i < _this.infoData.length; i++) {
  18160. if(_this.infoData[i].fileid){
  18161. fileid.push(_this.infoData[i].fileid)
  18162. }else {
  18163. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18164. if(_fileid){
  18165. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18166. _this.$forceUpdate();
  18167. if(_fileid != 1){
  18168. fileid.push(_fileid)
  18169. }
  18170. }
  18171. }
  18172. }
  18173. }
  18174. // let params = JSON.stringify({
  18175. // // "model": "Chat",
  18176. // model: 'gpt-3.5-turbo',
  18177. // temperature: 0.1,
  18178. // max_tokens: 4096,
  18179. // top_p: 1,
  18180. // frequency_penalty: 0,
  18181. // presence_penalty: 0,
  18182. // messages: [{
  18183. // content: messages,
  18184. // role: 'user'
  18185. // }],
  18186. // stream: false,
  18187. // uid: this.userid,
  18188. // mind_map_question: "",
  18189. // })
  18190. // // let params = JSON.stringify({
  18191. // // message: {
  18192. // // anthropic_version: "bedrock-2023-05-31",
  18193. // // max_tokens: 4096,
  18194. // // temperature: 0.1,
  18195. // // top_p: 1,
  18196. // // messages: [{
  18197. // // content: messages,
  18198. // // role: 'user'
  18199. // // }], //
  18200. // // },
  18201. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18202. // // });
  18203. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18204. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18205. // console.log(response);
  18206. // let data = response.data.FunctionResponse
  18207. // if (data.choices && data.choices.length && data.choices[0].message) {
  18208. // console.log(data.choices[0].message.content);
  18209. // let tArray = JSON.parse(data.choices[0].message.content)
  18210. // // _this.unitJson[0].chapterInfo[0].task = []
  18211. // let toolsJson = {
  18212. // "电子白板": { tool: 1, type: 1 },
  18213. // "文档": { tool: 52, type: 1 },
  18214. // "思维导图": { tool: 3, type: 1 },
  18215. // "表格": { tool: 48, type: 1 },
  18216. // "作业提交": { tool: 16, type: 2 }
  18217. // }
  18218. // for (var i = 0; i < tArray.length; i++) {
  18219. // let _task = tArray[i]
  18220. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18221. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18222. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18223. // if (_task.toolChoose.length) {
  18224. // for (var j = 0; j < _task.toolChoose.length; j++) {
  18225. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18226. // {
  18227. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18228. // toolDetail: _task.toolChoose[j].detail,
  18229. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18230. // askCount: 1,
  18231. // askTitle: "",
  18232. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18233. // },
  18234. // )
  18235. // }
  18236. // } else {
  18237. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18238. // {
  18239. // tool: [],
  18240. // toolDetail: "",
  18241. // toolType: 0,
  18242. // askCount: 1,
  18243. // askTitle: "",
  18244. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18245. // },
  18246. // )
  18247. // }
  18248. // }
  18249. // // if (_this.infoData.length) {
  18250. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18251. // // }
  18252. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18253. // _this.$forceUpdate();
  18254. // }
  18255. // // if (data.result) {
  18256. // // console.log(data.result);
  18257. // // let tArray = JSON.parse(data.result)
  18258. // // // _this.unitJson[0].chapterInfo[0].task = []
  18259. // // let toolsJson = {
  18260. // // "电子白板": { tool: 1, type: 1 },
  18261. // // "文档": { tool: 52, type: 1 },
  18262. // // "思维导图": { tool: 3, type: 1 },
  18263. // // "表格": { tool: 48, type: 1 },
  18264. // // "作业提交": { tool: 16, type: 2 }
  18265. // // }
  18266. // // for (var i = 0; i < tArray.length; i++) {
  18267. // // let _task = tArray[i]
  18268. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18269. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18270. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18271. // // if (_task.toolChoose.length) {
  18272. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  18273. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18274. // // {
  18275. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18276. // // toolDetail: _task.toolChoose[j].detail,
  18277. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18278. // // askCount: 1,
  18279. // // askTitle: "",
  18280. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18281. // // },
  18282. // // )
  18283. // // }
  18284. // // } else {
  18285. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18286. // // {
  18287. // // tool: [],
  18288. // // toolDetail: "",
  18289. // // toolType: 0,
  18290. // // askCount: 1,
  18291. // // askTitle: "",
  18292. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18293. // // },
  18294. // // )
  18295. // // }
  18296. // // }
  18297. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18298. // // _this.$forceUpdate();
  18299. // // }
  18300. // callback ? callback() : ''
  18301. // }).catch(function (error) {
  18302. // _this.loading = false
  18303. // console.log(error);
  18304. // });
  18305. let parm = {
  18306. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18307. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18308. session_name: uuidv4(),
  18309. userId: this.userid,
  18310. file_ids: fileid.length ? [...fileid] : '',
  18311. model: 'gpt-4o-2024-08-06',
  18312. temperature: 0.1,
  18313. }
  18314. this.ajax
  18315. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18316. .then(async (response) => {
  18317. console.log(response);
  18318. let data = response.data.FunctionResponse
  18319. if (data.message) {
  18320. console.log(data.message);
  18321. let tArray = {}
  18322. try {
  18323. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18324. } catch (error) {
  18325. console.log("error_________________" + error);
  18326. try {
  18327. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18328. let match = data.message.match(regex);
  18329. tArray = JSON.parse(match[0]);
  18330. // var message = data.message;
  18331. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18332. // var jsonEnd = message.indexOf("```", jsonStart);
  18333. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18334. // tArray = JSON.parse(jsonString);
  18335. } catch (error) {
  18336. try {
  18337. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18338. let match = data.message.match(regex);
  18339. // eval("var aaa = " + match[0])
  18340. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18341. } catch (error) {
  18342. console.log("error_________________" + error);
  18343. }
  18344. console.log("error_________________" + error);
  18345. }
  18346. }
  18347. let toolsJson = {
  18348. "电子白板": { tool: 1, type: 1 },
  18349. "文档": { tool: 52, type: 1 },
  18350. "思维导图": { tool: 3, type: 1 },
  18351. "表格": { tool: 48, type: 1 },
  18352. "作业提交": { tool: 16, type: 2 },
  18353. "问答": { tool: 15, type: 2 },
  18354. "选择题": { tool: 45, type: 2 },
  18355. }
  18356. // answerQ:"sssssssssssssss"
  18357. // for (var i = 0; i < tArray.length; i++) {
  18358. let _task = tArray
  18359. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  18360. _task.elist = _task.elist.filter(el=>{
  18361. el.isai = 1
  18362. return el
  18363. })
  18364. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  18365. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  18366. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  18367. console.log("error_________________JSON不对重新生成");
  18368. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18369. _this.aiGet32(messages, index)
  18370. return;
  18371. }
  18372. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  18373. if (_task.toolChoose && _task.toolChoose.length) {
  18374. for (var j = 0; j < _task.toolChoose.length; j++) {
  18375. let _json = {
  18376. tool: [],
  18377. toolDetail: _task.toolChoose[j].detail,
  18378. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18379. askCount: 1,
  18380. askTitle: "",
  18381. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18382. }
  18383. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18384. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18385. let answerQ = await _this.aiCreateQuestion(15, index)
  18386. // _json.answerQ = answerQ.answerQ
  18387. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  18388. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18389. let testJson = await _this.aiCreateQuestion(45, index)
  18390. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18391. _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}
  18392. }
  18393. _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]
  18394. _this.$forceUpdate();
  18395. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18396. }
  18397. } else {
  18398. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  18399. {
  18400. tool: [],
  18401. toolDetail: "",
  18402. toolType: 0,
  18403. askCount: 1,
  18404. askTitle: "",
  18405. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18406. },
  18407. )
  18408. }
  18409. // }
  18410. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18411. _this.$forceUpdate();
  18412. _this.createTeacherAn(index);
  18413. }
  18414. // callback ? callback() : ''
  18415. _this.taskLoading[index] = false
  18416. })
  18417. .catch((error) => {
  18418. // _this.loading = false
  18419. _this.taskLoading[index] = false
  18420. console.log(error);
  18421. });
  18422. },
  18423. async aiGetG321(messages, index) {
  18424. let _this = this
  18425. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18426. if (_this.infoData.length) {
  18427. for (var i = 0; i < _this.infoData.length; i++) {
  18428. if(_this.infoData[i].fileid){
  18429. fileid.push(_this.infoData[i].fileid)
  18430. }else {
  18431. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18432. if(_fileid){
  18433. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18434. _this.$forceUpdate();
  18435. if(_fileid != 1){
  18436. fileid.push(_fileid)
  18437. }
  18438. }
  18439. }
  18440. }
  18441. }
  18442. let parm = {
  18443. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18444. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18445. session_name: uuidv4(),
  18446. userId: this.userid,
  18447. file_ids: fileid.length ? [...fileid] : '',
  18448. model: 'gpt-4o-2024-08-06',
  18449. temperature: 0.1,
  18450. }
  18451. this.ajax
  18452. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18453. .then(async (response) => {
  18454. console.log(response);
  18455. let data = response.data.FunctionResponse
  18456. if (data.message) {
  18457. let tArray = {}
  18458. try {
  18459. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18460. } catch (error) {
  18461. console.log("error_________________" + error);
  18462. try {
  18463. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18464. let match = data.message.match(regex);
  18465. tArray = JSON.parse(match[0]);
  18466. } catch (error) {
  18467. try {
  18468. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18469. let match = data.message.match(regex);
  18470. // eval("var aaa = " + match[0])
  18471. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18472. } catch (error) {
  18473. console.log("error_________________" + error);
  18474. }
  18475. console.log("error_________________" + error);
  18476. }
  18477. }
  18478. console.log(data.message);
  18479. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  18480. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  18481. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18482. _this.$forceUpdate();
  18483. _this.createTeacherAn(index);
  18484. }
  18485. // callback ? callback() : ''
  18486. _this.taskGLoading[index][0] = false
  18487. })
  18488. .catch((error) => {
  18489. // _this.loading = false
  18490. _this.taskGLoading[index][0] = false
  18491. console.log(error);
  18492. });
  18493. },
  18494. async aiGetG322(messages, index) {
  18495. let _this = this
  18496. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18497. if (_this.infoData.length) {
  18498. for (var i = 0; i < _this.infoData.length; i++) {
  18499. if(_this.infoData[i].fileid){
  18500. fileid.push(_this.infoData[i].fileid)
  18501. }else {
  18502. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18503. if(_fileid){
  18504. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18505. _this.$forceUpdate();
  18506. if(_fileid != 1){
  18507. fileid.push(_fileid)
  18508. }
  18509. }
  18510. }
  18511. }
  18512. }
  18513. let parm = {
  18514. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18515. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18516. session_name: uuidv4(),
  18517. userId: this.userid,
  18518. file_ids: fileid.length ? [...fileid] : '',
  18519. model: 'gpt-4o-2024-08-06',
  18520. temperature: 0.1,
  18521. }
  18522. this.ajax
  18523. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18524. .then(async (response) => {
  18525. console.log(response);
  18526. let data = response.data.FunctionResponse
  18527. if (data.message) {
  18528. console.log(data.message);
  18529. let tArray = {}
  18530. try {
  18531. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18532. } catch (error) {
  18533. console.log("error_________________" + error);
  18534. try {
  18535. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18536. let match = data.message.match(regex);
  18537. tArray = JSON.parse(match[0]);
  18538. } catch (error) {
  18539. try {
  18540. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18541. let match = data.message.match(regex);
  18542. // eval("var aaa = " + match[0])
  18543. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18544. } catch (error) {
  18545. console.log("error_________________" + error);
  18546. }
  18547. console.log("error_________________" + error);
  18548. }
  18549. }
  18550. let toolsJson = {
  18551. "电子白板": { tool: 1, type: 1 },
  18552. "文档": { tool: 52, type: 1 },
  18553. "思维导图": { tool: 3, type: 1 },
  18554. "表格": { tool: 48, type: 1 },
  18555. "作业提交": { tool: 16, type: 2 },
  18556. "问答": { tool: 15, type: 2 },
  18557. "选择题": { tool: 45, type: 2 },
  18558. }
  18559. if(_this.languageSetting == 1){
  18560. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  18561. }else if(_this.languageSetting == 2){
  18562. toolsJson = {
  18563. "Mind Map Tool": { tool: 1, type: 1 },
  18564. "Document tool": { tool: 52, type: 1 },
  18565. "Diagram Tool": { tool: 3, type: 1 },
  18566. "Spreadsheet tool": { tool: 48, type: 1 },
  18567. "作业提交": { tool: 16, type: 2 },
  18568. "Q&A Tool": { tool: 15, type: 2 },
  18569. "Choice tool": { tool: 45, type: 2 },
  18570. }
  18571. }
  18572. let _task = tArray
  18573. if(!_task.toolChoose){
  18574. console.log("error_________________JSON不对重新生成");
  18575. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18576. _this.aiGet322(messages, index)
  18577. return;
  18578. }
  18579. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  18580. if (_task.toolChoose && _task.toolChoose.length) {
  18581. for (var j = 0; j < _task.toolChoose.length; j++) {
  18582. let _json = {
  18583. tool: [],
  18584. toolDetail: _task.toolChoose[j].detail,
  18585. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18586. askCount: 1,
  18587. askTitle: "",
  18588. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18589. }
  18590. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18591. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18592. let answerQ = await _this.aiCreateQuestion(15, index)
  18593. // _json.answerQ = answerQ.answerQ
  18594. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  18595. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18596. let testJson = await _this.aiCreateQuestion(45, index)
  18597. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18598. _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}
  18599. }
  18600. _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]
  18601. _this.$forceUpdate();
  18602. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18603. }
  18604. } else {
  18605. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  18606. {
  18607. tool: [],
  18608. toolDetail: "",
  18609. toolType: 0,
  18610. askCount: 1,
  18611. askTitle: "",
  18612. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18613. },
  18614. )
  18615. }
  18616. // }
  18617. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18618. _this.$forceUpdate();
  18619. }
  18620. // callback ? callback() : ''
  18621. _this.taskGLoading[index][1] = false
  18622. })
  18623. .catch((error) => {
  18624. // _this.loading = false
  18625. _this.taskGLoading[index][1] = false
  18626. console.log(error);
  18627. });
  18628. },
  18629. async aiGetG323(messages, index) {
  18630. let _this = this
  18631. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18632. if (_this.infoData.length) {
  18633. for (var i = 0; i < _this.infoData.length; i++) {
  18634. if(_this.infoData[i].fileid){
  18635. fileid.push(_this.infoData[i].fileid)
  18636. }else {
  18637. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18638. if(_fileid){
  18639. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18640. _this.$forceUpdate();
  18641. if(_fileid != 1){
  18642. fileid.push(_fileid)
  18643. }
  18644. }
  18645. }
  18646. }
  18647. }
  18648. let parm = {
  18649. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18650. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18651. session_name: uuidv4(),
  18652. userId: this.userid,
  18653. file_ids: fileid.length ? [...fileid] : '',
  18654. model: 'gpt-4o-2024-08-06',
  18655. temperature: 0.1,
  18656. }
  18657. this.ajax
  18658. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18659. .then(async (response) => {
  18660. console.log(response);
  18661. let data = response.data.FunctionResponse
  18662. if (data.message) {
  18663. console.log(data.message);
  18664. let tArray = {}
  18665. try {
  18666. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18667. } catch (error) {
  18668. console.log("error_________________" + error);
  18669. try {
  18670. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18671. let match = data.message.match(regex);
  18672. tArray = JSON.parse(match[0]);
  18673. } catch (error) {
  18674. try {
  18675. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18676. let match = data.message.match(regex);
  18677. // eval("var aaa = " + match[0])
  18678. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18679. } catch (error) {
  18680. console.log("error_________________" + error);
  18681. }
  18682. console.log("error_________________" + error);
  18683. }
  18684. }
  18685. let _task = tArray
  18686. if(!_task.elist){
  18687. console.log("error_________________JSON不对重新生成");
  18688. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18689. _this.aiGet322(messages, index)
  18690. return;
  18691. }
  18692. _task.elist = _task.elist.filter(el=>{
  18693. el.isai = "1"
  18694. return el
  18695. })
  18696. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  18697. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18698. _this.$forceUpdate();
  18699. }
  18700. // callback ? callback() : ''
  18701. _this.taskGLoading[index][2] = false
  18702. })
  18703. .catch((error) => {
  18704. // _this.loading = false
  18705. _this.taskGLoading[index][2] = false
  18706. console.log(error);
  18707. });
  18708. },
  18709. async aiCreateQuestion(type, task) {
  18710. let _this = this
  18711. return new Promise((resolve, reject) => {
  18712. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18713. if (_this.infoData.length) {
  18714. for (var i = 0; i < _this.infoData.length; i++) {
  18715. if(_this.infoData[i].fileid){
  18716. fileid.push(_this.infoData[i].fileid)
  18717. }
  18718. }
  18719. }
  18720. let sub = []
  18721. let mclass = []
  18722. if (this.courseTypeId.length) {
  18723. for (var i = 0; i < this.courseTypeId.length; i++) {
  18724. let _sid = this.courseTypeId[i]
  18725. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18726. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18727. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18728. }
  18729. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18730. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18731. }
  18732. }
  18733. }
  18734. }
  18735. let messages = ""
  18736. if(type == 15){
  18737. messages = `NOTICE
  18738. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18739. Language: ${this.getLang()}
  18740. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18741. Instruction: Based on the context, follow "Format example", write content.
  18742. # Context
  18743. ## 任务
  18744. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  18745. ## 限制
  18746. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18747. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18748. ## 课程简介
  18749. 课程名字:${_this.courseName}
  18750. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18751. ${sub.length ? '学科:' + sub.join(",") : ''}
  18752. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18753. ## 教案
  18754. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18755. # Format example
  18756. {answerQ:"问题"}
  18757. `
  18758. }else if(type == 45){
  18759. messages = `NOTICE
  18760. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18761. Language: ${this.getLang()}
  18762. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18763. Instruction: Based on the context, follow "Format example", write content.
  18764. # Context
  18765. ## 任务
  18766. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  18767. ## 限制
  18768. - 生成题目禁止重复。
  18769. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18770. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  18771. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18772. ## 课程简介
  18773. 课程名字:${_this.courseName}
  18774. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18775. ${sub.length ? '学科:' + sub.join(",") : ''}
  18776. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18777. ## 教案
  18778. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18779. # Format example
  18780. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  18781. `
  18782. }
  18783. let parm = {
  18784. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18785. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18786. session_name: uuidv4(),
  18787. userId: this.userid,
  18788. file_ids: fileid.length ? [...fileid] : '',
  18789. model: 'gpt-4o-2024-08-06',
  18790. temperature: 0.1,
  18791. }
  18792. this.ajax
  18793. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18794. .then((response) => {
  18795. console.log(response);
  18796. let data = response.data.FunctionResponse
  18797. if (data.message) {
  18798. console.log(data.message);
  18799. try {
  18800. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18801. let tArray = {}
  18802. try {
  18803. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18804. } catch (error) {
  18805. console.log("error_________________" + error);
  18806. try {
  18807. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18808. let match = data.message.match(regex);
  18809. tArray = JSON.parse(match[0]);
  18810. // var message = data.message;
  18811. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18812. // var jsonEnd = message.indexOf("```", jsonStart);
  18813. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18814. // tArray = JSON.parse(jsonString);
  18815. } catch (error) {
  18816. try {
  18817. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18818. let match = data.message.match(regex);
  18819. // eval("var aaa = " + match[0])
  18820. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18821. } catch (error) {
  18822. console.log("error_________________" + error);
  18823. }
  18824. console.log("error_________________" + error);
  18825. }
  18826. }
  18827. resolve(tArray)
  18828. } catch (error) {
  18829. if(type == 15){
  18830. resolve({answerQ: "题目"})
  18831. }else if(type == 45){
  18832. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  18833. }
  18834. }
  18835. }else if(type == 15){
  18836. resolve({answerQ: "题目"})
  18837. }else if(type == 45){
  18838. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  18839. }
  18840. })
  18841. .catch((error) => {
  18842. if(type == 15){
  18843. resolve({answerQ: "题目"})
  18844. }else if(type == 45){
  18845. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  18846. }
  18847. console.log(error);
  18848. });
  18849. });
  18850. },
  18851. async aiChoice(type){
  18852. if(type == 45){
  18853. this.choiceLoading = true
  18854. }
  18855. let _this = this
  18856. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18857. if (_this.infoData.length) {
  18858. for (var i = 0; i < _this.infoData.length; i++) {
  18859. if(_this.infoData[i].fileid){
  18860. fileid.push(_this.infoData[i].fileid)
  18861. }
  18862. }
  18863. }
  18864. if (_this.xuanzeInfoData.length) {
  18865. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  18866. if(_this.xuanzeInfoData[i].fileid){
  18867. fileid.push(_this.xuanzeInfoData[i].fileid)
  18868. }
  18869. }
  18870. }
  18871. let sub = []
  18872. let mclass = []
  18873. if (this.courseTypeId.length) {
  18874. for (var i = 0; i < this.courseTypeId.length; i++) {
  18875. let _sid = this.courseTypeId[i]
  18876. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  18877. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  18878. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  18879. }
  18880. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  18881. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  18882. }
  18883. }
  18884. }
  18885. }
  18886. let messages = ""
  18887. if(type == 15){
  18888. messages = `NOTICE
  18889. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18890. Language: ${this.getLang()}
  18891. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18892. Instruction: Based on the context, follow "Format example", write content.
  18893. # Context
  18894. ## 任务
  18895. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  18896. ## 限制
  18897. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18898. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18899. ## 课程简介
  18900. 课程名字:${_this.courseName}
  18901. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18902. ${sub.length ? '学科:' + sub.join(",") : ''}
  18903. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18904. ## 教案
  18905. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18906. # Format example
  18907. {answerQ:"问题"}
  18908. `
  18909. }else if(type == 45){
  18910. messages = `NOTICE
  18911. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  18912. Language: ${this.getLang()}
  18913. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  18914. Instruction: Based on the context, follow "Format example", write content.
  18915. # Context
  18916. ## 任务
  18917. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  18918. ## 限制
  18919. - 生成题目禁止重复。
  18920. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  18921. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  18922. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  18923. ## 课程简介
  18924. 课程名字:${_this.courseName}
  18925. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  18926. ${sub.length ? '学科:' + sub.join(",") : ''}
  18927. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  18928. ## 教案
  18929. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  18930. # Format example
  18931. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  18932. `
  18933. }
  18934. let parm = {
  18935. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18936. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18937. session_name: uuidv4(),
  18938. userId: this.userid,
  18939. file_ids: fileid.length ? [...fileid] : '',
  18940. model: 'gpt-4o-2024-08-06',
  18941. temperature: 0.1,
  18942. }
  18943. this.ajax
  18944. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18945. .then((response) => {
  18946. console.log(response);
  18947. let data = response.data.FunctionResponse
  18948. if (data.message) {
  18949. console.log(data.message);
  18950. try {
  18951. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18952. let tArray = {}
  18953. try {
  18954. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18955. } catch (error) {
  18956. console.log("error_________________" + error);
  18957. try {
  18958. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18959. let match = data.message.match(regex);
  18960. tArray = JSON.parse(match[0]);
  18961. // var message = data.message;
  18962. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18963. // var jsonEnd = message.indexOf("```", jsonStart);
  18964. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18965. // tArray = JSON.parse(jsonString);
  18966. } catch (error) {
  18967. try {
  18968. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18969. let match = data.message.match(regex);
  18970. // eval("var aaa = " + match[0])
  18971. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18972. } catch (error) {
  18973. console.log("error_________________" + error);
  18974. }
  18975. console.log("error_________________" + error);
  18976. }
  18977. }
  18978. if(type == 45){
  18979. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  18980. }
  18981. } catch (error) {
  18982. if(type == 15){
  18983. {answerQ: "题目"}
  18984. }else if(type == 45){
  18985. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18986. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18987. }
  18988. _this.choiceLoading = false
  18989. }
  18990. }else if(type == 15){
  18991. {answerQ: "题目"}
  18992. }else if(type == 45){
  18993. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  18994. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  18995. }
  18996. _this.choiceLoading = false
  18997. }).catch((error) => {
  18998. if(type == 15){
  18999. {answerQ: "题目"}
  19000. }else if(type == 45){
  19001. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  19002. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  19003. }
  19004. console.log(error);
  19005. _this.choiceLoading = false
  19006. });
  19007. },
  19008. async aiGet4(messages, callback, clickType) {
  19009. let _this = this
  19010. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19011. if (_this.infoData.length) {
  19012. for (var i = 0; i < _this.infoData.length; i++) {
  19013. if(_this.infoData[i].fileid){
  19014. fileid.push(_this.infoData[i].fileid)
  19015. }else {
  19016. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19017. if(_fileid){
  19018. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19019. _this.$forceUpdate();
  19020. if(_fileid != 1){
  19021. fileid.push(_fileid)
  19022. }
  19023. }
  19024. }
  19025. }
  19026. }
  19027. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19028. if(_this.cankaoInfoData[i].fileid){
  19029. fileid.push(_this.cankaoInfoData[i].fileid)
  19030. }else {
  19031. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19032. if(_fileid){
  19033. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19034. _this.$forceUpdate();
  19035. if(_fileid != 1){
  19036. fileid.push(_fileid)
  19037. }
  19038. }
  19039. }
  19040. }
  19041. // let params = JSON.stringify({
  19042. // // "model": "Chat",
  19043. // model: 'gpt-3.5-turbo',
  19044. // temperature: 0.1,
  19045. // max_tokens: 4096,
  19046. // top_p: 1,
  19047. // frequency_penalty: 0,
  19048. // presence_penalty: 0,
  19049. // messages: [{
  19050. // content: messages,
  19051. // role: 'user'
  19052. // }],
  19053. // stream: false,
  19054. // uid: this.userid,
  19055. // mind_map_question: "",
  19056. // })
  19057. // // let params = JSON.stringify({
  19058. // // message: {
  19059. // // anthropic_version: "bedrock-2023-05-31",
  19060. // // max_tokens: 4096,
  19061. // // temperature: 0.1,
  19062. // // top_p: 1,
  19063. // // messages: [{
  19064. // // content: messages,
  19065. // // role: 'user'
  19066. // // }], //
  19067. // // },
  19068. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19069. // // });
  19070. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19071. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19072. // console.log(response);
  19073. // let data = response.data.FunctionResponse
  19074. // if (data.choices && data.choices.length && data.choices[0].message) {
  19075. // console.log(data.choices[0].message.content);
  19076. // let dArray = JSON.parse(data.choices[0].message.content)
  19077. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  19078. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  19079. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19080. // for (var i = 0; i < dArray.length; i++) {
  19081. // let _task = dArray[i]
  19082. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19083. // task: _task.task,
  19084. // taskDetail: "",
  19085. // taskDetail2: "",
  19086. // taskDetail3: _task.detail,
  19087. // chapterData: [],
  19088. // toolText: "",
  19089. // toolChoose: [
  19090. // {
  19091. // tool: [],
  19092. // toolDetail: "",
  19093. // toolType: 0,
  19094. // askCount: 1,
  19095. // askTitle: "",
  19096. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19097. // },
  19098. // ],
  19099. // isShowTools: false,
  19100. // askCount: 1,
  19101. // isFold: 0,
  19102. // askTitle: "",
  19103. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19104. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19105. // homeworkList: [],
  19106. // })
  19107. // }
  19108. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19109. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19110. // _this.$forceUpdate();
  19111. // } else {
  19112. // for (var i = 0; i < dArray.length; i++) {
  19113. // let _task = dArray[i]
  19114. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19115. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19116. // }else {
  19117. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  19118. // task: _task.task,
  19119. // taskDetail: "",
  19120. // taskDetail2: "",
  19121. // taskDetail3: _task.detail,
  19122. // chapterData: [],
  19123. // toolText: "",
  19124. // toolChoose: [
  19125. // {
  19126. // tool: [],
  19127. // toolDetail: "",
  19128. // toolType: 0,
  19129. // askCount: 1,
  19130. // askTitle: "",
  19131. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19132. // },
  19133. // ],
  19134. // isShowTools: false,
  19135. // askCount: 1,
  19136. // isFold: 0,
  19137. // askTitle: "",
  19138. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19139. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19140. // homeworkList: [],
  19141. // }
  19142. // }
  19143. // }
  19144. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19145. // _this.$forceUpdate();
  19146. // }
  19147. // }
  19148. // // if (data.result) {
  19149. // // console.log(data.result);
  19150. // // let dArray = JSON.parse(data.result)
  19151. // // _this.teacherText = JSON.parse(data.result)
  19152. // // for (var i = 0; i < dArray.length; i++) {
  19153. // // let _task = dArray[i]
  19154. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19155. // // }
  19156. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19157. // // _this.$forceUpdate();
  19158. // // }
  19159. // callback ? callback() : ''
  19160. // _this.loading = false
  19161. // }).catch(function (error) {
  19162. // _this.loading = false
  19163. // console.log(error);
  19164. // });
  19165. let parm = {
  19166. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19167. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19168. session_name: uuidv4(),
  19169. userId: this.userid,
  19170. file_ids: fileid.length ? [...fileid] : '',
  19171. model: 'gpt-4o-2024-08-06',
  19172. temperature: 0.1,
  19173. }
  19174. this.ajax
  19175. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19176. .then((response) => {
  19177. console.log(response);
  19178. let data = response.data.FunctionResponse
  19179. if (data.message) {
  19180. console.log(data.message);
  19181. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19182. let dArray = []
  19183. try {
  19184. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19185. } catch (error) {
  19186. console.log("error_________________" + error);
  19187. try {
  19188. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19189. let match = data.message.match(regex);
  19190. dArray = JSON.parse(match[0]);
  19191. // var message = data.message;
  19192. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19193. // var jsonEnd = message.indexOf("```", jsonStart);
  19194. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19195. // dArray = JSON.parse(jsonString);
  19196. } catch (error) {
  19197. _this.aiGet4(messages, callback)
  19198. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19199. console.log("error_________________" + error);
  19200. return;
  19201. console.log("error_________________" + error);
  19202. _this.loading = false
  19203. }
  19204. }
  19205. try {
  19206. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  19207. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  19208. if(_this.panTeacher() > 0){
  19209. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19210. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19211. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  19212. }
  19213. for (var i = 0; i < dArray.length; i++) {
  19214. let _task = dArray[i]
  19215. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19216. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  19217. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19218. }else {
  19219. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19220. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19221. taskDetail: "",
  19222. taskDetail2: "",
  19223. taskDetail3: _task.detail,
  19224. chapterData: [],
  19225. toolText: "",
  19226. toolChoose: [
  19227. {
  19228. tool: [],
  19229. toolDetail: "",
  19230. toolType: 0,
  19231. askCount: 1,
  19232. askTitle: "",
  19233. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19234. },
  19235. ],
  19236. isShowTools: false,
  19237. askCount: 1,
  19238. isFold: 0,
  19239. askTitle: "",
  19240. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19241. checkJson: [{ checkCount: [], checkPerent: [] }],
  19242. homeworkList: [],
  19243. })
  19244. }
  19245. }
  19246. }else {
  19247. _this.unitJson[0].chapterInfo[0].taskJson = []
  19248. for (var i = 0; i < dArray.length; i++) {
  19249. let _task = dArray[i]
  19250. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19251. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19252. taskDetail: "",
  19253. taskDetail2: "",
  19254. taskDetail3: _task.detail,
  19255. chapterData: [],
  19256. toolText: "",
  19257. toolChoose: [
  19258. {
  19259. tool: [],
  19260. toolDetail: "",
  19261. toolType: 0,
  19262. askCount: 1,
  19263. askTitle: "",
  19264. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19265. },
  19266. ],
  19267. isShowTools: false,
  19268. askCount: 1,
  19269. isFold: 0,
  19270. askTitle: "",
  19271. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19272. checkJson: [{ checkCount: [], checkPerent: [] }],
  19273. homeworkList: [],
  19274. })
  19275. }
  19276. }
  19277. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19278. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19279. _this.$forceUpdate();
  19280. } else {
  19281. for (var i = 0; i < dArray.length; i++) {
  19282. let _task = dArray[i]
  19283. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19284. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19285. }else {
  19286. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  19287. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19288. taskDetail: "",
  19289. taskDetail2: "",
  19290. taskDetail3: _task.detail,
  19291. chapterData: [],
  19292. toolText: "",
  19293. toolChoose: [
  19294. {
  19295. tool: [],
  19296. toolDetail: "",
  19297. toolType: 0,
  19298. askCount: 1,
  19299. askTitle: "",
  19300. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19301. },
  19302. ],
  19303. isShowTools: false,
  19304. askCount: 1,
  19305. isFold: 0,
  19306. askTitle: "",
  19307. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19308. checkJson: [{ checkCount: [], checkPerent: [] }],
  19309. homeworkList: [],
  19310. }
  19311. }
  19312. }
  19313. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19314. _this.$forceUpdate();
  19315. }
  19316. } catch (error) {
  19317. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19318. _this.aiGet4(messages, callback)
  19319. console.log("error_________________" + error);
  19320. return;
  19321. // _this.loading = false
  19322. }
  19323. }
  19324. callback ? callback() : ''
  19325. })
  19326. .catch((error) => {
  19327. _this.loading = false
  19328. console.log(error);
  19329. });
  19330. },
  19331. async aiDetail(msg, index) {
  19332. let _this = this
  19333. const _tindex = 'task-' + index
  19334. const _tindex2 = index
  19335. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19336. if (_this.infoData.length) {
  19337. for (var i = 0; i < _this.infoData.length; i++) {
  19338. if(_this.infoData[i].fileid){
  19339. fileid.push(_this.infoData[i].fileid)
  19340. }else {
  19341. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19342. if(_fileid){
  19343. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19344. _this.$forceUpdate();
  19345. if(_fileid != 1){
  19346. fileid.push(_fileid)
  19347. }
  19348. }
  19349. }
  19350. }
  19351. }
  19352. let url = []
  19353. if (this.infoData.length) {
  19354. for (var i = 0; i < this.infoData.length; i++) {
  19355. url.push(this.infoData[i].url)
  19356. }
  19357. }
  19358. let messages = `NOTICE
  19359. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19360. Language: ${this.getLang()}
  19361. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19362. Instruction: Based on the context, follow "Format example", write content.
  19363. #Context
  19364. ## 要求
  19365. ${msg}
  19366. ## 参考信息
  19367. 任务名称:${_this.aiCallBack.task}
  19368. ## 优化内容
  19369. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  19370. // -------- #补充参考资料和
  19371. // ## 补充参考资料
  19372. // - 补充资料:${url.join(",")}
  19373. // - 补充描述:${_this.courseText2}
  19374. _this.taskDetailLoading.push(_tindex)
  19375. _this.ttaskDetailLoading.push(_tindex)
  19376. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19377. let _uuid = uuidv4();
  19378. // let params = JSON.stringify({
  19379. // // "model": "Chat",
  19380. // model: 'gpt-3.5-turbo',
  19381. // temperature: 0.1,
  19382. // max_tokens: 4096,
  19383. // top_p: 1,
  19384. // frequency_penalty: 0,
  19385. // presence_penalty: 0,
  19386. // messages: [{
  19387. // content: messages,
  19388. // role: 'user'
  19389. // }],
  19390. // uid: _uuid,
  19391. // mind_map_question: "",
  19392. // })
  19393. let params = {
  19394. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19395. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  19396. session_name: _uuid,
  19397. userId: _this.userid,
  19398. uid: _uuid,
  19399. file_ids: fileid.length ? [...fileid] : '',
  19400. model: 'gpt-4o-2024-08-06',
  19401. temperature: 0.1,
  19402. }
  19403. // let params = JSON.stringify({
  19404. // message: {
  19405. // anthropic_version: "bedrock-2023-05-31",
  19406. // max_tokens: 4096,
  19407. // temperature: 0.1,
  19408. // top_p: 1,
  19409. // messages: [{
  19410. // "role": "user",
  19411. // "content": messages
  19412. // }] ,
  19413. // },
  19414. // uid: _uuid,
  19415. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19416. // });
  19417. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19418. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19419. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19420. console.log(response);
  19421. // let data = response.data.FunctionResponse
  19422. // if (data.choices && data.choices.length && data.choices[0].message) {
  19423. // console.log(data.choices[0].message.content);
  19424. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19425. // _this.$forceUpdate()
  19426. // }
  19427. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19428. } else {
  19429. _this.$message.warning(response.data.FunctionResponse.result);
  19430. }
  19431. _this.isOutlineTaskCancelToken[index] = null
  19432. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19433. }).catch(function (error) {
  19434. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19435. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  19436. _this.isOutlineTaskCancelToken[index] = null
  19437. if(error && error.message != 'Request canceled by the user.'){
  19438. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19439. }
  19440. console.log(error);
  19441. });
  19442. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  19443. },
  19444. aiDetailgetAiContent(_uid, loading, _tindex2) {
  19445. try {
  19446. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19447. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19448. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19449. } catch(error){
  19450. console.log('EventSource error:', error);
  19451. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19452. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19453. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19454. this.isOutlineTaskCancelToken[_tindex2] = null
  19455. return;
  19456. }
  19457. let _allText = "";
  19458. let _mdText = "";
  19459. let _iindex = 0
  19460. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  19461. let _eData = JSON.parse(_e.data).content;
  19462. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19463. //对话已经完成
  19464. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19465. this.isOutlineTaskCancelSource[_tindex2].close();
  19466. this.isOutlineTaskCancelSource[_tindex2] = null;
  19467. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19468. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19469. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19470. this.isOutlineTaskCancelToken[_tindex2] = null
  19471. return;
  19472. } else {
  19473. _iindex++
  19474. //对话还在继续
  19475. let _text = "";
  19476. _text = _eData.replaceAll("'", "");
  19477. if (_allText == "") {
  19478. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19479. } else {
  19480. _allText += _text;
  19481. }
  19482. _mdText = _allText + "_";
  19483. _mdText = _mdText.replace(/\\n/g, "\n");
  19484. _mdText = _mdText.replace(/\\/g, "");
  19485. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19486. //转化返回的回复流数据.
  19487. if(_iindex == 10){
  19488. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19489. _iindex = 0
  19490. }
  19491. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19492. // 处理流数据
  19493. }
  19494. // this.$forceUpdate();
  19495. };
  19496. let _this = _this
  19497. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  19498. // 处理错误,可以尝试重新连接
  19499. console.log('EventSource error:', event);
  19500. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19501. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  19502. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  19503. _this.isOutlineTaskCancelToken[_tindex2] = null
  19504. _this.isOutlineTaskCancelSource[_tindex2].close();
  19505. _this.isOutlineTaskCancelSource[_tindex2] = null;
  19506. };
  19507. },
  19508. async aiOutlineDetail(msg, index) {
  19509. let _this = this
  19510. const _tindex = 'task-' + index
  19511. const _tindex2 = index
  19512. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19513. if (_this.infoData.length) {
  19514. for (var i = 0; i < _this.infoData.length; i++) {
  19515. if(_this.infoData[i].fileid){
  19516. fileid.push(_this.infoData[i].fileid)
  19517. }else {
  19518. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19519. if(_fileid){
  19520. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19521. _this.$forceUpdate();
  19522. if(_fileid != 1){
  19523. fileid.push(_fileid)
  19524. }
  19525. }
  19526. }
  19527. }
  19528. }
  19529. let url = []
  19530. if (this.infoData.length) {
  19531. for (var i = 0; i < this.infoData.length; i++) {
  19532. url.push(this.infoData[i].url)
  19533. }
  19534. }
  19535. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  19536. let messages = `NOTICE
  19537. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  19538. Language: ${this.getLang()}
  19539. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19540. Instruction: Based on the context, follow "Format example", write content.
  19541. #Context
  19542. ## 要求
  19543. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  19544. ## 参考信息
  19545. 课程名字:${_this.courseName}
  19546. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19547. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19548. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19549. # Format example
  19550. 子任务名称:名称应该总结了该任务是在做什么,
  19551. 子任务设计:任务设计。
  19552. 子教学目标:教学目标。
  19553. 学生过程性成果:学生过程性成果。
  19554. 评价标准:评价标准。
  19555. `
  19556. // 教学目标:教学目标。
  19557. // 任务设计:任务设计。
  19558. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  19559. // -------- #补充参考资料和
  19560. // ## 补充参考资料
  19561. // - 补充资料:${url.join(",")}
  19562. // - 补充描述:${_this.courseText2}
  19563. _this.taskDetailLoading.push(_tindex)
  19564. _this.ttaskDetailLoading.push(_tindex)
  19565. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19566. let _uuid = uuidv4();
  19567. // let params = JSON.stringify({
  19568. // // "model": "Chat",
  19569. // model: 'gpt-3.5-turbo',
  19570. // temperature: 0.1,
  19571. // max_tokens: 4096,
  19572. // top_p: 1,
  19573. // frequency_penalty: 0,
  19574. // presence_penalty: 0,
  19575. // messages: [{
  19576. // content: messages,
  19577. // role: 'user'
  19578. // }],
  19579. // uid: _uuid,
  19580. // mind_map_question: "",
  19581. // })
  19582. let params = {
  19583. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19584. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19585. session_name: _uuid,
  19586. userId: _this.userid,
  19587. uid: _uuid,
  19588. file_ids: fileid.length ? [...fileid] : '',
  19589. model: 'gpt-4o-2024-08-06',
  19590. temperature: 0.1,
  19591. }
  19592. // let params = JSON.stringify({
  19593. // message: {
  19594. // anthropic_version: "bedrock-2023-05-31",
  19595. // max_tokens: 4096,
  19596. // temperature: 0.1,
  19597. // top_p: 1,
  19598. // messages: [{
  19599. // "role": "user",
  19600. // "content": messages
  19601. // }] ,
  19602. // },
  19603. // uid: _uuid,
  19604. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19605. // });
  19606. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19607. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19608. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19609. console.log(response);
  19610. // let data = response.data.FunctionResponse
  19611. // if (data.choices && data.choices.length && data.choices[0].message) {
  19612. // console.log(data.choices[0].message.content);
  19613. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19614. // _this.$forceUpdate()
  19615. // }
  19616. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19617. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  19618. } else {
  19619. _this.$message.warning(response.data.FunctionResponse.result);
  19620. }
  19621. _this.isOutlineTaskCancelToken[index] = null
  19622. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19623. }).catch(function (error) {
  19624. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19625. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  19626. _this.isOutlineTaskCancelToken[index] = null
  19627. if(error && error.message != 'Request canceled by the user.'){
  19628. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19629. }
  19630. console.log(error);
  19631. });
  19632. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  19633. },
  19634. async aiOutlineDetail2(msg, index) {
  19635. let _this = this
  19636. const _tindex = 'task-' + index
  19637. const _tindex2 = index
  19638. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19639. if (_this.infoData.length) {
  19640. for (var i = 0; i < _this.infoData.length; i++) {
  19641. if(_this.infoData[i].fileid){
  19642. fileid.push(_this.infoData[i].fileid)
  19643. }else {
  19644. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19645. if(_fileid){
  19646. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19647. _this.$forceUpdate();
  19648. if(_fileid != 1){
  19649. fileid.push(_fileid)
  19650. }
  19651. }
  19652. }
  19653. }
  19654. }
  19655. let url = []
  19656. if (this.infoData.length) {
  19657. for (var i = 0; i < this.infoData.length; i++) {
  19658. url.push(this.infoData[i].url)
  19659. }
  19660. }
  19661. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  19662. let taskArray = []
  19663. let taskArrayD = []
  19664. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  19665. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  19666. if(k != index){
  19667. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  19668. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  19669. }
  19670. }
  19671. let messages = `NOTICE
  19672. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  19673. Language: ${this.getLang()}
  19674. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19675. Instruction: Based on the context, follow "Format example", write content.
  19676. #Context
  19677. ## 要求
  19678. ${msg}
  19679. ## 参考信息
  19680. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  19681. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19682. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  19683. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  19684. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  19685. # Format example
  19686. **子任务标题**:环节+子任务名称
  19687. **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  19688. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  19689. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  19690. `
  19691. // 教学目标:教学目标。
  19692. // 任务设计:任务设计。
  19693. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  19694. // -------- #补充参考资料和
  19695. // ## 补充参考资料
  19696. // - 补充资料:${url.join(",")}
  19697. // - 补充描述:${_this.courseText2}
  19698. _this.taskDetailLoading.push(_tindex)
  19699. _this.ttaskDetailLoading.push(_tindex)
  19700. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19701. let _uuid = uuidv4();
  19702. // let params = JSON.stringify({
  19703. // // "model": "Chat",
  19704. // model: 'gpt-3.5-turbo',
  19705. // temperature: 0.1,
  19706. // max_tokens: 4096,
  19707. // top_p: 1,
  19708. // frequency_penalty: 0,
  19709. // presence_penalty: 0,
  19710. // messages: [{
  19711. // content: messages,
  19712. // role: 'user'
  19713. // }],
  19714. // uid: _uuid,
  19715. // mind_map_question: "",
  19716. // })
  19717. let params = {
  19718. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19719. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  19720. session_name: _uuid,
  19721. userId: _this.userid,
  19722. uid: _uuid,
  19723. file_ids: fileid.length ? [...fileid] : '',
  19724. model: 'gpt-4o-2024-08-06',
  19725. temperature: 0.1,
  19726. }
  19727. // let params = JSON.stringify({
  19728. // message: {
  19729. // anthropic_version: "bedrock-2023-05-31",
  19730. // max_tokens: 4096,
  19731. // temperature: 0.1,
  19732. // top_p: 1,
  19733. // messages: [{
  19734. // "role": "user",
  19735. // "content": messages
  19736. // }] ,
  19737. // },
  19738. // uid: _uuid,
  19739. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19740. // });
  19741. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19742. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  19743. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19744. console.log(response);
  19745. // let data = response.data.FunctionResponse
  19746. // if (data.choices && data.choices.length && data.choices[0].message) {
  19747. // console.log(data.choices[0].message.content);
  19748. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19749. // _this.$forceUpdate()
  19750. // }
  19751. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19752. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  19753. } else {
  19754. _this.$message.warning(response.data.FunctionResponse.result);
  19755. }
  19756. _this.isOutlineTaskCancelToken[index] = null
  19757. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19758. }).catch(function (error) {
  19759. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19760. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  19761. _this.isOutlineTaskCancelToken[index] = null
  19762. if(error && error.message != 'Request canceled by the user.'){
  19763. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19764. }
  19765. console.log(error);
  19766. });
  19767. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  19768. },
  19769. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  19770. try {
  19771. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19772. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19773. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19774. } catch(error) {
  19775. console.log('EventSource error:', error);
  19776. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19777. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19778. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19779. this.isOutlineTaskCancelToken[_tindex2] = null
  19780. return;
  19781. }
  19782. let _allText = "";
  19783. let _mdText = "";
  19784. let _iindex = 0
  19785. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  19786. let _eData = JSON.parse(_e.data).content;
  19787. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19788. //对话已经完成
  19789. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19790. this.isOutlineTaskCancelSource[_tindex2].close();
  19791. this.isOutlineTaskCancelSource[_tindex2] = null;
  19792. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19793. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  19794. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  19795. }
  19796. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19797. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  19798. this.isOutlineTaskCancelToken[_tindex2] = null
  19799. return;
  19800. } else {
  19801. _iindex++
  19802. //对话还在继续
  19803. let _text = "";
  19804. _text = _eData.replaceAll("'", "");
  19805. if (_allText == "") {
  19806. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19807. } else {
  19808. _allText += _text;
  19809. }
  19810. _mdText = _allText + "_";
  19811. _mdText = _mdText.replace(/\\n/g, "\n");
  19812. _mdText = _mdText.replace(/\\/g, "");
  19813. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19814. //转化返回的回复流数据.
  19815. if(_iindex == 10){
  19816. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  19817. _iindex = 0
  19818. }
  19819. if(this.taskDetailLoading.indexOf(loading) !== -1){
  19820. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  19821. }
  19822. // 处理流数据
  19823. }
  19824. // this.$forceUpdate();
  19825. };
  19826. let _this = this
  19827. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  19828. // 处理错误,可以尝试重新连接
  19829. console.log('EventSource error:', event);
  19830. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19831. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  19832. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  19833. _this.isOutlineTaskCancelToken[_tindex2] = null
  19834. _this.isOutlineTaskCancelSource[_tindex2].close();
  19835. _this.isOutlineTaskCancelSource[_tindex2] = null;
  19836. };
  19837. },
  19838. async aiDetail2(msg, index) {
  19839. let _this = this
  19840. const _tindex = 'task-' + index
  19841. const _tindex2 = index
  19842. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19843. if (_this.infoData.length) {
  19844. for (var i = 0; i < _this.infoData.length; i++) {
  19845. if(_this.infoData[i].fileid){
  19846. fileid.push(_this.infoData[i].fileid)
  19847. }else {
  19848. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19849. if(_fileid){
  19850. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19851. _this.$forceUpdate();
  19852. if(_fileid != 1){
  19853. fileid.push(_fileid)
  19854. }
  19855. }
  19856. }
  19857. }
  19858. }
  19859. let messages = `NOTICE
  19860. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  19861. Language: ${this.getLang()}
  19862. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19863. Instruction: Based on the context, follow "Format example", write content.
  19864. #Context
  19865. ## 要求
  19866. ${msg}
  19867. ## 参考资料
  19868. 任务名字: ${_this.aiCallBack.task}
  19869. ## 优化信息
  19870. ${_this.aiCallBack.taskDetail}
  19871. # Format example
  19872. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  19873. _this.taskDetailLoading2.push(_tindex)
  19874. _this.ttaskDetailLoading2.push(_tindex)
  19875. let _uuid = uuidv4();
  19876. // let params = JSON.stringify({
  19877. // // "model": "Chat",
  19878. // model: 'gpt-3.5-turbo',
  19879. // temperature: 0.1,
  19880. // max_tokens: 4096,
  19881. // top_p: 1,
  19882. // frequency_penalty: 0,
  19883. // presence_penalty: 0,
  19884. // messages: [{
  19885. // content: messages,
  19886. // role: 'user'
  19887. // }],
  19888. // uid: _uuid,
  19889. // mind_map_question: "",
  19890. // })
  19891. let params = {
  19892. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19893. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  19894. session_name: _uuid,
  19895. userId: _this.userid,
  19896. uid: _uuid,
  19897. file_ids: fileid.length ? [...fileid] : '',
  19898. model: 'gpt-4o-2024-08-06',
  19899. temperature: 0.1,
  19900. }
  19901. // let params = JSON.stringify({
  19902. // message: {
  19903. // anthropic_version: "bedrock-2023-05-31",
  19904. // max_tokens: 4096,
  19905. // temperature: 0.1,
  19906. // top_p: 1,
  19907. // messages: [{
  19908. // "role": "user",
  19909. // "content": messages
  19910. // }] ,
  19911. // },
  19912. // uid: _uuid,
  19913. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19914. // });
  19915. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19916. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  19917. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19918. console.log(response);
  19919. // let data = response.data.FunctionResponse
  19920. // if (data.choices && data.choices.length && data.choices[0].message) {
  19921. // console.log(data.choices[0].message.content);
  19922. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  19923. // _this.$forceUpdate()
  19924. // }
  19925. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  19926. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  19927. } else {
  19928. _this.$message.warning(response.data.FunctionResponse.result);
  19929. }
  19930. }).catch(function (error) {
  19931. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  19932. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  19933. if(error && error.message != 'Request canceled by the user.'){
  19934. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19935. }
  19936. console.log(error);
  19937. });
  19938. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  19939. },
  19940. aiDetail2getAiContent(_uid, loading, _tindex2) {
  19941. let _source;
  19942. try {
  19943. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19944. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19945. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  19946. } catch(error) {
  19947. console.log('EventSource error:', error);
  19948. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19949. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  19950. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  19951. return;
  19952. }
  19953. let _allText = "";
  19954. let _mdText = "";
  19955. let _iindex = 0
  19956. _source.onmessage = _e => {
  19957. let _eData = JSON.parse(_e.data).content;
  19958. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  19959. //对话已经完成
  19960. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  19961. _source.close();
  19962. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  19963. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  19964. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  19965. return;
  19966. } else {
  19967. _iindex++
  19968. //对话还在继续
  19969. let _text = "";
  19970. _text = _eData.replaceAll("'", "");
  19971. if (_allText == "") {
  19972. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  19973. } else {
  19974. _allText += _text;
  19975. }
  19976. _mdText = _allText + "_";
  19977. _mdText = _mdText.replace(/\\n/g, "\n");
  19978. _mdText = _mdText.replace(/\\/g, "");
  19979. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  19980. //转化返回的回复流数据
  19981. if(_iindex == 10){
  19982. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  19983. _iindex = 0
  19984. }
  19985. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  19986. // 处理流数据
  19987. }
  19988. // this.$forceUpdate();
  19989. };
  19990. let _this = this
  19991. _source.onerror = function(event) {
  19992. // 处理错误,可以尝试重新连接
  19993. console.log('EventSource error:', event);
  19994. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  19995. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  19996. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  19997. _source.close();
  19998. };
  19999. },
  20000. async aiDetail3(msg, index, tindex) {
  20001. let _this = this
  20002. const _tindex = 'task-' + index + tindex
  20003. const _tindex2 = index
  20004. const _tindex3 = tindex
  20005. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20006. if (_this.infoData.length) {
  20007. for (var i = 0; i < _this.infoData.length; i++) {
  20008. if(_this.infoData[i].fileid){
  20009. fileid.push(_this.infoData[i].fileid)
  20010. }else {
  20011. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20012. if(_fileid){
  20013. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20014. _this.$forceUpdate();
  20015. if(_fileid != 1){
  20016. fileid.push(_fileid)
  20017. }
  20018. }
  20019. }
  20020. }
  20021. }
  20022. // **重点考虑该任务及工具名和工具内容的情况下*
  20023. let messages = `NOTICE
  20024. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  20025. Language: ${this.getLang()}
  20026. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20027. Instruction: Based on the context, follow "Format example", write content.
  20028. #Context
  20029. ## 参考内容
  20030. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20031. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  20032. 工具名称:${_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 : '无'}
  20033. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  20034. ## 要求
  20035. ${msg} 输出格式和内容要求参考#格式与要求
  20036. # Format example
  20037. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  20038. _this.taskDetailLoading3.push(_tindex)
  20039. _this.ttaskDetailLoading3.push(_tindex)
  20040. let _uuid = uuidv4();
  20041. // let params = JSON.stringify({
  20042. // // "model": "Chat",
  20043. // model: 'gpt-3.5-turbo',
  20044. // temperature: 0.1,
  20045. // max_tokens: 4096,
  20046. // top_p: 1,
  20047. // frequency_penalty: 0,
  20048. // presence_penalty: 0,
  20049. // messages: [{
  20050. // content: messages,
  20051. // role: 'user'
  20052. // }],
  20053. // uid: _uuid,
  20054. // mind_map_question: "",
  20055. // })
  20056. let params = {
  20057. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20058. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20059. session_name: _uuid,
  20060. userId: _this.userid,
  20061. uid: _uuid,
  20062. file_ids: fileid.length ? [...fileid] : '',
  20063. model: 'gpt-4o-2024-08-06',
  20064. temperature: 0.1,
  20065. }
  20066. // let params = JSON.stringify({
  20067. // message: {
  20068. // anthropic_version: "bedrock-2023-05-31",
  20069. // max_tokens: 4096,
  20070. // temperature: 0.1,
  20071. // top_p: 1,
  20072. // messages: [{
  20073. // "role": "user",
  20074. // "content": messages
  20075. // }] ,
  20076. // },
  20077. // uid: _uuid,
  20078. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20079. // });
  20080. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20081. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20082. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20083. console.log(response);
  20084. let data = response.data.FunctionResponse
  20085. // if (data.choices && data.choices.length && data.choices[0].message) {
  20086. // console.log(data.choices[0].message.content);
  20087. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  20088. // _this.$forceUpdate()
  20089. // }
  20090. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  20091. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20092. } else {
  20093. _this.$message.warning(response.data.FunctionResponse.result);
  20094. }
  20095. }).catch(function (error) {
  20096. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  20097. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  20098. if(error && error.message != 'Request canceled by the user.'){
  20099. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20100. }
  20101. console.log(error);
  20102. });
  20103. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  20104. },
  20105. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  20106. let _source;
  20107. try {
  20108. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20109. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20110. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20111. } catch(error) {
  20112. console.log('EventSource error:', event);
  20113. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20114. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  20115. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  20116. return;
  20117. }
  20118. let _allText = "";
  20119. let _mdText = "";
  20120. let _iindex = 0
  20121. _source.onmessage = _e => {
  20122. let _eData = JSON.parse(_e.data).content;
  20123. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20124. //对话已经完成
  20125. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20126. _source.close();
  20127. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  20128. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  20129. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  20130. return;
  20131. } else {
  20132. _iindex++
  20133. //对话还在继续
  20134. let _text = "";
  20135. _text = _eData.replaceAll("'", "");
  20136. if (_allText == "") {
  20137. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20138. } else {
  20139. _allText += _text;
  20140. }
  20141. _mdText = _allText + "_";
  20142. _mdText = _mdText.replace(/\\n/g, "\n");
  20143. _mdText = _mdText.replace(/\\/g, "");
  20144. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20145. //转化返回的回复流数据
  20146. if(_iindex == 10){
  20147. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  20148. _iindex = 0
  20149. }
  20150. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  20151. // 处理流数据
  20152. }
  20153. // this.$forceUpdate();
  20154. };
  20155. let _this = this
  20156. _source.onerror = function(event) {
  20157. // 处理错误,可以尝试重新连接
  20158. console.log('EventSource error:', event);
  20159. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20160. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  20161. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  20162. _source.close();
  20163. };
  20164. },
  20165. async aiDetail4(msg, index) {
  20166. if (!msg.length) {
  20167. this.$message.error("请添加评价后才能优化")
  20168. return
  20169. }
  20170. let _this = this
  20171. const _tindex = 'task-' + index
  20172. const _tindex2 = index
  20173. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20174. if (_this.infoData.length) {
  20175. for (var i = 0; i < _this.infoData.length; i++) {
  20176. if(_this.infoData[i].fileid){
  20177. fileid.push(_this.infoData[i].fileid)
  20178. }else {
  20179. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20180. if(_fileid){
  20181. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20182. _this.$forceUpdate();
  20183. if(_fileid != 1){
  20184. fileid.push(_fileid)
  20185. }
  20186. }
  20187. }
  20188. }
  20189. }
  20190. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  20191. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  20192. if(_this.pingjiaInfoData[index][i].fileid){
  20193. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  20194. }
  20195. }
  20196. }
  20197. var _text = ""
  20198. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  20199. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  20200. // _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 : ''} `
  20201. _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 : ''} `
  20202. }
  20203. }
  20204. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  20205. // **重点考虑该任务详情**
  20206. // let messages = `
  20207. // Language: ${this.getLang()}
  20208. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20209. // #Context
  20210. // ## 参考内容
  20211. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20212. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  20213. // 评价设计:${_text}
  20214. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20215. // ## 要求
  20216. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  20217. // # 格式与要求
  20218. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  20219. // # Format example
  20220. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  20221. let messages = `
  20222. Language: ${this.getLang()}
  20223. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20224. #Context
  20225. ## 参考内容
  20226. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20227. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  20228. ${_text ? '评价设计:'+_text : ''}
  20229. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20230. ## 要求
  20231. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  20232. # 格式与要求
  20233. 核心素养:从教案中提取
  20234. 目标:从教案中提取
  20235. 评价标准:从教案中提取评价标准
  20236. # Format example
  20237. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  20238. _this.taskDetailLoading4.push(_tindex)
  20239. // let params = JSON.stringify({
  20240. // // "model": "Chat",
  20241. // model: 'gpt-3.5-turbo',
  20242. // temperature: 0.1,
  20243. // max_tokens: 4096,
  20244. // top_p: 1,
  20245. // frequency_penalty: 0,
  20246. // presence_penalty: 0,
  20247. // messages: [{
  20248. // content: messages,
  20249. // role: 'user'
  20250. // }],
  20251. // stream: false,
  20252. // uid: this.userid,
  20253. // mind_map_question: "",
  20254. // })
  20255. let params = {
  20256. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20257. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20258. session_name: uuidv4(),
  20259. userId: _this.userid,
  20260. file_ids: fileid.length ? [...fileid] : '',
  20261. model: 'gpt-4o-2024-08-06',
  20262. temperature: 0.1,
  20263. }
  20264. // let params = JSON.stringify({
  20265. // message: {
  20266. // anthropic_version: "bedrock-2023-05-31",
  20267. // max_tokens: 4096,
  20268. // temperature: 0.1,
  20269. // top_p: 1,
  20270. // messages: [{
  20271. // content: messages,
  20272. // role: 'user'
  20273. // }], //
  20274. // },
  20275. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20276. // });
  20277. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20278. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  20279. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20280. console.log(response);
  20281. let data = response.data.FunctionResponse
  20282. // if (data.choices && data.choices.length && data.choices[0].message) {
  20283. // console.log(data.choices[0].message.content);
  20284. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  20285. // _this.$forceUpdate()
  20286. // }
  20287. if (data.message) {
  20288. console.log(data.message);
  20289. try {
  20290. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  20291. } catch (e) {
  20292. console.log("error_________________" + e);
  20293. // _this.$message.error(data.message)
  20294. try {
  20295. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20296. let match = data.message.match(regex);
  20297. let elist = JSON.parse(match[0])
  20298. elist = elist.filter(el=>{
  20299. el.isai = 1
  20300. return el
  20301. })
  20302. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  20303. // var message = data.message;
  20304. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20305. // var jsonEnd = message.indexOf("```", jsonStart);
  20306. // if (jsonStart !== -1 && jsonEnd !== -1) {
  20307. // var jsonString = message
  20308. // .substring(jsonStart, jsonEnd)
  20309. // .trim();
  20310. // var _data2 = JSON.parse(jsonString);
  20311. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  20312. // }
  20313. } catch (error) {
  20314. }
  20315. }
  20316. _this.$forceUpdate()
  20317. }
  20318. // if (data.result) {
  20319. // console.log(data.result);
  20320. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  20321. // _this.$forceUpdate()
  20322. // }
  20323. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20324. }).catch(function (error) {
  20325. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20326. if(error && error.message != 'Request canceled by the user.'){
  20327. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20328. }
  20329. console.log(error);
  20330. });
  20331. },
  20332. async aiDetail5(msg, index) {
  20333. let _this = this
  20334. const _tindex = 'task-' + index
  20335. const _tindex2 = index
  20336. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20337. if (_this.infoData.length) {
  20338. for (var i = 0; i < _this.infoData.length; i++) {
  20339. if(_this.infoData[i].fileid){
  20340. fileid.push(_this.infoData[i].fileid)
  20341. }else {
  20342. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20343. if(_fileid){
  20344. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20345. _this.$forceUpdate();
  20346. if(_fileid != 1){
  20347. fileid.push(_fileid)
  20348. }
  20349. }
  20350. }
  20351. }
  20352. }
  20353. let url = []
  20354. if (this.infoData.length) {
  20355. for (var i = 0; i < this.infoData.length; i++) {
  20356. url.push(this.infoData[i].url)
  20357. }
  20358. }
  20359. var _text = ""
  20360. var _text2 = ""
  20361. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20362. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  20363. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  20364. }
  20365. let messages = `
  20366. Language: ${this.getLang()}
  20367. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20368. --------
  20369. ## 要求
  20370. ${msg}
  20371. -------
  20372. ## 本教案描述
  20373. ${_this.aiCallBack}
  20374. -------
  20375. ## 课程大纲
  20376. ${_text}
  20377. -------
  20378. ## 其他教学任务教案
  20379. ${_text2}`
  20380. // ## 补充参考资料
  20381. // - 补充资料:${url.join(",")}
  20382. // - 补充描述:${this.courseText2}
  20383. _this.taskDetailLoading5.push(_tindex)
  20384. _this.ttaskDetailLoading5.push(_tindex)
  20385. let _uuid = uuidv4();
  20386. // let params = JSON.stringify({
  20387. // // "model": "Chat",
  20388. // model: 'gpt-3.5-turbo',
  20389. // temperature: 0.1,
  20390. // max_tokens: 4096,
  20391. // top_p: 1,
  20392. // frequency_penalty: 0,
  20393. // presence_penalty: 0,
  20394. // messages: [{
  20395. // content: messages,
  20396. // role: 'user'
  20397. // }],
  20398. // uid: _uuid,
  20399. // mind_map_question: "",
  20400. // })
  20401. let params = {
  20402. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20403. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20404. session_name: _uuid,
  20405. userId: _this.userid,
  20406. uid: _uuid,
  20407. file_ids: fileid.length ? [...fileid] : '',
  20408. model: 'gpt-4o-2024-08-06',
  20409. temperature: 0.1,
  20410. }
  20411. // let params = JSON.stringify({
  20412. // message: {
  20413. // anthropic_version: "bedrock-2023-05-31",
  20414. // max_tokens: 4096,
  20415. // temperature: 0.1,
  20416. // top_p: 1,
  20417. // messages: [{
  20418. // "role": "user",
  20419. // "content": messages
  20420. // }] ,
  20421. // },
  20422. // uid: _uuid,
  20423. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20424. // });
  20425. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20426. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20427. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20428. console.log(response);
  20429. // let data = response.data.FunctionResponse
  20430. // if (data.choices && data.choices.length && data.choices[0].message) {
  20431. // console.log(data.choices[0].message.content);
  20432. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20433. // _this.$forceUpdate()
  20434. // }
  20435. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20436. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20437. } else {
  20438. _this.$message.warning(response.data.FunctionResponse.result);
  20439. }
  20440. }).catch(function (error) {
  20441. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  20442. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  20443. if(error && error.message != 'Request canceled by the user.'){
  20444. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20445. }
  20446. console.log(error);
  20447. });
  20448. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  20449. },
  20450. aiDetail5getAiContent(_uid, loading, _tindex2) {
  20451. let _source;
  20452. try {
  20453. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20454. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20455. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20456. } catch(error){
  20457. console.log('EventSource error:', error);
  20458. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20459. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20460. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20461. return;
  20462. }
  20463. let _allText = "";
  20464. let _mdText = "";
  20465. let _iindex = 0
  20466. _source.onmessage = _e => {
  20467. let _eData = JSON.parse(_e.data).content;
  20468. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20469. //对话已经完成
  20470. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20471. _source.close();
  20472. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20473. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20474. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20475. return;
  20476. } else {
  20477. _iindex++
  20478. //对话还在继续
  20479. let _text = "";
  20480. _text = _eData.replaceAll("'", "");
  20481. if (_allText == "") {
  20482. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20483. } else {
  20484. _allText += _text;
  20485. }
  20486. _mdText = _allText + "_";
  20487. _mdText = _mdText.replace(/\\n/g, "\n");
  20488. _mdText = _mdText.replace(/\\/g, "");
  20489. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20490. //转化返回的回复流数据
  20491. if(_iindex == 10){
  20492. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20493. _iindex = 0
  20494. }
  20495. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  20496. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20497. }
  20498. // 处理流数据
  20499. }
  20500. // this.$forceUpdate();
  20501. };
  20502. let _this = this
  20503. _source.onerror = function(event) {
  20504. // 处理错误,可以尝试重新连接
  20505. console.log('EventSource error:', event);
  20506. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20507. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  20508. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  20509. _source.close();
  20510. };
  20511. },
  20512. async aiDetail52(msg, index) {
  20513. let _this = this
  20514. const _tindex = 'task-' + index
  20515. const _tindex2 = index
  20516. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20517. if (_this.infoData.length) {
  20518. for (var i = 0; i < _this.infoData.length; i++) {
  20519. if(_this.infoData[i].fileid){
  20520. fileid.push(_this.infoData[i].fileid)
  20521. }else {
  20522. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20523. if(_fileid){
  20524. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20525. _this.$forceUpdate();
  20526. if(_fileid != 1){
  20527. fileid.push(_fileid)
  20528. }
  20529. }
  20530. }
  20531. }
  20532. }
  20533. let url = []
  20534. if (this.infoData.length) {
  20535. for (var i = 0; i < this.infoData.length; i++) {
  20536. url.push(this.infoData[i].url)
  20537. }
  20538. }
  20539. let taskN = []
  20540. let taskD = []
  20541. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  20542. if(_tindex2 != ti){
  20543. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  20544. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  20545. }
  20546. }
  20547. let messages = `NOTICE
  20548. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  20549. Language: ${this.getLang()}
  20550. ATTENTION: follow "Language"
  20551. #Context
  20552. ## 要求
  20553. ${msg}
  20554. ## 补充描述
  20555. 课程简要描述:${_this.courseText}
  20556. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20557. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  20558. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  20559. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20560. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  20561. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20562. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20563. `
  20564. // ## 补充参考资料
  20565. // - 补充资料:${url.join(",")}
  20566. // - 补充描述:${this.courseText2}
  20567. _this.taskDetailLoading5.push(_tindex)
  20568. _this.ttaskDetailLoading5.push(_tindex)
  20569. let _uuid = uuidv4();
  20570. // let params = JSON.stringify({
  20571. // // "model": "Chat",
  20572. // model: 'gpt-3.5-turbo',
  20573. // temperature: 0.1,
  20574. // max_tokens: 4096,
  20575. // top_p: 1,
  20576. // frequency_penalty: 0,
  20577. // presence_penalty: 0,
  20578. // messages: [{
  20579. // content: messages,
  20580. // role: 'user'
  20581. // }],
  20582. // uid: _uuid,
  20583. // mind_map_question: "",
  20584. // })
  20585. let params = {
  20586. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20587. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20588. session_name: _uuid,
  20589. userId: _this.userid,
  20590. uid: _uuid,
  20591. file_ids: fileid.length ? [...fileid] : '',
  20592. model: 'gpt-4o-2024-08-06',
  20593. temperature: 0.1,
  20594. }
  20595. // let params = JSON.stringify({
  20596. // message: {
  20597. // anthropic_version: "bedrock-2023-05-31",
  20598. // max_tokens: 4096,
  20599. // temperature: 0.1,
  20600. // top_p: 1,
  20601. // messages: [{
  20602. // "role": "user",
  20603. // "content": messages
  20604. // }] ,
  20605. // },
  20606. // uid: _uuid,
  20607. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20608. // });
  20609. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20610. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20611. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20612. console.log(response);
  20613. // let data = response.data.FunctionResponse
  20614. // if (data.choices && data.choices.length && data.choices[0].message) {
  20615. // console.log(data.choices[0].message.content);
  20616. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20617. // _this.$forceUpdate()
  20618. // }
  20619. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20620. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20621. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  20622. } else {
  20623. _this.$message.warning(response.data.FunctionResponse.result);
  20624. }
  20625. }).catch(function (error) {
  20626. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  20627. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  20628. if(error && error.message != 'Request canceled by the user.'){
  20629. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20630. }
  20631. console.log(error);
  20632. });
  20633. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2)
  20634. },
  20635. aiDetail52getAiContent(_uid, loading, _tindex2) {
  20636. let _source;
  20637. try {
  20638. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20639. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20640. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20641. } catch(error) {
  20642. console.log('EventSource error:', error);
  20643. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20644. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20645. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20646. return;
  20647. }
  20648. let _allText = "";
  20649. let _mdText = "";
  20650. this.allTextArray[_tindex2] = ""
  20651. let _iindex = 0
  20652. _source.onmessage = async (_e) => {
  20653. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  20654. let _eData = JSON.parse(_e.data).content;
  20655. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20656. //对话已经完成
  20657. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20658. _source.close();
  20659. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20660. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20661. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20662. return;
  20663. } else {
  20664. _iindex++
  20665. //对话还在继续
  20666. let _text = "";
  20667. _text = _eData.replaceAll("'", "");
  20668. if (_allText == "") {
  20669. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20670. } else {
  20671. _allText += _text;
  20672. }
  20673. _mdText = _allText + "_";
  20674. _mdText = _mdText.replace(/\\n/g, "\n");
  20675. _mdText = _mdText.replace(/\\/g, "");
  20676. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20677. //转化返回的回复流数据
  20678. if(_iindex == 10){
  20679. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  20680. _iindex = 0
  20681. }
  20682. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  20683. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20684. }
  20685. // 处理流数据
  20686. }
  20687. };
  20688. let _this = this
  20689. _source.onerror = function(event) {
  20690. // 处理错误,可以尝试重新连接
  20691. console.log('EventSource error:', event);
  20692. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20693. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  20694. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  20695. _source.close();
  20696. };
  20697. },
  20698. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  20699. let _mdText = "";
  20700. let _eData = JSON.parse(_e.data).content;
  20701. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20702. //对话已经完成
  20703. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20704. _source.close();
  20705. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20706. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  20707. return;
  20708. } else {
  20709. //对话还在继续
  20710. let _text = "";
  20711. _text = _eData.replaceAll("'", "");
  20712. if (this.allTextArray[_tindex2] == "") {
  20713. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20714. } else {
  20715. this.allTextArray[_tindex2] += _text;
  20716. }
  20717. _mdText = this.allTextArray[_tindex2] + "_";
  20718. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  20719. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  20720. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  20721. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  20722. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  20723. // 处理流数据
  20724. }
  20725. },
  20726. async aiCpote(msg, callback) {
  20727. let _this = this
  20728. let _index = _this.aitype.replace("aiC","c")
  20729. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20730. if (_this.infoData.length) {
  20731. for (var i = 0; i < _this.infoData.length; i++) {
  20732. if(_this.infoData[i].fileid){
  20733. fileid.push(_this.infoData[i].fileid)
  20734. }else {
  20735. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20736. if(_fileid){
  20737. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20738. _this.$forceUpdate();
  20739. if(_fileid != 1){
  20740. fileid.push(_fileid)
  20741. }
  20742. }
  20743. }
  20744. }
  20745. }
  20746. let sub = []
  20747. if (this.courseTypeId.length) {
  20748. for (var i = 0; i < this.courseTypeId.length; i++) {
  20749. let _sid = this.courseTypeId[i]
  20750. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20751. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20752. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20753. }
  20754. }
  20755. }
  20756. }
  20757. let mclass = []
  20758. if (this.courseTypeId.length) {
  20759. for (var i = 0; i < this.courseTypeId.length; i++) {
  20760. let _sid = this.courseTypeId[i]
  20761. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20762. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20763. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20764. }
  20765. }
  20766. }
  20767. }
  20768. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  20769. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  20770. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  20771. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  20772. let messages = `NOTICE
  20773. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  20774. Language: ${this.getLang()}
  20775. ATTENTION: follow "Language"
  20776. ${msg}
  20777. ## 课程简介
  20778. 课程名字:${this.courseName}
  20779. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20780. ${sub.length ? '学科:' + sub.join(",") : ''}
  20781. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20782. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20783. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  20784. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  20785. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  20786. _this.cpoteLoading[_index] = true
  20787. _this.cpotetLoading[_index] = true
  20788. let _uuid = uuidv4();
  20789. // let params = JSON.stringify({
  20790. // // "model": "Chat",
  20791. // model: 'gpt-3.5-turbo',
  20792. // temperature: 0.1,
  20793. // max_tokens: 4096,
  20794. // top_p: 1,
  20795. // frequency_penalty: 0,
  20796. // presence_penalty: 0,
  20797. // messages: [{
  20798. // content: messages,
  20799. // role: 'user'
  20800. // }],
  20801. // uid: _uuid,
  20802. // mind_map_question: "",
  20803. // })
  20804. let params = {
  20805. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20806. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20807. session_name: _uuid,
  20808. userId: _this.userid,
  20809. uid: _uuid,
  20810. file_ids: fileid.length ? [...fileid] : '',
  20811. model: 'gpt-4o-2024-08-06',
  20812. temperature: 0.1,
  20813. }
  20814. // let params = JSON.stringify({
  20815. // message: {
  20816. // anthropic_version: "bedrock-2023-05-31",
  20817. // max_tokens: 4096,
  20818. // temperature: 0.1,
  20819. // top_p: 1,
  20820. // messages: [{
  20821. // "role": "user",
  20822. // "content": messages
  20823. // }] ,
  20824. // },
  20825. // uid: _uuid,
  20826. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20827. // });
  20828. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20829. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20830. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20831. console.log(response);
  20832. // let data = response.data.FunctionResponse
  20833. // if (data.choices && data.choices.length && data.choices[0].message) {
  20834. // console.log(data.choices[0].message.content);
  20835. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20836. // _this.$forceUpdate()
  20837. // }
  20838. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20839. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20840. } else {
  20841. _this.$message.warning(response.data.FunctionResponse.result);
  20842. }
  20843. }).catch(function (error) {
  20844. _this.cpoteLoading[_index] = false
  20845. _this.cpotetLoading[_index] = false
  20846. callback ? callback() : ''
  20847. if(error && error.message != 'Request canceled by the user.'){
  20848. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20849. }
  20850. console.log(error);
  20851. });
  20852. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  20853. },
  20854. aiCpotegetAiContent(_uid, loading, callback) {
  20855. let _source;
  20856. try {
  20857. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20858. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20859. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20860. } catch(error){
  20861. console.log('EventSource error:', error);
  20862. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20863. this.cpoteLoading[loading] = false
  20864. this.cpotetLoading[loading] = false
  20865. return;
  20866. }
  20867. let _allText = "";
  20868. let _mdText = "";
  20869. let _iindex = 0
  20870. _source.onmessage = _e => {
  20871. let _eData = JSON.parse(_e.data).content;
  20872. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20873. //对话已经完成
  20874. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20875. _source.close();
  20876. this.cpote[loading] = _mdText;
  20877. this.cpoteLoading[loading] = false
  20878. this.cpotetLoading[loading] = false
  20879. callback ? callback() : ''
  20880. return;
  20881. } else {
  20882. _iindex++
  20883. //对话还在继续
  20884. let _text = "";
  20885. _text = _eData.replaceAll("'", "");
  20886. if (_allText == "") {
  20887. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20888. } else {
  20889. _allText += _text;
  20890. }
  20891. _mdText = _allText + "_";
  20892. _mdText = _mdText.replace(/\\n/g, "\n");
  20893. _mdText = _mdText.replace(/\\/g, "");
  20894. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20895. //转化返回的回复流数据
  20896. if(_iindex == 10){
  20897. this.cpote[loading] = _mdText;
  20898. _iindex = 0
  20899. }
  20900. this.cpoteLoading[loading] = false
  20901. // 处理流数据
  20902. }
  20903. // this.$forceUpdate();
  20904. };
  20905. let _this = this
  20906. _source.onerror = function(event) {
  20907. // 处理错误,可以尝试重新连接
  20908. console.log('EventSource error:', event);
  20909. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20910. _this.cpoteLoading[loading] = false
  20911. _this.cpotetLoading[loading] = false
  20912. _source.close();
  20913. };
  20914. },
  20915. async aiteacherTextDetail(msg) {
  20916. let _this = this
  20917. let fileid = []
  20918. if (_this.teacherInfoData.length) {
  20919. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  20920. if(_this.teacherInfoData[i].fileid){
  20921. fileid.push(_this.teacherInfoData[i].fileid)
  20922. }else {
  20923. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  20924. if(_fileid){
  20925. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20926. _this.$forceUpdate();
  20927. if(_fileid != 1){
  20928. fileid.push(_fileid)
  20929. }
  20930. }
  20931. }
  20932. }
  20933. }
  20934. _this.teacherTextLoading = true
  20935. _this.tteacherTextLoading = true
  20936. let sub = []
  20937. if (_this.courseTypeId.length) {
  20938. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20939. let _sid = _this.courseTypeId[i]
  20940. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20941. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  20942. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  20943. }
  20944. }
  20945. }
  20946. }
  20947. let mclass = []
  20948. if (_this.courseTypeId.length) {
  20949. for (var i = 0; i < _this.courseTypeId.length; i++) {
  20950. let _sid = _this.courseTypeId[i]
  20951. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  20952. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  20953. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  20954. }
  20955. }
  20956. }
  20957. }
  20958. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  20959. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  20960. let messages = `NOTICE
  20961. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20962. Language: ${this.getLang()}
  20963. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20964. Instruction: Based on the context, follow "Format example", write content.
  20965. #Context
  20966. ## 参考资料
  20967. 课程名字:${this.courseName}
  20968. ${sub.length ? '学科:' + sub.join(",") : ''}
  20969. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  20970. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  20971. ## 要求
  20972. ${msg}
  20973. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  20974. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  20975. let _uuid = uuidv4();
  20976. // let params = JSON.stringify({
  20977. // // "model": "Chat",
  20978. // model: 'gpt-3.5-turbo',
  20979. // temperature: 0.1,
  20980. // max_tokens: 4096,
  20981. // top_p: 1,
  20982. // frequency_penalty: 0,
  20983. // presence_penalty: 0,
  20984. // messages: [{
  20985. // content: messages,
  20986. // role: 'user'
  20987. // }],
  20988. // uid: _uuid,
  20989. // mind_map_question: "",
  20990. // })
  20991. let params = {
  20992. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20993. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20994. session_name: _uuid,
  20995. userId: _this.userid,
  20996. uid: _uuid,
  20997. file_ids: fileid.length ? [...fileid] : '',
  20998. model: 'gpt-4o-2024-08-06',
  20999. temperature: 0.1,
  21000. }
  21001. // let params = JSON.stringify({
  21002. // message: {
  21003. // anthropic_version: "bedrock-2023-05-31",
  21004. // max_tokens: 4096,
  21005. // temperature: 0.1,
  21006. // top_p: 1,
  21007. // messages: [{
  21008. // "role": "user",
  21009. // "content": messages
  21010. // }] ,
  21011. // },
  21012. // uid: _uuid,
  21013. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21014. // });
  21015. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21016. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  21017. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21018. console.log(response);
  21019. // let data = response.data.FunctionResponse
  21020. // if (data.choices && data.choices.length && data.choices[0].message) {
  21021. // _this.courseText = data.choices[0].message.content
  21022. // }
  21023. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21024. } else {
  21025. _this.$message.warning(response.data.FunctionResponse.result);
  21026. }
  21027. _this.isTeacherTextCancelToken = null
  21028. }).catch(function (error) {
  21029. _this.teacherTextLoading = false
  21030. _this.tteacherTextLoading = false
  21031. _this.isTeacherTextCancelToken = null
  21032. if(error && error.message != 'Request canceled by the user.'){
  21033. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21034. }
  21035. console.log(error);
  21036. });
  21037. await _this.aiteacherTextDetailgetAiContent(_uuid)
  21038. },
  21039. aiteacherTextDetailgetAiContent(_uid) {
  21040. try {
  21041. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21042. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21043. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21044. } catch(error) {
  21045. console.log('EventSource error:', event);
  21046. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21047. this.teacherTextLoading = false
  21048. this.tteacherTextLoading = false
  21049. this.isTeacherTextCancelToken = null
  21050. return;
  21051. }
  21052. let _allText = "";
  21053. let _mdText = "";
  21054. let _iindex = 0
  21055. this.isTeacherTextCancelSource.onmessage = _e => {
  21056. let _eData = JSON.parse(_e.data).content;
  21057. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21058. //对话已经完成
  21059. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21060. this.isTeacherTextCancelSource.close();
  21061. this.isTeacherTextCancelSource = null;
  21062. this.teacherCourseText = _mdText;
  21063. this.teacherTextLoading = false
  21064. this.tteacherTextLoading = false
  21065. this.teacherCourseTextB = false
  21066. this.isTeacherTextCancelToken = null
  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.teacherCourseText = _mdText;
  21085. _iindex = 0
  21086. }
  21087. if(this.teacherTextLoading){
  21088. this.teacherTextLoading = false
  21089. }
  21090. // 处理流数据
  21091. }
  21092. // this.$forceUpdate();
  21093. };
  21094. let _this = this
  21095. this.isTeacherTextCancelSource.onerror = function(event) {
  21096. // 处理错误,可以尝试重新连接
  21097. console.log('EventSource error:', event);
  21098. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21099. _this.teacherTextLoading = false
  21100. _this.tteacherTextLoading = false
  21101. _this.isTeacherTextCancelToken = null
  21102. _this.isTeacherTextCancelSource.close();
  21103. _this.isTeacherTextCancelSource = null;
  21104. };
  21105. },
  21106. async aitargetTextDetail(msg) {
  21107. let _this = this
  21108. let fileid = []
  21109. if (_this.teacherInfoData.length) {
  21110. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  21111. if(_this.teacherInfoData[i].fileid){
  21112. fileid.push(_this.teacherInfoData[i].fileid)
  21113. }else {
  21114. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  21115. if(_fileid){
  21116. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21117. _this.$forceUpdate();
  21118. if(_fileid != 1){
  21119. fileid.push(_fileid)
  21120. }
  21121. }
  21122. }
  21123. }
  21124. }
  21125. _this.targetTextLoading = true
  21126. _this.ttargetTextLoading = true
  21127. let sub = []
  21128. if (_this.courseTypeId.length) {
  21129. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21130. let _sid = _this.courseTypeId[i]
  21131. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21132. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21133. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21134. }
  21135. }
  21136. }
  21137. }
  21138. let mclass = []
  21139. if (_this.courseTypeId.length) {
  21140. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21141. let _sid = _this.courseTypeId[i]
  21142. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21143. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21144. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21145. }
  21146. }
  21147. }
  21148. }
  21149. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  21150. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  21151. let messages = `NOTICE
  21152. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21153. Language: ${this.getLang()}
  21154. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21155. Instruction: Based on the context, follow "Format example", write content.
  21156. #Context
  21157. ## 参考资料
  21158. 课程名字:${this.courseName}
  21159. ${sub.length ? '学科:' + sub.join(",") : ''}
  21160. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21161. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  21162. ## 要求
  21163. ${msg}
  21164. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  21165. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  21166. let _uuid = uuidv4();
  21167. // let params = JSON.stringify({
  21168. // // "model": "Chat",
  21169. // model: 'gpt-3.5-turbo',
  21170. // temperature: 0.1,
  21171. // max_tokens: 4096,
  21172. // top_p: 1,
  21173. // frequency_penalty: 0,
  21174. // presence_penalty: 0,
  21175. // messages: [{
  21176. // content: messages,
  21177. // role: 'user'
  21178. // }],
  21179. // uid: _uuid,
  21180. // mind_map_question: "",
  21181. // })
  21182. let params = {
  21183. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21184. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21185. session_name: _uuid,
  21186. userId: _this.userid,
  21187. uid: _uuid,
  21188. file_ids: fileid.length ? [...fileid] : '',
  21189. model: 'gpt-4o-2024-08-06',
  21190. temperature: 0.1,
  21191. }
  21192. // let params = JSON.stringify({
  21193. // message: {
  21194. // anthropic_version: "bedrock-2023-05-31",
  21195. // max_tokens: 4096,
  21196. // temperature: 0.1,
  21197. // top_p: 1,
  21198. // messages: [{
  21199. // "role": "user",
  21200. // "content": messages
  21201. // }] ,
  21202. // },
  21203. // uid: _uuid,
  21204. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21205. // });
  21206. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21207. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  21208. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21209. console.log(response);
  21210. // let data = response.data.FunctionResponse
  21211. // if (data.choices && data.choices.length && data.choices[0].message) {
  21212. // _this.courseText = data.choices[0].message.content
  21213. // }
  21214. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21215. } else {
  21216. _this.$message.warning(response.data.FunctionResponse.result);
  21217. }
  21218. _this.isTargetCancelToken1 = null
  21219. }).catch(function (error) {
  21220. _this.targetTextLoading = false
  21221. _this.ttargetTextLoading = false
  21222. _this.isTargetCancelToken1 = null
  21223. if(error && error.message != 'Request canceled by the user.'){
  21224. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21225. }
  21226. console.log(error);
  21227. });
  21228. await _this.aitargetTextDetailgetAiContent(_uuid)
  21229. },
  21230. aitargetTextDetailgetAiContent(_uid) {
  21231. try {
  21232. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21233. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21234. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21235. } catch (error) {
  21236. console.log('EventSource error:', error);
  21237. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21238. this.targetTextLoading = false
  21239. this.ttargetTextLoading = false
  21240. this.isTargetCancelToken1 = null
  21241. return;
  21242. }
  21243. let _allText = "";
  21244. let _mdText = "";
  21245. let _iindex = 0
  21246. this.isTargetCancelSource1.onmessage = _e => {
  21247. let _eData = JSON.parse(_e.data).content;
  21248. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21249. //对话已经完成
  21250. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21251. this.isTargetCancelSource1.close();
  21252. this.isTargetCancelSource1 = null;
  21253. this.targetCourseText = _mdText;
  21254. this.targetTextLoading = false
  21255. this.ttargetTextLoading = false
  21256. this.targetCourseTextB = false
  21257. this.isTargetCancelToken1 = null
  21258. return;
  21259. } else {
  21260. _iindex++
  21261. //对话还在继续
  21262. let _text = "";
  21263. _text = _eData.replaceAll("'", "");
  21264. if (_allText == "") {
  21265. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21266. } else {
  21267. _allText += _text;
  21268. }
  21269. _mdText = _allText + "_";
  21270. _mdText = _mdText.replace(/\\n/g, "\n");
  21271. _mdText = _mdText.replace(/\\/g, "");
  21272. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21273. //转化返回的回复流数据
  21274. if(_iindex == 10){
  21275. this.targetCourseText = _mdText;
  21276. _iindex = 0
  21277. }
  21278. if(this.targetTextLoading){
  21279. this.targetTextLoading = false
  21280. }
  21281. // 处理流数据
  21282. }
  21283. // this.$forceUpdate();
  21284. };
  21285. let _this = this
  21286. this.isTargetCancelSource1.onerror = function(event) {
  21287. // 处理错误,可以尝试重新连接
  21288. console.log('EventSource error:', event);
  21289. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21290. _this.targetTextLoading = false
  21291. _this.ttargetTextLoading = false
  21292. _this.isTargetCancelToken1 = null
  21293. _this.isTargetCancelSource1.close();
  21294. _this.isTargetCancelSource1 = null;
  21295. };
  21296. },
  21297. async aitargetTextDetail2(msg) {
  21298. let _this = this
  21299. let fileid = []
  21300. if(_this.mubiaoInfoData.length){
  21301. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  21302. if(_this.mubiaoInfoData[i].fileid){
  21303. fileid.push(_this.mubiaoInfoData[i].fileid)
  21304. }else {
  21305. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  21306. if(_fileid){
  21307. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21308. _this.$forceUpdate();
  21309. if(_fileid != 1){
  21310. fileid.push(_fileid)
  21311. }
  21312. }
  21313. }
  21314. }
  21315. }
  21316. _this.targetTextLoading2 = true
  21317. _this.ttargetTextLoading2 = true
  21318. let sub = []
  21319. if (_this.courseTypeId.length) {
  21320. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21321. let _sid = _this.courseTypeId[i]
  21322. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21323. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21324. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21325. }
  21326. }
  21327. }
  21328. }
  21329. let mclass = []
  21330. if (_this.courseTypeId.length) {
  21331. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21332. let _sid = _this.courseTypeId[i]
  21333. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21334. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21335. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21336. }
  21337. }
  21338. }
  21339. }
  21340. if(sub.length){
  21341. let _fileid = _this.importFileid(sub)
  21342. fileid = [...fileid, ..._fileid]
  21343. }
  21344. let messages = `NOTICE
  21345. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21346. Language: ${this.getLang()}
  21347. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21348. Instruction: Based on the context, follow "Format example", write content.
  21349. #Context
  21350. ## 参考资料
  21351. 课程标题:${this.courseName}
  21352. ${sub.length ? '学科:' + sub.join(",") : ''}
  21353. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21354. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  21355. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  21356. ## 要求
  21357. ${msg}
  21358. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  21359. let _uuid = uuidv4();
  21360. // let params = JSON.stringify({
  21361. // // "model": "Chat",
  21362. // model: 'gpt-3.5-turbo',
  21363. // temperature: 0.1,
  21364. // max_tokens: 4096,
  21365. // top_p: 1,
  21366. // frequency_penalty: 0,
  21367. // presence_penalty: 0,
  21368. // messages: [{
  21369. // content: messages,
  21370. // role: 'user'
  21371. // }],
  21372. // uid: _uuid,
  21373. // mind_map_question: "",
  21374. // })
  21375. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  21376. let params = {
  21377. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21378. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21379. session_name: _uuid,
  21380. userId: _this.userid,
  21381. uid: _uuid,
  21382. file_ids: fileid.length ? [...fileid] : '',
  21383. model: 'gpt-4o-2024-08-06',
  21384. temperature: 0.1,
  21385. }
  21386. // let params = JSON.stringify({
  21387. // message: {
  21388. // anthropic_version: "bedrock-2023-05-31",
  21389. // max_tokens: 4096,
  21390. // temperature: 0.1,
  21391. // top_p: 1,
  21392. // messages: [{
  21393. // "role": "user",
  21394. // "content": messages
  21395. // }] ,
  21396. // },
  21397. // uid: _uuid,
  21398. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21399. // });
  21400. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21401. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  21402. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21403. console.log(response);
  21404. // let data = response.data.FunctionResponse
  21405. // if (data.choices && data.choices.length && data.choices[0].message) {
  21406. // _this.courseText = data.choices[0].message.content
  21407. // }
  21408. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21409. } else {
  21410. _this.$message.warning(response.data.FunctionResponse.result);
  21411. }
  21412. _this.isTargetCancelToken2 = null
  21413. }).catch(function (error) {
  21414. _this.targetTextLoading2 = false
  21415. _this.ttargetTextLoading2 = false
  21416. _this.isTargetCancelToken2 = null
  21417. if(error && error.message != 'Request canceled by the user.'){
  21418. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21419. }
  21420. console.log(error);
  21421. });
  21422. await _this.aitargetTextDetail2getAiContent(_uuid)
  21423. },
  21424. importFileid(sub){
  21425. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  21426. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  21427. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  21428. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  21429. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  21430. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  21431. let _sub = converter(sub.join(","))
  21432. let fileid = []
  21433. for(var i = 0; i < this.fileidArray.length; i++){
  21434. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  21435. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  21436. fileid.push(this.fileidArray[i].fileid)
  21437. }
  21438. }
  21439. }
  21440. return fileid
  21441. },
  21442. selectFileid(){
  21443. let params = {
  21444. oid: this.oid,
  21445. };
  21446. this.ajax
  21447. .get(this.$store.state.api + "selectFileid", params)
  21448. .then((res) => {
  21449. this.fileidArray = res.data[0]
  21450. if(res.data[1].length){
  21451. this.fileidArray = res.data[1]
  21452. }
  21453. if(res.data[2].length){
  21454. this.fileidArray = res.data[2]
  21455. }
  21456. })
  21457. .catch((err) => {
  21458. console.error(err);
  21459. });
  21460. },
  21461. selectAiFileid(){
  21462. let params = {
  21463. oid: this.oid,
  21464. };
  21465. this.ajax
  21466. .get(this.$store.state.api + "selectAiFileid", params)
  21467. .then((res) => {
  21468. let fileIds = []
  21469. for(var i = 0; i < res.data[0].length; i++){
  21470. fileIds.push(res.data[0][i].fileid)
  21471. }
  21472. this.fileIds = fileIds
  21473. if(res.data[1].length){
  21474. fileIds = []
  21475. for(var i = 0; i < res.data[1].length; i++){
  21476. fileIds.push(res.data[0][i].fileid)
  21477. }
  21478. this.fileidArray = fileIds
  21479. }
  21480. if(res.data[2].length){
  21481. fileIds = []
  21482. for(var i = 0; i < res.data[2].length; i++){
  21483. fileIds.push(res.data[0][i].fileid)
  21484. }
  21485. this.fileidArray = fileIds
  21486. }
  21487. })
  21488. .catch((err) => {
  21489. console.error(err);
  21490. });
  21491. },
  21492. async aitargetTextDetail22(msg,msg2) {
  21493. let _this = this
  21494. let fileid = []
  21495. _this.targetTextLoading2 = true
  21496. _this.ttargetTextLoading2 = true
  21497. let sub = []
  21498. if (_this.courseTypeId.length) {
  21499. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21500. let _sid = _this.courseTypeId[i]
  21501. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21502. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21503. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21504. }
  21505. }
  21506. }
  21507. }
  21508. let mclass = []
  21509. if (_this.courseTypeId.length) {
  21510. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21511. let _sid = _this.courseTypeId[i]
  21512. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21513. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21514. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21515. }
  21516. }
  21517. }
  21518. }
  21519. if(!msg2 && sub.length){
  21520. let _fileid = _this.importFileid(sub)
  21521. fileid = [...fileid, ..._fileid]
  21522. }
  21523. let messages = `NOTICE
  21524. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21525. Language: ${this.getLang()}
  21526. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21527. Instruction: Based on the context, follow "Format example", write content.
  21528. #Context
  21529. ## 参考资料
  21530. 课程标题:${this.courseName}
  21531. ${sub.length ? '学科:' + sub.join(",") : ''}
  21532. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21533. 课程目标:${msg2}
  21534. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  21535. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  21536. ## 要求
  21537. ${msg}
  21538. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  21539. let _uuid = uuidv4();
  21540. // let params = JSON.stringify({
  21541. // // "model": "Chat",
  21542. // model: 'gpt-3.5-turbo',
  21543. // temperature: 0.1,
  21544. // max_tokens: 4096,
  21545. // top_p: 1,
  21546. // frequency_penalty: 0,
  21547. // presence_penalty: 0,
  21548. // messages: [{
  21549. // content: messages,
  21550. // role: 'user'
  21551. // }],
  21552. // uid: _uuid,
  21553. // mind_map_question: "",
  21554. // })
  21555. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  21556. let params = {
  21557. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21558. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21559. session_name: _uuid,
  21560. userId: _this.userid,
  21561. uid: _uuid,
  21562. file_ids: fileid.length ? [...fileid] : '',
  21563. model: 'gpt-4o-2024-08-06',
  21564. temperature: 0.1,
  21565. }
  21566. // let params = JSON.stringify({
  21567. // message: {
  21568. // anthropic_version: "bedrock-2023-05-31",
  21569. // max_tokens: 4096,
  21570. // temperature: 0.1,
  21571. // top_p: 1,
  21572. // messages: [{
  21573. // "role": "user",
  21574. // "content": messages
  21575. // }] ,
  21576. // },
  21577. // uid: _uuid,
  21578. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21579. // });
  21580. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21581. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  21582. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21583. console.log(response);
  21584. // let data = response.data.FunctionResponse
  21585. // if (data.choices && data.choices.length && data.choices[0].message) {
  21586. // _this.courseText = data.choices[0].message.content
  21587. // }
  21588. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21589. } else {
  21590. _this.$message.warning(response.data.FunctionResponse.result);
  21591. }
  21592. _this.isTargetCancelToken2 = null
  21593. }).catch(function (error) {
  21594. _this.targetTextLoading2 = false
  21595. _this.ttargetTextLoading2 = false
  21596. _this.isTargetCancelToken2 = null
  21597. if(error && error.message != 'Request canceled by the user.'){
  21598. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21599. }
  21600. console.log(error);
  21601. });
  21602. await _this.aitargetTextDetail2getAiContent(_uuid)
  21603. },
  21604. aitargetTextDetail2getAiContent(_uid) {
  21605. try {
  21606. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21607. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21608. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21609. } catch(error) {
  21610. console.log('EventSource error:', error);
  21611. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21612. this.targetTextLoading2 = false
  21613. this.ttargetTextLoading2 = false
  21614. this.isTargetCancelToken2 = null
  21615. return;
  21616. }
  21617. let _allText = "";
  21618. let _mdText = "";
  21619. let _iindex = 0
  21620. this.isTargetCancelSource2.onmessage = _e => {
  21621. let _eData = JSON.parse(_e.data).content;
  21622. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21623. //对话已经完成
  21624. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21625. this.isTargetCancelSource2.close();
  21626. this.isTargetCancelSource2 = null;
  21627. this.targetCourseText2 = _mdText;
  21628. this.targetTextLoading2 = false
  21629. this.ttargetTextLoading2 = false
  21630. this.targetCourseText2B = false
  21631. this.isTargetCancelToken2 = null
  21632. return;
  21633. } else {
  21634. _iindex++
  21635. //对话还在继续
  21636. let _text = "";
  21637. _text = _eData.replaceAll("'", "");
  21638. if (_allText == "") {
  21639. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21640. } else {
  21641. _allText += _text;
  21642. }
  21643. _mdText = _allText + "_";
  21644. _mdText = _mdText.replace(/\\n/g, "\n");
  21645. _mdText = _mdText.replace(/\\/g, "");
  21646. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21647. //转化返回的回复流数据
  21648. if(_iindex == 10){
  21649. this.targetCourseText2 = _mdText;
  21650. _iindex = 0
  21651. }
  21652. if(this.targetTextLoading2){
  21653. this.targetTextLoading2 = false
  21654. }
  21655. // 处理流数据
  21656. }
  21657. // this.$forceUpdate();
  21658. };
  21659. let _this = this
  21660. this.isTargetCancelSource2.onerror = function(event) {
  21661. // 处理错误,可以尝试重新连接
  21662. console.log('EventSource error:', event);
  21663. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21664. _this.targetTextLoading2 = false
  21665. _this.ttargetTextLoading2 = false
  21666. _this.isTargetCancelToken2 = null
  21667. _this.isTargetCancelSource2.close();
  21668. _this.isTargetCancelSource2 = null;
  21669. };
  21670. },
  21671. async aitargetTextDetail3(msg) {
  21672. let _this = this
  21673. let fileid = []
  21674. if(_this.mubiaoInfoData.length){
  21675. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  21676. if(_this.mubiaoInfoData[i].fileid){
  21677. fileid.push(_this.mubiaoInfoData[i].fileid)
  21678. }else {
  21679. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  21680. if(_fileid){
  21681. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21682. _this.$forceUpdate();
  21683. if(_fileid != 1){
  21684. fileid.push(_fileid)
  21685. }
  21686. }
  21687. }
  21688. }
  21689. }
  21690. _this.targetTextLoading2 = true
  21691. _this.ttargetTextLoading2 = true
  21692. let sub = []
  21693. if (_this.courseTypeId.length) {
  21694. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21695. let _sid = _this.courseTypeId[i]
  21696. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21697. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21698. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21699. }
  21700. }
  21701. }
  21702. }
  21703. let mclass = []
  21704. if (_this.courseTypeId.length) {
  21705. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21706. let _sid = _this.courseTypeId[i]
  21707. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21708. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21709. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21710. }
  21711. }
  21712. }
  21713. }
  21714. if(sub.length){
  21715. let _fileid = _this.importFileid(sub)
  21716. fileid = [...fileid, ..._fileid]
  21717. }
  21718. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  21719. let messages = `${msg}`
  21720. let _uuid = uuidv4();
  21721. // let params = JSON.stringify({
  21722. // // "model": "Chat",
  21723. // model: 'gpt-3.5-turbo',
  21724. // temperature: 0.1,
  21725. // max_tokens: 4096,
  21726. // top_p: 1,
  21727. // frequency_penalty: 0,
  21728. // presence_penalty: 0,
  21729. // messages: [{
  21730. // content: messages,
  21731. // role: 'user'
  21732. // }],
  21733. // uid: _uuid,
  21734. // mind_map_question: "",
  21735. // })
  21736. let params = {
  21737. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21738. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21739. session_name: _uuid,
  21740. userId: _this.userid,
  21741. uid: _uuid,
  21742. file_ids: fileid.length ? [...fileid] : '',
  21743. model: 'gpt-4o-2024-08-06',
  21744. temperature: 0.1,
  21745. }
  21746. // let params = JSON.stringify({
  21747. // message: {
  21748. // anthropic_version: "bedrock-2023-05-31",
  21749. // max_tokens: 4096,
  21750. // temperature: 0.1,
  21751. // top_p: 1,
  21752. // messages: [{
  21753. // "role": "user",
  21754. // "content": messages
  21755. // }] ,
  21756. // },
  21757. // uid: _uuid,
  21758. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21759. // });
  21760. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21761. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  21762. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21763. console.log(response);
  21764. // let data = response.data.FunctionResponse
  21765. // if (data.choices && data.choices.length && data.choices[0].message) {
  21766. // _this.courseText = data.choices[0].message.content
  21767. // }
  21768. console.log(response);
  21769. let data = response.data.FunctionResponse
  21770. // if (data.choices && data.choices.length && data.choices[0].message) {
  21771. // console.log(data.choices[0].message.content);
  21772. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  21773. // _this.$forceUpdate()
  21774. // }
  21775. if (data.message) {
  21776. console.log('返回回来的目标:',data.message);
  21777. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  21778. }
  21779. _this.isTargetCancelToken2 = null
  21780. }).catch(function (error) {
  21781. _this.targetTextLoading2 = false
  21782. _this.ttargetTextLoading2 = false
  21783. _this.isTargetCancelToken2 = null
  21784. if(error && error.message != 'Request canceled by the user.'){
  21785. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21786. }
  21787. console.log(error);
  21788. });
  21789. },
  21790. againEva(msg, i, k) {
  21791. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  21792. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  21793. return;
  21794. }
  21795. if (this.ruleLoading[i]) {
  21796. this.ruleLoading[i][k] = true
  21797. } else {
  21798. this.ruleLoading[i] = []
  21799. this.ruleLoading[i][k] = true
  21800. }
  21801. let message = `NOTICE
  21802. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  21803. Language: ${this.getLang()}
  21804. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21805. Instruction: Based on the context, follow "Format example", write content.
  21806. #Context
  21807. ##要求
  21808. ${msg}
  21809. ##制定标准资料
  21810. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  21811. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  21812. # Format example
  21813. ==
  21814. 0 星,作业内容与作业要求无关;
  21815. 1 星,没有识别问题和需求;
  21816. 2 星,问题或需求没有被清晰理解或准确识别;
  21817. 3 星,问题或需求的一部分被识别;
  21818. 4 星,问题或需求的大部分被识别;
  21819. 5 星,问题或需求都被识别。
  21820. ==
  21821. `
  21822. // let params = {
  21823. // // "model": "Chat",
  21824. // model: 'gpt-4o-2024-08-06',
  21825. // // model: "gpt-4o",
  21826. // temperature: 0.1,
  21827. // max_tokens: 4096,
  21828. // top_p: 1,
  21829. // frequency_penalty: 0,
  21830. // presence_penalty: 0,
  21831. // messages: [
  21832. // {
  21833. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  21834. // role: "user"
  21835. // }
  21836. // ],
  21837. // stream: false,
  21838. // uid: this.userid,
  21839. // mind_map_question: ""
  21840. // };
  21841. // this.ajax
  21842. // .post("https://gpt4.cocorobo.cn/chat", params)
  21843. // .then(response => {
  21844. // let data = response.data.FunctionResponse;
  21845. // console.log("data", data);
  21846. // if (data.choices && data.choices.length && data.choices[0].message) {
  21847. // let content = data.choices[0].message.content;
  21848. // var regex = new RegExp('==([^=]+)==');
  21849. // let match = content.match(regex);
  21850. // if (match) {
  21851. // content = match[1].trim().replaceAll(' ', '');
  21852. // // 获取匹配到的内容并去除两端空格
  21853. // console.log('contentInsideDoubleEquals', content);
  21854. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  21855. // console.log("未有星级。");
  21856. // this.againEva(msg, i, k)
  21857. // return
  21858. // }
  21859. // //  return
  21860. // } else {
  21861. // console.log("未找到匹配的内容。");
  21862. // this.againEva(msg, i, k)
  21863. // return
  21864. // }
  21865. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  21866. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21867. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21868. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  21869. // this.$forceUpdate();
  21870. // this.ruleLoading[i][k] = false
  21871. // }else{
  21872. // this.ruleLoading[i][k] = false
  21873. // }
  21874. // })
  21875. // .catch(error => {
  21876. // console.log(error);
  21877. // this.ruleLoading[i][k] = false
  21878. // });
  21879. let parm = {
  21880. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21881. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  21882. session_name: uuidv4(),
  21883. userId: this.userid,
  21884. file_ids: [],
  21885. model: 'gpt-4o-2024-08-06',
  21886. temperature: 0.1,
  21887. }
  21888. this.ajax
  21889. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  21890. .then(async (response) => {
  21891. console.log(response);
  21892. let data = response.data.FunctionResponse
  21893. if (data.message) {
  21894. console.log(data.message);
  21895. let content = data.message;
  21896. var regex = new RegExp('==([^=]+)==');
  21897. let match = content.match(regex);
  21898. if (match) {
  21899. content = match[1].trim().replaceAll(' ', '');
  21900. // 获取匹配到的内容并去除两端空格
  21901. console.log('contentInsideDoubleEquals', content);
  21902. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  21903. console.log("未有星级。");
  21904. this.againEva(msg, i, k)
  21905. return
  21906. }
  21907. //  return
  21908. } else {
  21909. console.log("未找到匹配的内容。");
  21910. this.againEva(msg, i, k)
  21911. return
  21912. }
  21913. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  21914. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21915. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  21916. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  21917. this.$forceUpdate();
  21918. this.ruleLoading[i][k] = false
  21919. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  21920. }else {
  21921. this.ruleLoading[i][k] = false
  21922. }
  21923. })
  21924. .catch((error) => {
  21925. this.ruleLoading[i][k] = false
  21926. console.log(error);
  21927. });
  21928. },
  21929. async aiSearchFile(messages, callback) {
  21930. let _this = this
  21931. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21932. console.log('fileid=========',fileid)
  21933. // let params = JSON.stringify({
  21934. // // "model": "Chat",
  21935. // model: 'gpt-3.5-turbo',
  21936. // temperature: 0.1,
  21937. // max_tokens: 4096,
  21938. // top_p: 1,
  21939. // frequency_penalty: 0,
  21940. // presence_penalty: 0,
  21941. // messages: [{
  21942. // content: messages,
  21943. // role: 'user'
  21944. // }],
  21945. // stream: false,
  21946. // uid: this.userid,
  21947. // mind_map_question: "",
  21948. // })
  21949. // // let params = JSON.stringify({
  21950. // // message: {
  21951. // // anthropic_version: "bedrock-2023-05-31",
  21952. // // max_tokens: 4096,
  21953. // // temperature: 0.1,
  21954. // // top_p: 1,
  21955. // // messages: [{
  21956. // // content: messages,
  21957. // // role: 'user'
  21958. // // }], //
  21959. // // },
  21960. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21961. // // });
  21962. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21963. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21964. // console.log(response);
  21965. // let data = response.data.FunctionResponse
  21966. // if (data.choices && data.choices.length && data.choices[0].message) {
  21967. // console.log(data.choices[0].message.content);
  21968. // let dArray = JSON.parse(data.choices[0].message.content)
  21969. // _this.dArray = dArray
  21970. // _this.unitJson[0].chapterInfo[0].taskJson = []
  21971. // for (var i = 0; i < dArray.length; i++) {
  21972. // let _task = dArray[i]
  21973. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  21974. // task: _task.task,
  21975. // taskDetail: "",
  21976. // taskDetail2: _task.detail,
  21977. // taskDetail3: "",
  21978. // chapterData: [],
  21979. // toolText: "",
  21980. // toolChoose: [
  21981. // {
  21982. // tool: [],
  21983. // toolDetail: "",
  21984. // toolType: 0,
  21985. // askCount: 1,
  21986. // askTitle: "",
  21987. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21988. // },
  21989. // ],
  21990. // isShowTools: false,
  21991. // askCount: 1,
  21992. // isFold: 0,
  21993. // askTitle: "",
  21994. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  21995. // checkJson: [{ checkCount: [], checkPerent: [] }],
  21996. // homeworkList: [],
  21997. // })
  21998. // }
  21999. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  22000. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22001. // _this.$forceUpdate();
  22002. // }
  22003. // // if (data.result) {
  22004. // // console.log(data.result);
  22005. // // let dArray = JSON.parse(data.result)
  22006. // // _this.dArray = dArray
  22007. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  22008. // // for (var i = 0; i < dArray.length; i++) {
  22009. // // let _task = dArray[i]
  22010. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22011. // // task: _task.task,
  22012. // // taskDetail: "",
  22013. // // taskDetail2: _task.detail,
  22014. // // taskDetail3: "",
  22015. // // chapterData: [],
  22016. // // toolText: "",
  22017. // // toolChoose: [
  22018. // // {
  22019. // // tool: [],
  22020. // // toolDetail: "",
  22021. // // toolType: 0,
  22022. // // askCount: 1,
  22023. // // askTitle: "",
  22024. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22025. // // },
  22026. // // ],
  22027. // // isShowTools: false,
  22028. // // askCount: 1,
  22029. // // isFold: 1,
  22030. // // askTitle: "",
  22031. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22032. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  22033. // // homeworkList: [],
  22034. // // })
  22035. // // }
  22036. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22037. // // _this.$forceUpdate();
  22038. // // }
  22039. // callback ? callback() : ''
  22040. // }).catch(function (error) {
  22041. // _this.loading = false
  22042. // console.log(error);
  22043. // });
  22044. this.isFileCancelToken = this.ajax.setCancelSource();
  22045. let parm = {
  22046. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22047. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22048. session_name: uuidv4(),
  22049. userId: this.userid,
  22050. file_ids: fileid.length ? [...fileid] : '',
  22051. model: 'gpt-4o-2024-08-06',
  22052. temperature: 0.1,
  22053. }
  22054. this.ajax
  22055. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  22056. .then((response) => {
  22057. console.log(response);
  22058. let data = response.data.FunctionResponse
  22059. if (data.message) {
  22060. console.log(data.message);
  22061. let dArray = []
  22062. try {
  22063. let regex2 = new RegExp("/([{,])(\w+):/g")
  22064. let regex3 = new RegExp('/(?<!")content(?!")/g')
  22065. //
  22066. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex2, '$1"$2":').replace(regex3, '"content"'))
  22067. } catch (error) {
  22068. // callback ? callback() : ''
  22069. console.log("error_________________" + error);
  22070. try {
  22071. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  22072. let match = data.message.match(regex);
  22073. dArray = JSON.parse(match[0]);
  22074. } catch (error) {
  22075. // callback ? callback() : ''
  22076. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  22077. console.log("error_________________" + error);
  22078. _this.isFileCancelToken = null;
  22079. _this.aiSearchFile(messages, callback)
  22080. return
  22081. }
  22082. }
  22083. for(let i = 0; i < dArray.length; i++){
  22084. let content = dArray[i].content
  22085. let name = '参考资料'+(i+1)
  22086. let md = new MarkdownIt();
  22087. let _html = content ? md.render(content) : ''
  22088. setTimeout(()=>{
  22089. if(i == (dArray.length - 1)){
  22090. _this.generate2(name, _html, i, callback)
  22091. }else {
  22092. _this.generate2(name, _html, i)
  22093. }
  22094. }, 500 * i)
  22095. }
  22096. _this.isFileCancelToken = null
  22097. _this.$forceUpdate();
  22098. }
  22099. })
  22100. .catch((error) => {
  22101. callback ? callback() : ''
  22102. _this.isFileCancelToken = null
  22103. console.log(error);
  22104. });
  22105. },
  22106. createFileid(url) {
  22107. let _this = this
  22108. return new Promise((resolve, reject) => {
  22109. try {
  22110. _this.ajax
  22111. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  22112. url: url,
  22113. })
  22114. .then((res) => {
  22115. let _data = res.data.FunctionResponse;
  22116. if (_data.result && _data.result.id) {
  22117. resolve(_data.result.id)
  22118. }else {
  22119. resolve(1)
  22120. }
  22121. }).catch(function (error) {
  22122. resolve(1)
  22123. });
  22124. }catch (e){
  22125. resolve(1)
  22126. }
  22127. });
  22128. }
  22129. },
  22130. beforeDestroy() {
  22131. // clearTimeout(this.timer);
  22132. // this.timer = null;
  22133. // clearInterval(this.timer2);
  22134. // this.timer2 = null;
  22135. clearInterval(this.pasteTimer);
  22136. this.pasteTimer = null;
  22137. },
  22138. beforeRouteLeave(to, from, next) {
  22139. // clearTimeout(this.timer);
  22140. // this.timer = null;
  22141. // clearInterval(this.timer2);
  22142. // this.timer2 = null;
  22143. clearInterval(this.pasteTimer);
  22144. this.pasteTimer = null;
  22145. next();
  22146. },
  22147. created() {
  22148. this.selectFileid();
  22149. this.selectAiFileid();
  22150. this.getStudent();
  22151. this.getTeacher();
  22152. this.getClass();
  22153. this.selectGrage();
  22154. this.getTemplate();
  22155. this.getTipsTemplate();
  22156. // this.selectType();
  22157. this.selectEva();
  22158. if(this.istemplate == 1){
  22159. this.isOutline = true
  22160. this.isOutline2 = true
  22161. this.courseTextBool = true
  22162. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  22163. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  22164. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  22165. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  22166. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  22167. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  22168. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  22169. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  22170. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  22171. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  22172. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  22173. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  22174. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  22175. }
  22176. this.loading = false;
  22177. // this.timer2 = setInterval(() => {
  22178. // this.selectEva();
  22179. // }, 5000);
  22180. // this.pasteTimer = setInterval(() => {
  22181. // this.getPaste();
  22182. // }, 1000);
  22183. this.pasteTimer = setInterval(() => {
  22184. this.getPaste2();
  22185. }, 500);
  22186. setTimeout(() => {
  22187. // this.selectAllType();
  22188. this.selectCourseDetail();
  22189. }, 500);
  22190. let _this = this;
  22191. window.pasteStage = function (json) {
  22192. _this.pasteStage(json);
  22193. };
  22194. window.pasteTask = function (json) {
  22195. _this.pasteTask(json);
  22196. };
  22197. },
  22198. };
  22199. </script>
  22200. <style scoped>
  22201. @media screen and (max-width: 1280px) {
  22202. .mbCss {
  22203. flex-direction: column !important;
  22204. }
  22205. .pjCss {
  22206. width: 100% !important;
  22207. }
  22208. .evaCss {
  22209. width: 100% !important;
  22210. margin-top: 10px;
  22211. }
  22212. }
  22213. .el-table>>>.even_row {
  22214. background-color: #f1f1f1 !important;
  22215. }
  22216. .dialog_diy>>>.el-dialog__header {
  22217. background: #3c3c3c !important;
  22218. padding: 15px 20px;
  22219. }
  22220. .dialog_diy>>>.el-dialog__title {
  22221. color: #fff;
  22222. }
  22223. .dialog_diy>>>.el-dialog__headerbtn {
  22224. top: 19px;
  22225. }
  22226. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  22227. color: #fff;
  22228. }
  22229. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  22230. color: #fff;
  22231. }
  22232. .dialog_diy>>>.el-dialog__body,
  22233. .dialog_diy>>>.el-dialog__footer {
  22234. background: #fafafa;
  22235. }
  22236. .dialog_diy3>>>.el-dialog__body,
  22237. .dialog_diy3>>>.el-dialog__footer {
  22238. background: #eee !important;
  22239. }
  22240. .dialog_diy3>>>.el-dialog__body {
  22241. padding: 20px 20px;
  22242. }
  22243. .dialog_diyStage>>>.el-dialog__body {
  22244. padding: 10px;
  22245. }
  22246. .source_diy>>>.el-dialog {
  22247. height: 100% !important;
  22248. margin: 0 auto !important;
  22249. }
  22250. .source_diy>>>.el-dialog__body {
  22251. height: calc(100% - 185px);
  22252. overflow: auto;
  22253. background: #e6eaf0;
  22254. }
  22255. .source_diy>>>.el-dialog__footer {
  22256. background: #e6eaf0 !important;
  22257. }
  22258. .left {
  22259. border-right: 1px solid rgb(60, 94, 143);
  22260. display: flex;
  22261. flex-direction: column;
  22262. align-items: center;
  22263. min-height: 600px;
  22264. width: 385px;
  22265. height: 80%;
  22266. }
  22267. .tips {
  22268. color: rgb(128, 128, 128);
  22269. font-size: 12px;
  22270. width: 270px;
  22271. margin: 40px;
  22272. }
  22273. .pb_content {
  22274. height: 100% !important;
  22275. /* margin: 0 20px 0 20px; */
  22276. }
  22277. .pb_content_body {
  22278. width: 100% !important;
  22279. height: 100%;
  22280. display: flex;
  22281. }
  22282. .info_solid {
  22283. width: 270px;
  22284. height: 30px;
  22285. border-left: 1px solid #bdbdbd;
  22286. margin: 10px 0px 10px 30px;
  22287. }
  22288. .info_steps {
  22289. width: 270px;
  22290. font-size: 0.875rem;
  22291. display: flex;
  22292. align-items: center;
  22293. }
  22294. .info_steps span:nth-child(1) {
  22295. width: 30px;
  22296. height: 30px;
  22297. background: rgba(0, 0, 0, 0.38);
  22298. display: block;
  22299. color: #fff;
  22300. border-radius: 40px;
  22301. text-align: center;
  22302. line-height: 30px;
  22303. }
  22304. .steps_active {
  22305. background: #3d67bc !important;
  22306. }
  22307. .info_steps span:nth-child(2) {
  22308. margin-left: 5px;
  22309. }
  22310. .right {
  22311. height: 100%;
  22312. width: 100%;
  22313. display: flex;
  22314. overflow: hidden;
  22315. flex-direction: column;
  22316. }
  22317. .leftBar{
  22318. width: 290px;
  22319. height: calc(100% - 50px);
  22320. overflow: auto;
  22321. border-radius: 5px;
  22322. margin: 25px auto;
  22323. box-sizing: border-box;
  22324. margin-right: 10px;
  22325. }
  22326. .leftBar2{
  22327. width: 400px;
  22328. min-width: 400px;
  22329. height: calc(100% - 50px);
  22330. overflow: auto;
  22331. border-radius: 5px;
  22332. margin: 25px auto;
  22333. box-sizing: border-box;
  22334. margin-right: 10px;
  22335. background: #fff;
  22336. padding: 5px;
  22337. border-radius: 5px;
  22338. }
  22339. .basic_box {
  22340. margin: 0 auto;
  22341. position: relative;
  22342. padding: 0 20px 0 20px;
  22343. }
  22344. .basic_box_success {
  22345. width: 100%;
  22346. min-height: 455px;
  22347. padding: 50px 0;
  22348. position: relative;
  22349. text-align: center;
  22350. border-bottom: 1px solid #bfbfbf;
  22351. box-sizing: border-box;
  22352. display: flex;
  22353. align-items: center;
  22354. flex-direction: column;
  22355. justify-content: center;
  22356. }
  22357. .info_title {
  22358. font-size: 1.5em;
  22359. margin-right: 25px;
  22360. /* margin: 20px 30px 20px 30px; */
  22361. }
  22362. .bInfo_title {
  22363. text-align: left;
  22364. margin: 10px 0;
  22365. }
  22366. .small_title {
  22367. font-size: 14px;
  22368. line-height: 40px;
  22369. }
  22370. .chapter_beizhu {
  22371. font-size: 12px;
  22372. font-weight: bold;
  22373. float: right;
  22374. color: rgb(128, 128, 128);
  22375. margin-top: 5px;
  22376. }
  22377. .chapter_uploadBox1 {
  22378. text-align: left;
  22379. background-color: rgb(242, 242, 242);
  22380. width: 100%;
  22381. height: 67px;
  22382. padding: 0px 15px;
  22383. border-radius: 8px;
  22384. overflow: hidden;
  22385. font-size: 16px;
  22386. box-sizing: border-box;
  22387. position: relative;
  22388. }
  22389. .chapter_add {
  22390. width: 100%;
  22391. height: 32px;
  22392. margin-top: 15px;
  22393. cursor: pointer;
  22394. }
  22395. .chapter_add_l {
  22396. margin-left: 5px;
  22397. width: 30px;
  22398. height: 30px;
  22399. float: left;
  22400. border: 1px solid #aaa;
  22401. color: #aaa;
  22402. border-radius: 50%;
  22403. font-size: 25px;
  22404. text-align: center;
  22405. }
  22406. .chapter_add_r {
  22407. font-size: 18px;
  22408. height: 40px;
  22409. line-height: 30px;
  22410. text-indent: 10px;
  22411. color: #aaa;
  22412. }
  22413. .chapter_add_r span {
  22414. font-size: 12px;
  22415. color: rgb(204, 204, 204);
  22416. }
  22417. .chapter_add_input {
  22418. display: none;
  22419. }
  22420. .line {
  22421. width: 85%;
  22422. margin: 0 auto;
  22423. border-top: 1px solid #e5e5e5;
  22424. margin-top: 20px;
  22425. }
  22426. .info_btnBox {
  22427. width: calc(100%);
  22428. display: flex;
  22429. justify-content: center;
  22430. height: 80px;
  22431. align-items: center;
  22432. background: #fff;
  22433. margin: 0 auto;
  22434. border-top: 2px solid rgb(228, 232, 237);
  22435. box-sizing: border-box;
  22436. }
  22437. .info_btnBox2 {
  22438. width: calc(100%);
  22439. display: flex;
  22440. justify-content: center;
  22441. height: 20px;
  22442. align-items: center;
  22443. background: #fff;
  22444. margin: 0 auto;
  22445. border-top: 2px solid rgb(228, 232, 237);
  22446. box-sizing: border-box;
  22447. overflow: hidden;
  22448. cursor: pointer;
  22449. }
  22450. .info_btnBox3 {
  22451. width: calc(100%);
  22452. display: flex;
  22453. justify-content: flex-end;
  22454. padding: 0 20px;
  22455. height: 60px;
  22456. align-items: center;
  22457. background: unset;
  22458. margin: 0 auto;
  22459. /* border-top: 1px solid rgb(228, 232, 237); */
  22460. box-sizing: border-box;
  22461. overflow: hidden;
  22462. cursor: pointer;
  22463. background: #fff;
  22464. border-radius: 10px;
  22465. }
  22466. .info_btn+.info_btn {
  22467. margin-left: 15px;
  22468. }
  22469. .info_btn,
  22470. .teacherWord {
  22471. color: #fff;
  22472. background-color: #0f7eff;
  22473. padding: 8px 24px;
  22474. font-size: 0.9375rem;
  22475. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  22476. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  22477. min-width: 64px;
  22478. font-weight: 500;
  22479. border-radius: 4px;
  22480. box-sizing: border-box;
  22481. border: none;
  22482. cursor: pointer;
  22483. }
  22484. .teacherWord {
  22485. width: 105px !important;
  22486. text-align: center !important;
  22487. line-height: 36px !important;
  22488. padding: 0 !important;
  22489. font-size: 14px !important;
  22490. margin: 10px 0 !important;
  22491. }
  22492. .template_box {
  22493. display: flex;
  22494. flex-wrap: wrap;
  22495. }
  22496. .wordTeacher {
  22497. display: flex;
  22498. flex-direction: column;
  22499. width: 100px;
  22500. height: 100px;
  22501. text-align: center;
  22502. font-size: 13px;
  22503. margin: 0 20px 20px 0;
  22504. background: #f0f4fa;
  22505. position: relative;
  22506. border-radius: 5px;
  22507. align-items: center;
  22508. justify-content: center;
  22509. border: 1px solid #cad1dc;
  22510. color: #0e1e33;
  22511. /* padding: 25px 0px; */
  22512. cursor: pointer;
  22513. }
  22514. .wordTeacher::after {
  22515. content: "";
  22516. display: block;
  22517. position: absolute;
  22518. width: 15px;
  22519. height: 15px;
  22520. right: 10px;
  22521. top: 10px;
  22522. background-image: url(../../../assets/icon/new/choose_a.png);
  22523. background-size: 100% 100%;
  22524. }
  22525. .wordTeacherA::after {
  22526. background-image: url(../../../assets/icon/new/choose_b.png);
  22527. }
  22528. .wordTeacher:nth-child(5n) {
  22529. margin-right: 0px;
  22530. }
  22531. .wordPic {
  22532. margin: 0 auto;
  22533. width: 30px;
  22534. height: 30px;
  22535. cursor: pointer;
  22536. }
  22537. .deleteWord {
  22538. width: 22px;
  22539. height: 22px;
  22540. position: absolute;
  22541. right: 5px;
  22542. top: -15px;
  22543. cursor: pointer;
  22544. display: none;
  22545. z-index: 999;
  22546. }
  22547. .wordPic>img,
  22548. .deleteWord>img,
  22549. .addToolImg>img {
  22550. width: 100%;
  22551. height: 100%;
  22552. }
  22553. .info_btn:hover {
  22554. background-color: #4f7cd5 !important;
  22555. }
  22556. .cru_selectBox {
  22557. display: flex;
  22558. margin: 15px 0;
  22559. flex-wrap: nowrap;
  22560. white-space: nowrap;
  22561. overflow: auto;
  22562. position: relative;
  22563. height: 40px;
  22564. max-width: calc(100% - 175px);
  22565. }
  22566. .cru_selectBox::-webkit-scrollbar {
  22567. /*滚动条整体样式*/
  22568. width: 6px;
  22569. /*高宽分别对应横竖滚动条的尺寸*/
  22570. height: 6px;
  22571. }
  22572. /*定义滚动条轨道 内阴影+圆角*/
  22573. .cru_selectBox::-webkit-scrollbar-track {
  22574. border-radius: 10px;
  22575. background-color: #eee;
  22576. }
  22577. /*定义滑块 内阴影+圆角*/
  22578. .cru_selectBox::-webkit-scrollbar-thumb {
  22579. border-radius: 10px;
  22580. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  22581. background-color: rgba(0, 0, 0, 0.1);
  22582. }
  22583. .cru_line {
  22584. position: absolute;
  22585. bottom: 0px;
  22586. transition: all 0.5s;
  22587. left: 0px;
  22588. width: 50px;
  22589. height: 4px;
  22590. left: 10px;
  22591. border-radius: 2px;
  22592. background: #3681fc;
  22593. }
  22594. .cru_select {
  22595. font-size: 18px;
  22596. margin-right: 20px;
  22597. margin-left: 5px;
  22598. cursor: pointer;
  22599. color: #0e1e33;
  22600. }
  22601. .cru_select:hover {
  22602. color: #3681fc !important;
  22603. }
  22604. .cru_selected {
  22605. color: #3681fc !important;
  22606. font-weight: bold;
  22607. }
  22608. .chapter_box {
  22609. margin-top: 10px;
  22610. width: 100%;
  22611. padding: 10px 20px;
  22612. background: #fff;
  22613. border-radius: 8px;
  22614. box-sizing: border-box;
  22615. }
  22616. .chapter_contentbox {
  22617. display: flex;
  22618. align-items: center;
  22619. /* margin-top: 15px; */
  22620. }
  22621. .chapter_contentbox .cc_title {
  22622. margin: 0px;
  22623. color: black;
  22624. display: block;
  22625. white-space: nowrap;
  22626. overflow: hidden;
  22627. text-overflow: ellipsis;
  22628. margin-right: 20px;
  22629. font-size: 18px;
  22630. height: 20px;
  22631. line-height: 22px;
  22632. min-width: fit-content;
  22633. display: flex;
  22634. }
  22635. .chapter_contentbox .cc_title::before {
  22636. content: "";
  22637. height: 100%;
  22638. width: 3px;
  22639. background: #3681fc;
  22640. border-radius: 3px;
  22641. opacity: 1;
  22642. display: block;
  22643. margin-right: 10px;
  22644. }
  22645. .chapter_contentbox .cc_input {
  22646. width: 100%;
  22647. display: flex;
  22648. }
  22649. .show_taskD {
  22650. min-width: fit-content;
  22651. margin-left: 10px;
  22652. display: flex;
  22653. align-items: center;
  22654. font-size: 14px;
  22655. cursor: pointer;
  22656. color: #717c8d;
  22657. }
  22658. .show_taskD>img {
  22659. width: 15px;
  22660. margin-right: 5px;
  22661. transition: 0.2s all;
  22662. transform: rotate(-90deg);
  22663. }
  22664. .show_taskD.show>img {
  22665. transform: rotate(0deg);
  22666. }
  22667. .show_toolD {
  22668. min-width: fit-content;
  22669. margin-left: 10px;
  22670. display: flex;
  22671. align-items: center;
  22672. font-size: 14px;
  22673. cursor: pointer;
  22674. color: #717c8d;
  22675. /* position: absolute;
  22676. right: 45px;
  22677. top: 5px; */
  22678. }
  22679. .show_toolD>img {
  22680. width: 15px;
  22681. margin-right: 5px;
  22682. transition: 0.2s all;
  22683. transform: rotate(-90deg);
  22684. }
  22685. .show_toolD.show>img {
  22686. transform: rotate(0deg);
  22687. }
  22688. .remove {
  22689. background-image: url("../../../assets/icon/new/delete_u.png");
  22690. cursor: pointer;
  22691. opacity: 0.5;
  22692. width: 30px;
  22693. min-width: 30px;
  22694. height: 30px;
  22695. background-size: 100% 100%;
  22696. background-repeat: no-repeat;
  22697. margin-left: 10px;
  22698. }
  22699. .remove1 {
  22700. background-image: url("../../../assets/remove1.png");
  22701. background-repeat: no-repeat;
  22702. background-position: 5px 10px;
  22703. width: 40px;
  22704. height: 50px;
  22705. cursor: pointer;
  22706. margin-left: 10px;
  22707. }
  22708. .binfo_input {
  22709. width: 100%;
  22710. margin: 0;
  22711. padding: 12px 14px;
  22712. display: block;
  22713. min-width: 0;
  22714. outline: none;
  22715. box-sizing: border-box;
  22716. background: none;
  22717. border: none;
  22718. border-radius: 4px;
  22719. background: #fff;
  22720. font-size: 16px;
  22721. resize: none;
  22722. font-family: "Microsoft YaHei";
  22723. min-height: 48px;
  22724. /* border: 1px solid #3682fc00; */
  22725. border: 1.5px solid #cad1dc;
  22726. }
  22727. .binfo_textarea {
  22728. border: 1.5px solid #cad1dc;
  22729. font-size: 16px;
  22730. resize: none;
  22731. /* background: #f6f6f6; */
  22732. font-family: "Microsoft YaHei";
  22733. }
  22734. .binfo_input:focus-visible {
  22735. border: 1.5px solid #3681fc !important;
  22736. }
  22737. .time {
  22738. display: flex;
  22739. margin: 35px 0 80px 0;
  22740. }
  22741. .chapter_btnbox {
  22742. width: 160px;
  22743. border-radius: 5px;
  22744. border: 2px dashed gray;
  22745. display: flex;
  22746. padding: 8px 50px;
  22747. align-items: center;
  22748. justify-content: center;
  22749. margin: 30px auto 0;
  22750. cursor: pointer;
  22751. }
  22752. .icon_add {
  22753. position: relative;
  22754. width: 24px;
  22755. padding-top: 20px;
  22756. border-radius: 100%;
  22757. border-width: 2px;
  22758. border-style: solid;
  22759. border-color: gray;
  22760. }
  22761. .icon_add i:nth-child(1) {
  22762. position: absolute;
  22763. left: 50%;
  22764. top: 50%;
  22765. height: 60%;
  22766. transform: translate(-50%, -50%);
  22767. border-width: 1px;
  22768. border-style: solid;
  22769. border-color: inherit;
  22770. }
  22771. .icon_add i:nth-child(2) {
  22772. position: absolute;
  22773. top: 50%;
  22774. left: 50%;
  22775. width: 60%;
  22776. transform: translate(-50%, -50%);
  22777. border-width: 1px;
  22778. border-style: solid;
  22779. border-color: inherit;
  22780. }
  22781. .chapter_btn_w {
  22782. font-size: 0.9375rem;
  22783. font-weight: bold;
  22784. color: gray;
  22785. margin-left: 20px;
  22786. }
  22787. .disUoloadSty>>>.el-icon-plus {
  22788. display: none !important;
  22789. /* 上传按钮隐藏 */
  22790. }
  22791. .imgLeft {
  22792. margin: 15px 0;
  22793. }
  22794. .add_info_box {
  22795. margin: 0 0 0 auto;
  22796. display: flex;
  22797. flex-wrap: wrap;
  22798. }
  22799. .add_info_box button {
  22800. margin: 0 5px 10px 0;
  22801. }
  22802. .add_info_box2 {
  22803. display: flex;
  22804. align-items: center;
  22805. flex-wrap: wrap;
  22806. }
  22807. .add_info_box2::after {
  22808. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  22809. color: red;
  22810. font-size: 14px;
  22811. margin-bottom: 10px;
  22812. }
  22813. .add_chapters_box {
  22814. text-align: left;
  22815. background-color: #fff;
  22816. width: 100%;
  22817. border-radius: 4px;
  22818. font-size: 16px;
  22819. box-sizing: border-box;
  22820. position: relative;
  22821. padding: 0 15px;
  22822. height: auto;
  22823. overflow-y: auto;
  22824. overflow-x: hidden;
  22825. border: 1px solid #cad1dc;
  22826. }
  22827. .add_chapters_box.add_c_none {
  22828. display: flex;
  22829. justify-content: center;
  22830. align-items: center;
  22831. padding: 15px;
  22832. }
  22833. .add_c_none>img {
  22834. width: 25px;
  22835. }
  22836. .add_chapters_box.add_c_none>span {
  22837. font-size: 14px;
  22838. font-weight: 400;
  22839. margin: 0 0 5px 5px;
  22840. }
  22841. .homework_box {
  22842. display: flex;
  22843. align-items: flex-start;
  22844. flex-wrap: wrap;
  22845. margin: 15px 0 0 0;
  22846. flex-direction: column;
  22847. align-content: flex-start;
  22848. }
  22849. .course_homework {
  22850. display: flex;
  22851. justify-content: center;
  22852. flex-direction: row;
  22853. align-items: center;
  22854. margin: 0 10px 0 0;
  22855. }
  22856. .course_homework>>>.el-input__inner {
  22857. width: 140px;
  22858. margin-left: 15px;
  22859. }
  22860. .chapter_upload_move {
  22861. position: relative;
  22862. background-color: #fff;
  22863. position: absolute;
  22864. width: 100%;
  22865. top: 0px;
  22866. left: 0px;
  22867. border: 1px solid #eee;
  22868. border-radius: 5px;
  22869. transition: width 2s;
  22870. -moz-transition: width 2s;
  22871. -webkit-transition: width 2s;
  22872. -o-transition: width 2s;
  22873. }
  22874. .chapter_upload_l_i {
  22875. background-image: url("../../../assets/icon.png");
  22876. background-position: 3px -165px;
  22877. width: 30px;
  22878. height: 30px;
  22879. margin: 10px auto 0 auto;
  22880. }
  22881. .course_input_box {
  22882. display: flex;
  22883. margin-right: 20px;
  22884. width: 100%;
  22885. align-items: center;
  22886. position: relative;
  22887. }
  22888. .course_input_box>.binfo_input {
  22889. width: calc(100% - 0 - 200px - 20px);
  22890. margin: 0 10px;
  22891. }
  22892. .bb_courseIcon {
  22893. width: 57px;
  22894. height: 45px;
  22895. background: #f0f4fa;
  22896. border-radius: 5px 0px 0px 5px;
  22897. display: flex;
  22898. align-items: center;
  22899. justify-content: center;
  22900. border-right: 1.5px solid rgb(202, 209, 220);
  22901. box-sizing: border-box;
  22902. position: absolute;
  22903. left: 1.5px;
  22904. }
  22905. .bb_courseIcon>img {
  22906. width: 25px;
  22907. height: auto;
  22908. }
  22909. .big_box {
  22910. /* margin-top: 20px; */
  22911. display: flex;
  22912. justify-content: space-between;
  22913. /* border-bottom: 1px solid #E0E2ED; */
  22914. }
  22915. .left_first {
  22916. display: flex;
  22917. flex-direction: column;
  22918. flex-wrap: nowrap;
  22919. width: calc(100% - 310px);
  22920. padding: 20px;
  22921. box-sizing: border-box;
  22922. background: #fff;
  22923. border-radius: 5px;
  22924. }
  22925. .right_first {
  22926. width: 300px;
  22927. display: flex;
  22928. align-items: center;
  22929. justify-content: center;
  22930. /* border-left: 1px solid #E0E2ED; */
  22931. box-sizing: border-box;
  22932. padding: 20px;
  22933. flex-direction: column;
  22934. background: #fff;
  22935. border-radius: 5px;
  22936. }
  22937. .ai_box {
  22938. width: 204px;
  22939. display: flex;
  22940. justify-content: flex-end;
  22941. margin-bottom: 15px;
  22942. }
  22943. .ai_content {
  22944. display: flex;
  22945. align-items: center;
  22946. font-size: 14px;
  22947. padding: 7px 20px;
  22948. box-sizing: border-box;
  22949. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  22950. border-radius: 12px;
  22951. font-weight: 700;
  22952. cursor: pointer;
  22953. }
  22954. .ai_content>img {
  22955. width: 40px;
  22956. margin-right: 5px;
  22957. }
  22958. .c_info_title {
  22959. padding: 15px 0 15px 0;
  22960. font-size: 16px;
  22961. font-weight: bold;
  22962. margin: 0 0 0 20px;
  22963. box-sizing: border-box;
  22964. display: flex;
  22965. align-items: center;
  22966. line-height: 20px;
  22967. }
  22968. .c_info_title::before {
  22969. content: "";
  22970. display: block;
  22971. width: 3px;
  22972. height: 20px;
  22973. background: #0061ff;
  22974. border-radius: 3px;
  22975. margin: 0 5px 0 0;
  22976. }
  22977. .right_title {
  22978. height: 30px;
  22979. padding: 15px 0 15px 20px;
  22980. border-bottom: 1px solid #f2f2f2;
  22981. font-size: 1.5em;
  22982. font-weight: bold;
  22983. color: #0f7eff;
  22984. margin: 0 auto;
  22985. }
  22986. .people {
  22987. border: 1px solid rgb(229 229 229);
  22988. /* height: 495px; */
  22989. height: 350px;
  22990. border-radius: 5px;
  22991. width: 100%;
  22992. overflow: auto;
  22993. }
  22994. .people_top {
  22995. display: flex;
  22996. width: 100%;
  22997. /* justify-content: space-between; */
  22998. /* align-items: center; */
  22999. flex-direction: column;
  23000. padding: 10px 10px 0;
  23001. box-sizing: border-box;
  23002. }
  23003. .people_nav,
  23004. .people_top_right {
  23005. /* padding: 20px 0 0 20px; */
  23006. }
  23007. .people_top_right {
  23008. height: 40px;
  23009. margin-bottom: 10px;
  23010. }
  23011. .people_search {
  23012. display: flex;
  23013. position: relative;
  23014. }
  23015. .people_search>>>.el-input__inner {
  23016. /* height: 25px; */
  23017. width: 100%;
  23018. }
  23019. .search_img {
  23020. width: 20px;
  23021. height: 20px;
  23022. position: absolute;
  23023. right: 10px;
  23024. top: 50%;
  23025. transform: translateY(-50%);
  23026. }
  23027. .search_img>img {
  23028. width: 100%;
  23029. height: 100%;
  23030. }
  23031. .people_name {
  23032. display: flex;
  23033. justify-content: flex-start;
  23034. padding: 20px 10px;
  23035. flex-direction: column;
  23036. flex-wrap: wrap;
  23037. }
  23038. .p_box {
  23039. position: relative;
  23040. }
  23041. .people_name>>>.el-checkbox {
  23042. width: 100%;
  23043. display: flex;
  23044. align-items: center;
  23045. margin-bottom: 10px;
  23046. }
  23047. .people_name>>>.el-checkbox__label {
  23048. text-overflow: ellipsis;
  23049. overflow: hidden;
  23050. width: calc(100%);
  23051. }
  23052. .people_name2>>>.el-checkbox__label {
  23053. width: calc(100% - 130px);
  23054. }
  23055. .inviteCode {
  23056. position: absolute;
  23057. right: 30px;
  23058. color: #237ade;
  23059. top: 0;
  23060. cursor: pointer;
  23061. font-size: 13px;
  23062. }
  23063. .noneInvite {
  23064. color: #a8a8a8;
  23065. }
  23066. .inviteImg {
  23067. position: absolute;
  23068. right: 5px;
  23069. top: 0;
  23070. width: 20px;
  23071. }
  23072. .right_img {
  23073. width: 150px;
  23074. height: 150px;
  23075. margin: 0 auto;
  23076. }
  23077. .right_img>img {
  23078. width: 100%;
  23079. height: 100%;
  23080. }
  23081. .number {
  23082. margin-top: 20px;
  23083. color: #4aa6ff;
  23084. text-decoration: underline;
  23085. }
  23086. .success_button {
  23087. display: flex;
  23088. text-align: center;
  23089. margin: 5% 0 auto;
  23090. flex-direction: row;
  23091. justify-content: center;
  23092. }
  23093. .look_course {
  23094. margin-right: 40px;
  23095. background: #3d67bc;
  23096. width: 200px;
  23097. height: 35px;
  23098. line-height: 35px;
  23099. color: #fff;
  23100. text-align: center;
  23101. font-size: 14px;
  23102. border-radius: 5px;
  23103. cursor: pointer;
  23104. }
  23105. .attend_others {
  23106. width: 250px;
  23107. background: #4fb13c;
  23108. height: 35px;
  23109. line-height: 35px;
  23110. color: #fff;
  23111. text-align: center;
  23112. font-size: 14px;
  23113. border-radius: 5px;
  23114. cursor: pointer;
  23115. }
  23116. .dialog_diy2>>>.el-dialog__body {
  23117. text-align: center;
  23118. }
  23119. .write_togother {
  23120. position: absolute;
  23121. right: 45px;
  23122. display: flex;
  23123. top: 5%;
  23124. }
  23125. .write_people {
  23126. font-size: 14px;
  23127. line-height: 50px;
  23128. padding-right: 10px;
  23129. }
  23130. .end_write {
  23131. background: #3d67bc;
  23132. color: #fff;
  23133. width: 100px;
  23134. height: 35px;
  23135. line-height: 35px;
  23136. text-align: center;
  23137. font-size: 14px;
  23138. border-radius: 5px;
  23139. cursor: pointer;
  23140. }
  23141. .chapter_upload+.chapter_upload {
  23142. /* margin-top: 15px; */
  23143. border-top: 1px solid #e7ebf1;
  23144. }
  23145. .chapter_upload {
  23146. height: 45px;
  23147. position: relative;
  23148. display: flex;
  23149. align-items: center;
  23150. width: 100%;
  23151. min-height: 45px;
  23152. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  23153. /* border-radius: 4px; */
  23154. /* overflow: hidden; */
  23155. box-sizing: border-box;
  23156. }
  23157. .chapter_upload_drag {
  23158. position: absolute;
  23159. cursor: pointer;
  23160. width: 16px;
  23161. height: 16px;
  23162. left: -9px;
  23163. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  23164. background-size: 100% 100%;
  23165. z-index: 10;
  23166. display: none;
  23167. }
  23168. .isNavStage>.chapter_upload_drag {
  23169. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  23170. }
  23171. .chapter_upload_t {
  23172. background-color: #fff;
  23173. position: absolute;
  23174. height: 100%;
  23175. top: 0px;
  23176. left: 0px;
  23177. box-sizing: border-box;
  23178. }
  23179. .chapter_upload_o {
  23180. width: 100%;
  23181. height: 100%;
  23182. position: relative;
  23183. z-index: 1;
  23184. }
  23185. .chapter_upload_ic {
  23186. margin: 0 15px 0px auto;
  23187. display: flex;
  23188. align-items: center;
  23189. }
  23190. .chapter_upload_ic_l {
  23191. width: 50px;
  23192. height: 50px;
  23193. float: left;
  23194. }
  23195. .chapter_upload_ic_l div {
  23196. width: 30px;
  23197. height: 35px;
  23198. background: url("../../../assets/icon/icon.png");
  23199. }
  23200. .chapter_upload_ic_edit {
  23201. height: 100%;
  23202. display: flex;
  23203. align-items: center;
  23204. cursor: pointer;
  23205. margin: 0 10px 0 0;
  23206. }
  23207. .chapter_upload_ic_edit div {
  23208. width: 18px;
  23209. height: 18px;
  23210. background-image: url("../../../assets/icon/new/edit_u.png");
  23211. background-size: 100% 100%;
  23212. }
  23213. .chapter_upload_ic_check {
  23214. height: 100%;
  23215. display: flex;
  23216. align-items: center;
  23217. cursor: pointer;
  23218. margin: 0 10px 0 0;
  23219. }
  23220. .chapter_upload_ic_check div {
  23221. width: 18px;
  23222. height: 18px;
  23223. background-image: url("../../../assets/icon/course/lookeye.svg");
  23224. background-size: 100% 100%;
  23225. }
  23226. .chapter_upload_ic_r {
  23227. height: 100%;
  23228. display: flex;
  23229. align-items: center;
  23230. cursor: pointer;
  23231. }
  23232. .chapter_upload_ic_r div {
  23233. width: 18px;
  23234. height: 18px;
  23235. background-image: url("../../../assets/icon/new/delete_u.png");
  23236. background-size: 100% 100%;
  23237. }
  23238. .chapter_upload_n {
  23239. display: flex;
  23240. text-indent: 10px;
  23241. text-decoration: none;
  23242. text-overflow: ellipsis;
  23243. white-space: nowrap;
  23244. overflow: hidden;
  23245. width: 55%;
  23246. margin-left: 10px;
  23247. cursor: pointer;
  23248. margin-top: 2px;
  23249. align-items: center;
  23250. }
  23251. .chapter_upload_l_i2,
  23252. .chapter_upload_l_i3,
  23253. .chapter_upload_l_i8,
  23254. .chapter_upload_l_i6,
  23255. .chapter_upload_l_i12,
  23256. .chapter_upload_l_i14,
  23257. .chapter_upload_l_i13 {
  23258. width: 15px;
  23259. height: 15px;
  23260. background-size: 100% 100%;
  23261. }
  23262. .chapter_upload_l_i2 {
  23263. background-image: url("../../../assets/icon/new/u_word.png");
  23264. }
  23265. .chapter_upload_l_i3 {
  23266. background-image: url("../../../assets/icon/new/u_video.png");
  23267. }
  23268. .chapter_upload_l_i8 {
  23269. background-image: url("../../../assets/icon/new/u_url.png");
  23270. }
  23271. .chapter_upload_l_i14 {
  23272. background-image: url("../../../assets/icon/new/u_source.png");
  23273. }
  23274. .chapter_upload_l_i6 {
  23275. background-image: url("../../../assets/icon/new/u_picture.png");
  23276. }
  23277. .chapter_upload_l_i12 {
  23278. background-image: url("../../../assets/icon/new/u_word.png");
  23279. }
  23280. .chapter_upload_l_i13 {
  23281. background-image: url("../../../assets/icon/new/u_img.png");
  23282. }
  23283. .chapter_upload_noSee {
  23284. background-image: url("../../../assets/icon/new/u_noUpload.png");
  23285. width: 18px;
  23286. height: 18px;
  23287. background-size: 100% 100%;
  23288. display: block;
  23289. margin-right: 10px;
  23290. }
  23291. .chapter_upload_ud {
  23292. display: flex;
  23293. flex-direction: row;
  23294. justify-content: center;
  23295. margin: 0 10px 0 0;
  23296. }
  23297. .chapter_upload_ud>.chapter_upload_up {
  23298. margin-bottom: 0;
  23299. margin-right: 10px;
  23300. }
  23301. .chapter_upload_down,
  23302. .chapter_upload_up {
  23303. width: 20px;
  23304. height: 20px;
  23305. background: #e4eaf2;
  23306. cursor: pointer;
  23307. margin: 0 auto;
  23308. border-radius: 5px;
  23309. display: flex;
  23310. justify-content: center;
  23311. align-items: center;
  23312. }
  23313. .chapter_upload_up::after,
  23314. .chapter_upload_down::after {
  23315. content: "";
  23316. background-image: url("../../../assets/icon/new/downBtn.png");
  23317. width: 13px;
  23318. height: 13px;
  23319. background-size: 100% 100%;
  23320. display: block;
  23321. }
  23322. .chapter_upload_up::after {
  23323. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  23324. }
  23325. .chapter_upload_up {
  23326. margin-bottom: 5px;
  23327. }
  23328. .chapter_upload_ud2 {
  23329. display: flex;
  23330. flex-direction: row;
  23331. justify-content: center;
  23332. margin: 0 10px 0 0;
  23333. }
  23334. .chapter_upload_ud2>.chapter_upload_up2 {
  23335. margin-bottom: 0;
  23336. margin-right: 10px;
  23337. }
  23338. .chapter_upload_down2,
  23339. .chapter_upload_up2 {
  23340. cursor: pointer;
  23341. margin: 0 auto;
  23342. border-radius: 5px;
  23343. display: flex;
  23344. justify-content: center;
  23345. align-items: center;
  23346. color: #717c8d;
  23347. font-size: 14px;
  23348. }
  23349. .chapter_upload_up2 {
  23350. margin-right: 10px;
  23351. }
  23352. .chapter_upload_up2::before,
  23353. .chapter_upload_down2::before {
  23354. content: "";
  23355. background-image: url("../../../assets/icon/new/c_down.png");
  23356. width: 14px;
  23357. height: 14px;
  23358. background-size: 100% 100%;
  23359. display: block;
  23360. margin-right: 5px;
  23361. }
  23362. .chapter_upload_up2::before {
  23363. background-image: url("../../../assets/icon/new/c_up.png") !important;
  23364. }
  23365. .addWordStyle {
  23366. display: flex;
  23367. flex-direction: row;
  23368. justify-content: flex-start;
  23369. overflow-x: auto;
  23370. white-space: nowrap;
  23371. flex-wrap: wrap;
  23372. }
  23373. /* table 样式 */
  23374. .cont>>>table {
  23375. border-top: 1px solid #ccc;
  23376. border-left: 1px solid #ccc;
  23377. }
  23378. .cont>>>table td,
  23379. .cont>>>table th {
  23380. border-bottom: 1px solid #ccc;
  23381. border-right: 1px solid #ccc;
  23382. /* padding: 20px 5px; */
  23383. padding: 5px 10px;
  23384. max-width: 0px;
  23385. height: 30px;
  23386. vertical-align: baseline;
  23387. }
  23388. .cont>>>table th {
  23389. border-bottom: 2px solid #ccc;
  23390. text-align: center;
  23391. }
  23392. /* blockquote 样式 */
  23393. .cont>>>blockquote {
  23394. display: block;
  23395. border-left: 8px solid #d0e5f2;
  23396. padding: 5px 10px;
  23397. margin: 10px 0;
  23398. line-height: 1.4;
  23399. font-size: 100%;
  23400. background-color: #f1f1f1;
  23401. }
  23402. /* code 样式 */
  23403. .cont>>>code {
  23404. display: inline-block;
  23405. /* *display: inline; */
  23406. zoom: 1;
  23407. background-color: #f1f1f1;
  23408. border-radius: 3px;
  23409. padding: 3px 5px;
  23410. margin: 0 3px;
  23411. }
  23412. .cont>>>pre code {
  23413. display: block;
  23414. }
  23415. /* ul ol 样式 */
  23416. .cont>>>ul,
  23417. ol {
  23418. margin: 10px 0 10px 20px;
  23419. }
  23420. .wordbox {
  23421. display: flex;
  23422. flex-wrap: wrap;
  23423. cursor: pointer;
  23424. width: 100%;
  23425. }
  23426. .checkword {
  23427. width: 22px;
  23428. height: 22px;
  23429. margin: 10px auto 0;
  23430. cursor: pointer;
  23431. }
  23432. .checkword img {
  23433. width: 100%;
  23434. }
  23435. .stepBg {
  23436. display: flex;
  23437. justify-content: space-between;
  23438. align-items: center;
  23439. background: #fff;
  23440. width: calc(100%);
  23441. margin: 0 auto;
  23442. }
  23443. .stepBorder {
  23444. height: 3px !important;
  23445. background: #cad1dc;
  23446. width: 100px !important;
  23447. margin: 0 15px !important;
  23448. position: relative;
  23449. }
  23450. .border-active {
  23451. background: #3681fc !important;
  23452. }
  23453. .border-active::before,
  23454. .border-active::after {
  23455. border-color: #3681fc !important;
  23456. }
  23457. .stepBorder::before,
  23458. .stepBorder::after {
  23459. content: "";
  23460. width: 9px;
  23461. height: 9px;
  23462. background: #ffffff;
  23463. opacity: 1;
  23464. border: 2px solid #acb4bf;
  23465. display: block;
  23466. box-sizing: border-box;
  23467. border-radius: 50%;
  23468. position: absolute;
  23469. top: 50%;
  23470. transform: translateY(-50%);
  23471. }
  23472. .stepBorder::after {
  23473. right: -9px;
  23474. }
  23475. .stepTop {
  23476. width: 100%;
  23477. /* border-radius: 10px; */
  23478. display: flex;
  23479. justify-content: center;
  23480. align-items: center;
  23481. flex-wrap: nowrap;
  23482. background: #fff;
  23483. /* top: 18%; */
  23484. height: 80px;
  23485. border-bottom: 2px solid rgb(228, 232, 237);
  23486. box-sizing: border-box;
  23487. }
  23488. .stepTop2 {
  23489. width: 100%;
  23490. /* border-radius: 10px; */
  23491. display: flex;
  23492. justify-content: center;
  23493. align-items: center;
  23494. flex-wrap: nowrap;
  23495. background: #fff;
  23496. /* top: 18%; */
  23497. height: 20px;
  23498. border-bottom: 2px solid rgb(228, 232, 237);
  23499. box-sizing: border-box;
  23500. overflow: hidden;
  23501. cursor: pointer;
  23502. }
  23503. .stepTop>div img {
  23504. width: 100%;
  23505. }
  23506. .stepTop>div {
  23507. height: 50px;
  23508. width: 180px;
  23509. cursor: pointer;
  23510. margin: 10px 0;
  23511. border-radius: 10px;
  23512. }
  23513. .first,
  23514. .second,
  23515. .third,
  23516. .four {
  23517. background: #3681fc;
  23518. height: 90px;
  23519. color: #fff;
  23520. display: flex;
  23521. flex-direction: row;
  23522. align-items: center;
  23523. justify-content: center;
  23524. }
  23525. .first>div:nth-child(1),
  23526. .second>div:nth-child(1),
  23527. .third>div:nth-child(1),
  23528. .four>div:nth-child(1) {
  23529. margin: 5px 10px 0 0;
  23530. width: 2rem;
  23531. }
  23532. .firstNo,
  23533. .secondNo,
  23534. .thirdNo,
  23535. .fourNo {
  23536. background: #e7e7e7;
  23537. color: #adadad;
  23538. display: flex;
  23539. flex-direction: row;
  23540. align-items: center;
  23541. justify-content: center;
  23542. }
  23543. .firstNo>div:nth-child(1),
  23544. .secondNo>div:nth-child(1),
  23545. .thirdNo>div:nth-child(1),
  23546. .fourNo>div:nth-child(1) {
  23547. margin: 5px 10px 0 0;
  23548. width: 2rem;
  23549. }
  23550. .uploadWidth>>>.el-upload {
  23551. width: 60px;
  23552. height: 60px;
  23553. position: relative;
  23554. }
  23555. .addPeople {
  23556. background: #fa6060;
  23557. width: 150px;
  23558. height: 40px;
  23559. color: #fff;
  23560. border-radius: 5px;
  23561. text-align: center;
  23562. line-height: 40px;
  23563. font-size: 14px;
  23564. cursor: pointer;
  23565. }
  23566. .kcImg {
  23567. width: 60px;
  23568. margin-left: 10px;
  23569. }
  23570. .zyImg {
  23571. width: 55px;
  23572. margin: 0 10px;
  23573. }
  23574. .deleteZy {
  23575. width: 20px;
  23576. position: absolute;
  23577. top: 5px;
  23578. right: 5px;
  23579. cursor: pointer;
  23580. }
  23581. .kcImg>img,
  23582. .zyImg>img,
  23583. .deleteZy>img {
  23584. width: 100%;
  23585. height: 100%;
  23586. }
  23587. .zyBox {
  23588. display: flex;
  23589. flex-direction: row;
  23590. align-items: center;
  23591. background: #67d37d;
  23592. color: #fff;
  23593. width: 210px;
  23594. margin: 20px 20px 0 0;
  23595. border-radius: 10px;
  23596. height: 70px;
  23597. position: relative;
  23598. }
  23599. .upCss {
  23600. display: flex;
  23601. flex-direction: row;
  23602. justify-content: flex-start;
  23603. }
  23604. .upCss>>>.el-icon-plus {
  23605. position: none !important;
  23606. width: 200px;
  23607. height: 100px;
  23608. display: flex;
  23609. flex-wrap: nowrap;
  23610. flex-direction: column;
  23611. align-items: center;
  23612. justify-content: center;
  23613. border: 1px dashed #ccc;
  23614. min-width: 78px;
  23615. min-height: 100px;
  23616. z-index: 999;
  23617. }
  23618. .upCss>>>.el-upload-list__item-name {
  23619. width: 100px;
  23620. white-space: nowrap;
  23621. overflow: hidden;
  23622. text-overflow: ellipsis;
  23623. }
  23624. .upCss>>>.el-upload-list__item .el-icon-close {
  23625. font-size: 20px;
  23626. z-index: 9999;
  23627. }
  23628. .addStageImg {
  23629. min-width: 20px;
  23630. min-height: 20px;
  23631. width: 20px;
  23632. height: 20px;
  23633. cursor: pointer;
  23634. }
  23635. .addHW {
  23636. width: 28px;
  23637. height: 28px;
  23638. cursor: pointer;
  23639. }
  23640. .addStageImg>img,
  23641. .addHW>img {
  23642. width: 100%;
  23643. height: 100%;
  23644. }
  23645. .addNewPP>>>.el-dialog__body {
  23646. padding: 5px 20px;
  23647. }
  23648. .addNewPP>>>.el-dialog {
  23649. margin-top: 5vh !important;
  23650. }
  23651. .addNewPP2>>>.el-dialog__body {
  23652. padding: 5px 0;
  23653. }
  23654. .addNewPP2>>>.el-dialog {
  23655. margin-top: 5vh !important;
  23656. }
  23657. .isHeight {
  23658. height: 680px;
  23659. }
  23660. .toolChoose {
  23661. display: flex;
  23662. /* width: 100%; */
  23663. flex-direction: row;
  23664. flex-wrap: wrap;
  23665. }
  23666. .tool,
  23667. .isToolChoose {
  23668. display: flex;
  23669. flex-direction: column;
  23670. flex-wrap: nowrap;
  23671. width: fit-content;
  23672. margin: 10px 0 10px 0;
  23673. align-items: center;
  23674. border: 2px solid #dbdbdb00;
  23675. padding: 10px 20px;
  23676. border-radius: 5px;
  23677. cursor: pointer;
  23678. /* box-shadow: 0 0 2px 0px #dedede; */
  23679. position: relative;
  23680. box-sizing: border-box;
  23681. }
  23682. .tool:hover {
  23683. border: 2px solid #a5c7ff;
  23684. }
  23685. .tool:hover>.noCTool {
  23686. display: block;
  23687. opacity: 0.5;
  23688. }
  23689. .isToolChoose {
  23690. border: 2px solid #438aff !important;
  23691. box-shadow: 0 0 2px 0px #438aff;
  23692. opacity: 1 !important;
  23693. }
  23694. .isCTool,
  23695. .noCTool {
  23696. width: 30px;
  23697. height: 30px;
  23698. position: absolute;
  23699. top: -4px;
  23700. right: -4px;
  23701. }
  23702. .noCTool {
  23703. display: none;
  23704. }
  23705. .isCTool>img,
  23706. .noCTool>img {
  23707. width: 100%;
  23708. height: 100%;
  23709. }
  23710. .tool+.tool {
  23711. margin-right: 10px;
  23712. }
  23713. .whiteBIcon {
  23714. width: 80px;
  23715. cursor: pointer;
  23716. display: flex;
  23717. flex-direction: column;
  23718. flex-wrap: nowrap;
  23719. align-items: center;
  23720. font-size: 14px;
  23721. }
  23722. .whiteBIcon>img,
  23723. .toolIcon>img,
  23724. .arrow>img {
  23725. width: 100%;
  23726. height: 100%;
  23727. }
  23728. .check img {
  23729. width: 20px;
  23730. height: 20px;
  23731. }
  23732. .whiteBIcon>img {
  23733. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  23734. border-radius: 15px;
  23735. }
  23736. .whiteBIcon>div:nth-child(2) {
  23737. height: 20px;
  23738. line-height: 20px;
  23739. }
  23740. .check {
  23741. /* width: 20px;
  23742. height: 20px; */
  23743. cursor: pointer;
  23744. margin: 10px 0 0;
  23745. }
  23746. .checkDiv {
  23747. display: flex;
  23748. align-items: center;
  23749. }
  23750. .checkDiv span {
  23751. margin-left: 5px;
  23752. color: #858585;
  23753. }
  23754. .customWidth>>>.el-dialog {
  23755. min-width: 600px !important;
  23756. }
  23757. .CollaborativeCss {
  23758. width: 100%;
  23759. display: flex;
  23760. justify-content: center;
  23761. align-items: center;
  23762. box-sizing: border-box;
  23763. padding: 10px 0;
  23764. cursor: pointer;
  23765. }
  23766. .CollaborativeCss >>> .el-tooltip {
  23767. overflow: hidden;
  23768. white-space: nowrap;
  23769. text-overflow: ellipsis;
  23770. }
  23771. .CollaborativeCss2 {
  23772. background: #e0eafb;
  23773. color: #3681fc;
  23774. font-weight: 700;
  23775. border-radius: 5px;
  23776. }
  23777. .a_addBox {
  23778. margin: 10px 0;
  23779. background: #fff;
  23780. padding: 15px;
  23781. /* max-height: 600px; */
  23782. overflow: auto;
  23783. }
  23784. .a_add_box {
  23785. border-bottom: 2px solid #eee;
  23786. padding-bottom: 25px;
  23787. }
  23788. .a_add_head {
  23789. display: flex;
  23790. align-items: center;
  23791. justify-content: space-between;
  23792. margin: 10px 0 0 0;
  23793. font-size: 18px;
  23794. }
  23795. .a_add_checkType {
  23796. margin-top: 10px;
  23797. display: flex;
  23798. font-size: 14px;
  23799. align-items: center;
  23800. }
  23801. .a_add_checkType span {
  23802. box-sizing: border-box;
  23803. padding: 0 0 5px 0;
  23804. cursor: pointer;
  23805. }
  23806. .a_add_checkType span+span {
  23807. margin-left: 10px;
  23808. }
  23809. .a_add_checkType .active {
  23810. border-bottom: 2px solid #409eff;
  23811. color: #409eff;
  23812. }
  23813. .a_add_head .a_add_head_input {
  23814. /* width: 540px; */
  23815. width: 100%;
  23816. }
  23817. .a_add_head .a_add_head_div {
  23818. display: flex;
  23819. align-items: center;
  23820. justify-content: space-between;
  23821. }
  23822. .a_add_body {
  23823. display: flex;
  23824. /* align-items: center; */
  23825. align-items: flex-end;
  23826. }
  23827. .a_add_input {
  23828. display: flex;
  23829. align-items: center;
  23830. flex-wrap: wrap;
  23831. }
  23832. .a_add_input_choice {
  23833. flex-direction: column;
  23834. margin-right: 10px;
  23835. }
  23836. .a_add_input_choice>>>.el-radio {
  23837. display: flex;
  23838. align-items: center;
  23839. flex-direction: row-reverse;
  23840. margin: 30px 0 0 0;
  23841. position: relative;
  23842. }
  23843. .a_add_input_choice>>>.el-checkbox {
  23844. display: flex;
  23845. align-items: center;
  23846. flex-direction: row-reverse;
  23847. margin: 30px 0 0 0;
  23848. position: relative;
  23849. }
  23850. .width100 {
  23851. width: 100%;
  23852. }
  23853. .a_add_input .a_add_persent {
  23854. width: 100%;
  23855. }
  23856. .a_add_persent_div {
  23857. width: 100%;
  23858. display: flex;
  23859. align-items: center;
  23860. }
  23861. .a_add_persent_div span {
  23862. margin: 5px 0;
  23863. }
  23864. .a_add_persent_div span:nth-child(1) {
  23865. width: 30%;
  23866. }
  23867. .a_add_persent_div span:nth-child(2) {
  23868. width: 7%;
  23869. }
  23870. .a_add_persent_div span:nth-child(3) {
  23871. width: 40%;
  23872. }
  23873. .a_add_body_div {
  23874. display: flex;
  23875. align-items: center;
  23876. justify-content: center;
  23877. /* flex-direction: column; */
  23878. position: absolute;
  23879. right: -20px;
  23880. transform: translateX(100%);
  23881. }
  23882. .a_add_body_div>>>.el-button--primary {
  23883. background: #466b99;
  23884. border: none;
  23885. }
  23886. .all_choose {
  23887. display: flex;
  23888. flex-direction: row;
  23889. align-items: flex-start;
  23890. width: 100%;
  23891. }
  23892. .all_choose+.all_choose {
  23893. /* margin-top: 10px */
  23894. }
  23895. .all_choose>span {
  23896. min-width: fit-content;
  23897. display: block;
  23898. white-space: nowrap;
  23899. overflow: hidden;
  23900. text-overflow: ellipsis;
  23901. margin-right: 20px;
  23902. font-weight: bold;
  23903. font-size: 14px;
  23904. }
  23905. .all_choose>>>.el-checkbox-group {
  23906. display: flex;
  23907. flex-direction: row;
  23908. width: 100%;
  23909. flex-wrap: wrap;
  23910. align-content: center;
  23911. justify-content: flex-start;
  23912. align-items: center;
  23913. margin-top: 3px;
  23914. }
  23915. .all_choose>.el-checkbox-group>>>.el-checkbox {
  23916. margin-bottom: 10px;
  23917. display: flex;
  23918. flex-direction: row;
  23919. align-items: center;
  23920. margin-right: 10px;
  23921. }
  23922. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  23923. min-width: 80px;
  23924. overflow: hidden;
  23925. width: 80px;
  23926. text-overflow: ellipsis;
  23927. white-space: nowrap;
  23928. }
  23929. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  23930. width: auto;
  23931. }
  23932. .choose>div:nth-child(3)>span {
  23933. /* letter-spacing: 0 !important; */
  23934. }
  23935. .choose {
  23936. display: flex;
  23937. flex-direction: column;
  23938. flex-wrap: nowrap;
  23939. height: 100%;
  23940. justify-content: space-evenly;
  23941. align-items: flex-start;
  23942. }
  23943. .both {
  23944. display: flex;
  23945. flex-direction: row;
  23946. flex-wrap: wrap;
  23947. width: 100%;
  23948. align-items: center;
  23949. justify-content: flex-start;
  23950. margin: 15px 0;
  23951. }
  23952. .notice>>>.el-dialog {
  23953. width: 500px !important;
  23954. text-align: center;
  23955. }
  23956. .notice>>>.el-button {
  23957. margin-top: 20px;
  23958. }
  23959. .whiteBg {
  23960. /* background: #fff; */
  23961. border-radius: 10px;
  23962. }
  23963. .wb_j_box {
  23964. display: flex;
  23965. width: 100%;
  23966. padding: 0 20px 0;
  23967. box-sizing: border-box;
  23968. }
  23969. .wb_j_box_content {
  23970. width: calc(100% - 55% - 100px);
  23971. display: flex;
  23972. align-items: center;
  23973. }
  23974. .wb_j_box_p_box {
  23975. max-width: calc(100% - 200px);
  23976. word-break: break-all;
  23977. overflow: hidden;
  23978. margin: 0 0 0 10px;
  23979. font-size: 14px;
  23980. color: #6e6e6e;
  23981. z-index: 999;
  23982. }
  23983. .chooseWho {
  23984. display: flex;
  23985. width: 410px;
  23986. flex-direction: row;
  23987. flex-wrap: nowrap;
  23988. justify-content: space-between;
  23989. padding-bottom: 10px;
  23990. }
  23991. .chooseWho>div {
  23992. cursor: pointer;
  23993. padding-bottom: 10px;
  23994. font-weight: bold;
  23995. }
  23996. .isChooseActive {
  23997. color: #3e88f4;
  23998. border-bottom: 2px solid #2f80f3;
  23999. }
  24000. .toolSort {
  24001. display: flex;
  24002. flex-direction: row;
  24003. flex-wrap: wrap;
  24004. justify-content: flex-start;
  24005. align-items: flex-start;
  24006. }
  24007. .toolSort>div {
  24008. margin-right: 10px;
  24009. }
  24010. .tools {
  24011. width: 100%;
  24012. display: flex;
  24013. flex-direction: column;
  24014. flex-wrap: nowrap;
  24015. align-items: flex-start;
  24016. }
  24017. .leftTools,
  24018. .rightTools {
  24019. width: 50%;
  24020. }
  24021. .leftTools+.leftTools {
  24022. border-top: 1px solid #dbdbdb;
  24023. padding-top: 30px;
  24024. }
  24025. .rightTools {
  24026. display: flex;
  24027. flex-direction: row;
  24028. flex-wrap: nowrap;
  24029. justify-content: space-around;
  24030. }
  24031. .firstToolList {
  24032. display: flex;
  24033. flex-direction: column;
  24034. flex-wrap: nowrap;
  24035. align-items: center;
  24036. }
  24037. .iconList {
  24038. display: flex;
  24039. flex-direction: row;
  24040. flex-wrap: wrap;
  24041. justify-content: flex-start;
  24042. align-items: center;
  24043. margin: 20px 0 5px 0;
  24044. width: 240px;
  24045. min-width: 240px;
  24046. }
  24047. .iconTool {
  24048. display: flex;
  24049. flex-direction: column;
  24050. flex-wrap: nowrap;
  24051. align-items: center;
  24052. justify-content: flex-start;
  24053. margin: 15px 10px;
  24054. }
  24055. .toolIcon {
  24056. width: 50px;
  24057. }
  24058. .taskBorder {
  24059. /* border: 1px solid #CAD1DC; */
  24060. border-radius: 10px;
  24061. margin-top: 10px;
  24062. min-height: 670px;
  24063. position: relative;
  24064. background: #fff;
  24065. padding: 20px;
  24066. overflow: hidden;
  24067. box-sizing: border-box;
  24068. }
  24069. .smallTaskBorder {
  24070. height: 405px;
  24071. min-height: 405px !important;
  24072. overflow: hidden;
  24073. }
  24074. /* .taskBorder>div {
  24075. padding: 30px 30px 10px;
  24076. } */
  24077. .addTaskBorder {
  24078. /* border: 2px solid #5E9AFC; */
  24079. border-radius: 8px;
  24080. margin-top: 10px;
  24081. cursor: pointer;
  24082. /* height: 50px;
  24083. line-height: 50px; */
  24084. background: #fff;
  24085. padding: 15px 0;
  24086. display: flex;
  24087. align-items: center;
  24088. justify-content: center;
  24089. }
  24090. /* .addTaskBorder>div {
  24091. margin: 0 auto;
  24092. display: flex;
  24093. align-items: center;
  24094. justify-content: center;
  24095. }
  24096. .addTaskBorder>div>img {
  24097. width: 20px;
  24098. }
  24099. .addTaskBorder>div>span {
  24100. font-size: 16px;
  24101. margin-left: 10px;
  24102. color: #5E9AFC;
  24103. } */
  24104. .funBlock {
  24105. display: flex;
  24106. padding: 15px 0;
  24107. flex-direction: row;
  24108. justify-content: center;
  24109. align-items: center;
  24110. position: absolute;
  24111. right: 0;
  24112. bottom: 0;
  24113. background: #fff;
  24114. width: 100%;
  24115. height: 60px;
  24116. z-index: 9;
  24117. }
  24118. .fold {
  24119. display: flex;
  24120. margin: 0 20px;
  24121. flex-direction: row;
  24122. align-items: center;
  24123. cursor: pointer;
  24124. color: #2b7bff;
  24125. }
  24126. .arrow {
  24127. margin-right: 8px;
  24128. width: 16px;
  24129. height: 16px;
  24130. min-width: 16px;
  24131. min-height: 16px;
  24132. background-size: 100% 100%;
  24133. display: block;
  24134. background-image: url(../../../assets/icon/new/u_up.png);
  24135. /* border-left: 7px solid transparent;
  24136. border-bottom: 7px solid #717C8D;
  24137. border-top: 0px solid transparent;
  24138. border-right: 7px solid transparent; */
  24139. /* box-sizing: border-box; */
  24140. transition: all 0.3s;
  24141. }
  24142. .arrowZ {
  24143. transform: rotate(180deg);
  24144. }
  24145. .addToolFun {
  24146. display: flex;
  24147. width: 150px;
  24148. flex-direction: row;
  24149. align-items: center;
  24150. justify-content: center;
  24151. border: 2px dashed #cad1dc;
  24152. border-radius: 5px;
  24153. height: 50px;
  24154. margin: 35px auto 0;
  24155. cursor: pointer;
  24156. }
  24157. .addToolFun2 {
  24158. display: flex;
  24159. width: 150px;
  24160. border: 2px dashed #cad1dc;
  24161. flex-direction: row;
  24162. align-items: center;
  24163. justify-content: center;
  24164. border-radius: 5px;
  24165. height: 50px;
  24166. margin: 0 auto 0;
  24167. cursor: pointer;
  24168. }
  24169. .addToolFun2>div,
  24170. .addToolFun>div {
  24171. display: flex;
  24172. line-height: 50px;
  24173. }
  24174. .addToolImg {
  24175. width: 20px;
  24176. height: 20px;
  24177. margin-right: 10px;
  24178. }
  24179. .addToolsDia>>>.el-dialog__body {
  24180. padding: 20px;
  24181. }
  24182. .addToolsDia>>>.el-dialog__body>.toolChoose {
  24183. padding: 0;
  24184. }
  24185. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  24186. padding: 0;
  24187. border-bottom: none;
  24188. margin-bottom: 0;
  24189. }
  24190. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  24191. width: 100%;
  24192. }
  24193. .lineCss>>>.el-form-item__label {
  24194. width: auto !important;
  24195. }
  24196. .lineCss>>>.el-form-item__content {
  24197. margin-left: 50px !important;
  24198. }
  24199. .newSteps {
  24200. display: flex;
  24201. width: 100% !important;
  24202. /* height: 80px; */
  24203. cursor: pointer;
  24204. margin: 10px 0;
  24205. border-radius: 10px;
  24206. flex-direction: row;
  24207. align-content: center;
  24208. justify-content: center;
  24209. align-items: center;
  24210. margin: 0 !important;
  24211. }
  24212. /* 评价样式 */
  24213. .elist_css {
  24214. padding-bottom: 75px !important;
  24215. }
  24216. .elist_title {
  24217. margin-bottom: 10px;
  24218. }
  24219. .elist_input {
  24220. width: 100%;
  24221. }
  24222. .elist_input_box {
  24223. display: flex;
  24224. align-items: center;
  24225. flex-wrap: wrap;
  24226. }
  24227. .elist_input_box+.elist_input_box {
  24228. margin-top: 30px;
  24229. }
  24230. .elist_input .elist_input_box input {
  24231. font: inherit;
  24232. color: currentColor;
  24233. width: 100%;
  24234. /* max-width: calc(100% - 385px); */
  24235. max-width: calc(100% - 150px);
  24236. padding: 8px 14px;
  24237. display: block;
  24238. min-width: 0;
  24239. outline: none;
  24240. border: 1px solid rgba(0, 0, 0, 0.23);
  24241. border-radius: 4px;
  24242. box-sizing: border-box;
  24243. background: #fff;
  24244. margin: 0 20px 0 0;
  24245. }
  24246. .elist_input .elist_input_box span {
  24247. height: 36px;
  24248. line-height: 36px;
  24249. color: rgb(82, 82, 82);
  24250. min-width: 80px;
  24251. }
  24252. .elist_input .elist_input_box .remove {
  24253. height: 20px;
  24254. width: 20px;
  24255. min-height: 20px;
  24256. min-width: 20px;
  24257. background-size: 100% 100%;
  24258. background-position: unset;
  24259. margin-left: 5px;
  24260. }
  24261. .elist_input_box>>>.el-rate {
  24262. display: flex;
  24263. height: 36px;
  24264. align-items: center;
  24265. }
  24266. .elist_input_box .elist_inptu_text {
  24267. width: 100%;
  24268. display: flex;
  24269. align-items: center;
  24270. margin-top: 10px;
  24271. }
  24272. .elist_input_box .elist_inptu_text input {
  24273. /* width: 500px; */
  24274. width: 100%;
  24275. max-width: unset;
  24276. }
  24277. .elist_input_box>>>.el-rate__icon {
  24278. font-size: 24px;
  24279. }
  24280. .elist_btn {
  24281. margin-top: 10px;
  24282. }
  24283. .lineTitle {
  24284. /* margin-top: 15px; */
  24285. width: 110px;
  24286. font-size: 16px;
  24287. display: flex;
  24288. align-items: center;
  24289. line-height: 20px;
  24290. }
  24291. .lineTitle::before {
  24292. content: "";
  24293. display: block;
  24294. width: 3px;
  24295. height: 20px;
  24296. background: #0061ff;
  24297. border-radius: 3px;
  24298. margin: 0 5px 0 0;
  24299. }
  24300. .clineTitle::before {
  24301. content: "";
  24302. display: block;
  24303. min-width: 10px;
  24304. width: 10px;
  24305. height: 10px;
  24306. background: #0061ff;
  24307. border-radius: 50%;
  24308. margin: 0 5px 0 0;
  24309. }
  24310. .courseTop {
  24311. display: flex;
  24312. flex-direction: row;
  24313. justify-content: space-between;
  24314. align-items: center;
  24315. width: calc(100% - 40px);
  24316. margin: 0 auto;
  24317. padding: 10px 0;
  24318. }
  24319. .stepsNav {
  24320. display: flex;
  24321. flex-direction: row;
  24322. justify-content: flex-start;
  24323. align-items: center;
  24324. }
  24325. .stepsWord {
  24326. font-size: 18px;
  24327. color: #fff;
  24328. font-weight: bold;
  24329. margin-left: auto;
  24330. background: rgb(15, 126, 255);
  24331. border-radius: 5px;
  24332. padding: 3px 25px;
  24333. box-sizing: border-box;
  24334. }
  24335. .stepBox {
  24336. width: calc(100% - 40px);
  24337. height: calc(100% - 50px);
  24338. overflow: hidden;
  24339. border-radius: 5px;
  24340. margin: 0 auto;
  24341. }
  24342. .rightBox {
  24343. width: calc(100%);
  24344. background: #f0f2f5;
  24345. /* border-radius: 10px; */
  24346. overflow: auto;
  24347. height: calc(100% - 150px);
  24348. margin: 0 auto;
  24349. position: relative;
  24350. box-sizing: border-box;
  24351. }
  24352. .e_add_top {
  24353. display: flex;
  24354. justify-content: space-between;
  24355. background: #fff;
  24356. position: absolute;
  24357. right: 20px;
  24358. height: 50px;
  24359. align-items: center;
  24360. }
  24361. .e_add_title2 {
  24362. display: flex;
  24363. align-items: center;
  24364. }
  24365. .e_add_title2 span {
  24366. width: 40px;
  24367. }
  24368. .e_add_title {
  24369. display: flex;
  24370. align-items: center;
  24371. color: #b8b8b8;
  24372. font-size: 18px;
  24373. position: relative;
  24374. height: 40px;
  24375. }
  24376. .e_add_title span {
  24377. margin-right: 10px;
  24378. }
  24379. .e_add_title .el_input {
  24380. width: 300px;
  24381. }
  24382. .e_add_title>>>.el-input__inner {
  24383. width: 400px;
  24384. }
  24385. .e_add_btn {}
  24386. .e_add_content {
  24387. display: flex;
  24388. width: 100%;
  24389. }
  24390. .e_add_list {
  24391. background: #fff;
  24392. height: 500px;
  24393. width: 210px;
  24394. position: relative;
  24395. margin: 15px 5px 0 0;
  24396. flex-shrink: 0;
  24397. display: flex;
  24398. flex-direction: column;
  24399. }
  24400. .e_add_list_title {
  24401. font-size: 20px;
  24402. width: 100%;
  24403. box-sizing: border-box;
  24404. padding: 15px 40px;
  24405. text-align: center;
  24406. border-bottom: 1px solid #eaeaea;
  24407. position: relative;
  24408. display: flex;
  24409. align-items: center;
  24410. justify-content: center;
  24411. height: 57px;
  24412. background: #f6f6f6;
  24413. }
  24414. .e_add_list_title span {
  24415. overflow: hidden;
  24416. white-space: nowrap;
  24417. text-overflow: ellipsis;
  24418. }
  24419. .e_add_list_title img {
  24420. position: absolute;
  24421. right: 15px;
  24422. width: 25px;
  24423. cursor: pointer;
  24424. top: 50%;
  24425. transform: translateY(-50%);
  24426. }
  24427. .e_add_list_body {
  24428. height: calc(100% - 187px);
  24429. overflow: auto;
  24430. }
  24431. .e_add_list_child {
  24432. width: 100%;
  24433. display: flex;
  24434. align-items: center;
  24435. justify-content: center;
  24436. position: relative;
  24437. box-sizing: border-box;
  24438. padding: 15px 40px;
  24439. text-align: center;
  24440. }
  24441. .e_add_list_child span {
  24442. overflow: hidden;
  24443. white-space: nowrap;
  24444. text-overflow: ellipsis;
  24445. cursor: pointer;
  24446. }
  24447. .e_add_list_child img {
  24448. position: absolute;
  24449. right: 10px;
  24450. width: 21px;
  24451. cursor: pointer;
  24452. top: 50%;
  24453. transform: translateY(-50%);
  24454. }
  24455. .e_add_list_child+.e_add_list_child {
  24456. border-top: 1px solid #eaeaea;
  24457. }
  24458. .e_add_list_child .active {
  24459. color: #409eff;
  24460. }
  24461. .e_add_list_btn {
  24462. position: absolute;
  24463. bottom: 0;
  24464. height: 50px;
  24465. background: rgb(120, 120, 254);
  24466. width: 100%;
  24467. color: #fff;
  24468. font-size: 16px;
  24469. text-align: center;
  24470. line-height: 50px;
  24471. cursor: pointer;
  24472. }
  24473. .e_add_list_detail {
  24474. position: absolute;
  24475. bottom: 0;
  24476. height: 130px;
  24477. background: rgb(120, 120, 254);
  24478. width: 100%;
  24479. color: #fff;
  24480. font-size: 16px;
  24481. display: flex;
  24482. align-items: center;
  24483. justify-content: center;
  24484. }
  24485. .e_add_list_detail textarea {
  24486. height: 90%;
  24487. width: 95%;
  24488. border: none;
  24489. resize: none;
  24490. outline: none;
  24491. padding: 5px;
  24492. box-sizing: border-box;
  24493. }
  24494. .e_add_list_pbox {
  24495. width: 100%;
  24496. }
  24497. .e_add_list_pbox_title {
  24498. height: 50px;
  24499. background: #fff;
  24500. display: flex;
  24501. align-items: center;
  24502. width: 100%;
  24503. box-sizing: border-box;
  24504. padding: 0 20px;
  24505. flex-direction: row;
  24506. flex-wrap: wrap;
  24507. }
  24508. .type_title {
  24509. font-size: 18px;
  24510. font-weight: 700;
  24511. }
  24512. .type_content {
  24513. font-size: 16px;
  24514. margin-left: 30px;
  24515. }
  24516. .type_content span+span {
  24517. margin-left: 20px;
  24518. }
  24519. .type_content span {
  24520. cursor: pointer;
  24521. padding-bottom: 5px;
  24522. box-sizing: border-box;
  24523. }
  24524. .type_content .active {
  24525. color: #409eff;
  24526. border-bottom: 2px solid #409eff;
  24527. }
  24528. .e_add_list_pbox_content {
  24529. height: calc(100% - 50px);
  24530. display: flex;
  24531. align-items: center;
  24532. width: 100%;
  24533. background: #fff;
  24534. }
  24535. .mbCss {
  24536. width: 100%;
  24537. display: flex;
  24538. flex-direction: row;
  24539. flex-wrap: nowrap;
  24540. align-content: center;
  24541. align-items: flex-start;
  24542. justify-content: flex-start;
  24543. }
  24544. .pjCss {
  24545. /* width: 42%; */
  24546. width: calc(100% - 55%);
  24547. display: flex;
  24548. flex-direction: column;
  24549. flex-wrap: nowrap;
  24550. align-items: flex-start;
  24551. }
  24552. .e_box {
  24553. /* display: flex; */
  24554. flex-wrap: wrap;
  24555. max-height: 500px;
  24556. align-items: flex-start;
  24557. overflow: auto;
  24558. width: 100%;
  24559. }
  24560. .e_card {
  24561. border: 1px solid #ccc;
  24562. background: #fff;
  24563. margin-right: 20px;
  24564. width: 270px;
  24565. display: flex;
  24566. flex-direction: column;
  24567. align-items: center;
  24568. border-radius: 5px;
  24569. margin-top: 10px;
  24570. text-align: center;
  24571. }
  24572. .e_card_picture {
  24573. margin: 10px 0;
  24574. }
  24575. .e_card_picture>img {
  24576. width: 50px;
  24577. }
  24578. .e_card_name {
  24579. width: 100%;
  24580. padding: 0 10px;
  24581. box-sizing: border-box;
  24582. margin-bottom: 10px;
  24583. overflow: hidden;
  24584. text-overflow: ellipsis;
  24585. white-space: nowrap;
  24586. }
  24587. .e_card_time {
  24588. width: 100%;
  24589. padding: 0 10px;
  24590. box-sizing: border-box;
  24591. font-size: 15px;
  24592. color: #c3c3c3;
  24593. margin-bottom: 10px;
  24594. }
  24595. .e_card_btn {
  24596. height: 40px;
  24597. display: flex;
  24598. align-items: center;
  24599. width: 100%;
  24600. background: rgb(244, 244, 244);
  24601. }
  24602. .e_card_btn:hover {
  24603. background: rgb(221 221 221);
  24604. }
  24605. .e_card_btn span {
  24606. flex: 1 1 auto;
  24607. text-align: center;
  24608. cursor: pointer;
  24609. }
  24610. .addEva {
  24611. border: 1px solid #ccc;
  24612. background: #fff;
  24613. margin-right: 20px;
  24614. width: 270px;
  24615. height: 149px;
  24616. display: flex;
  24617. flex-direction: column;
  24618. align-items: center;
  24619. border-radius: 5px;
  24620. margin-top: 10px;
  24621. text-align: center;
  24622. cursor: pointer;
  24623. justify-content: center;
  24624. }
  24625. .addEva>img {
  24626. width: 50px;
  24627. object-fit: cover;
  24628. }
  24629. .uploadFm {
  24630. border: 1px dashed #ccc;
  24631. width: 100%;
  24632. height: 140px;
  24633. position: relative;
  24634. cursor: pointer;
  24635. display: flex;
  24636. flex-direction: column;
  24637. justify-content: center;
  24638. align-items: center;
  24639. font-size: 14px;
  24640. color: #6e6e6e;
  24641. position: relative;
  24642. }
  24643. .cover_p {
  24644. width: 100% !important;
  24645. height: 100%;
  24646. object-fit: cover;
  24647. }
  24648. .uploadFm2:hover .cover_mask {
  24649. display: flex !important;
  24650. }
  24651. .cover_mask {
  24652. display: none;
  24653. width: 100%;
  24654. height: 100%;
  24655. position: absolute;
  24656. background: #00000054;
  24657. align-items: center;
  24658. justify-content: center;
  24659. flex-direction: column;
  24660. }
  24661. .cover_mask>img {
  24662. width: 30px;
  24663. }
  24664. .cover_mask>span {
  24665. color: #fff;
  24666. font-size: 12px;
  24667. }
  24668. .uploadFm>img {
  24669. width: 50px;
  24670. }
  24671. .fileCss {
  24672. width: 100%;
  24673. display: flex;
  24674. flex-direction: row;
  24675. flex-wrap: nowrap;
  24676. justify-content: space-around;
  24677. align-items: center;
  24678. padding-top: 15px;
  24679. }
  24680. .fileCss>div {
  24681. display: flex;
  24682. flex-direction: column;
  24683. align-items: center;
  24684. }
  24685. .fileCss .spanName {
  24686. margin-top: 10px;
  24687. }
  24688. .sysPicBox {
  24689. display: flex;
  24690. flex-direction: row;
  24691. flex-wrap: wrap;
  24692. align-content: flex-start;
  24693. height: 435px;
  24694. overflow: auto;
  24695. position: relative;
  24696. }
  24697. .picNone {
  24698. position: absolute;
  24699. left: 50%;
  24700. top: 45%;
  24701. transform: translate(-50%, -50%);
  24702. width: fit-content;
  24703. color: #9c9c9c;
  24704. }
  24705. .sysPic {
  24706. width: 200px;
  24707. height: 115px;
  24708. margin: 0 20px 20px 0;
  24709. cursor: pointer;
  24710. }
  24711. .sysPic>img,
  24712. .isSysPic>img,
  24713. .deletePic>img {
  24714. width: 100%;
  24715. height: 100%;
  24716. object-fit: cover;
  24717. }
  24718. .isSysPic {
  24719. width: 200px;
  24720. height: 115px;
  24721. position: relative;
  24722. }
  24723. .deletePic {
  24724. width: 20px;
  24725. height: 20px;
  24726. position: absolute;
  24727. top: 0;
  24728. right: 0;
  24729. cursor: pointer;
  24730. }
  24731. .select_box1 {
  24732. height: 100%;
  24733. }
  24734. .select_box1_img {
  24735. background: #fff;
  24736. border-radius: 5px;
  24737. padding: 15px;
  24738. box-sizing: border-box;
  24739. margin-bottom: 20px;
  24740. }
  24741. .select_box1_title {
  24742. padding: 0 0 15px 0;
  24743. border-bottom: 1px solid #eee;
  24744. margin-bottom: 15px;
  24745. }
  24746. .select_box1_title span:nth-child(1) {
  24747. font-size: 16px;
  24748. margin-right: 20px;
  24749. color: #000;
  24750. }
  24751. .select_box1_title span:nth-child(2) {
  24752. font-size: 14px;
  24753. color: rgb(112, 112, 112);
  24754. }
  24755. .select_box1_add_img {}
  24756. .select_box1_select {
  24757. background: #fff;
  24758. border-radius: 5px;
  24759. padding: 15px;
  24760. box-sizing: border-box;
  24761. height: calc(100% - 200px);
  24762. overflow: auto;
  24763. }
  24764. .select_box2 {
  24765. height: 100%;
  24766. }
  24767. .select_box2_title {
  24768. background: #fff;
  24769. border-radius: 5px;
  24770. padding: 5px 10px;
  24771. box-sizing: border-box;
  24772. margin-bottom: 10px;
  24773. }
  24774. .select_box2_box {
  24775. display: flex;
  24776. height: calc(100% - 30px);
  24777. }
  24778. .select_box2_img {
  24779. width: calc(100% - 310px);
  24780. height: 100%;
  24781. overflow: auto;
  24782. background: #fff;
  24783. border-radius: 5px;
  24784. }
  24785. .select_box2_img img {
  24786. width: 100%;
  24787. }
  24788. .select_box2_answer {
  24789. background: #fff;
  24790. margin-left: 10px;
  24791. border-radius: 5px;
  24792. width: 300px;
  24793. overflow: auto;
  24794. height: 100%;
  24795. display: flex;
  24796. flex-direction: column;
  24797. align-items: center;
  24798. padding-top: 10px;
  24799. box-sizing: border-box;
  24800. }
  24801. .select_box2_answer_box {
  24802. margin: 0 0 10px 0;
  24803. width: 85%;
  24804. }
  24805. .rate_textarea {
  24806. font: inherit;
  24807. color: currentColor;
  24808. width: 100%;
  24809. padding: 8px 14px;
  24810. display: block;
  24811. min-width: 0;
  24812. outline: none;
  24813. border: 1px solid rgba(0, 0, 0, 0.23);
  24814. border-radius: 4px;
  24815. box-sizing: border-box;
  24816. background: #fff;
  24817. margin: 0 20px 0 0;
  24818. resize: none;
  24819. }
  24820. .select_answer_title {
  24821. text-align: left;
  24822. width: 85%;
  24823. margin-bottom: 10px;
  24824. font-size: 18px;
  24825. color: #8e8e8e;
  24826. }
  24827. .mask {
  24828. background-color: rgb(0 0 0 / 30%);
  24829. /* position: fixed; */
  24830. position: absolute;
  24831. top: 0;
  24832. left: 0;
  24833. width: 100%;
  24834. height: 100%;
  24835. z-index: 90;
  24836. display: flex;
  24837. align-items: center;
  24838. justify-content: center;
  24839. }
  24840. .progressBox {
  24841. width: 300px;
  24842. height: 150px;
  24843. background: #fff;
  24844. border-radius: 10px;
  24845. box-shadow: 0 0 6px 1px #bfbfbf;
  24846. display: flex;
  24847. align-items: center;
  24848. justify-content: center;
  24849. flex-direction: column;
  24850. position: relative;
  24851. color: #6c6c6c;
  24852. }
  24853. .progressBox>>>.el-progress-bar__outer {
  24854. background-color: #d1dfff !important;
  24855. }
  24856. .progressBox .lbox {
  24857. height: 50px;
  24858. font-size: 19px;
  24859. display: flex;
  24860. align-items: center;
  24861. color: #747474;
  24862. }
  24863. .progressBox .lbox img {
  24864. width: 40px;
  24865. margin-right: 20px;
  24866. }
  24867. .closeCss {
  24868. position: absolute;
  24869. top: 8px;
  24870. right: 8px;
  24871. cursor: pointer;
  24872. width: 20px;
  24873. height: 20px;
  24874. }
  24875. .closeCss>img {
  24876. width: 100%;
  24877. height: 100%;
  24878. }
  24879. .updateTips::before {
  24880. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  24881. font-size: 14px;
  24882. margin-left: 20px;
  24883. font-weight: 400;
  24884. color: #ff3a3a;
  24885. margin-bottom: 10px;
  24886. display: block;
  24887. }
  24888. .updateMask {
  24889. width: 100%;
  24890. z-index: 3;
  24891. top: 0;
  24892. position: absolute;
  24893. /* background-color: rgba(0,0,0,.3); */
  24894. }
  24895. .t_j_box {
  24896. display: flex;
  24897. }
  24898. .t_j_box span:nth-child(1) {
  24899. width: 15%;
  24900. overflow: hidden;
  24901. margin-right: 10px;
  24902. text-overflow: ellipsis;
  24903. white-space: nowrap;
  24904. }
  24905. .t_j_box span:nth-child(2) {
  24906. width: 30%;
  24907. overflow: hidden;
  24908. text-overflow: ellipsis;
  24909. margin-right: 10px;
  24910. }
  24911. .t_j_box span:nth-child(3) {
  24912. max-width: calc(55% - 20px);
  24913. overflow: hidden;
  24914. text-overflow: ellipsis;
  24915. }
  24916. .sentenBox {
  24917. background: #fff;
  24918. height: 600px;
  24919. overflow: auto;
  24920. background-image: url("../../../assets/icon/conSentences/csBg.png");
  24921. background-position: 102%;
  24922. background-repeat: no-repeat;
  24923. background-size: 60%;
  24924. }
  24925. .sentenBox>.sentenContent {
  24926. padding-bottom: 10px;
  24927. width: 97%;
  24928. margin: 0 auto;
  24929. }
  24930. .sentenBox>.sentenContent+.sentenContent {
  24931. border-top: 1px solid #cbcbcb;
  24932. }
  24933. .addSen {
  24934. background: #409efe;
  24935. width: 90px;
  24936. color: #fff;
  24937. height: 35px;
  24938. text-align: center;
  24939. line-height: 35px;
  24940. border-radius: 5px;
  24941. float: right;
  24942. margin: 10px 20px 0 0;
  24943. cursor: pointer;
  24944. }
  24945. .sentenTop {
  24946. display: flex;
  24947. flex-direction: row;
  24948. flex-wrap: nowrap;
  24949. align-items: center;
  24950. }
  24951. .sentenTop::before {
  24952. content: attr(index);
  24953. background: #3681fc;
  24954. border-radius: 50%;
  24955. color: #fff;
  24956. width: 25px;
  24957. height: 25px;
  24958. min-width: 25px;
  24959. min-height: 25px;
  24960. text-align: center;
  24961. line-height: 25px;
  24962. margin-right: 5px;
  24963. }
  24964. .sentenTop>div:nth-child(2) {
  24965. width: 300px;
  24966. margin: 0 15px;
  24967. }
  24968. .sentenTop>div:nth-child(3) {
  24969. background: #409efe;
  24970. color: #fff;
  24971. width: 65px;
  24972. height: 35px;
  24973. text-align: center;
  24974. line-height: 35px;
  24975. border-radius: 5px;
  24976. cursor: pointer;
  24977. }
  24978. .cardList {
  24979. padding: 30px 0 20px 0;
  24980. display: flex;
  24981. flex-direction: row;
  24982. flex-wrap: wrap;
  24983. align-items: center;
  24984. box-sizing: border-box;
  24985. border-bottom: 1px solid #f4f4f4;
  24986. width: 98%;
  24987. margin: 0 auto;
  24988. }
  24989. .rightCardList {
  24990. display: flex;
  24991. flex-wrap: wrap;
  24992. }
  24993. .cardBox {
  24994. display: flex;
  24995. flex-direction: row;
  24996. flex-wrap: wrap;
  24997. align-items: center;
  24998. align-content: center;
  24999. }
  25000. .isCard,
  25001. .isCard1 {
  25002. width: auto;
  25003. padding: 0 20px;
  25004. height: 65px;
  25005. text-align: center;
  25006. line-height: 65px;
  25007. font-size: 14px;
  25008. cursor: pointer;
  25009. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  25010. background-size: 100% 100%;
  25011. position: relative;
  25012. z-index: 99;
  25013. }
  25014. .isCard1 {
  25015. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  25016. }
  25017. .isCard:hover .deleteWord {
  25018. display: block;
  25019. }
  25020. .isCard>div:nth-child(1),
  25021. .isCard1>div:nth-child(1) {
  25022. white-space: nowrap;
  25023. overflow: hidden;
  25024. text-overflow: ellipsis;
  25025. width: 100%;
  25026. margin: 0 auto;
  25027. }
  25028. .card {
  25029. width: 140px;
  25030. height: 65px;
  25031. }
  25032. .card>img {
  25033. width: 100%;
  25034. height: 100%;
  25035. }
  25036. .rightCardBox {
  25037. width: 98%;
  25038. margin: 10px auto 0;
  25039. }
  25040. .rightCardBox>div:nth-child(1) {
  25041. margin-bottom: 10px;
  25042. }
  25043. .cardCss {
  25044. display: flex;
  25045. flex-direction: column;
  25046. flex-wrap: nowrap;
  25047. align-items: center;
  25048. border-bottom: 3px solid #b4c3d3;
  25049. padding: 0 0 5px 0;
  25050. /* margin-right: 10px; */
  25051. }
  25052. .cardCss>div:nth-child(2) {
  25053. background: #5b7b9d;
  25054. color: #fff;
  25055. width: 20px;
  25056. height: 20px;
  25057. border-radius: 50%;
  25058. text-align: center;
  25059. line-height: 20px;
  25060. }
  25061. .sentenTopBox {
  25062. display: flex;
  25063. flex-direction: row;
  25064. flex-wrap: nowrap;
  25065. align-items: center;
  25066. justify-content: space-between;
  25067. padding: 55px 0 0 20px;
  25068. box-sizing: border-box;
  25069. width: 85%;
  25070. }
  25071. .rb_c_ai_box,
  25072. .stepsBottom {
  25073. width: 100%;
  25074. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  25075. /* background: #f7f7f7; */
  25076. border-radius: 10px;
  25077. overflow: hidden;
  25078. /* height: 100%; */
  25079. height: calc(100% - 55px);
  25080. }
  25081. .navTop {
  25082. background: #53749b;
  25083. color: #fff;
  25084. height: 40px;
  25085. line-height: 40px;
  25086. padding-left: 15px;
  25087. font-size: 18px;
  25088. }
  25089. .navBottom {
  25090. /* background: #6b91b7; */
  25091. height: 100%;
  25092. overflow: auto;
  25093. padding: 10px 0;
  25094. }
  25095. .navStage {
  25096. display: flex;
  25097. flex-direction: row;
  25098. flex-wrap: nowrap;
  25099. align-items: center;
  25100. padding: 10px 10px 10px 0;
  25101. cursor: pointer;
  25102. background: #ffffff;
  25103. width: 95%;
  25104. margin: 5px auto 5px;
  25105. box-sizing: border-box;
  25106. border-radius: 5px;
  25107. flex-wrap: wrap;
  25108. position: relative;
  25109. }
  25110. .navStage:hover>.chapter_upload_drag {
  25111. display: block;
  25112. }
  25113. .navTask:hover>.chapter_upload_drag {
  25114. display: block;
  25115. }
  25116. .chapter_upload:hover>.chapter_upload_drag {
  25117. display: block;
  25118. }
  25119. .navStage::before {
  25120. content: "";
  25121. display: block;
  25122. width: 16px;
  25123. height: 16px;
  25124. background-image: url(../../../assets/icon/new/icon_stage.png);
  25125. background-size: 100%;
  25126. margin-left: 25px;
  25127. }
  25128. .navStage .chapter_unit_open {
  25129. content: "";
  25130. display: block;
  25131. width: 16px;
  25132. height: 16px;
  25133. background-image: url(../../../assets/icon/new/down.png);
  25134. transform: rotate(-90deg);
  25135. background-size: 100%;
  25136. margin-left: 10px;
  25137. transition: all 0.5s;
  25138. }
  25139. .isNavStageOpen .chapter_unit_open {
  25140. transform: rotate(0deg);
  25141. }
  25142. .isNavStage {
  25143. background: #0061ff;
  25144. }
  25145. .isNavStage::before {
  25146. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  25147. }
  25148. .isNavStage .chapter_unit_open {
  25149. background-image: url(../../../assets/icon/new/downC.png);
  25150. }
  25151. .isNavStage .nt_taskName {
  25152. font-weight: bold !important;
  25153. color: #ffffff !important;
  25154. }
  25155. .isNavStage .nt_taskTitle {
  25156. font-weight: bold !important;
  25157. color: #fff !important;
  25158. }
  25159. .navStage .nt_taskBox {
  25160. width: calc(100% - 68px);
  25161. padding: 0 0 0 5px;
  25162. box-sizing: border-box;
  25163. box-sizing: border-box;
  25164. display: flex;
  25165. flex-direction: row;
  25166. flex-wrap: nowrap;
  25167. align-items: baseline;
  25168. }
  25169. .navStage .nt_taskTitle {
  25170. color: #060e17;
  25171. line-height: 25px;
  25172. font-size: 16px;
  25173. }
  25174. .navStage .nt_taskName {
  25175. max-width: calc(100% - 82px);
  25176. white-space: nowrap;
  25177. overflow: hidden;
  25178. text-overflow: ellipsis;
  25179. font-size: 16px;
  25180. color: #060e17;
  25181. }
  25182. .navTask {
  25183. display: flex;
  25184. flex-direction: row;
  25185. flex-wrap: nowrap;
  25186. align-items: center;
  25187. padding: 10px 10px 10px 0;
  25188. cursor: pointer;
  25189. background: #ffffff;
  25190. width: 95%;
  25191. margin: 5px auto 5px;
  25192. box-sizing: border-box;
  25193. border-radius: 5px;
  25194. flex-wrap: wrap;
  25195. position: relative;
  25196. }
  25197. .navTask .chapter_upload_open {
  25198. content: "";
  25199. display: block;
  25200. width: 16px;
  25201. height: 16px;
  25202. background-image: url(../../../assets/icon/new/icon_arrow.png);
  25203. background-size: 100%;
  25204. margin-left: 23px;
  25205. }
  25206. .noImage .chapter_upload_open {
  25207. display: none;
  25208. background-image: unset !important;
  25209. }
  25210. .isNavOpen .chapter_upload_open {
  25211. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  25212. transform: rotate(90deg);
  25213. }
  25214. .isNavTask .chapter_upload_open {
  25215. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  25216. transform: rotate(-90deg);
  25217. }
  25218. .isNavTask.isNavOpen .chapter_upload_open {
  25219. transform: rotate(0deg);
  25220. }
  25221. .dragOverTop {
  25222. border-top: 2px solid #0061ff !important;
  25223. border-radius: 0 !important;
  25224. margin-top: 10px;
  25225. }
  25226. .dragOverBottom {
  25227. border-bottom: 2px solid #0061ff !important;
  25228. border-radius: 0 !important;
  25229. margin-top: 10px;
  25230. }
  25231. .dragOverTop2 {
  25232. border-top: 2px solid #0061ff !important;
  25233. border-radius: 0 !important;
  25234. }
  25235. .dragOverBottom2 {
  25236. border-bottom: 2px solid #0061ff !important;
  25237. border-radius: 0 !important;
  25238. }
  25239. .isNavTask {
  25240. /* background: #3681FC; */
  25241. background: #eef3fb;
  25242. }
  25243. .isNavTask>.chapter_upload_drag {
  25244. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  25245. }
  25246. .isNavTask .nt_taskName {
  25247. /* color: #fff !important; */
  25248. font-weight: bold !important;
  25249. color: #0061ff !important;
  25250. }
  25251. .isNavTask .nt_taskTitle {
  25252. /* color: #AECCFE !important; */
  25253. font-weight: bold !important;
  25254. color: #0061ff !important;
  25255. }
  25256. .navTask .nt_taskBox {
  25257. width: calc(100% - 40px);
  25258. padding: 0 0 0 5px;
  25259. box-sizing: border-box;
  25260. box-sizing: border-box;
  25261. display: flex;
  25262. flex-direction: row;
  25263. flex-wrap: nowrap;
  25264. align-items: baseline;
  25265. }
  25266. .navTask .nt_taskTitle {
  25267. /* color: #717C8D; */
  25268. color: #060e17;
  25269. line-height: 25px;
  25270. font-size: 16px;
  25271. /* min-width: 66px; */
  25272. }
  25273. .navTask .nt_taskName {
  25274. /* color: #fff; */
  25275. /* max-width: 130px; */
  25276. /* width: 100%; */
  25277. max-width: calc(100% - 66px);
  25278. font-size: 16px;
  25279. color: #060e17;
  25280. /* color: #0E1E33; */
  25281. }
  25282. .navTask .nt_taskName span {
  25283. width: 100%;
  25284. white-space: nowrap;
  25285. overflow: hidden;
  25286. text-overflow: ellipsis;
  25287. display: block;
  25288. }
  25289. .gjBox {
  25290. width: calc(100% - 25px);
  25291. padding: 0 0 0 0;
  25292. box-sizing: border-box;
  25293. border-left: 1px solid #cad1dc;
  25294. margin-left: 25px;
  25295. }
  25296. .gjBox>div {
  25297. display: flex;
  25298. align-items: center;
  25299. }
  25300. .gjBox>div::before {
  25301. content: "";
  25302. height: 1px;
  25303. width: 10px;
  25304. background: #cad1dc;
  25305. display: block;
  25306. margin-right: 5px;
  25307. }
  25308. .gjCss {
  25309. display: flex;
  25310. flex-direction: row;
  25311. flex-wrap: nowrap;
  25312. align-items: center;
  25313. padding: 15px 0;
  25314. box-sizing: border-box;
  25315. font-size: 14px;
  25316. cursor: pointer;
  25317. }
  25318. .isGjCss {
  25319. color: #0061ff;
  25320. }
  25321. .groupBox {}
  25322. .groupContent+.groupContent {
  25323. margin-top: 30px;
  25324. }
  25325. .groupTitle {
  25326. font-size: 24px;
  25327. color: rgb(80, 80, 80);
  25328. margin-bottom: 20px;
  25329. }
  25330. .groupName {
  25331. display: flex;
  25332. align-items: center;
  25333. }
  25334. .groupn {
  25335. font-size: 15px;
  25336. margin-right: 10px;
  25337. }
  25338. .groupName+.groupName {
  25339. margin-top: 15px;
  25340. }
  25341. .groupBtn {
  25342. margin-left: 10px;
  25343. }
  25344. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  25345. text-align: left;
  25346. }
  25347. .radioBox>div {
  25348. margin: 10px 0 0 10px;
  25349. }
  25350. .radioBox>>>.el-radio__input,
  25351. .radioBox>>>.el-checkbox__inner {
  25352. margin-left: 10px;
  25353. }
  25354. .radioBox>>>.el-radio__label,
  25355. .radioBox>>>.el-checkbox__label {
  25356. display: flex;
  25357. align-items: center;
  25358. }
  25359. .inImg {
  25360. width: 50px;
  25361. }
  25362. .inImg>img {
  25363. width: 100%;
  25364. height: 100%;
  25365. object-fit: cover;
  25366. }
  25367. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  25368. height: auto;
  25369. padding: 10px;
  25370. margin: 0;
  25371. }
  25372. .upCss>>>.el-upload-list {
  25373. width: 100%;
  25374. }
  25375. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  25376. width: 100%;
  25377. height: 120px;
  25378. object-fit: contain;
  25379. background: unset;
  25380. margin-left: 0;
  25381. }
  25382. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  25383. display: none;
  25384. }
  25385. .tcMember+.tcMember::before {
  25386. content: "、";
  25387. }
  25388. .xzUpImg {
  25389. width: 25px;
  25390. height: 25px;
  25391. min-width: 25px;
  25392. min-height: 25px;
  25393. cursor: pointer;
  25394. margin: 0 10px;
  25395. }
  25396. .xzUpImg>img {
  25397. width: 100%;
  25398. height: 100%;
  25399. }
  25400. .closeCss {
  25401. position: absolute;
  25402. top: 8px;
  25403. right: 8px;
  25404. cursor: pointer;
  25405. width: 20px;
  25406. height: 20px;
  25407. }
  25408. .closeCss>img {
  25409. width: 100%;
  25410. height: 100%;
  25411. }
  25412. .moveBtn {
  25413. display: flex;
  25414. flex-direction: row;
  25415. flex-wrap: nowrap;
  25416. align-items: center;
  25417. width: 55px;
  25418. }
  25419. .timuUpImg {
  25420. display: flex;
  25421. flex-direction: row;
  25422. align-items: center;
  25423. width: 100%;
  25424. margin-right: 10px;
  25425. }
  25426. .timuUpImg>div:nth-child(1) {
  25427. margin-right: 10px;
  25428. display: flex;
  25429. align-items: center;
  25430. width: 100%;
  25431. }
  25432. .timuImgBox {
  25433. margin: 10px 0;
  25434. display: flex;
  25435. flex-direction: column;
  25436. flex-wrap: wrap;
  25437. align-items: flex-start;
  25438. }
  25439. .timuImg {
  25440. width: 100px;
  25441. margin: 5px 0;
  25442. cursor: pointer;
  25443. position: relative;
  25444. }
  25445. .timuImg:hover .deleteWord {
  25446. display: block;
  25447. }
  25448. .deleteWord {
  25449. width: 25px;
  25450. height: 25px;
  25451. position: absolute;
  25452. right: -5px;
  25453. top: -5px;
  25454. cursor: pointer;
  25455. display: none;
  25456. }
  25457. .timuImg>img,
  25458. .deleteWord>img {
  25459. width: 100%;
  25460. height: 100%;
  25461. object-fit: cover;
  25462. }
  25463. .e_add_delete {
  25464. cursor: pointer;
  25465. margin-left: 10px;
  25466. }
  25467. .pType_box {
  25468. margin-top: 30px;
  25469. align-items: flex-end;
  25470. }
  25471. .noneBox {
  25472. height: 200px;
  25473. width: 100%;
  25474. display: flex;
  25475. align-items: center;
  25476. justify-content: center;
  25477. flex-direction: column;
  25478. /* margin-top: 150px; */
  25479. }
  25480. .noneBox>img {
  25481. width: 95px;
  25482. }
  25483. .noneBox>span {
  25484. margin-top: 10px;
  25485. color: #717c8d;
  25486. }
  25487. .rb_c_box {
  25488. width: 100%;
  25489. height: 100%;
  25490. display: flex;
  25491. /* padding: 20px; */
  25492. box-sizing: border-box;
  25493. justify-content: space-between;
  25494. }
  25495. .rb_c_box_left {
  25496. height: 100%;
  25497. background: #fff;
  25498. width: 270px;
  25499. min-width: 270px;
  25500. border-radius: 8px;
  25501. margin-right: 10px;
  25502. }
  25503. .rb_c_box_right {
  25504. height: 100%;
  25505. width: calc(100%);
  25506. overflow: hidden;
  25507. }
  25508. .rb_c_box_btn {
  25509. display: flex;
  25510. justify-content: flex-start;
  25511. height: 50px;
  25512. align-items: center;
  25513. }
  25514. .rb_c_box_right>.basic_box {
  25515. /* background: #fff; */
  25516. border-radius: 0;
  25517. height: calc(100% - 0px);
  25518. overflow: auto;
  25519. padding: 0;
  25520. }
  25521. .textarea_css {
  25522. display: block;
  25523. resize: none;
  25524. padding: 10px 15px;
  25525. line-height: 1.5;
  25526. box-sizing: border-box;
  25527. width: 100%;
  25528. font-size: 14px;
  25529. color: #606266;
  25530. background-color: #fff;
  25531. background-image: none;
  25532. border: 1px solid #dcdfe6;
  25533. border-radius: 4px;
  25534. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  25535. outline: none;
  25536. overflow: hidden;
  25537. height: 46px;
  25538. font-family: "Microsoft YaHei";
  25539. }
  25540. .textarea_css::-webkit-input-placeholder {
  25541. color: #c0c4cc;
  25542. }
  25543. .textarea_css:focus {
  25544. border-color: #409eff;
  25545. outline: 0;
  25546. }
  25547. .addEditor>>>.text {
  25548. height: auto;
  25549. min-height: 100px;
  25550. }
  25551. .addEditor>>>.w-e-text-container {
  25552. min-height: 100px;
  25553. }
  25554. .moveBtn2 {
  25555. flex-direction: column;
  25556. width: fit-content;
  25557. margin: 0 10px 0 10px;
  25558. }
  25559. .moveBtn2 .chapter_upload_down,
  25560. .moveBtn2 .chapter_upload_up {
  25561. width: 16px;
  25562. height: 16px;
  25563. }
  25564. .moveBtn2 .chapter_upload_up::after,
  25565. .moveBtn2 .chapter_upload_down::after {
  25566. width: 10px;
  25567. height: 10px;
  25568. }
  25569. .fullStyle>>>.el-dialog__body {
  25570. height: calc(100% - 125px) !important;
  25571. box-sizing: border-box;
  25572. }
  25573. .fullStyle1>>>.el-dialog__body {
  25574. height: auto !important;
  25575. }
  25576. .fullStyle>>>.el-dialog {
  25577. width: 100% !important;
  25578. max-width: 100% !important;
  25579. height: 100% !important;
  25580. margin: 0 !important;
  25581. }
  25582. .fullStyle {
  25583. width: 100% !important;
  25584. max-width: 100% !important;
  25585. height: 100% !important;
  25586. margin: 0 auto !important;
  25587. }
  25588. .wb_j_box_btn {
  25589. width: calc(100% - 30px);
  25590. display: flex;
  25591. height: 40px;
  25592. border: 1.5px solid #cad1dc;
  25593. border-radius: 4px;
  25594. box-sizing: border-box;
  25595. align-items: center;
  25596. font-size: 14px;
  25597. cursor: pointer;
  25598. overflow: hidden;
  25599. }
  25600. .wb_j_box_btn:hover {
  25601. border: 1.5px solid #0061ff;
  25602. }
  25603. .wb_j_box_title {
  25604. background: #f0f4fa;
  25605. height: 100%;
  25606. line-height: 40px;
  25607. width: 90px;
  25608. text-align: center;
  25609. color: #060e17;
  25610. border-right: 1.5px solid #cad1dc;
  25611. box-sizing: border-box;
  25612. }
  25613. .wb_j_box_btn_c {
  25614. width: calc(100% - 90px);
  25615. padding: 0 35px 0 10px;
  25616. box-sizing: border-box;
  25617. position: relative;
  25618. }
  25619. .wb_j_box_span {
  25620. width: 100%;
  25621. overflow: hidden;
  25622. white-space: nowrap;
  25623. text-overflow: ellipsis;
  25624. word-wrap: break-word;
  25625. color: #717c8d;
  25626. }
  25627. .wb_j_box_arrow {
  25628. content: "";
  25629. width: 14px;
  25630. height: 14px;
  25631. background: url(../../../assets/icon/new/u_arrow.png);
  25632. background-size: 100% 100%;
  25633. position: absolute;
  25634. right: 12px;
  25635. top: 50%;
  25636. transform: translateY(-50%);
  25637. }
  25638. .check_classBox {
  25639. height: 400px;
  25640. display: flex;
  25641. border-top: 1.5px solid #e7ebf1;
  25642. border-bottom: 1.5px solid #e7ebf1;
  25643. }
  25644. .check_class_right {
  25645. width: 130px;
  25646. border-right: 1px solid #e7ebf1;
  25647. display: flex;
  25648. align-items: center;
  25649. flex-direction: column;
  25650. height: 100%;
  25651. overflow: auto;
  25652. padding: 15px 0;
  25653. box-sizing: border-box;
  25654. }
  25655. .check_class {
  25656. width: 85%;
  25657. border-radius: 5px;
  25658. height: 30px;
  25659. min-height: 30px;
  25660. line-height: 30px;
  25661. text-align: center;
  25662. padding: 0 10px;
  25663. box-sizing: border-box;
  25664. cursor: pointer;
  25665. white-space: nowrap;
  25666. overflow: hidden;
  25667. text-overflow: ellipsis;
  25668. }
  25669. .check_class.activeX {
  25670. background: #e0eafb;
  25671. color: #3681fc;
  25672. font-weight: 700;
  25673. }
  25674. .check_class+.check_class {
  25675. margin-top: 15px;
  25676. }
  25677. .check_class_left {
  25678. background: #fafafa;
  25679. width: calc(100% - 130px);
  25680. padding: 15px;
  25681. box-sizing: border-box;
  25682. }
  25683. .check_class_all_box {
  25684. display: flex;
  25685. margin-bottom: 10px;
  25686. }
  25687. .all_check {
  25688. display: flex;
  25689. align-items: center;
  25690. padding: 2px 0 0;
  25691. margin-left: 10px;
  25692. }
  25693. .all_check>>>.el-checkbox__label {
  25694. line-height: 18px;
  25695. }
  25696. .check_class_left_title {
  25697. font-size: 16px;
  25698. font-weight: 700;
  25699. }
  25700. .check_class_item {
  25701. display: flex;
  25702. flex-wrap: wrap;
  25703. height: calc(100% - 45px);
  25704. overflow: auto;
  25705. justify-content: flex-start;
  25706. align-items: flex-start;
  25707. align-content: flex-start;
  25708. }
  25709. .class_item:first-child {
  25710. /* margin: 0 15px 15px 67px; */
  25711. }
  25712. .class_item {
  25713. margin: 0 15px 15px 0;
  25714. }
  25715. .class_item:hover>>>.el-checkbox__label {
  25716. color: #409eff;
  25717. }
  25718. .class_item>>>.el-checkbox__label {
  25719. color: #0e1e33;
  25720. }
  25721. .class_item:hover>>>.el-checkbox__inner {
  25722. border-color: #409eff;
  25723. }
  25724. .class_item>>>.el-checkbox,
  25725. .class_item>>>.el-checkbox__input {
  25726. display: flex;
  25727. align-items: center;
  25728. }
  25729. .taskTitle {
  25730. font-size: 20px;
  25731. font-weight: bold;
  25732. margin-bottom: 35px;
  25733. }
  25734. .taskTitle:after {
  25735. content: "";
  25736. width: 100%;
  25737. display: block;
  25738. height: 1px;
  25739. background: #cad1dc;
  25740. position: absolute;
  25741. left: 0;
  25742. margin: 15px 0 0;
  25743. }
  25744. .eva_btn_box {
  25745. margin: 20px 0px 0 0;
  25746. display: flex;
  25747. flex-direction: row;
  25748. flex-wrap: nowrap;
  25749. align-items: center;
  25750. justify-content: space-between;
  25751. width: 100%;
  25752. }
  25753. .eva_btn_left_box {
  25754. display: flex;
  25755. flex-direction: row;
  25756. flex-wrap: nowrap;
  25757. align-items: center;
  25758. }
  25759. .addTypeChoose {
  25760. display: flex;
  25761. flex-direction: row;
  25762. flex-wrap: nowrap;
  25763. align-items: center;
  25764. margin: 15px 0;
  25765. }
  25766. .addTypeBox {
  25767. display: flex;
  25768. flex-direction: column;
  25769. flex-wrap: nowrap;
  25770. align-items: center;
  25771. }
  25772. .addTypeChoose {
  25773. display: flex;
  25774. flex-direction: row;
  25775. flex-wrap: nowrap;
  25776. align-items: center;
  25777. margin: 15px 0;
  25778. }
  25779. .buchong_box {
  25780. background: #E0EAFB66;
  25781. width: calc(100% - 20px);
  25782. min-height: 50px;
  25783. display: flex;
  25784. align-items: center;
  25785. justify-content: center;
  25786. margin: 0 auto;
  25787. }
  25788. .outline {
  25789. width: calc(100% - 40px);
  25790. margin: 0 auto;
  25791. }
  25792. .task_outline {
  25793. width: calc(100% - 40px);
  25794. margin: 0 auto;
  25795. }
  25796. .outline_box+.outline_box {
  25797. margin: 30px 0 0px;
  25798. }
  25799. .outline_task {
  25800. display: flex;
  25801. align-items: center;
  25802. margin-bottom: 10px;
  25803. }
  25804. .outline_btn{
  25805. display: flex;
  25806. align-items: center;
  25807. min-width: fit-content;
  25808. margin-left: 10px;
  25809. }
  25810. .outline_task .title {
  25811. font-size: 18px;
  25812. font-weight: bold;
  25813. min-width: 80px;
  25814. }
  25815. .op_task_box,
  25816. .op_tool_box,
  25817. .outline_detail {
  25818. position: relative;
  25819. }
  25820. .op_task_box:hover .op_box,
  25821. .op_tool_box:hover .op_box,
  25822. .outline_detail:hover .op_box {
  25823. display: flex
  25824. }
  25825. .op_box {
  25826. position: absolute;
  25827. bottom: 10px;
  25828. display: none;
  25829. align-items: center;
  25830. justify-content: space-between;
  25831. width: calc(100% - 20px);
  25832. left: 50%;
  25833. transform: translateX(-50%);
  25834. }
  25835. .op_box .op_remark {
  25836. color: #8E8E8E;
  25837. font-size: 14px;
  25838. }
  25839. .rb_c_nav {
  25840. width: calc(100% - 20px);
  25841. margin: 15px auto 0;
  25842. font-size: 18px;
  25843. }
  25844. .rb_c_nav span {
  25845. cursor: pointer;
  25846. }
  25847. .rb_c_nav span+span {
  25848. margin-left: 10px;
  25849. }
  25850. .rb_c_nav span.active {
  25851. color: #0061FF
  25852. }
  25853. .text_panel>>>.text {
  25854. height: 400px;
  25855. }
  25856. .markBox{
  25857. padding: 20px 14px;
  25858. line-height: 29px;
  25859. font-size: 16px;
  25860. background: #f4f4f4;
  25861. border-radius: 5px;
  25862. word-break: break-word;
  25863. }
  25864. .info_box_t{
  25865. display: flex;
  25866. align-items: center;
  25867. }
  25868. .info_box_t + .info_box_t{
  25869. margin-top: 10px;
  25870. }
  25871. .info_box_t_box{
  25872. display: flex;
  25873. align-items: center;
  25874. }
  25875. .info_box_t_box + .info_box_t_box{
  25876. margin-left: 10px;
  25877. }
  25878. .info_box_t_box > span{
  25879. width: fit-content
  25880. }
  25881. .info_box_t_box > input{
  25882. width: 150px !important;
  25883. margin: 0 5px 0 0;
  25884. }
  25885. .info_radio >>> .el-radio, .el-radio__input{
  25886. line-height: 18px;
  25887. height: 18px;
  25888. }
  25889. .mode_box{
  25890. display: flex;
  25891. align-items: center;
  25892. }
  25893. .mode_box > span{
  25894. padding: 0px 5px;
  25895. cursor: pointer;
  25896. }
  25897. .mode_box > span.active{
  25898. color: #409eff;
  25899. }
  25900. .chapter_upload_check {
  25901. width: 15px;
  25902. height: 15px;
  25903. cursor: pointer;
  25904. background-image: url('../../../assets/icon/check.png');
  25905. background-size: 100% 100%;
  25906. }
  25907. .chapter_upload_check.checked{
  25908. background-image: url('../../../assets/icon/checked.png');
  25909. }
  25910. .ruleBtn {
  25911. width: fit-content;
  25912. height: 36px;
  25913. line-height: 36px;
  25914. cursor: pointer;
  25915. color: #0061FF;
  25916. }
  25917. .stopBtn{
  25918. z-index: 999999;
  25919. position: absolute;
  25920. left: 50%;
  25921. top: calc(50% + 70px);
  25922. transform: translateX(-50%);
  25923. }
  25924. .rateSwitch >>> .el-switch__label.is-active {
  25925. color: #0061FF;
  25926. }
  25927. .rateSwitch >>> .el-switch__label--right{
  25928. display: flex;
  25929. align-items: center;
  25930. }
  25931. .rateSwitch >>> .el-switch__label--right::before{
  25932. content: "";
  25933. width: 14px;
  25934. height: 14px;
  25935. min-width: 14px;
  25936. min-height: 14px;
  25937. background-size: 100% 100%;
  25938. display: block;
  25939. margin-right: 7px;
  25940. background-image: url(../../../assets/icon/new/u_op2.png);
  25941. }
  25942. .rateSwitch >>> .el-switch__label--right.is-active::before{
  25943. background-image: url(../../../assets/icon/new/u_op.png);
  25944. }
  25945. .inter_box{
  25946. min-width: calc(50%);
  25947. min-height: 500px;
  25948. margin-right: 10px;
  25949. border: 1px solid #c7c7c7;
  25950. border-radius: 0px 5px 5px 5px;
  25951. overflow: hidden;
  25952. position: relative;
  25953. box-sizing: border-box;
  25954. }
  25955. .inter_box::before{
  25956. content:'对话区';
  25957. position: absolute;
  25958. left: 0;
  25959. top: 0;
  25960. display: block;
  25961. padding: 8px 10px;
  25962. background: #e0eafb;
  25963. color: #98a0ac;
  25964. font-size: 14px;
  25965. border-radius: 0 15px 15px 0;
  25966. }
  25967. .inter_Detailbox{
  25968. border: 1px solid #c7c7c7;
  25969. border-radius: 0px 5px 5px 5px;
  25970. overflow: hidden;
  25971. position: relative;
  25972. box-sizing: border-box;
  25973. }
  25974. .inter_Detailbox::before{
  25975. content:'编辑区';
  25976. position: absolute;
  25977. left: 0;
  25978. top: 0;
  25979. display: block;
  25980. padding: 8px 10px;
  25981. background: #e0eafb;
  25982. color: #98a0ac;
  25983. font-size: 14px;
  25984. border-radius: 0 15px 15px 0;
  25985. }
  25986. .inter_box > iframe{
  25987. width: 100%;
  25988. height: 100%;
  25989. border: none;
  25990. }
  25991. .inter_setting{
  25992. display: block;
  25993. background-image: url(../../../assets/icon/course/setting.svg);
  25994. background-size: 100% 100%;
  25995. width: 20px;
  25996. height: 20px;
  25997. cursor: pointer;
  25998. margin-left: 10px;
  25999. }
  26000. .inter_setting_panel{
  26001. position: absolute;
  26002. left: 110px;
  26003. top: 30px;
  26004. background: #fff;
  26005. border-radius: 5px;
  26006. box-shadow: 0px 0px 2px 1px #00000017;
  26007. padding: 10px;
  26008. z-index: 999;
  26009. }
  26010. .panel_title{
  26011. text-align: center;
  26012. font-size: 18px;
  26013. margin-bottom: 10px;
  26014. }
  26015. .panel_tips{
  26016. font-weight: 500;
  26017. font-size: 14px;
  26018. text-align: center;
  26019. margin-bottom: 10px;
  26020. color: #6d6d6d;
  26021. }
  26022. .panel_input{
  26023. margin-bottom: 10px;
  26024. }
  26025. .panel_button{
  26026. display: flex;
  26027. justify-content: space-between;
  26028. }
  26029. </style>