addCourse.vue 1.1 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止</div>
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken" @click="cancelAjax('teacherTask')">停止</div>
  5. <div class="pb_content_body" style="position: relative; margin: 0">
  6. <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  7. <div class="courseTop">
  8. <div class="stepsNav">
  9. <el-breadcrumb separator-class="el-icon-arrow-right">
  10. <el-breadcrumb-item :to="{
  11. path:
  12. '/course?userid=' +
  13. userid +
  14. '&oid=' +
  15. oid +
  16. '&org=' +
  17. org +
  18. '&role=' +
  19. role,
  20. }">课程管理</el-breadcrumb-item>
  21. <el-breadcrumb-item>
  22. <span style="color: rgb(15, 126, 255)">添加课程</span>
  23. </el-breadcrumb-item>
  24. </el-breadcrumb>
  25. </div>
  26. <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  27. </div>
  28. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  29. <!-- @mouseenter="stepDisplay(true)"
  30. @mouseleave="stepDisplay(false)" -->
  31. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  32. <div class="stepBg" v-if="false">
  33. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  34. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  35. <div>
  36. <img src="../../../assets/icon/first.png" alt />
  37. </div>
  38. <div>填写基本信息</div>
  39. </div>
  40. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  41. <div>
  42. <img src="../../../assets/icon/firstNo.png" alt />
  43. </div>
  44. <div>填写基本信息</div>
  45. </div>
  46. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  47. </div>
  48. <!-- <div
  49. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  50. class="second"
  51. @click="navSteps(2)"
  52. >
  53. <div style="margin: 5px 10px 0 0; width: 2rem">
  54. <img src="../../../assets/icon/second.png" alt />
  55. </div>
  56. <div>选择课程模板</div>
  57. </div>
  58. <div
  59. v-else-if="cidType === 0 && isStepDisplay"
  60. class="secondNo"
  61. @click="navSteps(2)"
  62. >
  63. <div>
  64. <img src="../../../assets/icon/secondNo.png" alt />
  65. </div>
  66. <div>选择课程模板</div>
  67. </div> -->
  68. <!-- <div
  69. v-if="isStepDisplay"
  70. class="stepBorder"
  71. :class="{ 'border-active': steps > 2 }"
  72. ></div> -->
  73. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  74. <div>
  75. <img src="../../../assets/icon/third.png" alt />
  76. </div>
  77. <div>上传课程内容</div>
  78. </div>
  79. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  80. <div>
  81. <img src="../../../assets/icon/thirdNo.png" alt />
  82. </div>
  83. <div>上传课程内容</div>
  84. </div>
  85. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  86. <div v-if="steps > 3 && isStepDisplay" class="four">
  87. <div>
  88. <img src="../../../assets/icon/four.png" alt />
  89. </div>
  90. <div>上传完成</div>
  91. </div>
  92. <div v-else-if="isStepDisplay" class="fourNo">
  93. <div>
  94. <img src="../../../assets/icon/fourNo.png" alt />
  95. </div>
  96. <div>上传完成</div>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  101. style="padding: 0" :style="{
  102. height:
  103. !isStepDisplay && !isBtnDisplay
  104. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  105. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  106. }">
  107. <!-- <div class="updateMask" :style="{
  108. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  109. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  110. <div class="whiteBg" style="background: unset; padding: 0">
  111. <div>
  112. <div class="basic_box" style="padding: 0">
  113. <div class="big_box">
  114. <div class="left_first">
  115. <div :class="{
  116. updateTips:
  117. cid && userid != courseUserid && role != '1',
  118. }">
  119. <div style="width: 100%">
  120. <div class="course_input_box">
  121. <div class="bb_courseIcon">
  122. <img src="../../../assets/icon/new/course.png" />
  123. </div>
  124. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" style="
  125. border: 1.5px solid rgb(202, 209, 220);
  126. margin: 0px 10px 0px 0px;
  127. border-radius: 5px;
  128. font-weight: 600;
  129. padding: 12px 14px 12px 71px;
  130. " @change="setCover" />
  131. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  132. style="justify-content: center; min-width: 150px"></el-switch>
  133. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  134. style="justify-content: center; min-width: 175px"></el-switch>
  135. </div>
  136. </div>
  137. </div>
  138. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  139. <span>类型</span>
  140. <!-- 学科+ 主题+ 未来+ -->
  141. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  142. style="display: flex; align-items: center">
  143. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  144. :key="index">
  145. <el-radio :label="item.name">{{
  146. item.name
  147. }}</el-radio>
  148. </div>
  149. </el-radio-group>
  150. </div>
  151. <div class="both">
  152. <div class="choose">
  153. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  154. <span v-if="
  155. CourseTypeJson[item.id].length > 0 &&
  156. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  157. ? pTypeCheck.indexOf(item.id) != -1
  158. : true)
  159. ">{{ item.name }}:</span>
  160. <el-checkbox-group v-model="courseTypeId" @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="changeIsuseT">
  182. <div class="all_choose info_radio">
  183. <el-radio :label="0">简体中文</el-radio>
  184. </div>
  185. <div class="all_choose info_radio" style="margin-left: 10px">
  186. <el-radio :label="1">繁体中文</el-radio>
  187. </div>
  188. <div class="all_choose info_radio" style="margin-left: 10px">
  189. <el-radio :label="2">English</el-radio>
  190. </div>
  191. </el-radio-group>
  192. </div>
  193. </div>
  194. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  195. <div class="info_box_t_box">
  196. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  197. style="justify-content: center; min-width: 175px"></el-switch> -->
  198. <span>生成模式:</span>
  199. <el-radio-group v-model="isuseT" style="display: flex; align-items: center" @change="changeIsuseT">
  200. <div class="all_choose info_radio">
  201. <el-radio :label="1">引导模式生成</el-radio>
  202. </div>
  203. <div class="all_choose info_radio" style="margin-left: 10px">
  204. <el-radio :label="true">从已有教案生成</el-radio>
  205. </div>
  206. <div class="all_choose info_radio" style="margin-left: 10px">
  207. <el-radio :label="false">从零开始生成</el-radio>
  208. </div>
  209. </el-radio-group>
  210. </div>
  211. <div class="info_box_t_box">
  212. <span>生成风格:</span>
  213. <div class="mode_box">
  214. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  215. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  216. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  217. </div>
  218. </div>
  219. </div>
  220. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  221. <div class="info_box_t_box">
  222. <span>课程节数:</span>
  223. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  224. <span>节</span>
  225. </div>
  226. <div class="info_box_t_box">
  227. <span>课程时长:</span>
  228. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  229. <span>min</span>
  230. </div>
  231. </div> -->
  232. </div>
  233. <div class="right_first" v-loading="imageloading2">
  234. <!-- <div class="ai_box">
  235. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  236. </div> -->
  237. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  238. 上传封面
  239. </div>
  240. <div style="width: 100%">
  241. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  242. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  243. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  244. <div v-if="cover.length == 0">点击添加封面</div>
  245. <div class="cover_mask">
  246. <img src="../../../assets/icon/new/cover_update.png" /><span
  247. style="margin-top: 5px">修改封面</span>
  248. </div>
  249. </div>
  250. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  251. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  252. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  253. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  254. <i class="el-icon-plus"></i>
  255. </el-upload> -->
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  263. <div class="whiteBg" style="border-radius: 0">
  264. <div class="c_info_title">
  265. 课程权限设置
  266. </div>
  267. <div class="wb_j_box">
  268. <div class="wb_j_box_content">
  269. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  270. (dialogVisibleClass = true),
  271. (classSearch = ''),
  272. (gradeId = ''),
  273. getClass()
  274. ">添加班级</button>
  275. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  276. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  277. getClassC(tc) }}</span>
  278. </div> -->
  279. <div class="wb_j_box_btn" @click="
  280. (dialogVisibleClass = true),
  281. (classSearch = ''),
  282. (gradeId = ''),
  283. getClass()
  284. ">
  285. <div class="wb_j_box_title">授课班级</div>
  286. <div class="wb_j_box_btn_c">
  287. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  288. v-if="checkboxList2.length" popper-class="text_tooltip2">
  289. <div class="wb_j_box_span">
  290. {{ getListClassC(checkboxList2) }}
  291. </div>
  292. </el-tooltip>
  293. <div v-else class="wb_j_box_span">请选择授课班级</div>
  294. <div class="wb_j_box_arrow"></div>
  295. </div>
  296. </div>
  297. </div>
  298. <div class="wb_j_box_content">
  299. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  300. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  301. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  302. checkBoolean
  303. ? checkboxList3
  304. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  305. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  306. </div> -->
  307. <div class="wb_j_box_btn" @click="openMember">
  308. <div class="wb_j_box_title">协同人员</div>
  309. <div class="wb_j_box_btn_c">
  310. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  311. v-if="checkboxList3.length" popper-class="text_tooltip2">
  312. <div class="wb_j_box_span">
  313. {{ getListMan2(checkboxList3) }}
  314. </div>
  315. </el-tooltip>
  316. <div v-else class="wb_j_box_span">请选择协同人员</div>
  317. <div class="wb_j_box_arrow"></div>
  318. </div>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  324. <div class="c_info_title">目标管理</div>
  325. <div style="margin: 0 auto; padding: 0 20px">
  326. <div style="
  327. width: 95%;
  328. min-height: 200px;
  329. border: 1px solid #cad1dc;
  330. border-radius: 4px;
  331. position: relative;
  332. ">
  333. <div class="e_add_top">
  334. <div class="e_add_title">
  335. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  336. 清除
  337. </button>
  338. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  339. 添加
  340. </button>
  341. <!-- <span>当前使用目标管理</span>
  342. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  343. <img
  344. src="../../../assets/line.png"
  345. class="cru_line"
  346. style="
  347. width: 125px;
  348. height: 20px;
  349. bottom: -10px;
  350. left: 155px;
  351. "
  352. /> -->
  353. </div>
  354. <div style="
  355. display: flex;
  356. flex-direction: row;
  357. align-items: center;
  358. ">
  359. <!-- <el-button
  360. type="primary"
  361. size="small"
  362. @click="dialogVisiblemb = true"
  363. >添加目标管理</el-button
  364. >
  365. <el-button
  366. type="primary"
  367. size="small"
  368. @click="deleteEva()"
  369. >清除内容</el-button
  370. > -->
  371. <!-- <div class="e_add_delete" @click="deleteEva()">
  372. <img src="../../../assets/icon/delete.png" alt="" />
  373. </div> -->
  374. </div>
  375. </div>
  376. <div v-if="evalua == ''">
  377. <div class="noneBox">
  378. <img src="../../../assets/icon/new/eva_none.png" />
  379. <span>请添加目标管理</span>
  380. </div>
  381. </div>
  382. <div class="e_add_content" v-else>
  383. <div class="e_add_list_pbox">
  384. <div class="e_add_list_pbox_title">
  385. <span class="type_title">切换模式</span>
  386. <div class="type_content">
  387. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  388. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  389. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  390. </div>
  391. </div>
  392. <div class="e_add_list_pbox_content">
  393. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  394. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  395. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  396. v-if="typeMode == 3">
  397. </SeeBoard>
  398. </div>
  399. </div>
  400. </div>
  401. </div>
  402. </div>
  403. </div>
  404. </div>
  405. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  406. <div style="position: relative;
  407. background: #fff;
  408. box-sizing: border-box;
  409. padding: 1px 20px 10px;
  410. width: 100%;
  411. border-radius: 10px;">
  412. <div style="
  413. display: flex;
  414. flex-direction: row;
  415. justify-content: space-between;
  416. align-items: center;
  417. " :style="{
  418. margin: true
  419. ? '20px 0 10px'
  420. : '20px 0 0',
  421. }">
  422. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  423. 已有教案
  424. <div class="add_info_box" style="margin: 0 0 0 auto">
  425. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  426. 上传已有教案
  427. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  428. beforeUploadInfo2(
  429. $event,
  430. 14
  431. )
  432. " />
  433. </button>
  434. <button class="c_pub_button_add" @click="clickGenTT" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  435. 一键智能总结生成
  436. </button>
  437. </div>
  438. </div>
  439. </div>
  440. <div>
  441. <div class="add_chapters_box add_c_none" v-if="
  442. teacherInfoData &&
  443. teacherInfoData.length == 0
  444. ">
  445. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  446. </div>
  447. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  448. <div @dragstart="
  449. dragStart(item1, index1, 0)
  450. " @dragover.prevent="
  451. dragOver(index1, 0)
  452. " @dragend="dragEnd()" :draggable="isdrag ==
  453. 'chapter-' + 0 + '-' + index1
  454. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  455. getChapterData(
  456. $event,
  457. index1,
  458. item1.type
  459. )
  460. " :class="{
  461. dragOverTop2:
  462. newIndex === index1 &&
  463. typeIndex ==
  464. 'chapter-' +
  465. 0 +
  466. '-' +
  467. index1 &&
  468. oldIndex > index1 &&
  469. dragType == 'drag',
  470. dragOverBottom2:
  471. newIndex === index1 &&
  472. typeIndex ==
  473. 'chapter-' +
  474. 0 +
  475. '-' +
  476. index1 &&
  477. oldIndex < index1 &&
  478. dragType == 'drag',
  479. }">
  480. <div class="chapter_upload_o" style="
  481. position: relative;
  482. display: flex;
  483. align-items: center;
  484. ">
  485. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  486. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  487. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  488. </div>
  489. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  490. </div>
  491. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  492. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  493. </div>
  494. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  495. </div>
  496. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  497. </div>
  498. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  499. </div>
  500. </div>
  501. <div class="chapter_upload_n">
  502. <input readonly="true" v-if="
  503. item1.type == 2 ||
  504. item1.type == 3 ||
  505. item1.type == 12 ||
  506. item1.type == 13 ||
  507. item1.type == 7
  508. " :placeholder="item1.name" style="
  509. border: none;
  510. outline: none;
  511. width: 80%;
  512. minwidth: 215px;
  513. z-index: 99;
  514. font-size: 14px;
  515. white-space: nowrap;
  516. overflow: hidden;
  517. text-overflow: ellipsis;
  518. " />
  519. </div>
  520. <div class="chapter_upload_ic">
  521. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  522. <div class="chapter_upload_ic_r" @click.stop="
  523. deleteTeacherInfoData(
  524. $event,
  525. index1
  526. )
  527. ">
  528. <div></div>
  529. </div>
  530. </div>
  531. </div>
  532. </div>
  533. </div>
  534. </div>
  535. <div v-if="
  536. teacherinfoproVisible
  537. " class="mask">
  538. <div class="progressBox">
  539. <div class="lbox">
  540. <img src="../../../assets/loading.gif" />上传中,请稍后
  541. </div>
  542. <div style="margin-bottom: 10px">
  543. <span>{{
  544. teacherinfoisFinishSize
  545. }}</span>
  546. /
  547. <span>{{
  548. teacherinfoisAllSize
  549. }}</span>
  550. </div>
  551. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  552. ? teacherinfoprogress
  553. : 0
  554. " style="width: 80%"></el-progress> -->
  555. </div>
  556. </div>
  557. </div>
  558. </div>
  559. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  560. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken" @click="cancelAjax('teacherText')">停止</div>
  561. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  562. <div class="c_info_title">
  563. 已有教案摘要
  564. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  565. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  566. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1)"
  567. @click="openAiDialog(2, 'aiteacherTextDetail',1)">提取摘要</button>
  568. </el-tooltip>
  569. </div>
  570. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  571. <div style="width: calc(100%);" class='op_task_box'>
  572. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  573. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  574. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  575. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  576. <div class="op_box">
  577. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  578. <div style="display: flex;">
  579. <el-switch style="margin-right: 10px" v-model="isQuote['aiteacherTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiteacherTextDetail')"></el-switch>
  580. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  581. <div class="r_pub_button_op"
  582. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2)"
  583. @click="openAiDialog(2, 'aiteacherTextDetail', 2)">智能优化</div>
  584. </el-tooltip>
  585. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2()">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  586. </div>
  587. </div>
  588. </div>
  589. </div>
  590. </div>
  591. </div>
  592. <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'">
  593. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1" @click="cancelAjax('target1')">停止</div>
  594. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  595. <div class="c_info_title">
  596. 课程目标
  597. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  598. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  599. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1)"
  600. @click="openAiDialog(2, 'aitargetTextDetail',1)">提取目标</button>
  601.                   </el-tooltip>
  602. </div>
  603. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  604. <div style="width: calc(100%);" class='op_task_box'>
  605. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  606. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  607. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  608. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  609. <div class="op_box">
  610. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  611. <div style="display: flex;">
  612. <el-switch style="margin-right: 10px" v-model="isQuote['aitargetTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aitargetTextDetail')"></el-switch>
  613. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  614. <div class="r_pub_button_op"
  615. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2)"
  616. @click="openAiDialog(2, 'aitargetTextDetail', 2)">智能优化</div>
  617. </el-tooltip>
  618. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB,forceUpdate2()">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  619. </div>
  620. </div>
  621. </div>
  622. </div>
  623. </div>
  624. </div>
  625. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  626. <div style="position: relative;
  627. background: #fff;
  628. box-sizing: border-box;
  629. padding: 1px 20px 10px;
  630. width: 100%;
  631. border-radius: 10px;">
  632. <div style="
  633. display: flex;
  634. flex-direction: row;
  635. justify-content: space-between;
  636. align-items: center;
  637. " :style="{
  638. margin: true
  639. ? '20px 0 10px'
  640. : '20px 0 0',
  641. }">
  642. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  643. 系统推荐参考资料
  644. <div class="add_info_box" style="margin: 0 0 0 auto">
  645. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  646. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  647. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  648. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  649.  </el-tooltip>
  650. </div>
  651. </div>
  652. </div>
  653. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  654. <div class="add_chapters_box add_c_none" v-if="
  655. cankaoInfoData &&
  656. cankaoInfoData.length == 0
  657. ">
  658. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  659. </div>
  660. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  661. <div @dragstart="
  662. dragStart(item1, index1, 0)
  663. " @dragover.prevent="
  664. dragOver(index1, 0)
  665. " @dragend="dragEnd()" :draggable="isdrag ==
  666. 'chapter-' + 0 + '-' + index1
  667. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  668. getChapterData(
  669. $event,
  670. index1,
  671. item1.type
  672. )
  673. " :class="{
  674. dragOverTop2:
  675. newIndex === index1 &&
  676. typeIndex ==
  677. 'chapter-' +
  678. 0 +
  679. '-' +
  680. index1 &&
  681. oldIndex > index1 &&
  682. dragType == 'drag',
  683. dragOverBottom2:
  684. newIndex === index1 &&
  685. typeIndex ==
  686. 'chapter-' +
  687. 0 +
  688. '-' +
  689. index1 &&
  690. oldIndex < index1 &&
  691. dragType == 'drag',
  692. }">
  693. <div class="chapter_upload_o" style="
  694. position: relative;
  695. display: flex;
  696. align-items: center;
  697. ">
  698. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  699. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  700. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  701. </div>
  702. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  703. </div>
  704. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  705. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  706. </div>
  707. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  708. </div>
  709. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  710. </div>
  711. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  712. </div>
  713. </div>
  714. <div class="chapter_upload_n">
  715. <input readonly="true" v-if="
  716. item1.type == 2 ||
  717. item1.type == 3 ||
  718. item1.type == 12 ||
  719. item1.type == 13 ||
  720. item1.type == 7
  721. " :placeholder="item1.name" style="
  722. border: none;
  723. outline: none;
  724. width: 80%;
  725. minwidth: 215px;
  726. z-index: 99;
  727. font-size: 14px;
  728. white-space: nowrap;
  729. overflow: hidden;
  730. text-overflow: ellipsis;
  731. " />
  732. </div>
  733. <div class="chapter_upload_ic">
  734. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  735. <div class="chapter_upload_ic_r" @click.stop="
  736. deleteCankaoInfoData(
  737. $event,
  738. index1
  739. )
  740. ">
  741. <div></div>
  742. </div>
  743. </div>
  744. </div>
  745. </div>
  746. </div>
  747. </div>
  748. </div>
  749. </div>
  750. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  751. <div style="position: relative;
  752. background: #fff;
  753. box-sizing: border-box;
  754. padding: 1px 20px 10px;
  755. width: 100%;
  756. border-radius: 10px;">
  757. <div style="
  758. display: flex;
  759. flex-direction: row;
  760. justify-content: space-between;
  761. align-items: center;
  762. " :style="{
  763. margin: true
  764. ? '20px 0 10px'
  765. : '20px 0 0',
  766. }">
  767. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  768. 参考标准
  769. <div class="add_info_box" style="margin: 0 0 0 auto">
  770. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  771. 上传参考标准
  772. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  773. beforeUploadInfo2(
  774. $event,
  775. 19
  776. )
  777. " />
  778. </button>
  779. </div>
  780. </div>
  781. </div>
  782. <div>
  783. <div class="add_chapters_box add_c_none" v-if="
  784. knowInfoData &&
  785. knowInfoData.length == 0
  786. ">
  787. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  788. </div>
  789. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  790. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  791. getChapterData(
  792. $event,
  793. index1,
  794. item1.type
  795. )
  796. " >
  797. <div class="chapter_upload_o" style="
  798. position: relative;
  799. display: flex;
  800. align-items: center;
  801. ">
  802. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData(item1.fileid)"></div>
  803. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  804. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  805. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  806. </div>
  807. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  808. </div>
  809. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  810. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  811. </div>
  812. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  813. </div>
  814. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  815. </div>
  816. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  817. </div>
  818. </div>
  819. <div class="chapter_upload_n">
  820. <input readonly="true" v-if="
  821. item1.type == 2 ||
  822. item1.type == 3 ||
  823. item1.type == 12 ||
  824. item1.type == 13 ||
  825. item1.type == 7
  826. " :placeholder="item1.name" @click.stop="
  827. checkChpater3($event, index1, item1)
  828. " style="
  829. border: none;
  830. outline: none;
  831. width: 80%;
  832. minwidth: 215px;
  833. z-index: 99;
  834. font-size: 14px;
  835. white-space: nowrap;
  836. overflow: hidden;
  837. text-overflow: ellipsis;
  838. " />
  839. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  840. border: none;
  841. outline: none;
  842. width: 80%;
  843. white-space: nowrap;
  844. overflow: hidden;
  845. text-overflow: ellipsis;
  846. " readonly="true" @click="
  847. selectAttText(index1)
  848. " />
  849. <input :placeholder="item1.title ? item1.title : '链接'
  850. " v-if="item1.type == 8" style="
  851. border: none;
  852. outline: none;
  853. width: 80%;
  854. white-space: nowrap;
  855. overflow: hidden;
  856. text-overflow: ellipsis;
  857. " readonly="true" @click="selectLine(index1)" />
  858. <input :placeholder="item1.title ? item1.title : '链接'
  859. " v-if="item1.type == 14" style="
  860. border: none;
  861. outline: none;
  862. width: 80%;
  863. white-space: nowrap;
  864. overflow: hidden;
  865. text-overflow: ellipsis;
  866. " readonly="true" @click="
  867. openUpdateSource(index1)
  868. " />
  869. </div>
  870. <div class="chapter_upload_ic">
  871. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  872. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  873. checkChpater3($event, index1, item1)
  874. ">
  875. <div></div>
  876. </div>
  877. <div class="chapter_upload_ic_r" @click.stop="
  878. deleteKnowInfoData(
  879. $event,
  880. index1
  881. )
  882. ">
  883. <div></div>
  884. </div>
  885. </div>
  886. </div>
  887. </div>
  888. </div>
  889. </div>
  890. <div v-if="
  891. knowinfoproVisible
  892. " class="mask">
  893. <div class="progressBox">
  894. <div class="lbox">
  895. <img src="../../../assets/loading.gif" />上传中,请稍后
  896. </div>
  897. <div style="margin-bottom: 10px">
  898. <span>{{
  899. knowinfoisFinishSize
  900. }}</span>
  901. /
  902. <span>{{
  903. knowinfoisAllSize
  904. }}</span>
  905. </div>
  906. </div>
  907. </div>
  908. </div>
  909. </div>
  910. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && infoData2.length">
  911. <div style="position: relative;
  912. background: #fff;
  913. box-sizing: border-box;
  914. padding: 1px 20px 10px;
  915. width: 100%;
  916. border-radius: 10px;">
  917. <div style="
  918. display: flex;
  919. flex-direction: row;
  920. justify-content: space-between;
  921. align-items: center;
  922. " :style="{
  923. margin: true
  924. ? '20px 0 10px'
  925. : '20px 0 0',
  926. }">
  927. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  928. 知识库
  929. <div class="add_info_box" style="margin: 0 0 0 auto">
  930. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  931. 上传补充资料
  932. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  933. beforeUploadInfo2(
  934. $event,
  935. 15
  936. )
  937. " />
  938. </button>
  939. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
  940. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  941. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  942. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  943.  </el-tooltip> -->
  944. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  945. @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">智能检索资料</button>
  946. </div>
  947. </div>
  948. </div>
  949. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..." :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  950. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken" @click="cancelAjax('file')">停止</div>
  951. <div class="add_chapters_box add_c_none" v-if="
  952. infoData2 &&
  953. infoData2.length == 0
  954. ">
  955. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  956. </div>
  957. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  958. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  959. getChapterData(
  960. $event,
  961. index1,
  962. item1.type
  963. )
  964. " >
  965. <div class="chapter_upload_o" style="
  966. position: relative;
  967. display: flex;
  968. align-items: center;
  969. ">
  970. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  971. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  972. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  973. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  974. </div>
  975. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  976. </div>
  977. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  978. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  979. </div>
  980. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  981. </div>
  982. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  983. </div>
  984. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  985. </div>
  986. </div>
  987. <div class="chapter_upload_n">
  988. <input readonly="true" v-if="
  989. item1.type == 2 ||
  990. item1.type == 3 ||
  991. item1.type == 12 ||
  992. item1.type == 13 ||
  993. item1.type == 7
  994. " :placeholder="item1.name" @click.stop="
  995. checkChpater2($event, index1 )
  996. " style="
  997. border: none;
  998. outline: none;
  999. width: 80%;
  1000. minwidth: 215px;
  1001. z-index: 99;
  1002. font-size: 14px;
  1003. white-space: nowrap;
  1004. overflow: hidden;
  1005. text-overflow: ellipsis;
  1006. " />
  1007. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1008. border: none;
  1009. outline: none;
  1010. width: 80%;
  1011. white-space: nowrap;
  1012. overflow: hidden;
  1013. text-overflow: ellipsis;
  1014. " readonly="true" @click="
  1015. selectAttText(index1)
  1016. " />
  1017. <input :placeholder="item1.title ? item1.title : '链接'
  1018. " v-if="item1.type == 8" style="
  1019. border: none;
  1020. outline: none;
  1021. width: 80%;
  1022. white-space: nowrap;
  1023. overflow: hidden;
  1024. text-overflow: ellipsis;
  1025. " readonly="true" @click="selectLine(index1)" />
  1026. <input :placeholder="item1.title ? item1.title : '链接'
  1027. " v-if="item1.type == 14" style="
  1028. border: none;
  1029. outline: none;
  1030. width: 80%;
  1031. white-space: nowrap;
  1032. overflow: hidden;
  1033. text-overflow: ellipsis;
  1034. " readonly="true" @click="
  1035. openUpdateSource(index1)
  1036. " />
  1037. </div>
  1038. <div class="chapter_upload_ic">
  1039. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1040. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1041. checkChpater2($event, index1 )
  1042. ">
  1043. <div></div>
  1044. </div>
  1045. <div class="chapter_upload_ic_r" @click.stop="
  1046. deleteInfoData2(
  1047. $event,
  1048. index1
  1049. )
  1050. ">
  1051. <div></div>
  1052. </div>
  1053. </div>
  1054. </div>
  1055. </div>
  1056. </div>
  1057. </div>
  1058. <div v-if="
  1059. infoproVisible
  1060. " class="mask">
  1061. <div class="progressBox">
  1062. <div class="lbox">
  1063. <img src="../../../assets/loading.gif" />上传中,请稍后
  1064. </div>
  1065. <div style="margin-bottom: 10px">
  1066. <span>{{
  1067. infoisFinishSize
  1068. }}</span>
  1069. /
  1070. <span>{{
  1071. infoisAllSize
  1072. }}</span>
  1073. </div>
  1074. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1075. ? infoprogress
  1076. : 0
  1077. " style="width: 80%"></el-progress> -->
  1078. </div>
  1079. </div>
  1080. </div>
  1081. </div>
  1082. <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))">
  1083. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken" @click="cancelAjax('text')">停止</div>
  1084. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1085. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  1086. 课程简要描述
  1087. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1088. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1089. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
  1090. @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
  1091. </el-tooltip>
  1092. <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>
  1093. </div>
  1094. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1095. <div style="width: calc(100%);" class='op_task_box'>
  1096. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1097. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  1098. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  1099. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  1100. <div class="op_box">
  1101. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1102. <div style="display: flex;">
  1103. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiDetail')"></el-switch>
  1104. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1105. <div class="r_pub_button_op"
  1106. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1107. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1108. </el-tooltip>
  1109. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2()">{{ courseTextB ? '确定' : '编辑'}}</div>
  1110. </div>
  1111. </div>
  1112. </div>
  1113. </div>
  1114. </div>
  1115. </div>
  1116. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(isuseT === 1)">
  1117. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1118. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1119. 课程概况<span class="inter_setting" @click="openInterPanSetting"></span>
  1120. <div class="inter_setting_panel" v-show="interSetting">
  1121. <div class="panel_title">配置工作流</div>
  1122. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1123. <div class="panel_input">
  1124. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : '请输入agentid'" class="binfo_input" v-model="agentid"/>
  1125. </div>
  1126. <div class="panel_button">
  1127. <button class="c_pub_button_confirm" @click="setAgentid">确认</button>
  1128. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">复原</button>
  1129. <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
  1130. </div>
  1131. </div>
  1132. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1133. </div>
  1134. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1135. <div class="inter_box" v-show="interPan">
  1136. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl" frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  1137. </div>
  1138. <div style="width: calc(100%);height: 100%" class='op_task_box' :class="{inter_Detailbox: !courseTextB && interPan}">
  1139. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  1140. placeholder="请输入课程简要描述" v-if="courseTextB && interPan"></textarea>
  1141. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1142. placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan"></textarea>
  1143. <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>
  1144. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-html="MarkdownT(courseText)" v-else></div>
  1145. <div class="op_box">
  1146. <div class="op_remark"></div>
  1147. <div style="display: flex;">
  1148. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1149. <div class="r_pub_button_op"
  1150. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1151. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1152. </el-tooltip> -->
  1153. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiDetail')"></el-switch>
  1154. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2()">{{ courseTextB ? '确定' : '编辑'}}</div>
  1155. </div>
  1156. </div>
  1157. </div>
  1158. </div>
  1159. </div>
  1160. </div>
  1161. <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'">
  1162. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2" @click="cancelAjax('target2')">停止</div>
  1163. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1164. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  1165. 课程目标
  1166. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1167. 上传补充资料
  1168. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1169. beforeUploadInfo2(
  1170. $event,
  1171. 16
  1172. )
  1173. " />
  1174. </button>
  1175. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  1176. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1177. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1178. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  1179. </el-tooltip>
  1180. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1181. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1182. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1)"
  1183. @click="openAiDialog(2, 'aitargetTextDetail3',1)">生成目标</button>
  1184. </el-tooltip>
  1185. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1186. <div class="add_chapters_box add_c_none" v-if="
  1187. mubiaoInfoData &&
  1188. mubiaoInfoData.length == 0
  1189. ">
  1190. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  1191. </div>
  1192. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1193. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1194. getChapterData(
  1195. $event,
  1196. index1,
  1197. item1.type
  1198. )
  1199. " >
  1200. <div class="chapter_upload_o" style="
  1201. position: relative;
  1202. display: flex;
  1203. align-items: center;
  1204. ">
  1205. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1206. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1207. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1208. </div>
  1209. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1210. </div>
  1211. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1212. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1213. </div>
  1214. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1215. </div>
  1216. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1217. </div>
  1218. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1219. </div>
  1220. </div>
  1221. <div class="chapter_upload_n">
  1222. <input readonly="true" v-if="
  1223. item1.type == 2 ||
  1224. item1.type == 3 ||
  1225. item1.type == 12 ||
  1226. item1.type == 13 ||
  1227. item1.type == 7
  1228. " :placeholder="item1.name" @click.stop="
  1229. checkChpater3($event, index1, item1)
  1230. " style="
  1231. border: none;
  1232. outline: none;
  1233. width: 80%;
  1234. minwidth: 215px;
  1235. z-index: 99;
  1236. font-size: 14px;
  1237. white-space: nowrap;
  1238. overflow: hidden;
  1239. text-overflow: ellipsis;
  1240. " />
  1241. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1242. border: none;
  1243. outline: none;
  1244. width: 80%;
  1245. white-space: nowrap;
  1246. overflow: hidden;
  1247. text-overflow: ellipsis;
  1248. " readonly="true" @click="
  1249. selectAttText(index1)
  1250. " />
  1251. <input :placeholder="item1.title ? item1.title : '链接'
  1252. " v-if="item1.type == 8" style="
  1253. border: none;
  1254. outline: none;
  1255. width: 80%;
  1256. white-space: nowrap;
  1257. overflow: hidden;
  1258. text-overflow: ellipsis;
  1259. " readonly="true" @click="selectLine(index1)" />
  1260. <input :placeholder="item1.title ? item1.title : '链接'
  1261. " v-if="item1.type == 14" style="
  1262. border: none;
  1263. outline: none;
  1264. width: 80%;
  1265. white-space: nowrap;
  1266. overflow: hidden;
  1267. text-overflow: ellipsis;
  1268. " readonly="true" @click="
  1269. openUpdateSource(index1)
  1270. " />
  1271. </div>
  1272. <div class="chapter_upload_ic">
  1273. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1274. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1275. checkChpater3($event, index1, item1)
  1276. ">
  1277. <div></div>
  1278. </div>
  1279. <div class="chapter_upload_ic_r" @click.stop="
  1280. deletemubiaoInfoData(
  1281. $event,
  1282. index1
  1283. )
  1284. ">
  1285. <div></div>
  1286. </div>
  1287. </div>
  1288. </div>
  1289. </div>
  1290. </div>
  1291. </div>
  1292. <div v-if="
  1293. mubiaoinfoproVisible
  1294. " class="mask">
  1295. <div class="progressBox">
  1296. <div class="lbox">
  1297. <img src="../../../assets/loading.gif" />上传中,请稍后
  1298. </div>
  1299. <div style="margin-bottom: 10px">
  1300. <span>{{
  1301. mubiaoinfoisFinishSize
  1302. }}</span>
  1303. /
  1304. <span>{{
  1305. mubiaoinfoisAllSize
  1306. }}</span>
  1307. </div>
  1308. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1309. ? mubiaoinfoprogress
  1310. : 0
  1311. " style="width: 80%"></el-progress> -->
  1312. </div>
  1313. </div>
  1314. </div>
  1315. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1316. <div style="width: calc(100%);" class='op_task_box'>
  1317. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  1318. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  1319. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  1320. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1321. <div class="op_box">
  1322. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1323. <div style="display: flex;">
  1324. <el-switch style="margin-right: 10px" v-model="isQuote['aitargetTextDetail2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aitargetTextDetail2')"></el-switch>
  1325. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1326. <div class="r_pub_button_op"
  1327. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2)"
  1328. @click="openAiDialog(2, 'aitargetTextDetail2', 2)">智能优化</div>
  1329. </el-tooltip>
  1330. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B,forceUpdate2()">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1331. </div>
  1332. </div>
  1333. </div>
  1334. </div>
  1335. </div>
  1336. </div>
  1337. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  1338. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1339. <div class="c_info_title">
  1340. 补充资料
  1341. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1342. </div>
  1343. <div class="buchong_box">
  1344. <span>暂时还没有内容,快去添加吧~</span>
  1345. </div>
  1346. </div> -->
  1347. <div style="position: relative;
  1348. background: #fff;
  1349. box-sizing: border-box;
  1350. padding: 1px 20px 10px;
  1351. width: 100%;
  1352. border-radius: 10px;">
  1353. <div style="
  1354. display: flex;
  1355. flex-direction: row;
  1356. justify-content: space-between;
  1357. align-items: center;
  1358. " :style="{
  1359. margin: true
  1360. ? '20px 0 10px'
  1361. : '20px 0 0',
  1362. }">
  1363. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1364. 补充资料
  1365. <div class="add_info_box" style="margin: 0 0 0 auto">
  1366. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1367. 上传补充资料
  1368. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1369. beforeUploadInfo2(
  1370. $event,
  1371. 13
  1372. )
  1373. " />
  1374. </button>
  1375. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1376. 图文
  1377. </button>
  1378. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1379. 链接
  1380. </button>
  1381. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1382. 代码
  1383. </button>
  1384. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1385. 资源
  1386. </button> -->
  1387. </div>
  1388. </div>
  1389. </div>
  1390. <div>
  1391. <div class="add_chapters_box add_c_none" v-if="
  1392. infoData &&
  1393. infoData.length == 0
  1394. ">
  1395. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  1396. </div>
  1397. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1398. <div @dragstart="
  1399. dragStart(item1, index1, 0)
  1400. " @dragover.prevent="
  1401. dragOver(index1, 0)
  1402. " @dragend="dragEnd()" :draggable="isdrag ==
  1403. 'chapter-' + 0 + '-' + index1
  1404. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1405. getChapterData(
  1406. $event,
  1407. index1,
  1408. item1.type
  1409. )
  1410. " :class="{
  1411. dragOverTop2:
  1412. newIndex === index1 &&
  1413. typeIndex ==
  1414. 'chapter-' +
  1415. 0 +
  1416. '-' +
  1417. index1 &&
  1418. oldIndex > index1 &&
  1419. dragType == 'drag',
  1420. dragOverBottom2:
  1421. newIndex === index1 &&
  1422. typeIndex ==
  1423. 'chapter-' +
  1424. 0 +
  1425. '-' +
  1426. index1 &&
  1427. oldIndex < index1 &&
  1428. dragType == 'drag',
  1429. }">
  1430. <!-- <div @mousedown="
  1431. isdrag =
  1432. 'chapter-' + 0 + '-' + index1
  1433. " @mouseup="isdrag = ''" @touchstart="
  1434. isdrag =
  1435. 'chapter-' + 0 + '-' + index1
  1436. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1437. <div class="chapter_upload_o" style="
  1438. position: relative;
  1439. display: flex;
  1440. align-items: center;
  1441. ">
  1442. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1443. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1444. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1445. </div>
  1446. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1447. </div>
  1448. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1449. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1450. </div>
  1451. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1452. </div>
  1453. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1454. </div>
  1455. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1456. </div>
  1457. </div>
  1458. <div class="chapter_upload_n">
  1459. <input readonly="true" v-if="
  1460. item1.type == 2 ||
  1461. item1.type == 3 ||
  1462. item1.type == 12 ||
  1463. item1.type == 13 ||
  1464. item1.type == 7
  1465. " :placeholder="item1.name" @click="
  1466. updataVideoT(
  1467. $event,
  1468. index1
  1469. )
  1470. " style="
  1471. border: none;
  1472. outline: none;
  1473. width: 80%;
  1474. minwidth: 215px;
  1475. z-index: 99;
  1476. font-size: 14px;
  1477. white-space: nowrap;
  1478. overflow: hidden;
  1479. text-overflow: ellipsis;
  1480. " />
  1481. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1482. border: none;
  1483. outline: none;
  1484. width: 80%;
  1485. white-space: nowrap;
  1486. overflow: hidden;
  1487. text-overflow: ellipsis;
  1488. " readonly="true" @click="
  1489. selectAttText(index1)
  1490. " />
  1491. <input :placeholder="item1.title ? item1.title : '链接'
  1492. " v-if="item1.type == 8" style="
  1493. border: none;
  1494. outline: none;
  1495. width: 80%;
  1496. white-space: nowrap;
  1497. overflow: hidden;
  1498. text-overflow: ellipsis;
  1499. " readonly="true" @click="selectLine(index1)" />
  1500. <input :placeholder="item1.title ? item1.title : '链接'
  1501. " v-if="item1.type == 14" style="
  1502. border: none;
  1503. outline: none;
  1504. width: 80%;
  1505. white-space: nowrap;
  1506. overflow: hidden;
  1507. text-overflow: ellipsis;
  1508. " readonly="true" @click="
  1509. openUpdateSource(index1)
  1510. " />
  1511. </div>
  1512. <div class="chapter_upload_ic">
  1513. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1514. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1515. <div class="chapter_upload_up" @click="
  1516. upCd(
  1517. $event,
  1518. index1
  1519. )
  1520. "></div>
  1521. <div class="chapter_upload_down" @click="
  1522. downCd(
  1523. $event,
  1524. index1
  1525. )
  1526. "></div>
  1527. </div>
  1528. <div class="chapter_upload_ic_edit" v-if="
  1529. item1.type == 2 ||
  1530. item1.type == 3 ||
  1531. item1.type == 12 ||
  1532. item1.type == 13 ||
  1533. item1.type == 7
  1534. " @click.stop="
  1535. updataVideoT(
  1536. $event,
  1537. index1
  1538. )
  1539. ">
  1540. <div></div>
  1541. </div>
  1542. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1543. selectAttText(index1)
  1544. ">
  1545. <div></div>
  1546. </div>
  1547. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1548. @click="selectLine(index1)">
  1549. <div></div>
  1550. </div>
  1551. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1552. openUpdateSource(index1)
  1553. ">
  1554. <div></div>
  1555. </div> -->
  1556. <div class="chapter_upload_ic_r" @click.stop="
  1557. deleteInfoData(
  1558. $event,
  1559. index1
  1560. )
  1561. ">
  1562. <div></div>
  1563. </div>
  1564. </div>
  1565. </div>
  1566. </div>
  1567. </div>
  1568. </div>
  1569. <div v-if="
  1570. infoproVisible
  1571. " class="mask">
  1572. <div class="progressBox">
  1573. <!-- <div id="closePro" class="closeCss">
  1574. <img src="../../../../assets/icon/close.png" alt />
  1575. </div> -->
  1576. <div class="lbox">
  1577. <img src="../../../assets/loading.gif" />上传中,请稍后
  1578. </div>
  1579. <div style="margin-bottom: 10px">
  1580. <span>{{
  1581. infoisFinishSize
  1582. }}M</span>
  1583. /
  1584. <span>{{
  1585. infoisAllSize
  1586. }}M</span>
  1587. </div>
  1588. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1589. ? infoprogress
  1590. : 0
  1591. " style="width: 80%"></el-progress>
  1592. </div>
  1593. </div>
  1594. </div>
  1595. </div>
  1596. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1597. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1598. <div class="c_info_title">
  1599. 补充描述
  1600. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1601. </div>
  1602. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1603. <div style="width: calc(100%)">
  1604. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1605. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1606. </div>
  1607. </div>
  1608. </div>
  1609. </div>
  1610. <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">
  1611. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1612. <div class="c_info_title">
  1613. 课程大纲
  1614. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1615. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1616. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1617. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1618. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1619. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1620. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1621. </el-tooltip>
  1622. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1623. @click="openAiDialog2(2, 'aiOutline')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1624. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1625. @click="openAiDialog2(2, 'aiOutline2')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1626. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1627. </div>
  1628. <div class="task_outline">
  1629. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1630. <div class="outline_task">
  1631. <div class="title">任务{{ index + 1 }}</div>
  1632. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1633. v-model="item.task" />
  1634. <div class="outline_btn">
  1635. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1636. <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>
  1637. </el-tooltip>
  1638. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index)">在上面加入一个任务</button>
  1639. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index)">在下面加入一个任务</button>
  1640. <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>
  1641. </div>
  1642. </div>
  1643. <div class="outline_detail" :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1644. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]" @click="cancelAjax('outlineTask', index)">停止</div>
  1645. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1646. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1647. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1648. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1649. <div class="op_box">
  1650. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1651. <div style="display: flex;">
  1652. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail1-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiDetail1-'+index)"></el-switch>
  1653. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1654. <div class="r_pub_button_op"
  1655. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index)"
  1656. @click="openAiDialog(2, 'aiDetail1', item, index)">智能优化</div>
  1657. </el-tooltip>
  1658. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index)">{{
  1659. item.isTask2 ? '确定' : '编辑'}}</div>
  1660. </div>
  1661. </div>
  1662. </div>
  1663. </div>
  1664. </div>
  1665. </div>
  1666. </div>
  1667. <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)">
  1668. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1669. <div class="c_info_title">
  1670. 概念群
  1671. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1672. @click="openAiDialog2(2, 'aiCpote1')">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1673. </div>
  1674. <div class="task_outline">
  1675. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1676. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1677. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1678. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1679. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1680. <div class="op_box">
  1681. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1682. <div style="display: flex;">
  1683. <el-switch style="margin-right: 10px" v-model="isQuote['aiCpote1']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiCpote1')"></el-switch>
  1684. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1685. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
  1686. @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
  1687. </el-tooltip>
  1688. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
  1689. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1690. </div>
  1691. </div>
  1692. </div>
  1693. </div>
  1694. </div>
  1695. </div>
  1696. <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)">
  1697. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1698. <div class="c_info_title">
  1699. 问题链
  1700. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1701. @click="openAiDialog2(2, 'aiCpote2')">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1702. </div>
  1703. <div class="task_outline">
  1704. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1705. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1706. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1707. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1708. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1709. <div class="op_box">
  1710. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1711. <div style="display: flex;">
  1712. <el-switch style="margin-right: 10px" v-model="isQuote['aiCpote2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiCpote2')"></el-switch>
  1713. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1714. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
  1715. @click="openAiDialog(2, 'aiCpote2')">智能优化</div>
  1716. </el-tooltip>
  1717. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
  1718. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1719. </div>
  1720. </div>
  1721. </div>
  1722. </div>
  1723. </div>
  1724. </div>
  1725. <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)">
  1726. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1727. <div class="c_info_title">
  1728. 目标层
  1729. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1730. @click="openAiDialog2(2, 'aiCpote3')">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1731. </div>
  1732. <div class="task_outline">
  1733. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1734. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1735. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1736. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1737. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1738. <div class="op_box">
  1739. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1740. <div style="display: flex;">
  1741. <el-switch style="margin-right: 10px" v-model="isQuote['aiCpote3']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiCpote3')"></el-switch>
  1742. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1743. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
  1744. @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
  1745. </el-tooltip>
  1746. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
  1747. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1748. </div>
  1749. </div>
  1750. </div>
  1751. </div>
  1752. </div>
  1753. </div>
  1754. <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)">
  1755. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1756. <div class="c_info_title">
  1757. 任务簇
  1758. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1759. @click="openAiDialog2(2, 'aiCpote4')">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1760. </div>
  1761. <div class="task_outline">
  1762. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1763. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1764. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1765. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1766. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1767. <div class="op_box">
  1768. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1769. <div style="display: flex;">
  1770. <el-switch style="margin-right: 10px" v-model="isQuote['aiCpote4']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiCpote4')"></el-switch>
  1771. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1772. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
  1773. @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
  1774. </el-tooltip>
  1775. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
  1776. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1777. </div>
  1778. </div>
  1779. </div>
  1780. </div>
  1781. </div>
  1782. </div>
  1783. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1784. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1785. <div class="c_info_title">
  1786. 教案
  1787. <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'">
  1788. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1789. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1790. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1791. </el-tooltip>
  1792. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1793. @click="openAiDialog2(2, 'aiTeacher2')" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1794. <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')">
  1795. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1796. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1797. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1798. </el-tooltip>
  1799. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1800. </div>
  1801. <div class="task_outline">
  1802. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1803. <div class="outline_task">
  1804. <div class="title">任务{{ index + 1 }}</div>
  1805. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1806. v-model="item.task" />
  1807. </div>
  1808. <div class="outline_detail" :style="{ minHeight: taskDetailLoading5.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1809. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading5.indexOf('task-' + index) !== -1" @click="cancelAjax('teacherDetail2', index)">停止</div>
  1810. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1811. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1812. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1813. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1814. <div class="op_box">
  1815. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1816. <div style="display: flex;">
  1817. <el-switch style="margin-right: 10px" v-model="isQuote['teacherDetail2-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('teacherDetail2-'+index)"></el-switch>
  1818. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1819. <div class="r_pub_button_op"
  1820. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index)"
  1821. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index)">智能优化</div>
  1822. </el-tooltip>
  1823. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1824. item.isTask3 ? '确定' : '编辑'}}</div>
  1825. </div>
  1826. </div>
  1827. </div>
  1828. </div>
  1829. </div>
  1830. </div>
  1831. </div>
  1832. <div class="info_btnBox3" v-if="istemplate != 1">
  1833. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  1834. goTo(
  1835. '/course?userid=' +
  1836. userid +
  1837. '&oid=' +
  1838. oid +
  1839. '&org=' +
  1840. org +
  1841. '&role=' +
  1842. role
  1843. )
  1844. ">
  1845. 返回课程
  1846. </button>
  1847. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  1848. {{ steps == 4 ? "返回课程" : "上一步" }}
  1849. </button>
  1850. <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">
  1851. {{isuseT === true ? "重新生成概况和目标" : "生成概况和目标"}}
  1852. </button>
  1853. <button class="c_pub_button_confirm" v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  1854. {{isuseT === true ? "重新生成概况" : "生成概况"}}
  1855. </button>
  1856. <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
  1857. {{ "导出教案" }}
  1858. </button>
  1859. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  1860. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  1861. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  1862. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  1863. pub_btn_next_img: steps != 3,
  1864. pub_btn_finish_img: steps == 3,
  1865. }">
  1866. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  1867. </button>
  1868. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  1869. @contextmenu.prevent="nextSteps(1)" :class="{
  1870. pub_btn_next_img: steps != 3,
  1871. pub_btn_finish_img: steps == 3,
  1872. }">
  1873. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  1874. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  1875. : "下一步" }}
  1876. </button>
  1877. </el-tooltip>
  1878. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  1879. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  1880. pub_btn_next_img: steps != 3,
  1881. pub_btn_finish_img: steps == 3,
  1882. }">下一步2</button>
  1883. </el-tooltip> -->
  1884. </div>
  1885. </div>
  1886. <div class="rightBox" v-if="steps == 2" :style="{
  1887. height:
  1888. !isStepDisplay && !isBtnDisplay
  1889. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  1890. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  1891. }">
  1892. <div class="basic_box" style="
  1893. padding: 20px 30px 0px !important;
  1894. box-sizing: border-box;
  1895. height: calc(100% - 80px);
  1896. overflow: auto;
  1897. background: #fff;
  1898. ">
  1899. <!-- <div
  1900. style="
  1901. color: #b8b8b8;
  1902. background: #fff;
  1903. width: 26%;
  1904. height: 40px;
  1905. border-radius: 15px;
  1906. padding-left: 20px;
  1907. line-height: 40px;
  1908. font-size: 17px;
  1909. box-shadow: 0px 1px 2px 2px #e0e0e0;
  1910. "
  1911. >-->
  1912. <div class="right_title" style="border: none; margin: 0; padding: 0">
  1913. 请选择合适的课程模板
  1914. </div>
  1915. <div class="wordbox">
  1916. <div class="wordTeacher" @click="checkTemplate2()">
  1917. <div class="wordPic">
  1918. <img src="../../../assets/icon/new/template_none.png" alt />
  1919. </div>
  1920. <div style="
  1921. margin-top: 10px;
  1922. line-height: 19px;
  1923. overflow: hidden;
  1924. text-overflow: ellipsis;
  1925. white-space: nowrap;
  1926. padding: 0 20px;
  1927. ">
  1928. 空白模板
  1929. </div>
  1930. </div>
  1931. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  1932. <div class="wordPic">
  1933. <img src="../../../assets/icon/new/template.png" alt />
  1934. </div>
  1935. <div style="
  1936. margin-top: 10px;
  1937. line-height: 19px;
  1938. overflow: hidden;
  1939. text-overflow: ellipsis;
  1940. white-space: nowrap;
  1941. padding: 0 20px;
  1942. ">
  1943. {{ aa.title }}
  1944. </div>
  1945. </div>
  1946. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  1947. <div class="wordPic">
  1948. <img src="../../../assets/icon/new/template.png" alt />
  1949. </div>
  1950. <div style="
  1951. margin-top: 10px;
  1952. line-height: 19px;
  1953. overflow: hidden;
  1954. text-overflow: ellipsis;
  1955. white-space: nowrap;
  1956. padding: 0 20px;
  1957. ">
  1958. 简易模板
  1959. </div>
  1960. </div>
  1961. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  1962. <div class="wordPic">
  1963. <img src="../../../assets/icon/new/template.png" alt />
  1964. </div>
  1965. <div style="
  1966. margin-top: 10px;
  1967. line-height: 19px;
  1968. overflow: hidden;
  1969. text-overflow: ellipsis;
  1970. white-space: nowrap;
  1971. padding: 0 20px;
  1972. ">
  1973. 智能粘贴模式
  1974. </div>
  1975. </div>
  1976. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  1977. <div class="wordPic">
  1978. <img src="../../../assets/icon/wordMub.png" alt />
  1979. </div>
  1980. <div style="
  1981. margin-top: 10px;
  1982. line-height: 19px;
  1983. overflow: hidden;
  1984. text-overflow: ellipsis;
  1985. white-space: nowrap;
  1986. padding: 0 20px;
  1987. ">
  1988. 未来小学课程设计
  1989. </div>
  1990. </div> -->
  1991. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  1992. <div class="wordPic">
  1993. <img src="../../../assets/icon/wordMub.png" alt />
  1994. </div>
  1995. <div style="
  1996. margin-top: 10px;
  1997. line-height: 19px;
  1998. overflow: hidden;
  1999. text-overflow: ellipsis;
  2000. white-space: nowrap;
  2001. padding: 0 20px;
  2002. ">
  2003. 我的课程
  2004. </div>
  2005. </div> -->
  2006. </div>
  2007. </div>
  2008. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  2009. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2010. goTo(
  2011. '/course?userid=' +
  2012. userid +
  2013. '&oid=' +
  2014. oid +
  2015. '&org=' +
  2016. org +
  2017. '&role=' +
  2018. role
  2019. )
  2020. ">
  2021. 返回课程
  2022. </button>
  2023. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2024. {{ steps == 4 ? "返回课程" : "上一步" }}
  2025. </button>
  2026. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  2027. pub_btn_next_img: steps != 3,
  2028. pub_btn_finish_img: steps == 3,
  2029. }">
  2030. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  2031. </button>
  2032. </div>
  2033. </div>
  2034. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  2035. height:
  2036. !isStepDisplay && !isBtnDisplay
  2037. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  2038. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2039. }">
  2040. <div class="rb_c_box">
  2041. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  2042. <div class="rb_c_nav">
  2043. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  2044. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  2045. </div>
  2046. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  2047. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  2048. position: istemplate == 1 ? 'sticky' : 'unset',
  2049. top: istemplate == 1 ? '0' : 'unset'
  2050. }">
  2051. <!-- <div class="navTop">辅助导航</div> -->
  2052. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  2053. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  2054. <div class="nt_taskBox" style="width: 100%;">
  2055. <div class="nt_taskTitle"
  2056. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  2057. unitIndex + 1 }}</div>
  2058. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  2059. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  2060. <span>{{ unitJson[unitIndex].dyName }}</span>
  2061. </el-tooltip>
  2062. </div>
  2063. </div>
  2064. </div> -->
  2065. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  2066. .taskJson" :key="tIndex" :class="{
  2067. dragOverTop:
  2068. newIndex === tIndex &&
  2069. typeIndex == 'task-' + tIndex &&
  2070. oldIndex > tIndex &&
  2071. dragType == 'task',
  2072. dragOverBottom:
  2073. newIndex === tIndex &&
  2074. typeIndex == 'task-' + tIndex &&
  2075. oldIndex < tIndex &&
  2076. dragType == 'task',
  2077. }">
  2078. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  2079. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  2080. class="navTask" :class="{
  2081. isNavTask:
  2082. isClickColor > 0 && isClickColor == tIndex + 1,
  2083. isNavOpen: t.toolOpen,
  2084. }">
  2085. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  2086. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  2087. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  2088. class="chapter_upload_drag"></div>
  2089. <div class="nt_taskBox">
  2090. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  2091. <div class="nt_taskName">
  2092. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2093. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  2094. </el-tooltip>
  2095. </div>
  2096. </div>
  2097. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  2098. 1
  2099. ">
  2100. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  2101. @click.stop="taskMove(1, tIndex)"></div>
  2102. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  2103. @click.stop="taskMove(2, tIndex)"></div>
  2104. </div> -->
  2105. </div>
  2106. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2107. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2108. @click="jumpGj(tIndex, toolIndex2)">
  2109. <div class="gjCss" :class="{
  2110. isGjCss:
  2111. toolIndexType == `gj${tIndex}${toolIndex2}`,
  2112. }">
  2113. <div>工具{{ toolIndex2 + 1 }}:</div>
  2114. <div>
  2115. {{
  2116. toolsData[tool.tool[0]] &&
  2117. toolsData[tool.tool[0]].name
  2118. }}
  2119. </div>
  2120. </div>
  2121. </div>
  2122. </div>
  2123. </div>
  2124. </div>
  2125. <div class="navBottom" v-if="courseState == 1">
  2126. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  2127. dragOverTop:
  2128. newIndex === stageIndex &&
  2129. typeIndex == 'Unit-' + stageIndex &&
  2130. oldIndex > stageIndex &&
  2131. dragType == 'Unit',
  2132. dragOverBottom:
  2133. newIndex === stageIndex &&
  2134. typeIndex == 'Unit-' + stageIndex &&
  2135. oldIndex < stageIndex &&
  2136. dragType == 'Unit',
  2137. }">
  2138. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  2139. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  2140. @click="unitSet2(stageIndex)" class="navStage" :class="{
  2141. isNavStage: stageIndex == unitIndex,
  2142. isNavStageOpen: stage.toolOpen,
  2143. }">
  2144. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  2145. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  2146. class="chapter_upload_drag"></div>
  2147. <div class="nt_taskBox">
  2148. <div class="nt_taskTitle">
  2149. 第{{ stageIndex + 1 }}阶段:
  2150. </div>
  2151. <div class="nt_taskName">
  2152. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  2153. " placement="top">
  2154. <span>{{
  2155. stage.dyName ? stage.dyName : "未命名阶段"
  2156. }}</span>
  2157. </el-tooltip>
  2158. </div>
  2159. </div>
  2160. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  2161. </div>
  2162. <div v-for="(t, tIndex) in unitJson[stageIndex]
  2163. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  2164. dragOverTop:
  2165. newIndex === tIndex &&
  2166. typeIndex == 'task-' + tIndex &&
  2167. ((oldIndex > tIndex &&
  2168. stageIndex == checkUnitIndex) ||
  2169. (oldIndex == tIndex &&
  2170. stageIndex == checkUnitIndex &&
  2171. checkUnitIndex != oldUnitIndex)) &&
  2172. dragType == 'task',
  2173. dragOverBottom:
  2174. newIndex === tIndex &&
  2175. typeIndex == 'task-' + tIndex &&
  2176. oldIndex < tIndex &&
  2177. stageIndex == checkUnitIndex &&
  2178. dragType == 'task',
  2179. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2180. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2181. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2182. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2183. isNavTask:
  2184. isClickColor > 0 &&
  2185. isClickColor == tIndex + 1 &&
  2186. stageIndex == unitIndex,
  2187. isNavOpen: t.toolOpen,
  2188. }">
  2189. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2190. <div @mousedown="
  2191. isdrag = 'task-' + stageIndex + '-' + tIndex
  2192. " @mouseup="isdrag = ''" @touchstart="
  2193. isdrag = 'task-' + stageIndex + '-' + tIndex
  2194. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2195. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2196. <div class="nt_taskTitle">
  2197. 任务{{ tIndex + 1 }}:
  2198. </div>
  2199. <div class="nt_taskName">
  2200. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2201. <span>{{
  2202. t.task ? t.task : "未命名任务"
  2203. }}</span>
  2204. </el-tooltip>
  2205. </div>
  2206. </div>
  2207. </div>
  2208. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2209. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2210. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2211. <div class="gjCss" :class="{
  2212. isGjCss:
  2213. toolIndexType ==
  2214. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2215. }">
  2216. <div>工具{{ toolIndex2 + 1 }}:</div>
  2217. <div>
  2218. {{
  2219. toolsData[tool.tool[0]] &&
  2220. toolsData[tool.tool[0]].name
  2221. }}
  2222. </div>
  2223. </div>
  2224. </div>
  2225. </div>
  2226. </div>
  2227. </div>
  2228. </div>
  2229. </div>
  2230. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2231. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2232. </div>
  2233. </div>
  2234. <div class="rb_c_box_right">
  2235. <!-- <div class="rb_c_box_btn">
  2236. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  2237. </div> -->
  2238. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2239. <div v-if="false" style="
  2240. display: flex;
  2241. flex-direction: row;
  2242. align-items: center;
  2243. position: sticky;
  2244. top: 0;
  2245. z-index: 99;
  2246. width: 100%;
  2247. padding: 0 20px 0 20px;
  2248. box-sizing: border-box;
  2249. background: #fff;
  2250. border-radius: 8px;
  2251. ">
  2252. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2253. <div class="cru_selectBox" :style="{
  2254. maxWidth: isPasteTask
  2255. ? 'calc(100% - 335px)'
  2256. : 'calc(100% - 190px)',
  2257. }" v-if="courseState == 1">
  2258. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2259. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2260. <!-- item.dyName ? item.dyName : -->
  2261. <span v-if="
  2262. unitJson[unitJson.length - 1].easy == 4 ||
  2263. unitJson[unitJson.length - 1].easy == 6
  2264. ">{{
  2265. item.dyName
  2266. ? item.dyName
  2267. : "第" + (index + 1) + "阶段"
  2268. }}</span>
  2269. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2270. </div>
  2271. <div class="cru_line" :style="{
  2272. left: offsetLetfPx + 'px',
  2273. }"></div>
  2274. </div>
  2275. <div class="addStageImg" @click="addunit()" v-if="
  2276. !(unitJson[unitJson.length - 1].easy == 4) &&
  2277. !(unitJson[unitJson.length - 1].easy == 6) &&
  2278. courseState == 1
  2279. ">
  2280. <img src="../../../assets/icon/new/addStage.png" alt />
  2281. </div>
  2282. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2283. v-if="courseState == 2" style="margin: 15px 0">
  2284. 新建阶段
  2285. </button>
  2286. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2287. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2288. 阶段顺序
  2289. </button>
  2290. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2291. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2292. 智能粘贴
  2293. </button>
  2294. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2295. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2296. }" style="padding: 0 12px">
  2297. 选择课程模板
  2298. </button>
  2299. </div>
  2300. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2301. :key="index">
  2302. <div v-if="courseState == 4" style="position: relative;
  2303. background: #fff;
  2304. box-sizing: border-box;
  2305. padding: 1px 20px 10px;
  2306. width: 100%;
  2307. border-radius: 10px;">
  2308. <div style="
  2309. display: flex;
  2310. flex-direction: row;
  2311. justify-content: space-between;
  2312. align-items: center;
  2313. " :style="{
  2314. margin: !item.taskJson[0].isFoldchapter
  2315. ? '20px 0 10px'
  2316. : '20px 0 0',
  2317. }">
  2318. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2319. 学习内容
  2320. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2321. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2322. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2323. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2324. </el-tooltip>
  2325. </div>
  2326. </div>
  2327. <div>
  2328. <div class="add_chapters_box add_c_none" v-if="
  2329. item.taskJson[0].chapterData &&
  2330. item.taskJson[0].chapterData.length == 0
  2331. ">
  2332. <img src="../../../assets/icon/new/c_none.png" alt /><span>请添加学习内容</span>
  2333. </div>
  2334. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2335. <div @dragstart="
  2336. dragStart(item1, index1, 0)
  2337. " @dragover.prevent="
  2338. dragOver(index1, 0)
  2339. " @dragend="dragEnd()" :draggable="isdrag ==
  2340. 'chapter-' + 0 + '-' + index1
  2341. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2342. :key="item1.id" @click="
  2343. getChapterData(
  2344. $event,
  2345. unitIndex,
  2346. index,
  2347. index1,
  2348. item1.type
  2349. )
  2350. " :class="{
  2351. dragOverTop2:
  2352. newIndex === index1 &&
  2353. typeIndex ==
  2354. 'chapter-' +
  2355. 0 +
  2356. '-' +
  2357. index1 &&
  2358. oldIndex > index1 &&
  2359. dragType == 'drag',
  2360. dragOverBottom2:
  2361. newIndex === index1 &&
  2362. typeIndex ==
  2363. 'chapter-' +
  2364. 0 +
  2365. '-' +
  2366. index1 &&
  2367. oldIndex < index1 &&
  2368. dragType == 'drag',
  2369. }">
  2370. <div @mousedown="
  2371. isdrag =
  2372. 'chapter-' + 0 + '-' + index1
  2373. " @mouseup="isdrag = ''" @touchstart="
  2374. isdrag =
  2375. 'chapter-' + 0 + '-' + index1
  2376. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2377. <div class="chapter_upload_o" style="
  2378. position: relative;
  2379. display: flex;
  2380. align-items: center;
  2381. ">
  2382. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2383. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2384. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2385. </div>
  2386. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2387. </div>
  2388. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2389. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2390. </div>
  2391. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2392. </div>
  2393. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2394. </div>
  2395. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2396. </div>
  2397. </div>
  2398. <div class="chapter_upload_n">
  2399. <input readonly="true" v-if="
  2400. item1.type == 2 ||
  2401. item1.type == 3 ||
  2402. item1.type == 12 ||
  2403. item1.type == 13 ||
  2404. item1.type == 7
  2405. " :placeholder="item1.name" @click="
  2406. updataVideoT(
  2407. $event,
  2408. unitIndex,
  2409. 0,
  2410. index1
  2411. )
  2412. " style="
  2413. border: none;
  2414. outline: none;
  2415. width: 80%;
  2416. minwidth: 215px;
  2417. z-index: 99;
  2418. font-size: 14px;
  2419. white-space: nowrap;
  2420. overflow: hidden;
  2421. text-overflow: ellipsis;
  2422. " />
  2423. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2424. border: none;
  2425. outline: none;
  2426. width: 80%;
  2427. white-space: nowrap;
  2428. overflow: hidden;
  2429. text-overflow: ellipsis;
  2430. " readonly="true" @click="
  2431. selectAttText(0, index1)
  2432. " />
  2433. <input :placeholder="item1.title ? item1.title : '链接'
  2434. " v-if="item1.type == 8" style="
  2435. border: none;
  2436. outline: none;
  2437. width: 80%;
  2438. white-space: nowrap;
  2439. overflow: hidden;
  2440. text-overflow: ellipsis;
  2441. " readonly="true" @click="selectLine(0, index1)" />
  2442. <input :placeholder="item1.title ? item1.title : '链接'
  2443. " v-if="item1.type == 14" style="
  2444. border: none;
  2445. outline: none;
  2446. width: 80%;
  2447. white-space: nowrap;
  2448. overflow: hidden;
  2449. text-overflow: ellipsis;
  2450. " readonly="true" @click="
  2451. openUpdateSource(0, index1)
  2452. " />
  2453. </div>
  2454. <div class="chapter_upload_ic">
  2455. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2456. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2457. checkChpater( $event, unitIndex, 0, index1 )
  2458. ">
  2459. <div></div>
  2460. </div>
  2461. <div class="chapter_upload_ud" style="z-index: 99">
  2462. <div class="chapter_upload_up" @click="
  2463. upCd(
  2464. $event,
  2465. unitIndex,
  2466. index,
  2467. 0,
  2468. index1
  2469. )
  2470. "></div>
  2471. <div class="chapter_upload_down" @click="
  2472. downCd(
  2473. $event,
  2474. unitIndex,
  2475. index,
  2476. 0,
  2477. index1
  2478. )
  2479. "></div>
  2480. </div>
  2481. <div class="chapter_upload_ic_edit" v-if="
  2482. item1.type == 2 ||
  2483. item1.type == 3 ||
  2484. item1.type == 12 ||
  2485. item1.type == 13 ||
  2486. item1.type == 7
  2487. " @click.stop="
  2488. updataVideoT(
  2489. $event,
  2490. unitIndex,
  2491. 0,
  2492. index1
  2493. )
  2494. ">
  2495. <div></div>
  2496. </div>
  2497. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2498. selectAttText(0, index1)
  2499. ">
  2500. <div></div>
  2501. </div>
  2502. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2503. @click="selectLine(0, index1)">
  2504. <div></div>
  2505. </div>
  2506. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2507. openUpdateSource(0, index1)
  2508. ">
  2509. <div></div>
  2510. </div>
  2511. <div class="chapter_upload_ic_r" @click.stop="
  2512. deleteChapterData(
  2513. $event,
  2514. unitIndex,
  2515. index,
  2516. index1,
  2517. 0
  2518. )
  2519. ">
  2520. <div></div>
  2521. </div>
  2522. </div>
  2523. </div>
  2524. </div>
  2525. </div>
  2526. </div>
  2527. <div class="add_info_box" style="margin: 10px 0 0">
  2528. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2529. 文件
  2530. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2531. beforeUpload2(
  2532. $event,
  2533. unitIndex,
  2534. 13,
  2535. 0
  2536. )
  2537. " />
  2538. </button>
  2539. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2540. 图文
  2541. </button>
  2542. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2543. 链接
  2544. </button>
  2545. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2546. 代码
  2547. </button>
  2548. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2549. 资源
  2550. </button>
  2551. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2552. AI生成PPT
  2553. </button>
  2554. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2555. AI生成教案
  2556. </button>
  2557. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2558. 智能检索视频
  2559. </button>
  2560. </div>
  2561. <div v-if="
  2562. unitJson[unitIndex].chapterInfo[0].taskJson[
  2563. 0
  2564. ].proVisible
  2565. " class="mask">
  2566. <div class="progressBox">
  2567. <!-- <div id="closePro" class="closeCss">
  2568. <img src="../../../../assets/icon/close.png" alt />
  2569. </div> -->
  2570. <div class="lbox">
  2571. <img src="../../../assets/loading.gif" />上传中,请稍后
  2572. </div>
  2573. <div style="margin-bottom: 10px">
  2574. <span>{{
  2575. unitJson[unitIndex].chapterInfo[0].taskJson[
  2576. 0
  2577. ].isFinishSize
  2578. }}</span>
  2579. /
  2580. <span>{{
  2581. unitJson[unitIndex].chapterInfo[0].taskJson[
  2582. 0
  2583. ].isAllSize
  2584. }}</span>
  2585. </div>
  2586. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2587. 0
  2588. ].progress
  2589. ? unitJson[unitIndex].chapterInfo[0]
  2590. .taskJson[0].progress
  2591. : 0
  2592. " style="width: 80%"></el-progress> -->
  2593. </div>
  2594. </div>
  2595. </div>
  2596. <div class="chapter_box" v-if="courseState == 1">
  2597. <div class="chapter_contentbox">
  2598. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2599. <div class="cc_input">
  2600. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2601. v-model="unitJson[unitIndex].dyName" />
  2602. </div>
  2603. <div class="remove" v-if="
  2604. (unitJson.length > 1 || courseState != 2) &&
  2605. !(unitJson[unitJson.length - 1].easy == 4) &&
  2606. !(unitJson[unitJson.length - 1].easy == 6)
  2607. " @click="deleteUnit(unitIndex)"></div>
  2608. </div>
  2609. </div>
  2610. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2611. margin: 50px 0px 10px;
  2612. font-size: 1.5em;
  2613. font-weight: 700;
  2614. color: #0f7eff;
  2615. ">
  2616. 添加任务
  2617. </div> -->
  2618. <div class="taskBorder" :style="{
  2619. minHeight: unitJson[unitIndex].easy && 'unset',
  2620. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2621. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2622. <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
  2623. <div class="taskTitle">
  2624. <div style="display: flex;width: 100%;justify-content: space-between;">
  2625. <span>任务{{ itemTaskIndex + 1 }}</span>
  2626. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2627. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2628. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2629. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2630. </el-tooltip> -->
  2631. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2632. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2633. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex)"
  2634. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex)">重新生成任务</button>
  2635. </el-tooltip>
  2636. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2637. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2638. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  2639. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  2640. </el-tooltip> -->
  2641. </div>
  2642. </div>
  2643. <!-- padding: 20px; -->
  2644. <div v-if="unitJson[unitIndex].easy != 1">
  2645. <div :style="{
  2646. marginBottom:
  2647. unitJson[unitIndex].easy == 3 ||
  2648. (unitJson[unitIndex].easy == 5 &&
  2649. itemTask.taskType == 1)
  2650. ? '75px'
  2651. : '0',
  2652. }">
  2653. <div style="
  2654. display: flex;
  2655. margin: 0px 0 20px;
  2656. flex-direction: row;
  2657. justify-content: flex-start;
  2658. align-items: center;
  2659. ">
  2660. <div class="lineTitle">任务概述</div>
  2661. </div>
  2662. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2663. flex-direction: row;
  2664. justify-content: flex-start;
  2665. align-items: center;
  2666. margin: 0;
  2667. ">
  2668. <!-- <div class="cc_title">
  2669. 任务{{ itemTaskIndex + 1 }}
  2670. </div> -->
  2671. <div class="cc_input">
  2672. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2673. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2674. itemTaskIndex
  2675. ].task
  2676. " />
  2677. </div>
  2678. <div class="remove" v-if="
  2679. item.taskJson.length > 1 &&
  2680. (!unitJson[unitIndex].easy ||
  2681. unitJson[unitIndex].easy == 6)
  2682. " @click="deleteTask(itemTaskIndex)"></div>
  2683. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2684. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2685. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2686. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2687. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2688. </div> -->
  2689. </div>
  2690. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2691. display: flex;
  2692. margin: 20px 0;
  2693. flex-direction: row;
  2694. justify-content: flex-start;
  2695. align-items: center;
  2696. ">
  2697. <div class="lineTitle">任务描述</div>
  2698. </div> && !itemTask.isFold2-->
  2699. <div v-if="
  2700. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2701. -1
  2702. " style="margin-top: 20px" class="op_task_box"
  2703. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2704. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2705. itemTaskIndex
  2706. ].taskDetail
  2707. " @change="change"></editor-bar> -->
  2708. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2709. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2710. itemTaskIndex
  2711. ].taskDetail
  2712. "></textarea>
  2713. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2714. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2715. itemTaskIndex
  2716. ].taskDetail
  2717. "></textarea> -->
  2718. <div class="op_box">
  2719. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2720. <div style="display: flex;">
  2721. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail2-'+itemTaskIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiDetail2-'+itemTaskIndex)"></el-switch>
  2722. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2723. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2724. itemTaskIndex
  2725. ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2726. itemTaskIndex
  2727. ], itemTaskIndex)">智能优化</div>
  2728. </el-tooltip>
  2729. </div>
  2730. </div>
  2731. </div>
  2732. </div>
  2733. </div>
  2734. <div
  2735. style="position: relative"
  2736. v-if="courseState == 5"
  2737. >
  2738. <div
  2739. style="
  2740. display: flex;
  2741. flex-direction: row;
  2742. justify-content: space-between;
  2743. align-items: center;
  2744. "
  2745. :style="{
  2746. margin: !itemTask.isFoldchapter
  2747. ? '20px 0 10px'
  2748. : '20px 0 0',
  2749. }"
  2750. >
  2751. <div
  2752. style="margin-bottom: 10px"
  2753. class="lineTitle clineTitle"
  2754. >
  2755. 学习内容
  2756. </div>
  2757. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2758. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2759. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2760. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2761. <!-- <div class="line"></div> -->
  2762. </div>
  2763. <!-- v-if="!itemTask.isFoldchapter" -->
  2764. <div>
  2765. <div
  2766. class="add_chapters_box add_c_none"
  2767. v-if="
  2768. itemTask.chapterData &&
  2769. itemTask.chapterData.length == 0
  2770. "
  2771. >
  2772. <img
  2773. src="../../../assets/icon/new/c_none.png"
  2774. alt
  2775. /><span>请添加学习内容</span>
  2776. </div>
  2777. <div
  2778. v-else
  2779. class="add_chapters_box"
  2780. style="display: flex; flex-direction: column"
  2781. >
  2782. <div
  2783. @dragstart="
  2784. dragStart(item1, index1, itemTaskIndex)
  2785. "
  2786. @dragover.prevent="
  2787. dragOver(index1, itemTaskIndex)
  2788. "
  2789. @dragend="dragEnd()"
  2790. :draggable="
  2791. isdrag ==
  2792. 'chapter-' + itemTaskIndex + '-' + index1
  2793. "
  2794. class="chapter_upload"
  2795. v-for="(item1, index1) in itemTask.chapterData"
  2796. :key="item1.id"
  2797. @click="
  2798. getChapterData(
  2799. $event,
  2800. unitIndex,
  2801. index,
  2802. index1,
  2803. item1.type
  2804. )
  2805. "
  2806. :class="{
  2807. dragOverTop2:
  2808. newIndex === index1 &&
  2809. typeIndex ==
  2810. 'chapter-' +
  2811. itemTaskIndex +
  2812. '-' +
  2813. index1 &&
  2814. oldIndex > index1 &&
  2815. dragType == 'drag',
  2816. dragOverBottom2:
  2817. newIndex === index1 &&
  2818. typeIndex ==
  2819. 'chapter-' +
  2820. itemTaskIndex +
  2821. '-' +
  2822. index1 &&
  2823. oldIndex < index1 &&
  2824. dragType == 'drag',
  2825. }"
  2826. >
  2827. <div
  2828. @mousedown="
  2829. isdrag =
  2830. 'chapter-' + itemTaskIndex + '-' + index1
  2831. "
  2832. @mouseup="isdrag = ''"
  2833. @touchstart="
  2834. isdrag =
  2835. 'chapter-' + itemTaskIndex + '-' + index1
  2836. "
  2837. @touchend="isdrag = ''"
  2838. class="chapter_upload_drag"
  2839. ></div>
  2840. <div
  2841. class="chapter_upload_o"
  2842. style="
  2843. position: relative;
  2844. display: flex;
  2845. align-items: center;
  2846. "
  2847. >
  2848. <div
  2849. class="chapter_upload_l"
  2850. style="padding: 1px 0 0 10px"
  2851. >
  2852. <div
  2853. v-if="item1.type == 2"
  2854. class="chapter_upload_l_i2"
  2855. ></div>
  2856. <div
  2857. v-if="item1.type == 3"
  2858. class="chapter_upload_l_i3"
  2859. style="margin-left: 1px"
  2860. ></div>
  2861. <div
  2862. v-if="item1.type == 6"
  2863. class="chapter_upload_l_i6"
  2864. style="margin-left: 1px"
  2865. ></div>
  2866. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2867. <div
  2868. v-if="item1.type == 8"
  2869. class="chapter_upload_l_i8"
  2870. style="margin-left: 1px"
  2871. ></div>
  2872. <div
  2873. v-if="item1.type == 14"
  2874. class="chapter_upload_l_i14"
  2875. style="margin-left: 1px"
  2876. ></div>
  2877. <div
  2878. v-if="item1.type == 12"
  2879. class="chapter_upload_l_i12"
  2880. style="margin-left: 1px"
  2881. ></div>
  2882. <div
  2883. v-if="item1.type == 13"
  2884. class="chapter_upload_l_i13"
  2885. style="margin-left: 1px"
  2886. ></div>
  2887. </div>
  2888. <div class="chapter_upload_n">
  2889. <input
  2890. readonly="true"
  2891. v-if="
  2892. item1.type == 2 ||
  2893. item1.type == 3 ||
  2894. item1.type == 12 ||
  2895. item1.type == 13 ||
  2896. item1.type == 7
  2897. "
  2898. :placeholder="item1.name"
  2899. @click="
  2900. updataVideoT(
  2901. $event,
  2902. unitIndex,
  2903. itemTaskIndex,
  2904. index1
  2905. )
  2906. "
  2907. style="
  2908. border: none;
  2909. outline: none;
  2910. width: 80%;
  2911. minwidth: 215px;
  2912. z-index: 99;
  2913. font-size: 14px;
  2914. white-space: nowrap;
  2915. overflow: hidden;
  2916. text-overflow: ellipsis;
  2917. "
  2918. />
  2919. <input
  2920. :placeholder="item1.name"
  2921. v-if="item1.type == 6"
  2922. style="
  2923. border: none;
  2924. outline: none;
  2925. width: 80%;
  2926. white-space: nowrap;
  2927. overflow: hidden;
  2928. text-overflow: ellipsis;
  2929. "
  2930. readonly="true"
  2931. @click="
  2932. selectAttText(itemTaskIndex, index1)
  2933. "
  2934. />
  2935. <input
  2936. :placeholder="
  2937. item1.title ? item1.title : '链接'
  2938. "
  2939. v-if="item1.type == 8"
  2940. style="
  2941. border: none;
  2942. outline: none;
  2943. width: 80%;
  2944. white-space: nowrap;
  2945. overflow: hidden;
  2946. text-overflow: ellipsis;
  2947. "
  2948. readonly="true"
  2949. @click="selectLine(itemTaskIndex, index1)"
  2950. />
  2951. <input
  2952. :placeholder="
  2953. item1.title ? item1.title : '链接'
  2954. "
  2955. v-if="item1.type == 14"
  2956. style="
  2957. border: none;
  2958. outline: none;
  2959. width: 80%;
  2960. white-space: nowrap;
  2961. overflow: hidden;
  2962. text-overflow: ellipsis;
  2963. "
  2964. readonly="true"
  2965. @click="
  2966. openUpdateSource(itemTaskIndex, index1)
  2967. "
  2968. />
  2969. </div>
  2970. <div class="chapter_upload_ic">
  2971. <div
  2972. class="chapter_upload_noSee"
  2973. v-if="item1.type == 12"
  2974. ></div>
  2975. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2976. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  2977. ">
  2978. <div></div>
  2979. </div>
  2980. <div
  2981. class="chapter_upload_ud"
  2982. style="z-index: 99"
  2983. >
  2984. <div
  2985. class="chapter_upload_up"
  2986. @click="
  2987. upCd(
  2988. $event,
  2989. unitIndex,
  2990. index,
  2991. itemTaskIndex,
  2992. index1
  2993. )
  2994. "
  2995. ></div>
  2996. <div
  2997. class="chapter_upload_down"
  2998. @click="
  2999. downCd(
  3000. $event,
  3001. unitIndex,
  3002. index,
  3003. itemTaskIndex,
  3004. index1
  3005. )
  3006. "
  3007. ></div>
  3008. </div>
  3009. <div
  3010. class="chapter_upload_ic_edit"
  3011. v-if="
  3012. item1.type == 2 ||
  3013. item1.type == 3 ||
  3014. item1.type == 12 ||
  3015. item1.type == 13 ||
  3016. item1.type == 7
  3017. "
  3018. @click.stop="
  3019. updataVideoT(
  3020. $event,
  3021. unitIndex,
  3022. itemTaskIndex,
  3023. index1
  3024. )
  3025. "
  3026. >
  3027. <div></div>
  3028. </div>
  3029. <div
  3030. class="chapter_upload_ic_edit"
  3031. v-if="item1.type == 6"
  3032. @click="
  3033. selectAttText(itemTaskIndex, index1)
  3034. "
  3035. >
  3036. <div></div>
  3037. </div>
  3038. <div
  3039. class="chapter_upload_ic_edit"
  3040. v-if="item1.type == 8"
  3041. @click="selectLine(itemTaskIndex, index1)"
  3042. >
  3043. <div></div>
  3044. </div>
  3045. <div
  3046. class="chapter_upload_ic_edit"
  3047. v-if="item1.type == 14"
  3048. @click="
  3049. openUpdateSource(itemTaskIndex, index1)
  3050. "
  3051. >
  3052. <div></div>
  3053. </div>
  3054. <div
  3055. class="chapter_upload_ic_r"
  3056. @click.stop="
  3057. deleteChapterData(
  3058. $event,
  3059. unitIndex,
  3060. index,
  3061. index1,
  3062. itemTaskIndex
  3063. )
  3064. "
  3065. >
  3066. <div></div>
  3067. </div>
  3068. </div>
  3069. </div>
  3070. </div>
  3071. </div>
  3072. </div>
  3073. <!-- v-if="!itemTask.isFoldchapter" -->
  3074. <div class="add_info_box" style="margin: 10px 0 0">
  3075. <button
  3076. class="c_pub_button_add pub_btn_add_img"
  3077. @click="addImg($event)"
  3078. >
  3079. 文件
  3080. <input
  3081. type="file"
  3082. accept="*"
  3083. style="display: none"
  3084. multiple="multiple"
  3085. v-if="inputShow"
  3086. @change="
  3087. beforeUpload2(
  3088. $event,
  3089. unitIndex,
  3090. 13,
  3091. itemTaskIndex
  3092. )
  3093. "
  3094. />
  3095. </button>
  3096. <button
  3097. class="c_pub_button_add pub_btn_add_img"
  3098. @click="addAttText(itemTaskIndex)"
  3099. >
  3100. 图文
  3101. </button>
  3102. <button
  3103. class="c_pub_button_add pub_btn_add_img"
  3104. @click="openLine(itemTaskIndex)"
  3105. >
  3106. 链接
  3107. </button>
  3108. <button
  3109. class="c_pub_button_add pub_btn_add_img"
  3110. @click="pasteLine(itemTaskIndex)"
  3111. >
  3112. 代码
  3113. </button>
  3114. <button
  3115. class="c_pub_button_add pub_btn_add_img"
  3116. @click="openSource(itemTaskIndex)"
  3117. >
  3118. 资源
  3119. </button>
  3120. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex)">
  3121. AI生成PPT
  3122. </button>
  3123. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3124. AI生成教案
  3125. </button>
  3126. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex)">
  3127. 智能检索视频
  3128. </button>
  3129. </div>
  3130. <div
  3131. v-if="
  3132. unitJson[unitIndex].chapterInfo[0].taskJson[
  3133. itemTaskIndex
  3134. ].proVisible
  3135. "
  3136. class="mask"
  3137. >
  3138. <div class="progressBox">
  3139. <!-- <div id="closePro" class="closeCss">
  3140. <img src="../../../../assets/icon/close.png" alt />
  3141. </div> -->
  3142. <div class="lbox">
  3143. <img
  3144. src="../../../assets/loading.gif"
  3145. />上传中,请稍后
  3146. </div>
  3147. <div style="margin-bottom: 10px">
  3148. <span
  3149. >{{
  3150. unitJson[unitIndex].chapterInfo[0].taskJson[
  3151. itemTaskIndex
  3152. ].isFinishSize
  3153. }}</span
  3154. >
  3155. /
  3156. <span
  3157. >{{
  3158. unitJson[unitIndex].chapterInfo[0].taskJson[
  3159. itemTaskIndex
  3160. ].isAllSize
  3161. }}</span
  3162. >
  3163. </div>
  3164. <!-- <el-progress
  3165. :text-inside="true"
  3166. :stroke-width="20"
  3167. :percentage="
  3168. unitJson[unitIndex].chapterInfo[0].taskJson[
  3169. itemTaskIndex
  3170. ].progress
  3171. ? unitJson[unitIndex].chapterInfo[0]
  3172. .taskJson[itemTaskIndex].progress
  3173. : 0
  3174. "
  3175. style="width: 80%"
  3176. ></el-progress> -->
  3177. </div>
  3178. </div>
  3179. </div>
  3180. <div v-if="
  3181. unitJson[unitIndex].easy == 1 ||
  3182. (unitJson[unitIndex].easy == 5 &&
  3183. itemTask.taskType == 2)
  3184. ">
  3185. <div>
  3186. <div class="add_chapters_box add_c_none" v-if="
  3187. itemTask.chapterData &&
  3188. itemTask.chapterData.length == 0
  3189. ">
  3190. <img src="../../../assets/icon/new/c_none.png" alt />
  3191. </div>
  3192. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3193. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3194. dragOver(index1, itemTaskIndex)
  3195. " @dragend="dragEnd()" :draggable="isdrag ==
  3196. 'chapter-' + itemTaskIndex + '-' + index1
  3197. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3198. :key="item1.id" @click="
  3199. getChapterData(
  3200. $event,
  3201. unitIndex,
  3202. index,
  3203. index1,
  3204. item1.type
  3205. )
  3206. " :class="{
  3207. dragOverTop2:
  3208. newIndex === index1 &&
  3209. typeIndex ==
  3210. 'chapter-' +
  3211. itemTaskIndex +
  3212. '-' +
  3213. index1 &&
  3214. oldIndex > index1,
  3215. dragOverBottom2:
  3216. newIndex === index1 &&
  3217. typeIndex ==
  3218. 'chapter-' +
  3219. itemTaskIndex +
  3220. '-' +
  3221. index1 &&
  3222. oldIndex < index1,
  3223. }">
  3224. <div @mousedown="
  3225. isdrag =
  3226. 'chapter-' + itemTaskIndex + '-' + index1
  3227. " @mouseup="isdrag = ''" @touchstart="
  3228. isdrag =
  3229. 'chapter-' + itemTaskIndex + '-' + index1
  3230. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3231. <div class="chapter_upload_t" style="width: 100%"></div>
  3232. <div class="chapter_upload_o" style="
  3233. position: relative;
  3234. display: flex;
  3235. align-items: center;
  3236. ">
  3237. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3238. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3239. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3240. </div>
  3241. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3242. </div>
  3243. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3244. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3245. </div>
  3246. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3247. </div>
  3248. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3249. </div>
  3250. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3251. </div>
  3252. </div>
  3253. <div class="chapter_upload_n">
  3254. <span style="
  3255. font-size: 14px;
  3256. color: rgb(109, 109, 109);
  3257. height: 14px;
  3258. line-height: 14px;
  3259. " v-if="
  3260. item1.type == 2 ||
  3261. item1.type == 3 ||
  3262. item1.type == 7
  3263. ">{{ item1.text }}-</span>
  3264. <input readonly="true" v-if="
  3265. item1.type == 2 ||
  3266. item1.type == 3 ||
  3267. item1.type == 7
  3268. " :placeholder="item1.name" @click="
  3269. updataVideoT(
  3270. $event,
  3271. unitIndex,
  3272. itemTaskIndex,
  3273. index1
  3274. )
  3275. " style="
  3276. border: none;
  3277. outline: none;
  3278. width: 80%;
  3279. minwidth: 215px;
  3280. z-index: 99;
  3281. font-size: 14px;
  3282. white-space: nowrap;
  3283. overflow: hidden;
  3284. text-overflow: ellipsis;
  3285. " />
  3286. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3287. border: none;
  3288. outline: none;
  3289. width: 80%;
  3290. white-space: nowrap;
  3291. overflow: hidden;
  3292. text-overflow: ellipsis;
  3293. " readonly="true" @click="
  3294. selectAttText(itemTaskIndex, index1)
  3295. " />
  3296. <input :placeholder="item1.title ? item1.title : '链接'
  3297. " v-if="item1.type == 8 || item1.type == 14" style="
  3298. border: none;
  3299. outline: none;
  3300. width: 80%;
  3301. white-space: nowrap;
  3302. overflow: hidden;
  3303. text-overflow: ellipsis;
  3304. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3305. </div>
  3306. <div class="chapter_upload_ic">
  3307. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3308. <div class="chapter_upload_ud" style="z-index: 99">
  3309. <div class="chapter_upload_up" @click="
  3310. upCd(
  3311. $event,
  3312. unitIndex,
  3313. index,
  3314. itemTaskIndex,
  3315. index1
  3316. )
  3317. "></div>
  3318. <div class="chapter_upload_down" @click="
  3319. downCd(
  3320. $event,
  3321. unitIndex,
  3322. index,
  3323. itemTaskIndex,
  3324. index1
  3325. )
  3326. "></div>
  3327. </div>
  3328. <div class="chapter_upload_ic_edit" v-if="
  3329. item1.type == 2 ||
  3330. item1.type == 3 ||
  3331. item1.type == 12 ||
  3332. item1.type == 13 ||
  3333. item1.type == 7
  3334. " @click.stop="
  3335. updataVideoT(
  3336. $event,
  3337. unitIndex,
  3338. itemTaskIndex,
  3339. index1
  3340. )
  3341. ">
  3342. <div></div>
  3343. </div>
  3344. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3345. selectAttText(itemTaskIndex, index1)
  3346. ">
  3347. <div></div>
  3348. </div>
  3349. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3350. @click="selectLine(itemTaskIndex, index1)">
  3351. <div></div>
  3352. </div>
  3353. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3354. openUpdateSource(itemTaskIndex, index1)
  3355. ">
  3356. <div></div>
  3357. </div>
  3358. <div class="chapter_upload_ic_r" @click.stop="
  3359. deleteChapterData(
  3360. $event,
  3361. unitIndex,
  3362. index,
  3363. index1,
  3364. itemTaskIndex
  3365. )
  3366. ">
  3367. <div></div>
  3368. </div>
  3369. </div>
  3370. </div>
  3371. </div>
  3372. </div>
  3373. </div>
  3374. <div class="add_info_box" style="margin: 10px 0 0">
  3375. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3376. <span style="color: red">*</span>
  3377. 教学设计
  3378. <input type="file"
  3379. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3380. style="display: none" v-if="inputShow" @change="
  3381. beforeUpload3(
  3382. $event,
  3383. unitIndex,
  3384. 3,
  3385. itemTaskIndex,
  3386. '教学设计'
  3387. )
  3388. " />
  3389. </button>
  3390. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3391. <span style="color: red">*</span>
  3392. 教学课件
  3393. <input type="file"
  3394. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3395. style="display: none" v-if="inputShow" @change="
  3396. beforeUpload3(
  3397. $event,
  3398. unitIndex,
  3399. 3,
  3400. itemTaskIndex,
  3401. '教学课件'
  3402. )
  3403. " />
  3404. </button>
  3405. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3406. 教学视频
  3407. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3408. style="display: none" v-if="inputShow" @change="
  3409. beforeUpload3(
  3410. $event,
  3411. unitIndex,
  3412. 2,
  3413. itemTaskIndex,
  3414. '教学视频'
  3415. )
  3416. " />
  3417. </button>
  3418. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3419. 教学音频
  3420. <input type="file" accept="audio/*" 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"
  3433. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3434. style="display: none" v-if="inputShow" @change="
  3435. beforeUpload3(
  3436. $event,
  3437. unitIndex,
  3438. 3,
  3439. itemTaskIndex,
  3440. '学习单'
  3441. )
  3442. " />
  3443. </button>
  3444. </div>
  3445. <div v-if="
  3446. unitJson[unitIndex].chapterInfo[0].taskJson[
  3447. itemTaskIndex
  3448. ].proVisible
  3449. " class="mask">
  3450. <div class="progressBox">
  3451. <!-- <div id="closePro" class="closeCss">
  3452. <img src="../../../../assets/icon/close.png" alt />
  3453. </div> -->
  3454. <div class="lbox">
  3455. <img src="../../../assets/loading.gif" />上传中,请稍后
  3456. </div>
  3457. <div style="margin-bottom: 10px">
  3458. <span>{{
  3459. unitJson[unitIndex].chapterInfo[0].taskJson[
  3460. itemTaskIndex
  3461. ].isFinishSize
  3462. }}M</span>
  3463. /
  3464. <span>{{
  3465. unitJson[unitIndex].chapterInfo[0].taskJson[
  3466. itemTaskIndex
  3467. ].isAllSize
  3468. }}M</span>
  3469. </div>
  3470. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3471. itemTaskIndex
  3472. ].progress
  3473. ? unitJson[unitIndex].chapterInfo[0]
  3474. .taskJson[itemTaskIndex].progress
  3475. : 0
  3476. " style="width: 80%"></el-progress>
  3477. </div>
  3478. </div>
  3479. </div>
  3480. </div>
  3481. <!-- padding: 20px; -->
  3482. <div style="
  3483. background: #fff;
  3484. border-radius: 5px;
  3485. margin-top: 15px;
  3486. ">
  3487. <div v-if="
  3488. unitJson[unitIndex].easy == 6 ||
  3489. !unitJson[unitIndex].easy
  3490. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
  3491. <div v-if="
  3492. unitJson[unitIndex].easy != 3 &&
  3493. !(
  3494. unitJson[unitIndex].easy == 5 &&
  3495. itemTask.taskType == 1
  3496. )
  3497. " style="
  3498. flex-direction: row;
  3499. justify-content: flex-start;
  3500. align-items: center;
  3501. ">
  3502. <div style="
  3503. display: flex;
  3504. flex-direction: row;
  3505. align-items: center;
  3506. margin: 5px 0 20px;
  3507. ">
  3508. <div class="lineTitle clineTitle">
  3509. {{
  3510. !unitJson[unitIndex].easy ||
  3511. unitJson[unitIndex].easy == 6 ||
  3512. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3513. -1
  3514. ? "练习内容"
  3515. : "评价内容"
  3516. }}
  3517. </div>
  3518. <!-- <div class="line" style="width: 90%"></div> -->
  3519. </div>
  3520. </div>
  3521. <div class="tools">
  3522. <div class="leftTools" style="width: 100%" v-for="(
  3523. itemTool, toolIndex
  3524. ) in itemTask.toolChoose" :key="toolIndex">
  3525. <div style="
  3526. display: flex;
  3527. flex-direction: row;
  3528. align-items: baseline;
  3529. flex-wrap: nowrap;
  3530. justify-content: flex-start;
  3531. position: relative;
  3532. ">
  3533. <div style="margin-right: 20px; font-weight: bold"
  3534. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3535. 工具 {{ toolIndex + 1 }} :
  3536. </div>
  3537. <div class="chooseWho">
  3538. <div :class="itemTool.toolType == 0
  3539. ? 'isChooseActive'
  3540. : ''
  3541. " @click="
  3542. (itemTool.toolType = 0),
  3543. (itemTool.isFold3 = false),
  3544. $forceUpdate()
  3545. ">
  3546. 互动类
  3547. </div>
  3548. <div :class="itemTool.toolType == 1
  3549. ? 'isChooseActive'
  3550. : ''
  3551. " @click="
  3552. (itemTool.toolType = 1),
  3553. (itemTool.isFold3 = false),
  3554. $forceUpdate()
  3555. ">
  3556. 思维类
  3557. </div>
  3558. <div :class="itemTool.toolType == 6
  3559. ? 'isChooseActive'
  3560. : ''
  3561. " @click="
  3562. (itemTool.toolType = 6),
  3563. (itemTool.isFold3 = false),
  3564. $forceUpdate()
  3565. ">
  3566. 协作类
  3567. </div>
  3568. <div :class="itemTool.toolType == 2
  3569. ? 'isChooseActive'
  3570. : ''
  3571. " @click="
  3572. (itemTool.toolType = 2),
  3573. (itemTool.isFold3 = false),
  3574. $forceUpdate()
  3575. ">
  3576. 测评类
  3577. </div>
  3578. <div :class="itemTool.toolType == 7
  3579. ? 'isChooseActive'
  3580. : ''
  3581. " @click="
  3582. (itemTool.toolType = 7),
  3583. (itemTool.isFold3 = false),
  3584. $forceUpdate()
  3585. ">
  3586. 评价类
  3587. </div>
  3588. <div :class="itemTool.toolType == 3
  3589. ? 'isChooseActive'
  3590. : ''
  3591. " @click="
  3592. (itemTool.toolType = 3),
  3593. (itemTool.isFold3 = false),
  3594. $forceUpdate()
  3595. ">
  3596. 编程类
  3597. </div>
  3598. <div :class="itemTool.toolType == 5
  3599. ? 'isChooseActive'
  3600. : ''
  3601. " @click="
  3602. (itemTool.toolType = 5),
  3603. (itemTool.isFold3 = false),
  3604. $forceUpdate()
  3605. ">
  3606. 学科类
  3607. </div>
  3608. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3609. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3610. 其他
  3611. </div> -->
  3612. </div>
  3613. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3614. margin:
  3615. itemTask.toolChoose.length > 1
  3616. ? '0px 35px 0px auto'
  3617. : '0 0 0 auto',
  3618. }" v-if="itemTask.toolChoose.length > 1">
  3619. <div class="chapter_upload_up2" @click.stop="
  3620. upTool(
  3621. $event,
  3622. unitIndex,
  3623. itemTaskIndex,
  3624. toolIndex
  3625. )
  3626. ">
  3627. 上移
  3628. </div>
  3629. <div class="chapter_upload_down2" @click.stop="
  3630. downTool(
  3631. $event,
  3632. unitIndex,
  3633. itemTaskIndex,
  3634. toolIndex
  3635. )
  3636. ">
  3637. 下移
  3638. </div>
  3639. </div>
  3640. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3641. @click="fold3(itemTaskIndex, toolIndex)"
  3642. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3643. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3644. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3645. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3646. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3647. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3648. v-if="itemTask.toolChoose.length > 1" style="
  3649. position: absolute;
  3650. right: 0;
  3651. top: -5px;
  3652. "></div>
  3653. </div>
  3654. <!-- v-show="!itemTool.isFold3" -->
  3655. <div style="min-height: 163px">
  3656. <div class="toolSort" v-if="itemTool.toolType == 0">
  3657. <!-- <div class="tool">
  3658. <div
  3659. class="whiteBIcon"
  3660. @click="addTools(8, itemTaskIndex, toolIndex)"
  3661. >
  3662. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3663. <div style="margin: 5px 0">素材库</div>
  3664. </div>
  3665. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3666. <img
  3667. src="../../../assets/icon/checkNo.png"
  3668. alt
  3669. v-if="itemTool.tool.indexOf(8) == -1"
  3670. />
  3671. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3672. alt /><span>已选择</span></div>
  3673. </div>
  3674. </div>-->
  3675. <!-- <div class="tool">
  3676. <div
  3677. class="whiteBIcon"
  3678. @click="addTools(17, itemTaskIndex, toolIndex)"
  3679. >
  3680. <img
  3681. src="../../../assets/icon/secondToolList/library.png"
  3682. alt
  3683. />
  3684. <div style="margin: 5px 0">学习资料</div>
  3685. </div>
  3686. <div
  3687. class="check"
  3688. @click="addTools(17, itemTaskIndex, toolIndex)"
  3689. >
  3690. <img
  3691. src="../../../assets/icon/checkNo.png"
  3692. alt
  3693. v-if="itemTool.tool.indexOf(17) == -1"
  3694. />
  3695. <img
  3696. src="../../../assets/icon/checkedIs.png"
  3697. alt
  3698. v-else
  3699. />
  3700. </div>10
  3701. </div> -->
  3702. <div class="tool" :class="{
  3703. isToolChoose:
  3704. itemTool.tool.indexOf(10) != -1,
  3705. }" @click="
  3706. addTools(10, itemTaskIndex, toolIndex)
  3707. ">
  3708. <div class="whiteBIcon" @click.stop="
  3709. openTools(itemTaskIndex, 10, toolIndex)
  3710. ">
  3711. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3712. <div style="margin: 5px 0">倒计时</div>
  3713. </div>
  3714. <div class="noCTool">
  3715. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3716. </div>
  3717. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3718. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3719. </div>
  3720. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3721. <img src="../../../assets/icon/checkNo.png" alt
  3722. v-if="itemTool.tool.indexOf(10) == -1" />
  3723. <div class="checkDiv" v-else>
  3724. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3725. </div>
  3726. </div> -->
  3727. </div>
  3728. <div class="tool" :class="{
  3729. isToolChoose:
  3730. itemTool.tool.indexOf(65) != -1,
  3731. }" @click="
  3732. addTools(65, itemTaskIndex, toolIndex)
  3733. ">
  3734. <div class="whiteBIcon" @click.stop="
  3735. addTools(65, itemTaskIndex, toolIndex)
  3736. ">
  3737. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3738. <div style="margin: 5px 0">挑人</div>
  3739. </div>
  3740. <div class="noCTool">
  3741. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3742. </div>
  3743. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3744. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3745. </div>
  3746. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3747. <img src="../../../assets/icon/checkNo.png" alt
  3748. v-if="itemTool.tool.indexOf(65) == -1" />
  3749. <div class="checkDiv" v-else>
  3750. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3751. </div>
  3752. </div> -->
  3753. </div>
  3754. <!-- <div class="tool">
  3755. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3756. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3757. <div style="margin: 5px 0">学生分组</div>
  3758. </div>
  3759. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3760. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3761. <div class="checkDiv" v-else>
  3762. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3763. </div>
  3764. </div>
  3765. </div> -->
  3766. <!-- <div class="tool">
  3767. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3768. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3769. <div style="margin: 5px 0">交互视频</div>
  3770. </div>
  3771. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3772. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3773. <div class="checkDiv" v-else>
  3774. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3775. </div>
  3776. </div>
  3777. </div> -->
  3778. </div>
  3779. <div class="toolSort" v-if="itemTool.toolType == 1">
  3780. <div class="tool" :class="{
  3781. isToolChoose:
  3782. itemTool.tool.indexOf(7) != -1,
  3783. }" @click="
  3784. addTools(7, itemTaskIndex, toolIndex)
  3785. ">
  3786. <div class="whiteBIcon" @click.stop="
  3787. addTools(7, itemTaskIndex, toolIndex)
  3788. ">
  3789. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3790. <div style="margin: 5px 0">思维网格</div>
  3791. </div>
  3792. <div class="noCTool">
  3793. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3794. </div>
  3795. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3796. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3797. </div>
  3798. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3799. <img src="../../../assets/icon/checkNo.png" alt
  3800. v-if="itemTool.tool.indexOf(7) == -1" />
  3801. <div class="checkDiv" v-else>
  3802. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3803. </div>
  3804. </div> -->
  3805. </div>
  3806. <div class="tool" :class="{
  3807. isToolChoose:
  3808. itemTool.tool.indexOf(1) != -1,
  3809. }" @click="
  3810. addTools(1, itemTaskIndex, toolIndex)
  3811. ">
  3812. <div class="whiteBIcon" @click.stop="
  3813. openTools(itemTaskIndex, 1, toolIndex)
  3814. ">
  3815. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3816. <div style="margin: 5px 0">电子白板</div>
  3817. </div>
  3818. <div class="noCTool">
  3819. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3820. </div>
  3821. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3822. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3823. </div>
  3824. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  3825. <img src="../../../assets/icon/checkNo.png" alt
  3826. v-if="itemTool.tool.indexOf(1) == -1" />
  3827. <div class="checkDiv" v-else>
  3828. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3829. </div>
  3830. </div> -->
  3831. </div>
  3832. <!-- <div class="tool">
  3833. <div
  3834. class="whiteBIcon"
  3835. @click="addTools(2, itemTaskIndex, toolIndex)"
  3836. >
  3837. <img
  3838. src="../../../assets/icon/secondToolList/note.png"
  3839. alt
  3840. />
  3841. <div style="margin: 5px 0">便签</div>
  3842. </div>
  3843. <div
  3844. class="check"
  3845. @click="addTools(2, itemTaskIndex, toolIndex)"
  3846. >
  3847. <img
  3848. src="../../../assets/icon/checkNo.png"
  3849. alt
  3850. v-if="itemTool.tool.indexOf(2) == -1"
  3851. />
  3852. <div class="checkDiv" v-else>
  3853. <img
  3854. src="../../../assets/icon/checkedIs.png"
  3855. alt
  3856. /><span>已选择</span>
  3857. </div>
  3858. </div>
  3859. </div> -->
  3860. <!-- <div class="tool">
  3861. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  3862. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  3863. <div style="margin: 5px 0">协同文档</div>
  3864. </div>
  3865. <div
  3866. class="check"
  3867. @click="addTools(6, itemTaskIndex, toolIndex)"
  3868. >
  3869. <img
  3870. src="../../../assets/icon/checkNo.png"
  3871. alt
  3872. v-if="itemTool.tool.indexOf(6) == -1"
  3873. />
  3874. <div class="checkDiv" v-else>
  3875. <img
  3876. src="../../../assets/icon/checkedIs.png"
  3877. alt
  3878. /><span>已选择</span>
  3879. </div>
  3880. </div>
  3881. </div> -->
  3882. <div class="tool" :class="{
  3883. isToolChoose:
  3884. itemTool.tool.indexOf(52) != -1,
  3885. }" @click="
  3886. addTools(52, itemTaskIndex, toolIndex)
  3887. ">
  3888. <div class="whiteBIcon" @click.stop="
  3889. openTools(itemTaskIndex, 52, toolIndex)
  3890. ">
  3891. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  3892. <div style="margin: 5px 0">文档</div>
  3893. </div>
  3894. <div class="noCTool">
  3895. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3896. </div>
  3897. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  3898. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3899. </div>
  3900. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  3901. <img src="../../../assets/icon/checkNo.png" alt
  3902. v-if="itemTool.tool.indexOf(52) == -1" />
  3903. <div class="checkDiv" v-else>
  3904. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3905. </div>
  3906. </div> -->
  3907. </div>
  3908. <div class="tool" :class="{
  3909. isToolChoose:
  3910. itemTool.tool.indexOf(3) != -1,
  3911. }" @click="
  3912. addTools(3, itemTaskIndex, toolIndex)
  3913. ">
  3914. <div class="whiteBIcon" @click.stop="
  3915. openTools(itemTaskIndex, 3, toolIndex)
  3916. ">
  3917. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  3918. <div style="margin: 5px 0">思维导图</div>
  3919. </div>
  3920. <div class="noCTool">
  3921. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3922. </div>
  3923. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  3924. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3925. </div>
  3926. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  3927. <img src="../../../assets/icon/checkNo.png" alt
  3928. v-if="itemTool.tool.indexOf(3) == -1" />
  3929. <div class="checkDiv" v-else>
  3930. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3931. </div>
  3932. </div> -->
  3933. </div>
  3934. <div class="tool" :class="{
  3935. isToolChoose:
  3936. itemTool.tool.indexOf(48) != -1,
  3937. }" @click="
  3938. addTools(48, itemTaskIndex, toolIndex)
  3939. ">
  3940. <div class="whiteBIcon" @click.stop="
  3941. openTools(itemTaskIndex, 48, toolIndex)
  3942. ">
  3943. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  3944. <div style="margin: 5px 0">表格</div>
  3945. </div>
  3946. <div class="noCTool">
  3947. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3948. </div>
  3949. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  3950. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3951. </div>
  3952. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  3953. <img src="../../../assets/icon/checkNo.png" alt
  3954. v-if="itemTool.tool.indexOf(48) == -1" />
  3955. <div class="checkDiv" v-else>
  3956. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3957. </div>
  3958. </div> -->
  3959. </div>
  3960. </div>
  3961. <div class="toolSort" v-if="itemTool.toolType == 6">
  3962. <div class="tool" :class="{
  3963. isToolChoose:
  3964. itemTool.tool.indexOf(49) != -1,
  3965. }" @click="
  3966. addTools(49, itemTaskIndex, toolIndex)
  3967. ">
  3968. <div class="whiteBIcon" @click.stop="
  3969. openTools(itemTaskIndex, 49, toolIndex)
  3970. ">
  3971. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3972. <div style="margin: 5px 0">学生分组</div>
  3973. </div>
  3974. <div class="noCTool">
  3975. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3976. </div>
  3977. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  3978. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3979. </div>
  3980. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3981. <img src="../../../assets/icon/checkNo.png" alt
  3982. v-if="itemTool.tool.indexOf(49) == -1" />
  3983. <div class="checkDiv" v-else>
  3984. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3985. </div>
  3986. </div> -->
  3987. </div>
  3988. </div>
  3989. <div class="toolSort" v-if="itemTool.toolType == 2">
  3990. <!-- <div class="tool">
  3991. <div
  3992. class="whiteBIcon"
  3993. @click="addTools(5, itemTaskIndex, toolIndex)"
  3994. >
  3995. <img
  3996. src="../../../assets/icon/thirdToolList/score.png"
  3997. alt
  3998. />
  3999. <div style="margin: 5px 0">量规评分</div>
  4000. </div>
  4001. <div
  4002. class="check"
  4003. @click="addTools(5, itemTaskIndex, toolIndex)"
  4004. >
  4005. <img
  4006. src="../../../assets/icon/checkNo.png"
  4007. alt
  4008. v-if="itemTool.tool.indexOf(5) == -1"
  4009. />
  4010. <img
  4011. src="../../../assets/icon/checkedIs.png"
  4012. alt
  4013. v-else
  4014. />
  4015. </div>
  4016. </div>-->
  4017. <div class="tool" :class="{
  4018. isToolChoose:
  4019. itemTool.tool.indexOf(4) != -1,
  4020. }" @click="
  4021. addTools(4, itemTaskIndex, toolIndex)
  4022. ">
  4023. <div class="whiteBIcon" @click.stop="
  4024. openTools(itemTaskIndex, 4, toolIndex)
  4025. ">
  4026. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4027. <div style="margin: 5px 0">问卷调查</div>
  4028. </div>
  4029. <div class="noCTool">
  4030. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4031. </div>
  4032. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4033. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4034. </div>
  4035. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4036. <img src="../../../assets/icon/checkNo.png" alt
  4037. v-if="itemTool.tool.indexOf(4) == -1" />
  4038. <div class="checkDiv" v-else>
  4039. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4040. </div>
  4041. </div> -->
  4042. </div>
  4043. <div class="tool" :class="{
  4044. isToolChoose:
  4045. itemTool.tool.indexOf(45) != -1,
  4046. }" @click="
  4047. addTools(45, itemTaskIndex, toolIndex)
  4048. ">
  4049. <div class="whiteBIcon" @click="
  4050. openTools(itemTaskIndex, 45, toolIndex)
  4051. ">
  4052. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4053. <div style="margin: 5px 0">选择题</div>
  4054. </div>
  4055. <div class="noCTool">
  4056. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4057. </div>
  4058. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4059. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4060. </div>
  4061. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4062. <img src="../../../assets/icon/checkNo.png" alt
  4063. v-if="itemTool.tool.indexOf(45) == -1" />
  4064. <div class="checkDiv" v-else>
  4065. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4066. </div>
  4067. </div> -->
  4068. </div>
  4069. <div class="tool" :class="{
  4070. isToolChoose:
  4071. itemTool.tool.indexOf(15) != -1,
  4072. }" @click="
  4073. addTools(15, itemTaskIndex, toolIndex)
  4074. ">
  4075. <div class="whiteBIcon" @click.stop="
  4076. openTools(itemTaskIndex, 15, toolIndex)
  4077. ">
  4078. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4079. <div style="margin: 5px 0">问答</div>
  4080. </div>
  4081. <div class="noCTool">
  4082. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4083. </div>
  4084. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4085. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4086. </div>
  4087. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4088. <img src="../../../assets/icon/checkNo.png" alt
  4089. v-if="itemTool.tool.indexOf(15) == -1" />
  4090. <div class="checkDiv" v-else>
  4091. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4092. </div>
  4093. </div> -->
  4094. </div>
  4095. <div class="tool" :class="{
  4096. isToolChoose:
  4097. itemTool.tool.indexOf(16) != -1,
  4098. }" @click="
  4099. addTools(16, itemTaskIndex, toolIndex)
  4100. ">
  4101. <div class="whiteBIcon" @click.stop="
  4102. addTools(16, itemTaskIndex, toolIndex)
  4103. ">
  4104. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4105. <div style="margin: 5px 0">作业提交</div>
  4106. </div>
  4107. <div class="noCTool">
  4108. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4109. </div>
  4110. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4111. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4112. </div>
  4113. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4114. <img src="../../../assets/icon/checkNo.png" alt
  4115. v-if="itemTool.tool.indexOf(16) == -1" />
  4116. <div class="checkDiv" v-else>
  4117. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4118. </div>
  4119. </div> -->
  4120. </div>
  4121. <div class="tool" :class="{
  4122. isToolChoose:
  4123. itemTool.tool.indexOf(50) != -1,
  4124. }" @click="
  4125. addTools(50, itemTaskIndex, toolIndex)
  4126. ">
  4127. <div class="whiteBIcon" @click.stop="
  4128. addTools(50, itemTaskIndex, toolIndex)
  4129. ">
  4130. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4131. <div style="margin: 5px 0">批量上传</div>
  4132. </div>
  4133. <div class="noCTool">
  4134. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4135. </div>
  4136. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4137. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4138. </div>
  4139. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4140. <img src="../../../assets/icon/checkNo.png" alt
  4141. v-if="itemTool.tool.indexOf(50) == -1" />
  4142. <div class="checkDiv" v-else>
  4143. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4144. </div>
  4145. </div> -->
  4146. </div>
  4147. <!-- <div class="tool">
  4148. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4149. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4150. <div style="margin: 5px 0">个人评价</div>
  4151. </div>
  4152. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4153. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4154. <div class="checkDiv" v-else>
  4155. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4156. </div>
  4157. </div>
  4158. </div> -->
  4159. <div class="tool" :class="{
  4160. isToolChoose:
  4161. itemTool.tool.indexOf(41) != -1,
  4162. }" @click="
  4163. addTools(41, itemTaskIndex, toolIndex)
  4164. ">
  4165. <div class="whiteBIcon" @click.stop="
  4166. openTools(itemTaskIndex, 41, toolIndex)
  4167. ">
  4168. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4169. <div style="margin: 5px 0">选择匹配</div>
  4170. </div>
  4171. <div class="noCTool">
  4172. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4173. </div>
  4174. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4175. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4176. </div>
  4177. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4178. <img src="../../../assets/icon/checkNo.png" alt
  4179. v-if="itemTool.tool.indexOf(41) == -1" />
  4180. <div class="checkDiv" v-else>
  4181. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4182. </div>
  4183. </div> -->
  4184. </div>
  4185. <div class="tool" :class="{
  4186. isToolChoose:
  4187. itemTool.tool.indexOf(47) != -1,
  4188. }" @click="
  4189. addTools(47, itemTaskIndex, toolIndex)
  4190. ">
  4191. <div class="whiteBIcon" @click.stop="
  4192. openTools(itemTaskIndex, 47, toolIndex)
  4193. ">
  4194. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4195. <div style="margin: 5px 0">排序</div>
  4196. </div>
  4197. <div class="noCTool">
  4198. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4199. </div>
  4200. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4201. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4202. </div>
  4203. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4204. <img src="../../../assets/icon/checkNo.png" alt
  4205. v-if="itemTool.tool.indexOf(47) == -1" />
  4206. <div class="checkDiv" v-else>
  4207. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4208. </div>
  4209. </div> -->
  4210. </div>
  4211. <!-- <div class="tool">
  4212. <div
  4213. class="whiteBIcon"
  4214. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4215. >
  4216. <img
  4217. src="../../../assets/icon/thirdToolList/mp3.png"
  4218. alt
  4219. />
  4220. <div style="margin: 5px 0">上传音频</div>
  4221. </div>
  4222. <div
  4223. class="check"
  4224. @click="addTools(42, itemTaskIndex, toolIndex)"
  4225. >
  4226. <img
  4227. src="../../../assets/icon/checkNo.png"
  4228. alt
  4229. v-if="itemTool.tool.indexOf(42) == -1"
  4230. />
  4231. <img
  4232. src="../../../assets/icon/checkedIs.png"
  4233. alt
  4234. v-else
  4235. />
  4236. </div>
  4237. </div> -->
  4238. </div>
  4239. <div class="toolSort" v-if="itemTool.toolType == 3">
  4240. <div class="tool" :class="{
  4241. isToolChoose:
  4242. itemTool.tool.indexOf(18) != -1,
  4243. }" @click="
  4244. addTools(18, itemTaskIndex, toolIndex)
  4245. ">
  4246. <div class="whiteBIcon" @click.stop="
  4247. addTools(18, itemTaskIndex, toolIndex)
  4248. ">
  4249. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4250. <div style="margin: 5px 0">训练平台</div>
  4251. </div>
  4252. <div class="noCTool">
  4253. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4254. </div>
  4255. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4256. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4257. </div>
  4258. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4259. <img src="../../../assets/icon/checkNo.png" alt
  4260. v-if="itemTool.tool.indexOf(18) == -1" />
  4261. <div class="checkDiv" v-else>
  4262. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4263. </div>
  4264. </div> -->
  4265. </div>
  4266. <div class="tool" :class="{
  4267. isToolChoose:
  4268. itemTool.tool.indexOf(21) != -1,
  4269. }" @click="
  4270. addTools(21, itemTaskIndex, toolIndex)
  4271. ">
  4272. <div class="whiteBIcon" @click.stop="
  4273. addTools(21, itemTaskIndex, toolIndex)
  4274. ">
  4275. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4276. <div style="margin: 5px 0">
  4277. AIoT Blockly
  4278. </div>
  4279. </div>
  4280. <div class="noCTool">
  4281. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4282. </div>
  4283. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4284. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4285. </div>
  4286. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4287. <img src="../../../assets/icon/checkNo.png" alt
  4288. v-if="itemTool.tool.indexOf(21) == -1" />
  4289. <div class="checkDiv" v-else>
  4290. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4291. </div>
  4292. </div> -->
  4293. </div>
  4294. <!-- <div class="tool">
  4295. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4296. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4297. <div style="margin: 5px 0">AI体验</div>
  4298. </div>
  4299. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4300. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4301. <div class="checkDiv" v-else>
  4302. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4303. </div>
  4304. </div>
  4305. </div> -->
  4306. <div class="tool" :class="{
  4307. isToolChoose:
  4308. itemTool.tool.indexOf(23) != -1,
  4309. }" @click="
  4310. addTools(23, itemTaskIndex, toolIndex)
  4311. ">
  4312. <div class="whiteBIcon" @click.stop="
  4313. addTools(23, itemTaskIndex, toolIndex)
  4314. ">
  4315. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4316. <div style="margin: 5px 0">AI Python</div>
  4317. </div>
  4318. <div class="noCTool">
  4319. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4320. </div>
  4321. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4322. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4323. </div>
  4324. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4325. <img src="../../../assets/icon/checkNo.png" alt
  4326. v-if="itemTool.tool.indexOf(23) == -1" />
  4327. <div class="checkDiv" v-else>
  4328. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4329. </div>
  4330. </div> -->
  4331. </div>
  4332. <div class="tool" :class="{
  4333. isToolChoose:
  4334. itemTool.tool.indexOf(24) != -1,
  4335. }" @click="
  4336. addTools(24, itemTaskIndex, toolIndex)
  4337. ">
  4338. <div class="whiteBIcon" @click.stop="
  4339. addTools(24, itemTaskIndex, toolIndex)
  4340. ">
  4341. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4342. <div style="margin: 5px 0">
  4343. AI Blockly
  4344. </div>
  4345. </div>
  4346. <div class="noCTool">
  4347. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4348. </div>
  4349. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4350. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4351. </div>
  4352. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4353. <img src="../../../assets/icon/checkNo.png" alt
  4354. v-if="itemTool.tool.indexOf(24) == -1" />
  4355. <div class="checkDiv" v-else>
  4356. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4357. </div>
  4358. </div> -->
  4359. </div>
  4360. <div class="tool" :class="{
  4361. isToolChoose:
  4362. itemTool.tool.indexOf(32) != -1,
  4363. }" @click="
  4364. addTools(32, itemTaskIndex, toolIndex)
  4365. ">
  4366. <div class="whiteBIcon" @click.stop="
  4367. addTools(32, itemTaskIndex, toolIndex)
  4368. ">
  4369. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4370. <div style="margin: 5px 0">源码编辑</div>
  4371. </div>
  4372. <div class="noCTool">
  4373. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4374. </div>
  4375. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4376. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4377. </div>
  4378. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4379. <img src="../../../assets/icon/checkNo.png" alt
  4380. v-if="itemTool.tool.indexOf(32) == -1" />
  4381. <div class="checkDiv" v-else>
  4382. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4383. </div>
  4384. </div> -->
  4385. </div>
  4386. <div class="tool" :class="{
  4387. isToolChoose:
  4388. itemTool.tool.indexOf(57) != -1,
  4389. }" @click="
  4390. addTools(57, itemTaskIndex, toolIndex)
  4391. ">
  4392. <div class="whiteBIcon" @click.stop="
  4393. openTools(itemTaskIndex, 57, toolIndex)
  4394. ">
  4395. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4396. <div style="margin: 5px 0">CocoPi</div>
  4397. </div>
  4398. <div class="noCTool">
  4399. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4400. </div>
  4401. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4402. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4403. </div>
  4404. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4405. <img src="../../../assets/icon/checkNo.png" alt
  4406. v-if="itemTool.tool.indexOf(57) == -1" />
  4407. <div class="checkDiv" v-else>
  4408. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4409. </div>
  4410. </div> -->
  4411. </div>
  4412. <div class="tool" :class="{
  4413. isToolChoose:
  4414. itemTool.tool.indexOf(63) != -1,
  4415. }" @click="
  4416. addTools(63, itemTaskIndex, toolIndex)
  4417. ">
  4418. <div class="whiteBIcon" @click.stop="
  4419. addTools(63, itemTaskIndex, toolIndex)
  4420. ">
  4421. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4422. <div style="margin: 5px 0">海龟编程</div>
  4423. </div>
  4424. <div class="noCTool">
  4425. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4426. </div>
  4427. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4428. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4429. </div>
  4430. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4431. <img src="../../../assets/icon/checkNo.png" alt
  4432. v-if="itemTool.tool.indexOf(63) == -1" />
  4433. <div class="checkDiv" v-else>
  4434. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4435. </div>
  4436. </div> -->
  4437. </div>
  4438. <div class="tool" :class="{
  4439. isToolChoose:
  4440. itemTool.tool.indexOf(71) != -1,
  4441. }" @click="
  4442. addTools(71, itemTaskIndex, toolIndex)
  4443. ">
  4444. <div class="whiteBIcon" @click.stop="
  4445. addTools(71, itemTaskIndex, toolIndex)
  4446. ">
  4447. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4448. <div style="margin: 5px 0">AI智能体</div>
  4449. </div>
  4450. <div class="noCTool">
  4451. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4452. </div>
  4453. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4454. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4455. </div>
  4456. </div>
  4457. </div>
  4458. <div class="toolSort" v-if="itemTool.toolType == 7">
  4459. <div class="tool" :class="{
  4460. isToolChoose:
  4461. itemTool.tool.indexOf(40) != -1,
  4462. }" @click.stop="
  4463. addTools(40, itemTaskIndex, toolIndex)
  4464. ">
  4465. <div class="whiteBIcon" @click.stop="
  4466. openTools(itemTaskIndex, 40, toolIndex)
  4467. ">
  4468. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4469. <div style="margin: 5px 0">个人评价</div>
  4470. </div>
  4471. <div class="noCTool">
  4472. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4473. </div>
  4474. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4475. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4476. </div>
  4477. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4478. <img src="../../../assets/icon/checkNo.png" alt
  4479. v-if="itemTool.tool.indexOf(40) == -1" />
  4480. <div class="checkDiv" v-else>
  4481. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4482. </div>
  4483. </div> -->
  4484. </div>
  4485. </div>
  4486. <div class="toolSort" v-if="itemTool.toolType == 5">
  4487. <div class="tool" :class="{
  4488. isToolChoose:
  4489. itemTool.tool.indexOf(28) != -1,
  4490. }" @click="
  4491. addTools(28, itemTaskIndex, toolIndex)
  4492. ">
  4493. <div class="whiteBIcon" @click.stop="
  4494. addTools(28, itemTaskIndex, toolIndex)
  4495. ">
  4496. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4497. <div style="margin: 5px 0">翻译</div>
  4498. </div>
  4499. <div class="noCTool">
  4500. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4501. </div>
  4502. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4503. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4504. </div>
  4505. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4506. <img src="../../../assets/icon/checkNo.png" alt
  4507. v-if="itemTool.tool.indexOf(28) == -1" />
  4508. <div class="checkDiv" v-else>
  4509. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4510. </div>
  4511. </div> -->
  4512. </div>
  4513. <div class="tool" :class="{
  4514. isToolChoose:
  4515. itemTool.tool.indexOf(31) != -1,
  4516. }" @click="
  4517. addTools(31, itemTaskIndex, toolIndex)
  4518. ">
  4519. <div class="whiteBIcon" @click.stop="
  4520. addTools(31, itemTaskIndex, toolIndex)
  4521. ">
  4522. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4523. <div style="margin: 5px 0">数字画板</div>
  4524. </div>
  4525. <div class="noCTool">
  4526. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4527. </div>
  4528. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4529. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4530. </div>
  4531. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4532. <img src="../../../assets/icon/checkNo.png" alt
  4533. v-if="itemTool.tool.indexOf(31) == -1" />
  4534. <div class="checkDiv" v-else>
  4535. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4536. </div>
  4537. </div> -->
  4538. </div>
  4539. <div class="tool" :class="{
  4540. isToolChoose:
  4541. itemTool.tool.indexOf(39) != -1,
  4542. }" @click="
  4543. addTools(39, itemTaskIndex, toolIndex)
  4544. ">
  4545. <div class="whiteBIcon" @click.stop="
  4546. addTools(39, itemTaskIndex, toolIndex)
  4547. ">
  4548. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4549. <div style="margin: 5px 0">GeoGebra</div>
  4550. </div>
  4551. <div class="noCTool">
  4552. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4553. </div>
  4554. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4555. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4556. </div>
  4557. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4558. <img src="../../../assets/icon/checkNo.png" alt
  4559. v-if="itemTool.tool.indexOf(39) == -1" />
  4560. <div class="checkDiv" v-else>
  4561. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4562. </div>
  4563. </div> -->
  4564. </div>
  4565. <div class="tool" :class="{
  4566. isToolChoose:
  4567. itemTool.tool.indexOf(66) != -1,
  4568. }" @click="
  4569. addTools(66, itemTaskIndex, toolIndex)
  4570. ">
  4571. <div class="whiteBIcon" @click.stop="
  4572. addTools(66, itemTaskIndex, toolIndex)
  4573. ">
  4574. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4575. <div style="margin: 5px 0">公式编辑</div>
  4576. </div>
  4577. <div class="noCTool">
  4578. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4579. </div>
  4580. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4581. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4582. </div>
  4583. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4584. <img src="../../../assets/icon/checkNo.png" alt
  4585. v-if="itemTool.tool.indexOf(66) == -1" />
  4586. <div class="checkDiv" v-else>
  4587. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4588. </div>
  4589. </div> -->
  4590. </div>
  4591. <!-- <div class="tool">
  4592. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4593. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4594. <div style="margin: 5px 0">分子结构</div>
  4595. </div>
  4596. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4597. <img src="../../../assets/icon/checkNo.png" alt
  4598. v-if="itemTool.tool.indexOf(67) == -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" :class="{
  4605. isToolChoose:
  4606. itemTool.tool.indexOf(68) != -1,
  4607. }" @click="
  4608. addTools(68, itemTaskIndex, toolIndex)
  4609. ">
  4610. <div class="whiteBIcon" @click.stop="
  4611. addTools(68, itemTaskIndex, toolIndex)
  4612. ">
  4613. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4614. <div style="margin: 5px 0">时间轴</div>
  4615. </div>
  4616. <div class="noCTool">
  4617. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4618. </div>
  4619. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4620. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4621. </div>
  4622. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4623. <img src="../../../assets/icon/checkNo.png" alt
  4624. v-if="itemTool.tool.indexOf(68) == -1" />
  4625. <div class="checkDiv" v-else>
  4626. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4627. </div>
  4628. </div> -->
  4629. </div>
  4630. <div class="tool" :class="{
  4631. isToolChoose:
  4632. itemTool.tool.indexOf(69) != -1,
  4633. }" @click="
  4634. addTools(69, itemTaskIndex, toolIndex)
  4635. ">
  4636. <div class="whiteBIcon" @click.stop="
  4637. openTools(itemTaskIndex, 69, toolIndex)
  4638. ">
  4639. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4640. <div style="margin: 5px 0">英语写作</div>
  4641. </div>
  4642. <div class="noCTool">
  4643. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4644. </div>
  4645. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4646. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4647. </div>
  4648. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4649. <img src="../../../assets/icon/checkNo.png" alt
  4650. v-if="itemTool.tool.indexOf(4) == -1" />
  4651. <div class="checkDiv" v-else>
  4652. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4653. </div>
  4654. </div> -->
  4655. </div>
  4656. <div class="tool" :class="{
  4657. isToolChoose:
  4658. itemTool.tool.indexOf(70) != -1,
  4659. }" @click="
  4660. addTools(70, itemTaskIndex, toolIndex)
  4661. ">
  4662. <div class="whiteBIcon" @click.stop="
  4663. openTools(itemTaskIndex, 70, toolIndex)
  4664. ">
  4665. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4666. <div style="margin: 5px 0">英语口语</div>
  4667. </div>
  4668. <div class="noCTool">
  4669. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4670. </div>
  4671. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4672. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4673. </div>
  4674. </div>
  4675. <!-- <div class="tool">
  4676. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4677. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4678. <div style="margin: 5px 0">翻译</div>
  4679. </div>
  4680. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4681. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4682. <div class="checkDiv" v-else>
  4683. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4684. </div>
  4685. </div>
  4686. </div>
  4687. <div class="tool">
  4688. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4689. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4690. <div style="margin: 5px 0">魔盒识字</div>
  4691. </div>
  4692. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4693. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4694. <div class="checkDiv" v-else>
  4695. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4696. </div>
  4697. </div>
  4698. </div>
  4699. <div class="tool">
  4700. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4701. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4702. <div style="margin: 5px 0">24点</div>
  4703. </div>
  4704. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4705. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4706. <div class="checkDiv" v-else>
  4707. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4708. </div>
  4709. </div>
  4710. </div>
  4711. <div class="tool">
  4712. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4713. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4714. <div style="margin: 5px 0">数学画板</div>
  4715. </div>
  4716. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4717. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4718. <div class="checkDiv" v-else>
  4719. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4720. </div>
  4721. </div>
  4722. </div>
  4723. <div class="tool">
  4724. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4725. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4726. <div style="margin: 5px 0">GeoGebra</div>
  4727. </div>
  4728. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4729. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4730. <div class="checkDiv" v-else>
  4731. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4732. </div>
  4733. </div>
  4734. </div>
  4735. <div class="tool">
  4736. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4737. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4738. <div style="margin: 5px 0">模拟驾驶</div>
  4739. </div>
  4740. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4741. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4742. <div class="checkDiv" v-else>
  4743. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4744. </div>
  4745. </div>
  4746. </div>
  4747. <div class="tool">
  4748. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4749. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4750. <div style="margin: 5px 0">路径搜索</div>
  4751. </div>
  4752. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4753. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4754. <div class="checkDiv" v-else>
  4755. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4756. </div>
  4757. </div>
  4758. </div>
  4759. <div class="tool">
  4760. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4761. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4762. <div style="margin: 5px 0">深度学习</div>
  4763. </div>
  4764. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4765. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4766. <div class="checkDiv" v-else>
  4767. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4768. </div>
  4769. </div>
  4770. </div>
  4771. <div class="tool">
  4772. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4773. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4774. <div style="margin: 5px 0">全历史</div>
  4775. </div>
  4776. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4777. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4778. <div class="checkDiv" v-else>
  4779. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4780. </div>
  4781. </div>
  4782. </div>
  4783. </div>
  4784. <div class="toolSort" v-if="itemTool.toolType == 4">
  4785. <div class="tool">
  4786. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4787. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4788. <div style="margin: 5px 0">课程设计</div>
  4789. </div>
  4790. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4791. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4792. <div class="checkDiv" v-else>
  4793. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4794. </div>
  4795. </div>
  4796. </div>
  4797. <div class="tool">
  4798. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4799. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4800. <div style="margin: 5px 0">目标管理</div>
  4801. </div>
  4802. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4803. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4804. <div class="checkDiv" v-else>
  4805. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4806. </div>
  4807. </div>
  4808. </div> -->
  4809. <!-- <div class="tool">
  4810. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4811. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4812. <div style="margin: 5px 0">汉字宫</div>
  4813. </div>
  4814. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4815. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4816. <div class="checkDiv" v-else>
  4817. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4818. </div>
  4819. </div>
  4820. </div> -->
  4821. </div>
  4822. </div>
  4823. <!-- v-show="!itemTool.isFold3" -->
  4824. <div class="op_tool_box"
  4825. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  4826. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  4827. class="binfo_input" style="
  4828. margin: 0 0 20px 0;
  4829. width: 100% !important;
  4830. " v-model="itemTool.toolDetail"></textarea>
  4831. <div class="op_box">
  4832. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  4833. <div style="display: flex">
  4834. <el-switch style="margin-right: 10px" v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2'" @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  4835. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  4836. <div class="r_pub_button_op"
  4837. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
  4838. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
  4839. 智能优化</div>
  4840.                              
  4841. </el-tooltip>
  4842. </div>
  4843. </div>
  4844. </div>
  4845. </div>
  4846. <!-- <div class="addToolFun2" @click="addToolFun(itemTaskIndex)">
  4847. <div class="addToolImg">
  4848. <img src="../../../assets/icon/add.png" alt />
  4849. </div>
  4850. <div>添加工具</div>
  4851. </div> -->
  4852. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)" style="
  4853. margin: 0 auto;
  4854. padding: 0 30px;
  4855. height: 45px;
  4856. ">
  4857. 添加工具
  4858. </button>
  4859. </div>
  4860. </div>
  4861. <div v-else-if="
  4862. unitJson[unitIndex].easy == 2 ||
  4863. unitJson[unitIndex].easy == 4
  4864. " class="toolChoose" style="padding: 0 0 40px">
  4865. <div class="tools">
  4866. <div class="leftTools" style="width: 100%" v-for="(
  4867. itemTool, toolIndex
  4868. ) in itemTask.toolChoose" :key="toolIndex">
  4869. <div>
  4870. <textarea rows="3" type="text" placeholder="添加工具描述" class="binfo_input" style="
  4871. margin: 0 0 20px 0;
  4872. width: 100% !important;
  4873. " v-model="itemTool.toolDetail"></textarea>
  4874. </div>
  4875. <div style="
  4876. display: flex;
  4877. flex-direction: row;
  4878. align-items: baseline;
  4879. flex-wrap: nowrap;
  4880. justify-content: flex-start;
  4881. position: relative;
  4882. ">
  4883. <div style="margin-right: 20px; font-weight: bold"
  4884. :id="'gj' + itemTaskIndex + '' + toolIndex">
  4885. 工具 {{ toolIndex + 1 }} :
  4886. </div>
  4887. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  4888. v-if="itemTask.toolChoose.length > 1" style="right: 0"></div>
  4889. </div>
  4890. <div style="min-height: 163px">
  4891. <div class="toolSort">
  4892. <div class="tool">
  4893. <div class="whiteBIcon" @click="
  4894. openTools(itemTaskIndex, 1, toolIndex)
  4895. ">
  4896. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  4897. <div style="margin: 5px 0">电子白板</div>
  4898. </div>
  4899. <div class="check" @click="
  4900. addTools(1, itemTaskIndex, toolIndex)
  4901. ">
  4902. <img src="../../../assets/icon/checkNo.png" alt
  4903. v-if="itemTool.tool.indexOf(1) == -1" />
  4904. <div class="checkDiv" v-else>
  4905. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4906. </div>
  4907. </div>
  4908. </div>
  4909. <div class="tool">
  4910. <div class="whiteBIcon" @click="
  4911. openTools(itemTaskIndex, 52, toolIndex)
  4912. ">
  4913. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4914. <div style="margin: 5px 0">文档</div>
  4915. </div>
  4916. <div class="check" @click="
  4917. addTools(52, itemTaskIndex, toolIndex)
  4918. ">
  4919. <img src="../../../assets/icon/checkNo.png" alt
  4920. v-if="itemTool.tool.indexOf(52) == -1" />
  4921. <div class="checkDiv" v-else>
  4922. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4923. </div>
  4924. </div>
  4925. </div>
  4926. <div class="tool">
  4927. <div class="whiteBIcon" @click="
  4928. openTools(itemTaskIndex, 3, toolIndex)
  4929. ">
  4930. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4931. <div style="margin: 5px 0">思维导图</div>
  4932. </div>
  4933. <div class="check" @click="
  4934. addTools(3, itemTaskIndex, toolIndex)
  4935. ">
  4936. <img src="../../../assets/icon/checkNo.png" alt
  4937. v-if="itemTool.tool.indexOf(3) == -1" />
  4938. <div class="checkDiv" v-else>
  4939. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4940. </div>
  4941. </div>
  4942. </div>
  4943. <div class="tool">
  4944. <div class="whiteBIcon" @click="
  4945. openTools(itemTaskIndex, 4, toolIndex)
  4946. ">
  4947. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4948. <div style="margin: 5px 0">问卷调查</div>
  4949. </div>
  4950. <div class="check" @click="
  4951. addTools(4, itemTaskIndex, toolIndex)
  4952. ">
  4953. <img src="../../../assets/icon/checkNo.png" alt
  4954. v-if="itemTool.tool.indexOf(4) == -1" />
  4955. <div class="checkDiv" v-else>
  4956. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4957. </div>
  4958. </div>
  4959. </div>
  4960. <div class="tool">
  4961. <div class="whiteBIcon" @click="
  4962. openTools(itemTaskIndex, 45, toolIndex)
  4963. ">
  4964. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4965. <div style="margin: 5px 0">选择题</div>
  4966. </div>
  4967. <div class="check" @click="
  4968. addTools(45, itemTaskIndex, toolIndex)
  4969. ">
  4970. <img src="../../../assets/icon/checkNo.png" alt
  4971. v-if="itemTool.tool.indexOf(45) == -1" />
  4972. <div class="checkDiv" v-else>
  4973. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4974. </div>
  4975. </div>
  4976. </div>
  4977. <div class="tool">
  4978. <div class="whiteBIcon" @click="
  4979. openTools(itemTaskIndex, 15, toolIndex)
  4980. ">
  4981. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4982. <div style="margin: 5px 0">问答</div>
  4983. </div>
  4984. <div class="check" @click="
  4985. addTools(15, itemTaskIndex, toolIndex)
  4986. ">
  4987. <img src="../../../assets/icon/checkNo.png" alt
  4988. v-if="itemTool.tool.indexOf(15) == -1" />
  4989. <div class="checkDiv" v-else>
  4990. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4991. </div>
  4992. </div>
  4993. </div>
  4994. <div class="tool">
  4995. <div class="whiteBIcon" @click="
  4996. addTools(16, itemTaskIndex, toolIndex)
  4997. ">
  4998. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4999. <div style="margin: 5px 0">作业提交</div>
  5000. </div>
  5001. <div class="check" @click="
  5002. addTools(16, itemTaskIndex, toolIndex)
  5003. ">
  5004. <img src="../../../assets/icon/checkNo.png" alt
  5005. v-if="itemTool.tool.indexOf(16) == -1" />
  5006. <div class="checkDiv" v-else>
  5007. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5008. </div>
  5009. </div>
  5010. </div>
  5011. <div class="tool">
  5012. <div class="whiteBIcon" @click="
  5013. openTools(itemTaskIndex, 50, toolIndex)
  5014. ">
  5015. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  5016. <div style="margin: 5px 0">批量上传</div>
  5017. </div>
  5018. <div class="check" @click="
  5019. addTools(50, itemTaskIndex, toolIndex)
  5020. ">
  5021. <img src="../../../assets/icon/checkNo.png" alt
  5022. v-if="itemTool.tool.indexOf(50) == -1" />
  5023. <div class="checkDiv" v-else>
  5024. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5025. </div>
  5026. </div>
  5027. </div>
  5028. <div class="tool">
  5029. <div class="whiteBIcon" @click="
  5030. openTools(itemTaskIndex, 41, toolIndex)
  5031. ">
  5032. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  5033. <div style="margin: 5px 0">选择匹配</div>
  5034. </div>
  5035. <div class="check" @click="
  5036. addTools(41, itemTaskIndex, toolIndex)
  5037. ">
  5038. <img src="../../../assets/icon/checkNo.png" alt
  5039. v-if="itemTool.tool.indexOf(41) == -1" />
  5040. <div class="checkDiv" v-else>
  5041. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5042. </div>
  5043. </div>
  5044. </div>
  5045. <div class="tool">
  5046. <div class="whiteBIcon" @click="
  5047. openTools(itemTaskIndex, 47, toolIndex)
  5048. ">
  5049. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  5050. <div style="margin: 5px 0">排序</div>
  5051. </div>
  5052. <div class="check" @click="
  5053. addTools(47, itemTaskIndex, toolIndex)
  5054. ">
  5055. <img src="../../../assets/icon/checkNo.png" alt
  5056. v-if="itemTool.tool.indexOf(47) == -1" />
  5057. <div class="checkDiv" v-else>
  5058. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5059. </div>
  5060. </div>
  5061. </div>
  5062. <div class="tool">
  5063. <div class="whiteBIcon" @click="
  5064. openTools(itemTaskIndex, 48, toolIndex)
  5065. ">
  5066. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  5067. <div style="margin: 5px 0">表格</div>
  5068. </div>
  5069. <div class="check" @click="
  5070. addTools(48, itemTaskIndex, toolIndex)
  5071. ">
  5072. <img src="../../../assets/icon/checkNo.png" alt
  5073. v-if="itemTool.tool.indexOf(48) == -1" />
  5074. <div class="checkDiv" v-else>
  5075. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5076. </div>
  5077. </div>
  5078. </div>
  5079. </div>
  5080. </div>
  5081. </div>
  5082. <!-- <div class="addToolFun" style="margin-bottom: 20px" @click="addToolFun(itemTaskIndex)">
  5083. <div class="addToolImg">
  5084. <img src="../../../assets/icon/add.png" alt />
  5085. </div>
  5086. <div>添加工具</div>
  5087. </div> -->
  5088. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex)"
  5089. style="margin: 35px auto 20px">
  5090. 添加工具
  5091. </button>
  5092. </div>
  5093. </div>
  5094. <div v-else-if="
  5095. unitJson[unitIndex].easy == 1 ||
  5096. (unitJson[unitIndex].easy == 5 &&
  5097. itemTask.taskType == 2)
  5098. " class="toolChoose" style="padding: 0 0 40px">
  5099. <div class="tools">
  5100. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0" v-for="(
  5101. itemTool, toolIndex
  5102. ) in itemTask.toolChoose" :key="toolIndex">
  5103. <div style="min-height: 163px">
  5104. <div class="toolSort">
  5105. <div class="tool">
  5106. <div class="whiteBIcon" @click="
  5107. openTools(itemTaskIndex, 50, toolIndex)
  5108. ">
  5109. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  5110. <div style="margin: 5px 0">批量上传</div>
  5111. </div>
  5112. <div class="check" @click="
  5113. addTools(50, itemTaskIndex, toolIndex)
  5114. ">
  5115. <img src="../../../assets/icon/checkNo.png" alt
  5116. v-if="itemTool.tool.indexOf(50) == -1" />
  5117. <div class="checkDiv" v-else>
  5118. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  5119. </div>
  5120. </div>
  5121. </div>
  5122. </div>
  5123. </div>
  5124. </div>
  5125. </div>
  5126. </div>
  5127. <div class="elist_css" v-if="!(unitJson[unitJson.length - 1].easy == 4)"
  5128. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])" element-loading-text="小可正在努力生成中,请稍等...">
  5129. <div class="elist_title">
  5130. <div style="
  5131. display: flex;
  5132. flex-direction: row;
  5133. align-items: center;
  5134. margin: 20px 0;
  5135. ">
  5136. <div class="lineTitle clineTitle">评价设置</div>
  5137. <div style="margin-left:auto;display: flex;">
  5138. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5139. <div class="r_pub_button_op"
  5140. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5141. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  5142. </el-tooltip>
  5143. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  5144. <div class="r_pub_button_op" style="margin-left:10px;"
  5145. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5146. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  5147. </el-tooltip>
  5148. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5149. <div class="r_pub_button_op" style="margin-left:10px;"
  5150. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5151. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList && itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  5152. </el-tooltip>
  5153. </div>
  5154. <!-- <div class="line" style="width: 90%"></div> -->
  5155. </div>
  5156. </div>
  5157. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5158. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5159. 上传补充资料
  5160. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5161. beforeUploadInfo2(
  5162. $event,
  5163. 18,
  5164. itemTaskIndex
  5165. )
  5166. " />
  5167. </button>
  5168. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5169. <div class="add_chapters_box add_c_none" v-if="
  5170. pingjiaInfoData[itemTaskIndex] &&
  5171. pingjiaInfoData[itemTaskIndex].length == 0
  5172. ">
  5173. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  5174. </div>
  5175. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5176. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  5177. getChapterData(
  5178. $event,
  5179. index1,
  5180. item1.type
  5181. )
  5182. " >
  5183. <div class="chapter_upload_o" style="
  5184. position: relative;
  5185. display: flex;
  5186. align-items: center;
  5187. ">
  5188. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5189. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5190. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5191. </div>
  5192. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5193. </div>
  5194. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5195. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5196. </div>
  5197. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5198. </div>
  5199. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5200. </div>
  5201. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5202. </div>
  5203. </div>
  5204. <div class="chapter_upload_n">
  5205. <input readonly="true" v-if="
  5206. item1.type == 2 ||
  5207. item1.type == 3 ||
  5208. item1.type == 12 ||
  5209. item1.type == 13 ||
  5210. item1.type == 7
  5211. " :placeholder="item1.name" @click.stop="
  5212. checkChpater3($event, index1, item1)
  5213. " style="
  5214. border: none;
  5215. outline: none;
  5216. width: 80%;
  5217. minwidth: 215px;
  5218. z-index: 99;
  5219. font-size: 14px;
  5220. white-space: nowrap;
  5221. overflow: hidden;
  5222. text-overflow: ellipsis;
  5223. " />
  5224. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5225. border: none;
  5226. outline: none;
  5227. width: 80%;
  5228. white-space: nowrap;
  5229. overflow: hidden;
  5230. text-overflow: ellipsis;
  5231. " readonly="true" @click="
  5232. selectAttText(index1)
  5233. " />
  5234. <input :placeholder="item1.title ? item1.title : '链接'
  5235. " v-if="item1.type == 8" style="
  5236. border: none;
  5237. outline: none;
  5238. width: 80%;
  5239. white-space: nowrap;
  5240. overflow: hidden;
  5241. text-overflow: ellipsis;
  5242. " readonly="true" @click="selectLine(index1)" />
  5243. <input :placeholder="item1.title ? item1.title : '链接'
  5244. " v-if="item1.type == 14" style="
  5245. border: none;
  5246. outline: none;
  5247. width: 80%;
  5248. white-space: nowrap;
  5249. overflow: hidden;
  5250. text-overflow: ellipsis;
  5251. " readonly="true" @click="
  5252. openUpdateSource(index1)
  5253. " />
  5254. </div>
  5255. <div class="chapter_upload_ic">
  5256. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5257. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5258. checkChpater3($event, index1, item1)
  5259. ">
  5260. <div></div>
  5261. </div>
  5262. <div class="chapter_upload_ic_r" @click.stop="
  5263. deletepingjiaInfoData(
  5264. $event,
  5265. index1,
  5266. itemTaskIndex
  5267. )
  5268. ">
  5269. <div></div>
  5270. </div>
  5271. </div>
  5272. </div>
  5273. </div>
  5274. </div>
  5275. </div>
  5276. <div v-if="
  5277. pingjiainfoproVisible[itemTaskIndex]
  5278. " class="mask">
  5279. <div class="progressBox">
  5280. <div class="lbox">
  5281. <img src="../../../assets/loading.gif" />上传中,请稍后
  5282. </div>
  5283. <div style="margin-bottom: 10px">
  5284. <span>{{
  5285. pingjiainfoisFinishSize[itemTaskIndex]
  5286. }}</span>
  5287. /
  5288. <span>{{
  5289. pingjiainfoisAllSize[itemTaskIndex]
  5290. }}</span>
  5291. </div>
  5292. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5293. ? pingjiainfoprogress[itemTaskIndex]
  5294. : 0
  5295. " style="width: 80%"></el-progress> -->
  5296. </div>
  5297. </div>
  5298. </div>
  5299. <div class="mbCss">
  5300. <div class="pjCss" :style="{
  5301. width: itemTask.isEvaFold
  5302. ? 'calc(100% - 55%)'
  5303. : 'calc(100% - 120px)',
  5304. }">
  5305. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5306. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5307. <div class="elist_inptu_text">
  5308. <span>目标:</span>
  5309. <!-- <span>核心素养:</span> -->
  5310. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  5311. <el-switch
  5312. @change="forceUpdate"
  5313. class="rateSwitch"
  5314. style="margin-left: auto;"
  5315. v-model="itemTask.eList[eIndex].isai"
  5316. active-color="#0061FF"
  5317. active-text="AI评分"
  5318. inactive-text=""
  5319. active-value="1"
  5320. inactive-value="2">
  5321. </el-switch>
  5322. </div>
  5323. <div class="elist_inptu_text" v-show="false">
  5324. <!-- <span>评价维度:</span> -->
  5325. <span>能力:</span>
  5326. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5327. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5328. <!-- </el-tooltip> -->
  5329. <!-- <span>评星等级:</span>
  5330. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5331. disabled></el-rate> -->
  5332. <div class="remove" @click="
  5333. deletEList(
  5334. unitIndex,
  5335. itemTaskIndex,
  5336. eIndex
  5337. )
  5338. "></div>
  5339. </div>
  5340. <div class="elist_inptu_text">
  5341. <!-- <span>维度描述:</span> -->
  5342. <span>评价标准:</span>
  5343. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5344. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5345. <div class="remove" @click="
  5346. deletEList(
  5347. unitIndex,
  5348. itemTaskIndex,
  5349. eIndex
  5350. )
  5351. "></div>
  5352. <!-- </el-tooltip> -->
  5353. </div>
  5354. <div class="elist_inptu_text" v-if="evalua">
  5355. <span>目标:</span>
  5356. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5357. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5358. @change="forceUpdate()">
  5359. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5360. :value="e.name">
  5361. </el-option>
  5362. </el-select> -->
  5363. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5364. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5365. </div>
  5366. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5367. <span>评价细则:</span>
  5368. <div style="width: calc(100%);">
  5369. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5370. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5371. <div class="ruleBtn"
  5372. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5373. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5374. </el-tooltip>
  5375. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5376. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5377. <div class="op_box">
  5378. <div class="op_remark"></div>
  5379. <div style="display: flex;">
  5380. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5381. <div class="r_pub_button_op"
  5382. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5383. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5384. </el-tooltip>
  5385. </div>
  5386. </div>
  5387. </div>
  5388. </div>
  5389. </div>
  5390. </div>
  5391. </div>
  5392. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5393. style="margin: 35px 35px 0 0">
  5394. <div class="addToolImg">
  5395. <img src="../../../assets/icon/add.png" alt />
  5396. </div>
  5397. <div>添加</div>
  5398. </div> -->
  5399. <div class="eva_btn_box">
  5400. <div class="eva_btn_left_box">
  5401. <button class="c_pub_button_add pub_btn_eval_img"
  5402. @click="addEList(unitIndex, itemTaskIndex)">
  5403. 添加
  5404. </button>
  5405. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5406. @click="openEList(unitIndex, itemTaskIndex)">
  5407. 资源
  5408. </button> -->
  5409. </div>
  5410. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5411. v-if="itemTask.eList && itemTask.eList.length">
  5412. 添加资源模板
  5413. </button>
  5414. </div>
  5415. </div>
  5416. <div v-if="evalua" style="
  5417. border: 1px solid #e5e5e5;
  5418. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5419. " :style="{
  5420. width: itemTask.isEvaFold ? '55%' : '116px',
  5421. }" class="evaCss">
  5422. <!-- <div class="e_add_top">
  5423. <div class="e_add_title">
  5424. <span>当前使用目标管理</span>
  5425. <span>{{ eTitle }}</span>
  5426. <img src="../../../assets/line.png" class="cru_line" style="
  5427. width: 125px;
  5428. height: 20px;
  5429. bottom: -10px;
  5430. left: 155px;
  5431. " />
  5432. </div>
  5433. </div> -->
  5434. <div class="e_add_content" style="width: 100%">
  5435. <div class="e_add_list_pbox" style="width: 100%">
  5436. <div class="e_add_list_pbox_title">
  5437. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5438. <div class="type_content" v-if="itemTask.isEvaFold">
  5439. <span :class="{ active: typeMode == 1 }"
  5440. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5441. <span :class="{ active: typeMode == 2 }"
  5442. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5443. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5444. </div>
  5445. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5446. @click="foldEva(itemTaskIndex)">
  5447. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5448. </div>
  5449. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5450. @click="foldEva(itemTaskIndex)">
  5451. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5452. </div>
  5453. </div>
  5454. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5455. style="min-height: 200px">
  5456. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5457. " v-if="typeMode == 1"></Mind>
  5458. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5459. </Sunburst>
  5460. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5461. v-if="typeMode == 3"></SeeBoard>
  5462. </div>
  5463. </div>
  5464. </div>
  5465. </div>
  5466. </div>
  5467. </div>
  5468. <div class="funBlock" style="padding: 0">
  5469. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5470. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5471. <div>
  5472. {{
  5473. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5474. }}
  5475. </div>
  5476. </div>
  5477. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5478. <div>展开</div>
  5479. <div class="arrow">
  5480. <img src="../../../assets/icon/expand.png" alt />
  5481. </div>
  5482. </div> -->
  5483. </div>
  5484. </div>
  5485. </div>
  5486. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5487. <!-- <div>
  5488. <img src="../../../../assets/icon/new/addStage.png" alt />
  5489. <span>添加任务</span>
  5490. </div> -->
  5491. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5492. 添加任务
  5493. </button>
  5494. </div>
  5495. </div>
  5496. <div class="info_btnBox3">
  5497. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5498. goTo(
  5499. '/course?userid=' +
  5500. userid +
  5501. '&oid=' +
  5502. oid +
  5503. '&org=' +
  5504. org +
  5505. '&role=' +
  5506. role
  5507. )
  5508. ">
  5509. 返回课程
  5510. </button>
  5511. <button class="c_pub_button_return pub_btn_last_img"
  5512. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5513. {{ steps == 4 ? "返回课程" : "上一步" }}
  5514. </button>
  5515. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5516. pub_btn_next_img: steps != 3,
  5517. pub_btn_finish_img: steps == 3,
  5518. }">
  5519. {{ steps == 3 ? "确认上传" : "下一步" }}
  5520. </button>
  5521. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5522. '修改模板' : '保存模板'}}</button>
  5523. </div>
  5524. </div>
  5525. </div>
  5526. </div>
  5527. </div>
  5528. <div style="
  5529. width: calc(100% - 20px);
  5530. background: rgb(255, 255, 255);
  5531. border-radius: 10px;
  5532. " v-if="steps == 4">
  5533. <div class="basic_box_success">
  5534. <div class="right_img">
  5535. <img src="../../../assets/icon/right.png" alt />
  5536. </div>
  5537. <div style="font-weight: bold">成功</div>
  5538. <!-- <div>您的课程编号</div>
  5539. <div class="number">{{ number }}</div>-->
  5540. <!-- <div class="success_button">
  5541. <div class="look_course" @click="isNoFinsh">
  5542. 邀请老师协同编辑
  5543. </div>
  5544. <div class="attend_others" @click="goCourse">预览课程</div>
  5545. </div> -->
  5546. </div>
  5547. </div>
  5548. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5549. @mouseleave="btnDisplay(false)" v-if="false">
  5550. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5551. goTo(
  5552. '/course?userid=' +
  5553. userid +
  5554. '&oid=' +
  5555. oid +
  5556. '&org=' +
  5557. org +
  5558. '&role=' +
  5559. role
  5560. )
  5561. ">
  5562. 返回课程
  5563. </button>
  5564. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5565. @click="lastSteps">
  5566. {{ steps == 4 ? "返回课程" : "上一步" }}
  5567. </button>
  5568. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5569. pub_btn_next_img: steps != 3,
  5570. pub_btn_finish_img: steps == 3,
  5571. }">
  5572. {{ steps == 3 ? "确认上传" : "下一步" }}
  5573. </button>
  5574. </div>
  5575. </div>
  5576. </div>
  5577. <div class="leftBar" v-if="istemplate == 1">
  5578. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5579. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5580. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5581. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5582. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5583. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5584. <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'"/>
  5585. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5586. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5587. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5588. <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'"/>
  5589. <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'"/>
  5590. <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'"/>
  5591. <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'"/>
  5592. <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'"/>
  5593. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5594. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5595. @setAiJson="setAiJson" /> -->
  5596. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5597. @setAiJson="setAiJson" />
  5598. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5599. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5600. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5601. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5602. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5603. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5604. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5605. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5606. </div>
  5607. <div class="leftBar2" v-if="istemplate != 1 && templateid == 'cf5722a4-401b-11ef-b873-005056b86cd2' && chatid">
  5608. <aiBoxRight
  5609. :courseId="chatid"
  5610. :unitJson="unitJson"
  5611. :quoteArray="isQuote"
  5612. :teacherCourseText="teacherCourseText"
  5613. :targetCourseText="targetCourseText"
  5614. :courseText2="courseText"
  5615. :targetCourseText2="targetCourseText2"
  5616. :cpote="cpote"
  5617. @setIsQuote="setIsQuote"></aiBoxRight>
  5618. </div>
  5619. </div>
  5620. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5621. class="dialog_diy2 customWidth">
  5622. <div>请复制该链接邀请协同编辑</div>
  5623. <div>http://www.boomyon.com/index-zhang.com</div>
  5624. <span slot="footer" class="dialog-footer">
  5625. <el-button type="primary">复制链接分享</el-button>
  5626. <el-button @click="dialogVisible = false">取消</el-button>
  5627. </span>
  5628. </el-dialog>
  5629. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5630. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5631. <el-form>
  5632. <el-form-item label="文档标题">
  5633. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5634. </el-form-item>
  5635. <div>文档简介</div>
  5636. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5637. </el-form>
  5638. <span slot="footer" class="dialog-footer">
  5639. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5640. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5641. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5642. </span>
  5643. </el-dialog>
  5644. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5645. :before-close="handleClose" class="dialog_diy">
  5646. <el-form>
  5647. <el-form-item label="文档标题">
  5648. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5649. </el-form-item>
  5650. <div>文档内容</div>
  5651. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5652. </el-form>
  5653. <span slot="footer" class="dialog-footer">
  5654. <el-button @click="clearChoose">取 消</el-button>
  5655. <el-button type="primary" @click="wordNext()">确定</el-button>
  5656. </span>
  5657. </el-dialog>
  5658. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5659. :before-close="handleClose" class="dialog_diy">
  5660. <el-form>
  5661. <el-form-item label="文本标题">
  5662. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5663. placeholder="请输入文本标题..."></el-input>
  5664. </el-form-item>
  5665. <!-- <div>富文本内容</div> -->
  5666. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5667. </el-form>
  5668. <span slot="footer" class="dialog-footer">
  5669. <el-button @click="clearAttText">取 消</el-button>
  5670. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5671. </span>
  5672. </el-dialog>
  5673. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5674. :before-close="handleClose" class="dialog_diy lineCss">
  5675. <el-form>
  5676. <el-form-item label="标题" :label-width="formLabelWidth">
  5677. <span>
  5678. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5679. </span>
  5680. </el-form-item>
  5681. <el-form-item label="链接" :label-width="formLabelWidth">
  5682. <span>
  5683. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5684. </span>
  5685. </el-form-item>
  5686. </el-form>
  5687. <span slot="footer" class="dialog-footer">
  5688. <el-button @click="clearLine">取 消</el-button>
  5689. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5690. </span>
  5691. </el-dialog>
  5692. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5693. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5694. <div>
  5695. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5696. </div>
  5697. <span slot="footer" class="dialog-footer">
  5698. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5699. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5700. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5701. </span>
  5702. </el-dialog>
  5703. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5704. :before-close="handleClose" class="addNewPP customWidth">
  5705. <div class="people">
  5706. <div class="people_top">
  5707. <div class="people_nav">选择成员</div>
  5708. <div class="people_top_right">
  5709. <div class="people_search">
  5710. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5711. <div class="search_img" @click="searchStudent">
  5712. <img src="../../../assets/icon/search.png" alt />
  5713. </div>
  5714. </div>
  5715. </div>
  5716. </div>
  5717. <el-checkbox-group v-model="checkboxList" class="people_name">
  5718. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5719. "暂无学生可选" }}</el-checkbox>
  5720. </el-checkbox-group>
  5721. </div>
  5722. <span slot="footer" class="dialog-footer">
  5723. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5724. <el-button type="primary" @click="isAddPP">确定</el-button>
  5725. </span>
  5726. </el-dialog>
  5727. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5728. :before-close="handleClose" class="addNewPP2">
  5729. <div class="check_classBox">
  5730. <div class="check_class_right">
  5731. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5732. 全部
  5733. </div>
  5734. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5735. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5736. {{ item.name }}
  5737. </div>
  5738. </el-tooltip>
  5739. </div>
  5740. <div class="check_class_left">
  5741. <div class="check_class_all_box">
  5742. <div class="check_class_left_title">选择班级</div>
  5743. <div style="display: flex; align-items: center; margin-left: auto">
  5744. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5745. </div>
  5746. </div>
  5747. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5748. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5749. </div> -->
  5750. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5751. v-if="grade2.length">
  5752. <div v-for="item in grade2" :key="item.id" class="class_item">
  5753. <el-checkbox :label="item.id">
  5754. {{ item.name }}
  5755. </el-checkbox>
  5756. </div>
  5757. </el-checkbox-group>
  5758. <div v-if="!grade2.length">暂无数据</div>
  5759. </div>
  5760. </div>
  5761. <span slot="footer" class="dialog-footer">
  5762. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5763. <el-button type="primary" @click="isAddClass">确定</el-button>
  5764. </span>
  5765. </el-dialog>
  5766. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5767. :before-close="handleClose" class="addNewPP customWidth">
  5768. <div style="display: flex;justify-content: space-between;">
  5769. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5770. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5771. 全部
  5772. </div>
  5773. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5774. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5775. <el-tooltip placement="top" :content="i.name">
  5776. <span>{{i.name}}</span>
  5777. </el-tooltip>
  5778. </div>
  5779. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5780. 其他
  5781. </div>
  5782. </div>
  5783. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5784. <div class="people">
  5785. <div class="people_top">
  5786. <div class="people_top_right">
  5787. <div class="people_search">
  5788. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5789. <div class="search_img" @click="getTeacher(collid)">
  5790. <img src="../../../assets/icon/search.png" alt />
  5791. </div>
  5792. </div>
  5793. </div>
  5794. <div class="people_nav" style="display: flex; align-items: center">
  5795. <div class="check_class_left_title">选择成员</div>
  5796. <div style="display: flex; align-items: center; margin-left: auto">
  5797. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5798. </div>
  5799. </div>
  5800. </div>
  5801. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5802. @change="InviteChange2">
  5803. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5804. <div class="t_j_box">
  5805. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5806. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5807. </el-tooltip>
  5808. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5809. <span>{{ item.username.split('@')[0] }}</span>
  5810. </el-tooltip>
  5811. <el-tooltip placement="top" :content="item.school">
  5812. <span>{{ item.school }}</span>
  5813. </el-tooltip>
  5814. </div>
  5815. </el-checkbox>
  5816. </el-checkbox-group>
  5817. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5818. </div>
  5819. </div>
  5820. </div>
  5821. <span slot="footer" class="dialog-footer">
  5822. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5823. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5824. </span>
  5825. </el-dialog>
  5826. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5827. closePan(4);
  5828. }
  5829. " class="dialog_diy fullStyle">
  5830. <div style="height: 100%">
  5831. <div class="a_add_title" style="
  5832. display: flex;
  5833. flex-direction: row;
  5834. align-items: center;
  5835. justify-content: center;
  5836. ">
  5837. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5838. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5839. </div>
  5840. <div class="a_addBox" style="height: calc(100% - 50px)">
  5841. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5842. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5843. <div class="a_add_checkType">
  5844. <span :class="{
  5845. active:
  5846. askJson.askJson[index1].type == '1' ||
  5847. !askJson.askJson[index1].type,
  5848. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5849. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5850. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5851. </div>
  5852. <div class="a_add_head">
  5853. <div style="
  5854. display: flex;
  5855. align-items: center;
  5856. width: 100%;
  5857. margin-right: 20px;
  5858. ">
  5859. <span style="min-width: fit-content">{{
  5860. index1 + 1 + "、"
  5861. }}</span>
  5862. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5863. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5864. $forceUpdate();
  5865. }
  5866. "></textarea>
  5867. </div>
  5868. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5869. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5870. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5871. </div>
  5872. <div class="a_add_head_div">
  5873. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5874. </el-button>
  5875. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5876. </div>
  5877. </div>
  5878. <div class="a_add_body">
  5879. <div class="a_add_input" style="flex-direction: column">
  5880. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5881. margin: 20px 10px 0 0;
  5882. display: flex;
  5883. align-items: center;
  5884. position: relative;
  5885. ">
  5886. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5887. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5888. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5889. @change="() => {
  5890. $forceUpdate();
  5891. }
  5892. "></textarea>
  5893. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5894. v-if="askJson.askJson[index1].askItem != 1">
  5895. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5896. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5897. </div>
  5898. <div class="a_add_body_div">
  5899. <el-button type="primary" size="small"
  5900. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5901. <el-button type="primary" size="small" @click="
  5902. deletecheckList(askJson.askJson[index1], checkIndex)
  5903. " v-if="askJson.askJson[index1].askItem != 1">删除
  5904. </el-button>
  5905. </div>
  5906. </div>
  5907. </div>
  5908. <!-- <div class="a_add_body_div">
  5909. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5910. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5911. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5912. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5913. </el-button>
  5914. </div> -->
  5915. </div>
  5916. </div>
  5917. </div>
  5918. </div>
  5919. <span slot="footer" class="dialog-footer">
  5920. <el-button @click="closePan(4)">取 消</el-button>
  5921. <el-button type="primary" @click="addAsk">确 定</el-button>
  5922. </span>
  5923. </el-dialog>
  5924. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5925. closePan(45);
  5926. }
  5927. " class="dialog_diy fullStyle">
  5928. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5929. <!-- <div class="a_add_title" style="
  5930. display: flex;
  5931. flex-direction: row;
  5932. align-items: center;
  5933. justify-content: center;
  5934. ">
  5935. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5936. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5937. </div> -->
  5938. <div class="a_addBox" style="height: 100%">
  5939. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5940. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5941. 上传补充资料
  5942. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5943. beforeUploadInfo2(
  5944. $event,
  5945. 17
  5946. )
  5947. " />
  5948. </button>
  5949. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  5950. <div class="add_chapters_box add_c_none" v-if="
  5951. xuanzeInfoData &&
  5952. xuanzeInfoData.length == 0
  5953. ">
  5954. <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
  5955. </div>
  5956. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5957. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  5958. getChapterData(
  5959. $event,
  5960. index1,
  5961. item1.type
  5962. )
  5963. " >
  5964. <div class="chapter_upload_o" style="
  5965. position: relative;
  5966. display: flex;
  5967. align-items: center;
  5968. ">
  5969. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5970. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5971. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5972. </div>
  5973. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5974. </div>
  5975. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5976. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5977. </div>
  5978. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5979. </div>
  5980. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5981. </div>
  5982. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5983. </div>
  5984. </div>
  5985. <div class="chapter_upload_n">
  5986. <input readonly="true" v-if="
  5987. item1.type == 2 ||
  5988. item1.type == 3 ||
  5989. item1.type == 12 ||
  5990. item1.type == 13 ||
  5991. item1.type == 7
  5992. " :placeholder="item1.name" @click.stop="
  5993. checkChpater3($event, index1, item1)
  5994. " style="
  5995. border: none;
  5996. outline: none;
  5997. width: 80%;
  5998. minwidth: 215px;
  5999. z-index: 99;
  6000. font-size: 14px;
  6001. white-space: nowrap;
  6002. overflow: hidden;
  6003. text-overflow: ellipsis;
  6004. " />
  6005. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  6006. border: none;
  6007. outline: none;
  6008. width: 80%;
  6009. white-space: nowrap;
  6010. overflow: hidden;
  6011. text-overflow: ellipsis;
  6012. " readonly="true" @click="
  6013. selectAttText(index1)
  6014. " />
  6015. <input :placeholder="item1.title ? item1.title : '链接'
  6016. " v-if="item1.type == 8" style="
  6017. border: none;
  6018. outline: none;
  6019. width: 80%;
  6020. white-space: nowrap;
  6021. overflow: hidden;
  6022. text-overflow: ellipsis;
  6023. " readonly="true" @click="selectLine(index1)" />
  6024. <input :placeholder="item1.title ? item1.title : '链接'
  6025. " v-if="item1.type == 14" style="
  6026. border: none;
  6027. outline: none;
  6028. width: 80%;
  6029. white-space: nowrap;
  6030. overflow: hidden;
  6031. text-overflow: ellipsis;
  6032. " readonly="true" @click="
  6033. openUpdateSource(index1)
  6034. " />
  6035. </div>
  6036. <div class="chapter_upload_ic">
  6037. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  6038. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  6039. checkChpater3($event, index1, item1)
  6040. ">
  6041. <div></div>
  6042. </div>
  6043. <div class="chapter_upload_ic_r" @click.stop="
  6044. deletexuanzeInfoData(
  6045. $event,
  6046. index1
  6047. )
  6048. ">
  6049. <div></div>
  6050. </div>
  6051. </div>
  6052. </div>
  6053. </div>
  6054. </div>
  6055. </div>
  6056. <div v-if="
  6057. xuanzeinfoproVisible
  6058. " class="mask">
  6059. <div class="progressBox">
  6060. <div class="lbox">
  6061. <img src="../../../assets/loading.gif" />上传中,请稍后
  6062. </div>
  6063. <div style="margin-bottom: 10px">
  6064. <span>{{
  6065. xuanzeinfoisFinishSize
  6066. }}</span>
  6067. /
  6068. <span>{{
  6069. xuanzeinfoisAllSize
  6070. }}</span>
  6071. </div>
  6072. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6073. ? xuanzeinfoprogress
  6074. : 0
  6075. " style="width: 80%"></el-progress> -->
  6076. </div>
  6077. </div>
  6078. </div>
  6079. <div style="
  6080. font-size: 16px;
  6081. color: #c7c7c7;
  6082. display: flex;
  6083. align-items: center;
  6084. justify-content: flex-end;
  6085. ">
  6086. <!-- 请输入题目内容 -->
  6087. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6088. 智能生成
  6089. </button>
  6090. <!-- 请输入题目内容 -->
  6091. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6092. v-if="isPasteChoice">
  6093. 智能粘贴
  6094. </button>
  6095. </div>
  6096. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6097. <div class="a_add_checkType">
  6098. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6099. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  6100. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6101. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  6102. </div>
  6103. <div class="a_add_head">
  6104. <div class="timuUpImg">
  6105. <div style="display: flex; align-items: center">
  6106. <span style="min-width: fit-content">{{
  6107. index1 + 1 + "、"
  6108. }}</span>
  6109. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6110. placeholder="请输入题目">
  6111. </el-input> -->
  6112. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6113. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  6114. $forceUpdate();
  6115. }
  6116. "></textarea>
  6117. </div>
  6118. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6119. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6120. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6121. </div>
  6122. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6123. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6124. <input type="file" accept="image/*" style="display: none"
  6125. @change="beforeUploadTiMu($event, index1)" />
  6126. </div>
  6127. </div>
  6128. <div class="a_add_head_div">
  6129. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  6130. </el-button>
  6131. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  6132. </div>
  6133. </div>
  6134. <div class="timuImgBox" v-if="
  6135. testJson.testJson[index1].timuList &&
  6136. testJson.testJson[index1].timuList.length
  6137. ">
  6138. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6139. @click.stop="previewImg(timg.src)">
  6140. <img :src="timg.src" alt="" />
  6141. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6142. <img src="../../../assets/icon/delete.png" alt="" />
  6143. </div>
  6144. </div>
  6145. </div>
  6146. <div class="a_add_body">
  6147. <div class="a_add_input a_add_input_choice">
  6148. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6149. @change="() => {
  6150. $forceUpdate();
  6151. }
  6152. ">
  6153. <div class="radioBox">
  6154. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6155. .testItem" :key="checkIndex" :label="checkIndex">
  6156. <div style="margin-right: 10px">
  6157. 选项{{ checkIndex + 1 }}
  6158. </div>
  6159. <div style="margin-right: 10px; width: 300px" v-if="
  6160. testJson.testJson[index1].checkList[checkIndex] &&
  6161. testJson.testJson[index1].checkList[checkIndex]
  6162. .imgType &&
  6163. testJson.testJson[index1].checkList[checkIndex]
  6164. .imgType == 1
  6165. ">
  6166. <div class="inImg" @click.stop="
  6167. previewImg(
  6168. testJson.testJson[index1].checkList[checkIndex]
  6169. .src
  6170. )
  6171. ">
  6172. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6173. .src
  6174. " lazy />
  6175. <!-- <img :src="
  6176. testJson.testJson[index1].checkList[checkIndex]
  6177. .src
  6178. " alt="" /> -->
  6179. </div>
  6180. </div>
  6181. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6182. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6183. $forceUpdate();
  6184. }
  6185. "></textarea>
  6186. <div class="xzUpImg" @click.stop="addImg($event)">
  6187. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6188. <input type="file" accept="image/*" style="display: none"
  6189. @change="beforeUploadTi($event, index1, checkIndex)" />
  6190. </div>
  6191. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6192. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6193. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6194. </div>
  6195. <div class="a_add_body_div">
  6196. <el-button type="primary" size="small" @click.stop="
  6197. addTcheckList(testJson.testJson[index1], checkIndex)
  6198. ">添加</el-button>
  6199. <el-button type="primary" size="small" @click.stop="
  6200. deleteTcheckList(
  6201. testJson.testJson[index1],
  6202. checkIndex
  6203. )
  6204. " v-if="testJson.testJson[index1].testItem != 1">删除
  6205. </el-button>
  6206. </div>
  6207. </el-radio>
  6208. </div>
  6209. </el-radio-group>
  6210. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6211. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6212. $forceUpdate();
  6213. }
  6214. ">
  6215. <div class="radioBox">
  6216. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6217. .testItem" :key="checkIndex1" :label="checkIndex1">
  6218. <div style="margin-right: 10px">
  6219. 选项{{ checkIndex1 + 1 }}
  6220. </div>
  6221. <div style="margin-right: 10px; width: 300px" v-if="
  6222. testJson.testJson[index1].checkList[checkIndex1] &&
  6223. testJson.testJson[index1].checkList[checkIndex1]
  6224. .imgType &&
  6225. testJson.testJson[index1].checkList[checkIndex1]
  6226. .imgType == 1
  6227. ">
  6228. <div class="inImg" @click.stop="
  6229. previewImg(
  6230. testJson.testJson[index1].checkList[checkIndex1]
  6231. .src
  6232. )
  6233. ">
  6234. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6235. .src
  6236. " lazy />
  6237. <!-- <img :src="
  6238. testJson.testJson[index1].checkList[checkIndex1]
  6239. .src
  6240. " alt="" /> -->
  6241. </div>
  6242. </div>
  6243. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6244. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6245. $forceUpdate();
  6246. }
  6247. "></textarea>
  6248. <div class="xzUpImg" @click.stop="addImg($event)">
  6249. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6250. <input type="file" accept="image/*" style="display: none"
  6251. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6252. </div>
  6253. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6254. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6255. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6256. </div>
  6257. <div class="a_add_body_div">
  6258. <el-button type="primary" size="small" @click.stop="
  6259. addTcheckList(
  6260. testJson.testJson[index1],
  6261. checkIndex1
  6262. )
  6263. ">添加</el-button>
  6264. <el-button type="primary" size="small" @click.stop="
  6265. deleteTcheckList(
  6266. testJson.testJson[index1],
  6267. checkIndex1
  6268. )
  6269. " v-if="testJson.testJson[index1].testItem != 1">删除
  6270. </el-button>
  6271. </div>
  6272. </el-checkbox>
  6273. </div>
  6274. </el-checkbox-group>
  6275. </div>
  6276. <!-- <div class="a_add_body_div">
  6277. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6278. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6279. v-if="testJson.testJson[index1].testItem != 1">删除
  6280. </el-button>
  6281. </div> -->
  6282. </div>
  6283. </div>
  6284. </div>
  6285. </div>
  6286. <span slot="footer" class="dialog-footer">
  6287. <el-button @click="closePan(45)">取 消</el-button>
  6288. <el-button type="primary" @click="addTest">确 定</el-button>
  6289. </span>
  6290. </el-dialog>
  6291. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6292. :before-close="handleClose" class="dialog_diy addToolsDia">
  6293. <div class="toolChoose">
  6294. <div class="tools">
  6295. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6296. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6297. <div style="
  6298. display: flex;
  6299. flex-direction: row;
  6300. align-items: baseline;
  6301. flex-wrap: nowrap;
  6302. justify-content: flex-start;
  6303. position: relative;
  6304. ">
  6305. <div class="chooseWho">
  6306. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6307. 互动类
  6308. </div>
  6309. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6310. 思维类
  6311. </div>
  6312. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6313. 评价类
  6314. </div>
  6315. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6316. 其他
  6317. </div>
  6318. </div>
  6319. </div>
  6320. <div style="min-height: 163px">
  6321. <div class="toolSort" v-if="chapToolsType == 0">
  6322. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6323. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6324. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6325. <div style="margin: 5px 0">素材库</div>
  6326. </div>
  6327. <div class="noCTool">
  6328. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6329. </div>
  6330. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6331. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6332. </div>
  6333. <!-- <div class="check" @click="chapAddTools(8)">
  6334. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6335. <div class="checkDiv" v-else>
  6336. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6337. </div>
  6338. </div> -->
  6339. </div>
  6340. </div>
  6341. <div class="toolSort" v-if="chapToolsType == 1">
  6342. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6343. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6344. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6345. <div style="margin: 5px 0">思维网格</div>
  6346. </div>
  6347. <div class="noCTool">
  6348. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6349. </div>
  6350. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6351. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6352. </div>
  6353. <!-- <div class="check" @click="chapAddTools(7)">
  6354. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6355. <div class="checkDiv" v-else>
  6356. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6357. </div>
  6358. </div> -->
  6359. </div>
  6360. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6361. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6362. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6363. <div style="margin: 5px 0">电子白板</div>
  6364. </div>
  6365. <div class="noCTool">
  6366. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6367. </div>
  6368. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6369. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6370. </div>
  6371. <!-- <div class="check" @click="chapAddTools(1)">
  6372. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6373. <div class="checkDiv" v-else>
  6374. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6375. </div>
  6376. </div> -->
  6377. </div>
  6378. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6379. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6380. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6381. <div style="margin: 5px 0">便签</div>
  6382. </div>
  6383. <div class="noCTool">
  6384. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6385. </div>
  6386. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6387. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6388. </div>
  6389. <!-- <div class="check" @click="chapAddTools(2)">
  6390. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6391. <div class="checkDiv" v-else>
  6392. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6393. </div>
  6394. </div> -->
  6395. </div>
  6396. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6397. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6398. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6399. <div style="margin: 5px 0">协同文档</div>
  6400. </div>
  6401. <div class="noCTool">
  6402. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6403. </div>
  6404. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6405. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6406. </div>
  6407. <!-- <div class="check" @click="chapAddTools(6)">
  6408. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6409. <div class="checkDiv" v-else>
  6410. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6411. </div>
  6412. </div> -->
  6413. </div>
  6414. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6415. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6416. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6417. <div style="margin: 5px 0">思维导图</div>
  6418. </div>
  6419. <div class="noCTool">
  6420. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6421. </div>
  6422. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6423. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6424. </div>
  6425. <!-- <div class="check" @click="chapAddTools(3)">
  6426. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6427. <div class="checkDiv" v-else>
  6428. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6429. </div>
  6430. </div> -->
  6431. </div>
  6432. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6433. @click="chapAddTools(31)">
  6434. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6435. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6436. <div style="margin: 5px 0">数学画板</div>
  6437. </div>
  6438. <div class="noCTool">
  6439. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6440. </div>
  6441. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6442. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6443. </div>
  6444. <!-- <div class="check" @click="chapAddTools(31)">
  6445. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6446. <div class="checkDiv" v-else>
  6447. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6448. </div>
  6449. </div> -->
  6450. </div>
  6451. </div>
  6452. <div class="toolSort" v-if="chapToolsType == 2">
  6453. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6454. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6455. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6456. <div style="margin: 5px 0">量规评分</div>
  6457. </div>
  6458. <div class="noCTool">
  6459. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6460. </div>
  6461. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6462. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6463. </div>
  6464. <!-- <div class="check" @click="chapAddTools(5)">
  6465. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6466. <div class="checkDiv" v-else>
  6467. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6468. </div>
  6469. </div> -->
  6470. </div>
  6471. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6472. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6473. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6474. <div style="margin: 5px 0">问卷调查</div>
  6475. </div>
  6476. <div class="noCTool">
  6477. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6478. </div>
  6479. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6480. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6481. </div>
  6482. <!-- <div class="check" @click="chapAddTools(4)">
  6483. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6484. <div class="checkDiv" v-else>
  6485. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6486. </div>
  6487. </div> -->
  6488. </div>
  6489. </div>
  6490. </div>
  6491. <div>
  6492. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6493. v-model="itemTools.toolDetail" />
  6494. </div>
  6495. </div>
  6496. </div>
  6497. </div>
  6498. <span slot="footer" class="dialog-footer">
  6499. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6500. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6501. </span>
  6502. </el-dialog>
  6503. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6504. closePan(15);
  6505. }
  6506. " class="dialog_diy">
  6507. <div>
  6508. <div class="a_add_title" style="
  6509. display: flex;
  6510. flex-direction: column;
  6511. align-items: flex-start;
  6512. justify-content: center;
  6513. ">
  6514. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6515. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6516. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6517. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6518. </div>
  6519. </div>
  6520. <span slot="footer" class="dialog-footer">
  6521. <el-button @click="closePan(15)">取 消</el-button>
  6522. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6523. </span>
  6524. </el-dialog>
  6525. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6526. :before-close="handleClose" class="dialog_diy">
  6527. <div>
  6528. <div class="a_add_title" style="
  6529. display: flex;
  6530. flex-direction: column;
  6531. align-items: flex-start;
  6532. justify-content: center;
  6533. ">
  6534. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6535. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6536. </div>
  6537. </div>
  6538. <span slot="footer" class="dialog-footer">
  6539. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6540. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6541. </span>
  6542. </el-dialog>
  6543. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6544. :before-close="handleClose" class="dialog_diy">
  6545. <div>
  6546. <div class="fileCss" style="padding-top: 20px">
  6547. <div>
  6548. <button class="info_btn" @click="addImg($event)">
  6549. 选择本地文件
  6550. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6551. </button>
  6552. <div class="spanName">选择本地文件</div>
  6553. </div>
  6554. <!-- <div>
  6555. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6556. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6557. <img :src="cover[0].url" alt="" />
  6558. <div class="deletePic" @click="deleteSysPic">
  6559. <img src="../../../assets/icon/delete.png" alt="" />
  6560. </div>
  6561. </div>
  6562. <div class="spanName">选择系统文件</div>
  6563. </div> -->
  6564. <div>
  6565. <el-button @click="(searchImageValue = courseName), resetImage()"
  6566. v-if="isSysPic2 == false">选择网络文件</el-button>
  6567. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6568. <img :src="cover[0].url" alt="" />
  6569. <div class="deletePic" @click="deleteSysPic">
  6570. <img src="../../../assets/icon/delete.png" alt="" />
  6571. </div>
  6572. </div>
  6573. <div class="spanName">选择网络文件</div>
  6574. </div>
  6575. </div>
  6576. <!-- <div class="fileCss">
  6577. </div> -->
  6578. </div>
  6579. <span slot="footer" class="dialog-footer">
  6580. <el-button @click="choosePicVisible = false">取 消</el-button>
  6581. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6582. </span>
  6583. </el-dialog>
  6584. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6585. :before-close="handleClose" class="dialog_diy">
  6586. <div class="cru_selectBox" style="margin: 0">
  6587. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6588. 绘画
  6589. </div>
  6590. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6591. 科技
  6592. </div>
  6593. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6594. 人文
  6595. </div>
  6596. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6597. 艺术
  6598. </div>
  6599. </div>
  6600. <div class="sysPicBox">
  6601. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6602. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6603. </div>
  6604. </div>
  6605. </el-dialog>
  6606. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6607. :before-close="handleClose" class="dialog_diy">
  6608. <div>
  6609. <div class="people_top_right" style="display: flex; align-items: center">
  6610. <div style="position: relative; width: 100%">
  6611. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6612. @keyup.enter.native="resetImage()"></el-input>
  6613. <div class="search_img" @click="resetImage" style="right: 10px">
  6614. <img src="../../../assets/icon/search.png" alt />
  6615. </div>
  6616. </div>
  6617. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6618. </div>
  6619. <div class="sysPicBox" v-loading="imageloading">
  6620. <div class="picNone" v-if="!imageList.length">
  6621. 请输入关键词搜索图片
  6622. </div>
  6623. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6624. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6625. </div>
  6626. </div>
  6627. </div>
  6628. </el-dialog>
  6629. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6630. closePan(41);
  6631. }
  6632. " class="dialog_diy dialog_diy3 fullStyle">
  6633. <div v-if="selectJson" style="height: 100%">
  6634. <div class="select_box1" v-if="selectSteps == 1">
  6635. <div class="select_box1_img">
  6636. <div class="select_box1_title">
  6637. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6638. </div>
  6639. <div class="select_box1_add_img">
  6640. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6641. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6642. <img src="../../../assets/icon/addPoster.png" alt="" />
  6643. </div>
  6644. <div class="isSysPic" v-else>
  6645. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6646. <div class="deletePic" @click="deleteSelectPic">
  6647. <img src="../../../assets/icon/delete.png" alt="" />
  6648. </div>
  6649. </div>
  6650. </div>
  6651. </div>
  6652. <div class="select_box1_select">
  6653. <div class="select_box1_title">
  6654. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6655. </div>
  6656. <div class="select_box1_select_box">
  6657. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6658. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6659. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6660. <div class="select_box1_select_box_add">
  6661. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6662. 添加</el-button>
  6663. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6664. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6665. </div>
  6666. </div>
  6667. </div>
  6668. </div>
  6669. <div v-if="selectSteps == 2" style="height: 100%">
  6670. <div class="select_box2">
  6671. <div class="select_box2_title">设置每道题目的正确选项</div>
  6672. <div class="select_box2_box">
  6673. <div class="select_box2_img">
  6674. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6675. </div>
  6676. <div class="select_box2_answer">
  6677. <div class="select_answer_title">根据题目选择对应答案</div>
  6678. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6679. <span>{{ checkIndex + 1 }}、</span>
  6680. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6681. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6682. </el-option>
  6683. </el-select>
  6684. </div>
  6685. </div>
  6686. </div>
  6687. </div>
  6688. </div>
  6689. </div>
  6690. <span slot="footer" class="dialog-footer">
  6691. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6692. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6693. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6694. </span>
  6695. </el-dialog>
  6696. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6697. :before-close="handleClose" class="dialog_diy">
  6698. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6699. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6700. <div class="pjCss" style="width: 100%">
  6701. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6702. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6703. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6704. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6705. <div class="remove" @click="deletRateList(eIndex)"></div>
  6706. <div style="width: 100%; display: flex">
  6707. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6708. <el-rate v-model="eItem.score" disabled></el-rate>
  6709. </div>
  6710. <div class="elist_inptu_text" style="align-items: flex-start">
  6711. <span style="min-width: 100px; text-align: right">描述:</span>
  6712. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6713. </div>
  6714. </div>
  6715. </div>
  6716. <div class="addToolFun" @click="addRateList()">
  6717. <div class="addToolImg">
  6718. <img src="../../../assets/icon/add.png" alt />
  6719. </div>
  6720. <div>添加</div>
  6721. </div>
  6722. </div>
  6723. </div>
  6724. <span slot="footer" class="dialog-footer">
  6725. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6726. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6727. </span>
  6728. </el-dialog>
  6729. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6730. closePan(47);
  6731. }
  6732. " class="dialog_diy dialog_diy3 fullStyle">
  6733. <div style="height: 100%">
  6734. <div class="sentenBox" style="height: 100%">
  6735. <div class="addSen" @click="addSt">添加题目</div>
  6736. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6737. <div class="sentenTopBox">
  6738. <div class="sentenTop" :index="stIndex + 1">
  6739. <div>题目设置</div>
  6740. <div>
  6741. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6742. </div>
  6743. <div @click="addSen(stIndex)">添加</div>
  6744. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6745. </div>
  6746. </div>
  6747. <div class="cardList">
  6748. <div v-if="st.addSentence.length > 0" class="cardBox">
  6749. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6750. @click="setRightAnswer(s, stIndex, sIndex)">
  6751. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6752. <div>{{ s }}</div>
  6753. </el-tooltip>
  6754. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6755. <img src="../../../assets/icon/delete.png" alt="" />
  6756. </div>
  6757. </div>
  6758. </div>
  6759. <div class="card">
  6760. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6761. </div>
  6762. </div>
  6763. <div class="rightCardBox">
  6764. <div>正确顺序</div>
  6765. <div class="rightCardList">
  6766. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6767. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6768. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6769. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6770. <div>{{ r }}</div>
  6771. </el-tooltip>
  6772. </div>
  6773. <div>{{ rIndex + 1 }}</div>
  6774. </div>
  6775. </div>
  6776. <div class="card" v-if="st.rightAnswer.length == 0">
  6777. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6778. </div>
  6779. <div class="card" v-else>
  6780. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6781. </div>
  6782. </div>
  6783. </div>
  6784. </div>
  6785. </div>
  6786. </div>
  6787. <span slot="footer" class="dialog-footer">
  6788. <el-button @click="closePan(47)">取 消</el-button>
  6789. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6790. </span>
  6791. </el-dialog>
  6792. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6793. :before-close="handleClose" class="dialog_diy">
  6794. <el-form>
  6795. <!-- <el-form-item label="文本标题">
  6796. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6797. </el-form-item> -->
  6798. <div>表格内容</div>
  6799. <Table v-model="tableJson.text" @change="change"></Table>
  6800. </el-form>
  6801. <span slot="footer" class="dialog-footer">
  6802. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6803. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6804. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6805. </span>
  6806. </el-dialog>
  6807. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6808. :before-close="handleClose" class="dialog_diy">
  6809. <el-form>
  6810. <!-- <el-form-item label="文本标题">
  6811. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6812. </el-form-item> -->
  6813. <div>文档内容</div>
  6814. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6815. </el-form>
  6816. <span slot="footer" class="dialog-footer">
  6817. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6818. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6819. </span>
  6820. </el-dialog>
  6821. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6822. :before-close="handleClose" class="dialog_diy">
  6823. <div style="
  6824. width: 100%;
  6825. display: flex;
  6826. flex-direction: row;
  6827. flex-wrap: nowrap;
  6828. align-items: center;
  6829. justify-content: center;
  6830. ">
  6831. <div>班级:</div>
  6832. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6833. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6834. </el-option>
  6835. </el-select>
  6836. </div>
  6837. <span slot="footer" class="dialog-footer">
  6838. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6839. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6840. </span>
  6841. </el-dialog>
  6842. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6843. :before-close="handleClose" class="dialog_diy">
  6844. <div style="
  6845. width: 100%;
  6846. display: flex;
  6847. flex-direction: row;
  6848. flex-wrap: nowrap;
  6849. align-items: center;
  6850. justify-content: center;
  6851. ">
  6852. <div>随机码:</div>
  6853. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6854. </div>
  6855. <span slot="footer" class="dialog-footer">
  6856. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6857. <el-button type="primary" @click="addInvite">确定</el-button>
  6858. </span>
  6859. </el-dialog>
  6860. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6861. :before-close="handleClose" class="dialog_diy">
  6862. <div>
  6863. <div style="margin-bottom: 20px; color: #999">
  6864. 提示:点击“+”或“-”修改倒计时时长。
  6865. </div>
  6866. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6867. </div>
  6868. <span slot="footer" class="dialog-footer">
  6869. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6870. <el-button type="primary" @click="addPreTime">确定</el-button>
  6871. </span>
  6872. </el-dialog>
  6873. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6874. :before-close="handleClose" class="dialog_diy">
  6875. <div>
  6876. <div style="
  6877. width: 100%;
  6878. display: flex;
  6879. flex-direction: row;
  6880. flex-wrap: nowrap;
  6881. align-content: center;
  6882. align-items: center;
  6883. justify-content: space-between;
  6884. ">
  6885. <div style="
  6886. display: flex;
  6887. flex-flow: row nowrap;
  6888. align-items: flex-start;
  6889. width: 100%;
  6890. flex-direction: column;
  6891. flex-wrap: nowrap;
  6892. position: relative;
  6893. ">
  6894. <div class="e_box">
  6895. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6896. <div class="e_card_picture">
  6897. <img src="../../../assets/e_picture.png" />
  6898. </div>
  6899. <div class="e_card_name">
  6900. <span>{{ item.title }}</span>
  6901. </div>
  6902. <div class="e_card_btn">
  6903. <span @click="checkEva(item.id, 2)">导入</span>
  6904. </div>
  6905. </div> -->
  6906. <!-- <div class="addEva" @click="openT">
  6907. <img src="../../../assets/icon/addEva.png" alt="" />
  6908. </div> -->
  6909. <div style="
  6910. display: flex;
  6911. justify-content: flex-end;
  6912. margin-bottom: 10px;
  6913. ">
  6914. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6915. </div>
  6916. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6917. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6918. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6919. </el-table-column>
  6920. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6921. </el-table-column>
  6922. <el-table-column label="操作" width="250px">
  6923. <template slot-scope="scope">
  6924. <div class="btnBox">
  6925. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6926. </div>
  6927. </template>
  6928. </el-table-column>
  6929. </el-table>
  6930. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6931. 暂无数据
  6932. </div>
  6933. </div>
  6934. </div>
  6935. </div>
  6936. </div>
  6937. <span slot="footer" class="dialog-footer">
  6938. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6939. </span>
  6940. </el-dialog>
  6941. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6942. :before-close="handleClose" class="dialog_diy">
  6943. <div class="groupBox">
  6944. <div v-if="groupJson.group" class="groupContent">
  6945. <div class="groupTitle">请设置小组数量及名称</div>
  6946. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6947. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6948. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6949. <div class="groupBtn">
  6950. <el-button type="primary" size="small" @click="addGroup(index)"
  6951. v-if="groupJson.group.length - 1 == index">
  6952. 添加</el-button>
  6953. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6954. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6955. </div>
  6956. </div>
  6957. </div>
  6958. <div class="groupContent">
  6959. <div class="groupTitle">请设置每组人数</div>
  6960. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6961. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6962. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6963. @change="numberPan"></el-input>
  6964. </div>
  6965. </div>
  6966. <span slot="footer" class="dialog-footer">
  6967. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6968. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6969. </span>
  6970. </el-dialog>
  6971. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6972. :before-close="handleClose" class="dialog_diy">
  6973. <div style="
  6974. width: 100%;
  6975. display: flex;
  6976. flex-direction: row;
  6977. flex-wrap: nowrap;
  6978. align-items: center;
  6979. justify-content: center;
  6980. ">
  6981. <div style="min-width: fit-content">文件名称:</div>
  6982. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6983. </div>
  6984. <span slot="footer" class="dialog-footer">
  6985. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6986. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6987. </span>
  6988. </el-dialog>
  6989. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6990. closePan(69);
  6991. }
  6992. " class="dialog_diy fullStyle fullStyle1">
  6993. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6994. <span slot="footer" class="dialog-footer">
  6995. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6996. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6997. </span>
  6998. </el-dialog>
  6999. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  7000. :before-close="handleClose" class="dialog_diy">
  7001. <div class="template_box">
  7002. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  7003. :class="{ wordTeacherA: ctJson.id == aa.id }">
  7004. <div class="wordPic">
  7005. <img src="../../../assets/icon/new/course_template.png" alt />
  7006. </div>
  7007. <el-tooltip effect="dark" :content="aa.title" placement="top">
  7008. <div style="
  7009. margin-top: 10px;
  7010. line-height: 19px;
  7011. overflow: hidden;
  7012. text-overflow: ellipsis;
  7013. white-space: nowrap;
  7014. padding: 0 10px;
  7015. box-sizing: border-box;
  7016. width: 100%;
  7017. ">
  7018. {{ aa.title }}
  7019. </div>
  7020. </el-tooltip>
  7021. </div>
  7022. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  7023. :class="{ wordTeacherA: ctJson.id == 1 }">
  7024. <div class="wordPic">
  7025. <img src="../../../assets/icon/new/course_template.png" alt />
  7026. </div>
  7027. <div style="
  7028. margin-top: 10px;
  7029. line-height: 19px;
  7030. overflow: hidden;
  7031. text-overflow: ellipsis;
  7032. white-space: nowrap;
  7033. padding: 0 20px;
  7034. ">
  7035. 简易模板
  7036. </div>
  7037. </div>
  7038. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  7039. :class="{ wordTeacherA: ctJson.id == 2 }">
  7040. <div class="wordPic">
  7041. <img src="../../../assets/icon/new/course_template.png" alt />
  7042. </div>
  7043. <div style="
  7044. margin-top: 10px;
  7045. line-height: 19px;
  7046. overflow: hidden;
  7047. text-overflow: ellipsis;
  7048. white-space: nowrap;
  7049. padding: 0 20px;
  7050. ">
  7051. 智能粘贴模式
  7052. </div>
  7053. </div>
  7054. </div>
  7055. <span slot="footer" class="dialog-footer">
  7056. <el-button @click="templateDialog = false">取 消</el-button>
  7057. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  7058. </span>
  7059. </el-dialog>
  7060. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  7061. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  7062. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  7063. <div class="change_stageBox">
  7064. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  7065. <div class="nt_taskBox">
  7066. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  7067. <div class="nt_taskName">
  7068. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7069. <span>{{ t.dyName }}</span>
  7070. </el-tooltip>
  7071. </div>
  7072. </div>
  7073. <div class="moveBtn" v-if="unitJson3.length > 1">
  7074. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7075. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7076. </div>
  7077. </div>
  7078. </div>
  7079. <span slot="footer" class="dialog-footer">
  7080. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  7081. <el-button type="primary" @click="updateChange">确定</el-button>
  7082. </span>
  7083. </el-dialog>
  7084. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7085. :before-close="handleClose" class="dialog_diy">
  7086. <div class="addTypeChoose" style="justify-content: center">
  7087. <div style="min-width: 100px">模板名称:</div>
  7088. <el-input v-model="templateName" style="width: 200px"></el-input>
  7089. </div>
  7090. <div class="addTypeBox">
  7091. <div class="addTypeChoose">
  7092. <div style="min-width: 100px">选择一级分类:</div>
  7093. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  7094. style="width: 200px">
  7095. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7096. </el-option>
  7097. </el-select>
  7098. </div>
  7099. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7100. <div style="min-width: 100px">选择二级分类:</div>
  7101. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  7102. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7103. </el-option>
  7104. </el-select>
  7105. </div>
  7106. </div>
  7107. <span slot="footer" class="dialog-footer">
  7108. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  7109. <el-button @click="close()">关 闭</el-button>
  7110. </span>
  7111. </el-dialog>
  7112. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7113. </evaBox>
  7114. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7115. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7116. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3" @aiConfirm="aiConfirm" :clickType="clickType">
  7117. </aiDialog>
  7118. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7119. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7120. <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  7121. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  7122. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7123. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  7124. </div>
  7125. </template>
  7126. <script>
  7127. import "../../../common/aws-sdk-2.235.1.min.js";
  7128. import { tools as toolsData } from "../../../common/tools.js";
  7129. // import "../../../common/aws-sdk-2.99.0.min.js";
  7130. import $ from "jquery";
  7131. import EditorBar from "../../../components/tools/wangEnduit";
  7132. import Table from "../../../components/tools/table";
  7133. import Mind from "../../tools/jsmind2";
  7134. import Time from "../../tools/time.vue";
  7135. import Sunburst from "../../tools/sunburst";
  7136. import SeeBoard from "../../tools/seeBoard";
  7137. import weilaiData from "../components/weilai.js";
  7138. import sourceDialog from "../teacherSource/dialog.vue";
  7139. import interVideo from "../interVideo/index.vue";
  7140. import englishRight from "../components/englishRight.vue";
  7141. import evaBox from "../evaBox/index.vue";
  7142. import EnglishVoice from "../EnglishVoice/index.vue";
  7143. import aiBox from './aiBox.vue'
  7144. import aiBoxRight from './aiBoxRight.vue'
  7145. import aiDialog from './aiDialog'
  7146. import aiTips from './aiTips.vue'
  7147. import tipsDialog from './tipsDialog.vue'
  7148. import { v4 as uuidv4 } from "uuid";
  7149. import MarkdownIt from "markdown-it";
  7150. import aiCreateDialog from './aiCreateDialog.vue'
  7151. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7152. import wpdf from "../test/file/wPdf2.vue";
  7153. import wOffice from "../test/file/wOffice.vue";
  7154. import htmlDocx from "html-docx-js/dist/html-docx";
  7155. import TurndownService from 'turndown';
  7156. import JSZip from "jszip";
  7157. var OpenCC = require("opencc-js");
  7158. let converter = OpenCC.Converter({
  7159. from:'hk',
  7160. to:'cn'
  7161. })
  7162. let converter2 = OpenCC.Converter({
  7163. from:'cn',
  7164. to:'hk'
  7165. })
  7166. export default {
  7167. components: {
  7168. EditorBar,
  7169. Mind,
  7170. Time,
  7171. Sunburst,
  7172. SeeBoard,
  7173. Table,
  7174. sourceDialog,
  7175. interVideo,
  7176. englishRight,
  7177. evaBox,
  7178. EnglishVoice,
  7179. aiBox,
  7180. aiBoxRight,
  7181. aiDialog,
  7182. aiTips,
  7183. tipsDialog,
  7184. aiCreateDialog,
  7185. aiCreateVideoDialog,
  7186. wpdf,
  7187. wOffice,
  7188. },
  7189. data() {
  7190. return {
  7191. checkAll: false,
  7192. checkAll2: false,
  7193. chooseType: 1,
  7194. checkedCities: [],
  7195. isIndeterminate: true,
  7196. isIndeterminate2: true,
  7197. isSysPic: false,
  7198. isSysPic2: false,
  7199. steps: 1,
  7200. stepsNav: 1,
  7201. nbOrder: 0,
  7202. courseId: "",
  7203. chapToolsType: 0,
  7204. chapTools: [
  7205. {
  7206. tools: [],
  7207. toolDetail: "",
  7208. },
  7209. ],
  7210. line: "",
  7211. lineTitle: "",
  7212. sysPic: [],
  7213. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7214. sentenceList2: [],
  7215. isPushTitleList: [],
  7216. lineCount: 0,
  7217. lineType: 0,
  7218. chapCount: 0,
  7219. courseName: "",
  7220. isTeacherSee: false,
  7221. courseText: "",
  7222. textLoading: false,
  7223. ttextLoading: false,
  7224. courseText2: "",
  7225. preTime: 0,
  7226. formLabelWidth: "100px",
  7227. choosePicVisible: false,
  7228. sysPicVisible: false,
  7229. sysPicVisible2: false,
  7230. uploadLoading1: false,
  7231. noneBtnImg: false,
  7232. updateBoolean2: false,
  7233. unitIndex: 0,
  7234. taskCount: 0,
  7235. dialogVisible: false,
  7236. dialogVisible1: false,
  7237. dialogVisible2: false,
  7238. dialogVisible3: false,
  7239. dialogVisible4: false,
  7240. dialogVisible5: false,
  7241. dialogVisible6: false,
  7242. dialogVisible7: false,
  7243. dialogVisible8: false,
  7244. dialogVisible9: false,
  7245. dialogVisibleClass: false,
  7246. dialogVisibleMember: false,
  7247. dialogVisibleMp3: false,
  7248. dialogVisibleSelect: false,
  7249. dialogVisibleSentence: false,
  7250. dialogVisibleRate: false,
  7251. dialogVisibleChoice: false,
  7252. dialogVisiblemb: false,
  7253. dialogVisibleInvite: false,
  7254. dialogVisibleSource: false,
  7255. dialogVisibleVideo: false,
  7256. dialogVisibleStageChange: false,
  7257. dialogVisibleupdataVideoT: false,
  7258. englishDialogVisible: false,
  7259. templateDialog: false,
  7260. ctJson: {},
  7261. isClickColor: 1,
  7262. toolIndexType: "",
  7263. publicTool: 0,
  7264. searchPeople: "",
  7265. searchTN: "",
  7266. collid: '',
  7267. CollLoading: false,
  7268. userid: this.$route.query.userid,
  7269. oid: this.$route.query.oid,
  7270. org: this.$route.query.org,
  7271. role: this.$route.query.role,
  7272. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7273. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7274. dialogVisibleTable: false,
  7275. dialogVisibleWord: false,
  7276. tableJson: { text: "" },
  7277. wordJson: { text: "" },
  7278. dialogVisibleMoreUpload: false,
  7279. dialogVisiblePreTime: false,
  7280. uploadJson: [],
  7281. classJuri: [],
  7282. gradeList: [],
  7283. cover: [], //课程封面
  7284. myWord: [],
  7285. evaJuri: [],
  7286. evalua: "",
  7287. targetArray: [],
  7288. eTitle: "",
  7289. eJson: {},
  7290. fid: "", //一级
  7291. sid: "", //二级
  7292. tid: "", //二级
  7293. typeMode: 3,
  7294. eJSONNum: 0,
  7295. data: {
  7296. meta: {
  7297. name: "example",
  7298. author: "dd@163.com",
  7299. version: "0.2",
  7300. },
  7301. format: "node_array",
  7302. data: [{ id: "root", isroot: true, topic: "" }],
  7303. },
  7304. askJson: {
  7305. askCount: 1,
  7306. askTitle: "",
  7307. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7308. },
  7309. askJson2: {},
  7310. testJson: {},
  7311. testJson2: {},
  7312. selectJson: {},
  7313. selectJson2: {},
  7314. rateJson: [],
  7315. unitJson2: [],
  7316. unitJson3: [],
  7317. unitJson: [
  7318. {
  7319. dyName: "", //单元标题
  7320. chapterInfo: [
  7321. {
  7322. isread: false,
  7323. chapterid: this.guid(),
  7324. title: "",
  7325. courseName: "",
  7326. taskJson: [
  7327. {
  7328. task: "",
  7329. taskDetail: "",
  7330. chapterData: [],
  7331. toolText: "",
  7332. toolChoose: [
  7333. {
  7334. tool: [],
  7335. toolDetail: "",
  7336. toolType: 0,
  7337. askCount: 1,
  7338. askTitle: "",
  7339. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7340. },
  7341. ],
  7342. isShowTools: false,
  7343. askCount: 1,
  7344. isFold: 1,
  7345. askTitle: "",
  7346. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7347. checkJson: [{ checkCount: [], checkPerent: [] }],
  7348. homeworkList: [],
  7349. },
  7350. ],
  7351. itemCount: 1,
  7352. fileList1: [],
  7353. video: [],
  7354. testData: [],
  7355. pData: [],
  7356. templateArray: [],
  7357. },
  7358. ],
  7359. },
  7360. ],
  7361. templateArray: [],
  7362. studentJuri: [],
  7363. teacherJuri: [],
  7364. CollaborativeTeaList: [],
  7365. checkboxList: [],
  7366. checkboxList2: [],
  7367. checkboxList3: [],
  7368. classSearch: "",
  7369. gradeId: "",
  7370. number: "",
  7371. tTitle: "",
  7372. tdetail: "",
  7373. templateC: {},
  7374. AttText: {},
  7375. AttTextType: 0,
  7376. AttTextIndex: 0,
  7377. cTemplate: "",
  7378. CourseType: [],
  7379. CourseType1: [],
  7380. CourseType2: [],
  7381. CourseTypeJson: {},
  7382. CourseTypeJson1: {},
  7383. courseTypeId: [],
  7384. courseTypeId1: [],
  7385. courseTypeSon: [],
  7386. clearArray: [],
  7387. pTypeCheck: [],
  7388. pTypeCheckName: [],
  7389. loading: false,
  7390. toolType: 0,
  7391. inputShow: true,
  7392. inputShow2: true,
  7393. toolIndex: 0,
  7394. cidType: 0,
  7395. answerQ: "",
  7396. answerQ2: "",
  7397. grade: [],
  7398. grade2: [],
  7399. courseUserid: "",
  7400. timer: null,
  7401. timer2: null,
  7402. pasteTimer: null,
  7403. checkId: "",
  7404. isDelete: 1,
  7405. addindex: 0,
  7406. selectSteps: 1,
  7407. groupJson: {},
  7408. dialogVisibleGroup: false,
  7409. rightBoxHeight: 0,
  7410. ManAarray: [],
  7411. checkBoolean: false,
  7412. inviteCode: [],
  7413. inviteId: "",
  7414. icode: "",
  7415. easyArray: [2, 4],
  7416. sourceData: {},
  7417. updateSourcePan: false,
  7418. videoJson: {},
  7419. isBtnDisplay: false,
  7420. isStepDisplay: false,
  7421. isPasteStage: false,
  7422. isPasteTask: false,
  7423. isPasteChoice: false,
  7424. imageList: [],
  7425. imageloading: false,
  7426. imageloading2: false,
  7427. searchImageValue: "",
  7428. ppage: 1,
  7429. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7430. oldIndex: 0,
  7431. dragType: "",
  7432. oldUnitIndex: 0,
  7433. oldData: null,
  7434. newIndex: "",
  7435. englishList: {},
  7436. typeIndex: "",
  7437. courseState: 5,
  7438. taskJSONa: [
  7439. {
  7440. task: "",
  7441. taskDetail: "",
  7442. chapterData: [],
  7443. toolText: "",
  7444. toolChoose: [
  7445. {
  7446. tool: [],
  7447. toolDetail: "",
  7448. toolType: 0,
  7449. askCount: 1,
  7450. askTitle: "",
  7451. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7452. },
  7453. ],
  7454. isShowTools: false,
  7455. askCount: 1,
  7456. isFold: 1,
  7457. askTitle: "",
  7458. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7459. checkJson: [{ checkCount: [], checkPerent: [] }],
  7460. homeworkList: [],
  7461. },
  7462. ],
  7463. checkUnitIndex: 0,
  7464. isdrag: "",
  7465. evaIndex: "",
  7466. evatIndex: "",
  7467. evaBoxDialog: false,
  7468. EnglishVoiceDialog: false,
  7469. englishVoiceJson: {},
  7470. cetIndex: "",
  7471. cettIndex: "",
  7472. cetBoxDialog: false,
  7473. templateName: "",
  7474. setTypeJson: {
  7475. one: "",
  7476. two: "",
  7477. },
  7478. twoJson: [],
  7479. oneJson: [],
  7480. updateKey: 1,
  7481. isOutline: false,
  7482. isOutline2: false,
  7483. infoData: [],
  7484. infoproVisible: false,
  7485. infoisFinishSize: 0,
  7486. infoisAllSize: 0,
  7487. infoprogress: 0,
  7488. taskDetailLoading: [],
  7489. ttaskDetailLoading: [],
  7490. taskDetailLoading2: [],
  7491. ttaskDetailLoading2: [],
  7492. taskDetailLoading3: [],
  7493. ttaskDetailLoading3: [],
  7494. taskDetailLoading4: [],
  7495. taskDetailLoading5: [],
  7496. ttaskDetailLoading5: [],
  7497. dArray: [],
  7498. dialogVisibleAiD: false,
  7499. aitype: "",
  7500. aiJson: {
  7501. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7502. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7503. "aiTask": "请根据<教学任务教案>。",
  7504. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7505. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7506. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7507. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7508. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7509. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7510. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7511. },
  7512. aiText: "",
  7513. aiText2: "",
  7514. aiText3: "",
  7515. aiCallBack: "",
  7516. aiIndex: "",
  7517. clickType: 1,
  7518. promptShow: false,
  7519. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7520. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7521. dialogVisibleTips: false,
  7522. tipsJson: {},
  7523. cpote:{
  7524. cpote1: '',
  7525. cpote2: '',
  7526. cpote3: '',
  7527. cpote4: '',
  7528. },
  7529. cpoteLoading:{
  7530. cpote1: false,
  7531. cpote2: false,
  7532. cpote3: false,
  7533. cpote4: false,
  7534. },
  7535. cpotetLoading:{
  7536. cpote1: false,
  7537. cpote2: false,
  7538. cpote3: false,
  7539. cpote4: false,
  7540. },
  7541. cpoteType: 0,
  7542. dialogVisibleAiCreate: false,
  7543. dialogVisibleAiCreateVideo: false,
  7544. teacherText: [],
  7545. isFileSearch: true,
  7546. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  7547. 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'],
  7548. courseJie:1,
  7549. courseTime:45,
  7550. allTextArray: [],
  7551. dialogVisiblePdf: false,
  7552. dialogVisibleOffice: false,
  7553. wurl: "",
  7554. choiceLoading: false,
  7555. teacherInfoData: [],
  7556. teacherinfoproVisible: false,
  7557. teacherinfoisFinishSize: 0,
  7558. teacherinfoisAllSize: 0,
  7559. teacherinfoprogress: 0,
  7560. teacherCourseText: "",
  7561. teacherTextLoading: false,
  7562. tteacherTextLoading: false,
  7563. targetCourseText: "",
  7564. targetTextLoading: false,
  7565. ttargetTextLoading: false,
  7566. cankaoInfoData: [],
  7567. fileSLoading: false,
  7568. infoData2: [],
  7569. isuseT: false,
  7570. mode: 1,
  7571. targetCourseText2: "",
  7572. targetTextLoading2: false,
  7573. ttargetTextLoading2: false,
  7574. courseTextBool: false,
  7575. teacherCourseTextB: true,
  7576. targetCourseTextB: true,
  7577. courseTextB: true,
  7578. targetCourseText2B: true,
  7579. // 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'],
  7580. yiKeTemplateArray:[],
  7581. taskLoading: [],
  7582. ruleLoading: [],
  7583. mubiaoInfoData: [],
  7584. mubiaoinfoproVisible: false,
  7585. mubiaoinfoisFinishSize: 0,
  7586. mubiaoinfoisAllSize: 0,
  7587. mubiaoinfoprogress: 0,
  7588. xuanzeInfoData: [],
  7589. xuanzeinfoproVisible: false,
  7590. xuanzeinfoisFinishSize: 0,
  7591. xuanzeinfoisAllSize: 0,
  7592. xuanzeinfoprogress: 0,
  7593. pingjiaInfoData: [],
  7594. pingjiainfoproVisible: [],
  7595. pingjiainfoisFinishSize: [],
  7596. pingjiainfoisAllSize: [],
  7597. pingjiainfoprogress: [],
  7598. taskGLoading: [],
  7599. isOutlineCancelToken: null,
  7600. isFileCancelToken: null,
  7601. isTargetCancelToken1: null,
  7602. isTargetCancelToken2: null,
  7603. isTextCancelToken: null,
  7604. isTeacherTextCancelToken: null,
  7605. isTeacherTaskCancelToken: null,
  7606. isOutlineTaskCancelToken: [],
  7607. isTeacherTaskCancelToken2: [],
  7608. isTeacherTaskCancelSource: [],
  7609. isTextCancelSource: null,
  7610. isOutlineTaskCancelSource: [],
  7611. isTeacherTextCancelSource: null,
  7612. isTargetCancelSource1: null,
  7613. isTargetCancelSource2: null,
  7614. fileidArray: [],
  7615. interPan: true,
  7616. interFlash: true,
  7617. agentid: "",
  7618. interSetting: false,
  7619. chatid: "",
  7620. languageSetting: 0, //0中文 1繁体 2英文
  7621. isQuote: {},
  7622. knowFileArray: [],
  7623. knowInfoData: [],
  7624. knowinfoproVisible: false,
  7625. knowinfoisFinishSize: 0,
  7626. knowinfoisAllSize: 0,
  7627. knowinfoprogress: 0,
  7628. knowFileids: [],
  7629. };
  7630. },
  7631. directives: {
  7632. autoHeight: {
  7633. update(el, binding) {
  7634. const { value } = binding;
  7635. if (value && typeof value === "number") {
  7636. el.style.height = `${value}px`;
  7637. } else {
  7638. el.style.height = "auto";
  7639. }
  7640. },
  7641. componentUpdated(el) {
  7642. el.style.height = `${el.scrollHeight + 25}px`;
  7643. },
  7644. },
  7645. },
  7646. computed: {
  7647. // rightBoxHeight: function () {
  7648. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7649. // },
  7650. offsetLetfPx: function () {
  7651. //addnum可以直接在模板语法里面用,相当于data内的值
  7652. return (
  7653. $(".cru_select")[this.unitIndex] &&
  7654. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7655. );
  7656. },
  7657. getMan2() {
  7658. return function (people) {
  7659. let _people = people;
  7660. let _people2 = "";
  7661. if (this.ManAarray.length) {
  7662. for (var i = 0; i < this.ManAarray.length; i++) {
  7663. if (this.ManAarray[i].userid == people) {
  7664. _people2 = this.ManAarray[i].name;
  7665. break;
  7666. }
  7667. }
  7668. }
  7669. if (people == this.courseUserid) {
  7670. return "";
  7671. }
  7672. return this.ManAarray.length ? _people2 : "";
  7673. };
  7674. },
  7675. getListMan2() {
  7676. return function (list) {
  7677. let _people2 = [];
  7678. if (this.ManAarray.length) {
  7679. for (var j = 0; j < list.length; j++) {
  7680. let people = list[j];
  7681. for (var i = 0; i < this.ManAarray.length; i++) {
  7682. if (
  7683. this.ManAarray[i].userid == people &&
  7684. people != this.courseUserid
  7685. ) {
  7686. _people2.push(this.ManAarray[i].name);
  7687. break;
  7688. }
  7689. }
  7690. }
  7691. }
  7692. return this.ManAarray.length ? _people2.join("、") : "";
  7693. };
  7694. },
  7695. isInvite() {
  7696. return function (cid) {
  7697. let array = [];
  7698. for (var i = 0; i < this.inviteCode.length; i++) {
  7699. array.push(this.inviteCode[i].cid);
  7700. }
  7701. return array.indexOf(cid) != -1;
  7702. };
  7703. },
  7704. getInviteCodeC() {
  7705. return function (cid) {
  7706. let array = [];
  7707. for (var i = 0; i < this.inviteCode.length; i++) {
  7708. array.push(this.inviteCode[i].cid);
  7709. }
  7710. return this.inviteCode[array.indexOf(cid)].ic;
  7711. };
  7712. },
  7713. getClassC() {
  7714. return function (c) {
  7715. let _c2 = "";
  7716. if (this.grade.length) {
  7717. for (var i = 0; i < this.grade.length; i++) {
  7718. if (this.grade[i].id == c) {
  7719. _c2 = this.grade[i].name;
  7720. break;
  7721. }
  7722. }
  7723. }
  7724. return this.grade.length ? _c2 : "";
  7725. };
  7726. },
  7727. getListClassC() {
  7728. return function (list) {
  7729. let _c2 = [];
  7730. if (this.grade.length) {
  7731. for (var j = 0; j < list.length; j++) {
  7732. let c = list[j];
  7733. for (var i = 0; i < this.grade.length; i++) {
  7734. if (this.grade[i].id == c) {
  7735. _c2.push(this.grade[i].name);
  7736. break;
  7737. }
  7738. }
  7739. }
  7740. }
  7741. return this.grade.length ? _c2.join("、") : "";
  7742. };
  7743. },
  7744. MarkdownT() {
  7745. return function (c) {
  7746. let md = new MarkdownIt();
  7747. return c
  7748. ? md.render(c) : "";
  7749. };
  7750. },
  7751. panOutline(){
  7752. return function () {
  7753. let count = 0;
  7754. for(var i = 0; i < this.unitJson.length; i++){
  7755. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7756. for(var j = 0; j < _task.length; j++){
  7757. if(_task[j].taskDetail2){
  7758. count++
  7759. }
  7760. }
  7761. }
  7762. return count;
  7763. };
  7764. },
  7765. panTeacher(){
  7766. return function () {
  7767. let count = 0;
  7768. for(var i = 0; i < this.unitJson.length; i++){
  7769. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7770. for(var j = 0; j < _task.length; j++){
  7771. if(_task[j].taskDetail3){
  7772. count++
  7773. }
  7774. }
  7775. }
  7776. return count;
  7777. };
  7778. },
  7779. panTask(){
  7780. return function () {
  7781. let count = 0;
  7782. for(var i = 0; i < this.unitJson.length; i++){
  7783. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7784. for(var j = 0; j < _task.length; j++){
  7785. if(_task[j].taskDetail){
  7786. count++
  7787. }
  7788. }
  7789. }
  7790. return count;
  7791. };
  7792. },
  7793. dataCheckPan(){
  7794. return function (fileid) {
  7795. for(let i = 0; i < this.infoData.length; i++){
  7796. if(this.infoData[i].fileid == fileid){
  7797. return true
  7798. }
  7799. }
  7800. return false;
  7801. };
  7802. },
  7803. interUrl: function () {
  7804. let agentid = this.aiJson.agentid
  7805. let sagentid = this.aiJson.sagentid
  7806. let url = ''
  7807. if(sagentid){
  7808. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7809. }else{
  7810. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7811. }
  7812. return url;
  7813. },
  7814. },
  7815. watch: {
  7816. unitIndex(newValue, oldValue) {
  7817. // return;
  7818. if (this.isDelete == 2) {
  7819. this.isDelete = 1;
  7820. return;
  7821. }
  7822. if (this.cid != "") {
  7823. let _unitIndex = oldValue;
  7824. if (
  7825. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7826. JSON.stringify(this.unitJson[_unitIndex])
  7827. ) {
  7828. this.$refs.rightboxR.scrollTop = 0;
  7829. return;
  7830. }
  7831. let cPan = 1;
  7832. for (
  7833. var j = 0;
  7834. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7835. j++
  7836. ) {
  7837. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7838. j
  7839. ].proVisible = false;
  7840. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7841. j
  7842. ].proVisible2 = false;
  7843. if (
  7844. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7845. .length > 1
  7846. ) {
  7847. for (
  7848. var z = 0;
  7849. z <
  7850. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7851. .length;
  7852. z++
  7853. ) {
  7854. if (
  7855. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7856. .toolChoose[z].tool.length
  7857. ) {
  7858. this.$message.error("请把工具添加完整");
  7859. cPan = 2;
  7860. break;
  7861. }
  7862. }
  7863. }
  7864. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7865. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7866. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7867. (ele) => {
  7868. return ele.value != "" || ele.detail != "" || ele.target != "";
  7869. }
  7870. );
  7871. }
  7872. }
  7873. if (cPan == 2) {
  7874. this.unitIndex = oldValue;
  7875. return;
  7876. }
  7877. for (var i = 0; i < this.unitJson.length; i++) {
  7878. if (this.addindex != i) {
  7879. delete this.unitJson[i].isUpdate;
  7880. }
  7881. }
  7882. this.$refs.rightboxR.scrollTop = 0;
  7883. this.addindex = -1;
  7884. let params = [
  7885. {
  7886. cid: this.cid,
  7887. chapters: JSON.stringify(this.unitJson),
  7888. uid: this.userid,
  7889. unitIndex: _unitIndex,
  7890. },
  7891. ];
  7892. this.ajax
  7893. .post(this.$store.state.api + "updateWorkNew4", params)
  7894. .then((res) => {
  7895. // this.$message({
  7896. // message: "修改成功",
  7897. // type: "success",
  7898. // });
  7899. // this.courseId = this.cid;
  7900. this.addtips()
  7901. })
  7902. .catch((err) => {
  7903. this.$message.error("网络不佳");
  7904. console.error(err);
  7905. });
  7906. }
  7907. },
  7908. steps(newValue, old) {
  7909. if(newValue == 2){
  7910. this.steps = old
  7911. }
  7912. if (newValue == 4) {
  7913. let cPan = 1;
  7914. for (var i = 0; i < this.unitJson.length; i++) {
  7915. for (
  7916. var j = 0;
  7917. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7918. j++
  7919. ) {
  7920. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7921. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7922. if (
  7923. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7924. ) {
  7925. for (
  7926. var z = 0;
  7927. z <
  7928. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7929. z++
  7930. ) {
  7931. if (
  7932. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7933. .tool.length
  7934. ) {
  7935. this.$message.error("请把工具添加完整");
  7936. cPan = 2;
  7937. break;
  7938. }
  7939. }
  7940. }
  7941. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7942. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7943. i
  7944. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7945. return ele.value != "" || ele.detail != "" || ele.target != "";
  7946. });
  7947. }
  7948. }
  7949. }
  7950. this.inputShow = true;
  7951. if (cPan == 2) {
  7952. this.steps = old;
  7953. return;
  7954. }
  7955. this.goTo(
  7956. "/course?userid=" +
  7957. this.userid +
  7958. "&oid=" +
  7959. this.oid +
  7960. "&org=" +
  7961. this.org +
  7962. "&role=" +
  7963. this.role
  7964. );
  7965. }
  7966. },
  7967. courseName(newVal, oldVal) {
  7968. this.setCourseInfo();
  7969. },
  7970. courseTypeId: {
  7971. immediate: true,
  7972. deep: true,
  7973. handler(newValue, oldValue) {
  7974. this.setCourseInfo();
  7975. }
  7976. }
  7977. },
  7978. methods: {
  7979. tableRowClassName({ row, rowIndex }) {
  7980. if ((rowIndex + 1) % 2 === 0) {
  7981. return "even_row";
  7982. } else {
  7983. return "";
  7984. }
  7985. },
  7986. close() {
  7987. this.cetIndex = "";
  7988. this.cettIndex = "";
  7989. this.templateName = "";
  7990. this.cetBoxDialog = false;
  7991. },
  7992. openAI() {
  7993. top.postMessage({ tools: "64" }, "*");
  7994. },
  7995. setMan() {
  7996. // let teacherJuri = this.teacherJuri2;
  7997. this.ManAarray = [];
  7998. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7999. if (_user.indexOf(this.userid) == -1) {
  8000. _user.push(this.userid);
  8001. }
  8002. if (_user.indexOf(this.courseUserid) == -1) {
  8003. _user.push(this.courseUserid);
  8004. }
  8005. let params = {
  8006. uid: _user.join(","),
  8007. };
  8008. this.ajax
  8009. .get(this.$store.state.api + "getAllUserById", params)
  8010. .then((res) => {
  8011. let teacherJuri = res.data[0];
  8012. this.ManAarray = teacherJuri;
  8013. })
  8014. .catch((err) => {
  8015. console.error(err);
  8016. });
  8017. },
  8018. previewImg(url) {
  8019. this.$hevueImgPreview(url);
  8020. },
  8021. btnDisplay(bool) {
  8022. this.isBtnDisplay = bool;
  8023. },
  8024. stepDisplay(bool) {
  8025. this.isStepDisplay = bool;
  8026. },
  8027. scrollChange() {
  8028. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8029. },
  8030. addHw(e) {
  8031. var el = e.currentTarget;
  8032. el.getElementsByTagName("input")[0].click();
  8033. },
  8034. change(val) {
  8035. if (this.dialogVisible1) {
  8036. this.tdetail = val;
  8037. } else if (this.dialogVisible6) {
  8038. this.AttText.text = val;
  8039. } else if (this.dialogVisible2) {
  8040. this.cTemplate = val;
  8041. } else if (this.dialogVisibleTable) {
  8042. this.tableJson.text = val;
  8043. }
  8044. this.$forceUpdate();
  8045. console.log(val);
  8046. },
  8047. change2(val) {
  8048. console.log(val);
  8049. this.$forceUpdate();
  8050. },
  8051. handleClose(done) {
  8052. done();
  8053. },
  8054. closePan(tool) {
  8055. if (tool == 15) {
  8056. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8057. this.dialogVisible8 = false;
  8058. } else {
  8059. this.closeConfirm(tool);
  8060. }
  8061. } else if (tool == 4) {
  8062. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8063. this.dialogVisible5 = false;
  8064. } else {
  8065. this.closeConfirm(tool);
  8066. }
  8067. } else if (tool == 45) {
  8068. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8069. this.dialogVisibleChoice = false;
  8070. } else {
  8071. this.closeConfirm(tool);
  8072. }
  8073. } else if (tool == 41) {
  8074. if (
  8075. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8076. ) {
  8077. this.dialogVisibleSelect = false;
  8078. } else {
  8079. this.closeConfirm(tool);
  8080. }
  8081. } else if (tool == 47) {
  8082. if (
  8083. JSON.stringify(this.sentenceList) ==
  8084. JSON.stringify(this.sentenceList2)
  8085. ) {
  8086. this.dialogVisibleSentence = false;
  8087. } else {
  8088. this.closeConfirm(tool);
  8089. }
  8090. } else if (tool == 69) {
  8091. if (
  8092. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8093. ) {
  8094. this.englishDialogVisible = false;
  8095. } else {
  8096. this.closeConfirm(tool);
  8097. }
  8098. }
  8099. },
  8100. closeConfirm(tool) {
  8101. this.$confirm("是否保存已编辑内容?", "提示", {
  8102. confirmButtonText: "保存",
  8103. cancelButtonText: "不保存",
  8104. type: "warning",
  8105. })
  8106. .then(() => {
  8107. if (tool == 15) {
  8108. this.addAnswer();
  8109. } else if (tool == 4) {
  8110. this.addAsk();
  8111. } else if (tool == 45) {
  8112. this.addTest();
  8113. } else if (tool == 41) {
  8114. this.addSelectAnswer();
  8115. } else if (tool == 47) {
  8116. this.addSentenceTool();
  8117. } else if (tool == 69) {
  8118. this.addEnglish();
  8119. }
  8120. })
  8121. .catch(() => {
  8122. if (tool == 15) {
  8123. this.dialogVisible8 = false;
  8124. } else if (tool == 4) {
  8125. this.dialogVisible5 = false;
  8126. } else if (tool == 45) {
  8127. this.dialogVisibleChoice = false;
  8128. } else if (tool == 41) {
  8129. this.dialogVisibleSelect = false;
  8130. } else if (tool == 47) {
  8131. this.dialogVisibleSentence = false;
  8132. } else if (tool == 69) {
  8133. this.englishDialogVisible = false;
  8134. }
  8135. });
  8136. },
  8137. addEnglish(jsonType) {
  8138. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  8139. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  8140. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  8141. if (
  8142. this.englishList.engTitle == "" ||
  8143. this.englishList.englishText == ""
  8144. ) {
  8145. this.$message.error("请将内容填写完整!");
  8146. return;
  8147. }
  8148. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8149. this.taskCount
  8150. ].toolChoose[this.toolIndex].englishList = this.englishList;
  8151. this.englishList = {};
  8152. if (jsonType && jsonType == 1) {
  8153. this.englishDialogVisible = true;
  8154. } else {
  8155. this.englishDialogVisible = false;
  8156. }
  8157. if (
  8158. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  8159. .toolChoose[this.toolIndex].tool != 69
  8160. ) {
  8161. this.addTools(69, this.taskCount, this.toolIndex);
  8162. }
  8163. },
  8164. imgChange2(i, j) {
  8165. var _tmp = this.testJson.testJson[i].checkList[j];
  8166. this.noneBtnImg = _tmp.length >= 1;
  8167. },
  8168. imgChange3(i) {
  8169. var _tmp = this.testJson.testJson[i];
  8170. this.noneBtnImg = _tmp.length >= 1;
  8171. },
  8172. imgChange1(file, fileList, type, itemTaskIndex) {
  8173. if (type == 1) {
  8174. var _tmp = this.cover;
  8175. } else if (
  8176. type == 2 ||
  8177. type == 3 ||
  8178. type == 6 ||
  8179. type == 7 ||
  8180. type == 8
  8181. ) {
  8182. var _tmp =
  8183. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8184. .chapterData;
  8185. } else if (type == 4) {
  8186. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  8187. } else {
  8188. var _tmp =
  8189. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8190. .homeworkList;
  8191. }
  8192. this.noneBtnImg = _tmp.length >= 1;
  8193. },
  8194. goTo(path) {
  8195. this.$router.push(path);
  8196. },
  8197. guid() {
  8198. var _num,
  8199. i,
  8200. _guid = "";
  8201. for (i = 0; i < 32; i++) {
  8202. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  8203. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  8204. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  8205. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  8206. _guid += "-";
  8207. }
  8208. }
  8209. return _guid;
  8210. },
  8211. retrunCourse() {
  8212. if(this.istemplate == 1){
  8213. this.goTo(
  8214. "/course?userid=" +
  8215. this.userid +
  8216. "&oid=" +
  8217. this.oid +
  8218. "&org=" +
  8219. this.org +
  8220. "&role=" +
  8221. this.role
  8222. );
  8223. return
  8224. }
  8225. this.$confirm("是否保存已编辑内容?", "提示", {
  8226. confirmButtonText: "保存",
  8227. cancelButtonText: "不保存",
  8228. distinguishCancelAndClose: true,
  8229. type: "warning",
  8230. })
  8231. .then(() => {
  8232. if (this.taskLoading.length) {
  8233. let _pan = 1
  8234. for(var k = 0; k < this.taskLoading.length; k++){
  8235. if(this.taskLoading[k]){
  8236. this.$message({
  8237. message: `请等待任务${k+1}回答完毕后再保存`,
  8238. type: "warning"
  8239. });
  8240. _pan = 2
  8241. }
  8242. }
  8243. if(_pan == 2){
  8244. return
  8245. }
  8246. }
  8247. if(this.taskGLoading.length){
  8248. let _pan = 1
  8249. for(var k = 0; k < this.taskGLoading.length; k++){
  8250. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8251. this.$message({
  8252. message: `请等待任务${k+1}回答完毕后再保存`,
  8253. type: "warning"
  8254. });
  8255. _pan = 2
  8256. }
  8257. }
  8258. if(_pan == 2){
  8259. return
  8260. }
  8261. }
  8262. if (this.cid == "" || this.cid == undefined) {
  8263. if (this.courseName == "") {
  8264. this.$message.error("请补充填写课程名称");
  8265. return;
  8266. } else {
  8267. this.addWork();
  8268. }
  8269. this.steps = 4;
  8270. } else {
  8271. if (this.courseName == "") {
  8272. this.$message.error("请补充填写课程名称");
  8273. return;
  8274. } else {
  8275. if (this.userid != this.courseUserid && this.role != "1") {
  8276. this.updateWork2();
  8277. } else {
  8278. this.updateWork();
  8279. }
  8280. this.steps = 4;
  8281. }
  8282. }
  8283. })
  8284. .catch((v) => {
  8285. console.log(v);
  8286. if (v == "cancel") {
  8287. this.goTo(
  8288. "/course?userid=" +
  8289. this.userid +
  8290. "&oid=" +
  8291. this.oid +
  8292. "&org=" +
  8293. this.org +
  8294. "&role=" +
  8295. this.role
  8296. );
  8297. }
  8298. });
  8299. },
  8300. lastSteps() {
  8301. if (this.steps == 4) {
  8302. this.goTo(
  8303. "/course?userid=" +
  8304. this.userid +
  8305. "&oid=" +
  8306. this.oid +
  8307. "&org=" +
  8308. this.org +
  8309. "&role=" +
  8310. this.role
  8311. );
  8312. } else {
  8313. // if (this.cidType == 0) {
  8314. // this.steps--;
  8315. // if (this.steps == 1) {
  8316. // setTimeout(() => {
  8317. // this.checkEva(this.checkId);
  8318. // setTimeout(() => {
  8319. // this.checkEva(this.checkId);
  8320. // }, 100);
  8321. // }, 100);
  8322. // }
  8323. // } else {
  8324. if (this.steps == 3) {
  8325. this.steps = 1;
  8326. setTimeout(() => {
  8327. this.checkEva(this.checkId);
  8328. setTimeout(() => {
  8329. this.checkEva(this.checkId);
  8330. }, 100);
  8331. }, 100);
  8332. }
  8333. // }
  8334. }
  8335. },
  8336. navSteps(s) {
  8337. if (this.courseName == "") {
  8338. this.$message.error("请补充填写课程名称");
  8339. return;
  8340. }
  8341. if (this.cidType == 0) {
  8342. if (this.steps == 1) {
  8343. if (this.cid == "" || this.cid == undefined) {
  8344. this.addWork();
  8345. } else {
  8346. if (this.userid != this.courseUserid && this.role != "1") {
  8347. this.updateWork2();
  8348. } else {
  8349. this.updateWork();
  8350. }
  8351. }
  8352. }
  8353. if (s == 1) {
  8354. this.steps = 1;
  8355. setTimeout(() => {
  8356. this.checkEva(this.checkId);
  8357. setTimeout(() => {
  8358. this.checkEva(this.checkId);
  8359. }, 100);
  8360. }, 100);
  8361. }
  8362. if (s == 2) {
  8363. this.steps = 2;
  8364. }
  8365. if (s == 3) {
  8366. this.cTemplate = this.templateC.content;
  8367. this.dialogVisible2 = false;
  8368. this.steps = 3;
  8369. this.isClickColor = 1;
  8370. this.unitJson[
  8371. this.unitIndex
  8372. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8373. this.$forceUpdate();
  8374. setTimeout(() => {
  8375. this.checkEva(this.checkId);
  8376. setTimeout(() => {
  8377. this.checkEva(this.checkId);
  8378. }, 100);
  8379. }, 1000);
  8380. }
  8381. } else {
  8382. if (this.steps == 1) {
  8383. if (this.cid == "" || this.cid == undefined) {
  8384. this.addWork();
  8385. } else {
  8386. if (this.userid != this.courseUserid && this.role != "1") {
  8387. this.updateWork2();
  8388. } else {
  8389. this.updateWork();
  8390. }
  8391. }
  8392. }
  8393. if (s == 1) {
  8394. this.steps = 1;
  8395. setTimeout(() => {
  8396. this.checkEva(this.checkId);
  8397. setTimeout(() => {
  8398. this.checkEva(this.checkId);
  8399. }, 100);
  8400. }, 100);
  8401. }
  8402. if (s == 3) {
  8403. this.cTemplate = this.templateC.content;
  8404. this.dialogVisible2 = false;
  8405. this.steps = 3;
  8406. this.isClickColor = 1;
  8407. this.unitJson[
  8408. this.unitIndex
  8409. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8410. this.$forceUpdate();
  8411. setTimeout(() => {
  8412. this.checkEva(this.checkId);
  8413. setTimeout(() => {
  8414. this.checkEva(this.checkId);
  8415. }, 100);
  8416. }, 1000);
  8417. }
  8418. }
  8419. this.$refs.stepBox.scrollTop = 0;
  8420. },
  8421. nextSteps(clickType, ttype) {
  8422. if(!this.time()){
  8423. return
  8424. }
  8425. // if (this.cidType == 1) {
  8426. if (this.steps == 1) {
  8427. if (this.courseName != "") {
  8428. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  8429. // this.$message({
  8430. // message: "请回答完毕后再次发送",
  8431. // type: "warning"
  8432. // });
  8433. if(this.ttaskDetailLoading.length){
  8434. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8435. this.$message({
  8436. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8437. type: "warning"
  8438. });
  8439. }
  8440. if(this.cpotetLoading.cpote1){
  8441. this.$message({
  8442. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8443. type: "warning"
  8444. });
  8445. }
  8446. if(this.cpotetLoading.cpote2){
  8447. this.$message({
  8448. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8449. type: "warning"
  8450. });
  8451. }
  8452. if(this.cpotetLoading.cpote3){
  8453. this.$message({
  8454. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8455. type: "warning"
  8456. });
  8457. }
  8458. if(this.cpotetLoading.cpote4){
  8459. this.$message({
  8460. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8461. type: "warning"
  8462. });
  8463. }
  8464. return;
  8465. }
  8466. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8467. if(!this.courseText && !this.teacherCourseText){
  8468. this.$message.error("请生成简要描述后再生成大纲");
  8469. return;
  8470. }
  8471. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8472. this.openAiDialog(clickType, 'aiOutline2')
  8473. }else {
  8474. this.openAiDialog(clickType, 'aiOutline')
  8475. }
  8476. return;
  8477. }
  8478. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8479. let _type = ''
  8480. if(this.cpoteType == 0){
  8481. _type = 'aiCpote1'
  8482. }else if(this.cpoteType == 1){
  8483. _type = 'aiCpote2'
  8484. }else if(this.cpoteType == 2){
  8485. _type = 'aiCpote3'
  8486. }else if(this.cpoteType == 3){
  8487. _type = 'aiCpote4'
  8488. }
  8489. this.cpoteType++
  8490. this.openAiDialog(clickType, _type)
  8491. return;
  8492. }
  8493. // if (!this.isOutline2) {
  8494. // this.openAiDialog(clickType, 'aiTeacher')
  8495. // return;
  8496. // }
  8497. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8498. this.openAiDialog(clickType, 'aiTeacher3')
  8499. return;
  8500. }
  8501. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8502. this.openAiDialog(clickType, 'aiTeacher2')
  8503. return;
  8504. }
  8505. let _pan2 = 1
  8506. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8507. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8508. _pan2 = 2
  8509. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8510. break;
  8511. }
  8512. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8513. _pan2 = 2
  8514. this.$message.error(`请完善任务${k+1}的课程教案`)
  8515. break;
  8516. }
  8517. }
  8518. if(_pan2 == 2){
  8519. return;
  8520. }
  8521. const functionA = () => {
  8522. setTimeout(() => {
  8523. this.loading = false
  8524. this.steps = 3;
  8525. }, 0)
  8526. this.isClickColor = 1;
  8527. this.unitJson[
  8528. this.unitIndex
  8529. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8530. this.$forceUpdate();
  8531. setTimeout(() => {
  8532. this.checkEva(this.checkId);
  8533. setTimeout(() => {
  8534. this.checkEva(this.checkId);
  8535. }, 100);
  8536. }, 1000);
  8537. if (this.cid == "" || this.cid == undefined) {
  8538. this.addWork();
  8539. } else {
  8540. if (this.userid != this.courseUserid && this.role != "1") {
  8541. this.updateWork2();
  8542. } else {
  8543. this.updateWork();
  8544. }
  8545. }
  8546. }
  8547. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  8548. if(this.ttaskDetailLoading5.length){
  8549. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8550. // this.$message({
  8551. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8552. // type: "warning"
  8553. // });
  8554. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  8555. confirmButtonText: "确定",
  8556. cancelButtonText: "取消",
  8557. distinguishCancelAndClose: true,
  8558. type: "warning"
  8559. })
  8560. .then(() => {
  8561. if(this.isTeacherTaskCancelToken2){
  8562. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  8563. if(this.isTeacherTaskCancelToken2[i]){
  8564. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  8565. this.isTeacherTaskCancelToken2[i] = null;
  8566. }
  8567. }
  8568. }
  8569. this.taskDetailLoading5 = []
  8570. this.ttaskDetailLoading5 = []
  8571. if(this.isTeacherTaskCancelSource){
  8572. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  8573. if(this.isTeacherTaskCancelSource[i]){
  8574. this.isTeacherTaskCancelSource[i].close()
  8575. this.isTeacherTaskCancelSource[i] = null
  8576. }
  8577. }
  8578. }
  8579. if (this.cid) {
  8580. this.loading = true
  8581. functionA()
  8582. } else {
  8583. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8584. }
  8585. }).catch((v) => {
  8586. console.log(v);
  8587. })
  8588. }
  8589. return;
  8590. }
  8591. if (this.cid && this.panTask() > 0) {
  8592. this.loading = true
  8593. functionA()
  8594. } else {
  8595. // if(ttype == 2){
  8596. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8597. // }else {
  8598. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  8599. // }
  8600. }
  8601. } else {
  8602. this.$message.error("请补充填写课程名称");
  8603. return;
  8604. }
  8605. } else if (this.steps == 3) {
  8606. if (this.taskLoading.length) {
  8607. let _pan = 1
  8608. for(var k = 0; k < this.taskLoading.length; k++){
  8609. if(this.taskLoading[k]){
  8610. this.$message({
  8611. message: `请等待任务${k+1}回答完毕后再上传`,
  8612. type: "warning"
  8613. });
  8614. _pan = 2
  8615. }
  8616. }
  8617. if(_pan == 2){
  8618. return
  8619. }
  8620. }
  8621. if(this.taskGLoading.length){
  8622. let _pan = 1
  8623. for(var k = 0; k < this.taskGLoading.length; k++){
  8624. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8625. this.$message({
  8626. message: `请等待任务${k+1}回答完毕后再保存`,
  8627. type: "warning"
  8628. });
  8629. _pan = 2
  8630. }
  8631. }
  8632. if(_pan == 2){
  8633. return
  8634. }
  8635. }
  8636. if (this.cid == "" || this.cid == undefined) {
  8637. if (this.courseName == "") {
  8638. this.$message.error("请补充填写课程名称");
  8639. return;
  8640. } else {
  8641. this.addWork();
  8642. this.steps++;
  8643. }
  8644. } else {
  8645. if (this.courseName == "") {
  8646. this.$message.error("请补充填写课程名称");
  8647. return;
  8648. } else {
  8649. if (this.userid != this.courseUserid && this.role != "1") {
  8650. this.updateWork2();
  8651. } else {
  8652. this.updateWork();
  8653. }
  8654. this.steps++;
  8655. }
  8656. }
  8657. }
  8658. // } else {
  8659. // if (this.steps == 1) {
  8660. // if (this.courseName != "") {
  8661. // if (this.cid == "" || this.cid == undefined) {
  8662. // this.addWork();
  8663. // } else {
  8664. // if (this.userid != this.courseUserid && this.role != "1") {
  8665. // // this.updateWork2();
  8666. // } else {
  8667. // this.updateWork();
  8668. // }
  8669. // }
  8670. // this.steps++;
  8671. // } else {
  8672. // this.$message.error("请补充填写课程名称");
  8673. // return;
  8674. // }
  8675. // } else if (this.steps == 2) {
  8676. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  8677. // this.cTemplate = this.templateC.content;
  8678. // }
  8679. // this.dialogVisible2 = false;
  8680. // this.steps++;
  8681. // setTimeout(() => {
  8682. // this.checkEva(this.checkId);
  8683. // setTimeout(() => {
  8684. // this.checkEva(this.checkId);
  8685. // }, 100);
  8686. // }, 1000);
  8687. // } else if (this.steps == 3) {
  8688. // if (this.cid == "" || this.cid == undefined) {
  8689. // if (this.courseName == "") {
  8690. // this.$message.error("请补充填写课程名称");
  8691. // return;
  8692. // } else {
  8693. // this.addWork();
  8694. // this.steps++;
  8695. // }
  8696. // } else {
  8697. // if (this.courseName == "") {
  8698. // this.$message.error("请补充填写课程名称");
  8699. // return;
  8700. // } else {
  8701. // if (this.userid != this.courseUserid && this.role != "1") {
  8702. // this.updateWork2();
  8703. // } else {
  8704. // this.updateWork();
  8705. // }
  8706. // this.steps++;
  8707. // }
  8708. // }
  8709. // }
  8710. // }
  8711. this.$refs.stepBox.scrollTop = 0;
  8712. },
  8713. unitSet(i) {
  8714. if (this.unitIndex == i) {
  8715. return;
  8716. }
  8717. this.unitIndex = i;
  8718. this.isClickColor = 1;
  8719. // this.$refs.rightboxR.scrollTop = 0;
  8720. this.$refs.unitBox.scrollTop = 0;
  8721. },
  8722. panUnitJson() {
  8723. let _unitIndex = this.unitIndex;
  8724. let cPan = 1;
  8725. for (
  8726. var j = 0;
  8727. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8728. j++
  8729. ) {
  8730. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8731. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8732. j
  8733. ].proVisible2 = false;
  8734. if (
  8735. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8736. .length > 1
  8737. ) {
  8738. for (
  8739. var z = 0;
  8740. z <
  8741. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8742. .length;
  8743. z++
  8744. ) {
  8745. if (
  8746. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8747. z
  8748. ].tool.length
  8749. ) {
  8750. this.$message.error("请把工具添加完整");
  8751. cPan = 2;
  8752. break;
  8753. }
  8754. }
  8755. }
  8756. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8757. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8758. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8759. (ele) => {
  8760. return ele.value != "" || ele.detail != "" || ele.target != "";
  8761. }
  8762. );
  8763. }
  8764. }
  8765. return cPan;
  8766. },
  8767. unitOpen(i) {
  8768. if (this.unitJson[i].toolOpen) {
  8769. this.unitJson[i].toolOpen = false;
  8770. } else {
  8771. this.unitJson[i].toolOpen = true;
  8772. }
  8773. this.updateWork();
  8774. this.$forceUpdate();
  8775. },
  8776. unitSet2(i) {
  8777. if (this.panUnitJson() == 2) {
  8778. return;
  8779. }
  8780. // if(this.unitJson[i].toolOpen){
  8781. // this.unitJson[i].toolOpen = false
  8782. // this.updateWork()
  8783. // this.$forceUpdate()
  8784. // return
  8785. // }else {
  8786. this.unitJson[i].toolOpen = true;
  8787. // }
  8788. this.$forceUpdate();
  8789. if (this.unitIndex == i) {
  8790. return;
  8791. }
  8792. this.unitIndex = i;
  8793. this.isClickColor = 1;
  8794. // this.$refs.rightboxR.scrollTop = 0;
  8795. this.$refs.unitBox.scrollTop = 0;
  8796. },
  8797. updateCourseState(i) {
  8798. let params = [
  8799. {
  8800. cid: this.cid,
  8801. state: i,
  8802. },
  8803. ];
  8804. this.ajax
  8805. .post(this.$store.state.api + "updateCourseMode", params)
  8806. .then((res) => {
  8807. this.courseState = i;
  8808. })
  8809. .catch((err) => {
  8810. this.$message.error("网络不佳");
  8811. console.error(err);
  8812. });
  8813. },
  8814. addtips(){
  8815. let params = [
  8816. {
  8817. cid: this.cid,
  8818. tips: JSON.stringify(this.aiJson),
  8819. tid: this.templateid
  8820. },
  8821. ];
  8822. this.ajax
  8823. .post(this.$store.state.api + "addTips", params)
  8824. .then((res) => {
  8825. })
  8826. .catch((err) => {
  8827. this.$message.error("网络不佳");
  8828. console.error(err);
  8829. });
  8830. },
  8831. openSaveTips(){
  8832. this.dialogVisibleTips = true
  8833. },
  8834. time() {
  8835. if (!this.now) {
  8836. this.now = new Date().getTime();
  8837. return true;
  8838. } else {
  8839. let time = new Date().getTime();
  8840. if (time - this.now > 1000) {
  8841. this.now = time;
  8842. return true;
  8843. } else {
  8844. return false;
  8845. }
  8846. }
  8847. },
  8848. deleteUnit(i) {
  8849. var _this = this;
  8850. if (i == 0 && _this.unitJson.length == 1) {
  8851. _this
  8852. .$confirm("确定切换成任务模式吗?", "提示", {
  8853. confirmButtonText: "确定",
  8854. cancelButtonText: "取消",
  8855. type: "warning",
  8856. })
  8857. .then(() => {
  8858. _this.unitJson[i].dyName = "";
  8859. // _this.updateCourseState(2);
  8860. })
  8861. .catch(() => {
  8862. return;
  8863. });
  8864. } else {
  8865. _this
  8866. .$confirm("确定删除此阶段吗?", "提示", {
  8867. confirmButtonText: "确定",
  8868. cancelButtonText: "取消",
  8869. type: "warning",
  8870. })
  8871. .then(() => {
  8872. _this.isDelete = 2;
  8873. // _this.unitIndex = _this.unitIndex - 1;
  8874. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  8875. // _this.$message.success("删除成功");
  8876. })
  8877. .catch(() => {
  8878. return;
  8879. });
  8880. }
  8881. },
  8882. deleteWork(chapid) {
  8883. let params = [
  8884. {
  8885. cid: this.cid,
  8886. chapters: JSON.stringify(this.unitJson),
  8887. uid: this.userid,
  8888. chapid: chapid,
  8889. },
  8890. ];
  8891. this.ajax
  8892. .post(this.$store.state.api + "deleteWork", params)
  8893. .then((res) => {
  8894. this.$message({
  8895. message: "删除成功",
  8896. type: "success",
  8897. });
  8898. let task = JSON.parse(
  8899. JSON.stringify(
  8900. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  8901. )
  8902. );
  8903. this.unitJson.splice(this.unitIndex, 1);
  8904. if (this.unitIndex == 0) {
  8905. this.unitIndex = 0;
  8906. } else {
  8907. this.unitIndex = this.unitIndex - 1;
  8908. }
  8909. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8910. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8911. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  8912. ...task,
  8913. ];
  8914. }
  8915. })
  8916. .catch((err) => {
  8917. this.$message.error("网络不佳");
  8918. console.error(err);
  8919. });
  8920. },
  8921. deleteTool(itemTaskIndex, i) {
  8922. var _this = this;
  8923. if (_this.time()) {
  8924. _this
  8925. .$confirm("确定删除此工具吗?", "提示", {
  8926. confirmButtonText: "确定",
  8927. cancelButtonText: "取消",
  8928. type: "warning",
  8929. })
  8930. .then(() => {
  8931. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8932. itemTaskIndex
  8933. ].toolChoose.splice(i, 1);
  8934. _this.$message.success("删除成功");
  8935. })
  8936. .catch(() => {
  8937. return;
  8938. });
  8939. }
  8940. },
  8941. deleteSentence(i) {
  8942. var _this = this;
  8943. _this
  8944. .$confirm("确定删除此题目吗?", "提示", {
  8945. confirmButtonText: "确定",
  8946. cancelButtonText: "取消",
  8947. type: "warning",
  8948. })
  8949. .then(() => {
  8950. _this.sentenceList.splice(i, 1);
  8951. _this.$message.success("删除成功");
  8952. })
  8953. .catch(() => {
  8954. return;
  8955. });
  8956. },
  8957. deleteS(s, i, j) {
  8958. this.sentenceList[i].addSentence.splice(j, 1);
  8959. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  8960. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  8961. this.sentenceList[i].rightAnswer.splice(a, 1);
  8962. }
  8963. },
  8964. openT() {
  8965. top.postMessage({ tools: "25" }, "*");
  8966. },
  8967. deleteTask(i) {
  8968. var _this = this;
  8969. if (_this.time()) {
  8970. _this
  8971. .$confirm(
  8972. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  8973. 1 ==
  8974. i
  8975. ? "确定删除此任务吗?"
  8976. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  8977. "提示",
  8978. {
  8979. confirmButtonText: "确定",
  8980. cancelButtonText: "取消",
  8981. type: "warning",
  8982. }
  8983. )
  8984. .then(() => {
  8985. if (i == 0 && _this.courseState == 4) {
  8986. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8987. i + 1
  8988. ].chapterData = JSON.parse(
  8989. JSON.stringify(
  8990. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  8991. .chapterData
  8992. )
  8993. );
  8994. }
  8995. _this.$forceUpdate();
  8996. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  8997. i,
  8998. 1
  8999. );
  9000. _this.$message.success("删除成功");
  9001. })
  9002. .catch(() => {
  9003. return;
  9004. });
  9005. }
  9006. },
  9007. deleteTask2(i) {
  9008. var _this = this;
  9009. if (_this.time()) {
  9010. _this
  9011. .$confirm(
  9012. "确定删除此任务吗?",
  9013. "提示",
  9014. {
  9015. confirmButtonText: "确定",
  9016. cancelButtonText: "取消",
  9017. type: "warning",
  9018. }
  9019. )
  9020. .then(() => {
  9021. if (i == 0 && _this.courseState == 4) {
  9022. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9023. i + 1
  9024. ].chapterData = JSON.parse(
  9025. JSON.stringify(
  9026. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9027. .chapterData
  9028. )
  9029. );
  9030. }
  9031. _this.$forceUpdate();
  9032. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9033. i,
  9034. 1
  9035. );
  9036. _this.$message.success("删除成功");
  9037. })
  9038. .catch(() => {
  9039. return;
  9040. });
  9041. }
  9042. },
  9043. handlePictureCardPreview(file) {
  9044. this.dialogImageUrl = file.url;
  9045. },
  9046. clean(i, c) {
  9047. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  9048. },
  9049. handle_remove1(file, fileList, type) {
  9050. var _tmp = this.cover;
  9051. // for (var i = 0, len = _tmp.length; i < len; i++) {
  9052. // if (_tmp[i].uid == file.uid) {
  9053. // _tmp.splice(i, 1);
  9054. // break;
  9055. // }
  9056. // this.cover = _tmp;
  9057. // }
  9058. this.cover = [];
  9059. this.noneBtnImg = this.cover.length >= 1;
  9060. this.isSysPic = false;
  9061. this.isSysPic2 = false;
  9062. this.$forceUpdate();
  9063. },
  9064. addImg(e) {
  9065. var el = e.currentTarget;
  9066. el.getElementsByTagName("input")[0].click();
  9067. e.target.value = "";
  9068. },
  9069. addChaptersTools(i) {
  9070. this.chapTools = [
  9071. {
  9072. tools: [],
  9073. toolDetail: "",
  9074. },
  9075. ];
  9076. this.chapCount = i;
  9077. this.dialogVisible4 = true;
  9078. },
  9079. isNoFinsh() {
  9080. this.$message.warning("功能正在开发中");
  9081. },
  9082. addAttText(i) {
  9083. this.AttText = {
  9084. title: "",
  9085. text: "",
  9086. };
  9087. this.taskCount = i;
  9088. this.AttTextType = 0;
  9089. this.$forceUpdate();
  9090. this.dialogVisible6 = true;
  9091. setTimeout(() => {
  9092. this.$refs["fuInput"].focus();
  9093. }, 100);
  9094. },
  9095. openLine(i) {
  9096. this.line = "";
  9097. this.lineCount = i;
  9098. this.lineType = 0;
  9099. this.$forceUpdate();
  9100. this.dialogVisible7 = true;
  9101. },
  9102. pasteLine(i) {
  9103. navigator.clipboard
  9104. .readText()
  9105. .then((v) => {
  9106. console.log("获取剪贴板成功:", v);
  9107. const html = v;
  9108. const regex = /src="(.*?)"/g;
  9109. const match = regex.exec(html);
  9110. if (match && match[1]) {
  9111. console.log(match[1]);
  9112. this.$message.success("粘贴成功");
  9113. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9114. i
  9115. ].chapterData.unshift({
  9116. name: "链接",
  9117. title: "嵌入代码",
  9118. url: match[1],
  9119. type: 8,
  9120. });
  9121. } else {
  9122. // console.log("未找到包含 src 属性的 iframe");
  9123. this.$message.error(
  9124. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  9125. );
  9126. }
  9127. })
  9128. .catch((v) => {
  9129. console.log("获取剪贴板失败: ", v);
  9130. });
  9131. },
  9132. openSource(i) {
  9133. this.lineCount = i;
  9134. this.sourceData = {};
  9135. this.dialogVisibleSource = true;
  9136. this.updateSourcePan = false;
  9137. },
  9138. openAiCreate(i){
  9139. this.lineCount = i;
  9140. this.dialogVisibleAiCreate = true;
  9141. },
  9142. createAiPpt(json){
  9143. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9144. this.dialogVisibleAiCreate = false;
  9145. },
  9146. openAiCreateVideo(i){
  9147. this.lineCount = i;
  9148. this.dialogVisibleAiCreateVideo = true;
  9149. },
  9150. createAiVideo(json){
  9151. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9152. // this.dialogVisibleAiCreateVideo = false;
  9153. },
  9154. async createTeacherAn(index){
  9155. // this.lineCount = index;
  9156. this.loading = true
  9157. let md = new MarkdownIt();
  9158. if(this.courseState == 4){
  9159. // if(index == 0 || index){
  9160. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9161. // let name = _task.task+'-教案'
  9162. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9163. // await this.generate(name, _html, 0)
  9164. // }else {
  9165. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9166. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9167. let name = _task.task+'-教案'
  9168. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9169. await this.generate(name, _html, 0)
  9170. }
  9171. // }
  9172. }else if(this.courseState == 5){
  9173. if(index == 0 || index){
  9174. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9175. let name = _task.task+'-教案'
  9176. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9177. await this.generate(name, _html, index)
  9178. }else {
  9179. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9180. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9181. let name = _task.task+'-教案'
  9182. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9183. await this.generate(name, _html, i)
  9184. }
  9185. }
  9186. }
  9187. },
  9188. async generate(a, html, index) {
  9189. // <html lang="en">
  9190. // 将html文件中需要用到的数据挂载到store上
  9191. const content = `<!DOCTYPE html>
  9192. <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'>
  9193. <head>
  9194. <!--[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]-->
  9195. <meta charset="UTF-8">
  9196. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9197. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9198. <title>${a}</title>
  9199. <style>
  9200. table {
  9201. border-collapse: collapse; /* 折叠边框 */
  9202. width: 100%;
  9203. }
  9204. th, td {
  9205. border: 1px solid black; /* 线条样式 */
  9206. padding: 8px;
  9207. text-align: left;
  9208. }
  9209. </style>
  9210. </head>
  9211. <body>
  9212. ${html}
  9213. </body>
  9214. </html>`;
  9215. // debugger
  9216. const blob = htmlDocx.asBlob(content)
  9217. // debugger
  9218. let dname = a + ".docx";
  9219. // 创建文件流
  9220. // 创建bolb实例时,内容一定要放在[]中
  9221. // const blob = new Blob([content], {
  9222. // type: "text/plain;charset='utf-8'",
  9223. // });
  9224. // const file = new File([blob], dname, { type: 'application/msword' });
  9225. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9226. await this.beforeUploadHtml(file, index)
  9227. },
  9228. async generateExport(a, html, index) {
  9229. // <html lang="en">
  9230. // 将html文件中需要用到的数据挂载到store上
  9231. const content = `<!DOCTYPE html>
  9232. <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'>
  9233. <head>
  9234. <!--[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]-->
  9235. <meta charset="UTF-8">
  9236. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9237. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9238. <title>${a}</title>
  9239. <style>
  9240. table {
  9241. border-collapse: collapse; /* 折叠边框 */
  9242. width: 100%;
  9243. }
  9244. th, td {
  9245. border: 1px solid black; /* 线条样式 */
  9246. padding: 8px;
  9247. text-align: left;
  9248. }
  9249. </style>
  9250. </head>
  9251. <body>
  9252. ${html}
  9253. </body>
  9254. </html>`;
  9255. // debugger
  9256. const blob = htmlDocx.asBlob(content)
  9257. // debugger
  9258. const dname = `${a}.docx`;
  9259. // 创建文件流
  9260. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9261. return file
  9262. },
  9263. beforeUploadHtml(event, index) {
  9264. var file = event;
  9265. var credentials = {
  9266. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9267. secretAccessKey: "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",
  9268. }; //秘钥形式的登录上传
  9269. window.AWS.config.update(credentials);
  9270. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9271. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9272. var _this = this;
  9273. if (file) {
  9274. var params = {
  9275. Key:
  9276. file.name.split(".")[0] +
  9277. new Date().getTime() +
  9278. "." +
  9279. file.name.split(".")[file.name.split(".").length - 1],
  9280. ContentType: file.type,
  9281. Body: file,
  9282. "Access-Control-Allow-Credentials": "*",
  9283. ACL: "public-read",
  9284. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9285. var options = {
  9286. partSize: 2048 * 1024 * 1024,
  9287. queueSize: 2,
  9288. leavePartsOnError: true,
  9289. };
  9290. bucket
  9291. .upload(params, options)
  9292. .on("httpUploadProgress", function (evt) {
  9293. //这里可以写进度条
  9294. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9295. })
  9296. .send(function (err, data) {
  9297. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  9298. _this.loading = false
  9299. }
  9300. if(_this.courseState == 5){
  9301. _this.loading = false
  9302. }
  9303. if (err) {
  9304. _this.$message.error("上传失败");
  9305. } else {
  9306. let _index = 0
  9307. // if(_this.lineCount == 0 || _this.lineCount){
  9308. // _index = _this.lineCount
  9309. // }else {
  9310. _index = index
  9311. // }
  9312. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  9313.                   name: file.name,
  9314.                   url: data.Location,
  9315.                   type: 3,
  9316.                 })
  9317. console.log(data.Location);
  9318. }
  9319. });
  9320. }
  9321. },
  9322. async generate2(a, html, index, callback) {
  9323. // 将html文件中需要用到的数据挂载到store上
  9324. const content = `<!DOCTYPE html>
  9325. <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'>
  9326. <head>
  9327. <!--[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]-->
  9328. <meta charset="UTF-8">
  9329. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9330. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9331. <title>${a}</title>
  9332. <style>
  9333. table {
  9334. border-collapse: collapse; /* 折叠边框 */
  9335. width: 100%;
  9336. }
  9337. th, td {
  9338. border: 1px solid black; /* 线条样式 */
  9339. padding: 8px;
  9340. text-align: left;
  9341. }
  9342. </style>
  9343. </head>
  9344. <body>
  9345. ${html}
  9346. </body>
  9347. </html>`;
  9348. const blob = htmlDocx.asBlob(content)
  9349. // debugger
  9350. let dname = a + ".docx";
  9351. // 创建文件流
  9352. // 创建bolb实例时,内容一定要放在[]中
  9353. // const blob = new Blob([content], {
  9354. // type: "text/plain;charset='utf-8'",
  9355. // });
  9356. // const file = new File([blob], dname, { type: 'application/msword' });
  9357. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9358. await this.beforeUploadHtml2(file, index, callback)
  9359. },
  9360. beforeUploadHtml2(event, index, callback) {
  9361. var file = event;
  9362. var credentials = {
  9363. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9364. secretAccessKey: "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",
  9365. }; //秘钥形式的登录上传
  9366. window.AWS.config.update(credentials);
  9367. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9368. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9369. var _this = this;
  9370. if (file) {
  9371. var params = {
  9372. Key:
  9373. file.name.split(".")[0] +
  9374. new Date().getTime() +
  9375. "." +
  9376. file.name.split(".")[file.name.split(".").length - 1],
  9377. ContentType: file.type,
  9378. Body: file,
  9379. "Access-Control-Allow-Credentials": "*",
  9380. ACL: "public-read",
  9381. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9382. var options = {
  9383. partSize: 2048 * 1024 * 1024,
  9384. queueSize: 2,
  9385. leavePartsOnError: true,
  9386. };
  9387. bucket
  9388. .upload(params, options)
  9389. .on("httpUploadProgress", function (evt) {
  9390. //这里可以写进度条
  9391. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9392. })
  9393. .send(async function (err, data) {
  9394. if(_this.courseState == 5){
  9395. _this.loading = false
  9396. }
  9397. if (err) {
  9398. callback ? callback() : ''
  9399. _this.$message.error("上传失败");
  9400. } else {
  9401. let fileid = await _this.createFileid(data.Location)
  9402. // _this.cankaoInfoData.push({
  9403. //                   name: file.name,
  9404. //                   url: data.Location,
  9405. //                   type: 3,
  9406. // fileid: fileid,
  9407. //   })
  9408. _this.infoData2.push({
  9409.                   name: file.name,
  9410.                   url: data.Location,
  9411.                   type: 3,
  9412. fileid: fileid == 1 ? '' : fileid,
  9413.   })
  9414. _this.infoData.push({
  9415. name: file.name,
  9416. url: data.Location,
  9417. type: 3,
  9418. fileid: fileid == 1 ? '' : fileid,
  9419. });
  9420. console.log(data.Location);
  9421. callback ? callback() : ''
  9422. }
  9423. });
  9424. }
  9425. },
  9426. addSource() {
  9427. if (!Object.keys(this.sourceData).length) {
  9428. this.$message.error("请选择要上传的资源");
  9429. return;
  9430. }
  9431. let keys = Object.keys(this.sourceData);
  9432. for (var i = 0; i < keys.length; i++) {
  9433. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9434. this.lineCount
  9435. ].chapterData.unshift({
  9436. name: "链接",
  9437. title: this.sourceData[keys[i]].name,
  9438. url: this.sourceData[keys[i]].url,
  9439. type: 14,
  9440. id: keys[i],
  9441. });
  9442. }
  9443. this.$forceUpdate();
  9444. this.dialogVisibleSource = false;
  9445. },
  9446. updateSource() {
  9447. if (!Object.keys(this.sourceData).length) {
  9448. this.$message.error("请选择要上传的资源");
  9449. return;
  9450. }
  9451. let keys = Object.keys(this.sourceData);
  9452. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9453. this.taskCount
  9454. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  9455. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9456. this.taskCount
  9457. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  9458. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9459. this.taskCount
  9460. ].chapterData[this.lineCount].id = keys[0];
  9461. this.updateSourcePan = false;
  9462. this.$forceUpdate();
  9463. this.dialogVisibleSource = false;
  9464. },
  9465. deleteM(i, j) {
  9466. this.testJson.testJson[i].timuList.splice(j, 1);
  9467. },
  9468. beforeUploadTiMu(event, i) {
  9469. const loading = this.openLoading();
  9470. var file = event.target.files[0];
  9471. var credentials = {
  9472. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9473. secretAccessKey: "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",
  9474. }; //秘钥形式的登录上传
  9475. window.AWS.config.update(credentials);
  9476. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9477. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9478. var _this = this;
  9479. if (file) {
  9480. var params = {
  9481. Key:
  9482. file.name.split(".")[0] +
  9483. new Date().getTime() +
  9484. "." +
  9485. file.name.split(".")[file.name.split(".").length - 1],
  9486. ContentType: file.type,
  9487. Body: file,
  9488. "Access-Control-Allow-Credentials": "*",
  9489. ACL: "public-read",
  9490. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9491. var options = {
  9492. partSize: 2048 * 1024 * 1024,
  9493. queueSize: 2,
  9494. leavePartsOnError: true,
  9495. };
  9496. bucket
  9497. .upload(params, options)
  9498. .on("httpUploadProgress", function (evt) {
  9499. //这里可以写进度条
  9500. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9501. })
  9502. .send(function (err, data) {
  9503. loading.close();
  9504. if (err) {
  9505. _this.$message.error("上传失败");
  9506. } else {
  9507. if (_this.testJson.testJson[i].timuList) {
  9508. _this.testJson.testJson[i].timuList.push({
  9509. src: data.Location,
  9510. });
  9511. } else {
  9512. _this.testJson.testJson[i].timuList = [];
  9513. _this.testJson.testJson[i].timuList.push({
  9514. src: data.Location,
  9515. });
  9516. }
  9517. _this.imgChange3(i);
  9518. _this.$forceUpdate();
  9519. }
  9520. });
  9521. }
  9522. },
  9523. beforeUploadTi(event, i, j) {
  9524. const loading = this.openLoading();
  9525. var file = event.target.files[0];
  9526. var credentials = {
  9527. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9528. secretAccessKey: "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",
  9529. }; //秘钥形式的登录上传
  9530. window.AWS.config.update(credentials);
  9531. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9532. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9533. var _this = this;
  9534. if (file) {
  9535. var params = {
  9536. Key:
  9537. file.name.split(".")[0] +
  9538. new Date().getTime() +
  9539. "." +
  9540. file.name.split(".")[file.name.split(".").length - 1],
  9541. ContentType: file.type,
  9542. Body: file,
  9543. "Access-Control-Allow-Credentials": "*",
  9544. ACL: "public-read",
  9545. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9546. var options = {
  9547. partSize: 2048 * 1024 * 1024,
  9548. queueSize: 2,
  9549. leavePartsOnError: true,
  9550. };
  9551. bucket
  9552. .upload(params, options)
  9553. .on("httpUploadProgress", function (evt) {
  9554. //这里可以写进度条
  9555. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9556. })
  9557. .send(function (err, data) {
  9558. loading.close();
  9559. if (err) {
  9560. _this.$message.error("上传失败");
  9561. } else {
  9562. _this.testJson.testJson[i].checkList[j] = {};
  9563. _this.testJson.testJson[i].checkList[j].src = data.Location;
  9564. _this.testJson.testJson[i].checkList[j].imgType = 1;
  9565. _this.imgChange2(i, j);
  9566. _this.$forceUpdate();
  9567. }
  9568. });
  9569. }
  9570. },
  9571. beforeUpload1(event, type) {
  9572. // const loading = this.openLoading();
  9573. var file = event.target.files[0];
  9574. var credentials = {
  9575. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9576. secretAccessKey: "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",
  9577. }; //秘钥形式的登录上传
  9578. window.AWS.config.update(credentials);
  9579. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9580. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9581. var _this = this;
  9582. if (file) {
  9583. var params = {
  9584. Key:
  9585. file.name.split(".")[0] +
  9586. new Date().getTime() +
  9587. "." +
  9588. file.name.split(".")[file.name.split(".").length - 1],
  9589. ContentType: file.type,
  9590. Body: file,
  9591. "Access-Control-Allow-Credentials": "*",
  9592. ACL: "public-read",
  9593. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9594. var options = {
  9595. partSize: 2048 * 1024 * 1024,
  9596. queueSize: 2,
  9597. leavePartsOnError: true,
  9598. };
  9599. bucket
  9600. .upload(params, options)
  9601. .on("httpUploadProgress", function (evt) {
  9602. //这里可以写进度条
  9603. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9604. })
  9605. .send(function (err, data) {
  9606. // loading.close();
  9607. if (err) {
  9608. // var a = _this.$refs.upload1.uploadFiles;
  9609. // a.splice(a.length - 1, a.length);
  9610. _this.$message.error("上传失败");
  9611. } else {
  9612. // _this.cover.push({
  9613. // name: file.name,
  9614. // url: data.Location,
  9615. // uid: file.uid,
  9616. // });
  9617. _this.cover = [
  9618. {
  9619. name: file.name,
  9620. url: data.Location,
  9621. uid: file.uid,
  9622. },
  9623. ];
  9624. _this.imgChange1(null, null, 1, null);
  9625. _this.choosePicVisible = false;
  9626. console.log(data.Location);
  9627. }
  9628. });
  9629. }
  9630. },
  9631. beforeUploadSelect(event, type) {
  9632. // const loading = this.openLoading();
  9633. var file = event.target.files[0];
  9634. var credentials = {
  9635. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9636. secretAccessKey: "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",
  9637. }; //秘钥形式的登录上传
  9638. window.AWS.config.update(credentials);
  9639. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9640. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9641. var _this = this;
  9642. if (file) {
  9643. var params = {
  9644. Key:
  9645. file.name.split(".")[0] +
  9646. new Date().getTime() +
  9647. "." +
  9648. file.name.split(".")[file.name.split(".").length - 1],
  9649. ContentType: file.type,
  9650. Body: file,
  9651. "Access-Control-Allow-Credentials": "*",
  9652. ACL: "public-read",
  9653. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9654. var options = {
  9655. partSize: 2048 * 1024 * 1024,
  9656. queueSize: 2,
  9657. leavePartsOnError: true,
  9658. };
  9659. bucket
  9660. .upload(params, options)
  9661. .on("httpUploadProgress", function (evt) {
  9662. //这里可以写进度条
  9663. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9664. })
  9665. .send(function (err, data) {
  9666. // loading.close();
  9667. if (err) {
  9668. _this.$message.error("上传失败");
  9669. } else {
  9670. _this.selectJson.url = data.Location;
  9671. console.log(data.Location);
  9672. }
  9673. });
  9674. }
  9675. },
  9676. chooseSysPic(p) {
  9677. this.cover = [];
  9678. setTimeout(() => {
  9679. this.cover[0] = {
  9680. name: "系统图片.png",
  9681. url: p,
  9682. };
  9683. this.imgChange1(null, null, 1, null);
  9684. this.$forceUpdate();
  9685. }, 0);
  9686. this.isSysPic = true;
  9687. this.isSysPic2 = false;
  9688. this.sysPicVisible = false;
  9689. this.$forceUpdate();
  9690. },
  9691. chooseSysPic2(p) {
  9692. this.cover = [];
  9693. setTimeout(() => {
  9694. this.cover[0] = {
  9695. name: "网络图片.png",
  9696. url: p,
  9697. };
  9698. this.imgChange1(null, null, 1, null);
  9699. this.$forceUpdate();
  9700. }, 0);
  9701. this.isSysPic2 = true;
  9702. this.isSysPic = false;
  9703. this.sysPicVisible2 = false;
  9704. this.$forceUpdate();
  9705. },
  9706. beforeUpload(data) {
  9707. this.$refs.upload1.uploadFiles;
  9708. this.uploadLoading1 = true;
  9709. var file = data.file;
  9710. var credentials = {
  9711. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9712. secretAccessKey: "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",
  9713. }; //秘钥形式的登录上传
  9714. window.AWS.config.update(credentials);
  9715. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9716. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9717. var _this = this;
  9718. if (file) {
  9719. var params = {
  9720. Key:
  9721. file.name.split(".")[0] +
  9722. new Date().getTime() +
  9723. "." +
  9724. file.name.split(".")[file.name.split(".").length - 1],
  9725. ContentType: file.type,
  9726. Body: file,
  9727. "Access-Control-Allow-Credentials": "*",
  9728. ACL: "public-read",
  9729. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9730. var options = {
  9731. partSize: 2048 * 1024 * 1024,
  9732. queueSize: 2,
  9733. leavePartsOnError: true,
  9734. };
  9735. bucket
  9736. .upload(params, options)
  9737. .on("httpUploadProgress", function (evt) {
  9738. //这里可以写进度条
  9739. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9740. })
  9741. .send(function (err, data) {
  9742. _this.uploadLoading1 = false;
  9743. if (err) {
  9744. // var a = _this.$refs.upload1.uploadFiles;
  9745. // a.splice(a.length - 1, a.length);
  9746. _this.$message.error("上传失败");
  9747. } else {
  9748. //上传成功处理
  9749. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  9750. name: file.name,
  9751. url: data.Location,
  9752. uid: file.uid,
  9753. });
  9754. _this.imgChange();
  9755. console.log(data.Location);
  9756. }
  9757. });
  9758. }
  9759. },
  9760. onExceed() {
  9761. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  9762. },
  9763. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  9764. let file = "";
  9765. let cfindex2 = 0;
  9766. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9767. // var file = event.target.files[0];
  9768. file = event.target.files[cfindex];
  9769. let fileName = file.name
  9770. let fileUid = file.uid
  9771. // const loading = this.openLoading();
  9772. // var file = event.target.files[0];
  9773. var credentials = {
  9774. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9775. secretAccessKey: "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",
  9776. }; //秘钥形式的登录上传
  9777. window.AWS.config.update(credentials);
  9778. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9779. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9780. var _this = this;
  9781. if (type == 3) {
  9782. var b = [
  9783. "DOC",
  9784. "DOCX",
  9785. "DOCM",
  9786. "DOTM",
  9787. "DOTX",
  9788. "PPTX",
  9789. "PPSX",
  9790. "PPT",
  9791. "PPS",
  9792. "PPTM",
  9793. "POTM",
  9794. "PPAM",
  9795. "POTX",
  9796. "PPSM",
  9797. ];
  9798. if (
  9799. b.indexOf(
  9800. file.name
  9801. .split(".")
  9802. [file.name.split(".").length - 1].toLocaleUpperCase()
  9803. ) != -1
  9804. ) {
  9805. if (file.size / 1024 / 1024 > 80) {
  9806. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9807. this.inputShow = true;
  9808. // var a = _this.$refs.upload1.uploadFiles;
  9809. // a.splice(a.length - 1, a.length);
  9810. // loading.close();
  9811. return;
  9812. }
  9813. } else if (
  9814. file.name
  9815. .split(".")
  9816. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9817. ) {
  9818. if (file.size / 1024 / 1024 > 80) {
  9819. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9820. this.inputShow = true;
  9821. // var a = _this.$refs.upload1.uploadFiles;
  9822. // a.splice(a.length - 1, a.length);
  9823. // loading.close();
  9824. return;
  9825. }
  9826. }
  9827. }
  9828. this.inputShow = false;
  9829. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9830. // itemTaskIndex
  9831. // ].progress = 0;
  9832. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9833. itemTaskIndex
  9834. ].proVisible = true;
  9835. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9836. itemTaskIndex
  9837. ].isFinishSize = 0;
  9838. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9839. itemTaskIndex
  9840. ].isAllSize = event.target.files.length;
  9841. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9842. // itemTaskIndex
  9843. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9844. _this.$forceUpdate();
  9845. if (file) {
  9846. var params = {
  9847. Key:
  9848. file.name.split(".")[0] +
  9849. new Date().getTime() +
  9850. "." +
  9851. file.name.split(".")[file.name.split(".").length - 1],
  9852. ContentType: file.type,
  9853. Body: file,
  9854. "Access-Control-Allow-Credentials": "*",
  9855. ACL: "public-read",
  9856. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9857. var options = {
  9858. partSize: 2048 * 1024 * 1024,
  9859. queueSize: 2,
  9860. leavePartsOnError: true,
  9861. };
  9862. bucket
  9863. .upload(params, options)
  9864. .on("httpUploadProgress", function (evt) {
  9865. //这里可以写进度条
  9866. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9867. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9868. // itemTaskIndex
  9869. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  9870. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9871. // itemTaskIndex
  9872. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  9873. // _this.$forceUpdate();
  9874. })
  9875. .send(function (err, data) {
  9876. cfindex2++
  9877. // loading.close();
  9878. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9879. // itemTaskIndex
  9880. // ].progress = 100;
  9881. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9882. itemTaskIndex
  9883. ].isFinishSize = cfindex2
  9884. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9885. // itemTaskIndex
  9886. // ].isAllSize;
  9887. _this.$forceUpdate();
  9888. setTimeout(() => {
  9889. if (
  9890. cfindex2 == event.target.files.length ||
  9891. cfindex2 > event.target.files.length
  9892. ) {
  9893. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9894. itemTaskIndex
  9895. ].proVisible = false;
  9896. }
  9897. _this.$forceUpdate();
  9898. }, 1000);
  9899. _this.inputShow = true;
  9900. if (err) {
  9901. // var a = _this.$refs.upload1.uploadFiles;
  9902. // a.splice(a.length - 1, a.length);
  9903. _this.$message.error("上传失败");
  9904. } else {
  9905. if (type == 13) {
  9906. let _type = 2;
  9907. var imgA = [
  9908. "png",
  9909. "jpg",
  9910. "jpeg",
  9911. "bmp",
  9912. "gif",
  9913. "webp",
  9914. "psd",
  9915. "svg",
  9916. "tiff",
  9917. ];
  9918. var fileA = [
  9919. "PDF",
  9920. "DOC",
  9921. "DOCX",
  9922. "DOCM",
  9923. "DOTM",
  9924. "DOTX",
  9925. "PPTX",
  9926. "PPSX",
  9927. "PPT",
  9928. "PPS",
  9929. "PPTM",
  9930. "POTM",
  9931. "PPAM",
  9932. "POTX",
  9933. "PPSM",
  9934. "XLSX",
  9935. "XLS",
  9936. ];
  9937. var videoA = [
  9938. "AVI",
  9939. "NAVI",
  9940. "MPEG",
  9941. "ASF",
  9942. "MOV",
  9943. "WMV",
  9944. "3GP",
  9945. "RM",
  9946. "RMVB",
  9947. "FLV",
  9948. "F4V",
  9949. "H.264",
  9950. "H.265",
  9951. "REAL VIDEO",
  9952. "MKV",
  9953. "WebM",
  9954. "HDDVD",
  9955. "MP4",
  9956. "MPG",
  9957. "M4V",
  9958. "MGV",
  9959. "OGV",
  9960. "QTM",
  9961. "STR",
  9962. "AMC",
  9963. "DVX",
  9964. "EVO",
  9965. "DAT",
  9966. "OGG",
  9967. "OGM",
  9968. ];
  9969. if (
  9970. fileA.indexOf(
  9971. data.Location.split(".")[
  9972. data.Location.split(".").length - 1
  9973. ].toLocaleUpperCase()
  9974. ) != -1
  9975. ) {
  9976. _type = 3;
  9977. } else if (
  9978. videoA.indexOf(
  9979. data.Location.split(".")[
  9980. data.Location.split(".").length - 1
  9981. ].toLocaleUpperCase()
  9982. ) != -1
  9983. ) {
  9984. _type = 2;
  9985. } else if (
  9986. imgA.indexOf(
  9987. data.Location.split(".")[
  9988. data.Location.split(".").length - 1
  9989. ].toLocaleLowerCase()
  9990. ) != -1
  9991. ) {
  9992. _type = 13;
  9993. } else {
  9994. _type = 12;
  9995. }
  9996. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9997. itemTaskIndex
  9998. ].chapterData.unshift({
  9999. name: fileName,
  10000. url: data.Location,
  10001. uid: fileUid,
  10002. type: _type,
  10003. });
  10004. _this.imgChange1(null, null, _type, itemTaskIndex);
  10005. } else if (type == 2 || type == 3 || type == 12) {
  10006. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10007. itemTaskIndex
  10008. ].chapterData.unshift({
  10009. name: fileName,
  10010. url: data.Location,
  10011. uid: fileUid,
  10012. type: type,
  10013. });
  10014. _this.imgChange1(null, null, type, itemTaskIndex);
  10015. } else if (type == 4) {
  10016. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10017. itemTaskIndex
  10018. ].fileList1.push({
  10019. name: fileName,
  10020. url: data.Location,
  10021. uid: fileUid,
  10022. });
  10023. _this.imgChange1(null, null, type, itemTaskIndex);
  10024. } else if (type == 5) {
  10025. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10026. itemTaskIndex
  10027. ].homeworkList.push({
  10028. name: fileName,
  10029. url: data.Location,
  10030. uid: fileUid,
  10031. });
  10032. _this.imgChange1(null, null, type, itemTaskIndex);
  10033. }
  10034. console.log(data.Location);
  10035. }
  10036. });
  10037. }
  10038. }
  10039. },
  10040. beforeUploadInfo2(event, type, tindex) {
  10041. // const loading = this.openLoading();
  10042. let file = "";
  10043. let cfindex2 = 0;
  10044. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10045. // var file = event.target.files[0];
  10046. file = event.target.files[cfindex];
  10047. let fileName = file.name
  10048. let fileUid = file.uid
  10049. var credentials = {
  10050. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10051. secretAccessKey: "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",
  10052. }; //秘钥形式的登录上传
  10053. window.AWS.config.update(credentials);
  10054. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10055. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10056. var _this = this;
  10057. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  10058. if (
  10059. ['DOC'].indexOf(
  10060. file.name
  10061. .split(".")
  10062. [file.name.split(".").length - 1].toLocaleUpperCase()
  10063. ) !== -1
  10064. ) {
  10065. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  10066. this.inputShow = true;
  10067. return;
  10068. }
  10069. if (
  10070. xianObj.indexOf(
  10071. file.name
  10072. .split(".")
  10073. [file.name.split(".").length - 1].toLocaleUpperCase()
  10074. ) == -1
  10075. ) {
  10076. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  10077. this.inputShow = true;
  10078. // var a = _this.$refs.upload1.uploadFiles;
  10079. // a.splice(a.length - 1, a.length);
  10080. // loading.close();
  10081. return;
  10082. }
  10083. if (type == 3) {
  10084. var b = [
  10085. "DOC",
  10086. "DOCX",
  10087. "DOCM",
  10088. "DOTM",
  10089. "DOTX",
  10090. "PPTX",
  10091. "PPSX",
  10092. "PPT",
  10093. "PPS",
  10094. "PPTM",
  10095. "POTM",
  10096. "PPAM",
  10097. "POTX",
  10098. "PPSM",
  10099. ];
  10100. if (
  10101. b.indexOf(
  10102. file.name
  10103. .split(".")
  10104. [file.name.split(".").length - 1].toLocaleUpperCase()
  10105. ) != -1
  10106. ) {
  10107. if (file.size / 1024 / 1024 > 80) {
  10108. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10109. this.inputShow = true;
  10110. // var a = _this.$refs.upload1.uploadFiles;
  10111. // a.splice(a.length - 1, a.length);
  10112. // loading.close();
  10113. return;
  10114. }
  10115. } else if (
  10116. file.name
  10117. .split(".")
  10118. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10119. ) {
  10120. if (file.size / 1024 / 1024 > 80) {
  10121. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10122. this.inputShow = true;
  10123. // var a = _this.$refs.upload1.uploadFiles;
  10124. // a.splice(a.length - 1, a.length);
  10125. // loading.close();
  10126. return;
  10127. }
  10128. }
  10129. }
  10130. this.inputShow = false;
  10131. if(type == 14){
  10132. // _this.teacherinfoprogress = 0;
  10133. _this.teacherinfoproVisible = true;
  10134. _this.teacherinfoisFinishSize = 0;
  10135. _this.teacherinfoisAllSize = event.target.files.length;
  10136. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10137. }else if(type == 16){
  10138. _this.mubiaoinfoprogress = 0;
  10139. _this.mubiaoinfoproVisible = true;
  10140. _this.mubiaoinfoisFinishSize = 0;
  10141. _this.mubiaoinfoisAllSize = event.target.files.length;
  10142. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10143. }else if(type == 17){
  10144. _this.xuanzeinfoprogress = 0;
  10145. _this.xuanzeinfoproVisible = true;
  10146. _this.xuanzeinfoisFinishSize = 0;
  10147. _this.xuanzeinfoisAllSize = event.target.files.length;
  10148. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10149. }else if(type == 18){
  10150. _this.pingjiainfoprogress[tindex] = 0;
  10151. _this.pingjiainfoproVisible[tindex] = true;
  10152. _this.pingjiainfoisFinishSize[tindex] = 0;
  10153. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  10154. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  10155. }else if(type == 19){
  10156. _this.knowinfoprogress = 0;
  10157. _this.knowinfoproVisible = true;
  10158. _this.knowinfoisFinishSize = 0;
  10159. _this.knowinfoisAllSize = event.target.files.length;
  10160. }else{
  10161. _this.infoprogress = 0;
  10162. _this.infoproVisible = true;
  10163. _this.infoisFinishSize = 0;
  10164. _this.infoisAllSize = event.target.files.length;
  10165. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10166. }
  10167. _this.$forceUpdate();
  10168. if (file) {
  10169. var params = {
  10170. Key:
  10171. file.name.split(".")[0] +
  10172. new Date().getTime() +
  10173. "." +
  10174. file.name.split(".")[file.name.split(".").length - 1],
  10175. ContentType: file.type,
  10176. Body: file,
  10177. "Access-Control-Allow-Credentials": "*",
  10178. ACL: "public-read",
  10179. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10180. var options = {
  10181. partSize: 2048 * 1024 * 1024,
  10182. queueSize: 2,
  10183. leavePartsOnError: true,
  10184. };
  10185. bucket
  10186. .upload(params, options)
  10187. .on("httpUploadProgress", function (evt) {
  10188. //这里可以写进度条
  10189. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10190. // if(type == 14){
  10191. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10192. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10193. // }else if(type == 16){
  10194. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10195. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10196. // }else if(type == 17){
  10197. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10198. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10199. // }else if(type == 18){
  10200. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  10201. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  10202. // }else {
  10203. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  10204. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10205. // }
  10206. _this.$forceUpdate();
  10207. })
  10208. .send(async function (err, data) {
  10209. // loading.close();
  10210. // if(type == 14){
  10211. // _this.teacherinfoprogress = 100;
  10212. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  10213. // }else if(type == 16){
  10214. // _this.mubiaoinfoprogress = 100;
  10215. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  10216. // }else if(type == 17){
  10217. // _this.xuanzeinfoprogress = 100;
  10218. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  10219. // }else if(type == 18){
  10220. // _this.pingjiainfoprogress[tindex] = 100;
  10221. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  10222. // }else {
  10223. // _this.infoprogress = 100;
  10224. // _this.infoisFinishSize = _this.infoisAllSize;
  10225. // }
  10226. _this.$forceUpdate();
  10227. _this.inputShow = true;
  10228. if (err) {
  10229. cfindex2++;
  10230. if(type == 14){
  10231. _this.teacherinfoisFinishSize = cfindex2;
  10232. }else if(type == 16){
  10233. _this.mubiaoinfoisFinishSize = cfindex2;
  10234. }else if(type == 17){
  10235. _this.xuanzeinfoisFinishSize = cfindex2;
  10236. }else if(type == 18){
  10237. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10238. }else if(type == 19){
  10239. _this.knowinfoisFinishSize = cfindex2;
  10240. }else {
  10241. _this.infoisFinishSize = cfindex2;
  10242. }
  10243. setTimeout(() => {
  10244. if (
  10245. cfindex2 == event.target.files.length ||
  10246. cfindex2 > event.target.files.length
  10247. ) {
  10248. if(type == 14){
  10249. _this.teacherinfoproVisible = false;
  10250. }else if(type == 16){
  10251. _this.mubiaoinfoproVisible = false;
  10252. }else if(type == 17){
  10253. _this.xuanzeinfoproVisible = false;
  10254. }else if(type == 18){
  10255. _this.pingjiainfoproVisible[tindex] = false;
  10256. }else if(type == 19){
  10257. _this.knowinfoproVisible = false;
  10258. }else{
  10259. _this.infoproVisible = false;
  10260. }
  10261. }
  10262. _this.$forceUpdate();
  10263. }, 1000);
  10264. // var a = _this.$refs.upload1.uploadFiles;
  10265. // a.splice(a.length - 1, a.length);
  10266. _this.$message.error("上传失败");
  10267. } else {
  10268. let fileid = await _this.createFileid(data.Location)
  10269. if(fileid){
  10270. cfindex2++;
  10271. if(type == 14){
  10272. _this.teacherinfoisFinishSize = cfindex2;
  10273. }else if(type == 16){
  10274. _this.mubiaoinfoisFinishSize = cfindex2;
  10275. }else if(type == 17){
  10276. _this.xuanzeinfoisFinishSize = cfindex2;
  10277. }else if(type == 18){
  10278. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10279. }else if(type == 19){
  10280. _this.knowinfoisFinishSize = cfindex2;
  10281. }else {
  10282. _this.infoisFinishSize = cfindex2;
  10283. }
  10284. if (
  10285. cfindex2 == event.target.files.length ||
  10286. cfindex2 > event.target.files.length
  10287. ) {
  10288. if(type == 14){
  10289. _this.teacherinfoproVisible = false;
  10290. }else if(type == 16){
  10291. _this.mubiaoinfoproVisible = false;
  10292. }else if(type == 17){
  10293. _this.xuanzeinfoproVisible = false;
  10294. }else if(type == 18){
  10295. _this.pingjiainfoproVisible[tindex] = false;
  10296. }else if(type == 19){
  10297. _this.knowinfoproVisible = false;
  10298. }else{
  10299. _this.infoproVisible = false;
  10300. }
  10301. }
  10302. _this.$forceUpdate();
  10303. }
  10304. if(fileid == 1){
  10305. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  10306. return;
  10307. }
  10308. var imgA = [
  10309. "png",
  10310. "jpg",
  10311. "jpeg",
  10312. "bmp",
  10313. "gif",
  10314. "webp",
  10315. "psd",
  10316. "svg",
  10317. "tiff",
  10318. ];
  10319. var fileA = [
  10320. "PDF",
  10321. "DOC",
  10322. "DOCX",
  10323. "DOCM",
  10324. "DOTM",
  10325. "DOTX",
  10326. "PPTX",
  10327. "PPSX",
  10328. "PPT",
  10329. "PPS",
  10330. "PPTM",
  10331. "POTM",
  10332. "PPAM",
  10333. "POTX",
  10334. "PPSM",
  10335. "XLSX",
  10336. "XLS",
  10337. ];
  10338. var videoA = [
  10339. "AVI",
  10340. "NAVI",
  10341. "MPEG",
  10342. "ASF",
  10343. "MOV",
  10344. "WMV",
  10345. "3GP",
  10346. "RM",
  10347. "RMVB",
  10348. "FLV",
  10349. "F4V",
  10350. "H.264",
  10351. "H.265",
  10352. "REAL VIDEO",
  10353. "MKV",
  10354. "WebM",
  10355. "HDDVD",
  10356. "MP4",
  10357. "MPG",
  10358. "M4V",
  10359. "MGV",
  10360. "OGV",
  10361. "QTM",
  10362. "STR",
  10363. "AMC",
  10364. "DVX",
  10365. "EVO",
  10366. "DAT",
  10367. "OGG",
  10368. "OGM",
  10369. ];
  10370. let _type = 2;
  10371. if (
  10372. fileA.indexOf(
  10373. data.Location.split(".")[
  10374. data.Location.split(".").length - 1
  10375. ].toLocaleUpperCase()
  10376. ) != -1
  10377. ) {
  10378. _type = 3;
  10379. } else if (
  10380. videoA.indexOf(
  10381. data.Location.split(".")[
  10382. data.Location.split(".").length - 1
  10383. ].toLocaleUpperCase()
  10384. ) != -1
  10385. ) {
  10386. _type = 2;
  10387. } else if (
  10388. imgA.indexOf(
  10389. data.Location.split(".")[
  10390. data.Location.split(".").length - 1
  10391. ].toLocaleLowerCase()
  10392. ) != -1
  10393. ) {
  10394. _type = 13;
  10395. } else {
  10396. _type = 12;
  10397. }
  10398. if (type == 13) {
  10399. _this.infoData.push({
  10400. name: fileName,
  10401. url: data.Location,
  10402. uid: fileUid,
  10403. type: _type,
  10404. fileid: fileid == 1 ? '' : fileid,
  10405. });
  10406. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10407. name: fileName,
  10408. url: data.Location,
  10409. uid: fileUid,
  10410. type: _type,
  10411. fileid: fileid == 1 ? '' : fileid,
  10412. })
  10413. }else if (type == 14) {
  10414. _this.teacherInfoData.push({
  10415. name: fileName,
  10416. url: data.Location,
  10417. uid: fileUid,
  10418. type: _type,
  10419. fileid: fileid == 1 ? '' : fileid,
  10420. });
  10421. _this.infoData2.push({
  10422. name: fileName,
  10423. url: data.Location,
  10424. uid: fileUid,
  10425. type: _type,
  10426. fileid: fileid == 1 ? '' : fileid,
  10427. });
  10428. _this.infoData.push({
  10429. name: fileName,
  10430. url: data.Location,
  10431. uid: fileUid,
  10432. type: _type,
  10433. fileid: fileid == 1 ? '' : fileid,
  10434. });
  10435. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10436. name: fileName,
  10437. url: data.Location,
  10438. uid: fileUid,
  10439. type: _type,
  10440. fileid: fileid == 1 ? '' : fileid,
  10441. })
  10442. }else if (type == 15) {
  10443. _this.infoData2.push({
  10444. name: fileName,
  10445. url: data.Location,
  10446. uid: fileUid,
  10447. type: _type,
  10448. fileid: fileid == 1 ? '' : fileid,
  10449. });
  10450. _this.infoData.push({
  10451. name: fileName,
  10452. url: data.Location,
  10453. uid: fileUid,
  10454. type: _type,
  10455. fileid: fileid == 1 ? '' : fileid,
  10456. });
  10457. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10458. name: fileName,
  10459. url: data.Location,
  10460. uid: fileUid,
  10461. type: _type,
  10462. fileid: fileid == 1 ? '' : fileid,
  10463. })
  10464. }else if (type == 16) {
  10465. _this.mubiaoInfoData.push({
  10466. name: fileName,
  10467. url: data.Location,
  10468. uid: fileUid,
  10469. type: _type,
  10470. fileid: fileid == 1 ? '' : fileid,
  10471. });
  10472. }else if (type == 17) {
  10473. _this.xuanzeInfoData.push({
  10474. name: fileName,
  10475. url: data.Location,
  10476. uid: fileUid,
  10477. type: _type,
  10478. fileid: fileid == 1 ? '' : fileid,
  10479. });
  10480. }else if (type == 18) {
  10481. if(!_this.pingjiaInfoData[tindex]){
  10482. _this.pingjiaInfoData[tindex] = []
  10483. }
  10484. _this.pingjiaInfoData[tindex].push({
  10485. name: fileName,
  10486. url: data.Location,
  10487. uid: fileUid,
  10488. type: _type,
  10489. fileid: fileid == 1 ? '' : fileid,
  10490. });
  10491. }else if (type == 19) {
  10492. _this.knowInfoData.push({
  10493. name: fileName,
  10494. url: data.Location,
  10495. uid: fileUid,
  10496. type: _type,
  10497. fileid: fileid == 1 ? '' : fileid,
  10498. });
  10499. if(fileid != 1){
  10500. _this.knowFileids.push(fileid)
  10501. }
  10502. }
  10503. console.log(data.Location);
  10504. console.log(fileName,'----------',fileid);
  10505. }
  10506. });
  10507. }
  10508. }
  10509. },
  10510. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  10511. // const loading = this.openLoading();
  10512. var file = event.target.files[0];
  10513. var credentials = {
  10514. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10515. secretAccessKey: "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",
  10516. }; //秘钥形式的登录上传
  10517. window.AWS.config.update(credentials);
  10518. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10519. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10520. var _this = this;
  10521. if (type == 3) {
  10522. var b = [
  10523. "DOC",
  10524. "DOCX",
  10525. "DOCM",
  10526. "DOTM",
  10527. "DOTX",
  10528. "PPTX",
  10529. "PPSX",
  10530. "PPT",
  10531. "PPS",
  10532. "PPTM",
  10533. "POTM",
  10534. "PPAM",
  10535. "POTX",
  10536. "PPSM",
  10537. ];
  10538. if (
  10539. b.indexOf(
  10540. file.name
  10541. .split(".")
  10542. [file.name.split(".").length - 1].toLocaleUpperCase()
  10543. ) != -1
  10544. ) {
  10545. if (file.size / 1024 / 1024 > 80) {
  10546. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10547. this.inputShow = true;
  10548. // var a = _this.$refs.upload1.uploadFiles;
  10549. // a.splice(a.length - 1, a.length);
  10550. // loading.close();
  10551. return;
  10552. }
  10553. } else if (
  10554. file.name
  10555. .split(".")
  10556. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10557. ) {
  10558. if (file.size / 1024 / 1024 > 80) {
  10559. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10560. this.inputShow = true;
  10561. // var a = _this.$refs.upload1.uploadFiles;
  10562. // a.splice(a.length - 1, a.length);
  10563. // loading.close();
  10564. return;
  10565. }
  10566. }
  10567. }
  10568. this.inputShow = false;
  10569. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10570. itemTaskIndex
  10571. ].progress = 0;
  10572. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10573. itemTaskIndex
  10574. ].proVisible = true;
  10575. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10576. itemTaskIndex
  10577. ].isFinishSize = 0;
  10578. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10579. itemTaskIndex
  10580. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10581. _this.$forceUpdate();
  10582. if (file) {
  10583. var params = {
  10584. Key:
  10585. file.name.split(".")[0] +
  10586. new Date().getTime() +
  10587. "." +
  10588. file.name.split(".")[file.name.split(".").length - 1],
  10589. ContentType: file.type,
  10590. Body: file,
  10591. "Access-Control-Allow-Credentials": "*",
  10592. ACL: "public-read",
  10593. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10594. var options = {
  10595. partSize: 2048 * 1024 * 1024,
  10596. queueSize: 2,
  10597. leavePartsOnError: true,
  10598. };
  10599. bucket
  10600. .upload(params, options)
  10601. .on("httpUploadProgress", function (evt) {
  10602. //这里可以写进度条
  10603. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10604. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10605. itemTaskIndex
  10606. ].progress = parseInt((evt.loaded / evt.total) * 100);
  10607. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10608. itemTaskIndex
  10609. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10610. _this.$forceUpdate();
  10611. })
  10612. .send(function (err, data) {
  10613. // loading.close();
  10614. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10615. itemTaskIndex
  10616. ].progress = 100;
  10617. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10618. itemTaskIndex
  10619. ].isFinishSize =
  10620. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10621. itemTaskIndex
  10622. ].isAllSize;
  10623. _this.$forceUpdate();
  10624. setTimeout(() => {
  10625. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10626. itemTaskIndex
  10627. ].proVisible = false;
  10628. _this.$forceUpdate();
  10629. }, 1000);
  10630. _this.inputShow = true;
  10631. if (err) {
  10632. // var a = _this.$refs.upload1.uploadFiles;
  10633. // a.splice(a.length - 1, a.length);
  10634. _this.$message.error("上传失败");
  10635. } else {
  10636. if (type == 2 || type == 3) {
  10637. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10638. itemTaskIndex
  10639. ].chapterData.unshift({
  10640. name: file.name,
  10641. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10642. // itemTaskIndex
  10643. // ].chapterData.length+1),
  10644. url: data.Location,
  10645. uid: file.uid,
  10646. type: type,
  10647. text: string,
  10648. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10649. // itemTaskIndex
  10650. // ].chapterData.length + 1),
  10651. });
  10652. _this.imgChange1(null, null, type, itemTaskIndex);
  10653. } else if (type == 4) {
  10654. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10655. itemTaskIndex
  10656. ].fileList1.push({
  10657. name: file.name,
  10658. url: data.Location,
  10659. uid: file.uid,
  10660. });
  10661. _this.imgChange1(null, null, type, itemTaskIndex);
  10662. } else if (type == 5) {
  10663. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10664. itemTaskIndex
  10665. ].homeworkList.push({
  10666. name: file.name,
  10667. url: data.Location,
  10668. uid: file.uid,
  10669. });
  10670. _this.imgChange1(null, null, type, itemTaskIndex);
  10671. }
  10672. console.log(data.Location);
  10673. }
  10674. });
  10675. }
  10676. },
  10677. addunit() {
  10678. this.unitJson.push({
  10679. dyName: "", //单元标题
  10680. isUpdate: 1,
  10681. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  10682. chapterInfo: [
  10683. {
  10684. isread: false,
  10685. chapterid: this.guid(),
  10686. title: "",
  10687. courseName: "",
  10688. taskJson: [
  10689. {
  10690. task: "",
  10691. taskDetail: "",
  10692. chapterData: [],
  10693. toolText: "",
  10694. toolChoose: [
  10695. {
  10696. tool: [],
  10697. toolDetail: "",
  10698. toolType: 0,
  10699. askCount: 1,
  10700. askTitle: "",
  10701. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10702. },
  10703. ],
  10704. isShowTools: false,
  10705. askCount: 1,
  10706. isFold: 1,
  10707. askTitle: "",
  10708. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10709. checkJson: [{ checkCount: [], checkPerent: [] }],
  10710. homeworkList: [],
  10711. },
  10712. ],
  10713. itemCount: 1,
  10714. fileList1: [],
  10715. video: [],
  10716. testData: [],
  10717. pData: [],
  10718. templateArray: [],
  10719. },
  10720. ],
  10721. });
  10722. this.addindex = this.unitJson.length - 1;
  10723. setTimeout(() => {
  10724. this.unitIndex = this.unitJson.length - 1;
  10725. setTimeout(() => {
  10726. console.log(this.$refs.dyInput);
  10727. this.$refs.dyInput[0].focus();
  10728. }, 100);
  10729. this.unitSet(this.unitIndex);
  10730. }, 0);
  10731. },
  10732. addToolFun(itemTaskIndex) {
  10733. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10734. itemTaskIndex
  10735. ].toolChoose.push({
  10736. tool: [],
  10737. toolDetail: "",
  10738. toolType: 0,
  10739. askCount: 1,
  10740. askTitle: "",
  10741. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10742. });
  10743. },
  10744. addTaskBorder() {
  10745. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  10746. task: "",
  10747. taskDetail: "",
  10748. chapterData: [],
  10749. toolText: "",
  10750. toolChoose: [
  10751. {
  10752. tool: [],
  10753. toolDetail: "",
  10754. toolType: 0,
  10755. askCount: 1,
  10756. askTitle: "",
  10757. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10758. },
  10759. ],
  10760. isShowTools: false,
  10761. askCount: 1,
  10762. isFold: 1, //任务收起状态
  10763. askTitle: "",
  10764. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10765. checkJson: [{ checkCount: [], checkPerent: [] }],
  10766. homeworkList: [],
  10767. });
  10768. setTimeout(() => {
  10769. this.checkEva(this.checkId);
  10770. setTimeout(() => {
  10771. this.checkEva(this.checkId);
  10772. }, 100);
  10773. }, 100);
  10774. },
  10775. addTaskBorder2(type, index) {
  10776. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  10777. this.$message({
  10778. message: "有大纲在生成请生成完之后才能使用此功能",
  10779. type: "warning"
  10780. });
  10781. return;
  10782. }
  10783. if(type == 1){
  10784. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  10785. task: "",
  10786. isTask2: true,
  10787. isTask3: true,
  10788. taskDetail: "",
  10789. chapterData: [],
  10790. toolText: "",
  10791. toolChoose: [
  10792. {
  10793. tool: [],
  10794. toolDetail: "",
  10795. toolType: 0,
  10796. askCount: 1,
  10797. askTitle: "",
  10798. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10799. },
  10800. ],
  10801. isShowTools: false,
  10802. askCount: 1,
  10803. isFold: 0, //任务收起状态
  10804. askTitle: "",
  10805. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10806. checkJson: [{ checkCount: [], checkPerent: [] }],
  10807. homeworkList: [],
  10808. })
  10809. }else if(type == 2){
  10810. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  10811. task: "",
  10812. isTask2: true,
  10813. isTask3: true,
  10814. taskDetail: "",
  10815. chapterData: [],
  10816. toolText: "",
  10817. toolChoose: [
  10818. {
  10819. tool: [],
  10820. toolDetail: "",
  10821. toolType: 0,
  10822. askCount: 1,
  10823. askTitle: "",
  10824. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10825. },
  10826. ],
  10827. isShowTools: false,
  10828. askCount: 1,
  10829. isFold: 0, //任务收起状态
  10830. askTitle: "",
  10831. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10832. checkJson: [{ checkCount: [], checkPerent: [] }],
  10833. homeworkList: [],
  10834. })
  10835. }
  10836. setTimeout(() => {
  10837. this.checkEva(this.checkId);
  10838. setTimeout(() => {
  10839. this.checkEva(this.checkId);
  10840. }, 100);
  10841. }, 100);
  10842. },
  10843. add(e, i) {
  10844. var el = e.currentTarget;
  10845. el.getElementsByTagName("input")[0].click();
  10846. },
  10847. fold(i, e) {
  10848. if (
  10849. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  10850. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  10851. ) {
  10852. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  10853. } else {
  10854. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  10855. }
  10856. },
  10857. fold2(i) {
  10858. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  10859. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10860. i
  10861. ].isFold2 = false;
  10862. } else {
  10863. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  10864. }
  10865. this.$forceUpdate();
  10866. },
  10867. foldEva(i) {
  10868. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  10869. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10870. i
  10871. ].isEvaFold = false;
  10872. } else {
  10873. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10874. i
  10875. ].isEvaFold = true;
  10876. setTimeout(() => {
  10877. this.checkEva(this.checkId);
  10878. setTimeout(() => {
  10879. this.checkEva(this.checkId);
  10880. }, 500);
  10881. }, 0);
  10882. }
  10883. this.$forceUpdate();
  10884. },
  10885. foldC(i) {
  10886. if (
  10887. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  10888. ) {
  10889. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10890. i
  10891. ].isFoldchapter = false;
  10892. } else {
  10893. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10894. i
  10895. ].isFoldchapter = true;
  10896. }
  10897. this.$forceUpdate();
  10898. },
  10899. fold3(i, ti) {
  10900. if (
  10901. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  10902. .isFold3
  10903. ) {
  10904. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10905. ti
  10906. ].isFold3 = false;
  10907. } else {
  10908. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  10909. ti
  10910. ].isFold3 = true;
  10911. }
  10912. this.$forceUpdate();
  10913. },
  10914. deleteHomeworkBox(unitIndex, index, i) {
  10915. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  10916. this.taskCount
  10917. ].homeworkList.splice(i, 1);
  10918. },
  10919. getStudent() {
  10920. let params = {
  10921. oid: this.oid,
  10922. cu: "",
  10923. cn: this.searchPeople,
  10924. };
  10925. this.ajax
  10926. .get(this.$store.state.api + "selectStudentAdd", params)
  10927. .then((res) => {
  10928. this.studentJuri = res.data[0];
  10929. })
  10930. .catch((err) => {
  10931. this.isLoading = false;
  10932. console.error(err);
  10933. });
  10934. },
  10935. // 添加协同成员其他选项按钮
  10936. getTeacherCopy(){
  10937. this.CollLoading=true
  10938. this.collid = ''
  10939. this.collid = '1xpz'
  10940. let params = {
  10941. oid:
  10942. this.org && this.org != "undefined" && this.org != "null"
  10943. ? this.org
  10944. : this.oid,
  10945. cu: "",
  10946. cn: this.searchTN,
  10947. coll: ''
  10948. };
  10949. this.ajax
  10950. .get(
  10951. this.$store.state.api +
  10952. (this.org && this.org != "undefined" && this.org != "null"
  10953. ? "selectCollaborativeMembersOrg"
  10954. : "selectCollaborativeMembers"),
  10955. params
  10956. )
  10957. .then((res) => {
  10958. let teacherJuri = res.data[0];
  10959. this.CollaborativeTeaList = res.data[1];
  10960. for (var i = 0; i < teacherJuri.length; i++) {
  10961. if (teacherJuri[i].userid == this.userid) {
  10962. teacherJuri.splice(i, 1);
  10963. break;
  10964. }
  10965. }
  10966. this.teacherJuri = teacherJuri.filter((i,index)=>{
  10967. return (i.cclassid == '' || i.cclassid == null)
  10968. })
  10969. console.log(' this.teacherJuri', this.teacherJuri);
  10970. let _check = [];
  10971. let _check2 = [];
  10972. for (var i = 0; i < this.teacherJuri.length; i++) {
  10973. var gid = this.teacherJuri[i].userid;
  10974. _check.push(gid);
  10975. }
  10976. for (var i = 0; i < this.checkboxList3.length; i++) {
  10977. var _id = this.checkboxList3[i];
  10978. if (_check.indexOf(_id) !== -1) {
  10979. _check2.push(_id);
  10980. }
  10981. }
  10982. if (_check2.length==0 && _check.length==0) {
  10983. }else{
  10984. this.checkAll2 = _check2.length === _check.length;
  10985. }
  10986. this.CollLoading=false
  10987. })
  10988. .catch((err) => {
  10989. console.error(err);
  10990. this.CollLoading=false
  10991. });
  10992. },
  10993. getTeacher(val) {
  10994. this.CollLoading=true
  10995. this.collid = ''
  10996. this.collid = !val ? '' : val
  10997. let params = {
  10998. oid:
  10999. this.org && this.org != "undefined" && this.org != "null"
  11000. ? this.org
  11001. : this.oid,
  11002. cu: "",
  11003. cn: this.searchTN,
  11004. coll: this.collid
  11005. };
  11006. this.ajax
  11007. .get(
  11008. this.$store.state.api +
  11009. (this.org && this.org != "undefined" && this.org != "null"
  11010. ? "selectCollaborativeMembersOrg"
  11011. : "selectCollaborativeMembers"),
  11012. params
  11013. )
  11014. .then((res) => {
  11015. let teacherJuri = res.data[0];
  11016. this.CollaborativeTeaList = res.data[1];
  11017. for (var i = 0; i < teacherJuri.length; i++) {
  11018. if (teacherJuri[i].userid == this.userid) {
  11019. teacherJuri.splice(i, 1);
  11020. break;
  11021. }
  11022. }
  11023. this.teacherJuri = teacherJuri;
  11024. let _check = [];
  11025. let _check2 = [];
  11026. for (var i = 0; i < this.teacherJuri.length; i++) {
  11027. var gid = this.teacherJuri[i].userid;
  11028. _check.push(gid);
  11029. }
  11030. for (var i = 0; i < this.checkboxList3.length; i++) {
  11031. var _id = this.checkboxList3[i];
  11032. if (_check.indexOf(_id) !== -1) {
  11033. _check2.push(_id);
  11034. }
  11035. }
  11036. if (_check2.length==0 && _check.length==0) {
  11037. }else{
  11038. this.checkAll2 = _check2.length === _check.length;
  11039. }
  11040. this.CollLoading=false
  11041. })
  11042. .catch((err) => {
  11043. console.error(err);
  11044. this.CollLoading=false
  11045. });
  11046. },
  11047. searchStudent() {
  11048. this.getStudent();
  11049. },
  11050. selectGrage() {
  11051. let params = {
  11052. oid: this.oid,
  11053. };
  11054. this.ajax
  11055. .get(this.$store.state.api + "selectGrageBySchool", params)
  11056. .then((res) => {
  11057. this.gradeList = res.data[0];
  11058. })
  11059. .catch((err) => {
  11060. this.isLoading = false;
  11061. console.error(err);
  11062. });
  11063. },
  11064. //获取班级列表
  11065. getClass() {
  11066. let params = {
  11067. oid: this.oid,
  11068. gid: this.gradeId,
  11069. cn: this.classSearch,
  11070. };
  11071. this.ajax
  11072. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  11073. .then((res) => {
  11074. if (!this.grade.length) {
  11075. this.grade = res.data[0];
  11076. }
  11077. this.grade2 = res.data[0];
  11078. this.classJuri = res.data[0];
  11079. let _check = [];
  11080. let _check2 = [];
  11081. for (var i = 0; i < this.grade2.length; i++) {
  11082. var gid = this.grade2[i].id;
  11083. _check.push(gid);
  11084. }
  11085. for (var i = 0; i < this.checkboxList2.length; i++) {
  11086. var _id = this.checkboxList2[i];
  11087. if (_check.indexOf(_id) !== -1) {
  11088. _check2.push(_id);
  11089. }
  11090. }
  11091. this.checkAll = _check2.length === _check.length;
  11092. })
  11093. .catch((err) => {
  11094. this.isLoading = false;
  11095. console.error(err);
  11096. });
  11097. },
  11098. CourseType2Change(val) {
  11099. this.pTypeCheck = [];
  11100. for (var i = 0; i < this.CourseType2.length; i++) {
  11101. let typeA = this.CourseType2[i];
  11102. if (val.indexOf(typeA.name) != -1) {
  11103. this.pTypeCheck.push(...typeA.id);
  11104. }
  11105. }
  11106. },
  11107. arrayToArray(arrayo, arrayt) {
  11108. let array1 = arrayo;
  11109. let array2 = arrayt;
  11110. let commonElements = [];
  11111. for (let i = 0; i < array1.length; i++) {
  11112. for (let j = 0; j < array2.length; j++) {
  11113. if (array1[i] === array2[j]) {
  11114. commonElements.push(array1[i]);
  11115. }
  11116. }
  11117. }
  11118. return commonElements;
  11119. },
  11120. typeChange(){
  11121. let sub = []
  11122. let mclass = []
  11123. if (this.courseTypeId.length) {
  11124. for (var i = 0; i < this.courseTypeId.length; i++) {
  11125. let _sid = this.courseTypeId[i]
  11126. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11127. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  11128. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  11129. }
  11130. }
  11131. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11132. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  11133. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  11134. }
  11135. }
  11136. }
  11137. }
  11138. sub = JSON.parse(converter(JSON.stringify(sub)))
  11139. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  11140. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  11141. let _file = this.knowFileArray[fi]
  11142. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  11143. let fileS = _file.name ? converter(_file.name).split('/') : 1
  11144. let _sub = fileS == 1 ? [1] : this.arrayToArray(fileS, sub)
  11145. let _mclass = fileM == 1 ? [1] : this.arrayToArray(fileM, mclass)
  11146. let fileids = this.knowInfoData.map((item) => item.fileid)
  11147. if(_sub.length > 0 && _mclass.length > 0 && fileids.indexOf(_file.fileid) == -1){
  11148. this.knowInfoData.push({
  11149. name: _file.filename,
  11150. url: _file.url,
  11151. uid: '',
  11152. type: 3,
  11153. fileid: _file.fileid,
  11154. });
  11155. this.knowFileids.push(_file.fileid)
  11156. }
  11157. }
  11158. },
  11159. getChapterData(e, i, j, ic, type) {
  11160. e.stopPropagation();
  11161. this.updataC = true;
  11162. this.icc = ic;
  11163. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  11164. console.log("还不能下载图片喔");
  11165. }
  11166. },
  11167. deleteChapterData(e, i, j, ic, taskI) {
  11168. e.stopPropagation();
  11169. let _this = this;
  11170. _this
  11171. .$confirm("确定删除此项?", "提示", {
  11172. confirmButtonText: "确定",
  11173. cancelButtonText: "取消",
  11174. type: "warning",
  11175. })
  11176. .then(() => {
  11177. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  11178. ic,
  11179. 1
  11180. );
  11181. })
  11182. .catch(() => {
  11183. return;
  11184. });
  11185. },
  11186. checkInfoData(fileid, file){
  11187. let type = 1
  11188. let index = 0
  11189. for(let i = 0; i < this.infoData.length; i++){
  11190. if(this.infoData[i].fileid == fileid){
  11191. type = 2
  11192. index = i
  11193. }
  11194. }
  11195. if(type == 2){
  11196. this.infoData.splice(index, 1)
  11197. }else {
  11198. this.infoData.push({...file})
  11199. }
  11200. },
  11201. checkKnowInfoData(fileid){
  11202. if(this.knowFileids.indexOf(fileid) == -1){
  11203. this.knowFileids.push(fileid)
  11204. }else {
  11205. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  11206. }
  11207. },
  11208. deleteInfoData(e, ic) {
  11209. e.stopPropagation();
  11210. let _this = this;
  11211. _this
  11212. .$confirm("确定删除此项?", "提示", {
  11213. confirmButtonText: "确定",
  11214. cancelButtonText: "取消",
  11215. type: "warning",
  11216. })
  11217. .then(() => {
  11218. _this.infoData.splice(
  11219. ic,
  11220. 1
  11221. );
  11222. })
  11223. .catch(() => {
  11224. return;
  11225. });
  11226. },
  11227. deleteInfoData2(e, ic) {
  11228. e.stopPropagation();
  11229. let _this = this;
  11230. _this
  11231. .$confirm("确定删除此项?", "提示", {
  11232. confirmButtonText: "确定",
  11233. cancelButtonText: "取消",
  11234. type: "warning",
  11235. })
  11236. .then(() => {
  11237. let fileid = _this.infoData2[ic].fileid;
  11238. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  11239. _this.infoData2.splice(
  11240. ic,
  11241. 1
  11242. );
  11243. })
  11244. .catch(() => {
  11245. return;
  11246. });
  11247. },
  11248. deleteKnowInfoData(e, ic) {
  11249. e.stopPropagation();
  11250. let _this = this;
  11251. _this
  11252. .$confirm("确定删除此项?", "提示", {
  11253. confirmButtonText: "确定",
  11254. cancelButtonText: "取消",
  11255. type: "warning",
  11256. })
  11257. .then(() => {
  11258. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  11259. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  11260. }
  11261. _this.knowInfoData.splice(
  11262. ic,
  11263. 1
  11264. );
  11265. })
  11266. .catch(() => {
  11267. return;
  11268. });
  11269. },
  11270. deletemubiaoInfoData(e, ic) {
  11271. e.stopPropagation();
  11272. let _this = this;
  11273. _this
  11274. .$confirm("确定删除此项?", "提示", {
  11275. confirmButtonText: "确定",
  11276. cancelButtonText: "取消",
  11277. type: "warning",
  11278. })
  11279. .then(() => {
  11280. _this.mubiaoInfoData.splice(
  11281. ic,
  11282. 1
  11283. );
  11284. })
  11285. .catch(() => {
  11286. return;
  11287. });
  11288. },
  11289. deletexuanzeInfoData(e, ic) {
  11290. e.stopPropagation();
  11291. let _this = this;
  11292. _this
  11293. .$confirm("确定删除此项?", "提示", {
  11294. confirmButtonText: "确定",
  11295. cancelButtonText: "取消",
  11296. type: "warning",
  11297. })
  11298. .then(() => {
  11299. _this.xuanzeInfoData.splice(
  11300. ic,
  11301. 1
  11302. );
  11303. })
  11304. .catch(() => {
  11305. return;
  11306. });
  11307. },
  11308. deletepingjiaInfoData(e, ic, tindex) {
  11309. e.stopPropagation();
  11310. let _this = this;
  11311. _this
  11312. .$confirm("确定删除此项?", "提示", {
  11313. confirmButtonText: "确定",
  11314. cancelButtonText: "取消",
  11315. type: "warning",
  11316. })
  11317. .then(() => {
  11318. _this.pingjiaInfoData[tindex].splice(
  11319. ic,
  11320. 1
  11321. );
  11322. })
  11323. .catch(() => {
  11324. return;
  11325. });
  11326. },
  11327. deleteCankaoInfoData(e, ic) {
  11328. e.stopPropagation();
  11329. let _this = this;
  11330. _this
  11331. .$confirm("确定删除此项?", "提示", {
  11332. confirmButtonText: "确定",
  11333. cancelButtonText: "取消",
  11334. type: "warning",
  11335. })
  11336. .then(() => {
  11337. _this.cankaoInfoData.splice(
  11338. ic,
  11339. 1
  11340. );
  11341. })
  11342. .catch(() => {
  11343. return;
  11344. });
  11345. },
  11346. deleteTeacherInfoData(e, ic) {
  11347. e.stopPropagation();
  11348. let _this = this;
  11349. _this
  11350. .$confirm("确定删除此项?", "提示", {
  11351. confirmButtonText: "确定",
  11352. cancelButtonText: "取消",
  11353. type: "warning",
  11354. })
  11355. .then(() => {
  11356. _this.teacherInfoData.splice(
  11357. ic,
  11358. 1
  11359. );
  11360. })
  11361. .catch(() => {
  11362. return;
  11363. });
  11364. },
  11365. updataVideoT(e, i, j, ic) {
  11366. // e.stopPropagation();
  11367. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  11368. // ic
  11369. // ].name = JSON.parse(JSON.stringify(e.target.value));
  11370. this.line =
  11371. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  11372. this.taskCount = j;
  11373. this.lineCount = ic;
  11374. this.dialogVisibleupdataVideoT = true;
  11375. this.$forceUpdate();
  11376. },
  11377. checkChpater(e, i, j, ic){
  11378. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  11379. if(type == 3){
  11380. var fileA = [
  11381. "DOC",
  11382. "DOCX",
  11383. "DOCM",
  11384. "DOTM",
  11385. "DOTX",
  11386. "PPTX",
  11387. "PPSX",
  11388. "PPT",
  11389. "PPS",
  11390. "PPTM",
  11391. "POTM",
  11392. "PPAM",
  11393. "POTX",
  11394. "PPSM",
  11395. "XLSX",
  11396. "XLS"
  11397. ];
  11398. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  11399. if (
  11400. fileA.indexOf(
  11401. url.split(".")[
  11402. url.split(".").length - 1
  11403. ].toLocaleUpperCase()
  11404. ) != -1
  11405. ) {
  11406. this.dialogVisibleOffice = true
  11407. this.wurl = url
  11408. } else if (
  11409. "pdf".indexOf(
  11410. url.split(".")[
  11411. url.split(".").length - 1
  11412. ].toLocaleLowerCase()
  11413. ) != -1
  11414. ) {
  11415. this.dialogVisiblePdf = true
  11416. this.wurl = url
  11417. }
  11418. }
  11419. },
  11420. checkChpater2(e, ic){
  11421. let type = this.infoData2[ic].type
  11422. if(type == 3){
  11423. var fileA = [
  11424. "DOC",
  11425. "DOCX",
  11426. "DOCM",
  11427. "DOTM",
  11428. "DOTX",
  11429. "PPTX",
  11430. "PPSX",
  11431. "PPT",
  11432. "PPS",
  11433. "PPTM",
  11434. "POTM",
  11435. "PPAM",
  11436. "POTX",
  11437. "PPSM",
  11438. "XLSX",
  11439. "XLS"
  11440. ];
  11441. let url = this.infoData2[ic].url
  11442. if (
  11443. fileA.indexOf(
  11444. url.split(".")[
  11445. url.split(".").length - 1
  11446. ].toLocaleUpperCase()
  11447. ) != -1
  11448. ) {
  11449. this.dialogVisibleOffice = true
  11450. this.wurl = url
  11451. } else if (
  11452. "pdf".indexOf(
  11453. url.split(".")[
  11454. url.split(".").length - 1
  11455. ].toLocaleLowerCase()
  11456. ) != -1
  11457. ) {
  11458. this.dialogVisiblePdf = true
  11459. this.wurl = url
  11460. }
  11461. }
  11462. },
  11463. checkChpater3(e, ic, item){
  11464. let type = item.type
  11465. if(type == 3){
  11466. var fileA = [
  11467. "DOC",
  11468. "DOCX",
  11469. "DOCM",
  11470. "DOTM",
  11471. "DOTX",
  11472. "PPTX",
  11473. "PPSX",
  11474. "PPT",
  11475. "PPS",
  11476. "PPTM",
  11477. "POTM",
  11478. "PPAM",
  11479. "POTX",
  11480. "PPSM",
  11481. "XLSX",
  11482. "XLS"
  11483. ];
  11484. let url = item.url
  11485. if (
  11486. fileA.indexOf(
  11487. url.split(".")[
  11488. url.split(".").length - 1
  11489. ].toLocaleUpperCase()
  11490. ) != -1
  11491. ) {
  11492. this.dialogVisibleOffice = true
  11493. this.wurl = url
  11494. } else if (
  11495. "pdf".indexOf(
  11496. url.split(".")[
  11497. url.split(".").length - 1
  11498. ].toLocaleLowerCase()
  11499. ) != -1
  11500. ) {
  11501. this.dialogVisiblePdf = true
  11502. this.wurl = url
  11503. }
  11504. }
  11505. },
  11506. updataVideoC() {
  11507. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11508. this.taskCount
  11509. ].chapterData[this.lineCount].name = JSON.parse(
  11510. JSON.stringify(this.line)
  11511. );
  11512. this.dialogVisibleupdataVideoT = false;
  11513. this.$forceUpdate();
  11514. },
  11515. upCd(e, i, j, taskCount, ic) {
  11516. e.stopPropagation();
  11517. if (ic == 0) {
  11518. return;
  11519. }
  11520. var a = JSON.parse(
  11521. JSON.stringify(
  11522. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11523. ic - 1
  11524. ]
  11525. )
  11526. );
  11527. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  11528. JSON.parse(
  11529. JSON.stringify(
  11530. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11531. )
  11532. );
  11533. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11534. this.$forceUpdate();
  11535. },
  11536. downCd(e, i, j, taskCount, ic) {
  11537. e.stopPropagation();
  11538. if (
  11539. ic ==
  11540. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  11541. 1
  11542. ) {
  11543. return;
  11544. }
  11545. var a = JSON.parse(
  11546. JSON.stringify(
  11547. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11548. ic + 1
  11549. ]
  11550. )
  11551. );
  11552. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  11553. JSON.parse(
  11554. JSON.stringify(
  11555. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11556. )
  11557. );
  11558. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11559. this.$forceUpdate();
  11560. },
  11561. async upTool(e, i, j, tooli) {
  11562. e.stopPropagation();
  11563. if (tooli == 0) {
  11564. return;
  11565. }
  11566. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  11567. let count2 = await this.getWorksCount(3, i, j, tooli);
  11568. if (count1 > 0 || count2 > 0) {
  11569. this.$confirm(
  11570. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11571. "提示",
  11572. {
  11573. confirmButtonText: "确定",
  11574. cancelButtonText: "取消",
  11575. type: "warning",
  11576. }
  11577. )
  11578. .then(() => {
  11579. var a = JSON.parse(
  11580. JSON.stringify(
  11581. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11582. tooli - 1
  11583. ]
  11584. )
  11585. );
  11586. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11587. JSON.parse(
  11588. JSON.stringify(
  11589. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11590. )
  11591. );
  11592. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11593. this.$forceUpdate();
  11594. })
  11595. .catch(() => {
  11596. return;
  11597. });
  11598. } else {
  11599. var a = JSON.parse(
  11600. JSON.stringify(
  11601. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  11602. )
  11603. );
  11604. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11605. JSON.parse(
  11606. JSON.stringify(
  11607. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11608. )
  11609. );
  11610. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11611. this.$forceUpdate();
  11612. }
  11613. },
  11614. async downTool(e, i, j, tooli) {
  11615. e.stopPropagation();
  11616. if (
  11617. tooli ==
  11618. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  11619. ) {
  11620. return;
  11621. }
  11622. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  11623. let count2 = await this.getWorksCount(3, i, j, tooli);
  11624. if (count1 > 0 || count2 > 0) {
  11625. this.$confirm(
  11626. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11627. "提示",
  11628. {
  11629. confirmButtonText: "确定",
  11630. cancelButtonText: "取消",
  11631. type: "warning",
  11632. }
  11633. )
  11634. .then(() => {
  11635. var a = JSON.parse(
  11636. JSON.stringify(
  11637. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11638. tooli + 1
  11639. ]
  11640. )
  11641. );
  11642. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11643. JSON.parse(
  11644. JSON.stringify(
  11645. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11646. )
  11647. );
  11648. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11649. this.$forceUpdate();
  11650. })
  11651. .catch(() => {
  11652. return;
  11653. });
  11654. } else {
  11655. var a = JSON.parse(
  11656. JSON.stringify(
  11657. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  11658. )
  11659. );
  11660. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11661. JSON.parse(
  11662. JSON.stringify(
  11663. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11664. )
  11665. );
  11666. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11667. this.$forceUpdate();
  11668. }
  11669. },
  11670. addWork(type) {
  11671. if(type == 2 && this.courseName == "") {
  11672. this.$message.error("请补充填写课程名称");
  11673. return;
  11674. }
  11675. let cPan = 1;
  11676. for (var i = 0; i < this.unitJson.length; i++) {
  11677. for (
  11678. var j = 0;
  11679. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11680. j++
  11681. ) {
  11682. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11683. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11684. if (
  11685. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11686. ) {
  11687. for (
  11688. var z = 0;
  11689. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11690. z++
  11691. ) {
  11692. if (
  11693. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11694. .length
  11695. ) {
  11696. this.$message.error("请把工具添加完整");
  11697. cPan = 2;
  11698. break;
  11699. }
  11700. }
  11701. }
  11702. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11703. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11704. i
  11705. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11706. return ele.value != "" || ele.detail != "" || ele.target != "";
  11707. });
  11708. }
  11709. }
  11710. }
  11711. this.inputShow = true;
  11712. if (cPan == 2) {
  11713. this.steps--;
  11714. return;
  11715. }
  11716. for (var i = 0; i < this.unitJson.length; i++) {
  11717. delete this.unitJson[i].isUpdate;
  11718. }
  11719. if(!this.targetCourseText2){
  11720. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11721. }
  11722. let params = [
  11723. {
  11724. uid: this.userid,
  11725. title: this.courseName,
  11726. brief: this.courseText,
  11727. cover:
  11728. this.cover.length > 0
  11729. ? JSON.stringify(this.cover)
  11730. : JSON.stringify([
  11731. {
  11732. name: "noBanner.jpg",
  11733. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11734. uid: 1656409780264,
  11735. status: "success",
  11736. },
  11737. ]),
  11738. evaId: this.evalua,
  11739. astudent:
  11740. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11741. see: this.isTeacherSee == true ? 1 : 0,
  11742. chapters: JSON.stringify(this.unitJson),
  11743. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  11744. courseType: JSON.stringify(this.courseTypeId),
  11745. ateacher:
  11746. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11747. inviteCode: JSON.stringify(this.inviteCode),
  11748. refile: JSON.stringify(this.infoData),
  11749. reBrief: this.courseText2,
  11750. cpote: JSON.stringify(this.cpote),
  11751. setting: JSON.stringify({
  11752. courseJie: this.courseJie,
  11753. courseTime: this.courseTime,
  11754. teacherInfoData: this.teacherInfoData,
  11755. teacherCourseText: this.teacherCourseText,
  11756. targetCourseText: this.targetCourseText,
  11757. cankaoInfoData: this.cankaoInfoData,
  11758. mubiaoInfoData: this.mubiaoInfoData,
  11759. xuanzeInfoData: this.xuanzeInfoData,
  11760. pingjiaInfoData: this.pingjiaInfoData,
  11761. infoData2: this.infoData2,
  11762. isuseT: this.isuseT,
  11763. mode: this.mode,
  11764. targetCourseText2: this.targetCourseText2,
  11765. chatid: this.chatid,
  11766. languageSetting: this.languageSetting,
  11767. }),
  11768. iresearch: this.isFileSearch ? 1 : 2,
  11769. },
  11770. ];
  11771. this.ajax
  11772. .post(this.$store.state.api + "addWorkNew2AI3", params)
  11773. .then((res) => {
  11774. console.log(this.steps);
  11775. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  11776. this.$message({
  11777. message: "新增成功",
  11778. type: "success",
  11779. });
  11780. }
  11781. this.number = res.data.ordernumber;
  11782. this.courseId = res.data.courseId;
  11783. this.cid = res.data.courseId;
  11784. this.courseUserid = this.userid;
  11785. this.islogin = true;
  11786. // this.updateCourseState(4);
  11787. this.updateCourseState(5);
  11788. this.addtips()
  11789. if(type == 2){
  11790. this.retrunCourse()
  11791. }
  11792. if(type == 3){
  11793. this.steps = 4
  11794. }
  11795. })
  11796. .catch((err) => {
  11797. this.$message.error("网络不佳");
  11798. console.error(err);
  11799. });
  11800. },
  11801. goCourse() {
  11802. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  11803. },
  11804. updateWork2() {
  11805. let _unitIndex = this.unitIndex;
  11806. let cPan = 1;
  11807. for (
  11808. var j = 0;
  11809. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11810. j++
  11811. ) {
  11812. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11813. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11814. j
  11815. ].proVisible2 = false;
  11816. if (
  11817. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11818. .length > 1
  11819. ) {
  11820. for (
  11821. var z = 0;
  11822. z <
  11823. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11824. .length;
  11825. z++
  11826. ) {
  11827. if (
  11828. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11829. z
  11830. ].tool.length
  11831. ) {
  11832. this.$message.error("请把工具添加完整");
  11833. cPan = 2;
  11834. break;
  11835. }
  11836. }
  11837. }
  11838. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11839. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11840. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11841. (ele) => {
  11842. return ele.value != "" || ele.detail != "" || ele.target != "";
  11843. }
  11844. );
  11845. }
  11846. }
  11847. this.inputShow = true;
  11848. if (cPan == 2) {
  11849. this.steps--;
  11850. return;
  11851. }
  11852. let params = [
  11853. {
  11854. cid: this.cid,
  11855. chapters: JSON.stringify(this.unitJson),
  11856. uid: this.userid,
  11857. unitIndex: _unitIndex,
  11858. },
  11859. ];
  11860. this.ajax
  11861. .post(this.$store.state.api + "updateWorkNew4", params)
  11862. .then((res) => {
  11863. this.$message({
  11864. message: "修改成功",
  11865. type: "success",
  11866. });
  11867. this.courseId = this.cid;
  11868. this.addtips();
  11869. })
  11870. .catch((err) => {
  11871. this.$message.error("网络不佳");
  11872. console.error(err);
  11873. });
  11874. },
  11875. updateWork3(unitIndex) {
  11876. let _unitIndex = unitIndex;
  11877. let cPan = 1;
  11878. for (
  11879. var j = 0;
  11880. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  11881. j++
  11882. ) {
  11883. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  11884. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  11885. j
  11886. ].proVisible2 = false;
  11887. if (
  11888. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11889. .length > 1
  11890. ) {
  11891. for (
  11892. var z = 0;
  11893. z <
  11894. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  11895. .length;
  11896. z++
  11897. ) {
  11898. if (
  11899. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  11900. z
  11901. ].tool.length
  11902. ) {
  11903. this.$message.error("请把工具添加完整");
  11904. cPan = 2;
  11905. break;
  11906. }
  11907. }
  11908. }
  11909. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  11910. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  11911. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  11912. (ele) => {
  11913. return ele.value != "" || ele.detail != "" || ele.target != "";
  11914. }
  11915. );
  11916. }
  11917. }
  11918. this.inputShow = true;
  11919. if (cPan == 2) {
  11920. this.steps--;
  11921. return;
  11922. }
  11923. let params = [
  11924. {
  11925. cid: this.cid,
  11926. chapters: JSON.stringify(this.unitJson),
  11927. uid: this.userid,
  11928. unitIndex: _unitIndex,
  11929. },
  11930. ];
  11931. this.ajax
  11932. .post(this.$store.state.api + "updateWorkNew4", params)
  11933. .then((res) => {
  11934. // this.$message({
  11935. // message: "修改成功",
  11936. // type: "success",
  11937. // });
  11938. this.courseId = this.cid;
  11939. this.addtips()
  11940. })
  11941. .catch((err) => {
  11942. this.$message.error("网络不佳");
  11943. console.error(err);
  11944. });
  11945. },
  11946. updateWork() {
  11947. let cPan = 1;
  11948. for (var i = 0; i < this.unitJson.length; i++) {
  11949. for (
  11950. var j = 0;
  11951. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11952. j++
  11953. ) {
  11954. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11955. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11956. if (
  11957. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11958. ) {
  11959. for (
  11960. var z = 0;
  11961. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11962. z++
  11963. ) {
  11964. if (
  11965. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11966. .length
  11967. ) {
  11968. this.$message.error("请把工具添加完整");
  11969. cPan = 2;
  11970. break;
  11971. }
  11972. }
  11973. }
  11974. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11975. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11976. i
  11977. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11978. return ele.value != "" || ele.detail != "" || ele.target != "";
  11979. });
  11980. }
  11981. }
  11982. }
  11983. this.inputShow = true;
  11984. if (cPan == 2) {
  11985. this.steps--;
  11986. return;
  11987. }
  11988. for (var i = 0; i < this.unitJson.length; i++) {
  11989. delete this.unitJson[i].isUpdate;
  11990. }
  11991. if(!this.targetCourseText2){
  11992. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11993. }
  11994. let params = [
  11995. {
  11996. cid: this.cid,
  11997. title: this.courseName,
  11998. brief: this.courseText,
  11999. cover:
  12000. this.cover.length > 0
  12001. ? JSON.stringify(this.cover)
  12002. : JSON.stringify([
  12003. {
  12004. name: "noBanner.jpg",
  12005. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  12006. uid: 1656409780264,
  12007. status: "success",
  12008. },
  12009. ]),
  12010. evaId: this.evalua,
  12011. astudent:
  12012. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  12013. see: this.isTeacherSee == true ? 1 : 0,
  12014. chapters: JSON.stringify(this.unitJson),
  12015. template: this.myWord != "undefined" ? this.myWord : [],
  12016. uid: this.userid,
  12017. courseType: JSON.stringify(this.courseTypeId),
  12018. ateacher:
  12019. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  12020. inviteCode: JSON.stringify(this.inviteCode),
  12021. refile: JSON.stringify(this.infoData),
  12022. reBrief: this.courseText2,
  12023. cpote: JSON.stringify(this.cpote),
  12024. setting: JSON.stringify({
  12025. courseJie: this.courseJie,
  12026. courseTime: this.courseTime,
  12027. teacherInfoData: this.teacherInfoData,
  12028. teacherCourseText: this.teacherCourseText,
  12029. targetCourseText: this.targetCourseText,
  12030. cankaoInfoData: this.cankaoInfoData,
  12031. mubiaoInfoData: this.mubiaoInfoData,
  12032. xuanzeInfoData: this.xuanzeInfoData,
  12033. pingjiaInfoData: this.pingjiaInfoData,
  12034. infoData2: this.infoData2,
  12035. isuseT: this.isuseT,
  12036. mode: this.mode,
  12037. targetCourseText2: this.targetCourseText2,
  12038. chatid: this.chatid,
  12039. languageSetting: this.languageSetting,
  12040. }),
  12041. iresearch: this.isFileSearch ? 1 : 2,
  12042. },
  12043. ];
  12044. this.ajax
  12045. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  12046. .then((res) => {
  12047. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  12048. if (this.cidType == 1) {
  12049. this.$message({
  12050. message: "修改成功",
  12051. type: "success",
  12052. });
  12053. } else {
  12054. this.$message({
  12055. message: "新增成功",
  12056. type: "success",
  12057. });
  12058. }
  12059. }
  12060. this.number = this.nbOrder;
  12061. this.courseId = this.cid;
  12062. this.addtips()
  12063. })
  12064. .catch((err) => {
  12065. this.$message.error("网络不佳");
  12066. console.error(err);
  12067. });
  12068. },
  12069. insertWord() {
  12070. this.dialogVisible1 = true;
  12071. this.updateBoolean2 = false;
  12072. this.tTitle = "";
  12073. this.tdetail = "";
  12074. },
  12075. addWord() {
  12076. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  12077. name: this.tTitle,
  12078. content: this.tdetail,
  12079. uid: this.guid(),
  12080. });
  12081. this.dialogVisible1 = false;
  12082. },
  12083. upWord() { },
  12084. selectWord(uid, i, c) {
  12085. this.dialogVisible1 = true;
  12086. this.updateBoolean2 = true;
  12087. if (
  12088. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  12089. ) {
  12090. this.tTitle =
  12091. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  12092. this.tdetail =
  12093. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  12094. }
  12095. },
  12096. isAddPP() {
  12097. if (this.checkboxList.length > 0) {
  12098. this.$message({
  12099. message: "添加成功",
  12100. type: "success",
  12101. });
  12102. this.dialogVisible3 = false;
  12103. } else {
  12104. this.$message({
  12105. message: "请添加课程成员",
  12106. type: "error",
  12107. });
  12108. }
  12109. },
  12110. isAddClass() {
  12111. this.dialogVisibleClass = false;
  12112. },
  12113. isAddPPTeacher() {
  12114. this.dialogVisibleMember = false;
  12115. this.setMan();
  12116. },
  12117. getTipsTemplate(){
  12118. if(this.templateid){
  12119. let params = {
  12120. id: this.templateid
  12121. }
  12122. this.ajax
  12123. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12124. .then((res) => {
  12125. if(res.data[0].length){
  12126. this.tipsJson = res.data[0][0]
  12127. this.aiJson = JSON.parse(res.data[0][0].tips)
  12128. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12129. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12130. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12131. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12132. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12133. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12134. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12135. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12136. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12137. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12138. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12139. }
  12140. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  12141. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  12142. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  12143. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  12144. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  12145. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  12146. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  12147. // }
  12148. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  12149. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12150. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12151. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12152. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  12153. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12154. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  12155. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12156. // }
  12157. this.$forceUpdate();
  12158. }
  12159. })
  12160. .catch((err) => { });
  12161. }
  12162. },
  12163. getTemplate() {
  12164. this.ajax
  12165. .get(this.$store.state.api + "getCourseTemplateT", "")
  12166. .then((res) => {
  12167. this.templateArray = res.data[0];
  12168. this.getTemplateOid();
  12169. this.$forceUpdate();
  12170. })
  12171. .catch((err) => { });
  12172. },
  12173. getTemplateOid() {
  12174. let params = {
  12175. oid: this.oid,
  12176. };
  12177. this.ajax
  12178. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12179. .then((res) => {
  12180. if (res.data[0].length) {
  12181. this.templateArray = [...res.data[0], ...this.templateArray];
  12182. }
  12183. this.getTemplateOrg();
  12184. this.$forceUpdate();
  12185. })
  12186. .catch((err) => { });
  12187. },
  12188. getTemplateOrg() {
  12189. let params = {
  12190. oid: this.org,
  12191. };
  12192. this.ajax
  12193. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12194. .then((res) => {
  12195. if (res.data[0].length) {
  12196. this.templateArray = [...res.data[0], ...this.templateArray];
  12197. }
  12198. this.$forceUpdate();
  12199. })
  12200. .catch((err) => { });
  12201. },
  12202. clearChoose() {
  12203. this.clearArray.splice(this.templateC.id, 1);
  12204. this.dialogVisible2 = false;
  12205. },
  12206. clearAttText() {
  12207. this.AttText = {
  12208. title: "",
  12209. text: "",
  12210. };
  12211. this.dialogVisible6 = false;
  12212. },
  12213. clearLine() {
  12214. this.line = "";
  12215. this.dialogVisible7 = false;
  12216. },
  12217. openTemplate() {
  12218. this.ctJson = {};
  12219. this.templateDialog = true;
  12220. },
  12221. checkctJson(json) {
  12222. if (this.ctJson.id == json.id) {
  12223. this.ctJson = {};
  12224. } else {
  12225. this.ctJson = json;
  12226. }
  12227. },
  12228. addTemplate(res) {
  12229. let _this = this;
  12230. let _res = [];
  12231. if (res.id == 1) {
  12232. _res = [
  12233. {
  12234. dyName: "", //单元标题
  12235. easy: 1,
  12236. chapterInfo: [
  12237. {
  12238. isread: false,
  12239. chapterid: this.guid(),
  12240. title: "",
  12241. courseName: "",
  12242. taskJson: [
  12243. {
  12244. task: "",
  12245. taskDetail: "",
  12246. chapterData: [],
  12247. toolText: "",
  12248. toolChoose: [
  12249. {
  12250. tool: [],
  12251. toolDetail: "",
  12252. toolType: 0,
  12253. askCount: 1,
  12254. askTitle: "",
  12255. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12256. },
  12257. ],
  12258. isShowTools: false,
  12259. askCount: 1,
  12260. isFold: 1,
  12261. askTitle: "",
  12262. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12263. checkJson: [{ checkCount: [], checkPerent: [] }],
  12264. homeworkList: [],
  12265. },
  12266. ],
  12267. itemCount: 1,
  12268. fileList1: [],
  12269. video: [],
  12270. testData: [],
  12271. pData: [],
  12272. templateArray: [],
  12273. },
  12274. ],
  12275. },
  12276. ];
  12277. this.updateCourseState(1);
  12278. } else if (res.id == 2) {
  12279. let stageData = [];
  12280. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12281. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12282. if (!iframe && !iframe2) {
  12283. this.$message.error("请使用AI共创生成");
  12284. return;
  12285. }
  12286. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12287. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12288. if (
  12289. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  12290. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  12291. ) {
  12292. this.$message.error("请使用AI共创生成");
  12293. return;
  12294. }
  12295. stageData = copyData
  12296. ? copyData.stageData
  12297. : copyData2
  12298. ? copyData2.stageData
  12299. : [""];
  12300. for (var i = 0; i < stageData.length; i++) {
  12301. _res.push({
  12302. dyName: stageData[i], //单元标题
  12303. chapterInfo: [
  12304. {
  12305. isread: false,
  12306. chapterid: this.guid(),
  12307. title: "",
  12308. courseName: "",
  12309. taskJson: [
  12310. {
  12311. task: "",
  12312. taskDetail: "",
  12313. chapterData: [],
  12314. toolText: "",
  12315. toolChoose: [
  12316. {
  12317. tool: [],
  12318. toolDetail: "",
  12319. toolType: 0,
  12320. askCount: 1,
  12321. askTitle: "",
  12322. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12323. },
  12324. ],
  12325. isShowTools: false,
  12326. askCount: 1,
  12327. isFold: 1,
  12328. askTitle: "",
  12329. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12330. checkJson: [{ checkCount: [], checkPerent: [] }],
  12331. homeworkList: [],
  12332. },
  12333. ],
  12334. itemCount: 1,
  12335. fileList1: [],
  12336. video: [],
  12337. testData: [],
  12338. pData: [],
  12339. templateArray: [],
  12340. },
  12341. ],
  12342. });
  12343. }
  12344. this.updateCourseState(1);
  12345. } else if (!Object.keys(res).length) {
  12346. this.$message.error("请选择模板");
  12347. retrun;
  12348. } else {
  12349. _res = JSON.parse(res.chapters);
  12350. this.updateCourseState(parseInt(res.state));
  12351. }
  12352. _this
  12353. .$confirm(
  12354. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  12355. "提示",
  12356. {
  12357. confirmButtonText: "确定",
  12358. cancelButtonText: "取消",
  12359. type: "warning",
  12360. }
  12361. )
  12362. .then(() => {
  12363. _this.unitJson = _res;
  12364. _this.updateWork();
  12365. // _this.steps++;
  12366. _this.templateDialog = false;
  12367. setTimeout(() => {
  12368. this.checkEva(this.checkId);
  12369. setTimeout(() => {
  12370. this.checkEva(this.checkId);
  12371. }, 100);
  12372. }, 1000);
  12373. })
  12374. .catch(() => {
  12375. return;
  12376. });
  12377. },
  12378. checkTemplate(res) {
  12379. let _this = this;
  12380. _this
  12381. .$confirm(
  12382. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  12383. "提示",
  12384. {
  12385. confirmButtonText: "确定",
  12386. cancelButtonText: "取消",
  12387. type: "warning",
  12388. }
  12389. )
  12390. .then(() => {
  12391. _this.unitJson = JSON.parse(res.chapters);
  12392. _this.steps++;
  12393. setTimeout(() => {
  12394. this.checkEva(this.checkId);
  12395. setTimeout(() => {
  12396. this.checkEva(this.checkId);
  12397. }, 100);
  12398. }, 1000);
  12399. })
  12400. .catch(() => {
  12401. return;
  12402. });
  12403. },
  12404. checkTemplate1(w) {
  12405. this.steps++;
  12406. },
  12407. checkTemplate2() {
  12408. let _this = this;
  12409. _this
  12410. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  12411. confirmButtonText: "确定",
  12412. cancelButtonText: "取消",
  12413. type: "warning",
  12414. })
  12415. .then(() => {
  12416. _this.unitIndex = 0;
  12417. _this.unitJson = [
  12418. {
  12419. dyName: "", //单元标题
  12420. chapterInfo: [
  12421. {
  12422. isread: false,
  12423. chapterid: this.guid(),
  12424. title: "",
  12425. courseName: "",
  12426. taskJson: [
  12427. {
  12428. task: "",
  12429. taskDetail: "",
  12430. chapterData: [],
  12431. toolText: "",
  12432. toolChoose: [
  12433. {
  12434. tool: [],
  12435. toolDetail: "",
  12436. toolType: 0,
  12437. askCount: 1,
  12438. askTitle: "",
  12439. askJson: [
  12440. { askstitle: "", askItem: 1, checkList: [] },
  12441. ],
  12442. },
  12443. ],
  12444. isShowTools: false,
  12445. askCount: 1,
  12446. isFold: 1,
  12447. askTitle: "",
  12448. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12449. checkJson: [{ checkCount: [], checkPerent: [] }],
  12450. homeworkList: [],
  12451. },
  12452. ],
  12453. itemCount: 1,
  12454. fileList1: [],
  12455. video: [],
  12456. testData: [],
  12457. pData: [],
  12458. templateArray: [],
  12459. },
  12460. ],
  12461. },
  12462. ];
  12463. this.steps++;
  12464. setTimeout(() => {
  12465. this.checkEva(this.checkId);
  12466. setTimeout(() => {
  12467. this.checkEva(this.checkId);
  12468. }, 100);
  12469. }, 1000);
  12470. this.updateWork();
  12471. })
  12472. .catch(() => {
  12473. return;
  12474. });
  12475. },
  12476. checkTemplate3() {
  12477. let _this = this;
  12478. _this
  12479. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  12480. confirmButtonText: "确定",
  12481. cancelButtonText: "取消",
  12482. type: "warning",
  12483. })
  12484. .then(() => {
  12485. _this.unitIndex = 0;
  12486. _this.unitJson = [
  12487. {
  12488. dyName: "", //单元标题
  12489. easy: 1,
  12490. chapterInfo: [
  12491. {
  12492. isread: false,
  12493. chapterid: this.guid(),
  12494. title: "",
  12495. courseName: "",
  12496. taskJson: [
  12497. {
  12498. task: "",
  12499. taskDetail: "",
  12500. chapterData: [],
  12501. toolText: "",
  12502. toolChoose: [
  12503. {
  12504. tool: [],
  12505. toolDetail: "",
  12506. toolType: 0,
  12507. askCount: 1,
  12508. askTitle: "",
  12509. askJson: [
  12510. { askstitle: "", askItem: 1, checkList: [] },
  12511. ],
  12512. },
  12513. ],
  12514. isShowTools: false,
  12515. askCount: 1,
  12516. isFold: 1,
  12517. askTitle: "",
  12518. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12519. checkJson: [{ checkCount: [], checkPerent: [] }],
  12520. homeworkList: [],
  12521. },
  12522. ],
  12523. itemCount: 1,
  12524. fileList1: [],
  12525. video: [],
  12526. testData: [],
  12527. pData: [],
  12528. templateArray: [],
  12529. },
  12530. ],
  12531. },
  12532. ];
  12533. // this.steps++;
  12534. this.updateWork();
  12535. })
  12536. .catch(() => {
  12537. return;
  12538. });
  12539. },
  12540. checkTemplate4() {
  12541. let _this = this;
  12542. _this
  12543. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  12544. confirmButtonText: "确定",
  12545. cancelButtonText: "取消",
  12546. type: "warning",
  12547. })
  12548. .then(() => {
  12549. _this.unitIndex = 0;
  12550. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  12551. this.steps++;
  12552. this.updateWork();
  12553. })
  12554. .catch(() => {
  12555. return;
  12556. });
  12557. },
  12558. wordNext() {
  12559. this.dialogVisible2 = false;
  12560. },
  12561. isAddOrUpdateAttText() {
  12562. if (this.AttTextType == 0) {
  12563. this.addAttTextMessage();
  12564. } else {
  12565. this.updateAttText();
  12566. }
  12567. },
  12568. isAddOrUpdateLine() {
  12569. if (!this.lineTitle) {
  12570. this.$message.error("请填写链接标题");
  12571. return;
  12572. }
  12573. if (this.lineType == 0) {
  12574. this.addLine();
  12575. } else {
  12576. this.updateLine();
  12577. }
  12578. },
  12579. addAttTextMessage() {
  12580. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12581. this.taskCount
  12582. ].chapterData.unshift({
  12583. name: this.AttText.title,
  12584. url: this.AttText.text,
  12585. type: 6,
  12586. });
  12587. this.imgChange1(null, null, 6, this.taskCount);
  12588. this.dialogVisible6 = false;
  12589. },
  12590. selectAttText(itemTaskIndex, i) {
  12591. this.AttText.title =
  12592. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12593. itemTaskIndex
  12594. ].chapterData[i].name;
  12595. this.AttText.text =
  12596. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12597. itemTaskIndex
  12598. ].chapterData[i].url;
  12599. this.taskCount = itemTaskIndex;
  12600. this.AttTextIndex = i;
  12601. this.AttTextType = 1;
  12602. this.dialogVisible6 = true;
  12603. },
  12604. updateAttText() {
  12605. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12606. this.taskCount
  12607. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  12608. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12609. this.taskCount
  12610. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  12611. this.dialogVisible6 = false;
  12612. },
  12613. addLine() {
  12614. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12615. this.lineCount
  12616. ].chapterData.unshift({
  12617. name: "链接",
  12618. title: this.lineTitle,
  12619. url: this.line,
  12620. type: 8,
  12621. });
  12622. this.imgChange1(null, null, 8, this.lineCount);
  12623. this.dialogVisible7 = false;
  12624. },
  12625. selectLine(itemTaskIndex, i) {
  12626. this.line =
  12627. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12628. itemTaskIndex
  12629. ].chapterData[i].url;
  12630. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12631. itemTaskIndex
  12632. ].chapterData[i].title
  12633. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12634. .chapterData[i].title
  12635. : "";
  12636. this.taskCount = itemTaskIndex;
  12637. this.lineCount = i;
  12638. this.lineType = 1;
  12639. this.dialogVisible7 = true;
  12640. },
  12641. openUpdateSource(itemTaskIndex, i) {
  12642. this.sourceData = {};
  12643. let source =
  12644. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12645. .chapterData[i];
  12646. this.sourceData[source.id] = {};
  12647. this.sourceData[source.id].name = source.title;
  12648. this.sourceData[source.id].url = source.url;
  12649. this.dialogVisibleSource = true;
  12650. this.updateSourcePan = true;
  12651. this.taskCount = itemTaskIndex;
  12652. this.lineCount = i;
  12653. },
  12654. updateLine() {
  12655. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12656. this.taskCount
  12657. ].chapterData[this.lineCount].url = this.line;
  12658. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12659. this.taskCount
  12660. ].chapterData[this.lineCount].title = this.lineTitle;
  12661. this.dialogVisible7 = false;
  12662. },
  12663. addPP() {
  12664. this.dialogVisible3 = true;
  12665. },
  12666. goTo(path) {
  12667. this.$router.push(path);
  12668. },
  12669. openTools(itemTaskIndex, i, toolIndex) {
  12670. this.toolIndex = toolIndex;
  12671. this.taskCount = itemTaskIndex;
  12672. if (i == 4) {
  12673. if (toolIndex == null) {
  12674. var a =
  12675. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12676. .chapterData;
  12677. for (var i = 0; i < a.length; i++) {
  12678. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  12679. this.askJson =
  12680. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12681. itemTaskIndex
  12682. ].chapterData[i].askJson;
  12683. }
  12684. }
  12685. } else {
  12686. this.askJson = JSON.parse(
  12687. JSON.stringify(
  12688. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12689. itemTaskIndex
  12690. ].toolChoose[toolIndex]
  12691. )
  12692. );
  12693. }
  12694. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  12695. this.dialogVisible5 = true;
  12696. } else if (i == 45) {
  12697. if (
  12698. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12699. .toolChoose[toolIndex].testJson
  12700. ) {
  12701. this.testJson = JSON.parse(
  12702. JSON.stringify(
  12703. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12704. itemTaskIndex
  12705. ].toolChoose[toolIndex].testJson
  12706. )
  12707. );
  12708. } else {
  12709. var testJson = {
  12710. testCount: 1,
  12711. testTitle: "",
  12712. testJson: [
  12713. {
  12714. teststitle: "",
  12715. testItem: 1,
  12716. checkList: [],
  12717. timuList: [],
  12718. answer: [],
  12719. type: "1",
  12720. },
  12721. ],
  12722. };
  12723. this.testJson = testJson;
  12724. }
  12725. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  12726. this.dialogVisibleChoice = true;
  12727. } else if (i == 47) {
  12728. if (
  12729. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12730. .toolChoose[toolIndex].sentenceList
  12731. ) {
  12732. this.sentenceList = JSON.parse(
  12733. JSON.stringify(
  12734. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12735. itemTaskIndex
  12736. ].toolChoose[toolIndex].sentenceList
  12737. )
  12738. );
  12739. } else {
  12740. var sentenceList = [
  12741. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  12742. ];
  12743. this.sentenceList = sentenceList;
  12744. }
  12745. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  12746. this.dialogVisibleSentence = true;
  12747. } else if (i == 48) {
  12748. if (
  12749. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12750. .toolChoose[toolIndex].tableJson
  12751. ) {
  12752. this.tableJson = JSON.parse(
  12753. JSON.stringify(
  12754. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12755. itemTaskIndex
  12756. ].toolChoose[toolIndex].tableJson
  12757. )
  12758. );
  12759. } else {
  12760. var tableJson = { text: "" };
  12761. this.tableJson = tableJson;
  12762. }
  12763. this.dialogVisibleTable = true;
  12764. } else if (i == 52) {
  12765. if (
  12766. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12767. .toolChoose[toolIndex].wordJson
  12768. ) {
  12769. this.wordJson = JSON.parse(
  12770. JSON.stringify(
  12771. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12772. itemTaskIndex
  12773. ].toolChoose[toolIndex].wordJson
  12774. )
  12775. );
  12776. } else {
  12777. var wordJson = { text: "" };
  12778. this.wordJson = wordJson;
  12779. }
  12780. this.dialogVisibleWord = true;
  12781. // else if (i == 50) {
  12782. // if (
  12783. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12784. // .toolChoose[toolIndex].uploadJson
  12785. // ) {
  12786. // this.uploadJson = JSON.parse(
  12787. // JSON.stringify(
  12788. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12789. // itemTaskIndex
  12790. // ].toolChoose[toolIndex].uploadJson
  12791. // )
  12792. // );
  12793. // } else {
  12794. // var uploadJson = [];
  12795. // this.uploadJson = uploadJson;
  12796. // }
  12797. // this.dialogVisibleMoreUpload = true;
  12798. // }
  12799. } else if (i == 10) {
  12800. if (
  12801. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12802. .toolChoose[toolIndex].preTime
  12803. ) {
  12804. this.preTime = JSON.parse(
  12805. JSON.stringify(
  12806. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12807. itemTaskIndex
  12808. ].toolChoose[toolIndex].preTime
  12809. )
  12810. );
  12811. } else {
  12812. var preTime = 0;
  12813. this.preTime = preTime;
  12814. }
  12815. this.dialogVisiblePreTime = true;
  12816. } else if (i == 49) {
  12817. if (
  12818. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12819. .toolChoose[toolIndex].groupJson
  12820. ) {
  12821. this.groupJson = JSON.parse(
  12822. JSON.stringify(
  12823. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12824. itemTaskIndex
  12825. ].toolChoose[toolIndex].groupJson
  12826. )
  12827. );
  12828. } else {
  12829. var groupJson = {
  12830. group: [{ name: "第1组" }],
  12831. number: undefined,
  12832. islock: 1,
  12833. };
  12834. this.groupJson = groupJson;
  12835. }
  12836. this.dialogVisibleGroup = true;
  12837. } else if (i == 62) {
  12838. if (
  12839. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12840. .toolChoose[toolIndex].videoJson
  12841. ) {
  12842. this.videoJson = JSON.parse(
  12843. JSON.stringify(
  12844. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12845. itemTaskIndex
  12846. ].toolChoose[toolIndex].videoJson
  12847. )
  12848. );
  12849. } else {
  12850. var videoJson = {
  12851. video: "",
  12852. setting: [],
  12853. };
  12854. this.videoJson = videoJson;
  12855. }
  12856. this.dialogVisibleVideo = true;
  12857. } else if (i == 15) {
  12858. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12859. itemTaskIndex
  12860. ].toolChoose[toolIndex].answerQ
  12861. ? JSON.parse(
  12862. JSON.stringify(
  12863. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12864. itemTaskIndex
  12865. ].toolChoose[toolIndex].answerQ
  12866. )
  12867. )
  12868. : "";
  12869. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  12870. this.dialogVisible8 = true;
  12871. } else if (i == 40) {
  12872. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12873. itemTaskIndex
  12874. ].toolChoose[toolIndex].rateJson
  12875. ? JSON.parse(
  12876. JSON.stringify(
  12877. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12878. itemTaskIndex
  12879. ].toolChoose[toolIndex].rateJson
  12880. )
  12881. )
  12882. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  12883. this.selectSteps = 1;
  12884. this.dialogVisibleRate = true;
  12885. } else if (i == 42) {
  12886. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12887. itemTaskIndex
  12888. ].toolChoose[toolIndex].answerQ
  12889. ? JSON.parse(
  12890. JSON.stringify(
  12891. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12892. itemTaskIndex
  12893. ].toolChoose[toolIndex].answerQ
  12894. )
  12895. )
  12896. : "";
  12897. this.dialogVisibleMp3 = true;
  12898. } else if (i == 41) {
  12899. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12900. itemTaskIndex
  12901. ].toolChoose[toolIndex].selectJson
  12902. ? JSON.parse(
  12903. JSON.stringify(
  12904. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12905. itemTaskIndex
  12906. ].toolChoose[toolIndex].selectJson
  12907. )
  12908. )
  12909. : { url: "", select: [], answer: [] };
  12910. this.selectSteps = 1;
  12911. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  12912. this.dialogVisibleSelect = true;
  12913. } else if (i == 3) {
  12914. top.postMessage(
  12915. {
  12916. tools: "3y",
  12917. cid: this.cid,
  12918. stage: this.unitIndex,
  12919. task: itemTaskIndex,
  12920. tool: toolIndex,
  12921. },
  12922. "*"
  12923. );
  12924. } else if (i == 1) {
  12925. top.postMessage(
  12926. {
  12927. tools: "1y",
  12928. cid: this.cid,
  12929. stage: this.unitIndex,
  12930. task: itemTaskIndex,
  12931. tool: toolIndex,
  12932. },
  12933. "*"
  12934. );
  12935. } else if (i == 57) {
  12936. top.postMessage(
  12937. {
  12938. tools: "57y",
  12939. cid: this.cid,
  12940. stage: this.unitIndex,
  12941. task: itemTaskIndex,
  12942. tool: toolIndex,
  12943. },
  12944. "*"
  12945. );
  12946. } else if (i == 69) {
  12947. this.englishList = {};
  12948. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  12949. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  12950. ? JSON.parse(
  12951. JSON.stringify(
  12952. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12953. itemTaskIndex
  12954. ].toolChoose[toolIndex].englishList
  12955. )
  12956. )
  12957. : {};
  12958. this.$forceUpdate();
  12959. this.englishDialogVisible = true;
  12960. } else if (i == 70) {
  12961. this.englishVoiceJson = {};
  12962. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  12963. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  12964. ? JSON.parse(
  12965. JSON.stringify(
  12966. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12967. itemTaskIndex
  12968. ].toolChoose[toolIndex].englishVoiceJson
  12969. )
  12970. )
  12971. : {
  12972. title: '',
  12973. detail: '',
  12974. array: []
  12975. };
  12976. // {
  12977. // time: "",
  12978. // class: "",
  12979. // difficulty: 0,
  12980. // topic: "",
  12981. // isShow: false,
  12982. // eva: 0,
  12983. // aiEva: {
  12984. // isAiEva: false,
  12985. // aiEvaChoose: [],
  12986. // },
  12987. // allfType: [],
  12988. // englishJson: {},
  12989. // };
  12990. this.$forceUpdate();
  12991. this.EnglishVoiceDialog = true;
  12992. }
  12993. },
  12994. setEnglishVoiceJson(val) {
  12995. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12996. this.taskCount
  12997. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  12998. JSON.stringify(val)
  12999. );
  13000. this.$forceUpdate();
  13001. if (
  13002. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13003. .toolChoose[this.toolIndex].tool != 70
  13004. ) {
  13005. this.addTools(70, this.taskCount, this.toolIndex);
  13006. }
  13007. },
  13008. chapAddTools(i) {
  13009. if (this.chapTools[0].tools.length == 0) {
  13010. this.chapTools[0].tools.push(i);
  13011. } else {
  13012. if (this.chapTools[0].tools.indexOf(i) != -1) {
  13013. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  13014. } else {
  13015. this.chapTools[0].tools.push(i);
  13016. }
  13017. }
  13018. this.$forceUpdate();
  13019. },
  13020. addChaptersDataTools() {
  13021. if (this.chapTools[0].tools.indexOf(4) != -1) {
  13022. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13023. this.chapCount
  13024. ].chapterData.unshift({
  13025. name: this.chapTools[0].toolDetail,
  13026. url: this.chapTools[0].tools,
  13027. type: 7,
  13028. askJson: this.askJson,
  13029. });
  13030. } else {
  13031. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13032. this.chapCount
  13033. ].chapterData.unshift({
  13034. name: this.chapTools[0].toolDetail,
  13035. url: this.chapTools[0].tools,
  13036. type: 7,
  13037. });
  13038. }
  13039. this.imgChange1(null, null, 7, this.chapCount);
  13040. this.dialogVisible4 = false;
  13041. },
  13042. addTools(i, itemTaskIndex, toolIndex) {
  13043. // if (
  13044. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13045. // .toolChoose[toolIndex].tool.length == 0
  13046. // ) {
  13047. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13048. // itemTaskIndex
  13049. // ].toolChoose[toolIndex].tool.push(i);
  13050. // } else {
  13051. // if (
  13052. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13053. // itemTaskIndex
  13054. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  13055. // ) {
  13056. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13057. // itemTaskIndex
  13058. // ].toolChoose[toolIndex].tool.splice(
  13059. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13060. // itemTaskIndex
  13061. // ].toolChoose[toolIndex].tool.indexOf(i),
  13062. // 1
  13063. // );
  13064. // } else {
  13065. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13066. // itemTaskIndex
  13067. // ].toolChoose[toolIndex].tool.push(i);
  13068. // }
  13069. // console.log(
  13070. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13071. // .toolChoose[toolIndex].tool
  13072. // );
  13073. // }
  13074. if (i == 4) {
  13075. if (
  13076. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13077. .toolChoose[toolIndex].askJson.askTitle == "" ||
  13078. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13079. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  13080. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13081. .toolChoose[toolIndex].askJson[0].checkList < 2
  13082. ) {
  13083. this.openTools(itemTaskIndex, 4, toolIndex);
  13084. // this.$message({
  13085. // message: "请填写完整问卷内容",
  13086. // type: "error",
  13087. // });
  13088. return;
  13089. }
  13090. }
  13091. if (i == 45) {
  13092. if (
  13093. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13094. .toolChoose[toolIndex].testJson ||
  13095. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13096. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  13097. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13098. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  13099. ) {
  13100. this.openTools(itemTaskIndex, 45, toolIndex);
  13101. // this.$message({
  13102. // message: "请填写完整问卷内容",
  13103. // type: "error",
  13104. // });
  13105. return;
  13106. }
  13107. }
  13108. if (i == 47) {
  13109. if (
  13110. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13111. .toolChoose[toolIndex].sentenceList ||
  13112. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13113. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  13114. ) {
  13115. this.openTools(itemTaskIndex, 47, toolIndex);
  13116. return;
  13117. }
  13118. }
  13119. if (i == 69) {
  13120. if (
  13121. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13122. .toolChoose[toolIndex].englishList
  13123. ) {
  13124. this.openTools(itemTaskIndex, 69, toolIndex);
  13125. return;
  13126. }
  13127. }
  13128. if (i == 70) {
  13129. if (
  13130. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13131. .toolChoose[toolIndex].englishVoiceJson
  13132. ) {
  13133. this.openTools(itemTaskIndex, 70, toolIndex);
  13134. return;
  13135. }
  13136. }
  13137. // if (i == 48) {
  13138. // if (
  13139. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13140. // .toolChoose[toolIndex].tableJson
  13141. // ) {
  13142. // this.openTools(itemTaskIndex, 48, toolIndex);
  13143. // return;
  13144. // }
  13145. // }
  13146. // if (i == 50) {
  13147. // if (
  13148. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13149. // .toolChoose[toolIndex].uploadJson
  13150. // ) {
  13151. // this.openTools(itemTaskIndex, 50, toolIndex);
  13152. // return;
  13153. // }
  13154. // }
  13155. if (i == 49) {
  13156. if (
  13157. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13158. .toolChoose[toolIndex].groupJson
  13159. ) {
  13160. this.openTools(itemTaskIndex, 49, toolIndex);
  13161. return;
  13162. }
  13163. }
  13164. if (i == 62) {
  13165. if (
  13166. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13167. .toolChoose[toolIndex].videoJson
  13168. ) {
  13169. this.openTools(itemTaskIndex, 62, toolIndex);
  13170. return;
  13171. }
  13172. }
  13173. if (i == 15) {
  13174. if (
  13175. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13176. .toolChoose[toolIndex].answerQ ||
  13177. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13178. .toolChoose[toolIndex].answerQ == ""
  13179. ) {
  13180. this.openTools(itemTaskIndex, 15, toolIndex);
  13181. // this.$message({
  13182. // message: "请填写问答内容",
  13183. // type: "error",
  13184. // });
  13185. return;
  13186. }
  13187. }
  13188. if (i == 40) {
  13189. if (
  13190. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13191. .toolChoose[toolIndex].rateJson ||
  13192. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13193. .toolChoose[toolIndex].rateJson.length
  13194. ) {
  13195. this.openTools(itemTaskIndex, 40, toolIndex);
  13196. return;
  13197. }
  13198. }
  13199. if (i == 41) {
  13200. if (
  13201. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13202. .toolChoose[toolIndex].selectJson ||
  13203. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13204. .toolChoose[toolIndex].selectJson.url == "" ||
  13205. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13206. .toolChoose[toolIndex].selectJson.select.length ||
  13207. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13208. .toolChoose[toolIndex].selectJson.answer.length
  13209. ) {
  13210. this.openTools(itemTaskIndex, 41, toolIndex);
  13211. return;
  13212. }
  13213. }
  13214. if (i == 42) {
  13215. if (
  13216. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13217. .toolChoose[toolIndex].answerQ ||
  13218. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13219. .toolChoose[toolIndex].answerQ == ""
  13220. ) {
  13221. this.openTools(itemTaskIndex, 42, toolIndex);
  13222. return;
  13223. }
  13224. }
  13225. if (
  13226. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13227. .toolChoose[toolIndex].tool.length > 0
  13228. ) {
  13229. if (
  13230. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13231. itemTaskIndex
  13232. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  13233. ) {
  13234. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13235. itemTaskIndex
  13236. ].toolChoose[toolIndex].tool.splice(
  13237. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13238. itemTaskIndex
  13239. ].toolChoose[toolIndex].tool.indexOf(i),
  13240. 1
  13241. );
  13242. } else {
  13243. // this.$message({
  13244. // message: "每个工具只能添加一个",
  13245. // type: "error",
  13246. // });
  13247. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13248. itemTaskIndex
  13249. ].toolChoose[toolIndex].tool = [];
  13250. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13251. itemTaskIndex
  13252. ].toolChoose[toolIndex].tool.push(i);
  13253. }
  13254. } else {
  13255. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13256. itemTaskIndex
  13257. ].toolChoose[toolIndex].tool.push(i);
  13258. }
  13259. this.$forceUpdate();
  13260. },
  13261. addAskList(index) {
  13262. this.askJson.askJson.splice(index + 1, 0, {
  13263. askstitle: "",
  13264. askItem: 1,
  13265. checkList: [],
  13266. });
  13267. this.askJson.askCount++;
  13268. },
  13269. addTestList(index) {
  13270. this.testJson.testJson.splice(index + 1, 0, {
  13271. teststitle: "",
  13272. testItem: 1,
  13273. checkList: [],
  13274. timuList: [],
  13275. answer: [],
  13276. type: "1",
  13277. });
  13278. this.testJson.testCount++;
  13279. },
  13280. deleteAskList(index) {
  13281. if (
  13282. !this.askJson.askJson[index].askstitle &&
  13283. this.askJson.askJson[index].askItem == 1 &&
  13284. !this.askJson.askJson[index].checkList[0]
  13285. ) {
  13286. this.askJson.askJson.splice(index, 1);
  13287. this.askJson.askCount--;
  13288. } else {
  13289. let _this = this;
  13290. _this
  13291. .$confirm("此操作不可撤销,是否继续?", "提示", {
  13292. confirmButtonText: "确定",
  13293. cancelButtonText: "取消",
  13294. type: "warning",
  13295. })
  13296. .then(() => {
  13297. _this.askJson.askJson.splice(index, 1);
  13298. _this.askJson.askCount--;
  13299. })
  13300. .catch(() => {
  13301. return;
  13302. });
  13303. }
  13304. },
  13305. deleteTestList(index) {
  13306. if (
  13307. !this.testJson.testJson[index].teststitle &&
  13308. this.testJson.testJson[index].testItem == 1 &&
  13309. !this.testJson.testJson[index].checkList[0]
  13310. ) {
  13311. this.testJson.testJson.splice(index, 1);
  13312. this.testJson.testCount--;
  13313. } else {
  13314. let _this = this;
  13315. _this
  13316. .$confirm("此操作不可撤销,是否继续?", "提示", {
  13317. confirmButtonText: "确定",
  13318. cancelButtonText: "取消",
  13319. type: "warning",
  13320. })
  13321. .then(() => {
  13322. _this.testJson.testJson.splice(index, 1);
  13323. _this.testJson.testCount--;
  13324. })
  13325. .catch(() => {
  13326. return;
  13327. });
  13328. }
  13329. },
  13330. askMove(type, index) {
  13331. if (type == 1) {
  13332. if (index > 0) {
  13333. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  13334. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  13335. this.askJson.askJson[index - 1] = b;
  13336. this.askJson.askJson[index] = a;
  13337. }
  13338. } else {
  13339. if (index < this.askJson.askJson.length - 1) {
  13340. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  13341. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  13342. this.askJson.askJson[index + 1] = b;
  13343. this.askJson.askJson[index] = a;
  13344. }
  13345. }
  13346. this.$forceUpdate();
  13347. },
  13348. checkMove(type, index, checkIndex) {
  13349. if (type == 1) {
  13350. if (checkIndex > 0) {
  13351. let a = JSON.parse(
  13352. JSON.stringify(
  13353. this.askJson.askJson[index].checkList[checkIndex - 1]
  13354. )
  13355. );
  13356. let b = JSON.parse(
  13357. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  13358. );
  13359. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  13360. this.askJson.askJson[index].checkList[checkIndex] = a;
  13361. }
  13362. } else {
  13363. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  13364. let a = JSON.parse(
  13365. JSON.stringify(
  13366. this.askJson.askJson[index].checkList[checkIndex + 1]
  13367. )
  13368. );
  13369. let b = JSON.parse(
  13370. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  13371. );
  13372. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  13373. this.askJson.askJson[index].checkList[checkIndex] = a;
  13374. }
  13375. }
  13376. this.$forceUpdate();
  13377. },
  13378. testMove(type, index) {
  13379. if (type == 1) {
  13380. if (index > 0) {
  13381. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  13382. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  13383. this.testJson.testJson[index - 1] = b;
  13384. this.testJson.testJson[index] = a;
  13385. }
  13386. } else {
  13387. if (index < this.testJson.testJson.length - 1) {
  13388. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  13389. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  13390. this.testJson.testJson[index + 1] = b;
  13391. this.testJson.testJson[index] = a;
  13392. }
  13393. }
  13394. this.$forceUpdate();
  13395. },
  13396. tcheckMove(type, index, checkIndex) {
  13397. if (type == 1) {
  13398. if (checkIndex > 0) {
  13399. let a = JSON.parse(
  13400. JSON.stringify(
  13401. this.testJson.testJson[index].checkList[checkIndex - 1]
  13402. )
  13403. );
  13404. let b = JSON.parse(
  13405. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  13406. );
  13407. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  13408. this.testJson.testJson[index].checkList[checkIndex] = a;
  13409. }
  13410. } else {
  13411. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  13412. let a = JSON.parse(
  13413. JSON.stringify(
  13414. this.testJson.testJson[index].checkList[checkIndex + 1]
  13415. )
  13416. );
  13417. let b = JSON.parse(
  13418. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  13419. );
  13420. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  13421. this.testJson.testJson[index].checkList[checkIndex] = a;
  13422. }
  13423. }
  13424. this.$forceUpdate();
  13425. },
  13426. addcheckList(json, index) {
  13427. // json.checkList.length++;
  13428. json.checkList.splice(index + 1, 0, "");
  13429. json.askItem++;
  13430. this.$forceUpdate();
  13431. },
  13432. deletecheckList(json, index) {
  13433. // json.checkList.length--;
  13434. json.checkList.splice(index, 1);
  13435. json.askItem--;
  13436. this.$forceUpdate();
  13437. },
  13438. addTcheckList(json, index) {
  13439. // json.checkList.length++;
  13440. json.checkList.splice(index + 1, 0, "");
  13441. json.testItem++;
  13442. this.$forceUpdate();
  13443. },
  13444. deleteTcheckList(json, index) {
  13445. // json.checkList.length--;
  13446. json.checkList.splice(index, 1);
  13447. json.testItem--;
  13448. this.$forceUpdate();
  13449. },
  13450. checkTestType(type, json) {
  13451. json.type = type;
  13452. setTimeout(() => {
  13453. json.answer = [];
  13454. }, 100);
  13455. },
  13456. checkAskType(type, json) {
  13457. json.type = type;
  13458. // json.checkList = [];
  13459. this.$forceUpdate();
  13460. },
  13461. addSelectList(json) {
  13462. json.select.push("");
  13463. json.answer.push("");
  13464. },
  13465. deleteSelectList(json) {
  13466. // json.select.length--;
  13467. // json.answer.length--;
  13468. json.select.splice(json.select.length - 1, 1);
  13469. json.answer.splice(json.answer.length - 1, 1);
  13470. },
  13471. addAsk() {
  13472. if (this.askJson.askTitle === "") {
  13473. this.$message.error("标题不能为空!");
  13474. return;
  13475. }
  13476. var aj = this.askJson.askJson;
  13477. var b = 1;
  13478. for (var i = 0; i < aj.length; i++) {
  13479. if (aj[i].askstitle === "") {
  13480. var a = 1;
  13481. for (let index = 0; index < aj[i].askItem; index++) {
  13482. const element = aj[i].checkList[index]
  13483. ? aj[i].checkList[index]
  13484. : "";
  13485. if (element != "") {
  13486. b++;
  13487. this.$message.error(`请将题目${i + 1}填写完整。`);
  13488. return;
  13489. } else {
  13490. a++;
  13491. }
  13492. }
  13493. if (b == 1) {
  13494. this.$message.error("至少填写一个问题");
  13495. return;
  13496. }
  13497. } else if (aj[i].askstitle != "") {
  13498. for (let index = 0; index < aj[i].askItem; index++) {
  13499. const element = aj[i].checkList[index]
  13500. ? aj[i].checkList[index]
  13501. : "";
  13502. var index = 0;
  13503. for (var z = 0; z < aj[i].checkList.length; z++) {
  13504. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13505. if (checkC != "") {
  13506. index++;
  13507. } else {
  13508. this.$message.error(`题目${i + 1}选项不能为空!`);
  13509. return;
  13510. }
  13511. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13512. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13513. if (checkC == checkC2) {
  13514. this.$message.error(
  13515. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13516. );
  13517. return;
  13518. }
  13519. }
  13520. }
  13521. b++;
  13522. if (index < 2) {
  13523. this.$message.error("每道题目至少需要设置2个选项。");
  13524. return;
  13525. }
  13526. }
  13527. }
  13528. }
  13529. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  13530. var elc = el.checkList.filter((element) => {
  13531. return element != "";
  13532. });
  13533. return el.askstitle != "" && elc.length != 0;
  13534. });
  13535. if (!this.dialogVisible4) {
  13536. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13537. this.taskCount
  13538. ].toolChoose[this.toolIndex] = this.askJson;
  13539. }
  13540. this.dialogVisible5 = false;
  13541. if (
  13542. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13543. .toolChoose[this.toolIndex].tool != 4
  13544. ) {
  13545. this.addTools(4, this.taskCount, this.toolIndex);
  13546. }
  13547. },
  13548. addTest() {
  13549. // if (this.testJson.testTitle === "") {
  13550. // this.$message.error("标题不能为空!");
  13551. // return;
  13552. // }
  13553. var aj = this.testJson.testJson;
  13554. var b = 1;
  13555. for (var i = 0; i < aj.length; i++) {
  13556. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  13557. var a = 1;
  13558. for (let index = 0; index < aj[i].testItem; index++) {
  13559. const element = aj[i].checkList[index]
  13560. ? aj[i].checkList[index]
  13561. : "";
  13562. if (element != "") {
  13563. b++;
  13564. this.$message.error(`请将题目${i + 1}填写完整。`);
  13565. return;
  13566. } else {
  13567. a++;
  13568. }
  13569. }
  13570. if (b == 1) {
  13571. this.$message.error("至少填写一个问题");
  13572. return;
  13573. }
  13574. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  13575. for (let index = 0; index < aj[i].testItem; index++) {
  13576. const element = aj[i].checkList[index]
  13577. ? aj[i].checkList[index]
  13578. : "";
  13579. var index = 0;
  13580. for (var z = 0; z < aj[i].checkList.length; z++) {
  13581. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13582. if (checkC != "") {
  13583. index++;
  13584. } else {
  13585. this.$message.error(`题目${i + 1}选项不能为空!`);
  13586. return;
  13587. }
  13588. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13589. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13590. if (checkC == checkC2) {
  13591. this.$message.error(
  13592. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13593. );
  13594. return;
  13595. }
  13596. }
  13597. }
  13598. b++;
  13599. if (index < 2) {
  13600. this.$message.error("每道题目至少需要设置2个选项。");
  13601. return;
  13602. }
  13603. if (
  13604. (aj[i].type == "2" && !aj[i].answer.length) ||
  13605. (aj[i].type == "1" &&
  13606. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  13607. (aj[i].answer !== 0 && !aj[i].answer)))
  13608. ) {
  13609. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  13610. return;
  13611. }
  13612. }
  13613. }
  13614. }
  13615. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13616. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13617. var elc = el.checkList.filter((element) => {
  13618. return element != "";
  13619. });
  13620. return (
  13621. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  13622. );
  13623. });
  13624. isTestJson.testCount = isTestJson.testJson.length;
  13625. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13626. this.taskCount
  13627. ].toolChoose[this.toolIndex].testJson = isTestJson;
  13628. this.dialogVisibleChoice = false;
  13629. if (
  13630. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13631. .toolChoose[this.toolIndex].tool != 45
  13632. ) {
  13633. this.addTools(45, this.taskCount, this.toolIndex);
  13634. }
  13635. },
  13636. addVideoJson(videoJson) {
  13637. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13638. this.taskCount
  13639. ].toolChoose[this.toolIndex].videoJson = videoJson;
  13640. this.dialogVisibleVideo = false;
  13641. if (
  13642. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13643. .toolChoose[this.toolIndex].tool != 62
  13644. ) {
  13645. this.addTools(62, this.taskCount, this.toolIndex);
  13646. }
  13647. },
  13648. //自动获取剪贴板
  13649. pasteOption() {
  13650. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13651. if (!iframe) {
  13652. this.$message.error("请使用AI共创生成题目");
  13653. return;
  13654. }
  13655. let copyData = iframe.contentWindow.copyData;
  13656. if (!copyData || !copyData.selectData.length) {
  13657. this.$message.error("请使用AI共创生成题目");
  13658. return;
  13659. }
  13660. let selectData = copyData.selectData;
  13661. for (var i = 0; i < selectData.length; i++) {
  13662. let answer = 0;
  13663. switch (selectData[i].answer[0]) {
  13664. case "A":
  13665. answer = 0;
  13666. break;
  13667. case "B":
  13668. answer = 1;
  13669. break;
  13670. case "C":
  13671. answer = 2;
  13672. break;
  13673. case "D":
  13674. answer = 3;
  13675. break;
  13676. case "E":
  13677. answer = 4;
  13678. break;
  13679. default:
  13680. break;
  13681. }
  13682. this.testJson.testJson.push({
  13683. teststitle: selectData[i].subject,
  13684. testItem: selectData[i].options.length,
  13685. checkList: selectData[i].options,
  13686. timuList: [],
  13687. answer: answer,
  13688. type: "1",
  13689. });
  13690. this.testJson.testCount++;
  13691. }
  13692. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13693. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13694. var elc = el.checkList.filter((element) => {
  13695. return element != "";
  13696. });
  13697. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  13698. });
  13699. isTestJson.testCount = isTestJson.testJson.length;
  13700. if (!isTestJson.testCount) {
  13701. return;
  13702. }
  13703. this.testJson = isTestJson;
  13704. this.$forceUpdate();
  13705. },
  13706. pasteTask(taskJson) {
  13707. let stageTasksData = [];
  13708. if (taskJson) {
  13709. stageTasksData = taskJson;
  13710. } else {
  13711. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13712. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13713. if (!iframe && !iframe2) {
  13714. this.$message.error("请使用AI共创生成");
  13715. return;
  13716. }
  13717. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13718. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13719. if (
  13720. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  13721. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  13722. ) {
  13723. this.$message.error("请使用AI共创生成");
  13724. return;
  13725. }
  13726. stageTasksData = copyData
  13727. ? copyData.tasksData
  13728. : copyData2
  13729. ? copyData2.tasksData
  13730. : [{ taskName: "", taskDecs: "" }];
  13731. }
  13732. let taskA = [];
  13733. let tasks = stageTasksData;
  13734. for (var j = 0; j < tasks.length; j++) {
  13735. taskA.push({
  13736. task: tasks[j].taskName,
  13737. taskDetail: tasks[j].taskDecs,
  13738. chapterData: [],
  13739. toolText: "",
  13740. toolChoose: [
  13741. {
  13742. tool: [],
  13743. toolDetail: "",
  13744. toolType: 0,
  13745. askCount: 1,
  13746. askTitle: "",
  13747. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13748. },
  13749. ],
  13750. isShowTools: false,
  13751. askCount: 1,
  13752. isFold: 1,
  13753. askTitle: "",
  13754. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13755. checkJson: [{ checkCount: [], checkPerent: [] }],
  13756. homeworkList: [],
  13757. });
  13758. }
  13759. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  13760. this.$forceUpdate();
  13761. },
  13762. pasteStage(stageJson) {
  13763. let stageData = [];
  13764. if (stageJson) {
  13765. stageData = stageJson;
  13766. } else {
  13767. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13768. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13769. if (!iframe && !iframe2) {
  13770. this.$message.error("请使用AI共创生成");
  13771. return;
  13772. }
  13773. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13774. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13775. if (
  13776. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  13777. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  13778. ) {
  13779. this.$message.error("请使用AI共创生成");
  13780. return;
  13781. }
  13782. stageData = copyData
  13783. ? copyData.stageData
  13784. : copyData2
  13785. ? copyData2.stageData
  13786. : [""];
  13787. }
  13788. let stage = [];
  13789. for (var i = 0; i < stageData.length; i++) {
  13790. stage.push({
  13791. dyName: stageData[i], //单元标题
  13792. chapterInfo: [
  13793. {
  13794. isread: false,
  13795. chapterid: this.guid(),
  13796. title: "",
  13797. courseName: "",
  13798. taskJson: [
  13799. {
  13800. task: "",
  13801. taskDetail: "",
  13802. chapterData: [],
  13803. toolText: "",
  13804. toolChoose: [
  13805. {
  13806. tool: [],
  13807. toolDetail: "",
  13808. toolType: 0,
  13809. askCount: 1,
  13810. askTitle: "",
  13811. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13812. },
  13813. ],
  13814. isShowTools: false,
  13815. askCount: 1,
  13816. isFold: 1,
  13817. askTitle: "",
  13818. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  13819. checkJson: [{ checkCount: [], checkPerent: [] }],
  13820. homeworkList: [],
  13821. },
  13822. ],
  13823. itemCount: 1,
  13824. fileList1: [],
  13825. video: [],
  13826. testData: [],
  13827. pData: [],
  13828. templateArray: [],
  13829. },
  13830. ],
  13831. });
  13832. }
  13833. let _this = this;
  13834. if (stageJson) {
  13835. if (!_this.cid) {
  13836. _this.unitJson = stage;
  13837. } else {
  13838. _this.unitIndex = 0;
  13839. _this.unitJson = stage;
  13840. _this.updateWork();
  13841. }
  13842. } else {
  13843. _this
  13844. .$confirm(
  13845. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  13846. "提示",
  13847. {
  13848. confirmButtonText: "确定",
  13849. cancelButtonText: "取消",
  13850. type: "warning",
  13851. }
  13852. )
  13853. .then(() => {
  13854. _this.unitIndex = 0;
  13855. _this.unitJson = stage;
  13856. // _this.steps++;
  13857. _this.updateWork();
  13858. })
  13859. .catch(() => {
  13860. return;
  13861. });
  13862. }
  13863. },
  13864. openStageBox() {
  13865. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  13866. this.dialogVisibleStageChange = true;
  13867. },
  13868. updateChange() {
  13869. this.$confirm(
  13870. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  13871. "提示",
  13872. {
  13873. confirmButtonText: "确定",
  13874. cancelButtonText: "取消",
  13875. type: "warning",
  13876. }
  13877. )
  13878. .then(() => {
  13879. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  13880. this.updateWork();
  13881. this.dialogVisibleStageChange = false;
  13882. })
  13883. .catch(() => {
  13884. return;
  13885. });
  13886. },
  13887. addAnswer() {
  13888. if (this.answerQ == "") {
  13889. this.$message.error("请输入您想要问的问题");
  13890. return;
  13891. }
  13892. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13893. this.taskCount
  13894. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13895. this.dialogVisible8 = false;
  13896. if (
  13897. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13898. .toolChoose[this.toolIndex].tool != 15
  13899. ) {
  13900. this.addTools(15, this.taskCount, this.toolIndex);
  13901. }
  13902. },
  13903. addMp3Answer() {
  13904. if (this.answerQ == "") {
  13905. this.$message.error("请输入您想要回答的问题");
  13906. return;
  13907. }
  13908. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13909. this.taskCount
  13910. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  13911. this.dialogVisibleMp3 = false;
  13912. },
  13913. addRateAnswer() {
  13914. var a = 1;
  13915. for (var i = 0; i < this.rateJson.length; i++) {
  13916. if (this.rateJson[i].value == "") {
  13917. a = 2;
  13918. break;
  13919. }
  13920. }
  13921. if (a == 2) {
  13922. this.$message.error("请把评价信息填写完整");
  13923. return;
  13924. }
  13925. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13926. this.taskCount
  13927. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  13928. this.dialogVisibleRate = false;
  13929. if (
  13930. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13931. .toolChoose[this.toolIndex].tool != 40
  13932. ) {
  13933. this.addTools(40, this.taskCount, this.toolIndex);
  13934. }
  13935. },
  13936. addSelectAnswer() {
  13937. if (this.selectJson.url == "") {
  13938. this.$message.error("请上传题目");
  13939. return;
  13940. }
  13941. if (!this.selectJson.select.length) {
  13942. this.$message.error("请添加选项");
  13943. return;
  13944. }
  13945. if (!this.selectJson.answer.length) {
  13946. this.$message.error("请设置答案");
  13947. return;
  13948. }
  13949. var a = 1;
  13950. for (var i = 0; i < this.selectJson.answer.length; i++) {
  13951. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  13952. a = 2;
  13953. }
  13954. }
  13955. if (a == 2) {
  13956. this.$message.error("请设置答案");
  13957. return;
  13958. }
  13959. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13960. this.taskCount
  13961. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  13962. this.dialogVisibleSelect = false;
  13963. if (
  13964. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13965. .toolChoose[this.toolIndex].tool != 41
  13966. ) {
  13967. this.addTools(41, this.taskCount, this.toolIndex);
  13968. }
  13969. },
  13970. nextSelectSteps() {
  13971. if (this.selectJson.url == "") {
  13972. this.$message.error("请上传题目");
  13973. return;
  13974. }
  13975. if (!this.selectJson.select.length) {
  13976. this.$message.error("请添加选项");
  13977. return;
  13978. } else {
  13979. for (var z = 0; z < this.selectJson.select.length; z++) {
  13980. let checkC = this.selectJson.select[z];
  13981. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  13982. let checkC2 = this.selectJson.select[z2];
  13983. if (checkC == checkC2) {
  13984. this.$message.error(
  13985. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13986. );
  13987. return;
  13988. }
  13989. }
  13990. }
  13991. }
  13992. var a = 1;
  13993. for (var i = 0; i < this.selectJson.select.length; i++) {
  13994. if (!this.selectJson.select[i]) {
  13995. a = 2;
  13996. }
  13997. }
  13998. if (a == 2) {
  13999. this.$message.error("添加的选项不能为空");
  14000. return;
  14001. }
  14002. this.selectSteps++;
  14003. },
  14004. selectCourseDetail() {
  14005. if (this.cid == "" || this.cid == undefined) {
  14006. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  14007. this.isTeacherSee = true;
  14008. }
  14009. console.log("这是新增课程");
  14010. this.selectAllType();
  14011. this.chatid = uuidv4();
  14012. // this.courseTextB = false
  14013. } else {
  14014. this.isOutline = true
  14015. this.isOutline2 = true
  14016. this.cpoteType = 4
  14017. this.cidType = 1;
  14018. let params = {
  14019. cid: this.cid,
  14020. };
  14021. this.ajax
  14022. .get(this.$store.state.api + "select_course_detail", params)
  14023. .then((res) => {
  14024. this.unitJson = JSON.parse(res.data[0][0].chapters);
  14025. this.courseState = res.data[0][0].state;
  14026. for (var j = 0; j < this.unitJson.length; j++) {
  14027. for (
  14028. var k = 0;
  14029. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  14030. k++
  14031. ) {
  14032. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  14033. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14034. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14035. : [];
  14036. let _chapterData = [];
  14037. for (
  14038. var c = 0;
  14039. c <
  14040. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  14041. .length;
  14042. c++
  14043. ) {
  14044. if (
  14045. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14046. ) {
  14047. _chapterData.push(
  14048. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14049. );
  14050. }
  14051. }
  14052. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  14053. _chapterData;
  14054. }
  14055. }
  14056. this.$forceUpdate();
  14057. this.courseName = res.data[0][0].title;
  14058. this.courseText = res.data[0][0].brief;
  14059. this.courseText2 = res.data[0][0].reBrief;
  14060. this.evalua = res.data[0][0].evaId;
  14061. this.cover = JSON.parse(res.data[0][0].cover);
  14062. this.noneBtnImg = this.cover.length >= 1;
  14063. if (res.data[0][0].refile) {
  14064. this.infoData = JSON.parse(res.data[0][0].refile)
  14065. }
  14066. // this.checkboxList =
  14067. // res.data[0][0].course_student.length > 0
  14068. // ? JSON.parse(res.data[0][0].course_student)
  14069. // : [];
  14070. this.checkboxList2 = res.data[0][0].juri
  14071. ? res.data[0][0].juri.split(",")
  14072. : [];
  14073. this.inviteCode = [];
  14074. for (var i = 0; i < res.data[2].length; i++) {
  14075. this.inviteCode.push({
  14076. cid: res.data[2][i].classid,
  14077. ic: res.data[2][i].code,
  14078. });
  14079. }
  14080. this.checkboxList3 = res.data[0][0].course_teacher
  14081. ? res.data[0][0].course_teacher.split(",")
  14082. : [];
  14083. // this.isTeacherSee =
  14084. // res.data[0][0].is_teacher_look == 0 ? true : false;
  14085. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  14086. this.myWord = res.data[0][0].template;
  14087. this.templateC.id = "123";
  14088. this.courseUserid = res.data[0][0].userid;
  14089. // if(this.courseUserid == this.userid){
  14090. // this.InviteChange(this.checkboxList2)
  14091. // }
  14092. this.nbOrder = res.data[0][0].ordernumber;
  14093. this.courseTypeId = [];
  14094. for (var i = 0; i < res.data[1].length; i++) {
  14095. this.courseTypeId.push(res.data[1][i].typeid);
  14096. }
  14097. console.log(this.courseTypeId);
  14098. // if (this.timer) clearInterval(this.timer);
  14099. if (this.timer) clearTimeout(this.timer);
  14100. this.timer = null;
  14101. // this.timer = setInterval(() => {
  14102. if(res.data[3].length){
  14103. try {
  14104. this.aiJson = JSON.parse(res.data[3][0].tips);
  14105. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  14106. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  14107. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14108. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  14109. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  14110. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14111. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  14112. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  14113. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  14114. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  14115. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  14116. }
  14117. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  14118. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  14119. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  14120. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14121. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14122. this.templateid = res.data[3][0].template;
  14123. }catch(error){
  14124. console.error(error)
  14125. }
  14126. }
  14127. if(res.data[0][0].cpote){
  14128. try {
  14129. this.cpote = JSON.parse(res.data[0][0].cpote);
  14130. }catch(error){
  14131. console.error(error)
  14132. }
  14133. }
  14134. if(res.data[0][0].setting){
  14135. try {
  14136. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14137. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14138. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  14139. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14140. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14141. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14142. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14143. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14144. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14145. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  14146. 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;
  14147. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14148. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14149. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14150. 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;
  14151. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14152. this.courseTextBool = true
  14153. }
  14154. // if(!this.teacherCourseText && !this.targetCourseText2){
  14155. // this.isuseT = 1
  14156. // }
  14157. }catch(error){
  14158. console.error(error)
  14159. }
  14160. }
  14161. if(this.courseText){
  14162. this.courseTextB = false
  14163. }
  14164. if(this.teacherCourseText){
  14165. this.teacherCourseTextB = false
  14166. }
  14167. if(this.targetCourseText){
  14168. this.targetCourseTextB = false
  14169. }
  14170. if(this.targetCourseText2){
  14171. this.targetCourseText2B = false
  14172. }
  14173. this.isFileSearch = res.data[0][0].iresearch == 1
  14174. // this.seleteCourseUpdate();
  14175. this.setMan();
  14176. this.selectAllType();
  14177. this.unitJson[
  14178. this.unitIndex
  14179. ].chapterInfo[0].taskJson[0].toolOpen = true;
  14180. // }, 5000);
  14181. this.$forceUpdate();
  14182. setTimeout(() => {
  14183. this.checkEva(this.evalua);
  14184. setTimeout(() => {
  14185. this.checkEva(this.evalua);
  14186. }, 100);
  14187. }, 100);
  14188. })
  14189. .catch((err) => {
  14190. console.error(err);
  14191. });
  14192. }
  14193. if(this.aiId){
  14194. let params = {
  14195. cid: this.aiId,
  14196. };
  14197. this.ajax
  14198. .get(this.$store.state.api + "select_course_detail", params)
  14199. .then((res) => {
  14200. let _unitJson = JSON.parse(res.data[0][0].chapters);
  14201. let fileInfo = []
  14202. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  14203. for(var i = 0; i < _unitJson.length; i++){
  14204. let tasks = _unitJson[i].chapterInfo[0].taskJson
  14205. for(var j = 0; j < tasks.length; j++){
  14206. let _infoData = tasks[j].chapterData.filter(el => {
  14207. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  14208. })
  14209. if(_infoData.length){
  14210. fileInfo = [...fileInfo, ..._infoData]
  14211. }
  14212. }
  14213. }
  14214. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  14215. this.$forceUpdate();
  14216. this.courseName = res.data[0][0].title;
  14217. this.courseText = res.data[0][0].brief;
  14218. this.courseText2 = res.data[0][0].reBrief;
  14219. this.cover = JSON.parse(res.data[0][0].cover);
  14220. this.noneBtnImg = this.cover.length >= 1;
  14221. this.checkboxList2 = res.data[0][0].juri
  14222. ? res.data[0][0].juri.split(",")
  14223. : [];
  14224. this.inviteCode = [];
  14225. for (var i = 0; i < res.data[2].length; i++) {
  14226. this.inviteCode.push({
  14227. cid: res.data[2][i].classid,
  14228. ic: res.data[2][i].code,
  14229. });
  14230. }
  14231. this.checkboxList3 = res.data[0][0].course_teacher
  14232. ? res.data[0][0].course_teacher.split(",")
  14233. : [];
  14234. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  14235. this.myWord = res.data[0][0].template;
  14236. this.templateC.id = "123";
  14237. this.courseTypeId = [];
  14238. for (var i = 0; i < res.data[1].length; i++) {
  14239. this.courseTypeId.push(res.data[1][i].typeid);
  14240. }
  14241. console.log(this.courseTypeId);
  14242. if(res.data[3].length){
  14243. try {
  14244. this.aiJson = JSON.parse(res.data[3][0].tips);
  14245. this.templateid = res.data[3][0].template;
  14246. }catch(error){
  14247. console.error(error)
  14248. }
  14249. }
  14250. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  14251. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  14252. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14253. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  14254. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  14255. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14256. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  14257. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  14258. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  14259. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  14260. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  14261. }
  14262. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  14263. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  14264. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  14265. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14266. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14267. if(res.data[0][0].cpote){
  14268. try {
  14269. this.cpote = JSON.parse(res.data[0][0].cpote);
  14270. }catch(error){
  14271. console.error(error)
  14272. }
  14273. }
  14274. if(res.data[0][0].setting){
  14275. try {
  14276. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14277. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14278. 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];
  14279. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14280. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14281. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14282. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14283. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14284. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14285. 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];
  14286. 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;
  14287. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14288. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14289. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14290. 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;
  14291. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14292. this.courseTextBool = true
  14293. }
  14294. // if(!this.teacherCourseText && !this.targetCourseText2){
  14295. // this.isuseT = 1
  14296. // }
  14297. }catch(error){
  14298. console.error(error)
  14299. }
  14300. }
  14301. if(this.teacherInfoData.length){
  14302. this.isuseT = true
  14303. }
  14304. if(this.courseText){
  14305. this.courseTextB = false
  14306. }
  14307. if(this.teacherCourseText){
  14308. this.teacherCourseTextB = false
  14309. }
  14310. if(this.targetCourseText){
  14311. this.targetCourseTextB = false
  14312. }
  14313. if(this.targetCourseText2){
  14314. this.targetCourseText2B = false
  14315. }
  14316. this.setMan();
  14317. this.unitJson[
  14318. this.unitIndex
  14319. ].chapterInfo[0].taskJson[0].toolOpen = true;
  14320. this.$forceUpdate();
  14321. setTimeout(() => {
  14322. this.checkEva(this.evalua);
  14323. setTimeout(() => {
  14324. this.checkEva(this.evalua);
  14325. }, 100);
  14326. }, 100);
  14327. })
  14328. .catch((err) => {
  14329. console.error(err);
  14330. });
  14331. }
  14332. // if(this.cidType != 1 && this.templateid == ''){
  14333. // this.promptShow = true
  14334. // }
  14335. },
  14336. seleteCourseUpdate() {
  14337. let params = {
  14338. cid: this.cid,
  14339. };
  14340. this.ajax
  14341. .get(this.$store.state.api + "select_course_detail", params)
  14342. .then((res) => {
  14343. // console.log(this.unitJson);
  14344. let unitJson = JSON.parse(res.data[0][0].chapters);
  14345. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  14346. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  14347. let _unitJson = [];
  14348. let _chapAarry = [];
  14349. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  14350. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  14351. let index = 1;
  14352. let chapindex;
  14353. if (_unitJson2.length > unitJson.length) {
  14354. for (let c = 0; c < _unitJson2.length; c++) {
  14355. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  14356. }
  14357. for (let j = 0; j < unitJson.length; j++) {
  14358. let count = 0;
  14359. for (let k = 0; k < _unitJson2.length; k++) {
  14360. if (
  14361. unitJson[j].chapterInfo[0].chapterid ==
  14362. _unitJson2[k].chapterInfo[0].chapterid
  14363. ) {
  14364. count++;
  14365. _chapAarry.splice(
  14366. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  14367. 1
  14368. );
  14369. _unitJson.push(unitJson[j]);
  14370. break;
  14371. }
  14372. }
  14373. // if(count === 0){
  14374. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  14375. // }
  14376. }
  14377. for (let k = 0; k < _unitJson2.length; k++) {
  14378. if (_unitJson2[k].isUpdate == 1) {
  14379. _chapAarry.splice(
  14380. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  14381. 1
  14382. );
  14383. _unitJson.push(_unitJson2[k]);
  14384. }
  14385. }
  14386. console.log(_chapAarry);
  14387. for (let d = 0; d < _unitJson2.length; d++) {
  14388. if (
  14389. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  14390. ) {
  14391. if (_unitIndex == d) {
  14392. index = 2;
  14393. }
  14394. chapindex = d;
  14395. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  14396. }
  14397. }
  14398. } else {
  14399. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  14400. }
  14401. for (let i = 0; i < unitJson.length; i++) {
  14402. if (
  14403. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  14404. _unitJson[i].chapterInfo[0].chapterid !=
  14405. unitJson[i].chapterInfo[0].chapterid
  14406. ) {
  14407. if (i == _unitJson.length - 1) {
  14408. // this.unitIndex++
  14409. _unitIndex2++;
  14410. }
  14411. _unitJson.splice(i, 0, unitJson[i]);
  14412. } else if (i > _unitJson.length - 1) {
  14413. _unitJson.push(unitJson[i]);
  14414. } else if (
  14415. _unitJson[i].chapterInfo[0].chapterid ==
  14416. unitJson[i].chapterInfo[0].chapterid
  14417. ) {
  14418. _unitJson[i] = unitJson[i];
  14419. }
  14420. // if (i == _unitIndex) {
  14421. // continue;
  14422. // } else
  14423. }
  14424. if (_chapAarry.length && index != 2) {
  14425. if (chapindex < _unitIndex) {
  14426. this.isDelete = 2;
  14427. // this.unitIndex--;
  14428. _unitIndex2--;
  14429. } else if (
  14430. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  14431. _unitJson[_unitIndex].chapterInfo[0].chapterid
  14432. ) {
  14433. this.isDelete = 2;
  14434. for (let n = 0; n < _unitJson.length; n++) {
  14435. if (
  14436. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  14437. _unitJson[n].chapterInfo[0].chapterid
  14438. ) {
  14439. // this.unitIndex = n;
  14440. _unitIndex2 = n;
  14441. _unitJson[n] = _unitJson2[_unitIndex];
  14442. break;
  14443. }
  14444. }
  14445. }
  14446. } else if (index != 2) {
  14447. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  14448. _unitJson2[_unitIndex];
  14449. for (
  14450. var ci = 0;
  14451. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  14452. ci++
  14453. ) {
  14454. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  14455. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  14456. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14457. .toolChoose
  14458. : [];
  14459. let _chapterData = [];
  14460. for (
  14461. var c = 0;
  14462. c <
  14463. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  14464. .length;
  14465. c++
  14466. ) {
  14467. if (
  14468. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14469. .chapterData[c]
  14470. ) {
  14471. _chapterData.push(
  14472. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14473. .chapterData[c]
  14474. );
  14475. }
  14476. }
  14477. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  14478. _chapterData;
  14479. }
  14480. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  14481. }
  14482. if (index == 1) {
  14483. this.unitJson = _unitJson;
  14484. this.$forceUpdate();
  14485. setTimeout(() => {
  14486. if (this.unitIndex != _unitIndex2) {
  14487. this.isDelete = 2;
  14488. this.unitIndex = _unitIndex2;
  14489. }
  14490. }, 0);
  14491. this.timer = setTimeout(() => {
  14492. this.seleteCourseUpdate();
  14493. }, 1000);
  14494. } else if (index == 2) {
  14495. let _this = this;
  14496. _this
  14497. .$confirm(
  14498. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  14499. "提示",
  14500. {
  14501. confirmButtonText: "需要",
  14502. cancelButtonText: "取消",
  14503. type: "warning",
  14504. }
  14505. )
  14506. .then(() => {
  14507. if (_this.time()) {
  14508. _this.restoreWork(
  14509. _chapAarry[0],
  14510. _unitJson,
  14511. chapindex,
  14512. _unitJson2,
  14513. _unitIndex2
  14514. );
  14515. }
  14516. })
  14517. .catch(() => {
  14518. _this.unitJson = _unitJson;
  14519. _this.$forceUpdate();
  14520. setTimeout(() => {
  14521. if (this.unitIndex != _unitIndex2) {
  14522. this.isDelete = 2;
  14523. this.unitIndex = _unitIndex2;
  14524. }
  14525. }, 0);
  14526. _this.timer = setTimeout(() => {
  14527. _this.seleteCourseUpdate();
  14528. }, 1000);
  14529. });
  14530. }
  14531. // 在复制操作之前记录滚动位置
  14532. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14533. // 执行复制操作
  14534. // 复制操作完成后恢复滚动位置
  14535. this.$nextTick(() => {
  14536. if (this.$refs.scrollContainer) {
  14537. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14538. }
  14539. });
  14540. })
  14541. .catch((err) => {
  14542. console.error(err);
  14543. });
  14544. },
  14545. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  14546. let params = [
  14547. {
  14548. cid: this.cid,
  14549. chapters: JSON.stringify(this.unitJson),
  14550. uid: this.userid,
  14551. chapid: chapid,
  14552. },
  14553. ];
  14554. this.ajax
  14555. .post(this.$store.state.api + "restoreWork", params)
  14556. .then((res) => {
  14557. this.$message({
  14558. message: "恢复成功",
  14559. type: "success",
  14560. });
  14561. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  14562. this.unitJson = unitJson;
  14563. this.$forceUpdate();
  14564. setTimeout(() => {
  14565. if (this.unitIndex != unitIndex2) {
  14566. this.isDelete = 2;
  14567. this.unitIndex = unitIndex2;
  14568. }
  14569. }, 0);
  14570. this.timer = setTimeout(() => {
  14571. this.seleteCourseUpdate();
  14572. }, 1000);
  14573. })
  14574. .catch((err) => {
  14575. this.$message.error("网络不佳");
  14576. console.error(err);
  14577. });
  14578. },
  14579. getTypeName() {
  14580. console.log(this.courseTypeId);
  14581. this.$forceUpdate();
  14582. },
  14583. selectAllType() {
  14584. let params = {
  14585. org: this.org && this.org != "" ? this.org : "",
  14586. oid: this.oid && this.oid != "" ? this.oid : "",
  14587. };
  14588. this.ajax
  14589. .get(this.$store.state.api + "selectAllType", params)
  14590. .then((res) => {
  14591. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14592. res.data[0] = [...res.data[0], ...res.data[4]];
  14593. }
  14594. this.CourseType = res.data;
  14595. this.CourseType2 = [
  14596. { name: "智见课程", id: [] },
  14597. { name: "智行课程", id: [] },
  14598. { name: "智创课程", id: [] },
  14599. ];
  14600. for (var cti = 0; cti < res.data[0].length; cti++) {
  14601. if (
  14602. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14603. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  14604. ) {
  14605. this.CourseType2[0].id.push(res.data[0][cti].id);
  14606. } else if (
  14607. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  14608. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14609. ) {
  14610. this.CourseType2[1].id.push(res.data[0][cti].id);
  14611. } else if (
  14612. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14613. ) {
  14614. this.CourseType2[2].id.push(res.data[0][cti].id);
  14615. }
  14616. if (
  14617. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14618. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  14619. ) {
  14620. res.data[0][cti].name = "年级";
  14621. } else if (
  14622. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  14623. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14624. ) {
  14625. res.data[0][cti].name = "学科";
  14626. } else if (
  14627. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14628. ) {
  14629. res.data[0][cti].name = "主题";
  14630. }
  14631. }
  14632. let _courseTypeId = [];
  14633. for (var i = 0; i < res.data[0].length; i++) {
  14634. if (!this.cid) {
  14635. this.courseTypeId[res.data[0][i].id] = [];
  14636. }
  14637. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  14638. // }
  14639. this.CourseTypeJson[res.data[0][i].id] = [];
  14640. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14641. if (res.data[0][i].name == "栏目") {
  14642. this.CourseType[0][i].name = "主题";
  14643. }
  14644. }
  14645. if (res.data[2].length == 0 && res.data[3].length == 0) {
  14646. for (var j = 0; j < res.data[1].length; j++) {
  14647. if (
  14648. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  14649. _courseTypeId.indexOf(res.data[1][j].id) == -1
  14650. ) {
  14651. _courseTypeId.push(res.data[1][j].id);
  14652. }
  14653. if (res.data[0][i].id == res.data[1][j].pid) {
  14654. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14655. }
  14656. }
  14657. } else {
  14658. if (res.data[2].length > 0) {
  14659. for (var j = 0; j < res.data[2].length; j++) {
  14660. if (
  14661. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  14662. _courseTypeId.indexOf(res.data[2][j].id) == -1
  14663. ) {
  14664. _courseTypeId.push(res.data[2][j].id);
  14665. }
  14666. if (res.data[0][i].id == res.data[2][j].pid) {
  14667. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14668. }
  14669. }
  14670. }
  14671. if (res.data[3].length > 0) {
  14672. for (var j = 0; j < res.data[3].length; j++) {
  14673. if (
  14674. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  14675. _courseTypeId.indexOf(res.data[3][j].id) == -1
  14676. ) {
  14677. _courseTypeId.push(res.data[3][j].id);
  14678. }
  14679. if (res.data[0][i].id == res.data[3][j].pid) {
  14680. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14681. }
  14682. }
  14683. }
  14684. }
  14685. }
  14686. this.courseTypeId = _courseTypeId;
  14687. })
  14688. .catch((err) => {
  14689. console.error(err);
  14690. });
  14691. },
  14692. selectType() {
  14693. this.ajax
  14694. .get(this.$store.state.api + "selectType")
  14695. .then((res) => {
  14696. this.CourseType = res.data;
  14697. for (var i = 0; i < res.data[0].length; i++) {
  14698. if (!this.cid) {
  14699. this.courseTypeId[res.data[0][i].id] = "";
  14700. }
  14701. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14702. if (res.data[0][i].name == "栏目") {
  14703. this.CourseType[0][i].name = "主题";
  14704. }
  14705. }
  14706. for (var j = 0; j < res.data[1].length; j++) {
  14707. if (res.data[0][i].id == res.data[1][j].pid) {
  14708. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14709. this.CourseTypeJson[res.data[0][i].id] = [];
  14710. }
  14711. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14712. }
  14713. }
  14714. }
  14715. this.selectTypeByOid();
  14716. this.selectTypeByOrg();
  14717. })
  14718. .catch((err) => {
  14719. console.error(err);
  14720. });
  14721. },
  14722. selectTypeByOid() {
  14723. let params = {
  14724. oid: this.oid,
  14725. };
  14726. this.ajax
  14727. .get(this.$store.state.api + "selectTypeByOid", params)
  14728. .then((res) => {
  14729. for (var i = 0; i < res.data[0].length; i++) {
  14730. for (var j = 0; j < res.data[1].length; j++) {
  14731. if (res.data[0][i].id == res.data[1][j].pid) {
  14732. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14733. this.CourseTypeJson[res.data[0][i].id] = [];
  14734. }
  14735. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14736. }
  14737. }
  14738. }
  14739. })
  14740. .catch((err) => {
  14741. console.error(err);
  14742. });
  14743. },
  14744. selectTypeByOrg() {
  14745. let params = {
  14746. oid: this.org,
  14747. };
  14748. this.ajax
  14749. .get(this.$store.state.api + "selectTypeByOrg", params)
  14750. .then((res) => {
  14751. for (var i = 0; i < res.data[0].length; i++) {
  14752. for (var j = 0; j < res.data[1].length; j++) {
  14753. if (res.data[0][i].id == res.data[1][j].pid) {
  14754. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14755. this.CourseTypeJson[res.data[0][i].id] = [];
  14756. }
  14757. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  14758. }
  14759. }
  14760. }
  14761. this.$forceUpdate();
  14762. })
  14763. .catch((err) => {
  14764. console.error(err);
  14765. });
  14766. },
  14767. OtherMb(type, task) {
  14768. if (task === 0 || task) {
  14769. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14770. task
  14771. ].isEvaFold = true;
  14772. }
  14773. this.typeMode = type;
  14774. setTimeout(() => {
  14775. this.checkEva(this.checkId);
  14776. setTimeout(() => {
  14777. this.checkEva(this.checkId);
  14778. }, 100);
  14779. }, 100);
  14780. },
  14781. openMember() {
  14782. this.searchTN = "";
  14783. this.getTeacher();
  14784. this.dialogVisibleMember = true;
  14785. },
  14786. checkEva(id, type) {
  14787. this.dialogVisiblemb = false;
  14788. this.selectEva();
  14789. if (this.evalua != id && type == 2) {
  14790. this.$message.success("导入成功");
  14791. setTimeout(() => {
  14792. this.checkEva(id);
  14793. }, 100);
  14794. }
  14795. this.evalua = id;
  14796. this.checkId = id;
  14797. if (this.evalua != "") {
  14798. for (var i = 0; i < this.evaJuri.length; i++) {
  14799. if (this.evalua == this.evaJuri[i].id) {
  14800. this.eTitle = this.evaJuri[i].title;
  14801. this.eJson = JSON.parse(this.evaJuri[i].content);
  14802. }
  14803. }
  14804. this.data.data = [];
  14805. this.$forceUpdate();
  14806. setTimeout(() => {
  14807. this.setMindData();
  14808. }, 1000);
  14809. }
  14810. },
  14811. deleteEva() {
  14812. let _this = this;
  14813. if (_this.evalua == "") {
  14814. this.$message.warning("内容已经清空了,请勿重复清空");
  14815. return;
  14816. }
  14817. _this
  14818. .$confirm("确定删除此目标吗?", "提示", {
  14819. confirmButtonText: "确定",
  14820. cancelButtonText: "取消",
  14821. type: "warning",
  14822. })
  14823. .then(() => {
  14824. _this.evalua = "";
  14825. _this.checkId = "";
  14826. _this.eTitle = "";
  14827. let _unitJson = _this.unitJson;
  14828. for (var i = 0; i < _unitJson.length; i++) {
  14829. let _task = _unitJson[i].chapterInfo[0].taskJson;
  14830. for (var j = 0; j < _task.length; j++) {
  14831. let _eList = _task[j].eList;
  14832. for (var k = 0; k < _eList.length; k++) {
  14833. delete _eList[k].target;
  14834. }
  14835. }
  14836. }
  14837. _this.$forceUpdate();
  14838. if (_this.cid) {
  14839. _this.updateWork();
  14840. }
  14841. })
  14842. .catch(() => {
  14843. return;
  14844. });
  14845. },
  14846. selectEva() {
  14847. let params = {
  14848. oid: this.oid,
  14849. };
  14850. this.ajax
  14851. .get(this.$store.state.api + "selectAllEvaluation", params)
  14852. .then((res) => {
  14853. this.evaJuri = res.data[0];
  14854. // 在复制操作之前记录滚动位置
  14855. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14856. // 执行复制操作
  14857. // 复制操作完成后恢复滚动位置
  14858. this.$nextTick(() => {
  14859. if (this.$refs.scrollContainer) {
  14860. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14861. }
  14862. });
  14863. })
  14864. .catch((err) => {
  14865. console.error(err);
  14866. });
  14867. },
  14868. setMindData() {
  14869. let targetArray = [];
  14870. this.data.data = [];
  14871. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  14872. let _eJson = Object.keys(this.eJson);
  14873. let _e = this.eJson;
  14874. for (let i = 0; i < _eJson.length; i++) {
  14875. let element = _e[_eJson[i]];
  14876. this.data.data.push({
  14877. id: element.id,
  14878. parentid: "root",
  14879. topic: element.name,
  14880. });
  14881. // targetArray.push({
  14882. // id: element.id,
  14883. // parentid: "root",
  14884. // name: element.name,
  14885. // });
  14886. targetArray.push({
  14887. value: element.name,
  14888. label: element.name,
  14889. children: [],
  14890. });
  14891. let _eJsonc = Object.keys(element.child);
  14892. let _e2 = element.child;
  14893. for (let j = 0; j < _eJsonc.length; j++) {
  14894. let _ec = _e2[_eJsonc[j]];
  14895. this.data.data.push({
  14896. id: _ec.id,
  14897. parentid: element.id,
  14898. topic: _ec.name,
  14899. });
  14900. // targetArray.push({
  14901. // id: _ec.id,
  14902. // parentid: element.id,
  14903. // name: _ec.name,
  14904. // });
  14905. targetArray[i].children.push({
  14906. value: _ec.name,
  14907. label: _ec.name,
  14908. children: [],
  14909. });
  14910. let _eJsonz = Object.keys(_ec.child);
  14911. let _e3 = _ec.child;
  14912. for (let z = 0; z < _eJsonz.length; z++) {
  14913. let _ez = _e3[_eJsonz[z]];
  14914. this.data.data.push({
  14915. id: _ez.id,
  14916. parentid: _ec.id,
  14917. topic: _ez.name,
  14918. });
  14919. // targetArray.push({
  14920. // id: _ez.id,
  14921. // parentid: _ec.id,
  14922. // name: _ez.name,
  14923. // });
  14924. targetArray[i].children[j].children.push({
  14925. value: _ez.name,
  14926. label: _ez.name,
  14927. });
  14928. }
  14929. }
  14930. }
  14931. this.targetArray = targetArray;
  14932. this.$forceUpdate();
  14933. },
  14934. /*添加评价 */
  14935. addEList(index, tIndex) {
  14936. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  14937. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  14938. value: "",
  14939. detail: "",
  14940. score: 5,
  14941. isai: "1",
  14942. })
  14943. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  14944. { value: "", detail: "", score: 5,isai: "1", },
  14945. ]);
  14946. this.$forceUpdate();
  14947. },
  14948. openEList(index, tIndex) {
  14949. this.evaIndex = index;
  14950. this.evatIndex = tIndex;
  14951. this.evaBoxDialog = true;
  14952. },
  14953. addCET(index, tIndex) {
  14954. this.cetIndex = index;
  14955. this.cettIndex = tIndex;
  14956. this.selectAllType1();
  14957. },
  14958. addCETemplate() {
  14959. var array =
  14960. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  14961. .eList;
  14962. let params = [
  14963. {
  14964. uid: this.userid,
  14965. n: this.templateName,
  14966. json: JSON.stringify(array),
  14967. t: 1,
  14968. oid: this.oid,
  14969. },
  14970. ];
  14971. this.ajax
  14972. .post(this.$store.state.api + "addCETShare", params)
  14973. .then((res) => {
  14974. this.addTypeByCET(res.data[0][0].id);
  14975. })
  14976. .catch((err) => {
  14977. this.$message.error("网络不佳");
  14978. console.error(err);
  14979. });
  14980. },
  14981. addTypeByCET(id) {
  14982. if (this.setTypeJson.two == "") {
  14983. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  14984. return;
  14985. }
  14986. let params = {
  14987. cid: id,
  14988. };
  14989. this.ajax
  14990. .get(this.$store.state.api + "deleteCETLabel", params)
  14991. .then((res) => {
  14992. for (var i = 0; i < 2; i++) {
  14993. let tid = "";
  14994. if (i == 0) {
  14995. tid = this.setTypeJson.one;
  14996. } else {
  14997. tid = this.setTypeJson.two;
  14998. }
  14999. let params = [
  15000. {
  15001. cid: id,
  15002. tid: tid,
  15003. uid: this.userid,
  15004. },
  15005. ];
  15006. this.ajax
  15007. .post(this.$store.state.api + "addCETLabel", params)
  15008. .then((res) => {
  15009. this.$message({
  15010. message: "添加成功",
  15011. type: "success",
  15012. });
  15013. this.close();
  15014. })
  15015. .catch((err) => {
  15016. this.$message.error("网络不佳");
  15017. console.error(err);
  15018. });
  15019. }
  15020. })
  15021. .catch((err) => {
  15022. this.$message.error("网络不佳");
  15023. console.error(err);
  15024. });
  15025. },
  15026. updateEvaJson(array) {
  15027. array = array.filter((item) => {
  15028. item.isai = "1"
  15029. return item;
  15030. });
  15031. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  15032. this.evatIndex
  15033. ].eList = array;
  15034. },
  15035. forceUpdate() {
  15036. this.$forceUpdate();
  15037. },
  15038. forceUpdate2() {
  15039. setTimeout(() => {
  15040. this.courseText += "*0*%*";
  15041. setTimeout(() => {
  15042. this.courseText = this.courseText.replaceAll("*0*%*", "");
  15043. }, 0);
  15044. }, 100);
  15045. this.$forceUpdate();
  15046. },
  15047. deletEList(index, tIndex, eIndex) {
  15048. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  15049. eIndex,
  15050. 1
  15051. );
  15052. this.$forceUpdate();
  15053. },
  15054. getChoosePic(t) {
  15055. this.chooseType = t;
  15056. this.getAllBanner();
  15057. },
  15058. getAllBanner() {
  15059. this.sysPicVisible = true;
  15060. let params = {
  15061. t: this.chooseType,
  15062. };
  15063. this.ajax
  15064. .get(this.$store.state.api + "selectAllBanner", params)
  15065. .then((res) => {
  15066. this.sysPic = res.data[0];
  15067. })
  15068. .catch((err) => {
  15069. console.error(err);
  15070. });
  15071. },
  15072. // getClass() {
  15073. // let params = {
  15074. // oid: this.oid,
  15075. // };
  15076. // this.ajax
  15077. // .get(this.$store.state.api + "selectClassBySchool", params)
  15078. // .then((res) => {
  15079. // this.classJuri = res.data[0];
  15080. // })
  15081. // .catch((err) => {
  15082. // console.error(err);
  15083. // });
  15084. // },
  15085. deleteSysPic() {
  15086. this.cover = [];
  15087. this.isSysPic = false;
  15088. this.isSysPic2 = false;
  15089. },
  15090. deleteSelectPic() {
  15091. this.selectJson.url = "";
  15092. },
  15093. setEListStar() {
  15094. this.$forceUpdate();
  15095. },
  15096. deletRateList(i) {
  15097. this.rateJson.splice(i, 1);
  15098. },
  15099. addRateList() {
  15100. this.rateJson.push({ detail: "", score: 5, value: "" });
  15101. },
  15102. addSt() {
  15103. this.sentenceList.push({
  15104. sentenceTitle: "",
  15105. addSentence: [],
  15106. rightAnswer: [],
  15107. });
  15108. },
  15109. addSen(i) {
  15110. if (!this.sentenceList[i].sentenceTitle) {
  15111. this.$message.error("请填写卡片内容!");
  15112. return;
  15113. }
  15114. if (this.sentenceList[i].sentenceTitle.length > 10) {
  15115. this.$message.error("卡片内容字数不能超过10位");
  15116. return;
  15117. }
  15118. if (
  15119. this.sentenceList[i].addSentence.indexOf(
  15120. this.sentenceList[i].sentenceTitle
  15121. ) !== -1
  15122. ) {
  15123. this.$message.error("不能添加重复的卡片内容!");
  15124. return;
  15125. }
  15126. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  15127. // this.isPushTitleList.push(this.sentenceTitle);
  15128. this.sentenceList[i].sentenceTitle = "";
  15129. },
  15130. setRightAnswer(s, i, j) {
  15131. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  15132. this.sentenceList[i].rightAnswer.push(s);
  15133. }
  15134. },
  15135. returnCard(r, i, j) {
  15136. this.sentenceList[i].rightAnswer.splice(j, 1);
  15137. },
  15138. addSentenceTool() {
  15139. for (var i = 0; i < this.sentenceList.length; i++) {
  15140. if (this.sentenceList[i].rightAnswer.length == 0) {
  15141. this.$message.error(`请将题目${i + 1}设置完整。`);
  15142. return;
  15143. }
  15144. if (
  15145. this.sentenceList[i].addSentence.length !=
  15146. this.sentenceList[i].rightAnswer.length
  15147. ) {
  15148. this.$message.error(`请将题目${i + 1}设置完整。`);
  15149. return;
  15150. }
  15151. }
  15152. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15153. this.taskCount
  15154. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  15155. this.sentenceList = [
  15156. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  15157. ];
  15158. this.dialogVisibleSentence = false;
  15159. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15160. // itemTaskIndex
  15161. // ].toolChoose[toolIndex].tool = [];
  15162. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15163. // itemTaskIndex
  15164. // ].toolChoose[toolIndex].tool.push(i);
  15165. if (
  15166. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15167. .toolChoose[this.toolIndex].tool != 47
  15168. ) {
  15169. this.addTools(47, this.taskCount, this.toolIndex);
  15170. }
  15171. },
  15172. addTableJson() {
  15173. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  15174. // this.$message.error("请将信息填写完整!");
  15175. // return;
  15176. // }
  15177. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15178. this.taskCount
  15179. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  15180. // this.tableJson = [{ text: "" }];
  15181. // this.dialogVisibleTable = false;
  15182. this.$message.success("上传成功");
  15183. if (
  15184. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15185. .toolChoose[this.toolIndex].tool != 48
  15186. ) {
  15187. this.addTools(48, this.taskCount, this.toolIndex);
  15188. }
  15189. },
  15190. addWordJson() {
  15191. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15192. this.taskCount
  15193. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  15194. // this.wordJson = [{ text: "" }];
  15195. // this.dialogVisibleWord = false;
  15196. this.$message.success("上传成功");
  15197. if (
  15198. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15199. .toolChoose[this.toolIndex].tool != 52
  15200. ) {
  15201. this.addTools(52, this.taskCount, this.toolIndex);
  15202. }
  15203. },
  15204. addMoreUpload() {
  15205. if (this.uploadJson.length == 0) {
  15206. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15207. this.taskCount
  15208. ].toolChoose[this.toolIndex].uploadJson = [];
  15209. } else {
  15210. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15211. this.taskCount
  15212. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  15213. }
  15214. this.uploadJson = [];
  15215. this.dialogVisibleMoreUpload = false;
  15216. if (
  15217. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15218. .toolChoose[this.toolIndex].tool != 50
  15219. ) {
  15220. this.addTools(50, this.taskCount, this.toolIndex);
  15221. }
  15222. },
  15223. addPreTime() {
  15224. if (this.preTime == 0) {
  15225. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15226. this.taskCount
  15227. ].toolChoose[this.toolIndex].preTime = 0;
  15228. } else {
  15229. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15230. this.taskCount
  15231. ].toolChoose[this.toolIndex].preTime = this.preTime;
  15232. }
  15233. this.preTime = 0;
  15234. this.dialogVisiblePreTime = false;
  15235. if (
  15236. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15237. .toolChoose[this.toolIndex].tool != 10
  15238. ) {
  15239. this.addTools(10, this.taskCount, this.toolIndex);
  15240. }
  15241. },
  15242. goToTask(i) {
  15243. this.toolIndexType = "";
  15244. if (this.isClickColor == i + 1) {
  15245. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15246. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15247. // } else {
  15248. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15249. i
  15250. ].toolOpen = true;
  15251. // }
  15252. this.$forceUpdate();
  15253. return;
  15254. }
  15255. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15256. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15257. // } else {
  15258. document.querySelectorAll(".basic_box")[0].scrollTop =
  15259. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  15260. this.isClickColor = i + 1;
  15261. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15262. // }
  15263. this.$forceUpdate();
  15264. },
  15265. taskScroll(){
  15266. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  15267. const sections = document.querySelectorAll('.taskBorder');
  15268. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  15269. sections.forEach((section, index) => {
  15270. const offsetTop = section.offsetTop;
  15271. const offsetHeight = section.offsetHeight;
  15272. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  15273. this.isClickColor = index +1;
  15274. }
  15275. });
  15276. },
  15277. taskOpen(i, stageIndex) {
  15278. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15279. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  15280. } else {
  15281. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15282. }
  15283. this.updateWork3(stageIndex);
  15284. this.$forceUpdate();
  15285. },
  15286. goToTask2(i, stage) {
  15287. this.toolIndexType = "";
  15288. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  15289. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15290. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15291. // } else {
  15292. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15293. i
  15294. ].toolOpen = true;
  15295. // }
  15296. this.$forceUpdate();
  15297. return;
  15298. }
  15299. if (this.unitIndex != stage) {
  15300. if (this.panUnitJson() == 2) {
  15301. return;
  15302. }
  15303. this.unitSet(stage);
  15304. }
  15305. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15306. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15307. // } else {
  15308. document.querySelectorAll(".basic_box")[0].scrollTop =
  15309. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  15310. this.isClickColor = i + 1;
  15311. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15312. // }
  15313. this.$forceUpdate();
  15314. },
  15315. taskMove(type, index) {
  15316. this.$confirm(
  15317. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15318. "提示",
  15319. {
  15320. confirmButtonText: "确定",
  15321. cancelButtonText: "取消",
  15322. type: "warning",
  15323. }
  15324. )
  15325. .then(() => {
  15326. if (type == 1) {
  15327. if (index > 0) {
  15328. let a = JSON.parse(
  15329. JSON.stringify(
  15330. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15331. index - 1
  15332. ]
  15333. )
  15334. );
  15335. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  15336. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  15337. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  15338. }
  15339. } else {
  15340. if (
  15341. index <
  15342. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  15343. ) {
  15344. let a = JSON.parse(
  15345. JSON.stringify(
  15346. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15347. index + 1
  15348. ]
  15349. )
  15350. );
  15351. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  15352. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  15353. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  15354. }
  15355. }
  15356. this.$forceUpdate();
  15357. })
  15358. .catch(() => {
  15359. return;
  15360. });
  15361. },
  15362. stageMove(type, index) {
  15363. if (type == 1) {
  15364. if (index > 0) {
  15365. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  15366. let acid = JSON.parse(
  15367. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  15368. );
  15369. let bcid = JSON.parse(
  15370. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  15371. );
  15372. this.unitJson3[index - 1] = this.unitJson3[index];
  15373. this.unitJson3[index] = a;
  15374. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  15375. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  15376. }
  15377. } else {
  15378. if (index < this.unitJson3.length - 1) {
  15379. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  15380. let acid = JSON.parse(
  15381. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  15382. );
  15383. let bcid = JSON.parse(
  15384. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  15385. );
  15386. this.unitJson3[index + 1] = this.unitJson3[index];
  15387. this.unitJson3[index] = a;
  15388. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  15389. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  15390. }
  15391. }
  15392. this.$forceUpdate();
  15393. },
  15394. addGroup(i) {
  15395. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  15396. this.groupJson.group.push({
  15397. name: "第" + (this.groupJson.group.length + 1) + "组",
  15398. });
  15399. },
  15400. deleteGroup(i) {
  15401. this.groupJson.group.splice(i, 1);
  15402. },
  15403. numberPan() {
  15404. if (
  15405. /[^\d]/.test(this.groupJson.number) ||
  15406. this.groupJson.number < 2 ||
  15407. this.groupJson.number > 10
  15408. ) {
  15409. this.$message.error("请输入2-10的数字");
  15410. this.groupJson.number = "";
  15411. }
  15412. },
  15413. numberPanJie() {
  15414. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  15415. this.$message.error('请输入大于1的数字')
  15416. this.courseJie = 1
  15417. }
  15418. },
  15419. numberPanTime() {
  15420. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  15421. this.$message.error('请输入大于1的数字')
  15422. this.courseTime = 1
  15423. }
  15424. },
  15425. addGroupJson() {
  15426. for (var i = 0; i < this.groupJson.group.length; i++) {
  15427. if (!this.groupJson.group[i].name) {
  15428. this.$message.error("请将信息填写完整!");
  15429. return;
  15430. }
  15431. }
  15432. if (!this.groupJson.number) {
  15433. this.$message.error("请将信息填写完整!");
  15434. return;
  15435. }
  15436. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15437. this.taskCount
  15438. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  15439. JSON.stringify(this.groupJson)
  15440. );
  15441. this.dialogVisibleGroup = false;
  15442. this.groupJson = {};
  15443. if (
  15444. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15445. .toolChoose[this.toolIndex].tool != 49
  15446. ) {
  15447. this.addTools(49, this.taskCount, this.toolIndex);
  15448. }
  15449. },
  15450. updateTime(preTime) {
  15451. this.preTime = preTime;
  15452. },
  15453. InviteChange(val) {
  15454. console.log(val);
  15455. let _check = [];
  15456. let _check2 = [];
  15457. for (var i = 0; i < this.grade2.length; i++) {
  15458. var gid = this.grade2[i].id;
  15459. _check.push(gid);
  15460. }
  15461. for (var i = 0; i < this.checkboxList2.length; i++) {
  15462. var _id = this.checkboxList2[i];
  15463. if (_check.indexOf(_id) !== -1) {
  15464. _check2.push(_id);
  15465. }
  15466. }
  15467. this.checkAll = _check2.length === _check.length;
  15468. return;
  15469. let array = JSON.parse(JSON.stringify(val));
  15470. this.inviteCode = this.inviteCode.filter((el) => {
  15471. if (val.indexOf(el.cid) != -1) {
  15472. array.splice(array.indexOf(el.cid), 1);
  15473. return el;
  15474. }
  15475. });
  15476. for (var i = 0; i < array.length; i++) {
  15477. this.getInviteCode(array[i]);
  15478. }
  15479. },
  15480. InviteChange2(val) {
  15481. console.log(val);
  15482. let _check = [];
  15483. let _check2 = [];
  15484. for (var i = 0; i < this.teacherJuri.length; i++) {
  15485. var gid = this.teacherJuri[i].userid;
  15486. _check.push(gid);
  15487. }
  15488. for (var i = 0; i < this.checkboxList3.length; i++) {
  15489. var _id = this.checkboxList3[i];
  15490. if (_check.indexOf(_id) !== -1) {
  15491. _check2.push(_id);
  15492. }
  15493. }
  15494. this.checkAll2 = _check2.length === _check.length;
  15495. this.setMan();
  15496. return;
  15497. let array = JSON.parse(JSON.stringify(val));
  15498. this.inviteCode = this.inviteCode.filter((el) => {
  15499. if (val.indexOf(el.cid) != -1) {
  15500. array.splice(array.indexOf(el.cid), 1);
  15501. return el;
  15502. }
  15503. });
  15504. for (var i = 0; i < array.length; i++) {
  15505. this.getInviteCode(array[i]);
  15506. }
  15507. },
  15508. handleCheckAllChange(val) {
  15509. if (val) {
  15510. for (var i = 0; i < this.grade2.length; i++) {
  15511. var gid = this.grade2[i].id;
  15512. if (this.checkboxList2.indexOf(gid) === -1) {
  15513. this.checkboxList2.push(gid);
  15514. }
  15515. }
  15516. } else {
  15517. let _check = [];
  15518. let _check2 = [];
  15519. for (var i = 0; i < this.grade2.length; i++) {
  15520. var gid = this.grade2[i].id;
  15521. _check.push(gid);
  15522. }
  15523. for (var i = 0; i < this.checkboxList2.length; i++) {
  15524. var _id = this.checkboxList2[i];
  15525. if (_check.indexOf(_id) === -1) {
  15526. _check2.push(_id);
  15527. }
  15528. }
  15529. this.checkboxList2 = _check2;
  15530. }
  15531. this.isIndeterminate = false;
  15532. },
  15533. handleCheckAllChange2(val) {
  15534. if (val) {
  15535. for (var i = 0; i < this.teacherJuri.length; i++) {
  15536. var gid = this.teacherJuri[i].userid;
  15537. if (this.checkboxList3.indexOf(gid) === -1) {
  15538. this.checkboxList3.push(gid);
  15539. }
  15540. }
  15541. } else {
  15542. let _check = [];
  15543. let _check2 = [];
  15544. for (var i = 0; i < this.teacherJuri.length; i++) {
  15545. var gid = this.teacherJuri[i].userid;
  15546. _check.push(gid);
  15547. }
  15548. for (var i = 0; i < this.checkboxList3.length; i++) {
  15549. var _id = this.checkboxList3[i];
  15550. if (_check.indexOf(_id) === -1) {
  15551. _check2.push(_id);
  15552. }
  15553. }
  15554. this.checkboxList3 = _check2;
  15555. }
  15556. this.isIndeterminate2 = false;
  15557. },
  15558. async getInviteCode(cid) {
  15559. let code = this.randomNumber();
  15560. let params = {
  15561. code: code,
  15562. oid: this.oid,
  15563. };
  15564. let type = 1;
  15565. for (var i = 0; i < this.inviteCode.length; i++) {
  15566. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  15567. type = 2;
  15568. }
  15569. }
  15570. if (type == 2) {
  15571. this.getInviteCode(cid);
  15572. return;
  15573. }
  15574. const res = await this.ajax.get(
  15575. this.$store.state.api + "selectInviteCode2",
  15576. params
  15577. );
  15578. if (
  15579. res.data.length &&
  15580. res.data[0].length &&
  15581. res.data[0][0].courseId != this.cid
  15582. ) {
  15583. this.getInviteCode(cid);
  15584. return;
  15585. }
  15586. let array = [];
  15587. for (var i = 0; i < this.inviteCode.length; i++) {
  15588. array.push(this.inviteCode[i].cid);
  15589. }
  15590. if (array.indexOf(cid) != -1) {
  15591. this.inviteCode[array.indexOf(cid)].ic = code;
  15592. } else {
  15593. this.inviteCode.push({ cid: cid, ic: code });
  15594. }
  15595. },
  15596. OpenInviteD(cid) {
  15597. let array = [];
  15598. this.icode = "";
  15599. for (var i = 0; i < this.inviteCode.length; i++) {
  15600. array.push(this.inviteCode[i].cid);
  15601. }
  15602. if (array.indexOf(cid) != -1) {
  15603. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  15604. }
  15605. this.inviteId = cid;
  15606. this.dialogVisibleInvite = true;
  15607. },
  15608. addInvite() {
  15609. let reg = /^[A-Za-z0-9]{4,}$/;
  15610. if (!reg.test(this.icode)) {
  15611. this.$message.error("请输入至少四位数字或英文组合的随机码");
  15612. return;
  15613. }
  15614. let type = 1;
  15615. for (var i = 0; i < this.inviteCode.length; i++) {
  15616. if (
  15617. this.inviteCode[i].cid != this.inviteId &&
  15618. this.icode == this.inviteCode[i].ic
  15619. ) {
  15620. type = 2;
  15621. }
  15622. }
  15623. if (type == 2) {
  15624. this.$message.error("已有此随机码,不能重复");
  15625. return;
  15626. }
  15627. let params = {
  15628. code: this.icode,
  15629. oid: this.oid,
  15630. };
  15631. this.ajax
  15632. .get(this.$store.state.api + "selectInviteCode", params)
  15633. .then((res) => {
  15634. if (
  15635. res.data.length &&
  15636. res.data[0].length &&
  15637. res.data[0][0].courseId != this.cid
  15638. ) {
  15639. this.$message.error("已有此随机码,不能重复");
  15640. return;
  15641. }
  15642. let array = [];
  15643. for (var i = 0; i < this.inviteCode.length; i++) {
  15644. array.push(this.inviteCode[i].cid);
  15645. }
  15646. if (array.indexOf(this.inviteId) != -1) {
  15647. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  15648. } else {
  15649. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  15650. }
  15651. this.icode = "";
  15652. this.dialogVisibleInvite = false;
  15653. })
  15654. .catch((err) => {
  15655. console.error(err);
  15656. });
  15657. },
  15658. randomNumber() {
  15659. // 随机生成两位数
  15660. // let num = Math.floor(Math.random() * 900) + 100;
  15661. // 生成 0 到 99 之间的随机整数
  15662. const randomNumber = Math.floor(Math.random() * 100);
  15663. // 如果随机数小于 10,补上前导零
  15664. const num =
  15665. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  15666. // 随机生成两个大写字母
  15667. let letters = "";
  15668. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  15669. for (let i = 0; i < 3; i++) {
  15670. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  15671. }
  15672. // 随机生成两位数字和字母的组合
  15673. let mix = "";
  15674. let chars =
  15675. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  15676. for (let i = 0; i < 3; i++) {
  15677. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  15678. mix += char;
  15679. }
  15680. // 随机选择一种类型
  15681. let type = Math.floor(Math.random() * 3);
  15682. return num;
  15683. // 根据类型输出结果
  15684. switch (type) {
  15685. case 0:
  15686. console.log(num); // 输出两位数
  15687. return num;
  15688. case 1:
  15689. console.log(letters); // 输出两个大写字母
  15690. return letters;
  15691. case 2:
  15692. console.log(mix); // 输出两位数字和字母的组合
  15693. return mix;
  15694. }
  15695. },
  15696. getPaste() {
  15697. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15698. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15699. if (!iframe && !iframe2) {
  15700. return;
  15701. }
  15702. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15703. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15704. if (copyData && copyData.stageData && copyData.stageData.length) {
  15705. this.isPasteStage = true;
  15706. }
  15707. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  15708. this.isPasteStage = true;
  15709. }
  15710. if (copyData && copyData.selectData.length) {
  15711. this.isPasteChoice = true;
  15712. }
  15713. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  15714. this.isPasteTask = true;
  15715. }
  15716. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  15717. this.isPasteTask = true;
  15718. }
  15719. },
  15720. getPaste2() {
  15721. let iframe = document.querySelectorAll(".interIframe")[0];
  15722. const turndownService = new TurndownService();
  15723. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  15724. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  15725. if(confirm_next_step){
  15726. this.courseText += turndownService.turndown(confirm_next_step)
  15727. iframe.contentWindow.confirm_next_step = ''
  15728. }
  15729. if(work_area_text && work_area_text.aiContent){
  15730. this.courseText += turndownService.turndown(work_area_text.aiContent)
  15731. iframe.contentWindow.work_area_text = ''
  15732. }
  15733. },
  15734. setCourseInfo(){
  15735. let courseInfo = ''
  15736. let sub = []
  15737. let mclass = []
  15738. if (this.courseTypeId.length) {
  15739. for (var i = 0; i < this.courseTypeId.length; i++) {
  15740. let _sid = this.courseTypeId[i]
  15741. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15742. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  15743. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  15744. }
  15745. }
  15746. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  15747. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  15748. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  15749. }
  15750. }
  15751. }
  15752. }
  15753. if(this.courseName){
  15754. courseInfo = `课程名称:${this.courseName} `
  15755. }
  15756. if(mclass.length){
  15757. courseInfo += `年级:${mclass.join(',')} `
  15758. }
  15759. if(sub.length){
  15760. courseInfo += `学科:${sub.join(',')} `
  15761. }
  15762. console.log(courseInfo)
  15763. window.course_info = courseInfo
  15764. },
  15765. setCover() {
  15766. var _this = this;
  15767. if(_this.cover.length){
  15768. return;
  15769. }
  15770. _this.imageloading2 = true
  15771. _this.ajax
  15772. .post("https://gpt.cocorobo.cn/search_image", {
  15773. page: _this.ppage,
  15774. pagesize: 9,
  15775. query: _this.courseName,
  15776. })
  15777. .then(function (response) {
  15778. // console.log(response.data.data);
  15779. var data = response.data.FunctionResponse.result;
  15780. _this.cover = [];
  15781.       setTimeout(() => {
  15782.         _this.cover[0] = {
  15783.           name: "网络图片.png",
  15784.           url: data[0].thumbnail
  15785.         };
  15786.         _this.imgChange1(null, null, 1, null);
  15787.         _this.$forceUpdate();
  15788.       }, 0);
  15789. _this.imageloading2 = false
  15790. })
  15791. .catch(function (error) {
  15792. _this.imageloading2 = false
  15793. console.log(error);
  15794. });
  15795. },
  15796. searchImage() {
  15797. var _this = this;
  15798. _this.imageList = [];
  15799. if (!_this.searchImageValue) {
  15800. _this.sysPicVisible2 = true;
  15801. return;
  15802. }
  15803. _this.imageloading = true;
  15804. _this.ajax
  15805. .post("https://gpt.cocorobo.cn/search_image", {
  15806. page: _this.ppage,
  15807. pagesize: 9,
  15808. query: _this.searchImageValue,
  15809. })
  15810. .then(function (response) {
  15811. // console.log(response.data.data);
  15812. var data = response.data.FunctionResponse.result;
  15813. for (var i = 0; i < data.length; i++) {
  15814. _this.imageList.push({ url: data[i].thumbnail });
  15815. }
  15816. _this.imageloading = false;
  15817. })
  15818. .catch(function (error) {
  15819. console.log(error);
  15820. });
  15821. _this.sysPicVisible2 = true;
  15822. },
  15823. changePicture() {
  15824. this.ppage++;
  15825. this.searchImage();
  15826. },
  15827. resetImage() {
  15828. this.ppage = 1;
  15829. this.searchImage();
  15830. },
  15831. jumpGj(i, j) {
  15832. if (i + 1 != this.isClickColor) {
  15833. this.isClickColor = i + 1;
  15834. }
  15835. var a = document.scrollingElement;
  15836. this.toolIndexType = `gj${i}${j}`;
  15837. let target = document.querySelector(`#gj${i}${j}`);
  15838. if (target) {
  15839. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15840. setTimeout(() => {
  15841. target.scrollIntoView(true);
  15842. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15843. j
  15844. ].isFold3 = false;
  15845. setTimeout(() => {
  15846. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15847. }, 0);
  15848. }, 0);
  15849. }
  15850. },
  15851. jumpGj2(i, j, k) {
  15852. if (this.unitIndex != k) {
  15853. if (this.panUnitJson() == 2) {
  15854. return;
  15855. }
  15856. this.unitSet(k);
  15857. }
  15858. setTimeout(() => {
  15859. if (i + 1 != this.isClickColor) {
  15860. this.isClickColor = i + 1;
  15861. }
  15862. var a = document.scrollingElement;
  15863. this.toolIndexType = `gj${i}${j}${k}`;
  15864. let target = document.querySelector(`#gj${i}${j}`);
  15865. if (target) {
  15866. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  15867. setTimeout(() => {
  15868. target.scrollIntoView(true);
  15869. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  15870. j
  15871. ].isFold3 = false;
  15872. setTimeout(() => {
  15873. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  15874. }, 0);
  15875. }, 0);
  15876. }
  15877. }, 0);
  15878. },
  15879. dragStart(val, i, j) {
  15880. console.log(this.taskCount);
  15881. this.dragType = "drag";
  15882. this.taskCount = j;
  15883. this.oldIndex = i;
  15884. this.oldData = val;
  15885. },
  15886. dragOver(i, j) {
  15887. this.typeIndex = "chapter-" + j + "-" + i;
  15888. this.newIndex = i;
  15889. },
  15890. dragEnd() {
  15891. if (this.dragType != "drag") {
  15892. this.typeIndex = "";
  15893. this.newIndex = "";
  15894. this.dragType = "";
  15895. this.isdrag = "";
  15896. return;
  15897. }
  15898. console.log(this.taskCount);
  15899. let newItems = [
  15900. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15901. .chapterData,
  15902. ];
  15903. // 删除老的节点
  15904. newItems.splice(this.oldIndex, 1);
  15905. // 在列表中目标位置增加新的节点
  15906. newItems.splice(this.newIndex, 0, this.oldData);
  15907. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15908. this.taskCount
  15909. ].chapterData = [...newItems];
  15910. this.typeIndex = "";
  15911. this.newIndex = "";
  15912. this.dragType = "";
  15913. this.isdrag = "";
  15914. this.$forceUpdate();
  15915. },
  15916. dragTaskStart(val, i, j) {
  15917. this.dragType = "task";
  15918. this.oldIndex = i;
  15919. this.oldData = val;
  15920. this.oldUnitIndex = j;
  15921. },
  15922. dragTaskOver(i, j) {
  15923. this.typeIndex = "task-" + i;
  15924. this.newIndex = i;
  15925. this.checkUnitIndex = j;
  15926. },
  15927. async dragTaskEnd() {
  15928. if (this.dragType != "task") {
  15929. this.newIndex = "";
  15930. this.dragType = "";
  15931. this.typeIndex = "";
  15932. this.checkUnitIndex = "";
  15933. this.isdrag = "";
  15934. return;
  15935. }
  15936. if (
  15937. this.newIndex == this.oldIndex &&
  15938. this.oldUnitIndex == this.checkUnitIndex
  15939. ) {
  15940. this.newIndex = "";
  15941. this.dragType = "";
  15942. this.typeIndex = "";
  15943. this.checkUnitIndex = "";
  15944. this.isdrag = "";
  15945. return;
  15946. }
  15947. let count1 = await this.getWorksCount(
  15948. 2,
  15949. this.checkUnitIndex,
  15950. this.newIndex,
  15951. 0
  15952. );
  15953. let count2 = await this.getWorksCount(
  15954. 2,
  15955. this.oldUnitIndex,
  15956. this.oldIndex,
  15957. 0
  15958. );
  15959. if (count1 > 0 || count2 > 0) {
  15960. this.$confirm(
  15961. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15962. "提示",
  15963. {
  15964. confirmButtonText: "确定",
  15965. cancelButtonText: "取消",
  15966. type: "warning",
  15967. }
  15968. )
  15969. .then(() => {
  15970. if (this.oldUnitIndex != this.checkUnitIndex) {
  15971. let newItems = [
  15972. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15973. ];
  15974. // 删除老的节点
  15975. newItems.splice(this.oldIndex, 1);
  15976. // 在列表中目标位置增加新的节点
  15977. let newItems2 = [
  15978. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  15979. ];
  15980. newItems2.splice(this.newIndex, 0, this.oldData);
  15981. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  15982. ...newItems,
  15983. ];
  15984. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  15985. ...newItems2,
  15986. ];
  15987. } else {
  15988. let newItems = [
  15989. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  15990. ];
  15991. let chapterData = []
  15992. if (this.oldIndex == 0) {
  15993. chapterData = newItems[this.oldIndex].chapterData
  15994. newItems[this.oldIndex].chapterData = []
  15995. } else if (this.newIndex == 0) {
  15996. chapterData = newItems[this.newIndex].chapterData
  15997. newItems[this.oldIndex].chapterData = []
  15998. }
  15999. // 删除老的节点
  16000. newItems.splice(this.oldIndex, 1);
  16001. // 在列表中目标位置增加新的节点
  16002. newItems.splice(this.newIndex, 0, this.oldData);
  16003. if (this.oldIndex == 0 || this.newIndex == 0) {
  16004. newItems[0].chapterData = chapterData
  16005. }
  16006. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16007. ...newItems,
  16008. ];
  16009. }
  16010. this.typeIndex = "";
  16011. this.newIndex = "";
  16012. this.dragType = "";
  16013. this.checkUnitIndex = "";
  16014. this.isdrag = "";
  16015. this.updateWork();
  16016. this.$forceUpdate();
  16017. })
  16018. .catch(() => {
  16019. this.newIndex = "";
  16020. this.dragType = "";
  16021. this.typeIndex = "";
  16022. this.checkUnitIndex = "";
  16023. this.isdrag = "";
  16024. return;
  16025. });
  16026. } else {
  16027. if (this.oldUnitIndex != this.checkUnitIndex) {
  16028. let newItems = [
  16029. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16030. ];
  16031. // 删除老的节点
  16032. newItems.splice(this.oldIndex, 1);
  16033. // 在列表中目标位置增加新的节点
  16034. let newItems2 = [
  16035. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  16036. ];
  16037. newItems2.splice(this.newIndex, 0, this.oldData);
  16038. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16039. ...newItems,
  16040. ];
  16041. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  16042. ...newItems2,
  16043. ];
  16044. } else {
  16045. let newItems = [
  16046. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16047. ];
  16048. let chapterData = []
  16049. if (this.oldIndex == 0) {
  16050. chapterData = newItems[this.oldIndex].chapterData
  16051. newItems[this.oldIndex].chapterData = []
  16052. } else if (this.newIndex == 0) {
  16053. chapterData = newItems[this.newIndex].chapterData
  16054. newItems[this.oldIndex].chapterData = []
  16055. }
  16056. // 删除老的节点
  16057. newItems.splice(this.oldIndex, 1);
  16058. // 在列表中目标位置增加新的节点
  16059. newItems.splice(this.newIndex, 0, this.oldData);
  16060. if (this.oldIndex == 0 || this.newIndex == 0) {
  16061. newItems[0].chapterData = chapterData
  16062. }
  16063. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16064. ...newItems,
  16065. ];
  16066. }
  16067. this.typeIndex = "";
  16068. this.newIndex = "";
  16069. this.dragType = "";
  16070. this.checkUnitIndex = "";
  16071. this.isdrag = "";
  16072. this.updateWork();
  16073. this.$forceUpdate();
  16074. }
  16075. },
  16076. dragUnitStart(val, i) {
  16077. this.dragType = "Unit";
  16078. this.oldIndex = i;
  16079. this.oldData = val;
  16080. },
  16081. dragUnitOver(i) {
  16082. this.typeIndex = "Unit-" + i;
  16083. this.newIndex = i;
  16084. console.log(i, this.unitJson[i].toolOpen);
  16085. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  16086. this.unitJson[i].toolOpen = true;
  16087. this.updateWork();
  16088. this.$forceUpdate();
  16089. }
  16090. },
  16091. async dragUnitEnd() {
  16092. if (this.dragType != "Unit") {
  16093. this.newIndex = "";
  16094. this.dragType = "";
  16095. this.typeIndex = "";
  16096. this.isdrag = "";
  16097. return;
  16098. }
  16099. if (this.newIndex == this.oldIndex) {
  16100. this.newIndex = "";
  16101. this.dragType = "";
  16102. this.typeIndex = "";
  16103. this.isdrag = "";
  16104. return;
  16105. }
  16106. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  16107. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  16108. console.log(count1, count2);
  16109. if (count1 > 0 || count2 > 0) {
  16110. this.$confirm(
  16111. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  16112. "提示",
  16113. {
  16114. confirmButtonText: "确定",
  16115. cancelButtonText: "取消",
  16116. type: "warning",
  16117. }
  16118. )
  16119. .then(() => {
  16120. let newItems = [...this.unitJson];
  16121. // 删除老的节点
  16122. newItems.splice(this.oldIndex, 1);
  16123. // 在列表中目标位置增加新的节点
  16124. newItems.splice(this.newIndex, 0, this.oldData);
  16125. this.unitJson = [...newItems];
  16126. this.typeIndex = "";
  16127. this.newIndex = "";
  16128. this.dragType = "";
  16129. this.isdrag = "";
  16130. this.updateWork();
  16131. this.$forceUpdate();
  16132. })
  16133. .catch(() => {
  16134. this.newIndex = "";
  16135. this.dragType = "";
  16136. this.typeIndex = "";
  16137. this.isdrag = "";
  16138. return;
  16139. });
  16140. } else {
  16141. let newItems = [...this.unitJson];
  16142. // 删除老的节点
  16143. newItems.splice(this.oldIndex, 1);
  16144. // 在列表中目标位置增加新的节点
  16145. newItems.splice(this.newIndex, 0, this.oldData);
  16146. this.unitJson = [...newItems];
  16147. this.typeIndex = "";
  16148. this.newIndex = "";
  16149. this.dragType = "";
  16150. this.isdrag = "";
  16151. this.updateWork();
  16152. this.$forceUpdate();
  16153. }
  16154. },
  16155. getWorksCount(type, stage, task, tool) {
  16156. return new Promise((resolve, reject) => {
  16157. let params = [
  16158. {
  16159. cid: this.cid,
  16160. stage: stage,
  16161. task: task,
  16162. tool: tool,
  16163. type: type,
  16164. },
  16165. ];
  16166. this.ajax
  16167. .post(this.$store.state.api + "getCourseWorkCount", params)
  16168. .then((res) => {
  16169. let count = res.data[0][0].count;
  16170. resolve(count);
  16171. })
  16172. .catch((err) => {
  16173. resolve(0);
  16174. this.$message.error("网络不佳");
  16175. console.error(err);
  16176. });
  16177. });
  16178. },
  16179. getTwoType(id) {
  16180. this.twoJson = [];
  16181. var array = this.CourseTypeJson1[
  16182. "3f8eed32-aba9-11ee-b534-005056b86db5"
  16183. ].filter((e) => {
  16184. return e.ppid == id;
  16185. });
  16186. this.twoJson = array;
  16187. this.$forceUpdate();
  16188. },
  16189. ctype() {
  16190. this.oneJson =
  16191. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  16192. },
  16193. selectAllType1() {
  16194. this.CourseType1 = [];
  16195. this.CourseTypeJson1 = {};
  16196. this.courseTypeId1 = {};
  16197. this.$forceUpdate();
  16198. let params = {
  16199. org: this.org && this.org != "" ? this.org : "",
  16200. oid: this.oid && this.oid != "" ? this.oid : "",
  16201. };
  16202. this.ajax
  16203. .get(this.$store.state.api + "selectAllEvaType", params)
  16204. .then((res) => {
  16205. this.CourseType1 = res.data;
  16206. for (var i = 0; i < res.data[0].length; i++) {
  16207. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  16208. res.data[0][i].name = "一级分类";
  16209. } else if (
  16210. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  16211. ) {
  16212. res.data[0][i].name = "二级分类";
  16213. }
  16214. if (!this.cid) {
  16215. this.courseTypeId1[res.data[0][i].id] = [];
  16216. }
  16217. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  16218. this.CourseTypeJson1[res.data[0][i].id] = [];
  16219. }
  16220. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  16221. for (var j = 0; j < res.data[1].length; j++) {
  16222. if (res.data[0][i].id == res.data[1][j].pid) {
  16223. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16224. }
  16225. }
  16226. // } else {
  16227. if (res.data[2].length > 0) {
  16228. for (var j = 0; j < res.data[2].length; j++) {
  16229. if (res.data[0][i].id == res.data[2][j].pid) {
  16230. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16231. }
  16232. }
  16233. }
  16234. if (res.data[3].length > 0) {
  16235. for (var j = 0; j < res.data[3].length; j++) {
  16236. if (res.data[0][i].id == res.data[3][j].pid) {
  16237. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16238. }
  16239. }
  16240. }
  16241. // }
  16242. }
  16243. this.ctype();
  16244. this.cetBoxDialog = true;
  16245. })
  16246. .catch((err) => {
  16247. console.error(err);
  16248. });
  16249. },
  16250. setAiJson(pan,string,string2,string3){
  16251. if(pan == 'aiTeacher2'){
  16252. this.aiJson['teacherDetail2'] = string
  16253. }else if(pan == 'aiRateRuleA'){
  16254. this.aiJson['aiRateRule'] = string
  16255. }else if(pan == 'aiOutline2'){
  16256. this.aiJson['aiOutlineTask'] = string
  16257. this.aiJson['aiOutlineDetail'] = string2
  16258. }else if(pan == 'aiTeacher3'){
  16259. this.aiJson['aiCpoteTask'] = string
  16260. this.aiJson['teacherDetail2'] = string2
  16261. }else if(pan == 'aiTask2'){
  16262. this.aiJson['aiTask'] = string
  16263. }else if(pan == 'aiTask3'){
  16264. this.aiJson['aiTaskG1'] = string
  16265. this.aiJson['aiTaskG2'] = string2
  16266. this.aiJson['aiTaskG3'] = string3
  16267. }else if(pan == 'aiteacherTextDetail'){
  16268. this.aiJson['aiAbstract'] = string
  16269. }else if(pan == 'aitargetTextDetail'){
  16270. this.aiJson['aiTarget'] = string
  16271. }else if(pan == 'aitargetTextDetail2'){
  16272. this.aiJson['aiTarget2'] = string
  16273. }else if(pan == 'aitargetTextDetail3'){
  16274. this.aiJson['aiTargetGet'] = string
  16275. this.aiJson['aiTarget2'] = string2
  16276. }else {
  16277. this.aiJson[pan] = string
  16278. }
  16279. this.aiText2 = ''
  16280. this.aiText3 = ''
  16281. this.$forceUpdate();
  16282. },
  16283. editTask3(index){
  16284. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  16285. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  16286. }else {
  16287. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  16288. }
  16289. setTimeout(() => {
  16290. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  16291. setTimeout(() => {
  16292. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  16293. }, 0);
  16294. }, 100);
  16295. this.$forceUpdate();
  16296. },
  16297. editTask2(index){
  16298. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  16299. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  16300. }else {
  16301. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  16302. }
  16303. setTimeout(() => {
  16304. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  16305. setTimeout(() => {
  16306. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  16307. }, 0);
  16308. }, 100);
  16309. this.$forceUpdate();
  16310. },
  16311. openRule(i, k){
  16312. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  16313. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  16314. }else {
  16315. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  16316. }
  16317. setTimeout(() => {
  16318. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  16319. setTimeout(() => {
  16320. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  16321. }, 0);
  16322. }, 100);
  16323. this.$forceUpdate();
  16324. },
  16325. editCpote(index){
  16326. if(this.cpote[index]){
  16327. this.cpote[index] = false
  16328. }else {
  16329. this.cpote[index] = true
  16330. }
  16331. setTimeout(() => {
  16332. this.cpote[index.replace('s','')] += "*0*%*";
  16333. setTimeout(() => {
  16334. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  16335. }, 0);
  16336. }, 100);
  16337. this.$forceUpdate();
  16338. },
  16339. clickGenTT(){
  16340. if(!this.teacherInfoData.length){
  16341. this.$message.error("请上传教案");
  16342. return;
  16343. }
  16344. this.openAiDialog(2, 'aiteacherTextDetail',1)
  16345. setTimeout(() => {
  16346. this.openAiDialog(2, 'aitargetTextDetail',1)
  16347. }, 500);
  16348. },
  16349. async exportTeachPlan(){
  16350. this.loading = true
  16351. const zip = new JSZip();
  16352. let md = new MarkdownIt();
  16353. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16354. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  16355. let name = _task.task+'-教案'
  16356. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  16357. if(!this.cid){
  16358. await this.generate(name, _html, i)
  16359. }
  16360. let file = await this.generateExport(name, _html, i)
  16361. zip.file(`${name}.docx`, file, { binary: true })
  16362. }
  16363. zip.generateAsync({ type: "blob" }).then((content) => {
  16364. // 生成二进制流
  16365. saveAs(
  16366. content,
  16367. this.courseName + "-" + "教案.zip"
  16368. ); // 利用file-saver保存文件 自定义文件名
  16369. setTimeout(() => {
  16370. this.loading = false
  16371. if(!this.cid){
  16372. this.addWork(3)
  16373. }else{
  16374. this.steps = 4;
  16375. }
  16376. }, 2000);
  16377. });
  16378. },
  16379. clickGenTT2(){
  16380. if (this.courseName == "") {
  16381. this.$message.error("请补充填写课程名称");
  16382. return;
  16383. }
  16384. this.openAiDialog(2, 'aiDetail',1)
  16385. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  16386. setTimeout(() => {
  16387. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  16388. this.openAiDialog(2, 'aitargetTextDetail3',1)
  16389. }, 500);
  16390. }
  16391. this.courseTextBool = true
  16392. },
  16393. changeIsuseT(){
  16394. if(this.isuseT == 1){
  16395. this.courseTextB = false
  16396. }else{
  16397. if(this.courseText){
  16398. this.courseTextB = false
  16399. }else{
  16400. this.courseTextB = true
  16401. }
  16402. }
  16403. },
  16404. openInterPanSetting(){
  16405. this.interSetting = !this.interSetting
  16406. if(this.interSetting){
  16407. if(this.istemplate == 1){
  16408. this.agentid = this.aiJson.agentid
  16409. }else {
  16410. this.agentid = this.aiJson.sagentid
  16411. }
  16412. }else {
  16413. this.agentid = ''
  16414. }
  16415. },
  16416. setAgentid(){
  16417. if(!this.agentid.trim()){
  16418. this.$message.error('请输入工作流链接')
  16419. return;
  16420. }
  16421. if(this.istemplate == 1){
  16422. this.aiJson.agentid = this.agentid.trim()
  16423. }else {
  16424. this.aiJson.sagentid = this.agentid.trim()
  16425. }
  16426. this.interFlash = false
  16427. setTimeout(() => {
  16428. this.interFlash = true
  16429. }, 100);
  16430. this.interSetting = false
  16431. },
  16432. rebuildAgentid(){
  16433. this.aiJson.sagentid = ''
  16434. this.interFlash = false
  16435. setTimeout(() => {
  16436. this.interFlash = true
  16437. }, 100);
  16438. this.interSetting = false
  16439. },
  16440. cancelInterSetting(){
  16441. this.agentid = ''
  16442. this.interSetting = false
  16443. },
  16444. openAiDialog2(clickType, type, callback, index, tindex){
  16445. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  16446. confirmButtonText: "确定",
  16447. cancelButtonText: "取消",
  16448. type: "warning",
  16449. })
  16450. .then(() => {
  16451. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  16452. // this.openAiDialog(clickType, 'aiTeacher')
  16453. // }else {
  16454. this.openAiDialog(clickType, type, callback, index, tindex)
  16455. // }
  16456. })
  16457. .catch(() => {
  16458. });
  16459. },
  16460. openAiDialog(clickType, type, callback, index, tindex) {
  16461. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  16462. this.$message.error("您没有权限修改/查看提示词");
  16463. return;
  16464. }
  16465. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  16466. this.$message.error("请上传教案");
  16467. return;
  16468. }
  16469. if (this.courseName == "") {
  16470. this.$message.error("请补充填写课程名称");
  16471. return;
  16472. }
  16473. this.aiText2 = ''
  16474. this.clickType = clickType
  16475. let sub = []
  16476. if (this.courseTypeId.length) {
  16477. for (var i = 0; i < this.courseTypeId.length; i++) {
  16478. let _sid = this.courseTypeId[i]
  16479. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16480. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16481. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16482. }
  16483. }
  16484. }
  16485. }
  16486. let mclass = []
  16487. if (this.courseTypeId.length) {
  16488. for (var i = 0; i < this.courseTypeId.length; i++) {
  16489. let _sid = this.courseTypeId[i]
  16490. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16491. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16492. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16493. }
  16494. }
  16495. }
  16496. }
  16497. if (type == "aiDetail") {
  16498. if (this.ttextLoading) {
  16499. this.$message({
  16500. message: "请回答完毕后再次发送",
  16501. type: "warning"
  16502. });
  16503. return;
  16504. }
  16505. this.aitype = "aiDetail"
  16506. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  16507. this.aiText = this.aiJson.aiDetail
  16508. this.aiCallBack = callback
  16509. } else if (type == "aiOutline") {
  16510. this.aitype = "aiOutline"
  16511. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16512. this.aiText = this.aiJson.aiOutline
  16513. } else if (type == "aiOutline2") {
  16514. this.aitype = "aiOutline2"
  16515. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16516. this.aiText = this.aiJson.aiOutlineTask
  16517. this.aiText2 = this.aiJson.aiOutlineDetail
  16518. } else if (type == "aiOutlineDetail2") {
  16519. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  16520. this.$message({
  16521. message: "请回答完毕后再次发送",
  16522. type: "warning"
  16523. });
  16524. return;
  16525. }
  16526. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  16527. this.$message.error('请输入任务名称')
  16528. return;
  16529. }
  16530. this.aitype = type
  16531. this.aiCallBack = callback
  16532. this.aiText = this.aiJson.aiOutlineDetail2
  16533. } else if (type == "aiTask") {
  16534. this.aitype = "aiTask"
  16535. var _text = ""
  16536. for (var i = 0; i < this.teacherText.length; i++) {
  16537. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  16538. }
  16539. // this.aiText = `请根据${_text}。`
  16540. this.aiText = this.aiJson.aiTask
  16541. this.aiCallBack = callback
  16542. } else if (type == "aiTask2") {
  16543. if (this.taskLoading[callback]) {
  16544. this.$message({
  16545. message: "请回答完毕后再次发送",
  16546. type: "warning"
  16547. });
  16548. return;
  16549. }
  16550. this.aitype = "aiTask2"
  16551. this.aiText = this.aiJson.aiTask
  16552. this.aiCallBack = [callback, index]
  16553. } else if (type == "aiTask3") {
  16554. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  16555. this.$message({
  16556. message: "请回答完毕后再次发送",
  16557. type: "warning"
  16558. });
  16559. return;
  16560. }
  16561. this.aitype = type
  16562. this.aiText = this.aiJson.aiTaskG1
  16563. this.aiText2 = this.aiJson.aiTaskG2
  16564. this.aiText3 = this.aiJson.aiTaskG3
  16565. this.aiCallBack = [callback, index]
  16566. } else if (type == "aiTaskG3") {
  16567. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][2])) {
  16568. this.$message({
  16569. message: "请回答完毕后再次发送",
  16570. type: "warning"
  16571. });
  16572. return;
  16573. }
  16574. this.aitype = type
  16575. this.aiText = this.aiJson.aiTaskG3
  16576. this.aiCallBack = callback
  16577. } else if (type == "aiDetail1") {
  16578. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  16579. this.$message({
  16580. message: "请回答完毕后再次发送",
  16581. type: "warning"
  16582. });
  16583. return;
  16584. }
  16585. this.aitype = "aiDetail1"
  16586. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  16587. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  16588. this.aiText = this.aiJson.aiDetail1
  16589. this.aiCallBack = callback
  16590. this.aiIndex = index
  16591. } else if (type == "aiDetail2") {
  16592. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  16593. this.$message({
  16594. message: "请回答完毕后再次发送",
  16595. type: "warning"
  16596. });
  16597. return;
  16598. }
  16599. this.aitype = "aiDetail2"
  16600. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  16601. this.aiText = this.aiJson.aiDetail2
  16602. this.aiCallBack = callback
  16603. this.aiIndex = index
  16604. } else if (type == "aiDetail3") {
  16605. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  16606. this.$message({
  16607. message: "请回答完毕后再次发送",
  16608. type: "warning"
  16609. });
  16610. return;
  16611. }
  16612. this.aitype = "aiDetail3"
  16613. this.aiText = this.aiJson.aiDetail3
  16614. this.aiIndex = index + '-' + tindex
  16615. } else if (type == "aiDetail4") {
  16616. var _text = ""
  16617. if(callback && callback.length){
  16618. for (var i = 0; i < callback.length; i++) {
  16619. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  16620. }
  16621. }
  16622. this.aitype = "aiDetail4"
  16623. this.aiText = this.aiJson.aiDetail4
  16624. this.aiIndex = index
  16625. } else if (type == "aiTeacher") {
  16626. this.aitype = "aiTeacher"
  16627. var _text = ""
  16628. for (var i = 0; i < this.dArray.length; i++) {
  16629. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  16630. }
  16631. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16632. this.aiText = this.aiJson.aiTeacher
  16633. this.aiCallBack = callback
  16634. } else if (type == "aiTeacher2") {
  16635. if(this.ttaskDetailLoading5.length){
  16636. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  16637. this.$message({
  16638. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  16639. type: "warning"
  16640. });
  16641. return
  16642. }
  16643. this.aitype = "aiTeacher2"
  16644. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16645. } else if (type == "aiTeacher3") {
  16646. this.aitype = type
  16647. this.aiText = this.aiJson.aiCpoteTask
  16648. this.aiText2 = this.aiJson.teacherDetail2
  16649. } else if (type == "teacherDetail") {
  16650. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  16651. this.$message({
  16652. message: "请回答完毕后再次发送",
  16653. type: "warning"
  16654. });
  16655. return;
  16656. }
  16657. this.aitype = "teacherDetail"
  16658. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16659. this.aiText = this.aiJson.teacherDetail
  16660. this.aiCallBack = callback
  16661. this.aiIndex = index
  16662. } else if (type == "teacherDetail2") {
  16663. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  16664. this.$message.error('请输入任务名称')
  16665. return;
  16666. }
  16667. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  16668. // this.$message({
  16669. // message: "请回答完毕后再次发送",
  16670. // type: "warning"
  16671. // });
  16672. // return;
  16673. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  16674. confirmButtonText: "确定重新生成",
  16675. cancelButtonText: "取消",
  16676. distinguishCancelAndClose: true,
  16677. type: "warning",
  16678. })
  16679. .then(() => {
  16680. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  16681. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  16682. this.isTeacherTaskCancelToken2[index] = null;
  16683. }
  16684. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  16685. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  16686. if(this.isTeacherTaskCancelSource[index]){
  16687. this.isTeacherTaskCancelSource[index].close()
  16688. this.isTeacherTaskCancelSource[index] = null
  16689. }
  16690. this.aitype = "teacherDetail2"
  16691. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16692. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16693. this.aiCallBack = callback
  16694. this.aiIndex = index
  16695. this.dialogVisibleAiD = true
  16696. }).catch((v) => {
  16697. console.log(v);
  16698. })
  16699. return;
  16700. }else {
  16701. this.aitype = "teacherDetail2"
  16702. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16703. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16704. this.aiCallBack = callback
  16705. this.aiIndex = index
  16706. this.dialogVisibleAiD = true
  16707. }
  16708. } else if (type == "aiCpote1") {
  16709. if (this.cpotetLoading.cpote1) {
  16710. this.$message({
  16711. message: "请回答完毕后再次发送",
  16712. type: "warning"
  16713. });
  16714. return;
  16715. }
  16716. this.aitype = "aiCpote1"
  16717. this.aiText = this.aiJson.cpote1
  16718. this.aiCallBack = callback
  16719. } else if (type == "aiCpote2") {
  16720. if (this.cpotetLoading.cpote2) {
  16721. this.$message({
  16722. message: "请回答完毕后再次发送",
  16723. type: "warning"
  16724. });
  16725. return;
  16726. }
  16727. this.aitype = "aiCpote2"
  16728. this.aiText = this.aiJson.cpote2
  16729. this.aiCallBack = callback
  16730. } else if (type == "aiCpote3") {
  16731. if (this.cpotetLoading.cpote3) {
  16732. this.$message({
  16733. message: "请回答完毕后再次发送",
  16734. type: "warning"
  16735. });
  16736. return;
  16737. }
  16738. this.aitype = "aiCpote3"
  16739. this.aiText = this.aiJson.cpote3
  16740. this.aiCallBack = callback
  16741. } else if (type == "aiCpote4") {
  16742. if (this.cpotetLoading.cpote4) {
  16743. this.$message({
  16744. message: "请回答完毕后再次发送",
  16745. type: "warning"
  16746. });
  16747. return;
  16748. }
  16749. this.aitype = "aiCpote4"
  16750. this.aiText = this.aiJson.cpote4
  16751. this.aiCallBack = callback
  16752. } else if (type == 'aiteacherTextDetail'){
  16753. if (this.tteacherTextLoading) {
  16754. this.$message({
  16755. message: "请回答完毕后再次发送",
  16756. type: "warning"
  16757. });
  16758. return;
  16759. }
  16760. this.aitype = type
  16761. this.aiText = this.aiJson.aiAbstract
  16762. this.aiCallBack = callback
  16763. } else if (type == 'aitargetTextDetail'){
  16764. if (this.ttargetTextLoading) {
  16765. this.$message({
  16766. message: "请回答完毕后再次发送",
  16767. type: "warning"
  16768. });
  16769. return;
  16770. }
  16771. this.aitype = type
  16772. this.aiText = this.aiJson.aiTarget
  16773. this.aiCallBack = callback
  16774. } else if (type == 'aitargetTextDetail2'){
  16775. if (this.ttargetTextLoading2) {
  16776. this.$message({
  16777. message: "请回答完毕后再次发送",
  16778. type: "warning"
  16779. });
  16780. return;
  16781. }
  16782. this.aitype = type
  16783. this.aiText = this.aiJson.aiTarget2
  16784. this.aiCallBack = callback
  16785. } else if (type == 'aitargetTextDetail3'){
  16786. if (this.ttargetTextLoading2) {
  16787. this.$message({
  16788. message: "请回答完毕后再次发送",
  16789. type: "warning"
  16790. });
  16791. return;
  16792. }
  16793. this.aitype = type
  16794. this.aiText = this.aiJson.aiTargetGet
  16795. this.aiText2 = this.aiJson.aiTarget2
  16796. this. aiCallBack= callback
  16797. } else if (type == 'aiSearchFile'){
  16798. if(this.fileSLoading) {
  16799. this.$message({
  16800. message: "请回答完毕后再次发送",
  16801. type: "warning"
  16802. });
  16803. return;
  16804. }
  16805. this.aitype = type
  16806. this.aiText = this.aiJson.aiSearchFile
  16807. } else if (type == 'aiSearchFile2'){
  16808. if(this.fileSLoading) {
  16809. this.$message({
  16810. message: "请回答完毕后再次发送",
  16811. type: "warning"
  16812. });
  16813. return;
  16814. }
  16815. this.aitype = type
  16816. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  16817. #输出样例
  16818. <学科1>:关键词
  16819. - 匹配到的内容1
  16820. - 匹配到的内容2
  16821. - 匹配到的内容3
  16822. - 匹配到的内容4
  16823. - 匹配到的内容5
  16824. <学科2>:关键词
  16825. - 匹配到的内容1
  16826. - 匹配到的内容2
  16827. - 匹配到的内容3
  16828. - 匹配到的内容4
  16829. - 匹配到的内容5
  16830. ...
  16831. <学科n>:关键词
  16832. - 匹配到的内容1
  16833. - 匹配到的内容2
  16834. - 匹配到的内容3
  16835. - 匹配到的内容4
  16836. - 匹配到的内容5
  16837. `
  16838. } else if (type == 'aiRateRule'){
  16839. this.aitype = type
  16840. this.aiText = this.aiJson.aiRateRule
  16841. this.aiCallBack = [callback, index]
  16842. } else if (type == 'aiRateRuleA'){
  16843. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  16844. confirmButtonText: "生成所有",
  16845. cancelButtonText: "仅生成该任务",
  16846. distinguishCancelAndClose: true,
  16847. type: "warning",
  16848. })
  16849. .then(() => {
  16850. this.aitype = type
  16851. this.aiText = this.aiJson.aiRateRule
  16852. this.aiCallBack = [1,callback]
  16853. this.dialogVisibleAiD = true
  16854. }).catch((v) => {
  16855. console.log(v);
  16856. if (v == "cancel") {
  16857. this.aitype = type
  16858. this.aiText = this.aiJson.aiRateRule
  16859. this.aiCallBack = [2,callback]
  16860. this.dialogVisibleAiD = true
  16861. }
  16862. })
  16863. }
  16864. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  16865. this.dialogVisibleAiD = true
  16866. }
  16867. },
  16868. async aiConfirm(msg,msg2,msg3) {
  16869. let sub = []
  16870. if (this.courseTypeId.length) {
  16871. for (var i = 0; i < this.courseTypeId.length; i++) {
  16872. let _sid = this.courseTypeId[i]
  16873. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16874. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16875. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16876. }
  16877. }
  16878. }
  16879. }
  16880. let mclass = []
  16881. if (this.courseTypeId.length) {
  16882. for (var i = 0; i < this.courseTypeId.length; i++) {
  16883. let _sid = this.courseTypeId[i]
  16884. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16885. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16886. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16887. }
  16888. }
  16889. }
  16890. }
  16891. let url = []
  16892. if (this.infoData.length) {
  16893. for (var i = 0; i < this.infoData.length; i++) {
  16894. url.push(this.infoData[i].url)
  16895. }
  16896. }
  16897. if (this.aitype == "aiDetail") {
  16898. this.detailYou(msg)
  16899. } else if (this.aitype == "aiOutline") {
  16900. this.loading = true
  16901. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  16902. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  16903. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  16904. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16905. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16906. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16907. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16908. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  16909. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  16910. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16911. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16912. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16913. let message = `NOTICE
  16914. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16915. Language: ${this.getLang()}
  16916. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16917. Instruction: Based on the context, follow "Format example", write content.
  16918. # Context
  16919. ## 要求
  16920. ${msg} 以及##参考资料
  16921. ## 参考资料
  16922. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16923. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16924. detail至少输出300tokens,markdown格式输出。
  16925. detail包含子教学目标、过程性成果、子评价标准
  16926. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  16927. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  16928. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  16929. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  16930. # Format example
  16931. [{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]`
  16932. // detail输出不要输出成json,文本或者markdown都可以
  16933. this.aiGet2(message, () => {
  16934. this.loading = false
  16935. this.isOutline = true
  16936. })
  16937. } else if (this.aitype == "aiOutline2") {
  16938. this.loading = true
  16939. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  16940. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  16941. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  16942. let message = `NOTICE
  16943. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  16944. Language: ${this.getLang()}
  16945. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16946. Instruction: Based on the context, follow "Format example", write content.
  16947. # Context
  16948. ## 要求
  16949. ${msg} 以及##参考资料
  16950. ## 参考资料
  16951. 课程名字:${this.courseName}
  16952. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  16953. ${sub.length ? '学科:' + sub.join(",") : ''}
  16954. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  16955. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  16956. # Format example
  16957. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  16958. this.aiGetTask2(message, () => {
  16959. this.loading = false
  16960. this.isOutline = true
  16961. })
  16962. } else if (this.aitype == "aiOutlineDetail2") {
  16963. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  16964. } else if (this.aitype == "aiTask") {
  16965. var _text = ""
  16966. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  16967. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16968. }
  16969. let message = `NOTICE
  16970. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  16971. Language: ${this.getLang()}
  16972. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  16973. Instruction: Based on the context, follow "Format example", write content.
  16974. # Context
  16975. ## 要求
  16976. ${msg} 为**每个教学任务分别输出**以下内容。
  16977.  
  16978. ${(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','') : ''}
  16979. ## 参考资料
  16980. 教学任务教案:${_text}
  16981. ## 格式要求
  16982. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  16983. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  16984. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  16985. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  16986. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  16987. 出现选择题和问答题的概率提高
  16988. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  16989.  
  16990. # Format example
  16991. [{"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":"工具描述"}]}]`
  16992. this.loading = true
  16993. this.aiGet3(message, this.aiCallBack)
  16994. } else if (this.aitype == "aiTask2") {
  16995. if(this.aiCallBack[0] == 'all'){
  16996. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  16997. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  16998. let message = `NOTICE
  16999. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  17000. Language: ${this.getLang()}
  17001. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17002. Instruction: Based on the context, follow "Format example", write content.
  17003. # Context
  17004. ## 要求
  17005. ${msg} 为教学任务分别输出以下内容。
  17006.  
  17007. ${(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','') : ''}
  17008. ## 参考资料
  17009. 教学任务教案:${_text}
  17010. ## 格式要求
  17011. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  17012. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  17013. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  17014. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  17015. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  17016.  
  17017. # Format example
  17018. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17019. this.taskLoading[_task] = true
  17020. this.aiGet32(message, _task)
  17021. }
  17022. }else{
  17023. 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`
  17024. let message = `NOTICE
  17025. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  17026. Language: ${this.getLang()}
  17027. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17028. Instruction: Based on the context, follow "Format example", write content.
  17029. # Context
  17030. ## 要求
  17031. ${msg} 为教学任务分别输出以下内容。
  17032.  
  17033. ${(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','') : ''}
  17034. ## 参考资料
  17035. 教学任务教案:${_text}
  17036. ## 格式要求
  17037. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  17038. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  17039. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  17040. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  17041. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  17042.  
  17043. # Format example
  17044. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17045. this.taskLoading[this.aiCallBack[0]] = true
  17046. this.aiGet32(message, this.aiCallBack[0])
  17047. }
  17048. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17049. } else if (this.aitype == "aiTask3") {
  17050. if(this.aiCallBack[0] == 'all'){
  17051. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  17052. let message1 = `NOTICE
  17053. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17054. Language: ${this.getLang()}
  17055. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17056. Instruction: Based on the context, follow "Format example", write content.
  17057. # Context
  17058. ## 要求
  17059. ${msg}
  17060.  
  17061. ## 参考资料
  17062. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17063. # 输出格式与要求
  17064. 任务描述(告诉学生他们需要做什么):
  17065. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  17066. # 范例
  17067. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  17068. # Format example
  17069. { "detail":"任务描述" }`
  17070. let message2 = `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. ${msg2}
  17078.  
  17079. ## 参考资料
  17080. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17081. # 输出格式与要求
  17082. 互动工具列表
  17083. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  17084. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  17085. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  17086. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  17087. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  17088. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  17089. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  17090. # Format example
  17091. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17092. let message3 = `NOTICE
  17093. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17094. Language: ${this.getLang()}
  17095. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17096. Instruction: Based on the context, follow "Format example", write content.
  17097. # Context
  17098. ## 要求
  17099. ${msg3}
  17100.  
  17101. ## 参考资料
  17102. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17103. # 输出格式与要求
  17104. 核心素养:从教案中提取
  17105. 目标:从教案中提取
  17106. 评价标准:从教案中提取评价标准
  17107. # Format example
  17108. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17109. if(!this.taskGLoading[_task]){
  17110. this.taskGLoading[_task] = []
  17111. }
  17112. this.taskGLoading[_task][0] = true
  17113. this.taskGLoading[_task][1] = true
  17114. // this.taskGLoading[_task][2] = true
  17115. this.aiGetG321(message1, _task)
  17116. this.aiGetG322(message2, _task)
  17117. // this.aiGetG323(message3, _task)
  17118. }
  17119. }else{
  17120. let message1 = `NOTICE
  17121. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17122. Language: ${this.getLang()}
  17123. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17124. Instruction: Based on the context, follow "Format example", write content.
  17125. # Context
  17126. ## 要求
  17127. ${msg}
  17128.  
  17129. ## 参考资料
  17130. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17131. # 输出格式与要求
  17132. 任务描述(告诉学生他们需要做什么):
  17133. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  17134. # 范例
  17135. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  17136. # Format example
  17137. { "detail":"任务描述" }`
  17138. let message2 = `NOTICE
  17139. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17140. Language: ${this.getLang()}
  17141. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17142. Instruction: Based on the context, follow "Format example", write content.
  17143. # Context
  17144. ## 要求
  17145. ${msg2}
  17146.  
  17147. ## 参考资料
  17148. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17149. # 输出格式与要求
  17150. 互动工具列表
  17151. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  17152. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  17153. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  17154. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  17155. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  17156. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  17157. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  17158. # Format example
  17159. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17160. let message3 = `NOTICE
  17161. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17162. Language: ${this.getLang()}
  17163. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17164. Instruction: Based on the context, follow "Format example", write content.
  17165. # Context
  17166. ## 要求
  17167. ${msg3}
  17168.  
  17169. ## 参考资料
  17170. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17171. # 输出格式与要求
  17172. 核心素养:从教案中提取
  17173. 目标:从教案中提取
  17174. 评价标准:从教案中提取评价标准
  17175. # Format example
  17176. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17177. if(!this.taskGLoading[this.aiCallBack[0]]){
  17178. this.taskGLoading[this.aiCallBack[0]] = []
  17179. }
  17180. this.taskGLoading[this.aiCallBack[0]][0] = true
  17181. this.taskGLoading[this.aiCallBack[0]][1] = true
  17182. // this.taskGLoading[this.aiCallBack[0]][2] = true
  17183. this.aiGetG321(message1, this.aiCallBack[0])
  17184. this.aiGetG322(message2, this.aiCallBack[0])
  17185. // this.aiGetG323(message3, this.aiCallBack[0])
  17186. }
  17187. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17188. } else if (this.aitype == "aiTaskG3") {
  17189. let message3 = `NOTICE
  17190. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17191. Language: ${this.getLang()}
  17192. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17193. Instruction: Based on the context, follow "Format example", write content.
  17194. # Context
  17195. ## 要求
  17196. ${msg3}
  17197.  
  17198. ## 参考资料
  17199. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17200. # 输出格式与要求
  17201. 核心素养:从教案中提取
  17202. 目标:从教案中提取
  17203. 评价标准:从教案中提取评价标准
  17204. # Format example
  17205. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17206. if(!this.taskGLoading[this.aiCallBack]){
  17207. this.taskGLoading[this.aiCallBack] = []
  17208. }
  17209. this.taskGLoading[this.aiCallBack][2] = true
  17210. this.aiGetG323(message3, this.aiCallBack)
  17211. } else if (this.aitype == "aiDetail1") {
  17212. this.aiDetail(msg, this.aiIndex)
  17213. } else if (this.aitype == "aiDetail2") {
  17214. this.aiDetail2(msg, this.aiIndex)
  17215. } else if (this.aitype == "aiDetail3") {
  17216. let _index = this.aiIndex.split('-')
  17217. this.aiDetail3(msg, _index[0], _index[1])
  17218. } else if (this.aitype == "aiDetail4") {
  17219. this.aiDetail4(msg, this.aiIndex)
  17220. } else if (this.aitype == "teacherDetail") {
  17221. this.aiDetail5(msg, this.aiIndex)
  17222. } else if (this.aitype == "teacherDetail2") {
  17223. this.aiDetail52(msg, this.aiIndex)
  17224. } else if (this.aitype == "aiCpote1") {
  17225. this.aiCpote(msg, this.aiCallBack)
  17226. } else if (this.aitype == "aiCpote2") {
  17227. this.aiCpote(msg, this.aiCallBack)
  17228. } else if (this.aitype == "aiCpote3") {
  17229. this.aiCpote(msg, this.aiCallBack)
  17230. } else if (this.aitype == "aiCpote4") {
  17231. this.aiCpote(msg, this.aiCallBack)
  17232. } else if (this.aitype == "aiTeacher") {
  17233. this.loading = true
  17234. var _text = ""
  17235. for (var i = 0; i < this.dArray.length; i++) {
  17236. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  17237. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  17238. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17239. let message = ` NOTICE
  17240. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17241. Language: ${this.getLang()}
  17242. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17243. Instruction: Based on the context, follow "Format example", write content.
  17244. # Context
  17245. ## 要求
  17246. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  17247. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  17248. ${(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','') : ''}
  17249. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17250. ## Format example
  17251. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  17252. this.aiGet4(message, () => {
  17253. this.loading = false
  17254. this.isOutline2 = true
  17255. })
  17256. } else if (this.aitype == "aiTeacher2"){
  17257. this.isOutline2 = true
  17258. let _this = this
  17259. setTimeout(()=>{
  17260. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17261. const _tindex = 'task-' + i;
  17262. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  17263. _this.taskDetailLoading5.push(_tindex)
  17264. }
  17265. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  17266. _this.ttaskDetailLoading5.push(_tindex)
  17267. }
  17268. // this.aiDetail52(msg, i)
  17269. }
  17270. let ij = 0;
  17271. function processNext() {
  17272. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  17273. const _tindex = 'task-' + ij;
  17274. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  17275. ij++;
  17276. processNext();
  17277. return;
  17278. }
  17279. // 处理当前任务
  17280. _this.aiDetail52(msg, ij, function () {
  17281. // 回调函数,当前任务完成后执行
  17282. ij++;
  17283. processNext(); // 处理下一个任务
  17284. });
  17285. }
  17286. }
  17287. processNext(); // 启动处理
  17288. }, 0)
  17289. } else if (this.aitype == "aiTeacher3"){
  17290. this.loading = true
  17291. let message = `NOTICE
  17292. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17293. Language: ${this.getLang()}
  17294. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17295. Instruction: Based on the context, follow "Format example", write content.
  17296. # Context
  17297. ## 要求
  17298. ${msg} 以及##参考资料
  17299. ## 参考资料
  17300. 任务簇:${this.cpote.cpote4}
  17301. # Format example
  17302. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  17303. this.aiGetTask3(message, () => {
  17304. this.loading = false
  17305. this.isOutline2 = true
  17306. })
  17307. } else if (this.aitype == "aiteacherTextDetail") {
  17308. this.aiteacherTextDetail(msg)
  17309. } else if (this.aitype == "aitargetTextDetail") {
  17310. this.aitargetTextDetail(msg)
  17311. } else if (this.aitype == "aitargetTextDetail2") {
  17312. this.aitargetTextDetail2(msg)
  17313. } else if (this.aitype == "aitargetTextDetail3") {
  17314. this.aitargetTextDetail3(msg)
  17315. } else if (this.aitype == 'aiSearchFile'){
  17316. let messages = `NOTICE
  17317. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17318. Language: ${this.getLang()}
  17319. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17320. Instruction: Based on the context, follow "Format example", write content.
  17321. ## 参考资料
  17322. 关键词:${this.courseName}
  17323. # Context
  17324. ## 要求
  17325. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  17326. # Format example
  17327. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  17328. this.fileSLoading = true
  17329. this.aiSearchFile(messages,()=>{
  17330. this.fileSLoading = false
  17331. })
  17332. } else if (this.aitype == 'aiSearchFile2'){
  17333. let messages = `${msg}
  17334. 课程名字:${this.courseName}
  17335. ${sub.length ? '学科:' + sub.join(",") : ''}
  17336. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  17337. this.fileSLoading = true
  17338. this.aiSearchFile2(messages,()=>{
  17339. this.fileSLoading = false
  17340. })
  17341. } else if (this.aitype == 'aiRateRule'){
  17342. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  17343. } else if (this.aitype == 'aiRateRuleA'){
  17344. if(this.aiCallBack[0] == 1){
  17345. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17346. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17347. for(var k = 0; k < task.eList.length; k++){
  17348. if(!task.eList[k].rule){
  17349. this.againEva(msg, i, k)
  17350. }
  17351. }
  17352. }
  17353. }else if(this.aiCallBack[0] == 2){
  17354. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  17355. for(var k = 0; k < task.eList.length; k++){
  17356. if(!task.eList[k].rule){
  17357. this.againEva(msg, this.aiCallBack[1], k)
  17358. }
  17359. }
  17360. }
  17361. }
  17362. this.setAiJson(this.aitype, msg, msg2, msg3)
  17363. },
  17364. getLang(){
  17365. let lang = ''
  17366. if(this.languageSetting == 0){
  17367. lang = 'Chinese.'
  17368. }else if(this.languageSetting == 1){
  17369. lang = 'Traditional Chinese.'
  17370. }else if(this.languageSetting == 2){
  17371. lang = 'English.'
  17372. }
  17373. return lang
  17374. },
  17375. detailYou(message) {
  17376. this.textLoading = true
  17377. this.ttextLoading = true
  17378. let sub = []
  17379. if (this.courseTypeId.length) {
  17380. for (var i = 0; i < this.courseTypeId.length; i++) {
  17381. let _sid = this.courseTypeId[i]
  17382. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17383. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17384. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17385. }
  17386. }
  17387. }
  17388. }
  17389. let mclass = []
  17390. if (this.courseTypeId.length) {
  17391. for (var i = 0; i < this.courseTypeId.length; i++) {
  17392. let _sid = this.courseTypeId[i]
  17393. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17394. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17395. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17396. }
  17397. }
  17398. }
  17399. }
  17400. let url = []
  17401. if (this.infoData.length) {
  17402. for (var i = 0; i < this.infoData.length; i++) {
  17403. url.push(this.infoData[i].url)
  17404. }
  17405. }
  17406. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  17407. // --------
  17408. // ## 补充参考资料
  17409. // 补充资料:${url.join(",")}
  17410. // 补充描述:${this.courseText2} ##补充参考资料和
  17411. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17412. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  17413. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  17414. let msg = `NOTICE
  17415. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  17416. Language: ${this.getLang()}
  17417. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17418. Instruction: Based on the context, follow "Format example", write content.
  17419. #Context
  17420. ## 参考资料
  17421. 课程名字:${this.courseName}
  17422. ${sub.length ? '学科:' + sub.join(",") : ''}
  17423. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17424. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  17425. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  17426. ${this.courseText && this.aiCallBack == 2 ? '参考内容:'+this.courseText : ''}
  17427. ## 要求
  17428. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  17429. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  17430. ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}
  17431. 如果在上传的文件中没有找到相关的课程简要描述、驱动性问题和最终作品的信息,请用自身的理解输出`
  17432. this.aiGet(msg)
  17433. },
  17434. setUnitJson() {
  17435. 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 }] }
  17436. this.$forceUpdate()
  17437. },
  17438. async aiGet(messages) {
  17439. let _this = this
  17440. let fileid = []
  17441. if(!this.yiKeTemplateArray.includes(this.templateid)){
  17442. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  17443. if(_this.cankaoInfoData[i].fileid){
  17444. fileid.push(_this.cankaoInfoData[i].fileid)
  17445. }else {
  17446. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  17447. if(_fileid){
  17448. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  17449. _this.$forceUpdate();
  17450. if(_fileid != 1){
  17451. fileid.push(_fileid)
  17452. }
  17453. }
  17454. }
  17455. }
  17456. if(this.mode == 1){
  17457. for (var i = 0; i < _this.infoData.length; i++) {
  17458. if(_this.infoData[i].fileid){
  17459. fileid.push(_this.infoData[i].fileid)
  17460. }else {
  17461. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17462. if(_fileid){
  17463. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17464. _this.$forceUpdate();
  17465. if(_fileid != 1){
  17466. fileid.push(_fileid)
  17467. }
  17468. }
  17469. }
  17470. }
  17471. }
  17472. } else {
  17473. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17474. fileid = [...fileid, ..._this.knowFileids]
  17475. if (_this.infoData.length) {
  17476. for (var i = 0; i < _this.infoData.length; i++) {
  17477. if(_this.infoData[i].fileid){
  17478. fileid.push(_this.infoData[i].fileid)
  17479. }else {
  17480. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17481. if(_fileid){
  17482. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17483. _this.$forceUpdate();
  17484. if(_fileid != 1){
  17485. fileid.push(_fileid)
  17486. }
  17487. }
  17488. }
  17489. }
  17490. }
  17491. }
  17492. _this.isTextCancelToken = _this.ajax.setCancelSource();
  17493. let _uuid = uuidv4();
  17494. // let params = JSON.stringify({
  17495. // // "model": "Chat",
  17496. // model: 'gpt-3.5-turbo',
  17497. // temperature: 0.1,
  17498. // max_tokens: 4096,
  17499. // top_p: 1,
  17500. // frequency_penalty: 0,
  17501. // presence_penalty: 0,
  17502. // messages: [{
  17503. // content: messages,
  17504. // role: 'user'
  17505. // }],
  17506. // uid: _uuid,
  17507. // mind_map_question: "",
  17508. // })
  17509. let params = {
  17510. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17511. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17512. session_name: _uuid,
  17513. userId: _this.userid,
  17514. uid: _uuid,
  17515. file_ids: fileid.length ? [...fileid] : '',
  17516. model: 'gpt-4o-2024-08-06',
  17517. temperature: 0.1,
  17518. }
  17519. // let params = JSON.stringify({
  17520. // message: {
  17521. // anthropic_version: "bedrock-2023-05-31",
  17522. // max_tokens: 4096,
  17523. // temperature: 0.1,
  17524. // top_p: 1,
  17525. // messages: [{
  17526. // "role": "user",
  17527. // "content": messages
  17528. // }] ,
  17529. // },
  17530. // uid: _uuid,
  17531. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17532. // });
  17533. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17534. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  17535. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17536. console.log(response);
  17537. // let data = response.data.FunctionResponse
  17538. // if (data.choices && data.choices.length && data.choices[0].message) {
  17539. // _this.courseText = data.choices[0].message.content
  17540. // }
  17541. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17542. } else {
  17543. _this.$message.warning(response.data.FunctionResponse.result);
  17544. }
  17545. _this.isTextCancelToken = null
  17546. }).catch(function (error) {
  17547. _this.textLoading = false
  17548. _this.ttextLoading = false
  17549. _this.isTextCancelToken = null
  17550. if(error && error.message != 'Request canceled by the user.'){
  17551. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17552. }
  17553. console.log(error);
  17554. });
  17555. await _this.aiGetgetAiContent(_uuid)
  17556. },
  17557. aiGetgetAiContent(_uid) {
  17558. try {
  17559. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17560. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17561. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17562. } catch(error){
  17563. console.log('EventSource error:', error);
  17564. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17565. this.textLoading = false
  17566. this.ttextLoading = false
  17567. this.isTextCancelToken = null
  17568. return;
  17569. }
  17570. let _allText = "";
  17571. let _mdText = "";
  17572. let _iindex = 0
  17573. this.isTextCancelSource.onmessage = _e => {
  17574. let _eData = JSON.parse(_e.data).content;
  17575. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17576. //对话已经完成
  17577. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  17578. this.isTextCancelSource.close();
  17579. this.isTextCancelSource = null;
  17580. this.courseText = _mdText;
  17581. this.textLoading = false
  17582. this.ttextLoading = false
  17583. this.courseTextB = false
  17584. this.isTextCancelToken = null
  17585. return;
  17586. } else {
  17587. _iindex++
  17588. //对话还在继续
  17589. let _text = "";
  17590. _text = _eData.replaceAll("'", "");
  17591. if (_allText == "") {
  17592. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17593. } else {
  17594. _allText += _text;
  17595. }
  17596. _mdText = _allText + "_";
  17597. _mdText = _mdText.replace(/\\n/g, "\n");
  17598. _mdText = _mdText.replace(/\\/g, "");
  17599. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17600. //转化返回的回复流数据
  17601. if(_iindex == 10){
  17602. this.courseText = _mdText;
  17603. _iindex = 0
  17604. }
  17605. this.textLoading = false
  17606. // 处理流数据
  17607. }
  17608. // this.$forceUpdate();
  17609. };
  17610. let _this = this
  17611. this.isTextCancelSource.onerror = function(event) {
  17612. // 处理错误,可以尝试重新连接
  17613. console.log('EventSource error:', event);
  17614. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17615. _this.textLoading = false
  17616. _this.ttextLoading = false
  17617. _this.isTextCancelToken = null
  17618. _this.isTextCancelSource.close();
  17619. _this.isTextCancelSource = null;
  17620. };
  17621. },
  17622. numberToChinese(number) {
  17623. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  17624. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  17625. let result = '';
  17626. let num = parseInt(number, 10);
  17627. let i = 0;
  17628. while (num > 0) {
  17629. result = chineseNum[num % 10] + chineseUnit[i] + result;
  17630. num = Math.floor(num / 10);
  17631. i++;
  17632. }
  17633. // 去除连续的零,保留一个零
  17634. result = result.replace(/零+/g, '零');
  17635. return result;
  17636. },
  17637. async aiGet2(messages, callback) {
  17638. let _this = this
  17639. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17640. fileid = [...fileid, ..._this.knowFileids]
  17641. if (_this.infoData.length) {
  17642. for (var i = 0; i < _this.infoData.length; i++) {
  17643. if(_this.infoData[i].fileid){
  17644. fileid.push(_this.infoData[i].fileid)
  17645. }else {
  17646. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17647. if(_fileid){
  17648. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17649. _this.$forceUpdate();
  17650. if(_fileid != 1){
  17651. fileid.push(_fileid)
  17652. }
  17653. }
  17654. }
  17655. }
  17656. }
  17657. console.log('fileid=========',fileid)
  17658. // let params = JSON.stringify({
  17659. // // "model": "Chat",
  17660. // model: 'gpt-3.5-turbo',
  17661. // temperature: 0.1,
  17662. // max_tokens: 4096,
  17663. // top_p: 1,
  17664. // frequency_penalty: 0,
  17665. // presence_penalty: 0,
  17666. // messages: [{
  17667. // content: messages,
  17668. // role: 'user'
  17669. // }],
  17670. // stream: false,
  17671. // uid: this.userid,
  17672. // mind_map_question: "",
  17673. // })
  17674. // // let params = JSON.stringify({
  17675. // // message: {
  17676. // // anthropic_version: "bedrock-2023-05-31",
  17677. // // max_tokens: 4096,
  17678. // // temperature: 0.1,
  17679. // // top_p: 1,
  17680. // // messages: [{
  17681. // // content: messages,
  17682. // // role: 'user'
  17683. // // }], //
  17684. // // },
  17685. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17686. // // });
  17687. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17688. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  17689. // console.log(response);
  17690. // let data = response.data.FunctionResponse
  17691. // if (data.choices && data.choices.length && data.choices[0].message) {
  17692. // console.log(data.choices[0].message.content);
  17693. // let dArray = JSON.parse(data.choices[0].message.content)
  17694. // _this.dArray = dArray
  17695. // _this.unitJson[0].chapterInfo[0].taskJson = []
  17696. // for (var i = 0; i < dArray.length; i++) {
  17697. // let _task = dArray[i]
  17698. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17699. // task: _task.task,
  17700. // taskDetail: "",
  17701. // taskDetail2: _task.detail,
  17702. // taskDetail3: "",
  17703. // chapterData: [],
  17704. // toolText: "",
  17705. // toolChoose: [
  17706. // {
  17707. // tool: [],
  17708. // toolDetail: "",
  17709. // toolType: 0,
  17710. // askCount: 1,
  17711. // askTitle: "",
  17712. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17713. // },
  17714. // ],
  17715. // isShowTools: false,
  17716. // askCount: 1,
  17717. // isFold: 0,
  17718. // askTitle: "",
  17719. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17720. // checkJson: [{ checkCount: [], checkPerent: [] }],
  17721. // homeworkList: [],
  17722. // })
  17723. // }
  17724. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  17725. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17726. // _this.$forceUpdate();
  17727. // }
  17728. // // if (data.result) {
  17729. // // console.log(data.result);
  17730. // // let dArray = JSON.parse(data.result)
  17731. // // _this.dArray = dArray
  17732. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  17733. // // for (var i = 0; i < dArray.length; i++) {
  17734. // // let _task = dArray[i]
  17735. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  17736. // // task: _task.task,
  17737. // // taskDetail: "",
  17738. // // taskDetail2: _task.detail,
  17739. // // taskDetail3: "",
  17740. // // chapterData: [],
  17741. // // toolText: "",
  17742. // // toolChoose: [
  17743. // // {
  17744. // // tool: [],
  17745. // // toolDetail: "",
  17746. // // toolType: 0,
  17747. // // askCount: 1,
  17748. // // askTitle: "",
  17749. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17750. // // },
  17751. // // ],
  17752. // // isShowTools: false,
  17753. // // askCount: 1,
  17754. // // isFold: 1,
  17755. // // askTitle: "",
  17756. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17757. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  17758. // // homeworkList: [],
  17759. // // })
  17760. // // }
  17761. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17762. // // _this.$forceUpdate();
  17763. // // }
  17764. // callback ? callback() : ''
  17765. // }).catch(function (error) {
  17766. // _this.loading = false
  17767. // console.log(error);
  17768. // });
  17769. this.isOutlineCancelToken = this.ajax.setCancelSource();
  17770. let parm = {
  17771. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  17772. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  17773. session_name: uuidv4(),
  17774. userId: this.userid,
  17775. file_ids: fileid.length ? [...fileid] : '',
  17776. model: 'gpt-4o-2024-08-06',
  17777. temperature: 0.1,
  17778. }
  17779. this.ajax
  17780. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  17781. .then((response) => {
  17782. console.log(response);
  17783. let data = response.data.FunctionResponse
  17784. if (data.message) {
  17785. console.log(data.message);
  17786. let dArray = {}
  17787. try {
  17788. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  17789. } catch (error) {
  17790. console.log("error_________________" + error);
  17791. try {
  17792. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17793. let match = data.message.match(regex);
  17794. dArray = JSON.parse(match[0]);
  17795. // var message = data.message;
  17796. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  17797. // var jsonEnd = message.indexOf("```", jsonStart);
  17798. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  17799. // dArray = JSON.parse(jsonString);
  17800. } catch (error) {
  17801. try {
  17802. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  17803. let match = data.message.match(regex);
  17804. // eval("var aaa = " + match[0])
  17805. dArray = JSON.parse(match[0].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  17806. } catch (error) {
  17807. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  17808. // _this.aiGet2(messages, callback);
  17809. console.log("error_________________" + error);
  17810. }
  17811. console.log("error_________________" + error);
  17812. }
  17813. }
  17814. _this.dArray = dArray
  17815. console.log(dArray)
  17816. if(_this.panOutline() > 0){
  17817. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17818. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  17819. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  17820. }
  17821. for (var i = 0; i < dArray.length; i++) {
  17822. let _task = dArray[i]
  17823. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  17824. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  17825. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  17826. }else {
  17827. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17828. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  17829. taskDetail: "",
  17830. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  17831. taskDetail3: "",
  17832. chapterData: [],
  17833. toolText: "",
  17834. toolChoose: [
  17835. {
  17836. tool: [],
  17837. toolDetail: "",
  17838. toolType: 0,
  17839. askCount: 1,
  17840. askTitle: "",
  17841. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17842. },
  17843. ],
  17844. isShowTools: false,
  17845. askCount: 1,
  17846. isFold: 0,
  17847. askTitle: "",
  17848. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17849. checkJson: [{ checkCount: [], checkPerent: [] }],
  17850. homeworkList: [],
  17851. })
  17852. }
  17853. }
  17854. }else {
  17855. _this.unitJson[0].chapterInfo[0].taskJson = []
  17856. for (var i = 0; i < dArray.length; i++) {
  17857. let _task = dArray[i]
  17858. _this.unitJson[0].chapterInfo[0].taskJson.push({
  17859. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  17860. taskDetail: "",
  17861. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  17862. taskDetail3: "",
  17863. chapterData: [],
  17864. toolText: "",
  17865. toolChoose: [
  17866. {
  17867. tool: [],
  17868. toolDetail: "",
  17869. toolType: 0,
  17870. askCount: 1,
  17871. askTitle: "",
  17872. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17873. },
  17874. ],
  17875. isShowTools: false,
  17876. askCount: 1,
  17877. isFold: 0,
  17878. askTitle: "",
  17879. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  17880. checkJson: [{ checkCount: [], checkPerent: [] }],
  17881. homeworkList: [],
  17882. })
  17883. }
  17884. }
  17885. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  17886. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  17887. _this.$forceUpdate();
  17888. }
  17889. callback ? callback() : ''
  17890. _this.isOutlineCancelToken = null
  17891. })
  17892. .catch((error) => {
  17893. _this.loading = false
  17894. _this.isOutlineCancelToken = null
  17895. console.log(error);
  17896. });
  17897. },
  17898. cancelAjax(type, index){
  17899. if (this.isOutlineCancelToken && type == 'outline') {
  17900. this.$message.success("已经成功停止生成课程大纲")
  17901. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  17902. this.isOutlineCancelToken = null;
  17903. this.loading = false
  17904. }
  17905. if (this.isFileCancelToken && type == 'file') {
  17906. this.$message.success("已经成功停止智能生成检索资料")
  17907. this.isFileCancelToken.cancel('Request canceled by the user.');
  17908. this.isFileCancelToken = null;
  17909. this.fileSLoading = false
  17910. }
  17911. if(this.isTextCancelToken && type == 'text'){
  17912. this.$message.success("已经成功停止AI优化")
  17913. this.isTextCancelToken.cancel('Request canceled by the user.');
  17914. this.isTextCancelToken = null;
  17915. this.textLoading = false
  17916. this.ttextLoading = true
  17917. if(this.isTextCancelSource){
  17918. this.isTextCancelSource.close()
  17919. this.isTextCancelSource = null
  17920. }
  17921. }
  17922. if(this.isTargetCancelToken2 && type == 'target2'){
  17923. this.$message.success("已经成功停止生成目标")
  17924. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  17925. this.isTargetCancelToken2 = null;
  17926. this.targetTextLoading2 = false
  17927. this.ttargetTextLoading2 = false
  17928. if(this.isTargetCancelSource2){
  17929. this.isTargetCancelSource2.close()
  17930. this.isTargetCancelSource2 = null
  17931. }
  17932. }
  17933. if(this.isTargetCancelToken1 && type == 'target1'){
  17934. this.$message.success("已经成功停止生成目标")
  17935. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  17936. this.isTargetCancelToken1 = null;
  17937. this.targetTextLoading = false
  17938. this.ttargetTextLoading = false
  17939. if(this.isTargetCancelSource1){
  17940. this.isTargetCancelSource1.close()
  17941. this.isTargetCancelSource1 = null
  17942. }
  17943. }
  17944. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  17945. this.$message.success("已经成功停止提取摘要")
  17946. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  17947. this.isTeacherTextCancelToken = null;
  17948. this.teacherTextLoading = false
  17949. this.tteacherTextLoading = false
  17950. if(this.isTeacherTextCancelSource){
  17951. this.isTeacherTextCancelSource.close()
  17952. this.isTeacherTextCancelSource = null
  17953. }
  17954. }
  17955. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  17956. this.$message.success("已经成功停止生成教案")
  17957. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  17958. this.isTeacherTaskCancelToken = null;
  17959. this.loading = false
  17960. }
  17961. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  17962. this.$message.success("已经成功停止生成大纲")
  17963. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  17964. this.isOutlineTaskCancelToken[index] = null;
  17965. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  17966. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  17967. if(this.isOutlineTaskCancelSource[index]){
  17968. this.isOutlineTaskCancelSource[index].close()
  17969. this.isOutlineTaskCancelSource[index] = null
  17970. }
  17971. }
  17972. if(type == 'teacherDetail2'){
  17973. this.$message.success("已经成功停止生成教案")
  17974. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  17975. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  17976. this.isTeacherTaskCancelToken2[index] = null;
  17977. }
  17978. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  17979. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  17980. }
  17981. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  17982. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  17983. }
  17984. if(this.isTeacherTaskCancelSource[index]){
  17985. this.isTeacherTaskCancelSource[index].close()
  17986. this.isTeacherTaskCancelSource[index] = null
  17987. }
  17988. }
  17989. },
  17990. async aiGetTask2(messages, callback) {
  17991. let _this = this
  17992. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17993. fileid = [...fileid, ..._this.knowFileids]
  17994. if (_this.infoData.length) {
  17995. for (var i = 0; i < _this.infoData.length; i++) {
  17996. if(_this.infoData[i].fileid){
  17997. fileid.push(_this.infoData[i].fileid)
  17998. }else {
  17999. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18000. if(_fileid){
  18001. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18002. _this.$forceUpdate();
  18003. if(_fileid != 1){
  18004. fileid.push(_fileid)
  18005. }
  18006. }
  18007. }
  18008. }
  18009. }
  18010. console.log('fileid=========',fileid)
  18011. // let params = JSON.stringify({
  18012. // // "model": "Chat",
  18013. // model: 'gpt-3.5-turbo',
  18014. // temperature: 0.1,
  18015. // max_tokens: 4096,
  18016. // top_p: 1,
  18017. // frequency_penalty: 0,
  18018. // presence_penalty: 0,
  18019. // messages: [{
  18020. // content: messages,
  18021. // role: 'user'
  18022. // }],
  18023. // stream: false,
  18024. // uid: this.userid,
  18025. // mind_map_question: "",
  18026. // })
  18027. // // let params = JSON.stringify({
  18028. // // message: {
  18029. // // anthropic_version: "bedrock-2023-05-31",
  18030. // // max_tokens: 4096,
  18031. // // temperature: 0.1,
  18032. // // top_p: 1,
  18033. // // messages: [{
  18034. // // content: messages,
  18035. // // role: 'user'
  18036. // // }], //
  18037. // // },
  18038. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18039. // // });
  18040. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18041. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18042. // console.log(response);
  18043. // let data = response.data.FunctionResponse
  18044. // if (data.choices && data.choices.length && data.choices[0].message) {
  18045. // console.log(data.choices[0].message.content);
  18046. // let dArray = JSON.parse(data.choices[0].message.content)
  18047. // _this.dArray = dArray
  18048. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18049. // for (var i = 0; i < dArray.length; i++) {
  18050. // let _task = dArray[i]
  18051. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18052. // task: _task.task,
  18053. // taskDetail: "",
  18054. // taskDetail2: _task.detail,
  18055. // taskDetail3: "",
  18056. // chapterData: [],
  18057. // toolText: "",
  18058. // toolChoose: [
  18059. // {
  18060. // tool: [],
  18061. // toolDetail: "",
  18062. // toolType: 0,
  18063. // askCount: 1,
  18064. // askTitle: "",
  18065. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18066. // },
  18067. // ],
  18068. // isShowTools: false,
  18069. // askCount: 1,
  18070. // isFold: 0,
  18071. // askTitle: "",
  18072. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18073. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18074. // homeworkList: [],
  18075. // })
  18076. // }
  18077. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18078. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18079. // _this.$forceUpdate();
  18080. // }
  18081. // // if (data.result) {
  18082. // // console.log(data.result);
  18083. // // let dArray = JSON.parse(data.result)
  18084. // // _this.dArray = dArray
  18085. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18086. // // for (var i = 0; i < dArray.length; i++) {
  18087. // // let _task = dArray[i]
  18088. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18089. // // task: _task.task,
  18090. // // taskDetail: "",
  18091. // // taskDetail2: _task.detail,
  18092. // // taskDetail3: "",
  18093. // // chapterData: [],
  18094. // // toolText: "",
  18095. // // toolChoose: [
  18096. // // {
  18097. // // tool: [],
  18098. // // toolDetail: "",
  18099. // // toolType: 0,
  18100. // // askCount: 1,
  18101. // // askTitle: "",
  18102. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18103. // // },
  18104. // // ],
  18105. // // isShowTools: false,
  18106. // // askCount: 1,
  18107. // // isFold: 1,
  18108. // // askTitle: "",
  18109. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18110. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18111. // // homeworkList: [],
  18112. // // })
  18113. // // }
  18114. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18115. // // _this.$forceUpdate();
  18116. // // }
  18117. // callback ? callback() : ''
  18118. // }).catch(function (error) {
  18119. // _this.loading = false
  18120. // console.log(error);
  18121. // });
  18122. this.isOutlineCancelToken = this.ajax.setCancelSource();
  18123. let parm = {
  18124. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18125. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18126. session_name: uuidv4(),
  18127. userId: this.userid,
  18128. file_ids: fileid.length ? [...fileid] : '',
  18129. model: 'gpt-4o-2024-08-06',
  18130. temperature: 0.1,
  18131. }
  18132. this.ajax
  18133. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  18134. .then((response) => {
  18135. console.log(response);
  18136. let data = response.data.FunctionResponse
  18137. if (data.message) {
  18138. console.log(data.message);
  18139. let dArray = {}
  18140. try {
  18141. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18142. } catch (error) {
  18143. console.log("error_________________" + error);
  18144. try {
  18145. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18146. let match = data.message.match(regex);
  18147. dArray = JSON.parse(match[0]);
  18148. // var message = data.message;
  18149. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18150. // var jsonEnd = message.indexOf("```", jsonStart);
  18151. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18152. // dArray = JSON.parse(jsonString);
  18153. } catch (error) {
  18154. try {
  18155. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18156. let match = data.message.match(regex);
  18157. // eval("var aaa = " + match[0])
  18158. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18159. } catch (error) {
  18160. console.log("error_________________" + error);
  18161. }
  18162. console.log("error_________________" + error);
  18163. }
  18164. }
  18165. _this.dArray = dArray
  18166. if(_this.panOutline() > 0){
  18167. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18168. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18169. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  18170. }
  18171. for (var i = 0; i < dArray.length; i++) {
  18172. let _task = dArray[i]
  18173. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18174. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18175. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  18176. }else {
  18177. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18178. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18179. taskDetail: "",
  18180. taskDetail2: "",
  18181. taskDetail3: "",
  18182. chapterData: [],
  18183. toolText: "",
  18184. toolChoose: [
  18185. {
  18186. tool: [],
  18187. toolDetail: "",
  18188. toolType: 0,
  18189. askCount: 1,
  18190. askTitle: "",
  18191. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18192. },
  18193. ],
  18194. isShowTools: false,
  18195. askCount: 1,
  18196. isFold: 0,
  18197. askTitle: "",
  18198. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18199. checkJson: [{ checkCount: [], checkPerent: [] }],
  18200. homeworkList: [],
  18201. })
  18202. }
  18203. }
  18204. }else {
  18205. _this.unitJson[0].chapterInfo[0].taskJson = []
  18206. for (var i = 0; i < dArray.length; i++) {
  18207. let _task = dArray[i]
  18208. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18209. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18210. taskDetail: "",
  18211. taskDetail2: "",
  18212. taskDetail3: "",
  18213. chapterData: [],
  18214. toolText: "",
  18215. toolChoose: [
  18216. {
  18217. tool: [],
  18218. toolDetail: "",
  18219. toolType: 0,
  18220. askCount: 1,
  18221. askTitle: "",
  18222. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18223. },
  18224. ],
  18225. isShowTools: false,
  18226. askCount: 1,
  18227. isFold: 0,
  18228. askTitle: "",
  18229. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18230. checkJson: [{ checkCount: [], checkPerent: [] }],
  18231. homeworkList: [],
  18232. })
  18233. }
  18234. }
  18235. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18236. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18237. _this.$forceUpdate();
  18238. setTimeout(()=>{
  18239. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18240. this.aiOutlineDetail('', i)
  18241. }
  18242. }, 0)
  18243. }
  18244. callback ? callback() : ''
  18245. _this.isOutlineCancelToken = null
  18246. })
  18247. .catch((error) => {
  18248. _this.loading = false
  18249. _this.isOutlineCancelToken = null
  18250. console.log(error);
  18251. });
  18252. },
  18253. async aiGetTask3(messages, callback) {
  18254. let _this = this
  18255. // let params = JSON.stringify({
  18256. // // "model": "Chat",
  18257. // model: 'gpt-3.5-turbo',
  18258. // temperature: 0.1,
  18259. // max_tokens: 4096,
  18260. // top_p: 1,
  18261. // frequency_penalty: 0,
  18262. // presence_penalty: 0,
  18263. // messages: [{
  18264. // content: messages,
  18265. // role: 'user'
  18266. // }],
  18267. // stream: false,
  18268. // uid: this.userid,
  18269. // mind_map_question: "",
  18270. // })
  18271. // // let params = JSON.stringify({
  18272. // // message: {
  18273. // // anthropic_version: "bedrock-2023-05-31",
  18274. // // max_tokens: 4096,
  18275. // // temperature: 0.1,
  18276. // // top_p: 1,
  18277. // // messages: [{
  18278. // // content: messages,
  18279. // // role: 'user'
  18280. // // }], //
  18281. // // },
  18282. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18283. // // });
  18284. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18285. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18286. // console.log(response);
  18287. // let data = response.data.FunctionResponse
  18288. // if (data.choices && data.choices.length && data.choices[0].message) {
  18289. // console.log(data.choices[0].message.content);
  18290. // let dArray = JSON.parse(data.choices[0].message.content)
  18291. // _this.dArray = dArray
  18292. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18293. // for (var i = 0; i < dArray.length; i++) {
  18294. // let _task = dArray[i]
  18295. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18296. // task: _task.task,
  18297. // taskDetail: "",
  18298. // taskDetail2: _task.detail,
  18299. // taskDetail3: "",
  18300. // chapterData: [],
  18301. // toolText: "",
  18302. // toolChoose: [
  18303. // {
  18304. // tool: [],
  18305. // toolDetail: "",
  18306. // toolType: 0,
  18307. // askCount: 1,
  18308. // askTitle: "",
  18309. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18310. // },
  18311. // ],
  18312. // isShowTools: false,
  18313. // askCount: 1,
  18314. // isFold: 0,
  18315. // askTitle: "",
  18316. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18317. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18318. // homeworkList: [],
  18319. // })
  18320. // }
  18321. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18322. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18323. // _this.$forceUpdate();
  18324. // }
  18325. // // if (data.result) {
  18326. // // console.log(data.result);
  18327. // // let dArray = JSON.parse(data.result)
  18328. // // _this.dArray = dArray
  18329. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18330. // // for (var i = 0; i < dArray.length; i++) {
  18331. // // let _task = dArray[i]
  18332. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18333. // // task: _task.task,
  18334. // // taskDetail: "",
  18335. // // taskDetail2: _task.detail,
  18336. // // taskDetail3: "",
  18337. // // chapterData: [],
  18338. // // toolText: "",
  18339. // // toolChoose: [
  18340. // // {
  18341. // // tool: [],
  18342. // // toolDetail: "",
  18343. // // toolType: 0,
  18344. // // askCount: 1,
  18345. // // askTitle: "",
  18346. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18347. // // },
  18348. // // ],
  18349. // // isShowTools: false,
  18350. // // askCount: 1,
  18351. // // isFold: 1,
  18352. // // askTitle: "",
  18353. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18354. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18355. // // homeworkList: [],
  18356. // // })
  18357. // // }
  18358. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18359. // // _this.$forceUpdate();
  18360. // // }
  18361. // callback ? callback() : ''
  18362. // }).catch(function (error) {
  18363. // _this.loading = false
  18364. // console.log(error);
  18365. // });
  18366. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  18367. let parm = {
  18368. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18369. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18370. session_name: uuidv4(),
  18371. userId: this.userid,
  18372. file_ids: '',
  18373. model: 'gpt-4o-2024-08-06',
  18374. temperature: 0.1,
  18375. }
  18376. this.ajax
  18377. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  18378. .then((response) => {
  18379. console.log(response);
  18380. let data = response.data.FunctionResponse
  18381. if (data.message) {
  18382. console.log(data.message);
  18383. let dArray = {}
  18384. try {
  18385. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18386. } catch (error) {
  18387. console.log("error_________________" + error);
  18388. try {
  18389. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18390. let match = data.message.match(regex);
  18391. dArray = JSON.parse(match[0]);
  18392. // var message = data.message;
  18393. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18394. // var jsonEnd = message.indexOf("```", jsonStart);
  18395. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18396. // dArray = JSON.parse(jsonString);
  18397. } catch (error) {
  18398. try {
  18399. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18400. let match = data.message.match(regex);
  18401. // eval("var aaa = " + match[0])
  18402. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18403. } catch (error) {
  18404. console.log("error_________________" + error);
  18405. }
  18406. console.log("error_________________" + error);
  18407. }
  18408. }
  18409. _this.dArray = dArray
  18410. if(_this.panOutline() > 0){
  18411. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18412. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18413. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  18414. }
  18415. for (var i = 0; i < dArray.length; i++) {
  18416. let _task = dArray[i]
  18417. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18418. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18419. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  18420. }else {
  18421. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18422. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18423. taskDetail: "",
  18424. taskDetail2: "",
  18425. taskDetail3: "",
  18426. chapterData: [],
  18427. toolText: "",
  18428. toolChoose: [
  18429. {
  18430. tool: [],
  18431. toolDetail: "",
  18432. toolType: 0,
  18433. askCount: 1,
  18434. askTitle: "",
  18435. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18436. },
  18437. ],
  18438. isShowTools: false,
  18439. askCount: 1,
  18440. isFold: 0,
  18441. askTitle: "",
  18442. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18443. checkJson: [{ checkCount: [], checkPerent: [] }],
  18444. homeworkList: [],
  18445. })
  18446. }
  18447. }
  18448. }else {
  18449. _this.unitJson[0].chapterInfo[0].taskJson = []
  18450. for (var i = 0; i < dArray.length; i++) {
  18451. let _task = dArray[i]
  18452. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18453. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18454. taskDetail: "",
  18455. taskDetail2: "",
  18456. taskDetail3: "",
  18457. chapterData: [],
  18458. toolText: "",
  18459. toolChoose: [
  18460. {
  18461. tool: [],
  18462. toolDetail: "",
  18463. toolType: 0,
  18464. askCount: 1,
  18465. askTitle: "",
  18466. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18467. },
  18468. ],
  18469. isShowTools: false,
  18470. askCount: 1,
  18471. isFold: 0,
  18472. askTitle: "",
  18473. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18474. checkJson: [{ checkCount: [], checkPerent: [] }],
  18475. homeworkList: [],
  18476. })
  18477. }
  18478. }
  18479. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18480. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18481. _this.$forceUpdate();
  18482. setTimeout(()=>{
  18483. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18484. this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  18485. }
  18486. }, 0)
  18487. }
  18488. callback ? callback() : ''
  18489. _this.isTeacherTaskCancelToken = null
  18490. })
  18491. .catch((error) => {
  18492. _this.loading = false
  18493. _this.isTeacherTaskCancelToken = null
  18494. console.log(error);
  18495. });
  18496. },
  18497. async aiGet3(messages, callback) {
  18498. let _this = this
  18499. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18500. fileid = [...fileid, ..._this.knowFileids]
  18501. if (_this.infoData.length) {
  18502. for (var i = 0; i < _this.infoData.length; i++) {
  18503. if(_this.infoData[i].fileid){
  18504. fileid.push(_this.infoData[i].fileid)
  18505. }else {
  18506. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18507. if(_fileid){
  18508. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18509. _this.$forceUpdate();
  18510. if(_fileid != 1){
  18511. fileid.push(_fileid)
  18512. }
  18513. }
  18514. }
  18515. }
  18516. }
  18517. // let params = JSON.stringify({
  18518. // // "model": "Chat",
  18519. // model: 'gpt-3.5-turbo',
  18520. // temperature: 0.1,
  18521. // max_tokens: 4096,
  18522. // top_p: 1,
  18523. // frequency_penalty: 0,
  18524. // presence_penalty: 0,
  18525. // messages: [{
  18526. // content: messages,
  18527. // role: 'user'
  18528. // }],
  18529. // stream: false,
  18530. // uid: this.userid,
  18531. // mind_map_question: "",
  18532. // })
  18533. // // let params = JSON.stringify({
  18534. // // message: {
  18535. // // anthropic_version: "bedrock-2023-05-31",
  18536. // // max_tokens: 4096,
  18537. // // temperature: 0.1,
  18538. // // top_p: 1,
  18539. // // messages: [{
  18540. // // content: messages,
  18541. // // role: 'user'
  18542. // // }], //
  18543. // // },
  18544. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18545. // // });
  18546. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18547. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18548. // console.log(response);
  18549. // let data = response.data.FunctionResponse
  18550. // if (data.choices && data.choices.length && data.choices[0].message) {
  18551. // console.log(data.choices[0].message.content);
  18552. // let tArray = JSON.parse(data.choices[0].message.content)
  18553. // // _this.unitJson[0].chapterInfo[0].task = []
  18554. // let toolsJson = {
  18555. // "电子白板": { tool: 1, type: 1 },
  18556. // "文档": { tool: 52, type: 1 },
  18557. // "思维导图": { tool: 3, type: 1 },
  18558. // "表格": { tool: 48, type: 1 },
  18559. // "作业提交": { tool: 16, type: 2 }
  18560. // }
  18561. // for (var i = 0; i < tArray.length; i++) {
  18562. // let _task = tArray[i]
  18563. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18564. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18565. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18566. // if (_task.toolChoose.length) {
  18567. // for (var j = 0; j < _task.toolChoose.length; j++) {
  18568. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18569. // {
  18570. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18571. // toolDetail: _task.toolChoose[j].detail,
  18572. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18573. // askCount: 1,
  18574. // askTitle: "",
  18575. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18576. // },
  18577. // )
  18578. // }
  18579. // } else {
  18580. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18581. // {
  18582. // tool: [],
  18583. // toolDetail: "",
  18584. // toolType: 0,
  18585. // askCount: 1,
  18586. // askTitle: "",
  18587. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18588. // },
  18589. // )
  18590. // }
  18591. // }
  18592. // // if (_this.infoData.length) {
  18593. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18594. // // }
  18595. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18596. // _this.$forceUpdate();
  18597. // }
  18598. // // if (data.result) {
  18599. // // console.log(data.result);
  18600. // // let tArray = JSON.parse(data.result)
  18601. // // // _this.unitJson[0].chapterInfo[0].task = []
  18602. // // let toolsJson = {
  18603. // // "电子白板": { tool: 1, type: 1 },
  18604. // // "文档": { tool: 52, type: 1 },
  18605. // // "思维导图": { tool: 3, type: 1 },
  18606. // // "表格": { tool: 48, type: 1 },
  18607. // // "作业提交": { tool: 16, type: 2 }
  18608. // // }
  18609. // // for (var i = 0; i < tArray.length; i++) {
  18610. // // let _task = tArray[i]
  18611. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18612. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18613. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18614. // // if (_task.toolChoose.length) {
  18615. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  18616. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18617. // // {
  18618. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18619. // // toolDetail: _task.toolChoose[j].detail,
  18620. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18621. // // askCount: 1,
  18622. // // askTitle: "",
  18623. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18624. // // },
  18625. // // )
  18626. // // }
  18627. // // } else {
  18628. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18629. // // {
  18630. // // tool: [],
  18631. // // toolDetail: "",
  18632. // // toolType: 0,
  18633. // // askCount: 1,
  18634. // // askTitle: "",
  18635. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18636. // // },
  18637. // // )
  18638. // // }
  18639. // // }
  18640. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18641. // // _this.$forceUpdate();
  18642. // // }
  18643. // callback ? callback() : ''
  18644. // }).catch(function (error) {
  18645. // _this.loading = false
  18646. // console.log(error);
  18647. // });
  18648. let parm = {
  18649. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18650. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18651. session_name: uuidv4(),
  18652. userId: this.userid,
  18653. file_ids: fileid.length ? [...fileid] : '',
  18654. model: 'gpt-4o-2024-08-06',
  18655. temperature: 0.1,
  18656. }
  18657. this.ajax
  18658. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18659. .then(async (response) => {
  18660. console.log(response);
  18661. let data = response.data.FunctionResponse
  18662. if (data.message) {
  18663. console.log(data.message);
  18664. let tArray = {}
  18665. try {
  18666. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18667. } catch (error) {
  18668. console.log("error_________________" + error);
  18669. try {
  18670. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18671. let match = data.message.match(regex);
  18672. tArray = JSON.parse(match[0]);
  18673. // var message = data.message;
  18674. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18675. // var jsonEnd = message.indexOf("```", jsonStart);
  18676. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18677. // tArray = JSON.parse(jsonString);
  18678. } catch (error) {
  18679. try {
  18680. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18681. let match = data.message.match(regex);
  18682. // eval("var aaa = " + match[0])
  18683. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18684. } catch (error) {
  18685. console.log("error_________________" + error);
  18686. }
  18687. console.log("error_________________" + error);
  18688. }
  18689. }
  18690. let toolsJson = {
  18691. "电子白板": { tool: 1, type: 1 },
  18692. "文档": { tool: 52, type: 1 },
  18693. "思维导图": { tool: 3, type: 1 },
  18694. "表格": { tool: 48, type: 1 },
  18695. "作业提交": { tool: 16, type: 2 },
  18696. "问答": { tool: 15, type: 2 },
  18697. "选择题": { tool: 45, type: 2 },
  18698. }
  18699. // answerQ:"sssssssssssssss"
  18700. for (var i = 0; i < tArray.length; i++) {
  18701. let _task = tArray[i]
  18702. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18703. _task.elist = _task.elist.filter(el=>{
  18704. el.isai = "1"
  18705. return el
  18706. })
  18707. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18708. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18709. if (_task.toolChoose.length) {
  18710. for (var j = 0; j < _task.toolChoose.length; j++) {
  18711. let _json = {
  18712. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  18713. toolDetail: _task.toolChoose[j].detail,
  18714. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18715. askCount: 1,
  18716. askTitle: "",
  18717. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18718. }
  18719. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18720. let answerQ = await _this.aiCreateQuestion(15, i)
  18721. _json.answerQ = answerQ.answerQ
  18722. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18723. let testJson = await _this.aiCreateQuestion(45, i)
  18724. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18725. }
  18726. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  18727. }
  18728. } else {
  18729. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18730. {
  18731. tool: [],
  18732. toolDetail: "",
  18733. toolType: 0,
  18734. askCount: 1,
  18735. askTitle: "",
  18736. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18737. },
  18738. )
  18739. }
  18740. }
  18741. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18742. _this.$forceUpdate();
  18743. _this.createTeacherAn();
  18744. }
  18745. callback ? callback() : ''
  18746. })
  18747. .catch((error) => {
  18748. _this.loading = false
  18749. console.log(error);
  18750. });
  18751. },
  18752. async aiGet32(messages, index) {
  18753. let _this = this
  18754. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18755. fileid = [...fileid, ..._this.knowFileids]
  18756. if (_this.infoData.length) {
  18757. for (var i = 0; i < _this.infoData.length; i++) {
  18758. if(_this.infoData[i].fileid){
  18759. fileid.push(_this.infoData[i].fileid)
  18760. }else {
  18761. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18762. if(_fileid){
  18763. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18764. _this.$forceUpdate();
  18765. if(_fileid != 1){
  18766. fileid.push(_fileid)
  18767. }
  18768. }
  18769. }
  18770. }
  18771. }
  18772. // let params = JSON.stringify({
  18773. // // "model": "Chat",
  18774. // model: 'gpt-3.5-turbo',
  18775. // temperature: 0.1,
  18776. // max_tokens: 4096,
  18777. // top_p: 1,
  18778. // frequency_penalty: 0,
  18779. // presence_penalty: 0,
  18780. // messages: [{
  18781. // content: messages,
  18782. // role: 'user'
  18783. // }],
  18784. // stream: false,
  18785. // uid: this.userid,
  18786. // mind_map_question: "",
  18787. // })
  18788. // // let params = JSON.stringify({
  18789. // // message: {
  18790. // // anthropic_version: "bedrock-2023-05-31",
  18791. // // max_tokens: 4096,
  18792. // // temperature: 0.1,
  18793. // // top_p: 1,
  18794. // // messages: [{
  18795. // // content: messages,
  18796. // // role: 'user'
  18797. // // }], //
  18798. // // },
  18799. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18800. // // });
  18801. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18802. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18803. // console.log(response);
  18804. // let data = response.data.FunctionResponse
  18805. // if (data.choices && data.choices.length && data.choices[0].message) {
  18806. // console.log(data.choices[0].message.content);
  18807. // let tArray = JSON.parse(data.choices[0].message.content)
  18808. // // _this.unitJson[0].chapterInfo[0].task = []
  18809. // let toolsJson = {
  18810. // "电子白板": { tool: 1, type: 1 },
  18811. // "文档": { tool: 52, type: 1 },
  18812. // "思维导图": { tool: 3, type: 1 },
  18813. // "表格": { tool: 48, type: 1 },
  18814. // "作业提交": { tool: 16, type: 2 }
  18815. // }
  18816. // for (var i = 0; i < tArray.length; i++) {
  18817. // let _task = tArray[i]
  18818. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18819. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18820. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18821. // if (_task.toolChoose.length) {
  18822. // for (var j = 0; j < _task.toolChoose.length; j++) {
  18823. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18824. // {
  18825. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18826. // toolDetail: _task.toolChoose[j].detail,
  18827. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18828. // askCount: 1,
  18829. // askTitle: "",
  18830. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18831. // },
  18832. // )
  18833. // }
  18834. // } else {
  18835. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18836. // {
  18837. // tool: [],
  18838. // toolDetail: "",
  18839. // toolType: 0,
  18840. // askCount: 1,
  18841. // askTitle: "",
  18842. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18843. // },
  18844. // )
  18845. // }
  18846. // }
  18847. // // if (_this.infoData.length) {
  18848. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18849. // // }
  18850. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18851. // _this.$forceUpdate();
  18852. // }
  18853. // // if (data.result) {
  18854. // // console.log(data.result);
  18855. // // let tArray = JSON.parse(data.result)
  18856. // // // _this.unitJson[0].chapterInfo[0].task = []
  18857. // // let toolsJson = {
  18858. // // "电子白板": { tool: 1, type: 1 },
  18859. // // "文档": { tool: 52, type: 1 },
  18860. // // "思维导图": { tool: 3, type: 1 },
  18861. // // "表格": { tool: 48, type: 1 },
  18862. // // "作业提交": { tool: 16, type: 2 }
  18863. // // }
  18864. // // for (var i = 0; i < tArray.length; i++) {
  18865. // // let _task = tArray[i]
  18866. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18867. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18868. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18869. // // if (_task.toolChoose.length) {
  18870. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  18871. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18872. // // {
  18873. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18874. // // toolDetail: _task.toolChoose[j].detail,
  18875. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18876. // // askCount: 1,
  18877. // // askTitle: "",
  18878. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18879. // // },
  18880. // // )
  18881. // // }
  18882. // // } else {
  18883. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18884. // // {
  18885. // // tool: [],
  18886. // // toolDetail: "",
  18887. // // toolType: 0,
  18888. // // askCount: 1,
  18889. // // askTitle: "",
  18890. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18891. // // },
  18892. // // )
  18893. // // }
  18894. // // }
  18895. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18896. // // _this.$forceUpdate();
  18897. // // }
  18898. // callback ? callback() : ''
  18899. // }).catch(function (error) {
  18900. // _this.loading = false
  18901. // console.log(error);
  18902. // });
  18903. let parm = {
  18904. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18905. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18906. session_name: uuidv4(),
  18907. userId: this.userid,
  18908. file_ids: fileid.length ? [...fileid] : '',
  18909. model: 'gpt-4o-2024-08-06',
  18910. temperature: 0.1,
  18911. }
  18912. this.ajax
  18913. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  18914. .then(async (response) => {
  18915. console.log(response);
  18916. let data = response.data.FunctionResponse
  18917. if (data.message) {
  18918. console.log(data.message);
  18919. let tArray = {}
  18920. try {
  18921. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18922. } catch (error) {
  18923. console.log("error_________________" + error);
  18924. try {
  18925. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18926. let match = data.message.match(regex);
  18927. tArray = JSON.parse(match[0]);
  18928. // var message = data.message;
  18929. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18930. // var jsonEnd = message.indexOf("```", jsonStart);
  18931. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18932. // tArray = JSON.parse(jsonString);
  18933. } catch (error) {
  18934. try {
  18935. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18936. let match = data.message.match(regex);
  18937. // eval("var aaa = " + match[0])
  18938. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18939. } catch (error) {
  18940. console.log("error_________________" + error);
  18941. }
  18942. console.log("error_________________" + error);
  18943. }
  18944. }
  18945. let toolsJson = {
  18946. "电子白板": { tool: 1, type: 1 },
  18947. "文档": { tool: 52, type: 1 },
  18948. "思维导图": { tool: 3, type: 1 },
  18949. "表格": { tool: 48, type: 1 },
  18950. "作业提交": { tool: 16, type: 2 },
  18951. "问答": { tool: 15, type: 2 },
  18952. "选择题": { tool: 45, type: 2 },
  18953. }
  18954. // answerQ:"sssssssssssssss"
  18955. // for (var i = 0; i < tArray.length; i++) {
  18956. let _task = tArray
  18957. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  18958. _task.elist = _task.elist.filter(el=>{
  18959. el.isai = 1
  18960. return el
  18961. })
  18962. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  18963. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  18964. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  18965. console.log("error_________________JSON不对重新生成");
  18966. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  18967. _this.aiGet32(messages, index)
  18968. return;
  18969. }
  18970. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  18971. if (_task.toolChoose && _task.toolChoose.length) {
  18972. for (var j = 0; j < _task.toolChoose.length; j++) {
  18973. let _json = {
  18974. tool: [],
  18975. toolDetail: _task.toolChoose[j].detail,
  18976. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  18977. askCount: 1,
  18978. askTitle: "",
  18979. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18980. }
  18981. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18982. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  18983. let answerQ = await _this.aiCreateQuestion(15, index)
  18984. // _json.answerQ = answerQ.answerQ
  18985. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  18986. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  18987. let testJson = await _this.aiCreateQuestion(45, index)
  18988. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  18989. _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}
  18990. }
  18991. _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]
  18992. _this.$forceUpdate();
  18993. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  18994. }
  18995. } else {
  18996. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  18997. {
  18998. tool: [],
  18999. toolDetail: "",
  19000. toolType: 0,
  19001. askCount: 1,
  19002. askTitle: "",
  19003. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19004. },
  19005. )
  19006. }
  19007. // }
  19008. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19009. _this.$forceUpdate();
  19010. _this.createTeacherAn(index);
  19011. }
  19012. // callback ? callback() : ''
  19013. _this.taskLoading[index] = false
  19014. })
  19015. .catch((error) => {
  19016. // _this.loading = false
  19017. _this.taskLoading[index] = false
  19018. console.log(error);
  19019. });
  19020. },
  19021. async aiGetG321(messages, index) {
  19022. let _this = this
  19023. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19024. fileid = [...fileid, ..._this.knowFileids]
  19025. if (_this.infoData.length) {
  19026. for (var i = 0; i < _this.infoData.length; i++) {
  19027. if(_this.infoData[i].fileid){
  19028. fileid.push(_this.infoData[i].fileid)
  19029. }else {
  19030. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19031. if(_fileid){
  19032. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19033. _this.$forceUpdate();
  19034. if(_fileid != 1){
  19035. fileid.push(_fileid)
  19036. }
  19037. }
  19038. }
  19039. }
  19040. }
  19041. let parm = {
  19042. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19043. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19044. session_name: uuidv4(),
  19045. userId: this.userid,
  19046. file_ids: fileid.length ? [...fileid] : '',
  19047. model: 'gpt-4o-2024-08-06',
  19048. temperature: 0.1,
  19049. }
  19050. this.ajax
  19051. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19052. .then(async (response) => {
  19053. console.log(response);
  19054. let data = response.data.FunctionResponse
  19055. if (data.message) {
  19056. let tArray = {}
  19057. try {
  19058. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19059. } catch (error) {
  19060. console.log("error_________________" + error);
  19061. try {
  19062. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19063. let match = data.message.match(regex);
  19064. tArray = JSON.parse(match[0]);
  19065. } catch (error) {
  19066. try {
  19067. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19068. let match = data.message.match(regex);
  19069. // eval("var aaa = " + match[0])
  19070. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19071. } catch (error) {
  19072. console.log("error_________________" + error);
  19073. }
  19074. console.log("error_________________" + error);
  19075. }
  19076. }
  19077. console.log(data.message);
  19078. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  19079. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  19080. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19081. _this.$forceUpdate();
  19082. _this.createTeacherAn(index);
  19083. }
  19084. // callback ? callback() : ''
  19085. _this.taskGLoading[index][0] = false
  19086. })
  19087. .catch((error) => {
  19088. // _this.loading = false
  19089. _this.taskGLoading[index][0] = false
  19090. console.log(error);
  19091. });
  19092. },
  19093. async aiGetG322(messages, index) {
  19094. let _this = this
  19095. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19096. fileid = [...fileid, ..._this.knowFileids]
  19097. if (_this.infoData.length) {
  19098. for (var i = 0; i < _this.infoData.length; i++) {
  19099. if(_this.infoData[i].fileid){
  19100. fileid.push(_this.infoData[i].fileid)
  19101. }else {
  19102. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19103. if(_fileid){
  19104. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19105. _this.$forceUpdate();
  19106. if(_fileid != 1){
  19107. fileid.push(_fileid)
  19108. }
  19109. }
  19110. }
  19111. }
  19112. }
  19113. let parm = {
  19114. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19115. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19116. session_name: uuidv4(),
  19117. userId: this.userid,
  19118. file_ids: fileid.length ? [...fileid] : '',
  19119. model: 'gpt-4o-2024-08-06',
  19120. temperature: 0.1,
  19121. }
  19122. this.ajax
  19123. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19124. .then(async (response) => {
  19125. console.log(response);
  19126. let data = response.data.FunctionResponse
  19127. if (data.message) {
  19128. console.log(data.message);
  19129. let tArray = {}
  19130. try {
  19131. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19132. } catch (error) {
  19133. console.log("error_________________" + error);
  19134. try {
  19135. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19136. let match = data.message.match(regex);
  19137. tArray = JSON.parse(match[0]);
  19138. } catch (error) {
  19139. try {
  19140. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19141. let match = data.message.match(regex);
  19142. // eval("var aaa = " + match[0])
  19143. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19144. } catch (error) {
  19145. console.log("error_________________" + error);
  19146. }
  19147. console.log("error_________________" + error);
  19148. }
  19149. }
  19150. let toolsJson = {
  19151. "电子白板": { tool: 1, type: 1 },
  19152. "文档": { tool: 52, type: 1 },
  19153. "思维导图": { tool: 3, type: 1 },
  19154. "表格": { tool: 48, type: 1 },
  19155. "作业提交": { tool: 16, type: 2 },
  19156. "问答": { tool: 15, type: 2 },
  19157. "选择题": { tool: 45, type: 2 },
  19158. }
  19159. if(_this.languageSetting == 1){
  19160. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  19161. }else if(_this.languageSetting == 2){
  19162. toolsJson = {
  19163. "Mind Map Tool": { tool: 1, type: 1 },
  19164. "Document tool": { tool: 52, type: 1 },
  19165. "Diagram Tool": { tool: 3, type: 1 },
  19166. "Spreadsheet tool": { tool: 48, type: 1 },
  19167. "作业提交": { tool: 16, type: 2 },
  19168. "Q&A Tool": { tool: 15, type: 2 },
  19169. "Choice tool": { tool: 45, type: 2 },
  19170. }
  19171. }
  19172. let _task = tArray
  19173. if(!_task.toolChoose){
  19174. console.log("error_________________JSON不对重新生成");
  19175. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19176. _this.aiGet322(messages, index)
  19177. return;
  19178. }
  19179. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  19180. if (_task.toolChoose && _task.toolChoose.length) {
  19181. for (var j = 0; j < _task.toolChoose.length; j++) {
  19182. let _json = {
  19183. tool: [],
  19184. toolDetail: _task.toolChoose[j].detail,
  19185. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  19186. askCount: 1,
  19187. askTitle: "",
  19188. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19189. }
  19190. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19191. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  19192. let answerQ = await _this.aiCreateQuestion(15, index)
  19193. // _json.answerQ = answerQ.answerQ
  19194. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  19195. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  19196. let testJson = await _this.aiCreateQuestion(45, index)
  19197. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  19198. _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}
  19199. }
  19200. _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]
  19201. _this.$forceUpdate();
  19202. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19203. }
  19204. } else {
  19205. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  19206. {
  19207. tool: [],
  19208. toolDetail: "",
  19209. toolType: 0,
  19210. askCount: 1,
  19211. askTitle: "",
  19212. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19213. },
  19214. )
  19215. }
  19216. // }
  19217. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19218. _this.$forceUpdate();
  19219. }
  19220. // callback ? callback() : ''
  19221. _this.taskGLoading[index][1] = false
  19222. })
  19223. .catch((error) => {
  19224. // _this.loading = false
  19225. _this.taskGLoading[index][1] = false
  19226. console.log(error);
  19227. });
  19228. },
  19229. async aiGetG323(messages, index) {
  19230. let _this = this
  19231. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19232. fileid = [...fileid, ..._this.knowFileids]
  19233. if (_this.infoData.length) {
  19234. for (var i = 0; i < _this.infoData.length; i++) {
  19235. if(_this.infoData[i].fileid){
  19236. fileid.push(_this.infoData[i].fileid)
  19237. }else {
  19238. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19239. if(_fileid){
  19240. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19241. _this.$forceUpdate();
  19242. if(_fileid != 1){
  19243. fileid.push(_fileid)
  19244. }
  19245. }
  19246. }
  19247. }
  19248. }
  19249. let parm = {
  19250. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19251. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19252. session_name: uuidv4(),
  19253. userId: this.userid,
  19254. file_ids: fileid.length ? [...fileid] : '',
  19255. model: 'gpt-4o-2024-08-06',
  19256. temperature: 0.1,
  19257. }
  19258. this.ajax
  19259. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19260. .then(async (response) => {
  19261. console.log(response);
  19262. let data = response.data.FunctionResponse
  19263. if (data.message) {
  19264. console.log(data.message);
  19265. let tArray = {}
  19266. try {
  19267. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19268. } catch (error) {
  19269. console.log("error_________________" + error);
  19270. try {
  19271. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19272. let match = data.message.match(regex);
  19273. tArray = JSON.parse(match[0]);
  19274. } catch (error) {
  19275. try {
  19276. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19277. let match = data.message.match(regex);
  19278. // eval("var aaa = " + match[0])
  19279. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19280. } catch (error) {
  19281. console.log("error_________________" + error);
  19282. }
  19283. console.log("error_________________" + error);
  19284. }
  19285. }
  19286. let _task = tArray
  19287. if(!_task.elist){
  19288. console.log("error_________________JSON不对重新生成");
  19289. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19290. _this.aiGet322(messages, index)
  19291. return;
  19292. }
  19293. _task.elist = _task.elist.filter(el=>{
  19294. el.isai = "1"
  19295. return el
  19296. })
  19297. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  19298. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19299. _this.$forceUpdate();
  19300. }
  19301. // callback ? callback() : ''
  19302. _this.taskGLoading[index][2] = false
  19303. })
  19304. .catch((error) => {
  19305. // _this.loading = false
  19306. _this.taskGLoading[index][2] = false
  19307. console.log(error);
  19308. });
  19309. },
  19310. async aiCreateQuestion(type, task) {
  19311. let _this = this
  19312. return new Promise((resolve, reject) => {
  19313. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19314. fileid = [...fileid, ..._this.knowFileids]
  19315. if (_this.infoData.length) {
  19316. for (var i = 0; i < _this.infoData.length; i++) {
  19317. if(_this.infoData[i].fileid){
  19318. fileid.push(_this.infoData[i].fileid)
  19319. }
  19320. }
  19321. }
  19322. let sub = []
  19323. let mclass = []
  19324. if (this.courseTypeId.length) {
  19325. for (var i = 0; i < this.courseTypeId.length; i++) {
  19326. let _sid = this.courseTypeId[i]
  19327. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19328. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19329. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19330. }
  19331. }
  19332. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19333. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19334. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19335. }
  19336. }
  19337. }
  19338. }
  19339. let messages = ""
  19340. if(type == 15){
  19341. messages = `NOTICE
  19342. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19343. Language: ${this.getLang()}
  19344. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19345. Instruction: Based on the context, follow "Format example", write content.
  19346. # Context
  19347. ## 任务
  19348. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  19349. ## 限制
  19350. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19351. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19352. ## 课程简介
  19353. 课程名字:${_this.courseName}
  19354. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19355. ${sub.length ? '学科:' + sub.join(",") : ''}
  19356. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19357. ## 教案
  19358. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19359. # Format example
  19360. {answerQ:"问题"}
  19361. `
  19362. }else if(type == 45){
  19363. messages = `NOTICE
  19364. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19365. Language: ${this.getLang()}
  19366. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19367. Instruction: Based on the context, follow "Format example", write content.
  19368. # Context
  19369. ## 任务
  19370. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  19371. ## 限制
  19372. - 生成题目禁止重复。
  19373. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19374. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  19375. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19376. ## 课程简介
  19377. 课程名字:${_this.courseName}
  19378. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19379. ${sub.length ? '学科:' + sub.join(",") : ''}
  19380. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19381. ## 教案
  19382. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19383. # Format example
  19384. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  19385. `
  19386. }
  19387. let parm = {
  19388. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19389. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19390. session_name: uuidv4(),
  19391. userId: this.userid,
  19392. file_ids: fileid.length ? [...fileid] : '',
  19393. model: 'gpt-4o-2024-08-06',
  19394. temperature: 0.1,
  19395. }
  19396. this.ajax
  19397. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19398. .then((response) => {
  19399. console.log(response);
  19400. let data = response.data.FunctionResponse
  19401. if (data.message) {
  19402. console.log(data.message);
  19403. try {
  19404. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19405. let tArray = {}
  19406. try {
  19407. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19408. } catch (error) {
  19409. console.log("error_________________" + error);
  19410. try {
  19411. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19412. let match = data.message.match(regex);
  19413. tArray = JSON.parse(match[0]);
  19414. // var message = data.message;
  19415. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19416. // var jsonEnd = message.indexOf("```", jsonStart);
  19417. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19418. // tArray = JSON.parse(jsonString);
  19419. } catch (error) {
  19420. try {
  19421. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19422. let match = data.message.match(regex);
  19423. // eval("var aaa = " + match[0])
  19424. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19425. } catch (error) {
  19426. console.log("error_________________" + error);
  19427. }
  19428. console.log("error_________________" + error);
  19429. }
  19430. }
  19431. resolve(tArray)
  19432. } catch (error) {
  19433. if(type == 15){
  19434. resolve({answerQ: "题目"})
  19435. }else if(type == 45){
  19436. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19437. }
  19438. }
  19439. }else if(type == 15){
  19440. resolve({answerQ: "题目"})
  19441. }else if(type == 45){
  19442. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19443. }
  19444. })
  19445. .catch((error) => {
  19446. if(type == 15){
  19447. resolve({answerQ: "题目"})
  19448. }else if(type == 45){
  19449. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19450. }
  19451. console.log(error);
  19452. });
  19453. });
  19454. },
  19455. async aiChoice(type){
  19456. if(type == 45){
  19457. this.choiceLoading = true
  19458. }
  19459. let _this = this
  19460. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19461. fileid = [...fileid, ..._this.knowFileids]
  19462. if (_this.infoData.length) {
  19463. for (var i = 0; i < _this.infoData.length; i++) {
  19464. if(_this.infoData[i].fileid){
  19465. fileid.push(_this.infoData[i].fileid)
  19466. }
  19467. }
  19468. }
  19469. if (_this.xuanzeInfoData.length) {
  19470. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  19471. if(_this.xuanzeInfoData[i].fileid){
  19472. fileid.push(_this.xuanzeInfoData[i].fileid)
  19473. }
  19474. }
  19475. }
  19476. let sub = []
  19477. let mclass = []
  19478. if (this.courseTypeId.length) {
  19479. for (var i = 0; i < this.courseTypeId.length; i++) {
  19480. let _sid = this.courseTypeId[i]
  19481. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19482. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19483. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19484. }
  19485. }
  19486. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19487. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19488. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19489. }
  19490. }
  19491. }
  19492. }
  19493. let messages = ""
  19494. if(type == 15){
  19495. messages = `NOTICE
  19496. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19497. Language: ${this.getLang()}
  19498. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19499. Instruction: Based on the context, follow "Format example", write content.
  19500. # Context
  19501. ## 任务
  19502. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  19503. ## 限制
  19504. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19505. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19506. ## 课程简介
  19507. 课程名字:${_this.courseName}
  19508. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19509. ${sub.length ? '学科:' + sub.join(",") : ''}
  19510. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19511. ## 教案
  19512. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19513. # Format example
  19514. {answerQ:"问题"}
  19515. `
  19516. }else if(type == 45){
  19517. messages = `NOTICE
  19518. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19519. Language: ${this.getLang()}
  19520. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19521. Instruction: Based on the context, follow "Format example", write content.
  19522. # Context
  19523. ## 任务
  19524. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  19525. ## 限制
  19526. - 生成题目禁止重复。
  19527. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19528. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  19529. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19530. ## 课程简介
  19531. 课程名字:${_this.courseName}
  19532. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19533. ${sub.length ? '学科:' + sub.join(",") : ''}
  19534. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19535. ## 教案
  19536. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19537. # Format example
  19538. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  19539. `
  19540. }
  19541. let parm = {
  19542. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19543. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19544. session_name: uuidv4(),
  19545. userId: this.userid,
  19546. file_ids: fileid.length ? [...fileid] : '',
  19547. model: 'gpt-4o-2024-08-06',
  19548. temperature: 0.1,
  19549. }
  19550. this.ajax
  19551. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19552. .then((response) => {
  19553. console.log(response);
  19554. let data = response.data.FunctionResponse
  19555. if (data.message) {
  19556. console.log(data.message);
  19557. try {
  19558. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19559. let tArray = {}
  19560. try {
  19561. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19562. } catch (error) {
  19563. console.log("error_________________" + error);
  19564. try {
  19565. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19566. let match = data.message.match(regex);
  19567. tArray = JSON.parse(match[0]);
  19568. // var message = data.message;
  19569. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19570. // var jsonEnd = message.indexOf("```", jsonStart);
  19571. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19572. // tArray = JSON.parse(jsonString);
  19573. } catch (error) {
  19574. try {
  19575. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19576. let match = data.message.match(regex);
  19577. // eval("var aaa = " + match[0])
  19578. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19579. } catch (error) {
  19580. console.log("error_________________" + error);
  19581. }
  19582. console.log("error_________________" + error);
  19583. }
  19584. }
  19585. if(type == 45){
  19586. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  19587. }
  19588. } catch (error) {
  19589. if(type == 15){
  19590. {answerQ: "题目"}
  19591. }else if(type == 45){
  19592. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  19593. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  19594. }
  19595. _this.choiceLoading = false
  19596. }
  19597. }else if(type == 15){
  19598. {answerQ: "题目"}
  19599. }else if(type == 45){
  19600. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  19601. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  19602. }
  19603. _this.choiceLoading = false
  19604. }).catch((error) => {
  19605. if(type == 15){
  19606. {answerQ: "题目"}
  19607. }else if(type == 45){
  19608. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  19609. this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  19610. }
  19611. console.log(error);
  19612. _this.choiceLoading = false
  19613. });
  19614. },
  19615. async aiGet4(messages, callback, clickType) {
  19616. let _this = this
  19617. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19618. fileid = [...fileid, ..._this.knowFileids]
  19619. if (_this.infoData.length) {
  19620. for (var i = 0; i < _this.infoData.length; i++) {
  19621. if(_this.infoData[i].fileid){
  19622. fileid.push(_this.infoData[i].fileid)
  19623. }else {
  19624. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19625. if(_fileid){
  19626. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19627. _this.$forceUpdate();
  19628. if(_fileid != 1){
  19629. fileid.push(_fileid)
  19630. }
  19631. }
  19632. }
  19633. }
  19634. }
  19635. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  19636. if(_this.cankaoInfoData[i].fileid){
  19637. fileid.push(_this.cankaoInfoData[i].fileid)
  19638. }else {
  19639. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  19640. if(_fileid){
  19641. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  19642. _this.$forceUpdate();
  19643. if(_fileid != 1){
  19644. fileid.push(_fileid)
  19645. }
  19646. }
  19647. }
  19648. }
  19649. // let params = JSON.stringify({
  19650. // // "model": "Chat",
  19651. // model: 'gpt-3.5-turbo',
  19652. // temperature: 0.1,
  19653. // max_tokens: 4096,
  19654. // top_p: 1,
  19655. // frequency_penalty: 0,
  19656. // presence_penalty: 0,
  19657. // messages: [{
  19658. // content: messages,
  19659. // role: 'user'
  19660. // }],
  19661. // stream: false,
  19662. // uid: this.userid,
  19663. // mind_map_question: "",
  19664. // })
  19665. // // let params = JSON.stringify({
  19666. // // message: {
  19667. // // anthropic_version: "bedrock-2023-05-31",
  19668. // // max_tokens: 4096,
  19669. // // temperature: 0.1,
  19670. // // top_p: 1,
  19671. // // messages: [{
  19672. // // content: messages,
  19673. // // role: 'user'
  19674. // // }], //
  19675. // // },
  19676. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19677. // // });
  19678. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19679. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19680. // console.log(response);
  19681. // let data = response.data.FunctionResponse
  19682. // if (data.choices && data.choices.length && data.choices[0].message) {
  19683. // console.log(data.choices[0].message.content);
  19684. // let dArray = JSON.parse(data.choices[0].message.content)
  19685. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  19686. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  19687. // _this.unitJson[0].chapterInfo[0].taskJson = []
  19688. // for (var i = 0; i < dArray.length; i++) {
  19689. // let _task = dArray[i]
  19690. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  19691. // task: _task.task,
  19692. // taskDetail: "",
  19693. // taskDetail2: "",
  19694. // taskDetail3: _task.detail,
  19695. // chapterData: [],
  19696. // toolText: "",
  19697. // toolChoose: [
  19698. // {
  19699. // tool: [],
  19700. // toolDetail: "",
  19701. // toolType: 0,
  19702. // askCount: 1,
  19703. // askTitle: "",
  19704. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19705. // },
  19706. // ],
  19707. // isShowTools: false,
  19708. // askCount: 1,
  19709. // isFold: 0,
  19710. // askTitle: "",
  19711. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19712. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19713. // homeworkList: [],
  19714. // })
  19715. // }
  19716. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  19717. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19718. // _this.$forceUpdate();
  19719. // } else {
  19720. // for (var i = 0; i < dArray.length; i++) {
  19721. // let _task = dArray[i]
  19722. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19723. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19724. // }else {
  19725. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  19726. // task: _task.task,
  19727. // taskDetail: "",
  19728. // taskDetail2: "",
  19729. // taskDetail3: _task.detail,
  19730. // chapterData: [],
  19731. // toolText: "",
  19732. // toolChoose: [
  19733. // {
  19734. // tool: [],
  19735. // toolDetail: "",
  19736. // toolType: 0,
  19737. // askCount: 1,
  19738. // askTitle: "",
  19739. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19740. // },
  19741. // ],
  19742. // isShowTools: false,
  19743. // askCount: 1,
  19744. // isFold: 0,
  19745. // askTitle: "",
  19746. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19747. // checkJson: [{ checkCount: [], checkPerent: [] }],
  19748. // homeworkList: [],
  19749. // }
  19750. // }
  19751. // }
  19752. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19753. // _this.$forceUpdate();
  19754. // }
  19755. // }
  19756. // // if (data.result) {
  19757. // // console.log(data.result);
  19758. // // let dArray = JSON.parse(data.result)
  19759. // // _this.teacherText = JSON.parse(data.result)
  19760. // // for (var i = 0; i < dArray.length; i++) {
  19761. // // let _task = dArray[i]
  19762. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19763. // // }
  19764. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19765. // // _this.$forceUpdate();
  19766. // // }
  19767. // callback ? callback() : ''
  19768. // _this.loading = false
  19769. // }).catch(function (error) {
  19770. // _this.loading = false
  19771. // console.log(error);
  19772. // });
  19773. let parm = {
  19774. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19775. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19776. session_name: uuidv4(),
  19777. userId: this.userid,
  19778. file_ids: fileid.length ? [...fileid] : '',
  19779. model: 'gpt-4o-2024-08-06',
  19780. temperature: 0.1,
  19781. }
  19782. this.ajax
  19783. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19784. .then((response) => {
  19785. console.log(response);
  19786. let data = response.data.FunctionResponse
  19787. if (data.message) {
  19788. console.log(data.message);
  19789. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19790. let dArray = []
  19791. try {
  19792. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19793. } catch (error) {
  19794. console.log("error_________________" + error);
  19795. try {
  19796. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19797. let match = data.message.match(regex);
  19798. dArray = JSON.parse(match[0]);
  19799. // var message = data.message;
  19800. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19801. // var jsonEnd = message.indexOf("```", jsonStart);
  19802. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19803. // dArray = JSON.parse(jsonString);
  19804. } catch (error) {
  19805. _this.aiGet4(messages, callback)
  19806. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19807. console.log("error_________________" + error);
  19808. return;
  19809. console.log("error_________________" + error);
  19810. _this.loading = false
  19811. }
  19812. }
  19813. try {
  19814. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  19815. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  19816. if(_this.panTeacher() > 0){
  19817. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  19818. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  19819. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  19820. }
  19821. for (var i = 0; i < dArray.length; i++) {
  19822. let _task = dArray[i]
  19823. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19824. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  19825. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19826. }else {
  19827. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19828. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19829. taskDetail: "",
  19830. taskDetail2: "",
  19831. taskDetail3: _task.detail,
  19832. chapterData: [],
  19833. toolText: "",
  19834. toolChoose: [
  19835. {
  19836. tool: [],
  19837. toolDetail: "",
  19838. toolType: 0,
  19839. askCount: 1,
  19840. askTitle: "",
  19841. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19842. },
  19843. ],
  19844. isShowTools: false,
  19845. askCount: 1,
  19846. isFold: 0,
  19847. askTitle: "",
  19848. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19849. checkJson: [{ checkCount: [], checkPerent: [] }],
  19850. homeworkList: [],
  19851. })
  19852. }
  19853. }
  19854. }else {
  19855. _this.unitJson[0].chapterInfo[0].taskJson = []
  19856. for (var i = 0; i < dArray.length; i++) {
  19857. let _task = dArray[i]
  19858. _this.unitJson[0].chapterInfo[0].taskJson.push({
  19859. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19860. taskDetail: "",
  19861. taskDetail2: "",
  19862. taskDetail3: _task.detail,
  19863. chapterData: [],
  19864. toolText: "",
  19865. toolChoose: [
  19866. {
  19867. tool: [],
  19868. toolDetail: "",
  19869. toolType: 0,
  19870. askCount: 1,
  19871. askTitle: "",
  19872. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19873. },
  19874. ],
  19875. isShowTools: false,
  19876. askCount: 1,
  19877. isFold: 0,
  19878. askTitle: "",
  19879. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19880. checkJson: [{ checkCount: [], checkPerent: [] }],
  19881. homeworkList: [],
  19882. })
  19883. }
  19884. }
  19885. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19886. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19887. _this.$forceUpdate();
  19888. } else {
  19889. for (var i = 0; i < dArray.length; i++) {
  19890. let _task = dArray[i]
  19891. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  19892. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  19893. }else {
  19894. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  19895. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  19896. taskDetail: "",
  19897. taskDetail2: "",
  19898. taskDetail3: _task.detail,
  19899. chapterData: [],
  19900. toolText: "",
  19901. toolChoose: [
  19902. {
  19903. tool: [],
  19904. toolDetail: "",
  19905. toolType: 0,
  19906. askCount: 1,
  19907. askTitle: "",
  19908. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19909. },
  19910. ],
  19911. isShowTools: false,
  19912. askCount: 1,
  19913. isFold: 0,
  19914. askTitle: "",
  19915. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19916. checkJson: [{ checkCount: [], checkPerent: [] }],
  19917. homeworkList: [],
  19918. }
  19919. }
  19920. }
  19921. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19922. _this.$forceUpdate();
  19923. }
  19924. } catch (error) {
  19925. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19926. _this.aiGet4(messages, callback)
  19927. console.log("error_________________" + error);
  19928. return;
  19929. // _this.loading = false
  19930. }
  19931. }
  19932. callback ? callback() : ''
  19933. })
  19934. .catch((error) => {
  19935. _this.loading = false
  19936. console.log(error);
  19937. });
  19938. },
  19939. async aiDetail(msg, index) {
  19940. let _this = this
  19941. const _tindex = 'task-' + index
  19942. const _tindex2 = index
  19943. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19944. fileid = [...fileid, ..._this.knowFileids]
  19945. if (_this.infoData.length) {
  19946. for (var i = 0; i < _this.infoData.length; i++) {
  19947. if(_this.infoData[i].fileid){
  19948. fileid.push(_this.infoData[i].fileid)
  19949. }else {
  19950. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19951. if(_fileid){
  19952. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19953. _this.$forceUpdate();
  19954. if(_fileid != 1){
  19955. fileid.push(_fileid)
  19956. }
  19957. }
  19958. }
  19959. }
  19960. }
  19961. let url = []
  19962. if (this.infoData.length) {
  19963. for (var i = 0; i < this.infoData.length; i++) {
  19964. url.push(this.infoData[i].url)
  19965. }
  19966. }
  19967. let messages = `NOTICE
  19968. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  19969. Language: ${this.getLang()}
  19970. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19971. Instruction: Based on the context, follow "Format example", write content.
  19972. #Context
  19973. ## 要求
  19974. ${msg}
  19975. ## 参考信息
  19976. 任务名称:${_this.aiCallBack.task}
  19977. ## 优化内容
  19978. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  19979. // -------- #补充参考资料和
  19980. // ## 补充参考资料
  19981. // - 补充资料:${url.join(",")}
  19982. // - 补充描述:${_this.courseText2}
  19983. _this.taskDetailLoading.push(_tindex)
  19984. _this.ttaskDetailLoading.push(_tindex)
  19985. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  19986. let _uuid = uuidv4();
  19987. // let params = JSON.stringify({
  19988. // // "model": "Chat",
  19989. // model: 'gpt-3.5-turbo',
  19990. // temperature: 0.1,
  19991. // max_tokens: 4096,
  19992. // top_p: 1,
  19993. // frequency_penalty: 0,
  19994. // presence_penalty: 0,
  19995. // messages: [{
  19996. // content: messages,
  19997. // role: 'user'
  19998. // }],
  19999. // uid: _uuid,
  20000. // mind_map_question: "",
  20001. // })
  20002. let params = {
  20003. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20004. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  20005. session_name: _uuid,
  20006. userId: _this.userid,
  20007. uid: _uuid,
  20008. file_ids: fileid.length ? [...fileid] : '',
  20009. model: 'gpt-4o-2024-08-06',
  20010. temperature: 0.1,
  20011. }
  20012. // let params = JSON.stringify({
  20013. // message: {
  20014. // anthropic_version: "bedrock-2023-05-31",
  20015. // max_tokens: 4096,
  20016. // temperature: 0.1,
  20017. // top_p: 1,
  20018. // messages: [{
  20019. // "role": "user",
  20020. // "content": messages
  20021. // }] ,
  20022. // },
  20023. // uid: _uuid,
  20024. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20025. // });
  20026. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20027. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20028. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20029. console.log(response);
  20030. // let data = response.data.FunctionResponse
  20031. // if (data.choices && data.choices.length && data.choices[0].message) {
  20032. // console.log(data.choices[0].message.content);
  20033. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20034. // _this.$forceUpdate()
  20035. // }
  20036. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20037. } else {
  20038. _this.$message.warning(response.data.FunctionResponse.result);
  20039. }
  20040. _this.isOutlineTaskCancelToken[index] = null
  20041. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20042. }).catch(function (error) {
  20043. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20044. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20045. _this.isOutlineTaskCancelToken[index] = null
  20046. if(error && error.message != 'Request canceled by the user.'){
  20047. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20048. }
  20049. console.log(error);
  20050. });
  20051. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  20052. },
  20053. aiDetailgetAiContent(_uid, loading, _tindex2) {
  20054. try {
  20055. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20056. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20057. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20058. } catch(error){
  20059. console.log('EventSource error:', error);
  20060. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20061. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20062. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20063. this.isOutlineTaskCancelToken[_tindex2] = null
  20064. return;
  20065. }
  20066. let _allText = "";
  20067. let _mdText = "";
  20068. let _iindex = 0
  20069. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  20070. let _eData = JSON.parse(_e.data).content;
  20071. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20072. //对话已经完成
  20073. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20074. this.isOutlineTaskCancelSource[_tindex2].close();
  20075. this.isOutlineTaskCancelSource[_tindex2] = null;
  20076. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20077. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20078. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20079. this.isOutlineTaskCancelToken[_tindex2] = null
  20080. return;
  20081. } else {
  20082. _iindex++
  20083. //对话还在继续
  20084. let _text = "";
  20085. _text = _eData.replaceAll("'", "");
  20086. if (_allText == "") {
  20087. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20088. } else {
  20089. _allText += _text;
  20090. }
  20091. _mdText = _allText + "_";
  20092. _mdText = _mdText.replace(/\\n/g, "\n");
  20093. _mdText = _mdText.replace(/\\/g, "");
  20094. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20095. //转化返回的回复流数据.
  20096. if(_iindex == 10){
  20097. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20098. _iindex = 0
  20099. }
  20100. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20101. // 处理流数据
  20102. }
  20103. // this.$forceUpdate();
  20104. };
  20105. let _this = _this
  20106. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  20107. // 处理错误,可以尝试重新连接
  20108. console.log('EventSource error:', event);
  20109. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20110. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  20111. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  20112. _this.isOutlineTaskCancelToken[_tindex2] = null
  20113. _this.isOutlineTaskCancelSource[_tindex2].close();
  20114. _this.isOutlineTaskCancelSource[_tindex2] = null;
  20115. };
  20116. },
  20117. async aiOutlineDetail(msg, index) {
  20118. let _this = this
  20119. const _tindex = 'task-' + index
  20120. const _tindex2 = index
  20121. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20122. fileid = [...fileid, ..._this.knowFileids]
  20123. if (_this.infoData.length) {
  20124. for (var i = 0; i < _this.infoData.length; i++) {
  20125. if(_this.infoData[i].fileid){
  20126. fileid.push(_this.infoData[i].fileid)
  20127. }else {
  20128. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20129. if(_fileid){
  20130. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20131. _this.$forceUpdate();
  20132. if(_fileid != 1){
  20133. fileid.push(_fileid)
  20134. }
  20135. }
  20136. }
  20137. }
  20138. }
  20139. let url = []
  20140. if (this.infoData.length) {
  20141. for (var i = 0; i < this.infoData.length; i++) {
  20142. url.push(this.infoData[i].url)
  20143. }
  20144. }
  20145. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  20146. let messages = `NOTICE
  20147. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  20148. Language: ${this.getLang()}
  20149. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20150. Instruction: Based on the context, follow "Format example", write content.
  20151. #Context
  20152. ## 要求
  20153. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  20154. ## 参考信息
  20155. 课程名字:${_this.courseName}
  20156. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20157. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20158. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20159. # Format example
  20160. 子任务名称:名称应该总结了该任务是在做什么,
  20161. 子任务设计:任务设计。
  20162. 子教学目标:教学目标。
  20163. 学生过程性成果:学生过程性成果。
  20164. 评价标准:评价标准。
  20165. `
  20166. // 教学目标:教学目标。
  20167. // 任务设计:任务设计。
  20168. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  20169. // -------- #补充参考资料和
  20170. // ## 补充参考资料
  20171. // - 补充资料:${url.join(",")}
  20172. // - 补充描述:${_this.courseText2}
  20173. _this.taskDetailLoading.push(_tindex)
  20174. _this.ttaskDetailLoading.push(_tindex)
  20175. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20176. let _uuid = uuidv4();
  20177. // let params = JSON.stringify({
  20178. // // "model": "Chat",
  20179. // model: 'gpt-3.5-turbo',
  20180. // temperature: 0.1,
  20181. // max_tokens: 4096,
  20182. // top_p: 1,
  20183. // frequency_penalty: 0,
  20184. // presence_penalty: 0,
  20185. // messages: [{
  20186. // content: messages,
  20187. // role: 'user'
  20188. // }],
  20189. // uid: _uuid,
  20190. // mind_map_question: "",
  20191. // })
  20192. let params = {
  20193. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20194. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20195. session_name: _uuid,
  20196. userId: _this.userid,
  20197. uid: _uuid,
  20198. file_ids: fileid.length ? [...fileid] : '',
  20199. model: 'gpt-4o-2024-08-06',
  20200. temperature: 0.1,
  20201. }
  20202. // let params = JSON.stringify({
  20203. // message: {
  20204. // anthropic_version: "bedrock-2023-05-31",
  20205. // max_tokens: 4096,
  20206. // temperature: 0.1,
  20207. // top_p: 1,
  20208. // messages: [{
  20209. // "role": "user",
  20210. // "content": messages
  20211. // }] ,
  20212. // },
  20213. // uid: _uuid,
  20214. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20215. // });
  20216. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20217. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20218. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20219. console.log(response);
  20220. // let data = response.data.FunctionResponse
  20221. // if (data.choices && data.choices.length && data.choices[0].message) {
  20222. // console.log(data.choices[0].message.content);
  20223. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20224. // _this.$forceUpdate()
  20225. // }
  20226. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20227. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  20228. } else {
  20229. _this.$message.warning(response.data.FunctionResponse.result);
  20230. }
  20231. _this.isOutlineTaskCancelToken[index] = null
  20232. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20233. }).catch(function (error) {
  20234. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20235. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20236. _this.isOutlineTaskCancelToken[index] = null
  20237. if(error && error.message != 'Request canceled by the user.'){
  20238. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20239. }
  20240. console.log(error);
  20241. });
  20242. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  20243. },
  20244. async aiOutlineDetail2(msg, index) {
  20245. let _this = this
  20246. const _tindex = 'task-' + index
  20247. const _tindex2 = index
  20248. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20249. fileid = [...fileid, ..._this.knowFileids]
  20250. if (_this.infoData.length) {
  20251. for (var i = 0; i < _this.infoData.length; i++) {
  20252. if(_this.infoData[i].fileid){
  20253. fileid.push(_this.infoData[i].fileid)
  20254. }else {
  20255. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20256. if(_fileid){
  20257. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20258. _this.$forceUpdate();
  20259. if(_fileid != 1){
  20260. fileid.push(_fileid)
  20261. }
  20262. }
  20263. }
  20264. }
  20265. }
  20266. let url = []
  20267. if (this.infoData.length) {
  20268. for (var i = 0; i < this.infoData.length; i++) {
  20269. url.push(this.infoData[i].url)
  20270. }
  20271. }
  20272. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  20273. let taskArray = []
  20274. let taskArrayD = []
  20275. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  20276. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  20277. if(k != index){
  20278. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  20279. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  20280. }
  20281. }
  20282. let messages = `NOTICE
  20283. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  20284. Language: ${this.getLang()}
  20285. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20286. Instruction: Based on the context, follow "Format example", write content.
  20287. #Context
  20288. ## 要求
  20289. ${msg}
  20290. ## 参考信息
  20291. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20292. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20293. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20294. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  20295. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  20296. # Format example
  20297. **子任务标题**:环节+子任务名称
  20298. **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  20299. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  20300. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  20301. `
  20302. // 教学目标:教学目标。
  20303. // 任务设计:任务设计。
  20304. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  20305. // -------- #补充参考资料和
  20306. // ## 补充参考资料
  20307. // - 补充资料:${url.join(",")}
  20308. // - 补充描述:${_this.courseText2}
  20309. _this.taskDetailLoading.push(_tindex)
  20310. _this.ttaskDetailLoading.push(_tindex)
  20311. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20312. let _uuid = uuidv4();
  20313. // let params = JSON.stringify({
  20314. // // "model": "Chat",
  20315. // model: 'gpt-3.5-turbo',
  20316. // temperature: 0.1,
  20317. // max_tokens: 4096,
  20318. // top_p: 1,
  20319. // frequency_penalty: 0,
  20320. // presence_penalty: 0,
  20321. // messages: [{
  20322. // content: messages,
  20323. // role: 'user'
  20324. // }],
  20325. // uid: _uuid,
  20326. // mind_map_question: "",
  20327. // })
  20328. let params = {
  20329. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20330. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  20331. session_name: _uuid,
  20332. userId: _this.userid,
  20333. uid: _uuid,
  20334. file_ids: fileid.length ? [...fileid] : '',
  20335. model: 'gpt-4o-2024-08-06',
  20336. temperature: 0.1,
  20337. }
  20338. // let params = JSON.stringify({
  20339. // message: {
  20340. // anthropic_version: "bedrock-2023-05-31",
  20341. // max_tokens: 4096,
  20342. // temperature: 0.1,
  20343. // top_p: 1,
  20344. // messages: [{
  20345. // "role": "user",
  20346. // "content": messages
  20347. // }] ,
  20348. // },
  20349. // uid: _uuid,
  20350. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20351. // });
  20352. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20353. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20354. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20355. console.log(response);
  20356. // let data = response.data.FunctionResponse
  20357. // if (data.choices && data.choices.length && data.choices[0].message) {
  20358. // console.log(data.choices[0].message.content);
  20359. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20360. // _this.$forceUpdate()
  20361. // }
  20362. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20363. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  20364. } else {
  20365. _this.$message.warning(response.data.FunctionResponse.result);
  20366. }
  20367. _this.isOutlineTaskCancelToken[index] = null
  20368. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20369. }).catch(function (error) {
  20370. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20371. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20372. _this.isOutlineTaskCancelToken[index] = null
  20373. if(error && error.message != 'Request canceled by the user.'){
  20374. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20375. }
  20376. console.log(error);
  20377. });
  20378. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  20379. },
  20380. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  20381. try {
  20382. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20383. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20384. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20385. } catch(error) {
  20386. console.log('EventSource error:', error);
  20387. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20388. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20389. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20390. this.isOutlineTaskCancelToken[_tindex2] = null
  20391. return;
  20392. }
  20393. let _allText = "";
  20394. let _mdText = "";
  20395. let _iindex = 0
  20396. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  20397. let _eData = JSON.parse(_e.data).content;
  20398. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20399. //对话已经完成
  20400. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20401. this.isOutlineTaskCancelSource[_tindex2].close();
  20402. this.isOutlineTaskCancelSource[_tindex2] = null;
  20403. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20404. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  20405. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  20406. }
  20407. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20408. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20409. this.isOutlineTaskCancelToken[_tindex2] = null
  20410. return;
  20411. } else {
  20412. _iindex++
  20413. //对话还在继续
  20414. let _text = "";
  20415. _text = _eData.replaceAll("'", "");
  20416. if (_allText == "") {
  20417. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20418. } else {
  20419. _allText += _text;
  20420. }
  20421. _mdText = _allText + "_";
  20422. _mdText = _mdText.replace(/\\n/g, "\n");
  20423. _mdText = _mdText.replace(/\\/g, "");
  20424. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20425. //转化返回的回复流数据.
  20426. if(_iindex == 10){
  20427. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20428. _iindex = 0
  20429. }
  20430. if(this.taskDetailLoading.indexOf(loading) !== -1){
  20431. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20432. }
  20433. // 处理流数据
  20434. }
  20435. // this.$forceUpdate();
  20436. };
  20437. let _this = this
  20438. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  20439. // 处理错误,可以尝试重新连接
  20440. console.log('EventSource error:', event);
  20441. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20442. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  20443. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  20444. _this.isOutlineTaskCancelToken[_tindex2] = null
  20445. _this.isOutlineTaskCancelSource[_tindex2].close();
  20446. _this.isOutlineTaskCancelSource[_tindex2] = null;
  20447. };
  20448. },
  20449. async aiDetail2(msg, index) {
  20450. let _this = this
  20451. const _tindex = 'task-' + index
  20452. const _tindex2 = index
  20453. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20454. fileid = [...fileid, ..._this.knowFileids]
  20455. if (_this.infoData.length) {
  20456. for (var i = 0; i < _this.infoData.length; i++) {
  20457. if(_this.infoData[i].fileid){
  20458. fileid.push(_this.infoData[i].fileid)
  20459. }else {
  20460. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20461. if(_fileid){
  20462. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20463. _this.$forceUpdate();
  20464. if(_fileid != 1){
  20465. fileid.push(_fileid)
  20466. }
  20467. }
  20468. }
  20469. }
  20470. }
  20471. let messages = `NOTICE
  20472. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  20473. Language: ${this.getLang()}
  20474. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20475. Instruction: Based on the context, follow "Format example", write content.
  20476. #Context
  20477. ## 要求
  20478. ${msg}
  20479. ## 参考资料
  20480. 任务名字: ${_this.aiCallBack.task}
  20481. ## 优化信息
  20482. ${_this.aiCallBack.taskDetail}
  20483. # Format example
  20484. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  20485. _this.taskDetailLoading2.push(_tindex)
  20486. _this.ttaskDetailLoading2.push(_tindex)
  20487. let _uuid = uuidv4();
  20488. // let params = JSON.stringify({
  20489. // // "model": "Chat",
  20490. // model: 'gpt-3.5-turbo',
  20491. // temperature: 0.1,
  20492. // max_tokens: 4096,
  20493. // top_p: 1,
  20494. // frequency_penalty: 0,
  20495. // presence_penalty: 0,
  20496. // messages: [{
  20497. // content: messages,
  20498. // role: 'user'
  20499. // }],
  20500. // uid: _uuid,
  20501. // mind_map_question: "",
  20502. // })
  20503. let params = {
  20504. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20505. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  20506. session_name: _uuid,
  20507. userId: _this.userid,
  20508. uid: _uuid,
  20509. file_ids: fileid.length ? [...fileid] : '',
  20510. model: 'gpt-4o-2024-08-06',
  20511. temperature: 0.1,
  20512. }
  20513. // let params = JSON.stringify({
  20514. // message: {
  20515. // anthropic_version: "bedrock-2023-05-31",
  20516. // max_tokens: 4096,
  20517. // temperature: 0.1,
  20518. // top_p: 1,
  20519. // messages: [{
  20520. // "role": "user",
  20521. // "content": messages
  20522. // }] ,
  20523. // },
  20524. // uid: _uuid,
  20525. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20526. // });
  20527. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20528. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20529. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20530. console.log(response);
  20531. // let data = response.data.FunctionResponse
  20532. // if (data.choices && data.choices.length && data.choices[0].message) {
  20533. // console.log(data.choices[0].message.content);
  20534. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20535. // _this.$forceUpdate()
  20536. // }
  20537. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20538. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20539. } else {
  20540. _this.$message.warning(response.data.FunctionResponse.result);
  20541. }
  20542. }).catch(function (error) {
  20543. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  20544. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  20545. if(error && error.message != 'Request canceled by the user.'){
  20546. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20547. }
  20548. console.log(error);
  20549. });
  20550. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  20551. },
  20552. aiDetail2getAiContent(_uid, loading, _tindex2) {
  20553. let _source;
  20554. try {
  20555. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20556. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20557. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20558. } catch(error) {
  20559. console.log('EventSource error:', error);
  20560. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20561. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  20562. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  20563. return;
  20564. }
  20565. let _allText = "";
  20566. let _mdText = "";
  20567. let _iindex = 0
  20568. _source.onmessage = _e => {
  20569. let _eData = JSON.parse(_e.data).content;
  20570. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20571. //对话已经完成
  20572. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20573. _source.close();
  20574. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  20575. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  20576. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  20577. return;
  20578. } else {
  20579. _iindex++
  20580. //对话还在继续
  20581. let _text = "";
  20582. _text = _eData.replaceAll("'", "");
  20583. if (_allText == "") {
  20584. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20585. } else {
  20586. _allText += _text;
  20587. }
  20588. _mdText = _allText + "_";
  20589. _mdText = _mdText.replace(/\\n/g, "\n");
  20590. _mdText = _mdText.replace(/\\/g, "");
  20591. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20592. //转化返回的回复流数据
  20593. if(_iindex == 10){
  20594. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  20595. _iindex = 0
  20596. }
  20597. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  20598. // 处理流数据
  20599. }
  20600. // this.$forceUpdate();
  20601. };
  20602. let _this = this
  20603. _source.onerror = function(event) {
  20604. // 处理错误,可以尝试重新连接
  20605. console.log('EventSource error:', event);
  20606. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20607. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  20608. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  20609. _source.close();
  20610. };
  20611. },
  20612. async aiDetail3(msg, index, tindex) {
  20613. let _this = this
  20614. const _tindex = 'task-' + index + tindex
  20615. const _tindex2 = index
  20616. const _tindex3 = tindex
  20617. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20618. fileid = [...fileid, ..._this.knowFileids]
  20619. if (_this.infoData.length) {
  20620. for (var i = 0; i < _this.infoData.length; i++) {
  20621. if(_this.infoData[i].fileid){
  20622. fileid.push(_this.infoData[i].fileid)
  20623. }else {
  20624. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20625. if(_fileid){
  20626. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20627. _this.$forceUpdate();
  20628. if(_fileid != 1){
  20629. fileid.push(_fileid)
  20630. }
  20631. }
  20632. }
  20633. }
  20634. }
  20635. // **重点考虑该任务及工具名和工具内容的情况下*
  20636. let messages = `NOTICE
  20637. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  20638. Language: ${this.getLang()}
  20639. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20640. Instruction: Based on the context, follow "Format example", write content.
  20641. #Context
  20642. ## 参考内容
  20643. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20644. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  20645. 工具名称:${_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 : '无'}
  20646. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  20647. ## 要求
  20648. ${msg} 输出格式和内容要求参考#格式与要求
  20649. # Format example
  20650. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  20651. _this.taskDetailLoading3.push(_tindex)
  20652. _this.ttaskDetailLoading3.push(_tindex)
  20653. let _uuid = uuidv4();
  20654. // let params = JSON.stringify({
  20655. // // "model": "Chat",
  20656. // model: 'gpt-3.5-turbo',
  20657. // temperature: 0.1,
  20658. // max_tokens: 4096,
  20659. // top_p: 1,
  20660. // frequency_penalty: 0,
  20661. // presence_penalty: 0,
  20662. // messages: [{
  20663. // content: messages,
  20664. // role: 'user'
  20665. // }],
  20666. // uid: _uuid,
  20667. // mind_map_question: "",
  20668. // })
  20669. let params = {
  20670. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20671. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20672. session_name: _uuid,
  20673. userId: _this.userid,
  20674. uid: _uuid,
  20675. file_ids: fileid.length ? [...fileid] : '',
  20676. model: 'gpt-4o-2024-08-06',
  20677. temperature: 0.1,
  20678. }
  20679. // let params = JSON.stringify({
  20680. // message: {
  20681. // anthropic_version: "bedrock-2023-05-31",
  20682. // max_tokens: 4096,
  20683. // temperature: 0.1,
  20684. // top_p: 1,
  20685. // messages: [{
  20686. // "role": "user",
  20687. // "content": messages
  20688. // }] ,
  20689. // },
  20690. // uid: _uuid,
  20691. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20692. // });
  20693. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20694. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20695. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20696. console.log(response);
  20697. let data = response.data.FunctionResponse
  20698. // if (data.choices && data.choices.length && data.choices[0].message) {
  20699. // console.log(data.choices[0].message.content);
  20700. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  20701. // _this.$forceUpdate()
  20702. // }
  20703. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  20704. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20705. } else {
  20706. _this.$message.warning(response.data.FunctionResponse.result);
  20707. }
  20708. }).catch(function (error) {
  20709. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  20710. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  20711. if(error && error.message != 'Request canceled by the user.'){
  20712. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20713. }
  20714. console.log(error);
  20715. });
  20716. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  20717. },
  20718. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  20719. let _source;
  20720. try {
  20721. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20722. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20723. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20724. } catch(error) {
  20725. console.log('EventSource error:', event);
  20726. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20727. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  20728. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  20729. return;
  20730. }
  20731. let _allText = "";
  20732. let _mdText = "";
  20733. let _iindex = 0
  20734. _source.onmessage = _e => {
  20735. let _eData = JSON.parse(_e.data).content;
  20736. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20737. //对话已经完成
  20738. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20739. _source.close();
  20740. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  20741. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  20742. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  20743. return;
  20744. } else {
  20745. _iindex++
  20746. //对话还在继续
  20747. let _text = "";
  20748. _text = _eData.replaceAll("'", "");
  20749. if (_allText == "") {
  20750. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20751. } else {
  20752. _allText += _text;
  20753. }
  20754. _mdText = _allText + "_";
  20755. _mdText = _mdText.replace(/\\n/g, "\n");
  20756. _mdText = _mdText.replace(/\\/g, "");
  20757. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20758. //转化返回的回复流数据
  20759. if(_iindex == 10){
  20760. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  20761. _iindex = 0
  20762. }
  20763. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  20764. // 处理流数据
  20765. }
  20766. // this.$forceUpdate();
  20767. };
  20768. let _this = this
  20769. _source.onerror = function(event) {
  20770. // 处理错误,可以尝试重新连接
  20771. console.log('EventSource error:', event);
  20772. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20773. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  20774. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  20775. _source.close();
  20776. };
  20777. },
  20778. async aiDetail4(msg, index) {
  20779. if (!msg.length) {
  20780. this.$message.error("请添加评价后才能优化")
  20781. return
  20782. }
  20783. let _this = this
  20784. const _tindex = 'task-' + index
  20785. const _tindex2 = index
  20786. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20787. fileid = [...fileid, ..._this.knowFileids]
  20788. if (_this.infoData.length) {
  20789. for (var i = 0; i < _this.infoData.length; i++) {
  20790. if(_this.infoData[i].fileid){
  20791. fileid.push(_this.infoData[i].fileid)
  20792. }else {
  20793. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20794. if(_fileid){
  20795. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20796. _this.$forceUpdate();
  20797. if(_fileid != 1){
  20798. fileid.push(_fileid)
  20799. }
  20800. }
  20801. }
  20802. }
  20803. }
  20804. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  20805. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  20806. if(_this.pingjiaInfoData[index][i].fileid){
  20807. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  20808. }
  20809. }
  20810. }
  20811. var _text = ""
  20812. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  20813. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  20814. // _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 : ''} `
  20815. _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 : ''} `
  20816. }
  20817. }
  20818. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  20819. // **重点考虑该任务详情**
  20820. // let messages = `
  20821. // Language: ${this.getLang()}
  20822. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20823. // #Context
  20824. // ## 参考内容
  20825. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20826. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  20827. // 评价设计:${_text}
  20828. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20829. // ## 要求
  20830. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  20831. // # 格式与要求
  20832. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  20833. // # Format example
  20834. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  20835. let messages = `
  20836. Language: ${this.getLang()}
  20837. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20838. #Context
  20839. ## 参考内容
  20840. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20841. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  20842. ${_text ? '评价设计:'+_text : ''}
  20843. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  20844. ## 要求
  20845. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  20846. # 格式与要求
  20847. 核心素养:从教案中提取
  20848. 目标:从教案中提取
  20849. 评价标准:从教案中提取评价标准
  20850. # Format example
  20851. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  20852. _this.taskDetailLoading4.push(_tindex)
  20853. // let params = JSON.stringify({
  20854. // // "model": "Chat",
  20855. // model: 'gpt-3.5-turbo',
  20856. // temperature: 0.1,
  20857. // max_tokens: 4096,
  20858. // top_p: 1,
  20859. // frequency_penalty: 0,
  20860. // presence_penalty: 0,
  20861. // messages: [{
  20862. // content: messages,
  20863. // role: 'user'
  20864. // }],
  20865. // stream: false,
  20866. // uid: this.userid,
  20867. // mind_map_question: "",
  20868. // })
  20869. let params = {
  20870. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20871. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20872. session_name: uuidv4(),
  20873. userId: _this.userid,
  20874. file_ids: fileid.length ? [...fileid] : '',
  20875. model: 'gpt-4o-2024-08-06',
  20876. temperature: 0.1,
  20877. }
  20878. // let params = JSON.stringify({
  20879. // message: {
  20880. // anthropic_version: "bedrock-2023-05-31",
  20881. // max_tokens: 4096,
  20882. // temperature: 0.1,
  20883. // top_p: 1,
  20884. // messages: [{
  20885. // content: messages,
  20886. // role: 'user'
  20887. // }], //
  20888. // },
  20889. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20890. // });
  20891. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20892. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  20893. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20894. console.log(response);
  20895. let data = response.data.FunctionResponse
  20896. // if (data.choices && data.choices.length && data.choices[0].message) {
  20897. // console.log(data.choices[0].message.content);
  20898. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  20899. // _this.$forceUpdate()
  20900. // }
  20901. if (data.message) {
  20902. console.log(data.message);
  20903. try {
  20904. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  20905. } catch (e) {
  20906. console.log("error_________________" + e);
  20907. // _this.$message.error(data.message)
  20908. try {
  20909. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20910. let match = data.message.match(regex);
  20911. let elist = JSON.parse(match[0])
  20912. elist = elist.filter(el=>{
  20913. el.isai = 1
  20914. return el
  20915. })
  20916. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  20917. // var message = data.message;
  20918. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20919. // var jsonEnd = message.indexOf("```", jsonStart);
  20920. // if (jsonStart !== -1 && jsonEnd !== -1) {
  20921. // var jsonString = message
  20922. // .substring(jsonStart, jsonEnd)
  20923. // .trim();
  20924. // var _data2 = JSON.parse(jsonString);
  20925. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  20926. // }
  20927. } catch (error) {
  20928. }
  20929. }
  20930. _this.$forceUpdate()
  20931. }
  20932. // if (data.result) {
  20933. // console.log(data.result);
  20934. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  20935. // _this.$forceUpdate()
  20936. // }
  20937. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20938. }).catch(function (error) {
  20939. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20940. if(error && error.message != 'Request canceled by the user.'){
  20941. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20942. }
  20943. console.log(error);
  20944. });
  20945. },
  20946. async aiDetail5(msg, index) {
  20947. let _this = this
  20948. const _tindex = 'task-' + index
  20949. const _tindex2 = index
  20950. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20951. fileid = [...fileid, ..._this.knowFileids]
  20952. if (_this.infoData.length) {
  20953. for (var i = 0; i < _this.infoData.length; i++) {
  20954. if(_this.infoData[i].fileid){
  20955. fileid.push(_this.infoData[i].fileid)
  20956. }else {
  20957. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20958. if(_fileid){
  20959. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20960. _this.$forceUpdate();
  20961. if(_fileid != 1){
  20962. fileid.push(_fileid)
  20963. }
  20964. }
  20965. }
  20966. }
  20967. }
  20968. let url = []
  20969. if (this.infoData.length) {
  20970. for (var i = 0; i < this.infoData.length; i++) {
  20971. url.push(this.infoData[i].url)
  20972. }
  20973. }
  20974. var _text = ""
  20975. var _text2 = ""
  20976. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  20977. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  20978. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  20979. }
  20980. let messages = `
  20981. Language: ${this.getLang()}
  20982. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  20983. --------
  20984. ## 要求
  20985. ${msg}
  20986. -------
  20987. ## 本教案描述
  20988. ${_this.aiCallBack}
  20989. -------
  20990. ## 课程大纲
  20991. ${_text}
  20992. -------
  20993. ## 其他教学任务教案
  20994. ${_text2}`
  20995. // ## 补充参考资料
  20996. // - 补充资料:${url.join(",")}
  20997. // - 补充描述:${this.courseText2}
  20998. _this.taskDetailLoading5.push(_tindex)
  20999. _this.ttaskDetailLoading5.push(_tindex)
  21000. let _uuid = uuidv4();
  21001. // let params = JSON.stringify({
  21002. // // "model": "Chat",
  21003. // model: 'gpt-3.5-turbo',
  21004. // temperature: 0.1,
  21005. // max_tokens: 4096,
  21006. // top_p: 1,
  21007. // frequency_penalty: 0,
  21008. // presence_penalty: 0,
  21009. // messages: [{
  21010. // content: messages,
  21011. // role: 'user'
  21012. // }],
  21013. // uid: _uuid,
  21014. // mind_map_question: "",
  21015. // })
  21016. let params = {
  21017. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21018. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21019. session_name: _uuid,
  21020. userId: _this.userid,
  21021. uid: _uuid,
  21022. file_ids: fileid.length ? [...fileid] : '',
  21023. model: 'gpt-4o-2024-08-06',
  21024. temperature: 0.1,
  21025. }
  21026. // let params = JSON.stringify({
  21027. // message: {
  21028. // anthropic_version: "bedrock-2023-05-31",
  21029. // max_tokens: 4096,
  21030. // temperature: 0.1,
  21031. // top_p: 1,
  21032. // messages: [{
  21033. // "role": "user",
  21034. // "content": messages
  21035. // }] ,
  21036. // },
  21037. // uid: _uuid,
  21038. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21039. // });
  21040. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21041. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21042. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21043. console.log(response);
  21044. // let data = response.data.FunctionResponse
  21045. // if (data.choices && data.choices.length && data.choices[0].message) {
  21046. // console.log(data.choices[0].message.content);
  21047. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21048. // _this.$forceUpdate()
  21049. // }
  21050. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21051. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21052. } else {
  21053. _this.$message.warning(response.data.FunctionResponse.result);
  21054. }
  21055. }).catch(function (error) {
  21056. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  21057. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21058. }
  21059. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  21060. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21061. }
  21062. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21063. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21064. if(error && error.message != 'Request canceled by the user.'){
  21065. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21066. }
  21067. console.log(error);
  21068. });
  21069. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  21070. },
  21071. aiDetail5getAiContent(_uid, loading, _tindex2) {
  21072. let _source;
  21073. try {
  21074. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21075. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21076. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21077. } catch(error){
  21078. console.log('EventSource error:', error);
  21079. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21080. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21081. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21082. }
  21083. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21084. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21085. }
  21086. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21087. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21088. return;
  21089. }
  21090. let _allText = "";
  21091. let _mdText = "";
  21092. let _iindex = 0
  21093. _source.onmessage = _e => {
  21094. let _eData = JSON.parse(_e.data).content;
  21095. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21096. //对话已经完成
  21097. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21098. _source.close();
  21099. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21100. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21101. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21102. }
  21103. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21104. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21105. }
  21106. return;
  21107. } else {
  21108. _iindex++
  21109. //对话还在继续
  21110. let _text = "";
  21111. _text = _eData.replaceAll("'", "");
  21112. if (_allText == "") {
  21113. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21114. } else {
  21115. _allText += _text;
  21116. }
  21117. _mdText = _allText + "_";
  21118. _mdText = _mdText.replace(/\\n/g, "\n");
  21119. _mdText = _mdText.replace(/\\/g, "");
  21120. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21121. //转化返回的回复流数据
  21122. if(_iindex == 10){
  21123. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21124. _iindex = 0
  21125. }
  21126. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  21127. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21128. }
  21129. // 处理流数据
  21130. }
  21131. // this.$forceUpdate();
  21132. };
  21133. let _this = this
  21134. _source.onerror = function(event) {
  21135. // 处理错误,可以尝试重新连接
  21136. console.log('EventSource error:', event);
  21137. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21138. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  21139. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  21140. }
  21141. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  21142. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  21143. }
  21144. _source.close();
  21145. };
  21146. },
  21147. async aiDetail52(msg, index, callback) {
  21148. let _this = this
  21149. const _tindex = 'task-' + index
  21150. const _tindex2 = index
  21151. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21152. fileid = [...fileid, ..._this.knowFileids]
  21153. if (_this.infoData.length) {
  21154. for (var i = 0; i < _this.infoData.length; i++) {
  21155. if(_this.infoData[i].fileid){
  21156. fileid.push(_this.infoData[i].fileid)
  21157. }else {
  21158. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21159. if(_fileid){
  21160. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21161. _this.$forceUpdate();
  21162. if(_fileid != 1){
  21163. fileid.push(_fileid)
  21164. }
  21165. }
  21166. }
  21167. }
  21168. }
  21169. let url = []
  21170. if (this.infoData.length) {
  21171. for (var i = 0; i < this.infoData.length; i++) {
  21172. url.push(this.infoData[i].url)
  21173. }
  21174. }
  21175. let taskN = []
  21176. let taskD = []
  21177. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  21178. if(_tindex2 != ti){
  21179. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  21180. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  21181. }
  21182. }
  21183. let messages = `NOTICE
  21184. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  21185. Language: ${this.getLang()}
  21186. ATTENTION: follow "Language"
  21187. #Context
  21188. ## 要求
  21189. ${msg}
  21190. ## 补充描述
  21191. 课程简要描述:${_this.courseText}
  21192. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21193. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  21194. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  21195. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21196. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  21197. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21198. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21199. `
  21200. // ## 补充参考资料
  21201. // - 补充资料:${url.join(",")}
  21202. // - 补充描述:${this.courseText2}
  21203. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  21204. _this.taskDetailLoading5.push(_tindex)
  21205. }
  21206. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  21207. _this.ttaskDetailLoading5.push(_tindex)
  21208. }
  21209. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  21210. let _uuid = uuidv4();
  21211. // let params = JSON.stringify({
  21212. // // "model": "Chat",
  21213. // model: 'gpt-3.5-turbo',
  21214. // temperature: 0.1,
  21215. // max_tokens: 4096,
  21216. // top_p: 1,
  21217. // frequency_penalty: 0,
  21218. // presence_penalty: 0,
  21219. // messages: [{
  21220. // content: messages,
  21221. // role: 'user'
  21222. // }],
  21223. // uid: _uuid,
  21224. // mind_map_question: "",
  21225. // })
  21226. let params = {
  21227. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21228. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21229. session_name: _uuid,
  21230. userId: _this.userid,
  21231. uid: _uuid,
  21232. file_ids: fileid.length ? [...fileid] : '',
  21233. model: 'gpt-4o-2024-08-06',
  21234. temperature: 0.1,
  21235. }
  21236. // let params = JSON.stringify({
  21237. // message: {
  21238. // anthropic_version: "bedrock-2023-05-31",
  21239. // max_tokens: 4096,
  21240. // temperature: 0.1,
  21241. // top_p: 1,
  21242. // messages: [{
  21243. // "role": "user",
  21244. // "content": messages
  21245. // }] ,
  21246. // },
  21247. // uid: _uuid,
  21248. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21249. // });
  21250. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21251. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  21252. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21253. console.log(response);
  21254. // let data = response.data.FunctionResponse
  21255. // if (data.choices && data.choices.length && data.choices[0].message) {
  21256. // console.log(data.choices[0].message.content);
  21257. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21258. // _this.$forceUpdate()
  21259. // }
  21260. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21261. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21262. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  21263. } else {
  21264. _this.$message.warning(response.data.FunctionResponse.result);
  21265. }
  21266. _this.isTeacherTaskCancelToken2[index] = null
  21267. }).catch(function (error) {
  21268. if(error && error.message != 'Request canceled by the user.'){
  21269. _this.isTeacherTaskCancelToken2[index] = null
  21270. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  21271. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21272. }
  21273. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  21274. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21275. }
  21276. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21277. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21278. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21279. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21280. confirmButtonText: "确定",
  21281. cancelButtonText: "取消",
  21282. distinguishCancelAndClose: true,
  21283. type: "warning"
  21284. })
  21285. .then(() => {
  21286. _this.aiDetail52(msg, index, callback)
  21287. }).catch((v) => {
  21288. console.log(v);
  21289. callback ? callback() : ''
  21290. })
  21291. }
  21292. console.log(error);
  21293. });
  21294. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  21295. },
  21296. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  21297. try {
  21298. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21299. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21300. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21301. } catch(error) {
  21302. console.log('EventSource error:', error);
  21303. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21304. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21305. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21306. }
  21307. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21308. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21309. }
  21310. this.isTeacherTaskCancelToken2[_tindex2] = null
  21311. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21312. confirmButtonText: "确定",
  21313. cancelButtonText: "取消",
  21314. distinguishCancelAndClose: true,
  21315. type: "warning"
  21316. })
  21317. .then(() => {
  21318. _this.aiDetail52(msg, _tindex2, callback)
  21319. }).catch((v) => {
  21320. console.log(v);
  21321. callback ? callback() : ''
  21322. })
  21323. return;
  21324. }
  21325. let _allText = "";
  21326. let _mdText = "";
  21327. this.allTextArray[_tindex2] = ""
  21328. let _iindex = 0
  21329. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  21330. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  21331. let _eData = JSON.parse(_e.data).content;
  21332. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21333. //对话已经完成
  21334. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21335. this.isTeacherTaskCancelSource[_tindex2].close();
  21336. this.isTeacherTaskCancelSource[_tindex2] = null;
  21337. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21338. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21339. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21340. }
  21341. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21342. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21343. }
  21344. this.isTeacherTaskCancelToken2[_tindex2] = null
  21345. callback ? callback() : ''
  21346. return;
  21347. } else {
  21348. _iindex++
  21349. //对话还在继续
  21350. let _text = "";
  21351. _text = _eData.replaceAll("'", "");
  21352. if (_allText == "") {
  21353. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21354. } else {
  21355. _allText += _text;
  21356. }
  21357. _mdText = _allText + "_";
  21358. _mdText = _mdText.replace(/\\n/g, "\n");
  21359. _mdText = _mdText.replace(/\\/g, "");
  21360. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21361. //转化返回的回复流数据
  21362. if(_iindex == 10){
  21363. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21364. _iindex = 0
  21365. }
  21366. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  21367. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21368. }
  21369. // 处理流数据
  21370. }
  21371. };
  21372. let _this = this
  21373. _this.isTeacherTaskCancelSource.onerror = function(event) {
  21374. // 处理错误,可以尝试重新连接
  21375. console.log('EventSource error:', event);
  21376. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21377. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  21378. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  21379. }
  21380. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  21381. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  21382. }
  21383. _this.isTeacherTaskCancelSource[_tindex2].close();
  21384. _this.isTeacherTaskCancelSource[_tindex2] = null;
  21385. _this.isTeacherTaskCancelToken2[_tindex2] = null
  21386. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21387. confirmButtonText: "确定",
  21388. cancelButtonText: "取消",
  21389. distinguishCancelAndClose: true,
  21390. type: "warning"
  21391. })
  21392. .then(() => {
  21393. _this.aiDetail52(msg, _tindex2, callback)
  21394. }).catch((v) => {
  21395. console.log(v);
  21396. callback ? callback() : ''
  21397. })
  21398. };
  21399. },
  21400. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  21401. let _mdText = "";
  21402. let _eData = JSON.parse(_e.data).content;
  21403. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21404. //对话已经完成
  21405. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21406. _source.close();
  21407. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21408. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21409. return;
  21410. } else {
  21411. //对话还在继续
  21412. let _text = "";
  21413. _text = _eData.replaceAll("'", "");
  21414. if (this.allTextArray[_tindex2] == "") {
  21415. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21416. } else {
  21417. this.allTextArray[_tindex2] += _text;
  21418. }
  21419. _mdText = this.allTextArray[_tindex2] + "_";
  21420. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  21421. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  21422. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  21423. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  21424. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21425. // 处理流数据
  21426. }
  21427. },
  21428. async aiCpote(msg, callback) {
  21429. let _this = this
  21430. let _index = _this.aitype.replace("aiC","c")
  21431. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21432. fileid = [...fileid, ..._this.knowFileids]
  21433. if (_this.infoData.length) {
  21434. for (var i = 0; i < _this.infoData.length; i++) {
  21435. if(_this.infoData[i].fileid){
  21436. fileid.push(_this.infoData[i].fileid)
  21437. }else {
  21438. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21439. if(_fileid){
  21440. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21441. _this.$forceUpdate();
  21442. if(_fileid != 1){
  21443. fileid.push(_fileid)
  21444. }
  21445. }
  21446. }
  21447. }
  21448. }
  21449. let sub = []
  21450. if (this.courseTypeId.length) {
  21451. for (var i = 0; i < this.courseTypeId.length; i++) {
  21452. let _sid = this.courseTypeId[i]
  21453. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21454. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21455. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21456. }
  21457. }
  21458. }
  21459. }
  21460. let mclass = []
  21461. if (this.courseTypeId.length) {
  21462. for (var i = 0; i < this.courseTypeId.length; i++) {
  21463. let _sid = this.courseTypeId[i]
  21464. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21465. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21466. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21467. }
  21468. }
  21469. }
  21470. }
  21471. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  21472. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  21473. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  21474. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  21475. let messages = `NOTICE
  21476. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  21477. Language: ${this.getLang()}
  21478. ATTENTION: follow "Language"
  21479. ${msg}
  21480. ## 课程简介
  21481. 课程名字:${this.courseName}
  21482. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21483. ${sub.length ? '学科:' + sub.join(",") : ''}
  21484. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21485. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21486. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  21487. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  21488. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  21489. _this.cpoteLoading[_index] = true
  21490. _this.cpotetLoading[_index] = true
  21491. let _uuid = uuidv4();
  21492. // let params = JSON.stringify({
  21493. // // "model": "Chat",
  21494. // model: 'gpt-3.5-turbo',
  21495. // temperature: 0.1,
  21496. // max_tokens: 4096,
  21497. // top_p: 1,
  21498. // frequency_penalty: 0,
  21499. // presence_penalty: 0,
  21500. // messages: [{
  21501. // content: messages,
  21502. // role: 'user'
  21503. // }],
  21504. // uid: _uuid,
  21505. // mind_map_question: "",
  21506. // })
  21507. let params = {
  21508. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21509. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21510. session_name: _uuid,
  21511. userId: _this.userid,
  21512. uid: _uuid,
  21513. file_ids: fileid.length ? [...fileid] : '',
  21514. model: 'gpt-4o-2024-08-06',
  21515. temperature: 0.1,
  21516. }
  21517. // let params = JSON.stringify({
  21518. // message: {
  21519. // anthropic_version: "bedrock-2023-05-31",
  21520. // max_tokens: 4096,
  21521. // temperature: 0.1,
  21522. // top_p: 1,
  21523. // messages: [{
  21524. // "role": "user",
  21525. // "content": messages
  21526. // }] ,
  21527. // },
  21528. // uid: _uuid,
  21529. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21530. // });
  21531. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21532. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21533. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21534. console.log(response);
  21535. // let data = response.data.FunctionResponse
  21536. // if (data.choices && data.choices.length && data.choices[0].message) {
  21537. // console.log(data.choices[0].message.content);
  21538. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21539. // _this.$forceUpdate()
  21540. // }
  21541. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21542. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21543. } else {
  21544. _this.$message.warning(response.data.FunctionResponse.result);
  21545. }
  21546. }).catch(function (error) {
  21547. _this.cpoteLoading[_index] = false
  21548. _this.cpotetLoading[_index] = false
  21549. callback ? callback() : ''
  21550. if(error && error.message != 'Request canceled by the user.'){
  21551. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21552. }
  21553. console.log(error);
  21554. });
  21555. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  21556. },
  21557. aiCpotegetAiContent(_uid, loading, callback) {
  21558. let _source;
  21559. try {
  21560. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21561. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21562. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21563. } catch(error){
  21564. console.log('EventSource error:', error);
  21565. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21566. this.cpoteLoading[loading] = false
  21567. this.cpotetLoading[loading] = false
  21568. return;
  21569. }
  21570. let _allText = "";
  21571. let _mdText = "";
  21572. let _iindex = 0
  21573. _source.onmessage = _e => {
  21574. let _eData = JSON.parse(_e.data).content;
  21575. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21576. //对话已经完成
  21577. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21578. _source.close();
  21579. this.cpote[loading] = _mdText;
  21580. this.cpoteLoading[loading] = false
  21581. this.cpotetLoading[loading] = false
  21582. callback ? callback() : ''
  21583. return;
  21584. } else {
  21585. _iindex++
  21586. //对话还在继续
  21587. let _text = "";
  21588. _text = _eData.replaceAll("'", "");
  21589. if (_allText == "") {
  21590. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21591. } else {
  21592. _allText += _text;
  21593. }
  21594. _mdText = _allText + "_";
  21595. _mdText = _mdText.replace(/\\n/g, "\n");
  21596. _mdText = _mdText.replace(/\\/g, "");
  21597. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21598. //转化返回的回复流数据
  21599. if(_iindex == 10){
  21600. this.cpote[loading] = _mdText;
  21601. _iindex = 0
  21602. }
  21603. this.cpoteLoading[loading] = false
  21604. // 处理流数据
  21605. }
  21606. // this.$forceUpdate();
  21607. };
  21608. let _this = this
  21609. _source.onerror = function(event) {
  21610. // 处理错误,可以尝试重新连接
  21611. console.log('EventSource error:', event);
  21612. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21613. _this.cpoteLoading[loading] = false
  21614. _this.cpotetLoading[loading] = false
  21615. _source.close();
  21616. };
  21617. },
  21618. async aiteacherTextDetail(msg) {
  21619. let _this = this
  21620. let fileid = []
  21621. if (_this.teacherInfoData.length) {
  21622. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  21623. if(_this.teacherInfoData[i].fileid){
  21624. fileid.push(_this.teacherInfoData[i].fileid)
  21625. }else {
  21626. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  21627. if(_fileid){
  21628. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21629. _this.$forceUpdate();
  21630. if(_fileid != 1){
  21631. fileid.push(_fileid)
  21632. }
  21633. }
  21634. }
  21635. }
  21636. }
  21637. _this.teacherTextLoading = true
  21638. _this.tteacherTextLoading = true
  21639. let sub = []
  21640. if (_this.courseTypeId.length) {
  21641. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21642. let _sid = _this.courseTypeId[i]
  21643. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21644. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21645. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21646. }
  21647. }
  21648. }
  21649. }
  21650. let mclass = []
  21651. if (_this.courseTypeId.length) {
  21652. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21653. let _sid = _this.courseTypeId[i]
  21654. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21655. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21656. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21657. }
  21658. }
  21659. }
  21660. }
  21661. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  21662. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  21663. let messages = `NOTICE
  21664. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21665. Language: ${this.getLang()}
  21666. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21667. Instruction: Based on the context, follow "Format example", write content.
  21668. #Context
  21669. ## 参考资料
  21670. 课程名字:${this.courseName}
  21671. ${sub.length ? '学科:' + sub.join(",") : ''}
  21672. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21673. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  21674. ## 要求
  21675. ${msg}
  21676. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  21677. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  21678. let _uuid = uuidv4();
  21679. // let params = JSON.stringify({
  21680. // // "model": "Chat",
  21681. // model: 'gpt-3.5-turbo',
  21682. // temperature: 0.1,
  21683. // max_tokens: 4096,
  21684. // top_p: 1,
  21685. // frequency_penalty: 0,
  21686. // presence_penalty: 0,
  21687. // messages: [{
  21688. // content: messages,
  21689. // role: 'user'
  21690. // }],
  21691. // uid: _uuid,
  21692. // mind_map_question: "",
  21693. // })
  21694. let params = {
  21695. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21696. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21697. session_name: _uuid,
  21698. userId: _this.userid,
  21699. uid: _uuid,
  21700. file_ids: fileid.length ? [...fileid] : '',
  21701. model: 'gpt-4o-2024-08-06',
  21702. temperature: 0.1,
  21703. }
  21704. // let params = JSON.stringify({
  21705. // message: {
  21706. // anthropic_version: "bedrock-2023-05-31",
  21707. // max_tokens: 4096,
  21708. // temperature: 0.1,
  21709. // top_p: 1,
  21710. // messages: [{
  21711. // "role": "user",
  21712. // "content": messages
  21713. // }] ,
  21714. // },
  21715. // uid: _uuid,
  21716. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21717. // });
  21718. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21719. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  21720. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21721. console.log(response);
  21722. // let data = response.data.FunctionResponse
  21723. // if (data.choices && data.choices.length && data.choices[0].message) {
  21724. // _this.courseText = data.choices[0].message.content
  21725. // }
  21726. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21727. } else {
  21728. _this.$message.warning(response.data.FunctionResponse.result);
  21729. }
  21730. _this.isTeacherTextCancelToken = null
  21731. }).catch(function (error) {
  21732. _this.teacherTextLoading = false
  21733. _this.tteacherTextLoading = false
  21734. _this.isTeacherTextCancelToken = null
  21735. if(error && error.message != 'Request canceled by the user.'){
  21736. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21737. }
  21738. console.log(error);
  21739. });
  21740. await _this.aiteacherTextDetailgetAiContent(_uuid)
  21741. },
  21742. aiteacherTextDetailgetAiContent(_uid) {
  21743. try {
  21744. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21745. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21746. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21747. } catch(error) {
  21748. console.log('EventSource error:', event);
  21749. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21750. this.teacherTextLoading = false
  21751. this.tteacherTextLoading = false
  21752. this.isTeacherTextCancelToken = null
  21753. return;
  21754. }
  21755. let _allText = "";
  21756. let _mdText = "";
  21757. let _iindex = 0
  21758. this.isTeacherTextCancelSource.onmessage = _e => {
  21759. let _eData = JSON.parse(_e.data).content;
  21760. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21761. //对话已经完成
  21762. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21763. this.isTeacherTextCancelSource.close();
  21764. this.isTeacherTextCancelSource = null;
  21765. this.teacherCourseText = _mdText;
  21766. this.teacherTextLoading = false
  21767. this.tteacherTextLoading = false
  21768. this.teacherCourseTextB = false
  21769. this.isTeacherTextCancelToken = null
  21770. return;
  21771. } else {
  21772. _iindex++
  21773. //对话还在继续
  21774. let _text = "";
  21775. _text = _eData.replaceAll("'", "");
  21776. if (_allText == "") {
  21777. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21778. } else {
  21779. _allText += _text;
  21780. }
  21781. _mdText = _allText + "_";
  21782. _mdText = _mdText.replace(/\\n/g, "\n");
  21783. _mdText = _mdText.replace(/\\/g, "");
  21784. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21785. //转化返回的回复流数据
  21786. if(_iindex == 10){
  21787. this.teacherCourseText = _mdText;
  21788. _iindex = 0
  21789. }
  21790. if(this.teacherTextLoading){
  21791. this.teacherTextLoading = false
  21792. }
  21793. // 处理流数据
  21794. }
  21795. // this.$forceUpdate();
  21796. };
  21797. let _this = this
  21798. this.isTeacherTextCancelSource.onerror = function(event) {
  21799. // 处理错误,可以尝试重新连接
  21800. console.log('EventSource error:', event);
  21801. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21802. _this.teacherTextLoading = false
  21803. _this.tteacherTextLoading = false
  21804. _this.isTeacherTextCancelToken = null
  21805. _this.isTeacherTextCancelSource.close();
  21806. _this.isTeacherTextCancelSource = null;
  21807. };
  21808. },
  21809. async aitargetTextDetail(msg) {
  21810. let _this = this
  21811. let fileid = []
  21812. if (_this.teacherInfoData.length) {
  21813. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  21814. if(_this.teacherInfoData[i].fileid){
  21815. fileid.push(_this.teacherInfoData[i].fileid)
  21816. }else {
  21817. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  21818. if(_fileid){
  21819. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  21820. _this.$forceUpdate();
  21821. if(_fileid != 1){
  21822. fileid.push(_fileid)
  21823. }
  21824. }
  21825. }
  21826. }
  21827. }
  21828. _this.targetTextLoading = true
  21829. _this.ttargetTextLoading = true
  21830. let sub = []
  21831. if (_this.courseTypeId.length) {
  21832. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21833. let _sid = _this.courseTypeId[i]
  21834. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21835. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21836. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21837. }
  21838. }
  21839. }
  21840. }
  21841. let mclass = []
  21842. if (_this.courseTypeId.length) {
  21843. for (var i = 0; i < _this.courseTypeId.length; i++) {
  21844. let _sid = _this.courseTypeId[i]
  21845. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21846. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21847. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21848. }
  21849. }
  21850. }
  21851. }
  21852. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  21853. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  21854. let messages = `NOTICE
  21855. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  21856. Language: ${this.getLang()}
  21857. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21858. Instruction: Based on the context, follow "Format example", write content.
  21859. #Context
  21860. ## 参考资料
  21861. 课程名字:${this.courseName}
  21862. ${sub.length ? '学科:' + sub.join(",") : ''}
  21863. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21864. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  21865. ## 要求
  21866. ${msg}
  21867. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  21868. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  21869. let _uuid = uuidv4();
  21870. // let params = JSON.stringify({
  21871. // // "model": "Chat",
  21872. // model: 'gpt-3.5-turbo',
  21873. // temperature: 0.1,
  21874. // max_tokens: 4096,
  21875. // top_p: 1,
  21876. // frequency_penalty: 0,
  21877. // presence_penalty: 0,
  21878. // messages: [{
  21879. // content: messages,
  21880. // role: 'user'
  21881. // }],
  21882. // uid: _uuid,
  21883. // mind_map_question: "",
  21884. // })
  21885. let params = {
  21886. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21887. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21888. session_name: _uuid,
  21889. userId: _this.userid,
  21890. uid: _uuid,
  21891. file_ids: fileid.length ? [...fileid] : '',
  21892. model: 'gpt-4o-2024-08-06',
  21893. temperature: 0.1,
  21894. }
  21895. // let params = JSON.stringify({
  21896. // message: {
  21897. // anthropic_version: "bedrock-2023-05-31",
  21898. // max_tokens: 4096,
  21899. // temperature: 0.1,
  21900. // top_p: 1,
  21901. // messages: [{
  21902. // "role": "user",
  21903. // "content": messages
  21904. // }] ,
  21905. // },
  21906. // uid: _uuid,
  21907. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21908. // });
  21909. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21910. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  21911. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21912. console.log(response);
  21913. // let data = response.data.FunctionResponse
  21914. // if (data.choices && data.choices.length && data.choices[0].message) {
  21915. // _this.courseText = data.choices[0].message.content
  21916. // }
  21917. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21918. } else {
  21919. _this.$message.warning(response.data.FunctionResponse.result);
  21920. }
  21921. _this.isTargetCancelToken1 = null
  21922. }).catch(function (error) {
  21923. _this.targetTextLoading = false
  21924. _this.ttargetTextLoading = false
  21925. _this.isTargetCancelToken1 = null
  21926. if(error && error.message != 'Request canceled by the user.'){
  21927. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21928. }
  21929. console.log(error);
  21930. });
  21931. await _this.aitargetTextDetailgetAiContent(_uuid)
  21932. },
  21933. aitargetTextDetailgetAiContent(_uid) {
  21934. try {
  21935. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21936. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21937. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21938. } catch (error) {
  21939. console.log('EventSource error:', error);
  21940. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21941. this.targetTextLoading = false
  21942. this.ttargetTextLoading = false
  21943. this.isTargetCancelToken1 = null
  21944. return;
  21945. }
  21946. let _allText = "";
  21947. let _mdText = "";
  21948. let _iindex = 0
  21949. this.isTargetCancelSource1.onmessage = _e => {
  21950. let _eData = JSON.parse(_e.data).content;
  21951. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21952. //对话已经完成
  21953. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21954. this.isTargetCancelSource1.close();
  21955. this.isTargetCancelSource1 = null;
  21956. this.targetCourseText = _mdText;
  21957. this.targetTextLoading = false
  21958. this.ttargetTextLoading = false
  21959. this.targetCourseTextB = false
  21960. this.isTargetCancelToken1 = null
  21961. return;
  21962. } else {
  21963. _iindex++
  21964. //对话还在继续
  21965. let _text = "";
  21966. _text = _eData.replaceAll("'", "");
  21967. if (_allText == "") {
  21968. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21969. } else {
  21970. _allText += _text;
  21971. }
  21972. _mdText = _allText + "_";
  21973. _mdText = _mdText.replace(/\\n/g, "\n");
  21974. _mdText = _mdText.replace(/\\/g, "");
  21975. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21976. //转化返回的回复流数据
  21977. if(_iindex == 10){
  21978. this.targetCourseText = _mdText;
  21979. _iindex = 0
  21980. }
  21981. if(this.targetTextLoading){
  21982. this.targetTextLoading = false
  21983. }
  21984. // 处理流数据
  21985. }
  21986. // this.$forceUpdate();
  21987. };
  21988. let _this = this
  21989. this.isTargetCancelSource1.onerror = function(event) {
  21990. // 处理错误,可以尝试重新连接
  21991. console.log('EventSource error:', event);
  21992. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21993. _this.targetTextLoading = false
  21994. _this.ttargetTextLoading = false
  21995. _this.isTargetCancelToken1 = null
  21996. _this.isTargetCancelSource1.close();
  21997. _this.isTargetCancelSource1 = null;
  21998. };
  21999. },
  22000. async aitargetTextDetail2(msg) {
  22001. let _this = this
  22002. let fileid = []
  22003. if(_this.mubiaoInfoData.length){
  22004. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  22005. if(_this.mubiaoInfoData[i].fileid){
  22006. fileid.push(_this.mubiaoInfoData[i].fileid)
  22007. }else {
  22008. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  22009. if(_fileid){
  22010. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22011. _this.$forceUpdate();
  22012. if(_fileid != 1){
  22013. fileid.push(_fileid)
  22014. }
  22015. }
  22016. }
  22017. }
  22018. }
  22019. _this.targetTextLoading2 = true
  22020. _this.ttargetTextLoading2 = true
  22021. let sub = []
  22022. if (_this.courseTypeId.length) {
  22023. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22024. let _sid = _this.courseTypeId[i]
  22025. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22026. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22027. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22028. }
  22029. }
  22030. }
  22031. }
  22032. let mclass = []
  22033. if (_this.courseTypeId.length) {
  22034. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22035. let _sid = _this.courseTypeId[i]
  22036. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22037. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22038. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22039. }
  22040. }
  22041. }
  22042. }
  22043. if(sub.length){
  22044. let _fileid = _this.importFileid(sub)
  22045. fileid = [...fileid, ..._fileid]
  22046. }
  22047. let messages = `NOTICE
  22048. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22049. Language: ${this.getLang()}
  22050. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22051. Instruction: Based on the context, follow "Format example", write content.
  22052. #Context
  22053. ## 参考资料
  22054. 课程标题:${this.courseName}
  22055. ${sub.length ? '学科:' + sub.join(",") : ''}
  22056. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22057. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  22058. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22059. ## 要求
  22060. ${msg}
  22061. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22062. let _uuid = uuidv4();
  22063. // let params = JSON.stringify({
  22064. // // "model": "Chat",
  22065. // model: 'gpt-3.5-turbo',
  22066. // temperature: 0.1,
  22067. // max_tokens: 4096,
  22068. // top_p: 1,
  22069. // frequency_penalty: 0,
  22070. // presence_penalty: 0,
  22071. // messages: [{
  22072. // content: messages,
  22073. // role: 'user'
  22074. // }],
  22075. // uid: _uuid,
  22076. // mind_map_question: "",
  22077. // })
  22078. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22079. let params = {
  22080. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22081. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22082. session_name: _uuid,
  22083. userId: _this.userid,
  22084. uid: _uuid,
  22085. file_ids: fileid.length ? [...fileid] : '',
  22086. model: 'gpt-4o-2024-08-06',
  22087. temperature: 0.1,
  22088. }
  22089. // let params = JSON.stringify({
  22090. // message: {
  22091. // anthropic_version: "bedrock-2023-05-31",
  22092. // max_tokens: 4096,
  22093. // temperature: 0.1,
  22094. // top_p: 1,
  22095. // messages: [{
  22096. // "role": "user",
  22097. // "content": messages
  22098. // }] ,
  22099. // },
  22100. // uid: _uuid,
  22101. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22102. // });
  22103. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22104. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  22105. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22106. console.log(response);
  22107. // let data = response.data.FunctionResponse
  22108. // if (data.choices && data.choices.length && data.choices[0].message) {
  22109. // _this.courseText = data.choices[0].message.content
  22110. // }
  22111. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22112. } else {
  22113. _this.$message.warning(response.data.FunctionResponse.result);
  22114. }
  22115. _this.isTargetCancelToken2 = null
  22116. }).catch(function (error) {
  22117. _this.targetTextLoading2 = false
  22118. _this.ttargetTextLoading2 = false
  22119. _this.isTargetCancelToken2 = null
  22120. if(error && error.message != 'Request canceled by the user.'){
  22121. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22122. }
  22123. console.log(error);
  22124. });
  22125. await _this.aitargetTextDetail2getAiContent(_uuid)
  22126. },
  22127. importFileid(sub){
  22128. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  22129. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  22130. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  22131. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  22132. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  22133. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  22134. let _sub = converter(sub.join(","))
  22135. let fileid = []
  22136. for(var i = 0; i < this.fileidArray.length; i++){
  22137. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  22138. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  22139. fileid.push(this.fileidArray[i].fileid)
  22140. }
  22141. }
  22142. }
  22143. return fileid
  22144. },
  22145. selectFileid(){
  22146. let params = {
  22147. oid: this.oid,
  22148. };
  22149. this.ajax
  22150. .get(this.$store.state.api + "selectFileid", params)
  22151. .then((res) => {
  22152. this.fileidArray = res.data[0]
  22153. if(res.data[1].length){
  22154. this.fileidArray = res.data[1]
  22155. }
  22156. if(res.data[2].length){
  22157. this.fileidArray = res.data[2]
  22158. }
  22159. })
  22160. .catch((err) => {
  22161. console.error(err);
  22162. });
  22163. },
  22164. selectAiFileid(){
  22165. let params = {
  22166. oid: this.oid,
  22167. };
  22168. this.ajax
  22169. .get(this.$store.state.api + "selectAiFileid", params)
  22170. .then((res) => {
  22171. let fileIds = []
  22172. for(var i = 0; i < res.data[0].length; i++){
  22173. fileIds.push(res.data[0][i].fileid)
  22174. }
  22175. this.fileIds = fileIds
  22176. if(res.data[1].length){
  22177. fileIds = []
  22178. for(var i = 0; i < res.data[1].length; i++){
  22179. fileIds.push(res.data[0][i].fileid)
  22180. }
  22181. this.fileIds = fileIds
  22182. }
  22183. if(res.data[2].length){
  22184. fileIds = []
  22185. for(var i = 0; i < res.data[2].length; i++){
  22186. fileIds.push(res.data[0][i].fileid)
  22187. }
  22188. this.fileIds = fileIds
  22189. }
  22190. })
  22191. .catch((err) => {
  22192. console.error(err);
  22193. });
  22194. },
  22195. selectKnowFileid(){
  22196. let params = {
  22197. oid: this.oid,
  22198. sta: 'cn'
  22199. };
  22200. this.ajax
  22201. .get(this.$store.state.api + "selectKnowFileid", params)
  22202. .then((res) => {
  22203. this.knowFileArray = res.data[0]
  22204. if(res.data[1].length){
  22205. this.knowFileArray = res.data[1]
  22206. }
  22207. if(res.data[2].length){
  22208. this.knowFileArray = res.data[2]
  22209. }
  22210. })
  22211. .catch((err) => {
  22212. console.error(err);
  22213. });
  22214. },
  22215. async aitargetTextDetail22(msg,msg2) {
  22216. let _this = this
  22217. let fileid = []
  22218. _this.targetTextLoading2 = true
  22219. _this.ttargetTextLoading2 = true
  22220. let sub = []
  22221. if (_this.courseTypeId.length) {
  22222. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22223. let _sid = _this.courseTypeId[i]
  22224. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22225. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22226. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22227. }
  22228. }
  22229. }
  22230. }
  22231. let mclass = []
  22232. if (_this.courseTypeId.length) {
  22233. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22234. let _sid = _this.courseTypeId[i]
  22235. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22236. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22237. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22238. }
  22239. }
  22240. }
  22241. }
  22242. if(!msg2 && sub.length){
  22243. let _fileid = _this.importFileid(sub)
  22244. fileid = [...fileid, ..._fileid]
  22245. }
  22246. let messages = `NOTICE
  22247. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22248. Language: ${this.getLang()}
  22249. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22250. Instruction: Based on the context, follow "Format example", write content.
  22251. #Context
  22252. ## 参考资料
  22253. 课程标题:${this.courseName}
  22254. ${sub.length ? '学科:' + sub.join(",") : ''}
  22255. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22256. 课程目标:${msg2}
  22257. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  22258. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22259. ## 要求
  22260. ${msg}
  22261. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22262. let _uuid = uuidv4();
  22263. // let params = JSON.stringify({
  22264. // // "model": "Chat",
  22265. // model: 'gpt-3.5-turbo',
  22266. // temperature: 0.1,
  22267. // max_tokens: 4096,
  22268. // top_p: 1,
  22269. // frequency_penalty: 0,
  22270. // presence_penalty: 0,
  22271. // messages: [{
  22272. // content: messages,
  22273. // role: 'user'
  22274. // }],
  22275. // uid: _uuid,
  22276. // mind_map_question: "",
  22277. // })
  22278. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22279. let params = {
  22280. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22281. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22282. session_name: _uuid,
  22283. userId: _this.userid,
  22284. uid: _uuid,
  22285. file_ids: fileid.length ? [...fileid] : '',
  22286. model: 'gpt-4o-2024-08-06',
  22287. temperature: 0.1,
  22288. }
  22289. // let params = JSON.stringify({
  22290. // message: {
  22291. // anthropic_version: "bedrock-2023-05-31",
  22292. // max_tokens: 4096,
  22293. // temperature: 0.1,
  22294. // top_p: 1,
  22295. // messages: [{
  22296. // "role": "user",
  22297. // "content": messages
  22298. // }] ,
  22299. // },
  22300. // uid: _uuid,
  22301. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22302. // });
  22303. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22304. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  22305. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22306. console.log(response);
  22307. // let data = response.data.FunctionResponse
  22308. // if (data.choices && data.choices.length && data.choices[0].message) {
  22309. // _this.courseText = data.choices[0].message.content
  22310. // }
  22311. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22312. } else {
  22313. _this.$message.warning(response.data.FunctionResponse.result);
  22314. }
  22315. _this.isTargetCancelToken2 = null
  22316. }).catch(function (error) {
  22317. _this.targetTextLoading2 = false
  22318. _this.ttargetTextLoading2 = false
  22319. _this.isTargetCancelToken2 = null
  22320. if(error && error.message != 'Request canceled by the user.'){
  22321. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22322. }
  22323. console.log(error);
  22324. });
  22325. await _this.aitargetTextDetail2getAiContent(_uuid)
  22326. },
  22327. aitargetTextDetail2getAiContent(_uid) {
  22328. try {
  22329. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22330. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22331. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22332. } catch(error) {
  22333. console.log('EventSource error:', error);
  22334. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22335. this.targetTextLoading2 = false
  22336. this.ttargetTextLoading2 = false
  22337. this.isTargetCancelToken2 = null
  22338. return;
  22339. }
  22340. let _allText = "";
  22341. let _mdText = "";
  22342. let _iindex = 0
  22343. this.isTargetCancelSource2.onmessage = _e => {
  22344. let _eData = JSON.parse(_e.data).content;
  22345. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22346. //对话已经完成
  22347. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22348. this.isTargetCancelSource2.close();
  22349. this.isTargetCancelSource2 = null;
  22350. this.targetCourseText2 = _mdText;
  22351. this.targetTextLoading2 = false
  22352. this.ttargetTextLoading2 = false
  22353. this.targetCourseText2B = false
  22354. this.isTargetCancelToken2 = null
  22355. return;
  22356. } else {
  22357. _iindex++
  22358. //对话还在继续
  22359. let _text = "";
  22360. _text = _eData.replaceAll("'", "");
  22361. if (_allText == "") {
  22362. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22363. } else {
  22364. _allText += _text;
  22365. }
  22366. _mdText = _allText + "_";
  22367. _mdText = _mdText.replace(/\\n/g, "\n");
  22368. _mdText = _mdText.replace(/\\/g, "");
  22369. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22370. //转化返回的回复流数据
  22371. if(_iindex == 10){
  22372. this.targetCourseText2 = _mdText;
  22373. _iindex = 0
  22374. }
  22375. if(this.targetTextLoading2){
  22376. this.targetTextLoading2 = false
  22377. }
  22378. // 处理流数据
  22379. }
  22380. // this.$forceUpdate();
  22381. };
  22382. let _this = this
  22383. this.isTargetCancelSource2.onerror = function(event) {
  22384. // 处理错误,可以尝试重新连接
  22385. console.log('EventSource error:', event);
  22386. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22387. _this.targetTextLoading2 = false
  22388. _this.ttargetTextLoading2 = false
  22389. _this.isTargetCancelToken2 = null
  22390. _this.isTargetCancelSource2.close();
  22391. _this.isTargetCancelSource2 = null;
  22392. };
  22393. },
  22394. async aitargetTextDetail3(msg) {
  22395. let _this = this
  22396. let fileid = []
  22397. if(_this.mubiaoInfoData.length){
  22398. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  22399. if(_this.mubiaoInfoData[i].fileid){
  22400. fileid.push(_this.mubiaoInfoData[i].fileid)
  22401. }else {
  22402. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  22403. if(_fileid){
  22404. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22405. _this.$forceUpdate();
  22406. if(_fileid != 1){
  22407. fileid.push(_fileid)
  22408. }
  22409. }
  22410. }
  22411. }
  22412. }
  22413. _this.targetTextLoading2 = true
  22414. _this.ttargetTextLoading2 = true
  22415. let sub = []
  22416. if (_this.courseTypeId.length) {
  22417. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22418. let _sid = _this.courseTypeId[i]
  22419. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22420. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22421. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22422. }
  22423. }
  22424. }
  22425. }
  22426. let mclass = []
  22427. if (_this.courseTypeId.length) {
  22428. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22429. let _sid = _this.courseTypeId[i]
  22430. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22431. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22432. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22433. }
  22434. }
  22435. }
  22436. }
  22437. // if(sub.length){
  22438. // let _fileid = _this.importFileid(sub)
  22439. // fileid = [...fileid, ..._fileid]
  22440. // }
  22441. fileid = [...fileid, ..._this.knowFileids]
  22442. if (_this.infoData.length) {
  22443. for (var i = 0; i < _this.infoData.length; i++) {
  22444. if(_this.infoData[i].fileid){
  22445. fileid.push(_this.infoData[i].fileid)
  22446. }else {
  22447. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22448. if(_fileid){
  22449. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22450. _this.$forceUpdate();
  22451. if(_fileid != 1){
  22452. fileid.push(_fileid)
  22453. }
  22454. }
  22455. }
  22456. }
  22457. }
  22458. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22459. let messages = `${msg}`
  22460. let _uuid = uuidv4();
  22461. // let params = JSON.stringify({
  22462. // // "model": "Chat",
  22463. // model: 'gpt-3.5-turbo',
  22464. // temperature: 0.1,
  22465. // max_tokens: 4096,
  22466. // top_p: 1,
  22467. // frequency_penalty: 0,
  22468. // presence_penalty: 0,
  22469. // messages: [{
  22470. // content: messages,
  22471. // role: 'user'
  22472. // }],
  22473. // uid: _uuid,
  22474. // mind_map_question: "",
  22475. // })
  22476. let params = {
  22477. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22478. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22479. session_name: _uuid,
  22480. userId: _this.userid,
  22481. uid: _uuid,
  22482. file_ids: fileid.length ? [...fileid] : '',
  22483. model: 'gpt-4o-2024-08-06',
  22484. temperature: 0.1,
  22485. }
  22486. // let params = JSON.stringify({
  22487. // message: {
  22488. // anthropic_version: "bedrock-2023-05-31",
  22489. // max_tokens: 4096,
  22490. // temperature: 0.1,
  22491. // top_p: 1,
  22492. // messages: [{
  22493. // "role": "user",
  22494. // "content": messages
  22495. // }] ,
  22496. // },
  22497. // uid: _uuid,
  22498. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22499. // });
  22500. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22501. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  22502. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22503. console.log(response);
  22504. // let data = response.data.FunctionResponse
  22505. // if (data.choices && data.choices.length && data.choices[0].message) {
  22506. // _this.courseText = data.choices[0].message.content
  22507. // }
  22508. console.log(response);
  22509. let data = response.data.FunctionResponse
  22510. // if (data.choices && data.choices.length && data.choices[0].message) {
  22511. // console.log(data.choices[0].message.content);
  22512. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  22513. // _this.$forceUpdate()
  22514. // }
  22515. if (data.message) {
  22516. console.log('返回回来的目标:',data.message);
  22517. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  22518. }
  22519. _this.isTargetCancelToken2 = null
  22520. }).catch(function (error) {
  22521. _this.targetTextLoading2 = false
  22522. _this.ttargetTextLoading2 = false
  22523. _this.isTargetCancelToken2 = null
  22524. if(error && error.message != 'Request canceled by the user.'){
  22525. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22526. }
  22527. console.log(error);
  22528. });
  22529. },
  22530. againEva(msg, i, k) {
  22531. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  22532. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  22533. return;
  22534. }
  22535. if (this.ruleLoading[i]) {
  22536. this.ruleLoading[i][k] = true
  22537. } else {
  22538. this.ruleLoading[i] = []
  22539. this.ruleLoading[i][k] = true
  22540. }
  22541. let message = `NOTICE
  22542. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  22543. Language: ${this.getLang()}
  22544. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22545. Instruction: Based on the context, follow "Format example", write content.
  22546. #Context
  22547. ##要求
  22548. ${msg}
  22549. ##制定标准资料
  22550. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  22551. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  22552. # Format example
  22553. ==
  22554. 0 星,作业内容与作业要求无关;
  22555. 1 星,没有识别问题和需求;
  22556. 2 星,问题或需求没有被清晰理解或准确识别;
  22557. 3 星,问题或需求的一部分被识别;
  22558. 4 星,问题或需求的大部分被识别;
  22559. 5 星,问题或需求都被识别。
  22560. ==
  22561. `
  22562. // let params = {
  22563. // // "model": "Chat",
  22564. // model: 'gpt-4o-2024-08-06',
  22565. // // model: "gpt-4o",
  22566. // temperature: 0.1,
  22567. // max_tokens: 4096,
  22568. // top_p: 1,
  22569. // frequency_penalty: 0,
  22570. // presence_penalty: 0,
  22571. // messages: [
  22572. // {
  22573. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  22574. // role: "user"
  22575. // }
  22576. // ],
  22577. // stream: false,
  22578. // uid: this.userid,
  22579. // mind_map_question: ""
  22580. // };
  22581. // this.ajax
  22582. // .post("https://gpt4.cocorobo.cn/chat", params)
  22583. // .then(response => {
  22584. // let data = response.data.FunctionResponse;
  22585. // console.log("data", data);
  22586. // if (data.choices && data.choices.length && data.choices[0].message) {
  22587. // let content = data.choices[0].message.content;
  22588. // var regex = new RegExp('==([^=]+)==');
  22589. // let match = content.match(regex);
  22590. // if (match) {
  22591. // content = match[1].trim().replaceAll(' ', '');
  22592. // // 获取匹配到的内容并去除两端空格
  22593. // console.log('contentInsideDoubleEquals', content);
  22594. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  22595. // console.log("未有星级。");
  22596. // this.againEva(msg, i, k)
  22597. // return
  22598. // }
  22599. // //  return
  22600. // } else {
  22601. // console.log("未找到匹配的内容。");
  22602. // this.againEva(msg, i, k)
  22603. // return
  22604. // }
  22605. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  22606. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  22607. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  22608. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  22609. // this.$forceUpdate();
  22610. // this.ruleLoading[i][k] = false
  22611. // }else{
  22612. // this.ruleLoading[i][k] = false
  22613. // }
  22614. // })
  22615. // .catch(error => {
  22616. // console.log(error);
  22617. // this.ruleLoading[i][k] = false
  22618. // });
  22619. let parm = {
  22620. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22621. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  22622. session_name: uuidv4(),
  22623. userId: this.userid,
  22624. file_ids: [],
  22625. model: 'gpt-4o-2024-08-06',
  22626. temperature: 0.1,
  22627. }
  22628. this.ajax
  22629. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  22630. .then(async (response) => {
  22631. console.log(response);
  22632. let data = response.data.FunctionResponse
  22633. if (data.message) {
  22634. console.log(data.message);
  22635. let content = data.message;
  22636. var regex = new RegExp('==([^=]+)==');
  22637. let match = content.match(regex);
  22638. if (match) {
  22639. content = match[1].trim().replaceAll(' ', '');
  22640. // 获取匹配到的内容并去除两端空格
  22641. console.log('contentInsideDoubleEquals', content);
  22642. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  22643. console.log("未有星级。");
  22644. this.againEva(msg, i, k)
  22645. return
  22646. }
  22647. //  return
  22648. } else {
  22649. console.log("未找到匹配的内容。");
  22650. this.againEva(msg, i, k)
  22651. return
  22652. }
  22653. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  22654. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  22655. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  22656. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  22657. this.$forceUpdate();
  22658. this.ruleLoading[i][k] = false
  22659. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  22660. }else {
  22661. this.ruleLoading[i][k] = false
  22662. }
  22663. })
  22664. .catch((error) => {
  22665. this.ruleLoading[i][k] = false
  22666. console.log(error);
  22667. });
  22668. },
  22669. async aiSearchFile(messages, callback) {
  22670. let _this = this
  22671. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  22672. fileid = [...fileid, ..._this.knowFileids]
  22673. console.log('fileid=========',fileid)
  22674. // let params = JSON.stringify({
  22675. // // "model": "Chat",
  22676. // model: 'gpt-3.5-turbo',
  22677. // temperature: 0.1,
  22678. // max_tokens: 4096,
  22679. // top_p: 1,
  22680. // frequency_penalty: 0,
  22681. // presence_penalty: 0,
  22682. // messages: [{
  22683. // content: messages,
  22684. // role: 'user'
  22685. // }],
  22686. // stream: false,
  22687. // uid: this.userid,
  22688. // mind_map_question: "",
  22689. // })
  22690. // // let params = JSON.stringify({
  22691. // // message: {
  22692. // // anthropic_version: "bedrock-2023-05-31",
  22693. // // max_tokens: 4096,
  22694. // // temperature: 0.1,
  22695. // // top_p: 1,
  22696. // // messages: [{
  22697. // // content: messages,
  22698. // // role: 'user'
  22699. // // }], //
  22700. // // },
  22701. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22702. // // });
  22703. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22704. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  22705. // console.log(response);
  22706. // let data = response.data.FunctionResponse
  22707. // if (data.choices && data.choices.length && data.choices[0].message) {
  22708. // console.log(data.choices[0].message.content);
  22709. // let dArray = JSON.parse(data.choices[0].message.content)
  22710. // _this.dArray = dArray
  22711. // _this.unitJson[0].chapterInfo[0].taskJson = []
  22712. // for (var i = 0; i < dArray.length; i++) {
  22713. // let _task = dArray[i]
  22714. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22715. // task: _task.task,
  22716. // taskDetail: "",
  22717. // taskDetail2: _task.detail,
  22718. // taskDetail3: "",
  22719. // chapterData: [],
  22720. // toolText: "",
  22721. // toolChoose: [
  22722. // {
  22723. // tool: [],
  22724. // toolDetail: "",
  22725. // toolType: 0,
  22726. // askCount: 1,
  22727. // askTitle: "",
  22728. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22729. // },
  22730. // ],
  22731. // isShowTools: false,
  22732. // askCount: 1,
  22733. // isFold: 0,
  22734. // askTitle: "",
  22735. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22736. // checkJson: [{ checkCount: [], checkPerent: [] }],
  22737. // homeworkList: [],
  22738. // })
  22739. // }
  22740. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  22741. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22742. // _this.$forceUpdate();
  22743. // }
  22744. // // if (data.result) {
  22745. // // console.log(data.result);
  22746. // // let dArray = JSON.parse(data.result)
  22747. // // _this.dArray = dArray
  22748. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  22749. // // for (var i = 0; i < dArray.length; i++) {
  22750. // // let _task = dArray[i]
  22751. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  22752. // // task: _task.task,
  22753. // // taskDetail: "",
  22754. // // taskDetail2: _task.detail,
  22755. // // taskDetail3: "",
  22756. // // chapterData: [],
  22757. // // toolText: "",
  22758. // // toolChoose: [
  22759. // // {
  22760. // // tool: [],
  22761. // // toolDetail: "",
  22762. // // toolType: 0,
  22763. // // askCount: 1,
  22764. // // askTitle: "",
  22765. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22766. // // },
  22767. // // ],
  22768. // // isShowTools: false,
  22769. // // askCount: 1,
  22770. // // isFold: 1,
  22771. // // askTitle: "",
  22772. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  22773. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  22774. // // homeworkList: [],
  22775. // // })
  22776. // // }
  22777. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  22778. // // _this.$forceUpdate();
  22779. // // }
  22780. // callback ? callback() : ''
  22781. // }).catch(function (error) {
  22782. // _this.loading = false
  22783. // console.log(error);
  22784. // });
  22785. this.isFileCancelToken = this.ajax.setCancelSource();
  22786. let parm = {
  22787. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  22788. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22789. session_name: uuidv4(),
  22790. userId: this.userid,
  22791. file_ids: fileid.length ? [...fileid] : '',
  22792. model: 'gpt-4o-2024-08-06',
  22793. temperature: 0.1,
  22794. }
  22795. this.ajax
  22796. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  22797. .then((response) => {
  22798. console.log(response);
  22799. let data = response.data.FunctionResponse
  22800. if (data.message) {
  22801. console.log(data.message);
  22802. let dArray = []
  22803. try {
  22804. let regex2 = new RegExp("/([{,])(\w+):/g")
  22805. let regex3 = new RegExp('/(?<!")content(?!")/g')
  22806. //
  22807. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex2, '$1"$2":').replace(regex3, '"content"'))
  22808. } catch (error) {
  22809. // callback ? callback() : ''
  22810. console.log("error_________________" + error);
  22811. try {
  22812. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  22813. let match = data.message.match(regex);
  22814. dArray = JSON.parse(match[0]);
  22815. } catch (error) {
  22816. // callback ? callback() : ''
  22817. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  22818. console.log("error_________________" + error);
  22819. _this.isFileCancelToken = null;
  22820. _this.aiSearchFile(messages, callback)
  22821. return
  22822. }
  22823. }
  22824. for(let i = 0; i < dArray.length; i++){
  22825. let content = dArray[i].content
  22826. let name = '参考资料'+(i+1)
  22827. let md = new MarkdownIt();
  22828. let _html = content ? md.render(content) : ''
  22829. setTimeout(()=>{
  22830. if(i == (dArray.length - 1)){
  22831. _this.generate2(name, _html, i, callback)
  22832. }else {
  22833. _this.generate2(name, _html, i)
  22834. }
  22835. }, 500 * i)
  22836. }
  22837. _this.isFileCancelToken = null
  22838. _this.$forceUpdate();
  22839. }
  22840. })
  22841. .catch((error) => {
  22842. callback ? callback() : ''
  22843. _this.isFileCancelToken = null
  22844. console.log(error);
  22845. });
  22846. },
  22847. async aiSearchFile2(messages, callback) {
  22848. let _this = this
  22849. let fileid = [..._this.knowFileids]
  22850. console.log('fileid=========',fileid)
  22851. this.isFileCancelToken = this.ajax.setCancelSource();
  22852. let parm = {
  22853. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22854. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22855. session_name: uuidv4(),
  22856. userId: this.userid,
  22857. file_ids: fileid.length ? [...fileid] : '',
  22858. model: 'gpt-4o-2024-08-06',
  22859. temperature: 0.1,
  22860. }
  22861. this.ajax
  22862. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  22863. .then((response) => {
  22864. console.log(response);
  22865. let data = response.data.FunctionResponse
  22866. if (data.message) {
  22867. console.log(data.message);
  22868. let content = data.message
  22869. let name = '参考资料'
  22870. let md = new MarkdownIt();
  22871. let _html = content ? md.render(content) : ''
  22872. _this.generate2(name, _html, 0, callback)
  22873. _this.isFileCancelToken = null
  22874. _this.$forceUpdate();
  22875. }
  22876. })
  22877. .catch((error) => {
  22878. callback ? callback() : ''
  22879. _this.isFileCancelToken = null
  22880. console.log(error);
  22881. });
  22882. },
  22883. createFileid(url) {
  22884. let _this = this
  22885. return new Promise((resolve, reject) => {
  22886. try {
  22887. _this.ajax
  22888. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  22889. url: url,
  22890. })
  22891. .then((res) => {
  22892. let _data = res.data.FunctionResponse;
  22893. if (_data.result && _data.result.id) {
  22894. resolve(_data.result.id)
  22895. }else {
  22896. resolve(1)
  22897. }
  22898. }).catch(function (error) {
  22899. resolve(1)
  22900. });
  22901. }catch (e){
  22902. resolve(1)
  22903. }
  22904. });
  22905. },
  22906. handleSwitchChange(string){
  22907. // let area = ''
  22908. // let text = ''
  22909. // if(string == 'aiteacherTextDetail'){
  22910. // area = '已有教案摘要'
  22911. // text = this.teacherCourseText
  22912. // }else if(string == 'aitargetTextDetail'){
  22913. // area = '课程目标'
  22914. // text = this.targetCourseText
  22915. // }else if(string == 'aiDetail'){
  22916. // area = '课程简要描述'
  22917. // text = this.courseText
  22918. // }else if(string == 'aitargetTextDetail2'){
  22919. // area = '课程目标'
  22920. // text = this.targetCourseText2
  22921. // }else if(string.indexOf('aiDetail1') != -1){
  22922. // let index = parseInt(string.split('aiDetail1-')[1])
  22923. // area = `任务${index+1}课程大纲`
  22924. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  22925. // }else if(string == 'aiCpote1'){
  22926. // area = '概念群'
  22927. // text = this.cpote.cpote1
  22928. // }else if(string == 'aiCpote2'){
  22929. // area = '问题链'
  22930. // text = this.cpote.cpote2
  22931. // }else if(string == 'aiCpote3'){
  22932. // area = '目标层'
  22933. // text = this.cpote.cpote3
  22934. // }else if(string == 'aiCpote4'){
  22935. // area = '任务簇'
  22936. // text = this.cpote.cpote4
  22937. // }else if(string.indexOf('teacherDetail2') != -1){
  22938. // let index = parseInt(string.split('teacherDetail2-')[1])
  22939. // area = `任务${index+1}教案`
  22940. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  22941. // }else if(string.indexOf('aiDetail2') != -1){
  22942. // let index = parseInt(string.split('aiDetail2-')[1])
  22943. // area = `任务${index+1}任务描述`
  22944. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  22945. // }else if(string.indexOf('aiDetail3') != -1){
  22946. // let index = parseInt(string.split('-')[1])
  22947. // let index2 = parseInt(string.split('-')[2])
  22948. // area = `任务${index+1}工具${index2+1}的工具描述`
  22949. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  22950. // }
  22951. // if(this.isQuote[string] && text){
  22952. // this.quoteArray.push({
  22953. // string,
  22954. // area,
  22955. // value: text
  22956. // })
  22957. // }
  22958. console.log(this.isQuote)
  22959. },
  22960. setIsQuote(string){
  22961. this.isQuote[string] = false
  22962. }
  22963. },
  22964. beforeDestroy() {
  22965. // clearTimeout(this.timer);
  22966. // this.timer = null;
  22967. // clearInterval(this.timer2);
  22968. // this.timer2 = null;
  22969. clearInterval(this.pasteTimer);
  22970. this.pasteTimer = null;
  22971. },
  22972. beforeRouteLeave(to, from, next) {
  22973. // clearTimeout(this.timer);
  22974. // this.timer = null;
  22975. // clearInterval(this.timer2);
  22976. // this.timer2 = null;
  22977. clearInterval(this.pasteTimer);
  22978. this.pasteTimer = null;
  22979. next();
  22980. },
  22981. created() {
  22982. this.selectFileid();
  22983. // this.selectAiFileid();
  22984. this.selectKnowFileid();
  22985. this.getStudent();
  22986. this.getTeacher();
  22987. this.getClass();
  22988. this.selectGrage();
  22989. this.getTemplate();
  22990. this.getTipsTemplate();
  22991. // this.selectType();
  22992. this.selectEva();
  22993. if(this.istemplate == 1){
  22994. this.isOutline = true
  22995. this.isOutline2 = true
  22996. this.courseTextBool = true
  22997. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  22998. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  22999. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  23000. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  23001. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  23002. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  23003. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  23004. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  23005. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  23006. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  23007. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  23008. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  23009. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  23010. }
  23011. this.loading = false;
  23012. // this.timer2 = setInterval(() => {
  23013. // this.selectEva();
  23014. // }, 5000);
  23015. // this.pasteTimer = setInterval(() => {
  23016. // this.getPaste();
  23017. // }, 1000);
  23018. this.pasteTimer = setInterval(() => {
  23019. this.getPaste2();
  23020. }, 500);
  23021. setTimeout(() => {
  23022. // this.selectAllType();
  23023. this.selectCourseDetail();
  23024. }, 500);
  23025. let _this = this;
  23026. window.pasteStage = function (json) {
  23027. _this.pasteStage(json);
  23028. };
  23029. window.pasteTask = function (json) {
  23030. _this.pasteTask(json);
  23031. };
  23032. },
  23033. };
  23034. </script>
  23035. <style scoped>
  23036. @media screen and (max-width: 1280px) {
  23037. .mbCss {
  23038. flex-direction: column !important;
  23039. }
  23040. .pjCss {
  23041. width: 100% !important;
  23042. }
  23043. .evaCss {
  23044. width: 100% !important;
  23045. margin-top: 10px;
  23046. }
  23047. }
  23048. .el-table>>>.even_row {
  23049. background-color: #f1f1f1 !important;
  23050. }
  23051. .dialog_diy>>>.el-dialog__header {
  23052. background: #3c3c3c !important;
  23053. padding: 15px 20px;
  23054. }
  23055. .dialog_diy>>>.el-dialog__title {
  23056. color: #fff;
  23057. }
  23058. .dialog_diy>>>.el-dialog__headerbtn {
  23059. top: 19px;
  23060. }
  23061. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  23062. color: #fff;
  23063. }
  23064. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  23065. color: #fff;
  23066. }
  23067. .dialog_diy>>>.el-dialog__body,
  23068. .dialog_diy>>>.el-dialog__footer {
  23069. background: #fafafa;
  23070. }
  23071. .dialog_diy3>>>.el-dialog__body,
  23072. .dialog_diy3>>>.el-dialog__footer {
  23073. background: #eee !important;
  23074. }
  23075. .dialog_diy3>>>.el-dialog__body {
  23076. padding: 20px 20px;
  23077. }
  23078. .dialog_diyStage>>>.el-dialog__body {
  23079. padding: 10px;
  23080. }
  23081. .source_diy>>>.el-dialog {
  23082. height: 100% !important;
  23083. margin: 0 auto !important;
  23084. }
  23085. .source_diy>>>.el-dialog__body {
  23086. height: calc(100% - 185px);
  23087. overflow: auto;
  23088. background: #e6eaf0;
  23089. }
  23090. .source_diy>>>.el-dialog__footer {
  23091. background: #e6eaf0 !important;
  23092. }
  23093. .left {
  23094. border-right: 1px solid rgb(60, 94, 143);
  23095. display: flex;
  23096. flex-direction: column;
  23097. align-items: center;
  23098. min-height: 600px;
  23099. width: 385px;
  23100. height: 80%;
  23101. }
  23102. .tips {
  23103. color: rgb(128, 128, 128);
  23104. font-size: 12px;
  23105. width: 270px;
  23106. margin: 40px;
  23107. }
  23108. .pb_content {
  23109. height: 100% !important;
  23110. /* margin: 0 20px 0 20px; */
  23111. }
  23112. .pb_content_body {
  23113. width: 100% !important;
  23114. height: 100%;
  23115. display: flex;
  23116. }
  23117. .info_solid {
  23118. width: 270px;
  23119. height: 30px;
  23120. border-left: 1px solid #bdbdbd;
  23121. margin: 10px 0px 10px 30px;
  23122. }
  23123. .info_steps {
  23124. width: 270px;
  23125. font-size: 0.875rem;
  23126. display: flex;
  23127. align-items: center;
  23128. }
  23129. .info_steps span:nth-child(1) {
  23130. width: 30px;
  23131. height: 30px;
  23132. background: rgba(0, 0, 0, 0.38);
  23133. display: block;
  23134. color: #fff;
  23135. border-radius: 40px;
  23136. text-align: center;
  23137. line-height: 30px;
  23138. }
  23139. .steps_active {
  23140. background: #3d67bc !important;
  23141. }
  23142. .info_steps span:nth-child(2) {
  23143. margin-left: 5px;
  23144. }
  23145. .right {
  23146. height: 100%;
  23147. width: 100%;
  23148. display: flex;
  23149. overflow: hidden;
  23150. flex-direction: column;
  23151. }
  23152. .leftBar{
  23153. width: 290px;
  23154. height: calc(100% - 50px);
  23155. overflow: auto;
  23156. border-radius: 5px;
  23157. margin: 25px auto;
  23158. box-sizing: border-box;
  23159. margin-right: 10px;
  23160. }
  23161. .leftBar2{
  23162. width: 400px;
  23163. min-width: 400px;
  23164. height: calc(100% - 50px);
  23165. overflow: auto;
  23166. border-radius: 5px;
  23167. margin: 25px auto;
  23168. box-sizing: border-box;
  23169. margin-right: 10px;
  23170. background: #fff;
  23171. padding: 5px;
  23172. border-radius: 5px;
  23173. }
  23174. .basic_box {
  23175. margin: 0 auto;
  23176. position: relative;
  23177. padding: 0 20px 0 20px;
  23178. }
  23179. .basic_box_success {
  23180. width: 100%;
  23181. min-height: 455px;
  23182. padding: 50px 0;
  23183. position: relative;
  23184. text-align: center;
  23185. border-bottom: 1px solid #bfbfbf;
  23186. box-sizing: border-box;
  23187. display: flex;
  23188. align-items: center;
  23189. flex-direction: column;
  23190. justify-content: center;
  23191. }
  23192. .info_title {
  23193. font-size: 1.5em;
  23194. margin-right: 25px;
  23195. /* margin: 20px 30px 20px 30px; */
  23196. }
  23197. .bInfo_title {
  23198. text-align: left;
  23199. margin: 10px 0;
  23200. }
  23201. .small_title {
  23202. font-size: 14px;
  23203. line-height: 40px;
  23204. }
  23205. .chapter_beizhu {
  23206. font-size: 12px;
  23207. font-weight: bold;
  23208. float: right;
  23209. color: rgb(128, 128, 128);
  23210. margin-top: 5px;
  23211. }
  23212. .chapter_uploadBox1 {
  23213. text-align: left;
  23214. background-color: rgb(242, 242, 242);
  23215. width: 100%;
  23216. height: 67px;
  23217. padding: 0px 15px;
  23218. border-radius: 8px;
  23219. overflow: hidden;
  23220. font-size: 16px;
  23221. box-sizing: border-box;
  23222. position: relative;
  23223. }
  23224. .chapter_add {
  23225. width: 100%;
  23226. height: 32px;
  23227. margin-top: 15px;
  23228. cursor: pointer;
  23229. }
  23230. .chapter_add_l {
  23231. margin-left: 5px;
  23232. width: 30px;
  23233. height: 30px;
  23234. float: left;
  23235. border: 1px solid #aaa;
  23236. color: #aaa;
  23237. border-radius: 50%;
  23238. font-size: 25px;
  23239. text-align: center;
  23240. }
  23241. .chapter_add_r {
  23242. font-size: 18px;
  23243. height: 40px;
  23244. line-height: 30px;
  23245. text-indent: 10px;
  23246. color: #aaa;
  23247. }
  23248. .chapter_add_r span {
  23249. font-size: 12px;
  23250. color: rgb(204, 204, 204);
  23251. }
  23252. .chapter_add_input {
  23253. display: none;
  23254. }
  23255. .line {
  23256. width: 85%;
  23257. margin: 0 auto;
  23258. border-top: 1px solid #e5e5e5;
  23259. margin-top: 20px;
  23260. }
  23261. .info_btnBox {
  23262. width: calc(100%);
  23263. display: flex;
  23264. justify-content: center;
  23265. height: 80px;
  23266. align-items: center;
  23267. background: #fff;
  23268. margin: 0 auto;
  23269. border-top: 2px solid rgb(228, 232, 237);
  23270. box-sizing: border-box;
  23271. }
  23272. .info_btnBox2 {
  23273. width: calc(100%);
  23274. display: flex;
  23275. justify-content: center;
  23276. height: 20px;
  23277. align-items: center;
  23278. background: #fff;
  23279. margin: 0 auto;
  23280. border-top: 2px solid rgb(228, 232, 237);
  23281. box-sizing: border-box;
  23282. overflow: hidden;
  23283. cursor: pointer;
  23284. }
  23285. .info_btnBox3 {
  23286. width: calc(100%);
  23287. display: flex;
  23288. justify-content: flex-end;
  23289. padding: 0 20px;
  23290. height: 60px;
  23291. align-items: center;
  23292. background: unset;
  23293. margin: 0 auto;
  23294. /* border-top: 1px solid rgb(228, 232, 237); */
  23295. box-sizing: border-box;
  23296. overflow: hidden;
  23297. cursor: pointer;
  23298. background: #fff;
  23299. border-radius: 10px;
  23300. }
  23301. .info_btn+.info_btn {
  23302. margin-left: 15px;
  23303. }
  23304. .info_btn,
  23305. .teacherWord {
  23306. color: #fff;
  23307. background-color: #0f7eff;
  23308. padding: 8px 24px;
  23309. font-size: 0.9375rem;
  23310. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  23311. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  23312. min-width: 64px;
  23313. font-weight: 500;
  23314. border-radius: 4px;
  23315. box-sizing: border-box;
  23316. border: none;
  23317. cursor: pointer;
  23318. }
  23319. .teacherWord {
  23320. width: 105px !important;
  23321. text-align: center !important;
  23322. line-height: 36px !important;
  23323. padding: 0 !important;
  23324. font-size: 14px !important;
  23325. margin: 10px 0 !important;
  23326. }
  23327. .template_box {
  23328. display: flex;
  23329. flex-wrap: wrap;
  23330. }
  23331. .wordTeacher {
  23332. display: flex;
  23333. flex-direction: column;
  23334. width: 100px;
  23335. height: 100px;
  23336. text-align: center;
  23337. font-size: 13px;
  23338. margin: 0 20px 20px 0;
  23339. background: #f0f4fa;
  23340. position: relative;
  23341. border-radius: 5px;
  23342. align-items: center;
  23343. justify-content: center;
  23344. border: 1px solid #cad1dc;
  23345. color: #0e1e33;
  23346. /* padding: 25px 0px; */
  23347. cursor: pointer;
  23348. }
  23349. .wordTeacher::after {
  23350. content: "";
  23351. display: block;
  23352. position: absolute;
  23353. width: 15px;
  23354. height: 15px;
  23355. right: 10px;
  23356. top: 10px;
  23357. background-image: url(../../../assets/icon/new/choose_a.png);
  23358. background-size: 100% 100%;
  23359. }
  23360. .wordTeacherA::after {
  23361. background-image: url(../../../assets/icon/new/choose_b.png);
  23362. }
  23363. .wordTeacher:nth-child(5n) {
  23364. margin-right: 0px;
  23365. }
  23366. .wordPic {
  23367. margin: 0 auto;
  23368. width: 30px;
  23369. height: 30px;
  23370. cursor: pointer;
  23371. }
  23372. .deleteWord {
  23373. width: 22px;
  23374. height: 22px;
  23375. position: absolute;
  23376. right: 5px;
  23377. top: -15px;
  23378. cursor: pointer;
  23379. display: none;
  23380. z-index: 999;
  23381. }
  23382. .wordPic>img,
  23383. .deleteWord>img,
  23384. .addToolImg>img {
  23385. width: 100%;
  23386. height: 100%;
  23387. }
  23388. .info_btn:hover {
  23389. background-color: #4f7cd5 !important;
  23390. }
  23391. .cru_selectBox {
  23392. display: flex;
  23393. margin: 15px 0;
  23394. flex-wrap: nowrap;
  23395. white-space: nowrap;
  23396. overflow: auto;
  23397. position: relative;
  23398. height: 40px;
  23399. max-width: calc(100% - 175px);
  23400. }
  23401. .cru_selectBox::-webkit-scrollbar {
  23402. /*滚动条整体样式*/
  23403. width: 6px;
  23404. /*高宽分别对应横竖滚动条的尺寸*/
  23405. height: 6px;
  23406. }
  23407. /*定义滚动条轨道 内阴影+圆角*/
  23408. .cru_selectBox::-webkit-scrollbar-track {
  23409. border-radius: 10px;
  23410. background-color: #eee;
  23411. }
  23412. /*定义滑块 内阴影+圆角*/
  23413. .cru_selectBox::-webkit-scrollbar-thumb {
  23414. border-radius: 10px;
  23415. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  23416. background-color: rgba(0, 0, 0, 0.1);
  23417. }
  23418. .cru_line {
  23419. position: absolute;
  23420. bottom: 0px;
  23421. transition: all 0.5s;
  23422. left: 0px;
  23423. width: 50px;
  23424. height: 4px;
  23425. left: 10px;
  23426. border-radius: 2px;
  23427. background: #3681fc;
  23428. }
  23429. .cru_select {
  23430. font-size: 18px;
  23431. margin-right: 20px;
  23432. margin-left: 5px;
  23433. cursor: pointer;
  23434. color: #0e1e33;
  23435. }
  23436. .cru_select:hover {
  23437. color: #3681fc !important;
  23438. }
  23439. .cru_selected {
  23440. color: #3681fc !important;
  23441. font-weight: bold;
  23442. }
  23443. .chapter_box {
  23444. margin-top: 10px;
  23445. width: 100%;
  23446. padding: 10px 20px;
  23447. background: #fff;
  23448. border-radius: 8px;
  23449. box-sizing: border-box;
  23450. }
  23451. .chapter_contentbox {
  23452. display: flex;
  23453. align-items: center;
  23454. /* margin-top: 15px; */
  23455. }
  23456. .chapter_contentbox .cc_title {
  23457. margin: 0px;
  23458. color: black;
  23459. display: block;
  23460. white-space: nowrap;
  23461. overflow: hidden;
  23462. text-overflow: ellipsis;
  23463. margin-right: 20px;
  23464. font-size: 18px;
  23465. height: 20px;
  23466. line-height: 22px;
  23467. min-width: fit-content;
  23468. display: flex;
  23469. }
  23470. .chapter_contentbox .cc_title::before {
  23471. content: "";
  23472. height: 100%;
  23473. width: 3px;
  23474. background: #3681fc;
  23475. border-radius: 3px;
  23476. opacity: 1;
  23477. display: block;
  23478. margin-right: 10px;
  23479. }
  23480. .chapter_contentbox .cc_input {
  23481. width: 100%;
  23482. display: flex;
  23483. }
  23484. .show_taskD {
  23485. min-width: fit-content;
  23486. margin-left: 10px;
  23487. display: flex;
  23488. align-items: center;
  23489. font-size: 14px;
  23490. cursor: pointer;
  23491. color: #717c8d;
  23492. }
  23493. .show_taskD>img {
  23494. width: 15px;
  23495. margin-right: 5px;
  23496. transition: 0.2s all;
  23497. transform: rotate(-90deg);
  23498. }
  23499. .show_taskD.show>img {
  23500. transform: rotate(0deg);
  23501. }
  23502. .show_toolD {
  23503. min-width: fit-content;
  23504. margin-left: 10px;
  23505. display: flex;
  23506. align-items: center;
  23507. font-size: 14px;
  23508. cursor: pointer;
  23509. color: #717c8d;
  23510. /* position: absolute;
  23511. right: 45px;
  23512. top: 5px; */
  23513. }
  23514. .show_toolD>img {
  23515. width: 15px;
  23516. margin-right: 5px;
  23517. transition: 0.2s all;
  23518. transform: rotate(-90deg);
  23519. }
  23520. .show_toolD.show>img {
  23521. transform: rotate(0deg);
  23522. }
  23523. .remove {
  23524. background-image: url("../../../assets/icon/new/delete_u.png");
  23525. cursor: pointer;
  23526. opacity: 0.5;
  23527. width: 30px;
  23528. min-width: 30px;
  23529. height: 30px;
  23530. background-size: 100% 100%;
  23531. background-repeat: no-repeat;
  23532. margin-left: 10px;
  23533. }
  23534. .remove1 {
  23535. background-image: url("../../../assets/remove1.png");
  23536. background-repeat: no-repeat;
  23537. background-position: 5px 10px;
  23538. width: 40px;
  23539. height: 50px;
  23540. cursor: pointer;
  23541. margin-left: 10px;
  23542. }
  23543. .binfo_input {
  23544. width: 100%;
  23545. margin: 0;
  23546. padding: 12px 14px;
  23547. display: block;
  23548. min-width: 0;
  23549. outline: none;
  23550. box-sizing: border-box;
  23551. background: none;
  23552. border: none;
  23553. border-radius: 4px;
  23554. background: #fff;
  23555. font-size: 16px;
  23556. resize: none;
  23557. font-family: "Microsoft YaHei";
  23558. min-height: 48px;
  23559. /* border: 1px solid #3682fc00; */
  23560. border: 1.5px solid #cad1dc;
  23561. }
  23562. .binfo_textarea {
  23563. border: 1.5px solid #cad1dc;
  23564. font-size: 16px;
  23565. resize: none;
  23566. /* background: #f6f6f6; */
  23567. font-family: "Microsoft YaHei";
  23568. }
  23569. .binfo_input:focus-visible {
  23570. border: 1.5px solid #3681fc !important;
  23571. }
  23572. .time {
  23573. display: flex;
  23574. margin: 35px 0 80px 0;
  23575. }
  23576. .chapter_btnbox {
  23577. width: 160px;
  23578. border-radius: 5px;
  23579. border: 2px dashed gray;
  23580. display: flex;
  23581. padding: 8px 50px;
  23582. align-items: center;
  23583. justify-content: center;
  23584. margin: 30px auto 0;
  23585. cursor: pointer;
  23586. }
  23587. .icon_add {
  23588. position: relative;
  23589. width: 24px;
  23590. padding-top: 20px;
  23591. border-radius: 100%;
  23592. border-width: 2px;
  23593. border-style: solid;
  23594. border-color: gray;
  23595. }
  23596. .icon_add i:nth-child(1) {
  23597. position: absolute;
  23598. left: 50%;
  23599. top: 50%;
  23600. height: 60%;
  23601. transform: translate(-50%, -50%);
  23602. border-width: 1px;
  23603. border-style: solid;
  23604. border-color: inherit;
  23605. }
  23606. .icon_add i:nth-child(2) {
  23607. position: absolute;
  23608. top: 50%;
  23609. left: 50%;
  23610. width: 60%;
  23611. transform: translate(-50%, -50%);
  23612. border-width: 1px;
  23613. border-style: solid;
  23614. border-color: inherit;
  23615. }
  23616. .chapter_btn_w {
  23617. font-size: 0.9375rem;
  23618. font-weight: bold;
  23619. color: gray;
  23620. margin-left: 20px;
  23621. }
  23622. .disUoloadSty>>>.el-icon-plus {
  23623. display: none !important;
  23624. /* 上传按钮隐藏 */
  23625. }
  23626. .imgLeft {
  23627. margin: 15px 0;
  23628. }
  23629. .add_info_box {
  23630. margin: 0 0 0 auto;
  23631. display: flex;
  23632. flex-wrap: wrap;
  23633. }
  23634. .add_info_box button {
  23635. margin: 0 5px 10px 0;
  23636. }
  23637. .add_info_box2 {
  23638. display: flex;
  23639. align-items: center;
  23640. flex-wrap: wrap;
  23641. }
  23642. .add_info_box2::after {
  23643. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  23644. color: red;
  23645. font-size: 14px;
  23646. margin-bottom: 10px;
  23647. }
  23648. .add_chapters_box {
  23649. text-align: left;
  23650. background-color: #fff;
  23651. width: 100%;
  23652. border-radius: 4px;
  23653. font-size: 16px;
  23654. box-sizing: border-box;
  23655. position: relative;
  23656. padding: 0 15px;
  23657. height: auto;
  23658. overflow-y: auto;
  23659. overflow-x: hidden;
  23660. border: 1px solid #cad1dc;
  23661. }
  23662. .add_chapters_box.add_c_none {
  23663. display: flex;
  23664. justify-content: center;
  23665. align-items: center;
  23666. padding: 15px;
  23667. }
  23668. .add_c_none>img {
  23669. width: 25px;
  23670. }
  23671. .add_chapters_box.add_c_none>span {
  23672. font-size: 14px;
  23673. font-weight: 400;
  23674. margin: 0 0 5px 5px;
  23675. }
  23676. .homework_box {
  23677. display: flex;
  23678. align-items: flex-start;
  23679. flex-wrap: wrap;
  23680. margin: 15px 0 0 0;
  23681. flex-direction: column;
  23682. align-content: flex-start;
  23683. }
  23684. .course_homework {
  23685. display: flex;
  23686. justify-content: center;
  23687. flex-direction: row;
  23688. align-items: center;
  23689. margin: 0 10px 0 0;
  23690. }
  23691. .course_homework>>>.el-input__inner {
  23692. width: 140px;
  23693. margin-left: 15px;
  23694. }
  23695. .chapter_upload_move {
  23696. position: relative;
  23697. background-color: #fff;
  23698. position: absolute;
  23699. width: 100%;
  23700. top: 0px;
  23701. left: 0px;
  23702. border: 1px solid #eee;
  23703. border-radius: 5px;
  23704. transition: width 2s;
  23705. -moz-transition: width 2s;
  23706. -webkit-transition: width 2s;
  23707. -o-transition: width 2s;
  23708. }
  23709. .chapter_upload_l_i {
  23710. background-image: url("../../../assets/icon.png");
  23711. background-position: 3px -165px;
  23712. width: 30px;
  23713. height: 30px;
  23714. margin: 10px auto 0 auto;
  23715. }
  23716. .course_input_box {
  23717. display: flex;
  23718. margin-right: 20px;
  23719. width: 100%;
  23720. align-items: center;
  23721. position: relative;
  23722. }
  23723. .course_input_box>.binfo_input {
  23724. width: calc(100% - 0 - 200px - 20px);
  23725. margin: 0 10px;
  23726. }
  23727. .bb_courseIcon {
  23728. width: 57px;
  23729. height: 45px;
  23730. background: #f0f4fa;
  23731. border-radius: 5px 0px 0px 5px;
  23732. display: flex;
  23733. align-items: center;
  23734. justify-content: center;
  23735. border-right: 1.5px solid rgb(202, 209, 220);
  23736. box-sizing: border-box;
  23737. position: absolute;
  23738. left: 1.5px;
  23739. }
  23740. .bb_courseIcon>img {
  23741. width: 25px;
  23742. height: auto;
  23743. }
  23744. .big_box {
  23745. /* margin-top: 20px; */
  23746. display: flex;
  23747. justify-content: space-between;
  23748. /* border-bottom: 1px solid #E0E2ED; */
  23749. }
  23750. .left_first {
  23751. display: flex;
  23752. flex-direction: column;
  23753. flex-wrap: nowrap;
  23754. width: calc(100% - 310px);
  23755. padding: 20px;
  23756. box-sizing: border-box;
  23757. background: #fff;
  23758. border-radius: 5px;
  23759. }
  23760. .right_first {
  23761. width: 300px;
  23762. display: flex;
  23763. align-items: center;
  23764. justify-content: center;
  23765. /* border-left: 1px solid #E0E2ED; */
  23766. box-sizing: border-box;
  23767. padding: 20px;
  23768. flex-direction: column;
  23769. background: #fff;
  23770. border-radius: 5px;
  23771. }
  23772. .ai_box {
  23773. width: 204px;
  23774. display: flex;
  23775. justify-content: flex-end;
  23776. margin-bottom: 15px;
  23777. }
  23778. .ai_content {
  23779. display: flex;
  23780. align-items: center;
  23781. font-size: 14px;
  23782. padding: 7px 20px;
  23783. box-sizing: border-box;
  23784. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  23785. border-radius: 12px;
  23786. font-weight: 700;
  23787. cursor: pointer;
  23788. }
  23789. .ai_content>img {
  23790. width: 40px;
  23791. margin-right: 5px;
  23792. }
  23793. .c_info_title {
  23794. padding: 15px 0 15px 0;
  23795. font-size: 16px;
  23796. font-weight: bold;
  23797. margin: 0 0 0 20px;
  23798. box-sizing: border-box;
  23799. display: flex;
  23800. align-items: center;
  23801. line-height: 20px;
  23802. }
  23803. .c_info_title::before {
  23804. content: "";
  23805. display: block;
  23806. width: 3px;
  23807. height: 20px;
  23808. background: #0061ff;
  23809. border-radius: 3px;
  23810. margin: 0 5px 0 0;
  23811. }
  23812. .right_title {
  23813. height: 30px;
  23814. padding: 15px 0 15px 20px;
  23815. border-bottom: 1px solid #f2f2f2;
  23816. font-size: 1.5em;
  23817. font-weight: bold;
  23818. color: #0f7eff;
  23819. margin: 0 auto;
  23820. }
  23821. .people {
  23822. border: 1px solid rgb(229 229 229);
  23823. /* height: 495px; */
  23824. height: 350px;
  23825. border-radius: 5px;
  23826. width: 100%;
  23827. overflow: auto;
  23828. }
  23829. .people_top {
  23830. display: flex;
  23831. width: 100%;
  23832. /* justify-content: space-between; */
  23833. /* align-items: center; */
  23834. flex-direction: column;
  23835. padding: 10px 10px 0;
  23836. box-sizing: border-box;
  23837. }
  23838. .people_nav,
  23839. .people_top_right {
  23840. /* padding: 20px 0 0 20px; */
  23841. }
  23842. .people_top_right {
  23843. height: 40px;
  23844. margin-bottom: 10px;
  23845. }
  23846. .people_search {
  23847. display: flex;
  23848. position: relative;
  23849. }
  23850. .people_search>>>.el-input__inner {
  23851. /* height: 25px; */
  23852. width: 100%;
  23853. }
  23854. .search_img {
  23855. width: 20px;
  23856. height: 20px;
  23857. position: absolute;
  23858. right: 10px;
  23859. top: 50%;
  23860. transform: translateY(-50%);
  23861. }
  23862. .search_img>img {
  23863. width: 100%;
  23864. height: 100%;
  23865. }
  23866. .people_name {
  23867. display: flex;
  23868. justify-content: flex-start;
  23869. padding: 20px 10px;
  23870. flex-direction: column;
  23871. flex-wrap: wrap;
  23872. }
  23873. .p_box {
  23874. position: relative;
  23875. }
  23876. .people_name>>>.el-checkbox {
  23877. width: 100%;
  23878. display: flex;
  23879. align-items: center;
  23880. margin-bottom: 10px;
  23881. }
  23882. .people_name>>>.el-checkbox__label {
  23883. text-overflow: ellipsis;
  23884. overflow: hidden;
  23885. width: calc(100%);
  23886. }
  23887. .people_name2>>>.el-checkbox__label {
  23888. width: calc(100% - 130px);
  23889. }
  23890. .inviteCode {
  23891. position: absolute;
  23892. right: 30px;
  23893. color: #237ade;
  23894. top: 0;
  23895. cursor: pointer;
  23896. font-size: 13px;
  23897. }
  23898. .noneInvite {
  23899. color: #a8a8a8;
  23900. }
  23901. .inviteImg {
  23902. position: absolute;
  23903. right: 5px;
  23904. top: 0;
  23905. width: 20px;
  23906. }
  23907. .right_img {
  23908. width: 150px;
  23909. height: 150px;
  23910. margin: 0 auto;
  23911. }
  23912. .right_img>img {
  23913. width: 100%;
  23914. height: 100%;
  23915. }
  23916. .number {
  23917. margin-top: 20px;
  23918. color: #4aa6ff;
  23919. text-decoration: underline;
  23920. }
  23921. .success_button {
  23922. display: flex;
  23923. text-align: center;
  23924. margin: 5% 0 auto;
  23925. flex-direction: row;
  23926. justify-content: center;
  23927. }
  23928. .look_course {
  23929. margin-right: 40px;
  23930. background: #3d67bc;
  23931. width: 200px;
  23932. height: 35px;
  23933. line-height: 35px;
  23934. color: #fff;
  23935. text-align: center;
  23936. font-size: 14px;
  23937. border-radius: 5px;
  23938. cursor: pointer;
  23939. }
  23940. .attend_others {
  23941. width: 250px;
  23942. background: #4fb13c;
  23943. height: 35px;
  23944. line-height: 35px;
  23945. color: #fff;
  23946. text-align: center;
  23947. font-size: 14px;
  23948. border-radius: 5px;
  23949. cursor: pointer;
  23950. }
  23951. .dialog_diy2>>>.el-dialog__body {
  23952. text-align: center;
  23953. }
  23954. .write_togother {
  23955. position: absolute;
  23956. right: 45px;
  23957. display: flex;
  23958. top: 5%;
  23959. }
  23960. .write_people {
  23961. font-size: 14px;
  23962. line-height: 50px;
  23963. padding-right: 10px;
  23964. }
  23965. .end_write {
  23966. background: #3d67bc;
  23967. color: #fff;
  23968. width: 100px;
  23969. height: 35px;
  23970. line-height: 35px;
  23971. text-align: center;
  23972. font-size: 14px;
  23973. border-radius: 5px;
  23974. cursor: pointer;
  23975. }
  23976. .chapter_upload+.chapter_upload {
  23977. /* margin-top: 15px; */
  23978. border-top: 1px solid #e7ebf1;
  23979. }
  23980. .chapter_upload {
  23981. height: 45px;
  23982. position: relative;
  23983. display: flex;
  23984. align-items: center;
  23985. width: 100%;
  23986. min-height: 45px;
  23987. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  23988. /* border-radius: 4px; */
  23989. /* overflow: hidden; */
  23990. box-sizing: border-box;
  23991. }
  23992. .chapter_upload_drag {
  23993. position: absolute;
  23994. cursor: pointer;
  23995. width: 16px;
  23996. height: 16px;
  23997. left: -9px;
  23998. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  23999. background-size: 100% 100%;
  24000. z-index: 10;
  24001. display: none;
  24002. }
  24003. .isNavStage>.chapter_upload_drag {
  24004. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  24005. }
  24006. .chapter_upload_t {
  24007. background-color: #fff;
  24008. position: absolute;
  24009. height: 100%;
  24010. top: 0px;
  24011. left: 0px;
  24012. box-sizing: border-box;
  24013. }
  24014. .chapter_upload_o {
  24015. width: 100%;
  24016. height: 100%;
  24017. position: relative;
  24018. z-index: 1;
  24019. }
  24020. .chapter_upload_ic {
  24021. margin: 0 15px 0px auto;
  24022. display: flex;
  24023. align-items: center;
  24024. }
  24025. .chapter_upload_ic_l {
  24026. width: 50px;
  24027. height: 50px;
  24028. float: left;
  24029. }
  24030. .chapter_upload_ic_l div {
  24031. width: 30px;
  24032. height: 35px;
  24033. background: url("../../../assets/icon/icon.png");
  24034. }
  24035. .chapter_upload_ic_edit {
  24036. height: 100%;
  24037. display: flex;
  24038. align-items: center;
  24039. cursor: pointer;
  24040. margin: 0 10px 0 0;
  24041. }
  24042. .chapter_upload_ic_edit div {
  24043. width: 18px;
  24044. height: 18px;
  24045. background-image: url("../../../assets/icon/new/edit_u.png");
  24046. background-size: 100% 100%;
  24047. }
  24048. .chapter_upload_ic_check {
  24049. height: 100%;
  24050. display: flex;
  24051. align-items: center;
  24052. cursor: pointer;
  24053. margin: 0 10px 0 0;
  24054. }
  24055. .chapter_upload_ic_check div {
  24056. width: 18px;
  24057. height: 18px;
  24058. background-image: url("../../../assets/icon/course/lookeye.svg");
  24059. background-size: 100% 100%;
  24060. }
  24061. .chapter_upload_ic_r {
  24062. height: 100%;
  24063. display: flex;
  24064. align-items: center;
  24065. cursor: pointer;
  24066. }
  24067. .chapter_upload_ic_r div {
  24068. width: 18px;
  24069. height: 18px;
  24070. background-image: url("../../../assets/icon/new/delete_u.png");
  24071. background-size: 100% 100%;
  24072. }
  24073. .chapter_upload_n {
  24074. display: flex;
  24075. text-indent: 10px;
  24076. text-decoration: none;
  24077. text-overflow: ellipsis;
  24078. white-space: nowrap;
  24079. overflow: hidden;
  24080. width: 55%;
  24081. margin-left: 10px;
  24082. cursor: pointer;
  24083. margin-top: 2px;
  24084. align-items: center;
  24085. }
  24086. .chapter_upload_l_i2,
  24087. .chapter_upload_l_i3,
  24088. .chapter_upload_l_i8,
  24089. .chapter_upload_l_i6,
  24090. .chapter_upload_l_i12,
  24091. .chapter_upload_l_i14,
  24092. .chapter_upload_l_i13 {
  24093. width: 15px;
  24094. height: 15px;
  24095. background-size: 100% 100%;
  24096. }
  24097. .chapter_upload_l_i2 {
  24098. background-image: url("../../../assets/icon/new/u_word.png");
  24099. }
  24100. .chapter_upload_l_i3 {
  24101. background-image: url("../../../assets/icon/new/u_video.png");
  24102. }
  24103. .chapter_upload_l_i8 {
  24104. background-image: url("../../../assets/icon/new/u_url.png");
  24105. }
  24106. .chapter_upload_l_i14 {
  24107. background-image: url("../../../assets/icon/new/u_source.png");
  24108. }
  24109. .chapter_upload_l_i6 {
  24110. background-image: url("../../../assets/icon/new/u_picture.png");
  24111. }
  24112. .chapter_upload_l_i12 {
  24113. background-image: url("../../../assets/icon/new/u_word.png");
  24114. }
  24115. .chapter_upload_l_i13 {
  24116. background-image: url("../../../assets/icon/new/u_img.png");
  24117. }
  24118. .chapter_upload_noSee {
  24119. background-image: url("../../../assets/icon/new/u_noUpload.png");
  24120. width: 18px;
  24121. height: 18px;
  24122. background-size: 100% 100%;
  24123. display: block;
  24124. margin-right: 10px;
  24125. }
  24126. .chapter_upload_ud {
  24127. display: flex;
  24128. flex-direction: row;
  24129. justify-content: center;
  24130. margin: 0 10px 0 0;
  24131. }
  24132. .chapter_upload_ud>.chapter_upload_up {
  24133. margin-bottom: 0;
  24134. margin-right: 10px;
  24135. }
  24136. .chapter_upload_down,
  24137. .chapter_upload_up {
  24138. width: 20px;
  24139. height: 20px;
  24140. background: #e4eaf2;
  24141. cursor: pointer;
  24142. margin: 0 auto;
  24143. border-radius: 5px;
  24144. display: flex;
  24145. justify-content: center;
  24146. align-items: center;
  24147. }
  24148. .chapter_upload_up::after,
  24149. .chapter_upload_down::after {
  24150. content: "";
  24151. background-image: url("../../../assets/icon/new/downBtn.png");
  24152. width: 13px;
  24153. height: 13px;
  24154. background-size: 100% 100%;
  24155. display: block;
  24156. }
  24157. .chapter_upload_up::after {
  24158. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  24159. }
  24160. .chapter_upload_up {
  24161. margin-bottom: 5px;
  24162. }
  24163. .chapter_upload_ud2 {
  24164. display: flex;
  24165. flex-direction: row;
  24166. justify-content: center;
  24167. margin: 0 10px 0 0;
  24168. }
  24169. .chapter_upload_ud2>.chapter_upload_up2 {
  24170. margin-bottom: 0;
  24171. margin-right: 10px;
  24172. }
  24173. .chapter_upload_down2,
  24174. .chapter_upload_up2 {
  24175. cursor: pointer;
  24176. margin: 0 auto;
  24177. border-radius: 5px;
  24178. display: flex;
  24179. justify-content: center;
  24180. align-items: center;
  24181. color: #717c8d;
  24182. font-size: 14px;
  24183. }
  24184. .chapter_upload_up2 {
  24185. margin-right: 10px;
  24186. }
  24187. .chapter_upload_up2::before,
  24188. .chapter_upload_down2::before {
  24189. content: "";
  24190. background-image: url("../../../assets/icon/new/c_down.png");
  24191. width: 14px;
  24192. height: 14px;
  24193. background-size: 100% 100%;
  24194. display: block;
  24195. margin-right: 5px;
  24196. }
  24197. .chapter_upload_up2::before {
  24198. background-image: url("../../../assets/icon/new/c_up.png") !important;
  24199. }
  24200. .addWordStyle {
  24201. display: flex;
  24202. flex-direction: row;
  24203. justify-content: flex-start;
  24204. overflow-x: auto;
  24205. white-space: nowrap;
  24206. flex-wrap: wrap;
  24207. }
  24208. /* table 样式 */
  24209. .cont>>>table {
  24210. border-top: 1px solid #ccc;
  24211. border-left: 1px solid #ccc;
  24212. }
  24213. .cont>>>table td,
  24214. .cont>>>table th {
  24215. border-bottom: 1px solid #ccc;
  24216. border-right: 1px solid #ccc;
  24217. /* padding: 20px 5px; */
  24218. padding: 5px 10px;
  24219. max-width: 0px;
  24220. height: 30px;
  24221. vertical-align: baseline;
  24222. }
  24223. .cont>>>table th {
  24224. border-bottom: 2px solid #ccc;
  24225. text-align: center;
  24226. }
  24227. /* blockquote 样式 */
  24228. .cont>>>blockquote {
  24229. display: block;
  24230. border-left: 8px solid #d0e5f2;
  24231. padding: 5px 10px;
  24232. margin: 10px 0;
  24233. line-height: 1.4;
  24234. font-size: 100%;
  24235. background-color: #f1f1f1;
  24236. }
  24237. /* code 样式 */
  24238. .cont>>>code {
  24239. display: inline-block;
  24240. /* *display: inline; */
  24241. zoom: 1;
  24242. background-color: #f1f1f1;
  24243. border-radius: 3px;
  24244. padding: 3px 5px;
  24245. margin: 0 3px;
  24246. }
  24247. .cont>>>pre code {
  24248. display: block;
  24249. }
  24250. /* ul ol 样式 */
  24251. .cont>>>ul,
  24252. ol {
  24253. margin: 10px 0 10px 20px;
  24254. }
  24255. .wordbox {
  24256. display: flex;
  24257. flex-wrap: wrap;
  24258. cursor: pointer;
  24259. width: 100%;
  24260. }
  24261. .checkword {
  24262. width: 22px;
  24263. height: 22px;
  24264. margin: 10px auto 0;
  24265. cursor: pointer;
  24266. }
  24267. .checkword img {
  24268. width: 100%;
  24269. }
  24270. .stepBg {
  24271. display: flex;
  24272. justify-content: space-between;
  24273. align-items: center;
  24274. background: #fff;
  24275. width: calc(100%);
  24276. margin: 0 auto;
  24277. }
  24278. .stepBorder {
  24279. height: 3px !important;
  24280. background: #cad1dc;
  24281. width: 100px !important;
  24282. margin: 0 15px !important;
  24283. position: relative;
  24284. }
  24285. .border-active {
  24286. background: #3681fc !important;
  24287. }
  24288. .border-active::before,
  24289. .border-active::after {
  24290. border-color: #3681fc !important;
  24291. }
  24292. .stepBorder::before,
  24293. .stepBorder::after {
  24294. content: "";
  24295. width: 9px;
  24296. height: 9px;
  24297. background: #ffffff;
  24298. opacity: 1;
  24299. border: 2px solid #acb4bf;
  24300. display: block;
  24301. box-sizing: border-box;
  24302. border-radius: 50%;
  24303. position: absolute;
  24304. top: 50%;
  24305. transform: translateY(-50%);
  24306. }
  24307. .stepBorder::after {
  24308. right: -9px;
  24309. }
  24310. .stepTop {
  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: 80px;
  24320. border-bottom: 2px solid rgb(228, 232, 237);
  24321. box-sizing: border-box;
  24322. }
  24323. .stepTop2 {
  24324. width: 100%;
  24325. /* border-radius: 10px; */
  24326. display: flex;
  24327. justify-content: center;
  24328. align-items: center;
  24329. flex-wrap: nowrap;
  24330. background: #fff;
  24331. /* top: 18%; */
  24332. height: 20px;
  24333. border-bottom: 2px solid rgb(228, 232, 237);
  24334. box-sizing: border-box;
  24335. overflow: hidden;
  24336. cursor: pointer;
  24337. }
  24338. .stepTop>div img {
  24339. width: 100%;
  24340. }
  24341. .stepTop>div {
  24342. height: 50px;
  24343. width: 180px;
  24344. cursor: pointer;
  24345. margin: 10px 0;
  24346. border-radius: 10px;
  24347. }
  24348. .first,
  24349. .second,
  24350. .third,
  24351. .four {
  24352. background: #3681fc;
  24353. height: 90px;
  24354. color: #fff;
  24355. display: flex;
  24356. flex-direction: row;
  24357. align-items: center;
  24358. justify-content: center;
  24359. }
  24360. .first>div:nth-child(1),
  24361. .second>div:nth-child(1),
  24362. .third>div:nth-child(1),
  24363. .four>div:nth-child(1) {
  24364. margin: 5px 10px 0 0;
  24365. width: 2rem;
  24366. }
  24367. .firstNo,
  24368. .secondNo,
  24369. .thirdNo,
  24370. .fourNo {
  24371. background: #e7e7e7;
  24372. color: #adadad;
  24373. display: flex;
  24374. flex-direction: row;
  24375. align-items: center;
  24376. justify-content: center;
  24377. }
  24378. .firstNo>div:nth-child(1),
  24379. .secondNo>div:nth-child(1),
  24380. .thirdNo>div:nth-child(1),
  24381. .fourNo>div:nth-child(1) {
  24382. margin: 5px 10px 0 0;
  24383. width: 2rem;
  24384. }
  24385. .uploadWidth>>>.el-upload {
  24386. width: 60px;
  24387. height: 60px;
  24388. position: relative;
  24389. }
  24390. .addPeople {
  24391. background: #fa6060;
  24392. width: 150px;
  24393. height: 40px;
  24394. color: #fff;
  24395. border-radius: 5px;
  24396. text-align: center;
  24397. line-height: 40px;
  24398. font-size: 14px;
  24399. cursor: pointer;
  24400. }
  24401. .kcImg {
  24402. width: 60px;
  24403. margin-left: 10px;
  24404. }
  24405. .zyImg {
  24406. width: 55px;
  24407. margin: 0 10px;
  24408. }
  24409. .deleteZy {
  24410. width: 20px;
  24411. position: absolute;
  24412. top: 5px;
  24413. right: 5px;
  24414. cursor: pointer;
  24415. }
  24416. .kcImg>img,
  24417. .zyImg>img,
  24418. .deleteZy>img {
  24419. width: 100%;
  24420. height: 100%;
  24421. }
  24422. .zyBox {
  24423. display: flex;
  24424. flex-direction: row;
  24425. align-items: center;
  24426. background: #67d37d;
  24427. color: #fff;
  24428. width: 210px;
  24429. margin: 20px 20px 0 0;
  24430. border-radius: 10px;
  24431. height: 70px;
  24432. position: relative;
  24433. }
  24434. .upCss {
  24435. display: flex;
  24436. flex-direction: row;
  24437. justify-content: flex-start;
  24438. }
  24439. .upCss>>>.el-icon-plus {
  24440. position: none !important;
  24441. width: 200px;
  24442. height: 100px;
  24443. display: flex;
  24444. flex-wrap: nowrap;
  24445. flex-direction: column;
  24446. align-items: center;
  24447. justify-content: center;
  24448. border: 1px dashed #ccc;
  24449. min-width: 78px;
  24450. min-height: 100px;
  24451. z-index: 999;
  24452. }
  24453. .upCss>>>.el-upload-list__item-name {
  24454. width: 100px;
  24455. white-space: nowrap;
  24456. overflow: hidden;
  24457. text-overflow: ellipsis;
  24458. }
  24459. .upCss>>>.el-upload-list__item .el-icon-close {
  24460. font-size: 20px;
  24461. z-index: 9999;
  24462. }
  24463. .addStageImg {
  24464. min-width: 20px;
  24465. min-height: 20px;
  24466. width: 20px;
  24467. height: 20px;
  24468. cursor: pointer;
  24469. }
  24470. .addHW {
  24471. width: 28px;
  24472. height: 28px;
  24473. cursor: pointer;
  24474. }
  24475. .addStageImg>img,
  24476. .addHW>img {
  24477. width: 100%;
  24478. height: 100%;
  24479. }
  24480. .addNewPP>>>.el-dialog__body {
  24481. padding: 5px 20px;
  24482. }
  24483. .addNewPP>>>.el-dialog {
  24484. margin-top: 5vh !important;
  24485. }
  24486. .addNewPP2>>>.el-dialog__body {
  24487. padding: 5px 0;
  24488. }
  24489. .addNewPP2>>>.el-dialog {
  24490. margin-top: 5vh !important;
  24491. }
  24492. .isHeight {
  24493. height: 680px;
  24494. }
  24495. .toolChoose {
  24496. display: flex;
  24497. /* width: 100%; */
  24498. flex-direction: row;
  24499. flex-wrap: wrap;
  24500. }
  24501. .tool,
  24502. .isToolChoose {
  24503. display: flex;
  24504. flex-direction: column;
  24505. flex-wrap: nowrap;
  24506. width: fit-content;
  24507. margin: 10px 0 10px 0;
  24508. align-items: center;
  24509. border: 2px solid #dbdbdb00;
  24510. padding: 10px 20px;
  24511. border-radius: 5px;
  24512. cursor: pointer;
  24513. /* box-shadow: 0 0 2px 0px #dedede; */
  24514. position: relative;
  24515. box-sizing: border-box;
  24516. }
  24517. .tool:hover {
  24518. border: 2px solid #a5c7ff;
  24519. }
  24520. .tool:hover>.noCTool {
  24521. display: block;
  24522. opacity: 0.5;
  24523. }
  24524. .isToolChoose {
  24525. border: 2px solid #438aff !important;
  24526. box-shadow: 0 0 2px 0px #438aff;
  24527. opacity: 1 !important;
  24528. }
  24529. .isCTool,
  24530. .noCTool {
  24531. width: 30px;
  24532. height: 30px;
  24533. position: absolute;
  24534. top: -4px;
  24535. right: -4px;
  24536. }
  24537. .noCTool {
  24538. display: none;
  24539. }
  24540. .isCTool>img,
  24541. .noCTool>img {
  24542. width: 100%;
  24543. height: 100%;
  24544. }
  24545. .tool+.tool {
  24546. margin-right: 10px;
  24547. }
  24548. .whiteBIcon {
  24549. width: 80px;
  24550. cursor: pointer;
  24551. display: flex;
  24552. flex-direction: column;
  24553. flex-wrap: nowrap;
  24554. align-items: center;
  24555. font-size: 14px;
  24556. }
  24557. .whiteBIcon>img,
  24558. .toolIcon>img,
  24559. .arrow>img {
  24560. width: 100%;
  24561. height: 100%;
  24562. }
  24563. .check img {
  24564. width: 20px;
  24565. height: 20px;
  24566. }
  24567. .whiteBIcon>img {
  24568. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  24569. border-radius: 15px;
  24570. }
  24571. .whiteBIcon>div:nth-child(2) {
  24572. height: 20px;
  24573. line-height: 20px;
  24574. }
  24575. .check {
  24576. /* width: 20px;
  24577. height: 20px; */
  24578. cursor: pointer;
  24579. margin: 10px 0 0;
  24580. }
  24581. .checkDiv {
  24582. display: flex;
  24583. align-items: center;
  24584. }
  24585. .checkDiv span {
  24586. margin-left: 5px;
  24587. color: #858585;
  24588. }
  24589. .customWidth>>>.el-dialog {
  24590. min-width: 600px !important;
  24591. }
  24592. .CollaborativeCss {
  24593. width: 100%;
  24594. display: flex;
  24595. justify-content: center;
  24596. align-items: center;
  24597. box-sizing: border-box;
  24598. padding: 10px 0;
  24599. cursor: pointer;
  24600. }
  24601. .CollaborativeCss >>> .el-tooltip {
  24602. overflow: hidden;
  24603. white-space: nowrap;
  24604. text-overflow: ellipsis;
  24605. }
  24606. .CollaborativeCss2 {
  24607. background: #e0eafb;
  24608. color: #3681fc;
  24609. font-weight: 700;
  24610. border-radius: 5px;
  24611. }
  24612. .a_addBox {
  24613. margin: 10px 0;
  24614. background: #fff;
  24615. padding: 15px;
  24616. /* max-height: 600px; */
  24617. overflow: auto;
  24618. }
  24619. .a_add_box {
  24620. border-bottom: 2px solid #eee;
  24621. padding-bottom: 25px;
  24622. }
  24623. .a_add_head {
  24624. display: flex;
  24625. align-items: center;
  24626. justify-content: space-between;
  24627. margin: 10px 0 0 0;
  24628. font-size: 18px;
  24629. }
  24630. .a_add_checkType {
  24631. margin-top: 10px;
  24632. display: flex;
  24633. font-size: 14px;
  24634. align-items: center;
  24635. }
  24636. .a_add_checkType span {
  24637. box-sizing: border-box;
  24638. padding: 0 0 5px 0;
  24639. cursor: pointer;
  24640. }
  24641. .a_add_checkType span+span {
  24642. margin-left: 10px;
  24643. }
  24644. .a_add_checkType .active {
  24645. border-bottom: 2px solid #409eff;
  24646. color: #409eff;
  24647. }
  24648. .a_add_head .a_add_head_input {
  24649. /* width: 540px; */
  24650. width: 100%;
  24651. }
  24652. .a_add_head .a_add_head_div {
  24653. display: flex;
  24654. align-items: center;
  24655. justify-content: space-between;
  24656. }
  24657. .a_add_body {
  24658. display: flex;
  24659. /* align-items: center; */
  24660. align-items: flex-end;
  24661. }
  24662. .a_add_input {
  24663. display: flex;
  24664. align-items: center;
  24665. flex-wrap: wrap;
  24666. }
  24667. .a_add_input_choice {
  24668. flex-direction: column;
  24669. margin-right: 10px;
  24670. }
  24671. .a_add_input_choice>>>.el-radio {
  24672. display: flex;
  24673. align-items: center;
  24674. flex-direction: row-reverse;
  24675. margin: 30px 0 0 0;
  24676. position: relative;
  24677. }
  24678. .a_add_input_choice>>>.el-checkbox {
  24679. display: flex;
  24680. align-items: center;
  24681. flex-direction: row-reverse;
  24682. margin: 30px 0 0 0;
  24683. position: relative;
  24684. }
  24685. .width100 {
  24686. width: 100%;
  24687. }
  24688. .a_add_input .a_add_persent {
  24689. width: 100%;
  24690. }
  24691. .a_add_persent_div {
  24692. width: 100%;
  24693. display: flex;
  24694. align-items: center;
  24695. }
  24696. .a_add_persent_div span {
  24697. margin: 5px 0;
  24698. }
  24699. .a_add_persent_div span:nth-child(1) {
  24700. width: 30%;
  24701. }
  24702. .a_add_persent_div span:nth-child(2) {
  24703. width: 7%;
  24704. }
  24705. .a_add_persent_div span:nth-child(3) {
  24706. width: 40%;
  24707. }
  24708. .a_add_body_div {
  24709. display: flex;
  24710. align-items: center;
  24711. justify-content: center;
  24712. /* flex-direction: column; */
  24713. position: absolute;
  24714. right: -20px;
  24715. transform: translateX(100%);
  24716. }
  24717. .a_add_body_div>>>.el-button--primary {
  24718. background: #466b99;
  24719. border: none;
  24720. }
  24721. .all_choose {
  24722. display: flex;
  24723. flex-direction: row;
  24724. align-items: flex-start;
  24725. width: 100%;
  24726. }
  24727. .all_choose+.all_choose {
  24728. /* margin-top: 10px */
  24729. }
  24730. .all_choose>span {
  24731. min-width: fit-content;
  24732. display: block;
  24733. white-space: nowrap;
  24734. overflow: hidden;
  24735. text-overflow: ellipsis;
  24736. margin-right: 20px;
  24737. font-weight: bold;
  24738. font-size: 14px;
  24739. }
  24740. .all_choose>>>.el-checkbox-group {
  24741. display: flex;
  24742. flex-direction: row;
  24743. width: 100%;
  24744. flex-wrap: wrap;
  24745. align-content: center;
  24746. justify-content: flex-start;
  24747. align-items: center;
  24748. margin-top: 3px;
  24749. }
  24750. .all_choose>.el-checkbox-group>>>.el-checkbox {
  24751. margin-bottom: 10px;
  24752. display: flex;
  24753. flex-direction: row;
  24754. align-items: center;
  24755. margin-right: 10px;
  24756. }
  24757. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  24758. min-width: 80px;
  24759. overflow: hidden;
  24760. width: 80px;
  24761. text-overflow: ellipsis;
  24762. white-space: nowrap;
  24763. }
  24764. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  24765. width: auto;
  24766. }
  24767. .choose>div:nth-child(3)>span {
  24768. /* letter-spacing: 0 !important; */
  24769. }
  24770. .choose {
  24771. display: flex;
  24772. flex-direction: column;
  24773. flex-wrap: nowrap;
  24774. height: 100%;
  24775. justify-content: space-evenly;
  24776. align-items: flex-start;
  24777. }
  24778. .both {
  24779. display: flex;
  24780. flex-direction: row;
  24781. flex-wrap: wrap;
  24782. width: 100%;
  24783. align-items: center;
  24784. justify-content: flex-start;
  24785. margin: 15px 0;
  24786. }
  24787. .notice>>>.el-dialog {
  24788. width: 500px !important;
  24789. text-align: center;
  24790. }
  24791. .notice>>>.el-button {
  24792. margin-top: 20px;
  24793. }
  24794. .whiteBg {
  24795. /* background: #fff; */
  24796. border-radius: 10px;
  24797. }
  24798. .wb_j_box {
  24799. display: flex;
  24800. width: 100%;
  24801. padding: 0 20px 0;
  24802. box-sizing: border-box;
  24803. }
  24804. .wb_j_box_content {
  24805. width: calc(100% - 55% - 100px);
  24806. display: flex;
  24807. align-items: center;
  24808. }
  24809. .wb_j_box_p_box {
  24810. max-width: calc(100% - 200px);
  24811. word-break: break-all;
  24812. overflow: hidden;
  24813. margin: 0 0 0 10px;
  24814. font-size: 14px;
  24815. color: #6e6e6e;
  24816. z-index: 999;
  24817. }
  24818. .chooseWho {
  24819. display: flex;
  24820. width: 410px;
  24821. flex-direction: row;
  24822. flex-wrap: nowrap;
  24823. justify-content: space-between;
  24824. padding-bottom: 10px;
  24825. }
  24826. .chooseWho>div {
  24827. cursor: pointer;
  24828. padding-bottom: 10px;
  24829. font-weight: bold;
  24830. }
  24831. .isChooseActive {
  24832. color: #3e88f4;
  24833. border-bottom: 2px solid #2f80f3;
  24834. }
  24835. .toolSort {
  24836. display: flex;
  24837. flex-direction: row;
  24838. flex-wrap: wrap;
  24839. justify-content: flex-start;
  24840. align-items: flex-start;
  24841. }
  24842. .toolSort>div {
  24843. margin-right: 10px;
  24844. }
  24845. .tools {
  24846. width: 100%;
  24847. display: flex;
  24848. flex-direction: column;
  24849. flex-wrap: nowrap;
  24850. align-items: flex-start;
  24851. }
  24852. .leftTools,
  24853. .rightTools {
  24854. width: 50%;
  24855. }
  24856. .leftTools+.leftTools {
  24857. border-top: 1px solid #dbdbdb;
  24858. padding-top: 30px;
  24859. }
  24860. .rightTools {
  24861. display: flex;
  24862. flex-direction: row;
  24863. flex-wrap: nowrap;
  24864. justify-content: space-around;
  24865. }
  24866. .firstToolList {
  24867. display: flex;
  24868. flex-direction: column;
  24869. flex-wrap: nowrap;
  24870. align-items: center;
  24871. }
  24872. .iconList {
  24873. display: flex;
  24874. flex-direction: row;
  24875. flex-wrap: wrap;
  24876. justify-content: flex-start;
  24877. align-items: center;
  24878. margin: 20px 0 5px 0;
  24879. width: 240px;
  24880. min-width: 240px;
  24881. }
  24882. .iconTool {
  24883. display: flex;
  24884. flex-direction: column;
  24885. flex-wrap: nowrap;
  24886. align-items: center;
  24887. justify-content: flex-start;
  24888. margin: 15px 10px;
  24889. }
  24890. .toolIcon {
  24891. width: 50px;
  24892. }
  24893. .taskBorder {
  24894. /* border: 1px solid #CAD1DC; */
  24895. border-radius: 10px;
  24896. margin-top: 10px;
  24897. min-height: 670px;
  24898. position: relative;
  24899. background: #fff;
  24900. padding: 20px;
  24901. overflow: hidden;
  24902. box-sizing: border-box;
  24903. }
  24904. .smallTaskBorder {
  24905. height: 405px;
  24906. min-height: 405px !important;
  24907. overflow: hidden;
  24908. }
  24909. /* .taskBorder>div {
  24910. padding: 30px 30px 10px;
  24911. } */
  24912. .addTaskBorder {
  24913. /* border: 2px solid #5E9AFC; */
  24914. border-radius: 8px;
  24915. margin-top: 10px;
  24916. cursor: pointer;
  24917. /* height: 50px;
  24918. line-height: 50px; */
  24919. background: #fff;
  24920. padding: 15px 0;
  24921. display: flex;
  24922. align-items: center;
  24923. justify-content: center;
  24924. }
  24925. /* .addTaskBorder>div {
  24926. margin: 0 auto;
  24927. display: flex;
  24928. align-items: center;
  24929. justify-content: center;
  24930. }
  24931. .addTaskBorder>div>img {
  24932. width: 20px;
  24933. }
  24934. .addTaskBorder>div>span {
  24935. font-size: 16px;
  24936. margin-left: 10px;
  24937. color: #5E9AFC;
  24938. } */
  24939. .funBlock {
  24940. display: flex;
  24941. padding: 15px 0;
  24942. flex-direction: row;
  24943. justify-content: center;
  24944. align-items: center;
  24945. position: absolute;
  24946. right: 0;
  24947. bottom: 0;
  24948. background: #fff;
  24949. width: 100%;
  24950. height: 60px;
  24951. z-index: 9;
  24952. }
  24953. .fold {
  24954. display: flex;
  24955. margin: 0 20px;
  24956. flex-direction: row;
  24957. align-items: center;
  24958. cursor: pointer;
  24959. color: #2b7bff;
  24960. }
  24961. .arrow {
  24962. margin-right: 8px;
  24963. width: 16px;
  24964. height: 16px;
  24965. min-width: 16px;
  24966. min-height: 16px;
  24967. background-size: 100% 100%;
  24968. display: block;
  24969. background-image: url(../../../assets/icon/new/u_up.png);
  24970. /* border-left: 7px solid transparent;
  24971. border-bottom: 7px solid #717C8D;
  24972. border-top: 0px solid transparent;
  24973. border-right: 7px solid transparent; */
  24974. /* box-sizing: border-box; */
  24975. transition: all 0.3s;
  24976. }
  24977. .arrowZ {
  24978. transform: rotate(180deg);
  24979. }
  24980. .addToolFun {
  24981. display: flex;
  24982. width: 150px;
  24983. flex-direction: row;
  24984. align-items: center;
  24985. justify-content: center;
  24986. border: 2px dashed #cad1dc;
  24987. border-radius: 5px;
  24988. height: 50px;
  24989. margin: 35px auto 0;
  24990. cursor: pointer;
  24991. }
  24992. .addToolFun2 {
  24993. display: flex;
  24994. width: 150px;
  24995. border: 2px dashed #cad1dc;
  24996. flex-direction: row;
  24997. align-items: center;
  24998. justify-content: center;
  24999. border-radius: 5px;
  25000. height: 50px;
  25001. margin: 0 auto 0;
  25002. cursor: pointer;
  25003. }
  25004. .addToolFun2>div,
  25005. .addToolFun>div {
  25006. display: flex;
  25007. line-height: 50px;
  25008. }
  25009. .addToolImg {
  25010. width: 20px;
  25011. height: 20px;
  25012. margin-right: 10px;
  25013. }
  25014. .addToolsDia>>>.el-dialog__body {
  25015. padding: 20px;
  25016. }
  25017. .addToolsDia>>>.el-dialog__body>.toolChoose {
  25018. padding: 0;
  25019. }
  25020. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  25021. padding: 0;
  25022. border-bottom: none;
  25023. margin-bottom: 0;
  25024. }
  25025. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  25026. width: 100%;
  25027. }
  25028. .lineCss>>>.el-form-item__label {
  25029. width: auto !important;
  25030. }
  25031. .lineCss>>>.el-form-item__content {
  25032. margin-left: 50px !important;
  25033. }
  25034. .newSteps {
  25035. display: flex;
  25036. width: 100% !important;
  25037. /* height: 80px; */
  25038. cursor: pointer;
  25039. margin: 10px 0;
  25040. border-radius: 10px;
  25041. flex-direction: row;
  25042. align-content: center;
  25043. justify-content: center;
  25044. align-items: center;
  25045. margin: 0 !important;
  25046. }
  25047. /* 评价样式 */
  25048. .elist_css {
  25049. padding-bottom: 75px !important;
  25050. }
  25051. .elist_title {
  25052. margin-bottom: 10px;
  25053. }
  25054. .elist_input {
  25055. width: 100%;
  25056. }
  25057. .elist_input_box {
  25058. display: flex;
  25059. align-items: center;
  25060. flex-wrap: wrap;
  25061. }
  25062. .elist_input_box+.elist_input_box {
  25063. margin-top: 30px;
  25064. }
  25065. .elist_input .elist_input_box input {
  25066. font: inherit;
  25067. color: currentColor;
  25068. width: 100%;
  25069. /* max-width: calc(100% - 385px); */
  25070. max-width: calc(100% - 150px);
  25071. padding: 8px 14px;
  25072. display: block;
  25073. min-width: 0;
  25074. outline: none;
  25075. border: 1px solid rgba(0, 0, 0, 0.23);
  25076. border-radius: 4px;
  25077. box-sizing: border-box;
  25078. background: #fff;
  25079. margin: 0 20px 0 0;
  25080. }
  25081. .elist_input .elist_input_box span {
  25082. height: 36px;
  25083. line-height: 36px;
  25084. color: rgb(82, 82, 82);
  25085. min-width: 80px;
  25086. }
  25087. .elist_input .elist_input_box .remove {
  25088. height: 20px;
  25089. width: 20px;
  25090. min-height: 20px;
  25091. min-width: 20px;
  25092. background-size: 100% 100%;
  25093. background-position: unset;
  25094. margin-left: 5px;
  25095. }
  25096. .elist_input_box>>>.el-rate {
  25097. display: flex;
  25098. height: 36px;
  25099. align-items: center;
  25100. }
  25101. .elist_input_box .elist_inptu_text {
  25102. width: 100%;
  25103. display: flex;
  25104. align-items: center;
  25105. margin-top: 10px;
  25106. }
  25107. .elist_input_box .elist_inptu_text input {
  25108. /* width: 500px; */
  25109. width: 100%;
  25110. max-width: unset;
  25111. }
  25112. .elist_input_box>>>.el-rate__icon {
  25113. font-size: 24px;
  25114. }
  25115. .elist_btn {
  25116. margin-top: 10px;
  25117. }
  25118. .lineTitle {
  25119. /* margin-top: 15px; */
  25120. width: 110px;
  25121. font-size: 16px;
  25122. display: flex;
  25123. align-items: center;
  25124. line-height: 20px;
  25125. }
  25126. .lineTitle::before {
  25127. content: "";
  25128. display: block;
  25129. width: 3px;
  25130. height: 20px;
  25131. background: #0061ff;
  25132. border-radius: 3px;
  25133. margin: 0 5px 0 0;
  25134. }
  25135. .clineTitle::before {
  25136. content: "";
  25137. display: block;
  25138. min-width: 10px;
  25139. width: 10px;
  25140. height: 10px;
  25141. background: #0061ff;
  25142. border-radius: 50%;
  25143. margin: 0 5px 0 0;
  25144. }
  25145. .courseTop {
  25146. display: flex;
  25147. flex-direction: row;
  25148. justify-content: space-between;
  25149. align-items: center;
  25150. width: calc(100% - 40px);
  25151. margin: 0 auto;
  25152. padding: 10px 0;
  25153. }
  25154. .stepsNav {
  25155. display: flex;
  25156. flex-direction: row;
  25157. justify-content: flex-start;
  25158. align-items: center;
  25159. }
  25160. .stepsWord {
  25161. font-size: 18px;
  25162. color: #fff;
  25163. font-weight: bold;
  25164. margin-left: auto;
  25165. background: rgb(15, 126, 255);
  25166. border-radius: 5px;
  25167. padding: 3px 25px;
  25168. box-sizing: border-box;
  25169. }
  25170. .stepBox {
  25171. width: calc(100% - 40px);
  25172. height: calc(100% - 50px);
  25173. overflow: hidden;
  25174. border-radius: 5px;
  25175. margin: 0 auto;
  25176. }
  25177. .rightBox {
  25178. width: calc(100%);
  25179. background: #f0f2f5;
  25180. /* border-radius: 10px; */
  25181. overflow: auto;
  25182. height: calc(100% - 150px);
  25183. margin: 0 auto;
  25184. position: relative;
  25185. box-sizing: border-box;
  25186. }
  25187. .e_add_top {
  25188. display: flex;
  25189. justify-content: space-between;
  25190. background: #fff;
  25191. position: absolute;
  25192. right: 20px;
  25193. height: 50px;
  25194. align-items: center;
  25195. }
  25196. .e_add_title2 {
  25197. display: flex;
  25198. align-items: center;
  25199. }
  25200. .e_add_title2 span {
  25201. width: 40px;
  25202. }
  25203. .e_add_title {
  25204. display: flex;
  25205. align-items: center;
  25206. color: #b8b8b8;
  25207. font-size: 18px;
  25208. position: relative;
  25209. height: 40px;
  25210. }
  25211. .e_add_title span {
  25212. margin-right: 10px;
  25213. }
  25214. .e_add_title .el_input {
  25215. width: 300px;
  25216. }
  25217. .e_add_title>>>.el-input__inner {
  25218. width: 400px;
  25219. }
  25220. .e_add_btn {}
  25221. .e_add_content {
  25222. display: flex;
  25223. width: 100%;
  25224. }
  25225. .e_add_list {
  25226. background: #fff;
  25227. height: 500px;
  25228. width: 210px;
  25229. position: relative;
  25230. margin: 15px 5px 0 0;
  25231. flex-shrink: 0;
  25232. display: flex;
  25233. flex-direction: column;
  25234. }
  25235. .e_add_list_title {
  25236. font-size: 20px;
  25237. width: 100%;
  25238. box-sizing: border-box;
  25239. padding: 15px 40px;
  25240. text-align: center;
  25241. border-bottom: 1px solid #eaeaea;
  25242. position: relative;
  25243. display: flex;
  25244. align-items: center;
  25245. justify-content: center;
  25246. height: 57px;
  25247. background: #f6f6f6;
  25248. }
  25249. .e_add_list_title span {
  25250. overflow: hidden;
  25251. white-space: nowrap;
  25252. text-overflow: ellipsis;
  25253. }
  25254. .e_add_list_title img {
  25255. position: absolute;
  25256. right: 15px;
  25257. width: 25px;
  25258. cursor: pointer;
  25259. top: 50%;
  25260. transform: translateY(-50%);
  25261. }
  25262. .e_add_list_body {
  25263. height: calc(100% - 187px);
  25264. overflow: auto;
  25265. }
  25266. .e_add_list_child {
  25267. width: 100%;
  25268. display: flex;
  25269. align-items: center;
  25270. justify-content: center;
  25271. position: relative;
  25272. box-sizing: border-box;
  25273. padding: 15px 40px;
  25274. text-align: center;
  25275. }
  25276. .e_add_list_child span {
  25277. overflow: hidden;
  25278. white-space: nowrap;
  25279. text-overflow: ellipsis;
  25280. cursor: pointer;
  25281. }
  25282. .e_add_list_child img {
  25283. position: absolute;
  25284. right: 10px;
  25285. width: 21px;
  25286. cursor: pointer;
  25287. top: 50%;
  25288. transform: translateY(-50%);
  25289. }
  25290. .e_add_list_child+.e_add_list_child {
  25291. border-top: 1px solid #eaeaea;
  25292. }
  25293. .e_add_list_child .active {
  25294. color: #409eff;
  25295. }
  25296. .e_add_list_btn {
  25297. position: absolute;
  25298. bottom: 0;
  25299. height: 50px;
  25300. background: rgb(120, 120, 254);
  25301. width: 100%;
  25302. color: #fff;
  25303. font-size: 16px;
  25304. text-align: center;
  25305. line-height: 50px;
  25306. cursor: pointer;
  25307. }
  25308. .e_add_list_detail {
  25309. position: absolute;
  25310. bottom: 0;
  25311. height: 130px;
  25312. background: rgb(120, 120, 254);
  25313. width: 100%;
  25314. color: #fff;
  25315. font-size: 16px;
  25316. display: flex;
  25317. align-items: center;
  25318. justify-content: center;
  25319. }
  25320. .e_add_list_detail textarea {
  25321. height: 90%;
  25322. width: 95%;
  25323. border: none;
  25324. resize: none;
  25325. outline: none;
  25326. padding: 5px;
  25327. box-sizing: border-box;
  25328. }
  25329. .e_add_list_pbox {
  25330. width: 100%;
  25331. }
  25332. .e_add_list_pbox_title {
  25333. height: 50px;
  25334. background: #fff;
  25335. display: flex;
  25336. align-items: center;
  25337. width: 100%;
  25338. box-sizing: border-box;
  25339. padding: 0 20px;
  25340. flex-direction: row;
  25341. flex-wrap: wrap;
  25342. }
  25343. .type_title {
  25344. font-size: 18px;
  25345. font-weight: 700;
  25346. }
  25347. .type_content {
  25348. font-size: 16px;
  25349. margin-left: 30px;
  25350. }
  25351. .type_content span+span {
  25352. margin-left: 20px;
  25353. }
  25354. .type_content span {
  25355. cursor: pointer;
  25356. padding-bottom: 5px;
  25357. box-sizing: border-box;
  25358. }
  25359. .type_content .active {
  25360. color: #409eff;
  25361. border-bottom: 2px solid #409eff;
  25362. }
  25363. .e_add_list_pbox_content {
  25364. height: calc(100% - 50px);
  25365. display: flex;
  25366. align-items: center;
  25367. width: 100%;
  25368. background: #fff;
  25369. }
  25370. .mbCss {
  25371. width: 100%;
  25372. display: flex;
  25373. flex-direction: row;
  25374. flex-wrap: nowrap;
  25375. align-content: center;
  25376. align-items: flex-start;
  25377. justify-content: flex-start;
  25378. }
  25379. .pjCss {
  25380. /* width: 42%; */
  25381. width: calc(100% - 55%);
  25382. display: flex;
  25383. flex-direction: column;
  25384. flex-wrap: nowrap;
  25385. align-items: flex-start;
  25386. }
  25387. .e_box {
  25388. /* display: flex; */
  25389. flex-wrap: wrap;
  25390. max-height: 500px;
  25391. align-items: flex-start;
  25392. overflow: auto;
  25393. width: 100%;
  25394. }
  25395. .e_card {
  25396. border: 1px solid #ccc;
  25397. background: #fff;
  25398. margin-right: 20px;
  25399. width: 270px;
  25400. display: flex;
  25401. flex-direction: column;
  25402. align-items: center;
  25403. border-radius: 5px;
  25404. margin-top: 10px;
  25405. text-align: center;
  25406. }
  25407. .e_card_picture {
  25408. margin: 10px 0;
  25409. }
  25410. .e_card_picture>img {
  25411. width: 50px;
  25412. }
  25413. .e_card_name {
  25414. width: 100%;
  25415. padding: 0 10px;
  25416. box-sizing: border-box;
  25417. margin-bottom: 10px;
  25418. overflow: hidden;
  25419. text-overflow: ellipsis;
  25420. white-space: nowrap;
  25421. }
  25422. .e_card_time {
  25423. width: 100%;
  25424. padding: 0 10px;
  25425. box-sizing: border-box;
  25426. font-size: 15px;
  25427. color: #c3c3c3;
  25428. margin-bottom: 10px;
  25429. }
  25430. .e_card_btn {
  25431. height: 40px;
  25432. display: flex;
  25433. align-items: center;
  25434. width: 100%;
  25435. background: rgb(244, 244, 244);
  25436. }
  25437. .e_card_btn:hover {
  25438. background: rgb(221 221 221);
  25439. }
  25440. .e_card_btn span {
  25441. flex: 1 1 auto;
  25442. text-align: center;
  25443. cursor: pointer;
  25444. }
  25445. .addEva {
  25446. border: 1px solid #ccc;
  25447. background: #fff;
  25448. margin-right: 20px;
  25449. width: 270px;
  25450. height: 149px;
  25451. display: flex;
  25452. flex-direction: column;
  25453. align-items: center;
  25454. border-radius: 5px;
  25455. margin-top: 10px;
  25456. text-align: center;
  25457. cursor: pointer;
  25458. justify-content: center;
  25459. }
  25460. .addEva>img {
  25461. width: 50px;
  25462. object-fit: cover;
  25463. }
  25464. .uploadFm {
  25465. border: 1px dashed #ccc;
  25466. width: 100%;
  25467. height: 140px;
  25468. position: relative;
  25469. cursor: pointer;
  25470. display: flex;
  25471. flex-direction: column;
  25472. justify-content: center;
  25473. align-items: center;
  25474. font-size: 14px;
  25475. color: #6e6e6e;
  25476. position: relative;
  25477. }
  25478. .cover_p {
  25479. width: 100% !important;
  25480. height: 100%;
  25481. object-fit: cover;
  25482. }
  25483. .uploadFm2:hover .cover_mask {
  25484. display: flex !important;
  25485. }
  25486. .cover_mask {
  25487. display: none;
  25488. width: 100%;
  25489. height: 100%;
  25490. position: absolute;
  25491. background: #00000054;
  25492. align-items: center;
  25493. justify-content: center;
  25494. flex-direction: column;
  25495. }
  25496. .cover_mask>img {
  25497. width: 30px;
  25498. }
  25499. .cover_mask>span {
  25500. color: #fff;
  25501. font-size: 12px;
  25502. }
  25503. .uploadFm>img {
  25504. width: 50px;
  25505. }
  25506. .fileCss {
  25507. width: 100%;
  25508. display: flex;
  25509. flex-direction: row;
  25510. flex-wrap: nowrap;
  25511. justify-content: space-around;
  25512. align-items: center;
  25513. padding-top: 15px;
  25514. }
  25515. .fileCss>div {
  25516. display: flex;
  25517. flex-direction: column;
  25518. align-items: center;
  25519. }
  25520. .fileCss .spanName {
  25521. margin-top: 10px;
  25522. }
  25523. .sysPicBox {
  25524. display: flex;
  25525. flex-direction: row;
  25526. flex-wrap: wrap;
  25527. align-content: flex-start;
  25528. height: 435px;
  25529. overflow: auto;
  25530. position: relative;
  25531. }
  25532. .picNone {
  25533. position: absolute;
  25534. left: 50%;
  25535. top: 45%;
  25536. transform: translate(-50%, -50%);
  25537. width: fit-content;
  25538. color: #9c9c9c;
  25539. }
  25540. .sysPic {
  25541. width: 200px;
  25542. height: 115px;
  25543. margin: 0 20px 20px 0;
  25544. cursor: pointer;
  25545. }
  25546. .sysPic>img,
  25547. .isSysPic>img,
  25548. .deletePic>img {
  25549. width: 100%;
  25550. height: 100%;
  25551. object-fit: cover;
  25552. }
  25553. .isSysPic {
  25554. width: 200px;
  25555. height: 115px;
  25556. position: relative;
  25557. }
  25558. .deletePic {
  25559. width: 20px;
  25560. height: 20px;
  25561. position: absolute;
  25562. top: 0;
  25563. right: 0;
  25564. cursor: pointer;
  25565. }
  25566. .select_box1 {
  25567. height: 100%;
  25568. }
  25569. .select_box1_img {
  25570. background: #fff;
  25571. border-radius: 5px;
  25572. padding: 15px;
  25573. box-sizing: border-box;
  25574. margin-bottom: 20px;
  25575. }
  25576. .select_box1_title {
  25577. padding: 0 0 15px 0;
  25578. border-bottom: 1px solid #eee;
  25579. margin-bottom: 15px;
  25580. }
  25581. .select_box1_title span:nth-child(1) {
  25582. font-size: 16px;
  25583. margin-right: 20px;
  25584. color: #000;
  25585. }
  25586. .select_box1_title span:nth-child(2) {
  25587. font-size: 14px;
  25588. color: rgb(112, 112, 112);
  25589. }
  25590. .select_box1_add_img {}
  25591. .select_box1_select {
  25592. background: #fff;
  25593. border-radius: 5px;
  25594. padding: 15px;
  25595. box-sizing: border-box;
  25596. height: calc(100% - 200px);
  25597. overflow: auto;
  25598. }
  25599. .select_box2 {
  25600. height: 100%;
  25601. }
  25602. .select_box2_title {
  25603. background: #fff;
  25604. border-radius: 5px;
  25605. padding: 5px 10px;
  25606. box-sizing: border-box;
  25607. margin-bottom: 10px;
  25608. }
  25609. .select_box2_box {
  25610. display: flex;
  25611. height: calc(100% - 30px);
  25612. }
  25613. .select_box2_img {
  25614. width: calc(100% - 310px);
  25615. height: 100%;
  25616. overflow: auto;
  25617. background: #fff;
  25618. border-radius: 5px;
  25619. }
  25620. .select_box2_img img {
  25621. width: 100%;
  25622. }
  25623. .select_box2_answer {
  25624. background: #fff;
  25625. margin-left: 10px;
  25626. border-radius: 5px;
  25627. width: 300px;
  25628. overflow: auto;
  25629. height: 100%;
  25630. display: flex;
  25631. flex-direction: column;
  25632. align-items: center;
  25633. padding-top: 10px;
  25634. box-sizing: border-box;
  25635. }
  25636. .select_box2_answer_box {
  25637. margin: 0 0 10px 0;
  25638. width: 85%;
  25639. }
  25640. .rate_textarea {
  25641. font: inherit;
  25642. color: currentColor;
  25643. width: 100%;
  25644. padding: 8px 14px;
  25645. display: block;
  25646. min-width: 0;
  25647. outline: none;
  25648. border: 1px solid rgba(0, 0, 0, 0.23);
  25649. border-radius: 4px;
  25650. box-sizing: border-box;
  25651. background: #fff;
  25652. margin: 0 20px 0 0;
  25653. resize: none;
  25654. }
  25655. .select_answer_title {
  25656. text-align: left;
  25657. width: 85%;
  25658. margin-bottom: 10px;
  25659. font-size: 18px;
  25660. color: #8e8e8e;
  25661. }
  25662. .mask {
  25663. background-color: rgb(0 0 0 / 30%);
  25664. /* position: fixed; */
  25665. position: absolute;
  25666. top: 0;
  25667. left: 0;
  25668. width: 100%;
  25669. height: 100%;
  25670. z-index: 90;
  25671. display: flex;
  25672. align-items: center;
  25673. justify-content: center;
  25674. }
  25675. .progressBox {
  25676. width: 300px;
  25677. height: 150px;
  25678. background: #fff;
  25679. border-radius: 10px;
  25680. box-shadow: 0 0 6px 1px #bfbfbf;
  25681. display: flex;
  25682. align-items: center;
  25683. justify-content: center;
  25684. flex-direction: column;
  25685. position: relative;
  25686. color: #6c6c6c;
  25687. }
  25688. .progressBox>>>.el-progress-bar__outer {
  25689. background-color: #d1dfff !important;
  25690. }
  25691. .progressBox .lbox {
  25692. height: 50px;
  25693. font-size: 19px;
  25694. display: flex;
  25695. align-items: center;
  25696. color: #747474;
  25697. }
  25698. .progressBox .lbox img {
  25699. width: 40px;
  25700. margin-right: 20px;
  25701. }
  25702. .closeCss {
  25703. position: absolute;
  25704. top: 8px;
  25705. right: 8px;
  25706. cursor: pointer;
  25707. width: 20px;
  25708. height: 20px;
  25709. }
  25710. .closeCss>img {
  25711. width: 100%;
  25712. height: 100%;
  25713. }
  25714. .updateTips::before {
  25715. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  25716. font-size: 14px;
  25717. margin-left: 20px;
  25718. font-weight: 400;
  25719. color: #ff3a3a;
  25720. margin-bottom: 10px;
  25721. display: block;
  25722. }
  25723. .updateMask {
  25724. width: 100%;
  25725. z-index: 3;
  25726. top: 0;
  25727. position: absolute;
  25728. /* background-color: rgba(0,0,0,.3); */
  25729. }
  25730. .t_j_box {
  25731. display: flex;
  25732. }
  25733. .t_j_box span:nth-child(1) {
  25734. width: 15%;
  25735. overflow: hidden;
  25736. margin-right: 10px;
  25737. text-overflow: ellipsis;
  25738. white-space: nowrap;
  25739. }
  25740. .t_j_box span:nth-child(2) {
  25741. width: 30%;
  25742. overflow: hidden;
  25743. text-overflow: ellipsis;
  25744. margin-right: 10px;
  25745. }
  25746. .t_j_box span:nth-child(3) {
  25747. max-width: calc(55% - 20px);
  25748. overflow: hidden;
  25749. text-overflow: ellipsis;
  25750. }
  25751. .sentenBox {
  25752. background: #fff;
  25753. height: 600px;
  25754. overflow: auto;
  25755. background-image: url("../../../assets/icon/conSentences/csBg.png");
  25756. background-position: 102%;
  25757. background-repeat: no-repeat;
  25758. background-size: 60%;
  25759. }
  25760. .sentenBox>.sentenContent {
  25761. padding-bottom: 10px;
  25762. width: 97%;
  25763. margin: 0 auto;
  25764. }
  25765. .sentenBox>.sentenContent+.sentenContent {
  25766. border-top: 1px solid #cbcbcb;
  25767. }
  25768. .addSen {
  25769. background: #409efe;
  25770. width: 90px;
  25771. color: #fff;
  25772. height: 35px;
  25773. text-align: center;
  25774. line-height: 35px;
  25775. border-radius: 5px;
  25776. float: right;
  25777. margin: 10px 20px 0 0;
  25778. cursor: pointer;
  25779. }
  25780. .sentenTop {
  25781. display: flex;
  25782. flex-direction: row;
  25783. flex-wrap: nowrap;
  25784. align-items: center;
  25785. }
  25786. .sentenTop::before {
  25787. content: attr(index);
  25788. background: #3681fc;
  25789. border-radius: 50%;
  25790. color: #fff;
  25791. width: 25px;
  25792. height: 25px;
  25793. min-width: 25px;
  25794. min-height: 25px;
  25795. text-align: center;
  25796. line-height: 25px;
  25797. margin-right: 5px;
  25798. }
  25799. .sentenTop>div:nth-child(2) {
  25800. width: 300px;
  25801. margin: 0 15px;
  25802. }
  25803. .sentenTop>div:nth-child(3) {
  25804. background: #409efe;
  25805. color: #fff;
  25806. width: 65px;
  25807. height: 35px;
  25808. text-align: center;
  25809. line-height: 35px;
  25810. border-radius: 5px;
  25811. cursor: pointer;
  25812. }
  25813. .cardList {
  25814. padding: 30px 0 20px 0;
  25815. display: flex;
  25816. flex-direction: row;
  25817. flex-wrap: wrap;
  25818. align-items: center;
  25819. box-sizing: border-box;
  25820. border-bottom: 1px solid #f4f4f4;
  25821. width: 98%;
  25822. margin: 0 auto;
  25823. }
  25824. .rightCardList {
  25825. display: flex;
  25826. flex-wrap: wrap;
  25827. }
  25828. .cardBox {
  25829. display: flex;
  25830. flex-direction: row;
  25831. flex-wrap: wrap;
  25832. align-items: center;
  25833. align-content: center;
  25834. }
  25835. .isCard,
  25836. .isCard1 {
  25837. width: auto;
  25838. padding: 0 20px;
  25839. height: 65px;
  25840. text-align: center;
  25841. line-height: 65px;
  25842. font-size: 14px;
  25843. cursor: pointer;
  25844. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  25845. background-size: 100% 100%;
  25846. position: relative;
  25847. z-index: 99;
  25848. }
  25849. .isCard1 {
  25850. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  25851. }
  25852. .isCard:hover .deleteWord {
  25853. display: block;
  25854. }
  25855. .isCard>div:nth-child(1),
  25856. .isCard1>div:nth-child(1) {
  25857. white-space: nowrap;
  25858. overflow: hidden;
  25859. text-overflow: ellipsis;
  25860. width: 100%;
  25861. margin: 0 auto;
  25862. }
  25863. .card {
  25864. width: 140px;
  25865. height: 65px;
  25866. }
  25867. .card>img {
  25868. width: 100%;
  25869. height: 100%;
  25870. }
  25871. .rightCardBox {
  25872. width: 98%;
  25873. margin: 10px auto 0;
  25874. }
  25875. .rightCardBox>div:nth-child(1) {
  25876. margin-bottom: 10px;
  25877. }
  25878. .cardCss {
  25879. display: flex;
  25880. flex-direction: column;
  25881. flex-wrap: nowrap;
  25882. align-items: center;
  25883. border-bottom: 3px solid #b4c3d3;
  25884. padding: 0 0 5px 0;
  25885. /* margin-right: 10px; */
  25886. }
  25887. .cardCss>div:nth-child(2) {
  25888. background: #5b7b9d;
  25889. color: #fff;
  25890. width: 20px;
  25891. height: 20px;
  25892. border-radius: 50%;
  25893. text-align: center;
  25894. line-height: 20px;
  25895. }
  25896. .sentenTopBox {
  25897. display: flex;
  25898. flex-direction: row;
  25899. flex-wrap: nowrap;
  25900. align-items: center;
  25901. justify-content: space-between;
  25902. padding: 55px 0 0 20px;
  25903. box-sizing: border-box;
  25904. width: 85%;
  25905. }
  25906. .rb_c_ai_box,
  25907. .stepsBottom {
  25908. width: 100%;
  25909. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  25910. /* background: #f7f7f7; */
  25911. border-radius: 10px;
  25912. overflow: hidden;
  25913. /* height: 100%; */
  25914. height: calc(100% - 55px);
  25915. }
  25916. .navTop {
  25917. background: #53749b;
  25918. color: #fff;
  25919. height: 40px;
  25920. line-height: 40px;
  25921. padding-left: 15px;
  25922. font-size: 18px;
  25923. }
  25924. .navBottom {
  25925. /* background: #6b91b7; */
  25926. height: 100%;
  25927. overflow: auto;
  25928. padding: 10px 0;
  25929. }
  25930. .navStage {
  25931. display: flex;
  25932. flex-direction: row;
  25933. flex-wrap: nowrap;
  25934. align-items: center;
  25935. padding: 10px 10px 10px 0;
  25936. cursor: pointer;
  25937. background: #ffffff;
  25938. width: 95%;
  25939. margin: 5px auto 5px;
  25940. box-sizing: border-box;
  25941. border-radius: 5px;
  25942. flex-wrap: wrap;
  25943. position: relative;
  25944. }
  25945. .navStage:hover>.chapter_upload_drag {
  25946. display: block;
  25947. }
  25948. .navTask:hover>.chapter_upload_drag {
  25949. display: block;
  25950. }
  25951. .chapter_upload:hover>.chapter_upload_drag {
  25952. display: block;
  25953. }
  25954. .navStage::before {
  25955. content: "";
  25956. display: block;
  25957. width: 16px;
  25958. height: 16px;
  25959. background-image: url(../../../assets/icon/new/icon_stage.png);
  25960. background-size: 100%;
  25961. margin-left: 25px;
  25962. }
  25963. .navStage .chapter_unit_open {
  25964. content: "";
  25965. display: block;
  25966. width: 16px;
  25967. height: 16px;
  25968. background-image: url(../../../assets/icon/new/down.png);
  25969. transform: rotate(-90deg);
  25970. background-size: 100%;
  25971. margin-left: 10px;
  25972. transition: all 0.5s;
  25973. }
  25974. .isNavStageOpen .chapter_unit_open {
  25975. transform: rotate(0deg);
  25976. }
  25977. .isNavStage {
  25978. background: #0061ff;
  25979. }
  25980. .isNavStage::before {
  25981. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  25982. }
  25983. .isNavStage .chapter_unit_open {
  25984. background-image: url(../../../assets/icon/new/downC.png);
  25985. }
  25986. .isNavStage .nt_taskName {
  25987. font-weight: bold !important;
  25988. color: #ffffff !important;
  25989. }
  25990. .isNavStage .nt_taskTitle {
  25991. font-weight: bold !important;
  25992. color: #fff !important;
  25993. }
  25994. .navStage .nt_taskBox {
  25995. width: calc(100% - 68px);
  25996. padding: 0 0 0 5px;
  25997. box-sizing: border-box;
  25998. box-sizing: border-box;
  25999. display: flex;
  26000. flex-direction: row;
  26001. flex-wrap: nowrap;
  26002. align-items: baseline;
  26003. }
  26004. .navStage .nt_taskTitle {
  26005. color: #060e17;
  26006. line-height: 25px;
  26007. font-size: 16px;
  26008. }
  26009. .navStage .nt_taskName {
  26010. max-width: calc(100% - 82px);
  26011. white-space: nowrap;
  26012. overflow: hidden;
  26013. text-overflow: ellipsis;
  26014. font-size: 16px;
  26015. color: #060e17;
  26016. }
  26017. .navTask {
  26018. display: flex;
  26019. flex-direction: row;
  26020. flex-wrap: nowrap;
  26021. align-items: center;
  26022. padding: 10px 10px 10px 0;
  26023. cursor: pointer;
  26024. background: #ffffff;
  26025. width: 95%;
  26026. margin: 5px auto 5px;
  26027. box-sizing: border-box;
  26028. border-radius: 5px;
  26029. flex-wrap: wrap;
  26030. position: relative;
  26031. }
  26032. .navTask .chapter_upload_open {
  26033. content: "";
  26034. display: block;
  26035. width: 16px;
  26036. height: 16px;
  26037. background-image: url(../../../assets/icon/new/icon_arrow.png);
  26038. background-size: 100%;
  26039. margin-left: 23px;
  26040. }
  26041. .noImage .chapter_upload_open {
  26042. display: none;
  26043. background-image: unset !important;
  26044. }
  26045. .isNavOpen .chapter_upload_open {
  26046. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  26047. transform: rotate(90deg);
  26048. }
  26049. .isNavTask .chapter_upload_open {
  26050. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  26051. transform: rotate(-90deg);
  26052. }
  26053. .isNavTask.isNavOpen .chapter_upload_open {
  26054. transform: rotate(0deg);
  26055. }
  26056. .dragOverTop {
  26057. border-top: 2px solid #0061ff !important;
  26058. border-radius: 0 !important;
  26059. margin-top: 10px;
  26060. }
  26061. .dragOverBottom {
  26062. border-bottom: 2px solid #0061ff !important;
  26063. border-radius: 0 !important;
  26064. margin-top: 10px;
  26065. }
  26066. .dragOverTop2 {
  26067. border-top: 2px solid #0061ff !important;
  26068. border-radius: 0 !important;
  26069. }
  26070. .dragOverBottom2 {
  26071. border-bottom: 2px solid #0061ff !important;
  26072. border-radius: 0 !important;
  26073. }
  26074. .isNavTask {
  26075. /* background: #3681FC; */
  26076. background: #eef3fb;
  26077. }
  26078. .isNavTask>.chapter_upload_drag {
  26079. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  26080. }
  26081. .isNavTask .nt_taskName {
  26082. /* color: #fff !important; */
  26083. font-weight: bold !important;
  26084. color: #0061ff !important;
  26085. }
  26086. .isNavTask .nt_taskTitle {
  26087. /* color: #AECCFE !important; */
  26088. font-weight: bold !important;
  26089. color: #0061ff !important;
  26090. }
  26091. .navTask .nt_taskBox {
  26092. width: calc(100% - 40px);
  26093. padding: 0 0 0 5px;
  26094. box-sizing: border-box;
  26095. box-sizing: border-box;
  26096. display: flex;
  26097. flex-direction: row;
  26098. flex-wrap: nowrap;
  26099. align-items: baseline;
  26100. }
  26101. .navTask .nt_taskTitle {
  26102. /* color: #717C8D; */
  26103. color: #060e17;
  26104. line-height: 25px;
  26105. font-size: 16px;
  26106. /* min-width: 66px; */
  26107. }
  26108. .navTask .nt_taskName {
  26109. /* color: #fff; */
  26110. /* max-width: 130px; */
  26111. /* width: 100%; */
  26112. max-width: calc(100% - 66px);
  26113. font-size: 16px;
  26114. color: #060e17;
  26115. /* color: #0E1E33; */
  26116. }
  26117. .navTask .nt_taskName span {
  26118. width: 100%;
  26119. white-space: nowrap;
  26120. overflow: hidden;
  26121. text-overflow: ellipsis;
  26122. display: block;
  26123. }
  26124. .gjBox {
  26125. width: calc(100% - 25px);
  26126. padding: 0 0 0 0;
  26127. box-sizing: border-box;
  26128. border-left: 1px solid #cad1dc;
  26129. margin-left: 25px;
  26130. }
  26131. .gjBox>div {
  26132. display: flex;
  26133. align-items: center;
  26134. }
  26135. .gjBox>div::before {
  26136. content: "";
  26137. height: 1px;
  26138. width: 10px;
  26139. background: #cad1dc;
  26140. display: block;
  26141. margin-right: 5px;
  26142. }
  26143. .gjCss {
  26144. display: flex;
  26145. flex-direction: row;
  26146. flex-wrap: nowrap;
  26147. align-items: center;
  26148. padding: 15px 0;
  26149. box-sizing: border-box;
  26150. font-size: 14px;
  26151. cursor: pointer;
  26152. }
  26153. .isGjCss {
  26154. color: #0061ff;
  26155. }
  26156. .groupBox {}
  26157. .groupContent+.groupContent {
  26158. margin-top: 30px;
  26159. }
  26160. .groupTitle {
  26161. font-size: 24px;
  26162. color: rgb(80, 80, 80);
  26163. margin-bottom: 20px;
  26164. }
  26165. .groupName {
  26166. display: flex;
  26167. align-items: center;
  26168. }
  26169. .groupn {
  26170. font-size: 15px;
  26171. margin-right: 10px;
  26172. }
  26173. .groupName+.groupName {
  26174. margin-top: 15px;
  26175. }
  26176. .groupBtn {
  26177. margin-left: 10px;
  26178. }
  26179. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  26180. text-align: left;
  26181. }
  26182. .radioBox>div {
  26183. margin: 10px 0 0 10px;
  26184. }
  26185. .radioBox>>>.el-radio__input,
  26186. .radioBox>>>.el-checkbox__inner {
  26187. margin-left: 10px;
  26188. }
  26189. .radioBox>>>.el-radio__label,
  26190. .radioBox>>>.el-checkbox__label {
  26191. display: flex;
  26192. align-items: center;
  26193. }
  26194. .inImg {
  26195. width: 50px;
  26196. }
  26197. .inImg>img {
  26198. width: 100%;
  26199. height: 100%;
  26200. object-fit: cover;
  26201. }
  26202. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  26203. height: auto;
  26204. padding: 10px;
  26205. margin: 0;
  26206. }
  26207. .upCss>>>.el-upload-list {
  26208. width: 100%;
  26209. }
  26210. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  26211. width: 100%;
  26212. height: 120px;
  26213. object-fit: contain;
  26214. background: unset;
  26215. margin-left: 0;
  26216. }
  26217. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  26218. display: none;
  26219. }
  26220. .tcMember+.tcMember::before {
  26221. content: "、";
  26222. }
  26223. .xzUpImg {
  26224. width: 25px;
  26225. height: 25px;
  26226. min-width: 25px;
  26227. min-height: 25px;
  26228. cursor: pointer;
  26229. margin: 0 10px;
  26230. }
  26231. .xzUpImg>img {
  26232. width: 100%;
  26233. height: 100%;
  26234. }
  26235. .closeCss {
  26236. position: absolute;
  26237. top: 8px;
  26238. right: 8px;
  26239. cursor: pointer;
  26240. width: 20px;
  26241. height: 20px;
  26242. }
  26243. .closeCss>img {
  26244. width: 100%;
  26245. height: 100%;
  26246. }
  26247. .moveBtn {
  26248. display: flex;
  26249. flex-direction: row;
  26250. flex-wrap: nowrap;
  26251. align-items: center;
  26252. width: 55px;
  26253. }
  26254. .timuUpImg {
  26255. display: flex;
  26256. flex-direction: row;
  26257. align-items: center;
  26258. width: 100%;
  26259. margin-right: 10px;
  26260. }
  26261. .timuUpImg>div:nth-child(1) {
  26262. margin-right: 10px;
  26263. display: flex;
  26264. align-items: center;
  26265. width: 100%;
  26266. }
  26267. .timuImgBox {
  26268. margin: 10px 0;
  26269. display: flex;
  26270. flex-direction: column;
  26271. flex-wrap: wrap;
  26272. align-items: flex-start;
  26273. }
  26274. .timuImg {
  26275. width: 100px;
  26276. margin: 5px 0;
  26277. cursor: pointer;
  26278. position: relative;
  26279. }
  26280. .timuImg:hover .deleteWord {
  26281. display: block;
  26282. }
  26283. .deleteWord {
  26284. width: 25px;
  26285. height: 25px;
  26286. position: absolute;
  26287. right: -5px;
  26288. top: -5px;
  26289. cursor: pointer;
  26290. display: none;
  26291. }
  26292. .timuImg>img,
  26293. .deleteWord>img {
  26294. width: 100%;
  26295. height: 100%;
  26296. object-fit: cover;
  26297. }
  26298. .e_add_delete {
  26299. cursor: pointer;
  26300. margin-left: 10px;
  26301. }
  26302. .pType_box {
  26303. margin-top: 30px;
  26304. align-items: flex-end;
  26305. }
  26306. .noneBox {
  26307. height: 200px;
  26308. width: 100%;
  26309. display: flex;
  26310. align-items: center;
  26311. justify-content: center;
  26312. flex-direction: column;
  26313. /* margin-top: 150px; */
  26314. }
  26315. .noneBox>img {
  26316. width: 95px;
  26317. }
  26318. .noneBox>span {
  26319. margin-top: 10px;
  26320. color: #717c8d;
  26321. }
  26322. .rb_c_box {
  26323. width: 100%;
  26324. height: 100%;
  26325. display: flex;
  26326. /* padding: 20px; */
  26327. box-sizing: border-box;
  26328. justify-content: space-between;
  26329. }
  26330. .rb_c_box_left {
  26331. height: 100%;
  26332. background: #fff;
  26333. width: 270px;
  26334. min-width: 270px;
  26335. border-radius: 8px;
  26336. margin-right: 10px;
  26337. }
  26338. .rb_c_box_right {
  26339. height: 100%;
  26340. width: calc(100%);
  26341. overflow: hidden;
  26342. }
  26343. .rb_c_box_btn {
  26344. display: flex;
  26345. justify-content: flex-start;
  26346. height: 50px;
  26347. align-items: center;
  26348. }
  26349. .rb_c_box_right>.basic_box {
  26350. /* background: #fff; */
  26351. border-radius: 0;
  26352. height: calc(100% - 0px);
  26353. overflow: auto;
  26354. padding: 0;
  26355. }
  26356. .textarea_css {
  26357. display: block;
  26358. resize: none;
  26359. padding: 10px 15px;
  26360. line-height: 1.5;
  26361. box-sizing: border-box;
  26362. width: 100%;
  26363. font-size: 14px;
  26364. color: #606266;
  26365. background-color: #fff;
  26366. background-image: none;
  26367. border: 1px solid #dcdfe6;
  26368. border-radius: 4px;
  26369. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  26370. outline: none;
  26371. overflow: hidden;
  26372. height: 46px;
  26373. font-family: "Microsoft YaHei";
  26374. }
  26375. .textarea_css::-webkit-input-placeholder {
  26376. color: #c0c4cc;
  26377. }
  26378. .textarea_css:focus {
  26379. border-color: #409eff;
  26380. outline: 0;
  26381. }
  26382. .addEditor>>>.text {
  26383. height: auto;
  26384. min-height: 100px;
  26385. }
  26386. .addEditor>>>.w-e-text-container {
  26387. min-height: 100px;
  26388. }
  26389. .moveBtn2 {
  26390. flex-direction: column;
  26391. width: fit-content;
  26392. margin: 0 10px 0 10px;
  26393. }
  26394. .moveBtn2 .chapter_upload_down,
  26395. .moveBtn2 .chapter_upload_up {
  26396. width: 16px;
  26397. height: 16px;
  26398. }
  26399. .moveBtn2 .chapter_upload_up::after,
  26400. .moveBtn2 .chapter_upload_down::after {
  26401. width: 10px;
  26402. height: 10px;
  26403. }
  26404. .fullStyle>>>.el-dialog__body {
  26405. height: calc(100% - 125px) !important;
  26406. box-sizing: border-box;
  26407. }
  26408. .fullStyle1>>>.el-dialog__body {
  26409. height: auto !important;
  26410. }
  26411. .fullStyle>>>.el-dialog {
  26412. width: 100% !important;
  26413. max-width: 100% !important;
  26414. height: 100% !important;
  26415. margin: 0 !important;
  26416. }
  26417. .fullStyle {
  26418. width: 100% !important;
  26419. max-width: 100% !important;
  26420. height: 100% !important;
  26421. margin: 0 auto !important;
  26422. }
  26423. .wb_j_box_btn {
  26424. width: calc(100% - 30px);
  26425. display: flex;
  26426. height: 40px;
  26427. border: 1.5px solid #cad1dc;
  26428. border-radius: 4px;
  26429. box-sizing: border-box;
  26430. align-items: center;
  26431. font-size: 14px;
  26432. cursor: pointer;
  26433. overflow: hidden;
  26434. }
  26435. .wb_j_box_btn:hover {
  26436. border: 1.5px solid #0061ff;
  26437. }
  26438. .wb_j_box_title {
  26439. background: #f0f4fa;
  26440. height: 100%;
  26441. line-height: 40px;
  26442. width: 90px;
  26443. text-align: center;
  26444. color: #060e17;
  26445. border-right: 1.5px solid #cad1dc;
  26446. box-sizing: border-box;
  26447. }
  26448. .wb_j_box_btn_c {
  26449. width: calc(100% - 90px);
  26450. padding: 0 35px 0 10px;
  26451. box-sizing: border-box;
  26452. position: relative;
  26453. }
  26454. .wb_j_box_span {
  26455. width: 100%;
  26456. overflow: hidden;
  26457. white-space: nowrap;
  26458. text-overflow: ellipsis;
  26459. word-wrap: break-word;
  26460. color: #717c8d;
  26461. }
  26462. .wb_j_box_arrow {
  26463. content: "";
  26464. width: 14px;
  26465. height: 14px;
  26466. background: url(../../../assets/icon/new/u_arrow.png);
  26467. background-size: 100% 100%;
  26468. position: absolute;
  26469. right: 12px;
  26470. top: 50%;
  26471. transform: translateY(-50%);
  26472. }
  26473. .check_classBox {
  26474. height: 400px;
  26475. display: flex;
  26476. border-top: 1.5px solid #e7ebf1;
  26477. border-bottom: 1.5px solid #e7ebf1;
  26478. }
  26479. .check_class_right {
  26480. width: 130px;
  26481. border-right: 1px solid #e7ebf1;
  26482. display: flex;
  26483. align-items: center;
  26484. flex-direction: column;
  26485. height: 100%;
  26486. overflow: auto;
  26487. padding: 15px 0;
  26488. box-sizing: border-box;
  26489. }
  26490. .check_class {
  26491. width: 85%;
  26492. border-radius: 5px;
  26493. height: 30px;
  26494. min-height: 30px;
  26495. line-height: 30px;
  26496. text-align: center;
  26497. padding: 0 10px;
  26498. box-sizing: border-box;
  26499. cursor: pointer;
  26500. white-space: nowrap;
  26501. overflow: hidden;
  26502. text-overflow: ellipsis;
  26503. }
  26504. .check_class.activeX {
  26505. background: #e0eafb;
  26506. color: #3681fc;
  26507. font-weight: 700;
  26508. }
  26509. .check_class+.check_class {
  26510. margin-top: 15px;
  26511. }
  26512. .check_class_left {
  26513. background: #fafafa;
  26514. width: calc(100% - 130px);
  26515. padding: 15px;
  26516. box-sizing: border-box;
  26517. }
  26518. .check_class_all_box {
  26519. display: flex;
  26520. margin-bottom: 10px;
  26521. }
  26522. .all_check {
  26523. display: flex;
  26524. align-items: center;
  26525. padding: 2px 0 0;
  26526. margin-left: 10px;
  26527. }
  26528. .all_check>>>.el-checkbox__label {
  26529. line-height: 18px;
  26530. }
  26531. .check_class_left_title {
  26532. font-size: 16px;
  26533. font-weight: 700;
  26534. }
  26535. .check_class_item {
  26536. display: flex;
  26537. flex-wrap: wrap;
  26538. height: calc(100% - 45px);
  26539. overflow: auto;
  26540. justify-content: flex-start;
  26541. align-items: flex-start;
  26542. align-content: flex-start;
  26543. }
  26544. .class_item:first-child {
  26545. /* margin: 0 15px 15px 67px; */
  26546. }
  26547. .class_item {
  26548. margin: 0 15px 15px 0;
  26549. }
  26550. .class_item:hover>>>.el-checkbox__label {
  26551. color: #409eff;
  26552. }
  26553. .class_item>>>.el-checkbox__label {
  26554. color: #0e1e33;
  26555. }
  26556. .class_item:hover>>>.el-checkbox__inner {
  26557. border-color: #409eff;
  26558. }
  26559. .class_item>>>.el-checkbox,
  26560. .class_item>>>.el-checkbox__input {
  26561. display: flex;
  26562. align-items: center;
  26563. }
  26564. .taskTitle {
  26565. font-size: 20px;
  26566. font-weight: bold;
  26567. margin-bottom: 35px;
  26568. }
  26569. .taskTitle:after {
  26570. content: "";
  26571. width: 100%;
  26572. display: block;
  26573. height: 1px;
  26574. background: #cad1dc;
  26575. position: absolute;
  26576. left: 0;
  26577. margin: 15px 0 0;
  26578. }
  26579. .eva_btn_box {
  26580. margin: 20px 0px 0 0;
  26581. display: flex;
  26582. flex-direction: row;
  26583. flex-wrap: nowrap;
  26584. align-items: center;
  26585. justify-content: space-between;
  26586. width: 100%;
  26587. }
  26588. .eva_btn_left_box {
  26589. display: flex;
  26590. flex-direction: row;
  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. .addTypeBox {
  26602. display: flex;
  26603. flex-direction: column;
  26604. flex-wrap: nowrap;
  26605. align-items: center;
  26606. }
  26607. .addTypeChoose {
  26608. display: flex;
  26609. flex-direction: row;
  26610. flex-wrap: nowrap;
  26611. align-items: center;
  26612. margin: 15px 0;
  26613. }
  26614. .buchong_box {
  26615. background: #E0EAFB66;
  26616. width: calc(100% - 20px);
  26617. min-height: 50px;
  26618. display: flex;
  26619. align-items: center;
  26620. justify-content: center;
  26621. margin: 0 auto;
  26622. }
  26623. .outline {
  26624. width: calc(100% - 40px);
  26625. margin: 0 auto;
  26626. }
  26627. .task_outline {
  26628. width: calc(100% - 40px);
  26629. margin: 0 auto;
  26630. }
  26631. .outline_box+.outline_box {
  26632. margin: 30px 0 0px;
  26633. }
  26634. .outline_task {
  26635. display: flex;
  26636. align-items: center;
  26637. margin-bottom: 10px;
  26638. }
  26639. .outline_btn{
  26640. display: flex;
  26641. align-items: center;
  26642. min-width: fit-content;
  26643. margin-left: 10px;
  26644. }
  26645. .outline_task .title {
  26646. font-size: 18px;
  26647. font-weight: bold;
  26648. min-width: 80px;
  26649. }
  26650. .op_task_box,
  26651. .op_tool_box,
  26652. .outline_detail {
  26653. position: relative;
  26654. }
  26655. .op_task_box:hover .op_box,
  26656. .op_tool_box:hover .op_box,
  26657. .outline_detail:hover .op_box {
  26658. display: flex
  26659. }
  26660. .op_box {
  26661. position: absolute;
  26662. bottom: 10px;
  26663. display: none;
  26664. align-items: center;
  26665. justify-content: space-between;
  26666. width: calc(100% - 20px);
  26667. left: 50%;
  26668. transform: translateX(-50%);
  26669. }
  26670. .op_box .op_remark {
  26671. color: #8E8E8E;
  26672. font-size: 14px;
  26673. }
  26674. .rb_c_nav {
  26675. width: calc(100% - 20px);
  26676. margin: 15px auto 0;
  26677. font-size: 18px;
  26678. }
  26679. .rb_c_nav span {
  26680. cursor: pointer;
  26681. }
  26682. .rb_c_nav span+span {
  26683. margin-left: 10px;
  26684. }
  26685. .rb_c_nav span.active {
  26686. color: #0061FF
  26687. }
  26688. .text_panel>>>.text {
  26689. height: 400px;
  26690. }
  26691. .markBox{
  26692. padding: 20px 14px;
  26693. line-height: 29px;
  26694. font-size: 16px;
  26695. background: #f4f4f4;
  26696. border-radius: 5px;
  26697. word-break: break-word;
  26698. }
  26699. .info_box_t{
  26700. display: flex;
  26701. align-items: center;
  26702. }
  26703. .info_box_t + .info_box_t{
  26704. margin-top: 10px;
  26705. }
  26706. .info_box_t_box{
  26707. display: flex;
  26708. align-items: center;
  26709. }
  26710. .info_box_t_box + .info_box_t_box{
  26711. margin-left: 10px;
  26712. }
  26713. .info_box_t_box > span{
  26714. width: fit-content
  26715. }
  26716. .info_box_t_box > input{
  26717. width: 150px !important;
  26718. margin: 0 5px 0 0;
  26719. }
  26720. .info_radio >>> .el-radio, .el-radio__input{
  26721. line-height: 18px;
  26722. height: 18px;
  26723. }
  26724. .mode_box{
  26725. display: flex;
  26726. align-items: center;
  26727. }
  26728. .mode_box > span{
  26729. padding: 0px 5px;
  26730. cursor: pointer;
  26731. }
  26732. .mode_box > span.active{
  26733. color: #409eff;
  26734. }
  26735. .chapter_upload_check {
  26736. width: 15px;
  26737. height: 15px;
  26738. cursor: pointer;
  26739. background-image: url('../../../assets/icon/check.png');
  26740. background-size: 100% 100%;
  26741. }
  26742. .chapter_upload_check.checked{
  26743. background-image: url('../../../assets/icon/checked.png');
  26744. }
  26745. .ruleBtn {
  26746. width: fit-content;
  26747. height: 36px;
  26748. line-height: 36px;
  26749. cursor: pointer;
  26750. color: #0061FF;
  26751. }
  26752. .stopBtn{
  26753. z-index: 999999;
  26754. position: absolute;
  26755. left: 50%;
  26756. top: calc(50% + 70px);
  26757. transform: translateX(-50%);
  26758. }
  26759. .rateSwitch >>> .el-switch__label.is-active {
  26760. color: #0061FF;
  26761. }
  26762. .rateSwitch >>> .el-switch__label--right{
  26763. display: flex;
  26764. align-items: center;
  26765. }
  26766. .rateSwitch >>> .el-switch__label--right::before{
  26767. content: "";
  26768. width: 14px;
  26769. height: 14px;
  26770. min-width: 14px;
  26771. min-height: 14px;
  26772. background-size: 100% 100%;
  26773. display: block;
  26774. margin-right: 7px;
  26775. background-image: url(../../../assets/icon/new/u_op2.png);
  26776. }
  26777. .rateSwitch >>> .el-switch__label--right.is-active::before{
  26778. background-image: url(../../../assets/icon/new/u_op.png);
  26779. }
  26780. .inter_box{
  26781. min-width: calc(50%);
  26782. min-height: 500px;
  26783. margin-right: 10px;
  26784. border: 1px solid #c7c7c7;
  26785. border-radius: 0px 5px 5px 5px;
  26786. overflow: hidden;
  26787. position: relative;
  26788. box-sizing: border-box;
  26789. }
  26790. .inter_box::before{
  26791. content:'对话区';
  26792. position: absolute;
  26793. left: 0;
  26794. top: 0;
  26795. display: block;
  26796. padding: 8px 10px;
  26797. background: #e0eafb;
  26798. color: #98a0ac;
  26799. font-size: 14px;
  26800. border-radius: 0 15px 15px 0;
  26801. }
  26802. .inter_Detailbox{
  26803. border: 1px solid #c7c7c7;
  26804. border-radius: 0px 5px 5px 5px;
  26805. overflow: hidden;
  26806. position: relative;
  26807. box-sizing: border-box;
  26808. }
  26809. .inter_Detailbox::before{
  26810. content:'编辑区';
  26811. position: absolute;
  26812. left: 0;
  26813. top: 0;
  26814. display: block;
  26815. padding: 8px 10px;
  26816. background: #e0eafb;
  26817. color: #98a0ac;
  26818. font-size: 14px;
  26819. border-radius: 0 15px 15px 0;
  26820. }
  26821. .inter_box > iframe{
  26822. width: 100%;
  26823. height: 100%;
  26824. border: none;
  26825. }
  26826. .inter_setting{
  26827. display: block;
  26828. background-image: url(../../../assets/icon/course/setting.svg);
  26829. background-size: 100% 100%;
  26830. width: 20px;
  26831. height: 20px;
  26832. cursor: pointer;
  26833. margin-left: 10px;
  26834. }
  26835. .inter_setting_panel{
  26836. position: absolute;
  26837. left: 110px;
  26838. top: 30px;
  26839. background: #fff;
  26840. border-radius: 5px;
  26841. box-shadow: 0px 0px 2px 1px #00000017;
  26842. padding: 10px;
  26843. z-index: 999;
  26844. }
  26845. .panel_title{
  26846. text-align: center;
  26847. font-size: 18px;
  26848. margin-bottom: 10px;
  26849. }
  26850. .panel_tips{
  26851. font-weight: 500;
  26852. font-size: 14px;
  26853. text-align: center;
  26854. margin-bottom: 10px;
  26855. color: #6d6d6d;
  26856. }
  26857. .panel_input{
  26858. margin-bottom: 10px;
  26859. }
  26860. .panel_button{
  26861. display: flex;
  26862. justify-content: space-between;
  26863. }
  26864. .custom-switch >>> .el-switch__label.is-active {
  26865. color: #0061FF;
  26866. }
  26867. </style>