addCourse.vue 1.1 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止</div>
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken" @click="cancelAjax('teacherTask')">停止</div>
  5. <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
  6. <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  7. <div class="courseTop">
  8. <div class="stepsNav">
  9. <el-breadcrumb separator-class="el-icon-arrow-right">
  10. <el-breadcrumb-item :to="{
  11. path:
  12. '/course?userid=' +
  13. userid +
  14. '&oid=' +
  15. oid +
  16. '&org=' +
  17. org +
  18. '&role=' +
  19. role,
  20. }">课程管理</el-breadcrumb-item>
  21. <el-breadcrumb-item>
  22. <span style="color: rgb(15, 126, 255)">添加课程</span>
  23. </el-breadcrumb-item>
  24. </el-breadcrumb>
  25. </div>
  26. <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  27. </div>
  28. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  29. <!-- @mouseenter="stepDisplay(true)"
  30. @mouseleave="stepDisplay(false)" -->
  31. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  32. <div class="stepBg" v-if="false">
  33. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  34. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  35. <div>
  36. <img src="../../../assets/icon/first.png" alt />
  37. </div>
  38. <div>填写基本信息</div>
  39. </div>
  40. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  41. <div>
  42. <img src="../../../assets/icon/firstNo.png" alt />
  43. </div>
  44. <div>填写基本信息</div>
  45. </div>
  46. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  47. </div>
  48. <!-- <div
  49. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  50. class="second"
  51. @click="navSteps(2)"
  52. >
  53. <div style="margin: 5px 10px 0 0; width: 2rem">
  54. <img src="../../../assets/icon/second.png" alt />
  55. </div>
  56. <div>选择课程模板</div>
  57. </div>
  58. <div
  59. v-else-if="cidType === 0 && isStepDisplay"
  60. class="secondNo"
  61. @click="navSteps(2)"
  62. >
  63. <div>
  64. <img src="../../../assets/icon/secondNo.png" alt />
  65. </div>
  66. <div>选择课程模板</div>
  67. </div> -->
  68. <!-- <div
  69. v-if="isStepDisplay"
  70. class="stepBorder"
  71. :class="{ 'border-active': steps > 2 }"
  72. ></div> -->
  73. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  74. <div>
  75. <img src="../../../assets/icon/third.png" alt />
  76. </div>
  77. <div>上传课程内容</div>
  78. </div>
  79. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  80. <div>
  81. <img src="../../../assets/icon/thirdNo.png" alt />
  82. </div>
  83. <div>上传课程内容</div>
  84. </div>
  85. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  86. <div v-if="steps > 3 && isStepDisplay" class="four">
  87. <div>
  88. <img src="../../../assets/icon/four.png" alt />
  89. </div>
  90. <div>上传完成</div>
  91. </div>
  92. <div v-else-if="isStepDisplay" class="fourNo">
  93. <div>
  94. <img src="../../../assets/icon/fourNo.png" alt />
  95. </div>
  96. <div>上传完成</div>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  101. style="padding: 0" :style="{
  102. height:
  103. !isStepDisplay && !isBtnDisplay
  104. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  105. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  106. }">
  107. <!-- <div class="updateMask" :style="{
  108. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  109. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  110. <div class="whiteBg" style="background: unset; padding: 0">
  111. <div>
  112. <div class="basic_box" style="padding: 0">
  113. <div class="big_box">
  114. <div class="left_first">
  115. <div :class="{
  116. updateTips:
  117. cid && userid != courseUserid && role != '1',
  118. }">
  119. <div style="width: 100%">
  120. <div class="course_input_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" @change="typeChange" 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="changeLang">
  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 /> -->
  446. <span>暂时还没有内容,快去添加吧</span>
  447. </div>
  448. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  449. <div @dragstart="
  450. dragStart(item1, index1, 0)
  451. " @dragover.prevent="
  452. dragOver(index1, 0)
  453. " @dragend="dragEnd()" :draggable="isdrag ==
  454. 'chapter-' + 0 + '-' + index1
  455. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  456. getChapterData(
  457. $event,
  458. index1,
  459. item1.type
  460. )
  461. " :class="{
  462. dragOverTop2:
  463. newIndex === index1 &&
  464. typeIndex ==
  465. 'chapter-' +
  466. 0 +
  467. '-' +
  468. index1 &&
  469. oldIndex > index1 &&
  470. dragType == 'drag',
  471. dragOverBottom2:
  472. newIndex === index1 &&
  473. typeIndex ==
  474. 'chapter-' +
  475. 0 +
  476. '-' +
  477. index1 &&
  478. oldIndex < index1 &&
  479. dragType == 'drag',
  480. }">
  481. <div class="chapter_upload_o" style="
  482. position: relative;
  483. display: flex;
  484. align-items: center;
  485. ">
  486. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  487. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  488. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  489. </div>
  490. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  491. </div>
  492. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  493. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  494. </div>
  495. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  496. </div>
  497. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  498. </div>
  499. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  500. </div>
  501. </div>
  502. <div class="chapter_upload_n">
  503. <input readonly="true" v-if="
  504. item1.type == 2 ||
  505. item1.type == 3 ||
  506. item1.type == 12 ||
  507. item1.type == 13 ||
  508. item1.type == 7
  509. " :placeholder="item1.name" style="
  510. border: none;
  511. outline: none;
  512. width: 80%;
  513. minwidth: 215px;
  514. z-index: 99;
  515. font-size: 14px;
  516. white-space: nowrap;
  517. overflow: hidden;
  518. text-overflow: ellipsis;
  519. " />
  520. </div>
  521. <div class="chapter_upload_ic">
  522. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  523. <div class="chapter_upload_ic_r" @click.stop="
  524. deleteTeacherInfoData(
  525. $event,
  526. index1
  527. )
  528. ">
  529. <div></div>
  530. </div>
  531. </div>
  532. </div>
  533. </div>
  534. </div>
  535. </div>
  536. <div v-if="
  537. teacherinfoproVisible
  538. " class="mask">
  539. <div class="progressBox">
  540. <div class="lbox">
  541. <img src="../../../assets/loading.gif" />上传中,请稍后
  542. </div>
  543. <div style="margin-bottom: 10px">
  544. <span>{{
  545. teacherinfoisFinishSize
  546. }}</span>
  547. /
  548. <span>{{
  549. teacherinfoisAllSize
  550. }}</span>
  551. </div>
  552. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  553. ? teacherinfoprogress
  554. : 0
  555. " style="width: 80%"></el-progress> -->
  556. </div>
  557. </div>
  558. </div>
  559. </div>
  560. <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">
  561. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken" @click="cancelAjax('teacherText')">停止</div>
  562. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  563. <div class="c_info_title">
  564. 已有教案摘要
  565. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  566. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  567. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1)"
  568. @click="openAiDialog(2, 'aiteacherTextDetail',1)">提取摘要</button>
  569. </el-tooltip>
  570. </div>
  571. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  572. <div style="width: calc(100%);" class='op_task_box'>
  573. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  574. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  575. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  576. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  577. <div class="op_box">
  578. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  579. <div style="display: flex;">
  580. <el-switch style="margin-right: 10px" v-model="isQuote['aiteacherTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiteacherTextDetail')"></el-switch>
  581. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  582. <div class="r_pub_button_op"
  583. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
  584. @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
  585. </el-tooltip>
  586. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2()">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  587. </div>
  588. </div>
  589. </div>
  590. </div>
  591. </div>
  592. </div>
  593. <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'">
  594. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1" @click="cancelAjax('target1')">停止</div>
  595. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  596. <div class="c_info_title">
  597. 课程目标
  598. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  599. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  600. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1)"
  601. @click="openAiDialog(2, 'aitargetTextDetail',1)">提取目标</button>
  602.                   </el-tooltip>
  603. </div>
  604. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  605. <div style="width: calc(100%);" class='op_task_box'>
  606. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  607. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  608. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  609. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  610. <div class="op_box">
  611. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  612. <div style="display: flex;">
  613. <el-switch style="margin-right: 10px" v-model="isQuote['aitargetTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aitargetTextDetail')"></el-switch>
  614. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  615. <div class="r_pub_button_op"
  616. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
  617. @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
  618. </el-tooltip>
  619. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB,forceUpdate2()">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  620. </div>
  621. </div>
  622. </div>
  623. </div>
  624. </div>
  625. </div>
  626. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  627. <div style="position: relative;
  628. background: #fff;
  629. box-sizing: border-box;
  630. padding: 1px 20px 10px;
  631. width: 100%;
  632. border-radius: 10px;">
  633. <div style="
  634. display: flex;
  635. flex-direction: row;
  636. justify-content: space-between;
  637. align-items: center;
  638. " :style="{
  639. margin: true
  640. ? '20px 0 10px'
  641. : '20px 0 0',
  642. }">
  643. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  644. 系统推荐参考资料
  645. <div class="add_info_box" style="margin: 0 0 0 auto">
  646. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  647. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  648. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  649. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  650.  </el-tooltip>
  651. </div>
  652. </div>
  653. </div>
  654. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  655. <div class="add_chapters_box add_c_none" v-if="
  656. cankaoInfoData &&
  657. cankaoInfoData.length == 0
  658. ">
  659. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  660. <span>暂时还没有内容,快去添加吧</span>
  661. </div>
  662. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  663. <div @dragstart="
  664. dragStart(item1, index1, 0)
  665. " @dragover.prevent="
  666. dragOver(index1, 0)
  667. " @dragend="dragEnd()" :draggable="isdrag ==
  668. 'chapter-' + 0 + '-' + index1
  669. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  670. getChapterData(
  671. $event,
  672. index1,
  673. item1.type
  674. )
  675. " :class="{
  676. dragOverTop2:
  677. newIndex === index1 &&
  678. typeIndex ==
  679. 'chapter-' +
  680. 0 +
  681. '-' +
  682. index1 &&
  683. oldIndex > index1 &&
  684. dragType == 'drag',
  685. dragOverBottom2:
  686. newIndex === index1 &&
  687. typeIndex ==
  688. 'chapter-' +
  689. 0 +
  690. '-' +
  691. index1 &&
  692. oldIndex < index1 &&
  693. dragType == 'drag',
  694. }">
  695. <div class="chapter_upload_o" style="
  696. position: relative;
  697. display: flex;
  698. align-items: center;
  699. ">
  700. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  701. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  702. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  703. </div>
  704. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  705. </div>
  706. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  707. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  708. </div>
  709. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  710. </div>
  711. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  712. </div>
  713. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  714. </div>
  715. </div>
  716. <div class="chapter_upload_n">
  717. <input readonly="true" v-if="
  718. item1.type == 2 ||
  719. item1.type == 3 ||
  720. item1.type == 12 ||
  721. item1.type == 13 ||
  722. item1.type == 7
  723. " :placeholder="item1.name" style="
  724. border: none;
  725. outline: none;
  726. width: 80%;
  727. minwidth: 215px;
  728. z-index: 99;
  729. font-size: 14px;
  730. white-space: nowrap;
  731. overflow: hidden;
  732. text-overflow: ellipsis;
  733. " />
  734. </div>
  735. <div class="chapter_upload_ic">
  736. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  737. <div class="chapter_upload_ic_r" @click.stop="
  738. deleteCankaoInfoData(
  739. $event,
  740. index1
  741. )
  742. ">
  743. <div></div>
  744. </div>
  745. </div>
  746. </div>
  747. </div>
  748. </div>
  749. </div>
  750. </div>
  751. </div>
  752. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  753. <div style="position: relative;
  754. background: #fff;
  755. box-sizing: border-box;
  756. padding: 1px 20px 10px;
  757. width: 100%;
  758. border-radius: 10px;">
  759. <div style="
  760. display: flex;
  761. flex-direction: row;
  762. justify-content: space-between;
  763. align-items: center;
  764. " :style="{
  765. margin: true
  766. ? '20px 0 10px'
  767. : '20px 0 0',
  768. }">
  769. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  770. 参考标准
  771. <div class="add_info_box" style="margin: 0 0 0 auto">
  772. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  773. 上传参考标准
  774. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  775. beforeUploadInfo2(
  776. $event,
  777. 19
  778. )
  779. " />
  780. </button>
  781. </div>
  782. </div>
  783. </div>
  784. <div>
  785. <div class="add_chapters_box add_c_none" v-if="
  786. knowInfoData &&
  787. knowInfoData.length == 0
  788. ">
  789. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  790. <span>暂时还没有内容,快去添加吧</span>
  791. </div>
  792. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  793. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  794. getChapterData(
  795. $event,
  796. index1,
  797. item1.type
  798. )
  799. " >
  800. <div class="chapter_upload_o" style="
  801. position: relative;
  802. display: flex;
  803. align-items: center;
  804. ">
  805. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData(item1.fileid)"></div>
  806. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  807. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  808. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  809. </div>
  810. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  811. </div>
  812. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  813. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  814. </div>
  815. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  816. </div>
  817. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  818. </div>
  819. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  820. </div>
  821. </div>
  822. <div class="chapter_upload_n">
  823. <input readonly="true" v-if="
  824. item1.type == 2 ||
  825. item1.type == 3 ||
  826. item1.type == 12 ||
  827. item1.type == 13 ||
  828. item1.type == 7
  829. " :placeholder="item1.name" @click.stop="
  830. checkChpater3($event, index1, item1)
  831. " style="
  832. border: none;
  833. outline: none;
  834. width: 80%;
  835. minwidth: 215px;
  836. z-index: 99;
  837. font-size: 14px;
  838. white-space: nowrap;
  839. overflow: hidden;
  840. text-overflow: ellipsis;
  841. " />
  842. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  843. border: none;
  844. outline: none;
  845. width: 80%;
  846. white-space: nowrap;
  847. overflow: hidden;
  848. text-overflow: ellipsis;
  849. " readonly="true" @click="
  850. selectAttText(index1)
  851. " />
  852. <input :placeholder="item1.title ? item1.title : '链接'
  853. " v-if="item1.type == 8" style="
  854. border: none;
  855. outline: none;
  856. width: 80%;
  857. white-space: nowrap;
  858. overflow: hidden;
  859. text-overflow: ellipsis;
  860. " readonly="true" @click="selectLine(index1)" />
  861. <input :placeholder="item1.title ? item1.title : '链接'
  862. " v-if="item1.type == 14" style="
  863. border: none;
  864. outline: none;
  865. width: 80%;
  866. white-space: nowrap;
  867. overflow: hidden;
  868. text-overflow: ellipsis;
  869. " readonly="true" @click="
  870. openUpdateSource(index1)
  871. " />
  872. </div>
  873. <div class="chapter_upload_ic">
  874. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  875. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  876. checkChpater3($event, index1, item1)
  877. ">
  878. <div></div>
  879. </div>
  880. <div class="chapter_upload_ic_r" @click.stop="
  881. deleteKnowInfoData(
  882. $event,
  883. index1
  884. )
  885. ">
  886. <div></div>
  887. </div>
  888. </div>
  889. </div>
  890. </div>
  891. </div>
  892. </div>
  893. <div v-if="
  894. knowinfoproVisible
  895. " class="mask">
  896. <div class="progressBox">
  897. <div class="lbox">
  898. <img src="../../../assets/loading.gif" />上传中,请稍后
  899. </div>
  900. <div style="margin-bottom: 10px">
  901. <span>{{
  902. knowinfoisFinishSize
  903. }}</span>
  904. /
  905. <span>{{
  906. knowinfoisAllSize
  907. }}</span>
  908. </div>
  909. </div>
  910. </div>
  911. </div>
  912. </div>
  913. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && infoData2.length">
  914. <div style="position: relative;
  915. background: #fff;
  916. box-sizing: border-box;
  917. padding: 1px 20px 10px;
  918. width: 100%;
  919. border-radius: 10px;">
  920. <div style="
  921. display: flex;
  922. flex-direction: row;
  923. justify-content: space-between;
  924. align-items: center;
  925. " :style="{
  926. margin: true
  927. ? '20px 0 10px'
  928. : '20px 0 0',
  929. }">
  930. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  931. 知识库
  932. <div class="add_info_box" style="margin: 0 0 0 auto">
  933. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  934. 上传补充资料
  935. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  936. beforeUploadInfo2(
  937. $event,
  938. 15
  939. )
  940. " />
  941. </button>
  942. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
  943. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  944. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  945. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  946.  </el-tooltip> -->
  947. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  948. @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">智能检索资料</button>
  949. </div>
  950. </div>
  951. </div>
  952. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..." :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  953. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken" @click="cancelAjax('file')">停止</div>
  954. <div class="add_chapters_box add_c_none" v-if="
  955. infoData2 &&
  956. infoData2.length == 0
  957. ">
  958. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  959. <span>暂时还没有内容,快去添加吧</span>
  960. </div>
  961. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  962. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  963. getChapterData(
  964. $event,
  965. index1,
  966. item1.type
  967. )
  968. " >
  969. <div class="chapter_upload_o" style="
  970. position: relative;
  971. display: flex;
  972. align-items: center;
  973. ">
  974. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  975. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  976. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  977. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  978. </div>
  979. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  980. </div>
  981. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  982. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  983. </div>
  984. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  985. </div>
  986. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  987. </div>
  988. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  989. </div>
  990. </div>
  991. <div class="chapter_upload_n">
  992. <input readonly="true" v-if="
  993. item1.type == 2 ||
  994. item1.type == 3 ||
  995. item1.type == 12 ||
  996. item1.type == 13 ||
  997. item1.type == 7
  998. " :placeholder="item1.name" @click.stop="
  999. checkChpater2($event, index1 )
  1000. " style="
  1001. border: none;
  1002. outline: none;
  1003. width: 80%;
  1004. minwidth: 215px;
  1005. z-index: 99;
  1006. font-size: 14px;
  1007. white-space: nowrap;
  1008. overflow: hidden;
  1009. text-overflow: ellipsis;
  1010. " />
  1011. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1012. border: none;
  1013. outline: none;
  1014. width: 80%;
  1015. white-space: nowrap;
  1016. overflow: hidden;
  1017. text-overflow: ellipsis;
  1018. " readonly="true" @click="
  1019. selectAttText(index1)
  1020. " />
  1021. <input :placeholder="item1.title ? item1.title : '链接'
  1022. " v-if="item1.type == 8" style="
  1023. border: none;
  1024. outline: none;
  1025. width: 80%;
  1026. white-space: nowrap;
  1027. overflow: hidden;
  1028. text-overflow: ellipsis;
  1029. " readonly="true" @click="selectLine(index1)" />
  1030. <input :placeholder="item1.title ? item1.title : '链接'
  1031. " v-if="item1.type == 14" style="
  1032. border: none;
  1033. outline: none;
  1034. width: 80%;
  1035. white-space: nowrap;
  1036. overflow: hidden;
  1037. text-overflow: ellipsis;
  1038. " readonly="true" @click="
  1039. openUpdateSource(index1)
  1040. " />
  1041. </div>
  1042. <div class="chapter_upload_ic">
  1043. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1044. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1045. checkChpater2($event, index1 )
  1046. ">
  1047. <div></div>
  1048. </div>
  1049. <div class="chapter_upload_ic_r" @click.stop="
  1050. deleteInfoData2(
  1051. $event,
  1052. index1
  1053. )
  1054. ">
  1055. <div></div>
  1056. </div>
  1057. </div>
  1058. </div>
  1059. </div>
  1060. </div>
  1061. </div>
  1062. <div v-if="
  1063. infoproVisible
  1064. " class="mask">
  1065. <div class="progressBox">
  1066. <div class="lbox">
  1067. <img src="../../../assets/loading.gif" />上传中,请稍后
  1068. </div>
  1069. <div style="margin-bottom: 10px">
  1070. <span>{{
  1071. infoisFinishSize
  1072. }}</span>
  1073. /
  1074. <span>{{
  1075. infoisAllSize
  1076. }}</span>
  1077. </div>
  1078. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1079. ? infoprogress
  1080. : 0
  1081. " style="width: 80%"></el-progress> -->
  1082. </div>
  1083. </div>
  1084. </div>
  1085. </div>
  1086. <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))">
  1087. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken" @click="cancelAjax('text')">停止</div>
  1088. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1089. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  1090. 课程简要描述
  1091. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1092. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1093. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
  1094. @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
  1095. </el-tooltip>
  1096. <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>
  1097. </div>
  1098. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1099. <div style="width: calc(100%);" class='op_task_box'>
  1100. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1101. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  1102. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  1103. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  1104. <div class="op_box">
  1105. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1106. <div style="display: flex;">
  1107. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiDetail')"></el-switch>
  1108. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1109. <div class="r_pub_button_op"
  1110. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1111. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1112. </el-tooltip>
  1113. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2()">{{ courseTextB ? '确定' : '编辑'}}</div>
  1114. </div>
  1115. </div>
  1116. </div>
  1117. </div>
  1118. </div>
  1119. </div>
  1120. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(isuseT === 1)">
  1121. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1122. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1123. 课程概况<span class="inter_setting" @click="openInterPanSetting"></span>
  1124. <div class="inter_setting_panel" v-show="interSetting">
  1125. <div class="panel_title">配置工作流</div>
  1126. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1127. <div class="panel_input">
  1128. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : '请输入agentid'" class="binfo_input" v-model="agentid"/>
  1129. </div>
  1130. <div class="panel_button">
  1131. <button class="c_pub_button_confirm" @click="setAgentid">确认</button>
  1132. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">复原</button>
  1133. <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
  1134. </div>
  1135. </div>
  1136. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1137. </div>
  1138. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1139. <div class="inter_box" v-show="interPan">
  1140. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl" frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  1141. </div>
  1142. <div style="width: calc(100%);height: 100%" class='op_task_box' :class="{inter_Detailbox: !courseTextB && interPan}">
  1143. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  1144. placeholder="请输入课程简要描述" v-if="courseTextB && interPan"></textarea>
  1145. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1146. placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan"></textarea>
  1147. <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>
  1148. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-html="MarkdownT(courseText)" v-else></div>
  1149. <div class="op_box">
  1150. <div class="op_remark"></div>
  1151. <div style="display: flex;">
  1152. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1153. <div class="r_pub_button_op"
  1154. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1155. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1156. </el-tooltip> -->
  1157. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiDetail')"></el-switch>
  1158. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2()">{{ courseTextB ? '确定' : '编辑'}}</div>
  1159. </div>
  1160. </div>
  1161. </div>
  1162. </div>
  1163. </div>
  1164. </div>
  1165. <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'">
  1166. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2" @click="cancelAjax('target2')">停止</div>
  1167. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1168. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  1169. 课程目标
  1170. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1171. 上传补充资料
  1172. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1173. beforeUploadInfo2(
  1174. $event,
  1175. 16
  1176. )
  1177. " />
  1178. </button>
  1179. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  1180. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1181. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1182. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  1183. </el-tooltip>
  1184. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1185. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1186. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1)"
  1187. @click="openAiDialog(2, 'aitargetTextDetail3',1)">生成目标</button>
  1188. </el-tooltip>
  1189. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1190. <div class="add_chapters_box add_c_none" v-if="
  1191. mubiaoInfoData &&
  1192. mubiaoInfoData.length == 0
  1193. ">
  1194. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1195. <span>暂时还没有内容,快去添加吧</span>
  1196. </div>
  1197. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1198. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1199. getChapterData(
  1200. $event,
  1201. index1,
  1202. item1.type
  1203. )
  1204. " >
  1205. <div class="chapter_upload_o" style="
  1206. position: relative;
  1207. display: flex;
  1208. align-items: center;
  1209. ">
  1210. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1211. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1212. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1213. </div>
  1214. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1215. </div>
  1216. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1217. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1218. </div>
  1219. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1220. </div>
  1221. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1222. </div>
  1223. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1224. </div>
  1225. </div>
  1226. <div class="chapter_upload_n">
  1227. <input readonly="true" v-if="
  1228. item1.type == 2 ||
  1229. item1.type == 3 ||
  1230. item1.type == 12 ||
  1231. item1.type == 13 ||
  1232. item1.type == 7
  1233. " :placeholder="item1.name" @click.stop="
  1234. checkChpater3($event, index1, item1)
  1235. " style="
  1236. border: none;
  1237. outline: none;
  1238. width: 80%;
  1239. minwidth: 215px;
  1240. z-index: 99;
  1241. font-size: 14px;
  1242. white-space: nowrap;
  1243. overflow: hidden;
  1244. text-overflow: ellipsis;
  1245. " />
  1246. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1247. border: none;
  1248. outline: none;
  1249. width: 80%;
  1250. white-space: nowrap;
  1251. overflow: hidden;
  1252. text-overflow: ellipsis;
  1253. " readonly="true" @click="
  1254. selectAttText(index1)
  1255. " />
  1256. <input :placeholder="item1.title ? item1.title : '链接'
  1257. " v-if="item1.type == 8" style="
  1258. border: none;
  1259. outline: none;
  1260. width: 80%;
  1261. white-space: nowrap;
  1262. overflow: hidden;
  1263. text-overflow: ellipsis;
  1264. " readonly="true" @click="selectLine(index1)" />
  1265. <input :placeholder="item1.title ? item1.title : '链接'
  1266. " v-if="item1.type == 14" style="
  1267. border: none;
  1268. outline: none;
  1269. width: 80%;
  1270. white-space: nowrap;
  1271. overflow: hidden;
  1272. text-overflow: ellipsis;
  1273. " readonly="true" @click="
  1274. openUpdateSource(index1)
  1275. " />
  1276. </div>
  1277. <div class="chapter_upload_ic">
  1278. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1279. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1280. checkChpater3($event, index1, item1)
  1281. ">
  1282. <div></div>
  1283. </div>
  1284. <div class="chapter_upload_ic_r" @click.stop="
  1285. deletemubiaoInfoData(
  1286. $event,
  1287. index1
  1288. )
  1289. ">
  1290. <div></div>
  1291. </div>
  1292. </div>
  1293. </div>
  1294. </div>
  1295. </div>
  1296. </div>
  1297. <div v-if="
  1298. mubiaoinfoproVisible
  1299. " class="mask">
  1300. <div class="progressBox">
  1301. <div class="lbox">
  1302. <img src="../../../assets/loading.gif" />上传中,请稍后
  1303. </div>
  1304. <div style="margin-bottom: 10px">
  1305. <span>{{
  1306. mubiaoinfoisFinishSize
  1307. }}</span>
  1308. /
  1309. <span>{{
  1310. mubiaoinfoisAllSize
  1311. }}</span>
  1312. </div>
  1313. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1314. ? mubiaoinfoprogress
  1315. : 0
  1316. " style="width: 80%"></el-progress> -->
  1317. </div>
  1318. </div>
  1319. </div>
  1320. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1321. <div style="width: calc(100%);" class='op_task_box'>
  1322. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  1323. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  1324. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  1325. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1326. <div class="op_box">
  1327. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1328. <div style="display: flex;">
  1329. <el-switch style="margin-right: 10px" v-model="isQuote['aitargetTextDetail2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aitargetTextDetail2')"></el-switch>
  1330. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1331. <div class="r_pub_button_op"
  1332. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
  1333. @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
  1334. </el-tooltip>
  1335. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B,forceUpdate2()">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1336. </div>
  1337. </div>
  1338. </div>
  1339. </div>
  1340. </div>
  1341. </div>
  1342. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  1343. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1344. <div class="c_info_title">
  1345. 补充资料
  1346. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1347. </div>
  1348. <div class="buchong_box">
  1349. <span>暂时还没有内容,快去添加吧~</span>
  1350. </div>
  1351. </div> -->
  1352. <div style="position: relative;
  1353. background: #fff;
  1354. box-sizing: border-box;
  1355. padding: 1px 20px 10px;
  1356. width: 100%;
  1357. border-radius: 10px;">
  1358. <div style="
  1359. display: flex;
  1360. flex-direction: row;
  1361. justify-content: space-between;
  1362. align-items: center;
  1363. " :style="{
  1364. margin: true
  1365. ? '20px 0 10px'
  1366. : '20px 0 0',
  1367. }">
  1368. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1369. 补充资料
  1370. <div class="add_info_box" style="margin: 0 0 0 auto">
  1371. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1372. 上传补充资料
  1373. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1374. beforeUploadInfo2(
  1375. $event,
  1376. 13
  1377. )
  1378. " />
  1379. </button>
  1380. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1381. 图文
  1382. </button>
  1383. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1384. 链接
  1385. </button>
  1386. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1387. 代码
  1388. </button>
  1389. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1390. 资源
  1391. </button> -->
  1392. </div>
  1393. </div>
  1394. </div>
  1395. <div>
  1396. <div class="add_chapters_box add_c_none" v-if="
  1397. infoData &&
  1398. infoData.length == 0
  1399. ">
  1400. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1401. <span>暂时还没有内容,快去添加吧</span>
  1402. </div>
  1403. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1404. <div @dragstart="
  1405. dragStart(item1, index1, 0)
  1406. " @dragover.prevent="
  1407. dragOver(index1, 0)
  1408. " @dragend="dragEnd()" :draggable="isdrag ==
  1409. 'chapter-' + 0 + '-' + index1
  1410. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1411. getChapterData(
  1412. $event,
  1413. index1,
  1414. item1.type
  1415. )
  1416. " :class="{
  1417. dragOverTop2:
  1418. newIndex === index1 &&
  1419. typeIndex ==
  1420. 'chapter-' +
  1421. 0 +
  1422. '-' +
  1423. index1 &&
  1424. oldIndex > index1 &&
  1425. dragType == 'drag',
  1426. dragOverBottom2:
  1427. newIndex === index1 &&
  1428. typeIndex ==
  1429. 'chapter-' +
  1430. 0 +
  1431. '-' +
  1432. index1 &&
  1433. oldIndex < index1 &&
  1434. dragType == 'drag',
  1435. }">
  1436. <!-- <div @mousedown="
  1437. isdrag =
  1438. 'chapter-' + 0 + '-' + index1
  1439. " @mouseup="isdrag = ''" @touchstart="
  1440. isdrag =
  1441. 'chapter-' + 0 + '-' + index1
  1442. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1443. <div class="chapter_upload_o" style="
  1444. position: relative;
  1445. display: flex;
  1446. align-items: center;
  1447. ">
  1448. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1449. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1450. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1451. </div>
  1452. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1453. </div>
  1454. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1455. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1456. </div>
  1457. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1458. </div>
  1459. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1460. </div>
  1461. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1462. </div>
  1463. </div>
  1464. <div class="chapter_upload_n">
  1465. <input readonly="true" v-if="
  1466. item1.type == 2 ||
  1467. item1.type == 3 ||
  1468. item1.type == 12 ||
  1469. item1.type == 13 ||
  1470. item1.type == 7
  1471. " :placeholder="item1.name" @click="
  1472. updataVideoT(
  1473. $event,
  1474. index1
  1475. )
  1476. " style="
  1477. border: none;
  1478. outline: none;
  1479. width: 80%;
  1480. minwidth: 215px;
  1481. z-index: 99;
  1482. font-size: 14px;
  1483. white-space: nowrap;
  1484. overflow: hidden;
  1485. text-overflow: ellipsis;
  1486. " />
  1487. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1488. border: none;
  1489. outline: none;
  1490. width: 80%;
  1491. white-space: nowrap;
  1492. overflow: hidden;
  1493. text-overflow: ellipsis;
  1494. " readonly="true" @click="
  1495. selectAttText(index1)
  1496. " />
  1497. <input :placeholder="item1.title ? item1.title : '链接'
  1498. " v-if="item1.type == 8" style="
  1499. border: none;
  1500. outline: none;
  1501. width: 80%;
  1502. white-space: nowrap;
  1503. overflow: hidden;
  1504. text-overflow: ellipsis;
  1505. " readonly="true" @click="selectLine(index1)" />
  1506. <input :placeholder="item1.title ? item1.title : '链接'
  1507. " v-if="item1.type == 14" style="
  1508. border: none;
  1509. outline: none;
  1510. width: 80%;
  1511. white-space: nowrap;
  1512. overflow: hidden;
  1513. text-overflow: ellipsis;
  1514. " readonly="true" @click="
  1515. openUpdateSource(index1)
  1516. " />
  1517. </div>
  1518. <div class="chapter_upload_ic">
  1519. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1520. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1521. <div class="chapter_upload_up" @click="
  1522. upCd(
  1523. $event,
  1524. index1
  1525. )
  1526. "></div>
  1527. <div class="chapter_upload_down" @click="
  1528. downCd(
  1529. $event,
  1530. index1
  1531. )
  1532. "></div>
  1533. </div>
  1534. <div class="chapter_upload_ic_edit" v-if="
  1535. item1.type == 2 ||
  1536. item1.type == 3 ||
  1537. item1.type == 12 ||
  1538. item1.type == 13 ||
  1539. item1.type == 7
  1540. " @click.stop="
  1541. updataVideoT(
  1542. $event,
  1543. index1
  1544. )
  1545. ">
  1546. <div></div>
  1547. </div>
  1548. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1549. selectAttText(index1)
  1550. ">
  1551. <div></div>
  1552. </div>
  1553. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1554. @click="selectLine(index1)">
  1555. <div></div>
  1556. </div>
  1557. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1558. openUpdateSource(index1)
  1559. ">
  1560. <div></div>
  1561. </div> -->
  1562. <div class="chapter_upload_ic_r" @click.stop="
  1563. deleteInfoData(
  1564. $event,
  1565. index1
  1566. )
  1567. ">
  1568. <div></div>
  1569. </div>
  1570. </div>
  1571. </div>
  1572. </div>
  1573. </div>
  1574. </div>
  1575. <div v-if="
  1576. infoproVisible
  1577. " class="mask">
  1578. <div class="progressBox">
  1579. <!-- <div id="closePro" class="closeCss">
  1580. <img src="../../../../assets/icon/close.png" alt />
  1581. </div> -->
  1582. <div class="lbox">
  1583. <img src="../../../assets/loading.gif" />上传中,请稍后
  1584. </div>
  1585. <div style="margin-bottom: 10px">
  1586. <span>{{
  1587. infoisFinishSize
  1588. }}M</span>
  1589. /
  1590. <span>{{
  1591. infoisAllSize
  1592. }}M</span>
  1593. </div>
  1594. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1595. ? infoprogress
  1596. : 0
  1597. " style="width: 80%"></el-progress>
  1598. </div>
  1599. </div>
  1600. </div>
  1601. </div>
  1602. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1603. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1604. <div class="c_info_title">
  1605. 补充描述
  1606. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1607. </div>
  1608. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1609. <div style="width: calc(100%)">
  1610. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1611. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1612. </div>
  1613. </div>
  1614. </div>
  1615. </div>
  1616. <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">
  1617. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1618. <div class="c_info_title">
  1619. 课程大纲
  1620. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1621. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1622. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1623. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1624. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1625. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1626. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1627. </el-tooltip>
  1628. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1629. @click="openAiDialog2(2, 'aiOutline')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1630. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1631. @click="openAiDialog2(2, 'aiOutline2')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1632. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1633. </div>
  1634. <div class="task_outline">
  1635. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1636. <div class="outline_task">
  1637. <div class="title">任务{{ index + 1 }}</div>
  1638. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1639. v-model="item.task" />
  1640. <div class="outline_btn">
  1641. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1642. <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>
  1643. </el-tooltip>
  1644. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index)">在上面加入一个任务</button>
  1645. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index)">在下面加入一个任务</button>
  1646. <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>
  1647. </div>
  1648. </div>
  1649. <div class="outline_detail" :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1650. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]" @click="cancelAjax('outlineTask', index)">停止</div>
  1651. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1652. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1653. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1654. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1655. <div class="op_box">
  1656. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1657. <div style="display: flex;">
  1658. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail1-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiDetail1-'+index)"></el-switch>
  1659. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1660. <div class="r_pub_button_op"
  1661. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  1662. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  1663. </el-tooltip>
  1664. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index)">{{
  1665. item.isTask2 ? '确定' : '编辑'}}</div>
  1666. </div>
  1667. </div>
  1668. </div>
  1669. </div>
  1670. </div>
  1671. </div>
  1672. </div>
  1673. <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)">
  1674. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1675. <div class="c_info_title">
  1676. 概念群
  1677. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1678. @click="openAiDialog2(2, 'aiCpote1')">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1679. </div>
  1680. <div class="task_outline">
  1681. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1682. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1683. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1684. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1685. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1686. <div class="op_box">
  1687. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1688. <div style="display: flex;">
  1689. <el-switch style="margin-right: 10px" v-model="isQuote['aiCpote1']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiCpote1')"></el-switch>
  1690. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1691. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  1692. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1693. </el-tooltip>
  1694. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  1695. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1696. </div>
  1697. </div>
  1698. </div>
  1699. </div>
  1700. </div>
  1701. </div>
  1702. <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)">
  1703. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1704. <div class="c_info_title">
  1705. 问题链
  1706. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1707. @click="openAiDialog2(2, 'aiCpote2')">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1708. </div>
  1709. <div class="task_outline">
  1710. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1711. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1712. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1713. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1714. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1715. <div class="op_box">
  1716. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1717. <div style="display: flex;">
  1718. <el-switch style="margin-right: 10px" v-model="isQuote['aiCpote2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiCpote2')"></el-switch>
  1719. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1720. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  1721. @click="openAiDialog(2, 'aiCpote2')">智能优化</div>
  1722. </el-tooltip>
  1723. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  1724. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1725. </div>
  1726. </div>
  1727. </div>
  1728. </div>
  1729. </div>
  1730. </div>
  1731. <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)">
  1732. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1733. <div class="c_info_title">
  1734. 目标层
  1735. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1736. @click="openAiDialog2(2, 'aiCpote3')">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1737. </div>
  1738. <div class="task_outline">
  1739. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1740. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1741. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1742. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1743. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1744. <div class="op_box">
  1745. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1746. <div style="display: flex;">
  1747. <el-switch style="margin-right: 10px" v-model="isQuote['aiCpote3']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiCpote3')"></el-switch>
  1748. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1749. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  1750. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  1751. </el-tooltip>
  1752. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  1753. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1754. </div>
  1755. </div>
  1756. </div>
  1757. </div>
  1758. </div>
  1759. </div>
  1760. <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)">
  1761. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1762. <div class="c_info_title">
  1763. 任务簇
  1764. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1765. @click="openAiDialog2(2, 'aiCpote4')">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1766. </div>
  1767. <div class="task_outline">
  1768. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1769. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1770. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1771. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1772. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1773. <div class="op_box">
  1774. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1775. <div style="display: flex;">
  1776. <el-switch style="margin-right: 10px" v-model="isQuote['aiCpote4']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiCpote4')"></el-switch>
  1777. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1778. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  1779. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  1780. </el-tooltip>
  1781. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  1782. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1783. </div>
  1784. </div>
  1785. </div>
  1786. </div>
  1787. </div>
  1788. </div>
  1789. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1790. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1791. <div class="c_info_title">
  1792. 教案
  1793. <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'">
  1794. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1795. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1796. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1797. </el-tooltip>
  1798. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1799. @click="openAiDialog2(2, 'aiTeacher2')" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1800. <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')">
  1801. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1802. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1803. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1804. </el-tooltip>
  1805. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1806. </div>
  1807. <div class="task_outline">
  1808. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1809. <div class="outline_task">
  1810. <div class="title">任务{{ index + 1 }}</div>
  1811. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1812. v-model="item.task" />
  1813. </div>
  1814. <div class="outline_detail" :style="{ minHeight: taskDetailLoading5.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1815. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading5.indexOf('task-' + index) !== -1" @click="cancelAjax('teacherDetail2', index)">停止</div>
  1816. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1817. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1818. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1819. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1820. <div class="op_box">
  1821. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1822. <div style="display: flex;">
  1823. <el-switch style="margin-right: 10px" v-model="isQuote['teacherDetail2-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('teacherDetail2-'+index)"></el-switch>
  1824. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1825. <div class="r_pub_button_op"
  1826. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  1827. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  1828. </el-tooltip>
  1829. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1830. item.isTask3 ? '确定' : '编辑'}}</div>
  1831. </div>
  1832. </div>
  1833. </div>
  1834. </div>
  1835. </div>
  1836. </div>
  1837. </div>
  1838. <div class="info_btnBox3" v-if="istemplate != 1">
  1839. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1840. goTo(
  1841. '/course?userid=' +
  1842. userid +
  1843. '&oid=' +
  1844. oid +
  1845. '&org=' +
  1846. org +
  1847. '&role=' +
  1848. role
  1849. )
  1850. ">
  1851. 返回课程
  1852. </button>
  1853. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1854. {{ steps == 4 ? "返回课程" : "上一步" }}
  1855. </button>
  1856. <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">
  1857. {{isuseT === true ? "重新生成概况和目标" : "生成概况和目标"}}
  1858. </button>
  1859. <button class="c_pub_button_confirm" v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  1860. {{isuseT === true ? "重新生成概况" : "生成概况"}}
  1861. </button>
  1862. <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
  1863. {{ "导出教案" }}
  1864. </button>
  1865. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  1866. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  1867. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  1868. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  1869. pub_btn_next_img: steps != 3,
  1870. pub_btn_finish_img: steps == 3,
  1871. }">
  1872. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  1873. </button>
  1874. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  1875. @contextmenu.prevent="nextSteps(1)" :class="{
  1876. pub_btn_next_img: steps != 3,
  1877. pub_btn_finish_img: steps == 3,
  1878. }">
  1879. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  1880. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  1881. : "下一步" }}
  1882. </button>
  1883. </el-tooltip>
  1884. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  1885. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  1886. pub_btn_next_img: steps != 3,
  1887. pub_btn_finish_img: steps == 3,
  1888. }">下一步2</button>
  1889. </el-tooltip> -->
  1890. </div>
  1891. </div>
  1892. <div class="rightBox" v-if="steps == 2" :style="{
  1893. height:
  1894. !isStepDisplay && !isBtnDisplay
  1895. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1896. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1897. }">
  1898. <div class="basic_box" style="
  1899. padding: 20px 30px 0px !important;
  1900. box-sizing: border-box;
  1901. height: calc(100% - 80px);
  1902. overflow: auto;
  1903. background: #fff;
  1904. ">
  1905. <!-- <div
  1906. style="
  1907. color: #b8b8b8;
  1908. background: #fff;
  1909. width: 26%;
  1910. height: 40px;
  1911. border-radius: 15px;
  1912. padding-left: 20px;
  1913. line-height: 40px;
  1914. font-size: 17px;
  1915. box-shadow: 0px 1px 2px 2px #e0e0e0;
  1916. "
  1917. >-->
  1918. <div class="right_title" style="border: none; margin: 0; padding: 0">
  1919. 请选择合适的课程模板
  1920. </div>
  1921. <div class="wordbox">
  1922. <div class="wordTeacher" @click="checkTemplate2()">
  1923. <div class="wordPic">
  1924. <img src="../../../assets/icon/new/template_none.png" alt />
  1925. </div>
  1926. <div style="
  1927. margin-top: 10px;
  1928. line-height: 19px;
  1929. overflow: hidden;
  1930. text-overflow: ellipsis;
  1931. white-space: nowrap;
  1932. padding: 0 20px;
  1933. ">
  1934. 空白模板
  1935. </div>
  1936. </div>
  1937. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  1938. <div class="wordPic">
  1939. <img src="../../../assets/icon/new/template.png" alt />
  1940. </div>
  1941. <div style="
  1942. margin-top: 10px;
  1943. line-height: 19px;
  1944. overflow: hidden;
  1945. text-overflow: ellipsis;
  1946. white-space: nowrap;
  1947. padding: 0 20px;
  1948. ">
  1949. {{ aa.title }}
  1950. </div>
  1951. </div>
  1952. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  1953. <div class="wordPic">
  1954. <img src="../../../assets/icon/new/template.png" alt />
  1955. </div>
  1956. <div style="
  1957. margin-top: 10px;
  1958. line-height: 19px;
  1959. overflow: hidden;
  1960. text-overflow: ellipsis;
  1961. white-space: nowrap;
  1962. padding: 0 20px;
  1963. ">
  1964. 简易模板
  1965. </div>
  1966. </div>
  1967. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  1968. <div class="wordPic">
  1969. <img src="../../../assets/icon/new/template.png" alt />
  1970. </div>
  1971. <div style="
  1972. margin-top: 10px;
  1973. line-height: 19px;
  1974. overflow: hidden;
  1975. text-overflow: ellipsis;
  1976. white-space: nowrap;
  1977. padding: 0 20px;
  1978. ">
  1979. 智能粘贴模式
  1980. </div>
  1981. </div>
  1982. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  1983. <div class="wordPic">
  1984. <img src="../../../assets/icon/wordMub.png" alt />
  1985. </div>
  1986. <div style="
  1987. margin-top: 10px;
  1988. line-height: 19px;
  1989. overflow: hidden;
  1990. text-overflow: ellipsis;
  1991. white-space: nowrap;
  1992. padding: 0 20px;
  1993. ">
  1994. 未来小学课程设计
  1995. </div>
  1996. </div> -->
  1997. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  1998. <div class="wordPic">
  1999. <img src="../../../assets/icon/wordMub.png" alt />
  2000. </div>
  2001. <div style="
  2002. margin-top: 10px;
  2003. line-height: 19px;
  2004. overflow: hidden;
  2005. text-overflow: ellipsis;
  2006. white-space: nowrap;
  2007. padding: 0 20px;
  2008. ">
  2009. 我的课程
  2010. </div>
  2011. </div> -->
  2012. </div>
  2013. </div>
  2014. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  2015. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2016. goTo(
  2017. '/course?userid=' +
  2018. userid +
  2019. '&oid=' +
  2020. oid +
  2021. '&org=' +
  2022. org +
  2023. '&role=' +
  2024. role
  2025. )
  2026. ">
  2027. 返回课程
  2028. </button>
  2029. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2030. {{ steps == 4 ? "返回课程" : "上一步" }}
  2031. </button>
  2032. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  2033. pub_btn_next_img: steps != 3,
  2034. pub_btn_finish_img: steps == 3,
  2035. }">
  2036. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  2037. </button>
  2038. </div>
  2039. </div>
  2040. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  2041. height:
  2042. !isStepDisplay && !isBtnDisplay
  2043. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  2044. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2045. }">
  2046. <div class="rb_c_box">
  2047. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  2048. <div class="rb_c_nav">
  2049. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  2050. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  2051. </div>
  2052. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  2053. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  2054. position: istemplate == 1 ? 'sticky' : 'unset',
  2055. top: istemplate == 1 ? '0' : 'unset'
  2056. }">
  2057. <!-- <div class="navTop">辅助导航</div> -->
  2058. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  2059. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  2060. <div class="nt_taskBox" style="width: 100%;">
  2061. <div class="nt_taskTitle"
  2062. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  2063. unitIndex + 1 }}</div>
  2064. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  2065. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  2066. <span>{{ unitJson[unitIndex].dyName }}</span>
  2067. </el-tooltip>
  2068. </div>
  2069. </div>
  2070. </div> -->
  2071. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  2072. .taskJson" :key="tIndex" :class="{
  2073. dragOverTop:
  2074. newIndex === tIndex &&
  2075. typeIndex == 'task-' + tIndex &&
  2076. oldIndex > tIndex &&
  2077. dragType == 'task',
  2078. dragOverBottom:
  2079. newIndex === tIndex &&
  2080. typeIndex == 'task-' + tIndex &&
  2081. oldIndex < tIndex &&
  2082. dragType == 'task',
  2083. }">
  2084. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  2085. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  2086. class="navTask" :class="{
  2087. isNavTask:
  2088. isClickColor > 0 && isClickColor == tIndex + 1,
  2089. isNavOpen: t.toolOpen,
  2090. }">
  2091. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  2092. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  2093. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  2094. class="chapter_upload_drag"></div>
  2095. <div class="nt_taskBox">
  2096. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  2097. <div class="nt_taskName">
  2098. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2099. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  2100. </el-tooltip>
  2101. </div>
  2102. </div>
  2103. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  2104. 1
  2105. ">
  2106. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  2107. @click.stop="taskMove(1, tIndex)"></div>
  2108. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  2109. @click.stop="taskMove(2, tIndex)"></div>
  2110. </div> -->
  2111. </div>
  2112. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2113. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2114. @click="jumpGj(tIndex, toolIndex2)">
  2115. <div class="gjCss" :class="{
  2116. isGjCss:
  2117. toolIndexType == `gj${tIndex}${toolIndex2}`,
  2118. }">
  2119. <div>工具{{ toolIndex2 + 1 }}:</div>
  2120. <div>
  2121. {{
  2122. toolsData[tool.tool[0]] &&
  2123. toolsData[tool.tool[0]].name
  2124. }}
  2125. </div>
  2126. </div>
  2127. </div>
  2128. </div>
  2129. </div>
  2130. </div>
  2131. <div class="navBottom" v-if="courseState == 1">
  2132. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  2133. dragOverTop:
  2134. newIndex === stageIndex &&
  2135. typeIndex == 'Unit-' + stageIndex &&
  2136. oldIndex > stageIndex &&
  2137. dragType == 'Unit',
  2138. dragOverBottom:
  2139. newIndex === stageIndex &&
  2140. typeIndex == 'Unit-' + stageIndex &&
  2141. oldIndex < stageIndex &&
  2142. dragType == 'Unit',
  2143. }">
  2144. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  2145. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  2146. @click="unitSet2(stageIndex)" class="navStage" :class="{
  2147. isNavStage: stageIndex == unitIndex,
  2148. isNavStageOpen: stage.toolOpen,
  2149. }">
  2150. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  2151. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  2152. class="chapter_upload_drag"></div>
  2153. <div class="nt_taskBox">
  2154. <div class="nt_taskTitle">
  2155. 第{{ stageIndex + 1 }}阶段:
  2156. </div>
  2157. <div class="nt_taskName">
  2158. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  2159. " placement="top">
  2160. <span>{{
  2161. stage.dyName ? stage.dyName : "未命名阶段"
  2162. }}</span>
  2163. </el-tooltip>
  2164. </div>
  2165. </div>
  2166. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  2167. </div>
  2168. <div v-for="(t, tIndex) in unitJson[stageIndex]
  2169. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  2170. dragOverTop:
  2171. newIndex === tIndex &&
  2172. typeIndex == 'task-' + tIndex &&
  2173. ((oldIndex > tIndex &&
  2174. stageIndex == checkUnitIndex) ||
  2175. (oldIndex == tIndex &&
  2176. stageIndex == checkUnitIndex &&
  2177. checkUnitIndex != oldUnitIndex)) &&
  2178. dragType == 'task',
  2179. dragOverBottom:
  2180. newIndex === tIndex &&
  2181. typeIndex == 'task-' + tIndex &&
  2182. oldIndex < tIndex &&
  2183. stageIndex == checkUnitIndex &&
  2184. dragType == 'task',
  2185. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2186. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2187. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2188. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2189. isNavTask:
  2190. isClickColor > 0 &&
  2191. isClickColor == tIndex + 1 &&
  2192. stageIndex == unitIndex,
  2193. isNavOpen: t.toolOpen,
  2194. }">
  2195. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2196. <div @mousedown="
  2197. isdrag = 'task-' + stageIndex + '-' + tIndex
  2198. " @mouseup="isdrag = ''" @touchstart="
  2199. isdrag = 'task-' + stageIndex + '-' + tIndex
  2200. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2201. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2202. <div class="nt_taskTitle">
  2203. 任务{{ tIndex + 1 }}:
  2204. </div>
  2205. <div class="nt_taskName">
  2206. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2207. <span>{{
  2208. t.task ? t.task : "未命名任务"
  2209. }}</span>
  2210. </el-tooltip>
  2211. </div>
  2212. </div>
  2213. </div>
  2214. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2215. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2216. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2217. <div class="gjCss" :class="{
  2218. isGjCss:
  2219. toolIndexType ==
  2220. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2221. }">
  2222. <div>工具{{ toolIndex2 + 1 }}:</div>
  2223. <div>
  2224. {{
  2225. toolsData[tool.tool[0]] &&
  2226. toolsData[tool.tool[0]].name
  2227. }}
  2228. </div>
  2229. </div>
  2230. </div>
  2231. </div>
  2232. </div>
  2233. </div>
  2234. </div>
  2235. </div>
  2236. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2237. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2238. </div>
  2239. </div>
  2240. <div class="rb_c_box_right">
  2241. <!-- <div class="rb_c_box_btn">
  2242. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  2243. </div> -->
  2244. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2245. <div v-if="false" style="
  2246. display: flex;
  2247. flex-direction: row;
  2248. align-items: center;
  2249. position: sticky;
  2250. top: 0;
  2251. z-index: 99;
  2252. width: 100%;
  2253. padding: 0 20px 0 20px;
  2254. box-sizing: border-box;
  2255. background: #fff;
  2256. border-radius: 8px;
  2257. ">
  2258. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2259. <div class="cru_selectBox" :style="{
  2260. maxWidth: isPasteTask
  2261. ? 'calc(100% - 335px)'
  2262. : 'calc(100% - 190px)',
  2263. }" v-if="courseState == 1">
  2264. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2265. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2266. <!-- item.dyName ? item.dyName : -->
  2267. <span v-if="
  2268. unitJson[unitJson.length - 1].easy == 4 ||
  2269. unitJson[unitJson.length - 1].easy == 6
  2270. ">{{
  2271. item.dyName
  2272. ? item.dyName
  2273. : "第" + (index + 1) + "阶段"
  2274. }}</span>
  2275. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2276. </div>
  2277. <div class="cru_line" :style="{
  2278. left: offsetLetfPx + 'px',
  2279. }"></div>
  2280. </div>
  2281. <div class="addStageImg" @click="addunit()" v-if="
  2282. !(unitJson[unitJson.length - 1].easy == 4) &&
  2283. !(unitJson[unitJson.length - 1].easy == 6) &&
  2284. courseState == 1
  2285. ">
  2286. <img src="../../../assets/icon/new/addStage.png" alt />
  2287. </div>
  2288. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2289. v-if="courseState == 2" style="margin: 15px 0">
  2290. 新建阶段
  2291. </button>
  2292. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2293. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2294. 阶段顺序
  2295. </button>
  2296. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2297. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2298. 智能粘贴
  2299. </button>
  2300. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2301. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2302. }" style="padding: 0 12px">
  2303. 选择课程模板
  2304. </button>
  2305. </div>
  2306. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2307. :key="index">
  2308. <div v-if="courseState == 4" style="position: relative;
  2309. background: #fff;
  2310. box-sizing: border-box;
  2311. padding: 1px 20px 10px;
  2312. width: 100%;
  2313. border-radius: 10px;">
  2314. <div style="
  2315. display: flex;
  2316. flex-direction: row;
  2317. justify-content: space-between;
  2318. align-items: center;
  2319. " :style="{
  2320. margin: !item.taskJson[0].isFoldchapter
  2321. ? '20px 0 10px'
  2322. : '20px 0 0',
  2323. }">
  2324. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2325. 学习内容
  2326. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2327. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2328. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2329. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2330. </el-tooltip>
  2331. </div>
  2332. </div>
  2333. <div>
  2334. <div class="add_chapters_box add_c_none" v-if="
  2335. item.taskJson[0].chapterData &&
  2336. item.taskJson[0].chapterData.length == 0
  2337. ">
  2338. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  2339. <span>请添加学习内容</span>
  2340. </div>
  2341. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2342. <div @dragstart="
  2343. dragStart(item1, index1, 0)
  2344. " @dragover.prevent="
  2345. dragOver(index1, 0)
  2346. " @dragend="dragEnd()" :draggable="isdrag ==
  2347. 'chapter-' + 0 + '-' + index1
  2348. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2349. :key="item1.id" @click="
  2350. getChapterData(
  2351. $event,
  2352. unitIndex,
  2353. index,
  2354. index1,
  2355. item1.type
  2356. )
  2357. " :class="{
  2358. dragOverTop2:
  2359. newIndex === index1 &&
  2360. typeIndex ==
  2361. 'chapter-' +
  2362. 0 +
  2363. '-' +
  2364. index1 &&
  2365. oldIndex > index1 &&
  2366. dragType == 'drag',
  2367. dragOverBottom2:
  2368. newIndex === index1 &&
  2369. typeIndex ==
  2370. 'chapter-' +
  2371. 0 +
  2372. '-' +
  2373. index1 &&
  2374. oldIndex < index1 &&
  2375. dragType == 'drag',
  2376. }">
  2377. <div @mousedown="
  2378. isdrag =
  2379. 'chapter-' + 0 + '-' + index1
  2380. " @mouseup="isdrag = ''" @touchstart="
  2381. isdrag =
  2382. 'chapter-' + 0 + '-' + index1
  2383. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2384. <div class="chapter_upload_o" style="
  2385. position: relative;
  2386. display: flex;
  2387. align-items: center;
  2388. ">
  2389. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2390. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2391. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2392. </div>
  2393. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2394. </div>
  2395. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2396. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2397. </div>
  2398. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2399. </div>
  2400. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2401. </div>
  2402. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2403. </div>
  2404. </div>
  2405. <div class="chapter_upload_n">
  2406. <input readonly="true" v-if="
  2407. item1.type == 2 ||
  2408. item1.type == 3 ||
  2409. item1.type == 12 ||
  2410. item1.type == 13 ||
  2411. item1.type == 7
  2412. " :placeholder="item1.name" @click="
  2413. updataVideoT(
  2414. $event,
  2415. unitIndex,
  2416. 0,
  2417. index1
  2418. )
  2419. " style="
  2420. border: none;
  2421. outline: none;
  2422. width: 80%;
  2423. minwidth: 215px;
  2424. z-index: 99;
  2425. font-size: 14px;
  2426. white-space: nowrap;
  2427. overflow: hidden;
  2428. text-overflow: ellipsis;
  2429. " />
  2430. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2431. border: none;
  2432. outline: none;
  2433. width: 80%;
  2434. white-space: nowrap;
  2435. overflow: hidden;
  2436. text-overflow: ellipsis;
  2437. " readonly="true" @click="
  2438. selectAttText(0, index1)
  2439. " />
  2440. <input :placeholder="item1.title ? item1.title : '链接'
  2441. " v-if="item1.type == 8" style="
  2442. border: none;
  2443. outline: none;
  2444. width: 80%;
  2445. white-space: nowrap;
  2446. overflow: hidden;
  2447. text-overflow: ellipsis;
  2448. " readonly="true" @click="selectLine(0, index1)" />
  2449. <input :placeholder="item1.title ? item1.title : '链接'
  2450. " v-if="item1.type == 14" style="
  2451. border: none;
  2452. outline: none;
  2453. width: 80%;
  2454. white-space: nowrap;
  2455. overflow: hidden;
  2456. text-overflow: ellipsis;
  2457. " readonly="true" @click="
  2458. openUpdateSource(0, index1)
  2459. " />
  2460. </div>
  2461. <div class="chapter_upload_ic">
  2462. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2463. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2464. checkChpater( $event, unitIndex, 0, index1 )
  2465. ">
  2466. <div></div>
  2467. </div>
  2468. <div class="chapter_upload_ud" style="z-index: 99">
  2469. <div class="chapter_upload_up" @click="
  2470. upCd(
  2471. $event,
  2472. unitIndex,
  2473. index,
  2474. 0,
  2475. index1
  2476. )
  2477. "></div>
  2478. <div class="chapter_upload_down" @click="
  2479. downCd(
  2480. $event,
  2481. unitIndex,
  2482. index,
  2483. 0,
  2484. index1
  2485. )
  2486. "></div>
  2487. </div>
  2488. <div class="chapter_upload_ic_edit" v-if="
  2489. item1.type == 2 ||
  2490. item1.type == 3 ||
  2491. item1.type == 12 ||
  2492. item1.type == 13 ||
  2493. item1.type == 7
  2494. " @click.stop="
  2495. updataVideoT(
  2496. $event,
  2497. unitIndex,
  2498. 0,
  2499. index1
  2500. )
  2501. ">
  2502. <div></div>
  2503. </div>
  2504. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2505. selectAttText(0, index1)
  2506. ">
  2507. <div></div>
  2508. </div>
  2509. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2510. @click="selectLine(0, index1)">
  2511. <div></div>
  2512. </div>
  2513. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2514. openUpdateSource(0, index1)
  2515. ">
  2516. <div></div>
  2517. </div>
  2518. <div class="chapter_upload_ic_r" @click.stop="
  2519. deleteChapterData(
  2520. $event,
  2521. unitIndex,
  2522. index,
  2523. index1,
  2524. 0
  2525. )
  2526. ">
  2527. <div></div>
  2528. </div>
  2529. </div>
  2530. </div>
  2531. </div>
  2532. </div>
  2533. </div>
  2534. <div class="add_info_box" style="margin: 10px 0 0">
  2535. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2536. 文件
  2537. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2538. beforeUpload2(
  2539. $event,
  2540. unitIndex,
  2541. 13,
  2542. 0
  2543. )
  2544. " />
  2545. </button>
  2546. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2547. 图文
  2548. </button>
  2549. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2550. 链接
  2551. </button>
  2552. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2553. 代码
  2554. </button>
  2555. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2556. 资源
  2557. </button>
  2558. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2559. AI生成PPT
  2560. </button>
  2561. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2562. AI生成教案
  2563. </button>
  2564. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2565. 智能检索视频
  2566. </button>
  2567. </div>
  2568. <div v-if="
  2569. unitJson[unitIndex].chapterInfo[0].taskJson[
  2570. 0
  2571. ].proVisible
  2572. " class="mask">
  2573. <div class="progressBox">
  2574. <!-- <div id="closePro" class="closeCss">
  2575. <img src="../../../../assets/icon/close.png" alt />
  2576. </div> -->
  2577. <div class="lbox">
  2578. <img src="../../../assets/loading.gif" />上传中,请稍后
  2579. </div>
  2580. <div style="margin-bottom: 10px">
  2581. <span>{{
  2582. unitJson[unitIndex].chapterInfo[0].taskJson[
  2583. 0
  2584. ].isFinishSize
  2585. }}</span>
  2586. /
  2587. <span>{{
  2588. unitJson[unitIndex].chapterInfo[0].taskJson[
  2589. 0
  2590. ].isAllSize
  2591. }}</span>
  2592. </div>
  2593. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2594. 0
  2595. ].progress
  2596. ? unitJson[unitIndex].chapterInfo[0]
  2597. .taskJson[0].progress
  2598. : 0
  2599. " style="width: 80%"></el-progress> -->
  2600. </div>
  2601. </div>
  2602. </div>
  2603. <div class="chapter_box" v-if="courseState == 1">
  2604. <div class="chapter_contentbox">
  2605. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2606. <div class="cc_input">
  2607. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2608. v-model="unitJson[unitIndex].dyName" />
  2609. </div>
  2610. <div class="remove" v-if="
  2611. (unitJson.length > 1 || courseState != 2) &&
  2612. !(unitJson[unitJson.length - 1].easy == 4) &&
  2613. !(unitJson[unitJson.length - 1].easy == 6)
  2614. " @click="deleteUnit(unitIndex)"></div>
  2615. </div>
  2616. </div>
  2617. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2618. margin: 50px 0px 10px;
  2619. font-size: 1.5em;
  2620. font-weight: 700;
  2621. color: #0f7eff;
  2622. ">
  2623. 添加任务
  2624. </div> -->
  2625. <div class="taskBorder" :style="{
  2626. minHeight: unitJson[unitIndex].easy && 'unset',
  2627. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2628. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2629. <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
  2630. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" @click="cancelAjax('aiTaskGL1', itemTaskIndex)">停止</div>
  2631. <div class="taskTitle">
  2632. <div style="display: flex;width: 100%;justify-content: space-between;">
  2633. <span>任务{{ itemTaskIndex + 1 }}</span>
  2634. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2635. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2636. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2637. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2638. </el-tooltip> -->
  2639. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2640. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2641. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex)"
  2642. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex)">重新生成任务</button>
  2643. </el-tooltip>
  2644. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2645. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2646. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  2647. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  2648. </el-tooltip> -->
  2649. </div>
  2650. </div>
  2651. <!-- padding: 20px; -->
  2652. <div v-if="unitJson[unitIndex].easy != 1">
  2653. <div :style="{
  2654. marginBottom:
  2655. unitJson[unitIndex].easy == 3 ||
  2656. (unitJson[unitIndex].easy == 5 &&
  2657. itemTask.taskType == 1)
  2658. ? '75px'
  2659. : '0',
  2660. }">
  2661. <div style="
  2662. display: flex;
  2663. margin: 0px 0 20px;
  2664. flex-direction: row;
  2665. justify-content: flex-start;
  2666. align-items: center;
  2667. ">
  2668. <div class="lineTitle">任务概述</div>
  2669. </div>
  2670. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2671. flex-direction: row;
  2672. justify-content: flex-start;
  2673. align-items: center;
  2674. margin: 0;
  2675. ">
  2676. <!-- <div class="cc_title">
  2677. 任务{{ itemTaskIndex + 1 }}
  2678. </div> -->
  2679. <div class="cc_input">
  2680. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2681. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2682. itemTaskIndex
  2683. ].task
  2684. " />
  2685. </div>
  2686. <div class="remove" v-if="
  2687. item.taskJson.length > 1 &&
  2688. (!unitJson[unitIndex].easy ||
  2689. unitJson[unitIndex].easy == 6)
  2690. " @click="deleteTask(itemTaskIndex)"></div>
  2691. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2692. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2693. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2694. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2695. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2696. </div> -->
  2697. </div>
  2698. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2699. display: flex;
  2700. margin: 20px 0;
  2701. flex-direction: row;
  2702. justify-content: flex-start;
  2703. align-items: center;
  2704. ">
  2705. <div class="lineTitle">任务描述</div>
  2706. </div> && !itemTask.isFold2-->
  2707. <div v-if="
  2708. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2709. -1
  2710. " style="margin-top: 20px" class="op_task_box"
  2711. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2712. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2713. itemTaskIndex
  2714. ].taskDetail
  2715. " @change="change"></editor-bar> -->
  2716. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2717. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2718. itemTaskIndex
  2719. ].taskDetail
  2720. "></textarea>
  2721. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2722. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2723. itemTaskIndex
  2724. ].taskDetail
  2725. "></textarea> -->
  2726. <div class="op_box">
  2727. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2728. <div style="display: flex;">
  2729. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail2-'+itemTaskIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiDetail2-'+itemTaskIndex)"></el-switch>
  2730. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2731. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2732. itemTaskIndex
  2733. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2734. itemTaskIndex
  2735. ], itemTaskIndex)">智能优化</div>
  2736. </el-tooltip>
  2737. </div>
  2738. </div>
  2739. </div>
  2740. </div>
  2741. </div>
  2742. <div
  2743. style="position: relative"
  2744. v-if="courseState == 5"
  2745. >
  2746. <div
  2747. style="
  2748. display: flex;
  2749. flex-direction: row;
  2750. justify-content: space-between;
  2751. align-items: center;
  2752. "
  2753. :style="{
  2754. margin: !itemTask.isFoldchapter
  2755. ? '20px 0 10px'
  2756. : '20px 0 0',
  2757. }"
  2758. >
  2759. <div
  2760. style="margin-bottom: 10px"
  2761. class="lineTitle clineTitle"
  2762. >
  2763. 学习内容
  2764. </div>
  2765. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2766. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2767. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2768. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2769. <!-- <div class="line"></div> -->
  2770. </div>
  2771. <!-- v-if="!itemTask.isFoldchapter" -->
  2772. <div>
  2773. <div
  2774. class="add_chapters_box add_c_none"
  2775. v-if="
  2776. itemTask.chapterData &&
  2777. itemTask.chapterData.length == 0
  2778. "
  2779. >
  2780. <!-- <img
  2781. src="../../../assets/icon/new/c_none.png"
  2782. alt
  2783. /> -->
  2784. <span>请添加学习内容</span>
  2785. </div>
  2786. <div
  2787. v-else
  2788. class="add_chapters_box"
  2789. style="display: flex; flex-direction: column"
  2790. >
  2791. <div
  2792. @dragstart="
  2793. dragStart(item1, index1, itemTaskIndex)
  2794. "
  2795. @dragover.prevent="
  2796. dragOver(index1, itemTaskIndex)
  2797. "
  2798. @dragend="dragEnd()"
  2799. :draggable="
  2800. isdrag ==
  2801. 'chapter-' + itemTaskIndex + '-' + index1
  2802. "
  2803. class="chapter_upload"
  2804. v-for="(item1, index1) in itemTask.chapterData"
  2805. :key="item1.id"
  2806. @click="
  2807. getChapterData(
  2808. $event,
  2809. unitIndex,
  2810. index,
  2811. index1,
  2812. item1.type
  2813. )
  2814. "
  2815. :class="{
  2816. dragOverTop2:
  2817. newIndex === index1 &&
  2818. typeIndex ==
  2819. 'chapter-' +
  2820. itemTaskIndex +
  2821. '-' +
  2822. index1 &&
  2823. oldIndex > index1 &&
  2824. dragType == 'drag',
  2825. dragOverBottom2:
  2826. newIndex === index1 &&
  2827. typeIndex ==
  2828. 'chapter-' +
  2829. itemTaskIndex +
  2830. '-' +
  2831. index1 &&
  2832. oldIndex < index1 &&
  2833. dragType == 'drag',
  2834. }"
  2835. >
  2836. <div
  2837. @mousedown="
  2838. isdrag =
  2839. 'chapter-' + itemTaskIndex + '-' + index1
  2840. "
  2841. @mouseup="isdrag = ''"
  2842. @touchstart="
  2843. isdrag =
  2844. 'chapter-' + itemTaskIndex + '-' + index1
  2845. "
  2846. @touchend="isdrag = ''"
  2847. class="chapter_upload_drag"
  2848. ></div>
  2849. <div
  2850. class="chapter_upload_o"
  2851. style="
  2852. position: relative;
  2853. display: flex;
  2854. align-items: center;
  2855. "
  2856. >
  2857. <div
  2858. class="chapter_upload_l"
  2859. style="padding: 1px 0 0 10px"
  2860. >
  2861. <div
  2862. v-if="item1.type == 2"
  2863. class="chapter_upload_l_i2"
  2864. ></div>
  2865. <div
  2866. v-if="item1.type == 3"
  2867. class="chapter_upload_l_i3"
  2868. style="margin-left: 1px"
  2869. ></div>
  2870. <div
  2871. v-if="item1.type == 6"
  2872. class="chapter_upload_l_i6"
  2873. style="margin-left: 1px"
  2874. ></div>
  2875. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2876. <div
  2877. v-if="item1.type == 8"
  2878. class="chapter_upload_l_i8"
  2879. style="margin-left: 1px"
  2880. ></div>
  2881. <div
  2882. v-if="item1.type == 14"
  2883. class="chapter_upload_l_i14"
  2884. style="margin-left: 1px"
  2885. ></div>
  2886. <div
  2887. v-if="item1.type == 12"
  2888. class="chapter_upload_l_i12"
  2889. style="margin-left: 1px"
  2890. ></div>
  2891. <div
  2892. v-if="item1.type == 13"
  2893. class="chapter_upload_l_i13"
  2894. style="margin-left: 1px"
  2895. ></div>
  2896. </div>
  2897. <div class="chapter_upload_n">
  2898. <input
  2899. readonly="true"
  2900. v-if="
  2901. item1.type == 2 ||
  2902. item1.type == 3 ||
  2903. item1.type == 12 ||
  2904. item1.type == 13 ||
  2905. item1.type == 7
  2906. "
  2907. :placeholder="item1.name"
  2908. @click="
  2909. updataVideoT(
  2910. $event,
  2911. unitIndex,
  2912. itemTaskIndex,
  2913. index1
  2914. )
  2915. "
  2916. style="
  2917. border: none;
  2918. outline: none;
  2919. width: 80%;
  2920. minwidth: 215px;
  2921. z-index: 99;
  2922. font-size: 14px;
  2923. white-space: nowrap;
  2924. overflow: hidden;
  2925. text-overflow: ellipsis;
  2926. "
  2927. />
  2928. <input
  2929. :placeholder="item1.name"
  2930. v-if="item1.type == 6"
  2931. style="
  2932. border: none;
  2933. outline: none;
  2934. width: 80%;
  2935. white-space: nowrap;
  2936. overflow: hidden;
  2937. text-overflow: ellipsis;
  2938. "
  2939. readonly="true"
  2940. @click="
  2941. selectAttText(itemTaskIndex, index1)
  2942. "
  2943. />
  2944. <input
  2945. :placeholder="
  2946. item1.title ? item1.title : '链接'
  2947. "
  2948. v-if="item1.type == 8"
  2949. style="
  2950. border: none;
  2951. outline: none;
  2952. width: 80%;
  2953. white-space: nowrap;
  2954. overflow: hidden;
  2955. text-overflow: ellipsis;
  2956. "
  2957. readonly="true"
  2958. @click="selectLine(itemTaskIndex, index1)"
  2959. />
  2960. <input
  2961. :placeholder="
  2962. item1.title ? item1.title : '链接'
  2963. "
  2964. v-if="item1.type == 14"
  2965. style="
  2966. border: none;
  2967. outline: none;
  2968. width: 80%;
  2969. white-space: nowrap;
  2970. overflow: hidden;
  2971. text-overflow: ellipsis;
  2972. "
  2973. readonly="true"
  2974. @click="
  2975. openUpdateSource(itemTaskIndex, index1)
  2976. "
  2977. />
  2978. </div>
  2979. <div class="chapter_upload_ic">
  2980. <div
  2981. class="chapter_upload_noSee"
  2982. v-if="item1.type == 12"
  2983. ></div>
  2984. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2985. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  2986. ">
  2987. <div></div>
  2988. </div>
  2989. <div
  2990. class="chapter_upload_ud"
  2991. style="z-index: 99"
  2992. >
  2993. <div
  2994. class="chapter_upload_up"
  2995. @click="
  2996. upCd(
  2997. $event,
  2998. unitIndex,
  2999. index,
  3000. itemTaskIndex,
  3001. index1
  3002. )
  3003. "
  3004. ></div>
  3005. <div
  3006. class="chapter_upload_down"
  3007. @click="
  3008. downCd(
  3009. $event,
  3010. unitIndex,
  3011. index,
  3012. itemTaskIndex,
  3013. index1
  3014. )
  3015. "
  3016. ></div>
  3017. </div>
  3018. <div
  3019. class="chapter_upload_ic_edit"
  3020. v-if="
  3021. item1.type == 2 ||
  3022. item1.type == 3 ||
  3023. item1.type == 12 ||
  3024. item1.type == 13 ||
  3025. item1.type == 7
  3026. "
  3027. @click.stop="
  3028. updataVideoT(
  3029. $event,
  3030. unitIndex,
  3031. itemTaskIndex,
  3032. index1
  3033. )
  3034. "
  3035. >
  3036. <div></div>
  3037. </div>
  3038. <div
  3039. class="chapter_upload_ic_edit"
  3040. v-if="item1.type == 6"
  3041. @click="
  3042. selectAttText(itemTaskIndex, index1)
  3043. "
  3044. >
  3045. <div></div>
  3046. </div>
  3047. <div
  3048. class="chapter_upload_ic_edit"
  3049. v-if="item1.type == 8"
  3050. @click="selectLine(itemTaskIndex, index1)"
  3051. >
  3052. <div></div>
  3053. </div>
  3054. <div
  3055. class="chapter_upload_ic_edit"
  3056. v-if="item1.type == 14"
  3057. @click="
  3058. openUpdateSource(itemTaskIndex, index1)
  3059. "
  3060. >
  3061. <div></div>
  3062. </div>
  3063. <div
  3064. class="chapter_upload_ic_r"
  3065. @click.stop="
  3066. deleteChapterData(
  3067. $event,
  3068. unitIndex,
  3069. index,
  3070. index1,
  3071. itemTaskIndex
  3072. )
  3073. "
  3074. >
  3075. <div></div>
  3076. </div>
  3077. </div>
  3078. </div>
  3079. </div>
  3080. </div>
  3081. </div>
  3082. <!-- v-if="!itemTask.isFoldchapter" -->
  3083. <div class="add_info_box" style="margin: 10px 0 0">
  3084. <button
  3085. class="c_pub_button_add pub_btn_add_img"
  3086. @click="addImg($event)"
  3087. >
  3088. 文件
  3089. <input
  3090. type="file"
  3091. accept="*"
  3092. style="display: none"
  3093. multiple="multiple"
  3094. v-if="inputShow"
  3095. @change="
  3096. beforeUpload2(
  3097. $event,
  3098. unitIndex,
  3099. 13,
  3100. itemTaskIndex
  3101. )
  3102. "
  3103. />
  3104. </button>
  3105. <button
  3106. class="c_pub_button_add pub_btn_add_img"
  3107. @click="addAttText(itemTaskIndex)"
  3108. >
  3109. 图文
  3110. </button>
  3111. <button
  3112. class="c_pub_button_add pub_btn_add_img"
  3113. @click="openLine(itemTaskIndex)"
  3114. >
  3115. 链接
  3116. </button>
  3117. <button
  3118. class="c_pub_button_add pub_btn_add_img"
  3119. @click="pasteLine(itemTaskIndex)"
  3120. >
  3121. 代码
  3122. </button>
  3123. <button
  3124. class="c_pub_button_add pub_btn_add_img"
  3125. @click="openSource(itemTaskIndex)"
  3126. >
  3127. 资源
  3128. </button>
  3129. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  3130. AI生成PPT
  3131. </button>
  3132. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3133. AI生成教案
  3134. </button> -->
  3135. <button class="c_pub_button_add pub_btn_add_img" @click="createTaskAn(itemTaskIndex)" v-loading="taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true">
  3136. AI生成学历案
  3137. </button>
  3138. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  3139. 智能检索视频
  3140. </button>
  3141. </div>
  3142. <div
  3143. v-if="
  3144. unitJson[unitIndex].chapterInfo[0].taskJson[
  3145. itemTaskIndex
  3146. ].proVisible
  3147. "
  3148. class="mask"
  3149. >
  3150. <div class="progressBox">
  3151. <!-- <div id="closePro" class="closeCss">
  3152. <img src="../../../../assets/icon/close.png" alt />
  3153. </div> -->
  3154. <div class="lbox">
  3155. <img
  3156. src="../../../assets/loading.gif"
  3157. />上传中,请稍后
  3158. </div>
  3159. <div style="margin-bottom: 10px">
  3160. <span
  3161. >{{
  3162. unitJson[unitIndex].chapterInfo[0].taskJson[
  3163. itemTaskIndex
  3164. ].isFinishSize
  3165. }}</span
  3166. >
  3167. /
  3168. <span
  3169. >{{
  3170. unitJson[unitIndex].chapterInfo[0].taskJson[
  3171. itemTaskIndex
  3172. ].isAllSize
  3173. }}</span
  3174. >
  3175. </div>
  3176. <!-- <el-progress
  3177. :text-inside="true"
  3178. :stroke-width="20"
  3179. :percentage="
  3180. unitJson[unitIndex].chapterInfo[0].taskJson[
  3181. itemTaskIndex
  3182. ].progress
  3183. ? unitJson[unitIndex].chapterInfo[0]
  3184. .taskJson[itemTaskIndex].progress
  3185. : 0
  3186. "
  3187. style="width: 80%"
  3188. ></el-progress> -->
  3189. </div>
  3190. </div>
  3191. </div>
  3192. <div v-if="
  3193. unitJson[unitIndex].easy == 1 ||
  3194. (unitJson[unitIndex].easy == 5 &&
  3195. itemTask.taskType == 2)
  3196. ">
  3197. <div>
  3198. <div class="add_chapters_box add_c_none" v-if="
  3199. itemTask.chapterData &&
  3200. itemTask.chapterData.length == 0
  3201. ">
  3202. <img src="../../../assets/icon/new/c_none.png" alt />
  3203. </div>
  3204. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3205. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3206. dragOver(index1, itemTaskIndex)
  3207. " @dragend="dragEnd()" :draggable="isdrag ==
  3208. 'chapter-' + itemTaskIndex + '-' + index1
  3209. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3210. :key="item1.id" @click="
  3211. getChapterData(
  3212. $event,
  3213. unitIndex,
  3214. index,
  3215. index1,
  3216. item1.type
  3217. )
  3218. " :class="{
  3219. dragOverTop2:
  3220. newIndex === index1 &&
  3221. typeIndex ==
  3222. 'chapter-' +
  3223. itemTaskIndex +
  3224. '-' +
  3225. index1 &&
  3226. oldIndex > index1,
  3227. dragOverBottom2:
  3228. newIndex === index1 &&
  3229. typeIndex ==
  3230. 'chapter-' +
  3231. itemTaskIndex +
  3232. '-' +
  3233. index1 &&
  3234. oldIndex < index1,
  3235. }">
  3236. <div @mousedown="
  3237. isdrag =
  3238. 'chapter-' + itemTaskIndex + '-' + index1
  3239. " @mouseup="isdrag = ''" @touchstart="
  3240. isdrag =
  3241. 'chapter-' + itemTaskIndex + '-' + index1
  3242. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3243. <div class="chapter_upload_t" style="width: 100%"></div>
  3244. <div class="chapter_upload_o" style="
  3245. position: relative;
  3246. display: flex;
  3247. align-items: center;
  3248. ">
  3249. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3250. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3251. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3252. </div>
  3253. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3254. </div>
  3255. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3256. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3257. </div>
  3258. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3259. </div>
  3260. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3261. </div>
  3262. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3263. </div>
  3264. </div>
  3265. <div class="chapter_upload_n">
  3266. <span style="
  3267. font-size: 14px;
  3268. color: rgb(109, 109, 109);
  3269. height: 14px;
  3270. line-height: 14px;
  3271. " v-if="
  3272. item1.type == 2 ||
  3273. item1.type == 3 ||
  3274. item1.type == 7
  3275. ">{{ item1.text }}-</span>
  3276. <input readonly="true" v-if="
  3277. item1.type == 2 ||
  3278. item1.type == 3 ||
  3279. item1.type == 7
  3280. " :placeholder="item1.name" @click="
  3281. updataVideoT(
  3282. $event,
  3283. unitIndex,
  3284. itemTaskIndex,
  3285. index1
  3286. )
  3287. " style="
  3288. border: none;
  3289. outline: none;
  3290. width: 80%;
  3291. minwidth: 215px;
  3292. z-index: 99;
  3293. font-size: 14px;
  3294. white-space: nowrap;
  3295. overflow: hidden;
  3296. text-overflow: ellipsis;
  3297. " />
  3298. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3299. border: none;
  3300. outline: none;
  3301. width: 80%;
  3302. white-space: nowrap;
  3303. overflow: hidden;
  3304. text-overflow: ellipsis;
  3305. " readonly="true" @click="
  3306. selectAttText(itemTaskIndex, index1)
  3307. " />
  3308. <input :placeholder="item1.title ? item1.title : '链接'
  3309. " v-if="item1.type == 8 || item1.type == 14" style="
  3310. border: none;
  3311. outline: none;
  3312. width: 80%;
  3313. white-space: nowrap;
  3314. overflow: hidden;
  3315. text-overflow: ellipsis;
  3316. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3317. </div>
  3318. <div class="chapter_upload_ic">
  3319. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3320. <div class="chapter_upload_ud" style="z-index: 99">
  3321. <div class="chapter_upload_up" @click="
  3322. upCd(
  3323. $event,
  3324. unitIndex,
  3325. index,
  3326. itemTaskIndex,
  3327. index1
  3328. )
  3329. "></div>
  3330. <div class="chapter_upload_down" @click="
  3331. downCd(
  3332. $event,
  3333. unitIndex,
  3334. index,
  3335. itemTaskIndex,
  3336. index1
  3337. )
  3338. "></div>
  3339. </div>
  3340. <div class="chapter_upload_ic_edit" v-if="
  3341. item1.type == 2 ||
  3342. item1.type == 3 ||
  3343. item1.type == 12 ||
  3344. item1.type == 13 ||
  3345. item1.type == 7
  3346. " @click.stop="
  3347. updataVideoT(
  3348. $event,
  3349. unitIndex,
  3350. itemTaskIndex,
  3351. index1
  3352. )
  3353. ">
  3354. <div></div>
  3355. </div>
  3356. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3357. selectAttText(itemTaskIndex, index1)
  3358. ">
  3359. <div></div>
  3360. </div>
  3361. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3362. @click="selectLine(itemTaskIndex, index1)">
  3363. <div></div>
  3364. </div>
  3365. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3366. openUpdateSource(itemTaskIndex, index1)
  3367. ">
  3368. <div></div>
  3369. </div>
  3370. <div class="chapter_upload_ic_r" @click.stop="
  3371. deleteChapterData(
  3372. $event,
  3373. unitIndex,
  3374. index,
  3375. index1,
  3376. itemTaskIndex
  3377. )
  3378. ">
  3379. <div></div>
  3380. </div>
  3381. </div>
  3382. </div>
  3383. </div>
  3384. </div>
  3385. </div>
  3386. <div class="add_info_box" style="margin: 10px 0 0">
  3387. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3388. <span style="color: red">*</span>
  3389. 教学设计
  3390. <input type="file"
  3391. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3392. style="display: none" v-if="inputShow" @change="
  3393. beforeUpload3(
  3394. $event,
  3395. unitIndex,
  3396. 3,
  3397. itemTaskIndex,
  3398. '教学设计'
  3399. )
  3400. " />
  3401. </button>
  3402. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3403. <span style="color: red">*</span>
  3404. 教学课件
  3405. <input type="file"
  3406. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3407. style="display: none" v-if="inputShow" @change="
  3408. beforeUpload3(
  3409. $event,
  3410. unitIndex,
  3411. 3,
  3412. itemTaskIndex,
  3413. '教学课件'
  3414. )
  3415. " />
  3416. </button>
  3417. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3418. 教学视频
  3419. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3420. style="display: none" v-if="inputShow" @change="
  3421. beforeUpload3(
  3422. $event,
  3423. unitIndex,
  3424. 2,
  3425. itemTaskIndex,
  3426. '教学视频'
  3427. )
  3428. " />
  3429. </button>
  3430. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3431. 教学音频
  3432. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3433. beforeUpload3(
  3434. $event,
  3435. unitIndex,
  3436. 2,
  3437. itemTaskIndex,
  3438. '教学音频'
  3439. )
  3440. " />
  3441. </button>
  3442. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3443. 学习单
  3444. <input type="file"
  3445. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3446. style="display: none" v-if="inputShow" @change="
  3447. beforeUpload3(
  3448. $event,
  3449. unitIndex,
  3450. 3,
  3451. itemTaskIndex,
  3452. '学习单'
  3453. )
  3454. " />
  3455. </button>
  3456. </div>
  3457. <div v-if="
  3458. unitJson[unitIndex].chapterInfo[0].taskJson[
  3459. itemTaskIndex
  3460. ].proVisible
  3461. " class="mask">
  3462. <div class="progressBox">
  3463. <!-- <div id="closePro" class="closeCss">
  3464. <img src="../../../../assets/icon/close.png" alt />
  3465. </div> -->
  3466. <div class="lbox">
  3467. <img src="../../../assets/loading.gif" />上传中,请稍后
  3468. </div>
  3469. <div style="margin-bottom: 10px">
  3470. <span>{{
  3471. unitJson[unitIndex].chapterInfo[0].taskJson[
  3472. itemTaskIndex
  3473. ].isFinishSize
  3474. }}M</span>
  3475. /
  3476. <span>{{
  3477. unitJson[unitIndex].chapterInfo[0].taskJson[
  3478. itemTaskIndex
  3479. ].isAllSize
  3480. }}M</span>
  3481. </div>
  3482. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3483. itemTaskIndex
  3484. ].progress
  3485. ? unitJson[unitIndex].chapterInfo[0]
  3486. .taskJson[itemTaskIndex].progress
  3487. : 0
  3488. " style="width: 80%"></el-progress>
  3489. </div>
  3490. </div>
  3491. </div>
  3492. </div>
  3493. <!-- padding: 20px; -->
  3494. <div style="
  3495. background: #fff;
  3496. border-radius: 5px;
  3497. margin-top: 15px;
  3498. " :style="{paddingBottom:pjTemplateArray.indexOf(templateid) == -1?'':'75px'}">
  3499. <div v-if="
  3500. unitJson[unitIndex].easy == 6 ||
  3501. !unitJson[unitIndex].easy
  3502. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
  3503. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
  3504. <div v-if="
  3505. unitJson[unitIndex].easy != 3 &&
  3506. !(
  3507. unitJson[unitIndex].easy == 5 &&
  3508. itemTask.taskType == 1
  3509. )
  3510. " style="
  3511. flex-direction: row;
  3512. justify-content: flex-start;
  3513. align-items: center;
  3514. ">
  3515. <div style="
  3516. display: flex;
  3517. flex-direction: row;
  3518. align-items: center;
  3519. margin: 5px 0 20px;
  3520. ">
  3521. <div class="lineTitle clineTitle">
  3522. {{
  3523. !unitJson[unitIndex].easy ||
  3524. unitJson[unitIndex].easy == 6 ||
  3525. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3526. -1
  3527. ? "练习内容"
  3528. : "评价内容"
  3529. }}
  3530. </div>
  3531. <!-- <div class="line" style="width: 90%"></div> -->
  3532. </div>
  3533. </div>
  3534. <div class="tools">
  3535. <div class="leftTools" style="width: 100%" v-for="(
  3536. itemTool, toolIndex
  3537. ) in itemTask.toolChoose" :key="toolIndex">
  3538. <div style="
  3539. display: flex;
  3540. flex-direction: row;
  3541. align-items: baseline;
  3542. flex-wrap: nowrap;
  3543. justify-content: flex-start;
  3544. position: relative;
  3545. ">
  3546. <div style="margin-right: 20px; font-weight: bold"
  3547. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3548. 工具 {{ toolIndex + 1 }} :
  3549. </div>
  3550. <div class="chooseWho">
  3551. <div :class="itemTool.toolType == 0
  3552. ? 'isChooseActive'
  3553. : ''
  3554. " @click="
  3555. (itemTool.toolType = 0),
  3556. (itemTool.isFold3 = false),
  3557. $forceUpdate()
  3558. ">
  3559. 互动类
  3560. </div>
  3561. <div :class="itemTool.toolType == 1
  3562. ? 'isChooseActive'
  3563. : ''
  3564. " @click="
  3565. (itemTool.toolType = 1),
  3566. (itemTool.isFold3 = false),
  3567. $forceUpdate()
  3568. ">
  3569. 思维类
  3570. </div>
  3571. <div :class="itemTool.toolType == 6
  3572. ? 'isChooseActive'
  3573. : ''
  3574. " @click="
  3575. (itemTool.toolType = 6),
  3576. (itemTool.isFold3 = false),
  3577. $forceUpdate()
  3578. ">
  3579. 协作类
  3580. </div>
  3581. <div :class="itemTool.toolType == 2
  3582. ? 'isChooseActive'
  3583. : ''
  3584. " @click="
  3585. (itemTool.toolType = 2),
  3586. (itemTool.isFold3 = false),
  3587. $forceUpdate()
  3588. ">
  3589. 测评类
  3590. </div>
  3591. <div :class="itemTool.toolType == 7
  3592. ? 'isChooseActive'
  3593. : ''
  3594. " @click="
  3595. (itemTool.toolType = 7),
  3596. (itemTool.isFold3 = false),
  3597. $forceUpdate()
  3598. ">
  3599. 评价类
  3600. </div>
  3601. <div :class="itemTool.toolType == 3
  3602. ? 'isChooseActive'
  3603. : ''
  3604. " @click="
  3605. (itemTool.toolType = 3),
  3606. (itemTool.isFold3 = false),
  3607. $forceUpdate()
  3608. ">
  3609. 编程类
  3610. </div>
  3611. <div :class="itemTool.toolType == 5
  3612. ? 'isChooseActive'
  3613. : ''
  3614. " @click="
  3615. (itemTool.toolType = 5),
  3616. (itemTool.isFold3 = false),
  3617. $forceUpdate()
  3618. ">
  3619. 学科类
  3620. </div>
  3621. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3622. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3623. 其他
  3624. </div> -->
  3625. </div>
  3626. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3627. margin:
  3628. itemTask.toolChoose.length > 1
  3629. ? '0px 35px 0px auto'
  3630. : '0 0 0 auto',
  3631. }" v-if="itemTask.toolChoose.length > 1">
  3632. <div class="chapter_upload_up2" @click.stop="
  3633. upTool(
  3634. $event,
  3635. unitIndex,
  3636. itemTaskIndex,
  3637. toolIndex
  3638. )
  3639. ">
  3640. 上移
  3641. </div>
  3642. <div class="chapter_upload_down2" @click.stop="
  3643. downTool(
  3644. $event,
  3645. unitIndex,
  3646. itemTaskIndex,
  3647. toolIndex
  3648. )
  3649. ">
  3650. 下移
  3651. </div>
  3652. </div>
  3653. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3654. @click="fold3(itemTaskIndex, toolIndex)"
  3655. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3656. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3657. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3658. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3659. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3660. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3661. v-if="itemTask.toolChoose.length > 1" style="
  3662. position: absolute;
  3663. right: 0;
  3664. top: -5px;
  3665. "></div>
  3666. </div>
  3667. <!-- v-show="!itemTool.isFold3" -->
  3668. <div style="min-height: 163px">
  3669. <div class="toolSort" v-if="itemTool.toolType == 0">
  3670. <!-- <div class="tool">
  3671. <div
  3672. class="whiteBIcon"
  3673. @click="addTools(8, itemTaskIndex, toolIndex)"
  3674. >
  3675. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3676. <div style="margin: 5px 0">素材库</div>
  3677. </div>
  3678. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3679. <img
  3680. src="../../../assets/icon/checkNo.png"
  3681. alt
  3682. v-if="itemTool.tool.indexOf(8) == -1"
  3683. />
  3684. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3685. alt /><span>已选择</span></div>
  3686. </div>
  3687. </div>-->
  3688. <!-- <div class="tool">
  3689. <div
  3690. class="whiteBIcon"
  3691. @click="addTools(17, itemTaskIndex, toolIndex)"
  3692. >
  3693. <img
  3694. src="../../../assets/icon/secondToolList/library.png"
  3695. alt
  3696. />
  3697. <div style="margin: 5px 0">学习资料</div>
  3698. </div>
  3699. <div
  3700. class="check"
  3701. @click="addTools(17, itemTaskIndex, toolIndex)"
  3702. >
  3703. <img
  3704. src="../../../assets/icon/checkNo.png"
  3705. alt
  3706. v-if="itemTool.tool.indexOf(17) == -1"
  3707. />
  3708. <img
  3709. src="../../../assets/icon/checkedIs.png"
  3710. alt
  3711. v-else
  3712. />
  3713. </div>10
  3714. </div> -->
  3715. <div class="tool" :class="{
  3716. isToolChoose:
  3717. itemTool.tool.indexOf(10) != -1,
  3718. }" @click="
  3719. addTools(10, itemTaskIndex, toolIndex)
  3720. ">
  3721. <div class="whiteBIcon" @click.stop="
  3722. openTools(itemTaskIndex, 10, toolIndex)
  3723. ">
  3724. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3725. <div style="margin: 5px 0">倒计时</div>
  3726. </div>
  3727. <div class="noCTool">
  3728. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3729. </div>
  3730. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3731. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3732. </div>
  3733. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3734. <img src="../../../assets/icon/checkNo.png" alt
  3735. v-if="itemTool.tool.indexOf(10) == -1" />
  3736. <div class="checkDiv" v-else>
  3737. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3738. </div>
  3739. </div> -->
  3740. </div>
  3741. <div class="tool" :class="{
  3742. isToolChoose:
  3743. itemTool.tool.indexOf(65) != -1,
  3744. }" @click="
  3745. addTools(65, itemTaskIndex, toolIndex)
  3746. ">
  3747. <div class="whiteBIcon" @click.stop="
  3748. addTools(65, itemTaskIndex, toolIndex)
  3749. ">
  3750. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3751. <div style="margin: 5px 0">挑人</div>
  3752. </div>
  3753. <div class="noCTool">
  3754. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3755. </div>
  3756. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3757. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3758. </div>
  3759. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3760. <img src="../../../assets/icon/checkNo.png" alt
  3761. v-if="itemTool.tool.indexOf(65) == -1" />
  3762. <div class="checkDiv" v-else>
  3763. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3764. </div>
  3765. </div> -->
  3766. </div>
  3767. <!-- <div class="tool">
  3768. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3769. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3770. <div style="margin: 5px 0">学生分组</div>
  3771. </div>
  3772. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3773. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3774. <div class="checkDiv" v-else>
  3775. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3776. </div>
  3777. </div>
  3778. </div> -->
  3779. <!-- <div class="tool">
  3780. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3781. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3782. <div style="margin: 5px 0">交互视频</div>
  3783. </div>
  3784. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3785. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3786. <div class="checkDiv" v-else>
  3787. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3788. </div>
  3789. </div>
  3790. </div> -->
  3791. </div>
  3792. <div class="toolSort" v-if="itemTool.toolType == 1">
  3793. <div class="tool" :class="{
  3794. isToolChoose:
  3795. itemTool.tool.indexOf(7) != -1,
  3796. }" @click="
  3797. addTools(7, itemTaskIndex, toolIndex)
  3798. ">
  3799. <div class="whiteBIcon" @click.stop="
  3800. addTools(7, itemTaskIndex, toolIndex)
  3801. ">
  3802. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3803. <div style="margin: 5px 0">思维网格</div>
  3804. </div>
  3805. <div class="noCTool">
  3806. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3807. </div>
  3808. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3809. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3810. </div>
  3811. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3812. <img src="../../../assets/icon/checkNo.png" alt
  3813. v-if="itemTool.tool.indexOf(7) == -1" />
  3814. <div class="checkDiv" v-else>
  3815. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3816. </div>
  3817. </div> -->
  3818. </div>
  3819. <div class="tool" :class="{
  3820. isToolChoose:
  3821. itemTool.tool.indexOf(1) != -1,
  3822. }" @click="
  3823. addTools(1, itemTaskIndex, toolIndex)
  3824. ">
  3825. <div class="whiteBIcon" @click.stop="
  3826. openTools(itemTaskIndex, 1, toolIndex)
  3827. ">
  3828. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3829. <div style="margin: 5px 0">电子白板</div>
  3830. </div>
  3831. <div class="noCTool">
  3832. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3833. </div>
  3834. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3835. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3836. </div>
  3837. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  3838. <img src="../../../assets/icon/checkNo.png" alt
  3839. v-if="itemTool.tool.indexOf(1) == -1" />
  3840. <div class="checkDiv" v-else>
  3841. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3842. </div>
  3843. </div> -->
  3844. </div>
  3845. <!-- <div class="tool">
  3846. <div
  3847. class="whiteBIcon"
  3848. @click="addTools(2, itemTaskIndex, toolIndex)"
  3849. >
  3850. <img
  3851. src="../../../assets/icon/secondToolList/note.png"
  3852. alt
  3853. />
  3854. <div style="margin: 5px 0">便签</div>
  3855. </div>
  3856. <div
  3857. class="check"
  3858. @click="addTools(2, itemTaskIndex, toolIndex)"
  3859. >
  3860. <img
  3861. src="../../../assets/icon/checkNo.png"
  3862. alt
  3863. v-if="itemTool.tool.indexOf(2) == -1"
  3864. />
  3865. <div class="checkDiv" v-else>
  3866. <img
  3867. src="../../../assets/icon/checkedIs.png"
  3868. alt
  3869. /><span>已选择</span>
  3870. </div>
  3871. </div>
  3872. </div> -->
  3873. <!-- <div class="tool">
  3874. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  3875. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  3876. <div style="margin: 5px 0">协同文档</div>
  3877. </div>
  3878. <div
  3879. class="check"
  3880. @click="addTools(6, itemTaskIndex, toolIndex)"
  3881. >
  3882. <img
  3883. src="../../../assets/icon/checkNo.png"
  3884. alt
  3885. v-if="itemTool.tool.indexOf(6) == -1"
  3886. />
  3887. <div class="checkDiv" v-else>
  3888. <img
  3889. src="../../../assets/icon/checkedIs.png"
  3890. alt
  3891. /><span>已选择</span>
  3892. </div>
  3893. </div>
  3894. </div> -->
  3895. <div class="tool" :class="{
  3896. isToolChoose:
  3897. itemTool.tool.indexOf(52) != -1,
  3898. }" @click="
  3899. addTools(52, itemTaskIndex, toolIndex)
  3900. ">
  3901. <div class="whiteBIcon" @click.stop="
  3902. openTools(itemTaskIndex, 52, toolIndex)
  3903. ">
  3904. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3905. <div style="margin: 5px 0">文档</div>
  3906. </div>
  3907. <div class="noCTool">
  3908. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3909. </div>
  3910. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  3911. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3912. </div>
  3913. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  3914. <img src="../../../assets/icon/checkNo.png" alt
  3915. v-if="itemTool.tool.indexOf(52) == -1" />
  3916. <div class="checkDiv" v-else>
  3917. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3918. </div>
  3919. </div> -->
  3920. </div>
  3921. <div class="tool" :class="{
  3922. isToolChoose:
  3923. itemTool.tool.indexOf(3) != -1,
  3924. }" @click="
  3925. addTools(3, itemTaskIndex, toolIndex)
  3926. ">
  3927. <div class="whiteBIcon" @click.stop="
  3928. openTools(itemTaskIndex, 3, toolIndex)
  3929. ">
  3930. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3931. <div style="margin: 5px 0">思维导图</div>
  3932. </div>
  3933. <div class="noCTool">
  3934. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3935. </div>
  3936. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  3937. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3938. </div>
  3939. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  3940. <img src="../../../assets/icon/checkNo.png" alt
  3941. v-if="itemTool.tool.indexOf(3) == -1" />
  3942. <div class="checkDiv" v-else>
  3943. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3944. </div>
  3945. </div> -->
  3946. </div>
  3947. <div class="tool" :class="{
  3948. isToolChoose:
  3949. itemTool.tool.indexOf(48) != -1,
  3950. }" @click="
  3951. addTools(48, itemTaskIndex, toolIndex)
  3952. ">
  3953. <div class="whiteBIcon" @click.stop="
  3954. openTools(itemTaskIndex, 48, toolIndex)
  3955. ">
  3956. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3957. <div style="margin: 5px 0">表格</div>
  3958. </div>
  3959. <div class="noCTool">
  3960. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3961. </div>
  3962. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  3963. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3964. </div>
  3965. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  3966. <img src="../../../assets/icon/checkNo.png" alt
  3967. v-if="itemTool.tool.indexOf(48) == -1" />
  3968. <div class="checkDiv" v-else>
  3969. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3970. </div>
  3971. </div> -->
  3972. </div>
  3973. </div>
  3974. <div class="toolSort" v-if="itemTool.toolType == 6">
  3975. <div class="tool" :class="{
  3976. isToolChoose:
  3977. itemTool.tool.indexOf(49) != -1,
  3978. }" @click="
  3979. addTools(49, itemTaskIndex, toolIndex)
  3980. ">
  3981. <div class="whiteBIcon" @click.stop="
  3982. openTools(itemTaskIndex, 49, toolIndex)
  3983. ">
  3984. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3985. <div style="margin: 5px 0">学生分组</div>
  3986. </div>
  3987. <div class="noCTool">
  3988. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3989. </div>
  3990. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  3991. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3992. </div>
  3993. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3994. <img src="../../../assets/icon/checkNo.png" alt
  3995. v-if="itemTool.tool.indexOf(49) == -1" />
  3996. <div class="checkDiv" v-else>
  3997. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3998. </div>
  3999. </div> -->
  4000. </div>
  4001. </div>
  4002. <div class="toolSort" v-if="itemTool.toolType == 2">
  4003. <!-- <div class="tool">
  4004. <div
  4005. class="whiteBIcon"
  4006. @click="addTools(5, itemTaskIndex, toolIndex)"
  4007. >
  4008. <img
  4009. src="../../../assets/icon/thirdToolList/score.png"
  4010. alt
  4011. />
  4012. <div style="margin: 5px 0">量规评分</div>
  4013. </div>
  4014. <div
  4015. class="check"
  4016. @click="addTools(5, itemTaskIndex, toolIndex)"
  4017. >
  4018. <img
  4019. src="../../../assets/icon/checkNo.png"
  4020. alt
  4021. v-if="itemTool.tool.indexOf(5) == -1"
  4022. />
  4023. <img
  4024. src="../../../assets/icon/checkedIs.png"
  4025. alt
  4026. v-else
  4027. />
  4028. </div>
  4029. </div>-->
  4030. <div class="tool" :class="{
  4031. isToolChoose:
  4032. itemTool.tool.indexOf(4) != -1,
  4033. }" @click="
  4034. addTools(4, itemTaskIndex, toolIndex)
  4035. ">
  4036. <div class="whiteBIcon" @click.stop="
  4037. openTools(itemTaskIndex, 4, toolIndex)
  4038. ">
  4039. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4040. <div style="margin: 5px 0">问卷调查</div>
  4041. </div>
  4042. <div class="noCTool">
  4043. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4044. </div>
  4045. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4046. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4047. </div>
  4048. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4049. <img src="../../../assets/icon/checkNo.png" alt
  4050. v-if="itemTool.tool.indexOf(4) == -1" />
  4051. <div class="checkDiv" v-else>
  4052. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4053. </div>
  4054. </div> -->
  4055. </div>
  4056. <div class="tool" :class="{
  4057. isToolChoose:
  4058. itemTool.tool.indexOf(45) != -1,
  4059. }" @click="
  4060. addTools(45, itemTaskIndex, toolIndex)
  4061. ">
  4062. <div class="whiteBIcon" @click="
  4063. openTools(itemTaskIndex, 45, toolIndex)
  4064. ">
  4065. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4066. <div style="margin: 5px 0">选择题</div>
  4067. </div>
  4068. <div class="noCTool">
  4069. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4070. </div>
  4071. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4072. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4073. </div>
  4074. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4075. <img src="../../../assets/icon/checkNo.png" alt
  4076. v-if="itemTool.tool.indexOf(45) == -1" />
  4077. <div class="checkDiv" v-else>
  4078. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4079. </div>
  4080. </div> -->
  4081. </div>
  4082. <div class="tool" :class="{
  4083. isToolChoose:
  4084. itemTool.tool.indexOf(15) != -1,
  4085. }" @click="
  4086. addTools(15, itemTaskIndex, toolIndex)
  4087. ">
  4088. <div class="whiteBIcon" @click.stop="
  4089. openTools(itemTaskIndex, 15, toolIndex)
  4090. ">
  4091. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4092. <div style="margin: 5px 0">问答</div>
  4093. </div>
  4094. <div class="noCTool">
  4095. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4096. </div>
  4097. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4098. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4099. </div>
  4100. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4101. <img src="../../../assets/icon/checkNo.png" alt
  4102. v-if="itemTool.tool.indexOf(15) == -1" />
  4103. <div class="checkDiv" v-else>
  4104. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4105. </div>
  4106. </div> -->
  4107. </div>
  4108. <div class="tool" :class="{
  4109. isToolChoose:
  4110. itemTool.tool.indexOf(16) != -1,
  4111. }" @click="
  4112. addTools(16, itemTaskIndex, toolIndex)
  4113. ">
  4114. <div class="whiteBIcon" @click.stop="
  4115. addTools(16, itemTaskIndex, toolIndex)
  4116. ">
  4117. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4118. <div style="margin: 5px 0">作业提交</div>
  4119. </div>
  4120. <div class="noCTool">
  4121. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4122. </div>
  4123. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4124. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4125. </div>
  4126. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4127. <img src="../../../assets/icon/checkNo.png" alt
  4128. v-if="itemTool.tool.indexOf(16) == -1" />
  4129. <div class="checkDiv" v-else>
  4130. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4131. </div>
  4132. </div> -->
  4133. </div>
  4134. <div class="tool" :class="{
  4135. isToolChoose:
  4136. itemTool.tool.indexOf(50) != -1,
  4137. }" @click="
  4138. addTools(50, itemTaskIndex, toolIndex)
  4139. ">
  4140. <div class="whiteBIcon" @click.stop="
  4141. addTools(50, itemTaskIndex, toolIndex)
  4142. ">
  4143. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4144. <div style="margin: 5px 0">批量上传</div>
  4145. </div>
  4146. <div class="noCTool">
  4147. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4148. </div>
  4149. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4150. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4151. </div>
  4152. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4153. <img src="../../../assets/icon/checkNo.png" alt
  4154. v-if="itemTool.tool.indexOf(50) == -1" />
  4155. <div class="checkDiv" v-else>
  4156. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4157. </div>
  4158. </div> -->
  4159. </div>
  4160. <!-- <div class="tool">
  4161. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4162. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4163. <div style="margin: 5px 0">个人评价</div>
  4164. </div>
  4165. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4166. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4167. <div class="checkDiv" v-else>
  4168. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4169. </div>
  4170. </div>
  4171. </div> -->
  4172. <div class="tool" :class="{
  4173. isToolChoose:
  4174. itemTool.tool.indexOf(41) != -1,
  4175. }" @click="
  4176. addTools(41, itemTaskIndex, toolIndex)
  4177. ">
  4178. <div class="whiteBIcon" @click.stop="
  4179. openTools(itemTaskIndex, 41, toolIndex)
  4180. ">
  4181. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4182. <div style="margin: 5px 0">选择匹配</div>
  4183. </div>
  4184. <div class="noCTool">
  4185. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4186. </div>
  4187. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4188. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4189. </div>
  4190. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4191. <img src="../../../assets/icon/checkNo.png" alt
  4192. v-if="itemTool.tool.indexOf(41) == -1" />
  4193. <div class="checkDiv" v-else>
  4194. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4195. </div>
  4196. </div> -->
  4197. </div>
  4198. <div class="tool" :class="{
  4199. isToolChoose:
  4200. itemTool.tool.indexOf(47) != -1,
  4201. }" @click="
  4202. addTools(47, itemTaskIndex, toolIndex)
  4203. ">
  4204. <div class="whiteBIcon" @click.stop="
  4205. openTools(itemTaskIndex, 47, toolIndex)
  4206. ">
  4207. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4208. <div style="margin: 5px 0">排序</div>
  4209. </div>
  4210. <div class="noCTool">
  4211. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4212. </div>
  4213. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4214. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4215. </div>
  4216. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4217. <img src="../../../assets/icon/checkNo.png" alt
  4218. v-if="itemTool.tool.indexOf(47) == -1" />
  4219. <div class="checkDiv" v-else>
  4220. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4221. </div>
  4222. </div> -->
  4223. </div>
  4224. <!-- <div class="tool">
  4225. <div
  4226. class="whiteBIcon"
  4227. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4228. >
  4229. <img
  4230. src="../../../assets/icon/thirdToolList/mp3.png"
  4231. alt
  4232. />
  4233. <div style="margin: 5px 0">上传音频</div>
  4234. </div>
  4235. <div
  4236. class="check"
  4237. @click="addTools(42, itemTaskIndex, toolIndex)"
  4238. >
  4239. <img
  4240. src="../../../assets/icon/checkNo.png"
  4241. alt
  4242. v-if="itemTool.tool.indexOf(42) == -1"
  4243. />
  4244. <img
  4245. src="../../../assets/icon/checkedIs.png"
  4246. alt
  4247. v-else
  4248. />
  4249. </div>
  4250. </div> -->
  4251. </div>
  4252. <div class="toolSort" v-if="itemTool.toolType == 3">
  4253. <div class="tool" :class="{
  4254. isToolChoose:
  4255. itemTool.tool.indexOf(18) != -1,
  4256. }" @click="
  4257. addTools(18, itemTaskIndex, toolIndex)
  4258. ">
  4259. <div class="whiteBIcon" @click.stop="
  4260. addTools(18, itemTaskIndex, toolIndex)
  4261. ">
  4262. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4263. <div style="margin: 5px 0">训练平台</div>
  4264. </div>
  4265. <div class="noCTool">
  4266. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4267. </div>
  4268. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4269. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4270. </div>
  4271. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4272. <img src="../../../assets/icon/checkNo.png" alt
  4273. v-if="itemTool.tool.indexOf(18) == -1" />
  4274. <div class="checkDiv" v-else>
  4275. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4276. </div>
  4277. </div> -->
  4278. </div>
  4279. <div class="tool" :class="{
  4280. isToolChoose:
  4281. itemTool.tool.indexOf(21) != -1,
  4282. }" @click="
  4283. addTools(21, itemTaskIndex, toolIndex)
  4284. ">
  4285. <div class="whiteBIcon" @click.stop="
  4286. addTools(21, itemTaskIndex, toolIndex)
  4287. ">
  4288. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4289. <div style="margin: 5px 0">
  4290. AIoT Blockly
  4291. </div>
  4292. </div>
  4293. <div class="noCTool">
  4294. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4295. </div>
  4296. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4297. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4298. </div>
  4299. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4300. <img src="../../../assets/icon/checkNo.png" alt
  4301. v-if="itemTool.tool.indexOf(21) == -1" />
  4302. <div class="checkDiv" v-else>
  4303. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4304. </div>
  4305. </div> -->
  4306. </div>
  4307. <!-- <div class="tool">
  4308. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4309. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4310. <div style="margin: 5px 0">AI体验</div>
  4311. </div>
  4312. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4313. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4314. <div class="checkDiv" v-else>
  4315. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4316. </div>
  4317. </div>
  4318. </div> -->
  4319. <div class="tool" :class="{
  4320. isToolChoose:
  4321. itemTool.tool.indexOf(23) != -1,
  4322. }" @click="
  4323. addTools(23, itemTaskIndex, toolIndex)
  4324. ">
  4325. <div class="whiteBIcon" @click.stop="
  4326. addTools(23, itemTaskIndex, toolIndex)
  4327. ">
  4328. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4329. <div style="margin: 5px 0">AI Python</div>
  4330. </div>
  4331. <div class="noCTool">
  4332. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4333. </div>
  4334. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4335. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4336. </div>
  4337. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4338. <img src="../../../assets/icon/checkNo.png" alt
  4339. v-if="itemTool.tool.indexOf(23) == -1" />
  4340. <div class="checkDiv" v-else>
  4341. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4342. </div>
  4343. </div> -->
  4344. </div>
  4345. <div class="tool" :class="{
  4346. isToolChoose:
  4347. itemTool.tool.indexOf(24) != -1,
  4348. }" @click="
  4349. addTools(24, itemTaskIndex, toolIndex)
  4350. ">
  4351. <div class="whiteBIcon" @click.stop="
  4352. addTools(24, itemTaskIndex, toolIndex)
  4353. ">
  4354. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4355. <div style="margin: 5px 0">
  4356. AI Blockly
  4357. </div>
  4358. </div>
  4359. <div class="noCTool">
  4360. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4361. </div>
  4362. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4363. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4364. </div>
  4365. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4366. <img src="../../../assets/icon/checkNo.png" alt
  4367. v-if="itemTool.tool.indexOf(24) == -1" />
  4368. <div class="checkDiv" v-else>
  4369. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4370. </div>
  4371. </div> -->
  4372. </div>
  4373. <div class="tool" :class="{
  4374. isToolChoose:
  4375. itemTool.tool.indexOf(32) != -1,
  4376. }" @click="
  4377. addTools(32, itemTaskIndex, toolIndex)
  4378. ">
  4379. <div class="whiteBIcon" @click.stop="
  4380. addTools(32, itemTaskIndex, toolIndex)
  4381. ">
  4382. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4383. <div style="margin: 5px 0">源码编辑</div>
  4384. </div>
  4385. <div class="noCTool">
  4386. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4387. </div>
  4388. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4389. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4390. </div>
  4391. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4392. <img src="../../../assets/icon/checkNo.png" alt
  4393. v-if="itemTool.tool.indexOf(32) == -1" />
  4394. <div class="checkDiv" v-else>
  4395. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4396. </div>
  4397. </div> -->
  4398. </div>
  4399. <div class="tool" :class="{
  4400. isToolChoose:
  4401. itemTool.tool.indexOf(57) != -1,
  4402. }" @click="
  4403. addTools(57, itemTaskIndex, toolIndex)
  4404. ">
  4405. <div class="whiteBIcon" @click.stop="
  4406. openTools(itemTaskIndex, 57, toolIndex)
  4407. ">
  4408. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4409. <div style="margin: 5px 0">CocoPi</div>
  4410. </div>
  4411. <div class="noCTool">
  4412. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4413. </div>
  4414. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4415. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4416. </div>
  4417. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4418. <img src="../../../assets/icon/checkNo.png" alt
  4419. v-if="itemTool.tool.indexOf(57) == -1" />
  4420. <div class="checkDiv" v-else>
  4421. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4422. </div>
  4423. </div> -->
  4424. </div>
  4425. <div class="tool" :class="{
  4426. isToolChoose:
  4427. itemTool.tool.indexOf(63) != -1,
  4428. }" @click="
  4429. addTools(63, itemTaskIndex, toolIndex)
  4430. ">
  4431. <div class="whiteBIcon" @click.stop="
  4432. addTools(63, itemTaskIndex, toolIndex)
  4433. ">
  4434. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4435. <div style="margin: 5px 0">海龟编程</div>
  4436. </div>
  4437. <div class="noCTool">
  4438. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4439. </div>
  4440. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4441. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4442. </div>
  4443. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4444. <img src="../../../assets/icon/checkNo.png" alt
  4445. v-if="itemTool.tool.indexOf(63) == -1" />
  4446. <div class="checkDiv" v-else>
  4447. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4448. </div>
  4449. </div> -->
  4450. </div>
  4451. <div class="tool" :class="{
  4452. isToolChoose:
  4453. itemTool.tool.indexOf(71) != -1,
  4454. }" @click="
  4455. addTools(71, itemTaskIndex, toolIndex)
  4456. ">
  4457. <div class="whiteBIcon" @click.stop="
  4458. addTools(71, itemTaskIndex, toolIndex)
  4459. ">
  4460. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4461. <div style="margin: 5px 0">AI智能体</div>
  4462. </div>
  4463. <div class="noCTool">
  4464. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4465. </div>
  4466. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4467. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4468. </div>
  4469. </div>
  4470. </div>
  4471. <div class="toolSort" v-if="itemTool.toolType == 7">
  4472. <div class="tool" :class="{
  4473. isToolChoose:
  4474. itemTool.tool.indexOf(40) != -1,
  4475. }" @click.stop="
  4476. addTools(40, itemTaskIndex, toolIndex)
  4477. ">
  4478. <div class="whiteBIcon" @click.stop="
  4479. openTools(itemTaskIndex, 40, toolIndex)
  4480. ">
  4481. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4482. <div style="margin: 5px 0">个人评价</div>
  4483. </div>
  4484. <div class="noCTool">
  4485. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4486. </div>
  4487. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4488. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4489. </div>
  4490. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4491. <img src="../../../assets/icon/checkNo.png" alt
  4492. v-if="itemTool.tool.indexOf(40) == -1" />
  4493. <div class="checkDiv" v-else>
  4494. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4495. </div>
  4496. </div> -->
  4497. </div>
  4498. </div>
  4499. <div class="toolSort" v-if="itemTool.toolType == 5">
  4500. <div class="tool" :class="{
  4501. isToolChoose:
  4502. itemTool.tool.indexOf(28) != -1,
  4503. }" @click="
  4504. addTools(28, itemTaskIndex, toolIndex)
  4505. ">
  4506. <div class="whiteBIcon" @click.stop="
  4507. addTools(28, itemTaskIndex, toolIndex)
  4508. ">
  4509. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4510. <div style="margin: 5px 0">翻译</div>
  4511. </div>
  4512. <div class="noCTool">
  4513. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4514. </div>
  4515. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4516. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4517. </div>
  4518. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4519. <img src="../../../assets/icon/checkNo.png" alt
  4520. v-if="itemTool.tool.indexOf(28) == -1" />
  4521. <div class="checkDiv" v-else>
  4522. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4523. </div>
  4524. </div> -->
  4525. </div>
  4526. <div class="tool" :class="{
  4527. isToolChoose:
  4528. itemTool.tool.indexOf(31) != -1,
  4529. }" @click="
  4530. addTools(31, itemTaskIndex, toolIndex)
  4531. ">
  4532. <div class="whiteBIcon" @click.stop="
  4533. addTools(31, itemTaskIndex, toolIndex)
  4534. ">
  4535. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4536. <div style="margin: 5px 0">数字画板</div>
  4537. </div>
  4538. <div class="noCTool">
  4539. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4540. </div>
  4541. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4542. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4543. </div>
  4544. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4545. <img src="../../../assets/icon/checkNo.png" alt
  4546. v-if="itemTool.tool.indexOf(31) == -1" />
  4547. <div class="checkDiv" v-else>
  4548. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4549. </div>
  4550. </div> -->
  4551. </div>
  4552. <div class="tool" :class="{
  4553. isToolChoose:
  4554. itemTool.tool.indexOf(39) != -1,
  4555. }" @click="
  4556. addTools(39, itemTaskIndex, toolIndex)
  4557. ">
  4558. <div class="whiteBIcon" @click.stop="
  4559. addTools(39, itemTaskIndex, toolIndex)
  4560. ">
  4561. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4562. <div style="margin: 5px 0">GeoGebra</div>
  4563. </div>
  4564. <div class="noCTool">
  4565. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4566. </div>
  4567. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4568. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4569. </div>
  4570. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4571. <img src="../../../assets/icon/checkNo.png" alt
  4572. v-if="itemTool.tool.indexOf(39) == -1" />
  4573. <div class="checkDiv" v-else>
  4574. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4575. </div>
  4576. </div> -->
  4577. </div>
  4578. <div class="tool" :class="{
  4579. isToolChoose:
  4580. itemTool.tool.indexOf(66) != -1,
  4581. }" @click="
  4582. addTools(66, itemTaskIndex, toolIndex)
  4583. ">
  4584. <div class="whiteBIcon" @click.stop="
  4585. addTools(66, itemTaskIndex, toolIndex)
  4586. ">
  4587. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4588. <div style="margin: 5px 0">公式编辑</div>
  4589. </div>
  4590. <div class="noCTool">
  4591. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4592. </div>
  4593. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4594. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4595. </div>
  4596. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4597. <img src="../../../assets/icon/checkNo.png" alt
  4598. v-if="itemTool.tool.indexOf(66) == -1" />
  4599. <div class="checkDiv" v-else>
  4600. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4601. </div>
  4602. </div> -->
  4603. </div>
  4604. <!-- <div class="tool">
  4605. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4606. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4607. <div style="margin: 5px 0">分子结构</div>
  4608. </div>
  4609. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4610. <img src="../../../assets/icon/checkNo.png" alt
  4611. v-if="itemTool.tool.indexOf(67) == -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" :class="{
  4618. isToolChoose:
  4619. itemTool.tool.indexOf(68) != -1,
  4620. }" @click="
  4621. addTools(68, itemTaskIndex, toolIndex)
  4622. ">
  4623. <div class="whiteBIcon" @click.stop="
  4624. addTools(68, itemTaskIndex, toolIndex)
  4625. ">
  4626. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4627. <div style="margin: 5px 0">时间轴</div>
  4628. </div>
  4629. <div class="noCTool">
  4630. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4631. </div>
  4632. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4633. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4634. </div>
  4635. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4636. <img src="../../../assets/icon/checkNo.png" alt
  4637. v-if="itemTool.tool.indexOf(68) == -1" />
  4638. <div class="checkDiv" v-else>
  4639. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4640. </div>
  4641. </div> -->
  4642. </div>
  4643. <div class="tool" :class="{
  4644. isToolChoose:
  4645. itemTool.tool.indexOf(69) != -1,
  4646. }" @click="
  4647. addTools(69, itemTaskIndex, toolIndex)
  4648. ">
  4649. <div class="whiteBIcon" @click.stop="
  4650. openTools(itemTaskIndex, 69, toolIndex)
  4651. ">
  4652. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4653. <div style="margin: 5px 0">英语写作</div>
  4654. </div>
  4655. <div class="noCTool">
  4656. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4657. </div>
  4658. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4659. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4660. </div>
  4661. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4662. <img src="../../../assets/icon/checkNo.png" alt
  4663. v-if="itemTool.tool.indexOf(4) == -1" />
  4664. <div class="checkDiv" v-else>
  4665. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4666. </div>
  4667. </div> -->
  4668. </div>
  4669. <div class="tool" :class="{
  4670. isToolChoose:
  4671. itemTool.tool.indexOf(70) != -1,
  4672. }" @click="
  4673. addTools(70, itemTaskIndex, toolIndex)
  4674. ">
  4675. <div class="whiteBIcon" @click.stop="
  4676. openTools(itemTaskIndex, 70, toolIndex)
  4677. ">
  4678. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4679. <div style="margin: 5px 0">英语口语</div>
  4680. </div>
  4681. <div class="noCTool">
  4682. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4683. </div>
  4684. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4685. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4686. </div>
  4687. </div>
  4688. <!-- <div class="tool">
  4689. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4690. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4691. <div style="margin: 5px 0">翻译</div>
  4692. </div>
  4693. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4694. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4695. <div class="checkDiv" v-else>
  4696. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4697. </div>
  4698. </div>
  4699. </div>
  4700. <div class="tool">
  4701. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4702. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4703. <div style="margin: 5px 0">魔盒识字</div>
  4704. </div>
  4705. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4706. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4707. <div class="checkDiv" v-else>
  4708. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4709. </div>
  4710. </div>
  4711. </div>
  4712. <div class="tool">
  4713. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4714. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4715. <div style="margin: 5px 0">24点</div>
  4716. </div>
  4717. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4718. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4719. <div class="checkDiv" v-else>
  4720. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4721. </div>
  4722. </div>
  4723. </div>
  4724. <div class="tool">
  4725. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4726. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4727. <div style="margin: 5px 0">数学画板</div>
  4728. </div>
  4729. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4730. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4731. <div class="checkDiv" v-else>
  4732. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4733. </div>
  4734. </div>
  4735. </div>
  4736. <div class="tool">
  4737. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4738. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4739. <div style="margin: 5px 0">GeoGebra</div>
  4740. </div>
  4741. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4742. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4743. <div class="checkDiv" v-else>
  4744. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4745. </div>
  4746. </div>
  4747. </div>
  4748. <div class="tool">
  4749. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4750. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4751. <div style="margin: 5px 0">模拟驾驶</div>
  4752. </div>
  4753. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4754. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -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="addTools(59, itemTaskIndex, toolIndex)">
  4762. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4763. <div style="margin: 5px 0">路径搜索</div>
  4764. </div>
  4765. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4766. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4767. <div class="checkDiv" v-else>
  4768. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4769. </div>
  4770. </div>
  4771. </div>
  4772. <div class="tool">
  4773. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4774. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4775. <div style="margin: 5px 0">深度学习</div>
  4776. </div>
  4777. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4778. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4779. <div class="checkDiv" v-else>
  4780. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4781. </div>
  4782. </div>
  4783. </div>
  4784. <div class="tool">
  4785. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4786. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4787. <div style="margin: 5px 0">全历史</div>
  4788. </div>
  4789. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4790. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4791. <div class="checkDiv" v-else>
  4792. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4793. </div>
  4794. </div>
  4795. </div>
  4796. </div>
  4797. <div class="toolSort" v-if="itemTool.toolType == 4">
  4798. <div class="tool">
  4799. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4800. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4801. <div style="margin: 5px 0">课程设计</div>
  4802. </div>
  4803. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4804. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4805. <div class="checkDiv" v-else>
  4806. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4807. </div>
  4808. </div>
  4809. </div>
  4810. <div class="tool">
  4811. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4812. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4813. <div style="margin: 5px 0">目标管理</div>
  4814. </div>
  4815. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4816. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4817. <div class="checkDiv" v-else>
  4818. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4819. </div>
  4820. </div>
  4821. </div> -->
  4822. <!-- <div class="tool">
  4823. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4824. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4825. <div style="margin: 5px 0">汉字宫</div>
  4826. </div>
  4827. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4828. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4829. <div class="checkDiv" v-else>
  4830. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4831. </div>
  4832. </div>
  4833. </div> -->
  4834. </div>
  4835. </div>
  4836. <!-- v-show="!itemTool.isFold3" -->
  4837. <div class="op_tool_box"
  4838. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4839. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  4840. class="binfo_input" style="
  4841. margin: 0 0 20px 0;
  4842. width: 100% !important;
  4843. " v-model="itemTool.toolDetail"></textarea>
  4844. <div class="op_box">
  4845. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  4846. <div style="display: flex">
  4847. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="dialogTemplateArray.indexOf(templateid) != -1" @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  4848. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4849. <div class="r_pub_button_op"
  4850. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  4851. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  4852. 智能优化</div>
  4853.                              
  4854. </el-tooltip>
  4855. </div>
  4856. </div>
  4857. </div>
  4858. <evaList
  4859. :toolsData="toolsData"
  4860. :unitJson="unitJson"
  4861. :itemTaskIndex="itemTaskIndex"
  4862. :toolIndex="toolIndex"
  4863. :knowFileids="knowFileids"
  4864. :languageSetting="languageSetting"
  4865. :userid="userid"
  4866. @setEvaList="setEvaList"
  4867. v-if="pjTemplateArray.indexOf(templateid) != -1 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  4868. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  4869. </div>
  4870. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  4871. margin: 0 auto;
  4872. padding: 0 30px;
  4873. height: 45px;
  4874. ">
  4875. 添加工具
  4876. </button>
  4877. </div>
  4878. </div>
  4879. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4) && pjTemplateArray.indexOf(templateid) == -1"
  4880. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])" element-loading-text="小可正在努力生成中,请稍等...">
  4881. <div class="elist_title">
  4882. <div style="
  4883. display: flex;
  4884. flex-direction: row;
  4885. align-items: center;
  4886. margin: 20px 0;
  4887. ">
  4888. <div class="lineTitle clineTitle">评价设置</div>
  4889. <div style="margin-left:auto;display: flex;">
  4890. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  4891. <div class="r_pub_button_op"
  4892. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  4893. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  4894. </el-tooltip>
  4895. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  4896. <div class="r_pub_button_op" style="margin-left:10px;"
  4897. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  4898. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  4899. </el-tooltip>
  4900. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4901. <div class="r_pub_button_op" style="margin-left:10px;"
  4902. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  4903. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList && itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  4904. </el-tooltip>
  4905. </div>
  4906. <!-- <div class="line" style="width: 90%"></div> -->
  4907. </div>
  4908. </div>
  4909. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  4910. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  4911. 上传补充资料
  4912. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  4913. beforeUploadInfo2(
  4914. $event,
  4915. 18,
  4916. itemTaskIndex
  4917. )
  4918. " />
  4919. </button>
  4920. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  4921. <div class="add_chapters_box add_c_none" v-if="
  4922. pingjiaInfoData[itemTaskIndex] &&
  4923. pingjiaInfoData[itemTaskIndex].length == 0
  4924. ">
  4925. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  4926. <span>暂时还没有内容,快去添加吧</span>
  4927. </div>
  4928. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  4929. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  4930. getChapterData(
  4931. $event,
  4932. index1,
  4933. item1.type
  4934. )
  4935. " >
  4936. <div class="chapter_upload_o" style="
  4937. position: relative;
  4938. display: flex;
  4939. align-items: center;
  4940. ">
  4941. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  4942. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  4943. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  4944. </div>
  4945. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  4946. </div>
  4947. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  4948. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  4949. </div>
  4950. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  4951. </div>
  4952. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  4953. </div>
  4954. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  4955. </div>
  4956. </div>
  4957. <div class="chapter_upload_n">
  4958. <input readonly="true" v-if="
  4959. item1.type == 2 ||
  4960. item1.type == 3 ||
  4961. item1.type == 12 ||
  4962. item1.type == 13 ||
  4963. item1.type == 7
  4964. " :placeholder="item1.name" @click.stop="
  4965. checkChpater3($event, index1, item1)
  4966. " style="
  4967. border: none;
  4968. outline: none;
  4969. width: 80%;
  4970. minwidth: 215px;
  4971. z-index: 99;
  4972. font-size: 14px;
  4973. white-space: nowrap;
  4974. overflow: hidden;
  4975. text-overflow: ellipsis;
  4976. " />
  4977. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  4978. border: none;
  4979. outline: none;
  4980. width: 80%;
  4981. white-space: nowrap;
  4982. overflow: hidden;
  4983. text-overflow: ellipsis;
  4984. " readonly="true" @click="
  4985. selectAttText(index1)
  4986. " />
  4987. <input :placeholder="item1.title ? item1.title : '链接'
  4988. " v-if="item1.type == 8" style="
  4989. border: none;
  4990. outline: none;
  4991. width: 80%;
  4992. white-space: nowrap;
  4993. overflow: hidden;
  4994. text-overflow: ellipsis;
  4995. " readonly="true" @click="selectLine(index1)" />
  4996. <input :placeholder="item1.title ? item1.title : '链接'
  4997. " v-if="item1.type == 14" style="
  4998. border: none;
  4999. outline: none;
  5000. width: 80%;
  5001. white-space: nowrap;
  5002. overflow: hidden;
  5003. text-overflow: ellipsis;
  5004. " readonly="true" @click="
  5005. openUpdateSource(index1)
  5006. " />
  5007. </div>
  5008. <div class="chapter_upload_ic">
  5009. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5010. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5011. checkChpater3($event, index1, item1)
  5012. ">
  5013. <div></div>
  5014. </div>
  5015. <div class="chapter_upload_ic_r" @click.stop="
  5016. deletepingjiaInfoData(
  5017. $event,
  5018. index1,
  5019. itemTaskIndex
  5020. )
  5021. ">
  5022. <div></div>
  5023. </div>
  5024. </div>
  5025. </div>
  5026. </div>
  5027. </div>
  5028. </div>
  5029. <div v-if="
  5030. pingjiainfoproVisible[itemTaskIndex]
  5031. " class="mask">
  5032. <div class="progressBox">
  5033. <div class="lbox">
  5034. <img src="../../../assets/loading.gif" />上传中,请稍后
  5035. </div>
  5036. <div style="margin-bottom: 10px">
  5037. <span>{{
  5038. pingjiainfoisFinishSize[itemTaskIndex]
  5039. }}</span>
  5040. /
  5041. <span>{{
  5042. pingjiainfoisAllSize[itemTaskIndex]
  5043. }}</span>
  5044. </div>
  5045. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5046. ? pingjiainfoprogress[itemTaskIndex]
  5047. : 0
  5048. " style="width: 80%"></el-progress> -->
  5049. </div>
  5050. </div>
  5051. </div>
  5052. <div class="mbCss">
  5053. <div class="pjCss" :style="{
  5054. width: itemTask.isEvaFold
  5055. ? 'calc(100% - 55%)'
  5056. : 'calc(100% - 120px)',
  5057. }">
  5058. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5059. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5060. <div class="elist_inptu_text">
  5061. <span>目标:</span>
  5062. <!-- <span>核心素养:</span> -->
  5063. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  5064. <el-switch
  5065. @change="forceUpdate"
  5066. class="rateSwitch"
  5067. style="margin-left: auto;"
  5068. v-model="itemTask.eList[eIndex].isai"
  5069. active-color="#0061FF"
  5070. active-text="AI评分"
  5071. inactive-text=""
  5072. active-value="1"
  5073. inactive-value="2">
  5074. </el-switch>
  5075. </div>
  5076. <div class="elist_inptu_text" v-show="false">
  5077. <!-- <span>评价维度:</span> -->
  5078. <span>能力:</span>
  5079. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5080. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5081. <!-- </el-tooltip> -->
  5082. <!-- <span>评星等级:</span>
  5083. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5084. disabled></el-rate> -->
  5085. <div class="remove" @click="
  5086. deletEList(
  5087. unitIndex,
  5088. itemTaskIndex,
  5089. eIndex
  5090. )
  5091. "></div>
  5092. </div>
  5093. <div class="elist_inptu_text">
  5094. <!-- <span>维度描述:</span> -->
  5095. <span>评价标准:</span>
  5096. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5097. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5098. <div class="remove" @click="
  5099. deletEList(
  5100. unitIndex,
  5101. itemTaskIndex,
  5102. eIndex
  5103. )
  5104. "></div>
  5105. <!-- </el-tooltip> -->
  5106. </div>
  5107. <div class="elist_inptu_text" v-if="evalua">
  5108. <span>目标:</span>
  5109. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5110. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5111. @change="forceUpdate()">
  5112. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5113. :value="e.name">
  5114. </el-option>
  5115. </el-select> -->
  5116. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5117. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5118. </div>
  5119. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5120. <span>评价细则:</span>
  5121. <div style="width: calc(100%);">
  5122. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5123. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5124. <div class="ruleBtn"
  5125. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5126. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5127. </el-tooltip>
  5128. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5129. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5130. <div class="op_box">
  5131. <div class="op_remark"></div>
  5132. <div style="display: flex;">
  5133. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5134. <div class="r_pub_button_op"
  5135. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5136. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5137. </el-tooltip>
  5138. </div>
  5139. </div>
  5140. </div>
  5141. </div>
  5142. </div>
  5143. </div>
  5144. </div>
  5145. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5146. style="margin: 35px 35px 0 0">
  5147. <div class="addToolImg">
  5148. <img src="../../../assets/icon/add.png" alt />
  5149. </div>
  5150. <div>添加</div>
  5151. </div> -->
  5152. <div class="eva_btn_box">
  5153. <div class="eva_btn_left_box">
  5154. <button class="c_pub_button_add pub_btn_eval_img"
  5155. @click="addEList(unitIndex, itemTaskIndex)">
  5156. 添加
  5157. </button>
  5158. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5159. @click="openEList(unitIndex, itemTaskIndex)">
  5160. 资源
  5161. </button> -->
  5162. </div>
  5163. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5164. v-if="itemTask.eList && itemTask.eList.length">
  5165. 添加资源模板
  5166. </button>
  5167. </div>
  5168. </div>
  5169. <div v-if="evalua" style="
  5170. border: 1px solid #e5e5e5;
  5171. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5172. " :style="{
  5173. width: itemTask.isEvaFold ? '55%' : '116px',
  5174. }" class="evaCss">
  5175. <!-- <div class="e_add_top">
  5176. <div class="e_add_title">
  5177. <span>当前使用目标管理</span>
  5178. <span>{{ eTitle }}</span>
  5179. <img src="../../../assets/line.png" class="cru_line" style="
  5180. width: 125px;
  5181. height: 20px;
  5182. bottom: -10px;
  5183. left: 155px;
  5184. " />
  5185. </div>
  5186. </div> -->
  5187. <div class="e_add_content" style="width: 100%">
  5188. <div class="e_add_list_pbox" style="width: 100%">
  5189. <div class="e_add_list_pbox_title">
  5190. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5191. <div class="type_content" v-if="itemTask.isEvaFold">
  5192. <span :class="{ active: typeMode == 1 }"
  5193. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5194. <span :class="{ active: typeMode == 2 }"
  5195. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5196. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5197. </div>
  5198. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5199. @click="foldEva(itemTaskIndex)">
  5200. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5201. </div>
  5202. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5203. @click="foldEva(itemTaskIndex)">
  5204. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5205. </div>
  5206. </div>
  5207. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5208. style="min-height: 200px">
  5209. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5210. " v-if="typeMode == 1"></Mind>
  5211. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5212. </Sunburst>
  5213. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5214. v-if="typeMode == 3"></SeeBoard>
  5215. </div>
  5216. </div>
  5217. </div>
  5218. </div>
  5219. </div>
  5220. </div>
  5221. <div class="funBlock" style="padding: 0">
  5222. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5223. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5224. <div>
  5225. {{
  5226. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5227. }}
  5228. </div>
  5229. </div>
  5230. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5231. <div>展开</div>
  5232. <div class="arrow">
  5233. <img src="../../../assets/icon/expand.png" alt />
  5234. </div>
  5235. </div> -->
  5236. </div>
  5237. </div>
  5238. </div>
  5239. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5240. <!-- <div>
  5241. <img src="../../../../assets/icon/new/addStage.png" alt />
  5242. <span>添加任务</span>
  5243. </div> -->
  5244. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5245. 添加任务
  5246. </button>
  5247. </div>
  5248. </div>
  5249. <div class="info_btnBox3">
  5250. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5251. goTo(
  5252. '/course?userid=' +
  5253. userid +
  5254. '&oid=' +
  5255. oid +
  5256. '&org=' +
  5257. org +
  5258. '&role=' +
  5259. role
  5260. )
  5261. ">
  5262. 返回课程
  5263. </button>
  5264. <button class="c_pub_button_return pub_btn_last_img"
  5265. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5266. {{ steps == 4 ? "返回课程" : "上一步" }}
  5267. </button>
  5268. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5269. pub_btn_next_img: steps != 3,
  5270. pub_btn_finish_img: steps == 3,
  5271. }">
  5272. {{ steps == 3 ? "确认上传" : "下一步" }}
  5273. </button>
  5274. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5275. '修改模板' : '保存模板'}}</button>
  5276. </div>
  5277. </div>
  5278. </div>
  5279. </div>
  5280. </div>
  5281. <div style="
  5282. width: calc(100% - 20px);
  5283. background: rgb(255, 255, 255);
  5284. border-radius: 10px;
  5285. " v-if="steps == 4">
  5286. <div class="basic_box_success">
  5287. <div class="right_img">
  5288. <img src="../../../assets/icon/right.png" alt />
  5289. </div>
  5290. <div style="font-weight: bold">成功</div>
  5291. <!-- <div>您的课程编号</div>
  5292. <div class="number">{{ number }}</div>-->
  5293. <!-- <div class="success_button">
  5294. <div class="look_course" @click="isNoFinsh">
  5295. 邀请老师协同编辑
  5296. </div>
  5297. <div class="attend_others" @click="goCourse">预览课程</div>
  5298. </div> -->
  5299. </div>
  5300. </div>
  5301. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5302. @mouseleave="btnDisplay(false)" v-if="false">
  5303. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5304. goTo(
  5305. '/course?userid=' +
  5306. userid +
  5307. '&oid=' +
  5308. oid +
  5309. '&org=' +
  5310. org +
  5311. '&role=' +
  5312. role
  5313. )
  5314. ">
  5315. 返回课程
  5316. </button>
  5317. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5318. @click="lastSteps">
  5319. {{ steps == 4 ? "返回课程" : "上一步" }}
  5320. </button>
  5321. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5322. pub_btn_next_img: steps != 3,
  5323. pub_btn_finish_img: steps == 3,
  5324. }">
  5325. {{ steps == 3 ? "确认上传" : "下一步" }}
  5326. </button>
  5327. </div>
  5328. </div>
  5329. </div>
  5330. <div class="leftBar" v-if="istemplate == 1">
  5331. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5332. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5333. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5334. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5335. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5336. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5337. <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'"/>
  5338. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5339. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5340. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5341. <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'"/>
  5342. <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'"/>
  5343. <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'"/>
  5344. <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'"/>
  5345. <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'"/>
  5346. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5347. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5348. @setAiJson="setAiJson" /> -->
  5349. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5350. @setAiJson="setAiJson" />
  5351. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5352. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5353. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5354. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5355. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5356. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5357. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5358. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5359. </div>
  5360. <div class="leftBar2" v-if="istemplate != 1 && dialogTemplateArray.indexOf(templateid) != -1 && chatid">
  5361. <aiBoxRight
  5362. :languageSetting="languageSetting"
  5363. :courseId="chatid"
  5364. :unitJson="unitJson"
  5365. :quoteArray="isQuote"
  5366. :teacherCourseText="teacherCourseText"
  5367. :targetCourseText="targetCourseText"
  5368. :courseText2="courseText"
  5369. :targetCourseText2="targetCourseText2"
  5370. :cpote="cpote"
  5371. @setIsQuote="setIsQuote"></aiBoxRight>
  5372. </div>
  5373. </div>
  5374. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5375. class="dialog_diy2 customWidth">
  5376. <div>请复制该链接邀请协同编辑</div>
  5377. <div>http://www.boomyon.com/index-zhang.com</div>
  5378. <span slot="footer" class="dialog-footer">
  5379. <el-button type="primary">复制链接分享</el-button>
  5380. <el-button @click="dialogVisible = false">取消</el-button>
  5381. </span>
  5382. </el-dialog>
  5383. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5384. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5385. <el-form>
  5386. <el-form-item label="文档标题">
  5387. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5388. </el-form-item>
  5389. <div>文档简介</div>
  5390. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5391. </el-form>
  5392. <span slot="footer" class="dialog-footer">
  5393. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5394. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5395. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5396. </span>
  5397. </el-dialog>
  5398. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5399. :before-close="handleClose" class="dialog_diy">
  5400. <el-form>
  5401. <el-form-item label="文档标题">
  5402. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5403. </el-form-item>
  5404. <div>文档内容</div>
  5405. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5406. </el-form>
  5407. <span slot="footer" class="dialog-footer">
  5408. <el-button @click="clearChoose">取 消</el-button>
  5409. <el-button type="primary" @click="wordNext()">确定</el-button>
  5410. </span>
  5411. </el-dialog>
  5412. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5413. :before-close="handleClose" class="dialog_diy">
  5414. <el-form>
  5415. <el-form-item label="文本标题">
  5416. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5417. placeholder="请输入文本标题..."></el-input>
  5418. </el-form-item>
  5419. <!-- <div>富文本内容</div> -->
  5420. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5421. </el-form>
  5422. <span slot="footer" class="dialog-footer">
  5423. <el-button @click="clearAttText">取 消</el-button>
  5424. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5425. </span>
  5426. </el-dialog>
  5427. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5428. :before-close="handleClose" class="dialog_diy lineCss">
  5429. <el-form>
  5430. <el-form-item label="标题" :label-width="formLabelWidth">
  5431. <span>
  5432. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5433. </span>
  5434. </el-form-item>
  5435. <el-form-item label="链接" :label-width="formLabelWidth">
  5436. <span>
  5437. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5438. </span>
  5439. </el-form-item>
  5440. </el-form>
  5441. <span slot="footer" class="dialog-footer">
  5442. <el-button @click="clearLine">取 消</el-button>
  5443. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5444. </span>
  5445. </el-dialog>
  5446. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5447. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5448. <div>
  5449. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5450. </div>
  5451. <span slot="footer" class="dialog-footer">
  5452. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5453. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5454. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5455. </span>
  5456. </el-dialog>
  5457. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5458. :before-close="handleClose" class="addNewPP customWidth">
  5459. <div class="people">
  5460. <div class="people_top">
  5461. <div class="people_nav">选择成员</div>
  5462. <div class="people_top_right">
  5463. <div class="people_search">
  5464. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5465. <div class="search_img" @click="searchStudent">
  5466. <img src="../../../assets/icon/search.png" alt />
  5467. </div>
  5468. </div>
  5469. </div>
  5470. </div>
  5471. <el-checkbox-group v-model="checkboxList" class="people_name">
  5472. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5473. "暂无学生可选" }}</el-checkbox>
  5474. </el-checkbox-group>
  5475. </div>
  5476. <span slot="footer" class="dialog-footer">
  5477. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5478. <el-button type="primary" @click="isAddPP">确定</el-button>
  5479. </span>
  5480. </el-dialog>
  5481. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5482. :before-close="handleClose" class="addNewPP2">
  5483. <div class="check_classBox">
  5484. <div class="check_class_right">
  5485. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5486. 全部
  5487. </div>
  5488. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5489. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5490. {{ item.name }}
  5491. </div>
  5492. </el-tooltip>
  5493. </div>
  5494. <div class="check_class_left">
  5495. <div class="check_class_all_box">
  5496. <div class="check_class_left_title">选择班级</div>
  5497. <div style="display: flex; align-items: center; margin-left: auto">
  5498. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5499. </div>
  5500. </div>
  5501. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5502. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5503. </div> -->
  5504. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5505. v-if="grade2.length">
  5506. <div v-for="item in grade2" :key="item.id" class="class_item">
  5507. <el-checkbox :label="item.id">
  5508. {{ item.name }}
  5509. </el-checkbox>
  5510. </div>
  5511. </el-checkbox-group>
  5512. <div v-if="!grade2.length">暂无数据</div>
  5513. </div>
  5514. </div>
  5515. <span slot="footer" class="dialog-footer">
  5516. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5517. <el-button type="primary" @click="isAddClass">确定</el-button>
  5518. </span>
  5519. </el-dialog>
  5520. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5521. :before-close="handleClose" class="addNewPP customWidth">
  5522. <div style="display: flex;justify-content: space-between;">
  5523. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5524. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5525. 全部
  5526. </div>
  5527. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5528. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5529. <el-tooltip placement="top" :content="i.name">
  5530. <span>{{i.name}}</span>
  5531. </el-tooltip>
  5532. </div>
  5533. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5534. 其他
  5535. </div>
  5536. </div>
  5537. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5538. <div class="people">
  5539. <div class="people_top">
  5540. <div class="people_top_right">
  5541. <div class="people_search">
  5542. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5543. <div class="search_img" @click="getTeacher(collid)">
  5544. <img src="../../../assets/icon/search.png" alt />
  5545. </div>
  5546. </div>
  5547. </div>
  5548. <div class="people_nav" style="display: flex; align-items: center">
  5549. <div class="check_class_left_title">选择成员</div>
  5550. <div style="display: flex; align-items: center; margin-left: auto">
  5551. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5552. </div>
  5553. </div>
  5554. </div>
  5555. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5556. @change="InviteChange2">
  5557. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5558. <div class="t_j_box">
  5559. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5560. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5561. </el-tooltip>
  5562. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5563. <span>{{ item.username.split('@')[0] }}</span>
  5564. </el-tooltip>
  5565. <el-tooltip placement="top" :content="item.school">
  5566. <span>{{ item.school }}</span>
  5567. </el-tooltip>
  5568. </div>
  5569. </el-checkbox>
  5570. </el-checkbox-group>
  5571. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5572. </div>
  5573. </div>
  5574. </div>
  5575. <span slot="footer" class="dialog-footer">
  5576. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5577. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5578. </span>
  5579. </el-dialog>
  5580. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5581. closePan(4);
  5582. }
  5583. " class="dialog_diy fullStyle">
  5584. <div style="height: 100%">
  5585. <div class="a_add_title" style="
  5586. display: flex;
  5587. flex-direction: row;
  5588. align-items: center;
  5589. justify-content: center;
  5590. ">
  5591. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5592. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5593. </div>
  5594. <div class="a_addBox" style="height: calc(100% - 50px)">
  5595. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5596. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5597. <div class="a_add_checkType">
  5598. <span :class="{
  5599. active:
  5600. askJson.askJson[index1].type == '1' ||
  5601. !askJson.askJson[index1].type,
  5602. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5603. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5604. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5605. </div>
  5606. <div class="a_add_head">
  5607. <div style="
  5608. display: flex;
  5609. align-items: center;
  5610. width: 100%;
  5611. margin-right: 20px;
  5612. ">
  5613. <span style="min-width: fit-content">{{
  5614. index1 + 1 + "、"
  5615. }}</span>
  5616. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5617. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5618. $forceUpdate();
  5619. }
  5620. "></textarea>
  5621. </div>
  5622. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5623. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5624. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5625. </div>
  5626. <div class="a_add_head_div">
  5627. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5628. </el-button>
  5629. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5630. </div>
  5631. </div>
  5632. <div class="a_add_body">
  5633. <div class="a_add_input" style="flex-direction: column">
  5634. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5635. margin: 20px 10px 0 0;
  5636. display: flex;
  5637. align-items: center;
  5638. position: relative;
  5639. ">
  5640. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5641. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5642. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5643. @change="() => {
  5644. $forceUpdate();
  5645. }
  5646. "></textarea>
  5647. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5648. v-if="askJson.askJson[index1].askItem != 1">
  5649. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5650. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5651. </div>
  5652. <div class="a_add_body_div">
  5653. <el-button type="primary" size="small"
  5654. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5655. <el-button type="primary" size="small" @click="
  5656. deletecheckList(askJson.askJson[index1], checkIndex)
  5657. " v-if="askJson.askJson[index1].askItem != 1">删除
  5658. </el-button>
  5659. </div>
  5660. </div>
  5661. </div>
  5662. <!-- <div class="a_add_body_div">
  5663. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5664. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5665. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5666. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5667. </el-button>
  5668. </div> -->
  5669. </div>
  5670. </div>
  5671. </div>
  5672. </div>
  5673. <span slot="footer" class="dialog-footer">
  5674. <el-button @click="closePan(4)">取 消</el-button>
  5675. <el-button type="primary" @click="addAsk">确 定</el-button>
  5676. </span>
  5677. </el-dialog>
  5678. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5679. closePan(45);
  5680. }
  5681. " class="dialog_diy fullStyle">
  5682. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5683. <!-- <div class="a_add_title" style="
  5684. display: flex;
  5685. flex-direction: row;
  5686. align-items: center;
  5687. justify-content: center;
  5688. ">
  5689. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5690. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5691. </div> -->
  5692. <div class="a_addBox" style="height: 100%">
  5693. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5694. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5695. 上传补充资料
  5696. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5697. beforeUploadInfo2(
  5698. $event,
  5699. 17
  5700. )
  5701. " />
  5702. </button>
  5703. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  5704. <div class="add_chapters_box add_c_none" v-if="
  5705. xuanzeInfoData &&
  5706. xuanzeInfoData.length == 0
  5707. ">
  5708. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5709. <span>暂时还没有内容,快去添加吧</span>
  5710. </div>
  5711. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5712. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  5713. getChapterData(
  5714. $event,
  5715. index1,
  5716. item1.type
  5717. )
  5718. " >
  5719. <div class="chapter_upload_o" style="
  5720. position: relative;
  5721. display: flex;
  5722. align-items: center;
  5723. ">
  5724. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5725. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5726. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5727. </div>
  5728. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5729. </div>
  5730. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5731. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5732. </div>
  5733. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5734. </div>
  5735. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5736. </div>
  5737. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5738. </div>
  5739. </div>
  5740. <div class="chapter_upload_n">
  5741. <input readonly="true" v-if="
  5742. item1.type == 2 ||
  5743. item1.type == 3 ||
  5744. item1.type == 12 ||
  5745. item1.type == 13 ||
  5746. item1.type == 7
  5747. " :placeholder="item1.name" @click.stop="
  5748. checkChpater3($event, index1, item1)
  5749. " style="
  5750. border: none;
  5751. outline: none;
  5752. width: 80%;
  5753. minwidth: 215px;
  5754. z-index: 99;
  5755. font-size: 14px;
  5756. white-space: nowrap;
  5757. overflow: hidden;
  5758. text-overflow: ellipsis;
  5759. " />
  5760. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5761. border: none;
  5762. outline: none;
  5763. width: 80%;
  5764. white-space: nowrap;
  5765. overflow: hidden;
  5766. text-overflow: ellipsis;
  5767. " readonly="true" @click="
  5768. selectAttText(index1)
  5769. " />
  5770. <input :placeholder="item1.title ? item1.title : '链接'
  5771. " v-if="item1.type == 8" style="
  5772. border: none;
  5773. outline: none;
  5774. width: 80%;
  5775. white-space: nowrap;
  5776. overflow: hidden;
  5777. text-overflow: ellipsis;
  5778. " readonly="true" @click="selectLine(index1)" />
  5779. <input :placeholder="item1.title ? item1.title : '链接'
  5780. " v-if="item1.type == 14" style="
  5781. border: none;
  5782. outline: none;
  5783. width: 80%;
  5784. white-space: nowrap;
  5785. overflow: hidden;
  5786. text-overflow: ellipsis;
  5787. " readonly="true" @click="
  5788. openUpdateSource(index1)
  5789. " />
  5790. </div>
  5791. <div class="chapter_upload_ic">
  5792. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5793. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5794. checkChpater3($event, index1, item1)
  5795. ">
  5796. <div></div>
  5797. </div>
  5798. <div class="chapter_upload_ic_r" @click.stop="
  5799. deletexuanzeInfoData(
  5800. $event,
  5801. index1
  5802. )
  5803. ">
  5804. <div></div>
  5805. </div>
  5806. </div>
  5807. </div>
  5808. </div>
  5809. </div>
  5810. </div>
  5811. <div v-if="
  5812. xuanzeinfoproVisible
  5813. " class="mask">
  5814. <div class="progressBox">
  5815. <div class="lbox">
  5816. <img src="../../../assets/loading.gif" />上传中,请稍后
  5817. </div>
  5818. <div style="margin-bottom: 10px">
  5819. <span>{{
  5820. xuanzeinfoisFinishSize
  5821. }}</span>
  5822. /
  5823. <span>{{
  5824. xuanzeinfoisAllSize
  5825. }}</span>
  5826. </div>
  5827. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  5828. ? xuanzeinfoprogress
  5829. : 0
  5830. " style="width: 80%"></el-progress> -->
  5831. </div>
  5832. </div>
  5833. </div>
  5834. <div style="
  5835. font-size: 16px;
  5836. color: #c7c7c7;
  5837. display: flex;
  5838. align-items: center;
  5839. justify-content: flex-end;
  5840. ">
  5841. <!-- 请输入题目内容 -->
  5842. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  5843. 智能生成
  5844. </button>
  5845. <!-- 请输入题目内容 -->
  5846. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  5847. v-if="isPasteChoice">
  5848. 智能粘贴
  5849. </button>
  5850. </div>
  5851. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  5852. <div class="a_add_checkType">
  5853. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  5854. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  5855. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  5856. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  5857. </div>
  5858. <div class="a_add_head">
  5859. <div class="timuUpImg">
  5860. <div style="display: flex; align-items: center">
  5861. <span style="min-width: fit-content">{{
  5862. index1 + 1 + "、"
  5863. }}</span>
  5864. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  5865. placeholder="请输入题目">
  5866. </el-input> -->
  5867. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5868. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  5869. $forceUpdate();
  5870. }
  5871. "></textarea>
  5872. </div>
  5873. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  5874. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  5875. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  5876. </div>
  5877. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  5878. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5879. <input type="file" accept="image/*" style="display: none"
  5880. @change="beforeUploadTiMu($event, index1)" />
  5881. </div>
  5882. </div>
  5883. <div class="a_add_head_div">
  5884. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  5885. </el-button>
  5886. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  5887. </div>
  5888. </div>
  5889. <div class="timuImgBox" v-if="
  5890. testJson.testJson[index1].timuList &&
  5891. testJson.testJson[index1].timuList.length
  5892. ">
  5893. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  5894. @click.stop="previewImg(timg.src)">
  5895. <img :src="timg.src" alt="" />
  5896. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  5897. <img src="../../../assets/icon/delete.png" alt="" />
  5898. </div>
  5899. </div>
  5900. </div>
  5901. <div class="a_add_body">
  5902. <div class="a_add_input a_add_input_choice">
  5903. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  5904. @change="() => {
  5905. $forceUpdate();
  5906. }
  5907. ">
  5908. <div class="radioBox">
  5909. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  5910. .testItem" :key="checkIndex" :label="checkIndex">
  5911. <div style="margin-right: 10px">
  5912. 选项{{ checkIndex + 1 }}
  5913. </div>
  5914. <div style="margin-right: 10px; width: 300px" v-if="
  5915. testJson.testJson[index1].checkList[checkIndex] &&
  5916. testJson.testJson[index1].checkList[checkIndex]
  5917. .imgType &&
  5918. testJson.testJson[index1].checkList[checkIndex]
  5919. .imgType == 1
  5920. ">
  5921. <div class="inImg" @click.stop="
  5922. previewImg(
  5923. testJson.testJson[index1].checkList[checkIndex]
  5924. .src
  5925. )
  5926. ">
  5927. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  5928. .src
  5929. " lazy />
  5930. <!-- <img :src="
  5931. testJson.testJson[index1].checkList[checkIndex]
  5932. .src
  5933. " alt="" /> -->
  5934. </div>
  5935. </div>
  5936. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  5937. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  5938. $forceUpdate();
  5939. }
  5940. "></textarea>
  5941. <div class="xzUpImg" @click.stop="addImg($event)">
  5942. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  5943. <input type="file" accept="image/*" style="display: none"
  5944. @change="beforeUploadTi($event, index1, checkIndex)" />
  5945. </div>
  5946. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  5947. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  5948. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  5949. </div>
  5950. <div class="a_add_body_div">
  5951. <el-button type="primary" size="small" @click.stop="
  5952. addTcheckList(testJson.testJson[index1], checkIndex)
  5953. ">添加</el-button>
  5954. <el-button type="primary" size="small" @click.stop="
  5955. deleteTcheckList(
  5956. testJson.testJson[index1],
  5957. checkIndex
  5958. )
  5959. " v-if="testJson.testJson[index1].testItem != 1">删除
  5960. </el-button>
  5961. </div>
  5962. </el-radio>
  5963. </div>
  5964. </el-radio-group>
  5965. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  5966. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  5967. $forceUpdate();
  5968. }
  5969. ">
  5970. <div class="radioBox">
  5971. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  5972. .testItem" :key="checkIndex1" :label="checkIndex1">
  5973. <div style="margin-right: 10px">
  5974. 选项{{ checkIndex1 + 1 }}
  5975. </div>
  5976. <div style="margin-right: 10px; width: 300px" v-if="
  5977. testJson.testJson[index1].checkList[checkIndex1] &&
  5978. testJson.testJson[index1].checkList[checkIndex1]
  5979. .imgType &&
  5980. testJson.testJson[index1].checkList[checkIndex1]
  5981. .imgType == 1
  5982. ">
  5983. <div class="inImg" @click.stop="
  5984. previewImg(
  5985. testJson.testJson[index1].checkList[checkIndex1]
  5986. .src
  5987. )
  5988. ">
  5989. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  5990. .src
  5991. " lazy />
  5992. <!-- <img :src="
  5993. testJson.testJson[index1].checkList[checkIndex1]
  5994. .src
  5995. " alt="" /> -->
  5996. </div>
  5997. </div>
  5998. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  5999. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6000. $forceUpdate();
  6001. }
  6002. "></textarea>
  6003. <div class="xzUpImg" @click.stop="addImg($event)">
  6004. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6005. <input type="file" accept="image/*" style="display: none"
  6006. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6007. </div>
  6008. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6009. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6010. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6011. </div>
  6012. <div class="a_add_body_div">
  6013. <el-button type="primary" size="small" @click.stop="
  6014. addTcheckList(
  6015. testJson.testJson[index1],
  6016. checkIndex1
  6017. )
  6018. ">添加</el-button>
  6019. <el-button type="primary" size="small" @click.stop="
  6020. deleteTcheckList(
  6021. testJson.testJson[index1],
  6022. checkIndex1
  6023. )
  6024. " v-if="testJson.testJson[index1].testItem != 1">删除
  6025. </el-button>
  6026. </div>
  6027. </el-checkbox>
  6028. </div>
  6029. </el-checkbox-group>
  6030. </div>
  6031. <!-- <div class="a_add_body_div">
  6032. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6033. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6034. v-if="testJson.testJson[index1].testItem != 1">删除
  6035. </el-button>
  6036. </div> -->
  6037. </div>
  6038. </div>
  6039. </div>
  6040. </div>
  6041. <span slot="footer" class="dialog-footer">
  6042. <el-button @click="closePan(45)">取 消</el-button>
  6043. <el-button type="primary" @click="addTest">确 定</el-button>
  6044. </span>
  6045. </el-dialog>
  6046. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6047. :before-close="handleClose" class="dialog_diy addToolsDia">
  6048. <div class="toolChoose">
  6049. <div class="tools">
  6050. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6051. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6052. <div style="
  6053. display: flex;
  6054. flex-direction: row;
  6055. align-items: baseline;
  6056. flex-wrap: nowrap;
  6057. justify-content: flex-start;
  6058. position: relative;
  6059. ">
  6060. <div class="chooseWho">
  6061. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6062. 互动类
  6063. </div>
  6064. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6065. 思维类
  6066. </div>
  6067. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6068. 评价类
  6069. </div>
  6070. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6071. 其他
  6072. </div>
  6073. </div>
  6074. </div>
  6075. <div style="min-height: 163px">
  6076. <div class="toolSort" v-if="chapToolsType == 0">
  6077. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6078. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6079. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6080. <div style="margin: 5px 0">素材库</div>
  6081. </div>
  6082. <div class="noCTool">
  6083. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6084. </div>
  6085. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6086. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6087. </div>
  6088. <!-- <div class="check" @click="chapAddTools(8)">
  6089. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6090. <div class="checkDiv" v-else>
  6091. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6092. </div>
  6093. </div> -->
  6094. </div>
  6095. </div>
  6096. <div class="toolSort" v-if="chapToolsType == 1">
  6097. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6098. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6099. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6100. <div style="margin: 5px 0">思维网格</div>
  6101. </div>
  6102. <div class="noCTool">
  6103. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6104. </div>
  6105. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6106. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6107. </div>
  6108. <!-- <div class="check" @click="chapAddTools(7)">
  6109. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6110. <div class="checkDiv" v-else>
  6111. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6112. </div>
  6113. </div> -->
  6114. </div>
  6115. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6116. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6117. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6118. <div style="margin: 5px 0">电子白板</div>
  6119. </div>
  6120. <div class="noCTool">
  6121. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6122. </div>
  6123. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6124. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6125. </div>
  6126. <!-- <div class="check" @click="chapAddTools(1)">
  6127. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6128. <div class="checkDiv" v-else>
  6129. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6130. </div>
  6131. </div> -->
  6132. </div>
  6133. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6134. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6135. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6136. <div style="margin: 5px 0">便签</div>
  6137. </div>
  6138. <div class="noCTool">
  6139. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6140. </div>
  6141. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6142. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6143. </div>
  6144. <!-- <div class="check" @click="chapAddTools(2)">
  6145. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6146. <div class="checkDiv" v-else>
  6147. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6148. </div>
  6149. </div> -->
  6150. </div>
  6151. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6152. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6153. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6154. <div style="margin: 5px 0">协同文档</div>
  6155. </div>
  6156. <div class="noCTool">
  6157. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6158. </div>
  6159. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6160. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6161. </div>
  6162. <!-- <div class="check" @click="chapAddTools(6)">
  6163. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6164. <div class="checkDiv" v-else>
  6165. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6166. </div>
  6167. </div> -->
  6168. </div>
  6169. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6170. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6171. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6172. <div style="margin: 5px 0">思维导图</div>
  6173. </div>
  6174. <div class="noCTool">
  6175. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6176. </div>
  6177. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6178. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6179. </div>
  6180. <!-- <div class="check" @click="chapAddTools(3)">
  6181. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6182. <div class="checkDiv" v-else>
  6183. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6184. </div>
  6185. </div> -->
  6186. </div>
  6187. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6188. @click="chapAddTools(31)">
  6189. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6190. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6191. <div style="margin: 5px 0">数学画板</div>
  6192. </div>
  6193. <div class="noCTool">
  6194. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6195. </div>
  6196. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6197. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6198. </div>
  6199. <!-- <div class="check" @click="chapAddTools(31)">
  6200. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6201. <div class="checkDiv" v-else>
  6202. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6203. </div>
  6204. </div> -->
  6205. </div>
  6206. </div>
  6207. <div class="toolSort" v-if="chapToolsType == 2">
  6208. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6209. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6210. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6211. <div style="margin: 5px 0">量规评分</div>
  6212. </div>
  6213. <div class="noCTool">
  6214. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6215. </div>
  6216. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6217. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6218. </div>
  6219. <!-- <div class="check" @click="chapAddTools(5)">
  6220. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6221. <div class="checkDiv" v-else>
  6222. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6223. </div>
  6224. </div> -->
  6225. </div>
  6226. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6227. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6228. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6229. <div style="margin: 5px 0">问卷调查</div>
  6230. </div>
  6231. <div class="noCTool">
  6232. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6233. </div>
  6234. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6235. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6236. </div>
  6237. <!-- <div class="check" @click="chapAddTools(4)">
  6238. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6239. <div class="checkDiv" v-else>
  6240. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6241. </div>
  6242. </div> -->
  6243. </div>
  6244. </div>
  6245. </div>
  6246. <div>
  6247. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6248. v-model="itemTools.toolDetail" />
  6249. </div>
  6250. </div>
  6251. </div>
  6252. </div>
  6253. <span slot="footer" class="dialog-footer">
  6254. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6255. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6256. </span>
  6257. </el-dialog>
  6258. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6259. closePan(15);
  6260. }
  6261. " class="dialog_diy">
  6262. <div>
  6263. <div class="a_add_title" style="
  6264. display: flex;
  6265. flex-direction: column;
  6266. align-items: flex-start;
  6267. justify-content: center;
  6268. ">
  6269. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6270. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6271. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6272. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6273. </div>
  6274. </div>
  6275. <span slot="footer" class="dialog-footer">
  6276. <el-button @click="closePan(15)">取 消</el-button>
  6277. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6278. </span>
  6279. </el-dialog>
  6280. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6281. :before-close="handleClose" class="dialog_diy">
  6282. <div>
  6283. <div class="a_add_title" style="
  6284. display: flex;
  6285. flex-direction: column;
  6286. align-items: flex-start;
  6287. justify-content: center;
  6288. ">
  6289. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6290. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6291. </div>
  6292. </div>
  6293. <span slot="footer" class="dialog-footer">
  6294. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6295. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6296. </span>
  6297. </el-dialog>
  6298. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6299. :before-close="handleClose" class="dialog_diy">
  6300. <div>
  6301. <div class="fileCss" style="padding-top: 20px">
  6302. <div>
  6303. <button class="info_btn" @click="addImg($event)">
  6304. 选择本地文件
  6305. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6306. </button>
  6307. <div class="spanName">选择本地文件</div>
  6308. </div>
  6309. <!-- <div>
  6310. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6311. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6312. <img :src="cover[0].url" alt="" />
  6313. <div class="deletePic" @click="deleteSysPic">
  6314. <img src="../../../assets/icon/delete.png" alt="" />
  6315. </div>
  6316. </div>
  6317. <div class="spanName">选择系统文件</div>
  6318. </div> -->
  6319. <div>
  6320. <el-button @click="(searchImageValue = courseName), resetImage()"
  6321. v-if="isSysPic2 == false">选择网络文件</el-button>
  6322. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6323. <img :src="cover[0].url" alt="" />
  6324. <div class="deletePic" @click="deleteSysPic">
  6325. <img src="../../../assets/icon/delete.png" alt="" />
  6326. </div>
  6327. </div>
  6328. <div class="spanName">选择网络文件</div>
  6329. </div>
  6330. </div>
  6331. <!-- <div class="fileCss">
  6332. </div> -->
  6333. </div>
  6334. <span slot="footer" class="dialog-footer">
  6335. <el-button @click="choosePicVisible = false">取 消</el-button>
  6336. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6337. </span>
  6338. </el-dialog>
  6339. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6340. :before-close="handleClose" class="dialog_diy">
  6341. <div class="cru_selectBox" style="margin: 0">
  6342. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6343. 绘画
  6344. </div>
  6345. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6346. 科技
  6347. </div>
  6348. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6349. 人文
  6350. </div>
  6351. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6352. 艺术
  6353. </div>
  6354. </div>
  6355. <div class="sysPicBox">
  6356. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6357. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6358. </div>
  6359. </div>
  6360. </el-dialog>
  6361. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6362. :before-close="handleClose" class="dialog_diy">
  6363. <div>
  6364. <div class="people_top_right" style="display: flex; align-items: center">
  6365. <div style="position: relative; width: 100%">
  6366. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6367. @keyup.enter.native="resetImage()"></el-input>
  6368. <div class="search_img" @click="resetImage" style="right: 10px">
  6369. <img src="../../../assets/icon/search.png" alt />
  6370. </div>
  6371. </div>
  6372. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6373. </div>
  6374. <div class="sysPicBox" v-loading="imageloading">
  6375. <div class="picNone" v-if="!imageList.length">
  6376. 请输入关键词搜索图片
  6377. </div>
  6378. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6379. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6380. </div>
  6381. </div>
  6382. </div>
  6383. </el-dialog>
  6384. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6385. closePan(41);
  6386. }
  6387. " class="dialog_diy dialog_diy3 fullStyle">
  6388. <div v-if="selectJson" style="height: 100%">
  6389. <div class="select_box1" v-if="selectSteps == 1">
  6390. <div class="select_box1_img">
  6391. <div class="select_box1_title">
  6392. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6393. </div>
  6394. <div class="select_box1_add_img">
  6395. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6396. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6397. <img src="../../../assets/icon/addPoster.png" alt="" />
  6398. </div>
  6399. <div class="isSysPic" v-else>
  6400. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6401. <div class="deletePic" @click="deleteSelectPic">
  6402. <img src="../../../assets/icon/delete.png" alt="" />
  6403. </div>
  6404. </div>
  6405. </div>
  6406. </div>
  6407. <div class="select_box1_select">
  6408. <div class="select_box1_title">
  6409. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6410. </div>
  6411. <div class="select_box1_select_box">
  6412. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6413. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6414. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6415. <div class="select_box1_select_box_add">
  6416. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6417. 添加</el-button>
  6418. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6419. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6420. </div>
  6421. </div>
  6422. </div>
  6423. </div>
  6424. <div v-if="selectSteps == 2" style="height: 100%">
  6425. <div class="select_box2">
  6426. <div class="select_box2_title">设置每道题目的正确选项</div>
  6427. <div class="select_box2_box">
  6428. <div class="select_box2_img">
  6429. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6430. </div>
  6431. <div class="select_box2_answer">
  6432. <div class="select_answer_title">根据题目选择对应答案</div>
  6433. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6434. <span>{{ checkIndex + 1 }}、</span>
  6435. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6436. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6437. </el-option>
  6438. </el-select>
  6439. </div>
  6440. </div>
  6441. </div>
  6442. </div>
  6443. </div>
  6444. </div>
  6445. <span slot="footer" class="dialog-footer">
  6446. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6447. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6448. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6449. </span>
  6450. </el-dialog>
  6451. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6452. :before-close="handleClose" class="dialog_diy">
  6453. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6454. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6455. <div class="pjCss" style="width: 100%">
  6456. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6457. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6458. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6459. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6460. <div class="remove" @click="deletRateList(eIndex)"></div>
  6461. <div style="width: 100%; display: flex">
  6462. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6463. <el-rate v-model="eItem.score" disabled></el-rate>
  6464. </div>
  6465. <div class="elist_inptu_text" style="align-items: flex-start">
  6466. <span style="min-width: 100px; text-align: right">描述:</span>
  6467. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6468. </div>
  6469. </div>
  6470. </div>
  6471. <div class="addToolFun" @click="addRateList()">
  6472. <div class="addToolImg">
  6473. <img src="../../../assets/icon/add.png" alt />
  6474. </div>
  6475. <div>添加</div>
  6476. </div>
  6477. </div>
  6478. </div>
  6479. <span slot="footer" class="dialog-footer">
  6480. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6481. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6482. </span>
  6483. </el-dialog>
  6484. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6485. closePan(47);
  6486. }
  6487. " class="dialog_diy dialog_diy3 fullStyle">
  6488. <div style="height: 100%">
  6489. <div class="sentenBox" style="height: 100%">
  6490. <div class="addSen" @click="addSt">添加题目</div>
  6491. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6492. <div class="sentenTopBox">
  6493. <div class="sentenTop" :index="stIndex + 1">
  6494. <div>题目设置</div>
  6495. <div>
  6496. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6497. </div>
  6498. <div @click="addSen(stIndex)">添加</div>
  6499. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6500. </div>
  6501. </div>
  6502. <div class="cardList">
  6503. <div v-if="st.addSentence.length > 0" class="cardBox">
  6504. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6505. @click="setRightAnswer(s, stIndex, sIndex)">
  6506. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6507. <div>{{ s }}</div>
  6508. </el-tooltip>
  6509. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6510. <img src="../../../assets/icon/delete.png" alt="" />
  6511. </div>
  6512. </div>
  6513. </div>
  6514. <div class="card">
  6515. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6516. </div>
  6517. </div>
  6518. <div class="rightCardBox">
  6519. <div>正确顺序</div>
  6520. <div class="rightCardList">
  6521. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6522. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6523. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6524. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6525. <div>{{ r }}</div>
  6526. </el-tooltip>
  6527. </div>
  6528. <div>{{ rIndex + 1 }}</div>
  6529. </div>
  6530. </div>
  6531. <div class="card" v-if="st.rightAnswer.length == 0">
  6532. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6533. </div>
  6534. <div class="card" v-else>
  6535. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6536. </div>
  6537. </div>
  6538. </div>
  6539. </div>
  6540. </div>
  6541. </div>
  6542. <span slot="footer" class="dialog-footer">
  6543. <el-button @click="closePan(47)">取 消</el-button>
  6544. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6545. </span>
  6546. </el-dialog>
  6547. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6548. :before-close="handleClose" class="dialog_diy">
  6549. <el-form>
  6550. <!-- <el-form-item label="文本标题">
  6551. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6552. </el-form-item> -->
  6553. <div>表格内容</div>
  6554. <Table v-model="tableJson.text" @change="change"></Table>
  6555. </el-form>
  6556. <span slot="footer" class="dialog-footer">
  6557. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6558. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6559. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6560. </span>
  6561. </el-dialog>
  6562. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6563. :before-close="handleClose" class="dialog_diy">
  6564. <el-form>
  6565. <!-- <el-form-item label="文本标题">
  6566. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6567. </el-form-item> -->
  6568. <div>文档内容</div>
  6569. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6570. </el-form>
  6571. <span slot="footer" class="dialog-footer">
  6572. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6573. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6574. </span>
  6575. </el-dialog>
  6576. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6577. :before-close="handleClose" class="dialog_diy">
  6578. <div style="
  6579. width: 100%;
  6580. display: flex;
  6581. flex-direction: row;
  6582. flex-wrap: nowrap;
  6583. align-items: center;
  6584. justify-content: center;
  6585. ">
  6586. <div>班级:</div>
  6587. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6588. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6589. </el-option>
  6590. </el-select>
  6591. </div>
  6592. <span slot="footer" class="dialog-footer">
  6593. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6594. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6595. </span>
  6596. </el-dialog>
  6597. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6598. :before-close="handleClose" class="dialog_diy">
  6599. <div style="
  6600. width: 100%;
  6601. display: flex;
  6602. flex-direction: row;
  6603. flex-wrap: nowrap;
  6604. align-items: center;
  6605. justify-content: center;
  6606. ">
  6607. <div>随机码:</div>
  6608. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6609. </div>
  6610. <span slot="footer" class="dialog-footer">
  6611. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6612. <el-button type="primary" @click="addInvite">确定</el-button>
  6613. </span>
  6614. </el-dialog>
  6615. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6616. :before-close="handleClose" class="dialog_diy">
  6617. <div>
  6618. <div style="margin-bottom: 20px; color: #999">
  6619. 提示:点击“+”或“-”修改倒计时时长。
  6620. </div>
  6621. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6622. </div>
  6623. <span slot="footer" class="dialog-footer">
  6624. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6625. <el-button type="primary" @click="addPreTime">确定</el-button>
  6626. </span>
  6627. </el-dialog>
  6628. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6629. :before-close="handleClose" class="dialog_diy">
  6630. <div>
  6631. <div style="
  6632. width: 100%;
  6633. display: flex;
  6634. flex-direction: row;
  6635. flex-wrap: nowrap;
  6636. align-content: center;
  6637. align-items: center;
  6638. justify-content: space-between;
  6639. ">
  6640. <div style="
  6641. display: flex;
  6642. flex-flow: row nowrap;
  6643. align-items: flex-start;
  6644. width: 100%;
  6645. flex-direction: column;
  6646. flex-wrap: nowrap;
  6647. position: relative;
  6648. ">
  6649. <div class="e_box">
  6650. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6651. <div class="e_card_picture">
  6652. <img src="../../../assets/e_picture.png" />
  6653. </div>
  6654. <div class="e_card_name">
  6655. <span>{{ item.title }}</span>
  6656. </div>
  6657. <div class="e_card_btn">
  6658. <span @click="checkEva(item.id, 2)">导入</span>
  6659. </div>
  6660. </div> -->
  6661. <!-- <div class="addEva" @click="openT">
  6662. <img src="../../../assets/icon/addEva.png" alt="" />
  6663. </div> -->
  6664. <div style="
  6665. display: flex;
  6666. justify-content: flex-end;
  6667. margin-bottom: 10px;
  6668. ">
  6669. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6670. </div>
  6671. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6672. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6673. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6674. </el-table-column>
  6675. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6676. </el-table-column>
  6677. <el-table-column label="操作" width="250px">
  6678. <template slot-scope="scope">
  6679. <div class="btnBox">
  6680. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6681. </div>
  6682. </template>
  6683. </el-table-column>
  6684. </el-table>
  6685. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6686. 暂无数据
  6687. </div>
  6688. </div>
  6689. </div>
  6690. </div>
  6691. </div>
  6692. <span slot="footer" class="dialog-footer">
  6693. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6694. </span>
  6695. </el-dialog>
  6696. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6697. :before-close="handleClose" class="dialog_diy">
  6698. <div class="groupBox">
  6699. <div v-if="groupJson.group" class="groupContent">
  6700. <div class="groupTitle">请设置小组数量及名称</div>
  6701. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6702. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6703. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6704. <div class="groupBtn">
  6705. <el-button type="primary" size="small" @click="addGroup(index)"
  6706. v-if="groupJson.group.length - 1 == index">
  6707. 添加</el-button>
  6708. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6709. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6710. </div>
  6711. </div>
  6712. </div>
  6713. <div class="groupContent">
  6714. <div class="groupTitle">请设置每组人数</div>
  6715. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6716. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6717. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6718. @change="numberPan"></el-input>
  6719. </div>
  6720. </div>
  6721. <span slot="footer" class="dialog-footer">
  6722. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6723. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6724. </span>
  6725. </el-dialog>
  6726. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6727. :before-close="handleClose" class="dialog_diy">
  6728. <div style="
  6729. width: 100%;
  6730. display: flex;
  6731. flex-direction: row;
  6732. flex-wrap: nowrap;
  6733. align-items: center;
  6734. justify-content: center;
  6735. ">
  6736. <div style="min-width: fit-content">文件名称:</div>
  6737. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6738. </div>
  6739. <span slot="footer" class="dialog-footer">
  6740. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6741. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6742. </span>
  6743. </el-dialog>
  6744. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6745. closePan(69);
  6746. }
  6747. " class="dialog_diy fullStyle fullStyle1">
  6748. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6749. <span slot="footer" class="dialog-footer">
  6750. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6751. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6752. </span>
  6753. </el-dialog>
  6754. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6755. :before-close="handleClose" class="dialog_diy">
  6756. <div class="template_box">
  6757. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6758. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6759. <div class="wordPic">
  6760. <img src="../../../assets/icon/new/course_template.png" alt />
  6761. </div>
  6762. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6763. <div style="
  6764. margin-top: 10px;
  6765. line-height: 19px;
  6766. overflow: hidden;
  6767. text-overflow: ellipsis;
  6768. white-space: nowrap;
  6769. padding: 0 10px;
  6770. box-sizing: border-box;
  6771. width: 100%;
  6772. ">
  6773. {{ aa.title }}
  6774. </div>
  6775. </el-tooltip>
  6776. </div>
  6777. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6778. :class="{ wordTeacherA: ctJson.id == 1 }">
  6779. <div class="wordPic">
  6780. <img src="../../../assets/icon/new/course_template.png" alt />
  6781. </div>
  6782. <div style="
  6783. margin-top: 10px;
  6784. line-height: 19px;
  6785. overflow: hidden;
  6786. text-overflow: ellipsis;
  6787. white-space: nowrap;
  6788. padding: 0 20px;
  6789. ">
  6790. 简易模板
  6791. </div>
  6792. </div>
  6793. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6794. :class="{ wordTeacherA: ctJson.id == 2 }">
  6795. <div class="wordPic">
  6796. <img src="../../../assets/icon/new/course_template.png" alt />
  6797. </div>
  6798. <div style="
  6799. margin-top: 10px;
  6800. line-height: 19px;
  6801. overflow: hidden;
  6802. text-overflow: ellipsis;
  6803. white-space: nowrap;
  6804. padding: 0 20px;
  6805. ">
  6806. 智能粘贴模式
  6807. </div>
  6808. </div>
  6809. </div>
  6810. <span slot="footer" class="dialog-footer">
  6811. <el-button @click="templateDialog = false">取 消</el-button>
  6812. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6813. </span>
  6814. </el-dialog>
  6815. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6816. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6817. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6818. <div class="change_stageBox">
  6819. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6820. <div class="nt_taskBox">
  6821. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  6822. <div class="nt_taskName">
  6823. <el-tooltip effect="light" :content="t.dyName" placement="top">
  6824. <span>{{ t.dyName }}</span>
  6825. </el-tooltip>
  6826. </div>
  6827. </div>
  6828. <div class="moveBtn" v-if="unitJson3.length > 1">
  6829. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  6830. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  6831. </div>
  6832. </div>
  6833. </div>
  6834. <span slot="footer" class="dialog-footer">
  6835. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  6836. <el-button type="primary" @click="updateChange">确定</el-button>
  6837. </span>
  6838. </el-dialog>
  6839. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  6840. :before-close="handleClose" class="dialog_diy">
  6841. <div class="addTypeChoose" style="justify-content: center">
  6842. <div style="min-width: 100px">模板名称:</div>
  6843. <el-input v-model="templateName" style="width: 200px"></el-input>
  6844. </div>
  6845. <div class="addTypeBox">
  6846. <div class="addTypeChoose">
  6847. <div style="min-width: 100px">选择一级分类:</div>
  6848. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  6849. style="width: 200px">
  6850. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  6851. </el-option>
  6852. </el-select>
  6853. </div>
  6854. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  6855. <div style="min-width: 100px">选择二级分类:</div>
  6856. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  6857. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  6858. </el-option>
  6859. </el-select>
  6860. </div>
  6861. </div>
  6862. <span slot="footer" class="dialog-footer">
  6863. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  6864. <el-button @click="close()">关 闭</el-button>
  6865. </span>
  6866. </el-dialog>
  6867. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  6868. </evaBox>
  6869. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  6870. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  6871. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3" @aiConfirm="aiConfirm" :clickType="clickType">
  6872. </aiDialog>
  6873. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  6874. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  6875. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  6876. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  6877. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  6878. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  6879. </div>
  6880. </template>
  6881. <script>
  6882. import "../../../common/aws-sdk-2.235.1.min.js";
  6883. import { tools as toolsData } from "../../../common/tools.js";
  6884. // import "../../../common/aws-sdk-2.99.0.min.js";
  6885. import $ from "jquery";
  6886. import EditorBar from "../../../components/tools/wangEnduit";
  6887. import Table from "../../../components/tools/table";
  6888. import Mind from "../../tools/jsmind2";
  6889. import Time from "../../tools/time.vue";
  6890. import Sunburst from "../../tools/sunburst";
  6891. import SeeBoard from "../../tools/seeBoard";
  6892. import weilaiData from "../components/weilai.js";
  6893. import sourceDialog from "../teacherSource/dialog.vue";
  6894. import interVideo from "../interVideo/index.vue";
  6895. import englishRight from "../components/englishRight.vue";
  6896. import evaBox from "../evaBox/index.vue";
  6897. import EnglishVoice from "../EnglishVoice/index.vue";
  6898. import aiBox from './aiBox.vue'
  6899. import aiBoxRight from './aiBoxRight.vue'
  6900. import aiDialog from './aiDialog'
  6901. import aiTips from './aiTips.vue'
  6902. import tipsDialog from './tipsDialog.vue'
  6903. import { v4 as uuidv4 } from "uuid";
  6904. import MarkdownIt from "markdown-it";
  6905. import aiCreateDialog from './aiCreateDialog.vue'
  6906. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  6907. import wpdf from "../test/file/wPdf2.vue";
  6908. import wOffice from "../test/file/wOffice.vue";
  6909. import htmlDocx from "html-docx-js/dist/html-docx";
  6910. import TurndownService from 'turndown';
  6911. import JSZip from "jszip";
  6912. import evaList from "./evaList.vue";
  6913. var OpenCC = require("opencc-js");
  6914. let converter = OpenCC.Converter({
  6915. from:'hk',
  6916. to:'cn'
  6917. })
  6918. let converter2 = OpenCC.Converter({
  6919. from:'cn',
  6920. to:'hk'
  6921. })
  6922. export default {
  6923. components: {
  6924. EditorBar,
  6925. Mind,
  6926. Time,
  6927. Sunburst,
  6928. SeeBoard,
  6929. Table,
  6930. sourceDialog,
  6931. interVideo,
  6932. englishRight,
  6933. evaBox,
  6934. EnglishVoice,
  6935. aiBox,
  6936. aiBoxRight,
  6937. aiDialog,
  6938. aiTips,
  6939. tipsDialog,
  6940. aiCreateDialog,
  6941. aiCreateVideoDialog,
  6942. wpdf,
  6943. wOffice,
  6944. evaList
  6945. },
  6946. data() {
  6947. return {
  6948. checkAll: false,
  6949. checkAll2: false,
  6950. chooseType: 1,
  6951. checkedCities: [],
  6952. isIndeterminate: true,
  6953. isIndeterminate2: true,
  6954. isSysPic: false,
  6955. isSysPic2: false,
  6956. steps: 1,
  6957. stepsNav: 1,
  6958. nbOrder: 0,
  6959. courseId: "",
  6960. chapToolsType: 0,
  6961. chapTools: [
  6962. {
  6963. tools: [],
  6964. toolDetail: "",
  6965. },
  6966. ],
  6967. line: "",
  6968. lineTitle: "",
  6969. sysPic: [],
  6970. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  6971. sentenceList2: [],
  6972. isPushTitleList: [],
  6973. lineCount: 0,
  6974. lineType: 0,
  6975. chapCount: 0,
  6976. courseName: "",
  6977. isTeacherSee: false,
  6978. courseText: "",
  6979. textLoading: false,
  6980. ttextLoading: false,
  6981. courseText2: "",
  6982. preTime: 0,
  6983. formLabelWidth: "100px",
  6984. choosePicVisible: false,
  6985. sysPicVisible: false,
  6986. sysPicVisible2: false,
  6987. uploadLoading1: false,
  6988. noneBtnImg: false,
  6989. updateBoolean2: false,
  6990. unitIndex: 0,
  6991. taskCount: 0,
  6992. dialogVisible: false,
  6993. dialogVisible1: false,
  6994. dialogVisible2: false,
  6995. dialogVisible3: false,
  6996. dialogVisible4: false,
  6997. dialogVisible5: false,
  6998. dialogVisible6: false,
  6999. dialogVisible7: false,
  7000. dialogVisible8: false,
  7001. dialogVisible9: false,
  7002. dialogVisibleClass: false,
  7003. dialogVisibleMember: false,
  7004. dialogVisibleMp3: false,
  7005. dialogVisibleSelect: false,
  7006. dialogVisibleSentence: false,
  7007. dialogVisibleRate: false,
  7008. dialogVisibleChoice: false,
  7009. dialogVisiblemb: false,
  7010. dialogVisibleInvite: false,
  7011. dialogVisibleSource: false,
  7012. dialogVisibleVideo: false,
  7013. dialogVisibleStageChange: false,
  7014. dialogVisibleupdataVideoT: false,
  7015. englishDialogVisible: false,
  7016. templateDialog: false,
  7017. ctJson: {},
  7018. isClickColor: 1,
  7019. toolIndexType: "",
  7020. publicTool: 0,
  7021. searchPeople: "",
  7022. searchTN: "",
  7023. collid: '',
  7024. CollLoading: false,
  7025. userid: this.$route.query.userid,
  7026. oid: this.$route.query.oid,
  7027. org: this.$route.query.org,
  7028. role: this.$route.query.role,
  7029. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7030. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7031. dialogVisibleTable: false,
  7032. dialogVisibleWord: false,
  7033. tableJson: { text: "" },
  7034. wordJson: { text: "" },
  7035. dialogVisibleMoreUpload: false,
  7036. dialogVisiblePreTime: false,
  7037. uploadJson: [],
  7038. classJuri: [],
  7039. gradeList: [],
  7040. cover: [], //课程封面
  7041. myWord: [],
  7042. evaJuri: [],
  7043. evalua: "",
  7044. targetArray: [],
  7045. eTitle: "",
  7046. eJson: {},
  7047. fid: "", //一级
  7048. sid: "", //二级
  7049. tid: "", //二级
  7050. typeMode: 3,
  7051. eJSONNum: 0,
  7052. data: {
  7053. meta: {
  7054. name: "example",
  7055. author: "dd@163.com",
  7056. version: "0.2",
  7057. },
  7058. format: "node_array",
  7059. data: [{ id: "root", isroot: true, topic: "" }],
  7060. },
  7061. askJson: {
  7062. askCount: 1,
  7063. askTitle: "",
  7064. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7065. },
  7066. askJson2: {},
  7067. testJson: {},
  7068. testJson2: {},
  7069. selectJson: {},
  7070. selectJson2: {},
  7071. rateJson: [],
  7072. unitJson2: [],
  7073. unitJson3: [],
  7074. unitJson: [
  7075. {
  7076. dyName: "", //单元标题
  7077. chapterInfo: [
  7078. {
  7079. isread: false,
  7080. chapterid: this.guid(),
  7081. title: "",
  7082. courseName: "",
  7083. taskJson: [
  7084. {
  7085. task: "",
  7086. taskDetail: "",
  7087. chapterData: [],
  7088. toolText: "",
  7089. toolChoose: [
  7090. {
  7091. tool: [],
  7092. toolDetail: "",
  7093. toolType: 0,
  7094. askCount: 1,
  7095. askTitle: "",
  7096. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7097. },
  7098. ],
  7099. isShowTools: false,
  7100. askCount: 1,
  7101. isFold: 1,
  7102. askTitle: "",
  7103. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7104. checkJson: [{ checkCount: [], checkPerent: [] }],
  7105. homeworkList: [],
  7106. },
  7107. ],
  7108. itemCount: 1,
  7109. fileList1: [],
  7110. video: [],
  7111. testData: [],
  7112. pData: [],
  7113. templateArray: [],
  7114. },
  7115. ],
  7116. },
  7117. ],
  7118. templateArray: [],
  7119. studentJuri: [],
  7120. teacherJuri: [],
  7121. CollaborativeTeaList: [],
  7122. checkboxList: [],
  7123. checkboxList2: [],
  7124. checkboxList3: [],
  7125. classSearch: "",
  7126. gradeId: "",
  7127. number: "",
  7128. tTitle: "",
  7129. tdetail: "",
  7130. templateC: {},
  7131. AttText: {},
  7132. AttTextType: 0,
  7133. AttTextIndex: 0,
  7134. cTemplate: "",
  7135. CourseType: [],
  7136. CourseType1: [],
  7137. CourseType2: [],
  7138. CourseTypeJson: {},
  7139. CourseTypeJson1: {},
  7140. courseTypeId: [],
  7141. courseTypeId1: [],
  7142. courseTypeSon: [],
  7143. clearArray: [],
  7144. pTypeCheck: [],
  7145. pTypeCheckName: [],
  7146. loading: false,
  7147. toolType: 0,
  7148. inputShow: true,
  7149. inputShow2: true,
  7150. toolIndex: 0,
  7151. cidType: 0,
  7152. answerQ: "",
  7153. answerQ2: "",
  7154. grade: [],
  7155. grade2: [],
  7156. courseUserid: "",
  7157. timer: null,
  7158. timer2: null,
  7159. pasteTimer: null,
  7160. checkId: "",
  7161. isDelete: 1,
  7162. addindex: 0,
  7163. selectSteps: 1,
  7164. groupJson: {},
  7165. dialogVisibleGroup: false,
  7166. rightBoxHeight: 0,
  7167. ManAarray: [],
  7168. checkBoolean: false,
  7169. inviteCode: [],
  7170. inviteId: "",
  7171. icode: "",
  7172. easyArray: [2, 4],
  7173. sourceData: {},
  7174. updateSourcePan: false,
  7175. videoJson: {},
  7176. isBtnDisplay: false,
  7177. isStepDisplay: false,
  7178. isPasteStage: false,
  7179. isPasteTask: false,
  7180. isPasteChoice: false,
  7181. imageList: [],
  7182. imageloading: false,
  7183. imageloading2: false,
  7184. searchImageValue: "",
  7185. ppage: 1,
  7186. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7187. oldIndex: 0,
  7188. dragType: "",
  7189. oldUnitIndex: 0,
  7190. oldData: null,
  7191. newIndex: "",
  7192. englishList: {},
  7193. typeIndex: "",
  7194. courseState: 5,
  7195. taskJSONa: [
  7196. {
  7197. task: "",
  7198. taskDetail: "",
  7199. chapterData: [],
  7200. toolText: "",
  7201. toolChoose: [
  7202. {
  7203. tool: [],
  7204. toolDetail: "",
  7205. toolType: 0,
  7206. askCount: 1,
  7207. askTitle: "",
  7208. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7209. },
  7210. ],
  7211. isShowTools: false,
  7212. askCount: 1,
  7213. isFold: 1,
  7214. askTitle: "",
  7215. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7216. checkJson: [{ checkCount: [], checkPerent: [] }],
  7217. homeworkList: [],
  7218. },
  7219. ],
  7220. checkUnitIndex: 0,
  7221. isdrag: "",
  7222. evaIndex: "",
  7223. evatIndex: "",
  7224. evaBoxDialog: false,
  7225. EnglishVoiceDialog: false,
  7226. englishVoiceJson: {},
  7227. cetIndex: "",
  7228. cettIndex: "",
  7229. cetBoxDialog: false,
  7230. templateName: "",
  7231. setTypeJson: {
  7232. one: "",
  7233. two: "",
  7234. },
  7235. twoJson: [],
  7236. oneJson: [],
  7237. updateKey: 1,
  7238. isOutline: false,
  7239. isOutline2: false,
  7240. infoData: [],
  7241. infoproVisible: false,
  7242. infoisFinishSize: 0,
  7243. infoisAllSize: 0,
  7244. infoprogress: 0,
  7245. taskDetailLoading: [],
  7246. ttaskDetailLoading: [],
  7247. taskDetailLoading2: [],
  7248. ttaskDetailLoading2: [],
  7249. taskDetailLoading3: [],
  7250. ttaskDetailLoading3: [],
  7251. taskDetailLoading4: [],
  7252. taskDetailLoading5: [],
  7253. ttaskDetailLoading5: [],
  7254. dArray: [],
  7255. dialogVisibleAiD: false,
  7256. aitype: "",
  7257. aiJson: {
  7258. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7259. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7260. "aiTask": "请根据<教学任务教案>。",
  7261. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7262. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7263. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7264. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7265. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7266. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7267. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7268. },
  7269. aiText: "",
  7270. aiText2: "",
  7271. aiText3: "",
  7272. aiCallBack: "",
  7273. aiIndex: "",
  7274. clickType: 1,
  7275. promptShow: false,
  7276. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7277. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7278. dialogVisibleTips: false,
  7279. tipsJson: {},
  7280. cpote:{
  7281. cpote1: '',
  7282. cpote2: '',
  7283. cpote3: '',
  7284. cpote4: '',
  7285. },
  7286. cpoteLoading:{
  7287. cpote1: false,
  7288. cpote2: false,
  7289. cpote3: false,
  7290. cpote4: false,
  7291. },
  7292. cpotetLoading:{
  7293. cpote1: false,
  7294. cpote2: false,
  7295. cpote3: false,
  7296. cpote4: false,
  7297. },
  7298. cpoteType: 0,
  7299. dialogVisibleAiCreate: false,
  7300. dialogVisibleAiCreateVideo: false,
  7301. teacherText: [],
  7302. isFileSearch: true,
  7303. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  7304. 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'],
  7305. courseJie:1,
  7306. courseTime:45,
  7307. allTextArray: [],
  7308. dialogVisiblePdf: false,
  7309. dialogVisibleOffice: false,
  7310. wurl: "",
  7311. choiceLoading: false,
  7312. teacherInfoData: [],
  7313. teacherinfoproVisible: false,
  7314. teacherinfoisFinishSize: 0,
  7315. teacherinfoisAllSize: 0,
  7316. teacherinfoprogress: 0,
  7317. teacherCourseText: "",
  7318. teacherTextLoading: false,
  7319. tteacherTextLoading: false,
  7320. targetCourseText: "",
  7321. targetTextLoading: false,
  7322. ttargetTextLoading: false,
  7323. cankaoInfoData: [],
  7324. fileSLoading: false,
  7325. infoData2: [],
  7326. isuseT: false,
  7327. mode: 1,
  7328. targetCourseText2: "",
  7329. targetTextLoading2: false,
  7330. ttargetTextLoading2: false,
  7331. courseTextBool: false,
  7332. teacherCourseTextB: true,
  7333. targetCourseTextB: true,
  7334. courseTextB: true,
  7335. targetCourseText2B: true,
  7336. // 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'],
  7337. yiKeTemplateArray:[],
  7338. taskLoading: [],
  7339. ruleLoading: [],
  7340. mubiaoInfoData: [],
  7341. mubiaoinfoproVisible: false,
  7342. mubiaoinfoisFinishSize: 0,
  7343. mubiaoinfoisAllSize: 0,
  7344. mubiaoinfoprogress: 0,
  7345. xuanzeInfoData: [],
  7346. xuanzeinfoproVisible: false,
  7347. xuanzeinfoisFinishSize: 0,
  7348. xuanzeinfoisAllSize: 0,
  7349. xuanzeinfoprogress: 0,
  7350. pingjiaInfoData: [],
  7351. pingjiainfoproVisible: [],
  7352. pingjiainfoisFinishSize: [],
  7353. pingjiainfoisAllSize: [],
  7354. pingjiainfoprogress: [],
  7355. taskGLoading: [],
  7356. isOutlineCancelToken: null,
  7357. isFileCancelToken: null,
  7358. isTargetCancelToken1: null,
  7359. isTargetCancelToken2: null,
  7360. isTextCancelToken: null,
  7361. isTeacherTextCancelToken: null,
  7362. isTeacherTaskCancelToken: null,
  7363. isOutlineTaskCancelToken: [],
  7364. isTeacherTaskCancelToken2: [],
  7365. isTeacherTaskCancelSource: [],
  7366. isTextCancelSource: null,
  7367. isOutlineTaskCancelSource: [],
  7368. isTeacherTextCancelSource: null,
  7369. isTargetCancelSource1: null,
  7370. isTargetCancelSource2: null,
  7371. fileidArray: [],
  7372. interPan: true,
  7373. interFlash: true,
  7374. agentid: "",
  7375. interSetting: false,
  7376. chatid: "",
  7377. languageSetting: 0, //0中文 1繁体 2英文
  7378. isQuote: {},
  7379. knowFileArray: [],
  7380. knowInfoData: [],
  7381. knowinfoproVisible: false,
  7382. knowinfoisFinishSize: 0,
  7383. knowinfoisAllSize: 0,
  7384. knowinfoprogress: 0,
  7385. knowFileids: [],
  7386. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5' ],
  7387. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41],
  7388. taskAnLoading: [],
  7389. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  7390. taskCancelToken1: [],
  7391. taskCancelToken2: [],
  7392. };
  7393. },
  7394. directives: {
  7395. autoHeight: {
  7396. update(el, binding) {
  7397. const { value } = binding;
  7398. if (value && typeof value === "number") {
  7399. el.style.height = `${value}px`;
  7400. } else {
  7401. el.style.height = "auto";
  7402. }
  7403. },
  7404. componentUpdated(el) {
  7405. el.style.height = `${el.scrollHeight + 25}px`;
  7406. },
  7407. },
  7408. },
  7409. computed: {
  7410. // rightBoxHeight: function () {
  7411. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7412. // },
  7413. offsetLetfPx: function () {
  7414. //addnum可以直接在模板语法里面用,相当于data内的值
  7415. return (
  7416. $(".cru_select")[this.unitIndex] &&
  7417. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7418. );
  7419. },
  7420. getMan2() {
  7421. return function (people) {
  7422. let _people = people;
  7423. let _people2 = "";
  7424. if (this.ManAarray.length) {
  7425. for (var i = 0; i < this.ManAarray.length; i++) {
  7426. if (this.ManAarray[i].userid == people) {
  7427. _people2 = this.ManAarray[i].name;
  7428. break;
  7429. }
  7430. }
  7431. }
  7432. if (people == this.courseUserid) {
  7433. return "";
  7434. }
  7435. return this.ManAarray.length ? _people2 : "";
  7436. };
  7437. },
  7438. getListMan2() {
  7439. return function (list) {
  7440. let _people2 = [];
  7441. if (this.ManAarray.length) {
  7442. for (var j = 0; j < list.length; j++) {
  7443. let people = list[j];
  7444. for (var i = 0; i < this.ManAarray.length; i++) {
  7445. if (
  7446. this.ManAarray[i].userid == people &&
  7447. people != this.courseUserid
  7448. ) {
  7449. _people2.push(this.ManAarray[i].name);
  7450. break;
  7451. }
  7452. }
  7453. }
  7454. }
  7455. return this.ManAarray.length ? _people2.join("、") : "";
  7456. };
  7457. },
  7458. isInvite() {
  7459. return function (cid) {
  7460. let array = [];
  7461. for (var i = 0; i < this.inviteCode.length; i++) {
  7462. array.push(this.inviteCode[i].cid);
  7463. }
  7464. return array.indexOf(cid) != -1;
  7465. };
  7466. },
  7467. getInviteCodeC() {
  7468. return function (cid) {
  7469. let array = [];
  7470. for (var i = 0; i < this.inviteCode.length; i++) {
  7471. array.push(this.inviteCode[i].cid);
  7472. }
  7473. return this.inviteCode[array.indexOf(cid)].ic;
  7474. };
  7475. },
  7476. getClassC() {
  7477. return function (c) {
  7478. let _c2 = "";
  7479. if (this.grade.length) {
  7480. for (var i = 0; i < this.grade.length; i++) {
  7481. if (this.grade[i].id == c) {
  7482. _c2 = this.grade[i].name;
  7483. break;
  7484. }
  7485. }
  7486. }
  7487. return this.grade.length ? _c2 : "";
  7488. };
  7489. },
  7490. getListClassC() {
  7491. return function (list) {
  7492. let _c2 = [];
  7493. if (this.grade.length) {
  7494. for (var j = 0; j < list.length; j++) {
  7495. let c = list[j];
  7496. for (var i = 0; i < this.grade.length; i++) {
  7497. if (this.grade[i].id == c) {
  7498. _c2.push(this.grade[i].name);
  7499. break;
  7500. }
  7501. }
  7502. }
  7503. }
  7504. return this.grade.length ? _c2.join("、") : "";
  7505. };
  7506. },
  7507. MarkdownT() {
  7508. return function (c) {
  7509. let md = new MarkdownIt();
  7510. return c
  7511. ? md.render(c) : "";
  7512. };
  7513. },
  7514. panOutline(){
  7515. return function () {
  7516. let count = 0;
  7517. for(var i = 0; i < this.unitJson.length; i++){
  7518. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7519. for(var j = 0; j < _task.length; j++){
  7520. if(_task[j].taskDetail2){
  7521. count++
  7522. }
  7523. }
  7524. }
  7525. return count;
  7526. };
  7527. },
  7528. panTeacher(){
  7529. return function () {
  7530. let count = 0;
  7531. for(var i = 0; i < this.unitJson.length; i++){
  7532. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7533. for(var j = 0; j < _task.length; j++){
  7534. if(_task[j].taskDetail3){
  7535. count++
  7536. }
  7537. }
  7538. }
  7539. return count;
  7540. };
  7541. },
  7542. panTask(){
  7543. return function () {
  7544. let count = 0;
  7545. for(var i = 0; i < this.unitJson.length; i++){
  7546. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7547. for(var j = 0; j < _task.length; j++){
  7548. if(_task[j].taskDetail){
  7549. count++
  7550. }
  7551. }
  7552. }
  7553. return count;
  7554. };
  7555. },
  7556. dataCheckPan(){
  7557. return function (fileid) {
  7558. for(let i = 0; i < this.infoData.length; i++){
  7559. if(this.infoData[i].fileid == fileid){
  7560. return true
  7561. }
  7562. }
  7563. return false;
  7564. };
  7565. },
  7566. interUrl: function () {
  7567. let agentid = this.aiJson.agentid
  7568. let sagentid = this.aiJson.sagentid
  7569. let url = ''
  7570. if(sagentid){
  7571. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7572. }else{
  7573. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7574. }
  7575. return url;
  7576. },
  7577. },
  7578. watch: {
  7579. unitIndex(newValue, oldValue) {
  7580. // return;
  7581. if (this.isDelete == 2) {
  7582. this.isDelete = 1;
  7583. return;
  7584. }
  7585. if (this.cid != "") {
  7586. let _unitIndex = oldValue;
  7587. if (
  7588. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7589. JSON.stringify(this.unitJson[_unitIndex])
  7590. ) {
  7591. this.$refs.rightboxR.scrollTop = 0;
  7592. return;
  7593. }
  7594. let cPan = 1;
  7595. for (
  7596. var j = 0;
  7597. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7598. j++
  7599. ) {
  7600. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7601. j
  7602. ].proVisible = false;
  7603. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7604. j
  7605. ].proVisible2 = false;
  7606. if (
  7607. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7608. .length > 1
  7609. ) {
  7610. for (
  7611. var z = 0;
  7612. z <
  7613. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7614. .length;
  7615. z++
  7616. ) {
  7617. if (
  7618. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7619. .toolChoose[z].tool.length
  7620. ) {
  7621. this.$message.error("请把工具添加完整");
  7622. cPan = 2;
  7623. break;
  7624. }
  7625. }
  7626. }
  7627. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7628. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7629. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7630. (ele) => {
  7631. return ele.value != "" || ele.detail != "" || ele.target != "";
  7632. }
  7633. );
  7634. }
  7635. }
  7636. if (cPan == 2) {
  7637. this.unitIndex = oldValue;
  7638. return;
  7639. }
  7640. for (var i = 0; i < this.unitJson.length; i++) {
  7641. if (this.addindex != i) {
  7642. delete this.unitJson[i].isUpdate;
  7643. }
  7644. }
  7645. this.$refs.rightboxR.scrollTop = 0;
  7646. this.addindex = -1;
  7647. let params = [
  7648. {
  7649. cid: this.cid,
  7650. chapters: JSON.stringify(this.unitJson),
  7651. uid: this.userid,
  7652. unitIndex: _unitIndex,
  7653. },
  7654. ];
  7655. this.ajax
  7656. .post(this.$store.state.api + "updateWorkNew4", params)
  7657. .then((res) => {
  7658. // this.$message({
  7659. // message: "修改成功",
  7660. // type: "success",
  7661. // });
  7662. // this.courseId = this.cid;
  7663. this.addtips()
  7664. })
  7665. .catch((err) => {
  7666. this.$message.error("网络不佳");
  7667. console.error(err);
  7668. });
  7669. }
  7670. },
  7671. steps(newValue, old) {
  7672. if(newValue == 2){
  7673. this.steps = old
  7674. }
  7675. if (newValue == 4) {
  7676. let cPan = 1;
  7677. for (var i = 0; i < this.unitJson.length; i++) {
  7678. for (
  7679. var j = 0;
  7680. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7681. j++
  7682. ) {
  7683. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7684. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7685. if (
  7686. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7687. ) {
  7688. for (
  7689. var z = 0;
  7690. z <
  7691. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7692. z++
  7693. ) {
  7694. if (
  7695. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7696. .tool.length
  7697. ) {
  7698. this.$message.error("请把工具添加完整");
  7699. cPan = 2;
  7700. break;
  7701. }
  7702. }
  7703. }
  7704. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7705. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7706. i
  7707. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7708. return ele.value != "" || ele.detail != "" || ele.target != "";
  7709. });
  7710. }
  7711. }
  7712. }
  7713. this.inputShow = true;
  7714. if (cPan == 2) {
  7715. this.steps = old;
  7716. return;
  7717. }
  7718. this.goTo(
  7719. "/course?userid=" +
  7720. this.userid +
  7721. "&oid=" +
  7722. this.oid +
  7723. "&org=" +
  7724. this.org +
  7725. "&role=" +
  7726. this.role
  7727. );
  7728. }
  7729. },
  7730. courseName(newVal, oldVal) {
  7731. this.setCourseInfo();
  7732. },
  7733. courseTypeId: {
  7734. immediate: true,
  7735. deep: true,
  7736. handler(newValue, oldValue) {
  7737. this.setCourseInfo();
  7738. }
  7739. }
  7740. },
  7741. methods: {
  7742. tableRowClassName({ row, rowIndex }) {
  7743. if ((rowIndex + 1) % 2 === 0) {
  7744. return "even_row";
  7745. } else {
  7746. return "";
  7747. }
  7748. },
  7749. close() {
  7750. this.cetIndex = "";
  7751. this.cettIndex = "";
  7752. this.templateName = "";
  7753. this.cetBoxDialog = false;
  7754. },
  7755. openAI() {
  7756. top.postMessage({ tools: "64" }, "*");
  7757. },
  7758. setMan() {
  7759. // let teacherJuri = this.teacherJuri2;
  7760. this.ManAarray = [];
  7761. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7762. if (_user.indexOf(this.userid) == -1) {
  7763. _user.push(this.userid);
  7764. }
  7765. if (_user.indexOf(this.courseUserid) == -1) {
  7766. _user.push(this.courseUserid);
  7767. }
  7768. let params = [{
  7769. uid: _user.join(","),
  7770. }];
  7771. this.ajax
  7772. .post(this.$store.state.api + "getAllUserByIdP", params)
  7773. .then((res) => {
  7774. let teacherJuri = res.data[0];
  7775. this.ManAarray = teacherJuri;
  7776. })
  7777. .catch((err) => {
  7778. console.error(err);
  7779. });
  7780. },
  7781. previewImg(url) {
  7782. this.$hevueImgPreview(url);
  7783. },
  7784. btnDisplay(bool) {
  7785. this.isBtnDisplay = bool;
  7786. },
  7787. stepDisplay(bool) {
  7788. this.isStepDisplay = bool;
  7789. },
  7790. scrollChange() {
  7791. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  7792. },
  7793. addHw(e) {
  7794. var el = e.currentTarget;
  7795. el.getElementsByTagName("input")[0].click();
  7796. },
  7797. change(val) {
  7798. if (this.dialogVisible1) {
  7799. this.tdetail = val;
  7800. } else if (this.dialogVisible6) {
  7801. this.AttText.text = val;
  7802. } else if (this.dialogVisible2) {
  7803. this.cTemplate = val;
  7804. } else if (this.dialogVisibleTable) {
  7805. this.tableJson.text = val;
  7806. }
  7807. this.$forceUpdate();
  7808. console.log(val);
  7809. },
  7810. change2(val) {
  7811. console.log(val);
  7812. this.$forceUpdate();
  7813. },
  7814. handleClose(done) {
  7815. done();
  7816. },
  7817. closePan(tool) {
  7818. if (tool == 15) {
  7819. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  7820. this.dialogVisible8 = false;
  7821. } else {
  7822. this.closeConfirm(tool);
  7823. }
  7824. } else if (tool == 4) {
  7825. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  7826. this.dialogVisible5 = false;
  7827. } else {
  7828. this.closeConfirm(tool);
  7829. }
  7830. } else if (tool == 45) {
  7831. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  7832. this.dialogVisibleChoice = false;
  7833. } else {
  7834. this.closeConfirm(tool);
  7835. }
  7836. } else if (tool == 41) {
  7837. if (
  7838. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  7839. ) {
  7840. this.dialogVisibleSelect = false;
  7841. } else {
  7842. this.closeConfirm(tool);
  7843. }
  7844. } else if (tool == 47) {
  7845. if (
  7846. JSON.stringify(this.sentenceList) ==
  7847. JSON.stringify(this.sentenceList2)
  7848. ) {
  7849. this.dialogVisibleSentence = false;
  7850. } else {
  7851. this.closeConfirm(tool);
  7852. }
  7853. } else if (tool == 69) {
  7854. if (
  7855. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  7856. ) {
  7857. this.englishDialogVisible = false;
  7858. } else {
  7859. this.closeConfirm(tool);
  7860. }
  7861. }
  7862. },
  7863. closeConfirm(tool) {
  7864. this.$confirm("是否保存已编辑内容?", "提示", {
  7865. confirmButtonText: "保存",
  7866. cancelButtonText: "不保存",
  7867. type: "warning",
  7868. })
  7869. .then(() => {
  7870. if (tool == 15) {
  7871. this.addAnswer();
  7872. } else if (tool == 4) {
  7873. this.addAsk();
  7874. } else if (tool == 45) {
  7875. this.addTest();
  7876. } else if (tool == 41) {
  7877. this.addSelectAnswer();
  7878. } else if (tool == 47) {
  7879. this.addSentenceTool();
  7880. } else if (tool == 69) {
  7881. this.addEnglish();
  7882. }
  7883. })
  7884. .catch(() => {
  7885. if (tool == 15) {
  7886. this.dialogVisible8 = false;
  7887. } else if (tool == 4) {
  7888. this.dialogVisible5 = false;
  7889. } else if (tool == 45) {
  7890. this.dialogVisibleChoice = false;
  7891. } else if (tool == 41) {
  7892. this.dialogVisibleSelect = false;
  7893. } else if (tool == 47) {
  7894. this.dialogVisibleSentence = false;
  7895. } else if (tool == 69) {
  7896. this.englishDialogVisible = false;
  7897. }
  7898. });
  7899. },
  7900. addEnglish(jsonType) {
  7901. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  7902. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  7903. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  7904. if (
  7905. this.englishList.engTitle == "" ||
  7906. this.englishList.englishText == ""
  7907. ) {
  7908. this.$message.error("请将内容填写完整!");
  7909. return;
  7910. }
  7911. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  7912. this.taskCount
  7913. ].toolChoose[this.toolIndex].englishList = this.englishList;
  7914. this.englishList = {};
  7915. if (jsonType && jsonType == 1) {
  7916. this.englishDialogVisible = true;
  7917. } else {
  7918. this.englishDialogVisible = false;
  7919. }
  7920. if (
  7921. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  7922. .toolChoose[this.toolIndex].tool != 69
  7923. ) {
  7924. this.addTools(69, this.taskCount, this.toolIndex);
  7925. }
  7926. },
  7927. imgChange2(i, j) {
  7928. var _tmp = this.testJson.testJson[i].checkList[j];
  7929. this.noneBtnImg = _tmp.length >= 1;
  7930. },
  7931. imgChange3(i) {
  7932. var _tmp = this.testJson.testJson[i];
  7933. this.noneBtnImg = _tmp.length >= 1;
  7934. },
  7935. imgChange1(file, fileList, type, itemTaskIndex) {
  7936. if (type == 1) {
  7937. var _tmp = this.cover;
  7938. } else if (
  7939. type == 2 ||
  7940. type == 3 ||
  7941. type == 6 ||
  7942. type == 7 ||
  7943. type == 8
  7944. ) {
  7945. var _tmp =
  7946. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7947. .chapterData;
  7948. } else if (type == 4) {
  7949. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  7950. } else {
  7951. var _tmp =
  7952. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  7953. .homeworkList;
  7954. }
  7955. this.noneBtnImg = _tmp.length >= 1;
  7956. },
  7957. goTo(path) {
  7958. this.$router.push(path);
  7959. },
  7960. guid() {
  7961. var _num,
  7962. i,
  7963. _guid = "";
  7964. for (i = 0; i < 32; i++) {
  7965. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  7966. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  7967. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  7968. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  7969. _guid += "-";
  7970. }
  7971. }
  7972. return _guid;
  7973. },
  7974. retrunCourse() {
  7975. if(this.istemplate == 1){
  7976. this.goTo(
  7977. "/course?userid=" +
  7978. this.userid +
  7979. "&oid=" +
  7980. this.oid +
  7981. "&org=" +
  7982. this.org +
  7983. "&role=" +
  7984. this.role
  7985. );
  7986. return
  7987. }
  7988. this.$confirm("是否保存已编辑内容?", "提示", {
  7989. confirmButtonText: "保存",
  7990. cancelButtonText: "不保存",
  7991. distinguishCancelAndClose: true,
  7992. type: "warning",
  7993. })
  7994. .then(() => {
  7995. if (this.taskLoading.length) {
  7996. let _pan = 1
  7997. for(var k = 0; k < this.taskLoading.length; k++){
  7998. if(this.taskLoading[k]){
  7999. this.$message({
  8000. message: `请等待任务${k+1}回答完毕后再保存`,
  8001. type: "warning"
  8002. });
  8003. _pan = 2
  8004. }
  8005. }
  8006. if(_pan == 2){
  8007. return
  8008. }
  8009. }
  8010. if(this.taskGLoading.length){
  8011. let _pan = 1
  8012. for(var k = 0; k < this.taskGLoading.length; k++){
  8013. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  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.cid == "" || this.cid == undefined) {
  8026. if (this.courseName == "") {
  8027. this.$message.error("请补充填写课程名称");
  8028. return;
  8029. } else {
  8030. this.addWork();
  8031. }
  8032. this.steps = 4;
  8033. } else {
  8034. if (this.courseName == "") {
  8035. this.$message.error("请补充填写课程名称");
  8036. return;
  8037. } else {
  8038. if (this.userid != this.courseUserid && this.role != "1") {
  8039. this.updateWork2();
  8040. } else {
  8041. this.updateWork();
  8042. }
  8043. this.steps = 4;
  8044. }
  8045. }
  8046. })
  8047. .catch((v) => {
  8048. console.log(v);
  8049. if (v == "cancel") {
  8050. this.goTo(
  8051. "/course?userid=" +
  8052. this.userid +
  8053. "&oid=" +
  8054. this.oid +
  8055. "&org=" +
  8056. this.org +
  8057. "&role=" +
  8058. this.role
  8059. );
  8060. }
  8061. });
  8062. },
  8063. lastSteps() {
  8064. if (this.steps == 4) {
  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. } else {
  8076. // if (this.cidType == 0) {
  8077. // this.steps--;
  8078. // if (this.steps == 1) {
  8079. // setTimeout(() => {
  8080. // this.checkEva(this.checkId);
  8081. // setTimeout(() => {
  8082. // this.checkEva(this.checkId);
  8083. // }, 100);
  8084. // }, 100);
  8085. // }
  8086. // } else {
  8087. if (this.steps == 3) {
  8088. this.steps = 1;
  8089. setTimeout(() => {
  8090. this.checkEva(this.checkId);
  8091. setTimeout(() => {
  8092. this.checkEva(this.checkId);
  8093. }, 100);
  8094. }, 100);
  8095. }
  8096. // }
  8097. }
  8098. },
  8099. navSteps(s) {
  8100. if (this.courseName == "") {
  8101. this.$message.error("请补充填写课程名称");
  8102. return;
  8103. }
  8104. if (this.cidType == 0) {
  8105. if (this.steps == 1) {
  8106. if (this.cid == "" || this.cid == undefined) {
  8107. this.addWork();
  8108. } else {
  8109. if (this.userid != this.courseUserid && this.role != "1") {
  8110. this.updateWork2();
  8111. } else {
  8112. this.updateWork();
  8113. }
  8114. }
  8115. }
  8116. if (s == 1) {
  8117. this.steps = 1;
  8118. setTimeout(() => {
  8119. this.checkEva(this.checkId);
  8120. setTimeout(() => {
  8121. this.checkEva(this.checkId);
  8122. }, 100);
  8123. }, 100);
  8124. }
  8125. if (s == 2) {
  8126. this.steps = 2;
  8127. }
  8128. if (s == 3) {
  8129. this.cTemplate = this.templateC.content;
  8130. this.dialogVisible2 = false;
  8131. this.steps = 3;
  8132. this.isClickColor = 1;
  8133. this.unitJson[
  8134. this.unitIndex
  8135. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8136. this.$forceUpdate();
  8137. setTimeout(() => {
  8138. this.checkEva(this.checkId);
  8139. setTimeout(() => {
  8140. this.checkEva(this.checkId);
  8141. }, 100);
  8142. }, 1000);
  8143. }
  8144. } else {
  8145. if (this.steps == 1) {
  8146. if (this.cid == "" || this.cid == undefined) {
  8147. this.addWork();
  8148. } else {
  8149. if (this.userid != this.courseUserid && this.role != "1") {
  8150. this.updateWork2();
  8151. } else {
  8152. this.updateWork();
  8153. }
  8154. }
  8155. }
  8156. if (s == 1) {
  8157. this.steps = 1;
  8158. setTimeout(() => {
  8159. this.checkEva(this.checkId);
  8160. setTimeout(() => {
  8161. this.checkEva(this.checkId);
  8162. }, 100);
  8163. }, 100);
  8164. }
  8165. if (s == 3) {
  8166. this.cTemplate = this.templateC.content;
  8167. this.dialogVisible2 = false;
  8168. this.steps = 3;
  8169. this.isClickColor = 1;
  8170. this.unitJson[
  8171. this.unitIndex
  8172. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8173. this.$forceUpdate();
  8174. setTimeout(() => {
  8175. this.checkEva(this.checkId);
  8176. setTimeout(() => {
  8177. this.checkEva(this.checkId);
  8178. }, 100);
  8179. }, 1000);
  8180. }
  8181. }
  8182. this.$refs.stepBox.scrollTop = 0;
  8183. },
  8184. setTipsIndex(){
  8185. // 使用 setTimeout 确保对话框已经渲染完成
  8186. this.$nextTick(() => {
  8187. const dialog = document.querySelector('.custom-confirm-box');
  8188. if (dialog) {
  8189. const parent = dialog.parentElement;
  8190. if (parent) {
  8191. parent.style.zIndex = 9999999;
  8192. const adjacentElement = parent.nextElementSibling;
  8193. if (adjacentElement) {
  8194. adjacentElement.style.zIndex = 9999998;
  8195. }
  8196. }
  8197. }
  8198. });
  8199. },
  8200. nextSteps(clickType, ttype) {
  8201. if(!this.time()){
  8202. return
  8203. }
  8204. // if (this.cidType == 1) {
  8205. if (this.steps == 1) {
  8206. if (this.courseName != "") {
  8207. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  8208. // this.$message({
  8209. // message: "请回答完毕后再次发送",
  8210. // type: "warning"
  8211. // });
  8212. if(this.ttaskDetailLoading.length){
  8213. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8214. this.$message({
  8215. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8216. type: "warning"
  8217. });
  8218. }
  8219. if(this.cpotetLoading.cpote1){
  8220. this.$message({
  8221. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8222. type: "warning"
  8223. });
  8224. }
  8225. if(this.cpotetLoading.cpote2){
  8226. this.$message({
  8227. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8228. type: "warning"
  8229. });
  8230. }
  8231. if(this.cpotetLoading.cpote3){
  8232. this.$message({
  8233. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8234. type: "warning"
  8235. });
  8236. }
  8237. if(this.cpotetLoading.cpote4){
  8238. this.$message({
  8239. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8240. type: "warning"
  8241. });
  8242. }
  8243. return;
  8244. }
  8245. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8246. if(!this.courseText && !this.teacherCourseText){
  8247. this.$message.error("请生成简要描述后再生成大纲");
  8248. return;
  8249. }
  8250. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8251. this.openAiDialog(clickType, 'aiOutline2')
  8252. }else {
  8253. this.openAiDialog(clickType, 'aiOutline')
  8254. }
  8255. return;
  8256. }
  8257. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8258. let _type = ''
  8259. if(this.cpoteType == 0){
  8260. _type = 'aiCpote1'
  8261. }else if(this.cpoteType == 1){
  8262. _type = 'aiCpote2'
  8263. }else if(this.cpoteType == 2){
  8264. _type = 'aiCpote3'
  8265. }else if(this.cpoteType == 3){
  8266. _type = 'aiCpote4'
  8267. }
  8268. this.cpoteType++
  8269. this.openAiDialog(clickType, _type)
  8270. return;
  8271. }
  8272. // if (!this.isOutline2) {
  8273. // this.openAiDialog(clickType, 'aiTeacher')
  8274. // return;
  8275. // }
  8276. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8277. this.openAiDialog(clickType, 'aiTeacher3')
  8278. return;
  8279. }
  8280. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8281. this.openAiDialog(clickType, 'aiTeacher2')
  8282. return;
  8283. }
  8284. let _pan2 = 1
  8285. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8286. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8287. _pan2 = 2
  8288. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8289. break;
  8290. }
  8291. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8292. _pan2 = 2
  8293. this.$message.error(`请完善任务${k+1}的课程教案`)
  8294. break;
  8295. }
  8296. }
  8297. if(_pan2 == 2){
  8298. return;
  8299. }
  8300. const functionA = () => {
  8301. setTimeout(() => {
  8302. this.loading = false
  8303. this.steps = 3;
  8304. }, 0)
  8305. this.isClickColor = 1;
  8306. this.unitJson[
  8307. this.unitIndex
  8308. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8309. this.$forceUpdate();
  8310. setTimeout(() => {
  8311. this.checkEva(this.checkId);
  8312. setTimeout(() => {
  8313. this.checkEva(this.checkId);
  8314. }, 100);
  8315. }, 1000);
  8316. if (this.cid == "" || this.cid == undefined) {
  8317. this.addWork();
  8318. } else {
  8319. if (this.userid != this.courseUserid && this.role != "1") {
  8320. this.updateWork2();
  8321. } else {
  8322. this.updateWork();
  8323. }
  8324. }
  8325. }
  8326. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  8327. if(this.ttaskDetailLoading5.length){
  8328. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8329. // this.$message({
  8330. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8331. // type: "warning"
  8332. // });
  8333. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  8334. confirmButtonText: "确定",
  8335. cancelButtonText: "取消",
  8336. distinguishCancelAndClose: true,
  8337. type: "warning",
  8338. customClass: 'custom-confirm-box'
  8339. })
  8340. .then(() => {
  8341. if(this.isTeacherTaskCancelToken2){
  8342. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  8343. if(this.isTeacherTaskCancelToken2[i]){
  8344. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  8345. this.isTeacherTaskCancelToken2[i] = null;
  8346. }
  8347. }
  8348. }
  8349. this.taskDetailLoading5 = []
  8350. this.ttaskDetailLoading5 = []
  8351. if(this.isTeacherTaskCancelSource){
  8352. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  8353. if(this.isTeacherTaskCancelSource[i]){
  8354. this.isTeacherTaskCancelSource[i].close()
  8355. this.isTeacherTaskCancelSource[i] = null
  8356. }
  8357. }
  8358. }
  8359. if (this.cid) {
  8360. this.loading = true
  8361. functionA()
  8362. } else {
  8363. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8364. }
  8365. }).catch((v) => {
  8366. console.log(v);
  8367. })
  8368. setTimeout(() => {
  8369. this.setTipsIndex()
  8370. }, 500)
  8371. }
  8372. return;
  8373. }
  8374. if (this.cid && this.panTask() > 0) {
  8375. this.loading = true
  8376. functionA()
  8377. } else {
  8378. // if(ttype == 2){
  8379. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8380. // }else {
  8381. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  8382. // }
  8383. }
  8384. } else {
  8385. this.$message.error("请补充填写课程名称");
  8386. return;
  8387. }
  8388. } else if (this.steps == 3) {
  8389. if (this.taskLoading.length) {
  8390. let _pan = 1
  8391. for(var k = 0; k < this.taskLoading.length; k++){
  8392. if(this.taskLoading[k]){
  8393. this.$message({
  8394. message: `请等待任务${k+1}回答完毕后再上传`,
  8395. type: "warning"
  8396. });
  8397. _pan = 2
  8398. }
  8399. }
  8400. if(_pan == 2){
  8401. return
  8402. }
  8403. }
  8404. if(this.taskGLoading.length){
  8405. let _pan = 1
  8406. for(var k = 0; k < this.taskGLoading.length; k++){
  8407. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8408. this.$message({
  8409. message: `请等待任务${k+1}回答完毕后再保存`,
  8410. type: "warning"
  8411. });
  8412. _pan = 2
  8413. }
  8414. }
  8415. if(_pan == 2){
  8416. return
  8417. }
  8418. }
  8419. if (this.cid == "" || this.cid == undefined) {
  8420. if (this.courseName == "") {
  8421. this.$message.error("请补充填写课程名称");
  8422. return;
  8423. } else {
  8424. this.addWork();
  8425. this.steps++;
  8426. }
  8427. } else {
  8428. if (this.courseName == "") {
  8429. this.$message.error("请补充填写课程名称");
  8430. return;
  8431. } else {
  8432. if (this.userid != this.courseUserid && this.role != "1") {
  8433. this.updateWork2();
  8434. } else {
  8435. this.updateWork();
  8436. }
  8437. this.steps++;
  8438. }
  8439. }
  8440. }
  8441. // } else {
  8442. // if (this.steps == 1) {
  8443. // if (this.courseName != "") {
  8444. // if (this.cid == "" || this.cid == undefined) {
  8445. // this.addWork();
  8446. // } else {
  8447. // if (this.userid != this.courseUserid && this.role != "1") {
  8448. // // this.updateWork2();
  8449. // } else {
  8450. // this.updateWork();
  8451. // }
  8452. // }
  8453. // this.steps++;
  8454. // } else {
  8455. // this.$message.error("请补充填写课程名称");
  8456. // return;
  8457. // }
  8458. // } else if (this.steps == 2) {
  8459. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  8460. // this.cTemplate = this.templateC.content;
  8461. // }
  8462. // this.dialogVisible2 = false;
  8463. // this.steps++;
  8464. // setTimeout(() => {
  8465. // this.checkEva(this.checkId);
  8466. // setTimeout(() => {
  8467. // this.checkEva(this.checkId);
  8468. // }, 100);
  8469. // }, 1000);
  8470. // } else if (this.steps == 3) {
  8471. // if (this.cid == "" || this.cid == undefined) {
  8472. // if (this.courseName == "") {
  8473. // this.$message.error("请补充填写课程名称");
  8474. // return;
  8475. // } else {
  8476. // this.addWork();
  8477. // this.steps++;
  8478. // }
  8479. // } else {
  8480. // if (this.courseName == "") {
  8481. // this.$message.error("请补充填写课程名称");
  8482. // return;
  8483. // } else {
  8484. // if (this.userid != this.courseUserid && this.role != "1") {
  8485. // this.updateWork2();
  8486. // } else {
  8487. // this.updateWork();
  8488. // }
  8489. // this.steps++;
  8490. // }
  8491. // }
  8492. // }
  8493. // }
  8494. this.$refs.stepBox.scrollTop = 0;
  8495. },
  8496. unitSet(i) {
  8497. if (this.unitIndex == i) {
  8498. return;
  8499. }
  8500. this.unitIndex = i;
  8501. this.isClickColor = 1;
  8502. // this.$refs.rightboxR.scrollTop = 0;
  8503. this.$refs.unitBox.scrollTop = 0;
  8504. },
  8505. panUnitJson() {
  8506. let _unitIndex = this.unitIndex;
  8507. let cPan = 1;
  8508. for (
  8509. var j = 0;
  8510. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8511. j++
  8512. ) {
  8513. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8514. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8515. j
  8516. ].proVisible2 = false;
  8517. if (
  8518. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8519. .length > 1
  8520. ) {
  8521. for (
  8522. var z = 0;
  8523. z <
  8524. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8525. .length;
  8526. z++
  8527. ) {
  8528. if (
  8529. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8530. z
  8531. ].tool.length
  8532. ) {
  8533. this.$message.error("请把工具添加完整");
  8534. cPan = 2;
  8535. break;
  8536. }
  8537. }
  8538. }
  8539. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8540. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8541. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8542. (ele) => {
  8543. return ele.value != "" || ele.detail != "" || ele.target != "";
  8544. }
  8545. );
  8546. }
  8547. }
  8548. return cPan;
  8549. },
  8550. unitOpen(i) {
  8551. if (this.unitJson[i].toolOpen) {
  8552. this.unitJson[i].toolOpen = false;
  8553. } else {
  8554. this.unitJson[i].toolOpen = true;
  8555. }
  8556. this.updateWork();
  8557. this.$forceUpdate();
  8558. },
  8559. unitSet2(i) {
  8560. if (this.panUnitJson() == 2) {
  8561. return;
  8562. }
  8563. // if(this.unitJson[i].toolOpen){
  8564. // this.unitJson[i].toolOpen = false
  8565. // this.updateWork()
  8566. // this.$forceUpdate()
  8567. // return
  8568. // }else {
  8569. this.unitJson[i].toolOpen = true;
  8570. // }
  8571. this.$forceUpdate();
  8572. if (this.unitIndex == i) {
  8573. return;
  8574. }
  8575. this.unitIndex = i;
  8576. this.isClickColor = 1;
  8577. // this.$refs.rightboxR.scrollTop = 0;
  8578. this.$refs.unitBox.scrollTop = 0;
  8579. },
  8580. updateCourseState(i) {
  8581. let params = [
  8582. {
  8583. cid: this.cid,
  8584. state: i,
  8585. },
  8586. ];
  8587. this.ajax
  8588. .post(this.$store.state.api + "updateCourseMode", params)
  8589. .then((res) => {
  8590. this.courseState = i;
  8591. })
  8592. .catch((err) => {
  8593. this.$message.error("网络不佳");
  8594. console.error(err);
  8595. });
  8596. },
  8597. addtips(){
  8598. let params = [
  8599. {
  8600. cid: this.cid,
  8601. tips: JSON.stringify(this.aiJson),
  8602. tid: this.templateid
  8603. },
  8604. ];
  8605. this.ajax
  8606. .post(this.$store.state.api + "addTips", params)
  8607. .then((res) => {
  8608. })
  8609. .catch((err) => {
  8610. this.$message.error("网络不佳");
  8611. console.error(err);
  8612. });
  8613. },
  8614. openSaveTips(){
  8615. this.dialogVisibleTips = true
  8616. },
  8617. time() {
  8618. if (!this.now) {
  8619. this.now = new Date().getTime();
  8620. return true;
  8621. } else {
  8622. let time = new Date().getTime();
  8623. if (time - this.now > 1000) {
  8624. this.now = time;
  8625. return true;
  8626. } else {
  8627. return false;
  8628. }
  8629. }
  8630. },
  8631. deleteUnit(i) {
  8632. var _this = this;
  8633. if (i == 0 && _this.unitJson.length == 1) {
  8634. _this
  8635. .$confirm("确定切换成任务模式吗?", "提示", {
  8636. confirmButtonText: "确定",
  8637. cancelButtonText: "取消",
  8638. type: "warning",
  8639. })
  8640. .then(() => {
  8641. _this.unitJson[i].dyName = "";
  8642. // _this.updateCourseState(2);
  8643. })
  8644. .catch(() => {
  8645. return;
  8646. });
  8647. } else {
  8648. _this
  8649. .$confirm("确定删除此阶段吗?", "提示", {
  8650. confirmButtonText: "确定",
  8651. cancelButtonText: "取消",
  8652. type: "warning",
  8653. })
  8654. .then(() => {
  8655. _this.isDelete = 2;
  8656. // _this.unitIndex = _this.unitIndex - 1;
  8657. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  8658. // _this.$message.success("删除成功");
  8659. })
  8660. .catch(() => {
  8661. return;
  8662. });
  8663. }
  8664. },
  8665. deleteWork(chapid) {
  8666. let params = [
  8667. {
  8668. cid: this.cid,
  8669. chapters: JSON.stringify(this.unitJson),
  8670. uid: this.userid,
  8671. chapid: chapid,
  8672. },
  8673. ];
  8674. this.ajax
  8675. .post(this.$store.state.api + "deleteWork", params)
  8676. .then((res) => {
  8677. this.$message({
  8678. message: "删除成功",
  8679. type: "success",
  8680. });
  8681. let task = JSON.parse(
  8682. JSON.stringify(
  8683. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  8684. )
  8685. );
  8686. this.unitJson.splice(this.unitIndex, 1);
  8687. if (this.unitIndex == 0) {
  8688. this.unitIndex = 0;
  8689. } else {
  8690. this.unitIndex = this.unitIndex - 1;
  8691. }
  8692. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8693. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8694. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  8695. ...task,
  8696. ];
  8697. }
  8698. })
  8699. .catch((err) => {
  8700. this.$message.error("网络不佳");
  8701. console.error(err);
  8702. });
  8703. },
  8704. deleteTool(itemTaskIndex, i) {
  8705. var _this = this;
  8706. if (_this.time()) {
  8707. _this
  8708. .$confirm("确定删除此工具吗?", "提示", {
  8709. confirmButtonText: "确定",
  8710. cancelButtonText: "取消",
  8711. type: "warning",
  8712. })
  8713. .then(() => {
  8714. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8715. itemTaskIndex
  8716. ].toolChoose.splice(i, 1);
  8717. _this.$message.success("删除成功");
  8718. })
  8719. .catch(() => {
  8720. return;
  8721. });
  8722. }
  8723. },
  8724. deleteSentence(i) {
  8725. var _this = this;
  8726. _this
  8727. .$confirm("确定删除此题目吗?", "提示", {
  8728. confirmButtonText: "确定",
  8729. cancelButtonText: "取消",
  8730. type: "warning",
  8731. })
  8732. .then(() => {
  8733. _this.sentenceList.splice(i, 1);
  8734. _this.$message.success("删除成功");
  8735. })
  8736. .catch(() => {
  8737. return;
  8738. });
  8739. },
  8740. deleteS(s, i, j) {
  8741. this.sentenceList[i].addSentence.splice(j, 1);
  8742. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  8743. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  8744. this.sentenceList[i].rightAnswer.splice(a, 1);
  8745. }
  8746. },
  8747. openT() {
  8748. top.postMessage({ tools: "25" }, "*");
  8749. },
  8750. deleteTask(i) {
  8751. var _this = this;
  8752. if (_this.time()) {
  8753. _this
  8754. .$confirm(
  8755. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  8756. 1 ==
  8757. i
  8758. ? "确定删除此任务吗?"
  8759. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  8760. "提示",
  8761. {
  8762. confirmButtonText: "确定",
  8763. cancelButtonText: "取消",
  8764. type: "warning",
  8765. }
  8766. )
  8767. .then(() => {
  8768. if (i == 0 && _this.courseState == 4) {
  8769. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8770. i + 1
  8771. ].chapterData = JSON.parse(
  8772. JSON.stringify(
  8773. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8774. .chapterData
  8775. )
  8776. );
  8777. }
  8778. _this.$forceUpdate();
  8779. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8780. i,
  8781. 1
  8782. );
  8783. _this.$message.success("删除成功");
  8784. })
  8785. .catch(() => {
  8786. return;
  8787. });
  8788. }
  8789. },
  8790. deleteTask2(i) {
  8791. var _this = this;
  8792. if (_this.time()) {
  8793. _this
  8794. .$confirm(
  8795. "确定删除此任务吗?",
  8796. "提示",
  8797. {
  8798. confirmButtonText: "确定",
  8799. cancelButtonText: "取消",
  8800. type: "warning",
  8801. }
  8802. )
  8803. .then(() => {
  8804. if (i == 0 && _this.courseState == 4) {
  8805. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8806. i + 1
  8807. ].chapterData = JSON.parse(
  8808. JSON.stringify(
  8809. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8810. .chapterData
  8811. )
  8812. );
  8813. }
  8814. _this.$forceUpdate();
  8815. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8816. i,
  8817. 1
  8818. );
  8819. _this.$message.success("删除成功");
  8820. })
  8821. .catch(() => {
  8822. return;
  8823. });
  8824. }
  8825. },
  8826. handlePictureCardPreview(file) {
  8827. this.dialogImageUrl = file.url;
  8828. },
  8829. clean(i, c) {
  8830. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  8831. },
  8832. handle_remove1(file, fileList, type) {
  8833. var _tmp = this.cover;
  8834. // for (var i = 0, len = _tmp.length; i < len; i++) {
  8835. // if (_tmp[i].uid == file.uid) {
  8836. // _tmp.splice(i, 1);
  8837. // break;
  8838. // }
  8839. // this.cover = _tmp;
  8840. // }
  8841. this.cover = [];
  8842. this.noneBtnImg = this.cover.length >= 1;
  8843. this.isSysPic = false;
  8844. this.isSysPic2 = false;
  8845. this.$forceUpdate();
  8846. },
  8847. addImg(e) {
  8848. var el = e.currentTarget;
  8849. el.getElementsByTagName("input")[0].click();
  8850. e.target.value = "";
  8851. },
  8852. addChaptersTools(i) {
  8853. this.chapTools = [
  8854. {
  8855. tools: [],
  8856. toolDetail: "",
  8857. },
  8858. ];
  8859. this.chapCount = i;
  8860. this.dialogVisible4 = true;
  8861. },
  8862. isNoFinsh() {
  8863. this.$message.warning("功能正在开发中");
  8864. },
  8865. addAttText(i) {
  8866. this.AttText = {
  8867. title: "",
  8868. text: "",
  8869. };
  8870. this.taskCount = i;
  8871. this.AttTextType = 0;
  8872. this.$forceUpdate();
  8873. this.dialogVisible6 = true;
  8874. setTimeout(() => {
  8875. this.$refs["fuInput"].focus();
  8876. }, 100);
  8877. },
  8878. openLine(i) {
  8879. this.line = "";
  8880. this.lineCount = i;
  8881. this.lineType = 0;
  8882. this.$forceUpdate();
  8883. this.dialogVisible7 = true;
  8884. },
  8885. pasteLine(i) {
  8886. navigator.clipboard
  8887. .readText()
  8888. .then((v) => {
  8889. console.log("获取剪贴板成功:", v);
  8890. const html = v;
  8891. const regex = /src="(.*?)"/g;
  8892. const match = regex.exec(html);
  8893. if (match && match[1]) {
  8894. console.log(match[1]);
  8895. this.$message.success("粘贴成功");
  8896. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8897. i
  8898. ].chapterData.unshift({
  8899. name: "链接",
  8900. title: "嵌入代码",
  8901. url: match[1],
  8902. type: 8,
  8903. });
  8904. } else {
  8905. // console.log("未找到包含 src 属性的 iframe");
  8906. this.$message.error(
  8907. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  8908. );
  8909. }
  8910. })
  8911. .catch((v) => {
  8912. console.log("获取剪贴板失败: ", v);
  8913. });
  8914. },
  8915. openSource(i) {
  8916. this.lineCount = i;
  8917. this.sourceData = {};
  8918. this.dialogVisibleSource = true;
  8919. this.updateSourcePan = false;
  8920. },
  8921. openAiCreate(i){
  8922. this.lineCount = i;
  8923. this.dialogVisibleAiCreate = true;
  8924. },
  8925. createAiPpt(json){
  8926. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8927. this.dialogVisibleAiCreate = false;
  8928. },
  8929. openAiCreateVideo(i){
  8930. this.lineCount = i;
  8931. this.dialogVisibleAiCreateVideo = true;
  8932. },
  8933. createAiVideo(json){
  8934. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  8935. // this.dialogVisibleAiCreateVideo = false;
  8936. },
  8937. async createTeacherAn(index){
  8938. // this.lineCount = index;
  8939. this.loading = true
  8940. let md = new MarkdownIt();
  8941. if(this.courseState == 4){
  8942. // if(index == 0 || index){
  8943. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8944. // let name = _task.task+'-教案'
  8945. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8946. // await this.generate(name, _html, 0)
  8947. // }else {
  8948. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8949. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8950. let name = _task.task+'-教案'
  8951. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8952. await this.generate(name, _html, 0)
  8953. }
  8954. // }
  8955. }else if(this.courseState == 5){
  8956. if(index == 0 || index){
  8957. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  8958. let name = _task.task+'-教案'
  8959. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8960. await this.generate(name, _html, index)
  8961. }else {
  8962. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  8963. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  8964. let name = _task.task+'-教案'
  8965. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  8966. await this.generate(name, _html, i)
  8967. }
  8968. }
  8969. }
  8970. },
  8971. async createTaskAn(index){
  8972. // this.lineCount = index;
  8973. if(this.taskAnLoading[index]){
  8974. this.$message.error('请等待当前学历案生成完成')
  8975. return
  8976. }
  8977. this.taskAnLoading[index] = true
  8978. this.$forceUpdate()
  8979. let _this = this
  8980. let md = new MarkdownIt();
  8981. let messages = ""
  8982. messages = `NOTICE
  8983. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  8984. Language: ${this.getLang()}
  8985. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  8986. ## 任务教案
  8987. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  8988. let parm = {
  8989. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  8990. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  8991. session_name: uuidv4(),
  8992. userId: this.userid,
  8993. file_ids: [],
  8994. model: 'gpt-4o-2024-08-06',
  8995. temperature: this.mode == 3 ? 0.5 : 0.1,
  8996. }
  8997. this.ajax
  8998. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  8999. .then(async (response) => {
  9000. console.log(response);
  9001. let data = response.data.FunctionResponse
  9002. if (data.message) {
  9003. console.log(data.message);
  9004. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  9005. let name = _task.task+'-学历案'
  9006. let _html = md.render(data.message)
  9007. await _this.generate(name, _html, index, ()=>{
  9008. _this.taskAnLoading[index] = false
  9009. })
  9010. }else{
  9011. _this.taskAnLoading[index] = false
  9012. }
  9013. }).catch((error) => {
  9014. console.log(error);
  9015. _this.taskAnLoading[index] = false
  9016. });
  9017. },
  9018. async generate(a, html, index, callback) {
  9019. // <html lang="en">
  9020. // 将html文件中需要用到的数据挂载到store上
  9021. const content = `<!DOCTYPE html>
  9022. <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'>
  9023. <head>
  9024. <!--[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]-->
  9025. <meta charset="UTF-8">
  9026. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9027. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9028. <title>${a}</title>
  9029. <style>
  9030. table {
  9031. border-collapse: collapse; /* 折叠边框 */
  9032. width: 100%;
  9033. }
  9034. th, td {
  9035. border: 1px solid black; /* 线条样式 */
  9036. padding: 8px;
  9037. text-align: left;
  9038. }
  9039. </style>
  9040. </head>
  9041. <body>
  9042. ${html}
  9043. </body>
  9044. </html>`;
  9045. // debugger
  9046. const blob = htmlDocx.asBlob(content)
  9047. // debugger
  9048. let dname = a + ".docx";
  9049. // 创建文件流
  9050. // 创建bolb实例时,内容一定要放在[]中
  9051. // const blob = new Blob([content], {
  9052. // type: "text/plain;charset='utf-8'",
  9053. // });
  9054. // const file = new File([blob], dname, { type: 'application/msword' });
  9055. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9056. await this.beforeUploadHtml(file, index, callback)
  9057. },
  9058. async generateExport(a, html, index) {
  9059. // <html lang="en">
  9060. // 将html文件中需要用到的数据挂载到store上
  9061. const content = `<!DOCTYPE html>
  9062. <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'>
  9063. <head>
  9064. <!--[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]-->
  9065. <meta charset="UTF-8">
  9066. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9067. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9068. <title>${a}</title>
  9069. <style>
  9070. table {
  9071. border-collapse: collapse; /* 折叠边框 */
  9072. width: 100%;
  9073. }
  9074. th, td {
  9075. border: 1px solid black; /* 线条样式 */
  9076. padding: 8px;
  9077. text-align: left;
  9078. }
  9079. </style>
  9080. </head>
  9081. <body>
  9082. ${html}
  9083. </body>
  9084. </html>`;
  9085. // debugger
  9086. const blob = htmlDocx.asBlob(content)
  9087. // debugger
  9088. const dname = `${a}.docx`;
  9089. // 创建文件流
  9090. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9091. return file
  9092. },
  9093. beforeUploadHtml(event, index, callback) {
  9094. var file = event;
  9095. var credentials = {
  9096. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9097. secretAccessKey: "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",
  9098. }; //秘钥形式的登录上传
  9099. window.AWS.config.update(credentials);
  9100. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9101. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9102. var _this = this;
  9103. if (file) {
  9104. var params = {
  9105. Key:
  9106. file.name.split(".")[0] +
  9107. new Date().getTime() +
  9108. "." +
  9109. file.name.split(".")[file.name.split(".").length - 1],
  9110. ContentType: file.type,
  9111. Body: file,
  9112. "Access-Control-Allow-Credentials": "*",
  9113. ACL: "public-read",
  9114. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9115. var options = {
  9116. partSize: 2048 * 1024 * 1024,
  9117. queueSize: 2,
  9118. leavePartsOnError: true,
  9119. };
  9120. bucket
  9121. .upload(params, options)
  9122. .on("httpUploadProgress", function (evt) {
  9123. //这里可以写进度条
  9124. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9125. })
  9126. .send(function (err, data) {
  9127. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  9128. _this.loading = false
  9129. }
  9130. if(_this.courseState == 5){
  9131. _this.loading = false
  9132. }
  9133. callback ? callback() : ''
  9134. if (err) {
  9135. _this.$message.error("上传失败");
  9136. } else {
  9137. let _index = 0
  9138. // if(_this.lineCount == 0 || _this.lineCount){
  9139. // _index = _this.lineCount
  9140. // }else {
  9141. _index = index
  9142. // }
  9143. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  9144.                   name: file.name,
  9145.                   url: data.Location,
  9146.                   type: 3,
  9147.                 })
  9148. console.log(data.Location);
  9149. }
  9150. });
  9151. }
  9152. },
  9153. async generate2(a, html, index, callback) {
  9154. // 将html文件中需要用到的数据挂载到store上
  9155. const content = `<!DOCTYPE html>
  9156. <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'>
  9157. <head>
  9158. <!--[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]-->
  9159. <meta charset="UTF-8">
  9160. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9161. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9162. <title>${a}</title>
  9163. <style>
  9164. table {
  9165. border-collapse: collapse; /* 折叠边框 */
  9166. width: 100%;
  9167. }
  9168. th, td {
  9169. border: 1px solid black; /* 线条样式 */
  9170. padding: 8px;
  9171. text-align: left;
  9172. }
  9173. </style>
  9174. </head>
  9175. <body>
  9176. ${html}
  9177. </body>
  9178. </html>`;
  9179. const blob = htmlDocx.asBlob(content)
  9180. // debugger
  9181. let dname = a + ".docx";
  9182. // 创建文件流
  9183. // 创建bolb实例时,内容一定要放在[]中
  9184. // const blob = new Blob([content], {
  9185. // type: "text/plain;charset='utf-8'",
  9186. // });
  9187. // const file = new File([blob], dname, { type: 'application/msword' });
  9188. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9189. await this.beforeUploadHtml2(file, index, callback)
  9190. },
  9191. beforeUploadHtml2(event, index, callback) {
  9192. var file = event;
  9193. var credentials = {
  9194. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9195. secretAccessKey: "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",
  9196. }; //秘钥形式的登录上传
  9197. window.AWS.config.update(credentials);
  9198. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9199. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9200. var _this = this;
  9201. if (file) {
  9202. var params = {
  9203. Key:
  9204. file.name.split(".")[0] +
  9205. new Date().getTime() +
  9206. "." +
  9207. file.name.split(".")[file.name.split(".").length - 1],
  9208. ContentType: file.type,
  9209. Body: file,
  9210. "Access-Control-Allow-Credentials": "*",
  9211. ACL: "public-read",
  9212. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9213. var options = {
  9214. partSize: 2048 * 1024 * 1024,
  9215. queueSize: 2,
  9216. leavePartsOnError: true,
  9217. };
  9218. bucket
  9219. .upload(params, options)
  9220. .on("httpUploadProgress", function (evt) {
  9221. //这里可以写进度条
  9222. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9223. })
  9224. .send(async function (err, data) {
  9225. if(_this.courseState == 5){
  9226. _this.loading = false
  9227. }
  9228. if (err) {
  9229. callback ? callback() : ''
  9230. _this.$message.error("上传失败");
  9231. } else {
  9232. let fileid = await _this.createFileid(data.Location)
  9233. // _this.cankaoInfoData.push({
  9234. //                   name: file.name,
  9235. //                   url: data.Location,
  9236. //                   type: 3,
  9237. // fileid: fileid,
  9238. //   })
  9239. _this.infoData2.push({
  9240.                   name: file.name,
  9241.                   url: data.Location,
  9242.                   type: 3,
  9243. fileid: fileid == 1 ? '' : fileid,
  9244.   })
  9245. _this.infoData.push({
  9246. name: file.name,
  9247. url: data.Location,
  9248. type: 3,
  9249. fileid: fileid == 1 ? '' : fileid,
  9250. });
  9251. console.log(data.Location);
  9252. callback ? callback() : ''
  9253. }
  9254. });
  9255. }
  9256. },
  9257. addSource() {
  9258. if (!Object.keys(this.sourceData).length) {
  9259. this.$message.error("请选择要上传的资源");
  9260. return;
  9261. }
  9262. let keys = Object.keys(this.sourceData);
  9263. for (var i = 0; i < keys.length; i++) {
  9264. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9265. this.lineCount
  9266. ].chapterData.unshift({
  9267. name: "链接",
  9268. title: this.sourceData[keys[i]].name,
  9269. url: this.sourceData[keys[i]].url,
  9270. type: 14,
  9271. id: keys[i],
  9272. });
  9273. }
  9274. this.$forceUpdate();
  9275. this.dialogVisibleSource = false;
  9276. },
  9277. updateSource() {
  9278. if (!Object.keys(this.sourceData).length) {
  9279. this.$message.error("请选择要上传的资源");
  9280. return;
  9281. }
  9282. let keys = Object.keys(this.sourceData);
  9283. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9284. this.taskCount
  9285. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  9286. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9287. this.taskCount
  9288. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  9289. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9290. this.taskCount
  9291. ].chapterData[this.lineCount].id = keys[0];
  9292. this.updateSourcePan = false;
  9293. this.$forceUpdate();
  9294. this.dialogVisibleSource = false;
  9295. },
  9296. deleteM(i, j) {
  9297. this.testJson.testJson[i].timuList.splice(j, 1);
  9298. },
  9299. beforeUploadTiMu(event, i) {
  9300. const loading = this.openLoading();
  9301. var file = event.target.files[0];
  9302. var credentials = {
  9303. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9304. secretAccessKey: "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",
  9305. }; //秘钥形式的登录上传
  9306. window.AWS.config.update(credentials);
  9307. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9308. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9309. var _this = this;
  9310. if (file) {
  9311. var params = {
  9312. Key:
  9313. file.name.split(".")[0] +
  9314. new Date().getTime() +
  9315. "." +
  9316. file.name.split(".")[file.name.split(".").length - 1],
  9317. ContentType: file.type,
  9318. Body: file,
  9319. "Access-Control-Allow-Credentials": "*",
  9320. ACL: "public-read",
  9321. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9322. var options = {
  9323. partSize: 2048 * 1024 * 1024,
  9324. queueSize: 2,
  9325. leavePartsOnError: true,
  9326. };
  9327. bucket
  9328. .upload(params, options)
  9329. .on("httpUploadProgress", function (evt) {
  9330. //这里可以写进度条
  9331. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9332. })
  9333. .send(function (err, data) {
  9334. loading.close();
  9335. if (err) {
  9336. _this.$message.error("上传失败");
  9337. } else {
  9338. if (_this.testJson.testJson[i].timuList) {
  9339. _this.testJson.testJson[i].timuList.push({
  9340. src: data.Location,
  9341. });
  9342. } else {
  9343. _this.testJson.testJson[i].timuList = [];
  9344. _this.testJson.testJson[i].timuList.push({
  9345. src: data.Location,
  9346. });
  9347. }
  9348. _this.imgChange3(i);
  9349. _this.$forceUpdate();
  9350. }
  9351. });
  9352. }
  9353. },
  9354. beforeUploadTi(event, i, j) {
  9355. const loading = this.openLoading();
  9356. var file = event.target.files[0];
  9357. var credentials = {
  9358. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9359. secretAccessKey: "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",
  9360. }; //秘钥形式的登录上传
  9361. window.AWS.config.update(credentials);
  9362. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9363. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9364. var _this = this;
  9365. if (file) {
  9366. var params = {
  9367. Key:
  9368. file.name.split(".")[0] +
  9369. new Date().getTime() +
  9370. "." +
  9371. file.name.split(".")[file.name.split(".").length - 1],
  9372. ContentType: file.type,
  9373. Body: file,
  9374. "Access-Control-Allow-Credentials": "*",
  9375. ACL: "public-read",
  9376. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9377. var options = {
  9378. partSize: 2048 * 1024 * 1024,
  9379. queueSize: 2,
  9380. leavePartsOnError: true,
  9381. };
  9382. bucket
  9383. .upload(params, options)
  9384. .on("httpUploadProgress", function (evt) {
  9385. //这里可以写进度条
  9386. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9387. })
  9388. .send(function (err, data) {
  9389. loading.close();
  9390. if (err) {
  9391. _this.$message.error("上传失败");
  9392. } else {
  9393. _this.testJson.testJson[i].checkList[j] = {};
  9394. _this.testJson.testJson[i].checkList[j].src = data.Location;
  9395. _this.testJson.testJson[i].checkList[j].imgType = 1;
  9396. _this.imgChange2(i, j);
  9397. _this.$forceUpdate();
  9398. }
  9399. });
  9400. }
  9401. },
  9402. beforeUpload1(event, type) {
  9403. // const loading = this.openLoading();
  9404. var file = event.target.files[0];
  9405. var credentials = {
  9406. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9407. secretAccessKey: "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",
  9408. }; //秘钥形式的登录上传
  9409. window.AWS.config.update(credentials);
  9410. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9411. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9412. var _this = this;
  9413. if (file) {
  9414. var params = {
  9415. Key:
  9416. file.name.split(".")[0] +
  9417. new Date().getTime() +
  9418. "." +
  9419. file.name.split(".")[file.name.split(".").length - 1],
  9420. ContentType: file.type,
  9421. Body: file,
  9422. "Access-Control-Allow-Credentials": "*",
  9423. ACL: "public-read",
  9424. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9425. var options = {
  9426. partSize: 2048 * 1024 * 1024,
  9427. queueSize: 2,
  9428. leavePartsOnError: true,
  9429. };
  9430. bucket
  9431. .upload(params, options)
  9432. .on("httpUploadProgress", function (evt) {
  9433. //这里可以写进度条
  9434. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9435. })
  9436. .send(function (err, data) {
  9437. // loading.close();
  9438. if (err) {
  9439. // var a = _this.$refs.upload1.uploadFiles;
  9440. // a.splice(a.length - 1, a.length);
  9441. _this.$message.error("上传失败");
  9442. } else {
  9443. // _this.cover.push({
  9444. // name: file.name,
  9445. // url: data.Location,
  9446. // uid: file.uid,
  9447. // });
  9448. _this.cover = [
  9449. {
  9450. name: file.name,
  9451. url: data.Location,
  9452. uid: file.uid,
  9453. },
  9454. ];
  9455. _this.imgChange1(null, null, 1, null);
  9456. _this.choosePicVisible = false;
  9457. console.log(data.Location);
  9458. }
  9459. });
  9460. }
  9461. },
  9462. beforeUploadSelect(event, type) {
  9463. // const loading = this.openLoading();
  9464. var file = event.target.files[0];
  9465. var credentials = {
  9466. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9467. secretAccessKey: "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",
  9468. }; //秘钥形式的登录上传
  9469. window.AWS.config.update(credentials);
  9470. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9471. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9472. var _this = this;
  9473. if (file) {
  9474. var params = {
  9475. Key:
  9476. file.name.split(".")[0] +
  9477. new Date().getTime() +
  9478. "." +
  9479. file.name.split(".")[file.name.split(".").length - 1],
  9480. ContentType: file.type,
  9481. Body: file,
  9482. "Access-Control-Allow-Credentials": "*",
  9483. ACL: "public-read",
  9484. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9485. var options = {
  9486. partSize: 2048 * 1024 * 1024,
  9487. queueSize: 2,
  9488. leavePartsOnError: true,
  9489. };
  9490. bucket
  9491. .upload(params, options)
  9492. .on("httpUploadProgress", function (evt) {
  9493. //这里可以写进度条
  9494. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9495. })
  9496. .send(function (err, data) {
  9497. // loading.close();
  9498. if (err) {
  9499. _this.$message.error("上传失败");
  9500. } else {
  9501. _this.selectJson.url = data.Location;
  9502. console.log(data.Location);
  9503. }
  9504. });
  9505. }
  9506. },
  9507. chooseSysPic(p) {
  9508. this.cover = [];
  9509. setTimeout(() => {
  9510. this.cover[0] = {
  9511. name: "系统图片.png",
  9512. url: p,
  9513. };
  9514. this.imgChange1(null, null, 1, null);
  9515. this.$forceUpdate();
  9516. }, 0);
  9517. this.isSysPic = true;
  9518. this.isSysPic2 = false;
  9519. this.sysPicVisible = false;
  9520. this.$forceUpdate();
  9521. },
  9522. chooseSysPic2(p) {
  9523. this.cover = [];
  9524. setTimeout(() => {
  9525. this.cover[0] = {
  9526. name: "网络图片.png",
  9527. url: p,
  9528. };
  9529. this.imgChange1(null, null, 1, null);
  9530. this.$forceUpdate();
  9531. }, 0);
  9532. this.isSysPic2 = true;
  9533. this.isSysPic = false;
  9534. this.sysPicVisible2 = false;
  9535. this.$forceUpdate();
  9536. },
  9537. beforeUpload(data) {
  9538. this.$refs.upload1.uploadFiles;
  9539. this.uploadLoading1 = true;
  9540. var file = data.file;
  9541. var credentials = {
  9542. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9543. secretAccessKey: "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",
  9544. }; //秘钥形式的登录上传
  9545. window.AWS.config.update(credentials);
  9546. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9547. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9548. var _this = this;
  9549. if (file) {
  9550. var params = {
  9551. Key:
  9552. file.name.split(".")[0] +
  9553. new Date().getTime() +
  9554. "." +
  9555. file.name.split(".")[file.name.split(".").length - 1],
  9556. ContentType: file.type,
  9557. Body: file,
  9558. "Access-Control-Allow-Credentials": "*",
  9559. ACL: "public-read",
  9560. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9561. var options = {
  9562. partSize: 2048 * 1024 * 1024,
  9563. queueSize: 2,
  9564. leavePartsOnError: true,
  9565. };
  9566. bucket
  9567. .upload(params, options)
  9568. .on("httpUploadProgress", function (evt) {
  9569. //这里可以写进度条
  9570. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9571. })
  9572. .send(function (err, data) {
  9573. _this.uploadLoading1 = false;
  9574. if (err) {
  9575. // var a = _this.$refs.upload1.uploadFiles;
  9576. // a.splice(a.length - 1, a.length);
  9577. _this.$message.error("上传失败");
  9578. } else {
  9579. //上传成功处理
  9580. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  9581. name: file.name,
  9582. url: data.Location,
  9583. uid: file.uid,
  9584. });
  9585. _this.imgChange();
  9586. console.log(data.Location);
  9587. }
  9588. });
  9589. }
  9590. },
  9591. onExceed() {
  9592. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  9593. },
  9594. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  9595. let file = "";
  9596. let cfindex2 = 0;
  9597. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9598. // var file = event.target.files[0];
  9599. file = event.target.files[cfindex];
  9600. let fileName = file.name
  9601. let fileUid = file.uid
  9602. // const loading = this.openLoading();
  9603. // var file = event.target.files[0];
  9604. var credentials = {
  9605. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9606. secretAccessKey: "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",
  9607. }; //秘钥形式的登录上传
  9608. window.AWS.config.update(credentials);
  9609. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9610. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9611. var _this = this;
  9612. if (type == 3) {
  9613. var b = [
  9614. "DOC",
  9615. "DOCX",
  9616. "DOCM",
  9617. "DOTM",
  9618. "DOTX",
  9619. "PPTX",
  9620. "PPSX",
  9621. "PPT",
  9622. "PPS",
  9623. "PPTM",
  9624. "POTM",
  9625. "PPAM",
  9626. "POTX",
  9627. "PPSM",
  9628. ];
  9629. if (
  9630. b.indexOf(
  9631. file.name
  9632. .split(".")
  9633. [file.name.split(".").length - 1].toLocaleUpperCase()
  9634. ) != -1
  9635. ) {
  9636. if (file.size / 1024 / 1024 > 80) {
  9637. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9638. this.inputShow = true;
  9639. // var a = _this.$refs.upload1.uploadFiles;
  9640. // a.splice(a.length - 1, a.length);
  9641. // loading.close();
  9642. return;
  9643. }
  9644. } else if (
  9645. file.name
  9646. .split(".")
  9647. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9648. ) {
  9649. if (file.size / 1024 / 1024 > 80) {
  9650. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9651. this.inputShow = true;
  9652. // var a = _this.$refs.upload1.uploadFiles;
  9653. // a.splice(a.length - 1, a.length);
  9654. // loading.close();
  9655. return;
  9656. }
  9657. }
  9658. }
  9659. this.inputShow = false;
  9660. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9661. // itemTaskIndex
  9662. // ].progress = 0;
  9663. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9664. itemTaskIndex
  9665. ].proVisible = true;
  9666. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9667. itemTaskIndex
  9668. ].isFinishSize = 0;
  9669. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9670. itemTaskIndex
  9671. ].isAllSize = event.target.files.length;
  9672. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9673. // itemTaskIndex
  9674. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9675. _this.$forceUpdate();
  9676. if (file) {
  9677. var params = {
  9678. Key:
  9679. file.name.split(".")[0] +
  9680. new Date().getTime() +
  9681. "." +
  9682. file.name.split(".")[file.name.split(".").length - 1],
  9683. ContentType: file.type,
  9684. Body: file,
  9685. "Access-Control-Allow-Credentials": "*",
  9686. ACL: "public-read",
  9687. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9688. var options = {
  9689. partSize: 2048 * 1024 * 1024,
  9690. queueSize: 2,
  9691. leavePartsOnError: true,
  9692. };
  9693. bucket
  9694. .upload(params, options)
  9695. .on("httpUploadProgress", function (evt) {
  9696. //这里可以写进度条
  9697. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9698. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9699. // itemTaskIndex
  9700. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  9701. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9702. // itemTaskIndex
  9703. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9704. // _this.$forceUpdate();
  9705. })
  9706. .send(function (err, data) {
  9707. cfindex2++
  9708. // loading.close();
  9709. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9710. // itemTaskIndex
  9711. // ].progress = 100;
  9712. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9713. itemTaskIndex
  9714. ].isFinishSize = cfindex2
  9715. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9716. // itemTaskIndex
  9717. // ].isAllSize;
  9718. _this.$forceUpdate();
  9719. setTimeout(() => {
  9720. if (
  9721. cfindex2 == event.target.files.length ||
  9722. cfindex2 > event.target.files.length
  9723. ) {
  9724. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9725. itemTaskIndex
  9726. ].proVisible = false;
  9727. }
  9728. _this.$forceUpdate();
  9729. }, 1000);
  9730. _this.inputShow = true;
  9731. if (err) {
  9732. // var a = _this.$refs.upload1.uploadFiles;
  9733. // a.splice(a.length - 1, a.length);
  9734. _this.$message.error("上传失败");
  9735. } else {
  9736. if (type == 13) {
  9737. let _type = 2;
  9738. var imgA = [
  9739. "png",
  9740. "jpg",
  9741. "jpeg",
  9742. "bmp",
  9743. "gif",
  9744. "webp",
  9745. "psd",
  9746. "svg",
  9747. "tiff",
  9748. ];
  9749. var fileA = [
  9750. "PDF",
  9751. "DOC",
  9752. "DOCX",
  9753. "DOCM",
  9754. "DOTM",
  9755. "DOTX",
  9756. "PPTX",
  9757. "PPSX",
  9758. "PPT",
  9759. "PPS",
  9760. "PPTM",
  9761. "POTM",
  9762. "PPAM",
  9763. "POTX",
  9764. "PPSM",
  9765. "XLSX",
  9766. "XLS",
  9767. ];
  9768. var videoA = [
  9769. "AVI",
  9770. "NAVI",
  9771. "MPEG",
  9772. "ASF",
  9773. "MOV",
  9774. "WMV",
  9775. "3GP",
  9776. "RM",
  9777. "RMVB",
  9778. "FLV",
  9779. "F4V",
  9780. "H.264",
  9781. "H.265",
  9782. "REAL VIDEO",
  9783. "MKV",
  9784. "WebM",
  9785. "HDDVD",
  9786. "MP4",
  9787. "MPG",
  9788. "M4V",
  9789. "MGV",
  9790. "OGV",
  9791. "QTM",
  9792. "STR",
  9793. "AMC",
  9794. "DVX",
  9795. "EVO",
  9796. "DAT",
  9797. "OGG",
  9798. "OGM",
  9799. ];
  9800. if (
  9801. fileA.indexOf(
  9802. data.Location.split(".")[
  9803. data.Location.split(".").length - 1
  9804. ].toLocaleUpperCase()
  9805. ) != -1
  9806. ) {
  9807. _type = 3;
  9808. } else if (
  9809. videoA.indexOf(
  9810. data.Location.split(".")[
  9811. data.Location.split(".").length - 1
  9812. ].toLocaleUpperCase()
  9813. ) != -1
  9814. ) {
  9815. _type = 2;
  9816. } else if (
  9817. imgA.indexOf(
  9818. data.Location.split(".")[
  9819. data.Location.split(".").length - 1
  9820. ].toLocaleLowerCase()
  9821. ) != -1
  9822. ) {
  9823. _type = 13;
  9824. } else {
  9825. _type = 12;
  9826. }
  9827. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9828. itemTaskIndex
  9829. ].chapterData.unshift({
  9830. name: fileName,
  9831. url: data.Location,
  9832. uid: fileUid,
  9833. type: _type,
  9834. });
  9835. _this.imgChange1(null, null, _type, itemTaskIndex);
  9836. } else if (type == 2 || type == 3 || type == 12) {
  9837. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9838. itemTaskIndex
  9839. ].chapterData.unshift({
  9840. name: fileName,
  9841. url: data.Location,
  9842. uid: fileUid,
  9843. type: type,
  9844. });
  9845. _this.imgChange1(null, null, type, itemTaskIndex);
  9846. } else if (type == 4) {
  9847. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9848. itemTaskIndex
  9849. ].fileList1.push({
  9850. name: fileName,
  9851. url: data.Location,
  9852. uid: fileUid,
  9853. });
  9854. _this.imgChange1(null, null, type, itemTaskIndex);
  9855. } else if (type == 5) {
  9856. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9857. itemTaskIndex
  9858. ].homeworkList.push({
  9859. name: fileName,
  9860. url: data.Location,
  9861. uid: fileUid,
  9862. });
  9863. _this.imgChange1(null, null, type, itemTaskIndex);
  9864. }
  9865. console.log(data.Location);
  9866. }
  9867. });
  9868. }
  9869. }
  9870. },
  9871. beforeUploadInfo2(event, type, tindex) {
  9872. // const loading = this.openLoading();
  9873. let file = "";
  9874. let cfindex2 = 0;
  9875. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9876. // var file = event.target.files[0];
  9877. file = event.target.files[cfindex];
  9878. let fileName = file.name
  9879. let fileUid = file.uid
  9880. var credentials = {
  9881. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9882. secretAccessKey: "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",
  9883. }; //秘钥形式的登录上传
  9884. window.AWS.config.update(credentials);
  9885. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9886. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9887. var _this = this;
  9888. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  9889. if (
  9890. ['DOC'].indexOf(
  9891. file.name
  9892. .split(".")
  9893. [file.name.split(".").length - 1].toLocaleUpperCase()
  9894. ) !== -1
  9895. ) {
  9896. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  9897. this.inputShow = true;
  9898. return;
  9899. }
  9900. if (
  9901. xianObj.indexOf(
  9902. file.name
  9903. .split(".")
  9904. [file.name.split(".").length - 1].toLocaleUpperCase()
  9905. ) == -1
  9906. ) {
  9907. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  9908. this.inputShow = true;
  9909. // var a = _this.$refs.upload1.uploadFiles;
  9910. // a.splice(a.length - 1, a.length);
  9911. // loading.close();
  9912. return;
  9913. }
  9914. if (type == 3) {
  9915. var b = [
  9916. "DOC",
  9917. "DOCX",
  9918. "DOCM",
  9919. "DOTM",
  9920. "DOTX",
  9921. "PPTX",
  9922. "PPSX",
  9923. "PPT",
  9924. "PPS",
  9925. "PPTM",
  9926. "POTM",
  9927. "PPAM",
  9928. "POTX",
  9929. "PPSM",
  9930. ];
  9931. if (
  9932. b.indexOf(
  9933. file.name
  9934. .split(".")
  9935. [file.name.split(".").length - 1].toLocaleUpperCase()
  9936. ) != -1
  9937. ) {
  9938. if (file.size / 1024 / 1024 > 80) {
  9939. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9940. this.inputShow = true;
  9941. // var a = _this.$refs.upload1.uploadFiles;
  9942. // a.splice(a.length - 1, a.length);
  9943. // loading.close();
  9944. return;
  9945. }
  9946. } else if (
  9947. file.name
  9948. .split(".")
  9949. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9950. ) {
  9951. if (file.size / 1024 / 1024 > 80) {
  9952. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9953. this.inputShow = true;
  9954. // var a = _this.$refs.upload1.uploadFiles;
  9955. // a.splice(a.length - 1, a.length);
  9956. // loading.close();
  9957. return;
  9958. }
  9959. }
  9960. }
  9961. this.inputShow = false;
  9962. if(type == 14){
  9963. // _this.teacherinfoprogress = 0;
  9964. _this.teacherinfoproVisible = true;
  9965. _this.teacherinfoisFinishSize = 0;
  9966. _this.teacherinfoisAllSize = event.target.files.length;
  9967. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9968. }else if(type == 16){
  9969. _this.mubiaoinfoprogress = 0;
  9970. _this.mubiaoinfoproVisible = true;
  9971. _this.mubiaoinfoisFinishSize = 0;
  9972. _this.mubiaoinfoisAllSize = event.target.files.length;
  9973. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9974. }else if(type == 17){
  9975. _this.xuanzeinfoprogress = 0;
  9976. _this.xuanzeinfoproVisible = true;
  9977. _this.xuanzeinfoisFinishSize = 0;
  9978. _this.xuanzeinfoisAllSize = event.target.files.length;
  9979. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9980. }else if(type == 18){
  9981. _this.pingjiainfoprogress[tindex] = 0;
  9982. _this.pingjiainfoproVisible[tindex] = true;
  9983. _this.pingjiainfoisFinishSize[tindex] = 0;
  9984. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  9985. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  9986. }else if(type == 19){
  9987. _this.knowinfoprogress = 0;
  9988. _this.knowinfoproVisible = true;
  9989. _this.knowinfoisFinishSize = 0;
  9990. _this.knowinfoisAllSize = event.target.files.length;
  9991. }else{
  9992. _this.infoprogress = 0;
  9993. _this.infoproVisible = true;
  9994. _this.infoisFinishSize = 0;
  9995. _this.infoisAllSize = event.target.files.length;
  9996. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  9997. }
  9998. _this.$forceUpdate();
  9999. if (file) {
  10000. var params = {
  10001. Key:
  10002. file.name.split(".")[0] +
  10003. new Date().getTime() +
  10004. "." +
  10005. file.name.split(".")[file.name.split(".").length - 1],
  10006. ContentType: file.type,
  10007. Body: file,
  10008. "Access-Control-Allow-Credentials": "*",
  10009. ACL: "public-read",
  10010. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10011. var options = {
  10012. partSize: 2048 * 1024 * 1024,
  10013. queueSize: 2,
  10014. leavePartsOnError: true,
  10015. };
  10016. bucket
  10017. .upload(params, options)
  10018. .on("httpUploadProgress", function (evt) {
  10019. //这里可以写进度条
  10020. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10021. // if(type == 14){
  10022. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10023. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10024. // }else if(type == 16){
  10025. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10026. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10027. // }else if(type == 17){
  10028. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10029. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10030. // }else if(type == 18){
  10031. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  10032. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  10033. // }else {
  10034. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  10035. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10036. // }
  10037. _this.$forceUpdate();
  10038. })
  10039. .send(async function (err, data) {
  10040. // loading.close();
  10041. // if(type == 14){
  10042. // _this.teacherinfoprogress = 100;
  10043. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  10044. // }else if(type == 16){
  10045. // _this.mubiaoinfoprogress = 100;
  10046. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  10047. // }else if(type == 17){
  10048. // _this.xuanzeinfoprogress = 100;
  10049. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  10050. // }else if(type == 18){
  10051. // _this.pingjiainfoprogress[tindex] = 100;
  10052. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  10053. // }else {
  10054. // _this.infoprogress = 100;
  10055. // _this.infoisFinishSize = _this.infoisAllSize;
  10056. // }
  10057. _this.$forceUpdate();
  10058. _this.inputShow = true;
  10059. if (err) {
  10060. cfindex2++;
  10061. if(type == 14){
  10062. _this.teacherinfoisFinishSize = cfindex2;
  10063. }else if(type == 16){
  10064. _this.mubiaoinfoisFinishSize = cfindex2;
  10065. }else if(type == 17){
  10066. _this.xuanzeinfoisFinishSize = cfindex2;
  10067. }else if(type == 18){
  10068. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10069. }else if(type == 19){
  10070. _this.knowinfoisFinishSize = cfindex2;
  10071. }else {
  10072. _this.infoisFinishSize = cfindex2;
  10073. }
  10074. setTimeout(() => {
  10075. if (
  10076. cfindex2 == event.target.files.length ||
  10077. cfindex2 > event.target.files.length
  10078. ) {
  10079. if(type == 14){
  10080. _this.teacherinfoproVisible = false;
  10081. }else if(type == 16){
  10082. _this.mubiaoinfoproVisible = false;
  10083. }else if(type == 17){
  10084. _this.xuanzeinfoproVisible = false;
  10085. }else if(type == 18){
  10086. _this.pingjiainfoproVisible[tindex] = false;
  10087. }else if(type == 19){
  10088. _this.knowinfoproVisible = false;
  10089. }else{
  10090. _this.infoproVisible = false;
  10091. }
  10092. }
  10093. _this.$forceUpdate();
  10094. }, 1000);
  10095. // var a = _this.$refs.upload1.uploadFiles;
  10096. // a.splice(a.length - 1, a.length);
  10097. _this.$message.error("上传失败");
  10098. } else {
  10099. let fileid = await _this.createFileid(data.Location)
  10100. if(fileid){
  10101. cfindex2++;
  10102. if(type == 14){
  10103. _this.teacherinfoisFinishSize = cfindex2;
  10104. }else if(type == 16){
  10105. _this.mubiaoinfoisFinishSize = cfindex2;
  10106. }else if(type == 17){
  10107. _this.xuanzeinfoisFinishSize = cfindex2;
  10108. }else if(type == 18){
  10109. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10110. }else if(type == 19){
  10111. _this.knowinfoisFinishSize = cfindex2;
  10112. }else {
  10113. _this.infoisFinishSize = cfindex2;
  10114. }
  10115. if (
  10116. cfindex2 == event.target.files.length ||
  10117. cfindex2 > event.target.files.length
  10118. ) {
  10119. if(type == 14){
  10120. _this.teacherinfoproVisible = false;
  10121. }else if(type == 16){
  10122. _this.mubiaoinfoproVisible = false;
  10123. }else if(type == 17){
  10124. _this.xuanzeinfoproVisible = false;
  10125. }else if(type == 18){
  10126. _this.pingjiainfoproVisible[tindex] = false;
  10127. }else if(type == 19){
  10128. _this.knowinfoproVisible = false;
  10129. }else{
  10130. _this.infoproVisible = false;
  10131. }
  10132. }
  10133. _this.$forceUpdate();
  10134. }
  10135. if(fileid == 1){
  10136. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  10137. return;
  10138. }
  10139. var imgA = [
  10140. "png",
  10141. "jpg",
  10142. "jpeg",
  10143. "bmp",
  10144. "gif",
  10145. "webp",
  10146. "psd",
  10147. "svg",
  10148. "tiff",
  10149. ];
  10150. var fileA = [
  10151. "PDF",
  10152. "DOC",
  10153. "DOCX",
  10154. "DOCM",
  10155. "DOTM",
  10156. "DOTX",
  10157. "PPTX",
  10158. "PPSX",
  10159. "PPT",
  10160. "PPS",
  10161. "PPTM",
  10162. "POTM",
  10163. "PPAM",
  10164. "POTX",
  10165. "PPSM",
  10166. "XLSX",
  10167. "XLS",
  10168. ];
  10169. var videoA = [
  10170. "AVI",
  10171. "NAVI",
  10172. "MPEG",
  10173. "ASF",
  10174. "MOV",
  10175. "WMV",
  10176. "3GP",
  10177. "RM",
  10178. "RMVB",
  10179. "FLV",
  10180. "F4V",
  10181. "H.264",
  10182. "H.265",
  10183. "REAL VIDEO",
  10184. "MKV",
  10185. "WebM",
  10186. "HDDVD",
  10187. "MP4",
  10188. "MPG",
  10189. "M4V",
  10190. "MGV",
  10191. "OGV",
  10192. "QTM",
  10193. "STR",
  10194. "AMC",
  10195. "DVX",
  10196. "EVO",
  10197. "DAT",
  10198. "OGG",
  10199. "OGM",
  10200. ];
  10201. let _type = 2;
  10202. if (
  10203. fileA.indexOf(
  10204. data.Location.split(".")[
  10205. data.Location.split(".").length - 1
  10206. ].toLocaleUpperCase()
  10207. ) != -1
  10208. ) {
  10209. _type = 3;
  10210. } else if (
  10211. videoA.indexOf(
  10212. data.Location.split(".")[
  10213. data.Location.split(".").length - 1
  10214. ].toLocaleUpperCase()
  10215. ) != -1
  10216. ) {
  10217. _type = 2;
  10218. } else if (
  10219. imgA.indexOf(
  10220. data.Location.split(".")[
  10221. data.Location.split(".").length - 1
  10222. ].toLocaleLowerCase()
  10223. ) != -1
  10224. ) {
  10225. _type = 13;
  10226. } else {
  10227. _type = 12;
  10228. }
  10229. if (type == 13) {
  10230. _this.infoData.push({
  10231. name: fileName,
  10232. url: data.Location,
  10233. uid: fileUid,
  10234. type: _type,
  10235. fileid: fileid == 1 ? '' : fileid,
  10236. });
  10237. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10238. name: fileName,
  10239. url: data.Location,
  10240. uid: fileUid,
  10241. type: _type,
  10242. fileid: fileid == 1 ? '' : fileid,
  10243. })
  10244. }else if (type == 14) {
  10245. _this.teacherInfoData.push({
  10246. name: fileName,
  10247. url: data.Location,
  10248. uid: fileUid,
  10249. type: _type,
  10250. fileid: fileid == 1 ? '' : fileid,
  10251. });
  10252. _this.infoData2.push({
  10253. name: fileName,
  10254. url: data.Location,
  10255. uid: fileUid,
  10256. type: _type,
  10257. fileid: fileid == 1 ? '' : fileid,
  10258. });
  10259. _this.infoData.push({
  10260. name: fileName,
  10261. url: data.Location,
  10262. uid: fileUid,
  10263. type: _type,
  10264. fileid: fileid == 1 ? '' : fileid,
  10265. });
  10266. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10267. name: fileName,
  10268. url: data.Location,
  10269. uid: fileUid,
  10270. type: _type,
  10271. fileid: fileid == 1 ? '' : fileid,
  10272. })
  10273. }else if (type == 15) {
  10274. _this.infoData2.push({
  10275. name: fileName,
  10276. url: data.Location,
  10277. uid: fileUid,
  10278. type: _type,
  10279. fileid: fileid == 1 ? '' : fileid,
  10280. });
  10281. _this.infoData.push({
  10282. name: fileName,
  10283. url: data.Location,
  10284. uid: fileUid,
  10285. type: _type,
  10286. fileid: fileid == 1 ? '' : fileid,
  10287. });
  10288. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10289. name: fileName,
  10290. url: data.Location,
  10291. uid: fileUid,
  10292. type: _type,
  10293. fileid: fileid == 1 ? '' : fileid,
  10294. })
  10295. }else if (type == 16) {
  10296. _this.mubiaoInfoData.push({
  10297. name: fileName,
  10298. url: data.Location,
  10299. uid: fileUid,
  10300. type: _type,
  10301. fileid: fileid == 1 ? '' : fileid,
  10302. });
  10303. }else if (type == 17) {
  10304. _this.xuanzeInfoData.push({
  10305. name: fileName,
  10306. url: data.Location,
  10307. uid: fileUid,
  10308. type: _type,
  10309. fileid: fileid == 1 ? '' : fileid,
  10310. });
  10311. }else if (type == 18) {
  10312. if(!_this.pingjiaInfoData[tindex]){
  10313. _this.pingjiaInfoData[tindex] = []
  10314. }
  10315. _this.pingjiaInfoData[tindex].push({
  10316. name: fileName,
  10317. url: data.Location,
  10318. uid: fileUid,
  10319. type: _type,
  10320. fileid: fileid == 1 ? '' : fileid,
  10321. });
  10322. }else if (type == 19) {
  10323. _this.knowInfoData.push({
  10324. name: fileName,
  10325. url: data.Location,
  10326. uid: fileUid,
  10327. type: _type,
  10328. fileid: fileid == 1 ? '' : fileid,
  10329. });
  10330. if(fileid != 1){
  10331. _this.knowFileids.push(fileid)
  10332. }
  10333. }
  10334. console.log(data.Location);
  10335. console.log(fileName,'----------',fileid);
  10336. }
  10337. });
  10338. }
  10339. }
  10340. },
  10341. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  10342. // const loading = this.openLoading();
  10343. var file = event.target.files[0];
  10344. var credentials = {
  10345. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10346. secretAccessKey: "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",
  10347. }; //秘钥形式的登录上传
  10348. window.AWS.config.update(credentials);
  10349. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10350. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10351. var _this = this;
  10352. if (type == 3) {
  10353. var b = [
  10354. "DOC",
  10355. "DOCX",
  10356. "DOCM",
  10357. "DOTM",
  10358. "DOTX",
  10359. "PPTX",
  10360. "PPSX",
  10361. "PPT",
  10362. "PPS",
  10363. "PPTM",
  10364. "POTM",
  10365. "PPAM",
  10366. "POTX",
  10367. "PPSM",
  10368. ];
  10369. if (
  10370. b.indexOf(
  10371. file.name
  10372. .split(".")
  10373. [file.name.split(".").length - 1].toLocaleUpperCase()
  10374. ) != -1
  10375. ) {
  10376. if (file.size / 1024 / 1024 > 80) {
  10377. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10378. this.inputShow = true;
  10379. // var a = _this.$refs.upload1.uploadFiles;
  10380. // a.splice(a.length - 1, a.length);
  10381. // loading.close();
  10382. return;
  10383. }
  10384. } else if (
  10385. file.name
  10386. .split(".")
  10387. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10388. ) {
  10389. if (file.size / 1024 / 1024 > 80) {
  10390. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10391. this.inputShow = true;
  10392. // var a = _this.$refs.upload1.uploadFiles;
  10393. // a.splice(a.length - 1, a.length);
  10394. // loading.close();
  10395. return;
  10396. }
  10397. }
  10398. }
  10399. this.inputShow = false;
  10400. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10401. itemTaskIndex
  10402. ].progress = 0;
  10403. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10404. itemTaskIndex
  10405. ].proVisible = true;
  10406. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10407. itemTaskIndex
  10408. ].isFinishSize = 0;
  10409. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10410. itemTaskIndex
  10411. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10412. _this.$forceUpdate();
  10413. if (file) {
  10414. var params = {
  10415. Key:
  10416. file.name.split(".")[0] +
  10417. new Date().getTime() +
  10418. "." +
  10419. file.name.split(".")[file.name.split(".").length - 1],
  10420. ContentType: file.type,
  10421. Body: file,
  10422. "Access-Control-Allow-Credentials": "*",
  10423. ACL: "public-read",
  10424. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10425. var options = {
  10426. partSize: 2048 * 1024 * 1024,
  10427. queueSize: 2,
  10428. leavePartsOnError: true,
  10429. };
  10430. bucket
  10431. .upload(params, options)
  10432. .on("httpUploadProgress", function (evt) {
  10433. //这里可以写进度条
  10434. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10435. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10436. itemTaskIndex
  10437. ].progress = parseInt((evt.loaded / evt.total) * 100);
  10438. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10439. itemTaskIndex
  10440. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10441. _this.$forceUpdate();
  10442. })
  10443. .send(function (err, data) {
  10444. // loading.close();
  10445. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10446. itemTaskIndex
  10447. ].progress = 100;
  10448. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10449. itemTaskIndex
  10450. ].isFinishSize =
  10451. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10452. itemTaskIndex
  10453. ].isAllSize;
  10454. _this.$forceUpdate();
  10455. setTimeout(() => {
  10456. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10457. itemTaskIndex
  10458. ].proVisible = false;
  10459. _this.$forceUpdate();
  10460. }, 1000);
  10461. _this.inputShow = true;
  10462. if (err) {
  10463. // var a = _this.$refs.upload1.uploadFiles;
  10464. // a.splice(a.length - 1, a.length);
  10465. _this.$message.error("上传失败");
  10466. } else {
  10467. if (type == 2 || type == 3) {
  10468. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10469. itemTaskIndex
  10470. ].chapterData.unshift({
  10471. name: file.name,
  10472. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10473. // itemTaskIndex
  10474. // ].chapterData.length+1),
  10475. url: data.Location,
  10476. uid: file.uid,
  10477. type: type,
  10478. text: string,
  10479. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10480. // itemTaskIndex
  10481. // ].chapterData.length + 1),
  10482. });
  10483. _this.imgChange1(null, null, type, itemTaskIndex);
  10484. } else if (type == 4) {
  10485. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10486. itemTaskIndex
  10487. ].fileList1.push({
  10488. name: file.name,
  10489. url: data.Location,
  10490. uid: file.uid,
  10491. });
  10492. _this.imgChange1(null, null, type, itemTaskIndex);
  10493. } else if (type == 5) {
  10494. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10495. itemTaskIndex
  10496. ].homeworkList.push({
  10497. name: file.name,
  10498. url: data.Location,
  10499. uid: file.uid,
  10500. });
  10501. _this.imgChange1(null, null, type, itemTaskIndex);
  10502. }
  10503. console.log(data.Location);
  10504. }
  10505. });
  10506. }
  10507. },
  10508. addunit() {
  10509. this.unitJson.push({
  10510. dyName: "", //单元标题
  10511. isUpdate: 1,
  10512. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  10513. chapterInfo: [
  10514. {
  10515. isread: false,
  10516. chapterid: this.guid(),
  10517. title: "",
  10518. courseName: "",
  10519. taskJson: [
  10520. {
  10521. task: "",
  10522. taskDetail: "",
  10523. chapterData: [],
  10524. toolText: "",
  10525. toolChoose: [
  10526. {
  10527. tool: [],
  10528. toolDetail: "",
  10529. toolType: 0,
  10530. askCount: 1,
  10531. askTitle: "",
  10532. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10533. },
  10534. ],
  10535. isShowTools: false,
  10536. askCount: 1,
  10537. isFold: 1,
  10538. askTitle: "",
  10539. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10540. checkJson: [{ checkCount: [], checkPerent: [] }],
  10541. homeworkList: [],
  10542. },
  10543. ],
  10544. itemCount: 1,
  10545. fileList1: [],
  10546. video: [],
  10547. testData: [],
  10548. pData: [],
  10549. templateArray: [],
  10550. },
  10551. ],
  10552. });
  10553. this.addindex = this.unitJson.length - 1;
  10554. setTimeout(() => {
  10555. this.unitIndex = this.unitJson.length - 1;
  10556. setTimeout(() => {
  10557. console.log(this.$refs.dyInput);
  10558. this.$refs.dyInput[0].focus();
  10559. }, 100);
  10560. this.unitSet(this.unitIndex);
  10561. }, 0);
  10562. },
  10563. addToolFun(itemTaskIndex) {
  10564. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10565. itemTaskIndex
  10566. ].toolChoose.push({
  10567. tool: [],
  10568. toolDetail: "",
  10569. toolType: 0,
  10570. askCount: 1,
  10571. askTitle: "",
  10572. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10573. });
  10574. },
  10575. addTaskBorder() {
  10576. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  10577. task: "",
  10578. taskDetail: "",
  10579. chapterData: [],
  10580. toolText: "",
  10581. toolChoose: [
  10582. {
  10583. tool: [],
  10584. toolDetail: "",
  10585. toolType: 0,
  10586. askCount: 1,
  10587. askTitle: "",
  10588. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10589. },
  10590. ],
  10591. isShowTools: false,
  10592. askCount: 1,
  10593. isFold: 1, //任务收起状态
  10594. askTitle: "",
  10595. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10596. checkJson: [{ checkCount: [], checkPerent: [] }],
  10597. homeworkList: [],
  10598. });
  10599. setTimeout(() => {
  10600. this.checkEva(this.checkId);
  10601. setTimeout(() => {
  10602. this.checkEva(this.checkId);
  10603. }, 100);
  10604. }, 100);
  10605. },
  10606. addTaskBorder2(type, index) {
  10607. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  10608. this.$message({
  10609. message: "有大纲在生成请生成完之后才能使用此功能",
  10610. type: "warning"
  10611. });
  10612. return;
  10613. }
  10614. if(type == 1){
  10615. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  10616. task: "",
  10617. isTask2: true,
  10618. isTask3: true,
  10619. taskDetail: "",
  10620. chapterData: [],
  10621. toolText: "",
  10622. toolChoose: [
  10623. {
  10624. tool: [],
  10625. toolDetail: "",
  10626. toolType: 0,
  10627. askCount: 1,
  10628. askTitle: "",
  10629. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10630. },
  10631. ],
  10632. isShowTools: false,
  10633. askCount: 1,
  10634. isFold: 0, //任务收起状态
  10635. askTitle: "",
  10636. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10637. checkJson: [{ checkCount: [], checkPerent: [] }],
  10638. homeworkList: [],
  10639. })
  10640. }else if(type == 2){
  10641. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  10642. task: "",
  10643. isTask2: true,
  10644. isTask3: true,
  10645. taskDetail: "",
  10646. chapterData: [],
  10647. toolText: "",
  10648. toolChoose: [
  10649. {
  10650. tool: [],
  10651. toolDetail: "",
  10652. toolType: 0,
  10653. askCount: 1,
  10654. askTitle: "",
  10655. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10656. },
  10657. ],
  10658. isShowTools: false,
  10659. askCount: 1,
  10660. isFold: 0, //任务收起状态
  10661. askTitle: "",
  10662. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10663. checkJson: [{ checkCount: [], checkPerent: [] }],
  10664. homeworkList: [],
  10665. })
  10666. }
  10667. setTimeout(() => {
  10668. this.checkEva(this.checkId);
  10669. setTimeout(() => {
  10670. this.checkEva(this.checkId);
  10671. }, 100);
  10672. }, 100);
  10673. },
  10674. add(e, i) {
  10675. var el = e.currentTarget;
  10676. el.getElementsByTagName("input")[0].click();
  10677. },
  10678. fold(i, e) {
  10679. if (
  10680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  10681. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  10682. ) {
  10683. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  10684. } else {
  10685. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  10686. }
  10687. },
  10688. fold2(i) {
  10689. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  10690. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10691. i
  10692. ].isFold2 = false;
  10693. } else {
  10694. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  10695. }
  10696. this.$forceUpdate();
  10697. },
  10698. foldEva(i) {
  10699. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  10700. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10701. i
  10702. ].isEvaFold = false;
  10703. } else {
  10704. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10705. i
  10706. ].isEvaFold = true;
  10707. setTimeout(() => {
  10708. this.checkEva(this.checkId);
  10709. setTimeout(() => {
  10710. this.checkEva(this.checkId);
  10711. }, 500);
  10712. }, 0);
  10713. }
  10714. this.$forceUpdate();
  10715. },
  10716. foldC(i) {
  10717. if (
  10718. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  10719. ) {
  10720. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10721. i
  10722. ].isFoldchapter = false;
  10723. } else {
  10724. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10725. i
  10726. ].isFoldchapter = true;
  10727. }
  10728. this.$forceUpdate();
  10729. },
  10730. fold3(i, ti) {
  10731. if (
  10732. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  10733. .isFold3
  10734. ) {
  10735. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10736. ti
  10737. ].isFold3 = false;
  10738. } else {
  10739. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10740. ti
  10741. ].isFold3 = true;
  10742. }
  10743. this.$forceUpdate();
  10744. },
  10745. deleteHomeworkBox(unitIndex, index, i) {
  10746. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  10747. this.taskCount
  10748. ].homeworkList.splice(i, 1);
  10749. },
  10750. getStudent() {
  10751. let params = {
  10752. oid: this.oid,
  10753. cu: "",
  10754. cn: this.searchPeople,
  10755. };
  10756. this.ajax
  10757. .get(this.$store.state.api + "selectStudentAdd", params)
  10758. .then((res) => {
  10759. this.studentJuri = res.data[0];
  10760. })
  10761. .catch((err) => {
  10762. this.isLoading = false;
  10763. console.error(err);
  10764. });
  10765. },
  10766. // 添加协同成员其他选项按钮
  10767. getTeacherCopy(){
  10768. this.CollLoading=true
  10769. this.collid = ''
  10770. this.collid = '1xpz'
  10771. let params = {
  10772. oid:
  10773. this.org && this.org != "undefined" && this.org != "null"
  10774. ? this.org
  10775. : this.oid,
  10776. cu: "",
  10777. cn: this.searchTN,
  10778. coll: ''
  10779. };
  10780. this.ajax
  10781. .get(
  10782. this.$store.state.api +
  10783. (this.org && this.org != "undefined" && this.org != "null"
  10784. ? "selectCollaborativeMembersOrg"
  10785. : "selectCollaborativeMembers"),
  10786. params
  10787. )
  10788. .then((res) => {
  10789. let teacherJuri = res.data[0];
  10790. this.CollaborativeTeaList = res.data[1];
  10791. for (var i = 0; i < teacherJuri.length; i++) {
  10792. if (teacherJuri[i].userid == this.userid) {
  10793. teacherJuri.splice(i, 1);
  10794. break;
  10795. }
  10796. }
  10797. this.teacherJuri = teacherJuri.filter((i,index)=>{
  10798. return (i.cclassid == '' || i.cclassid == null)
  10799. })
  10800. console.log(' this.teacherJuri', this.teacherJuri);
  10801. let _check = [];
  10802. let _check2 = [];
  10803. for (var i = 0; i < this.teacherJuri.length; i++) {
  10804. var gid = this.teacherJuri[i].userid;
  10805. _check.push(gid);
  10806. }
  10807. for (var i = 0; i < this.checkboxList3.length; i++) {
  10808. var _id = this.checkboxList3[i];
  10809. if (_check.indexOf(_id) !== -1) {
  10810. _check2.push(_id);
  10811. }
  10812. }
  10813. if (_check2.length==0 && _check.length==0) {
  10814. }else{
  10815. this.checkAll2 = _check2.length === _check.length;
  10816. }
  10817. this.CollLoading=false
  10818. })
  10819. .catch((err) => {
  10820. console.error(err);
  10821. this.CollLoading=false
  10822. });
  10823. },
  10824. getTeacher(val) {
  10825. this.CollLoading=true
  10826. this.collid = ''
  10827. this.collid = !val ? '' : val
  10828. let params = {
  10829. oid:
  10830. this.org && this.org != "undefined" && this.org != "null"
  10831. ? this.org
  10832. : this.oid,
  10833. cu: "",
  10834. cn: this.searchTN,
  10835. coll: this.collid
  10836. };
  10837. this.ajax
  10838. .get(
  10839. this.$store.state.api +
  10840. (this.org && this.org != "undefined" && this.org != "null"
  10841. ? "selectCollaborativeMembersOrg"
  10842. : "selectCollaborativeMembers"),
  10843. params
  10844. )
  10845. .then((res) => {
  10846. let teacherJuri = res.data[0];
  10847. this.CollaborativeTeaList = res.data[1];
  10848. for (var i = 0; i < teacherJuri.length; i++) {
  10849. if (teacherJuri[i].userid == this.userid) {
  10850. teacherJuri.splice(i, 1);
  10851. break;
  10852. }
  10853. }
  10854. this.teacherJuri = teacherJuri;
  10855. let _check = [];
  10856. let _check2 = [];
  10857. for (var i = 0; i < this.teacherJuri.length; i++) {
  10858. var gid = this.teacherJuri[i].userid;
  10859. _check.push(gid);
  10860. }
  10861. for (var i = 0; i < this.checkboxList3.length; i++) {
  10862. var _id = this.checkboxList3[i];
  10863. if (_check.indexOf(_id) !== -1) {
  10864. _check2.push(_id);
  10865. }
  10866. }
  10867. if (_check2.length==0 && _check.length==0) {
  10868. }else{
  10869. this.checkAll2 = _check2.length === _check.length;
  10870. }
  10871. this.CollLoading=false
  10872. })
  10873. .catch((err) => {
  10874. console.error(err);
  10875. this.CollLoading=false
  10876. });
  10877. },
  10878. searchStudent() {
  10879. this.getStudent();
  10880. },
  10881. selectGrage() {
  10882. let params = {
  10883. oid: this.oid,
  10884. };
  10885. this.ajax
  10886. .get(this.$store.state.api + "selectGrageBySchool", params)
  10887. .then((res) => {
  10888. this.gradeList = res.data[0];
  10889. })
  10890. .catch((err) => {
  10891. this.isLoading = false;
  10892. console.error(err);
  10893. });
  10894. },
  10895. //获取班级列表
  10896. getClass() {
  10897. let params = {
  10898. oid: this.oid,
  10899. gid: this.gradeId,
  10900. cn: this.classSearch,
  10901. };
  10902. this.ajax
  10903. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  10904. .then((res) => {
  10905. if (!this.grade.length) {
  10906. this.grade = res.data[0];
  10907. }
  10908. this.grade2 = res.data[0];
  10909. this.classJuri = res.data[0];
  10910. let _check = [];
  10911. let _check2 = [];
  10912. for (var i = 0; i < this.grade2.length; i++) {
  10913. var gid = this.grade2[i].id;
  10914. _check.push(gid);
  10915. }
  10916. for (var i = 0; i < this.checkboxList2.length; i++) {
  10917. var _id = this.checkboxList2[i];
  10918. if (_check.indexOf(_id) !== -1) {
  10919. _check2.push(_id);
  10920. }
  10921. }
  10922. this.checkAll = _check2.length === _check.length;
  10923. })
  10924. .catch((err) => {
  10925. this.isLoading = false;
  10926. console.error(err);
  10927. });
  10928. },
  10929. CourseType2Change(val) {
  10930. this.pTypeCheck = [];
  10931. for (var i = 0; i < this.CourseType2.length; i++) {
  10932. let typeA = this.CourseType2[i];
  10933. if (val.indexOf(typeA.name) != -1) {
  10934. this.pTypeCheck.push(...typeA.id);
  10935. }
  10936. }
  10937. },
  10938. arrayToArray(arrayo, arrayt) {
  10939. let array1 = arrayo;
  10940. let array2 = arrayt;
  10941. let commonElements = [];
  10942. for (let i = 0; i < array1.length; i++) {
  10943. for (let j = 0; j < array2.length; j++) {
  10944. if (array1[i] === array2[j]) {
  10945. commonElements.push(array1[i]);
  10946. }
  10947. }
  10948. }
  10949. return commonElements;
  10950. },
  10951. typeChange(){
  10952. let sub = []
  10953. let mclass = []
  10954. if (this.courseTypeId.length) {
  10955. for (var i = 0; i < this.courseTypeId.length; i++) {
  10956. let _sid = this.courseTypeId[i]
  10957. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  10958. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  10959. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  10960. }
  10961. }
  10962. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  10963. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  10964. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  10965. }
  10966. }
  10967. }
  10968. }
  10969. sub = JSON.parse(converter(JSON.stringify(sub)))
  10970. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  10971. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  10972. let _file = this.knowFileArray[fi]
  10973. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  10974. let fileS = _file.name ? converter(_file.name).split('/') : 1
  10975. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  10976. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  10977. let fileids = this.knowInfoData.map((item) => item.fileid)
  10978. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  10979. this.knowInfoData.push({
  10980. name: _file.filename,
  10981. url: _file.url,
  10982. uid: '',
  10983. type: 3,
  10984. fileid: _file.fileid,
  10985. });
  10986. this.knowFileids.push(_file.fileid)
  10987. }
  10988. fileids = this.knowInfoData.map((item) => item.fileid)
  10989. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  10990. this.knowInfoData.push({
  10991. name: _file.filename,
  10992. url: _file.url,
  10993. uid: '',
  10994. type: 3,
  10995. fileid: _file.fileid,
  10996. });
  10997. this.knowFileids.push(_file.fileid)
  10998. }
  10999. fileids = this.knowInfoData.map((item) => item.fileid)
  11000. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11001. this.knowInfoData.push({
  11002. name: _file.filename,
  11003. url: _file.url,
  11004. uid: '',
  11005. type: 3,
  11006. fileid: _file.fileid,
  11007. });
  11008. this.knowFileids.push(_file.fileid)
  11009. }
  11010. fileids = this.knowInfoData.map((item) => item.fileid)
  11011. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11012. this.knowInfoData.push({
  11013. name: _file.filename,
  11014. url: _file.url,
  11015. uid: '',
  11016. type: 3,
  11017. fileid: _file.fileid,
  11018. });
  11019. this.knowFileids.push(_file.fileid)
  11020. }
  11021. fileids = this.knowInfoData.map((item) => item.fileid)
  11022. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  11023. this.knowInfoData.push({
  11024. name: _file.filename,
  11025. url: _file.url,
  11026. uid: '',
  11027. type: 3,
  11028. fileid: _file.fileid,
  11029. });
  11030. this.knowFileids.push(_file.fileid)
  11031. }
  11032. }
  11033. },
  11034. getChapterData(e, i, j, ic, type) {
  11035. e.stopPropagation();
  11036. this.updataC = true;
  11037. this.icc = ic;
  11038. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  11039. console.log("还不能下载图片喔");
  11040. }
  11041. },
  11042. deleteChapterData(e, i, j, ic, taskI) {
  11043. e.stopPropagation();
  11044. let _this = this;
  11045. _this
  11046. .$confirm("确定删除此项?", "提示", {
  11047. confirmButtonText: "确定",
  11048. cancelButtonText: "取消",
  11049. type: "warning",
  11050. })
  11051. .then(() => {
  11052. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  11053. ic,
  11054. 1
  11055. );
  11056. })
  11057. .catch(() => {
  11058. return;
  11059. });
  11060. },
  11061. checkInfoData(fileid, file){
  11062. let type = 1
  11063. let index = 0
  11064. for(let i = 0; i < this.infoData.length; i++){
  11065. if(this.infoData[i].fileid == fileid){
  11066. type = 2
  11067. index = i
  11068. }
  11069. }
  11070. if(type == 2){
  11071. this.infoData.splice(index, 1)
  11072. }else {
  11073. this.infoData.push({...file})
  11074. }
  11075. },
  11076. checkKnowInfoData(fileid){
  11077. if(this.knowFileids.indexOf(fileid) == -1){
  11078. this.knowFileids.push(fileid)
  11079. }else {
  11080. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  11081. }
  11082. },
  11083. deleteInfoData(e, ic) {
  11084. e.stopPropagation();
  11085. let _this = this;
  11086. _this
  11087. .$confirm("确定删除此项?", "提示", {
  11088. confirmButtonText: "确定",
  11089. cancelButtonText: "取消",
  11090. type: "warning",
  11091. })
  11092. .then(() => {
  11093. _this.infoData.splice(
  11094. ic,
  11095. 1
  11096. );
  11097. })
  11098. .catch(() => {
  11099. return;
  11100. });
  11101. },
  11102. deleteInfoData2(e, ic) {
  11103. e.stopPropagation();
  11104. let _this = this;
  11105. _this
  11106. .$confirm("确定删除此项?", "提示", {
  11107. confirmButtonText: "确定",
  11108. cancelButtonText: "取消",
  11109. type: "warning",
  11110. })
  11111. .then(() => {
  11112. let fileid = _this.infoData2[ic].fileid;
  11113. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  11114. _this.infoData2.splice(
  11115. ic,
  11116. 1
  11117. );
  11118. })
  11119. .catch(() => {
  11120. return;
  11121. });
  11122. },
  11123. deleteKnowInfoData(e, ic) {
  11124. e.stopPropagation();
  11125. let _this = this;
  11126. _this
  11127. .$confirm("确定删除此项?", "提示", {
  11128. confirmButtonText: "确定",
  11129. cancelButtonText: "取消",
  11130. type: "warning",
  11131. })
  11132. .then(() => {
  11133. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  11134. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  11135. }
  11136. _this.knowInfoData.splice(
  11137. ic,
  11138. 1
  11139. );
  11140. })
  11141. .catch(() => {
  11142. return;
  11143. });
  11144. },
  11145. deletemubiaoInfoData(e, ic) {
  11146. e.stopPropagation();
  11147. let _this = this;
  11148. _this
  11149. .$confirm("确定删除此项?", "提示", {
  11150. confirmButtonText: "确定",
  11151. cancelButtonText: "取消",
  11152. type: "warning",
  11153. })
  11154. .then(() => {
  11155. _this.mubiaoInfoData.splice(
  11156. ic,
  11157. 1
  11158. );
  11159. })
  11160. .catch(() => {
  11161. return;
  11162. });
  11163. },
  11164. deletexuanzeInfoData(e, ic) {
  11165. e.stopPropagation();
  11166. let _this = this;
  11167. _this
  11168. .$confirm("确定删除此项?", "提示", {
  11169. confirmButtonText: "确定",
  11170. cancelButtonText: "取消",
  11171. type: "warning",
  11172. })
  11173. .then(() => {
  11174. _this.xuanzeInfoData.splice(
  11175. ic,
  11176. 1
  11177. );
  11178. })
  11179. .catch(() => {
  11180. return;
  11181. });
  11182. },
  11183. deletepingjiaInfoData(e, ic, tindex) {
  11184. e.stopPropagation();
  11185. let _this = this;
  11186. _this
  11187. .$confirm("确定删除此项?", "提示", {
  11188. confirmButtonText: "确定",
  11189. cancelButtonText: "取消",
  11190. type: "warning",
  11191. })
  11192. .then(() => {
  11193. _this.pingjiaInfoData[tindex].splice(
  11194. ic,
  11195. 1
  11196. );
  11197. })
  11198. .catch(() => {
  11199. return;
  11200. });
  11201. },
  11202. deleteCankaoInfoData(e, ic) {
  11203. e.stopPropagation();
  11204. let _this = this;
  11205. _this
  11206. .$confirm("确定删除此项?", "提示", {
  11207. confirmButtonText: "确定",
  11208. cancelButtonText: "取消",
  11209. type: "warning",
  11210. })
  11211. .then(() => {
  11212. _this.cankaoInfoData.splice(
  11213. ic,
  11214. 1
  11215. );
  11216. })
  11217. .catch(() => {
  11218. return;
  11219. });
  11220. },
  11221. deleteTeacherInfoData(e, ic) {
  11222. e.stopPropagation();
  11223. let _this = this;
  11224. _this
  11225. .$confirm("确定删除此项?", "提示", {
  11226. confirmButtonText: "确定",
  11227. cancelButtonText: "取消",
  11228. type: "warning",
  11229. })
  11230. .then(() => {
  11231. _this.teacherInfoData.splice(
  11232. ic,
  11233. 1
  11234. );
  11235. })
  11236. .catch(() => {
  11237. return;
  11238. });
  11239. },
  11240. updataVideoT(e, i, j, ic) {
  11241. // e.stopPropagation();
  11242. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  11243. // ic
  11244. // ].name = JSON.parse(JSON.stringify(e.target.value));
  11245. this.line =
  11246. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  11247. this.taskCount = j;
  11248. this.lineCount = ic;
  11249. this.dialogVisibleupdataVideoT = true;
  11250. this.$forceUpdate();
  11251. },
  11252. checkChpater(e, i, j, ic){
  11253. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  11254. if(type == 3){
  11255. var fileA = [
  11256. "DOC",
  11257. "DOCX",
  11258. "DOCM",
  11259. "DOTM",
  11260. "DOTX",
  11261. "PPTX",
  11262. "PPSX",
  11263. "PPT",
  11264. "PPS",
  11265. "PPTM",
  11266. "POTM",
  11267. "PPAM",
  11268. "POTX",
  11269. "PPSM",
  11270. "XLSX",
  11271. "XLS"
  11272. ];
  11273. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  11274. if (
  11275. fileA.indexOf(
  11276. url.split(".")[
  11277. url.split(".").length - 1
  11278. ].toLocaleUpperCase()
  11279. ) != -1
  11280. ) {
  11281. this.dialogVisibleOffice = true
  11282. this.wurl = url
  11283. } else if (
  11284. "pdf".indexOf(
  11285. url.split(".")[
  11286. url.split(".").length - 1
  11287. ].toLocaleLowerCase()
  11288. ) != -1
  11289. ) {
  11290. this.dialogVisiblePdf = true
  11291. this.wurl = url
  11292. }
  11293. }
  11294. },
  11295. checkChpater2(e, ic){
  11296. let type = this.infoData2[ic].type
  11297. if(type == 3){
  11298. var fileA = [
  11299. "DOC",
  11300. "DOCX",
  11301. "DOCM",
  11302. "DOTM",
  11303. "DOTX",
  11304. "PPTX",
  11305. "PPSX",
  11306. "PPT",
  11307. "PPS",
  11308. "PPTM",
  11309. "POTM",
  11310. "PPAM",
  11311. "POTX",
  11312. "PPSM",
  11313. "XLSX",
  11314. "XLS"
  11315. ];
  11316. let url = this.infoData2[ic].url
  11317. if (
  11318. fileA.indexOf(
  11319. url.split(".")[
  11320. url.split(".").length - 1
  11321. ].toLocaleUpperCase()
  11322. ) != -1
  11323. ) {
  11324. this.dialogVisibleOffice = true
  11325. this.wurl = url
  11326. } else if (
  11327. "pdf".indexOf(
  11328. url.split(".")[
  11329. url.split(".").length - 1
  11330. ].toLocaleLowerCase()
  11331. ) != -1
  11332. ) {
  11333. this.dialogVisiblePdf = true
  11334. this.wurl = url
  11335. }
  11336. }
  11337. },
  11338. checkChpater3(e, ic, item){
  11339. let type = item.type
  11340. if(type == 3){
  11341. var fileA = [
  11342. "DOC",
  11343. "DOCX",
  11344. "DOCM",
  11345. "DOTM",
  11346. "DOTX",
  11347. "PPTX",
  11348. "PPSX",
  11349. "PPT",
  11350. "PPS",
  11351. "PPTM",
  11352. "POTM",
  11353. "PPAM",
  11354. "POTX",
  11355. "PPSM",
  11356. "XLSX",
  11357. "XLS"
  11358. ];
  11359. let url = item.url
  11360. if (
  11361. fileA.indexOf(
  11362. url.split(".")[
  11363. url.split(".").length - 1
  11364. ].toLocaleUpperCase()
  11365. ) != -1
  11366. ) {
  11367. this.dialogVisibleOffice = true
  11368. this.wurl = url
  11369. } else if (
  11370. "pdf".indexOf(
  11371. url.split(".")[
  11372. url.split(".").length - 1
  11373. ].toLocaleLowerCase()
  11374. ) != -1
  11375. ) {
  11376. this.dialogVisiblePdf = true
  11377. this.wurl = url
  11378. }
  11379. }
  11380. },
  11381. updataVideoC() {
  11382. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11383. this.taskCount
  11384. ].chapterData[this.lineCount].name = JSON.parse(
  11385. JSON.stringify(this.line)
  11386. );
  11387. this.dialogVisibleupdataVideoT = false;
  11388. this.$forceUpdate();
  11389. },
  11390. upCd(e, i, j, taskCount, ic) {
  11391. e.stopPropagation();
  11392. if (ic == 0) {
  11393. return;
  11394. }
  11395. var a = JSON.parse(
  11396. JSON.stringify(
  11397. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11398. ic - 1
  11399. ]
  11400. )
  11401. );
  11402. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  11403. JSON.parse(
  11404. JSON.stringify(
  11405. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11406. )
  11407. );
  11408. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11409. this.$forceUpdate();
  11410. },
  11411. downCd(e, i, j, taskCount, ic) {
  11412. e.stopPropagation();
  11413. if (
  11414. ic ==
  11415. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  11416. 1
  11417. ) {
  11418. return;
  11419. }
  11420. var a = JSON.parse(
  11421. JSON.stringify(
  11422. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11423. ic + 1
  11424. ]
  11425. )
  11426. );
  11427. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  11428. JSON.parse(
  11429. JSON.stringify(
  11430. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11431. )
  11432. );
  11433. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11434. this.$forceUpdate();
  11435. },
  11436. async upTool(e, i, j, tooli) {
  11437. e.stopPropagation();
  11438. if (tooli == 0) {
  11439. return;
  11440. }
  11441. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  11442. let count2 = await this.getWorksCount(3, i, j, tooli);
  11443. if (count1 > 0 || count2 > 0) {
  11444. this.$confirm(
  11445. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11446. "提示",
  11447. {
  11448. confirmButtonText: "确定",
  11449. cancelButtonText: "取消",
  11450. type: "warning",
  11451. }
  11452. )
  11453. .then(() => {
  11454. var a = JSON.parse(
  11455. JSON.stringify(
  11456. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11457. tooli - 1
  11458. ]
  11459. )
  11460. );
  11461. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11462. JSON.parse(
  11463. JSON.stringify(
  11464. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11465. )
  11466. );
  11467. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11468. this.$forceUpdate();
  11469. })
  11470. .catch(() => {
  11471. return;
  11472. });
  11473. } else {
  11474. var a = JSON.parse(
  11475. JSON.stringify(
  11476. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  11477. )
  11478. );
  11479. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11480. JSON.parse(
  11481. JSON.stringify(
  11482. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11483. )
  11484. );
  11485. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11486. this.$forceUpdate();
  11487. }
  11488. },
  11489. async downTool(e, i, j, tooli) {
  11490. e.stopPropagation();
  11491. if (
  11492. tooli ==
  11493. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  11494. ) {
  11495. return;
  11496. }
  11497. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  11498. let count2 = await this.getWorksCount(3, i, j, tooli);
  11499. if (count1 > 0 || count2 > 0) {
  11500. this.$confirm(
  11501. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11502. "提示",
  11503. {
  11504. confirmButtonText: "确定",
  11505. cancelButtonText: "取消",
  11506. type: "warning",
  11507. }
  11508. )
  11509. .then(() => {
  11510. var a = JSON.parse(
  11511. JSON.stringify(
  11512. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11513. tooli + 1
  11514. ]
  11515. )
  11516. );
  11517. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11518. JSON.parse(
  11519. JSON.stringify(
  11520. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11521. )
  11522. );
  11523. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11524. this.$forceUpdate();
  11525. })
  11526. .catch(() => {
  11527. return;
  11528. });
  11529. } else {
  11530. var a = JSON.parse(
  11531. JSON.stringify(
  11532. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  11533. )
  11534. );
  11535. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11536. JSON.parse(
  11537. JSON.stringify(
  11538. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11539. )
  11540. );
  11541. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11542. this.$forceUpdate();
  11543. }
  11544. },
  11545. addWork(type) {
  11546. if(type == 2 && this.courseName == "") {
  11547. this.$message.error("请补充填写课程名称");
  11548. return;
  11549. }
  11550. let cPan = 1;
  11551. for (var i = 0; i < this.unitJson.length; i++) {
  11552. for (
  11553. var j = 0;
  11554. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11555. j++
  11556. ) {
  11557. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11558. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11559. if (
  11560. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11561. ) {
  11562. for (
  11563. var z = 0;
  11564. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11565. z++
  11566. ) {
  11567. if (
  11568. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11569. .length
  11570. ) {
  11571. this.$message.error("请把工具添加完整");
  11572. cPan = 2;
  11573. break;
  11574. }
  11575. }
  11576. }
  11577. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11578. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11579. i
  11580. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11581. return ele.value != "" || ele.detail != "" || ele.target != "";
  11582. });
  11583. }
  11584. }
  11585. }
  11586. this.inputShow = true;
  11587. if (cPan == 2) {
  11588. this.steps--;
  11589. return;
  11590. }
  11591. for (var i = 0; i < this.unitJson.length; i++) {
  11592. delete this.unitJson[i].isUpdate;
  11593. }
  11594. if(!this.targetCourseText2){
  11595. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11596. }
  11597. let params = [
  11598. {
  11599. uid: this.userid,
  11600. title: this.courseName,
  11601. brief: this.courseText,
  11602. cover:
  11603. this.cover.length > 0
  11604. ? JSON.stringify(this.cover)
  11605. : JSON.stringify([
  11606. {
  11607. name: "noBanner.jpg",
  11608. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11609. uid: 1656409780264,
  11610. status: "success",
  11611. },
  11612. ]),
  11613. evaId: this.evalua,
  11614. astudent:
  11615. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11616. see: this.isTeacherSee == true ? 1 : 0,
  11617. chapters: JSON.stringify(this.unitJson),
  11618. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  11619. courseType: JSON.stringify(this.courseTypeId),
  11620. ateacher:
  11621. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11622. inviteCode: JSON.stringify(this.inviteCode),
  11623. refile: JSON.stringify(this.infoData),
  11624. reBrief: this.courseText2,
  11625. cpote: JSON.stringify(this.cpote),
  11626. setting: JSON.stringify({
  11627. courseJie: this.courseJie,
  11628. courseTime: this.courseTime,
  11629. teacherInfoData: this.teacherInfoData,
  11630. teacherCourseText: this.teacherCourseText,
  11631. targetCourseText: this.targetCourseText,
  11632. cankaoInfoData: this.cankaoInfoData,
  11633. mubiaoInfoData: this.mubiaoInfoData,
  11634. xuanzeInfoData: this.xuanzeInfoData,
  11635. pingjiaInfoData: this.pingjiaInfoData,
  11636. infoData2: this.infoData2,
  11637. isuseT: this.isuseT,
  11638. mode: this.mode,
  11639. targetCourseText2: this.targetCourseText2,
  11640. chatid: this.chatid,
  11641. languageSetting: this.languageSetting,
  11642. knowInfoData: this.knowInfoData,
  11643. knowFileids: this.knowFileids,
  11644. }),
  11645. iresearch: this.isFileSearch ? 1 : 2,
  11646. },
  11647. ];
  11648. this.ajax
  11649. .post(this.$store.state.api + "addWorkNew2AI3", params)
  11650. .then((res) => {
  11651. console.log(this.steps);
  11652. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11653. this.$message({
  11654. message: "新增成功",
  11655. type: "success",
  11656. });
  11657. }
  11658. this.number = res.data.ordernumber;
  11659. this.courseId = res.data.courseId;
  11660. this.cid = res.data.courseId;
  11661. this.courseUserid = this.userid;
  11662. this.islogin = true;
  11663. // this.updateCourseState(4);
  11664. this.updateCourseState(5);
  11665. this.addtips()
  11666. if(type == 2){
  11667. this.retrunCourse()
  11668. }
  11669. if(type == 3){
  11670. this.steps = 4
  11671. }
  11672. })
  11673. .catch((err) => {
  11674. this.$message.error("网络不佳");
  11675. console.error(err);
  11676. });
  11677. },
  11678. goCourse() {
  11679. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  11680. },
  11681. updateWork2() {
  11682. let _unitIndex = this.unitIndex;
  11683. let cPan = 1;
  11684. for (
  11685. var j = 0;
  11686. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11687. j++
  11688. ) {
  11689. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11690. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11691. j
  11692. ].proVisible2 = false;
  11693. if (
  11694. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11695. .length > 1
  11696. ) {
  11697. for (
  11698. var z = 0;
  11699. z <
  11700. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11701. .length;
  11702. z++
  11703. ) {
  11704. if (
  11705. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11706. z
  11707. ].tool.length
  11708. ) {
  11709. this.$message.error("请把工具添加完整");
  11710. cPan = 2;
  11711. break;
  11712. }
  11713. }
  11714. }
  11715. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11716. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11717. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11718. (ele) => {
  11719. return ele.value != "" || ele.detail != "" || ele.target != "";
  11720. }
  11721. );
  11722. }
  11723. }
  11724. this.inputShow = true;
  11725. if (cPan == 2) {
  11726. this.steps--;
  11727. return;
  11728. }
  11729. let params = [
  11730. {
  11731. cid: this.cid,
  11732. chapters: JSON.stringify(this.unitJson),
  11733. uid: this.userid,
  11734. unitIndex: _unitIndex,
  11735. },
  11736. ];
  11737. this.ajax
  11738. .post(this.$store.state.api + "updateWorkNew4", params)
  11739. .then((res) => {
  11740. this.$message({
  11741. message: "修改成功",
  11742. type: "success",
  11743. });
  11744. this.courseId = this.cid;
  11745. this.addtips();
  11746. })
  11747. .catch((err) => {
  11748. this.$message.error("网络不佳");
  11749. console.error(err);
  11750. });
  11751. },
  11752. updateWork3(unitIndex) {
  11753. let _unitIndex = unitIndex;
  11754. let cPan = 1;
  11755. for (
  11756. var j = 0;
  11757. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11758. j++
  11759. ) {
  11760. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11761. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11762. j
  11763. ].proVisible2 = false;
  11764. if (
  11765. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11766. .length > 1
  11767. ) {
  11768. for (
  11769. var z = 0;
  11770. z <
  11771. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11772. .length;
  11773. z++
  11774. ) {
  11775. if (
  11776. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11777. z
  11778. ].tool.length
  11779. ) {
  11780. this.$message.error("请把工具添加完整");
  11781. cPan = 2;
  11782. break;
  11783. }
  11784. }
  11785. }
  11786. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11787. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11788. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11789. (ele) => {
  11790. return ele.value != "" || ele.detail != "" || ele.target != "";
  11791. }
  11792. );
  11793. }
  11794. }
  11795. this.inputShow = true;
  11796. if (cPan == 2) {
  11797. this.steps--;
  11798. return;
  11799. }
  11800. let params = [
  11801. {
  11802. cid: this.cid,
  11803. chapters: JSON.stringify(this.unitJson),
  11804. uid: this.userid,
  11805. unitIndex: _unitIndex,
  11806. },
  11807. ];
  11808. this.ajax
  11809. .post(this.$store.state.api + "updateWorkNew4", params)
  11810. .then((res) => {
  11811. // this.$message({
  11812. // message: "修改成功",
  11813. // type: "success",
  11814. // });
  11815. this.courseId = this.cid;
  11816. this.addtips()
  11817. })
  11818. .catch((err) => {
  11819. this.$message.error("网络不佳");
  11820. console.error(err);
  11821. });
  11822. },
  11823. updateWork() {
  11824. let cPan = 1;
  11825. for (var i = 0; i < this.unitJson.length; i++) {
  11826. for (
  11827. var j = 0;
  11828. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11829. j++
  11830. ) {
  11831. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11832. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11833. if (
  11834. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11835. ) {
  11836. for (
  11837. var z = 0;
  11838. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11839. z++
  11840. ) {
  11841. if (
  11842. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11843. .length
  11844. ) {
  11845. this.$message.error("请把工具添加完整");
  11846. cPan = 2;
  11847. break;
  11848. }
  11849. }
  11850. }
  11851. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11852. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11853. i
  11854. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11855. return ele.value != "" || ele.detail != "" || ele.target != "";
  11856. });
  11857. }
  11858. }
  11859. }
  11860. this.inputShow = true;
  11861. if (cPan == 2) {
  11862. this.steps--;
  11863. return;
  11864. }
  11865. for (var i = 0; i < this.unitJson.length; i++) {
  11866. delete this.unitJson[i].isUpdate;
  11867. }
  11868. if(!this.targetCourseText2){
  11869. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11870. }
  11871. let params = [
  11872. {
  11873. cid: this.cid,
  11874. title: this.courseName,
  11875. brief: this.courseText,
  11876. cover:
  11877. this.cover.length > 0
  11878. ? JSON.stringify(this.cover)
  11879. : JSON.stringify([
  11880. {
  11881. name: "noBanner.jpg",
  11882. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11883. uid: 1656409780264,
  11884. status: "success",
  11885. },
  11886. ]),
  11887. evaId: this.evalua,
  11888. astudent:
  11889. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11890. see: this.isTeacherSee == true ? 1 : 0,
  11891. chapters: JSON.stringify(this.unitJson),
  11892. template: this.myWord != "undefined" ? this.myWord : [],
  11893. uid: this.userid,
  11894. courseType: JSON.stringify(this.courseTypeId),
  11895. ateacher:
  11896. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11897. inviteCode: JSON.stringify(this.inviteCode),
  11898. refile: JSON.stringify(this.infoData),
  11899. reBrief: this.courseText2,
  11900. cpote: JSON.stringify(this.cpote),
  11901. setting: JSON.stringify({
  11902. courseJie: this.courseJie,
  11903. courseTime: this.courseTime,
  11904. teacherInfoData: this.teacherInfoData,
  11905. teacherCourseText: this.teacherCourseText,
  11906. targetCourseText: this.targetCourseText,
  11907. cankaoInfoData: this.cankaoInfoData,
  11908. mubiaoInfoData: this.mubiaoInfoData,
  11909. xuanzeInfoData: this.xuanzeInfoData,
  11910. pingjiaInfoData: this.pingjiaInfoData,
  11911. infoData2: this.infoData2,
  11912. isuseT: this.isuseT,
  11913. mode: this.mode,
  11914. targetCourseText2: this.targetCourseText2,
  11915. chatid: this.chatid,
  11916. languageSetting: this.languageSetting,
  11917. knowInfoData: this.knowInfoData,
  11918. knowFileids: this.knowFileids,
  11919. }),
  11920. iresearch: this.isFileSearch ? 1 : 2,
  11921. },
  11922. ];
  11923. this.ajax
  11924. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  11925. .then((res) => {
  11926. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11927. if (this.cidType == 1) {
  11928. this.$message({
  11929. message: "修改成功",
  11930. type: "success",
  11931. });
  11932. } else {
  11933. this.$message({
  11934. message: "新增成功",
  11935. type: "success",
  11936. });
  11937. }
  11938. }
  11939. this.number = this.nbOrder;
  11940. this.courseId = this.cid;
  11941. this.addtips()
  11942. })
  11943. .catch((err) => {
  11944. this.$message.error("网络不佳");
  11945. console.error(err);
  11946. });
  11947. },
  11948. insertWord() {
  11949. this.dialogVisible1 = true;
  11950. this.updateBoolean2 = false;
  11951. this.tTitle = "";
  11952. this.tdetail = "";
  11953. },
  11954. addWord() {
  11955. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  11956. name: this.tTitle,
  11957. content: this.tdetail,
  11958. uid: this.guid(),
  11959. });
  11960. this.dialogVisible1 = false;
  11961. },
  11962. upWord() { },
  11963. selectWord(uid, i, c) {
  11964. this.dialogVisible1 = true;
  11965. this.updateBoolean2 = true;
  11966. if (
  11967. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  11968. ) {
  11969. this.tTitle =
  11970. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  11971. this.tdetail =
  11972. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  11973. }
  11974. },
  11975. isAddPP() {
  11976. if (this.checkboxList.length > 0) {
  11977. this.$message({
  11978. message: "添加成功",
  11979. type: "success",
  11980. });
  11981. this.dialogVisible3 = false;
  11982. } else {
  11983. this.$message({
  11984. message: "请添加课程成员",
  11985. type: "error",
  11986. });
  11987. }
  11988. },
  11989. isAddClass() {
  11990. this.dialogVisibleClass = false;
  11991. },
  11992. isAddPPTeacher() {
  11993. this.dialogVisibleMember = false;
  11994. this.setMan();
  11995. },
  11996. getTipsTemplate(){
  11997. if(this.templateid){
  11998. let params = {
  11999. id: this.templateid
  12000. }
  12001. this.ajax
  12002. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12003. .then((res) => {
  12004. if(res.data[0].length){
  12005. this.tipsJson = res.data[0][0]
  12006. this.aiJson = JSON.parse(res.data[0][0].tips)
  12007. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12008. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12009. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12010. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12011. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12012. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12013. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12014. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12015. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12016. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12017. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12018. }
  12019. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  12020. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  12021. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  12022. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  12023. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  12024. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  12025. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  12026. // }
  12027. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  12028. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12029. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12030. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12031. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  12032. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12033. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  12034. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12035. // }
  12036. this.$forceUpdate();
  12037. }
  12038. })
  12039. .catch((err) => { });
  12040. }
  12041. },
  12042. getTemplate() {
  12043. this.ajax
  12044. .get(this.$store.state.api + "getCourseTemplateT", "")
  12045. .then((res) => {
  12046. this.templateArray = res.data[0];
  12047. this.getTemplateOid();
  12048. this.$forceUpdate();
  12049. })
  12050. .catch((err) => { });
  12051. },
  12052. getTemplateOid() {
  12053. let params = {
  12054. oid: this.oid,
  12055. };
  12056. this.ajax
  12057. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12058. .then((res) => {
  12059. if (res.data[0].length) {
  12060. this.templateArray = [...res.data[0], ...this.templateArray];
  12061. }
  12062. this.getTemplateOrg();
  12063. this.$forceUpdate();
  12064. })
  12065. .catch((err) => { });
  12066. },
  12067. getTemplateOrg() {
  12068. let params = {
  12069. oid: this.org,
  12070. };
  12071. this.ajax
  12072. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12073. .then((res) => {
  12074. if (res.data[0].length) {
  12075. this.templateArray = [...res.data[0], ...this.templateArray];
  12076. }
  12077. this.$forceUpdate();
  12078. })
  12079. .catch((err) => { });
  12080. },
  12081. clearChoose() {
  12082. this.clearArray.splice(this.templateC.id, 1);
  12083. this.dialogVisible2 = false;
  12084. },
  12085. clearAttText() {
  12086. this.AttText = {
  12087. title: "",
  12088. text: "",
  12089. };
  12090. this.dialogVisible6 = false;
  12091. },
  12092. clearLine() {
  12093. this.line = "";
  12094. this.dialogVisible7 = false;
  12095. },
  12096. openTemplate() {
  12097. this.ctJson = {};
  12098. this.templateDialog = true;
  12099. },
  12100. checkctJson(json) {
  12101. if (this.ctJson.id == json.id) {
  12102. this.ctJson = {};
  12103. } else {
  12104. this.ctJson = json;
  12105. }
  12106. },
  12107. addTemplate(res) {
  12108. let _this = this;
  12109. let _res = [];
  12110. if (res.id == 1) {
  12111. _res = [
  12112. {
  12113. dyName: "", //单元标题
  12114. easy: 1,
  12115. chapterInfo: [
  12116. {
  12117. isread: false,
  12118. chapterid: this.guid(),
  12119. title: "",
  12120. courseName: "",
  12121. taskJson: [
  12122. {
  12123. task: "",
  12124. taskDetail: "",
  12125. chapterData: [],
  12126. toolText: "",
  12127. toolChoose: [
  12128. {
  12129. tool: [],
  12130. toolDetail: "",
  12131. toolType: 0,
  12132. askCount: 1,
  12133. askTitle: "",
  12134. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12135. },
  12136. ],
  12137. isShowTools: false,
  12138. askCount: 1,
  12139. isFold: 1,
  12140. askTitle: "",
  12141. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12142. checkJson: [{ checkCount: [], checkPerent: [] }],
  12143. homeworkList: [],
  12144. },
  12145. ],
  12146. itemCount: 1,
  12147. fileList1: [],
  12148. video: [],
  12149. testData: [],
  12150. pData: [],
  12151. templateArray: [],
  12152. },
  12153. ],
  12154. },
  12155. ];
  12156. this.updateCourseState(1);
  12157. } else if (res.id == 2) {
  12158. let stageData = [];
  12159. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12160. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12161. if (!iframe && !iframe2) {
  12162. this.$message.error("请使用AI共创生成");
  12163. return;
  12164. }
  12165. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12166. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12167. if (
  12168. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  12169. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  12170. ) {
  12171. this.$message.error("请使用AI共创生成");
  12172. return;
  12173. }
  12174. stageData = copyData
  12175. ? copyData.stageData
  12176. : copyData2
  12177. ? copyData2.stageData
  12178. : [""];
  12179. for (var i = 0; i < stageData.length; i++) {
  12180. _res.push({
  12181. dyName: stageData[i], //单元标题
  12182. chapterInfo: [
  12183. {
  12184. isread: false,
  12185. chapterid: this.guid(),
  12186. title: "",
  12187. courseName: "",
  12188. taskJson: [
  12189. {
  12190. task: "",
  12191. taskDetail: "",
  12192. chapterData: [],
  12193. toolText: "",
  12194. toolChoose: [
  12195. {
  12196. tool: [],
  12197. toolDetail: "",
  12198. toolType: 0,
  12199. askCount: 1,
  12200. askTitle: "",
  12201. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12202. },
  12203. ],
  12204. isShowTools: false,
  12205. askCount: 1,
  12206. isFold: 1,
  12207. askTitle: "",
  12208. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12209. checkJson: [{ checkCount: [], checkPerent: [] }],
  12210. homeworkList: [],
  12211. },
  12212. ],
  12213. itemCount: 1,
  12214. fileList1: [],
  12215. video: [],
  12216. testData: [],
  12217. pData: [],
  12218. templateArray: [],
  12219. },
  12220. ],
  12221. });
  12222. }
  12223. this.updateCourseState(1);
  12224. } else if (!Object.keys(res).length) {
  12225. this.$message.error("请选择模板");
  12226. retrun;
  12227. } else {
  12228. _res = JSON.parse(res.chapters);
  12229. this.updateCourseState(parseInt(res.state));
  12230. }
  12231. _this
  12232. .$confirm(
  12233. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  12234. "提示",
  12235. {
  12236. confirmButtonText: "确定",
  12237. cancelButtonText: "取消",
  12238. type: "warning",
  12239. }
  12240. )
  12241. .then(() => {
  12242. _this.unitJson = _res;
  12243. _this.updateWork();
  12244. // _this.steps++;
  12245. _this.templateDialog = false;
  12246. setTimeout(() => {
  12247. this.checkEva(this.checkId);
  12248. setTimeout(() => {
  12249. this.checkEva(this.checkId);
  12250. }, 100);
  12251. }, 1000);
  12252. })
  12253. .catch(() => {
  12254. return;
  12255. });
  12256. },
  12257. checkTemplate(res) {
  12258. let _this = this;
  12259. _this
  12260. .$confirm(
  12261. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  12262. "提示",
  12263. {
  12264. confirmButtonText: "确定",
  12265. cancelButtonText: "取消",
  12266. type: "warning",
  12267. }
  12268. )
  12269. .then(() => {
  12270. _this.unitJson = JSON.parse(res.chapters);
  12271. _this.steps++;
  12272. setTimeout(() => {
  12273. this.checkEva(this.checkId);
  12274. setTimeout(() => {
  12275. this.checkEva(this.checkId);
  12276. }, 100);
  12277. }, 1000);
  12278. })
  12279. .catch(() => {
  12280. return;
  12281. });
  12282. },
  12283. checkTemplate1(w) {
  12284. this.steps++;
  12285. },
  12286. checkTemplate2() {
  12287. let _this = this;
  12288. _this
  12289. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  12290. confirmButtonText: "确定",
  12291. cancelButtonText: "取消",
  12292. type: "warning",
  12293. })
  12294. .then(() => {
  12295. _this.unitIndex = 0;
  12296. _this.unitJson = [
  12297. {
  12298. dyName: "", //单元标题
  12299. chapterInfo: [
  12300. {
  12301. isread: false,
  12302. chapterid: this.guid(),
  12303. title: "",
  12304. courseName: "",
  12305. taskJson: [
  12306. {
  12307. task: "",
  12308. taskDetail: "",
  12309. chapterData: [],
  12310. toolText: "",
  12311. toolChoose: [
  12312. {
  12313. tool: [],
  12314. toolDetail: "",
  12315. toolType: 0,
  12316. askCount: 1,
  12317. askTitle: "",
  12318. askJson: [
  12319. { askstitle: "", askItem: 1, checkList: [] },
  12320. ],
  12321. },
  12322. ],
  12323. isShowTools: false,
  12324. askCount: 1,
  12325. isFold: 1,
  12326. askTitle: "",
  12327. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12328. checkJson: [{ checkCount: [], checkPerent: [] }],
  12329. homeworkList: [],
  12330. },
  12331. ],
  12332. itemCount: 1,
  12333. fileList1: [],
  12334. video: [],
  12335. testData: [],
  12336. pData: [],
  12337. templateArray: [],
  12338. },
  12339. ],
  12340. },
  12341. ];
  12342. this.steps++;
  12343. setTimeout(() => {
  12344. this.checkEva(this.checkId);
  12345. setTimeout(() => {
  12346. this.checkEva(this.checkId);
  12347. }, 100);
  12348. }, 1000);
  12349. this.updateWork();
  12350. })
  12351. .catch(() => {
  12352. return;
  12353. });
  12354. },
  12355. checkTemplate3() {
  12356. let _this = this;
  12357. _this
  12358. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  12359. confirmButtonText: "确定",
  12360. cancelButtonText: "取消",
  12361. type: "warning",
  12362. })
  12363. .then(() => {
  12364. _this.unitIndex = 0;
  12365. _this.unitJson = [
  12366. {
  12367. dyName: "", //单元标题
  12368. easy: 1,
  12369. chapterInfo: [
  12370. {
  12371. isread: false,
  12372. chapterid: this.guid(),
  12373. title: "",
  12374. courseName: "",
  12375. taskJson: [
  12376. {
  12377. task: "",
  12378. taskDetail: "",
  12379. chapterData: [],
  12380. toolText: "",
  12381. toolChoose: [
  12382. {
  12383. tool: [],
  12384. toolDetail: "",
  12385. toolType: 0,
  12386. askCount: 1,
  12387. askTitle: "",
  12388. askJson: [
  12389. { askstitle: "", askItem: 1, checkList: [] },
  12390. ],
  12391. },
  12392. ],
  12393. isShowTools: false,
  12394. askCount: 1,
  12395. isFold: 1,
  12396. askTitle: "",
  12397. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12398. checkJson: [{ checkCount: [], checkPerent: [] }],
  12399. homeworkList: [],
  12400. },
  12401. ],
  12402. itemCount: 1,
  12403. fileList1: [],
  12404. video: [],
  12405. testData: [],
  12406. pData: [],
  12407. templateArray: [],
  12408. },
  12409. ],
  12410. },
  12411. ];
  12412. // this.steps++;
  12413. this.updateWork();
  12414. })
  12415. .catch(() => {
  12416. return;
  12417. });
  12418. },
  12419. checkTemplate4() {
  12420. let _this = this;
  12421. _this
  12422. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  12423. confirmButtonText: "确定",
  12424. cancelButtonText: "取消",
  12425. type: "warning",
  12426. })
  12427. .then(() => {
  12428. _this.unitIndex = 0;
  12429. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  12430. this.steps++;
  12431. this.updateWork();
  12432. })
  12433. .catch(() => {
  12434. return;
  12435. });
  12436. },
  12437. wordNext() {
  12438. this.dialogVisible2 = false;
  12439. },
  12440. isAddOrUpdateAttText() {
  12441. if (this.AttTextType == 0) {
  12442. this.addAttTextMessage();
  12443. } else {
  12444. this.updateAttText();
  12445. }
  12446. },
  12447. isAddOrUpdateLine() {
  12448. if (!this.lineTitle) {
  12449. this.$message.error("请填写链接标题");
  12450. return;
  12451. }
  12452. if (this.lineType == 0) {
  12453. this.addLine();
  12454. } else {
  12455. this.updateLine();
  12456. }
  12457. },
  12458. addAttTextMessage() {
  12459. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12460. this.taskCount
  12461. ].chapterData.unshift({
  12462. name: this.AttText.title,
  12463. url: this.AttText.text,
  12464. type: 6,
  12465. });
  12466. this.imgChange1(null, null, 6, this.taskCount);
  12467. this.dialogVisible6 = false;
  12468. },
  12469. selectAttText(itemTaskIndex, i) {
  12470. this.AttText.title =
  12471. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12472. itemTaskIndex
  12473. ].chapterData[i].name;
  12474. this.AttText.text =
  12475. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12476. itemTaskIndex
  12477. ].chapterData[i].url;
  12478. this.taskCount = itemTaskIndex;
  12479. this.AttTextIndex = i;
  12480. this.AttTextType = 1;
  12481. this.dialogVisible6 = true;
  12482. },
  12483. updateAttText() {
  12484. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12485. this.taskCount
  12486. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  12487. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12488. this.taskCount
  12489. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  12490. this.dialogVisible6 = false;
  12491. },
  12492. addLine() {
  12493. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12494. this.lineCount
  12495. ].chapterData.unshift({
  12496. name: "链接",
  12497. title: this.lineTitle,
  12498. url: this.line,
  12499. type: 8,
  12500. });
  12501. this.imgChange1(null, null, 8, this.lineCount);
  12502. this.dialogVisible7 = false;
  12503. },
  12504. selectLine(itemTaskIndex, i) {
  12505. this.line =
  12506. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12507. itemTaskIndex
  12508. ].chapterData[i].url;
  12509. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12510. itemTaskIndex
  12511. ].chapterData[i].title
  12512. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12513. .chapterData[i].title
  12514. : "";
  12515. this.taskCount = itemTaskIndex;
  12516. this.lineCount = i;
  12517. this.lineType = 1;
  12518. this.dialogVisible7 = true;
  12519. },
  12520. openUpdateSource(itemTaskIndex, i) {
  12521. this.sourceData = {};
  12522. let source =
  12523. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12524. .chapterData[i];
  12525. this.sourceData[source.id] = {};
  12526. this.sourceData[source.id].name = source.title;
  12527. this.sourceData[source.id].url = source.url;
  12528. this.dialogVisibleSource = true;
  12529. this.updateSourcePan = true;
  12530. this.taskCount = itemTaskIndex;
  12531. this.lineCount = i;
  12532. },
  12533. updateLine() {
  12534. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12535. this.taskCount
  12536. ].chapterData[this.lineCount].url = this.line;
  12537. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12538. this.taskCount
  12539. ].chapterData[this.lineCount].title = this.lineTitle;
  12540. this.dialogVisible7 = false;
  12541. },
  12542. addPP() {
  12543. this.dialogVisible3 = true;
  12544. },
  12545. goTo(path) {
  12546. this.$router.push(path);
  12547. },
  12548. openTools(itemTaskIndex, i, toolIndex) {
  12549. this.toolIndex = toolIndex;
  12550. this.taskCount = itemTaskIndex;
  12551. if (i == 4) {
  12552. if (toolIndex == null) {
  12553. var a =
  12554. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12555. .chapterData;
  12556. for (var i = 0; i < a.length; i++) {
  12557. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  12558. this.askJson =
  12559. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12560. itemTaskIndex
  12561. ].chapterData[i].askJson;
  12562. }
  12563. }
  12564. } else {
  12565. this.askJson = JSON.parse(
  12566. JSON.stringify(
  12567. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12568. itemTaskIndex
  12569. ].toolChoose[toolIndex]
  12570. )
  12571. );
  12572. }
  12573. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  12574. this.dialogVisible5 = true;
  12575. } else if (i == 45) {
  12576. if (
  12577. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12578. .toolChoose[toolIndex].testJson
  12579. ) {
  12580. this.testJson = JSON.parse(
  12581. JSON.stringify(
  12582. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12583. itemTaskIndex
  12584. ].toolChoose[toolIndex].testJson
  12585. )
  12586. );
  12587. } else {
  12588. var testJson = {
  12589. testCount: 1,
  12590. testTitle: "",
  12591. testJson: [
  12592. {
  12593. teststitle: "",
  12594. testItem: 1,
  12595. checkList: [],
  12596. timuList: [],
  12597. answer: [],
  12598. type: "1",
  12599. },
  12600. ],
  12601. };
  12602. this.testJson = testJson;
  12603. }
  12604. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  12605. this.dialogVisibleChoice = true;
  12606. } else if (i == 47) {
  12607. if (
  12608. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12609. .toolChoose[toolIndex].sentenceList
  12610. ) {
  12611. this.sentenceList = JSON.parse(
  12612. JSON.stringify(
  12613. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12614. itemTaskIndex
  12615. ].toolChoose[toolIndex].sentenceList
  12616. )
  12617. );
  12618. } else {
  12619. var sentenceList = [
  12620. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  12621. ];
  12622. this.sentenceList = sentenceList;
  12623. }
  12624. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  12625. this.dialogVisibleSentence = true;
  12626. } else if (i == 48) {
  12627. if (
  12628. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12629. .toolChoose[toolIndex].tableJson
  12630. ) {
  12631. this.tableJson = JSON.parse(
  12632. JSON.stringify(
  12633. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12634. itemTaskIndex
  12635. ].toolChoose[toolIndex].tableJson
  12636. )
  12637. );
  12638. } else {
  12639. var tableJson = { text: "" };
  12640. this.tableJson = tableJson;
  12641. }
  12642. this.dialogVisibleTable = true;
  12643. } else if (i == 52) {
  12644. if (
  12645. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12646. .toolChoose[toolIndex].wordJson
  12647. ) {
  12648. this.wordJson = JSON.parse(
  12649. JSON.stringify(
  12650. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12651. itemTaskIndex
  12652. ].toolChoose[toolIndex].wordJson
  12653. )
  12654. );
  12655. } else {
  12656. var wordJson = { text: "" };
  12657. this.wordJson = wordJson;
  12658. }
  12659. this.dialogVisibleWord = true;
  12660. // else if (i == 50) {
  12661. // if (
  12662. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12663. // .toolChoose[toolIndex].uploadJson
  12664. // ) {
  12665. // this.uploadJson = JSON.parse(
  12666. // JSON.stringify(
  12667. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12668. // itemTaskIndex
  12669. // ].toolChoose[toolIndex].uploadJson
  12670. // )
  12671. // );
  12672. // } else {
  12673. // var uploadJson = [];
  12674. // this.uploadJson = uploadJson;
  12675. // }
  12676. // this.dialogVisibleMoreUpload = true;
  12677. // }
  12678. } else if (i == 10) {
  12679. if (
  12680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12681. .toolChoose[toolIndex].preTime
  12682. ) {
  12683. this.preTime = JSON.parse(
  12684. JSON.stringify(
  12685. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12686. itemTaskIndex
  12687. ].toolChoose[toolIndex].preTime
  12688. )
  12689. );
  12690. } else {
  12691. var preTime = 0;
  12692. this.preTime = preTime;
  12693. }
  12694. this.dialogVisiblePreTime = true;
  12695. } else if (i == 49) {
  12696. if (
  12697. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12698. .toolChoose[toolIndex].groupJson
  12699. ) {
  12700. this.groupJson = JSON.parse(
  12701. JSON.stringify(
  12702. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12703. itemTaskIndex
  12704. ].toolChoose[toolIndex].groupJson
  12705. )
  12706. );
  12707. } else {
  12708. var groupJson = {
  12709. group: [{ name: "第1组" }],
  12710. number: undefined,
  12711. islock: 1,
  12712. };
  12713. this.groupJson = groupJson;
  12714. }
  12715. this.dialogVisibleGroup = true;
  12716. } else if (i == 62) {
  12717. if (
  12718. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12719. .toolChoose[toolIndex].videoJson
  12720. ) {
  12721. this.videoJson = JSON.parse(
  12722. JSON.stringify(
  12723. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12724. itemTaskIndex
  12725. ].toolChoose[toolIndex].videoJson
  12726. )
  12727. );
  12728. } else {
  12729. var videoJson = {
  12730. video: "",
  12731. setting: [],
  12732. };
  12733. this.videoJson = videoJson;
  12734. }
  12735. this.dialogVisibleVideo = true;
  12736. } else if (i == 15) {
  12737. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12738. itemTaskIndex
  12739. ].toolChoose[toolIndex].answerQ
  12740. ? JSON.parse(
  12741. JSON.stringify(
  12742. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12743. itemTaskIndex
  12744. ].toolChoose[toolIndex].answerQ
  12745. )
  12746. )
  12747. : "";
  12748. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  12749. this.dialogVisible8 = true;
  12750. } else if (i == 40) {
  12751. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12752. itemTaskIndex
  12753. ].toolChoose[toolIndex].rateJson
  12754. ? JSON.parse(
  12755. JSON.stringify(
  12756. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12757. itemTaskIndex
  12758. ].toolChoose[toolIndex].rateJson
  12759. )
  12760. )
  12761. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  12762. this.selectSteps = 1;
  12763. this.dialogVisibleRate = true;
  12764. } else if (i == 42) {
  12765. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12766. itemTaskIndex
  12767. ].toolChoose[toolIndex].answerQ
  12768. ? JSON.parse(
  12769. JSON.stringify(
  12770. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12771. itemTaskIndex
  12772. ].toolChoose[toolIndex].answerQ
  12773. )
  12774. )
  12775. : "";
  12776. this.dialogVisibleMp3 = true;
  12777. } else if (i == 41) {
  12778. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12779. itemTaskIndex
  12780. ].toolChoose[toolIndex].selectJson
  12781. ? JSON.parse(
  12782. JSON.stringify(
  12783. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12784. itemTaskIndex
  12785. ].toolChoose[toolIndex].selectJson
  12786. )
  12787. )
  12788. : { url: "", select: [], answer: [] };
  12789. this.selectSteps = 1;
  12790. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  12791. this.dialogVisibleSelect = true;
  12792. } else if (i == 3) {
  12793. top.postMessage(
  12794. {
  12795. tools: "3y",
  12796. cid: this.cid,
  12797. stage: this.unitIndex,
  12798. task: itemTaskIndex,
  12799. tool: toolIndex,
  12800. },
  12801. "*"
  12802. );
  12803. } else if (i == 1) {
  12804. top.postMessage(
  12805. {
  12806. tools: "1y",
  12807. cid: this.cid,
  12808. stage: this.unitIndex,
  12809. task: itemTaskIndex,
  12810. tool: toolIndex,
  12811. },
  12812. "*"
  12813. );
  12814. } else if (i == 57) {
  12815. top.postMessage(
  12816. {
  12817. tools: "57y",
  12818. cid: this.cid,
  12819. stage: this.unitIndex,
  12820. task: itemTaskIndex,
  12821. tool: toolIndex,
  12822. },
  12823. "*"
  12824. );
  12825. } else if (i == 69) {
  12826. this.englishList = {};
  12827. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  12828. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  12829. ? JSON.parse(
  12830. JSON.stringify(
  12831. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12832. itemTaskIndex
  12833. ].toolChoose[toolIndex].englishList
  12834. )
  12835. )
  12836. : {};
  12837. this.$forceUpdate();
  12838. this.englishDialogVisible = true;
  12839. } else if (i == 70) {
  12840. this.englishVoiceJson = {};
  12841. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  12842. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  12843. ? JSON.parse(
  12844. JSON.stringify(
  12845. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12846. itemTaskIndex
  12847. ].toolChoose[toolIndex].englishVoiceJson
  12848. )
  12849. )
  12850. : {
  12851. title: '',
  12852. detail: '',
  12853. array: []
  12854. };
  12855. // {
  12856. // time: "",
  12857. // class: "",
  12858. // difficulty: 0,
  12859. // topic: "",
  12860. // isShow: false,
  12861. // eva: 0,
  12862. // aiEva: {
  12863. // isAiEva: false,
  12864. // aiEvaChoose: [],
  12865. // },
  12866. // allfType: [],
  12867. // englishJson: {},
  12868. // };
  12869. this.$forceUpdate();
  12870. this.EnglishVoiceDialog = true;
  12871. }
  12872. },
  12873. setEnglishVoiceJson(val) {
  12874. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12875. this.taskCount
  12876. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  12877. JSON.stringify(val)
  12878. );
  12879. this.$forceUpdate();
  12880. if (
  12881. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  12882. .toolChoose[this.toolIndex].tool != 70
  12883. ) {
  12884. this.addTools(70, this.taskCount, this.toolIndex);
  12885. }
  12886. },
  12887. chapAddTools(i) {
  12888. if (this.chapTools[0].tools.length == 0) {
  12889. this.chapTools[0].tools.push(i);
  12890. } else {
  12891. if (this.chapTools[0].tools.indexOf(i) != -1) {
  12892. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  12893. } else {
  12894. this.chapTools[0].tools.push(i);
  12895. }
  12896. }
  12897. this.$forceUpdate();
  12898. },
  12899. addChaptersDataTools() {
  12900. if (this.chapTools[0].tools.indexOf(4) != -1) {
  12901. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12902. this.chapCount
  12903. ].chapterData.unshift({
  12904. name: this.chapTools[0].toolDetail,
  12905. url: this.chapTools[0].tools,
  12906. type: 7,
  12907. askJson: this.askJson,
  12908. });
  12909. } else {
  12910. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12911. this.chapCount
  12912. ].chapterData.unshift({
  12913. name: this.chapTools[0].toolDetail,
  12914. url: this.chapTools[0].tools,
  12915. type: 7,
  12916. });
  12917. }
  12918. this.imgChange1(null, null, 7, this.chapCount);
  12919. this.dialogVisible4 = false;
  12920. },
  12921. addTools(i, itemTaskIndex, toolIndex) {
  12922. // if (
  12923. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12924. // .toolChoose[toolIndex].tool.length == 0
  12925. // ) {
  12926. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12927. // itemTaskIndex
  12928. // ].toolChoose[toolIndex].tool.push(i);
  12929. // } else {
  12930. // if (
  12931. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12932. // itemTaskIndex
  12933. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  12934. // ) {
  12935. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12936. // itemTaskIndex
  12937. // ].toolChoose[toolIndex].tool.splice(
  12938. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12939. // itemTaskIndex
  12940. // ].toolChoose[toolIndex].tool.indexOf(i),
  12941. // 1
  12942. // );
  12943. // } else {
  12944. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12945. // itemTaskIndex
  12946. // ].toolChoose[toolIndex].tool.push(i);
  12947. // }
  12948. // console.log(
  12949. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12950. // .toolChoose[toolIndex].tool
  12951. // );
  12952. // }
  12953. if (i == 4) {
  12954. if (
  12955. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12956. .toolChoose[toolIndex].askJson.askTitle == "" ||
  12957. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12958. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  12959. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12960. .toolChoose[toolIndex].askJson[0].checkList < 2
  12961. ) {
  12962. this.openTools(itemTaskIndex, 4, toolIndex);
  12963. // this.$message({
  12964. // message: "请填写完整问卷内容",
  12965. // type: "error",
  12966. // });
  12967. return;
  12968. }
  12969. }
  12970. if (i == 45) {
  12971. if (
  12972. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12973. .toolChoose[toolIndex].testJson ||
  12974. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12975. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  12976. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12977. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  12978. ) {
  12979. this.openTools(itemTaskIndex, 45, toolIndex);
  12980. // this.$message({
  12981. // message: "请填写完整问卷内容",
  12982. // type: "error",
  12983. // });
  12984. return;
  12985. }
  12986. }
  12987. if (i == 47) {
  12988. if (
  12989. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12990. .toolChoose[toolIndex].sentenceList ||
  12991. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12992. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  12993. ) {
  12994. this.openTools(itemTaskIndex, 47, toolIndex);
  12995. return;
  12996. }
  12997. }
  12998. if (i == 69) {
  12999. if (
  13000. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13001. .toolChoose[toolIndex].englishList
  13002. ) {
  13003. this.openTools(itemTaskIndex, 69, toolIndex);
  13004. return;
  13005. }
  13006. }
  13007. if (i == 70) {
  13008. if (
  13009. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13010. .toolChoose[toolIndex].englishVoiceJson
  13011. ) {
  13012. this.openTools(itemTaskIndex, 70, toolIndex);
  13013. return;
  13014. }
  13015. }
  13016. // if (i == 48) {
  13017. // if (
  13018. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13019. // .toolChoose[toolIndex].tableJson
  13020. // ) {
  13021. // this.openTools(itemTaskIndex, 48, toolIndex);
  13022. // return;
  13023. // }
  13024. // }
  13025. // if (i == 50) {
  13026. // if (
  13027. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13028. // .toolChoose[toolIndex].uploadJson
  13029. // ) {
  13030. // this.openTools(itemTaskIndex, 50, toolIndex);
  13031. // return;
  13032. // }
  13033. // }
  13034. if (i == 49) {
  13035. if (
  13036. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13037. .toolChoose[toolIndex].groupJson
  13038. ) {
  13039. this.openTools(itemTaskIndex, 49, toolIndex);
  13040. return;
  13041. }
  13042. }
  13043. if (i == 62) {
  13044. if (
  13045. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13046. .toolChoose[toolIndex].videoJson
  13047. ) {
  13048. this.openTools(itemTaskIndex, 62, toolIndex);
  13049. return;
  13050. }
  13051. }
  13052. if (i == 15) {
  13053. if (
  13054. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13055. .toolChoose[toolIndex].answerQ ||
  13056. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13057. .toolChoose[toolIndex].answerQ == ""
  13058. ) {
  13059. this.openTools(itemTaskIndex, 15, toolIndex);
  13060. // this.$message({
  13061. // message: "请填写问答内容",
  13062. // type: "error",
  13063. // });
  13064. return;
  13065. }
  13066. }
  13067. if (i == 40) {
  13068. if (
  13069. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13070. .toolChoose[toolIndex].rateJson ||
  13071. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13072. .toolChoose[toolIndex].rateJson.length
  13073. ) {
  13074. this.openTools(itemTaskIndex, 40, toolIndex);
  13075. return;
  13076. }
  13077. }
  13078. if (i == 41) {
  13079. if (
  13080. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13081. .toolChoose[toolIndex].selectJson ||
  13082. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13083. .toolChoose[toolIndex].selectJson.url == "" ||
  13084. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13085. .toolChoose[toolIndex].selectJson.select.length ||
  13086. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13087. .toolChoose[toolIndex].selectJson.answer.length
  13088. ) {
  13089. this.openTools(itemTaskIndex, 41, toolIndex);
  13090. return;
  13091. }
  13092. }
  13093. if (i == 42) {
  13094. if (
  13095. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13096. .toolChoose[toolIndex].answerQ ||
  13097. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13098. .toolChoose[toolIndex].answerQ == ""
  13099. ) {
  13100. this.openTools(itemTaskIndex, 42, toolIndex);
  13101. return;
  13102. }
  13103. }
  13104. if (
  13105. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13106. .toolChoose[toolIndex].tool.length > 0
  13107. ) {
  13108. if (
  13109. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13110. itemTaskIndex
  13111. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  13112. ) {
  13113. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13114. itemTaskIndex
  13115. ].toolChoose[toolIndex].tool.splice(
  13116. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13117. itemTaskIndex
  13118. ].toolChoose[toolIndex].tool.indexOf(i),
  13119. 1
  13120. );
  13121. } else {
  13122. // this.$message({
  13123. // message: "每个工具只能添加一个",
  13124. // type: "error",
  13125. // });
  13126. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13127. itemTaskIndex
  13128. ].toolChoose[toolIndex].tool = [];
  13129. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13130. itemTaskIndex
  13131. ].toolChoose[toolIndex].tool.push(i);
  13132. }
  13133. } else {
  13134. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13135. itemTaskIndex
  13136. ].toolChoose[toolIndex].tool.push(i);
  13137. }
  13138. this.$forceUpdate();
  13139. },
  13140. addAskList(index) {
  13141. this.askJson.askJson.splice(index + 1, 0, {
  13142. askstitle: "",
  13143. askItem: 1,
  13144. checkList: [],
  13145. });
  13146. this.askJson.askCount++;
  13147. },
  13148. addTestList(index) {
  13149. this.testJson.testJson.splice(index + 1, 0, {
  13150. teststitle: "",
  13151. testItem: 1,
  13152. checkList: [],
  13153. timuList: [],
  13154. answer: [],
  13155. type: "1",
  13156. });
  13157. this.testJson.testCount++;
  13158. },
  13159. deleteAskList(index) {
  13160. if (
  13161. !this.askJson.askJson[index].askstitle &&
  13162. this.askJson.askJson[index].askItem == 1 &&
  13163. !this.askJson.askJson[index].checkList[0]
  13164. ) {
  13165. this.askJson.askJson.splice(index, 1);
  13166. this.askJson.askCount--;
  13167. } else {
  13168. let _this = this;
  13169. _this
  13170. .$confirm("此操作不可撤销,是否继续?", "提示", {
  13171. confirmButtonText: "确定",
  13172. cancelButtonText: "取消",
  13173. type: "warning",
  13174. })
  13175. .then(() => {
  13176. _this.askJson.askJson.splice(index, 1);
  13177. _this.askJson.askCount--;
  13178. })
  13179. .catch(() => {
  13180. return;
  13181. });
  13182. }
  13183. },
  13184. deleteTestList(index) {
  13185. if (
  13186. !this.testJson.testJson[index].teststitle &&
  13187. this.testJson.testJson[index].testItem == 1 &&
  13188. !this.testJson.testJson[index].checkList[0]
  13189. ) {
  13190. this.testJson.testJson.splice(index, 1);
  13191. this.testJson.testCount--;
  13192. } else {
  13193. let _this = this;
  13194. _this
  13195. .$confirm("此操作不可撤销,是否继续?", "提示", {
  13196. confirmButtonText: "确定",
  13197. cancelButtonText: "取消",
  13198. type: "warning",
  13199. })
  13200. .then(() => {
  13201. _this.testJson.testJson.splice(index, 1);
  13202. _this.testJson.testCount--;
  13203. })
  13204. .catch(() => {
  13205. return;
  13206. });
  13207. }
  13208. },
  13209. askMove(type, index) {
  13210. if (type == 1) {
  13211. if (index > 0) {
  13212. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  13213. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  13214. this.askJson.askJson[index - 1] = b;
  13215. this.askJson.askJson[index] = a;
  13216. }
  13217. } else {
  13218. if (index < this.askJson.askJson.length - 1) {
  13219. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  13220. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  13221. this.askJson.askJson[index + 1] = b;
  13222. this.askJson.askJson[index] = a;
  13223. }
  13224. }
  13225. this.$forceUpdate();
  13226. },
  13227. checkMove(type, index, checkIndex) {
  13228. if (type == 1) {
  13229. if (checkIndex > 0) {
  13230. let a = JSON.parse(
  13231. JSON.stringify(
  13232. this.askJson.askJson[index].checkList[checkIndex - 1]
  13233. )
  13234. );
  13235. let b = JSON.parse(
  13236. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  13237. );
  13238. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  13239. this.askJson.askJson[index].checkList[checkIndex] = a;
  13240. }
  13241. } else {
  13242. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  13243. let a = JSON.parse(
  13244. JSON.stringify(
  13245. this.askJson.askJson[index].checkList[checkIndex + 1]
  13246. )
  13247. );
  13248. let b = JSON.parse(
  13249. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  13250. );
  13251. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  13252. this.askJson.askJson[index].checkList[checkIndex] = a;
  13253. }
  13254. }
  13255. this.$forceUpdate();
  13256. },
  13257. testMove(type, index) {
  13258. if (type == 1) {
  13259. if (index > 0) {
  13260. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  13261. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  13262. this.testJson.testJson[index - 1] = b;
  13263. this.testJson.testJson[index] = a;
  13264. }
  13265. } else {
  13266. if (index < this.testJson.testJson.length - 1) {
  13267. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  13268. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  13269. this.testJson.testJson[index + 1] = b;
  13270. this.testJson.testJson[index] = a;
  13271. }
  13272. }
  13273. this.$forceUpdate();
  13274. },
  13275. tcheckMove(type, index, checkIndex) {
  13276. if (type == 1) {
  13277. if (checkIndex > 0) {
  13278. let a = JSON.parse(
  13279. JSON.stringify(
  13280. this.testJson.testJson[index].checkList[checkIndex - 1]
  13281. )
  13282. );
  13283. let b = JSON.parse(
  13284. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  13285. );
  13286. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  13287. this.testJson.testJson[index].checkList[checkIndex] = a;
  13288. }
  13289. } else {
  13290. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  13291. let a = JSON.parse(
  13292. JSON.stringify(
  13293. this.testJson.testJson[index].checkList[checkIndex + 1]
  13294. )
  13295. );
  13296. let b = JSON.parse(
  13297. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  13298. );
  13299. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  13300. this.testJson.testJson[index].checkList[checkIndex] = a;
  13301. }
  13302. }
  13303. this.$forceUpdate();
  13304. },
  13305. addcheckList(json, index) {
  13306. // json.checkList.length++;
  13307. json.checkList.splice(index + 1, 0, "");
  13308. json.askItem++;
  13309. this.$forceUpdate();
  13310. },
  13311. deletecheckList(json, index) {
  13312. // json.checkList.length--;
  13313. json.checkList.splice(index, 1);
  13314. json.askItem--;
  13315. this.$forceUpdate();
  13316. },
  13317. addTcheckList(json, index) {
  13318. // json.checkList.length++;
  13319. json.checkList.splice(index + 1, 0, "");
  13320. json.testItem++;
  13321. this.$forceUpdate();
  13322. },
  13323. deleteTcheckList(json, index) {
  13324. // json.checkList.length--;
  13325. json.checkList.splice(index, 1);
  13326. json.testItem--;
  13327. this.$forceUpdate();
  13328. },
  13329. checkTestType(type, json) {
  13330. json.type = type;
  13331. setTimeout(() => {
  13332. json.answer = [];
  13333. }, 100);
  13334. },
  13335. checkAskType(type, json) {
  13336. json.type = type;
  13337. // json.checkList = [];
  13338. this.$forceUpdate();
  13339. },
  13340. addSelectList(json) {
  13341. json.select.push("");
  13342. json.answer.push("");
  13343. },
  13344. deleteSelectList(json) {
  13345. // json.select.length--;
  13346. // json.answer.length--;
  13347. json.select.splice(json.select.length - 1, 1);
  13348. json.answer.splice(json.answer.length - 1, 1);
  13349. },
  13350. addAsk() {
  13351. if (this.askJson.askTitle === "") {
  13352. this.$message.error("标题不能为空!");
  13353. return;
  13354. }
  13355. var aj = this.askJson.askJson;
  13356. var b = 1;
  13357. for (var i = 0; i < aj.length; i++) {
  13358. if (aj[i].askstitle === "") {
  13359. var a = 1;
  13360. for (let index = 0; index < aj[i].askItem; index++) {
  13361. const element = aj[i].checkList[index]
  13362. ? aj[i].checkList[index]
  13363. : "";
  13364. if (element != "") {
  13365. b++;
  13366. this.$message.error(`请将题目${i + 1}填写完整。`);
  13367. return;
  13368. } else {
  13369. a++;
  13370. }
  13371. }
  13372. if (b == 1) {
  13373. this.$message.error("至少填写一个问题");
  13374. return;
  13375. }
  13376. } else if (aj[i].askstitle != "") {
  13377. for (let index = 0; index < aj[i].askItem; index++) {
  13378. const element = aj[i].checkList[index]
  13379. ? aj[i].checkList[index]
  13380. : "";
  13381. var index = 0;
  13382. for (var z = 0; z < aj[i].checkList.length; z++) {
  13383. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13384. if (checkC != "") {
  13385. index++;
  13386. } else {
  13387. this.$message.error(`题目${i + 1}选项不能为空!`);
  13388. return;
  13389. }
  13390. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13391. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13392. if (checkC == checkC2) {
  13393. this.$message.error(
  13394. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13395. );
  13396. return;
  13397. }
  13398. }
  13399. }
  13400. b++;
  13401. if (index < 2) {
  13402. this.$message.error("每道题目至少需要设置2个选项。");
  13403. return;
  13404. }
  13405. }
  13406. }
  13407. }
  13408. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  13409. var elc = el.checkList.filter((element) => {
  13410. return element != "";
  13411. });
  13412. return el.askstitle != "" && elc.length != 0;
  13413. });
  13414. if (!this.dialogVisible4) {
  13415. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13416. this.taskCount
  13417. ].toolChoose[this.toolIndex] = this.askJson;
  13418. }
  13419. this.dialogVisible5 = false;
  13420. if (
  13421. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13422. .toolChoose[this.toolIndex].tool != 4
  13423. ) {
  13424. this.addTools(4, this.taskCount, this.toolIndex);
  13425. }
  13426. },
  13427. addTest() {
  13428. // if (this.testJson.testTitle === "") {
  13429. // this.$message.error("标题不能为空!");
  13430. // return;
  13431. // }
  13432. var aj = this.testJson.testJson;
  13433. var b = 1;
  13434. for (var i = 0; i < aj.length; i++) {
  13435. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  13436. var a = 1;
  13437. for (let index = 0; index < aj[i].testItem; index++) {
  13438. const element = aj[i].checkList[index]
  13439. ? aj[i].checkList[index]
  13440. : "";
  13441. if (element != "") {
  13442. b++;
  13443. this.$message.error(`请将题目${i + 1}填写完整。`);
  13444. return;
  13445. } else {
  13446. a++;
  13447. }
  13448. }
  13449. if (b == 1) {
  13450. this.$message.error("至少填写一个问题");
  13451. return;
  13452. }
  13453. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  13454. for (let index = 0; index < aj[i].testItem; index++) {
  13455. const element = aj[i].checkList[index]
  13456. ? aj[i].checkList[index]
  13457. : "";
  13458. var index = 0;
  13459. for (var z = 0; z < aj[i].checkList.length; z++) {
  13460. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13461. if (checkC != "") {
  13462. index++;
  13463. } else {
  13464. this.$message.error(`题目${i + 1}选项不能为空!`);
  13465. return;
  13466. }
  13467. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13468. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13469. if (checkC == checkC2) {
  13470. this.$message.error(
  13471. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13472. );
  13473. return;
  13474. }
  13475. }
  13476. }
  13477. b++;
  13478. if (index < 2) {
  13479. this.$message.error("每道题目至少需要设置2个选项。");
  13480. return;
  13481. }
  13482. if (
  13483. (aj[i].type == "2" && !aj[i].answer.length) ||
  13484. (aj[i].type == "1" &&
  13485. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  13486. (aj[i].answer !== 0 && !aj[i].answer)))
  13487. ) {
  13488. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  13489. return;
  13490. }
  13491. }
  13492. }
  13493. }
  13494. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13495. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13496. var elc = el.checkList.filter((element) => {
  13497. return element != "";
  13498. });
  13499. return (
  13500. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  13501. );
  13502. });
  13503. isTestJson.testCount = isTestJson.testJson.length;
  13504. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13505. this.taskCount
  13506. ].toolChoose[this.toolIndex].testJson = isTestJson;
  13507. this.dialogVisibleChoice = false;
  13508. if (
  13509. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13510. .toolChoose[this.toolIndex].tool != 45
  13511. ) {
  13512. this.addTools(45, this.taskCount, this.toolIndex);
  13513. }
  13514. },
  13515. addVideoJson(videoJson) {
  13516. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13517. this.taskCount
  13518. ].toolChoose[this.toolIndex].videoJson = videoJson;
  13519. this.dialogVisibleVideo = false;
  13520. if (
  13521. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13522. .toolChoose[this.toolIndex].tool != 62
  13523. ) {
  13524. this.addTools(62, this.taskCount, this.toolIndex);
  13525. }
  13526. },
  13527. //自动获取剪贴板
  13528. pasteOption() {
  13529. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13530. if (!iframe) {
  13531. this.$message.error("请使用AI共创生成题目");
  13532. return;
  13533. }
  13534. let copyData = iframe.contentWindow.copyData;
  13535. if (!copyData || !copyData.selectData.length) {
  13536. this.$message.error("请使用AI共创生成题目");
  13537. return;
  13538. }
  13539. let selectData = copyData.selectData;
  13540. for (var i = 0; i < selectData.length; i++) {
  13541. let answer = 0;
  13542. switch (selectData[i].answer[0]) {
  13543. case "A":
  13544. answer = 0;
  13545. break;
  13546. case "B":
  13547. answer = 1;
  13548. break;
  13549. case "C":
  13550. answer = 2;
  13551. break;
  13552. case "D":
  13553. answer = 3;
  13554. break;
  13555. case "E":
  13556. answer = 4;
  13557. break;
  13558. default:
  13559. break;
  13560. }
  13561. this.testJson.testJson.push({
  13562. teststitle: selectData[i].subject,
  13563. testItem: selectData[i].options.length,
  13564. checkList: selectData[i].options,
  13565. timuList: [],
  13566. answer: answer,
  13567. type: "1",
  13568. });
  13569. this.testJson.testCount++;
  13570. }
  13571. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13572. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13573. var elc = el.checkList.filter((element) => {
  13574. return element != "";
  13575. });
  13576. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  13577. });
  13578. isTestJson.testCount = isTestJson.testJson.length;
  13579. if (!isTestJson.testCount) {
  13580. return;
  13581. }
  13582. this.testJson = isTestJson;
  13583. this.$forceUpdate();
  13584. },
  13585. pasteTask(taskJson) {
  13586. let stageTasksData = [];
  13587. if (taskJson) {
  13588. stageTasksData = taskJson;
  13589. } else {
  13590. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13591. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13592. if (!iframe && !iframe2) {
  13593. this.$message.error("请使用AI共创生成");
  13594. return;
  13595. }
  13596. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13597. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13598. if (
  13599. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  13600. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  13601. ) {
  13602. this.$message.error("请使用AI共创生成");
  13603. return;
  13604. }
  13605. stageTasksData = copyData
  13606. ? copyData.tasksData
  13607. : copyData2
  13608. ? copyData2.tasksData
  13609. : [{ taskName: "", taskDecs: "" }];
  13610. }
  13611. let taskA = [];
  13612. let tasks = stageTasksData;
  13613. for (var j = 0; j < tasks.length; j++) {
  13614. taskA.push({
  13615. task: tasks[j].taskName,
  13616. taskDetail: tasks[j].taskDecs,
  13617. chapterData: [],
  13618. toolText: "",
  13619. toolChoose: [
  13620. {
  13621. tool: [],
  13622. toolDetail: "",
  13623. toolType: 0,
  13624. askCount: 1,
  13625. askTitle: "",
  13626. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13627. },
  13628. ],
  13629. isShowTools: false,
  13630. askCount: 1,
  13631. isFold: 1,
  13632. askTitle: "",
  13633. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13634. checkJson: [{ checkCount: [], checkPerent: [] }],
  13635. homeworkList: [],
  13636. });
  13637. }
  13638. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  13639. this.$forceUpdate();
  13640. },
  13641. pasteStage(stageJson) {
  13642. let stageData = [];
  13643. if (stageJson) {
  13644. stageData = stageJson;
  13645. } else {
  13646. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13647. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13648. if (!iframe && !iframe2) {
  13649. this.$message.error("请使用AI共创生成");
  13650. return;
  13651. }
  13652. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13653. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13654. if (
  13655. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13656. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13657. ) {
  13658. this.$message.error("请使用AI共创生成");
  13659. return;
  13660. }
  13661. stageData = copyData
  13662. ? copyData.stageData
  13663. : copyData2
  13664. ? copyData2.stageData
  13665. : [""];
  13666. }
  13667. let stage = [];
  13668. for (var i = 0; i < stageData.length; i++) {
  13669. stage.push({
  13670. dyName: stageData[i], //单元标题
  13671. chapterInfo: [
  13672. {
  13673. isread: false,
  13674. chapterid: this.guid(),
  13675. title: "",
  13676. courseName: "",
  13677. taskJson: [
  13678. {
  13679. task: "",
  13680. taskDetail: "",
  13681. chapterData: [],
  13682. toolText: "",
  13683. toolChoose: [
  13684. {
  13685. tool: [],
  13686. toolDetail: "",
  13687. toolType: 0,
  13688. askCount: 1,
  13689. askTitle: "",
  13690. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13691. },
  13692. ],
  13693. isShowTools: false,
  13694. askCount: 1,
  13695. isFold: 1,
  13696. askTitle: "",
  13697. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13698. checkJson: [{ checkCount: [], checkPerent: [] }],
  13699. homeworkList: [],
  13700. },
  13701. ],
  13702. itemCount: 1,
  13703. fileList1: [],
  13704. video: [],
  13705. testData: [],
  13706. pData: [],
  13707. templateArray: [],
  13708. },
  13709. ],
  13710. });
  13711. }
  13712. let _this = this;
  13713. if (stageJson) {
  13714. if (!_this.cid) {
  13715. _this.unitJson = stage;
  13716. } else {
  13717. _this.unitIndex = 0;
  13718. _this.unitJson = stage;
  13719. _this.updateWork();
  13720. }
  13721. } else {
  13722. _this
  13723. .$confirm(
  13724. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  13725. "提示",
  13726. {
  13727. confirmButtonText: "确定",
  13728. cancelButtonText: "取消",
  13729. type: "warning",
  13730. }
  13731. )
  13732. .then(() => {
  13733. _this.unitIndex = 0;
  13734. _this.unitJson = stage;
  13735. // _this.steps++;
  13736. _this.updateWork();
  13737. })
  13738. .catch(() => {
  13739. return;
  13740. });
  13741. }
  13742. },
  13743. openStageBox() {
  13744. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  13745. this.dialogVisibleStageChange = true;
  13746. },
  13747. updateChange() {
  13748. this.$confirm(
  13749. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  13750. "提示",
  13751. {
  13752. confirmButtonText: "确定",
  13753. cancelButtonText: "取消",
  13754. type: "warning",
  13755. }
  13756. )
  13757. .then(() => {
  13758. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  13759. this.updateWork();
  13760. this.dialogVisibleStageChange = false;
  13761. })
  13762. .catch(() => {
  13763. return;
  13764. });
  13765. },
  13766. addAnswer() {
  13767. if (this.answerQ == "") {
  13768. this.$message.error("请输入您想要问的问题");
  13769. return;
  13770. }
  13771. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13772. this.taskCount
  13773. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13774. this.dialogVisible8 = false;
  13775. if (
  13776. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13777. .toolChoose[this.toolIndex].tool != 15
  13778. ) {
  13779. this.addTools(15, this.taskCount, this.toolIndex);
  13780. }
  13781. },
  13782. addMp3Answer() {
  13783. if (this.answerQ == "") {
  13784. this.$message.error("请输入您想要回答的问题");
  13785. return;
  13786. }
  13787. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13788. this.taskCount
  13789. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13790. this.dialogVisibleMp3 = false;
  13791. },
  13792. addRateAnswer() {
  13793. var a = 1;
  13794. for (var i = 0; i < this.rateJson.length; i++) {
  13795. if (this.rateJson[i].value == "") {
  13796. a = 2;
  13797. break;
  13798. }
  13799. }
  13800. if (a == 2) {
  13801. this.$message.error("请把评价信息填写完整");
  13802. return;
  13803. }
  13804. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13805. this.taskCount
  13806. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  13807. this.dialogVisibleRate = false;
  13808. if (
  13809. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13810. .toolChoose[this.toolIndex].tool != 40
  13811. ) {
  13812. this.addTools(40, this.taskCount, this.toolIndex);
  13813. }
  13814. },
  13815. addSelectAnswer() {
  13816. if (this.selectJson.url == "") {
  13817. this.$message.error("请上传题目");
  13818. return;
  13819. }
  13820. if (!this.selectJson.select.length) {
  13821. this.$message.error("请添加选项");
  13822. return;
  13823. }
  13824. if (!this.selectJson.answer.length) {
  13825. this.$message.error("请设置答案");
  13826. return;
  13827. }
  13828. var a = 1;
  13829. for (var i = 0; i < this.selectJson.answer.length; i++) {
  13830. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  13831. a = 2;
  13832. }
  13833. }
  13834. if (a == 2) {
  13835. this.$message.error("请设置答案");
  13836. return;
  13837. }
  13838. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13839. this.taskCount
  13840. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  13841. this.dialogVisibleSelect = false;
  13842. if (
  13843. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13844. .toolChoose[this.toolIndex].tool != 41
  13845. ) {
  13846. this.addTools(41, this.taskCount, this.toolIndex);
  13847. }
  13848. },
  13849. nextSelectSteps() {
  13850. if (this.selectJson.url == "") {
  13851. this.$message.error("请上传题目");
  13852. return;
  13853. }
  13854. if (!this.selectJson.select.length) {
  13855. this.$message.error("请添加选项");
  13856. return;
  13857. } else {
  13858. for (var z = 0; z < this.selectJson.select.length; z++) {
  13859. let checkC = this.selectJson.select[z];
  13860. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  13861. let checkC2 = this.selectJson.select[z2];
  13862. if (checkC == checkC2) {
  13863. this.$message.error(
  13864. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13865. );
  13866. return;
  13867. }
  13868. }
  13869. }
  13870. }
  13871. var a = 1;
  13872. for (var i = 0; i < this.selectJson.select.length; i++) {
  13873. if (!this.selectJson.select[i]) {
  13874. a = 2;
  13875. }
  13876. }
  13877. if (a == 2) {
  13878. this.$message.error("添加的选项不能为空");
  13879. return;
  13880. }
  13881. this.selectSteps++;
  13882. },
  13883. selectCourseDetail() {
  13884. if (this.cid == "" || this.cid == undefined) {
  13885. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  13886. this.isTeacherSee = true;
  13887. }
  13888. console.log("这是新增课程");
  13889. this.selectAllType();
  13890. this.chatid = uuidv4();
  13891. // this.courseTextB = false
  13892. } else {
  13893. this.isOutline = true
  13894. this.isOutline2 = true
  13895. this.cpoteType = 4
  13896. this.cidType = 1;
  13897. let params = {
  13898. cid: this.cid,
  13899. };
  13900. this.ajax
  13901. .get(this.$store.state.api + "select_course_detail", params)
  13902. .then((res) => {
  13903. this.unitJson = JSON.parse(res.data[0][0].chapters);
  13904. this.courseState = res.data[0][0].state;
  13905. for (var j = 0; j < this.unitJson.length; j++) {
  13906. for (
  13907. var k = 0;
  13908. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  13909. k++
  13910. ) {
  13911. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  13912. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13913. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  13914. : [];
  13915. let _chapterData = [];
  13916. for (
  13917. var c = 0;
  13918. c <
  13919. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  13920. .length;
  13921. c++
  13922. ) {
  13923. if (
  13924. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13925. ) {
  13926. _chapterData.push(
  13927. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  13928. );
  13929. }
  13930. }
  13931. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  13932. _chapterData;
  13933. }
  13934. }
  13935. this.$forceUpdate();
  13936. this.courseName = res.data[0][0].title;
  13937. this.courseText = res.data[0][0].brief;
  13938. this.courseText2 = res.data[0][0].reBrief;
  13939. this.evalua = res.data[0][0].evaId;
  13940. this.cover = JSON.parse(res.data[0][0].cover);
  13941. this.noneBtnImg = this.cover.length >= 1;
  13942. if (res.data[0][0].refile) {
  13943. this.infoData = JSON.parse(res.data[0][0].refile)
  13944. }
  13945. // this.checkboxList =
  13946. // res.data[0][0].course_student.length > 0
  13947. // ? JSON.parse(res.data[0][0].course_student)
  13948. // : [];
  13949. this.checkboxList2 = res.data[0][0].juri
  13950. ? res.data[0][0].juri.split(",")
  13951. : [];
  13952. this.inviteCode = [];
  13953. for (var i = 0; i < res.data[2].length; i++) {
  13954. this.inviteCode.push({
  13955. cid: res.data[2][i].classid,
  13956. ic: res.data[2][i].code,
  13957. });
  13958. }
  13959. this.checkboxList3 = res.data[0][0].course_teacher
  13960. ? res.data[0][0].course_teacher.split(",")
  13961. : [];
  13962. // this.isTeacherSee =
  13963. // res.data[0][0].is_teacher_look == 0 ? true : false;
  13964. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  13965. this.myWord = res.data[0][0].template;
  13966. this.templateC.id = "123";
  13967. this.courseUserid = res.data[0][0].userid;
  13968. // if(this.courseUserid == this.userid){
  13969. // this.InviteChange(this.checkboxList2)
  13970. // }
  13971. this.nbOrder = res.data[0][0].ordernumber;
  13972. this.courseTypeId = [];
  13973. for (var i = 0; i < res.data[1].length; i++) {
  13974. this.courseTypeId.push(res.data[1][i].typeid);
  13975. }
  13976. console.log(this.courseTypeId);
  13977. // if (this.timer) clearInterval(this.timer);
  13978. if (this.timer) clearTimeout(this.timer);
  13979. this.timer = null;
  13980. // this.timer = setInterval(() => {
  13981. if(res.data[3].length){
  13982. try {
  13983. this.aiJson = JSON.parse(res.data[3][0].tips);
  13984. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  13985. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  13986. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13987. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  13988. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  13989. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  13990. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  13991. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  13992. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  13993. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  13994. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  13995. }
  13996. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  13997. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  13998. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  13999. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14000. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14001. this.templateid = res.data[3][0].template;
  14002. }catch(error){
  14003. console.error(error)
  14004. }
  14005. }
  14006. if(res.data[0][0].cpote){
  14007. try {
  14008. this.cpote = JSON.parse(res.data[0][0].cpote);
  14009. }catch(error){
  14010. console.error(error)
  14011. }
  14012. }
  14013. if(res.data[0][0].setting){
  14014. try {
  14015. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14016. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14017. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  14018. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14019. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14020. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14021. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14022. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14023. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14024. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  14025. 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;
  14026. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14027. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14028. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14029. 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;
  14030. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  14031. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  14032. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14033. this.courseTextBool = true
  14034. }
  14035. // if(!this.teacherCourseText && !this.targetCourseText2){
  14036. // this.isuseT = 1
  14037. // }
  14038. }catch(error){
  14039. console.error(error)
  14040. }
  14041. }
  14042. if(this.courseText){
  14043. this.courseTextB = false
  14044. }
  14045. if(this.teacherCourseText){
  14046. this.teacherCourseTextB = false
  14047. }
  14048. if(this.targetCourseText){
  14049. this.targetCourseTextB = false
  14050. }
  14051. if(this.targetCourseText2){
  14052. this.targetCourseText2B = false
  14053. }
  14054. this.isFileSearch = res.data[0][0].iresearch == 1
  14055. // this.seleteCourseUpdate();
  14056. this.setMan();
  14057. this.selectAllType();
  14058. this.unitJson[
  14059. this.unitIndex
  14060. ].chapterInfo[0].taskJson[0].toolOpen = true;
  14061. // }, 5000);
  14062. this.$forceUpdate();
  14063. setTimeout(() => {
  14064. this.checkEva(this.evalua);
  14065. setTimeout(() => {
  14066. this.checkEva(this.evalua);
  14067. }, 100);
  14068. }, 100);
  14069. })
  14070. .catch((err) => {
  14071. console.error(err);
  14072. });
  14073. }
  14074. if(this.aiId){
  14075. let params = {
  14076. cid: this.aiId,
  14077. };
  14078. this.ajax
  14079. .get(this.$store.state.api + "select_course_detail", params)
  14080. .then((res) => {
  14081. let _unitJson = JSON.parse(res.data[0][0].chapters);
  14082. let fileInfo = []
  14083. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  14084. for(var i = 0; i < _unitJson.length; i++){
  14085. let tasks = _unitJson[i].chapterInfo[0].taskJson
  14086. for(var j = 0; j < tasks.length; j++){
  14087. let _infoData = tasks[j].chapterData.filter(el => {
  14088. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  14089. })
  14090. if(_infoData.length){
  14091. fileInfo = [...fileInfo, ..._infoData]
  14092. }
  14093. }
  14094. }
  14095. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  14096. this.$forceUpdate();
  14097. this.courseName = res.data[0][0].title;
  14098. this.courseText = res.data[0][0].brief;
  14099. this.courseText2 = res.data[0][0].reBrief;
  14100. this.cover = JSON.parse(res.data[0][0].cover);
  14101. this.noneBtnImg = this.cover.length >= 1;
  14102. this.checkboxList2 = res.data[0][0].juri
  14103. ? res.data[0][0].juri.split(",")
  14104. : [];
  14105. this.inviteCode = [];
  14106. for (var i = 0; i < res.data[2].length; i++) {
  14107. this.inviteCode.push({
  14108. cid: res.data[2][i].classid,
  14109. ic: res.data[2][i].code,
  14110. });
  14111. }
  14112. this.checkboxList3 = res.data[0][0].course_teacher
  14113. ? res.data[0][0].course_teacher.split(",")
  14114. : [];
  14115. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  14116. this.myWord = res.data[0][0].template;
  14117. this.templateC.id = "123";
  14118. this.courseTypeId = [];
  14119. for (var i = 0; i < res.data[1].length; i++) {
  14120. this.courseTypeId.push(res.data[1][i].typeid);
  14121. }
  14122. console.log(this.courseTypeId);
  14123. if(res.data[3].length){
  14124. try {
  14125. this.aiJson = JSON.parse(res.data[3][0].tips);
  14126. this.templateid = res.data[3][0].template;
  14127. }catch(error){
  14128. console.error(error)
  14129. }
  14130. }
  14131. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  14132. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  14133. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14134. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  14135. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  14136. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14137. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  14138. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  14139. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  14140. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  14141. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  14142. }
  14143. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  14144. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  14145. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  14146. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14147. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14148. if(res.data[0][0].cpote){
  14149. try {
  14150. this.cpote = JSON.parse(res.data[0][0].cpote);
  14151. }catch(error){
  14152. console.error(error)
  14153. }
  14154. }
  14155. if(res.data[0][0].setting){
  14156. try {
  14157. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14158. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14159. 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];
  14160. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14161. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14162. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14163. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14164. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14165. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14166. 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];
  14167. 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;
  14168. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14169. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14170. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14171. 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;
  14172. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  14173. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  14174. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14175. this.courseTextBool = true
  14176. }
  14177. // if(!this.teacherCourseText && !this.targetCourseText2){
  14178. // this.isuseT = 1
  14179. // }
  14180. }catch(error){
  14181. console.error(error)
  14182. }
  14183. }
  14184. if(this.teacherInfoData.length){
  14185. this.isuseT = true
  14186. }
  14187. if(this.courseText){
  14188. this.courseTextB = false
  14189. }
  14190. if(this.teacherCourseText){
  14191. this.teacherCourseTextB = false
  14192. }
  14193. if(this.targetCourseText){
  14194. this.targetCourseTextB = false
  14195. }
  14196. if(this.targetCourseText2){
  14197. this.targetCourseText2B = false
  14198. }
  14199. this.setMan();
  14200. this.unitJson[
  14201. this.unitIndex
  14202. ].chapterInfo[0].taskJson[0].toolOpen = true;
  14203. this.$forceUpdate();
  14204. setTimeout(() => {
  14205. this.checkEva(this.evalua);
  14206. setTimeout(() => {
  14207. this.checkEva(this.evalua);
  14208. }, 100);
  14209. }, 100);
  14210. })
  14211. .catch((err) => {
  14212. console.error(err);
  14213. });
  14214. }
  14215. // if(this.cidType != 1 && this.templateid == ''){
  14216. // this.promptShow = true
  14217. // }
  14218. },
  14219. seleteCourseUpdate() {
  14220. let params = {
  14221. cid: this.cid,
  14222. };
  14223. this.ajax
  14224. .get(this.$store.state.api + "select_course_detail", params)
  14225. .then((res) => {
  14226. // console.log(this.unitJson);
  14227. let unitJson = JSON.parse(res.data[0][0].chapters);
  14228. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  14229. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  14230. let _unitJson = [];
  14231. let _chapAarry = [];
  14232. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  14233. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  14234. let index = 1;
  14235. let chapindex;
  14236. if (_unitJson2.length > unitJson.length) {
  14237. for (let c = 0; c < _unitJson2.length; c++) {
  14238. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  14239. }
  14240. for (let j = 0; j < unitJson.length; j++) {
  14241. let count = 0;
  14242. for (let k = 0; k < _unitJson2.length; k++) {
  14243. if (
  14244. unitJson[j].chapterInfo[0].chapterid ==
  14245. _unitJson2[k].chapterInfo[0].chapterid
  14246. ) {
  14247. count++;
  14248. _chapAarry.splice(
  14249. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  14250. 1
  14251. );
  14252. _unitJson.push(unitJson[j]);
  14253. break;
  14254. }
  14255. }
  14256. // if(count === 0){
  14257. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  14258. // }
  14259. }
  14260. for (let k = 0; k < _unitJson2.length; k++) {
  14261. if (_unitJson2[k].isUpdate == 1) {
  14262. _chapAarry.splice(
  14263. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  14264. 1
  14265. );
  14266. _unitJson.push(_unitJson2[k]);
  14267. }
  14268. }
  14269. console.log(_chapAarry);
  14270. for (let d = 0; d < _unitJson2.length; d++) {
  14271. if (
  14272. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  14273. ) {
  14274. if (_unitIndex == d) {
  14275. index = 2;
  14276. }
  14277. chapindex = d;
  14278. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  14279. }
  14280. }
  14281. } else {
  14282. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  14283. }
  14284. for (let i = 0; i < unitJson.length; i++) {
  14285. if (
  14286. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  14287. _unitJson[i].chapterInfo[0].chapterid !=
  14288. unitJson[i].chapterInfo[0].chapterid
  14289. ) {
  14290. if (i == _unitJson.length - 1) {
  14291. // this.unitIndex++
  14292. _unitIndex2++;
  14293. }
  14294. _unitJson.splice(i, 0, unitJson[i]);
  14295. } else if (i > _unitJson.length - 1) {
  14296. _unitJson.push(unitJson[i]);
  14297. } else if (
  14298. _unitJson[i].chapterInfo[0].chapterid ==
  14299. unitJson[i].chapterInfo[0].chapterid
  14300. ) {
  14301. _unitJson[i] = unitJson[i];
  14302. }
  14303. // if (i == _unitIndex) {
  14304. // continue;
  14305. // } else
  14306. }
  14307. if (_chapAarry.length && index != 2) {
  14308. if (chapindex < _unitIndex) {
  14309. this.isDelete = 2;
  14310. // this.unitIndex--;
  14311. _unitIndex2--;
  14312. } else if (
  14313. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  14314. _unitJson[_unitIndex].chapterInfo[0].chapterid
  14315. ) {
  14316. this.isDelete = 2;
  14317. for (let n = 0; n < _unitJson.length; n++) {
  14318. if (
  14319. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  14320. _unitJson[n].chapterInfo[0].chapterid
  14321. ) {
  14322. // this.unitIndex = n;
  14323. _unitIndex2 = n;
  14324. _unitJson[n] = _unitJson2[_unitIndex];
  14325. break;
  14326. }
  14327. }
  14328. }
  14329. } else if (index != 2) {
  14330. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  14331. _unitJson2[_unitIndex];
  14332. for (
  14333. var ci = 0;
  14334. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  14335. ci++
  14336. ) {
  14337. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  14338. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  14339. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14340. .toolChoose
  14341. : [];
  14342. let _chapterData = [];
  14343. for (
  14344. var c = 0;
  14345. c <
  14346. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  14347. .length;
  14348. c++
  14349. ) {
  14350. if (
  14351. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14352. .chapterData[c]
  14353. ) {
  14354. _chapterData.push(
  14355. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14356. .chapterData[c]
  14357. );
  14358. }
  14359. }
  14360. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  14361. _chapterData;
  14362. }
  14363. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  14364. }
  14365. if (index == 1) {
  14366. this.unitJson = _unitJson;
  14367. this.$forceUpdate();
  14368. setTimeout(() => {
  14369. if (this.unitIndex != _unitIndex2) {
  14370. this.isDelete = 2;
  14371. this.unitIndex = _unitIndex2;
  14372. }
  14373. }, 0);
  14374. this.timer = setTimeout(() => {
  14375. this.seleteCourseUpdate();
  14376. }, 1000);
  14377. } else if (index == 2) {
  14378. let _this = this;
  14379. _this
  14380. .$confirm(
  14381. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  14382. "提示",
  14383. {
  14384. confirmButtonText: "需要",
  14385. cancelButtonText: "取消",
  14386. type: "warning",
  14387. }
  14388. )
  14389. .then(() => {
  14390. if (_this.time()) {
  14391. _this.restoreWork(
  14392. _chapAarry[0],
  14393. _unitJson,
  14394. chapindex,
  14395. _unitJson2,
  14396. _unitIndex2
  14397. );
  14398. }
  14399. })
  14400. .catch(() => {
  14401. _this.unitJson = _unitJson;
  14402. _this.$forceUpdate();
  14403. setTimeout(() => {
  14404. if (this.unitIndex != _unitIndex2) {
  14405. this.isDelete = 2;
  14406. this.unitIndex = _unitIndex2;
  14407. }
  14408. }, 0);
  14409. _this.timer = setTimeout(() => {
  14410. _this.seleteCourseUpdate();
  14411. }, 1000);
  14412. });
  14413. }
  14414. // 在复制操作之前记录滚动位置
  14415. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14416. // 执行复制操作
  14417. // 复制操作完成后恢复滚动位置
  14418. this.$nextTick(() => {
  14419. if (this.$refs.scrollContainer) {
  14420. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14421. }
  14422. });
  14423. })
  14424. .catch((err) => {
  14425. console.error(err);
  14426. });
  14427. },
  14428. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  14429. let params = [
  14430. {
  14431. cid: this.cid,
  14432. chapters: JSON.stringify(this.unitJson),
  14433. uid: this.userid,
  14434. chapid: chapid,
  14435. },
  14436. ];
  14437. this.ajax
  14438. .post(this.$store.state.api + "restoreWork", params)
  14439. .then((res) => {
  14440. this.$message({
  14441. message: "恢复成功",
  14442. type: "success",
  14443. });
  14444. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  14445. this.unitJson = unitJson;
  14446. this.$forceUpdate();
  14447. setTimeout(() => {
  14448. if (this.unitIndex != unitIndex2) {
  14449. this.isDelete = 2;
  14450. this.unitIndex = unitIndex2;
  14451. }
  14452. }, 0);
  14453. this.timer = setTimeout(() => {
  14454. this.seleteCourseUpdate();
  14455. }, 1000);
  14456. })
  14457. .catch((err) => {
  14458. this.$message.error("网络不佳");
  14459. console.error(err);
  14460. });
  14461. },
  14462. getTypeName() {
  14463. console.log(this.courseTypeId);
  14464. this.$forceUpdate();
  14465. },
  14466. selectAllType() {
  14467. let params = {
  14468. org: this.org && this.org != "" ? this.org : "",
  14469. oid: this.oid && this.oid != "" ? this.oid : "",
  14470. };
  14471. this.ajax
  14472. .get(this.$store.state.api + "selectAllType", params)
  14473. .then((res) => {
  14474. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14475. res.data[0] = [...res.data[0], ...res.data[4]];
  14476. }
  14477. this.CourseType = res.data;
  14478. this.CourseType2 = [
  14479. { name: "智见课程", id: [] },
  14480. { name: "智行课程", id: [] },
  14481. { name: "智创课程", id: [] },
  14482. ];
  14483. for (var cti = 0; cti < res.data[0].length; cti++) {
  14484. if (
  14485. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14486. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  14487. ) {
  14488. this.CourseType2[0].id.push(res.data[0][cti].id);
  14489. } else if (
  14490. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  14491. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14492. ) {
  14493. this.CourseType2[1].id.push(res.data[0][cti].id);
  14494. } else if (
  14495. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14496. ) {
  14497. this.CourseType2[2].id.push(res.data[0][cti].id);
  14498. }
  14499. if (
  14500. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14501. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  14502. ) {
  14503. res.data[0][cti].name = "年级";
  14504. } else if (
  14505. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  14506. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14507. ) {
  14508. res.data[0][cti].name = "学科";
  14509. } else if (
  14510. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14511. ) {
  14512. res.data[0][cti].name = "主题";
  14513. }
  14514. }
  14515. let _courseTypeId = [];
  14516. for (var i = 0; i < res.data[0].length; i++) {
  14517. if (!this.cid) {
  14518. this.courseTypeId[res.data[0][i].id] = [];
  14519. }
  14520. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  14521. // }
  14522. this.CourseTypeJson[res.data[0][i].id] = [];
  14523. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14524. if (res.data[0][i].name == "栏目") {
  14525. this.CourseType[0][i].name = "主题";
  14526. }
  14527. }
  14528. if (res.data[2].length == 0 && res.data[3].length == 0) {
  14529. for (var j = 0; j < res.data[1].length; j++) {
  14530. if (
  14531. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  14532. _courseTypeId.indexOf(res.data[1][j].id) == -1
  14533. ) {
  14534. _courseTypeId.push(res.data[1][j].id);
  14535. }
  14536. if (res.data[0][i].id == res.data[1][j].pid) {
  14537. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14538. }
  14539. }
  14540. } else {
  14541. if (res.data[2].length > 0) {
  14542. for (var j = 0; j < res.data[2].length; j++) {
  14543. if (
  14544. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  14545. _courseTypeId.indexOf(res.data[2][j].id) == -1
  14546. ) {
  14547. _courseTypeId.push(res.data[2][j].id);
  14548. }
  14549. if (res.data[0][i].id == res.data[2][j].pid) {
  14550. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14551. }
  14552. }
  14553. }
  14554. if (res.data[3].length > 0) {
  14555. for (var j = 0; j < res.data[3].length; j++) {
  14556. if (
  14557. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  14558. _courseTypeId.indexOf(res.data[3][j].id) == -1
  14559. ) {
  14560. _courseTypeId.push(res.data[3][j].id);
  14561. }
  14562. if (res.data[0][i].id == res.data[3][j].pid) {
  14563. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14564. }
  14565. }
  14566. }
  14567. }
  14568. }
  14569. this.courseTypeId = _courseTypeId;
  14570. })
  14571. .catch((err) => {
  14572. console.error(err);
  14573. });
  14574. },
  14575. selectType() {
  14576. this.ajax
  14577. .get(this.$store.state.api + "selectType")
  14578. .then((res) => {
  14579. this.CourseType = res.data;
  14580. for (var i = 0; i < res.data[0].length; i++) {
  14581. if (!this.cid) {
  14582. this.courseTypeId[res.data[0][i].id] = "";
  14583. }
  14584. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14585. if (res.data[0][i].name == "栏目") {
  14586. this.CourseType[0][i].name = "主题";
  14587. }
  14588. }
  14589. for (var j = 0; j < res.data[1].length; j++) {
  14590. if (res.data[0][i].id == res.data[1][j].pid) {
  14591. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14592. this.CourseTypeJson[res.data[0][i].id] = [];
  14593. }
  14594. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14595. }
  14596. }
  14597. }
  14598. this.selectTypeByOid();
  14599. this.selectTypeByOrg();
  14600. })
  14601. .catch((err) => {
  14602. console.error(err);
  14603. });
  14604. },
  14605. selectTypeByOid() {
  14606. let params = {
  14607. oid: this.oid,
  14608. };
  14609. this.ajax
  14610. .get(this.$store.state.api + "selectTypeByOid", params)
  14611. .then((res) => {
  14612. for (var i = 0; i < res.data[0].length; i++) {
  14613. for (var j = 0; j < res.data[1].length; j++) {
  14614. if (res.data[0][i].id == res.data[1][j].pid) {
  14615. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14616. this.CourseTypeJson[res.data[0][i].id] = [];
  14617. }
  14618. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14619. }
  14620. }
  14621. }
  14622. })
  14623. .catch((err) => {
  14624. console.error(err);
  14625. });
  14626. },
  14627. selectTypeByOrg() {
  14628. let params = {
  14629. oid: this.org,
  14630. };
  14631. this.ajax
  14632. .get(this.$store.state.api + "selectTypeByOrg", params)
  14633. .then((res) => {
  14634. for (var i = 0; i < res.data[0].length; i++) {
  14635. for (var j = 0; j < res.data[1].length; j++) {
  14636. if (res.data[0][i].id == res.data[1][j].pid) {
  14637. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14638. this.CourseTypeJson[res.data[0][i].id] = [];
  14639. }
  14640. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14641. }
  14642. }
  14643. }
  14644. this.$forceUpdate();
  14645. })
  14646. .catch((err) => {
  14647. console.error(err);
  14648. });
  14649. },
  14650. OtherMb(type, task) {
  14651. if (task === 0 || task) {
  14652. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14653. task
  14654. ].isEvaFold = true;
  14655. }
  14656. this.typeMode = type;
  14657. setTimeout(() => {
  14658. this.checkEva(this.checkId);
  14659. setTimeout(() => {
  14660. this.checkEva(this.checkId);
  14661. }, 100);
  14662. }, 100);
  14663. },
  14664. openMember() {
  14665. this.searchTN = "";
  14666. this.getTeacher();
  14667. this.dialogVisibleMember = true;
  14668. },
  14669. checkEva(id, type) {
  14670. this.dialogVisiblemb = false;
  14671. this.selectEva();
  14672. if (this.evalua != id && type == 2) {
  14673. this.$message.success("导入成功");
  14674. setTimeout(() => {
  14675. this.checkEva(id);
  14676. }, 100);
  14677. }
  14678. this.evalua = id;
  14679. this.checkId = id;
  14680. if (this.evalua != "") {
  14681. for (var i = 0; i < this.evaJuri.length; i++) {
  14682. if (this.evalua == this.evaJuri[i].id) {
  14683. this.eTitle = this.evaJuri[i].title;
  14684. this.eJson = JSON.parse(this.evaJuri[i].content);
  14685. }
  14686. }
  14687. this.data.data = [];
  14688. this.$forceUpdate();
  14689. setTimeout(() => {
  14690. this.setMindData();
  14691. }, 1000);
  14692. }
  14693. },
  14694. deleteEva() {
  14695. let _this = this;
  14696. if (_this.evalua == "") {
  14697. this.$message.warning("内容已经清空了,请勿重复清空");
  14698. return;
  14699. }
  14700. _this
  14701. .$confirm("确定删除此目标吗?", "提示", {
  14702. confirmButtonText: "确定",
  14703. cancelButtonText: "取消",
  14704. type: "warning",
  14705. })
  14706. .then(() => {
  14707. _this.evalua = "";
  14708. _this.checkId = "";
  14709. _this.eTitle = "";
  14710. let _unitJson = _this.unitJson;
  14711. for (var i = 0; i < _unitJson.length; i++) {
  14712. let _task = _unitJson[i].chapterInfo[0].taskJson;
  14713. for (var j = 0; j < _task.length; j++) {
  14714. let _eList = _task[j].eList;
  14715. for (var k = 0; k < _eList.length; k++) {
  14716. delete _eList[k].target;
  14717. }
  14718. }
  14719. }
  14720. _this.$forceUpdate();
  14721. if (_this.cid) {
  14722. _this.updateWork();
  14723. }
  14724. })
  14725. .catch(() => {
  14726. return;
  14727. });
  14728. },
  14729. selectEva() {
  14730. let params = {
  14731. oid: this.oid,
  14732. };
  14733. this.ajax
  14734. .get(this.$store.state.api + "selectAllEvaluation", params)
  14735. .then((res) => {
  14736. this.evaJuri = res.data[0];
  14737. // 在复制操作之前记录滚动位置
  14738. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14739. // 执行复制操作
  14740. // 复制操作完成后恢复滚动位置
  14741. this.$nextTick(() => {
  14742. if (this.$refs.scrollContainer) {
  14743. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14744. }
  14745. });
  14746. })
  14747. .catch((err) => {
  14748. console.error(err);
  14749. });
  14750. },
  14751. setMindData() {
  14752. let targetArray = [];
  14753. this.data.data = [];
  14754. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  14755. let _eJson = Object.keys(this.eJson);
  14756. let _e = this.eJson;
  14757. for (let i = 0; i < _eJson.length; i++) {
  14758. let element = _e[_eJson[i]];
  14759. this.data.data.push({
  14760. id: element.id,
  14761. parentid: "root",
  14762. topic: element.name,
  14763. });
  14764. // targetArray.push({
  14765. // id: element.id,
  14766. // parentid: "root",
  14767. // name: element.name,
  14768. // });
  14769. targetArray.push({
  14770. value: element.name,
  14771. label: element.name,
  14772. children: [],
  14773. });
  14774. let _eJsonc = Object.keys(element.child);
  14775. let _e2 = element.child;
  14776. for (let j = 0; j < _eJsonc.length; j++) {
  14777. let _ec = _e2[_eJsonc[j]];
  14778. this.data.data.push({
  14779. id: _ec.id,
  14780. parentid: element.id,
  14781. topic: _ec.name,
  14782. });
  14783. // targetArray.push({
  14784. // id: _ec.id,
  14785. // parentid: element.id,
  14786. // name: _ec.name,
  14787. // });
  14788. targetArray[i].children.push({
  14789. value: _ec.name,
  14790. label: _ec.name,
  14791. children: [],
  14792. });
  14793. let _eJsonz = Object.keys(_ec.child);
  14794. let _e3 = _ec.child;
  14795. for (let z = 0; z < _eJsonz.length; z++) {
  14796. let _ez = _e3[_eJsonz[z]];
  14797. this.data.data.push({
  14798. id: _ez.id,
  14799. parentid: _ec.id,
  14800. topic: _ez.name,
  14801. });
  14802. // targetArray.push({
  14803. // id: _ez.id,
  14804. // parentid: _ec.id,
  14805. // name: _ez.name,
  14806. // });
  14807. targetArray[i].children[j].children.push({
  14808. value: _ez.name,
  14809. label: _ez.name,
  14810. });
  14811. }
  14812. }
  14813. }
  14814. this.targetArray = targetArray;
  14815. this.$forceUpdate();
  14816. },
  14817. /*添加评价 */
  14818. addEList(index, tIndex) {
  14819. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  14820. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  14821. value: "",
  14822. detail: "",
  14823. score: 5,
  14824. isai: "1",
  14825. })
  14826. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  14827. { value: "", detail: "", score: 5,isai: "1", },
  14828. ]);
  14829. this.$forceUpdate();
  14830. },
  14831. openEList(index, tIndex) {
  14832. this.evaIndex = index;
  14833. this.evatIndex = tIndex;
  14834. this.evaBoxDialog = true;
  14835. },
  14836. addCET(index, tIndex) {
  14837. this.cetIndex = index;
  14838. this.cettIndex = tIndex;
  14839. this.selectAllType1();
  14840. },
  14841. addCETemplate() {
  14842. var array =
  14843. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  14844. .eList;
  14845. let params = [
  14846. {
  14847. uid: this.userid,
  14848. n: this.templateName,
  14849. json: JSON.stringify(array),
  14850. t: 1,
  14851. oid: this.oid,
  14852. },
  14853. ];
  14854. this.ajax
  14855. .post(this.$store.state.api + "addCETShare", params)
  14856. .then((res) => {
  14857. this.addTypeByCET(res.data[0][0].id);
  14858. })
  14859. .catch((err) => {
  14860. this.$message.error("网络不佳");
  14861. console.error(err);
  14862. });
  14863. },
  14864. addTypeByCET(id) {
  14865. if (this.setTypeJson.two == "") {
  14866. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  14867. return;
  14868. }
  14869. let params = {
  14870. cid: id,
  14871. };
  14872. this.ajax
  14873. .get(this.$store.state.api + "deleteCETLabel", params)
  14874. .then((res) => {
  14875. for (var i = 0; i < 2; i++) {
  14876. let tid = "";
  14877. if (i == 0) {
  14878. tid = this.setTypeJson.one;
  14879. } else {
  14880. tid = this.setTypeJson.two;
  14881. }
  14882. let params = [
  14883. {
  14884. cid: id,
  14885. tid: tid,
  14886. uid: this.userid,
  14887. },
  14888. ];
  14889. this.ajax
  14890. .post(this.$store.state.api + "addCETLabel", params)
  14891. .then((res) => {
  14892. this.$message({
  14893. message: "添加成功",
  14894. type: "success",
  14895. });
  14896. this.close();
  14897. })
  14898. .catch((err) => {
  14899. this.$message.error("网络不佳");
  14900. console.error(err);
  14901. });
  14902. }
  14903. })
  14904. .catch((err) => {
  14905. this.$message.error("网络不佳");
  14906. console.error(err);
  14907. });
  14908. },
  14909. updateEvaJson(array) {
  14910. array = array.filter((item) => {
  14911. item.isai = "1"
  14912. return item;
  14913. });
  14914. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  14915. this.evatIndex
  14916. ].eList = array;
  14917. },
  14918. forceUpdate() {
  14919. this.$forceUpdate();
  14920. },
  14921. forceUpdate2() {
  14922. setTimeout(() => {
  14923. this.courseText += "*0*%*";
  14924. setTimeout(() => {
  14925. this.courseText = this.courseText.replaceAll("*0*%*", "");
  14926. }, 0);
  14927. }, 100);
  14928. this.$forceUpdate();
  14929. },
  14930. deletEList(index, tIndex, eIndex) {
  14931. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  14932. eIndex,
  14933. 1
  14934. );
  14935. this.$forceUpdate();
  14936. },
  14937. getChoosePic(t) {
  14938. this.chooseType = t;
  14939. this.getAllBanner();
  14940. },
  14941. getAllBanner() {
  14942. this.sysPicVisible = true;
  14943. let params = {
  14944. t: this.chooseType,
  14945. };
  14946. this.ajax
  14947. .get(this.$store.state.api + "selectAllBanner", params)
  14948. .then((res) => {
  14949. this.sysPic = res.data[0];
  14950. })
  14951. .catch((err) => {
  14952. console.error(err);
  14953. });
  14954. },
  14955. // getClass() {
  14956. // let params = {
  14957. // oid: this.oid,
  14958. // };
  14959. // this.ajax
  14960. // .get(this.$store.state.api + "selectClassBySchool", params)
  14961. // .then((res) => {
  14962. // this.classJuri = res.data[0];
  14963. // })
  14964. // .catch((err) => {
  14965. // console.error(err);
  14966. // });
  14967. // },
  14968. deleteSysPic() {
  14969. this.cover = [];
  14970. this.isSysPic = false;
  14971. this.isSysPic2 = false;
  14972. },
  14973. deleteSelectPic() {
  14974. this.selectJson.url = "";
  14975. },
  14976. setEListStar() {
  14977. this.$forceUpdate();
  14978. },
  14979. deletRateList(i) {
  14980. this.rateJson.splice(i, 1);
  14981. },
  14982. addRateList() {
  14983. this.rateJson.push({ detail: "", score: 5, value: "" });
  14984. },
  14985. addSt() {
  14986. this.sentenceList.push({
  14987. sentenceTitle: "",
  14988. addSentence: [],
  14989. rightAnswer: [],
  14990. });
  14991. },
  14992. addSen(i) {
  14993. if (!this.sentenceList[i].sentenceTitle) {
  14994. this.$message.error("请填写卡片内容!");
  14995. return;
  14996. }
  14997. if (this.sentenceList[i].sentenceTitle.length > 10) {
  14998. this.$message.error("卡片内容字数不能超过10位");
  14999. return;
  15000. }
  15001. if (
  15002. this.sentenceList[i].addSentence.indexOf(
  15003. this.sentenceList[i].sentenceTitle
  15004. ) !== -1
  15005. ) {
  15006. this.$message.error("不能添加重复的卡片内容!");
  15007. return;
  15008. }
  15009. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  15010. // this.isPushTitleList.push(this.sentenceTitle);
  15011. this.sentenceList[i].sentenceTitle = "";
  15012. },
  15013. setRightAnswer(s, i, j) {
  15014. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  15015. this.sentenceList[i].rightAnswer.push(s);
  15016. }
  15017. },
  15018. returnCard(r, i, j) {
  15019. this.sentenceList[i].rightAnswer.splice(j, 1);
  15020. },
  15021. addSentenceTool() {
  15022. for (var i = 0; i < this.sentenceList.length; i++) {
  15023. if (this.sentenceList[i].rightAnswer.length == 0) {
  15024. this.$message.error(`请将题目${i + 1}设置完整。`);
  15025. return;
  15026. }
  15027. if (
  15028. this.sentenceList[i].addSentence.length !=
  15029. this.sentenceList[i].rightAnswer.length
  15030. ) {
  15031. this.$message.error(`请将题目${i + 1}设置完整。`);
  15032. return;
  15033. }
  15034. }
  15035. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15036. this.taskCount
  15037. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  15038. this.sentenceList = [
  15039. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  15040. ];
  15041. this.dialogVisibleSentence = false;
  15042. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15043. // itemTaskIndex
  15044. // ].toolChoose[toolIndex].tool = [];
  15045. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15046. // itemTaskIndex
  15047. // ].toolChoose[toolIndex].tool.push(i);
  15048. if (
  15049. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15050. .toolChoose[this.toolIndex].tool != 47
  15051. ) {
  15052. this.addTools(47, this.taskCount, this.toolIndex);
  15053. }
  15054. },
  15055. addTableJson() {
  15056. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  15057. // this.$message.error("请将信息填写完整!");
  15058. // return;
  15059. // }
  15060. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15061. this.taskCount
  15062. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  15063. // this.tableJson = [{ text: "" }];
  15064. // this.dialogVisibleTable = false;
  15065. this.$message.success("上传成功");
  15066. if (
  15067. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15068. .toolChoose[this.toolIndex].tool != 48
  15069. ) {
  15070. this.addTools(48, this.taskCount, this.toolIndex);
  15071. }
  15072. },
  15073. addWordJson() {
  15074. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15075. this.taskCount
  15076. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  15077. // this.wordJson = [{ text: "" }];
  15078. // this.dialogVisibleWord = false;
  15079. this.$message.success("上传成功");
  15080. if (
  15081. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15082. .toolChoose[this.toolIndex].tool != 52
  15083. ) {
  15084. this.addTools(52, this.taskCount, this.toolIndex);
  15085. }
  15086. },
  15087. addMoreUpload() {
  15088. if (this.uploadJson.length == 0) {
  15089. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15090. this.taskCount
  15091. ].toolChoose[this.toolIndex].uploadJson = [];
  15092. } else {
  15093. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15094. this.taskCount
  15095. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  15096. }
  15097. this.uploadJson = [];
  15098. this.dialogVisibleMoreUpload = false;
  15099. if (
  15100. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15101. .toolChoose[this.toolIndex].tool != 50
  15102. ) {
  15103. this.addTools(50, this.taskCount, this.toolIndex);
  15104. }
  15105. },
  15106. addPreTime() {
  15107. if (this.preTime == 0) {
  15108. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15109. this.taskCount
  15110. ].toolChoose[this.toolIndex].preTime = 0;
  15111. } else {
  15112. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15113. this.taskCount
  15114. ].toolChoose[this.toolIndex].preTime = this.preTime;
  15115. }
  15116. this.preTime = 0;
  15117. this.dialogVisiblePreTime = false;
  15118. if (
  15119. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15120. .toolChoose[this.toolIndex].tool != 10
  15121. ) {
  15122. this.addTools(10, this.taskCount, this.toolIndex);
  15123. }
  15124. },
  15125. goToTask(i) {
  15126. this.toolIndexType = "";
  15127. if (this.isClickColor == i + 1) {
  15128. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15129. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15130. // } else {
  15131. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15132. i
  15133. ].toolOpen = true;
  15134. // }
  15135. this.$forceUpdate();
  15136. return;
  15137. }
  15138. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15139. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15140. // } else {
  15141. document.querySelectorAll(".basic_box")[0].scrollTop =
  15142. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  15143. this.isClickColor = i + 1;
  15144. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15145. // }
  15146. this.$forceUpdate();
  15147. },
  15148. taskScroll(){
  15149. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  15150. const sections = document.querySelectorAll('.taskBorder');
  15151. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  15152. sections.forEach((section, index) => {
  15153. const offsetTop = section.offsetTop;
  15154. const offsetHeight = section.offsetHeight;
  15155. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  15156. this.isClickColor = index +1;
  15157. }
  15158. });
  15159. },
  15160. taskOpen(i, stageIndex) {
  15161. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15162. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  15163. } else {
  15164. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15165. }
  15166. this.updateWork3(stageIndex);
  15167. this.$forceUpdate();
  15168. },
  15169. goToTask2(i, stage) {
  15170. this.toolIndexType = "";
  15171. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  15172. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15173. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15174. // } else {
  15175. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15176. i
  15177. ].toolOpen = true;
  15178. // }
  15179. this.$forceUpdate();
  15180. return;
  15181. }
  15182. if (this.unitIndex != stage) {
  15183. if (this.panUnitJson() == 2) {
  15184. return;
  15185. }
  15186. this.unitSet(stage);
  15187. }
  15188. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15189. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15190. // } else {
  15191. document.querySelectorAll(".basic_box")[0].scrollTop =
  15192. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  15193. this.isClickColor = i + 1;
  15194. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15195. // }
  15196. this.$forceUpdate();
  15197. },
  15198. taskMove(type, index) {
  15199. this.$confirm(
  15200. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15201. "提示",
  15202. {
  15203. confirmButtonText: "确定",
  15204. cancelButtonText: "取消",
  15205. type: "warning",
  15206. }
  15207. )
  15208. .then(() => {
  15209. if (type == 1) {
  15210. if (index > 0) {
  15211. let a = JSON.parse(
  15212. JSON.stringify(
  15213. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15214. index - 1
  15215. ]
  15216. )
  15217. );
  15218. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  15219. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  15220. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  15221. }
  15222. } else {
  15223. if (
  15224. index <
  15225. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  15226. ) {
  15227. let a = JSON.parse(
  15228. JSON.stringify(
  15229. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15230. index + 1
  15231. ]
  15232. )
  15233. );
  15234. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  15235. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  15236. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  15237. }
  15238. }
  15239. this.$forceUpdate();
  15240. })
  15241. .catch(() => {
  15242. return;
  15243. });
  15244. },
  15245. stageMove(type, index) {
  15246. if (type == 1) {
  15247. if (index > 0) {
  15248. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  15249. let acid = JSON.parse(
  15250. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  15251. );
  15252. let bcid = JSON.parse(
  15253. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  15254. );
  15255. this.unitJson3[index - 1] = this.unitJson3[index];
  15256. this.unitJson3[index] = a;
  15257. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  15258. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  15259. }
  15260. } else {
  15261. if (index < this.unitJson3.length - 1) {
  15262. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  15263. let acid = JSON.parse(
  15264. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  15265. );
  15266. let bcid = JSON.parse(
  15267. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  15268. );
  15269. this.unitJson3[index + 1] = this.unitJson3[index];
  15270. this.unitJson3[index] = a;
  15271. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  15272. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  15273. }
  15274. }
  15275. this.$forceUpdate();
  15276. },
  15277. addGroup(i) {
  15278. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  15279. this.groupJson.group.push({
  15280. name: "第" + (this.groupJson.group.length + 1) + "组",
  15281. });
  15282. },
  15283. deleteGroup(i) {
  15284. this.groupJson.group.splice(i, 1);
  15285. },
  15286. numberPan() {
  15287. if (
  15288. /[^\d]/.test(this.groupJson.number) ||
  15289. this.groupJson.number < 2 ||
  15290. this.groupJson.number > 10
  15291. ) {
  15292. this.$message.error("请输入2-10的数字");
  15293. this.groupJson.number = "";
  15294. }
  15295. },
  15296. numberPanJie() {
  15297. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  15298. this.$message.error('请输入大于1的数字')
  15299. this.courseJie = 1
  15300. }
  15301. },
  15302. numberPanTime() {
  15303. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  15304. this.$message.error('请输入大于1的数字')
  15305. this.courseTime = 1
  15306. }
  15307. },
  15308. addGroupJson() {
  15309. for (var i = 0; i < this.groupJson.group.length; i++) {
  15310. if (!this.groupJson.group[i].name) {
  15311. this.$message.error("请将信息填写完整!");
  15312. return;
  15313. }
  15314. }
  15315. if (!this.groupJson.number) {
  15316. this.$message.error("请将信息填写完整!");
  15317. return;
  15318. }
  15319. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15320. this.taskCount
  15321. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  15322. JSON.stringify(this.groupJson)
  15323. );
  15324. this.dialogVisibleGroup = false;
  15325. this.groupJson = {};
  15326. if (
  15327. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15328. .toolChoose[this.toolIndex].tool != 49
  15329. ) {
  15330. this.addTools(49, this.taskCount, this.toolIndex);
  15331. }
  15332. },
  15333. updateTime(preTime) {
  15334. this.preTime = preTime;
  15335. },
  15336. InviteChange(val) {
  15337. console.log(val);
  15338. let _check = [];
  15339. let _check2 = [];
  15340. for (var i = 0; i < this.grade2.length; i++) {
  15341. var gid = this.grade2[i].id;
  15342. _check.push(gid);
  15343. }
  15344. for (var i = 0; i < this.checkboxList2.length; i++) {
  15345. var _id = this.checkboxList2[i];
  15346. if (_check.indexOf(_id) !== -1) {
  15347. _check2.push(_id);
  15348. }
  15349. }
  15350. this.checkAll = _check2.length === _check.length;
  15351. return;
  15352. let array = JSON.parse(JSON.stringify(val));
  15353. this.inviteCode = this.inviteCode.filter((el) => {
  15354. if (val.indexOf(el.cid) != -1) {
  15355. array.splice(array.indexOf(el.cid), 1);
  15356. return el;
  15357. }
  15358. });
  15359. for (var i = 0; i < array.length; i++) {
  15360. this.getInviteCode(array[i]);
  15361. }
  15362. },
  15363. InviteChange2(val) {
  15364. console.log(val);
  15365. let _check = [];
  15366. let _check2 = [];
  15367. for (var i = 0; i < this.teacherJuri.length; i++) {
  15368. var gid = this.teacherJuri[i].userid;
  15369. _check.push(gid);
  15370. }
  15371. for (var i = 0; i < this.checkboxList3.length; i++) {
  15372. var _id = this.checkboxList3[i];
  15373. if (_check.indexOf(_id) !== -1) {
  15374. _check2.push(_id);
  15375. }
  15376. }
  15377. this.checkAll2 = _check2.length === _check.length;
  15378. this.setMan();
  15379. return;
  15380. let array = JSON.parse(JSON.stringify(val));
  15381. this.inviteCode = this.inviteCode.filter((el) => {
  15382. if (val.indexOf(el.cid) != -1) {
  15383. array.splice(array.indexOf(el.cid), 1);
  15384. return el;
  15385. }
  15386. });
  15387. for (var i = 0; i < array.length; i++) {
  15388. this.getInviteCode(array[i]);
  15389. }
  15390. },
  15391. handleCheckAllChange(val) {
  15392. if (val) {
  15393. for (var i = 0; i < this.grade2.length; i++) {
  15394. var gid = this.grade2[i].id;
  15395. if (this.checkboxList2.indexOf(gid) === -1) {
  15396. this.checkboxList2.push(gid);
  15397. }
  15398. }
  15399. } else {
  15400. let _check = [];
  15401. let _check2 = [];
  15402. for (var i = 0; i < this.grade2.length; i++) {
  15403. var gid = this.grade2[i].id;
  15404. _check.push(gid);
  15405. }
  15406. for (var i = 0; i < this.checkboxList2.length; i++) {
  15407. var _id = this.checkboxList2[i];
  15408. if (_check.indexOf(_id) === -1) {
  15409. _check2.push(_id);
  15410. }
  15411. }
  15412. this.checkboxList2 = _check2;
  15413. }
  15414. this.isIndeterminate = false;
  15415. },
  15416. handleCheckAllChange2(val) {
  15417. if (val) {
  15418. for (var i = 0; i < this.teacherJuri.length; i++) {
  15419. var gid = this.teacherJuri[i].userid;
  15420. if (this.checkboxList3.indexOf(gid) === -1) {
  15421. this.checkboxList3.push(gid);
  15422. }
  15423. }
  15424. } else {
  15425. let _check = [];
  15426. let _check2 = [];
  15427. for (var i = 0; i < this.teacherJuri.length; i++) {
  15428. var gid = this.teacherJuri[i].userid;
  15429. _check.push(gid);
  15430. }
  15431. for (var i = 0; i < this.checkboxList3.length; i++) {
  15432. var _id = this.checkboxList3[i];
  15433. if (_check.indexOf(_id) === -1) {
  15434. _check2.push(_id);
  15435. }
  15436. }
  15437. this.checkboxList3 = _check2;
  15438. }
  15439. this.isIndeterminate2 = false;
  15440. },
  15441. async getInviteCode(cid) {
  15442. let code = this.randomNumber();
  15443. let params = {
  15444. code: code,
  15445. oid: this.oid,
  15446. };
  15447. let type = 1;
  15448. for (var i = 0; i < this.inviteCode.length; i++) {
  15449. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  15450. type = 2;
  15451. }
  15452. }
  15453. if (type == 2) {
  15454. this.getInviteCode(cid);
  15455. return;
  15456. }
  15457. const res = await this.ajax.get(
  15458. this.$store.state.api + "selectInviteCode2",
  15459. params
  15460. );
  15461. if (
  15462. res.data.length &&
  15463. res.data[0].length &&
  15464. res.data[0][0].courseId != this.cid
  15465. ) {
  15466. this.getInviteCode(cid);
  15467. return;
  15468. }
  15469. let array = [];
  15470. for (var i = 0; i < this.inviteCode.length; i++) {
  15471. array.push(this.inviteCode[i].cid);
  15472. }
  15473. if (array.indexOf(cid) != -1) {
  15474. this.inviteCode[array.indexOf(cid)].ic = code;
  15475. } else {
  15476. this.inviteCode.push({ cid: cid, ic: code });
  15477. }
  15478. },
  15479. OpenInviteD(cid) {
  15480. let array = [];
  15481. this.icode = "";
  15482. for (var i = 0; i < this.inviteCode.length; i++) {
  15483. array.push(this.inviteCode[i].cid);
  15484. }
  15485. if (array.indexOf(cid) != -1) {
  15486. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  15487. }
  15488. this.inviteId = cid;
  15489. this.dialogVisibleInvite = true;
  15490. },
  15491. addInvite() {
  15492. let reg = /^[A-Za-z0-9]{4,}$/;
  15493. if (!reg.test(this.icode)) {
  15494. this.$message.error("请输入至少四位数字或英文组合的随机码");
  15495. return;
  15496. }
  15497. let type = 1;
  15498. for (var i = 0; i < this.inviteCode.length; i++) {
  15499. if (
  15500. this.inviteCode[i].cid != this.inviteId &&
  15501. this.icode == this.inviteCode[i].ic
  15502. ) {
  15503. type = 2;
  15504. }
  15505. }
  15506. if (type == 2) {
  15507. this.$message.error("已有此随机码,不能重复");
  15508. return;
  15509. }
  15510. let params = {
  15511. code: this.icode,
  15512. oid: this.oid,
  15513. };
  15514. this.ajax
  15515. .get(this.$store.state.api + "selectInviteCode", params)
  15516. .then((res) => {
  15517. if (
  15518. res.data.length &&
  15519. res.data[0].length &&
  15520. res.data[0][0].courseId != this.cid
  15521. ) {
  15522. this.$message.error("已有此随机码,不能重复");
  15523. return;
  15524. }
  15525. let array = [];
  15526. for (var i = 0; i < this.inviteCode.length; i++) {
  15527. array.push(this.inviteCode[i].cid);
  15528. }
  15529. if (array.indexOf(this.inviteId) != -1) {
  15530. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  15531. } else {
  15532. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  15533. }
  15534. this.icode = "";
  15535. this.dialogVisibleInvite = false;
  15536. })
  15537. .catch((err) => {
  15538. console.error(err);
  15539. });
  15540. },
  15541. randomNumber() {
  15542. // 随机生成两位数
  15543. // let num = Math.floor(Math.random() * 900) + 100;
  15544. // 生成 0 到 99 之间的随机整数
  15545. const randomNumber = Math.floor(Math.random() * 100);
  15546. // 如果随机数小于 10,补上前导零
  15547. const num =
  15548. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  15549. // 随机生成两个大写字母
  15550. let letters = "";
  15551. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  15552. for (let i = 0; i < 3; i++) {
  15553. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  15554. }
  15555. // 随机生成两位数字和字母的组合
  15556. let mix = "";
  15557. let chars =
  15558. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  15559. for (let i = 0; i < 3; i++) {
  15560. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  15561. mix += char;
  15562. }
  15563. // 随机选择一种类型
  15564. let type = Math.floor(Math.random() * 3);
  15565. return num;
  15566. // 根据类型输出结果
  15567. switch (type) {
  15568. case 0:
  15569. console.log(num); // 输出两位数
  15570. return num;
  15571. case 1:
  15572. console.log(letters); // 输出两个大写字母
  15573. return letters;
  15574. case 2:
  15575. console.log(mix); // 输出两位数字和字母的组合
  15576. return mix;
  15577. }
  15578. },
  15579. getPaste() {
  15580. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15581. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15582. if (!iframe && !iframe2) {
  15583. return;
  15584. }
  15585. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15586. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15587. if (copyData && copyData.stageData && copyData.stageData.length) {
  15588. this.isPasteStage = true;
  15589. }
  15590. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  15591. this.isPasteStage = true;
  15592. }
  15593. if (copyData && copyData.selectData.length) {
  15594. this.isPasteChoice = true;
  15595. }
  15596. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  15597. this.isPasteTask = true;
  15598. }
  15599. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  15600. this.isPasteTask = true;
  15601. }
  15602. },
  15603. getPaste2() {
  15604. let iframe = document.querySelectorAll(".interIframe")[0];
  15605. const turndownService = new TurndownService();
  15606. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  15607. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  15608. if(confirm_next_step){
  15609. this.courseText += turndownService.turndown(confirm_next_step)
  15610. iframe.contentWindow.confirm_next_step = ''
  15611. }
  15612. if(work_area_text && work_area_text.aiContent){
  15613. this.courseText += turndownService.turndown(work_area_text.aiContent)
  15614. iframe.contentWindow.work_area_text = ''
  15615. }
  15616. },
  15617. setCourseInfo(){
  15618. let courseInfo = ''
  15619. let sub = []
  15620. let mclass = []
  15621. if (this.courseTypeId.length) {
  15622. for (var i = 0; i < this.courseTypeId.length; i++) {
  15623. let _sid = this.courseTypeId[i]
  15624. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15625. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15626. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15627. }
  15628. }
  15629. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15630. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15631. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15632. }
  15633. }
  15634. }
  15635. }
  15636. if(this.courseName){
  15637. courseInfo = `课程名称:${this.courseName} `
  15638. }
  15639. if(mclass.length){
  15640. courseInfo += `年级:${mclass.join(',')} `
  15641. }
  15642. if(sub.length){
  15643. courseInfo += `学科:${sub.join(',')} `
  15644. }
  15645. console.log(courseInfo)
  15646. window.course_info = courseInfo
  15647. window.course_lang = this.languageSetting
  15648. },
  15649. setCover() {
  15650. var _this = this;
  15651. if(_this.cover.length){
  15652. return;
  15653. }
  15654. _this.imageloading2 = true
  15655. _this.ajax
  15656. .post("https://gpt.cocorobo.cn/search_image", {
  15657. page: _this.ppage,
  15658. pagesize: 9,
  15659. query: _this.courseName,
  15660. })
  15661. .then(function (response) {
  15662. // console.log(response.data.data);
  15663. var data = response.data.FunctionResponse.result;
  15664. _this.cover = [];
  15665.       setTimeout(() => {
  15666.         _this.cover[0] = {
  15667.           name: "网络图片.png",
  15668.           url: data[0].thumbnail
  15669.         };
  15670.         _this.imgChange1(null, null, 1, null);
  15671.         _this.$forceUpdate();
  15672.       }, 0);
  15673. _this.imageloading2 = false
  15674. })
  15675. .catch(function (error) {
  15676. _this.imageloading2 = false
  15677. console.log(error);
  15678. });
  15679. },
  15680. searchImage() {
  15681. var _this = this;
  15682. _this.imageList = [];
  15683. if (!_this.searchImageValue) {
  15684. _this.sysPicVisible2 = true;
  15685. return;
  15686. }
  15687. _this.imageloading = true;
  15688. _this.ajax
  15689. .post("https://gpt.cocorobo.cn/search_image", {
  15690. page: _this.ppage,
  15691. pagesize: 9,
  15692. query: _this.searchImageValue,
  15693. })
  15694. .then(function (response) {
  15695. // console.log(response.data.data);
  15696. var data = response.data.FunctionResponse.result;
  15697. for (var i = 0; i < data.length; i++) {
  15698. _this.imageList.push({ url: data[i].thumbnail });
  15699. }
  15700. _this.imageloading = false;
  15701. })
  15702. .catch(function (error) {
  15703. console.log(error);
  15704. });
  15705. _this.sysPicVisible2 = true;
  15706. },
  15707. changePicture() {
  15708. this.ppage++;
  15709. this.searchImage();
  15710. },
  15711. resetImage() {
  15712. this.ppage = 1;
  15713. this.searchImage();
  15714. },
  15715. jumpGj(i, j) {
  15716. if (i + 1 != this.isClickColor) {
  15717. this.isClickColor = i + 1;
  15718. }
  15719. var a = document.scrollingElement;
  15720. this.toolIndexType = `gj${i}${j}`;
  15721. let target = document.querySelector(`#gj${i}${j}`);
  15722. if (target) {
  15723. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15724. setTimeout(() => {
  15725. target.scrollIntoView(true);
  15726. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15727. j
  15728. ].isFold3 = false;
  15729. setTimeout(() => {
  15730. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15731. }, 0);
  15732. }, 0);
  15733. }
  15734. },
  15735. jumpGj2(i, j, k) {
  15736. if (this.unitIndex != k) {
  15737. if (this.panUnitJson() == 2) {
  15738. return;
  15739. }
  15740. this.unitSet(k);
  15741. }
  15742. setTimeout(() => {
  15743. if (i + 1 != this.isClickColor) {
  15744. this.isClickColor = i + 1;
  15745. }
  15746. var a = document.scrollingElement;
  15747. this.toolIndexType = `gj${i}${j}${k}`;
  15748. let target = document.querySelector(`#gj${i}${j}`);
  15749. if (target) {
  15750. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15751. setTimeout(() => {
  15752. target.scrollIntoView(true);
  15753. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15754. j
  15755. ].isFold3 = false;
  15756. setTimeout(() => {
  15757. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15758. }, 0);
  15759. }, 0);
  15760. }
  15761. }, 0);
  15762. },
  15763. dragStart(val, i, j) {
  15764. console.log(this.taskCount);
  15765. this.dragType = "drag";
  15766. this.taskCount = j;
  15767. this.oldIndex = i;
  15768. this.oldData = val;
  15769. },
  15770. dragOver(i, j) {
  15771. this.typeIndex = "chapter-" + j + "-" + i;
  15772. this.newIndex = i;
  15773. },
  15774. dragEnd() {
  15775. if (this.dragType != "drag") {
  15776. this.typeIndex = "";
  15777. this.newIndex = "";
  15778. this.dragType = "";
  15779. this.isdrag = "";
  15780. return;
  15781. }
  15782. console.log(this.taskCount);
  15783. let newItems = [
  15784. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15785. .chapterData,
  15786. ];
  15787. // 删除老的节点
  15788. newItems.splice(this.oldIndex, 1);
  15789. // 在列表中目标位置增加新的节点
  15790. newItems.splice(this.newIndex, 0, this.oldData);
  15791. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15792. this.taskCount
  15793. ].chapterData = [...newItems];
  15794. this.typeIndex = "";
  15795. this.newIndex = "";
  15796. this.dragType = "";
  15797. this.isdrag = "";
  15798. this.$forceUpdate();
  15799. },
  15800. dragTaskStart(val, i, j) {
  15801. this.dragType = "task";
  15802. this.oldIndex = i;
  15803. this.oldData = val;
  15804. this.oldUnitIndex = j;
  15805. },
  15806. dragTaskOver(i, j) {
  15807. this.typeIndex = "task-" + i;
  15808. this.newIndex = i;
  15809. this.checkUnitIndex = j;
  15810. },
  15811. async dragTaskEnd() {
  15812. if (this.dragType != "task") {
  15813. this.newIndex = "";
  15814. this.dragType = "";
  15815. this.typeIndex = "";
  15816. this.checkUnitIndex = "";
  15817. this.isdrag = "";
  15818. return;
  15819. }
  15820. if (
  15821. this.newIndex == this.oldIndex &&
  15822. this.oldUnitIndex == this.checkUnitIndex
  15823. ) {
  15824. this.newIndex = "";
  15825. this.dragType = "";
  15826. this.typeIndex = "";
  15827. this.checkUnitIndex = "";
  15828. this.isdrag = "";
  15829. return;
  15830. }
  15831. let count1 = await this.getWorksCount(
  15832. 2,
  15833. this.checkUnitIndex,
  15834. this.newIndex,
  15835. 0
  15836. );
  15837. let count2 = await this.getWorksCount(
  15838. 2,
  15839. this.oldUnitIndex,
  15840. this.oldIndex,
  15841. 0
  15842. );
  15843. if (count1 > 0 || count2 > 0) {
  15844. this.$confirm(
  15845. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15846. "提示",
  15847. {
  15848. confirmButtonText: "确定",
  15849. cancelButtonText: "取消",
  15850. type: "warning",
  15851. }
  15852. )
  15853. .then(() => {
  15854. if (this.oldUnitIndex != this.checkUnitIndex) {
  15855. let newItems = [
  15856. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15857. ];
  15858. // 删除老的节点
  15859. newItems.splice(this.oldIndex, 1);
  15860. // 在列表中目标位置增加新的节点
  15861. let newItems2 = [
  15862. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15863. ];
  15864. newItems2.splice(this.newIndex, 0, this.oldData);
  15865. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15866. ...newItems,
  15867. ];
  15868. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15869. ...newItems2,
  15870. ];
  15871. } else {
  15872. let newItems = [
  15873. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15874. ];
  15875. let chapterData = []
  15876. if (this.oldIndex == 0) {
  15877. chapterData = newItems[this.oldIndex].chapterData
  15878. newItems[this.oldIndex].chapterData = []
  15879. } else if (this.newIndex == 0) {
  15880. chapterData = newItems[this.newIndex].chapterData
  15881. newItems[this.oldIndex].chapterData = []
  15882. }
  15883. // 删除老的节点
  15884. newItems.splice(this.oldIndex, 1);
  15885. // 在列表中目标位置增加新的节点
  15886. newItems.splice(this.newIndex, 0, this.oldData);
  15887. if (this.oldIndex == 0 || this.newIndex == 0) {
  15888. newItems[0].chapterData = chapterData
  15889. }
  15890. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15891. ...newItems,
  15892. ];
  15893. }
  15894. this.typeIndex = "";
  15895. this.newIndex = "";
  15896. this.dragType = "";
  15897. this.checkUnitIndex = "";
  15898. this.isdrag = "";
  15899. this.updateWork();
  15900. this.$forceUpdate();
  15901. })
  15902. .catch(() => {
  15903. this.newIndex = "";
  15904. this.dragType = "";
  15905. this.typeIndex = "";
  15906. this.checkUnitIndex = "";
  15907. this.isdrag = "";
  15908. return;
  15909. });
  15910. } else {
  15911. if (this.oldUnitIndex != this.checkUnitIndex) {
  15912. let newItems = [
  15913. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15914. ];
  15915. // 删除老的节点
  15916. newItems.splice(this.oldIndex, 1);
  15917. // 在列表中目标位置增加新的节点
  15918. let newItems2 = [
  15919. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15920. ];
  15921. newItems2.splice(this.newIndex, 0, this.oldData);
  15922. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15923. ...newItems,
  15924. ];
  15925. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15926. ...newItems2,
  15927. ];
  15928. } else {
  15929. let newItems = [
  15930. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15931. ];
  15932. let chapterData = []
  15933. if (this.oldIndex == 0) {
  15934. chapterData = newItems[this.oldIndex].chapterData
  15935. newItems[this.oldIndex].chapterData = []
  15936. } else if (this.newIndex == 0) {
  15937. chapterData = newItems[this.newIndex].chapterData
  15938. newItems[this.oldIndex].chapterData = []
  15939. }
  15940. // 删除老的节点
  15941. newItems.splice(this.oldIndex, 1);
  15942. // 在列表中目标位置增加新的节点
  15943. newItems.splice(this.newIndex, 0, this.oldData);
  15944. if (this.oldIndex == 0 || this.newIndex == 0) {
  15945. newItems[0].chapterData = chapterData
  15946. }
  15947. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15948. ...newItems,
  15949. ];
  15950. }
  15951. this.typeIndex = "";
  15952. this.newIndex = "";
  15953. this.dragType = "";
  15954. this.checkUnitIndex = "";
  15955. this.isdrag = "";
  15956. this.updateWork();
  15957. this.$forceUpdate();
  15958. }
  15959. },
  15960. dragUnitStart(val, i) {
  15961. this.dragType = "Unit";
  15962. this.oldIndex = i;
  15963. this.oldData = val;
  15964. },
  15965. dragUnitOver(i) {
  15966. this.typeIndex = "Unit-" + i;
  15967. this.newIndex = i;
  15968. console.log(i, this.unitJson[i].toolOpen);
  15969. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  15970. this.unitJson[i].toolOpen = true;
  15971. this.updateWork();
  15972. this.$forceUpdate();
  15973. }
  15974. },
  15975. async dragUnitEnd() {
  15976. if (this.dragType != "Unit") {
  15977. this.newIndex = "";
  15978. this.dragType = "";
  15979. this.typeIndex = "";
  15980. this.isdrag = "";
  15981. return;
  15982. }
  15983. if (this.newIndex == this.oldIndex) {
  15984. this.newIndex = "";
  15985. this.dragType = "";
  15986. this.typeIndex = "";
  15987. this.isdrag = "";
  15988. return;
  15989. }
  15990. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  15991. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  15992. console.log(count1, count2);
  15993. if (count1 > 0 || count2 > 0) {
  15994. this.$confirm(
  15995. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  15996. "提示",
  15997. {
  15998. confirmButtonText: "确定",
  15999. cancelButtonText: "取消",
  16000. type: "warning",
  16001. }
  16002. )
  16003. .then(() => {
  16004. let newItems = [...this.unitJson];
  16005. // 删除老的节点
  16006. newItems.splice(this.oldIndex, 1);
  16007. // 在列表中目标位置增加新的节点
  16008. newItems.splice(this.newIndex, 0, this.oldData);
  16009. this.unitJson = [...newItems];
  16010. this.typeIndex = "";
  16011. this.newIndex = "";
  16012. this.dragType = "";
  16013. this.isdrag = "";
  16014. this.updateWork();
  16015. this.$forceUpdate();
  16016. })
  16017. .catch(() => {
  16018. this.newIndex = "";
  16019. this.dragType = "";
  16020. this.typeIndex = "";
  16021. this.isdrag = "";
  16022. return;
  16023. });
  16024. } else {
  16025. let newItems = [...this.unitJson];
  16026. // 删除老的节点
  16027. newItems.splice(this.oldIndex, 1);
  16028. // 在列表中目标位置增加新的节点
  16029. newItems.splice(this.newIndex, 0, this.oldData);
  16030. this.unitJson = [...newItems];
  16031. this.typeIndex = "";
  16032. this.newIndex = "";
  16033. this.dragType = "";
  16034. this.isdrag = "";
  16035. this.updateWork();
  16036. this.$forceUpdate();
  16037. }
  16038. },
  16039. getWorksCount(type, stage, task, tool) {
  16040. return new Promise((resolve, reject) => {
  16041. let params = [
  16042. {
  16043. cid: this.cid,
  16044. stage: stage,
  16045. task: task,
  16046. tool: tool,
  16047. type: type,
  16048. },
  16049. ];
  16050. this.ajax
  16051. .post(this.$store.state.api + "getCourseWorkCount", params)
  16052. .then((res) => {
  16053. let count = res.data[0][0].count;
  16054. resolve(count);
  16055. })
  16056. .catch((err) => {
  16057. resolve(0);
  16058. this.$message.error("网络不佳");
  16059. console.error(err);
  16060. });
  16061. });
  16062. },
  16063. getTwoType(id) {
  16064. this.twoJson = [];
  16065. var array = this.CourseTypeJson1[
  16066. "3f8eed32-aba9-11ee-b534-005056b86db5"
  16067. ].filter((e) => {
  16068. return e.ppid == id;
  16069. });
  16070. this.twoJson = array;
  16071. this.$forceUpdate();
  16072. },
  16073. ctype() {
  16074. this.oneJson =
  16075. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  16076. },
  16077. selectAllType1() {
  16078. this.CourseType1 = [];
  16079. this.CourseTypeJson1 = {};
  16080. this.courseTypeId1 = {};
  16081. this.$forceUpdate();
  16082. let params = {
  16083. org: this.org && this.org != "" ? this.org : "",
  16084. oid: this.oid && this.oid != "" ? this.oid : "",
  16085. };
  16086. this.ajax
  16087. .get(this.$store.state.api + "selectAllEvaType", params)
  16088. .then((res) => {
  16089. this.CourseType1 = res.data;
  16090. for (var i = 0; i < res.data[0].length; i++) {
  16091. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  16092. res.data[0][i].name = "一级分类";
  16093. } else if (
  16094. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  16095. ) {
  16096. res.data[0][i].name = "二级分类";
  16097. }
  16098. if (!this.cid) {
  16099. this.courseTypeId1[res.data[0][i].id] = [];
  16100. }
  16101. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  16102. this.CourseTypeJson1[res.data[0][i].id] = [];
  16103. }
  16104. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  16105. for (var j = 0; j < res.data[1].length; j++) {
  16106. if (res.data[0][i].id == res.data[1][j].pid) {
  16107. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16108. }
  16109. }
  16110. // } else {
  16111. if (res.data[2].length > 0) {
  16112. for (var j = 0; j < res.data[2].length; j++) {
  16113. if (res.data[0][i].id == res.data[2][j].pid) {
  16114. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16115. }
  16116. }
  16117. }
  16118. if (res.data[3].length > 0) {
  16119. for (var j = 0; j < res.data[3].length; j++) {
  16120. if (res.data[0][i].id == res.data[3][j].pid) {
  16121. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16122. }
  16123. }
  16124. }
  16125. // }
  16126. }
  16127. this.ctype();
  16128. this.cetBoxDialog = true;
  16129. })
  16130. .catch((err) => {
  16131. console.error(err);
  16132. });
  16133. },
  16134. setAiJson(pan,string,string2,string3){
  16135. if(pan == 'aiTeacher2'){
  16136. this.aiJson['teacherDetail2'] = string
  16137. }else if(pan == 'aiRateRuleA'){
  16138. this.aiJson['aiRateRule'] = string
  16139. }else if(pan == 'aiOutline2'){
  16140. this.aiJson['aiOutlineTask'] = string
  16141. this.aiJson['aiOutlineDetail'] = string2
  16142. }else if(pan == 'aiTeacher3'){
  16143. this.aiJson['aiCpoteTask'] = string
  16144. this.aiJson['teacherDetail2'] = string2
  16145. }else if(pan == 'aiTask2'){
  16146. this.aiJson['aiTask'] = string
  16147. }else if(pan == 'aiTask3'){
  16148. this.aiJson['aiTaskG1'] = string
  16149. this.aiJson['aiTaskG2'] = string2
  16150. this.aiJson['aiTaskG3'] = string3
  16151. }else if(pan == 'aiteacherTextDetail'){
  16152. this.aiJson['aiAbstract'] = string
  16153. }else if(pan == 'aitargetTextDetail'){
  16154. this.aiJson['aiTarget'] = string
  16155. }else if(pan == 'aitargetTextDetail2'){
  16156. this.aiJson['aiTarget2'] = string
  16157. }else if(pan == 'aitargetTextDetail3'){
  16158. this.aiJson['aiTargetGet'] = string
  16159. this.aiJson['aiTarget2'] = string2
  16160. }else {
  16161. this.aiJson[pan] = string
  16162. }
  16163. this.aiText2 = ''
  16164. this.aiText3 = ''
  16165. this.$forceUpdate();
  16166. },
  16167. editTask3(index){
  16168. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  16169. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  16170. }else {
  16171. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  16172. }
  16173. setTimeout(() => {
  16174. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  16175. setTimeout(() => {
  16176. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  16177. }, 0);
  16178. }, 100);
  16179. this.$forceUpdate();
  16180. },
  16181. editTask2(index){
  16182. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  16183. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  16184. }else {
  16185. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  16186. }
  16187. setTimeout(() => {
  16188. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  16189. setTimeout(() => {
  16190. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  16191. }, 0);
  16192. }, 100);
  16193. this.$forceUpdate();
  16194. },
  16195. openRule(i, k){
  16196. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  16197. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  16198. }else {
  16199. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  16200. }
  16201. setTimeout(() => {
  16202. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  16203. setTimeout(() => {
  16204. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  16205. }, 0);
  16206. }, 200);
  16207. this.$forceUpdate();
  16208. },
  16209. editCpote(index){
  16210. if(this.cpote[index]){
  16211. this.cpote[index] = false
  16212. }else {
  16213. this.cpote[index] = true
  16214. }
  16215. setTimeout(() => {
  16216. this.cpote[index.replace('s','')] += "*0*%*";
  16217. setTimeout(() => {
  16218. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  16219. }, 0);
  16220. }, 100);
  16221. this.$forceUpdate();
  16222. },
  16223. clickGenTT(){
  16224. if(!this.teacherInfoData.length){
  16225. this.$message.error("请上传教案");
  16226. return;
  16227. }
  16228. this.openAiDialog(2, 'aiteacherTextDetail',1)
  16229. setTimeout(() => {
  16230. this.openAiDialog(2, 'aitargetTextDetail',1)
  16231. }, 500);
  16232. },
  16233. async exportTeachPlan(){
  16234. this.loading = true
  16235. const zip = new JSZip();
  16236. let md = new MarkdownIt();
  16237. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16238. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  16239. let name = _task.task+'-教案'
  16240. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  16241. if(!this.cid){
  16242. await this.generate(name, _html, i)
  16243. }
  16244. let file = await this.generateExport(name, _html, i)
  16245. zip.file(`${name}.docx`, file, { binary: true })
  16246. }
  16247. zip.generateAsync({ type: "blob" }).then((content) => {
  16248. // 生成二进制流
  16249. saveAs(
  16250. content,
  16251. this.courseName + "-" + "教案.zip"
  16252. ); // 利用file-saver保存文件 自定义文件名
  16253. setTimeout(() => {
  16254. this.loading = false
  16255. if(!this.cid){
  16256. this.addWork(3)
  16257. }else{
  16258. this.steps = 4;
  16259. }
  16260. }, 2000);
  16261. });
  16262. },
  16263. clickGenTT2(){
  16264. if (this.courseName == "") {
  16265. this.$message.error("请补充填写课程名称");
  16266. return;
  16267. }
  16268. let functionA = ''
  16269. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  16270. // setTimeout(() => {
  16271. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  16272. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  16273. // }, 500);
  16274. functionA = ()=>{
  16275. this.openAiDialog(2, 'aitargetTextDetail3',1)
  16276. }
  16277. }
  16278. this.openAiDialog(2, 'aiDetail',1, functionA)
  16279. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  16280. // setTimeout(() => {
  16281. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  16282. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  16283. // }, 500);
  16284. }
  16285. this.courseTextBool = true
  16286. },
  16287. changeIsuseT(){
  16288. if(this.isuseT == 1){
  16289. this.courseTextB = false
  16290. }else{
  16291. if(this.courseText){
  16292. this.courseTextB = false
  16293. }else{
  16294. this.courseTextB = true
  16295. }
  16296. }
  16297. },
  16298. changeLang(){
  16299. window.course_lang = this.languageSetting
  16300. },
  16301. openInterPanSetting(){
  16302. this.interSetting = !this.interSetting
  16303. if(this.interSetting){
  16304. if(this.istemplate == 1){
  16305. this.agentid = this.aiJson.agentid
  16306. }else {
  16307. this.agentid = this.aiJson.sagentid
  16308. }
  16309. }else {
  16310. this.agentid = ''
  16311. }
  16312. },
  16313. setAgentid(){
  16314. if(!this.agentid.trim()){
  16315. this.$message.error('请输入工作流链接')
  16316. return;
  16317. }
  16318. if(this.istemplate == 1){
  16319. this.aiJson.agentid = this.agentid.trim()
  16320. }else {
  16321. this.aiJson.sagentid = this.agentid.trim()
  16322. }
  16323. this.interFlash = false
  16324. setTimeout(() => {
  16325. this.interFlash = true
  16326. }, 100);
  16327. this.interSetting = false
  16328. },
  16329. rebuildAgentid(){
  16330. this.aiJson.sagentid = ''
  16331. this.interFlash = false
  16332. setTimeout(() => {
  16333. this.interFlash = true
  16334. }, 100);
  16335. this.interSetting = false
  16336. },
  16337. cancelInterSetting(){
  16338. this.agentid = ''
  16339. this.interSetting = false
  16340. },
  16341. openAiDialog2(clickType, type, callback, index, tindex){
  16342. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  16343. confirmButtonText: "确定",
  16344. cancelButtonText: "取消",
  16345. type: "warning",
  16346. })
  16347. .then(() => {
  16348. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  16349. // this.openAiDialog(clickType, 'aiTeacher')
  16350. // }else {
  16351. this.openAiDialog(clickType, type, callback, index, tindex)
  16352. // }
  16353. })
  16354. .catch(() => {
  16355. });
  16356. },
  16357. openAiDialog(clickType, type, callback, index, tindex) {
  16358. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  16359. this.$message.error("您没有权限修改/查看提示词");
  16360. return;
  16361. }
  16362. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  16363. this.$message.error("请上传教案");
  16364. return;
  16365. }
  16366. if (this.courseName == "") {
  16367. this.$message.error("请补充填写课程名称");
  16368. return;
  16369. }
  16370. this.aiText2 = ''
  16371. this.clickType = clickType
  16372. let sub = []
  16373. if (this.courseTypeId.length) {
  16374. for (var i = 0; i < this.courseTypeId.length; i++) {
  16375. let _sid = this.courseTypeId[i]
  16376. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16377. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16378. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16379. }
  16380. }
  16381. }
  16382. }
  16383. let mclass = []
  16384. if (this.courseTypeId.length) {
  16385. for (var i = 0; i < this.courseTypeId.length; i++) {
  16386. let _sid = this.courseTypeId[i]
  16387. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16388. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16389. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16390. }
  16391. }
  16392. }
  16393. }
  16394. if (type == "aiDetail") {
  16395. if (this.ttextLoading) {
  16396. this.$message({
  16397. message: "请回答完毕后再次发送",
  16398. type: "warning"
  16399. });
  16400. return;
  16401. }
  16402. this.aitype = "aiDetail"
  16403. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  16404. this.aiText = this.aiJson.aiDetail
  16405. this.aiCallBack = [callback, index]
  16406. } else if (type == "aiOutline") {
  16407. this.aitype = "aiOutline"
  16408. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16409. this.aiText = this.aiJson.aiOutline
  16410. } else if (type == "aiOutline2") {
  16411. this.aitype = "aiOutline2"
  16412. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16413. this.aiText = this.aiJson.aiOutlineTask
  16414. this.aiText2 = this.aiJson.aiOutlineDetail
  16415. } else if (type == "aiOutlineDetail2") {
  16416. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  16417. this.$message({
  16418. message: "请回答完毕后再次发送",
  16419. type: "warning"
  16420. });
  16421. return;
  16422. }
  16423. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  16424. this.$message.error('请输入任务名称')
  16425. return;
  16426. }
  16427. this.aitype = type
  16428. this.aiCallBack = callback
  16429. this.aiText = this.aiJson.aiOutlineDetail2
  16430. } else if (type == "aiTask") {
  16431. this.aitype = "aiTask"
  16432. var _text = ""
  16433. for (var i = 0; i < this.teacherText.length; i++) {
  16434. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  16435. }
  16436. // this.aiText = `请根据${_text}。`
  16437. this.aiText = this.aiJson.aiTask
  16438. this.aiCallBack = callback
  16439. } else if (type == "aiTask2") {
  16440. if (this.taskLoading[callback]) {
  16441. this.$message({
  16442. message: "请回答完毕后再次发送",
  16443. type: "warning"
  16444. });
  16445. return;
  16446. }
  16447. this.aitype = "aiTask2"
  16448. this.aiText = this.aiJson.aiTask
  16449. this.aiCallBack = [callback, index]
  16450. } else if (type == "aiTask3") {
  16451. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  16452. this.$message({
  16453. message: "请回答完毕后再次发送",
  16454. type: "warning"
  16455. });
  16456. return;
  16457. }
  16458. this.aitype = type
  16459. this.aiText = this.aiJson.aiTaskG1
  16460. this.aiText2 = this.aiJson.aiTaskG2
  16461. this.aiText3 = this.aiJson.aiTaskG3
  16462. this.aiCallBack = [callback, index]
  16463. } else if (type == "aiTaskG3") {
  16464. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][2])) {
  16465. this.$message({
  16466. message: "请回答完毕后再次发送",
  16467. type: "warning"
  16468. });
  16469. return;
  16470. }
  16471. this.aitype = type
  16472. this.aiText = this.aiJson.aiTaskG3
  16473. this.aiCallBack = callback
  16474. } else if (type == "aiDetail1") {
  16475. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  16476. this.$message({
  16477. message: "请回答完毕后再次发送",
  16478. type: "warning"
  16479. });
  16480. return;
  16481. }
  16482. this.aitype = "aiDetail1"
  16483. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  16484. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  16485. this.aiText = this.aiJson.aiDetail1
  16486. this.aiCallBack = callback
  16487. this.aiIndex = index
  16488. } else if (type == "aiDetail2") {
  16489. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  16490. this.$message({
  16491. message: "请回答完毕后再次发送",
  16492. type: "warning"
  16493. });
  16494. return;
  16495. }
  16496. this.aitype = "aiDetail2"
  16497. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  16498. this.aiText = this.aiJson.aiDetail2
  16499. this.aiCallBack = callback
  16500. this.aiIndex = index
  16501. } else if (type == "aiDetail3") {
  16502. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  16503. this.$message({
  16504. message: "请回答完毕后再次发送",
  16505. type: "warning"
  16506. });
  16507. return;
  16508. }
  16509. this.aitype = "aiDetail3"
  16510. this.aiText = this.aiJson.aiDetail3
  16511. this.aiIndex = index + '-' + tindex
  16512. } else if (type == "aiDetail4") {
  16513. var _text = ""
  16514. if(callback && callback.length){
  16515. for (var i = 0; i < callback.length; i++) {
  16516. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  16517. }
  16518. }
  16519. this.aitype = "aiDetail4"
  16520. this.aiText = this.aiJson.aiDetail4
  16521. this.aiIndex = index
  16522. } else if (type == "aiTeacher") {
  16523. this.aitype = "aiTeacher"
  16524. var _text = ""
  16525. for (var i = 0; i < this.dArray.length; i++) {
  16526. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  16527. }
  16528. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16529. this.aiText = this.aiJson.aiTeacher
  16530. this.aiCallBack = callback
  16531. } else if (type == "aiTeacher2") {
  16532. if(this.ttaskDetailLoading5.length){
  16533. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  16534. this.$message({
  16535. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  16536. type: "warning"
  16537. });
  16538. return
  16539. }
  16540. this.aitype = "aiTeacher2"
  16541. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16542. } else if (type == "aiTeacher3") {
  16543. this.aitype = type
  16544. this.aiText = this.aiJson.aiCpoteTask
  16545. this.aiText2 = this.aiJson.teacherDetail2
  16546. } else if (type == "teacherDetail") {
  16547. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  16548. this.$message({
  16549. message: "请回答完毕后再次发送",
  16550. type: "warning"
  16551. });
  16552. return;
  16553. }
  16554. this.aitype = "teacherDetail"
  16555. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16556. this.aiText = this.aiJson.teacherDetail
  16557. this.aiCallBack = callback
  16558. this.aiIndex = index
  16559. } else if (type == "teacherDetail2") {
  16560. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  16561. this.$message.error('请输入任务名称')
  16562. return;
  16563. }
  16564. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  16565. // this.$message({
  16566. // message: "请回答完毕后再次发送",
  16567. // type: "warning"
  16568. // });
  16569. // return;
  16570. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  16571. confirmButtonText: "确定重新生成",
  16572. cancelButtonText: "取消",
  16573. distinguishCancelAndClose: true,
  16574. type: "warning",
  16575. customClass: 'custom-confirm-box'
  16576. })
  16577. .then(() => {
  16578. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  16579. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  16580. this.isTeacherTaskCancelToken2[index] = null;
  16581. }
  16582. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  16583. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  16584. if(this.isTeacherTaskCancelSource[index]){
  16585. this.isTeacherTaskCancelSource[index].close()
  16586. this.isTeacherTaskCancelSource[index] = null
  16587. }
  16588. this.aitype = "teacherDetail2"
  16589. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16590. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16591. this.aiCallBack = callback
  16592. this.aiIndex = index
  16593. this.dialogVisibleAiD = true
  16594. }).catch((v) => {
  16595. console.log(v);
  16596. })
  16597. setTimeout(() => {
  16598. this.setTipsIndex()
  16599. }, 500)
  16600. return;
  16601. }else {
  16602. this.aitype = "teacherDetail2"
  16603. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16604. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16605. this.aiCallBack = callback
  16606. this.aiIndex = index
  16607. this.dialogVisibleAiD = true
  16608. }
  16609. } else if (type == "aiCpote1") {
  16610. if (this.cpotetLoading.cpote1) {
  16611. this.$message({
  16612. message: "请回答完毕后再次发送",
  16613. type: "warning"
  16614. });
  16615. return;
  16616. }
  16617. this.aitype = "aiCpote1"
  16618. this.aiText = this.aiJson.cpote1
  16619. this.aiCallBack = callback
  16620. } else if (type == "aiCpote2") {
  16621. if (this.cpotetLoading.cpote2) {
  16622. this.$message({
  16623. message: "请回答完毕后再次发送",
  16624. type: "warning"
  16625. });
  16626. return;
  16627. }
  16628. this.aitype = "aiCpote2"
  16629. this.aiText = this.aiJson.cpote2
  16630. this.aiCallBack = callback
  16631. } else if (type == "aiCpote3") {
  16632. if (this.cpotetLoading.cpote3) {
  16633. this.$message({
  16634. message: "请回答完毕后再次发送",
  16635. type: "warning"
  16636. });
  16637. return;
  16638. }
  16639. this.aitype = "aiCpote3"
  16640. this.aiText = this.aiJson.cpote3
  16641. this.aiCallBack = callback
  16642. } else if (type == "aiCpote4") {
  16643. if (this.cpotetLoading.cpote4) {
  16644. this.$message({
  16645. message: "请回答完毕后再次发送",
  16646. type: "warning"
  16647. });
  16648. return;
  16649. }
  16650. this.aitype = "aiCpote4"
  16651. this.aiText = this.aiJson.cpote4
  16652. this.aiCallBack = callback
  16653. } else if (type == 'aiteacherTextDetail'){
  16654. if (this.tteacherTextLoading) {
  16655. this.$message({
  16656. message: "请回答完毕后再次发送",
  16657. type: "warning"
  16658. });
  16659. return;
  16660. }
  16661. this.aitype = type
  16662. this.aiText = this.aiJson.aiAbstract
  16663. this.aiCallBack = callback
  16664. } else if (type == 'aitargetTextDetail'){
  16665. if (this.ttargetTextLoading) {
  16666. this.$message({
  16667. message: "请回答完毕后再次发送",
  16668. type: "warning"
  16669. });
  16670. return;
  16671. }
  16672. this.aitype = type
  16673. this.aiText = this.aiJson.aiTarget
  16674. this.aiCallBack = callback
  16675. } else if (type == 'aitargetTextDetail2'){
  16676. if (this.ttargetTextLoading2) {
  16677. this.$message({
  16678. message: "请回答完毕后再次发送",
  16679. type: "warning"
  16680. });
  16681. return;
  16682. }
  16683. this.aitype = type
  16684. this.aiText = this.aiJson.aiTarget2
  16685. this.aiCallBack = callback
  16686. } else if (type == 'aitargetTextDetail3'){
  16687. if (this.ttargetTextLoading2) {
  16688. this.$message({
  16689. message: "请回答完毕后再次发送",
  16690. type: "warning"
  16691. });
  16692. return;
  16693. }
  16694. if(!this.courseText){
  16695. this.$message.error("请生成简要描述后再生成目标");
  16696. return;
  16697. }
  16698. this.aitype = type
  16699. this.aiText = this.aiJson.aiTargetGet
  16700. this.aiText2 = this.aiJson.aiTarget2
  16701. this. aiCallBack= callback
  16702. } else if (type == 'aiSearchFile'){
  16703. if(this.fileSLoading) {
  16704. this.$message({
  16705. message: "请回答完毕后再次发送",
  16706. type: "warning"
  16707. });
  16708. return;
  16709. }
  16710. this.aitype = type
  16711. this.aiText = this.aiJson.aiSearchFile
  16712. } else if (type == 'aiSearchFile2'){
  16713. if(this.fileSLoading) {
  16714. this.$message({
  16715. message: "请回答完毕后再次发送",
  16716. type: "warning"
  16717. });
  16718. return;
  16719. }
  16720. this.aitype = type
  16721. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  16722. #输出样例
  16723. <学科1>:关键词
  16724. - 匹配到的内容1
  16725. - 匹配到的内容2
  16726. - 匹配到的内容3
  16727. - 匹配到的内容4
  16728. - 匹配到的内容5
  16729. <学科2>:关键词
  16730. - 匹配到的内容1
  16731. - 匹配到的内容2
  16732. - 匹配到的内容3
  16733. - 匹配到的内容4
  16734. - 匹配到的内容5
  16735. ...
  16736. <学科n>:关键词
  16737. - 匹配到的内容1
  16738. - 匹配到的内容2
  16739. - 匹配到的内容3
  16740. - 匹配到的内容4
  16741. - 匹配到的内容5
  16742. `
  16743. } else if (type == 'aiRateRule'){
  16744. this.aitype = type
  16745. this.aiText = this.aiJson.aiRateRule
  16746. this.aiCallBack = [callback, index]
  16747. } else if (type == 'aiRateRuleA'){
  16748. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  16749. confirmButtonText: "生成所有",
  16750. cancelButtonText: "仅生成该任务",
  16751. distinguishCancelAndClose: true,
  16752. type: "warning",
  16753. })
  16754. .then(() => {
  16755. this.aitype = type
  16756. this.aiText = this.aiJson.aiRateRule
  16757. this.aiCallBack = [1,callback]
  16758. this.dialogVisibleAiD = true
  16759. }).catch((v) => {
  16760. console.log(v);
  16761. if (v == "cancel") {
  16762. this.aitype = type
  16763. this.aiText = this.aiJson.aiRateRule
  16764. this.aiCallBack = [2,callback]
  16765. this.dialogVisibleAiD = true
  16766. }
  16767. })
  16768. }
  16769. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  16770. this.dialogVisibleAiD = true
  16771. }
  16772. },
  16773. async aiConfirm(msg,msg2,msg3) {
  16774. let sub = []
  16775. if (this.courseTypeId.length) {
  16776. for (var i = 0; i < this.courseTypeId.length; i++) {
  16777. let _sid = this.courseTypeId[i]
  16778. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16779. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16780. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16781. }
  16782. }
  16783. }
  16784. }
  16785. let mclass = []
  16786. if (this.courseTypeId.length) {
  16787. for (var i = 0; i < this.courseTypeId.length; i++) {
  16788. let _sid = this.courseTypeId[i]
  16789. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16790. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16791. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16792. }
  16793. }
  16794. }
  16795. }
  16796. let url = []
  16797. if (this.infoData.length) {
  16798. for (var i = 0; i < this.infoData.length; i++) {
  16799. url.push(this.infoData[i].url)
  16800. }
  16801. }
  16802. if (this.aitype == "aiDetail") {
  16803. this.detailYou(msg)
  16804. } else if (this.aitype == "aiOutline") {
  16805. this.loading = true
  16806. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16807. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16808. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  16809. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16810. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16811. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16812. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16813. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  16814. if(this.languageSetting == 2){
  16815. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16816. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16817. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  16818. }
  16819. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  16820. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16821. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16822. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16823. let message = `NOTICE
  16824. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16825. Language: ${this.getLang()}
  16826. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16827. Instruction: Based on the context, follow "Format example", write content.
  16828. # Context
  16829. ## 要求
  16830. ${msg} 以及##参考资料
  16831. ## 参考资料
  16832. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16833. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16834. detail至少输出300tokens,markdown格式输出。
  16835. detail包含子教学目标、过程性成果、子评价标准
  16836. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16837. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16838. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  16839. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  16840. # Format example
  16841. [{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]`
  16842. // detail输出不要输出成json,文本或者markdown都可以
  16843. this.aiGet2(message, () => {
  16844. this.loading = false
  16845. this.isOutline = true
  16846. })
  16847. } else if (this.aitype == "aiOutline2") {
  16848. this.loading = true
  16849. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16850. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16851. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16852. let message = `NOTICE
  16853. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16854. Language: ${this.getLang()}
  16855. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16856. Instruction: Based on the context, follow "Format example", write content.
  16857. # Context
  16858. ## 要求
  16859. ${msg} 以及##参考资料
  16860. ## 参考资料
  16861. 课程名字:${this.courseName}
  16862. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  16863. ${sub.length ? '学科:' + sub.join(",") : ''}
  16864. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16865. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16866. # Format example
  16867. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  16868. this.aiGetTask2(message, () => {
  16869. this.loading = false
  16870. this.isOutline = true
  16871. })
  16872. } else if (this.aitype == "aiOutlineDetail2") {
  16873. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  16874. } else if (this.aitype == "aiTask") {
  16875. var _text = ""
  16876. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16877. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16878. }
  16879. let message = `NOTICE
  16880. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16881. Language: ${this.getLang()}
  16882. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16883. Instruction: Based on the context, follow "Format example", write content.
  16884. # Context
  16885. ## 要求
  16886. ${msg} 为**每个教学任务分别输出**以下内容。
  16887.  
  16888. ${(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','') : ''}
  16889. ## 参考资料
  16890. 教学任务教案:${_text}
  16891. ## 格式要求
  16892. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  16893. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16894. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  16895. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16896. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16897. 出现选择题和问答题的概率提高
  16898. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  16899.  
  16900. # Format example
  16901. [{"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":"工具描述"}]}]`
  16902. this.loading = true
  16903. this.aiGet3(message, this.aiCallBack)
  16904. } else if (this.aitype == "aiTask2") {
  16905. if(this.aiCallBack[0] == 'all'){
  16906. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16907. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16908. let message = `NOTICE
  16909. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16910. Language: ${this.getLang()}
  16911. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16912. Instruction: Based on the context, follow "Format example", write content.
  16913. # Context
  16914. ## 要求
  16915. ${msg} 为教学任务分别输出以下内容。
  16916.  
  16917. ${(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','') : ''}
  16918. ## 参考资料
  16919. 教学任务教案:${_text}
  16920. ## 格式要求
  16921. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16922. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16923. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16924. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16925. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16926.  
  16927. # Format example
  16928. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16929. this.taskLoading[_task] = true
  16930. this.aiGet32(message, _task)
  16931. }
  16932. }else{
  16933. 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`
  16934. let message = `NOTICE
  16935. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16936. Language: ${this.getLang()}
  16937. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16938. Instruction: Based on the context, follow "Format example", write content.
  16939. # Context
  16940. ## 要求
  16941. ${msg} 为教学任务分别输出以下内容。
  16942.  
  16943. ${(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','') : ''}
  16944. ## 参考资料
  16945. 教学任务教案:${_text}
  16946. ## 格式要求
  16947. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16948. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  16949. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16950. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16951. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  16952.  
  16953. # Format example
  16954. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  16955. this.taskLoading[this.aiCallBack[0]] = true
  16956. this.aiGet32(message, this.aiCallBack[0])
  16957. }
  16958. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  16959. } else if (this.aitype == "aiTask3") {
  16960. if(this.aiCallBack[0] == 'all'){
  16961. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16962. let message1 = `NOTICE
  16963. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16964. Language: ${this.getLang()}
  16965. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16966. Instruction: Based on the context, follow "Format example", write content.
  16967. # Context
  16968. ## 要求
  16969. ${msg}
  16970.  
  16971. ## 参考资料
  16972. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16973. # 输出格式与要求
  16974. 任务描述(告诉学生他们需要做什么):
  16975. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  16976. # 范例
  16977. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  16978. # Format example
  16979. { "detail":"任务描述" }`
  16980. let message2 = `NOTICE
  16981. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  16982. Language: ${this.getLang()}
  16983. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16984. Instruction: Based on the context, follow "Format example", write content.
  16985. # Context
  16986. ## 要求
  16987. ${msg2}
  16988.  
  16989. ## 参考资料
  16990. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  16991. # 输出格式与要求
  16992. 互动工具列表
  16993. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  16994. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  16995. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  16996. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  16997. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  16998. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  16999. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  17000. # Format example
  17001. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17002. let message3 = `NOTICE
  17003. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17004. Language: ${this.getLang()}
  17005. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17006. Instruction: Based on the context, follow "Format example", write content.
  17007. # Context
  17008. ## 要求
  17009. ${msg3}
  17010.  
  17011. ## 参考资料
  17012. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17013. # 输出格式与要求
  17014. 核心素养:从教案中提取
  17015. 目标:从教案中提取
  17016. 评价标准:从教案中提取评价标准
  17017. # Format example
  17018. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17019. if(!this.taskGLoading[_task]){
  17020. this.taskGLoading[_task] = []
  17021. }
  17022. this.taskGLoading[_task][0] = true
  17023. this.taskGLoading[_task][1] = true
  17024. // this.taskGLoading[_task][2] = true
  17025. this.aiGetG321(message1, _task)
  17026. this.aiGetG322(message2, _task)
  17027. // this.aiGetG323(message3, _task)
  17028. }
  17029. }else{
  17030. let message1 = `NOTICE
  17031. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17032. Language: ${this.getLang()}
  17033. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17034. Instruction: Based on the context, follow "Format example", write content.
  17035. # Context
  17036. ## 要求
  17037. ${msg}
  17038.  
  17039. ## 参考资料
  17040. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17041. # 输出格式与要求
  17042. 任务描述(告诉学生他们需要做什么):
  17043. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  17044. # 范例
  17045. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  17046. # Format example
  17047. { "detail":"任务描述" }`
  17048. let message2 = `NOTICE
  17049. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17050. Language: ${this.getLang()}
  17051. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17052. Instruction: Based on the context, follow "Format example", write content.
  17053. # Context
  17054. ## 要求
  17055. ${msg2}
  17056.  
  17057. ## 参考资料
  17058. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17059. # 输出格式与要求
  17060. 互动工具列表
  17061. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  17062. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  17063. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  17064. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  17065. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  17066. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  17067. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  17068. # Format example
  17069. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17070. let message3 = `NOTICE
  17071. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17072. Language: ${this.getLang()}
  17073. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17074. Instruction: Based on the context, follow "Format example", write content.
  17075. # Context
  17076. ## 要求
  17077. ${msg3}
  17078.  
  17079. ## 参考资料
  17080. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17081. # 输出格式与要求
  17082. 核心素养:从教案中提取
  17083. 目标:从教案中提取
  17084. 评价标准:从教案中提取评价标准
  17085. # Format example
  17086. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17087. if(!this.taskGLoading[this.aiCallBack[0]]){
  17088. this.taskGLoading[this.aiCallBack[0]] = []
  17089. }
  17090. this.taskGLoading[this.aiCallBack[0]][0] = true
  17091. this.taskGLoading[this.aiCallBack[0]][1] = true
  17092. // this.taskGLoading[this.aiCallBack[0]][2] = true
  17093. this.aiGetG321(message1, this.aiCallBack[0])
  17094. this.aiGetG322(message2, this.aiCallBack[0])
  17095. // this.aiGetG323(message3, this.aiCallBack[0])
  17096. }
  17097. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17098. } else if (this.aitype == "aiTaskG3") {
  17099. let message3 = `NOTICE
  17100. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17101. Language: ${this.getLang()}
  17102. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17103. Instruction: Based on the context, follow "Format example", write content.
  17104. # Context
  17105. ## 要求
  17106. ${msg3}
  17107.  
  17108. ## 参考资料
  17109. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17110. # 输出格式与要求
  17111. 核心素养:从教案中提取
  17112. 目标:从教案中提取
  17113. 评价标准:从教案中提取评价标准
  17114. # Format example
  17115. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17116. if(!this.taskGLoading[this.aiCallBack]){
  17117. this.taskGLoading[this.aiCallBack] = []
  17118. }
  17119. this.taskGLoading[this.aiCallBack][2] = true
  17120. this.aiGetG323(message3, this.aiCallBack)
  17121. } else if (this.aitype == "aiDetail1") {
  17122. this.aiDetail(msg, this.aiIndex)
  17123. } else if (this.aitype == "aiDetail2") {
  17124. this.aiDetail2(msg, this.aiIndex)
  17125. } else if (this.aitype == "aiDetail3") {
  17126. let _index = this.aiIndex.split('-')
  17127. this.aiDetail3(msg, _index[0], _index[1])
  17128. } else if (this.aitype == "aiDetail4") {
  17129. this.aiDetail4(msg, this.aiIndex)
  17130. } else if (this.aitype == "teacherDetail") {
  17131. this.aiDetail5(msg, this.aiIndex)
  17132. } else if (this.aitype == "teacherDetail2") {
  17133. this.aiDetail52(msg, this.aiIndex)
  17134. } else if (this.aitype == "aiCpote1") {
  17135. this.aiCpote(msg, this.aiCallBack)
  17136. } else if (this.aitype == "aiCpote2") {
  17137. this.aiCpote(msg, this.aiCallBack)
  17138. } else if (this.aitype == "aiCpote3") {
  17139. this.aiCpote(msg, this.aiCallBack)
  17140. } else if (this.aitype == "aiCpote4") {
  17141. this.aiCpote(msg, this.aiCallBack)
  17142. } else if (this.aitype == "aiTeacher") {
  17143. this.loading = true
  17144. var _text = ""
  17145. for (var i = 0; i < this.dArray.length; i++) {
  17146. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  17147. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  17148. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17149. let message = ` NOTICE
  17150. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17151. Language: ${this.getLang()}
  17152. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17153. Instruction: Based on the context, follow "Format example", write content.
  17154. # Context
  17155. ## 要求
  17156. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  17157. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  17158. ${(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','') : ''}
  17159. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17160. ## Format example
  17161. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  17162. this.aiGet4(message, () => {
  17163. this.loading = false
  17164. this.isOutline2 = true
  17165. })
  17166. } else if (this.aitype == "aiTeacher2"){
  17167. this.isOutline2 = true
  17168. let _this = this
  17169. setTimeout(()=>{
  17170. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17171. const _tindex = 'task-' + i;
  17172. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  17173. _this.taskDetailLoading5.push(_tindex)
  17174. }
  17175. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  17176. _this.ttaskDetailLoading5.push(_tindex)
  17177. }
  17178. // this.aiDetail52(msg, i)
  17179. }
  17180. let ij = 0;
  17181. function processNext() {
  17182. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  17183. const _tindex = 'task-' + ij;
  17184. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  17185. ij++;
  17186. processNext();
  17187. return;
  17188. }
  17189. // 处理当前任务
  17190. _this.aiDetail52(msg, ij, function () {
  17191. // 回调函数,当前任务完成后执行
  17192. ij++;
  17193. processNext(); // 处理下一个任务
  17194. });
  17195. }
  17196. }
  17197. processNext(); // 启动处理
  17198. }, 0)
  17199. } else if (this.aitype == "aiTeacher3"){
  17200. this.loading = true
  17201. let message = `NOTICE
  17202. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17203. Language: ${this.getLang()}
  17204. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17205. Instruction: Based on the context, follow "Format example", write content.
  17206. # Context
  17207. ## 要求
  17208. ${msg} 以及##参考资料
  17209. ## 参考资料
  17210. 任务簇:${this.cpote.cpote4}
  17211. # Format example
  17212. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  17213. this.aiGetTask3(message, () => {
  17214. this.loading = false
  17215. this.isOutline2 = true
  17216. })
  17217. } else if (this.aitype == "aiteacherTextDetail") {
  17218. this.aiteacherTextDetail(msg)
  17219. } else if (this.aitype == "aitargetTextDetail") {
  17220. this.aitargetTextDetail(msg)
  17221. } else if (this.aitype == "aitargetTextDetail2") {
  17222. this.aitargetTextDetail2(msg)
  17223. } else if (this.aitype == "aitargetTextDetail3") {
  17224. this.aitargetTextDetail3(msg)
  17225. } else if (this.aitype == 'aiSearchFile'){
  17226. let messages = `NOTICE
  17227. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17228. Language: ${this.getLang()}
  17229. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17230. Instruction: Based on the context, follow "Format example", write content.
  17231. ## 参考资料
  17232. 关键词:${this.courseName}
  17233. # Context
  17234. ## 要求
  17235. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  17236. # Format example
  17237. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  17238. this.fileSLoading = true
  17239. this.aiSearchFile(messages,()=>{
  17240. this.fileSLoading = false
  17241. })
  17242. } else if (this.aitype == 'aiSearchFile2'){
  17243. let messages = `${msg}
  17244. 课程名字:${this.courseName}
  17245. ${sub.length ? '学科:' + sub.join(",") : ''}
  17246. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  17247. this.fileSLoading = true
  17248. this.aiSearchFile2(messages,()=>{
  17249. this.fileSLoading = false
  17250. })
  17251. } else if (this.aitype == 'aiRateRule'){
  17252. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  17253. } else if (this.aitype == 'aiRateRuleA'){
  17254. if(this.aiCallBack[0] == 1){
  17255. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17256. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17257. for(var k = 0; k < task.eList.length; k++){
  17258. if(!task.eList[k].rule){
  17259. this.againEva(msg, i, k)
  17260. }
  17261. }
  17262. }
  17263. }else if(this.aiCallBack[0] == 2){
  17264. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  17265. for(var k = 0; k < task.eList.length; k++){
  17266. if(!task.eList[k].rule){
  17267. this.againEva(msg, this.aiCallBack[1], k)
  17268. }
  17269. }
  17270. }
  17271. }
  17272. this.setAiJson(this.aitype, msg, msg2, msg3)
  17273. },
  17274. getLang(){
  17275. let lang = ''
  17276. if(this.languageSetting == 0){
  17277. lang = 'Chinese.'
  17278. }else if(this.languageSetting == 1){
  17279. lang = 'Traditional Chinese.'
  17280. }else if(this.languageSetting == 2){
  17281. lang = 'English.'
  17282. }
  17283. return lang
  17284. },
  17285. detailYou(message) {
  17286. this.textLoading = true
  17287. this.ttextLoading = true
  17288. let sub = []
  17289. if (this.courseTypeId.length) {
  17290. for (var i = 0; i < this.courseTypeId.length; i++) {
  17291. let _sid = this.courseTypeId[i]
  17292. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17293. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17294. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17295. }
  17296. }
  17297. }
  17298. }
  17299. let mclass = []
  17300. if (this.courseTypeId.length) {
  17301. for (var i = 0; i < this.courseTypeId.length; i++) {
  17302. let _sid = this.courseTypeId[i]
  17303. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17304. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17305. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17306. }
  17307. }
  17308. }
  17309. }
  17310. let url = []
  17311. if (this.infoData.length) {
  17312. for (var i = 0; i < this.infoData.length; i++) {
  17313. url.push(this.infoData[i].url)
  17314. }
  17315. }
  17316. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  17317. // --------
  17318. // ## 补充参考资料
  17319. // 补充资料:${url.join(",")}
  17320. // 补充描述:${this.courseText2} ##补充参考资料和
  17321. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17322. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  17323. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  17324. let msg = `NOTICE
  17325. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  17326. Language: ${this.getLang()}
  17327. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17328. Instruction: Based on the context, follow "Format example", write content.
  17329. #Context
  17330. ## 参考资料
  17331. 课程名字:${this.courseName}
  17332. ${sub.length ? '学科:' + sub.join(",") : ''}
  17333. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17334. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  17335. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  17336. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  17337. ## 要求
  17338. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  17339. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  17340. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  17341. this.aiGet(msg)
  17342. },
  17343. setUnitJson() {
  17344. 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 }] }
  17345. this.$forceUpdate()
  17346. },
  17347. async aiGet(messages) {
  17348. let _this = this
  17349. let fileid = []
  17350. if(!this.yiKeTemplateArray.includes(this.templateid)){
  17351. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  17352. if(_this.cankaoInfoData[i].fileid){
  17353. fileid.push(_this.cankaoInfoData[i].fileid)
  17354. }else {
  17355. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  17356. if(_fileid){
  17357. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  17358. _this.$forceUpdate();
  17359. if(_fileid != 1){
  17360. fileid.push(_fileid)
  17361. }
  17362. }
  17363. }
  17364. }
  17365. if(this.mode == 1){
  17366. for (var i = 0; i < _this.infoData.length; i++) {
  17367. if(_this.infoData[i].fileid){
  17368. fileid.push(_this.infoData[i].fileid)
  17369. }else {
  17370. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17371. if(_fileid){
  17372. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17373. _this.$forceUpdate();
  17374. if(_fileid != 1){
  17375. fileid.push(_fileid)
  17376. }
  17377. }
  17378. }
  17379. }
  17380. }
  17381. } else {
  17382. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17383. fileid = [...fileid, ..._this.knowFileids]
  17384. if (_this.infoData.length) {
  17385. for (var i = 0; i < _this.infoData.length; i++) {
  17386. if(_this.infoData[i].fileid){
  17387. fileid.push(_this.infoData[i].fileid)
  17388. }else {
  17389. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17390. if(_fileid){
  17391. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17392. _this.$forceUpdate();
  17393. if(_fileid != 1){
  17394. fileid.push(_fileid)
  17395. }
  17396. }
  17397. }
  17398. }
  17399. }
  17400. }
  17401. _this.isTextCancelToken = _this.ajax.setCancelSource();
  17402. fileid = [...fileid, ..._this.knowFileids]
  17403. let _uuid = uuidv4();
  17404. // let params = JSON.stringify({
  17405. // // "model": "Chat",
  17406. // model: 'gpt-3.5-turbo',
  17407. // temperature: this.mode == 3 ? 0.5 : 0.1,
  17408. // max_tokens: 4096,
  17409. // top_p: 1,
  17410. // frequency_penalty: 0,
  17411. // presence_penalty: 0,
  17412. // messages: [{
  17413. // content: messages,
  17414. // role: 'user'
  17415. // }],
  17416. // uid: _uuid,
  17417. // mind_map_question: "",
  17418. // })
  17419. let params = {
  17420. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17421. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17422. session_name: _uuid,
  17423. userId: _this.userid,
  17424. uid: _uuid,
  17425. file_ids: fileid.length ? [...fileid] : '',
  17426. model: 'gpt-4o-2024-08-06',
  17427. temperature: this.mode == 3 ? 0.5 : 0.1,
  17428. }
  17429. // let params = JSON.stringify({
  17430. // message: {
  17431. // anthropic_version: "bedrock-2023-05-31",
  17432. // max_tokens: 4096,
  17433. // temperature: this.mode == 3 ? 0.5 : 0.1,
  17434. // top_p: 1,
  17435. // messages: [{
  17436. // "role": "user",
  17437. // "content": messages
  17438. // }] ,
  17439. // },
  17440. // uid: _uuid,
  17441. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17442. // });
  17443. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17444. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  17445. // _this.ajax.post('https://claude3.cocorobo.cn/chat', 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. // _this.courseText = data.choices[0].message.content
  17450. // }
  17451. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17452. } else {
  17453. _this.$message.warning(response.data.FunctionResponse.result);
  17454. }
  17455. _this.isTextCancelToken = null
  17456. }).catch(function (error) {
  17457. _this.textLoading = false
  17458. _this.ttextLoading = false
  17459. _this.isTextCancelToken = null
  17460. if(error && error.message != 'Request canceled by the user.'){
  17461. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17462. }
  17463. console.log(error);
  17464. });
  17465. await _this.aiGetgetAiContent(_uuid)
  17466. },
  17467. aiGetgetAiContent(_uid) {
  17468. try {
  17469. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17470. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17471. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17472. } catch(error){
  17473. console.log('EventSource error:', error);
  17474. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17475. this.textLoading = false
  17476. this.ttextLoading = false
  17477. this.isTextCancelToken = null
  17478. return;
  17479. }
  17480. let _allText = "";
  17481. let _mdText = "";
  17482. let _iindex = 0
  17483. this.isTextCancelSource.onmessage = _e => {
  17484. let _eData = JSON.parse(_e.data).content;
  17485. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17486. //对话已经完成
  17487. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  17488. this.isTextCancelSource.close();
  17489. this.isTextCancelSource = null;
  17490. this.courseText = _mdText;
  17491. this.textLoading = false
  17492. this.ttextLoading = false
  17493. this.courseTextB = false
  17494. this.isTextCancelToken = null
  17495. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17496. return;
  17497. } else {
  17498. _iindex++
  17499. //对话还在继续
  17500. let _text = "";
  17501. _text = _eData.replaceAll("'", "");
  17502. if (_allText == "") {
  17503. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17504. } else {
  17505. _allText += _text;
  17506. }
  17507. _mdText = _allText + "_";
  17508. _mdText = _mdText.replace(/\\n/g, "\n");
  17509. _mdText = _mdText.replace(/\\/g, "");
  17510. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17511. //转化返回的回复流数据
  17512. if(_iindex == 10){
  17513. this.courseText = _mdText;
  17514. _iindex = 0
  17515. }
  17516. this.textLoading = false
  17517. // 处理流数据
  17518. }
  17519. // this.$forceUpdate();
  17520. };
  17521. let _this = this
  17522. this.isTextCancelSource.onerror = function(event) {
  17523. // 处理错误,可以尝试重新连接
  17524. console.log('EventSource error:', event);
  17525. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17526. _this.textLoading = false
  17527. _this.ttextLoading = false
  17528. _this.isTextCancelToken = null
  17529. _this.isTextCancelSource.close();
  17530. _this.isTextCancelSource = null;
  17531. };
  17532. },
  17533. numberToChinese(number) {
  17534. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  17535. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  17536. let result = '';
  17537. let num = parseInt(number, 10);
  17538. let i = 0;
  17539. while (num > 0) {
  17540. result = chineseNum[num % 10] + chineseUnit[i] + result;
  17541. num = Math.floor(num / 10);
  17542. i++;
  17543. }
  17544. // 去除连续的零,保留一个零
  17545. result = result.replace(/零+/g, '零');
  17546. return result;
  17547. },
  17548. async aiGet2(messages, callback) {
  17549. let _this = this
  17550. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17551. fileid = [...fileid, ..._this.knowFileids]
  17552. if (_this.infoData.length) {
  17553. for (var i = 0; i < _this.infoData.length; i++) {
  17554. if(_this.infoData[i].fileid){
  17555. fileid.push(_this.infoData[i].fileid)
  17556. }else {
  17557. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17558. if(_fileid){
  17559. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17560. _this.$forceUpdate();
  17561. if(_fileid != 1){
  17562. fileid.push(_fileid)
  17563. }
  17564. }
  17565. }
  17566. }
  17567. }
  17568. console.log('fileid=========',fileid)
  17569. // let params = JSON.stringify({
  17570. // // "model": "Chat",
  17571. // model: 'gpt-3.5-turbo',
  17572. // temperature: this.mode == 3 ? 0.5 : 0.1,
  17573. // max_tokens: 4096,
  17574. // top_p: 1,
  17575. // frequency_penalty: 0,
  17576. // presence_penalty: 0,
  17577. // messages: [{
  17578. // content: messages,
  17579. // role: 'user'
  17580. // }],
  17581. // stream: false,
  17582. // uid: this.userid,
  17583. // mind_map_question: "",
  17584. // })
  17585. // // let params = JSON.stringify({
  17586. // // message: {
  17587. // // anthropic_version: "bedrock-2023-05-31",
  17588. // // max_tokens: 4096,
  17589. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  17590. // // top_p: 1,
  17591. // // messages: [{
  17592. // // content: messages,
  17593. // // role: 'user'
  17594. // // }], //
  17595. // // },
  17596. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17597. // // });
  17598. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17599. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17600. // console.log(response);
  17601. // let data = response.data.FunctionResponse
  17602. // if (data.choices && data.choices.length && data.choices[0].message) {
  17603. // console.log(data.choices[0].message.content);
  17604. // let dArray = JSON.parse(data.choices[0].message.content)
  17605. // _this.dArray = dArray
  17606. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17607. // for (var i = 0; i < dArray.length; i++) {
  17608. // let _task = dArray[i]
  17609. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17610. // task: _task.task,
  17611. // taskDetail: "",
  17612. // taskDetail2: _task.detail,
  17613. // taskDetail3: "",
  17614. // chapterData: [],
  17615. // toolText: "",
  17616. // toolChoose: [
  17617. // {
  17618. // tool: [],
  17619. // toolDetail: "",
  17620. // toolType: 0,
  17621. // askCount: 1,
  17622. // askTitle: "",
  17623. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17624. // },
  17625. // ],
  17626. // isShowTools: false,
  17627. // askCount: 1,
  17628. // isFold: 0,
  17629. // askTitle: "",
  17630. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17631. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17632. // homeworkList: [],
  17633. // })
  17634. // }
  17635. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17636. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17637. // _this.$forceUpdate();
  17638. // }
  17639. // // if (data.result) {
  17640. // // console.log(data.result);
  17641. // // let dArray = JSON.parse(data.result)
  17642. // // _this.dArray = dArray
  17643. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17644. // // for (var i = 0; i < dArray.length; i++) {
  17645. // // let _task = dArray[i]
  17646. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17647. // // task: _task.task,
  17648. // // taskDetail: "",
  17649. // // taskDetail2: _task.detail,
  17650. // // taskDetail3: "",
  17651. // // chapterData: [],
  17652. // // toolText: "",
  17653. // // toolChoose: [
  17654. // // {
  17655. // // tool: [],
  17656. // // toolDetail: "",
  17657. // // toolType: 0,
  17658. // // askCount: 1,
  17659. // // askTitle: "",
  17660. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17661. // // },
  17662. // // ],
  17663. // // isShowTools: false,
  17664. // // askCount: 1,
  17665. // // isFold: 1,
  17666. // // askTitle: "",
  17667. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17668. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17669. // // homeworkList: [],
  17670. // // })
  17671. // // }
  17672. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17673. // // _this.$forceUpdate();
  17674. // // }
  17675. // callback ? callback() : ''
  17676. // }).catch(function (error) {
  17677. // _this.loading = false
  17678. // console.log(error);
  17679. // });
  17680. this.isOutlineCancelToken = this.ajax.setCancelSource();
  17681. let parm = {
  17682. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  17683. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  17684. session_name: uuidv4(),
  17685. userId: this.userid,
  17686. file_ids: fileid.length ? [...fileid] : '',
  17687. model: 'gpt-4o-2024-08-06',
  17688. temperature: this.mode == 3 ? 0.5 : 0.1,
  17689. }
  17690. this.ajax
  17691. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  17692. .then((response) => {
  17693. console.log(response);
  17694. let data = response.data.FunctionResponse
  17695. if (data.message) {
  17696. console.log(data.message);
  17697. let dArray = {}
  17698. try {
  17699. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17700. } catch (error) {
  17701. console.log("error_________________" + error);
  17702. try {
  17703. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17704. let match = data.message.match(regex);
  17705. dArray = JSON.parse(match[0]);
  17706. // var message = data.message;
  17707. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17708. // var jsonEnd = message.indexOf("```", jsonStart);
  17709. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17710. // dArray = JSON.parse(jsonString);
  17711. } catch (error) {
  17712. try {
  17713. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17714. let match = data.message.match(regex);
  17715. // eval("var aaa = " + match[0])
  17716. dArray = JSON.parse(match[0].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  17717. } catch (error) {
  17718. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17719. // _this.aiGet2(messages, callback);
  17720. console.log("error_________________" + error);
  17721. }
  17722. console.log("error_________________" + error);
  17723. }
  17724. }
  17725. _this.dArray = dArray
  17726. console.log(dArray)
  17727. if(_this.panOutline() > 0){
  17728. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17729. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17730. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  17731. }
  17732. for (var i = 0; i < dArray.length; i++) {
  17733. let _task = dArray[i]
  17734. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17735. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  17736. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  17737. }else {
  17738. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17739. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  17740. taskDetail: "",
  17741. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  17742. taskDetail3: "",
  17743. chapterData: [],
  17744. toolText: "",
  17745. toolChoose: [
  17746. {
  17747. tool: [],
  17748. toolDetail: "",
  17749. toolType: 0,
  17750. askCount: 1,
  17751. askTitle: "",
  17752. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17753. },
  17754. ],
  17755. isShowTools: false,
  17756. askCount: 1,
  17757. isFold: 0,
  17758. askTitle: "",
  17759. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17760. checkJson: [{ checkCount: [], checkPerent: [] }],
  17761. homeworkList: [],
  17762. })
  17763. }
  17764. }
  17765. }else {
  17766. _this.unitJson[0].chapterInfo[0].taskJson = []
  17767. for (var i = 0; i < dArray.length; i++) {
  17768. let _task = dArray[i]
  17769. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17770. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  17771. taskDetail: "",
  17772. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  17773. taskDetail3: "",
  17774. chapterData: [],
  17775. toolText: "",
  17776. toolChoose: [
  17777. {
  17778. tool: [],
  17779. toolDetail: "",
  17780. toolType: 0,
  17781. askCount: 1,
  17782. askTitle: "",
  17783. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17784. },
  17785. ],
  17786. isShowTools: false,
  17787. askCount: 1,
  17788. isFold: 0,
  17789. askTitle: "",
  17790. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17791. checkJson: [{ checkCount: [], checkPerent: [] }],
  17792. homeworkList: [],
  17793. })
  17794. }
  17795. }
  17796. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17797. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17798. _this.$forceUpdate();
  17799. }
  17800. callback ? callback() : ''
  17801. _this.isOutlineCancelToken = null
  17802. })
  17803. .catch((error) => {
  17804. _this.loading = false
  17805. _this.isOutlineCancelToken = null
  17806. console.log(error);
  17807. });
  17808. },
  17809. cancelAjax(type, index){
  17810. if (this.isOutlineCancelToken && type == 'outline') {
  17811. this.$message.success("已经成功停止生成课程大纲")
  17812. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  17813. this.isOutlineCancelToken = null;
  17814. this.loading = false
  17815. }
  17816. if (this.isFileCancelToken && type == 'file') {
  17817. this.$message.success("已经成功停止智能生成检索资料")
  17818. this.isFileCancelToken.cancel('Request canceled by the user.');
  17819. this.isFileCancelToken = null;
  17820. this.fileSLoading = false
  17821. }
  17822. if(this.isTextCancelToken && type == 'text'){
  17823. this.$message.success("已经成功停止AI优化")
  17824. this.isTextCancelToken.cancel('Request canceled by the user.');
  17825. this.isTextCancelToken = null;
  17826. this.textLoading = false
  17827. this.ttextLoading = true
  17828. if(this.isTextCancelSource){
  17829. this.isTextCancelSource.close()
  17830. this.isTextCancelSource = null
  17831. }
  17832. }
  17833. if(this.isTargetCancelToken2 && type == 'target2'){
  17834. this.$message.success("已经成功停止生成目标")
  17835. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  17836. this.isTargetCancelToken2 = null;
  17837. this.targetTextLoading2 = false
  17838. this.ttargetTextLoading2 = false
  17839. if(this.isTargetCancelSource2){
  17840. this.isTargetCancelSource2.close()
  17841. this.isTargetCancelSource2 = null
  17842. }
  17843. }
  17844. if(this.isTargetCancelToken1 && type == 'target1'){
  17845. this.$message.success("已经成功停止生成目标")
  17846. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  17847. this.isTargetCancelToken1 = null;
  17848. this.targetTextLoading = false
  17849. this.ttargetTextLoading = false
  17850. if(this.isTargetCancelSource1){
  17851. this.isTargetCancelSource1.close()
  17852. this.isTargetCancelSource1 = null
  17853. }
  17854. }
  17855. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  17856. this.$message.success("已经成功停止提取摘要")
  17857. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  17858. this.isTeacherTextCancelToken = null;
  17859. this.teacherTextLoading = false
  17860. this.tteacherTextLoading = false
  17861. if(this.isTeacherTextCancelSource){
  17862. this.isTeacherTextCancelSource.close()
  17863. this.isTeacherTextCancelSource = null
  17864. }
  17865. }
  17866. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  17867. this.$message.success("已经成功停止生成教案")
  17868. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  17869. this.isTeacherTaskCancelToken = null;
  17870. this.loading = false
  17871. }
  17872. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  17873. this.$message.success("已经成功停止生成大纲")
  17874. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  17875. this.isOutlineTaskCancelToken[index] = null;
  17876. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  17877. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  17878. if(this.isOutlineTaskCancelSource[index]){
  17879. this.isOutlineTaskCancelSource[index].close()
  17880. this.isOutlineTaskCancelSource[index] = null
  17881. }
  17882. }
  17883. if(type == 'teacherDetail2'){
  17884. this.$message.success("已经成功停止生成教案")
  17885. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  17886. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  17887. this.isTeacherTaskCancelToken2[index] = null;
  17888. }
  17889. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  17890. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  17891. }
  17892. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  17893. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  17894. }
  17895. if(this.isTeacherTaskCancelSource[index]){
  17896. this.isTeacherTaskCancelSource[index].close()
  17897. this.isTeacherTaskCancelSource[index] = null
  17898. }
  17899. }
  17900. if(type == 'aiTaskGL1'){
  17901. this.$message.success("已经成功停止生成任务概述")
  17902. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  17903. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  17904. this.taskCancelToken1[index] = null;
  17905. }
  17906. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  17907. this.taskGLoading[index][0] = false
  17908. }
  17909. this.$forceUpdate()
  17910. }
  17911. if(type == 'aiTaskGL2'){
  17912. this.$message.success("已经成功停止生成任务概述")
  17913. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  17914. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  17915. this.taskCancelToken2[index] = null;
  17916. }
  17917. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  17918. this.taskGLoading[index][1] = false
  17919. }
  17920. this.$forceUpdate()
  17921. }
  17922. },
  17923. async aiGetTask2(messages, callback) {
  17924. let _this = this
  17925. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17926. fileid = [...fileid, ..._this.knowFileids]
  17927. if (_this.infoData.length) {
  17928. for (var i = 0; i < _this.infoData.length; i++) {
  17929. if(_this.infoData[i].fileid){
  17930. fileid.push(_this.infoData[i].fileid)
  17931. }else {
  17932. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17933. if(_fileid){
  17934. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17935. _this.$forceUpdate();
  17936. if(_fileid != 1){
  17937. fileid.push(_fileid)
  17938. }
  17939. }
  17940. }
  17941. }
  17942. }
  17943. console.log('fileid=========',fileid)
  17944. // let params = JSON.stringify({
  17945. // // "model": "Chat",
  17946. // model: 'gpt-3.5-turbo',
  17947. // temperature: this.mode == 3 ? 0.5 : 0.1,
  17948. // max_tokens: 4096,
  17949. // top_p: 1,
  17950. // frequency_penalty: 0,
  17951. // presence_penalty: 0,
  17952. // messages: [{
  17953. // content: messages,
  17954. // role: 'user'
  17955. // }],
  17956. // stream: false,
  17957. // uid: this.userid,
  17958. // mind_map_question: "",
  17959. // })
  17960. // // let params = JSON.stringify({
  17961. // // message: {
  17962. // // anthropic_version: "bedrock-2023-05-31",
  17963. // // max_tokens: 4096,
  17964. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  17965. // // top_p: 1,
  17966. // // messages: [{
  17967. // // content: messages,
  17968. // // role: 'user'
  17969. // // }], //
  17970. // // },
  17971. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17972. // // });
  17973. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17974. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17975. // console.log(response);
  17976. // let data = response.data.FunctionResponse
  17977. // if (data.choices && data.choices.length && data.choices[0].message) {
  17978. // console.log(data.choices[0].message.content);
  17979. // let dArray = JSON.parse(data.choices[0].message.content)
  17980. // _this.dArray = dArray
  17981. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17982. // for (var i = 0; i < dArray.length; i++) {
  17983. // let _task = dArray[i]
  17984. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17985. // task: _task.task,
  17986. // taskDetail: "",
  17987. // taskDetail2: _task.detail,
  17988. // taskDetail3: "",
  17989. // chapterData: [],
  17990. // toolText: "",
  17991. // toolChoose: [
  17992. // {
  17993. // tool: [],
  17994. // toolDetail: "",
  17995. // toolType: 0,
  17996. // askCount: 1,
  17997. // askTitle: "",
  17998. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17999. // },
  18000. // ],
  18001. // isShowTools: false,
  18002. // askCount: 1,
  18003. // isFold: 0,
  18004. // askTitle: "",
  18005. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18006. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18007. // homeworkList: [],
  18008. // })
  18009. // }
  18010. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18011. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18012. // _this.$forceUpdate();
  18013. // }
  18014. // // if (data.result) {
  18015. // // console.log(data.result);
  18016. // // let dArray = JSON.parse(data.result)
  18017. // // _this.dArray = dArray
  18018. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18019. // // for (var i = 0; i < dArray.length; i++) {
  18020. // // let _task = dArray[i]
  18021. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18022. // // task: _task.task,
  18023. // // taskDetail: "",
  18024. // // taskDetail2: _task.detail,
  18025. // // taskDetail3: "",
  18026. // // chapterData: [],
  18027. // // toolText: "",
  18028. // // toolChoose: [
  18029. // // {
  18030. // // tool: [],
  18031. // // toolDetail: "",
  18032. // // toolType: 0,
  18033. // // askCount: 1,
  18034. // // askTitle: "",
  18035. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18036. // // },
  18037. // // ],
  18038. // // isShowTools: false,
  18039. // // askCount: 1,
  18040. // // isFold: 1,
  18041. // // askTitle: "",
  18042. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18043. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18044. // // homeworkList: [],
  18045. // // })
  18046. // // }
  18047. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18048. // // _this.$forceUpdate();
  18049. // // }
  18050. // callback ? callback() : ''
  18051. // }).catch(function (error) {
  18052. // _this.loading = false
  18053. // console.log(error);
  18054. // });
  18055. this.isOutlineCancelToken = this.ajax.setCancelSource();
  18056. let parm = {
  18057. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18058. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18059. session_name: uuidv4(),
  18060. userId: this.userid,
  18061. file_ids: fileid.length ? [...fileid] : '',
  18062. model: 'gpt-4o-2024-08-06',
  18063. temperature: this.mode == 3 ? 0.5 : 0.1,
  18064. }
  18065. this.ajax
  18066. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  18067. .then((response) => {
  18068. console.log(response);
  18069. let data = response.data.FunctionResponse
  18070. if (data.message) {
  18071. console.log(data.message);
  18072. let dArray = {}
  18073. try {
  18074. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18075. } catch (error) {
  18076. console.log("error_________________" + error);
  18077. try {
  18078. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18079. let match = data.message.match(regex);
  18080. dArray = JSON.parse(match[0]);
  18081. // var message = data.message;
  18082. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18083. // var jsonEnd = message.indexOf("```", jsonStart);
  18084. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18085. // dArray = JSON.parse(jsonString);
  18086. } catch (error) {
  18087. try {
  18088. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18089. let match = data.message.match(regex);
  18090. // eval("var aaa = " + match[0])
  18091. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18092. } catch (error) {
  18093. console.log("error_________________" + error);
  18094. }
  18095. console.log("error_________________" + error);
  18096. }
  18097. }
  18098. _this.dArray = dArray
  18099. if(_this.panOutline() > 0){
  18100. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18101. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18102. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  18103. }
  18104. for (var i = 0; i < dArray.length; i++) {
  18105. let _task = dArray[i]
  18106. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18107. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18108. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  18109. }else {
  18110. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18111. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18112. taskDetail: "",
  18113. taskDetail2: "",
  18114. taskDetail3: "",
  18115. chapterData: [],
  18116. toolText: "",
  18117. toolChoose: [
  18118. {
  18119. tool: [],
  18120. toolDetail: "",
  18121. toolType: 0,
  18122. askCount: 1,
  18123. askTitle: "",
  18124. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18125. },
  18126. ],
  18127. isShowTools: false,
  18128. askCount: 1,
  18129. isFold: 0,
  18130. askTitle: "",
  18131. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18132. checkJson: [{ checkCount: [], checkPerent: [] }],
  18133. homeworkList: [],
  18134. })
  18135. }
  18136. }
  18137. }else {
  18138. _this.unitJson[0].chapterInfo[0].taskJson = []
  18139. for (var i = 0; i < dArray.length; i++) {
  18140. let _task = dArray[i]
  18141. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18142. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18143. taskDetail: "",
  18144. taskDetail2: "",
  18145. taskDetail3: "",
  18146. chapterData: [],
  18147. toolText: "",
  18148. toolChoose: [
  18149. {
  18150. tool: [],
  18151. toolDetail: "",
  18152. toolType: 0,
  18153. askCount: 1,
  18154. askTitle: "",
  18155. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18156. },
  18157. ],
  18158. isShowTools: false,
  18159. askCount: 1,
  18160. isFold: 0,
  18161. askTitle: "",
  18162. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18163. checkJson: [{ checkCount: [], checkPerent: [] }],
  18164. homeworkList: [],
  18165. })
  18166. }
  18167. }
  18168. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18169. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18170. _this.$forceUpdate();
  18171. setTimeout(()=>{
  18172. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18173. this.aiOutlineDetail('', i)
  18174. }
  18175. }, 0)
  18176. }
  18177. callback ? callback() : ''
  18178. _this.isOutlineCancelToken = null
  18179. })
  18180. .catch((error) => {
  18181. _this.loading = false
  18182. _this.isOutlineCancelToken = null
  18183. console.log(error);
  18184. });
  18185. },
  18186. async aiGetTask3(messages, callback) {
  18187. let _this = this
  18188. // let params = JSON.stringify({
  18189. // // "model": "Chat",
  18190. // model: 'gpt-3.5-turbo',
  18191. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18192. // max_tokens: 4096,
  18193. // top_p: 1,
  18194. // frequency_penalty: 0,
  18195. // presence_penalty: 0,
  18196. // messages: [{
  18197. // content: messages,
  18198. // role: 'user'
  18199. // }],
  18200. // stream: false,
  18201. // uid: this.userid,
  18202. // mind_map_question: "",
  18203. // })
  18204. // // let params = JSON.stringify({
  18205. // // message: {
  18206. // // anthropic_version: "bedrock-2023-05-31",
  18207. // // max_tokens: 4096,
  18208. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18209. // // top_p: 1,
  18210. // // messages: [{
  18211. // // content: messages,
  18212. // // role: 'user'
  18213. // // }], //
  18214. // // },
  18215. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18216. // // });
  18217. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18218. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18219. // console.log(response);
  18220. // let data = response.data.FunctionResponse
  18221. // if (data.choices && data.choices.length && data.choices[0].message) {
  18222. // console.log(data.choices[0].message.content);
  18223. // let dArray = JSON.parse(data.choices[0].message.content)
  18224. // _this.dArray = dArray
  18225. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18226. // for (var i = 0; i < dArray.length; i++) {
  18227. // let _task = dArray[i]
  18228. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18229. // task: _task.task,
  18230. // taskDetail: "",
  18231. // taskDetail2: _task.detail,
  18232. // taskDetail3: "",
  18233. // chapterData: [],
  18234. // toolText: "",
  18235. // toolChoose: [
  18236. // {
  18237. // tool: [],
  18238. // toolDetail: "",
  18239. // toolType: 0,
  18240. // askCount: 1,
  18241. // askTitle: "",
  18242. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18243. // },
  18244. // ],
  18245. // isShowTools: false,
  18246. // askCount: 1,
  18247. // isFold: 0,
  18248. // askTitle: "",
  18249. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18250. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18251. // homeworkList: [],
  18252. // })
  18253. // }
  18254. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18255. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18256. // _this.$forceUpdate();
  18257. // }
  18258. // // if (data.result) {
  18259. // // console.log(data.result);
  18260. // // let dArray = JSON.parse(data.result)
  18261. // // _this.dArray = dArray
  18262. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18263. // // for (var i = 0; i < dArray.length; i++) {
  18264. // // let _task = dArray[i]
  18265. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18266. // // task: _task.task,
  18267. // // taskDetail: "",
  18268. // // taskDetail2: _task.detail,
  18269. // // taskDetail3: "",
  18270. // // chapterData: [],
  18271. // // toolText: "",
  18272. // // toolChoose: [
  18273. // // {
  18274. // // tool: [],
  18275. // // toolDetail: "",
  18276. // // toolType: 0,
  18277. // // askCount: 1,
  18278. // // askTitle: "",
  18279. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18280. // // },
  18281. // // ],
  18282. // // isShowTools: false,
  18283. // // askCount: 1,
  18284. // // isFold: 1,
  18285. // // askTitle: "",
  18286. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18287. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18288. // // homeworkList: [],
  18289. // // })
  18290. // // }
  18291. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18292. // // _this.$forceUpdate();
  18293. // // }
  18294. // callback ? callback() : ''
  18295. // }).catch(function (error) {
  18296. // _this.loading = false
  18297. // console.log(error);
  18298. // });
  18299. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  18300. let parm = {
  18301. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18302. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18303. session_name: uuidv4(),
  18304. userId: this.userid,
  18305. file_ids: '',
  18306. model: 'gpt-4o-2024-08-06',
  18307. temperature: this.mode == 3 ? 0.5 : 0.1,
  18308. }
  18309. this.ajax
  18310. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  18311. .then((response) => {
  18312. console.log(response);
  18313. let data = response.data.FunctionResponse
  18314. if (data.message) {
  18315. console.log(data.message);
  18316. let dArray = {}
  18317. try {
  18318. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18319. } catch (error) {
  18320. console.log("error_________________" + error);
  18321. try {
  18322. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18323. let match = data.message.match(regex);
  18324. dArray = JSON.parse(match[0]);
  18325. // var message = data.message;
  18326. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18327. // var jsonEnd = message.indexOf("```", jsonStart);
  18328. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18329. // dArray = JSON.parse(jsonString);
  18330. } catch (error) {
  18331. try {
  18332. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18333. let match = data.message.match(regex);
  18334. // eval("var aaa = " + match[0])
  18335. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18336. } catch (error) {
  18337. console.log("error_________________" + error);
  18338. }
  18339. console.log("error_________________" + error);
  18340. }
  18341. }
  18342. _this.dArray = dArray
  18343. if(_this.panOutline() > 0){
  18344. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18345. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18346. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  18347. }
  18348. for (var i = 0; i < dArray.length; i++) {
  18349. let _task = dArray[i]
  18350. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18351. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18352. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  18353. }else {
  18354. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18355. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18356. taskDetail: "",
  18357. taskDetail2: "",
  18358. taskDetail3: "",
  18359. chapterData: [],
  18360. toolText: "",
  18361. toolChoose: [
  18362. {
  18363. tool: [],
  18364. toolDetail: "",
  18365. toolType: 0,
  18366. askCount: 1,
  18367. askTitle: "",
  18368. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18369. },
  18370. ],
  18371. isShowTools: false,
  18372. askCount: 1,
  18373. isFold: 0,
  18374. askTitle: "",
  18375. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18376. checkJson: [{ checkCount: [], checkPerent: [] }],
  18377. homeworkList: [],
  18378. })
  18379. }
  18380. }
  18381. }else {
  18382. _this.unitJson[0].chapterInfo[0].taskJson = []
  18383. for (var i = 0; i < dArray.length; i++) {
  18384. let _task = dArray[i]
  18385. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18386. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18387. taskDetail: "",
  18388. taskDetail2: "",
  18389. taskDetail3: "",
  18390. chapterData: [],
  18391. toolText: "",
  18392. toolChoose: [
  18393. {
  18394. tool: [],
  18395. toolDetail: "",
  18396. toolType: 0,
  18397. askCount: 1,
  18398. askTitle: "",
  18399. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18400. },
  18401. ],
  18402. isShowTools: false,
  18403. askCount: 1,
  18404. isFold: 0,
  18405. askTitle: "",
  18406. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18407. checkJson: [{ checkCount: [], checkPerent: [] }],
  18408. homeworkList: [],
  18409. })
  18410. }
  18411. }
  18412. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18413. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18414. _this.$forceUpdate();
  18415. setTimeout(()=>{
  18416. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18417. this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  18418. }
  18419. }, 0)
  18420. }
  18421. callback ? callback() : ''
  18422. _this.isTeacherTaskCancelToken = null
  18423. })
  18424. .catch((error) => {
  18425. _this.loading = false
  18426. _this.isTeacherTaskCancelToken = null
  18427. console.log(error);
  18428. });
  18429. },
  18430. async aiGet3(messages, callback) {
  18431. let _this = this
  18432. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18433. fileid = [...fileid, ..._this.knowFileids]
  18434. if (_this.infoData.length) {
  18435. for (var i = 0; i < _this.infoData.length; i++) {
  18436. if(_this.infoData[i].fileid){
  18437. fileid.push(_this.infoData[i].fileid)
  18438. }else {
  18439. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18440. if(_fileid){
  18441. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18442. _this.$forceUpdate();
  18443. if(_fileid != 1){
  18444. fileid.push(_fileid)
  18445. }
  18446. }
  18447. }
  18448. }
  18449. }
  18450. // let params = JSON.stringify({
  18451. // // "model": "Chat",
  18452. // model: 'gpt-3.5-turbo',
  18453. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18454. // max_tokens: 4096,
  18455. // top_p: 1,
  18456. // frequency_penalty: 0,
  18457. // presence_penalty: 0,
  18458. // messages: [{
  18459. // content: messages,
  18460. // role: 'user'
  18461. // }],
  18462. // stream: false,
  18463. // uid: this.userid,
  18464. // mind_map_question: "",
  18465. // })
  18466. // // let params = JSON.stringify({
  18467. // // message: {
  18468. // // anthropic_version: "bedrock-2023-05-31",
  18469. // // max_tokens: 4096,
  18470. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18471. // // top_p: 1,
  18472. // // messages: [{
  18473. // // content: messages,
  18474. // // role: 'user'
  18475. // // }], //
  18476. // // },
  18477. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18478. // // });
  18479. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18480. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18481. // console.log(response);
  18482. // let data = response.data.FunctionResponse
  18483. // if (data.choices && data.choices.length && data.choices[0].message) {
  18484. // console.log(data.choices[0].message.content);
  18485. // let tArray = JSON.parse(data.choices[0].message.content)
  18486. // // _this.unitJson[0].chapterInfo[0].task = []
  18487. // let toolsJson = {
  18488. // "电子白板": { tool: 1, type: 1 },
  18489. // "文档": { tool: 52, type: 1 },
  18490. // "思维导图": { tool: 3, type: 1 },
  18491. // "表格": { tool: 48, type: 1 },
  18492. // "作业提交": { tool: 16, type: 2 }
  18493. // }
  18494. // for (var i = 0; i < tArray.length; i++) {
  18495. // let _task = tArray[i]
  18496. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18497. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18498. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18499. // if (_task.toolChoose.length) {
  18500. // for (var j = 0; j < _task.toolChoose.length; j++) {
  18501. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18502. // {
  18503. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18504. // toolDetail: _task.toolChoose[j].detail,
  18505. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18506. // askCount: 1,
  18507. // askTitle: "",
  18508. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18509. // },
  18510. // )
  18511. // }
  18512. // } else {
  18513. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18514. // {
  18515. // tool: [],
  18516. // toolDetail: "",
  18517. // toolType: 0,
  18518. // askCount: 1,
  18519. // askTitle: "",
  18520. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18521. // },
  18522. // )
  18523. // }
  18524. // }
  18525. // // if (_this.infoData.length) {
  18526. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18527. // // }
  18528. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18529. // _this.$forceUpdate();
  18530. // }
  18531. // // if (data.result) {
  18532. // // console.log(data.result);
  18533. // // let tArray = JSON.parse(data.result)
  18534. // // // _this.unitJson[0].chapterInfo[0].task = []
  18535. // // let toolsJson = {
  18536. // // "电子白板": { tool: 1, type: 1 },
  18537. // // "文档": { tool: 52, type: 1 },
  18538. // // "思维导图": { tool: 3, type: 1 },
  18539. // // "表格": { tool: 48, type: 1 },
  18540. // // "作业提交": { tool: 16, type: 2 }
  18541. // // }
  18542. // // for (var i = 0; i < tArray.length; i++) {
  18543. // // let _task = tArray[i]
  18544. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18545. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18546. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18547. // // if (_task.toolChoose.length) {
  18548. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  18549. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18550. // // {
  18551. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18552. // // toolDetail: _task.toolChoose[j].detail,
  18553. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18554. // // askCount: 1,
  18555. // // askTitle: "",
  18556. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18557. // // },
  18558. // // )
  18559. // // }
  18560. // // } else {
  18561. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18562. // // {
  18563. // // tool: [],
  18564. // // toolDetail: "",
  18565. // // toolType: 0,
  18566. // // askCount: 1,
  18567. // // askTitle: "",
  18568. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18569. // // },
  18570. // // )
  18571. // // }
  18572. // // }
  18573. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18574. // // _this.$forceUpdate();
  18575. // // }
  18576. // callback ? callback() : ''
  18577. // }).catch(function (error) {
  18578. // _this.loading = false
  18579. // console.log(error);
  18580. // });
  18581. let parm = {
  18582. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18583. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18584. session_name: uuidv4(),
  18585. userId: this.userid,
  18586. file_ids: fileid.length ? [...fileid] : '',
  18587. model: 'gpt-4o-2024-08-06',
  18588. temperature: this.mode == 3 ? 0.5 : 0.1,
  18589. }
  18590. this.ajax
  18591. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18592. .then(async (response) => {
  18593. console.log(response);
  18594. let data = response.data.FunctionResponse
  18595. if (data.message) {
  18596. console.log(data.message);
  18597. let tArray = {}
  18598. try {
  18599. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18600. } catch (error) {
  18601. console.log("error_________________" + error);
  18602. try {
  18603. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18604. let match = data.message.match(regex);
  18605. tArray = JSON.parse(match[0]);
  18606. // var message = data.message;
  18607. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18608. // var jsonEnd = message.indexOf("```", jsonStart);
  18609. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18610. // tArray = JSON.parse(jsonString);
  18611. } catch (error) {
  18612. try {
  18613. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18614. let match = data.message.match(regex);
  18615. // eval("var aaa = " + match[0])
  18616. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18617. } catch (error) {
  18618. console.log("error_________________" + error);
  18619. }
  18620. console.log("error_________________" + error);
  18621. }
  18622. }
  18623. let toolsJson = {
  18624. "电子白板": { tool: 1, type: 1 },
  18625. "文档": { tool: 52, type: 1 },
  18626. "思维导图": { tool: 3, type: 1 },
  18627. "表格": { tool: 48, type: 1 },
  18628. "作业提交": { tool: 16, type: 2 },
  18629. "问答": { tool: 15, type: 2 },
  18630. "选择题": { tool: 45, type: 2 },
  18631. }
  18632. // answerQ:"sssssssssssssss"
  18633. for (var i = 0; i < tArray.length; i++) {
  18634. let _task = tArray[i]
  18635. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18636. _task.elist = _task.elist.filter(el=>{
  18637. el.isai = "1"
  18638. return el
  18639. })
  18640. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18641. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18642. if (_task.toolChoose.length) {
  18643. for (var j = 0; j < _task.toolChoose.length; j++) {
  18644. let _json = {
  18645. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  18646. toolDetail: _task.toolChoose[j].detail,
  18647. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18648. askCount: 1,
  18649. askTitle: "",
  18650. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18651. }
  18652. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18653. let answerQ = await _this.aiCreateQuestion(15, i)
  18654. _json.answerQ = answerQ.answerQ
  18655. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18656. let testJson = await _this.aiCreateQuestion(45, i)
  18657. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18658. }
  18659. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  18660. }
  18661. } else {
  18662. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18663. {
  18664. tool: [],
  18665. toolDetail: "",
  18666. toolType: 0,
  18667. askCount: 1,
  18668. askTitle: "",
  18669. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18670. },
  18671. )
  18672. }
  18673. }
  18674. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18675. _this.$forceUpdate();
  18676. _this.createTeacherAn();
  18677. }
  18678. callback ? callback() : ''
  18679. })
  18680. .catch((error) => {
  18681. _this.loading = false
  18682. console.log(error);
  18683. });
  18684. },
  18685. async aiGet32(messages, index) {
  18686. let _this = this
  18687. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18688. fileid = [...fileid, ..._this.knowFileids]
  18689. if (_this.infoData.length) {
  18690. for (var i = 0; i < _this.infoData.length; i++) {
  18691. if(_this.infoData[i].fileid){
  18692. fileid.push(_this.infoData[i].fileid)
  18693. }else {
  18694. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18695. if(_fileid){
  18696. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18697. _this.$forceUpdate();
  18698. if(_fileid != 1){
  18699. fileid.push(_fileid)
  18700. }
  18701. }
  18702. }
  18703. }
  18704. }
  18705. // let params = JSON.stringify({
  18706. // // "model": "Chat",
  18707. // model: 'gpt-3.5-turbo',
  18708. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18709. // max_tokens: 4096,
  18710. // top_p: 1,
  18711. // frequency_penalty: 0,
  18712. // presence_penalty: 0,
  18713. // messages: [{
  18714. // content: messages,
  18715. // role: 'user'
  18716. // }],
  18717. // stream: false,
  18718. // uid: this.userid,
  18719. // mind_map_question: "",
  18720. // })
  18721. // // let params = JSON.stringify({
  18722. // // message: {
  18723. // // anthropic_version: "bedrock-2023-05-31",
  18724. // // max_tokens: 4096,
  18725. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18726. // // top_p: 1,
  18727. // // messages: [{
  18728. // // content: messages,
  18729. // // role: 'user'
  18730. // // }], //
  18731. // // },
  18732. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18733. // // });
  18734. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18735. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18736. // console.log(response);
  18737. // let data = response.data.FunctionResponse
  18738. // if (data.choices && data.choices.length && data.choices[0].message) {
  18739. // console.log(data.choices[0].message.content);
  18740. // let tArray = JSON.parse(data.choices[0].message.content)
  18741. // // _this.unitJson[0].chapterInfo[0].task = []
  18742. // let toolsJson = {
  18743. // "电子白板": { tool: 1, type: 1 },
  18744. // "文档": { tool: 52, type: 1 },
  18745. // "思维导图": { tool: 3, type: 1 },
  18746. // "表格": { tool: 48, type: 1 },
  18747. // "作业提交": { tool: 16, type: 2 }
  18748. // }
  18749. // for (var i = 0; i < tArray.length; i++) {
  18750. // let _task = tArray[i]
  18751. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18752. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18753. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18754. // if (_task.toolChoose.length) {
  18755. // for (var j = 0; j < _task.toolChoose.length; j++) {
  18756. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18757. // {
  18758. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18759. // toolDetail: _task.toolChoose[j].detail,
  18760. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18761. // askCount: 1,
  18762. // askTitle: "",
  18763. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18764. // },
  18765. // )
  18766. // }
  18767. // } else {
  18768. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18769. // {
  18770. // tool: [],
  18771. // toolDetail: "",
  18772. // toolType: 0,
  18773. // askCount: 1,
  18774. // askTitle: "",
  18775. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18776. // },
  18777. // )
  18778. // }
  18779. // }
  18780. // // if (_this.infoData.length) {
  18781. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18782. // // }
  18783. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18784. // _this.$forceUpdate();
  18785. // }
  18786. // // if (data.result) {
  18787. // // console.log(data.result);
  18788. // // let tArray = JSON.parse(data.result)
  18789. // // // _this.unitJson[0].chapterInfo[0].task = []
  18790. // // let toolsJson = {
  18791. // // "电子白板": { tool: 1, type: 1 },
  18792. // // "文档": { tool: 52, type: 1 },
  18793. // // "思维导图": { tool: 3, type: 1 },
  18794. // // "表格": { tool: 48, type: 1 },
  18795. // // "作业提交": { tool: 16, type: 2 }
  18796. // // }
  18797. // // for (var i = 0; i < tArray.length; i++) {
  18798. // // let _task = tArray[i]
  18799. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18800. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18801. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18802. // // if (_task.toolChoose.length) {
  18803. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  18804. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18805. // // {
  18806. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18807. // // toolDetail: _task.toolChoose[j].detail,
  18808. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18809. // // askCount: 1,
  18810. // // askTitle: "",
  18811. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18812. // // },
  18813. // // )
  18814. // // }
  18815. // // } else {
  18816. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18817. // // {
  18818. // // tool: [],
  18819. // // toolDetail: "",
  18820. // // toolType: 0,
  18821. // // askCount: 1,
  18822. // // askTitle: "",
  18823. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18824. // // },
  18825. // // )
  18826. // // }
  18827. // // }
  18828. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18829. // // _this.$forceUpdate();
  18830. // // }
  18831. // callback ? callback() : ''
  18832. // }).catch(function (error) {
  18833. // _this.loading = false
  18834. // console.log(error);
  18835. // });
  18836. let parm = {
  18837. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18838. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18839. session_name: uuidv4(),
  18840. userId: this.userid,
  18841. file_ids: fileid.length ? [...fileid] : '',
  18842. model: 'gpt-4o-2024-08-06',
  18843. temperature: this.mode == 3 ? 0.5 : 0.1,
  18844. }
  18845. this.ajax
  18846. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18847. .then(async (response) => {
  18848. console.log(response);
  18849. let data = response.data.FunctionResponse
  18850. if (data.message) {
  18851. console.log(data.message);
  18852. let tArray = {}
  18853. try {
  18854. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18855. } catch (error) {
  18856. console.log("error_________________" + error);
  18857. try {
  18858. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18859. let match = data.message.match(regex);
  18860. tArray = JSON.parse(match[0]);
  18861. // var message = data.message;
  18862. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18863. // var jsonEnd = message.indexOf("```", jsonStart);
  18864. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18865. // tArray = JSON.parse(jsonString);
  18866. } catch (error) {
  18867. try {
  18868. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18869. let match = data.message.match(regex);
  18870. // eval("var aaa = " + match[0])
  18871. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18872. } catch (error) {
  18873. console.log("error_________________" + error);
  18874. }
  18875. console.log("error_________________" + error);
  18876. }
  18877. }
  18878. let toolsJson = {
  18879. "电子白板": { tool: 1, type: 1 },
  18880. "文档": { tool: 52, type: 1 },
  18881. "思维导图": { tool: 3, type: 1 },
  18882. "表格": { tool: 48, type: 1 },
  18883. "作业提交": { tool: 16, type: 2 },
  18884. "问答": { tool: 15, type: 2 },
  18885. "选择题": { tool: 45, type: 2 },
  18886. }
  18887. // answerQ:"sssssssssssssss"
  18888. // for (var i = 0; i < tArray.length; i++) {
  18889. let _task = tArray
  18890. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  18891. _task.elist = _task.elist.filter(el=>{
  18892. el.isai = 1
  18893. return el
  18894. })
  18895. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  18896. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  18897. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  18898. console.log("error_________________JSON不对重新生成");
  18899. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18900. _this.aiGet32(messages, index)
  18901. return;
  18902. }
  18903. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  18904. if (_task.toolChoose && _task.toolChoose.length) {
  18905. for (var j = 0; j < _task.toolChoose.length; j++) {
  18906. let _json = {
  18907. tool: [],
  18908. toolDetail: _task.toolChoose[j].detail,
  18909. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18910. askCount: 1,
  18911. askTitle: "",
  18912. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18913. }
  18914. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18915. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18916. let answerQ = await _this.aiCreateQuestion(15, index)
  18917. // _json.answerQ = answerQ.answerQ
  18918. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  18919. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18920. let testJson = await _this.aiCreateQuestion(45, index)
  18921. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18922. _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}
  18923. }
  18924. _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]
  18925. _this.$forceUpdate();
  18926. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18927. }
  18928. } else {
  18929. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  18930. {
  18931. tool: [],
  18932. toolDetail: "",
  18933. toolType: 0,
  18934. askCount: 1,
  18935. askTitle: "",
  18936. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18937. },
  18938. )
  18939. }
  18940. // }
  18941. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18942. _this.$forceUpdate();
  18943. _this.createTeacherAn(index);
  18944. }
  18945. // callback ? callback() : ''
  18946. _this.taskLoading[index] = false
  18947. })
  18948. .catch((error) => {
  18949. // _this.loading = false
  18950. _this.taskLoading[index] = false
  18951. console.log(error);
  18952. });
  18953. },
  18954. async aiGetG321(messages, index) {
  18955. let _this = this
  18956. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18957. fileid = [...fileid, ..._this.knowFileids]
  18958. if (_this.infoData.length) {
  18959. for (var i = 0; i < _this.infoData.length; i++) {
  18960. if(_this.infoData[i].fileid){
  18961. fileid.push(_this.infoData[i].fileid)
  18962. }else {
  18963. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18964. if(_fileid){
  18965. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18966. _this.$forceUpdate();
  18967. if(_fileid != 1){
  18968. fileid.push(_fileid)
  18969. }
  18970. }
  18971. }
  18972. }
  18973. }
  18974. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  18975. let parm = {
  18976. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18977. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18978. session_name: uuidv4(),
  18979. userId: this.userid,
  18980. file_ids: fileid.length ? [...fileid] : '',
  18981. model: 'gpt-4o-2024-08-06',
  18982. temperature: this.mode == 3 ? 0.5 : 0.1,
  18983. }
  18984. this.ajax
  18985. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  18986. .then(async (response) => {
  18987. console.log(response);
  18988. let data = response.data.FunctionResponse
  18989. if (data.message) {
  18990. let tArray = {}
  18991. try {
  18992. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18993. } catch (error) {
  18994. console.log("error_________________" + error);
  18995. try {
  18996. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18997. let match = data.message.match(regex);
  18998. tArray = JSON.parse(match[0]);
  18999. } catch (error) {
  19000. try {
  19001. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19002. let match = data.message.match(regex);
  19003. // eval("var aaa = " + match[0])
  19004. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19005. } catch (error) {
  19006. console.log("error_________________" + error);
  19007. }
  19008. console.log("error_________________" + error);
  19009. }
  19010. }
  19011. console.log(data.message);
  19012. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  19013. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  19014. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19015. _this.$forceUpdate();
  19016. _this.createTeacherAn(index);
  19017. }
  19018. // callback ? callback() : ''
  19019. _this.taskGLoading[index][0] = false
  19020. _this.taskCancelToken1[index] = null
  19021. _this.$forceUpdate();
  19022. })
  19023. .catch((error) => {
  19024. // _this.loading = false
  19025. _this.taskGLoading[index][0] = false
  19026. _this.taskCancelToken1[index] = null
  19027. _this.$forceUpdate();
  19028. console.log(error);
  19029. });
  19030. },
  19031. async aiGetG322(messages, index) {
  19032. let _this = this
  19033. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19034. fileid = [...fileid, ..._this.knowFileids]
  19035. if (_this.infoData.length) {
  19036. for (var i = 0; i < _this.infoData.length; i++) {
  19037. if(_this.infoData[i].fileid){
  19038. fileid.push(_this.infoData[i].fileid)
  19039. }else {
  19040. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19041. if(_fileid){
  19042. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19043. _this.$forceUpdate();
  19044. if(_fileid != 1){
  19045. fileid.push(_fileid)
  19046. }
  19047. }
  19048. }
  19049. }
  19050. }
  19051. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  19052. let parm = {
  19053. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19054. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19055. session_name: uuidv4(),
  19056. userId: this.userid,
  19057. file_ids: fileid.length ? [...fileid] : '',
  19058. model: 'gpt-4o-2024-08-06',
  19059. temperature: this.mode == 3 ? 0.5 : 0.1,
  19060. }
  19061. this.ajax
  19062. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  19063. .then(async (response) => {
  19064. console.log(response);
  19065. let data = response.data.FunctionResponse
  19066. if (data.message) {
  19067. console.log(data.message);
  19068. let tArray = {}
  19069. try {
  19070. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19071. } catch (error) {
  19072. console.log("error_________________" + error);
  19073. try {
  19074. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19075. let match = data.message.match(regex);
  19076. tArray = JSON.parse(match[0]);
  19077. } catch (error) {
  19078. try {
  19079. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19080. let match = data.message.match(regex);
  19081. // eval("var aaa = " + match[0])
  19082. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19083. } catch (error) {
  19084. console.log("error_________________" + error);
  19085. }
  19086. console.log("error_________________" + error);
  19087. }
  19088. }
  19089. let toolsJson = {
  19090. "电子白板": { tool: 1, type: 1 },
  19091. "文档": { tool: 52, type: 1 },
  19092. "思维导图": { tool: 3, type: 1 },
  19093. "表格": { tool: 48, type: 1 },
  19094. "作业提交": { tool: 16, type: 2 },
  19095. "问答": { tool: 15, type: 2 },
  19096. "选择题": { tool: 45, type: 2 },
  19097. }
  19098. if(_this.languageSetting == 1){
  19099. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  19100. }else if(_this.languageSetting == 2){
  19101. toolsJson = {
  19102. "Mind Map Tool": { tool: 1, type: 1 },
  19103. "Document tool": { tool: 52, type: 1 },
  19104. "Diagram Tool": { tool: 3, type: 1 },
  19105. "Spreadsheet tool": { tool: 48, type: 1 },
  19106. "作业提交": { tool: 16, type: 2 },
  19107. "Q&A Tool": { tool: 15, type: 2 },
  19108. "Choice tool": { tool: 45, type: 2 },
  19109. }
  19110. }
  19111. let _task = tArray
  19112. if(!_task.toolChoose){
  19113. console.log("error_________________JSON不对重新生成");
  19114. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19115. _this.aiGet322(messages, index)
  19116. return;
  19117. }
  19118. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  19119. if (_task.toolChoose && _task.toolChoose.length) {
  19120. for (var j = 0; j < _task.toolChoose.length; j++) {
  19121. let _json = {
  19122. tool: [],
  19123. toolDetail: _task.toolChoose[j].detail,
  19124. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  19125. askCount: 1,
  19126. askTitle: "",
  19127. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19128. }
  19129. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19130. if(converter(_task.toolChoose[j].tool) == converter('问答') || _task.toolChoose[j].tool == 'Q&A Tool'){
  19131. let answerQ = await _this.aiCreateQuestion(15, index)
  19132. // _json.answerQ = answerQ.answerQ
  19133. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  19134. }else if(converter(_task.toolChoose[j].tool) == converter('选择题') || _task.toolChoose[j].tool == 'Choice tool'){
  19135. let testJson = await _this.aiCreateQuestion(45, index)
  19136. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  19137. _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}
  19138. }
  19139. _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]
  19140. _this.$forceUpdate();
  19141. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19142. }
  19143. } else {
  19144. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  19145. {
  19146. tool: [],
  19147. toolDetail: "",
  19148. toolType: 0,
  19149. askCount: 1,
  19150. askTitle: "",
  19151. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19152. },
  19153. )
  19154. }
  19155. //
  19156. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19157. _this.$forceUpdate();
  19158. _this.$nextTick(()=>{
  19159. for (var j = 0; j < _task.toolChoose.length; j++) {
  19160. if(_this.pjTemplateArray.indexOf(_this.templateid) !=-1 && _this.pjIndex.indexOf(toolsJson[_task.toolChoose[j].tool].tool) != -1){
  19161. _this.$refs['evalist'+index+j][0].openAiDialog();
  19162. }
  19163. }
  19164. })
  19165. }
  19166. // callback ? callback() : ''
  19167. _this.taskGLoading[index][1] = false
  19168. _this.taskCancelToken2[index] = null
  19169. _this.$forceUpdate();
  19170. })
  19171. .catch((error) => {
  19172. // _this.loading = false
  19173. _this.taskGLoading[index][1] = false
  19174. _this.taskCancelToken2[index] = null
  19175. _this.$forceUpdate();
  19176. console.log(error);
  19177. });
  19178. },
  19179. async aiGetG323(messages, index) {
  19180. let _this = this
  19181. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19182. fileid = [...fileid, ..._this.knowFileids]
  19183. if (_this.infoData.length) {
  19184. for (var i = 0; i < _this.infoData.length; i++) {
  19185. if(_this.infoData[i].fileid){
  19186. fileid.push(_this.infoData[i].fileid)
  19187. }else {
  19188. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19189. if(_fileid){
  19190. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19191. _this.$forceUpdate();
  19192. if(_fileid != 1){
  19193. fileid.push(_fileid)
  19194. }
  19195. }
  19196. }
  19197. }
  19198. }
  19199. let parm = {
  19200. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19201. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19202. session_name: uuidv4(),
  19203. userId: this.userid,
  19204. file_ids: fileid.length ? [...fileid] : '',
  19205. model: 'gpt-4o-2024-08-06',
  19206. temperature: this.mode == 3 ? 0.5 : 0.1,
  19207. }
  19208. this.ajax
  19209. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19210. .then(async (response) => {
  19211. console.log(response);
  19212. let data = response.data.FunctionResponse
  19213. if (data.message) {
  19214. console.log(data.message);
  19215. let tArray = {}
  19216. try {
  19217. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19218. } catch (error) {
  19219. console.log("error_________________" + error);
  19220. try {
  19221. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19222. let match = data.message.match(regex);
  19223. tArray = JSON.parse(match[0]);
  19224. } catch (error) {
  19225. try {
  19226. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19227. let match = data.message.match(regex);
  19228. // eval("var aaa = " + match[0])
  19229. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19230. } catch (error) {
  19231. console.log("error_________________" + error);
  19232. }
  19233. console.log("error_________________" + error);
  19234. }
  19235. }
  19236. let _task = tArray
  19237. if(!_task.elist){
  19238. console.log("error_________________JSON不对重新生成");
  19239. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19240. _this.aiGet322(messages, index)
  19241. return;
  19242. }
  19243. _task.elist = _task.elist.filter(el=>{
  19244. el.isai = "1"
  19245. return el
  19246. })
  19247. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  19248. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19249. _this.$forceUpdate();
  19250. }
  19251. // callback ? callback() : ''
  19252. _this.taskGLoading[index][2] = false
  19253. })
  19254. .catch((error) => {
  19255. // _this.loading = false
  19256. _this.taskGLoading[index][2] = false
  19257. console.log(error);
  19258. });
  19259. },
  19260. async aiCreateQuestion(type, task) {
  19261. let _this = this
  19262. return new Promise((resolve, reject) => {
  19263. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19264. fileid = [...fileid, ..._this.knowFileids]
  19265. if (_this.infoData.length) {
  19266. for (var i = 0; i < _this.infoData.length; i++) {
  19267. if(_this.infoData[i].fileid){
  19268. fileid.push(_this.infoData[i].fileid)
  19269. }
  19270. }
  19271. }
  19272. let sub = []
  19273. let mclass = []
  19274. if (this.courseTypeId.length) {
  19275. for (var i = 0; i < this.courseTypeId.length; i++) {
  19276. let _sid = this.courseTypeId[i]
  19277. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19278. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19279. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19280. }
  19281. }
  19282. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19283. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19284. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19285. }
  19286. }
  19287. }
  19288. }
  19289. let messages = ""
  19290. if(type == 15){
  19291. messages = `NOTICE
  19292. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19293. Language: ${this.getLang()}
  19294. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19295. Instruction: Based on the context, follow "Format example", write content.
  19296. # Context
  19297. ## 任务
  19298. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  19299. ## 限制
  19300. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19301. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19302. ## 课程简介
  19303. 课程名字:${_this.courseName}
  19304. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19305. ${sub.length ? '学科:' + sub.join(",") : ''}
  19306. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19307. ## 教案
  19308. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19309. # Format example
  19310. {"answerQ":"问题"}
  19311. `
  19312. }else if(type == 45){
  19313. messages = `NOTICE
  19314. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19315. Language: ${this.getLang()}
  19316. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19317. Instruction: Based on the context, follow "Format example", write content.
  19318. # Context
  19319. ## 任务
  19320. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  19321. ## 限制
  19322. - 生成题目禁止重复。
  19323. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19324. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  19325. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19326. ## 课程简介
  19327. 课程名字:${_this.courseName}
  19328. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19329. ${sub.length ? '学科:' + sub.join(",") : ''}
  19330. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19331. ## 教案
  19332. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19333. # Format example
  19334. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  19335. `
  19336. }
  19337. let parm = {
  19338. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19339. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19340. session_name: uuidv4(),
  19341. userId: this.userid,
  19342. file_ids: fileid.length ? [...fileid] : '',
  19343. model: 'gpt-4o-2024-08-06',
  19344. temperature: this.mode == 3 ? 0.5 : 0.1,
  19345. }
  19346. this.ajax
  19347. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19348. .then((response) => {
  19349. console.log(response);
  19350. let data = response.data.FunctionResponse
  19351. if (data.message) {
  19352. console.log(data.message);
  19353. try {
  19354. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19355. let tArray = {}
  19356. try {
  19357. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19358. } catch (error) {
  19359. console.log("error_________________" + error);
  19360. try {
  19361. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19362. let match = data.message.match(regex);
  19363. tArray = JSON.parse(match[0]);
  19364. // var message = data.message;
  19365. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19366. // var jsonEnd = message.indexOf("```", jsonStart);
  19367. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19368. // tArray = JSON.parse(jsonString);
  19369. } catch (error) {
  19370. try {
  19371. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19372. let match = data.message.match(regex);
  19373. // eval("var aaa = " + match[0])
  19374. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19375. } catch (error) {
  19376. try {
  19377. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19378. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  19379. let match = data.message.match(regex.replace(regex2, '"$1"'));
  19380. // eval("var aaa = " + match[0])
  19381. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19382. } catch (error) {
  19383. console.log("error_________________" + error);
  19384. }
  19385. console.log("error_________________" + error);
  19386. }
  19387. console.log("error_________________" + error);
  19388. }
  19389. }
  19390. resolve(tArray)
  19391. } catch (error) {
  19392. if(type == 15){
  19393. resolve({answerQ: "题目"})
  19394. }else if(type == 45){
  19395. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19396. }
  19397. }
  19398. }else if(type == 15){
  19399. resolve({answerQ: "题目"})
  19400. }else if(type == 45){
  19401. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19402. }
  19403. })
  19404. .catch((error) => {
  19405. if(type == 15){
  19406. resolve({answerQ: "题目"})
  19407. }else if(type == 45){
  19408. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19409. }
  19410. console.log(error);
  19411. });
  19412. });
  19413. },
  19414. async aiChoice(type){
  19415. if(type == 45){
  19416. this.choiceLoading = true
  19417. }
  19418. let _this = this
  19419. let fileid = []
  19420. if (_this.xuanzeInfoData.length) {
  19421. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  19422. if(_this.xuanzeInfoData[i].fileid){
  19423. fileid.push(_this.xuanzeInfoData[i].fileid)
  19424. }
  19425. }
  19426. }else{
  19427. fileid = [...fileid, ..._this.knowFileids]
  19428. if (_this.infoData.length) {
  19429. for (var i = 0; i < _this.infoData.length; i++) {
  19430. if(_this.infoData[i].fileid){
  19431. fileid.push(_this.infoData[i].fileid)
  19432. }
  19433. }
  19434. }
  19435. }
  19436. let sub = []
  19437. let mclass = []
  19438. if (this.courseTypeId.length) {
  19439. for (var i = 0; i < this.courseTypeId.length; i++) {
  19440. let _sid = this.courseTypeId[i]
  19441. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19442. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19443. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19444. }
  19445. }
  19446. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19447. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19448. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19449. }
  19450. }
  19451. }
  19452. }
  19453. let messages = ""
  19454. if(type == 15){
  19455. messages = `NOTICE
  19456. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19457. Language: ${this.getLang()}
  19458. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19459. Instruction: Based on the context, follow "Format example", write content.
  19460. # Context
  19461. ## 任务
  19462. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  19463. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  19464. ## 限制
  19465. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19466. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19467. ## 课程简介
  19468. 课程名字:${_this.courseName}
  19469. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19470. ${sub.length ? '学科:' + sub.join(",") : ''}
  19471. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19472. ## 教案
  19473. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19474. # Format example
  19475. {"answerQ":"问题"}
  19476. `
  19477. }else if(type == 45){
  19478. messages = `NOTICE
  19479. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19480. Language: ${this.getLang()}
  19481. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19482. Instruction: Based on the context, follow "Format example", write content.
  19483. # Context
  19484. ## 任务
  19485. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  19486. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  19487. ## 限制
  19488. - 生成题目禁止重复。
  19489. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19490. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  19491. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19492. ## 课程简介
  19493. 课程名字:${_this.courseName}
  19494. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19495. ${sub.length ? '学科:' + sub.join(",") : ''}
  19496. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19497. ## 教案
  19498. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19499. # Format example
  19500. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  19501. `
  19502. }
  19503. let parm = {
  19504. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19505. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19506. session_name: uuidv4(),
  19507. userId: this.userid,
  19508. file_ids: fileid.length ? [...fileid] : '',
  19509. model: 'gpt-4o-2024-08-06',
  19510. temperature: this.mode == 3 ? 0.5 : 0.1,
  19511. }
  19512. this.ajax
  19513. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19514. .then((response) => {
  19515. console.log(response);
  19516. let data = response.data.FunctionResponse
  19517. if (data.message) {
  19518. console.log(data.message);
  19519. try {
  19520. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19521. let tArray = {}
  19522. try {
  19523. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19524. } catch (error) {
  19525. console.log("error_________________" + error);
  19526. try {
  19527. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19528. let match = data.message.match(regex);
  19529. tArray = JSON.parse(match[0]);
  19530. // var message = data.message;
  19531. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19532. // var jsonEnd = message.indexOf("```", jsonStart);
  19533. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19534. // tArray = JSON.parse(jsonString);
  19535. } catch (error) {
  19536. try {
  19537. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19538. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  19539. let match = data.message.match(regex.replace(regex2, '"$1"'));
  19540. // eval("var aaa = " + match[0])
  19541. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19542. } catch (error) {
  19543. console.log("error_________________" + error);
  19544. }
  19545. console.log("error_________________" + error);
  19546. }
  19547. }
  19548. if(type == 45){
  19549. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  19550. }
  19551. } catch (error) {
  19552. if(type == 15){
  19553. {answerQ: "题目"}
  19554. }else if(type == 45){
  19555. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  19556. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  19557. }
  19558. _this.choiceLoading = false
  19559. }
  19560. }else if(type == 15){
  19561. {answerQ: "题目"}
  19562. }else if(type == 45){
  19563. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  19564. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  19565. }
  19566. _this.choiceLoading = false
  19567. }).catch((error) => {
  19568. if(type == 15){
  19569. {answerQ: "题目"}
  19570. }else if(type == 45){
  19571. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  19572. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  19573. }
  19574. console.log(error);
  19575. _this.choiceLoading = false
  19576. });
  19577. },
  19578. async aiGet4(messages, callback, clickType) {
  19579. let _this = this
  19580. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19581. fileid = [...fileid, ..._this.knowFileids]
  19582. if (_this.infoData.length) {
  19583. for (var i = 0; i < _this.infoData.length; i++) {
  19584. if(_this.infoData[i].fileid){
  19585. fileid.push(_this.infoData[i].fileid)
  19586. }else {
  19587. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19588. if(_fileid){
  19589. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19590. _this.$forceUpdate();
  19591. if(_fileid != 1){
  19592. fileid.push(_fileid)
  19593. }
  19594. }
  19595. }
  19596. }
  19597. }
  19598. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19599. if(_this.cankaoInfoData[i].fileid){
  19600. fileid.push(_this.cankaoInfoData[i].fileid)
  19601. }else {
  19602. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19603. if(_fileid){
  19604. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19605. _this.$forceUpdate();
  19606. if(_fileid != 1){
  19607. fileid.push(_fileid)
  19608. }
  19609. }
  19610. }
  19611. }
  19612. // let params = JSON.stringify({
  19613. // // "model": "Chat",
  19614. // model: 'gpt-3.5-turbo',
  19615. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19616. // max_tokens: 4096,
  19617. // top_p: 1,
  19618. // frequency_penalty: 0,
  19619. // presence_penalty: 0,
  19620. // messages: [{
  19621. // content: messages,
  19622. // role: 'user'
  19623. // }],
  19624. // stream: false,
  19625. // uid: this.userid,
  19626. // mind_map_question: "",
  19627. // })
  19628. // // let params = JSON.stringify({
  19629. // // message: {
  19630. // // anthropic_version: "bedrock-2023-05-31",
  19631. // // max_tokens: 4096,
  19632. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19633. // // top_p: 1,
  19634. // // messages: [{
  19635. // // content: messages,
  19636. // // role: 'user'
  19637. // // }], //
  19638. // // },
  19639. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19640. // // });
  19641. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19642. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19643. // console.log(response);
  19644. // let data = response.data.FunctionResponse
  19645. // if (data.choices && data.choices.length && data.choices[0].message) {
  19646. // console.log(data.choices[0].message.content);
  19647. // let dArray = JSON.parse(data.choices[0].message.content)
  19648. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  19649. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  19650. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19651. // for (var i = 0; i < dArray.length; i++) {
  19652. // let _task = dArray[i]
  19653. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19654. // task: _task.task,
  19655. // taskDetail: "",
  19656. // taskDetail2: "",
  19657. // taskDetail3: _task.detail,
  19658. // chapterData: [],
  19659. // toolText: "",
  19660. // toolChoose: [
  19661. // {
  19662. // tool: [],
  19663. // toolDetail: "",
  19664. // toolType: 0,
  19665. // askCount: 1,
  19666. // askTitle: "",
  19667. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19668. // },
  19669. // ],
  19670. // isShowTools: false,
  19671. // askCount: 1,
  19672. // isFold: 0,
  19673. // askTitle: "",
  19674. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19675. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19676. // homeworkList: [],
  19677. // })
  19678. // }
  19679. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19680. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19681. // _this.$forceUpdate();
  19682. // } else {
  19683. // for (var i = 0; i < dArray.length; i++) {
  19684. // let _task = dArray[i]
  19685. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19686. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19687. // }else {
  19688. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  19689. // task: _task.task,
  19690. // taskDetail: "",
  19691. // taskDetail2: "",
  19692. // taskDetail3: _task.detail,
  19693. // chapterData: [],
  19694. // toolText: "",
  19695. // toolChoose: [
  19696. // {
  19697. // tool: [],
  19698. // toolDetail: "",
  19699. // toolType: 0,
  19700. // askCount: 1,
  19701. // askTitle: "",
  19702. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19703. // },
  19704. // ],
  19705. // isShowTools: false,
  19706. // askCount: 1,
  19707. // isFold: 0,
  19708. // askTitle: "",
  19709. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19710. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19711. // homeworkList: [],
  19712. // }
  19713. // }
  19714. // }
  19715. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19716. // _this.$forceUpdate();
  19717. // }
  19718. // }
  19719. // // if (data.result) {
  19720. // // console.log(data.result);
  19721. // // let dArray = JSON.parse(data.result)
  19722. // // _this.teacherText = JSON.parse(data.result)
  19723. // // for (var i = 0; i < dArray.length; i++) {
  19724. // // let _task = dArray[i]
  19725. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19726. // // }
  19727. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19728. // // _this.$forceUpdate();
  19729. // // }
  19730. // callback ? callback() : ''
  19731. // _this.loading = false
  19732. // }).catch(function (error) {
  19733. // _this.loading = false
  19734. // console.log(error);
  19735. // });
  19736. let parm = {
  19737. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19738. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19739. session_name: uuidv4(),
  19740. userId: this.userid,
  19741. file_ids: fileid.length ? [...fileid] : '',
  19742. model: 'gpt-4o-2024-08-06',
  19743. temperature: this.mode == 3 ? 0.5 : 0.1,
  19744. }
  19745. this.ajax
  19746. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19747. .then((response) => {
  19748. console.log(response);
  19749. let data = response.data.FunctionResponse
  19750. if (data.message) {
  19751. console.log(data.message);
  19752. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19753. let dArray = []
  19754. try {
  19755. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19756. } catch (error) {
  19757. console.log("error_________________" + error);
  19758. try {
  19759. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19760. let match = data.message.match(regex);
  19761. dArray = JSON.parse(match[0]);
  19762. // var message = data.message;
  19763. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19764. // var jsonEnd = message.indexOf("```", jsonStart);
  19765. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19766. // dArray = JSON.parse(jsonString);
  19767. } catch (error) {
  19768. _this.aiGet4(messages, callback)
  19769. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19770. console.log("error_________________" + error);
  19771. return;
  19772. console.log("error_________________" + error);
  19773. _this.loading = false
  19774. }
  19775. }
  19776. try {
  19777. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  19778. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  19779. if(_this.panTeacher() > 0){
  19780. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19781. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19782. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  19783. }
  19784. for (var i = 0; i < dArray.length; i++) {
  19785. let _task = dArray[i]
  19786. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19787. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  19788. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19789. }else {
  19790. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19791. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19792. taskDetail: "",
  19793. taskDetail2: "",
  19794. taskDetail3: _task.detail,
  19795. chapterData: [],
  19796. toolText: "",
  19797. toolChoose: [
  19798. {
  19799. tool: [],
  19800. toolDetail: "",
  19801. toolType: 0,
  19802. askCount: 1,
  19803. askTitle: "",
  19804. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19805. },
  19806. ],
  19807. isShowTools: false,
  19808. askCount: 1,
  19809. isFold: 0,
  19810. askTitle: "",
  19811. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19812. checkJson: [{ checkCount: [], checkPerent: [] }],
  19813. homeworkList: [],
  19814. })
  19815. }
  19816. }
  19817. }else {
  19818. _this.unitJson[0].chapterInfo[0].taskJson = []
  19819. for (var i = 0; i < dArray.length; i++) {
  19820. let _task = dArray[i]
  19821. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19822. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19823. taskDetail: "",
  19824. taskDetail2: "",
  19825. taskDetail3: _task.detail,
  19826. chapterData: [],
  19827. toolText: "",
  19828. toolChoose: [
  19829. {
  19830. tool: [],
  19831. toolDetail: "",
  19832. toolType: 0,
  19833. askCount: 1,
  19834. askTitle: "",
  19835. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19836. },
  19837. ],
  19838. isShowTools: false,
  19839. askCount: 1,
  19840. isFold: 0,
  19841. askTitle: "",
  19842. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19843. checkJson: [{ checkCount: [], checkPerent: [] }],
  19844. homeworkList: [],
  19845. })
  19846. }
  19847. }
  19848. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19849. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19850. _this.$forceUpdate();
  19851. } else {
  19852. for (var i = 0; i < dArray.length; i++) {
  19853. let _task = dArray[i]
  19854. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19855. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19856. }else {
  19857. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  19858. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19859. taskDetail: "",
  19860. taskDetail2: "",
  19861. taskDetail3: _task.detail,
  19862. chapterData: [],
  19863. toolText: "",
  19864. toolChoose: [
  19865. {
  19866. tool: [],
  19867. toolDetail: "",
  19868. toolType: 0,
  19869. askCount: 1,
  19870. askTitle: "",
  19871. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19872. },
  19873. ],
  19874. isShowTools: false,
  19875. askCount: 1,
  19876. isFold: 0,
  19877. askTitle: "",
  19878. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19879. checkJson: [{ checkCount: [], checkPerent: [] }],
  19880. homeworkList: [],
  19881. }
  19882. }
  19883. }
  19884. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19885. _this.$forceUpdate();
  19886. }
  19887. } catch (error) {
  19888. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19889. _this.aiGet4(messages, callback)
  19890. console.log("error_________________" + error);
  19891. return;
  19892. // _this.loading = false
  19893. }
  19894. }
  19895. callback ? callback() : ''
  19896. })
  19897. .catch((error) => {
  19898. _this.loading = false
  19899. console.log(error);
  19900. });
  19901. },
  19902. async aiDetail(msg, index) {
  19903. let _this = this
  19904. const _tindex = 'task-' + index
  19905. const _tindex2 = index
  19906. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19907. fileid = [...fileid, ..._this.knowFileids]
  19908. if (_this.infoData.length) {
  19909. for (var i = 0; i < _this.infoData.length; i++) {
  19910. if(_this.infoData[i].fileid){
  19911. fileid.push(_this.infoData[i].fileid)
  19912. }else {
  19913. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19914. if(_fileid){
  19915. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19916. _this.$forceUpdate();
  19917. if(_fileid != 1){
  19918. fileid.push(_fileid)
  19919. }
  19920. }
  19921. }
  19922. }
  19923. }
  19924. let url = []
  19925. if (this.infoData.length) {
  19926. for (var i = 0; i < this.infoData.length; i++) {
  19927. url.push(this.infoData[i].url)
  19928. }
  19929. }
  19930. let messages = `NOTICE
  19931. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19932. Language: ${this.getLang()}
  19933. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19934. Instruction: Based on the context, follow "Format example", write content.
  19935. #Context
  19936. ## 要求
  19937. ${msg}
  19938. ## 参考信息
  19939. 任务名称:${_this.aiCallBack.task}
  19940. ## 优化内容
  19941. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  19942. // -------- #补充参考资料和
  19943. // ## 补充参考资料
  19944. // - 补充资料:${url.join(",")}
  19945. // - 补充描述:${_this.courseText2}
  19946. _this.taskDetailLoading.push(_tindex)
  19947. _this.ttaskDetailLoading.push(_tindex)
  19948. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19949. let _uuid = uuidv4();
  19950. // let params = JSON.stringify({
  19951. // // "model": "Chat",
  19952. // model: 'gpt-3.5-turbo',
  19953. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19954. // max_tokens: 4096,
  19955. // top_p: 1,
  19956. // frequency_penalty: 0,
  19957. // presence_penalty: 0,
  19958. // messages: [{
  19959. // content: messages,
  19960. // role: 'user'
  19961. // }],
  19962. // uid: _uuid,
  19963. // mind_map_question: "",
  19964. // })
  19965. let params = {
  19966. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  19967. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  19968. session_name: _uuid,
  19969. userId: _this.userid,
  19970. uid: _uuid,
  19971. file_ids: fileid.length ? [...fileid] : '',
  19972. model: 'gpt-4o-2024-08-06',
  19973. temperature: this.mode == 3 ? 0.5 : 0.1,
  19974. }
  19975. // let params = JSON.stringify({
  19976. // message: {
  19977. // anthropic_version: "bedrock-2023-05-31",
  19978. // max_tokens: 4096,
  19979. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19980. // top_p: 1,
  19981. // messages: [{
  19982. // "role": "user",
  19983. // "content": messages
  19984. // }] ,
  19985. // },
  19986. // uid: _uuid,
  19987. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19988. // });
  19989. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19990. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  19991. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  19992. console.log(response);
  19993. // let data = response.data.FunctionResponse
  19994. // if (data.choices && data.choices.length && data.choices[0].message) {
  19995. // console.log(data.choices[0].message.content);
  19996. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  19997. // _this.$forceUpdate()
  19998. // }
  19999. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20000. } else {
  20001. _this.$message.warning(response.data.FunctionResponse.result);
  20002. }
  20003. _this.isOutlineTaskCancelToken[index] = null
  20004. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20005. }).catch(function (error) {
  20006. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20007. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20008. _this.isOutlineTaskCancelToken[index] = null
  20009. if(error && error.message != 'Request canceled by the user.'){
  20010. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20011. }
  20012. console.log(error);
  20013. });
  20014. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  20015. },
  20016. aiDetailgetAiContent(_uid, loading, _tindex2) {
  20017. try {
  20018. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20019. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20020. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20021. } catch(error){
  20022. console.log('EventSource error:', error);
  20023. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20024. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20025. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20026. this.isOutlineTaskCancelToken[_tindex2] = null
  20027. return;
  20028. }
  20029. let _allText = "";
  20030. let _mdText = "";
  20031. let _iindex = 0
  20032. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  20033. let _eData = JSON.parse(_e.data).content;
  20034. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20035. //对话已经完成
  20036. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20037. this.isOutlineTaskCancelSource[_tindex2].close();
  20038. this.isOutlineTaskCancelSource[_tindex2] = null;
  20039. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20040. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20041. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20042. this.isOutlineTaskCancelToken[_tindex2] = null
  20043. return;
  20044. } else {
  20045. _iindex++
  20046. //对话还在继续
  20047. let _text = "";
  20048. _text = _eData.replaceAll("'", "");
  20049. if (_allText == "") {
  20050. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20051. } else {
  20052. _allText += _text;
  20053. }
  20054. _mdText = _allText + "_";
  20055. _mdText = _mdText.replace(/\\n/g, "\n");
  20056. _mdText = _mdText.replace(/\\/g, "");
  20057. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20058. //转化返回的回复流数据.
  20059. if(_iindex == 10){
  20060. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20061. _iindex = 0
  20062. }
  20063. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20064. // 处理流数据
  20065. }
  20066. // this.$forceUpdate();
  20067. };
  20068. let _this = _this
  20069. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  20070. // 处理错误,可以尝试重新连接
  20071. console.log('EventSource error:', event);
  20072. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20073. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  20074. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  20075. _this.isOutlineTaskCancelToken[_tindex2] = null
  20076. _this.isOutlineTaskCancelSource[_tindex2].close();
  20077. _this.isOutlineTaskCancelSource[_tindex2] = null;
  20078. };
  20079. },
  20080. async aiOutlineDetail(msg, index) {
  20081. let _this = this
  20082. const _tindex = 'task-' + index
  20083. const _tindex2 = index
  20084. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20085. fileid = [...fileid, ..._this.knowFileids]
  20086. if (_this.infoData.length) {
  20087. for (var i = 0; i < _this.infoData.length; i++) {
  20088. if(_this.infoData[i].fileid){
  20089. fileid.push(_this.infoData[i].fileid)
  20090. }else {
  20091. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20092. if(_fileid){
  20093. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20094. _this.$forceUpdate();
  20095. if(_fileid != 1){
  20096. fileid.push(_fileid)
  20097. }
  20098. }
  20099. }
  20100. }
  20101. }
  20102. let url = []
  20103. if (this.infoData.length) {
  20104. for (var i = 0; i < this.infoData.length; i++) {
  20105. url.push(this.infoData[i].url)
  20106. }
  20107. }
  20108. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  20109. let messages = `NOTICE
  20110. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  20111. Language: ${this.getLang()}
  20112. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20113. Instruction: Based on the context, follow "Format example", write content.
  20114. #Context
  20115. ## 要求
  20116. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  20117. ## 参考信息
  20118. 课程名字:${_this.courseName}
  20119. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20120. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20121. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20122. # Format example
  20123. 子任务名称:名称应该总结了该任务是在做什么,
  20124. 子任务设计:任务设计。
  20125. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  20126. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  20127. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  20128. `
  20129. // 教学目标:教学目标。
  20130. // 任务设计:任务设计。
  20131. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  20132. // -------- #补充参考资料和
  20133. // ## 补充参考资料
  20134. // - 补充资料:${url.join(",")}
  20135. // - 补充描述:${_this.courseText2}
  20136. _this.taskDetailLoading.push(_tindex)
  20137. _this.ttaskDetailLoading.push(_tindex)
  20138. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20139. let _uuid = uuidv4();
  20140. // let params = JSON.stringify({
  20141. // // "model": "Chat",
  20142. // model: 'gpt-3.5-turbo',
  20143. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20144. // max_tokens: 4096,
  20145. // top_p: 1,
  20146. // frequency_penalty: 0,
  20147. // presence_penalty: 0,
  20148. // messages: [{
  20149. // content: messages,
  20150. // role: 'user'
  20151. // }],
  20152. // uid: _uuid,
  20153. // mind_map_question: "",
  20154. // })
  20155. let params = {
  20156. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20157. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20158. session_name: _uuid,
  20159. userId: _this.userid,
  20160. uid: _uuid,
  20161. file_ids: fileid.length ? [...fileid] : '',
  20162. model: 'gpt-4o-2024-08-06',
  20163. temperature: this.mode == 3 ? 0.5 : 0.1,
  20164. }
  20165. // let params = JSON.stringify({
  20166. // message: {
  20167. // anthropic_version: "bedrock-2023-05-31",
  20168. // max_tokens: 4096,
  20169. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20170. // top_p: 1,
  20171. // messages: [{
  20172. // "role": "user",
  20173. // "content": messages
  20174. // }] ,
  20175. // },
  20176. // uid: _uuid,
  20177. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20178. // });
  20179. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20180. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20181. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20182. console.log(response);
  20183. // let data = response.data.FunctionResponse
  20184. // if (data.choices && data.choices.length && data.choices[0].message) {
  20185. // console.log(data.choices[0].message.content);
  20186. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20187. // _this.$forceUpdate()
  20188. // }
  20189. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20190. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  20191. } else {
  20192. _this.$message.warning(response.data.FunctionResponse.result);
  20193. }
  20194. _this.isOutlineTaskCancelToken[index] = null
  20195. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20196. }).catch(function (error) {
  20197. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20198. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20199. _this.isOutlineTaskCancelToken[index] = null
  20200. if(error && error.message != 'Request canceled by the user.'){
  20201. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20202. }
  20203. console.log(error);
  20204. });
  20205. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  20206. },
  20207. async aiOutlineDetail2(msg, index) {
  20208. let _this = this
  20209. const _tindex = 'task-' + index
  20210. const _tindex2 = index
  20211. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20212. fileid = [...fileid, ..._this.knowFileids]
  20213. if (_this.infoData.length) {
  20214. for (var i = 0; i < _this.infoData.length; i++) {
  20215. if(_this.infoData[i].fileid){
  20216. fileid.push(_this.infoData[i].fileid)
  20217. }else {
  20218. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20219. if(_fileid){
  20220. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20221. _this.$forceUpdate();
  20222. if(_fileid != 1){
  20223. fileid.push(_fileid)
  20224. }
  20225. }
  20226. }
  20227. }
  20228. }
  20229. let url = []
  20230. if (this.infoData.length) {
  20231. for (var i = 0; i < this.infoData.length; i++) {
  20232. url.push(this.infoData[i].url)
  20233. }
  20234. }
  20235. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  20236. let taskArray = []
  20237. let taskArrayD = []
  20238. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  20239. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  20240. if(k != index){
  20241. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  20242. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  20243. }
  20244. }
  20245. let messages = `NOTICE
  20246. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  20247. Language: ${this.getLang()}
  20248. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20249. Instruction: Based on the context, follow "Format example", write content.
  20250. #Context
  20251. ## 要求
  20252. ${msg}
  20253. ## 参考信息
  20254. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20255. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20256. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20257. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  20258. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  20259. # Format example
  20260. **子任务标题**:环节+子任务名称
  20261. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  20262. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  20263. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  20264. `
  20265. // 教学目标:教学目标。
  20266. // 任务设计:任务设计。
  20267. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  20268. // -------- #补充参考资料和
  20269. // ## 补充参考资料
  20270. // - 补充资料:${url.join(",")}
  20271. // - 补充描述:${_this.courseText2}
  20272. _this.taskDetailLoading.push(_tindex)
  20273. _this.ttaskDetailLoading.push(_tindex)
  20274. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20275. let _uuid = uuidv4();
  20276. // let params = JSON.stringify({
  20277. // // "model": "Chat",
  20278. // model: 'gpt-3.5-turbo',
  20279. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20280. // max_tokens: 4096,
  20281. // top_p: 1,
  20282. // frequency_penalty: 0,
  20283. // presence_penalty: 0,
  20284. // messages: [{
  20285. // content: messages,
  20286. // role: 'user'
  20287. // }],
  20288. // uid: _uuid,
  20289. // mind_map_question: "",
  20290. // })
  20291. let params = {
  20292. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20293. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  20294. session_name: _uuid,
  20295. userId: _this.userid,
  20296. uid: _uuid,
  20297. file_ids: fileid.length ? [...fileid] : '',
  20298. model: 'gpt-4o-2024-08-06',
  20299. temperature: this.mode == 3 ? 0.5 : 0.1,
  20300. }
  20301. // let params = JSON.stringify({
  20302. // message: {
  20303. // anthropic_version: "bedrock-2023-05-31",
  20304. // max_tokens: 4096,
  20305. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20306. // top_p: 1,
  20307. // messages: [{
  20308. // "role": "user",
  20309. // "content": messages
  20310. // }] ,
  20311. // },
  20312. // uid: _uuid,
  20313. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20314. // });
  20315. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20316. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20317. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20318. console.log(response);
  20319. // let data = response.data.FunctionResponse
  20320. // if (data.choices && data.choices.length && data.choices[0].message) {
  20321. // console.log(data.choices[0].message.content);
  20322. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20323. // _this.$forceUpdate()
  20324. // }
  20325. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20326. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  20327. } else {
  20328. _this.$message.warning(response.data.FunctionResponse.result);
  20329. }
  20330. _this.isOutlineTaskCancelToken[index] = null
  20331. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20332. }).catch(function (error) {
  20333. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20334. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20335. _this.isOutlineTaskCancelToken[index] = null
  20336. if(error && error.message != 'Request canceled by the user.'){
  20337. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20338. }
  20339. console.log(error);
  20340. });
  20341. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  20342. },
  20343. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  20344. try {
  20345. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20346. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20347. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20348. } catch(error) {
  20349. console.log('EventSource error:', error);
  20350. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20351. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20352. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20353. this.isOutlineTaskCancelToken[_tindex2] = null
  20354. return;
  20355. }
  20356. let _allText = "";
  20357. let _mdText = "";
  20358. let _iindex = 0
  20359. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  20360. let _eData = JSON.parse(_e.data).content;
  20361. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20362. //对话已经完成
  20363. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20364. this.isOutlineTaskCancelSource[_tindex2].close();
  20365. this.isOutlineTaskCancelSource[_tindex2] = null;
  20366. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20367. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  20368. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  20369. }
  20370. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20371. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20372. this.isOutlineTaskCancelToken[_tindex2] = null
  20373. return;
  20374. } else {
  20375. _iindex++
  20376. //对话还在继续
  20377. let _text = "";
  20378. _text = _eData.replaceAll("'", "");
  20379. if (_allText == "") {
  20380. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20381. } else {
  20382. _allText += _text;
  20383. }
  20384. _mdText = _allText + "_";
  20385. _mdText = _mdText.replace(/\\n/g, "\n");
  20386. _mdText = _mdText.replace(/\\/g, "");
  20387. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20388. //转化返回的回复流数据.
  20389. if(_iindex == 10){
  20390. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20391. _iindex = 0
  20392. }
  20393. if(this.taskDetailLoading.indexOf(loading) !== -1){
  20394. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20395. }
  20396. // 处理流数据
  20397. }
  20398. // this.$forceUpdate();
  20399. };
  20400. let _this = this
  20401. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  20402. // 处理错误,可以尝试重新连接
  20403. console.log('EventSource error:', event);
  20404. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20405. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  20406. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  20407. _this.isOutlineTaskCancelToken[_tindex2] = null
  20408. _this.isOutlineTaskCancelSource[_tindex2].close();
  20409. _this.isOutlineTaskCancelSource[_tindex2] = null;
  20410. };
  20411. },
  20412. async aiDetail2(msg, index) {
  20413. let _this = this
  20414. const _tindex = 'task-' + index
  20415. const _tindex2 = index
  20416. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20417. fileid = [...fileid, ..._this.knowFileids]
  20418. if (_this.infoData.length) {
  20419. for (var i = 0; i < _this.infoData.length; i++) {
  20420. if(_this.infoData[i].fileid){
  20421. fileid.push(_this.infoData[i].fileid)
  20422. }else {
  20423. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20424. if(_fileid){
  20425. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20426. _this.$forceUpdate();
  20427. if(_fileid != 1){
  20428. fileid.push(_fileid)
  20429. }
  20430. }
  20431. }
  20432. }
  20433. }
  20434. let messages = `NOTICE
  20435. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  20436. Language: ${this.getLang()}
  20437. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20438. Instruction: Based on the context, follow "Format example", write content.
  20439. #Context
  20440. ## 要求
  20441. ${msg}
  20442. ## 参考资料
  20443. 任务名字: ${_this.aiCallBack.task}
  20444. ## 优化信息
  20445. ${_this.aiCallBack.taskDetail}
  20446. # Format example
  20447. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  20448. _this.taskDetailLoading2.push(_tindex)
  20449. _this.ttaskDetailLoading2.push(_tindex)
  20450. let _uuid = uuidv4();
  20451. // let params = JSON.stringify({
  20452. // // "model": "Chat",
  20453. // model: 'gpt-3.5-turbo',
  20454. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20455. // max_tokens: 4096,
  20456. // top_p: 1,
  20457. // frequency_penalty: 0,
  20458. // presence_penalty: 0,
  20459. // messages: [{
  20460. // content: messages,
  20461. // role: 'user'
  20462. // }],
  20463. // uid: _uuid,
  20464. // mind_map_question: "",
  20465. // })
  20466. let params = {
  20467. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20468. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  20469. session_name: _uuid,
  20470. userId: _this.userid,
  20471. uid: _uuid,
  20472. file_ids: fileid.length ? [...fileid] : '',
  20473. model: 'gpt-4o-2024-08-06',
  20474. temperature: this.mode == 3 ? 0.5 : 0.1,
  20475. }
  20476. // let params = JSON.stringify({
  20477. // message: {
  20478. // anthropic_version: "bedrock-2023-05-31",
  20479. // max_tokens: 4096,
  20480. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20481. // top_p: 1,
  20482. // messages: [{
  20483. // "role": "user",
  20484. // "content": messages
  20485. // }] ,
  20486. // },
  20487. // uid: _uuid,
  20488. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20489. // });
  20490. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20491. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20492. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20493. console.log(response);
  20494. // let data = response.data.FunctionResponse
  20495. // if (data.choices && data.choices.length && data.choices[0].message) {
  20496. // console.log(data.choices[0].message.content);
  20497. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20498. // _this.$forceUpdate()
  20499. // }
  20500. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20501. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20502. } else {
  20503. _this.$message.warning(response.data.FunctionResponse.result);
  20504. }
  20505. }).catch(function (error) {
  20506. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  20507. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  20508. if(error && error.message != 'Request canceled by the user.'){
  20509. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20510. }
  20511. console.log(error);
  20512. });
  20513. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  20514. },
  20515. aiDetail2getAiContent(_uid, loading, _tindex2) {
  20516. let _source;
  20517. try {
  20518. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20519. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20520. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20521. } catch(error) {
  20522. console.log('EventSource error:', error);
  20523. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20524. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  20525. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  20526. return;
  20527. }
  20528. let _allText = "";
  20529. let _mdText = "";
  20530. let _iindex = 0
  20531. _source.onmessage = _e => {
  20532. let _eData = JSON.parse(_e.data).content;
  20533. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20534. //对话已经完成
  20535. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20536. _source.close();
  20537. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  20538. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  20539. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  20540. return;
  20541. } else {
  20542. _iindex++
  20543. //对话还在继续
  20544. let _text = "";
  20545. _text = _eData.replaceAll("'", "");
  20546. if (_allText == "") {
  20547. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20548. } else {
  20549. _allText += _text;
  20550. }
  20551. _mdText = _allText + "_";
  20552. _mdText = _mdText.replace(/\\n/g, "\n");
  20553. _mdText = _mdText.replace(/\\/g, "");
  20554. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20555. //转化返回的回复流数据
  20556. if(_iindex == 10){
  20557. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  20558. _iindex = 0
  20559. }
  20560. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  20561. // 处理流数据
  20562. }
  20563. // this.$forceUpdate();
  20564. };
  20565. let _this = this
  20566. _source.onerror = function(event) {
  20567. // 处理错误,可以尝试重新连接
  20568. console.log('EventSource error:', event);
  20569. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20570. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  20571. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  20572. _source.close();
  20573. };
  20574. },
  20575. async aiDetail3(msg, index, tindex) {
  20576. let _this = this
  20577. const _tindex = 'task-' + index + tindex
  20578. const _tindex2 = index
  20579. const _tindex3 = tindex
  20580. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20581. fileid = [...fileid, ..._this.knowFileids]
  20582. if (_this.infoData.length) {
  20583. for (var i = 0; i < _this.infoData.length; i++) {
  20584. if(_this.infoData[i].fileid){
  20585. fileid.push(_this.infoData[i].fileid)
  20586. }else {
  20587. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20588. if(_fileid){
  20589. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20590. _this.$forceUpdate();
  20591. if(_fileid != 1){
  20592. fileid.push(_fileid)
  20593. }
  20594. }
  20595. }
  20596. }
  20597. }
  20598. // **重点考虑该任务及工具名和工具内容的情况下*
  20599. let messages = `NOTICE
  20600. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  20601. Language: ${this.getLang()}
  20602. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20603. Instruction: Based on the context, follow "Format example", write content.
  20604. #Context
  20605. ## 参考内容
  20606. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20607. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  20608. 工具名称:${_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 : '无'}
  20609. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  20610. ## 要求
  20611. ${msg} 输出格式和内容要求参考#格式与要求
  20612. # Format example
  20613. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  20614. _this.taskDetailLoading3.push(_tindex)
  20615. _this.ttaskDetailLoading3.push(_tindex)
  20616. let _uuid = uuidv4();
  20617. // let params = JSON.stringify({
  20618. // // "model": "Chat",
  20619. // model: 'gpt-3.5-turbo',
  20620. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20621. // max_tokens: 4096,
  20622. // top_p: 1,
  20623. // frequency_penalty: 0,
  20624. // presence_penalty: 0,
  20625. // messages: [{
  20626. // content: messages,
  20627. // role: 'user'
  20628. // }],
  20629. // uid: _uuid,
  20630. // mind_map_question: "",
  20631. // })
  20632. let params = {
  20633. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20634. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20635. session_name: _uuid,
  20636. userId: _this.userid,
  20637. uid: _uuid,
  20638. file_ids: fileid.length ? [...fileid] : '',
  20639. model: 'gpt-4o-2024-08-06',
  20640. temperature: this.mode == 3 ? 0.5 : 0.1,
  20641. }
  20642. // let params = JSON.stringify({
  20643. // message: {
  20644. // anthropic_version: "bedrock-2023-05-31",
  20645. // max_tokens: 4096,
  20646. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20647. // top_p: 1,
  20648. // messages: [{
  20649. // "role": "user",
  20650. // "content": messages
  20651. // }] ,
  20652. // },
  20653. // uid: _uuid,
  20654. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20655. // });
  20656. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20657. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20658. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20659. console.log(response);
  20660. let data = response.data.FunctionResponse
  20661. // if (data.choices && data.choices.length && data.choices[0].message) {
  20662. // console.log(data.choices[0].message.content);
  20663. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  20664. // _this.$forceUpdate()
  20665. // }
  20666. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  20667. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20668. } else {
  20669. _this.$message.warning(response.data.FunctionResponse.result);
  20670. }
  20671. }).catch(function (error) {
  20672. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  20673. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  20674. if(error && error.message != 'Request canceled by the user.'){
  20675. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20676. }
  20677. console.log(error);
  20678. });
  20679. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  20680. },
  20681. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  20682. let _source;
  20683. try {
  20684. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20685. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20686. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20687. } catch(error) {
  20688. console.log('EventSource error:', event);
  20689. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20690. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  20691. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  20692. return;
  20693. }
  20694. let _allText = "";
  20695. let _mdText = "";
  20696. let _iindex = 0
  20697. _source.onmessage = _e => {
  20698. let _eData = JSON.parse(_e.data).content;
  20699. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20700. //对话已经完成
  20701. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20702. _source.close();
  20703. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  20704. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  20705. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  20706. return;
  20707. } else {
  20708. _iindex++
  20709. //对话还在继续
  20710. let _text = "";
  20711. _text = _eData.replaceAll("'", "");
  20712. if (_allText == "") {
  20713. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20714. } else {
  20715. _allText += _text;
  20716. }
  20717. _mdText = _allText + "_";
  20718. _mdText = _mdText.replace(/\\n/g, "\n");
  20719. _mdText = _mdText.replace(/\\/g, "");
  20720. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20721. //转化返回的回复流数据
  20722. if(_iindex == 10){
  20723. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  20724. _iindex = 0
  20725. }
  20726. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  20727. // 处理流数据
  20728. }
  20729. // this.$forceUpdate();
  20730. };
  20731. let _this = this
  20732. _source.onerror = function(event) {
  20733. // 处理错误,可以尝试重新连接
  20734. console.log('EventSource error:', event);
  20735. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20736. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  20737. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  20738. _source.close();
  20739. };
  20740. },
  20741. async aiDetail4(msg, index) {
  20742. if (!msg.length) {
  20743. this.$message.error("请添加评价后才能优化")
  20744. return
  20745. }
  20746. let _this = this
  20747. const _tindex = 'task-' + index
  20748. const _tindex2 = index
  20749. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20750. fileid = [...fileid, ..._this.knowFileids]
  20751. if (_this.infoData.length) {
  20752. for (var i = 0; i < _this.infoData.length; i++) {
  20753. if(_this.infoData[i].fileid){
  20754. fileid.push(_this.infoData[i].fileid)
  20755. }else {
  20756. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20757. if(_fileid){
  20758. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20759. _this.$forceUpdate();
  20760. if(_fileid != 1){
  20761. fileid.push(_fileid)
  20762. }
  20763. }
  20764. }
  20765. }
  20766. }
  20767. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  20768. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  20769. if(_this.pingjiaInfoData[index][i].fileid){
  20770. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  20771. }
  20772. }
  20773. }
  20774. var _text = ""
  20775. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  20776. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  20777. // _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 : ''} `
  20778. _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 : ''} `
  20779. }
  20780. }
  20781. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  20782. // **重点考虑该任务详情**
  20783. // let messages = `
  20784. // Language: ${this.getLang()}
  20785. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20786. // #Context
  20787. // ## 参考内容
  20788. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20789. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  20790. // 评价设计:${_text}
  20791. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20792. // ## 要求
  20793. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  20794. // # 格式与要求
  20795. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  20796. // # Format example
  20797. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  20798. let messages = `
  20799. Language: ${this.getLang()}
  20800. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20801. #Context
  20802. ## 参考内容
  20803. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20804. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  20805. ${_text ? '评价设计:'+_text : ''}
  20806. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20807. ## 要求
  20808. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  20809. # 格式与要求
  20810. 核心素养:从教案中提取
  20811. 目标:从教案中提取
  20812. 评价标准:从教案中提取评价标准
  20813. # Format example
  20814. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  20815. _this.taskDetailLoading4.push(_tindex)
  20816. // let params = JSON.stringify({
  20817. // // "model": "Chat",
  20818. // model: 'gpt-3.5-turbo',
  20819. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20820. // max_tokens: 4096,
  20821. // top_p: 1,
  20822. // frequency_penalty: 0,
  20823. // presence_penalty: 0,
  20824. // messages: [{
  20825. // content: messages,
  20826. // role: 'user'
  20827. // }],
  20828. // stream: false,
  20829. // uid: this.userid,
  20830. // mind_map_question: "",
  20831. // })
  20832. let params = {
  20833. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20834. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20835. session_name: uuidv4(),
  20836. userId: _this.userid,
  20837. file_ids: fileid.length ? [...fileid] : '',
  20838. model: 'gpt-4o-2024-08-06',
  20839. temperature: this.mode == 3 ? 0.5 : 0.1,
  20840. }
  20841. // let params = JSON.stringify({
  20842. // message: {
  20843. // anthropic_version: "bedrock-2023-05-31",
  20844. // max_tokens: 4096,
  20845. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20846. // top_p: 1,
  20847. // messages: [{
  20848. // content: messages,
  20849. // role: 'user'
  20850. // }], //
  20851. // },
  20852. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20853. // });
  20854. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20855. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  20856. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20857. console.log(response);
  20858. let data = response.data.FunctionResponse
  20859. // if (data.choices && data.choices.length && data.choices[0].message) {
  20860. // console.log(data.choices[0].message.content);
  20861. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  20862. // _this.$forceUpdate()
  20863. // }
  20864. if (data.message) {
  20865. console.log(data.message);
  20866. try {
  20867. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  20868. } catch (e) {
  20869. console.log("error_________________" + e);
  20870. // _this.$message.error(data.message)
  20871. try {
  20872. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20873. let match = data.message.match(regex);
  20874. let elist = JSON.parse(match[0])
  20875. elist = elist.filter(el=>{
  20876. el.isai = 1
  20877. return el
  20878. })
  20879. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  20880. // var message = data.message;
  20881. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20882. // var jsonEnd = message.indexOf("```", jsonStart);
  20883. // if (jsonStart !== -1 && jsonEnd !== -1) {
  20884. // var jsonString = message
  20885. // .substring(jsonStart, jsonEnd)
  20886. // .trim();
  20887. // var _data2 = JSON.parse(jsonString);
  20888. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  20889. // }
  20890. } catch (error) {
  20891. }
  20892. }
  20893. _this.$forceUpdate()
  20894. }
  20895. // if (data.result) {
  20896. // console.log(data.result);
  20897. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  20898. // _this.$forceUpdate()
  20899. // }
  20900. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20901. }).catch(function (error) {
  20902. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20903. if(error && error.message != 'Request canceled by the user.'){
  20904. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20905. }
  20906. console.log(error);
  20907. });
  20908. },
  20909. async aiDetail5(msg, index) {
  20910. let _this = this
  20911. const _tindex = 'task-' + index
  20912. const _tindex2 = index
  20913. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20914. fileid = [...fileid, ..._this.knowFileids]
  20915. if (_this.infoData.length) {
  20916. for (var i = 0; i < _this.infoData.length; i++) {
  20917. if(_this.infoData[i].fileid){
  20918. fileid.push(_this.infoData[i].fileid)
  20919. }else {
  20920. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20921. if(_fileid){
  20922. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20923. _this.$forceUpdate();
  20924. if(_fileid != 1){
  20925. fileid.push(_fileid)
  20926. }
  20927. }
  20928. }
  20929. }
  20930. }
  20931. let url = []
  20932. if (this.infoData.length) {
  20933. for (var i = 0; i < this.infoData.length; i++) {
  20934. url.push(this.infoData[i].url)
  20935. }
  20936. }
  20937. var _text = ""
  20938. var _text2 = ""
  20939. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20940. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  20941. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  20942. }
  20943. let messages = `
  20944. Language: ${this.getLang()}
  20945. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20946. --------
  20947. ## 要求
  20948. ${msg}
  20949. -------
  20950. ## 本教案描述
  20951. ${_this.aiCallBack}
  20952. -------
  20953. ## 课程大纲
  20954. ${_text}
  20955. -------
  20956. ## 其他教学任务教案
  20957. ${_text2}`
  20958. // ## 补充参考资料
  20959. // - 补充资料:${url.join(",")}
  20960. // - 补充描述:${this.courseText2}
  20961. _this.taskDetailLoading5.push(_tindex)
  20962. _this.ttaskDetailLoading5.push(_tindex)
  20963. let _uuid = uuidv4();
  20964. // let params = JSON.stringify({
  20965. // // "model": "Chat",
  20966. // model: 'gpt-3.5-turbo',
  20967. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20968. // max_tokens: 4096,
  20969. // top_p: 1,
  20970. // frequency_penalty: 0,
  20971. // presence_penalty: 0,
  20972. // messages: [{
  20973. // content: messages,
  20974. // role: 'user'
  20975. // }],
  20976. // uid: _uuid,
  20977. // mind_map_question: "",
  20978. // })
  20979. let params = {
  20980. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20981. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20982. session_name: _uuid,
  20983. userId: _this.userid,
  20984. uid: _uuid,
  20985. file_ids: fileid.length ? [...fileid] : '',
  20986. model: 'gpt-4o-2024-08-06',
  20987. temperature: this.mode == 3 ? 0.5 : 0.1,
  20988. }
  20989. // let params = JSON.stringify({
  20990. // message: {
  20991. // anthropic_version: "bedrock-2023-05-31",
  20992. // max_tokens: 4096,
  20993. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20994. // top_p: 1,
  20995. // messages: [{
  20996. // "role": "user",
  20997. // "content": messages
  20998. // }] ,
  20999. // },
  21000. // uid: _uuid,
  21001. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21002. // });
  21003. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21004. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21005. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21006. console.log(response);
  21007. // let data = response.data.FunctionResponse
  21008. // if (data.choices && data.choices.length && data.choices[0].message) {
  21009. // console.log(data.choices[0].message.content);
  21010. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21011. // _this.$forceUpdate()
  21012. // }
  21013. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21014. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21015. } else {
  21016. _this.$message.warning(response.data.FunctionResponse.result);
  21017. }
  21018. }).catch(function (error) {
  21019. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  21020. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21021. }
  21022. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  21023. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21024. }
  21025. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21026. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21027. if(error && error.message != 'Request canceled by the user.'){
  21028. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21029. }
  21030. console.log(error);
  21031. });
  21032. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  21033. },
  21034. aiDetail5getAiContent(_uid, loading, _tindex2) {
  21035. let _source;
  21036. try {
  21037. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21038. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21039. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21040. } catch(error){
  21041. console.log('EventSource error:', error);
  21042. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21043. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21044. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21045. }
  21046. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21047. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21048. }
  21049. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21050. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21051. return;
  21052. }
  21053. let _allText = "";
  21054. let _mdText = "";
  21055. let _iindex = 0
  21056. _source.onmessage = _e => {
  21057. let _eData = JSON.parse(_e.data).content;
  21058. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21059. //对话已经完成
  21060. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21061. _source.close();
  21062. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21063. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21064. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21065. }
  21066. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21067. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21068. }
  21069. return;
  21070. } else {
  21071. _iindex++
  21072. //对话还在继续
  21073. let _text = "";
  21074. _text = _eData.replaceAll("'", "");
  21075. if (_allText == "") {
  21076. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21077. } else {
  21078. _allText += _text;
  21079. }
  21080. _mdText = _allText + "_";
  21081. _mdText = _mdText.replace(/\\n/g, "\n");
  21082. _mdText = _mdText.replace(/\\/g, "");
  21083. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21084. //转化返回的回复流数据
  21085. if(_iindex == 10){
  21086. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21087. _iindex = 0
  21088. }
  21089. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  21090. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21091. }
  21092. // 处理流数据
  21093. }
  21094. // this.$forceUpdate();
  21095. };
  21096. let _this = this
  21097. _source.onerror = function(event) {
  21098. // 处理错误,可以尝试重新连接
  21099. console.log('EventSource error:', event);
  21100. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21101. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  21102. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  21103. }
  21104. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  21105. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  21106. }
  21107. _source.close();
  21108. };
  21109. },
  21110. async aiDetail52(msg, index, callback) {
  21111. let _this = this
  21112. const _tindex = 'task-' + index
  21113. const _tindex2 = index
  21114. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21115. fileid = [...fileid, ..._this.knowFileids]
  21116. if (_this.infoData.length) {
  21117. for (var i = 0; i < _this.infoData.length; i++) {
  21118. if(_this.infoData[i].fileid){
  21119. fileid.push(_this.infoData[i].fileid)
  21120. }else {
  21121. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21122. if(_fileid){
  21123. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21124. _this.$forceUpdate();
  21125. if(_fileid != 1){
  21126. fileid.push(_fileid)
  21127. }
  21128. }
  21129. }
  21130. }
  21131. }
  21132. let url = []
  21133. if (this.infoData.length) {
  21134. for (var i = 0; i < this.infoData.length; i++) {
  21135. url.push(this.infoData[i].url)
  21136. }
  21137. }
  21138. let taskN = []
  21139. let taskD = []
  21140. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  21141. if(_tindex2 != ti){
  21142. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  21143. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  21144. }
  21145. }
  21146. let messages = `NOTICE
  21147. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  21148. Language: ${this.getLang()}
  21149. ATTENTION: follow "Language"
  21150. #Context
  21151. ## 要求
  21152. ${msg}
  21153. ## 补充描述
  21154. 课程简要描述:${_this.courseText}
  21155. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21156. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  21157. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  21158. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21159. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  21160. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21161. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21162. `
  21163. // ## 补充参考资料
  21164. // - 补充资料:${url.join(",")}
  21165. // - 补充描述:${this.courseText2}
  21166. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  21167. _this.taskDetailLoading5.push(_tindex)
  21168. }
  21169. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  21170. _this.ttaskDetailLoading5.push(_tindex)
  21171. }
  21172. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  21173. let _uuid = uuidv4();
  21174. // let params = JSON.stringify({
  21175. // // "model": "Chat",
  21176. // model: 'gpt-3.5-turbo',
  21177. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21178. // max_tokens: 4096,
  21179. // top_p: 1,
  21180. // frequency_penalty: 0,
  21181. // presence_penalty: 0,
  21182. // messages: [{
  21183. // content: messages,
  21184. // role: 'user'
  21185. // }],
  21186. // uid: _uuid,
  21187. // mind_map_question: "",
  21188. // })
  21189. let params = {
  21190. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21191. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21192. session_name: _uuid,
  21193. userId: _this.userid,
  21194. uid: _uuid,
  21195. file_ids: fileid.length ? [...fileid] : '',
  21196. model: 'gpt-4o-2024-08-06',
  21197. temperature: this.mode == 3 ? 0.5 : 0.1,
  21198. }
  21199. // let params = JSON.stringify({
  21200. // message: {
  21201. // anthropic_version: "bedrock-2023-05-31",
  21202. // max_tokens: 4096,
  21203. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21204. // top_p: 1,
  21205. // messages: [{
  21206. // "role": "user",
  21207. // "content": messages
  21208. // }] ,
  21209. // },
  21210. // uid: _uuid,
  21211. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21212. // });
  21213. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21214. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  21215. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21216. console.log(response);
  21217. // let data = response.data.FunctionResponse
  21218. // if (data.choices && data.choices.length && data.choices[0].message) {
  21219. // console.log(data.choices[0].message.content);
  21220. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21221. // _this.$forceUpdate()
  21222. // }
  21223. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21224. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21225. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  21226. } else {
  21227. _this.$message.warning(response.data.FunctionResponse.result);
  21228. }
  21229. _this.isTeacherTaskCancelToken2[index] = null
  21230. }).catch(function (error) {
  21231. if(error && error.message != 'Request canceled by the user.'){
  21232. _this.isTeacherTaskCancelToken2[index] = null
  21233. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  21234. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21235. }
  21236. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  21237. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21238. }
  21239. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21240. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21241. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21242. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21243. confirmButtonText: "确定",
  21244. cancelButtonText: "取消",
  21245. distinguishCancelAndClose: true,
  21246. type: "warning",
  21247. customClass: 'custom-confirm-box'
  21248. })
  21249. .then(() => {
  21250. _this.aiDetail52(msg, index, callback)
  21251. }).catch((v) => {
  21252. console.log(v);
  21253. callback ? callback() : ''
  21254. })
  21255. setTimeout(() => {
  21256. _this.setTipsIndex()
  21257. }, 500)
  21258. }
  21259. console.log(error);
  21260. });
  21261. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  21262. },
  21263. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  21264. try {
  21265. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21266. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21267. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21268. } catch(error) {
  21269. console.log('EventSource error:', error);
  21270. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21271. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21272. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21273. }
  21274. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21275. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21276. }
  21277. this.isTeacherTaskCancelToken2[_tindex2] = null
  21278. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21279. confirmButtonText: "确定",
  21280. cancelButtonText: "取消",
  21281. distinguishCancelAndClose: true,
  21282. type: "warning",
  21283. customClass: 'custom-confirm-box'
  21284. })
  21285. .then(() => {
  21286. _this.aiDetail52(msg, _tindex2, callback)
  21287. }).catch((v) => {
  21288. console.log(v);
  21289. callback ? callback() : ''
  21290. })
  21291. setTimeout(() => {
  21292. _this.setTipsIndex()
  21293. }, 500)
  21294. return;
  21295. }
  21296. let _allText = "";
  21297. let _mdText = "";
  21298. this.allTextArray[_tindex2] = ""
  21299. let _iindex = 0
  21300. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  21301. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  21302. let _eData = JSON.parse(_e.data).content;
  21303. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21304. //对话已经完成
  21305. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21306. this.isTeacherTaskCancelSource[_tindex2].close();
  21307. this.isTeacherTaskCancelSource[_tindex2] = null;
  21308. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21309. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21310. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21311. }
  21312. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21313. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21314. }
  21315. this.isTeacherTaskCancelToken2[_tindex2] = null
  21316. callback ? callback() : ''
  21317. return;
  21318. } else {
  21319. _iindex++
  21320. //对话还在继续
  21321. let _text = "";
  21322. _text = _eData.replaceAll("'", "");
  21323. if (_allText == "") {
  21324. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21325. } else {
  21326. _allText += _text;
  21327. }
  21328. _mdText = _allText + "_";
  21329. _mdText = _mdText.replace(/\\n/g, "\n");
  21330. _mdText = _mdText.replace(/\\/g, "");
  21331. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21332. //转化返回的回复流数据
  21333. if(_iindex == 10){
  21334. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21335. _iindex = 0
  21336. }
  21337. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  21338. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21339. }
  21340. // 处理流数据
  21341. }
  21342. };
  21343. let _this = this
  21344. _this.isTeacherTaskCancelSource.onerror = function(event) {
  21345. // 处理错误,可以尝试重新连接
  21346. console.log('EventSource error:', event);
  21347. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21348. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  21349. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  21350. }
  21351. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  21352. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  21353. }
  21354. _this.isTeacherTaskCancelSource[_tindex2].close();
  21355. _this.isTeacherTaskCancelSource[_tindex2] = null;
  21356. _this.isTeacherTaskCancelToken2[_tindex2] = null
  21357. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21358. confirmButtonText: "确定",
  21359. cancelButtonText: "取消",
  21360. distinguishCancelAndClose: true,
  21361. type: "warning",
  21362. customClass: 'custom-confirm-box'
  21363. })
  21364. .then(() => {
  21365. _this.aiDetail52(msg, _tindex2, callback)
  21366. }).catch((v) => {
  21367. console.log(v);
  21368. callback ? callback() : ''
  21369. })
  21370. setTimeout(() => {
  21371. _this.setTipsIndex()
  21372. }, 500)
  21373. };
  21374. },
  21375. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  21376. let _mdText = "";
  21377. let _eData = JSON.parse(_e.data).content;
  21378. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21379. //对话已经完成
  21380. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21381. _source.close();
  21382. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21383. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21384. return;
  21385. } else {
  21386. //对话还在继续
  21387. let _text = "";
  21388. _text = _eData.replaceAll("'", "");
  21389. if (this.allTextArray[_tindex2] == "") {
  21390. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21391. } else {
  21392. this.allTextArray[_tindex2] += _text;
  21393. }
  21394. _mdText = this.allTextArray[_tindex2] + "_";
  21395. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  21396. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  21397. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  21398. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  21399. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21400. // 处理流数据
  21401. }
  21402. },
  21403. async aiCpote(msg, callback) {
  21404. let _this = this
  21405. let _index = _this.aitype.replace("aiC","c")
  21406. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21407. fileid = [...fileid, ..._this.knowFileids]
  21408. if (_this.infoData.length) {
  21409. for (var i = 0; i < _this.infoData.length; i++) {
  21410. if(_this.infoData[i].fileid){
  21411. fileid.push(_this.infoData[i].fileid)
  21412. }else {
  21413. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21414. if(_fileid){
  21415. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21416. _this.$forceUpdate();
  21417. if(_fileid != 1){
  21418. fileid.push(_fileid)
  21419. }
  21420. }
  21421. }
  21422. }
  21423. }
  21424. let sub = []
  21425. if (this.courseTypeId.length) {
  21426. for (var i = 0; i < this.courseTypeId.length; i++) {
  21427. let _sid = this.courseTypeId[i]
  21428. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21429. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21430. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21431. }
  21432. }
  21433. }
  21434. }
  21435. let mclass = []
  21436. if (this.courseTypeId.length) {
  21437. for (var i = 0; i < this.courseTypeId.length; i++) {
  21438. let _sid = this.courseTypeId[i]
  21439. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21440. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21441. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21442. }
  21443. }
  21444. }
  21445. }
  21446. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  21447. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  21448. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  21449. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  21450. let messages = `NOTICE
  21451. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  21452. Language: ${this.getLang()}
  21453. ATTENTION: follow "Language"
  21454. ${msg}
  21455. ## 课程简介
  21456. 课程名字:${this.courseName}
  21457. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21458. ${sub.length ? '学科:' + sub.join(",") : ''}
  21459. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21460. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21461. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  21462. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  21463. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  21464. _this.cpoteLoading[_index] = true
  21465. _this.cpotetLoading[_index] = true
  21466. let _uuid = uuidv4();
  21467. // let params = JSON.stringify({
  21468. // // "model": "Chat",
  21469. // model: 'gpt-3.5-turbo',
  21470. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21471. // max_tokens: 4096,
  21472. // top_p: 1,
  21473. // frequency_penalty: 0,
  21474. // presence_penalty: 0,
  21475. // messages: [{
  21476. // content: messages,
  21477. // role: 'user'
  21478. // }],
  21479. // uid: _uuid,
  21480. // mind_map_question: "",
  21481. // })
  21482. let params = {
  21483. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21484. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21485. session_name: _uuid,
  21486. userId: _this.userid,
  21487. uid: _uuid,
  21488. file_ids: fileid.length ? [...fileid] : '',
  21489. model: 'gpt-4o-2024-08-06',
  21490. temperature: this.mode == 3 ? 0.5 : 0.1,
  21491. }
  21492. // let params = JSON.stringify({
  21493. // message: {
  21494. // anthropic_version: "bedrock-2023-05-31",
  21495. // max_tokens: 4096,
  21496. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21497. // top_p: 1,
  21498. // messages: [{
  21499. // "role": "user",
  21500. // "content": messages
  21501. // }] ,
  21502. // },
  21503. // uid: _uuid,
  21504. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21505. // });
  21506. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21507. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21508. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21509. console.log(response);
  21510. // let data = response.data.FunctionResponse
  21511. // if (data.choices && data.choices.length && data.choices[0].message) {
  21512. // console.log(data.choices[0].message.content);
  21513. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21514. // _this.$forceUpdate()
  21515. // }
  21516. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21517. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21518. } else {
  21519. _this.$message.warning(response.data.FunctionResponse.result);
  21520. }
  21521. }).catch(function (error) {
  21522. _this.cpoteLoading[_index] = false
  21523. _this.cpotetLoading[_index] = false
  21524. callback ? callback() : ''
  21525. if(error && error.message != 'Request canceled by the user.'){
  21526. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21527. }
  21528. console.log(error);
  21529. });
  21530. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  21531. },
  21532. aiCpotegetAiContent(_uid, loading, callback) {
  21533. let _source;
  21534. try {
  21535. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21536. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21537. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21538. } catch(error){
  21539. console.log('EventSource error:', error);
  21540. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21541. this.cpoteLoading[loading] = false
  21542. this.cpotetLoading[loading] = false
  21543. return;
  21544. }
  21545. let _allText = "";
  21546. let _mdText = "";
  21547. let _iindex = 0
  21548. _source.onmessage = _e => {
  21549. let _eData = JSON.parse(_e.data).content;
  21550. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21551. //对话已经完成
  21552. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21553. _source.close();
  21554. this.cpote[loading] = _mdText;
  21555. this.cpoteLoading[loading] = false
  21556. this.cpotetLoading[loading] = false
  21557. callback ? callback() : ''
  21558. return;
  21559. } else {
  21560. _iindex++
  21561. //对话还在继续
  21562. let _text = "";
  21563. _text = _eData.replaceAll("'", "");
  21564. if (_allText == "") {
  21565. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21566. } else {
  21567. _allText += _text;
  21568. }
  21569. _mdText = _allText + "_";
  21570. _mdText = _mdText.replace(/\\n/g, "\n");
  21571. _mdText = _mdText.replace(/\\/g, "");
  21572. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21573. //转化返回的回复流数据
  21574. if(_iindex == 10){
  21575. this.cpote[loading] = _mdText;
  21576. _iindex = 0
  21577. }
  21578. this.cpoteLoading[loading] = false
  21579. // 处理流数据
  21580. }
  21581. // this.$forceUpdate();
  21582. };
  21583. let _this = this
  21584. _source.onerror = function(event) {
  21585. // 处理错误,可以尝试重新连接
  21586. console.log('EventSource error:', event);
  21587. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21588. _this.cpoteLoading[loading] = false
  21589. _this.cpotetLoading[loading] = false
  21590. _source.close();
  21591. };
  21592. },
  21593. async aiteacherTextDetail(msg) {
  21594. let _this = this
  21595. let fileid = []
  21596. if (_this.teacherInfoData.length) {
  21597. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  21598. if(_this.teacherInfoData[i].fileid){
  21599. fileid.push(_this.teacherInfoData[i].fileid)
  21600. }else {
  21601. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  21602. if(_fileid){
  21603. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21604. _this.$forceUpdate();
  21605. if(_fileid != 1){
  21606. fileid.push(_fileid)
  21607. }
  21608. }
  21609. }
  21610. }
  21611. }
  21612. _this.teacherTextLoading = true
  21613. _this.tteacherTextLoading = true
  21614. let sub = []
  21615. if (_this.courseTypeId.length) {
  21616. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21617. let _sid = _this.courseTypeId[i]
  21618. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21619. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21620. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21621. }
  21622. }
  21623. }
  21624. }
  21625. let mclass = []
  21626. if (_this.courseTypeId.length) {
  21627. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21628. let _sid = _this.courseTypeId[i]
  21629. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21630. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21631. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21632. }
  21633. }
  21634. }
  21635. }
  21636. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  21637. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  21638. let messages = `NOTICE
  21639. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21640. Language: ${this.getLang()}
  21641. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21642. Instruction: Based on the context, follow "Format example", write content.
  21643. #Context
  21644. ## 参考资料
  21645. 课程名字:${this.courseName}
  21646. ${sub.length ? '学科:' + sub.join(",") : ''}
  21647. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21648. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  21649. ## 要求
  21650. ${msg}
  21651. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  21652. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  21653. let _uuid = uuidv4();
  21654. // let params = JSON.stringify({
  21655. // // "model": "Chat",
  21656. // model: 'gpt-3.5-turbo',
  21657. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21658. // max_tokens: 4096,
  21659. // top_p: 1,
  21660. // frequency_penalty: 0,
  21661. // presence_penalty: 0,
  21662. // messages: [{
  21663. // content: messages,
  21664. // role: 'user'
  21665. // }],
  21666. // uid: _uuid,
  21667. // mind_map_question: "",
  21668. // })
  21669. let params = {
  21670. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21671. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21672. session_name: _uuid,
  21673. userId: _this.userid,
  21674. uid: _uuid,
  21675. file_ids: fileid.length ? [...fileid] : '',
  21676. model: 'gpt-4o-2024-08-06',
  21677. temperature: this.mode == 3 ? 0.5 : 0.1,
  21678. }
  21679. // let params = JSON.stringify({
  21680. // message: {
  21681. // anthropic_version: "bedrock-2023-05-31",
  21682. // max_tokens: 4096,
  21683. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21684. // top_p: 1,
  21685. // messages: [{
  21686. // "role": "user",
  21687. // "content": messages
  21688. // }] ,
  21689. // },
  21690. // uid: _uuid,
  21691. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21692. // });
  21693. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21694. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  21695. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21696. console.log(response);
  21697. // let data = response.data.FunctionResponse
  21698. // if (data.choices && data.choices.length && data.choices[0].message) {
  21699. // _this.courseText = data.choices[0].message.content
  21700. // }
  21701. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21702. } else {
  21703. _this.$message.warning(response.data.FunctionResponse.result);
  21704. }
  21705. _this.isTeacherTextCancelToken = null
  21706. }).catch(function (error) {
  21707. _this.teacherTextLoading = false
  21708. _this.tteacherTextLoading = false
  21709. _this.isTeacherTextCancelToken = null
  21710. if(error && error.message != 'Request canceled by the user.'){
  21711. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21712. }
  21713. console.log(error);
  21714. });
  21715. await _this.aiteacherTextDetailgetAiContent(_uuid)
  21716. },
  21717. aiteacherTextDetailgetAiContent(_uid) {
  21718. try {
  21719. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21720. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21721. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21722. } catch(error) {
  21723. console.log('EventSource error:', event);
  21724. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21725. this.teacherTextLoading = false
  21726. this.tteacherTextLoading = false
  21727. this.isTeacherTextCancelToken = null
  21728. return;
  21729. }
  21730. let _allText = "";
  21731. let _mdText = "";
  21732. let _iindex = 0
  21733. this.isTeacherTextCancelSource.onmessage = _e => {
  21734. let _eData = JSON.parse(_e.data).content;
  21735. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21736. //对话已经完成
  21737. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21738. this.isTeacherTextCancelSource.close();
  21739. this.isTeacherTextCancelSource = null;
  21740. this.teacherCourseText = _mdText;
  21741. this.teacherTextLoading = false
  21742. this.tteacherTextLoading = false
  21743. this.teacherCourseTextB = false
  21744. this.isTeacherTextCancelToken = null
  21745. return;
  21746. } else {
  21747. _iindex++
  21748. //对话还在继续
  21749. let _text = "";
  21750. _text = _eData.replaceAll("'", "");
  21751. if (_allText == "") {
  21752. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21753. } else {
  21754. _allText += _text;
  21755. }
  21756. _mdText = _allText + "_";
  21757. _mdText = _mdText.replace(/\\n/g, "\n");
  21758. _mdText = _mdText.replace(/\\/g, "");
  21759. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21760. //转化返回的回复流数据
  21761. if(_iindex == 10){
  21762. this.teacherCourseText = _mdText;
  21763. _iindex = 0
  21764. }
  21765. if(this.teacherTextLoading){
  21766. this.teacherTextLoading = false
  21767. }
  21768. // 处理流数据
  21769. }
  21770. // this.$forceUpdate();
  21771. };
  21772. let _this = this
  21773. this.isTeacherTextCancelSource.onerror = function(event) {
  21774. // 处理错误,可以尝试重新连接
  21775. console.log('EventSource error:', event);
  21776. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21777. _this.teacherTextLoading = false
  21778. _this.tteacherTextLoading = false
  21779. _this.isTeacherTextCancelToken = null
  21780. _this.isTeacherTextCancelSource.close();
  21781. _this.isTeacherTextCancelSource = null;
  21782. };
  21783. },
  21784. async aitargetTextDetail(msg) {
  21785. let _this = this
  21786. let fileid = []
  21787. if (_this.teacherInfoData.length) {
  21788. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  21789. if(_this.teacherInfoData[i].fileid){
  21790. fileid.push(_this.teacherInfoData[i].fileid)
  21791. }else {
  21792. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  21793. if(_fileid){
  21794. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21795. _this.$forceUpdate();
  21796. if(_fileid != 1){
  21797. fileid.push(_fileid)
  21798. }
  21799. }
  21800. }
  21801. }
  21802. }
  21803. _this.targetTextLoading = true
  21804. _this.ttargetTextLoading = true
  21805. let sub = []
  21806. if (_this.courseTypeId.length) {
  21807. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21808. let _sid = _this.courseTypeId[i]
  21809. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21810. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21811. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21812. }
  21813. }
  21814. }
  21815. }
  21816. let mclass = []
  21817. if (_this.courseTypeId.length) {
  21818. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21819. let _sid = _this.courseTypeId[i]
  21820. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21821. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21822. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21823. }
  21824. }
  21825. }
  21826. }
  21827. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  21828. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  21829. let messages = `NOTICE
  21830. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21831. Language: ${this.getLang()}
  21832. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21833. Instruction: Based on the context, follow "Format example", write content.
  21834. #Context
  21835. ## 参考资料
  21836. 课程名字:${this.courseName}
  21837. ${sub.length ? '学科:' + sub.join(",") : ''}
  21838. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21839. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  21840. ## 要求
  21841. ${msg}
  21842. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  21843. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  21844. let _uuid = uuidv4();
  21845. // let params = JSON.stringify({
  21846. // // "model": "Chat",
  21847. // model: 'gpt-3.5-turbo',
  21848. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21849. // max_tokens: 4096,
  21850. // top_p: 1,
  21851. // frequency_penalty: 0,
  21852. // presence_penalty: 0,
  21853. // messages: [{
  21854. // content: messages,
  21855. // role: 'user'
  21856. // }],
  21857. // uid: _uuid,
  21858. // mind_map_question: "",
  21859. // })
  21860. let params = {
  21861. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21862. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21863. session_name: _uuid,
  21864. userId: _this.userid,
  21865. uid: _uuid,
  21866. file_ids: fileid.length ? [...fileid] : '',
  21867. model: 'gpt-4o-2024-08-06',
  21868. temperature: this.mode == 3 ? 0.5 : 0.1,
  21869. }
  21870. // let params = JSON.stringify({
  21871. // message: {
  21872. // anthropic_version: "bedrock-2023-05-31",
  21873. // max_tokens: 4096,
  21874. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21875. // top_p: 1,
  21876. // messages: [{
  21877. // "role": "user",
  21878. // "content": messages
  21879. // }] ,
  21880. // },
  21881. // uid: _uuid,
  21882. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21883. // });
  21884. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21885. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  21886. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21887. console.log(response);
  21888. // let data = response.data.FunctionResponse
  21889. // if (data.choices && data.choices.length && data.choices[0].message) {
  21890. // _this.courseText = data.choices[0].message.content
  21891. // }
  21892. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21893. } else {
  21894. _this.$message.warning(response.data.FunctionResponse.result);
  21895. }
  21896. _this.isTargetCancelToken1 = null
  21897. }).catch(function (error) {
  21898. _this.targetTextLoading = false
  21899. _this.ttargetTextLoading = false
  21900. _this.isTargetCancelToken1 = null
  21901. if(error && error.message != 'Request canceled by the user.'){
  21902. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21903. }
  21904. console.log(error);
  21905. });
  21906. await _this.aitargetTextDetailgetAiContent(_uuid)
  21907. },
  21908. aitargetTextDetailgetAiContent(_uid) {
  21909. try {
  21910. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21911. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21912. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21913. } catch (error) {
  21914. console.log('EventSource error:', error);
  21915. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21916. this.targetTextLoading = false
  21917. this.ttargetTextLoading = false
  21918. this.isTargetCancelToken1 = null
  21919. return;
  21920. }
  21921. let _allText = "";
  21922. let _mdText = "";
  21923. let _iindex = 0
  21924. this.isTargetCancelSource1.onmessage = _e => {
  21925. let _eData = JSON.parse(_e.data).content;
  21926. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21927. //对话已经完成
  21928. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21929. this.isTargetCancelSource1.close();
  21930. this.isTargetCancelSource1 = null;
  21931. this.targetCourseText = _mdText;
  21932. this.targetTextLoading = false
  21933. this.ttargetTextLoading = false
  21934. this.targetCourseTextB = false
  21935. this.isTargetCancelToken1 = null
  21936. return;
  21937. } else {
  21938. _iindex++
  21939. //对话还在继续
  21940. let _text = "";
  21941. _text = _eData.replaceAll("'", "");
  21942. if (_allText == "") {
  21943. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21944. } else {
  21945. _allText += _text;
  21946. }
  21947. _mdText = _allText + "_";
  21948. _mdText = _mdText.replace(/\\n/g, "\n");
  21949. _mdText = _mdText.replace(/\\/g, "");
  21950. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21951. //转化返回的回复流数据
  21952. if(_iindex == 10){
  21953. this.targetCourseText = _mdText;
  21954. _iindex = 0
  21955. }
  21956. if(this.targetTextLoading){
  21957. this.targetTextLoading = false
  21958. }
  21959. // 处理流数据
  21960. }
  21961. // this.$forceUpdate();
  21962. };
  21963. let _this = this
  21964. this.isTargetCancelSource1.onerror = function(event) {
  21965. // 处理错误,可以尝试重新连接
  21966. console.log('EventSource error:', event);
  21967. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21968. _this.targetTextLoading = false
  21969. _this.ttargetTextLoading = false
  21970. _this.isTargetCancelToken1 = null
  21971. _this.isTargetCancelSource1.close();
  21972. _this.isTargetCancelSource1 = null;
  21973. };
  21974. },
  21975. async aitargetTextDetail2(msg) {
  21976. let _this = this
  21977. let fileid = []
  21978. if(_this.mubiaoInfoData.length){
  21979. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  21980. if(_this.mubiaoInfoData[i].fileid){
  21981. fileid.push(_this.mubiaoInfoData[i].fileid)
  21982. }else {
  21983. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  21984. if(_fileid){
  21985. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21986. _this.$forceUpdate();
  21987. if(_fileid != 1){
  21988. fileid.push(_fileid)
  21989. }
  21990. }
  21991. }
  21992. }
  21993. }
  21994. _this.targetTextLoading2 = true
  21995. _this.ttargetTextLoading2 = true
  21996. let sub = []
  21997. if (_this.courseTypeId.length) {
  21998. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21999. let _sid = _this.courseTypeId[i]
  22000. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22001. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22002. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22003. }
  22004. }
  22005. }
  22006. }
  22007. let mclass = []
  22008. if (_this.courseTypeId.length) {
  22009. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22010. let _sid = _this.courseTypeId[i]
  22011. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22012. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22013. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22014. }
  22015. }
  22016. }
  22017. }
  22018. if(sub.length){
  22019. let _fileid = _this.importFileid(sub)
  22020. fileid = [...fileid, ..._fileid]
  22021. }
  22022. let messages = `NOTICE
  22023. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22024. Language: ${this.getLang()}
  22025. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22026. Instruction: Based on the context, follow "Format example", write content.
  22027. #Context
  22028. ## 参考资料
  22029. 课程标题:${this.courseName}
  22030. ${sub.length ? '学科:' + sub.join(",") : ''}
  22031. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22032. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  22033. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22034. ## 要求
  22035. ${msg}
  22036. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22037. let _uuid = uuidv4();
  22038. // let params = JSON.stringify({
  22039. // // "model": "Chat",
  22040. // model: 'gpt-3.5-turbo',
  22041. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22042. // max_tokens: 4096,
  22043. // top_p: 1,
  22044. // frequency_penalty: 0,
  22045. // presence_penalty: 0,
  22046. // messages: [{
  22047. // content: messages,
  22048. // role: 'user'
  22049. // }],
  22050. // uid: _uuid,
  22051. // mind_map_question: "",
  22052. // })
  22053. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22054. let params = {
  22055. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22056. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22057. session_name: _uuid,
  22058. userId: _this.userid,
  22059. uid: _uuid,
  22060. file_ids: fileid.length ? [...fileid] : '',
  22061. model: 'gpt-4o-2024-08-06',
  22062. temperature: this.mode == 3 ? 0.5 : 0.1,
  22063. }
  22064. // let params = JSON.stringify({
  22065. // message: {
  22066. // anthropic_version: "bedrock-2023-05-31",
  22067. // max_tokens: 4096,
  22068. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22069. // top_p: 1,
  22070. // messages: [{
  22071. // "role": "user",
  22072. // "content": messages
  22073. // }] ,
  22074. // },
  22075. // uid: _uuid,
  22076. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22077. // });
  22078. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22079. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  22080. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22081. console.log(response);
  22082. // let data = response.data.FunctionResponse
  22083. // if (data.choices && data.choices.length && data.choices[0].message) {
  22084. // _this.courseText = data.choices[0].message.content
  22085. // }
  22086. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22087. } else {
  22088. _this.$message.warning(response.data.FunctionResponse.result);
  22089. }
  22090. _this.isTargetCancelToken2 = null
  22091. }).catch(function (error) {
  22092. _this.targetTextLoading2 = false
  22093. _this.ttargetTextLoading2 = false
  22094. _this.isTargetCancelToken2 = null
  22095. if(error && error.message != 'Request canceled by the user.'){
  22096. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22097. }
  22098. console.log(error);
  22099. });
  22100. await _this.aitargetTextDetail2getAiContent(_uuid)
  22101. },
  22102. importFileid(sub){
  22103. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  22104. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  22105. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  22106. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  22107. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  22108. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  22109. let _sub = converter(sub.join(","))
  22110. let fileid = []
  22111. for(var i = 0; i < this.fileidArray.length; i++){
  22112. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  22113. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  22114. fileid.push(this.fileidArray[i].fileid)
  22115. }
  22116. }
  22117. }
  22118. return fileid
  22119. },
  22120. selectFileid(){
  22121. let params = {
  22122. oid: this.oid,
  22123. };
  22124. this.ajax
  22125. .get(this.$store.state.api + "selectFileid", params)
  22126. .then((res) => {
  22127. this.fileidArray = res.data[0]
  22128. if(res.data[1].length){
  22129. this.fileidArray = res.data[1]
  22130. }
  22131. if(res.data[2].length){
  22132. this.fileidArray = res.data[2]
  22133. }
  22134. })
  22135. .catch((err) => {
  22136. console.error(err);
  22137. });
  22138. },
  22139. selectAiFileid(){
  22140. let params = {
  22141. oid: this.oid,
  22142. };
  22143. this.ajax
  22144. .get(this.$store.state.api + "selectAiFileid", params)
  22145. .then((res) => {
  22146. let fileIds = []
  22147. for(var i = 0; i < res.data[0].length; i++){
  22148. fileIds.push(res.data[0][i].fileid)
  22149. }
  22150. this.fileIds = fileIds
  22151. if(res.data[1].length){
  22152. fileIds = []
  22153. for(var i = 0; i < res.data[1].length; i++){
  22154. fileIds.push(res.data[0][i].fileid)
  22155. }
  22156. this.fileIds = fileIds
  22157. }
  22158. if(res.data[2].length){
  22159. fileIds = []
  22160. for(var i = 0; i < res.data[2].length; i++){
  22161. fileIds.push(res.data[0][i].fileid)
  22162. }
  22163. this.fileIds = fileIds
  22164. }
  22165. })
  22166. .catch((err) => {
  22167. console.error(err);
  22168. });
  22169. },
  22170. selectKnowFileid(){
  22171. let params = {
  22172. oid: this.oid,
  22173. sta: 'cn'
  22174. };
  22175. this.ajax
  22176. .get(this.$store.state.api + "selectKnowFileid", params)
  22177. .then((res) => {
  22178. this.knowFileArray = res.data[0]
  22179. if(res.data[1].length){
  22180. this.knowFileArray = res.data[1]
  22181. }
  22182. if(res.data[2].length){
  22183. this.knowFileArray = res.data[2]
  22184. }
  22185. })
  22186. .catch((err) => {
  22187. console.error(err);
  22188. });
  22189. },
  22190. async aitargetTextDetail22(msg,msg2) {
  22191. let _this = this
  22192. let fileid = []
  22193. _this.targetTextLoading2 = true
  22194. _this.ttargetTextLoading2 = true
  22195. let sub = []
  22196. if (_this.courseTypeId.length) {
  22197. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22198. let _sid = _this.courseTypeId[i]
  22199. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22200. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22201. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22202. }
  22203. }
  22204. }
  22205. }
  22206. let mclass = []
  22207. if (_this.courseTypeId.length) {
  22208. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22209. let _sid = _this.courseTypeId[i]
  22210. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22211. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22212. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22213. }
  22214. }
  22215. }
  22216. }
  22217. if(!msg2 && sub.length){
  22218. // let _fileid = _this.importFileid(sub)
  22219. // fileid = [...fileid, ..._fileid]
  22220. }
  22221. let messages = `NOTICE
  22222. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22223. Language: ${this.getLang()}
  22224. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22225. Instruction: Based on the context, follow "Format example", write content.
  22226. #Context
  22227. ## 参考资料
  22228. 课程标题:${this.courseName}
  22229. ${sub.length ? '学科:' + sub.join(",") : ''}
  22230. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22231. 课程目标:${msg2}
  22232. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  22233. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22234. ## 要求
  22235. ${msg}
  22236. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22237. let _uuid = uuidv4();
  22238. // let params = JSON.stringify({
  22239. // // "model": "Chat",
  22240. // model: 'gpt-3.5-turbo',
  22241. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22242. // max_tokens: 4096,
  22243. // top_p: 1,
  22244. // frequency_penalty: 0,
  22245. // presence_penalty: 0,
  22246. // messages: [{
  22247. // content: messages,
  22248. // role: 'user'
  22249. // }],
  22250. // uid: _uuid,
  22251. // mind_map_question: "",
  22252. // })
  22253. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22254. let params = {
  22255. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  22256. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22257. session_name: _uuid,
  22258. userId: _this.userid,
  22259. uid: _uuid,
  22260. file_ids: fileid.length ? [...fileid] : '',
  22261. model: 'gpt-4o-2024-08-06',
  22262. temperature: this.mode == 3 ? 0.5 : 0.1,
  22263. }
  22264. // let params = JSON.stringify({
  22265. // message: {
  22266. // anthropic_version: "bedrock-2023-05-31",
  22267. // max_tokens: 4096,
  22268. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22269. // top_p: 1,
  22270. // messages: [{
  22271. // "role": "user",
  22272. // "content": messages
  22273. // }] ,
  22274. // },
  22275. // uid: _uuid,
  22276. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22277. // });
  22278. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22279. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  22280. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22281. console.log(response);
  22282. // let data = response.data.FunctionResponse
  22283. // if (data.choices && data.choices.length && data.choices[0].message) {
  22284. // _this.courseText = data.choices[0].message.content
  22285. // }
  22286. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22287. } else {
  22288. _this.$message.warning(response.data.FunctionResponse.result);
  22289. }
  22290. _this.isTargetCancelToken2 = null
  22291. }).catch(function (error) {
  22292. _this.targetTextLoading2 = false
  22293. _this.ttargetTextLoading2 = false
  22294. _this.isTargetCancelToken2 = null
  22295. if(error && error.message != 'Request canceled by the user.'){
  22296. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22297. }
  22298. console.log(error);
  22299. });
  22300. await _this.aitargetTextDetail2getAiContent(_uuid)
  22301. },
  22302. aitargetTextDetail2getAiContent(_uid) {
  22303. try {
  22304. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22305. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22306. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22307. } catch(error) {
  22308. console.log('EventSource error:', error);
  22309. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22310. this.targetTextLoading2 = false
  22311. this.ttargetTextLoading2 = false
  22312. this.isTargetCancelToken2 = null
  22313. return;
  22314. }
  22315. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  22316. let _allText = "";
  22317. let _mdText = "";
  22318. let _iindex = 0
  22319. this.isTargetCancelSource2.onmessage = _e => {
  22320. let _eData = JSON.parse(_e.data).content;
  22321. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22322. //对话已经完成
  22323. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22324. this.isTargetCancelSource2.close();
  22325. this.isTargetCancelSource2 = null;
  22326. this.targetCourseText2 = text1+' \n '+_mdText;
  22327. this.targetTextLoading2 = false
  22328. this.ttargetTextLoading2 = false
  22329. this.targetCourseText2B = false
  22330. this.isTargetCancelToken2 = null
  22331. return;
  22332. } else {
  22333. _iindex++
  22334. //对话还在继续
  22335. let _text = "";
  22336. _text = _eData.replaceAll("'", "");
  22337. if (_allText == "") {
  22338. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22339. } else {
  22340. _allText += _text;
  22341. }
  22342. _mdText = _allText + "_";
  22343. _mdText = _mdText.replace(/\\n/g, "\n");
  22344. _mdText = _mdText.replace(/\\/g, "");
  22345. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22346. //转化返回的回复流数据
  22347. if(_iindex == 10){
  22348. this.targetCourseText2 = text1+' \n '+_mdText;
  22349. _iindex = 0
  22350. }
  22351. if(this.targetTextLoading2){
  22352. this.targetTextLoading2 = false
  22353. }
  22354. // 处理流数据
  22355. }
  22356. // this.$forceUpdate();
  22357. };
  22358. let _this = this
  22359. this.isTargetCancelSource2.onerror = function(event) {
  22360. // 处理错误,可以尝试重新连接
  22361. console.log('EventSource error:', event);
  22362. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22363. _this.targetTextLoading2 = false
  22364. _this.ttargetTextLoading2 = false
  22365. _this.isTargetCancelToken2 = null
  22366. _this.isTargetCancelSource2.close();
  22367. _this.isTargetCancelSource2 = null;
  22368. };
  22369. },
  22370. async aitargetTextDetail3(msg) {
  22371. let _this = this
  22372. let fileid = []
  22373. if(_this.mubiaoInfoData.length){
  22374. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  22375. if(_this.mubiaoInfoData[i].fileid){
  22376. fileid.push(_this.mubiaoInfoData[i].fileid)
  22377. }else {
  22378. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  22379. if(_fileid){
  22380. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22381. _this.$forceUpdate();
  22382. if(_fileid != 1){
  22383. fileid.push(_fileid)
  22384. }
  22385. }
  22386. }
  22387. }
  22388. }
  22389. _this.targetTextLoading2 = true
  22390. _this.ttargetTextLoading2 = true
  22391. let sub = []
  22392. if (_this.courseTypeId.length) {
  22393. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22394. let _sid = _this.courseTypeId[i]
  22395. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22396. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22397. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22398. }
  22399. }
  22400. }
  22401. }
  22402. let mclass = []
  22403. if (_this.courseTypeId.length) {
  22404. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22405. let _sid = _this.courseTypeId[i]
  22406. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22407. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22408. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22409. }
  22410. }
  22411. }
  22412. }
  22413. // if(sub.length){
  22414. // let _fileid = _this.importFileid(sub)
  22415. // fileid = [...fileid, ..._fileid]
  22416. // }
  22417. fileid = [...fileid, ..._this.knowFileids]
  22418. if (_this.infoData.length) {
  22419. for (var i = 0; i < _this.infoData.length; i++) {
  22420. if(_this.infoData[i].fileid){
  22421. fileid.push(_this.infoData[i].fileid)
  22422. }else {
  22423. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22424. if(_fileid){
  22425. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22426. _this.$forceUpdate();
  22427. if(_fileid != 1){
  22428. fileid.push(_fileid)
  22429. }
  22430. }
  22431. }
  22432. }
  22433. }
  22434. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22435. let messages = `Language: ${this.getLang()}
  22436. ${msg}
  22437. ## 课程信息
  22438. 课程名字:${this.courseName}
  22439. 课程概况:${this.courseText}
  22440. ${sub.length ? '学科:' + sub.join(",") : ''}
  22441. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  22442. let _uuid = uuidv4();
  22443. // let params = JSON.stringify({
  22444. // // "model": "Chat",
  22445. // model: 'gpt-3.5-turbo',
  22446. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22447. // max_tokens: 4096,
  22448. // top_p: 1,
  22449. // frequency_penalty: 0,
  22450. // presence_penalty: 0,
  22451. // messages: [{
  22452. // content: messages,
  22453. // role: 'user'
  22454. // }],
  22455. // uid: _uuid,
  22456. // mind_map_question: "",
  22457. // })
  22458. let params = {
  22459. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22460. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22461. session_name: _uuid,
  22462. userId: _this.userid,
  22463. uid: _uuid,
  22464. file_ids: fileid.length ? [...fileid] : '',
  22465. model: 'gpt-4o-2024-08-06',
  22466. temperature: this.mode == 3 ? 0.5 : 0.1,
  22467. }
  22468. // let params = JSON.stringify({
  22469. // message: {
  22470. // anthropic_version: "bedrock-2023-05-31",
  22471. // max_tokens: 4096,
  22472. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22473. // top_p: 1,
  22474. // messages: [{
  22475. // "role": "user",
  22476. // "content": messages
  22477. // }] ,
  22478. // },
  22479. // uid: _uuid,
  22480. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22481. // });
  22482. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22483. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  22484. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22485. console.log(response);
  22486. // let data = response.data.FunctionResponse
  22487. // if (data.choices && data.choices.length && data.choices[0].message) {
  22488. // _this.courseText = data.choices[0].message.content
  22489. // }
  22490. console.log(response);
  22491. let data = response.data.FunctionResponse
  22492. // if (data.choices && data.choices.length && data.choices[0].message) {
  22493. // console.log(data.choices[0].message.content);
  22494. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  22495. // _this.$forceUpdate()
  22496. // }
  22497. if (data.message) {
  22498. console.log('返回回来的目标:',data.message);
  22499. _this.targetCourseText2 = data.message
  22500. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  22501. }
  22502. _this.isTargetCancelToken2 = null
  22503. }).catch(function (error) {
  22504. _this.targetTextLoading2 = false
  22505. _this.ttargetTextLoading2 = false
  22506. _this.isTargetCancelToken2 = null
  22507. if(error && error.message != 'Request canceled by the user.'){
  22508. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22509. }
  22510. console.log(error);
  22511. });
  22512. },
  22513. againEva(msg, i, k) {
  22514. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  22515. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  22516. return;
  22517. }
  22518. if (this.ruleLoading[i]) {
  22519. this.ruleLoading[i][k] = true
  22520. } else {
  22521. this.ruleLoading[i] = []
  22522. this.ruleLoading[i][k] = true
  22523. }
  22524. let message = `NOTICE
  22525. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  22526. Language: ${this.getLang()}
  22527. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22528. Instruction: Based on the context, follow "Format example", write content.
  22529. #Context
  22530. ##要求
  22531. ${msg}
  22532. ##制定标准资料
  22533. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  22534. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  22535. # Format example
  22536. ==
  22537. 0 星,作业内容与作业要求无关;
  22538. 1 星,没有识别问题和需求;
  22539. 2 星,问题或需求没有被清晰理解或准确识别;
  22540. 3 星,问题或需求的一部分被识别;
  22541. 4 星,问题或需求的大部分被识别;
  22542. 5 星,问题或需求都被识别。
  22543. ==
  22544. `
  22545. // let params = {
  22546. // // "model": "Chat",
  22547. // model: 'gpt-4o-2024-08-06',
  22548. // // model: "gpt-4o",
  22549. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22550. // max_tokens: 4096,
  22551. // top_p: 1,
  22552. // frequency_penalty: 0,
  22553. // presence_penalty: 0,
  22554. // messages: [
  22555. // {
  22556. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  22557. // role: "user"
  22558. // }
  22559. // ],
  22560. // stream: false,
  22561. // uid: this.userid,
  22562. // mind_map_question: ""
  22563. // };
  22564. // this.ajax
  22565. // .post("https://gpt4.cocorobo.cn/chat", params)
  22566. // .then(response => {
  22567. // let data = response.data.FunctionResponse;
  22568. // console.log("data", data);
  22569. // if (data.choices && data.choices.length && data.choices[0].message) {
  22570. // let content = data.choices[0].message.content;
  22571. // var regex = new RegExp('==([^=]+)==');
  22572. // let match = content.match(regex);
  22573. // if (match) {
  22574. // content = match[1].trim().replaceAll(' ', '');
  22575. // // 获取匹配到的内容并去除两端空格
  22576. // console.log('contentInsideDoubleEquals', content);
  22577. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  22578. // console.log("未有星级。");
  22579. // this.againEva(msg, i, k)
  22580. // return
  22581. // }
  22582. // //  return
  22583. // } else {
  22584. // console.log("未找到匹配的内容。");
  22585. // this.againEva(msg, i, k)
  22586. // return
  22587. // }
  22588. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  22589. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  22590. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  22591. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  22592. // this.$forceUpdate();
  22593. // this.ruleLoading[i][k] = false
  22594. // }else{
  22595. // this.ruleLoading[i][k] = false
  22596. // }
  22597. // })
  22598. // .catch(error => {
  22599. // console.log(error);
  22600. // this.ruleLoading[i][k] = false
  22601. // });
  22602. let parm = {
  22603. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22604. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  22605. session_name: uuidv4(),
  22606. userId: this.userid,
  22607. file_ids: [],
  22608. model: 'gpt-4o-2024-08-06',
  22609. temperature: this.mode == 3 ? 0.5 : 0.1,
  22610. }
  22611. this.ajax
  22612. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  22613. .then(async (response) => {
  22614. console.log(response);
  22615. let data = response.data.FunctionResponse
  22616. if (data.message) {
  22617. console.log(data.message);
  22618. let content = data.message;
  22619. var regex = new RegExp('==([^=]+)==');
  22620. let match = content.match(regex);
  22621. if (match) {
  22622. content = match[1].trim().replaceAll(' ', '');
  22623. // 获取匹配到的内容并去除两端空格
  22624. console.log('contentInsideDoubleEquals', content);
  22625. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  22626. console.log("未有星级。");
  22627. this.againEva(msg, i, k)
  22628. return
  22629. }
  22630. //  return
  22631. } else {
  22632. console.log("未找到匹配的内容。");
  22633. this.againEva(msg, i, k)
  22634. return
  22635. }
  22636. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  22637. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  22638. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  22639. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  22640. this.$forceUpdate();
  22641. this.ruleLoading[i][k] = false
  22642. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  22643. }else {
  22644. this.ruleLoading[i][k] = false
  22645. }
  22646. })
  22647. .catch((error) => {
  22648. this.ruleLoading[i][k] = false
  22649. console.log(error);
  22650. });
  22651. },
  22652. async aiSearchFile(messages, callback) {
  22653. let _this = this
  22654. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22655. fileid = [...fileid, ..._this.knowFileids]
  22656. console.log('fileid=========',fileid)
  22657. // let params = JSON.stringify({
  22658. // // "model": "Chat",
  22659. // model: 'gpt-3.5-turbo',
  22660. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22661. // max_tokens: 4096,
  22662. // top_p: 1,
  22663. // frequency_penalty: 0,
  22664. // presence_penalty: 0,
  22665. // messages: [{
  22666. // content: messages,
  22667. // role: 'user'
  22668. // }],
  22669. // stream: false,
  22670. // uid: this.userid,
  22671. // mind_map_question: "",
  22672. // })
  22673. // // let params = JSON.stringify({
  22674. // // message: {
  22675. // // anthropic_version: "bedrock-2023-05-31",
  22676. // // max_tokens: 4096,
  22677. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  22678. // // top_p: 1,
  22679. // // messages: [{
  22680. // // content: messages,
  22681. // // role: 'user'
  22682. // // }], //
  22683. // // },
  22684. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22685. // // });
  22686. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22687. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  22688. // console.log(response);
  22689. // let data = response.data.FunctionResponse
  22690. // if (data.choices && data.choices.length && data.choices[0].message) {
  22691. // console.log(data.choices[0].message.content);
  22692. // let dArray = JSON.parse(data.choices[0].message.content)
  22693. // _this.dArray = dArray
  22694. // _this.unitJson[0].chapterInfo[0].taskJson = []
  22695. // for (var i = 0; i < dArray.length; i++) {
  22696. // let _task = dArray[i]
  22697. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22698. // task: _task.task,
  22699. // taskDetail: "",
  22700. // taskDetail2: _task.detail,
  22701. // taskDetail3: "",
  22702. // chapterData: [],
  22703. // toolText: "",
  22704. // toolChoose: [
  22705. // {
  22706. // tool: [],
  22707. // toolDetail: "",
  22708. // toolType: 0,
  22709. // askCount: 1,
  22710. // askTitle: "",
  22711. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22712. // },
  22713. // ],
  22714. // isShowTools: false,
  22715. // askCount: 1,
  22716. // isFold: 0,
  22717. // askTitle: "",
  22718. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22719. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22720. // homeworkList: [],
  22721. // })
  22722. // }
  22723. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  22724. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22725. // _this.$forceUpdate();
  22726. // }
  22727. // // if (data.result) {
  22728. // // console.log(data.result);
  22729. // // let dArray = JSON.parse(data.result)
  22730. // // _this.dArray = dArray
  22731. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  22732. // // for (var i = 0; i < dArray.length; i++) {
  22733. // // let _task = dArray[i]
  22734. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22735. // // task: _task.task,
  22736. // // taskDetail: "",
  22737. // // taskDetail2: _task.detail,
  22738. // // taskDetail3: "",
  22739. // // chapterData: [],
  22740. // // toolText: "",
  22741. // // toolChoose: [
  22742. // // {
  22743. // // tool: [],
  22744. // // toolDetail: "",
  22745. // // toolType: 0,
  22746. // // askCount: 1,
  22747. // // askTitle: "",
  22748. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22749. // // },
  22750. // // ],
  22751. // // isShowTools: false,
  22752. // // askCount: 1,
  22753. // // isFold: 1,
  22754. // // askTitle: "",
  22755. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22756. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  22757. // // homeworkList: [],
  22758. // // })
  22759. // // }
  22760. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22761. // // _this.$forceUpdate();
  22762. // // }
  22763. // callback ? callback() : ''
  22764. // }).catch(function (error) {
  22765. // _this.loading = false
  22766. // console.log(error);
  22767. // });
  22768. this.isFileCancelToken = this.ajax.setCancelSource();
  22769. let parm = {
  22770. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22771. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22772. session_name: uuidv4(),
  22773. userId: this.userid,
  22774. file_ids: fileid.length ? [...fileid] : '',
  22775. model: 'gpt-4o-2024-08-06',
  22776. temperature: this.mode == 3 ? 0.5 : 0.1,
  22777. }
  22778. this.ajax
  22779. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  22780. .then((response) => {
  22781. console.log(response);
  22782. let data = response.data.FunctionResponse
  22783. if (data.message) {
  22784. console.log(data.message);
  22785. let dArray = []
  22786. try {
  22787. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  22788. let regex3 = new RegExp('(?<!")content(?!")','g')
  22789. //
  22790. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  22791. } catch (error) {
  22792. // callback ? callback() : ''
  22793. console.log("error_________________" + error);
  22794. try {
  22795. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  22796. let match = data.message.match(regex);
  22797. dArray = JSON.parse(match[0]);
  22798. } catch (error) {
  22799. // callback ? callback() : ''
  22800. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  22801. console.log("error_________________" + error);
  22802. _this.isFileCancelToken = null;
  22803. _this.aiSearchFile(messages, callback)
  22804. return
  22805. }
  22806. }
  22807. for(let i = 0; i < dArray.length; i++){
  22808. let content = dArray[i].content
  22809. let name = '参考资料'+(i+1)
  22810. let md = new MarkdownIt();
  22811. let _html = content ? md.render(content) : ''
  22812. setTimeout(()=>{
  22813. if(i == (dArray.length - 1)){
  22814. _this.generate2(name, _html, i, callback)
  22815. }else {
  22816. _this.generate2(name, _html, i)
  22817. }
  22818. }, 500 * i)
  22819. }
  22820. _this.isFileCancelToken = null
  22821. _this.$forceUpdate();
  22822. }
  22823. })
  22824. .catch((error) => {
  22825. callback ? callback() : ''
  22826. _this.isFileCancelToken = null
  22827. console.log(error);
  22828. });
  22829. },
  22830. async aiSearchFile2(messages, callback) {
  22831. let _this = this
  22832. let fileid = [..._this.knowFileids]
  22833. console.log('fileid=========',fileid)
  22834. this.isFileCancelToken = this.ajax.setCancelSource();
  22835. let parm = {
  22836. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22837. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22838. session_name: uuidv4(),
  22839. userId: this.userid,
  22840. file_ids: fileid.length ? [...fileid] : '',
  22841. model: 'gpt-4o-2024-08-06',
  22842. temperature: this.mode == 3 ? 0.5 : 0.1,
  22843. }
  22844. this.ajax
  22845. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  22846. .then((response) => {
  22847. console.log(response);
  22848. let data = response.data.FunctionResponse
  22849. if (data.message) {
  22850. console.log(data.message);
  22851. let content = data.message
  22852. let name = '参考资料'
  22853. let md = new MarkdownIt();
  22854. let _html = content ? md.render(content) : ''
  22855. _this.generate2(name, _html, 0, callback)
  22856. _this.isFileCancelToken = null
  22857. _this.$forceUpdate();
  22858. }
  22859. })
  22860. .catch((error) => {
  22861. callback ? callback() : ''
  22862. _this.isFileCancelToken = null
  22863. console.log(error);
  22864. });
  22865. },
  22866. createFileid(url) {
  22867. let _this = this
  22868. return new Promise((resolve, reject) => {
  22869. try {
  22870. _this.ajax
  22871. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  22872. url: url,
  22873. })
  22874. .then((res) => {
  22875. let _data = res.data.FunctionResponse;
  22876. if (_data.result && _data.result.id) {
  22877. resolve(_data.result.id)
  22878. }else {
  22879. resolve(1)
  22880. }
  22881. }).catch(function (error) {
  22882. resolve(1)
  22883. });
  22884. }catch (e){
  22885. resolve(1)
  22886. }
  22887. });
  22888. },
  22889. handleSwitchChange(string){
  22890. // let area = ''
  22891. // let text = ''
  22892. // if(string == 'aiteacherTextDetail'){
  22893. // area = '已有教案摘要'
  22894. // text = this.teacherCourseText
  22895. // }else if(string == 'aitargetTextDetail'){
  22896. // area = '课程目标'
  22897. // text = this.targetCourseText
  22898. // }else if(string == 'aiDetail'){
  22899. // area = '课程简要描述'
  22900. // text = this.courseText
  22901. // }else if(string == 'aitargetTextDetail2'){
  22902. // area = '课程目标'
  22903. // text = this.targetCourseText2
  22904. // }else if(string.indexOf('aiDetail1') != -1){
  22905. // let index = parseInt(string.split('aiDetail1-')[1])
  22906. // area = `任务${index+1}课程大纲`
  22907. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  22908. // }else if(string == 'aiCpote1'){
  22909. // area = '概念群'
  22910. // text = this.cpote.cpote1
  22911. // }else if(string == 'aiCpote2'){
  22912. // area = '问题链'
  22913. // text = this.cpote.cpote2
  22914. // }else if(string == 'aiCpote3'){
  22915. // area = '目标层'
  22916. // text = this.cpote.cpote3
  22917. // }else if(string == 'aiCpote4'){
  22918. // area = '任务簇'
  22919. // text = this.cpote.cpote4
  22920. // }else if(string.indexOf('teacherDetail2') != -1){
  22921. // let index = parseInt(string.split('teacherDetail2-')[1])
  22922. // area = `任务${index+1}教案`
  22923. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  22924. // }else if(string.indexOf('aiDetail2') != -1){
  22925. // let index = parseInt(string.split('aiDetail2-')[1])
  22926. // area = `任务${index+1}任务描述`
  22927. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  22928. // }else if(string.indexOf('aiDetail3') != -1){
  22929. // let index = parseInt(string.split('-')[1])
  22930. // let index2 = parseInt(string.split('-')[2])
  22931. // area = `任务${index+1}工具${index2+1}的工具描述`
  22932. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  22933. // }
  22934. // if(this.isQuote[string] && text){
  22935. // this.quoteArray.push({
  22936. // string,
  22937. // area,
  22938. // value: text
  22939. // })
  22940. // }
  22941. console.log(this.isQuote)
  22942. },
  22943. setIsQuote(string){
  22944. this.isQuote[string] = false
  22945. },
  22946. setEvaList(task, tool, elist){
  22947. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  22948. this.$forceUpdate()
  22949. }
  22950. },
  22951. beforeDestroy() {
  22952. // clearTimeout(this.timer);
  22953. // this.timer = null;
  22954. // clearInterval(this.timer2);
  22955. // this.timer2 = null;
  22956. clearInterval(this.pasteTimer);
  22957. this.pasteTimer = null;
  22958. },
  22959. beforeRouteLeave(to, from, next) {
  22960. // clearTimeout(this.timer);
  22961. // this.timer = null;
  22962. // clearInterval(this.timer2);
  22963. // this.timer2 = null;
  22964. clearInterval(this.pasteTimer);
  22965. this.pasteTimer = null;
  22966. next();
  22967. },
  22968. created() {
  22969. this.selectFileid();
  22970. // this.selectAiFileid();
  22971. this.selectKnowFileid();
  22972. this.getStudent();
  22973. this.getTeacher();
  22974. this.getClass();
  22975. this.selectGrage();
  22976. this.getTemplate();
  22977. this.getTipsTemplate();
  22978. // this.selectType();
  22979. this.selectEva();
  22980. if(this.istemplate == 1){
  22981. this.isOutline = true
  22982. this.isOutline2 = true
  22983. this.courseTextBool = true
  22984. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  22985. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  22986. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  22987. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  22988. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  22989. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  22990. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  22991. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  22992. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  22993. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  22994. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  22995. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  22996. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  22997. }
  22998. this.loading = false;
  22999. // this.timer2 = setInterval(() => {
  23000. // this.selectEva();
  23001. // }, 5000);
  23002. // this.pasteTimer = setInterval(() => {
  23003. // this.getPaste();
  23004. // }, 1000);
  23005. this.pasteTimer = setInterval(() => {
  23006. this.getPaste2();
  23007. }, 500);
  23008. setTimeout(() => {
  23009. // this.selectAllType();
  23010. this.selectCourseDetail();
  23011. }, 500);
  23012. let _this = this;
  23013. window.pasteStage = function (json) {
  23014. _this.pasteStage(json);
  23015. };
  23016. window.pasteTask = function (json) {
  23017. _this.pasteTask(json);
  23018. };
  23019. },
  23020. };
  23021. </script>
  23022. <style scoped>
  23023. @media screen and (max-width: 1280px) {
  23024. .mbCss {
  23025. flex-direction: column !important;
  23026. }
  23027. .pjCss {
  23028. width: 100% !important;
  23029. }
  23030. .evaCss {
  23031. width: 100% !important;
  23032. margin-top: 10px;
  23033. }
  23034. }
  23035. .el-table>>>.even_row {
  23036. background-color: #f1f1f1 !important;
  23037. }
  23038. .dialog_diy>>>.el-dialog__header {
  23039. background: #3c3c3c !important;
  23040. padding: 15px 20px;
  23041. }
  23042. .dialog_diy>>>.el-dialog__title {
  23043. color: #fff;
  23044. }
  23045. .dialog_diy>>>.el-dialog__headerbtn {
  23046. top: 19px;
  23047. }
  23048. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  23049. color: #fff;
  23050. }
  23051. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  23052. color: #fff;
  23053. }
  23054. .dialog_diy>>>.el-dialog__body,
  23055. .dialog_diy>>>.el-dialog__footer {
  23056. background: #fafafa;
  23057. }
  23058. .dialog_diy3>>>.el-dialog__body,
  23059. .dialog_diy3>>>.el-dialog__footer {
  23060. background: #eee !important;
  23061. }
  23062. .dialog_diy3>>>.el-dialog__body {
  23063. padding: 20px 20px;
  23064. }
  23065. .dialog_diyStage>>>.el-dialog__body {
  23066. padding: 10px;
  23067. }
  23068. .source_diy>>>.el-dialog {
  23069. height: 100% !important;
  23070. margin: 0 auto !important;
  23071. }
  23072. .source_diy>>>.el-dialog__body {
  23073. height: calc(100% - 185px);
  23074. overflow: auto;
  23075. background: #e6eaf0;
  23076. }
  23077. .source_diy>>>.el-dialog__footer {
  23078. background: #e6eaf0 !important;
  23079. }
  23080. .left {
  23081. border-right: 1px solid rgb(60, 94, 143);
  23082. display: flex;
  23083. flex-direction: column;
  23084. align-items: center;
  23085. min-height: 600px;
  23086. width: 385px;
  23087. height: 80%;
  23088. }
  23089. .tips {
  23090. color: rgb(128, 128, 128);
  23091. font-size: 12px;
  23092. width: 270px;
  23093. margin: 40px;
  23094. }
  23095. .pb_content {
  23096. height: 100% !important;
  23097. /* margin: 0 20px 0 20px; */
  23098. }
  23099. .pb_content_body {
  23100. width: 100% !important;
  23101. height: 100%;
  23102. display: flex;
  23103. }
  23104. .info_solid {
  23105. width: 270px;
  23106. height: 30px;
  23107. border-left: 1px solid #bdbdbd;
  23108. margin: 10px 0px 10px 30px;
  23109. }
  23110. .info_steps {
  23111. width: 270px;
  23112. font-size: 0.875rem;
  23113. display: flex;
  23114. align-items: center;
  23115. }
  23116. .info_steps span:nth-child(1) {
  23117. width: 30px;
  23118. height: 30px;
  23119. background: rgba(0, 0, 0, 0.38);
  23120. display: block;
  23121. color: #fff;
  23122. border-radius: 40px;
  23123. text-align: center;
  23124. line-height: 30px;
  23125. }
  23126. .steps_active {
  23127. background: #3d67bc !important;
  23128. }
  23129. .info_steps span:nth-child(2) {
  23130. margin-left: 5px;
  23131. }
  23132. .right {
  23133. height: 100%;
  23134. width: 100%;
  23135. display: flex;
  23136. overflow: hidden;
  23137. flex-direction: column;
  23138. }
  23139. .leftBar{
  23140. width: 290px;
  23141. height: calc(100% - 50px);
  23142. overflow: auto;
  23143. border-radius: 5px;
  23144. margin: 25px auto;
  23145. box-sizing: border-box;
  23146. margin-right: 10px;
  23147. }
  23148. .leftBar2{
  23149. width: 400px;
  23150. min-width: 400px;
  23151. height: calc(100% - 50px);
  23152. overflow: auto;
  23153. border-radius: 5px;
  23154. margin: 25px auto;
  23155. box-sizing: border-box;
  23156. margin-right: 10px;
  23157. background: #fff;
  23158. padding: 5px;
  23159. border-radius: 5px;
  23160. }
  23161. .basic_box {
  23162. margin: 0 auto;
  23163. position: relative;
  23164. padding: 0 20px 0 20px;
  23165. }
  23166. .basic_box_success {
  23167. width: 100%;
  23168. min-height: 455px;
  23169. padding: 50px 0;
  23170. position: relative;
  23171. text-align: center;
  23172. border-bottom: 1px solid #bfbfbf;
  23173. box-sizing: border-box;
  23174. display: flex;
  23175. align-items: center;
  23176. flex-direction: column;
  23177. justify-content: center;
  23178. }
  23179. .info_title {
  23180. font-size: 1.5em;
  23181. margin-right: 25px;
  23182. /* margin: 20px 30px 20px 30px; */
  23183. }
  23184. .bInfo_title {
  23185. text-align: left;
  23186. margin: 10px 0;
  23187. }
  23188. .small_title {
  23189. font-size: 14px;
  23190. line-height: 40px;
  23191. }
  23192. .chapter_beizhu {
  23193. font-size: 12px;
  23194. font-weight: bold;
  23195. float: right;
  23196. color: rgb(128, 128, 128);
  23197. margin-top: 5px;
  23198. }
  23199. .chapter_uploadBox1 {
  23200. text-align: left;
  23201. background-color: rgb(242, 242, 242);
  23202. width: 100%;
  23203. height: 67px;
  23204. padding: 0px 15px;
  23205. border-radius: 8px;
  23206. overflow: hidden;
  23207. font-size: 16px;
  23208. box-sizing: border-box;
  23209. position: relative;
  23210. }
  23211. .chapter_add {
  23212. width: 100%;
  23213. height: 32px;
  23214. margin-top: 15px;
  23215. cursor: pointer;
  23216. }
  23217. .chapter_add_l {
  23218. margin-left: 5px;
  23219. width: 30px;
  23220. height: 30px;
  23221. float: left;
  23222. border: 1px solid #aaa;
  23223. color: #aaa;
  23224. border-radius: 50%;
  23225. font-size: 25px;
  23226. text-align: center;
  23227. }
  23228. .chapter_add_r {
  23229. font-size: 18px;
  23230. height: 40px;
  23231. line-height: 30px;
  23232. text-indent: 10px;
  23233. color: #aaa;
  23234. }
  23235. .chapter_add_r span {
  23236. font-size: 12px;
  23237. color: rgb(204, 204, 204);
  23238. }
  23239. .chapter_add_input {
  23240. display: none;
  23241. }
  23242. .line {
  23243. width: 85%;
  23244. margin: 0 auto;
  23245. border-top: 1px solid #e5e5e5;
  23246. margin-top: 20px;
  23247. }
  23248. .info_btnBox {
  23249. width: calc(100%);
  23250. display: flex;
  23251. justify-content: center;
  23252. height: 80px;
  23253. align-items: center;
  23254. background: #fff;
  23255. margin: 0 auto;
  23256. border-top: 2px solid rgb(228, 232, 237);
  23257. box-sizing: border-box;
  23258. }
  23259. .info_btnBox2 {
  23260. width: calc(100%);
  23261. display: flex;
  23262. justify-content: center;
  23263. height: 20px;
  23264. align-items: center;
  23265. background: #fff;
  23266. margin: 0 auto;
  23267. border-top: 2px solid rgb(228, 232, 237);
  23268. box-sizing: border-box;
  23269. overflow: hidden;
  23270. cursor: pointer;
  23271. }
  23272. .info_btnBox3 {
  23273. width: calc(100%);
  23274. display: flex;
  23275. justify-content: flex-end;
  23276. padding: 0 20px;
  23277. height: 60px;
  23278. align-items: center;
  23279. background: unset;
  23280. margin: 0 auto;
  23281. /* border-top: 1px solid rgb(228, 232, 237); */
  23282. box-sizing: border-box;
  23283. overflow: hidden;
  23284. cursor: pointer;
  23285. background: #fff;
  23286. border-radius: 10px;
  23287. }
  23288. .info_btn+.info_btn {
  23289. margin-left: 15px;
  23290. }
  23291. .info_btn,
  23292. .teacherWord {
  23293. color: #fff;
  23294. background-color: #0f7eff;
  23295. padding: 8px 24px;
  23296. font-size: 0.9375rem;
  23297. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  23298. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  23299. min-width: 64px;
  23300. font-weight: 500;
  23301. border-radius: 4px;
  23302. box-sizing: border-box;
  23303. border: none;
  23304. cursor: pointer;
  23305. }
  23306. .teacherWord {
  23307. width: 105px !important;
  23308. text-align: center !important;
  23309. line-height: 36px !important;
  23310. padding: 0 !important;
  23311. font-size: 14px !important;
  23312. margin: 10px 0 !important;
  23313. }
  23314. .template_box {
  23315. display: flex;
  23316. flex-wrap: wrap;
  23317. }
  23318. .wordTeacher {
  23319. display: flex;
  23320. flex-direction: column;
  23321. width: 100px;
  23322. height: 100px;
  23323. text-align: center;
  23324. font-size: 13px;
  23325. margin: 0 20px 20px 0;
  23326. background: #f0f4fa;
  23327. position: relative;
  23328. border-radius: 5px;
  23329. align-items: center;
  23330. justify-content: center;
  23331. border: 1px solid #cad1dc;
  23332. color: #0e1e33;
  23333. /* padding: 25px 0px; */
  23334. cursor: pointer;
  23335. }
  23336. .wordTeacher::after {
  23337. content: "";
  23338. display: block;
  23339. position: absolute;
  23340. width: 15px;
  23341. height: 15px;
  23342. right: 10px;
  23343. top: 10px;
  23344. background-image: url(../../../assets/icon/new/choose_a.png);
  23345. background-size: 100% 100%;
  23346. }
  23347. .wordTeacherA::after {
  23348. background-image: url(../../../assets/icon/new/choose_b.png);
  23349. }
  23350. .wordTeacher:nth-child(5n) {
  23351. margin-right: 0px;
  23352. }
  23353. .wordPic {
  23354. margin: 0 auto;
  23355. width: 30px;
  23356. height: 30px;
  23357. cursor: pointer;
  23358. }
  23359. .deleteWord {
  23360. width: 22px;
  23361. height: 22px;
  23362. position: absolute;
  23363. right: 5px;
  23364. top: -15px;
  23365. cursor: pointer;
  23366. display: none;
  23367. z-index: 999;
  23368. }
  23369. .wordPic>img,
  23370. .deleteWord>img,
  23371. .addToolImg>img {
  23372. width: 100%;
  23373. height: 100%;
  23374. }
  23375. .info_btn:hover {
  23376. background-color: #4f7cd5 !important;
  23377. }
  23378. .cru_selectBox {
  23379. display: flex;
  23380. margin: 15px 0;
  23381. flex-wrap: nowrap;
  23382. white-space: nowrap;
  23383. overflow: auto;
  23384. position: relative;
  23385. height: 40px;
  23386. max-width: calc(100% - 175px);
  23387. }
  23388. .cru_selectBox::-webkit-scrollbar {
  23389. /*滚动条整体样式*/
  23390. width: 6px;
  23391. /*高宽分别对应横竖滚动条的尺寸*/
  23392. height: 6px;
  23393. }
  23394. /*定义滚动条轨道 内阴影+圆角*/
  23395. .cru_selectBox::-webkit-scrollbar-track {
  23396. border-radius: 10px;
  23397. background-color: #eee;
  23398. }
  23399. /*定义滑块 内阴影+圆角*/
  23400. .cru_selectBox::-webkit-scrollbar-thumb {
  23401. border-radius: 10px;
  23402. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  23403. background-color: rgba(0, 0, 0, 0.1);
  23404. }
  23405. .cru_line {
  23406. position: absolute;
  23407. bottom: 0px;
  23408. transition: all 0.5s;
  23409. left: 0px;
  23410. width: 50px;
  23411. height: 4px;
  23412. left: 10px;
  23413. border-radius: 2px;
  23414. background: #3681fc;
  23415. }
  23416. .cru_select {
  23417. font-size: 18px;
  23418. margin-right: 20px;
  23419. margin-left: 5px;
  23420. cursor: pointer;
  23421. color: #0e1e33;
  23422. }
  23423. .cru_select:hover {
  23424. color: #3681fc !important;
  23425. }
  23426. .cru_selected {
  23427. color: #3681fc !important;
  23428. font-weight: bold;
  23429. }
  23430. .chapter_box {
  23431. margin-top: 10px;
  23432. width: 100%;
  23433. padding: 10px 20px;
  23434. background: #fff;
  23435. border-radius: 8px;
  23436. box-sizing: border-box;
  23437. }
  23438. .chapter_contentbox {
  23439. display: flex;
  23440. align-items: center;
  23441. /* margin-top: 15px; */
  23442. }
  23443. .chapter_contentbox .cc_title {
  23444. margin: 0px;
  23445. color: black;
  23446. display: block;
  23447. white-space: nowrap;
  23448. overflow: hidden;
  23449. text-overflow: ellipsis;
  23450. margin-right: 20px;
  23451. font-size: 18px;
  23452. height: 20px;
  23453. line-height: 22px;
  23454. min-width: fit-content;
  23455. display: flex;
  23456. }
  23457. .chapter_contentbox .cc_title::before {
  23458. content: "";
  23459. height: 100%;
  23460. width: 3px;
  23461. background: #3681fc;
  23462. border-radius: 3px;
  23463. opacity: 1;
  23464. display: block;
  23465. margin-right: 10px;
  23466. }
  23467. .chapter_contentbox .cc_input {
  23468. width: 100%;
  23469. display: flex;
  23470. }
  23471. .show_taskD {
  23472. min-width: fit-content;
  23473. margin-left: 10px;
  23474. display: flex;
  23475. align-items: center;
  23476. font-size: 14px;
  23477. cursor: pointer;
  23478. color: #717c8d;
  23479. }
  23480. .show_taskD>img {
  23481. width: 15px;
  23482. margin-right: 5px;
  23483. transition: 0.2s all;
  23484. transform: rotate(-90deg);
  23485. }
  23486. .show_taskD.show>img {
  23487. transform: rotate(0deg);
  23488. }
  23489. .show_toolD {
  23490. min-width: fit-content;
  23491. margin-left: 10px;
  23492. display: flex;
  23493. align-items: center;
  23494. font-size: 14px;
  23495. cursor: pointer;
  23496. color: #717c8d;
  23497. /* position: absolute;
  23498. right: 45px;
  23499. top: 5px; */
  23500. }
  23501. .show_toolD>img {
  23502. width: 15px;
  23503. margin-right: 5px;
  23504. transition: 0.2s all;
  23505. transform: rotate(-90deg);
  23506. }
  23507. .show_toolD.show>img {
  23508. transform: rotate(0deg);
  23509. }
  23510. .remove {
  23511. background-image: url("../../../assets/icon/new/delete_u.png");
  23512. cursor: pointer;
  23513. opacity: 0.5;
  23514. width: 30px;
  23515. min-width: 30px;
  23516. height: 30px;
  23517. background-size: 100% 100%;
  23518. background-repeat: no-repeat;
  23519. margin-left: 10px;
  23520. }
  23521. .remove1 {
  23522. background-image: url("../../../assets/remove1.png");
  23523. background-repeat: no-repeat;
  23524. background-position: 5px 10px;
  23525. width: 40px;
  23526. height: 50px;
  23527. cursor: pointer;
  23528. margin-left: 10px;
  23529. }
  23530. .binfo_input {
  23531. width: 100%;
  23532. margin: 0;
  23533. padding: 12px 14px;
  23534. display: block;
  23535. min-width: 0;
  23536. outline: none;
  23537. box-sizing: border-box;
  23538. background: none;
  23539. border: none;
  23540. border-radius: 4px;
  23541. background: #fff;
  23542. font-size: 16px;
  23543. resize: none;
  23544. font-family: "Microsoft YaHei";
  23545. min-height: 48px;
  23546. /* border: 1px solid #3682fc00; */
  23547. border: 1.5px solid #cad1dc;
  23548. }
  23549. .binfo_textarea {
  23550. border: 1.5px solid #cad1dc;
  23551. font-size: 16px;
  23552. resize: none;
  23553. /* background: #f6f6f6; */
  23554. font-family: "Microsoft YaHei";
  23555. }
  23556. .binfo_input:focus-visible {
  23557. border: 1.5px solid #3681fc !important;
  23558. }
  23559. .time {
  23560. display: flex;
  23561. margin: 35px 0 80px 0;
  23562. }
  23563. .chapter_btnbox {
  23564. width: 160px;
  23565. border-radius: 5px;
  23566. border: 2px dashed gray;
  23567. display: flex;
  23568. padding: 8px 50px;
  23569. align-items: center;
  23570. justify-content: center;
  23571. margin: 30px auto 0;
  23572. cursor: pointer;
  23573. }
  23574. .icon_add {
  23575. position: relative;
  23576. width: 24px;
  23577. padding-top: 20px;
  23578. border-radius: 100%;
  23579. border-width: 2px;
  23580. border-style: solid;
  23581. border-color: gray;
  23582. }
  23583. .icon_add i:nth-child(1) {
  23584. position: absolute;
  23585. left: 50%;
  23586. top: 50%;
  23587. height: 60%;
  23588. transform: translate(-50%, -50%);
  23589. border-width: 1px;
  23590. border-style: solid;
  23591. border-color: inherit;
  23592. }
  23593. .icon_add i:nth-child(2) {
  23594. position: absolute;
  23595. top: 50%;
  23596. left: 50%;
  23597. width: 60%;
  23598. transform: translate(-50%, -50%);
  23599. border-width: 1px;
  23600. border-style: solid;
  23601. border-color: inherit;
  23602. }
  23603. .chapter_btn_w {
  23604. font-size: 0.9375rem;
  23605. font-weight: bold;
  23606. color: gray;
  23607. margin-left: 20px;
  23608. }
  23609. .disUoloadSty>>>.el-icon-plus {
  23610. display: none !important;
  23611. /* 上传按钮隐藏 */
  23612. }
  23613. .imgLeft {
  23614. margin: 15px 0;
  23615. }
  23616. .add_info_box {
  23617. margin: 0 0 0 auto;
  23618. display: flex;
  23619. flex-wrap: wrap;
  23620. }
  23621. .add_info_box button {
  23622. margin: 0 5px 10px 0;
  23623. }
  23624. .add_info_box2 {
  23625. display: flex;
  23626. align-items: center;
  23627. flex-wrap: wrap;
  23628. }
  23629. .add_info_box2::after {
  23630. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  23631. color: red;
  23632. font-size: 14px;
  23633. margin-bottom: 10px;
  23634. }
  23635. .add_chapters_box {
  23636. text-align: left;
  23637. background-color: #fff;
  23638. width: 100%;
  23639. border-radius: 4px;
  23640. font-size: 16px;
  23641. box-sizing: border-box;
  23642. position: relative;
  23643. padding: 0 15px;
  23644. height: auto;
  23645. overflow-y: auto;
  23646. overflow-x: hidden;
  23647. border: 1px solid #cad1dc;
  23648. }
  23649. .add_chapters_box.add_c_none {
  23650. display: flex;
  23651. justify-content: center;
  23652. align-items: center;
  23653. padding: 15px;
  23654. }
  23655. .add_c_none>img {
  23656. width: 25px;
  23657. }
  23658. .add_chapters_box.add_c_none>span {
  23659. font-size: 14px;
  23660. font-weight: 400;
  23661. margin: 0 0 5px 5px;
  23662. }
  23663. .homework_box {
  23664. display: flex;
  23665. align-items: flex-start;
  23666. flex-wrap: wrap;
  23667. margin: 15px 0 0 0;
  23668. flex-direction: column;
  23669. align-content: flex-start;
  23670. }
  23671. .course_homework {
  23672. display: flex;
  23673. justify-content: center;
  23674. flex-direction: row;
  23675. align-items: center;
  23676. margin: 0 10px 0 0;
  23677. }
  23678. .course_homework>>>.el-input__inner {
  23679. width: 140px;
  23680. margin-left: 15px;
  23681. }
  23682. .chapter_upload_move {
  23683. position: relative;
  23684. background-color: #fff;
  23685. position: absolute;
  23686. width: 100%;
  23687. top: 0px;
  23688. left: 0px;
  23689. border: 1px solid #eee;
  23690. border-radius: 5px;
  23691. transition: width 2s;
  23692. -moz-transition: width 2s;
  23693. -webkit-transition: width 2s;
  23694. -o-transition: width 2s;
  23695. }
  23696. .chapter_upload_l_i {
  23697. background-image: url("../../../assets/icon.png");
  23698. background-position: 3px -165px;
  23699. width: 30px;
  23700. height: 30px;
  23701. margin: 10px auto 0 auto;
  23702. }
  23703. .course_input_box {
  23704. display: flex;
  23705. margin-right: 20px;
  23706. width: 100%;
  23707. align-items: center;
  23708. position: relative;
  23709. }
  23710. .course_input_box>.binfo_input {
  23711. width: calc(100% - 0 - 200px - 20px);
  23712. margin: 0 10px;
  23713. }
  23714. .bb_courseIcon {
  23715. width: 57px;
  23716. height: 45px;
  23717. background: #f0f4fa;
  23718. border-radius: 5px 0px 0px 5px;
  23719. display: flex;
  23720. align-items: center;
  23721. justify-content: center;
  23722. border-right: 1.5px solid rgb(202, 209, 220);
  23723. box-sizing: border-box;
  23724. position: absolute;
  23725. left: 1.5px;
  23726. }
  23727. .bb_courseIcon>img {
  23728. width: 25px;
  23729. height: auto;
  23730. }
  23731. .big_box {
  23732. /* margin-top: 20px; */
  23733. display: flex;
  23734. justify-content: space-between;
  23735. /* border-bottom: 1px solid #E0E2ED; */
  23736. }
  23737. .left_first {
  23738. display: flex;
  23739. flex-direction: column;
  23740. flex-wrap: nowrap;
  23741. width: calc(100% - 310px);
  23742. padding: 20px;
  23743. box-sizing: border-box;
  23744. background: #fff;
  23745. border-radius: 5px;
  23746. }
  23747. .right_first {
  23748. width: 300px;
  23749. display: flex;
  23750. align-items: center;
  23751. justify-content: center;
  23752. /* border-left: 1px solid #E0E2ED; */
  23753. box-sizing: border-box;
  23754. padding: 20px;
  23755. flex-direction: column;
  23756. background: #fff;
  23757. border-radius: 5px;
  23758. }
  23759. .ai_box {
  23760. width: 204px;
  23761. display: flex;
  23762. justify-content: flex-end;
  23763. margin-bottom: 15px;
  23764. }
  23765. .ai_content {
  23766. display: flex;
  23767. align-items: center;
  23768. font-size: 14px;
  23769. padding: 7px 20px;
  23770. box-sizing: border-box;
  23771. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  23772. border-radius: 12px;
  23773. font-weight: 700;
  23774. cursor: pointer;
  23775. }
  23776. .ai_content>img {
  23777. width: 40px;
  23778. margin-right: 5px;
  23779. }
  23780. .c_info_title {
  23781. padding: 15px 0 15px 0;
  23782. font-size: 16px;
  23783. font-weight: bold;
  23784. margin: 0 0 0 20px;
  23785. box-sizing: border-box;
  23786. display: flex;
  23787. align-items: center;
  23788. line-height: 20px;
  23789. }
  23790. .c_info_title::before {
  23791. content: "";
  23792. display: block;
  23793. width: 3px;
  23794. height: 20px;
  23795. background: #0061ff;
  23796. border-radius: 3px;
  23797. margin: 0 5px 0 0;
  23798. }
  23799. .right_title {
  23800. height: 30px;
  23801. padding: 15px 0 15px 20px;
  23802. border-bottom: 1px solid #f2f2f2;
  23803. font-size: 1.5em;
  23804. font-weight: bold;
  23805. color: #0f7eff;
  23806. margin: 0 auto;
  23807. }
  23808. .people {
  23809. border: 1px solid rgb(229 229 229);
  23810. /* height: 495px; */
  23811. height: 350px;
  23812. border-radius: 5px;
  23813. width: 100%;
  23814. overflow: auto;
  23815. }
  23816. .people_top {
  23817. display: flex;
  23818. width: 100%;
  23819. /* justify-content: space-between; */
  23820. /* align-items: center; */
  23821. flex-direction: column;
  23822. padding: 10px 10px 0;
  23823. box-sizing: border-box;
  23824. }
  23825. .people_nav,
  23826. .people_top_right {
  23827. /* padding: 20px 0 0 20px; */
  23828. }
  23829. .people_top_right {
  23830. height: 40px;
  23831. margin-bottom: 10px;
  23832. }
  23833. .people_search {
  23834. display: flex;
  23835. position: relative;
  23836. }
  23837. .people_search>>>.el-input__inner {
  23838. /* height: 25px; */
  23839. width: 100%;
  23840. }
  23841. .search_img {
  23842. width: 20px;
  23843. height: 20px;
  23844. position: absolute;
  23845. right: 10px;
  23846. top: 50%;
  23847. transform: translateY(-50%);
  23848. }
  23849. .search_img>img {
  23850. width: 100%;
  23851. height: 100%;
  23852. }
  23853. .people_name {
  23854. display: flex;
  23855. justify-content: flex-start;
  23856. padding: 20px 10px;
  23857. flex-direction: column;
  23858. flex-wrap: wrap;
  23859. }
  23860. .p_box {
  23861. position: relative;
  23862. }
  23863. .people_name>>>.el-checkbox {
  23864. width: 100%;
  23865. display: flex;
  23866. align-items: center;
  23867. margin-bottom: 10px;
  23868. }
  23869. .people_name>>>.el-checkbox__label {
  23870. text-overflow: ellipsis;
  23871. overflow: hidden;
  23872. width: calc(100%);
  23873. }
  23874. .people_name2>>>.el-checkbox__label {
  23875. width: calc(100% - 130px);
  23876. }
  23877. .inviteCode {
  23878. position: absolute;
  23879. right: 30px;
  23880. color: #237ade;
  23881. top: 0;
  23882. cursor: pointer;
  23883. font-size: 13px;
  23884. }
  23885. .noneInvite {
  23886. color: #a8a8a8;
  23887. }
  23888. .inviteImg {
  23889. position: absolute;
  23890. right: 5px;
  23891. top: 0;
  23892. width: 20px;
  23893. }
  23894. .right_img {
  23895. width: 150px;
  23896. height: 150px;
  23897. margin: 0 auto;
  23898. }
  23899. .right_img>img {
  23900. width: 100%;
  23901. height: 100%;
  23902. }
  23903. .number {
  23904. margin-top: 20px;
  23905. color: #4aa6ff;
  23906. text-decoration: underline;
  23907. }
  23908. .success_button {
  23909. display: flex;
  23910. text-align: center;
  23911. margin: 5% 0 auto;
  23912. flex-direction: row;
  23913. justify-content: center;
  23914. }
  23915. .look_course {
  23916. margin-right: 40px;
  23917. background: #3d67bc;
  23918. width: 200px;
  23919. height: 35px;
  23920. line-height: 35px;
  23921. color: #fff;
  23922. text-align: center;
  23923. font-size: 14px;
  23924. border-radius: 5px;
  23925. cursor: pointer;
  23926. }
  23927. .attend_others {
  23928. width: 250px;
  23929. background: #4fb13c;
  23930. height: 35px;
  23931. line-height: 35px;
  23932. color: #fff;
  23933. text-align: center;
  23934. font-size: 14px;
  23935. border-radius: 5px;
  23936. cursor: pointer;
  23937. }
  23938. .dialog_diy2>>>.el-dialog__body {
  23939. text-align: center;
  23940. }
  23941. .write_togother {
  23942. position: absolute;
  23943. right: 45px;
  23944. display: flex;
  23945. top: 5%;
  23946. }
  23947. .write_people {
  23948. font-size: 14px;
  23949. line-height: 50px;
  23950. padding-right: 10px;
  23951. }
  23952. .end_write {
  23953. background: #3d67bc;
  23954. color: #fff;
  23955. width: 100px;
  23956. height: 35px;
  23957. line-height: 35px;
  23958. text-align: center;
  23959. font-size: 14px;
  23960. border-radius: 5px;
  23961. cursor: pointer;
  23962. }
  23963. .chapter_upload+.chapter_upload {
  23964. /* margin-top: 15px; */
  23965. border-top: 1px solid #e7ebf1;
  23966. }
  23967. .chapter_upload {
  23968. height: 45px;
  23969. position: relative;
  23970. display: flex;
  23971. align-items: center;
  23972. width: 100%;
  23973. min-height: 45px;
  23974. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  23975. /* border-radius: 4px; */
  23976. /* overflow: hidden; */
  23977. box-sizing: border-box;
  23978. }
  23979. .chapter_upload_drag {
  23980. position: absolute;
  23981. cursor: pointer;
  23982. width: 16px;
  23983. height: 16px;
  23984. left: -9px;
  23985. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  23986. background-size: 100% 100%;
  23987. z-index: 10;
  23988. display: none;
  23989. }
  23990. .isNavStage>.chapter_upload_drag {
  23991. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  23992. }
  23993. .chapter_upload_t {
  23994. background-color: #fff;
  23995. position: absolute;
  23996. height: 100%;
  23997. top: 0px;
  23998. left: 0px;
  23999. box-sizing: border-box;
  24000. }
  24001. .chapter_upload_o {
  24002. width: 100%;
  24003. height: 100%;
  24004. position: relative;
  24005. z-index: 1;
  24006. }
  24007. .chapter_upload_ic {
  24008. margin: 0 15px 0px auto;
  24009. display: flex;
  24010. align-items: center;
  24011. }
  24012. .chapter_upload_ic_l {
  24013. width: 50px;
  24014. height: 50px;
  24015. float: left;
  24016. }
  24017. .chapter_upload_ic_l div {
  24018. width: 30px;
  24019. height: 35px;
  24020. background: url("../../../assets/icon/icon.png");
  24021. }
  24022. .chapter_upload_ic_edit {
  24023. height: 100%;
  24024. display: flex;
  24025. align-items: center;
  24026. cursor: pointer;
  24027. margin: 0 10px 0 0;
  24028. }
  24029. .chapter_upload_ic_edit div {
  24030. width: 18px;
  24031. height: 18px;
  24032. background-image: url("../../../assets/icon/new/edit_u.png");
  24033. background-size: 100% 100%;
  24034. }
  24035. .chapter_upload_ic_check {
  24036. height: 100%;
  24037. display: flex;
  24038. align-items: center;
  24039. cursor: pointer;
  24040. margin: 0 10px 0 0;
  24041. }
  24042. .chapter_upload_ic_check div {
  24043. width: 18px;
  24044. height: 18px;
  24045. background-image: url("../../../assets/icon/course/lookeye.svg");
  24046. background-size: 100% 100%;
  24047. }
  24048. .chapter_upload_ic_r {
  24049. height: 100%;
  24050. display: flex;
  24051. align-items: center;
  24052. cursor: pointer;
  24053. }
  24054. .chapter_upload_ic_r div {
  24055. width: 18px;
  24056. height: 18px;
  24057. background-image: url("../../../assets/icon/new/delete_u.png");
  24058. background-size: 100% 100%;
  24059. }
  24060. .chapter_upload_n {
  24061. display: flex;
  24062. text-indent: 10px;
  24063. text-decoration: none;
  24064. text-overflow: ellipsis;
  24065. white-space: nowrap;
  24066. overflow: hidden;
  24067. width: 55%;
  24068. margin-left: 10px;
  24069. cursor: pointer;
  24070. margin-top: 2px;
  24071. align-items: center;
  24072. }
  24073. .chapter_upload_l_i2,
  24074. .chapter_upload_l_i3,
  24075. .chapter_upload_l_i8,
  24076. .chapter_upload_l_i6,
  24077. .chapter_upload_l_i12,
  24078. .chapter_upload_l_i14,
  24079. .chapter_upload_l_i13 {
  24080. width: 15px;
  24081. height: 15px;
  24082. background-size: 100% 100%;
  24083. }
  24084. .chapter_upload_l_i2 {
  24085. background-image: url("../../../assets/icon/new/u_word.png");
  24086. }
  24087. .chapter_upload_l_i3 {
  24088. background-image: url("../../../assets/icon/new/u_video.png");
  24089. }
  24090. .chapter_upload_l_i8 {
  24091. background-image: url("../../../assets/icon/new/u_url.png");
  24092. }
  24093. .chapter_upload_l_i14 {
  24094. background-image: url("../../../assets/icon/new/u_source.png");
  24095. }
  24096. .chapter_upload_l_i6 {
  24097. background-image: url("../../../assets/icon/new/u_picture.png");
  24098. }
  24099. .chapter_upload_l_i12 {
  24100. background-image: url("../../../assets/icon/new/u_word.png");
  24101. }
  24102. .chapter_upload_l_i13 {
  24103. background-image: url("../../../assets/icon/new/u_img.png");
  24104. }
  24105. .chapter_upload_noSee {
  24106. background-image: url("../../../assets/icon/new/u_noUpload.png");
  24107. width: 18px;
  24108. height: 18px;
  24109. background-size: 100% 100%;
  24110. display: block;
  24111. margin-right: 10px;
  24112. }
  24113. .chapter_upload_ud {
  24114. display: flex;
  24115. flex-direction: row;
  24116. justify-content: center;
  24117. margin: 0 10px 0 0;
  24118. }
  24119. .chapter_upload_ud>.chapter_upload_up {
  24120. margin-bottom: 0;
  24121. margin-right: 10px;
  24122. }
  24123. .chapter_upload_down,
  24124. .chapter_upload_up {
  24125. width: 20px;
  24126. height: 20px;
  24127. background: #e4eaf2;
  24128. cursor: pointer;
  24129. margin: 0 auto;
  24130. border-radius: 5px;
  24131. display: flex;
  24132. justify-content: center;
  24133. align-items: center;
  24134. }
  24135. .chapter_upload_up::after,
  24136. .chapter_upload_down::after {
  24137. content: "";
  24138. background-image: url("../../../assets/icon/new/downBtn.png");
  24139. width: 13px;
  24140. height: 13px;
  24141. background-size: 100% 100%;
  24142. display: block;
  24143. }
  24144. .chapter_upload_up::after {
  24145. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  24146. }
  24147. .chapter_upload_up {
  24148. margin-bottom: 5px;
  24149. }
  24150. .chapter_upload_ud2 {
  24151. display: flex;
  24152. flex-direction: row;
  24153. justify-content: center;
  24154. margin: 0 10px 0 0;
  24155. }
  24156. .chapter_upload_ud2>.chapter_upload_up2 {
  24157. margin-bottom: 0;
  24158. margin-right: 10px;
  24159. }
  24160. .chapter_upload_down2,
  24161. .chapter_upload_up2 {
  24162. cursor: pointer;
  24163. margin: 0 auto;
  24164. border-radius: 5px;
  24165. display: flex;
  24166. justify-content: center;
  24167. align-items: center;
  24168. color: #717c8d;
  24169. font-size: 14px;
  24170. }
  24171. .chapter_upload_up2 {
  24172. margin-right: 10px;
  24173. }
  24174. .chapter_upload_up2::before,
  24175. .chapter_upload_down2::before {
  24176. content: "";
  24177. background-image: url("../../../assets/icon/new/c_down.png");
  24178. width: 14px;
  24179. height: 14px;
  24180. background-size: 100% 100%;
  24181. display: block;
  24182. margin-right: 5px;
  24183. }
  24184. .chapter_upload_up2::before {
  24185. background-image: url("../../../assets/icon/new/c_up.png") !important;
  24186. }
  24187. .addWordStyle {
  24188. display: flex;
  24189. flex-direction: row;
  24190. justify-content: flex-start;
  24191. overflow-x: auto;
  24192. white-space: nowrap;
  24193. flex-wrap: wrap;
  24194. }
  24195. /* table 样式 */
  24196. .cont>>>table {
  24197. border-top: 1px solid #ccc;
  24198. border-left: 1px solid #ccc;
  24199. }
  24200. .cont>>>table td,
  24201. .cont>>>table th {
  24202. border-bottom: 1px solid #ccc;
  24203. border-right: 1px solid #ccc;
  24204. /* padding: 20px 5px; */
  24205. padding: 5px 10px;
  24206. max-width: 0px;
  24207. height: 30px;
  24208. vertical-align: baseline;
  24209. }
  24210. .cont>>>table th {
  24211. border-bottom: 2px solid #ccc;
  24212. text-align: center;
  24213. }
  24214. /* blockquote 样式 */
  24215. .cont>>>blockquote {
  24216. display: block;
  24217. border-left: 8px solid #d0e5f2;
  24218. padding: 5px 10px;
  24219. margin: 10px 0;
  24220. line-height: 1.4;
  24221. font-size: 100%;
  24222. background-color: #f1f1f1;
  24223. }
  24224. /* code 样式 */
  24225. .cont>>>code {
  24226. display: inline-block;
  24227. /* *display: inline; */
  24228. zoom: 1;
  24229. background-color: #f1f1f1;
  24230. border-radius: 3px;
  24231. padding: 3px 5px;
  24232. margin: 0 3px;
  24233. }
  24234. .cont>>>pre code {
  24235. display: block;
  24236. }
  24237. /* ul ol 样式 */
  24238. .cont>>>ul,
  24239. ol {
  24240. margin: 10px 0 10px 20px;
  24241. }
  24242. .wordbox {
  24243. display: flex;
  24244. flex-wrap: wrap;
  24245. cursor: pointer;
  24246. width: 100%;
  24247. }
  24248. .checkword {
  24249. width: 22px;
  24250. height: 22px;
  24251. margin: 10px auto 0;
  24252. cursor: pointer;
  24253. }
  24254. .checkword img {
  24255. width: 100%;
  24256. }
  24257. .stepBg {
  24258. display: flex;
  24259. justify-content: space-between;
  24260. align-items: center;
  24261. background: #fff;
  24262. width: calc(100%);
  24263. margin: 0 auto;
  24264. }
  24265. .stepBorder {
  24266. height: 3px !important;
  24267. background: #cad1dc;
  24268. width: 100px !important;
  24269. margin: 0 15px !important;
  24270. position: relative;
  24271. }
  24272. .border-active {
  24273. background: #3681fc !important;
  24274. }
  24275. .border-active::before,
  24276. .border-active::after {
  24277. border-color: #3681fc !important;
  24278. }
  24279. .stepBorder::before,
  24280. .stepBorder::after {
  24281. content: "";
  24282. width: 9px;
  24283. height: 9px;
  24284. background: #ffffff;
  24285. opacity: 1;
  24286. border: 2px solid #acb4bf;
  24287. display: block;
  24288. box-sizing: border-box;
  24289. border-radius: 50%;
  24290. position: absolute;
  24291. top: 50%;
  24292. transform: translateY(-50%);
  24293. }
  24294. .stepBorder::after {
  24295. right: -9px;
  24296. }
  24297. .stepTop {
  24298. width: 100%;
  24299. /* border-radius: 10px; */
  24300. display: flex;
  24301. justify-content: center;
  24302. align-items: center;
  24303. flex-wrap: nowrap;
  24304. background: #fff;
  24305. /* top: 18%; */
  24306. height: 80px;
  24307. border-bottom: 2px solid rgb(228, 232, 237);
  24308. box-sizing: border-box;
  24309. }
  24310. .stepTop2 {
  24311. width: 100%;
  24312. /* border-radius: 10px; */
  24313. display: flex;
  24314. justify-content: center;
  24315. align-items: center;
  24316. flex-wrap: nowrap;
  24317. background: #fff;
  24318. /* top: 18%; */
  24319. height: 20px;
  24320. border-bottom: 2px solid rgb(228, 232, 237);
  24321. box-sizing: border-box;
  24322. overflow: hidden;
  24323. cursor: pointer;
  24324. }
  24325. .stepTop>div img {
  24326. width: 100%;
  24327. }
  24328. .stepTop>div {
  24329. height: 50px;
  24330. width: 180px;
  24331. cursor: pointer;
  24332. margin: 10px 0;
  24333. border-radius: 10px;
  24334. }
  24335. .first,
  24336. .second,
  24337. .third,
  24338. .four {
  24339. background: #3681fc;
  24340. height: 90px;
  24341. color: #fff;
  24342. display: flex;
  24343. flex-direction: row;
  24344. align-items: center;
  24345. justify-content: center;
  24346. }
  24347. .first>div:nth-child(1),
  24348. .second>div:nth-child(1),
  24349. .third>div:nth-child(1),
  24350. .four>div:nth-child(1) {
  24351. margin: 5px 10px 0 0;
  24352. width: 2rem;
  24353. }
  24354. .firstNo,
  24355. .secondNo,
  24356. .thirdNo,
  24357. .fourNo {
  24358. background: #e7e7e7;
  24359. color: #adadad;
  24360. display: flex;
  24361. flex-direction: row;
  24362. align-items: center;
  24363. justify-content: center;
  24364. }
  24365. .firstNo>div:nth-child(1),
  24366. .secondNo>div:nth-child(1),
  24367. .thirdNo>div:nth-child(1),
  24368. .fourNo>div:nth-child(1) {
  24369. margin: 5px 10px 0 0;
  24370. width: 2rem;
  24371. }
  24372. .uploadWidth>>>.el-upload {
  24373. width: 60px;
  24374. height: 60px;
  24375. position: relative;
  24376. }
  24377. .addPeople {
  24378. background: #fa6060;
  24379. width: 150px;
  24380. height: 40px;
  24381. color: #fff;
  24382. border-radius: 5px;
  24383. text-align: center;
  24384. line-height: 40px;
  24385. font-size: 14px;
  24386. cursor: pointer;
  24387. }
  24388. .kcImg {
  24389. width: 60px;
  24390. margin-left: 10px;
  24391. }
  24392. .zyImg {
  24393. width: 55px;
  24394. margin: 0 10px;
  24395. }
  24396. .deleteZy {
  24397. width: 20px;
  24398. position: absolute;
  24399. top: 5px;
  24400. right: 5px;
  24401. cursor: pointer;
  24402. }
  24403. .kcImg>img,
  24404. .zyImg>img,
  24405. .deleteZy>img {
  24406. width: 100%;
  24407. height: 100%;
  24408. }
  24409. .zyBox {
  24410. display: flex;
  24411. flex-direction: row;
  24412. align-items: center;
  24413. background: #67d37d;
  24414. color: #fff;
  24415. width: 210px;
  24416. margin: 20px 20px 0 0;
  24417. border-radius: 10px;
  24418. height: 70px;
  24419. position: relative;
  24420. }
  24421. .upCss {
  24422. display: flex;
  24423. flex-direction: row;
  24424. justify-content: flex-start;
  24425. }
  24426. .upCss>>>.el-icon-plus {
  24427. position: none !important;
  24428. width: 200px;
  24429. height: 100px;
  24430. display: flex;
  24431. flex-wrap: nowrap;
  24432. flex-direction: column;
  24433. align-items: center;
  24434. justify-content: center;
  24435. border: 1px dashed #ccc;
  24436. min-width: 78px;
  24437. min-height: 100px;
  24438. z-index: 999;
  24439. }
  24440. .upCss>>>.el-upload-list__item-name {
  24441. width: 100px;
  24442. white-space: nowrap;
  24443. overflow: hidden;
  24444. text-overflow: ellipsis;
  24445. }
  24446. .upCss>>>.el-upload-list__item .el-icon-close {
  24447. font-size: 20px;
  24448. z-index: 9999;
  24449. }
  24450. .addStageImg {
  24451. min-width: 20px;
  24452. min-height: 20px;
  24453. width: 20px;
  24454. height: 20px;
  24455. cursor: pointer;
  24456. }
  24457. .addHW {
  24458. width: 28px;
  24459. height: 28px;
  24460. cursor: pointer;
  24461. }
  24462. .addStageImg>img,
  24463. .addHW>img {
  24464. width: 100%;
  24465. height: 100%;
  24466. }
  24467. .addNewPP>>>.el-dialog__body {
  24468. padding: 5px 20px;
  24469. }
  24470. .addNewPP>>>.el-dialog {
  24471. margin-top: 5vh !important;
  24472. }
  24473. .addNewPP2>>>.el-dialog__body {
  24474. padding: 5px 0;
  24475. }
  24476. .addNewPP2>>>.el-dialog {
  24477. margin-top: 5vh !important;
  24478. }
  24479. .isHeight {
  24480. height: 680px;
  24481. }
  24482. .toolChoose {
  24483. display: flex;
  24484. /* width: 100%; */
  24485. flex-direction: row;
  24486. flex-wrap: wrap;
  24487. }
  24488. .tool,
  24489. .isToolChoose {
  24490. display: flex;
  24491. flex-direction: column;
  24492. flex-wrap: nowrap;
  24493. width: fit-content;
  24494. margin: 10px 0 10px 0;
  24495. align-items: center;
  24496. border: 2px solid #dbdbdb00;
  24497. padding: 10px 20px;
  24498. border-radius: 5px;
  24499. cursor: pointer;
  24500. /* box-shadow: 0 0 2px 0px #dedede; */
  24501. position: relative;
  24502. box-sizing: border-box;
  24503. }
  24504. .tool:hover {
  24505. border: 2px solid #a5c7ff;
  24506. }
  24507. .tool:hover>.noCTool {
  24508. display: block;
  24509. opacity: 0.5;
  24510. }
  24511. .isToolChoose {
  24512. border: 2px solid #438aff !important;
  24513. box-shadow: 0 0 2px 0px #438aff;
  24514. opacity: 1 !important;
  24515. }
  24516. .isCTool,
  24517. .noCTool {
  24518. width: 30px;
  24519. height: 30px;
  24520. position: absolute;
  24521. top: -4px;
  24522. right: -4px;
  24523. }
  24524. .noCTool {
  24525. display: none;
  24526. }
  24527. .isCTool>img,
  24528. .noCTool>img {
  24529. width: 100%;
  24530. height: 100%;
  24531. }
  24532. .tool+.tool {
  24533. margin-right: 10px;
  24534. }
  24535. .whiteBIcon {
  24536. width: 80px;
  24537. cursor: pointer;
  24538. display: flex;
  24539. flex-direction: column;
  24540. flex-wrap: nowrap;
  24541. align-items: center;
  24542. font-size: 14px;
  24543. }
  24544. .whiteBIcon>img,
  24545. .toolIcon>img,
  24546. .arrow>img {
  24547. width: 100%;
  24548. height: 100%;
  24549. }
  24550. .check img {
  24551. width: 20px;
  24552. height: 20px;
  24553. }
  24554. .whiteBIcon>img {
  24555. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  24556. border-radius: 15px;
  24557. }
  24558. .whiteBIcon>div:nth-child(2) {
  24559. height: 20px;
  24560. line-height: 20px;
  24561. }
  24562. .check {
  24563. /* width: 20px;
  24564. height: 20px; */
  24565. cursor: pointer;
  24566. margin: 10px 0 0;
  24567. }
  24568. .checkDiv {
  24569. display: flex;
  24570. align-items: center;
  24571. }
  24572. .checkDiv span {
  24573. margin-left: 5px;
  24574. color: #858585;
  24575. }
  24576. .customWidth>>>.el-dialog {
  24577. min-width: 600px !important;
  24578. }
  24579. .CollaborativeCss {
  24580. width: 100%;
  24581. display: flex;
  24582. justify-content: center;
  24583. align-items: center;
  24584. box-sizing: border-box;
  24585. padding: 10px 0;
  24586. cursor: pointer;
  24587. }
  24588. .CollaborativeCss >>> .el-tooltip {
  24589. overflow: hidden;
  24590. white-space: nowrap;
  24591. text-overflow: ellipsis;
  24592. }
  24593. .CollaborativeCss2 {
  24594. background: #e0eafb;
  24595. color: #3681fc;
  24596. font-weight: 700;
  24597. border-radius: 5px;
  24598. }
  24599. .a_addBox {
  24600. margin: 10px 0;
  24601. background: #fff;
  24602. padding: 15px;
  24603. /* max-height: 600px; */
  24604. overflow: auto;
  24605. }
  24606. .a_add_box {
  24607. border-bottom: 2px solid #eee;
  24608. padding-bottom: 25px;
  24609. }
  24610. .a_add_head {
  24611. display: flex;
  24612. align-items: center;
  24613. justify-content: space-between;
  24614. margin: 10px 0 0 0;
  24615. font-size: 18px;
  24616. }
  24617. .a_add_checkType {
  24618. margin-top: 10px;
  24619. display: flex;
  24620. font-size: 14px;
  24621. align-items: center;
  24622. }
  24623. .a_add_checkType span {
  24624. box-sizing: border-box;
  24625. padding: 0 0 5px 0;
  24626. cursor: pointer;
  24627. }
  24628. .a_add_checkType span+span {
  24629. margin-left: 10px;
  24630. }
  24631. .a_add_checkType .active {
  24632. border-bottom: 2px solid #409eff;
  24633. color: #409eff;
  24634. }
  24635. .a_add_head .a_add_head_input {
  24636. /* width: 540px; */
  24637. width: 100%;
  24638. }
  24639. .a_add_head .a_add_head_div {
  24640. display: flex;
  24641. align-items: center;
  24642. justify-content: space-between;
  24643. }
  24644. .a_add_body {
  24645. display: flex;
  24646. /* align-items: center; */
  24647. align-items: flex-end;
  24648. }
  24649. .a_add_input {
  24650. display: flex;
  24651. align-items: center;
  24652. flex-wrap: wrap;
  24653. }
  24654. .a_add_input_choice {
  24655. flex-direction: column;
  24656. margin-right: 10px;
  24657. }
  24658. .a_add_input_choice>>>.el-radio {
  24659. display: flex;
  24660. align-items: center;
  24661. flex-direction: row-reverse;
  24662. margin: 30px 0 0 0;
  24663. position: relative;
  24664. }
  24665. .a_add_input_choice>>>.el-checkbox {
  24666. display: flex;
  24667. align-items: center;
  24668. flex-direction: row-reverse;
  24669. margin: 30px 0 0 0;
  24670. position: relative;
  24671. }
  24672. .width100 {
  24673. width: 100%;
  24674. }
  24675. .a_add_input .a_add_persent {
  24676. width: 100%;
  24677. }
  24678. .a_add_persent_div {
  24679. width: 100%;
  24680. display: flex;
  24681. align-items: center;
  24682. }
  24683. .a_add_persent_div span {
  24684. margin: 5px 0;
  24685. }
  24686. .a_add_persent_div span:nth-child(1) {
  24687. width: 30%;
  24688. }
  24689. .a_add_persent_div span:nth-child(2) {
  24690. width: 7%;
  24691. }
  24692. .a_add_persent_div span:nth-child(3) {
  24693. width: 40%;
  24694. }
  24695. .a_add_body_div {
  24696. display: flex;
  24697. align-items: center;
  24698. justify-content: center;
  24699. /* flex-direction: column; */
  24700. position: absolute;
  24701. right: -20px;
  24702. transform: translateX(100%);
  24703. }
  24704. .a_add_body_div>>>.el-button--primary {
  24705. background: #466b99;
  24706. border: none;
  24707. }
  24708. .all_choose {
  24709. display: flex;
  24710. flex-direction: row;
  24711. align-items: flex-start;
  24712. width: 100%;
  24713. }
  24714. .all_choose+.all_choose {
  24715. /* margin-top: 10px */
  24716. }
  24717. .all_choose>span {
  24718. min-width: fit-content;
  24719. display: block;
  24720. white-space: nowrap;
  24721. overflow: hidden;
  24722. text-overflow: ellipsis;
  24723. margin-right: 20px;
  24724. font-weight: bold;
  24725. font-size: 14px;
  24726. }
  24727. .all_choose>>>.el-checkbox-group {
  24728. display: flex;
  24729. flex-direction: row;
  24730. width: 100%;
  24731. flex-wrap: wrap;
  24732. align-content: center;
  24733. justify-content: flex-start;
  24734. align-items: center;
  24735. margin-top: 3px;
  24736. }
  24737. .all_choose>.el-checkbox-group>>>.el-checkbox {
  24738. margin-bottom: 10px;
  24739. display: flex;
  24740. flex-direction: row;
  24741. align-items: center;
  24742. margin-right: 10px;
  24743. }
  24744. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  24745. min-width: 80px;
  24746. overflow: hidden;
  24747. width: 80px;
  24748. text-overflow: ellipsis;
  24749. white-space: nowrap;
  24750. }
  24751. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  24752. width: auto;
  24753. }
  24754. .choose>div:nth-child(3)>span {
  24755. /* letter-spacing: 0 !important; */
  24756. }
  24757. .choose {
  24758. display: flex;
  24759. flex-direction: column;
  24760. flex-wrap: nowrap;
  24761. height: 100%;
  24762. justify-content: space-evenly;
  24763. align-items: flex-start;
  24764. }
  24765. .both {
  24766. display: flex;
  24767. flex-direction: row;
  24768. flex-wrap: wrap;
  24769. width: 100%;
  24770. align-items: center;
  24771. justify-content: flex-start;
  24772. margin: 15px 0;
  24773. }
  24774. .notice>>>.el-dialog {
  24775. width: 500px !important;
  24776. text-align: center;
  24777. }
  24778. .notice>>>.el-button {
  24779. margin-top: 20px;
  24780. }
  24781. .whiteBg {
  24782. /* background: #fff; */
  24783. border-radius: 10px;
  24784. }
  24785. .wb_j_box {
  24786. display: flex;
  24787. width: 100%;
  24788. padding: 0 20px 0;
  24789. box-sizing: border-box;
  24790. }
  24791. .wb_j_box_content {
  24792. width: calc(100% - 55% - 100px);
  24793. display: flex;
  24794. align-items: center;
  24795. }
  24796. .wb_j_box_p_box {
  24797. max-width: calc(100% - 200px);
  24798. word-break: break-all;
  24799. overflow: hidden;
  24800. margin: 0 0 0 10px;
  24801. font-size: 14px;
  24802. color: #6e6e6e;
  24803. z-index: 999;
  24804. }
  24805. .chooseWho {
  24806. display: flex;
  24807. width: 410px;
  24808. flex-direction: row;
  24809. flex-wrap: nowrap;
  24810. justify-content: space-between;
  24811. padding-bottom: 10px;
  24812. }
  24813. .chooseWho>div {
  24814. cursor: pointer;
  24815. padding-bottom: 10px;
  24816. font-weight: bold;
  24817. }
  24818. .isChooseActive {
  24819. color: #3e88f4;
  24820. border-bottom: 2px solid #2f80f3;
  24821. }
  24822. .toolSort {
  24823. display: flex;
  24824. flex-direction: row;
  24825. flex-wrap: wrap;
  24826. justify-content: flex-start;
  24827. align-items: flex-start;
  24828. }
  24829. .toolSort>div {
  24830. margin-right: 10px;
  24831. }
  24832. .tools {
  24833. width: 100%;
  24834. display: flex;
  24835. flex-direction: column;
  24836. flex-wrap: nowrap;
  24837. align-items: flex-start;
  24838. }
  24839. .leftTools,
  24840. .rightTools {
  24841. width: 50%;
  24842. }
  24843. .leftTools+.leftTools {
  24844. border-top: 1px solid #dbdbdb;
  24845. padding-top: 30px;
  24846. }
  24847. .rightTools {
  24848. display: flex;
  24849. flex-direction: row;
  24850. flex-wrap: nowrap;
  24851. justify-content: space-around;
  24852. }
  24853. .firstToolList {
  24854. display: flex;
  24855. flex-direction: column;
  24856. flex-wrap: nowrap;
  24857. align-items: center;
  24858. }
  24859. .iconList {
  24860. display: flex;
  24861. flex-direction: row;
  24862. flex-wrap: wrap;
  24863. justify-content: flex-start;
  24864. align-items: center;
  24865. margin: 20px 0 5px 0;
  24866. width: 240px;
  24867. min-width: 240px;
  24868. }
  24869. .iconTool {
  24870. display: flex;
  24871. flex-direction: column;
  24872. flex-wrap: nowrap;
  24873. align-items: center;
  24874. justify-content: flex-start;
  24875. margin: 15px 10px;
  24876. }
  24877. .toolIcon {
  24878. width: 50px;
  24879. }
  24880. .taskBorder {
  24881. /* border: 1px solid #CAD1DC; */
  24882. border-radius: 10px;
  24883. margin-top: 10px;
  24884. min-height: 670px;
  24885. position: relative;
  24886. background: #fff;
  24887. padding: 20px;
  24888. overflow: hidden;
  24889. box-sizing: border-box;
  24890. }
  24891. .smallTaskBorder {
  24892. height: 405px;
  24893. min-height: 405px !important;
  24894. overflow: hidden;
  24895. }
  24896. /* .taskBorder>div {
  24897. padding: 30px 30px 10px;
  24898. } */
  24899. .addTaskBorder {
  24900. /* border: 2px solid #5E9AFC; */
  24901. border-radius: 8px;
  24902. margin-top: 10px;
  24903. cursor: pointer;
  24904. /* height: 50px;
  24905. line-height: 50px; */
  24906. background: #fff;
  24907. padding: 15px 0;
  24908. display: flex;
  24909. align-items: center;
  24910. justify-content: center;
  24911. }
  24912. /* .addTaskBorder>div {
  24913. margin: 0 auto;
  24914. display: flex;
  24915. align-items: center;
  24916. justify-content: center;
  24917. }
  24918. .addTaskBorder>div>img {
  24919. width: 20px;
  24920. }
  24921. .addTaskBorder>div>span {
  24922. font-size: 16px;
  24923. margin-left: 10px;
  24924. color: #5E9AFC;
  24925. } */
  24926. .funBlock {
  24927. display: flex;
  24928. padding: 15px 0;
  24929. flex-direction: row;
  24930. justify-content: center;
  24931. align-items: center;
  24932. position: absolute;
  24933. right: 0;
  24934. bottom: 0;
  24935. background: #fff;
  24936. width: 100%;
  24937. height: 60px;
  24938. z-index: 9;
  24939. }
  24940. .fold {
  24941. display: flex;
  24942. margin: 0 20px;
  24943. flex-direction: row;
  24944. align-items: center;
  24945. cursor: pointer;
  24946. color: #2b7bff;
  24947. }
  24948. .arrow {
  24949. margin-right: 8px;
  24950. width: 16px;
  24951. height: 16px;
  24952. min-width: 16px;
  24953. min-height: 16px;
  24954. background-size: 100% 100%;
  24955. display: block;
  24956. background-image: url(../../../assets/icon/new/u_up.png);
  24957. /* border-left: 7px solid transparent;
  24958. border-bottom: 7px solid #717C8D;
  24959. border-top: 0px solid transparent;
  24960. border-right: 7px solid transparent; */
  24961. /* box-sizing: border-box; */
  24962. transition: all 0.3s;
  24963. }
  24964. .arrowZ {
  24965. transform: rotate(180deg);
  24966. }
  24967. .addToolFun {
  24968. display: flex;
  24969. width: 150px;
  24970. flex-direction: row;
  24971. align-items: center;
  24972. justify-content: center;
  24973. border: 2px dashed #cad1dc;
  24974. border-radius: 5px;
  24975. height: 50px;
  24976. margin: 35px auto 0;
  24977. cursor: pointer;
  24978. }
  24979. .addToolFun2 {
  24980. display: flex;
  24981. width: 150px;
  24982. border: 2px dashed #cad1dc;
  24983. flex-direction: row;
  24984. align-items: center;
  24985. justify-content: center;
  24986. border-radius: 5px;
  24987. height: 50px;
  24988. margin: 0 auto 0;
  24989. cursor: pointer;
  24990. }
  24991. .addToolFun2>div,
  24992. .addToolFun>div {
  24993. display: flex;
  24994. line-height: 50px;
  24995. }
  24996. .addToolImg {
  24997. width: 20px;
  24998. height: 20px;
  24999. margin-right: 10px;
  25000. }
  25001. .addToolsDia>>>.el-dialog__body {
  25002. padding: 20px;
  25003. }
  25004. .addToolsDia>>>.el-dialog__body>.toolChoose {
  25005. padding: 0;
  25006. }
  25007. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  25008. padding: 0;
  25009. border-bottom: none;
  25010. margin-bottom: 0;
  25011. }
  25012. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  25013. width: 100%;
  25014. }
  25015. .lineCss>>>.el-form-item__label {
  25016. width: auto !important;
  25017. }
  25018. .lineCss>>>.el-form-item__content {
  25019. margin-left: 50px !important;
  25020. }
  25021. .newSteps {
  25022. display: flex;
  25023. width: 100% !important;
  25024. /* height: 80px; */
  25025. cursor: pointer;
  25026. margin: 10px 0;
  25027. border-radius: 10px;
  25028. flex-direction: row;
  25029. align-content: center;
  25030. justify-content: center;
  25031. align-items: center;
  25032. margin: 0 !important;
  25033. }
  25034. /* 评价样式 */
  25035. .elist_css {
  25036. padding-bottom: 75px !important;
  25037. }
  25038. .elist_title {
  25039. margin-bottom: 10px;
  25040. }
  25041. .elist_input {
  25042. width: 100%;
  25043. }
  25044. .elist_input_box {
  25045. display: flex;
  25046. align-items: center;
  25047. flex-wrap: wrap;
  25048. }
  25049. .elist_input_box+.elist_input_box {
  25050. margin-top: 30px;
  25051. }
  25052. .elist_input .elist_input_box input {
  25053. font: inherit;
  25054. color: currentColor;
  25055. width: 100%;
  25056. /* max-width: calc(100% - 385px); */
  25057. max-width: calc(100% - 150px);
  25058. padding: 8px 14px;
  25059. display: block;
  25060. min-width: 0;
  25061. outline: none;
  25062. border: 1px solid rgba(0, 0, 0, 0.23);
  25063. border-radius: 4px;
  25064. box-sizing: border-box;
  25065. background: #fff;
  25066. margin: 0 20px 0 0;
  25067. }
  25068. .elist_input .elist_input_box span {
  25069. height: 36px;
  25070. line-height: 36px;
  25071. color: rgb(82, 82, 82);
  25072. min-width: 80px;
  25073. }
  25074. .elist_input .elist_input_box .remove {
  25075. height: 20px;
  25076. width: 20px;
  25077. min-height: 20px;
  25078. min-width: 20px;
  25079. background-size: 100% 100%;
  25080. background-position: unset;
  25081. margin-left: 5px;
  25082. }
  25083. .elist_input_box>>>.el-rate {
  25084. display: flex;
  25085. height: 36px;
  25086. align-items: center;
  25087. }
  25088. .elist_input_box .elist_inptu_text {
  25089. width: 100%;
  25090. display: flex;
  25091. align-items: center;
  25092. margin-top: 10px;
  25093. }
  25094. .elist_input_box .elist_inptu_text input {
  25095. /* width: 500px; */
  25096. width: 100%;
  25097. max-width: unset;
  25098. }
  25099. .elist_input_box>>>.el-rate__icon {
  25100. font-size: 24px;
  25101. }
  25102. .elist_btn {
  25103. margin-top: 10px;
  25104. }
  25105. .lineTitle {
  25106. /* margin-top: 15px; */
  25107. width: 110px;
  25108. font-size: 16px;
  25109. display: flex;
  25110. align-items: center;
  25111. line-height: 20px;
  25112. }
  25113. .lineTitle::before {
  25114. content: "";
  25115. display: block;
  25116. width: 3px;
  25117. height: 20px;
  25118. background: #0061ff;
  25119. border-radius: 3px;
  25120. margin: 0 5px 0 0;
  25121. }
  25122. .clineTitle::before {
  25123. content: "";
  25124. display: block;
  25125. min-width: 10px;
  25126. width: 10px;
  25127. height: 10px;
  25128. background: #0061ff;
  25129. border-radius: 50%;
  25130. margin: 0 5px 0 0;
  25131. }
  25132. .courseTop {
  25133. display: flex;
  25134. flex-direction: row;
  25135. justify-content: space-between;
  25136. align-items: center;
  25137. width: calc(100% - 40px);
  25138. margin: 0 auto;
  25139. padding: 10px 0;
  25140. }
  25141. .stepsNav {
  25142. display: flex;
  25143. flex-direction: row;
  25144. justify-content: flex-start;
  25145. align-items: center;
  25146. }
  25147. .stepsWord {
  25148. font-size: 18px;
  25149. color: #fff;
  25150. font-weight: bold;
  25151. margin-left: auto;
  25152. background: rgb(15, 126, 255);
  25153. border-radius: 5px;
  25154. padding: 3px 25px;
  25155. box-sizing: border-box;
  25156. }
  25157. .stepBox {
  25158. width: calc(100% - 40px);
  25159. height: calc(100% - 50px);
  25160. overflow: hidden;
  25161. border-radius: 5px;
  25162. margin: 0 auto;
  25163. }
  25164. .rightBox {
  25165. width: calc(100%);
  25166. background: #f0f2f5;
  25167. /* border-radius: 10px; */
  25168. overflow: auto;
  25169. height: calc(100% - 150px);
  25170. margin: 0 auto;
  25171. position: relative;
  25172. box-sizing: border-box;
  25173. }
  25174. .e_add_top {
  25175. display: flex;
  25176. justify-content: space-between;
  25177. background: #fff;
  25178. position: absolute;
  25179. right: 20px;
  25180. height: 50px;
  25181. align-items: center;
  25182. }
  25183. .e_add_title2 {
  25184. display: flex;
  25185. align-items: center;
  25186. }
  25187. .e_add_title2 span {
  25188. width: 40px;
  25189. }
  25190. .e_add_title {
  25191. display: flex;
  25192. align-items: center;
  25193. color: #b8b8b8;
  25194. font-size: 18px;
  25195. position: relative;
  25196. height: 40px;
  25197. }
  25198. .e_add_title span {
  25199. margin-right: 10px;
  25200. }
  25201. .e_add_title .el_input {
  25202. width: 300px;
  25203. }
  25204. .e_add_title>>>.el-input__inner {
  25205. width: 400px;
  25206. }
  25207. .e_add_btn {}
  25208. .e_add_content {
  25209. display: flex;
  25210. width: 100%;
  25211. }
  25212. .e_add_list {
  25213. background: #fff;
  25214. height: 500px;
  25215. width: 210px;
  25216. position: relative;
  25217. margin: 15px 5px 0 0;
  25218. flex-shrink: 0;
  25219. display: flex;
  25220. flex-direction: column;
  25221. }
  25222. .e_add_list_title {
  25223. font-size: 20px;
  25224. width: 100%;
  25225. box-sizing: border-box;
  25226. padding: 15px 40px;
  25227. text-align: center;
  25228. border-bottom: 1px solid #eaeaea;
  25229. position: relative;
  25230. display: flex;
  25231. align-items: center;
  25232. justify-content: center;
  25233. height: 57px;
  25234. background: #f6f6f6;
  25235. }
  25236. .e_add_list_title span {
  25237. overflow: hidden;
  25238. white-space: nowrap;
  25239. text-overflow: ellipsis;
  25240. }
  25241. .e_add_list_title img {
  25242. position: absolute;
  25243. right: 15px;
  25244. width: 25px;
  25245. cursor: pointer;
  25246. top: 50%;
  25247. transform: translateY(-50%);
  25248. }
  25249. .e_add_list_body {
  25250. height: calc(100% - 187px);
  25251. overflow: auto;
  25252. }
  25253. .e_add_list_child {
  25254. width: 100%;
  25255. display: flex;
  25256. align-items: center;
  25257. justify-content: center;
  25258. position: relative;
  25259. box-sizing: border-box;
  25260. padding: 15px 40px;
  25261. text-align: center;
  25262. }
  25263. .e_add_list_child span {
  25264. overflow: hidden;
  25265. white-space: nowrap;
  25266. text-overflow: ellipsis;
  25267. cursor: pointer;
  25268. }
  25269. .e_add_list_child img {
  25270. position: absolute;
  25271. right: 10px;
  25272. width: 21px;
  25273. cursor: pointer;
  25274. top: 50%;
  25275. transform: translateY(-50%);
  25276. }
  25277. .e_add_list_child+.e_add_list_child {
  25278. border-top: 1px solid #eaeaea;
  25279. }
  25280. .e_add_list_child .active {
  25281. color: #409eff;
  25282. }
  25283. .e_add_list_btn {
  25284. position: absolute;
  25285. bottom: 0;
  25286. height: 50px;
  25287. background: rgb(120, 120, 254);
  25288. width: 100%;
  25289. color: #fff;
  25290. font-size: 16px;
  25291. text-align: center;
  25292. line-height: 50px;
  25293. cursor: pointer;
  25294. }
  25295. .e_add_list_detail {
  25296. position: absolute;
  25297. bottom: 0;
  25298. height: 130px;
  25299. background: rgb(120, 120, 254);
  25300. width: 100%;
  25301. color: #fff;
  25302. font-size: 16px;
  25303. display: flex;
  25304. align-items: center;
  25305. justify-content: center;
  25306. }
  25307. .e_add_list_detail textarea {
  25308. height: 90%;
  25309. width: 95%;
  25310. border: none;
  25311. resize: none;
  25312. outline: none;
  25313. padding: 5px;
  25314. box-sizing: border-box;
  25315. }
  25316. .e_add_list_pbox {
  25317. width: 100%;
  25318. }
  25319. .e_add_list_pbox_title {
  25320. height: 50px;
  25321. background: #fff;
  25322. display: flex;
  25323. align-items: center;
  25324. width: 100%;
  25325. box-sizing: border-box;
  25326. padding: 0 20px;
  25327. flex-direction: row;
  25328. flex-wrap: wrap;
  25329. }
  25330. .type_title {
  25331. font-size: 18px;
  25332. font-weight: 700;
  25333. }
  25334. .type_content {
  25335. font-size: 16px;
  25336. margin-left: 30px;
  25337. }
  25338. .type_content span+span {
  25339. margin-left: 20px;
  25340. }
  25341. .type_content span {
  25342. cursor: pointer;
  25343. padding-bottom: 5px;
  25344. box-sizing: border-box;
  25345. }
  25346. .type_content .active {
  25347. color: #409eff;
  25348. border-bottom: 2px solid #409eff;
  25349. }
  25350. .e_add_list_pbox_content {
  25351. height: calc(100% - 50px);
  25352. display: flex;
  25353. align-items: center;
  25354. width: 100%;
  25355. background: #fff;
  25356. }
  25357. .mbCss {
  25358. width: 100%;
  25359. display: flex;
  25360. flex-direction: row;
  25361. flex-wrap: nowrap;
  25362. align-content: center;
  25363. align-items: flex-start;
  25364. justify-content: flex-start;
  25365. }
  25366. .pjCss {
  25367. /* width: 42%; */
  25368. width: calc(100% - 55%);
  25369. display: flex;
  25370. flex-direction: column;
  25371. flex-wrap: nowrap;
  25372. align-items: flex-start;
  25373. }
  25374. .e_box {
  25375. /* display: flex; */
  25376. flex-wrap: wrap;
  25377. max-height: 500px;
  25378. align-items: flex-start;
  25379. overflow: auto;
  25380. width: 100%;
  25381. }
  25382. .e_card {
  25383. border: 1px solid #ccc;
  25384. background: #fff;
  25385. margin-right: 20px;
  25386. width: 270px;
  25387. display: flex;
  25388. flex-direction: column;
  25389. align-items: center;
  25390. border-radius: 5px;
  25391. margin-top: 10px;
  25392. text-align: center;
  25393. }
  25394. .e_card_picture {
  25395. margin: 10px 0;
  25396. }
  25397. .e_card_picture>img {
  25398. width: 50px;
  25399. }
  25400. .e_card_name {
  25401. width: 100%;
  25402. padding: 0 10px;
  25403. box-sizing: border-box;
  25404. margin-bottom: 10px;
  25405. overflow: hidden;
  25406. text-overflow: ellipsis;
  25407. white-space: nowrap;
  25408. }
  25409. .e_card_time {
  25410. width: 100%;
  25411. padding: 0 10px;
  25412. box-sizing: border-box;
  25413. font-size: 15px;
  25414. color: #c3c3c3;
  25415. margin-bottom: 10px;
  25416. }
  25417. .e_card_btn {
  25418. height: 40px;
  25419. display: flex;
  25420. align-items: center;
  25421. width: 100%;
  25422. background: rgb(244, 244, 244);
  25423. }
  25424. .e_card_btn:hover {
  25425. background: rgb(221 221 221);
  25426. }
  25427. .e_card_btn span {
  25428. flex: 1 1 auto;
  25429. text-align: center;
  25430. cursor: pointer;
  25431. }
  25432. .addEva {
  25433. border: 1px solid #ccc;
  25434. background: #fff;
  25435. margin-right: 20px;
  25436. width: 270px;
  25437. height: 149px;
  25438. display: flex;
  25439. flex-direction: column;
  25440. align-items: center;
  25441. border-radius: 5px;
  25442. margin-top: 10px;
  25443. text-align: center;
  25444. cursor: pointer;
  25445. justify-content: center;
  25446. }
  25447. .addEva>img {
  25448. width: 50px;
  25449. object-fit: cover;
  25450. }
  25451. .uploadFm {
  25452. border: 1px dashed #ccc;
  25453. width: 100%;
  25454. height: 140px;
  25455. position: relative;
  25456. cursor: pointer;
  25457. display: flex;
  25458. flex-direction: column;
  25459. justify-content: center;
  25460. align-items: center;
  25461. font-size: 14px;
  25462. color: #6e6e6e;
  25463. position: relative;
  25464. }
  25465. .cover_p {
  25466. width: 100% !important;
  25467. height: 100%;
  25468. object-fit: cover;
  25469. }
  25470. .uploadFm2:hover .cover_mask {
  25471. display: flex !important;
  25472. }
  25473. .cover_mask {
  25474. display: none;
  25475. width: 100%;
  25476. height: 100%;
  25477. position: absolute;
  25478. background: #00000054;
  25479. align-items: center;
  25480. justify-content: center;
  25481. flex-direction: column;
  25482. }
  25483. .cover_mask>img {
  25484. width: 30px;
  25485. }
  25486. .cover_mask>span {
  25487. color: #fff;
  25488. font-size: 12px;
  25489. }
  25490. .uploadFm>img {
  25491. width: 50px;
  25492. }
  25493. .fileCss {
  25494. width: 100%;
  25495. display: flex;
  25496. flex-direction: row;
  25497. flex-wrap: nowrap;
  25498. justify-content: space-around;
  25499. align-items: center;
  25500. padding-top: 15px;
  25501. }
  25502. .fileCss>div {
  25503. display: flex;
  25504. flex-direction: column;
  25505. align-items: center;
  25506. }
  25507. .fileCss .spanName {
  25508. margin-top: 10px;
  25509. }
  25510. .sysPicBox {
  25511. display: flex;
  25512. flex-direction: row;
  25513. flex-wrap: wrap;
  25514. align-content: flex-start;
  25515. height: 435px;
  25516. overflow: auto;
  25517. position: relative;
  25518. }
  25519. .picNone {
  25520. position: absolute;
  25521. left: 50%;
  25522. top: 45%;
  25523. transform: translate(-50%, -50%);
  25524. width: fit-content;
  25525. color: #9c9c9c;
  25526. }
  25527. .sysPic {
  25528. width: 200px;
  25529. height: 115px;
  25530. margin: 0 20px 20px 0;
  25531. cursor: pointer;
  25532. }
  25533. .sysPic>img,
  25534. .isSysPic>img,
  25535. .deletePic>img {
  25536. width: 100%;
  25537. height: 100%;
  25538. object-fit: cover;
  25539. }
  25540. .isSysPic {
  25541. width: 200px;
  25542. height: 115px;
  25543. position: relative;
  25544. }
  25545. .deletePic {
  25546. width: 20px;
  25547. height: 20px;
  25548. position: absolute;
  25549. top: 0;
  25550. right: 0;
  25551. cursor: pointer;
  25552. }
  25553. .select_box1 {
  25554. height: 100%;
  25555. }
  25556. .select_box1_img {
  25557. background: #fff;
  25558. border-radius: 5px;
  25559. padding: 15px;
  25560. box-sizing: border-box;
  25561. margin-bottom: 20px;
  25562. }
  25563. .select_box1_title {
  25564. padding: 0 0 15px 0;
  25565. border-bottom: 1px solid #eee;
  25566. margin-bottom: 15px;
  25567. }
  25568. .select_box1_title span:nth-child(1) {
  25569. font-size: 16px;
  25570. margin-right: 20px;
  25571. color: #000;
  25572. }
  25573. .select_box1_title span:nth-child(2) {
  25574. font-size: 14px;
  25575. color: rgb(112, 112, 112);
  25576. }
  25577. .select_box1_add_img {}
  25578. .select_box1_select {
  25579. background: #fff;
  25580. border-radius: 5px;
  25581. padding: 15px;
  25582. box-sizing: border-box;
  25583. height: calc(100% - 200px);
  25584. overflow: auto;
  25585. }
  25586. .select_box2 {
  25587. height: 100%;
  25588. }
  25589. .select_box2_title {
  25590. background: #fff;
  25591. border-radius: 5px;
  25592. padding: 5px 10px;
  25593. box-sizing: border-box;
  25594. margin-bottom: 10px;
  25595. }
  25596. .select_box2_box {
  25597. display: flex;
  25598. height: calc(100% - 30px);
  25599. }
  25600. .select_box2_img {
  25601. width: calc(100% - 310px);
  25602. height: 100%;
  25603. overflow: auto;
  25604. background: #fff;
  25605. border-radius: 5px;
  25606. }
  25607. .select_box2_img img {
  25608. width: 100%;
  25609. }
  25610. .select_box2_answer {
  25611. background: #fff;
  25612. margin-left: 10px;
  25613. border-radius: 5px;
  25614. width: 300px;
  25615. overflow: auto;
  25616. height: 100%;
  25617. display: flex;
  25618. flex-direction: column;
  25619. align-items: center;
  25620. padding-top: 10px;
  25621. box-sizing: border-box;
  25622. }
  25623. .select_box2_answer_box {
  25624. margin: 0 0 10px 0;
  25625. width: 85%;
  25626. }
  25627. .rate_textarea {
  25628. font: inherit;
  25629. color: currentColor;
  25630. width: 100%;
  25631. padding: 8px 14px;
  25632. display: block;
  25633. min-width: 0;
  25634. outline: none;
  25635. border: 1px solid rgba(0, 0, 0, 0.23);
  25636. border-radius: 4px;
  25637. box-sizing: border-box;
  25638. background: #fff;
  25639. margin: 0 20px 0 0;
  25640. resize: none;
  25641. }
  25642. .select_answer_title {
  25643. text-align: left;
  25644. width: 85%;
  25645. margin-bottom: 10px;
  25646. font-size: 18px;
  25647. color: #8e8e8e;
  25648. }
  25649. .mask {
  25650. background-color: rgb(0 0 0 / 30%);
  25651. /* position: fixed; */
  25652. position: absolute;
  25653. top: 0;
  25654. left: 0;
  25655. width: 100%;
  25656. height: 100%;
  25657. z-index: 90;
  25658. display: flex;
  25659. align-items: center;
  25660. justify-content: center;
  25661. }
  25662. .progressBox {
  25663. width: 300px;
  25664. height: 150px;
  25665. background: #fff;
  25666. border-radius: 10px;
  25667. box-shadow: 0 0 6px 1px #bfbfbf;
  25668. display: flex;
  25669. align-items: center;
  25670. justify-content: center;
  25671. flex-direction: column;
  25672. position: relative;
  25673. color: #6c6c6c;
  25674. }
  25675. .progressBox>>>.el-progress-bar__outer {
  25676. background-color: #d1dfff !important;
  25677. }
  25678. .progressBox .lbox {
  25679. height: 50px;
  25680. font-size: 19px;
  25681. display: flex;
  25682. align-items: center;
  25683. color: #747474;
  25684. }
  25685. .progressBox .lbox img {
  25686. width: 40px;
  25687. margin-right: 20px;
  25688. }
  25689. .closeCss {
  25690. position: absolute;
  25691. top: 8px;
  25692. right: 8px;
  25693. cursor: pointer;
  25694. width: 20px;
  25695. height: 20px;
  25696. }
  25697. .closeCss>img {
  25698. width: 100%;
  25699. height: 100%;
  25700. }
  25701. .updateTips::before {
  25702. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  25703. font-size: 14px;
  25704. margin-left: 20px;
  25705. font-weight: 400;
  25706. color: #ff3a3a;
  25707. margin-bottom: 10px;
  25708. display: block;
  25709. }
  25710. .updateMask {
  25711. width: 100%;
  25712. z-index: 3;
  25713. top: 0;
  25714. position: absolute;
  25715. /* background-color: rgba(0,0,0,.3); */
  25716. }
  25717. .t_j_box {
  25718. display: flex;
  25719. }
  25720. .t_j_box span:nth-child(1) {
  25721. width: 15%;
  25722. overflow: hidden;
  25723. margin-right: 10px;
  25724. text-overflow: ellipsis;
  25725. white-space: nowrap;
  25726. }
  25727. .t_j_box span:nth-child(2) {
  25728. width: 30%;
  25729. overflow: hidden;
  25730. text-overflow: ellipsis;
  25731. margin-right: 10px;
  25732. }
  25733. .t_j_box span:nth-child(3) {
  25734. max-width: calc(55% - 20px);
  25735. overflow: hidden;
  25736. text-overflow: ellipsis;
  25737. }
  25738. .sentenBox {
  25739. background: #fff;
  25740. height: 600px;
  25741. overflow: auto;
  25742. background-image: url("../../../assets/icon/conSentences/csBg.png");
  25743. background-position: 102%;
  25744. background-repeat: no-repeat;
  25745. background-size: 60%;
  25746. }
  25747. .sentenBox>.sentenContent {
  25748. padding-bottom: 10px;
  25749. width: 97%;
  25750. margin: 0 auto;
  25751. }
  25752. .sentenBox>.sentenContent+.sentenContent {
  25753. border-top: 1px solid #cbcbcb;
  25754. }
  25755. .addSen {
  25756. background: #409efe;
  25757. width: 90px;
  25758. color: #fff;
  25759. height: 35px;
  25760. text-align: center;
  25761. line-height: 35px;
  25762. border-radius: 5px;
  25763. float: right;
  25764. margin: 10px 20px 0 0;
  25765. cursor: pointer;
  25766. }
  25767. .sentenTop {
  25768. display: flex;
  25769. flex-direction: row;
  25770. flex-wrap: nowrap;
  25771. align-items: center;
  25772. }
  25773. .sentenTop::before {
  25774. content: attr(index);
  25775. background: #3681fc;
  25776. border-radius: 50%;
  25777. color: #fff;
  25778. width: 25px;
  25779. height: 25px;
  25780. min-width: 25px;
  25781. min-height: 25px;
  25782. text-align: center;
  25783. line-height: 25px;
  25784. margin-right: 5px;
  25785. }
  25786. .sentenTop>div:nth-child(2) {
  25787. width: 300px;
  25788. margin: 0 15px;
  25789. }
  25790. .sentenTop>div:nth-child(3) {
  25791. background: #409efe;
  25792. color: #fff;
  25793. width: 65px;
  25794. height: 35px;
  25795. text-align: center;
  25796. line-height: 35px;
  25797. border-radius: 5px;
  25798. cursor: pointer;
  25799. }
  25800. .cardList {
  25801. padding: 30px 0 20px 0;
  25802. display: flex;
  25803. flex-direction: row;
  25804. flex-wrap: wrap;
  25805. align-items: center;
  25806. box-sizing: border-box;
  25807. border-bottom: 1px solid #f4f4f4;
  25808. width: 98%;
  25809. margin: 0 auto;
  25810. }
  25811. .rightCardList {
  25812. display: flex;
  25813. flex-wrap: wrap;
  25814. }
  25815. .cardBox {
  25816. display: flex;
  25817. flex-direction: row;
  25818. flex-wrap: wrap;
  25819. align-items: center;
  25820. align-content: center;
  25821. }
  25822. .isCard,
  25823. .isCard1 {
  25824. width: auto;
  25825. padding: 0 20px;
  25826. height: 65px;
  25827. text-align: center;
  25828. line-height: 65px;
  25829. font-size: 14px;
  25830. cursor: pointer;
  25831. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  25832. background-size: 100% 100%;
  25833. position: relative;
  25834. z-index: 99;
  25835. }
  25836. .isCard1 {
  25837. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  25838. }
  25839. .isCard:hover .deleteWord {
  25840. display: block;
  25841. }
  25842. .isCard>div:nth-child(1),
  25843. .isCard1>div:nth-child(1) {
  25844. white-space: nowrap;
  25845. overflow: hidden;
  25846. text-overflow: ellipsis;
  25847. width: 100%;
  25848. margin: 0 auto;
  25849. }
  25850. .card {
  25851. width: 140px;
  25852. height: 65px;
  25853. }
  25854. .card>img {
  25855. width: 100%;
  25856. height: 100%;
  25857. }
  25858. .rightCardBox {
  25859. width: 98%;
  25860. margin: 10px auto 0;
  25861. }
  25862. .rightCardBox>div:nth-child(1) {
  25863. margin-bottom: 10px;
  25864. }
  25865. .cardCss {
  25866. display: flex;
  25867. flex-direction: column;
  25868. flex-wrap: nowrap;
  25869. align-items: center;
  25870. border-bottom: 3px solid #b4c3d3;
  25871. padding: 0 0 5px 0;
  25872. /* margin-right: 10px; */
  25873. }
  25874. .cardCss>div:nth-child(2) {
  25875. background: #5b7b9d;
  25876. color: #fff;
  25877. width: 20px;
  25878. height: 20px;
  25879. border-radius: 50%;
  25880. text-align: center;
  25881. line-height: 20px;
  25882. }
  25883. .sentenTopBox {
  25884. display: flex;
  25885. flex-direction: row;
  25886. flex-wrap: nowrap;
  25887. align-items: center;
  25888. justify-content: space-between;
  25889. padding: 55px 0 0 20px;
  25890. box-sizing: border-box;
  25891. width: 85%;
  25892. }
  25893. .rb_c_ai_box,
  25894. .stepsBottom {
  25895. width: 100%;
  25896. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  25897. /* background: #f7f7f7; */
  25898. border-radius: 10px;
  25899. overflow: hidden;
  25900. /* height: 100%; */
  25901. height: calc(100% - 55px);
  25902. }
  25903. .navTop {
  25904. background: #53749b;
  25905. color: #fff;
  25906. height: 40px;
  25907. line-height: 40px;
  25908. padding-left: 15px;
  25909. font-size: 18px;
  25910. }
  25911. .navBottom {
  25912. /* background: #6b91b7; */
  25913. height: 100%;
  25914. overflow: auto;
  25915. padding: 10px 0;
  25916. }
  25917. .navStage {
  25918. display: flex;
  25919. flex-direction: row;
  25920. flex-wrap: nowrap;
  25921. align-items: center;
  25922. padding: 10px 10px 10px 0;
  25923. cursor: pointer;
  25924. background: #ffffff;
  25925. width: 95%;
  25926. margin: 5px auto 5px;
  25927. box-sizing: border-box;
  25928. border-radius: 5px;
  25929. flex-wrap: wrap;
  25930. position: relative;
  25931. }
  25932. .navStage:hover>.chapter_upload_drag {
  25933. display: block;
  25934. }
  25935. .navTask:hover>.chapter_upload_drag {
  25936. display: block;
  25937. }
  25938. .chapter_upload:hover>.chapter_upload_drag {
  25939. display: block;
  25940. }
  25941. .navStage::before {
  25942. content: "";
  25943. display: block;
  25944. width: 16px;
  25945. height: 16px;
  25946. background-image: url(../../../assets/icon/new/icon_stage.png);
  25947. background-size: 100%;
  25948. margin-left: 25px;
  25949. }
  25950. .navStage .chapter_unit_open {
  25951. content: "";
  25952. display: block;
  25953. width: 16px;
  25954. height: 16px;
  25955. background-image: url(../../../assets/icon/new/down.png);
  25956. transform: rotate(-90deg);
  25957. background-size: 100%;
  25958. margin-left: 10px;
  25959. transition: all 0.5s;
  25960. }
  25961. .isNavStageOpen .chapter_unit_open {
  25962. transform: rotate(0deg);
  25963. }
  25964. .isNavStage {
  25965. background: #0061ff;
  25966. }
  25967. .isNavStage::before {
  25968. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  25969. }
  25970. .isNavStage .chapter_unit_open {
  25971. background-image: url(../../../assets/icon/new/downC.png);
  25972. }
  25973. .isNavStage .nt_taskName {
  25974. font-weight: bold !important;
  25975. color: #ffffff !important;
  25976. }
  25977. .isNavStage .nt_taskTitle {
  25978. font-weight: bold !important;
  25979. color: #fff !important;
  25980. }
  25981. .navStage .nt_taskBox {
  25982. width: calc(100% - 68px);
  25983. padding: 0 0 0 5px;
  25984. box-sizing: border-box;
  25985. box-sizing: border-box;
  25986. display: flex;
  25987. flex-direction: row;
  25988. flex-wrap: nowrap;
  25989. align-items: baseline;
  25990. }
  25991. .navStage .nt_taskTitle {
  25992. color: #060e17;
  25993. line-height: 25px;
  25994. font-size: 16px;
  25995. }
  25996. .navStage .nt_taskName {
  25997. max-width: calc(100% - 82px);
  25998. white-space: nowrap;
  25999. overflow: hidden;
  26000. text-overflow: ellipsis;
  26001. font-size: 16px;
  26002. color: #060e17;
  26003. }
  26004. .navTask {
  26005. display: flex;
  26006. flex-direction: row;
  26007. flex-wrap: nowrap;
  26008. align-items: center;
  26009. padding: 10px 10px 10px 0;
  26010. cursor: pointer;
  26011. background: #ffffff;
  26012. width: 95%;
  26013. margin: 5px auto 5px;
  26014. box-sizing: border-box;
  26015. border-radius: 5px;
  26016. flex-wrap: wrap;
  26017. position: relative;
  26018. }
  26019. .navTask .chapter_upload_open {
  26020. content: "";
  26021. display: block;
  26022. width: 16px;
  26023. height: 16px;
  26024. background-image: url(../../../assets/icon/new/icon_arrow.png);
  26025. background-size: 100%;
  26026. margin-left: 23px;
  26027. }
  26028. .noImage .chapter_upload_open {
  26029. display: none;
  26030. background-image: unset !important;
  26031. }
  26032. .isNavOpen .chapter_upload_open {
  26033. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  26034. transform: rotate(90deg);
  26035. }
  26036. .isNavTask .chapter_upload_open {
  26037. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  26038. transform: rotate(-90deg);
  26039. }
  26040. .isNavTask.isNavOpen .chapter_upload_open {
  26041. transform: rotate(0deg);
  26042. }
  26043. .dragOverTop {
  26044. border-top: 2px solid #0061ff !important;
  26045. border-radius: 0 !important;
  26046. margin-top: 10px;
  26047. }
  26048. .dragOverBottom {
  26049. border-bottom: 2px solid #0061ff !important;
  26050. border-radius: 0 !important;
  26051. margin-top: 10px;
  26052. }
  26053. .dragOverTop2 {
  26054. border-top: 2px solid #0061ff !important;
  26055. border-radius: 0 !important;
  26056. }
  26057. .dragOverBottom2 {
  26058. border-bottom: 2px solid #0061ff !important;
  26059. border-radius: 0 !important;
  26060. }
  26061. .isNavTask {
  26062. /* background: #3681FC; */
  26063. background: #eef3fb;
  26064. }
  26065. .isNavTask>.chapter_upload_drag {
  26066. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  26067. }
  26068. .isNavTask .nt_taskName {
  26069. /* color: #fff !important; */
  26070. font-weight: bold !important;
  26071. color: #0061ff !important;
  26072. }
  26073. .isNavTask .nt_taskTitle {
  26074. /* color: #AECCFE !important; */
  26075. font-weight: bold !important;
  26076. color: #0061ff !important;
  26077. }
  26078. .navTask .nt_taskBox {
  26079. width: calc(100% - 40px);
  26080. padding: 0 0 0 5px;
  26081. box-sizing: border-box;
  26082. box-sizing: border-box;
  26083. display: flex;
  26084. flex-direction: row;
  26085. flex-wrap: nowrap;
  26086. align-items: baseline;
  26087. }
  26088. .navTask .nt_taskTitle {
  26089. /* color: #717C8D; */
  26090. color: #060e17;
  26091. line-height: 25px;
  26092. font-size: 16px;
  26093. /* min-width: 66px; */
  26094. }
  26095. .navTask .nt_taskName {
  26096. /* color: #fff; */
  26097. /* max-width: 130px; */
  26098. /* width: 100%; */
  26099. max-width: calc(100% - 66px);
  26100. font-size: 16px;
  26101. color: #060e17;
  26102. /* color: #0E1E33; */
  26103. }
  26104. .navTask .nt_taskName span {
  26105. width: 100%;
  26106. white-space: nowrap;
  26107. overflow: hidden;
  26108. text-overflow: ellipsis;
  26109. display: block;
  26110. }
  26111. .gjBox {
  26112. width: calc(100% - 25px);
  26113. padding: 0 0 0 0;
  26114. box-sizing: border-box;
  26115. border-left: 1px solid #cad1dc;
  26116. margin-left: 25px;
  26117. }
  26118. .gjBox>div {
  26119. display: flex;
  26120. align-items: center;
  26121. }
  26122. .gjBox>div::before {
  26123. content: "";
  26124. height: 1px;
  26125. width: 10px;
  26126. background: #cad1dc;
  26127. display: block;
  26128. margin-right: 5px;
  26129. }
  26130. .gjCss {
  26131. display: flex;
  26132. flex-direction: row;
  26133. flex-wrap: nowrap;
  26134. align-items: center;
  26135. padding: 15px 0;
  26136. box-sizing: border-box;
  26137. font-size: 14px;
  26138. cursor: pointer;
  26139. }
  26140. .isGjCss {
  26141. color: #0061ff;
  26142. }
  26143. .groupBox {}
  26144. .groupContent+.groupContent {
  26145. margin-top: 30px;
  26146. }
  26147. .groupTitle {
  26148. font-size: 24px;
  26149. color: rgb(80, 80, 80);
  26150. margin-bottom: 20px;
  26151. }
  26152. .groupName {
  26153. display: flex;
  26154. align-items: center;
  26155. }
  26156. .groupn {
  26157. font-size: 15px;
  26158. margin-right: 10px;
  26159. }
  26160. .groupName+.groupName {
  26161. margin-top: 15px;
  26162. }
  26163. .groupBtn {
  26164. margin-left: 10px;
  26165. }
  26166. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  26167. text-align: left;
  26168. }
  26169. .radioBox>div {
  26170. margin: 10px 0 0 10px;
  26171. }
  26172. .radioBox>>>.el-radio__input,
  26173. .radioBox>>>.el-checkbox__inner {
  26174. margin-left: 10px;
  26175. }
  26176. .radioBox>>>.el-radio__label,
  26177. .radioBox>>>.el-checkbox__label {
  26178. display: flex;
  26179. align-items: center;
  26180. }
  26181. .inImg {
  26182. width: 50px;
  26183. }
  26184. .inImg>img {
  26185. width: 100%;
  26186. height: 100%;
  26187. object-fit: cover;
  26188. }
  26189. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  26190. height: auto;
  26191. padding: 10px;
  26192. margin: 0;
  26193. }
  26194. .upCss>>>.el-upload-list {
  26195. width: 100%;
  26196. }
  26197. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  26198. width: 100%;
  26199. height: 120px;
  26200. object-fit: contain;
  26201. background: unset;
  26202. margin-left: 0;
  26203. }
  26204. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  26205. display: none;
  26206. }
  26207. .tcMember+.tcMember::before {
  26208. content: "、";
  26209. }
  26210. .xzUpImg {
  26211. width: 25px;
  26212. height: 25px;
  26213. min-width: 25px;
  26214. min-height: 25px;
  26215. cursor: pointer;
  26216. margin: 0 10px;
  26217. }
  26218. .xzUpImg>img {
  26219. width: 100%;
  26220. height: 100%;
  26221. }
  26222. .closeCss {
  26223. position: absolute;
  26224. top: 8px;
  26225. right: 8px;
  26226. cursor: pointer;
  26227. width: 20px;
  26228. height: 20px;
  26229. }
  26230. .closeCss>img {
  26231. width: 100%;
  26232. height: 100%;
  26233. }
  26234. .moveBtn {
  26235. display: flex;
  26236. flex-direction: row;
  26237. flex-wrap: nowrap;
  26238. align-items: center;
  26239. width: 55px;
  26240. }
  26241. .timuUpImg {
  26242. display: flex;
  26243. flex-direction: row;
  26244. align-items: center;
  26245. width: 100%;
  26246. margin-right: 10px;
  26247. }
  26248. .timuUpImg>div:nth-child(1) {
  26249. margin-right: 10px;
  26250. display: flex;
  26251. align-items: center;
  26252. width: 100%;
  26253. }
  26254. .timuImgBox {
  26255. margin: 10px 0;
  26256. display: flex;
  26257. flex-direction: column;
  26258. flex-wrap: wrap;
  26259. align-items: flex-start;
  26260. }
  26261. .timuImg {
  26262. width: 100px;
  26263. margin: 5px 0;
  26264. cursor: pointer;
  26265. position: relative;
  26266. }
  26267. .timuImg:hover .deleteWord {
  26268. display: block;
  26269. }
  26270. .deleteWord {
  26271. width: 25px;
  26272. height: 25px;
  26273. position: absolute;
  26274. right: -5px;
  26275. top: -5px;
  26276. cursor: pointer;
  26277. display: none;
  26278. }
  26279. .timuImg>img,
  26280. .deleteWord>img {
  26281. width: 100%;
  26282. height: 100%;
  26283. object-fit: cover;
  26284. }
  26285. .e_add_delete {
  26286. cursor: pointer;
  26287. margin-left: 10px;
  26288. }
  26289. .pType_box {
  26290. margin-top: 30px;
  26291. align-items: flex-end;
  26292. }
  26293. .noneBox {
  26294. height: 200px;
  26295. width: 100%;
  26296. display: flex;
  26297. align-items: center;
  26298. justify-content: center;
  26299. flex-direction: column;
  26300. /* margin-top: 150px; */
  26301. }
  26302. .noneBox>img {
  26303. width: 95px;
  26304. }
  26305. .noneBox>span {
  26306. margin-top: 10px;
  26307. color: #717c8d;
  26308. }
  26309. .rb_c_box {
  26310. width: 100%;
  26311. height: 100%;
  26312. display: flex;
  26313. /* padding: 20px; */
  26314. box-sizing: border-box;
  26315. justify-content: space-between;
  26316. }
  26317. .rb_c_box_left {
  26318. height: 100%;
  26319. background: #fff;
  26320. width: 270px;
  26321. min-width: 270px;
  26322. border-radius: 8px;
  26323. margin-right: 10px;
  26324. }
  26325. .rb_c_box_right {
  26326. height: 100%;
  26327. width: calc(100%);
  26328. overflow: hidden;
  26329. }
  26330. .rb_c_box_btn {
  26331. display: flex;
  26332. justify-content: flex-start;
  26333. height: 50px;
  26334. align-items: center;
  26335. }
  26336. .rb_c_box_right>.basic_box {
  26337. /* background: #fff; */
  26338. border-radius: 0;
  26339. height: calc(100% - 0px);
  26340. overflow: auto;
  26341. padding: 0;
  26342. }
  26343. .textarea_css {
  26344. display: block;
  26345. resize: none;
  26346. padding: 10px 15px;
  26347. line-height: 1.5;
  26348. box-sizing: border-box;
  26349. width: 100%;
  26350. font-size: 14px;
  26351. color: #606266;
  26352. background-color: #fff;
  26353. background-image: none;
  26354. border: 1px solid #dcdfe6;
  26355. border-radius: 4px;
  26356. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  26357. outline: none;
  26358. overflow: hidden;
  26359. height: 46px;
  26360. font-family: "Microsoft YaHei";
  26361. }
  26362. .textarea_css::-webkit-input-placeholder {
  26363. color: #c0c4cc;
  26364. }
  26365. .textarea_css:focus {
  26366. border-color: #409eff;
  26367. outline: 0;
  26368. }
  26369. .addEditor>>>.text {
  26370. height: auto;
  26371. min-height: 100px;
  26372. }
  26373. .addEditor>>>.w-e-text-container {
  26374. min-height: 100px;
  26375. }
  26376. .moveBtn2 {
  26377. flex-direction: column;
  26378. width: fit-content;
  26379. margin: 0 10px 0 10px;
  26380. }
  26381. .moveBtn2 .chapter_upload_down,
  26382. .moveBtn2 .chapter_upload_up {
  26383. width: 16px;
  26384. height: 16px;
  26385. }
  26386. .moveBtn2 .chapter_upload_up::after,
  26387. .moveBtn2 .chapter_upload_down::after {
  26388. width: 10px;
  26389. height: 10px;
  26390. }
  26391. .fullStyle>>>.el-dialog__body {
  26392. height: calc(100% - 125px) !important;
  26393. box-sizing: border-box;
  26394. }
  26395. .fullStyle1>>>.el-dialog__body {
  26396. height: auto !important;
  26397. }
  26398. .fullStyle>>>.el-dialog {
  26399. width: 100% !important;
  26400. max-width: 100% !important;
  26401. height: 100% !important;
  26402. margin: 0 !important;
  26403. }
  26404. .fullStyle {
  26405. width: 100% !important;
  26406. max-width: 100% !important;
  26407. height: 100% !important;
  26408. margin: 0 auto !important;
  26409. }
  26410. .wb_j_box_btn {
  26411. width: calc(100% - 30px);
  26412. display: flex;
  26413. height: 40px;
  26414. border: 1.5px solid #cad1dc;
  26415. border-radius: 4px;
  26416. box-sizing: border-box;
  26417. align-items: center;
  26418. font-size: 14px;
  26419. cursor: pointer;
  26420. overflow: hidden;
  26421. }
  26422. .wb_j_box_btn:hover {
  26423. border: 1.5px solid #0061ff;
  26424. }
  26425. .wb_j_box_title {
  26426. background: #f0f4fa;
  26427. height: 100%;
  26428. line-height: 40px;
  26429. width: 90px;
  26430. text-align: center;
  26431. color: #060e17;
  26432. border-right: 1.5px solid #cad1dc;
  26433. box-sizing: border-box;
  26434. }
  26435. .wb_j_box_btn_c {
  26436. width: calc(100% - 90px);
  26437. padding: 0 35px 0 10px;
  26438. box-sizing: border-box;
  26439. position: relative;
  26440. }
  26441. .wb_j_box_span {
  26442. width: 100%;
  26443. overflow: hidden;
  26444. white-space: nowrap;
  26445. text-overflow: ellipsis;
  26446. word-wrap: break-word;
  26447. color: #717c8d;
  26448. }
  26449. .wb_j_box_arrow {
  26450. content: "";
  26451. width: 14px;
  26452. height: 14px;
  26453. background: url(../../../assets/icon/new/u_arrow.png);
  26454. background-size: 100% 100%;
  26455. position: absolute;
  26456. right: 12px;
  26457. top: 50%;
  26458. transform: translateY(-50%);
  26459. }
  26460. .check_classBox {
  26461. height: 400px;
  26462. display: flex;
  26463. border-top: 1.5px solid #e7ebf1;
  26464. border-bottom: 1.5px solid #e7ebf1;
  26465. }
  26466. .check_class_right {
  26467. width: 130px;
  26468. border-right: 1px solid #e7ebf1;
  26469. display: flex;
  26470. align-items: center;
  26471. flex-direction: column;
  26472. height: 100%;
  26473. overflow: auto;
  26474. padding: 15px 0;
  26475. box-sizing: border-box;
  26476. }
  26477. .check_class {
  26478. width: 85%;
  26479. border-radius: 5px;
  26480. height: 30px;
  26481. min-height: 30px;
  26482. line-height: 30px;
  26483. text-align: center;
  26484. padding: 0 10px;
  26485. box-sizing: border-box;
  26486. cursor: pointer;
  26487. white-space: nowrap;
  26488. overflow: hidden;
  26489. text-overflow: ellipsis;
  26490. }
  26491. .check_class.activeX {
  26492. background: #e0eafb;
  26493. color: #3681fc;
  26494. font-weight: 700;
  26495. }
  26496. .check_class+.check_class {
  26497. margin-top: 15px;
  26498. }
  26499. .check_class_left {
  26500. background: #fafafa;
  26501. width: calc(100% - 130px);
  26502. padding: 15px;
  26503. box-sizing: border-box;
  26504. }
  26505. .check_class_all_box {
  26506. display: flex;
  26507. margin-bottom: 10px;
  26508. }
  26509. .all_check {
  26510. display: flex;
  26511. align-items: center;
  26512. padding: 2px 0 0;
  26513. margin-left: 10px;
  26514. }
  26515. .all_check>>>.el-checkbox__label {
  26516. line-height: 18px;
  26517. }
  26518. .check_class_left_title {
  26519. font-size: 16px;
  26520. font-weight: 700;
  26521. }
  26522. .check_class_item {
  26523. display: flex;
  26524. flex-wrap: wrap;
  26525. height: calc(100% - 45px);
  26526. overflow: auto;
  26527. justify-content: flex-start;
  26528. align-items: flex-start;
  26529. align-content: flex-start;
  26530. }
  26531. .class_item:first-child {
  26532. /* margin: 0 15px 15px 67px; */
  26533. }
  26534. .class_item {
  26535. margin: 0 15px 15px 0;
  26536. }
  26537. .class_item:hover>>>.el-checkbox__label {
  26538. color: #409eff;
  26539. }
  26540. .class_item>>>.el-checkbox__label {
  26541. color: #0e1e33;
  26542. }
  26543. .class_item:hover>>>.el-checkbox__inner {
  26544. border-color: #409eff;
  26545. }
  26546. .class_item>>>.el-checkbox,
  26547. .class_item>>>.el-checkbox__input {
  26548. display: flex;
  26549. align-items: center;
  26550. }
  26551. .taskTitle {
  26552. font-size: 20px;
  26553. font-weight: bold;
  26554. margin-bottom: 35px;
  26555. }
  26556. .taskTitle:after {
  26557. content: "";
  26558. width: 100%;
  26559. display: block;
  26560. height: 1px;
  26561. background: #cad1dc;
  26562. position: absolute;
  26563. left: 0;
  26564. margin: 15px 0 0;
  26565. }
  26566. .eva_btn_box {
  26567. margin: 20px 0px 0 0;
  26568. display: flex;
  26569. flex-direction: row;
  26570. flex-wrap: nowrap;
  26571. align-items: center;
  26572. justify-content: space-between;
  26573. width: 100%;
  26574. }
  26575. .eva_btn_left_box {
  26576. display: flex;
  26577. flex-direction: row;
  26578. flex-wrap: nowrap;
  26579. align-items: center;
  26580. }
  26581. .addTypeChoose {
  26582. display: flex;
  26583. flex-direction: row;
  26584. flex-wrap: nowrap;
  26585. align-items: center;
  26586. margin: 15px 0;
  26587. }
  26588. .addTypeBox {
  26589. display: flex;
  26590. flex-direction: column;
  26591. flex-wrap: nowrap;
  26592. align-items: center;
  26593. }
  26594. .addTypeChoose {
  26595. display: flex;
  26596. flex-direction: row;
  26597. flex-wrap: nowrap;
  26598. align-items: center;
  26599. margin: 15px 0;
  26600. }
  26601. .buchong_box {
  26602. background: #E0EAFB66;
  26603. width: calc(100% - 20px);
  26604. min-height: 50px;
  26605. display: flex;
  26606. align-items: center;
  26607. justify-content: center;
  26608. margin: 0 auto;
  26609. }
  26610. .outline {
  26611. width: calc(100% - 40px);
  26612. margin: 0 auto;
  26613. }
  26614. .task_outline {
  26615. width: calc(100% - 40px);
  26616. margin: 0 auto;
  26617. }
  26618. .outline_box+.outline_box {
  26619. margin: 30px 0 0px;
  26620. }
  26621. .outline_task {
  26622. display: flex;
  26623. align-items: center;
  26624. margin-bottom: 10px;
  26625. }
  26626. .outline_btn{
  26627. display: flex;
  26628. align-items: center;
  26629. min-width: fit-content;
  26630. margin-left: 10px;
  26631. }
  26632. .outline_task .title {
  26633. font-size: 18px;
  26634. font-weight: bold;
  26635. min-width: 80px;
  26636. }
  26637. .op_task_box,
  26638. .op_tool_box,
  26639. .outline_detail {
  26640. position: relative;
  26641. }
  26642. .op_task_box:hover .op_box,
  26643. .op_tool_box:hover .op_box,
  26644. .outline_detail:hover .op_box {
  26645. display: flex
  26646. }
  26647. .op_box {
  26648. position: absolute;
  26649. bottom: 10px;
  26650. display: none;
  26651. align-items: center;
  26652. justify-content: space-between;
  26653. width: calc(100% - 20px);
  26654. left: 50%;
  26655. transform: translateX(-50%);
  26656. }
  26657. .op_box .op_remark {
  26658. color: #8E8E8E;
  26659. font-size: 14px;
  26660. }
  26661. .rb_c_nav {
  26662. width: calc(100% - 20px);
  26663. margin: 15px auto 0;
  26664. font-size: 18px;
  26665. }
  26666. .rb_c_nav span {
  26667. cursor: pointer;
  26668. }
  26669. .rb_c_nav span+span {
  26670. margin-left: 10px;
  26671. }
  26672. .rb_c_nav span.active {
  26673. color: #0061FF
  26674. }
  26675. .text_panel>>>.text {
  26676. height: 400px;
  26677. }
  26678. .markBox{
  26679. padding: 20px 14px;
  26680. line-height: 29px;
  26681. font-size: 16px;
  26682. background: #f4f4f4;
  26683. border-radius: 5px;
  26684. word-break: break-word;
  26685. }
  26686. .info_box_t{
  26687. display: flex;
  26688. align-items: center;
  26689. }
  26690. .info_box_t + .info_box_t{
  26691. margin-top: 10px;
  26692. }
  26693. .info_box_t_box{
  26694. display: flex;
  26695. align-items: center;
  26696. }
  26697. .info_box_t_box + .info_box_t_box{
  26698. margin-left: 10px;
  26699. }
  26700. .info_box_t_box > span{
  26701. width: fit-content
  26702. }
  26703. .info_box_t_box > input{
  26704. width: 150px !important;
  26705. margin: 0 5px 0 0;
  26706. }
  26707. .info_radio >>> .el-radio, .el-radio__input{
  26708. line-height: 18px;
  26709. height: 18px;
  26710. }
  26711. .mode_box{
  26712. display: flex;
  26713. align-items: center;
  26714. }
  26715. .mode_box > span{
  26716. padding: 0px 5px;
  26717. cursor: pointer;
  26718. }
  26719. .mode_box > span.active{
  26720. color: #409eff;
  26721. }
  26722. .chapter_upload_check {
  26723. width: 15px;
  26724. height: 15px;
  26725. cursor: pointer;
  26726. background-image: url('../../../assets/icon/check.png');
  26727. background-size: 100% 100%;
  26728. }
  26729. .chapter_upload_check.checked{
  26730. background-image: url('../../../assets/icon/checked.png');
  26731. }
  26732. .ruleBtn {
  26733. width: fit-content;
  26734. height: 36px;
  26735. line-height: 36px;
  26736. cursor: pointer;
  26737. color: #0061FF;
  26738. }
  26739. .stopBtn{
  26740. z-index: 999999;
  26741. position: absolute;
  26742. left: 50%;
  26743. top: calc(50% + 70px);
  26744. transform: translateX(-50%);
  26745. }
  26746. .rateSwitch >>> .el-switch__label.is-active {
  26747. color: #0061FF;
  26748. }
  26749. .rateSwitch >>> .el-switch__label--right{
  26750. display: flex;
  26751. align-items: center;
  26752. }
  26753. .rateSwitch >>> .el-switch__label--right::before{
  26754. content: "";
  26755. width: 14px;
  26756. height: 14px;
  26757. min-width: 14px;
  26758. min-height: 14px;
  26759. background-size: 100% 100%;
  26760. display: block;
  26761. margin-right: 7px;
  26762. background-image: url(../../../assets/icon/new/u_op2.png);
  26763. }
  26764. .rateSwitch >>> .el-switch__label--right.is-active::before{
  26765. background-image: url(../../../assets/icon/new/u_op.png);
  26766. }
  26767. .inter_box{
  26768. min-width: calc(50%);
  26769. min-height: 500px;
  26770. margin-right: 10px;
  26771. border: 1px solid #c7c7c7;
  26772. border-radius: 0px 5px 5px 5px;
  26773. overflow: hidden;
  26774. position: relative;
  26775. box-sizing: border-box;
  26776. }
  26777. .inter_box::before{
  26778. content:'对话区';
  26779. position: absolute;
  26780. left: 0;
  26781. top: 0;
  26782. display: block;
  26783. padding: 8px 10px;
  26784. background: #e0eafb;
  26785. color: #98a0ac;
  26786. font-size: 14px;
  26787. border-radius: 0 15px 15px 0;
  26788. }
  26789. .inter_Detailbox{
  26790. border: 1px solid #c7c7c7;
  26791. border-radius: 0px 5px 5px 5px;
  26792. overflow: hidden;
  26793. position: relative;
  26794. box-sizing: border-box;
  26795. }
  26796. .inter_Detailbox::before{
  26797. content:'编辑区';
  26798. position: absolute;
  26799. left: 0;
  26800. top: 0;
  26801. display: block;
  26802. padding: 8px 10px;
  26803. background: #e0eafb;
  26804. color: #98a0ac;
  26805. font-size: 14px;
  26806. border-radius: 0 15px 15px 0;
  26807. }
  26808. .inter_box > iframe{
  26809. width: 100%;
  26810. height: 100%;
  26811. border: none;
  26812. }
  26813. .inter_setting{
  26814. display: block;
  26815. background-image: url(../../../assets/icon/course/setting.svg);
  26816. background-size: 100% 100%;
  26817. width: 20px;
  26818. height: 20px;
  26819. cursor: pointer;
  26820. margin-left: 10px;
  26821. }
  26822. .inter_setting_panel{
  26823. position: absolute;
  26824. left: 110px;
  26825. top: 30px;
  26826. background: #fff;
  26827. border-radius: 5px;
  26828. box-shadow: 0px 0px 2px 1px #00000017;
  26829. padding: 10px;
  26830. z-index: 999;
  26831. }
  26832. .panel_title{
  26833. text-align: center;
  26834. font-size: 18px;
  26835. margin-bottom: 10px;
  26836. }
  26837. .panel_tips{
  26838. font-weight: 500;
  26839. font-size: 14px;
  26840. text-align: center;
  26841. margin-bottom: 10px;
  26842. color: #6d6d6d;
  26843. }
  26844. .panel_input{
  26845. margin-bottom: 10px;
  26846. }
  26847. .panel_button{
  26848. display: flex;
  26849. justify-content: space-between;
  26850. }
  26851. .custom-switch >>> .el-switch__label.is-active {
  26852. color: #0061FF;
  26853. }
  26854. </style>