addCourse.vue 1.1 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738
  1. <template>
  2. <div class="pb_content" style="background: #f0f2f5;overflow: hidden;" v-loading="loading" element-loading-text="小可正在努力生成中,请稍等...">
  3. <div class="c_pub_button_confirm stopBtn" v-if="loading && isOutlineCancelToken" @click="cancelAjax('outline')">停止</div>
  4. <div class="c_pub_button_confirm stopBtn" v-if="loading && isTeacherTaskCancelToken" @click="cancelAjax('teacherTask')">停止</div>
  5. <div class="pb_content_body" style="position: relative; margin: 0;overflow: hidden;">
  6. <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
  7. <div class="courseTop">
  8. <div class="stepsNav">
  9. <el-breadcrumb separator-class="el-icon-arrow-right">
  10. <el-breadcrumb-item :to="{
  11. path:
  12. '/course?userid=' +
  13. userid +
  14. '&oid=' +
  15. oid +
  16. '&org=' +
  17. org +
  18. '&role=' +
  19. role,
  20. }">课程管理</el-breadcrumb-item>
  21. <el-breadcrumb-item>
  22. <span style="color: rgb(15, 126, 255)">添加课程</span>
  23. </el-breadcrumb-item>
  24. </el-breadcrumb>
  25. </div>
  26. <div class="r_pub_button_retrun" @click="retrunCourse">返回</div>
  27. </div>
  28. <!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
  29. <!-- @mouseenter="stepDisplay(true)"
  30. @mouseleave="stepDisplay(false)" -->
  31. <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
  32. <div class="stepBg" v-if="false">
  33. <div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
  34. <div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
  35. <div>
  36. <img src="../../../assets/icon/first.png" alt />
  37. </div>
  38. <div>填写基本信息</div>
  39. </div>
  40. <div v-else-if="isStepDisplay" class="firstNo" @click="navSteps(1)">
  41. <div>
  42. <img src="../../../assets/icon/firstNo.png" alt />
  43. </div>
  44. <div>填写基本信息</div>
  45. </div>
  46. <div class="stepBorder" :class="{ 'border-active': steps > 1 }" v-if="cidType === 0 && isStepDisplay">
  47. </div>
  48. <!-- <div
  49. v-if="steps > 1 && cidType === 0 && isStepDisplay"
  50. class="second"
  51. @click="navSteps(2)"
  52. >
  53. <div style="margin: 5px 10px 0 0; width: 2rem">
  54. <img src="../../../assets/icon/second.png" alt />
  55. </div>
  56. <div>选择课程模板</div>
  57. </div>
  58. <div
  59. v-else-if="cidType === 0 && isStepDisplay"
  60. class="secondNo"
  61. @click="navSteps(2)"
  62. >
  63. <div>
  64. <img src="../../../assets/icon/secondNo.png" alt />
  65. </div>
  66. <div>选择课程模板</div>
  67. </div> -->
  68. <!-- <div
  69. v-if="isStepDisplay"
  70. class="stepBorder"
  71. :class="{ 'border-active': steps > 2 }"
  72. ></div> -->
  73. <div v-if="steps > 2 && isStepDisplay" class="third" @click="navSteps(3)">
  74. <div>
  75. <img src="../../../assets/icon/third.png" alt />
  76. </div>
  77. <div>上传课程内容</div>
  78. </div>
  79. <div v-else-if="isStepDisplay" class="thirdNo" @click="navSteps(3)">
  80. <div>
  81. <img src="../../../assets/icon/thirdNo.png" alt />
  82. </div>
  83. <div>上传课程内容</div>
  84. </div>
  85. <div v-if="isStepDisplay" class="stepBorder" :class="{ 'border-active': steps > 3 }"></div>
  86. <div v-if="steps > 3 && isStepDisplay" class="four">
  87. <div>
  88. <img src="../../../assets/icon/four.png" alt />
  89. </div>
  90. <div>上传完成</div>
  91. </div>
  92. <div v-else-if="isStepDisplay" class="fourNo">
  93. <div>
  94. <img src="../../../assets/icon/fourNo.png" alt />
  95. </div>
  96. <div>上传完成</div>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="rightBox" :key="updateKey" ref='scrollContainer' v-if="steps == 1" @mousewheel="scrollChange"
  101. style="padding: 0" :style="{
  102. height:
  103. !isStepDisplay && !isBtnDisplay
  104. ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
  105. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  106. }">
  107. <!-- <div class="updateMask" :style="{
  108. height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
  109. }" v-if="cid && userid != courseUserid && role != '1'"></div> -->
  110. <div class="whiteBg" style="background: unset; padding: 0">
  111. <div>
  112. <div class="basic_box" style="padding: 0">
  113. <div class="big_box">
  114. <div class="left_first">
  115. <div :class="{
  116. updateTips:
  117. cid && userid != courseUserid && role != '1',
  118. }">
  119. <div style="width: 100%">
  120. <div class="course_input_box2">
  121. <div class="course_input_box">
  122. <div class="bb_courseIcon">
  123. <img src="../../../assets/icon/new/course.png" />
  124. </div>
  125. <input type="text" placeholder="请输入课程名称" class="binfo_input" v-model="courseName" @change="setCover" />
  126. </div>
  127. <div style=" margin-bottom: 15px; display:flex;">
  128. <el-switch v-model="isTeacherSee" active-text="是否公开此课程"
  129. style="justify-content: center; min-width: 150px;"></el-switch>
  130. <el-switch v-model="isFileSearch" active-text="是否开启智能检索"
  131. style="justify-content: center; min-width: 175px"></el-switch>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="pType_box all_choose" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  137. <span>类型</span>
  138. <!-- 学科+ 主题+ 未来+ -->
  139. <el-radio-group @change="CourseType2Change" v-model="pTypeCheckName"
  140. style="display: flex; align-items: center">
  141. <div class="all_choose" style="width: 100px" v-for="(item, index) in CourseType2"
  142. :key="index">
  143. <el-radio :label="item.name">{{
  144. item.name
  145. }}</el-radio>
  146. </div>
  147. </el-radio-group>
  148. </div>
  149. <div class="both">
  150. <div class="choose">
  151. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index">
  152. <span v-if="
  153. CourseTypeJson[item.id].length > 0 &&
  154. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  155. ? pTypeCheck.indexOf(item.id) != -1
  156. : true)
  157. ">{{ item.name }}:</span>
  158. <el-checkbox-group v-model="courseTypeId" @change="typeChange" v-if="
  159. CourseTypeJson[item.id].length > 0 &&
  160. (oid == '69893dca-1d47-11ed-8c78-005056b86db5'
  161. ? pTypeCheck.indexOf(item.id) != -1
  162. : true)
  163. ">
  164. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
  165. item1.name }}</el-checkbox>
  166. </el-checkbox-group>
  167. <!-- <div
  168. v-else
  169. style="font-size: 14px; margin-left: -8px"
  170. >
  171. 暂无
  172. </div> -->
  173. </div>
  174. </div>
  175. </div>
  176. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  177. <div class="info_box_t_box">
  178. <span>输出语言:</span>
  179. <el-radio-group v-model="languageSetting" style="display: flex; align-items: center" @change="changeLang">
  180. <div class="all_choose info_radio">
  181. <el-radio :label="0">简体中文</el-radio>
  182. </div>
  183. <div class="all_choose info_radio" style="margin-left: 10px">
  184. <el-radio :label="1">繁体中文</el-radio>
  185. </div>
  186. <div class="all_choose info_radio" style="margin-left: 10px">
  187. <el-radio :label="2">English</el-radio>
  188. </div>
  189. </el-radio-group>
  190. </div>
  191. </div>
  192. <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
  193. <div class="info_box_t_box">
  194. <!-- <el-switch v-model="isuseT" active-text="是否从已有教案生成"
  195. style="justify-content: center; min-width: 175px"></el-switch> -->
  196. <span>生成模式:</span>
  197. <el-radio-group v-model="isuseT" style="display: flex; align-items: center" @change="changeIsuseT">
  198. <div class="all_choose info_radio">
  199. <el-radio :label="1">对话模式生成</el-radio>
  200. </div>
  201. <div class="all_choose info_radio" style="margin-left: 10px">
  202. <el-radio :label="true">从已有教案生成</el-radio>
  203. </div>
  204. <div class="all_choose info_radio" style="margin-left: 10px">
  205. <el-radio :label="false">从零开始生成</el-radio>
  206. </div>
  207. </el-radio-group>
  208. </div>
  209. <div class="info_box_t_box">
  210. <span>生成风格:</span>
  211. <div class="mode_box">
  212. <span :class="{active: mode == 1}" @click="mode = 1">精确</span>
  213. <!-- <span :class="{active: mode == 2}" @click="mode = 2">平衡</span> -->
  214. <span :class="{active: mode == 3}" @click="mode = 3">创意</span>
  215. </div>
  216. </div>
  217. </div>
  218. <!-- <div class="info_box_t" v-if="templatePan.includes(templateid)">
  219. <div class="info_box_t_box">
  220. <span>课程节数:</span>
  221. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseJie" @change="numberPanJie"/>
  222. <span>节</span>
  223. </div>
  224. <div class="info_box_t_box">
  225. <span>课程时长:</span>
  226. <input type="text" placeholder="请输入课程节数" class="binfo_input" v-model="courseTime" @change="numberPanTime"/>
  227. <span>min</span>
  228. </div>
  229. </div> -->
  230. </div>
  231. <div class="right_first" v-loading="imageloading2">
  232. <!-- <div class="ai_box">
  233. <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
  234. </div> -->
  235. <div class="c_info_title" style="padding: 0 0 15px; margin: 0 auto 0 0">
  236. 上传封面
  237. </div>
  238. <div style="width: 100%">
  239. <div class="uploadFm" @click="choosePicVisible = true" :class="{ uploadFm2: cover.length }">
  240. <img src="../../../assets/icon/addPoster.png" alt="" v-if="cover.length == 0" />
  241. <img :src="cover[0].url" alt="" class="cover_p" v-else />
  242. <div v-if="cover.length == 0">点击添加封面</div>
  243. <div class="cover_mask">
  244. <img src="../../../assets/icon/new/cover_update.png" /><span
  245. style="margin-top: 5px">修改封面</span>
  246. </div>
  247. </div>
  248. <!-- <el-upload :class="{ disUoloadSty: noneBtnImg }" class="upCss" action="#" list-type="picture"
  249. v-loading="uploadLoading1" :http-request="beforeUpload1" ref="upload1"
  250. :on-preview="handlePictureCardPreview" :on-remove="handle_remove1" :show-file-list="true"
  251. :file-list="cover" accept="image/*" :limit="1" :on-exceed="onExceed" v-else>
  252. <i class="el-icon-plus"></i>
  253. </el-upload> -->
  254. </div>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="whiteBg" style="background: #fff; margin: 10px 0;padding: 0 0 15px;">
  261. <div class="whiteBg" style="border-radius: 0">
  262. <div class="c_info_title">
  263. 课程权限设置
  264. </div>
  265. <div class="wb_j_box">
  266. <div class="wb_j_box_content">
  267. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="
  268. (dialogVisibleClass = true),
  269. (classSearch = ''),
  270. (gradeId = ''),
  271. getClass()
  272. ">添加班级</button>
  273. <div v-if="checkboxList2.length" class="wb_j_box_p_box">
  274. <span :class="{ tcMember: getClassC(tc) }" v-for="(tc, tcIndex) in checkboxList2" :key="tcIndex">{{
  275. getClassC(tc) }}</span>
  276. </div> -->
  277. <div class="wb_j_box_btn" @click="
  278. (dialogVisibleClass = true),
  279. (classSearch = ''),
  280. (gradeId = ''),
  281. getClass()
  282. ">
  283. <div class="wb_j_box_title">授课班级</div>
  284. <div class="wb_j_box_btn_c">
  285. <el-tooltip effect="dark" :content="getListClassC(checkboxList2)" placement="top"
  286. v-if="checkboxList2.length" popper-class="text_tooltip2">
  287. <div class="wb_j_box_span">
  288. {{ getListClassC(checkboxList2) }}
  289. </div>
  290. </el-tooltip>
  291. <div v-else class="wb_j_box_span">请选择授课班级</div>
  292. <div class="wb_j_box_arrow"></div>
  293. </div>
  294. </div>
  295. </div>
  296. <div class="wb_j_box_content">
  297. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openMember">添加协同成员</button>
  298. <div v-if="checkboxList3.length" class="wb_j_box_p_box" @click="checkBoolean = !checkBoolean">
  299. <span :class="{ tcMember: getMan2(tc) }" v-for="(tc, tcIndex) in checkboxList3.length > 6 &&
  300. checkBoolean
  301. ? checkboxList3
  302. : checkboxList3.slice(0, 6)" :key="tcIndex">{{ getMan2(tc) }}</span><span class="tcMember"
  303. v-if="checkboxList3.length > 6 && !checkBoolean">更多...</span>
  304. </div> -->
  305. <div class="wb_j_box_btn" @click="openMember">
  306. <div class="wb_j_box_title">协同人员</div>
  307. <div class="wb_j_box_btn_c">
  308. <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
  309. v-if="checkboxList3.length" popper-class="text_tooltip2">
  310. <div class="wb_j_box_span">
  311. {{ getListMan2(checkboxList3) }}
  312. </div>
  313. </el-tooltip>
  314. <div v-else class="wb_j_box_span">请选择协同人员</div>
  315. <div class="wb_j_box_arrow"></div>
  316. </div>
  317. </div>
  318. </div>
  319. </div>
  320. </div>
  321. <div class="whiteBg" style="border-radius: 0; margin-top: 15px; padding-bottom: 20px" v-if="false">
  322. <div class="c_info_title">目标管理</div>
  323. <div style="margin: 0 auto; padding: 0 20px">
  324. <div style="
  325. width: 95%;
  326. min-height: 200px;
  327. border: 1px solid #cad1dc;
  328. border-radius: 4px;
  329. position: relative;
  330. ">
  331. <div class="e_add_top">
  332. <div class="e_add_title">
  333. <button class="c_pub_button_delete pub_btn_delete_img" @click="deleteEva()" v-if="evalua">
  334. 清除
  335. </button>
  336. <button class="c_pub_button_confirm pub_btn_add_img2" @click="dialogVisiblemb = true">
  337. 添加
  338. </button>
  339. <!-- <span>当前使用目标管理</span>
  340. <span>{{ eTitle ? eTitle : "请添加目标" }}</span>
  341. <img
  342. src="../../../assets/line.png"
  343. class="cru_line"
  344. style="
  345. width: 125px;
  346. height: 20px;
  347. bottom: -10px;
  348. left: 155px;
  349. "
  350. /> -->
  351. </div>
  352. <div style="
  353. display: flex;
  354. flex-direction: row;
  355. align-items: center;
  356. ">
  357. <!-- <el-button
  358. type="primary"
  359. size="small"
  360. @click="dialogVisiblemb = true"
  361. >添加目标管理</el-button
  362. >
  363. <el-button
  364. type="primary"
  365. size="small"
  366. @click="deleteEva()"
  367. >清除内容</el-button
  368. > -->
  369. <!-- <div class="e_add_delete" @click="deleteEva()">
  370. <img src="../../../assets/icon/delete.png" alt="" />
  371. </div> -->
  372. </div>
  373. </div>
  374. <div v-if="evalua == ''">
  375. <div class="noneBox">
  376. <img src="../../../assets/icon/new/eva_none.png" />
  377. <span>请添加目标管理</span>
  378. </div>
  379. </div>
  380. <div class="e_add_content" v-else>
  381. <div class="e_add_list_pbox">
  382. <div class="e_add_list_pbox_title">
  383. <span class="type_title">切换模式</span>
  384. <div class="type_content">
  385. <span :class="{ active: typeMode == 1 }" @click="OtherMb(1)">目标树</span>
  386. <span :class="{ active: typeMode == 2 }" @click="OtherMb(2)">目标罗盘</span>
  387. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  388. </div>
  389. </div>
  390. <div class="e_add_list_pbox_content">
  391. <Mind :showBar="false" :mindData="data" v-if="typeMode == 1"></Mind>
  392. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2"></Sunburst>
  393. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  394. v-if="typeMode == 3">
  395. </SeeBoard>
  396. </div>
  397. </div>
  398. </div>
  399. </div>
  400. </div>
  401. </div>
  402. </div>
  403. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  404. <div style="position: relative;
  405. background: #fff;
  406. box-sizing: border-box;
  407. padding: 1px 20px 10px;
  408. width: 100%;
  409. border-radius: 10px;">
  410. <div style="
  411. display: flex;
  412. flex-direction: row;
  413. justify-content: space-between;
  414. align-items: center;
  415. " :style="{
  416. margin: true
  417. ? '20px 0 10px'
  418. : '20px 0 0',
  419. }">
  420. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  421. 已有教案
  422. <div class="add_info_box" style="margin: 0 0 0 auto">
  423. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  424. 上传已有教案
  425. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  426. beforeUploadInfo2(
  427. $event,
  428. 14
  429. )
  430. " />
  431. </button>
  432. <button class="c_pub_button_add" @click="clickGenTT" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  433. 一键智能总结生成
  434. </button>
  435. </div>
  436. </div>
  437. </div>
  438. <div>
  439. <div class="add_chapters_box add_c_none" v-if="
  440. teacherInfoData &&
  441. teacherInfoData.length == 0
  442. ">
  443. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  444. <span>暂时还没有内容,快去添加吧</span>
  445. </div>
  446. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  447. <div @dragstart="
  448. dragStart(item1, index1, 0)
  449. " @dragover.prevent="
  450. dragOver(index1, 0)
  451. " @dragend="dragEnd()" :draggable="isdrag ==
  452. 'chapter-' + 0 + '-' + index1
  453. " class="chapter_upload" v-for="(item1, index1) in teacherInfoData" :key="item1.id" @click="
  454. getChapterData(
  455. $event,
  456. index1,
  457. item1.type
  458. )
  459. " :class="{
  460. dragOverTop2:
  461. newIndex === index1 &&
  462. typeIndex ==
  463. 'chapter-' +
  464. 0 +
  465. '-' +
  466. index1 &&
  467. oldIndex > index1 &&
  468. dragType == 'drag',
  469. dragOverBottom2:
  470. newIndex === index1 &&
  471. typeIndex ==
  472. 'chapter-' +
  473. 0 +
  474. '-' +
  475. index1 &&
  476. oldIndex < index1 &&
  477. dragType == 'drag',
  478. }">
  479. <div class="chapter_upload_o" style="
  480. position: relative;
  481. display: flex;
  482. align-items: center;
  483. ">
  484. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  485. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  486. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  487. </div>
  488. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  489. </div>
  490. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  491. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  492. </div>
  493. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  494. </div>
  495. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  496. </div>
  497. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  498. </div>
  499. </div>
  500. <div class="chapter_upload_n">
  501. <input readonly="true" v-if="
  502. item1.type == 2 ||
  503. item1.type == 3 ||
  504. item1.type == 12 ||
  505. item1.type == 13 ||
  506. item1.type == 7
  507. " :placeholder="item1.name" style="
  508. border: none;
  509. outline: none;
  510. width: 80%;
  511. minwidth: 215px;
  512. z-index: 99;
  513. font-size: 14px;
  514. white-space: nowrap;
  515. overflow: hidden;
  516. text-overflow: ellipsis;
  517. " />
  518. </div>
  519. <div class="chapter_upload_ic">
  520. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  521. <div class="chapter_upload_ic_r" @click.stop="
  522. deleteTeacherInfoData(
  523. $event,
  524. index1
  525. )
  526. ">
  527. <div></div>
  528. </div>
  529. </div>
  530. </div>
  531. </div>
  532. </div>
  533. </div>
  534. <div v-if="
  535. teacherinfoproVisible
  536. " class="mask">
  537. <div class="progressBox">
  538. <div class="lbox">
  539. <img src="../../../assets/loading.gif" />上传中,请稍后
  540. </div>
  541. <div style="margin-bottom: 10px">
  542. <span>{{
  543. teacherinfoisFinishSize
  544. }}</span>
  545. /
  546. <span>{{
  547. teacherinfoisAllSize
  548. }}</span>
  549. </div>
  550. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="teacherinfoprogress
  551. ? teacherinfoprogress
  552. : 0
  553. " style="width: 80%"></el-progress> -->
  554. </div>
  555. </div>
  556. </div>
  557. </div>
  558. <div class="whiteBg" :style="{ minHeight: teacherTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;position: relative" v-loading="teacherTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true">
  559. <div class="c_pub_button_confirm stopBtn" v-if="teacherTextLoading && isTeacherTextCancelToken" @click="cancelAjax('teacherText')">停止</div>
  560. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  561. <div class="c_info_title">
  562. 已有教案摘要
  563. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  564. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  565. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '右键已有教案摘要-提取摘要按钮')"
  566. @click="openAiDialog(2, 'aiteacherTextDetail',1), addCourseBehavior('courseBehavior', '点击已有教案摘要-提取摘要按钮')">提取摘要</button>
  567. </el-tooltip>
  568. </div>
  569. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  570. <div style="width: calc(100%);" class='op_task_box'>
  571. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="teacherCourseText"
  572. placeholder="请输入教案摘要" v-if="teacherCourseTextB"></textarea>
  573. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="teacherCourseText" v-else-if="teacherTextLoading"></div>
  574. <div class="markBox vditor-reset" v-html="MarkdownT(teacherCourseText)" v-else></div>
  575. <div class="op_box" :class="{op_box_isquote: isQuote['aiteacherTextDetail']}">
  576. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  577. <div class="op_box_right">
  578. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  579. <div class="r_pub_button_op"
  580. @contextmenu.prevent="openAiDialog(1, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '右键已有教案摘要-智能优化按钮')"
  581. @click="openAiDialog(2, 'aiteacherTextDetail', 2), addCourseBehavior('courseBehavior', '点击已有教案摘要-智能优化按钮')">智能优化</div>
  582. </el-tooltip>
  583. <div class="r_pub_button_edit" style="margin-left:10px" @click="teacherCourseTextB = !teacherCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击已有教案摘要-确定/编辑按钮')">{{ teacherCourseTextB ? '确定' : '编辑'}}</div>
  584. <el-switch style="margin-left: 10px" v-model="isQuote['aiteacherTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiteacherTextDetail'), addCourseBehavior('courseBehavior', '点击已有教案摘要-引用按钮')"></el-switch>
  585. </div>
  586. </div>
  587. </div>
  588. </div>
  589. </div>
  590. </div>
  591. <div class="whiteBg" :style="{ minHeight: targetTextLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!yiKeTemplateArray.includes(templateid)) && isuseT === true && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  592. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading && isTargetCancelToken1" @click="cancelAjax('target1')">停止</div>
  593. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  594. <div class="c_info_title">
  595. 课程目标
  596. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  597. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  598. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '右键课程目标-提取目标按钮')"
  599. @click="openAiDialog(2, 'aitargetTextDetail',1), addCourseBehavior('courseBehavior', '点击课程目标-提取目标按钮')">提取目标</button>
  600.                   </el-tooltip>
  601. </div>
  602. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  603. <div style="width: calc(100%);" class='op_task_box'>
  604. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText"
  605. placeholder="请输入课程目标" v-if="targetCourseTextB"></textarea>
  606. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText" v-else-if="targetTextLoading"></div>
  607. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText)" v-else></div>
  608. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail']}">
  609. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  610. <div class="op_box_right">
  611. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  612. <div class="r_pub_button_op"
  613. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  614. @click="openAiDialog(2, 'aitargetTextDetail', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">智能优化</div>
  615. </el-tooltip>
  616. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseTextB = !targetCourseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">{{ targetCourseTextB ? '确定' : '编辑'}}</div>
  617. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aitargetTextDetail'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  618. </div>
  619. </div>
  620. </div>
  621. </div>
  622. </div>
  623. </div>
  624. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  625. <div style="position: relative;
  626. background: #fff;
  627. box-sizing: border-box;
  628. padding: 1px 20px 10px;
  629. width: 100%;
  630. border-radius: 10px;">
  631. <div style="
  632. display: flex;
  633. flex-direction: row;
  634. justify-content: space-between;
  635. align-items: center;
  636. " :style="{
  637. margin: true
  638. ? '20px 0 10px'
  639. : '20px 0 0',
  640. }">
  641. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  642. 系统推荐参考资料
  643. <div class="add_info_box" style="margin: 0 0 0 auto">
  644. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  645. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  646. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  647. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  648.  </el-tooltip>
  649. </div>
  650. </div>
  651. </div>
  652. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等...">
  653. <div class="add_chapters_box add_c_none" v-if="
  654. cankaoInfoData &&
  655. cankaoInfoData.length == 0
  656. ">
  657. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  658. <span>暂时还没有内容,快去添加吧</span>
  659. </div>
  660. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  661. <div @dragstart="
  662. dragStart(item1, index1, 0)
  663. " @dragover.prevent="
  664. dragOver(index1, 0)
  665. " @dragend="dragEnd()" :draggable="isdrag ==
  666. 'chapter-' + 0 + '-' + index1
  667. " class="chapter_upload" v-for="(item1, index1) in cankaoInfoData" :key="item1.id" @click="
  668. getChapterData(
  669. $event,
  670. index1,
  671. item1.type
  672. )
  673. " :class="{
  674. dragOverTop2:
  675. newIndex === index1 &&
  676. typeIndex ==
  677. 'chapter-' +
  678. 0 +
  679. '-' +
  680. index1 &&
  681. oldIndex > index1 &&
  682. dragType == 'drag',
  683. dragOverBottom2:
  684. newIndex === index1 &&
  685. typeIndex ==
  686. 'chapter-' +
  687. 0 +
  688. '-' +
  689. index1 &&
  690. oldIndex < index1 &&
  691. dragType == 'drag',
  692. }">
  693. <div class="chapter_upload_o" style="
  694. position: relative;
  695. display: flex;
  696. align-items: center;
  697. ">
  698. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  699. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  700. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  701. </div>
  702. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  703. </div>
  704. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  705. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  706. </div>
  707. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  708. </div>
  709. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  710. </div>
  711. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  712. </div>
  713. </div>
  714. <div class="chapter_upload_n">
  715. <input readonly="true" v-if="
  716. item1.type == 2 ||
  717. item1.type == 3 ||
  718. item1.type == 12 ||
  719. item1.type == 13 ||
  720. item1.type == 7
  721. " :placeholder="item1.name" style="
  722. border: none;
  723. outline: none;
  724. width: 80%;
  725. minwidth: 215px;
  726. z-index: 99;
  727. font-size: 14px;
  728. white-space: nowrap;
  729. overflow: hidden;
  730. text-overflow: ellipsis;
  731. " />
  732. </div>
  733. <div class="chapter_upload_ic">
  734. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  735. <div class="chapter_upload_ic_r" @click.stop="
  736. deleteCankaoInfoData(
  737. $event,
  738. index1
  739. )
  740. ">
  741. <div></div>
  742. </div>
  743. </div>
  744. </div>
  745. </div>
  746. </div>
  747. </div>
  748. </div>
  749. </div>
  750. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  751. <div style="position: relative;
  752. background: #fff;
  753. box-sizing: border-box;
  754. padding: 1px 20px 10px;
  755. width: 100%;
  756. border-radius: 10px;">
  757. <div style="
  758. display: flex;
  759. flex-direction: row;
  760. justify-content: space-between;
  761. align-items: center;
  762. " :style="{
  763. margin: true
  764. ? '20px 0 10px'
  765. : '20px 0 0',
  766. }">
  767. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  768. 参考标准
  769. <div class="add_info_box" style="margin: 0 0 0 auto">
  770. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  771. 上传参考标准
  772. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  773. beforeUploadInfo2(
  774. $event,
  775. 19
  776. )
  777. " />
  778. </button>
  779. </div>
  780. </div>
  781. </div>
  782. <div>
  783. <div class="add_chapters_box add_c_none" v-if="
  784. knowInfoData &&
  785. knowInfoData.length == 0
  786. ">
  787. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  788. <span>暂时还没有内容,快去添加吧</span>
  789. </div>
  790. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  791. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
  792. getChapterData(
  793. $event,
  794. index1,
  795. item1.type
  796. )
  797. " >
  798. <div class="chapter_upload_o" style="
  799. position: relative;
  800. display: flex;
  801. align-items: center;
  802. ">
  803. <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData(item1.fileid)"></div>
  804. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  805. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  806. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  807. </div>
  808. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  809. </div>
  810. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  811. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  812. </div>
  813. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  814. </div>
  815. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  816. </div>
  817. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  818. </div>
  819. </div>
  820. <div class="chapter_upload_n">
  821. <input readonly="true" v-if="
  822. item1.type == 2 ||
  823. item1.type == 3 ||
  824. item1.type == 12 ||
  825. item1.type == 13 ||
  826. item1.type == 7
  827. " :placeholder="item1.name" @click.stop="
  828. checkChpater3($event, index1, item1)
  829. " style="
  830. border: none;
  831. outline: none;
  832. width: 80%;
  833. minwidth: 215px;
  834. z-index: 99;
  835. font-size: 14px;
  836. white-space: nowrap;
  837. overflow: hidden;
  838. text-overflow: ellipsis;
  839. " />
  840. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  841. border: none;
  842. outline: none;
  843. width: 80%;
  844. white-space: nowrap;
  845. overflow: hidden;
  846. text-overflow: ellipsis;
  847. " readonly="true" @click="
  848. selectAttText(index1)
  849. " />
  850. <input :placeholder="item1.title ? item1.title : '链接'
  851. " v-if="item1.type == 8" style="
  852. border: none;
  853. outline: none;
  854. width: 80%;
  855. white-space: nowrap;
  856. overflow: hidden;
  857. text-overflow: ellipsis;
  858. " readonly="true" @click="selectLine(index1)" />
  859. <input :placeholder="item1.title ? item1.title : '链接'
  860. " v-if="item1.type == 14" style="
  861. border: none;
  862. outline: none;
  863. width: 80%;
  864. white-space: nowrap;
  865. overflow: hidden;
  866. text-overflow: ellipsis;
  867. " readonly="true" @click="
  868. openUpdateSource(index1)
  869. " />
  870. </div>
  871. <div class="chapter_upload_ic">
  872. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  873. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  874. checkChpater3($event, index1, item1)
  875. ">
  876. <div></div>
  877. </div>
  878. <div class="chapter_upload_ic_r" @click.stop="
  879. deleteKnowInfoData(
  880. $event,
  881. index1
  882. )
  883. ">
  884. <div></div>
  885. </div>
  886. </div>
  887. </div>
  888. </div>
  889. </div>
  890. </div>
  891. <div v-if="
  892. knowinfoproVisible
  893. " class="mask">
  894. <div class="progressBox">
  895. <div class="lbox">
  896. <img src="../../../assets/loading.gif" />上传中,请稍后
  897. </div>
  898. <div style="margin-bottom: 10px">
  899. <span>{{
  900. knowinfoisFinishSize
  901. }}</span>
  902. /
  903. <span>{{
  904. knowinfoisAllSize
  905. }}</span>
  906. </div>
  907. </div>
  908. </div>
  909. </div>
  910. </div>
  911. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
  912. <div style="position: relative;
  913. background: #fff;
  914. box-sizing: border-box;
  915. padding: 1px 20px 10px;
  916. width: 100%;
  917. border-radius: 10px;">
  918. <div style="
  919. display: flex;
  920. flex-direction: row;
  921. justify-content: space-between;
  922. align-items: center;
  923. " :style="{
  924. margin: true
  925. ? '20px 0 10px'
  926. : '20px 0 0',
  927. }">
  928. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  929. 检索资料
  930. <div class="add_info_box" style="margin: 0 0 0 auto;align-items:center">
  931. <input type="text" placeholder="请输入检索关键词" class="binfo_input" v-model="searchFileName" style="width: 200px;margin: 0 5px 10px 0;min-height: 36px;box-sizing: border-box;height: 36px;"/>
  932. <button class="c_pub_button_add" @click="findMatchingContents">
  933. 点击检索资料
  934. <!-- <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  935. beforeUploadInfo2(
  936. $event,
  937. 20
  938. )
  939. " /> -->
  940. </button>
  941. </div>
  942. </div>
  943. </div>
  944. <div v-loading="knowInfoDataLoading" element-loading-text="小可正在努力生成中,请稍等...">
  945. <div class="add_chapters_box add_c_none" v-if="
  946. knowInfoData2 &&
  947. knowInfoData2.length == 0
  948. ">
  949. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  950. <span>暂时还没有内容,快去添加吧</span>
  951. </div>
  952. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  953. <div class="chapter_upload" v-for="(item1, index1) in knowInfoData2" :key="item1.id" @click="
  954. getChapterData(
  955. $event,
  956. index1,
  957. item1.type
  958. )
  959. " >
  960. <div class="chapter_upload_o" style="
  961. position: relative;
  962. display: flex;
  963. align-items: center;
  964. ">
  965. <div class="chapter_upload_check" :class="{ checked: knowFileids2.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData2(item1.fileid)"></div>
  966. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  967. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  968. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  969. </div>
  970. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  971. </div>
  972. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  973. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  974. </div>
  975. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  976. </div>
  977. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  978. </div>
  979. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  980. </div>
  981. </div>
  982. <div class="chapter_upload_n">
  983. <input readonly="true" v-if="
  984. item1.type == 2 ||
  985. item1.type == 3 ||
  986. item1.type == 12 ||
  987. item1.type == 13 ||
  988. item1.type == 7
  989. " :placeholder="item1.name" @click.stop="
  990. checkChpater3($event, index1, item1)
  991. " style="
  992. border: none;
  993. outline: none;
  994. width: 80%;
  995. minwidth: 215px;
  996. z-index: 99;
  997. font-size: 14px;
  998. white-space: nowrap;
  999. overflow: hidden;
  1000. text-overflow: ellipsis;
  1001. " />
  1002. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1003. border: none;
  1004. outline: none;
  1005. width: 80%;
  1006. white-space: nowrap;
  1007. overflow: hidden;
  1008. text-overflow: ellipsis;
  1009. " readonly="true" @click="
  1010. selectAttText(index1)
  1011. " />
  1012. <input :placeholder="item1.title ? item1.title : '链接'
  1013. " v-if="item1.type == 8" style="
  1014. border: none;
  1015. outline: none;
  1016. width: 80%;
  1017. white-space: nowrap;
  1018. overflow: hidden;
  1019. text-overflow: ellipsis;
  1020. " readonly="true" @click="selectLine(index1)" />
  1021. <input :placeholder="item1.title ? item1.title : '链接'
  1022. " v-if="item1.type == 14" style="
  1023. border: none;
  1024. outline: none;
  1025. width: 80%;
  1026. white-space: nowrap;
  1027. overflow: hidden;
  1028. text-overflow: ellipsis;
  1029. " readonly="true" @click="
  1030. openUpdateSource(index1)
  1031. " />
  1032. </div>
  1033. <div class="chapter_upload_ic">
  1034. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1035. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1036. checkChpater3($event, index1, item1)
  1037. ">
  1038. <div></div>
  1039. </div>
  1040. <div class="chapter_upload_ic_r" @click.stop="
  1041. deleteKnowInfoData2(
  1042. $event,
  1043. index1
  1044. )
  1045. ">
  1046. <div></div>
  1047. </div>
  1048. </div>
  1049. </div>
  1050. </div>
  1051. </div>
  1052. </div>
  1053. <div v-if="
  1054. knowinfoproVisible2
  1055. " class="mask">
  1056. <div class="progressBox">
  1057. <div class="lbox">
  1058. <img src="../../../assets/loading.gif" />上传中,请稍后
  1059. </div>
  1060. <div style="margin-bottom: 10px">
  1061. <span>{{
  1062. knowinfoisFinishSize2
  1063. }}</span>
  1064. /
  1065. <span>{{
  1066. knowinfoisAllSize2
  1067. }}</span>
  1068. </div>
  1069. </div>
  1070. </div>
  1071. </div>
  1072. </div>
  1073. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid)) && infoData2.length">
  1074. <div style="position: relative;
  1075. background: #fff;
  1076. box-sizing: border-box;
  1077. padding: 1px 20px 10px;
  1078. width: 100%;
  1079. border-radius: 10px;">
  1080. <div style="
  1081. display: flex;
  1082. flex-direction: row;
  1083. justify-content: space-between;
  1084. align-items: center;
  1085. " :style="{
  1086. margin: true
  1087. ? '20px 0 10px'
  1088. : '20px 0 0',
  1089. }">
  1090. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1091. 知识库
  1092. <div class="add_info_box" style="margin: 0 0 0 auto">
  1093. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1094. 上传补充资料
  1095. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1096. beforeUploadInfo2(
  1097. $event,
  1098. 15
  1099. )
  1100. " />
  1101. </button>
  1102. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
  1103. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1104. @contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
  1105. @click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
  1106.  </el-tooltip> -->
  1107. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1108. @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">智能检索资料</button>
  1109. </div>
  1110. </div>
  1111. </div>
  1112. <div v-loading="fileSLoading" element-loading-text="小可正在努力生成中,请稍等..." :style="{ minHeight: fileSLoading ? '200px' : 'auto'}">
  1113. <div class="c_pub_button_confirm stopBtn" v-if="fileSLoading && isFileCancelToken" @click="cancelAjax('file')">停止</div>
  1114. <div class="add_chapters_box add_c_none" v-if="
  1115. infoData2 &&
  1116. infoData2.length == 0
  1117. ">
  1118. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1119. <span>暂时还没有内容,快去添加吧</span>
  1120. </div>
  1121. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1122. <div class="chapter_upload" v-for="(item1, index1) in infoData2" :key="item1.id" @click="
  1123. getChapterData(
  1124. $event,
  1125. index1,
  1126. item1.type
  1127. )
  1128. " >
  1129. <div class="chapter_upload_o" style="
  1130. position: relative;
  1131. display: flex;
  1132. align-items: center;
  1133. ">
  1134. <div class="chapter_upload_check" :class="{ checked: dataCheckPan(item1.fileid) }" @click="checkInfoData(item1.fileid, item1)"></div>
  1135. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1136. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1137. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1138. </div>
  1139. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1140. </div>
  1141. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1142. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1143. </div>
  1144. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1145. </div>
  1146. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1147. </div>
  1148. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1149. </div>
  1150. </div>
  1151. <div class="chapter_upload_n">
  1152. <input readonly="true" v-if="
  1153. item1.type == 2 ||
  1154. item1.type == 3 ||
  1155. item1.type == 12 ||
  1156. item1.type == 13 ||
  1157. item1.type == 7
  1158. " :placeholder="item1.name" @click.stop="
  1159. checkChpater2($event, index1 )
  1160. " style="
  1161. border: none;
  1162. outline: none;
  1163. width: 80%;
  1164. minwidth: 215px;
  1165. z-index: 99;
  1166. font-size: 14px;
  1167. white-space: nowrap;
  1168. overflow: hidden;
  1169. text-overflow: ellipsis;
  1170. " />
  1171. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1172. border: none;
  1173. outline: none;
  1174. width: 80%;
  1175. white-space: nowrap;
  1176. overflow: hidden;
  1177. text-overflow: ellipsis;
  1178. " readonly="true" @click="
  1179. selectAttText(index1)
  1180. " />
  1181. <input :placeholder="item1.title ? item1.title : '链接'
  1182. " v-if="item1.type == 8" style="
  1183. border: none;
  1184. outline: none;
  1185. width: 80%;
  1186. white-space: nowrap;
  1187. overflow: hidden;
  1188. text-overflow: ellipsis;
  1189. " readonly="true" @click="selectLine(index1)" />
  1190. <input :placeholder="item1.title ? item1.title : '链接'
  1191. " v-if="item1.type == 14" style="
  1192. border: none;
  1193. outline: none;
  1194. width: 80%;
  1195. white-space: nowrap;
  1196. overflow: hidden;
  1197. text-overflow: ellipsis;
  1198. " readonly="true" @click="
  1199. openUpdateSource(index1)
  1200. " />
  1201. </div>
  1202. <div class="chapter_upload_ic">
  1203. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1204. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1205. checkChpater2($event, index1 )
  1206. ">
  1207. <div></div>
  1208. </div>
  1209. <div class="chapter_upload_ic_r" @click.stop="
  1210. deleteInfoData2(
  1211. $event,
  1212. index1
  1213. )
  1214. ">
  1215. <div></div>
  1216. </div>
  1217. </div>
  1218. </div>
  1219. </div>
  1220. </div>
  1221. </div>
  1222. <div v-if="
  1223. infoproVisible
  1224. " class="mask">
  1225. <div class="progressBox">
  1226. <div class="lbox">
  1227. <img src="../../../assets/loading.gif" />上传中,请稍后
  1228. </div>
  1229. <div style="margin-bottom: 10px">
  1230. <span>{{
  1231. infoisFinishSize
  1232. }}</span>
  1233. /
  1234. <span>{{
  1235. infoisAllSize
  1236. }}</span>
  1237. </div>
  1238. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1239. ? infoprogress
  1240. : 0
  1241. " style="width: 80%"></el-progress> -->
  1242. </div>
  1243. </div>
  1244. </div>
  1245. </div>
  1246. <div class="whiteBg" :style="{ minHeight: textLoading ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(!(isuseT === true) && !(isuseT === 1) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool) || (yiKeTemplateArray.includes(templateid))">
  1247. <div class="c_pub_button_confirm stopBtn" v-if="textLoading && isTextCancelToken" @click="cancelAjax('text')">停止</div>
  1248. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1249. <div class="c_info_title" style="margin: 0 20px 0 20px;">
  1250. 课程简要描述
  1251. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1252. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  1253. @contextmenu.prevent="openAiDialog(1, 'aiDetail',1), addCourseBehavior('courseBehavior', '右键课程简要描述-AI优化按钮')"
  1254. @click="openAiDialog(2, 'aiDetail',1), addCourseBehavior('courseBehavior', '点击课程简要描述-AI优化按钮')">AI优化</button>
  1255. </el-tooltip>
  1256. <button class="c_pub_button_confirm" @click="clickGenTT2" style="margin: 0 0 0 5px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">生成概况和目标</button>
  1257. </div>
  1258. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1259. <div style="width: calc(100%);" class='op_task_box'>
  1260. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1261. placeholder="请输入课程简要描述" v-if="courseTextB"></textarea>
  1262. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" v-else-if="textLoading"></div>
  1263. <div class="markBox vditor-reset" v-html="MarkdownT(courseText)" v-else></div>
  1264. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1265. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1266. <div class="op_box_right">
  1267. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1268. <div class="r_pub_button_op"
  1269. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2), addCourseBehavior('courseBehavior', '右键课程简要描述-智能优化按钮')"
  1270. @click="openAiDialog(2, 'aiDetail', 2), addCourseBehavior('courseBehavior', '点击课程简要描述-智能优化按钮')">智能优化</div>
  1271. </el-tooltip>
  1272. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程简要描述-确定/编辑按钮')">{{ courseTextB ? '确定' : '编辑'}}</div>
  1273. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程简要描述-引用按钮')"></el-switch>
  1274. </div>
  1275. </div>
  1276. </div>
  1277. </div>
  1278. </div>
  1279. </div>
  1280. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="textLoading" element-loading-text="小可正在努力生成中,请稍等..." v-if="(isuseT === 1)">
  1281. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1282. <div class="c_info_title" style="margin: 0 20px 0 20px;position:relative;">
  1283. 课程概况<span class="inter_setting" @click="openInterPanSetting"></span>
  1284. <div class="inter_setting_panel" v-show="interSetting">
  1285. <div class="panel_title">配置工作流</div>
  1286. <div class="panel_tips">您可在创作者中心中创建工作流后,复制工作流链接并贴入</div>
  1287. <div class="panel_input">
  1288. <input type="text" :placeholder="this.aiJson.agentid ? this.aiJson.agentid : '请输入agentid'" class="binfo_input" v-model="agentid"/>
  1289. </div>
  1290. <div class="panel_button">
  1291. <button class="c_pub_button_confirm" @click="setAgentid">确认</button>
  1292. <button class="c_pub_button_confirm" @click="rebuildAgentid" v-if="istemplate != 1">复原</button>
  1293. <button class="c_pub_button_return" @click="cancelInterSetting">取消</button>
  1294. </div>
  1295. </div>
  1296. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;" @click="interPan = !interPan,forceUpdate2()">{{ interPan ? '折叠' : '展开'}}</button>
  1297. </div>
  1298. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box;display:flex;">
  1299. <div class="inter_box" v-show="interPan">
  1300. <iframe allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="interUrl" frameborder="0" v-if="interFlash && chatid" class="interIframe"></iframe>
  1301. </div>
  1302. <div style="width: calc(100%);height: 100%" class='op_task_box' :class="{inter_Detailbox: !courseTextB && interPan}">
  1303. <textarea style="height: 500px" class="binfo_input binfo_textarea" cols v-model="courseText"
  1304. placeholder="请输入课程简要描述" v-if="courseTextB && interPan"></textarea>
  1305. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
  1306. placeholder="请输入课程简要描述" v-else-if="courseTextB && !interPan"></textarea>
  1307. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="courseText" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-else-if="textLoading"></div>
  1308. <div class="markBox vditor-reset" :style="{height: interPan ? '500px' : 'auto', overflowY:'auto'}" v-html="MarkdownT(courseText)" v-else></div>
  1309. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail']}">
  1310. <div class="op_remark"></div>
  1311. <div class="op_box_right">
  1312. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1313. <div class="r_pub_button_op"
  1314. @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
  1315. @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
  1316. </el-tooltip> -->
  1317. <div class="r_pub_button_edit" style="margin-left:10px" @click="courseTextB = !courseTextB,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程概况-确定/编辑按钮')">{{ courseTextB ? '确定' : '编辑'}}</div>
  1318. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail'), addCourseBehavior('courseBehavior', '点击课程概况-引用按钮')"></el-switch>
  1319. </div>
  1320. </div>
  1321. </div>
  1322. </div>
  1323. </div>
  1324. </div>
  1325. <div class="whiteBg" :style="{ minHeight: targetTextLoading2 ? '250px' : 'auto'}" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-loading="targetTextLoading2" element-loading-text="小可正在努力生成中,请稍等..." v-if="((!(isuseT === true) && (!yiKeTemplateArray.includes(templateid))) || (isuseT === true && (!yiKeTemplateArray.includes(templateid)) && courseTextBool)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1326. <div class="c_pub_button_confirm stopBtn" v-if="targetTextLoading2 && isTargetCancelToken2" @click="cancelAjax('target2')">停止</div>
  1327. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1328. <div class="c_info_title" style="flex-wrap: wrap; position:relative;margin:0 20px;">
  1329. 课程目标
  1330. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px 0px 0px 10px;">
  1331. 上传补充资料
  1332. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1333. beforeUploadInfo2(
  1334. $event,
  1335. 16
  1336. )
  1337. " />
  1338. </button>
  1339. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-show="false">
  1340. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1341. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2',1)"
  1342. @click="openAiDialog(2, 'aitargetTextDetail2',1)">生成目标2</button>
  1343. </el-tooltip>
  1344. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1345. <button class="c_pub_button_confirm" style="margin: 0px 0 0px auto;"
  1346. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '右键课程目标-生成目标按钮')"
  1347. @click="openAiDialog(2, 'aitargetTextDetail3',1), addCourseBehavior('courseBehavior', '点击课程目标-生成目标按钮')">生成目标</button>
  1348. </el-tooltip>
  1349. <div style="margin-top: 10px;width:100%" v-if="mubiaoInfoData.length">
  1350. <div class="add_chapters_box add_c_none" v-if="
  1351. mubiaoInfoData &&
  1352. mubiaoInfoData.length == 0
  1353. ">
  1354. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1355. <span>暂时还没有内容,快去添加吧</span>
  1356. </div>
  1357. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1358. <div class="chapter_upload" v-for="(item1, index1) in mubiaoInfoData" :key="item1.id" @click="
  1359. getChapterData(
  1360. $event,
  1361. index1,
  1362. item1.type
  1363. )
  1364. " >
  1365. <div class="chapter_upload_o" style="
  1366. position: relative;
  1367. display: flex;
  1368. align-items: center;
  1369. ">
  1370. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1371. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1372. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1373. </div>
  1374. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1375. </div>
  1376. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1377. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1378. </div>
  1379. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1380. </div>
  1381. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1382. </div>
  1383. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1384. </div>
  1385. </div>
  1386. <div class="chapter_upload_n">
  1387. <input readonly="true" v-if="
  1388. item1.type == 2 ||
  1389. item1.type == 3 ||
  1390. item1.type == 12 ||
  1391. item1.type == 13 ||
  1392. item1.type == 7
  1393. " :placeholder="item1.name" @click.stop="
  1394. checkChpater3($event, index1, item1)
  1395. " style="
  1396. border: none;
  1397. outline: none;
  1398. width: 80%;
  1399. minwidth: 215px;
  1400. z-index: 99;
  1401. font-size: 14px;
  1402. white-space: nowrap;
  1403. overflow: hidden;
  1404. text-overflow: ellipsis;
  1405. " />
  1406. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1407. border: none;
  1408. outline: none;
  1409. width: 80%;
  1410. white-space: nowrap;
  1411. overflow: hidden;
  1412. text-overflow: ellipsis;
  1413. " readonly="true" @click="
  1414. selectAttText(index1)
  1415. " />
  1416. <input :placeholder="item1.title ? item1.title : '链接'
  1417. " v-if="item1.type == 8" style="
  1418. border: none;
  1419. outline: none;
  1420. width: 80%;
  1421. white-space: nowrap;
  1422. overflow: hidden;
  1423. text-overflow: ellipsis;
  1424. " readonly="true" @click="selectLine(index1)" />
  1425. <input :placeholder="item1.title ? item1.title : '链接'
  1426. " v-if="item1.type == 14" style="
  1427. border: none;
  1428. outline: none;
  1429. width: 80%;
  1430. white-space: nowrap;
  1431. overflow: hidden;
  1432. text-overflow: ellipsis;
  1433. " readonly="true" @click="
  1434. openUpdateSource(index1)
  1435. " />
  1436. </div>
  1437. <div class="chapter_upload_ic">
  1438. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1439. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  1440. checkChpater3($event, index1, item1)
  1441. ">
  1442. <div></div>
  1443. </div>
  1444. <div class="chapter_upload_ic_r" @click.stop="
  1445. deletemubiaoInfoData(
  1446. $event,
  1447. index1
  1448. )
  1449. ">
  1450. <div></div>
  1451. </div>
  1452. </div>
  1453. </div>
  1454. </div>
  1455. </div>
  1456. </div>
  1457. <div v-if="
  1458. mubiaoinfoproVisible
  1459. " class="mask">
  1460. <div class="progressBox">
  1461. <div class="lbox">
  1462. <img src="../../../assets/loading.gif" />上传中,请稍后
  1463. </div>
  1464. <div style="margin-bottom: 10px">
  1465. <span>{{
  1466. mubiaoinfoisFinishSize
  1467. }}</span>
  1468. /
  1469. <span>{{
  1470. mubiaoinfoisAllSize
  1471. }}</span>
  1472. </div>
  1473. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="mubiaoinfoprogress
  1474. ? mubiaoinfoprogress
  1475. : 0
  1476. " style="width: 80%"></el-progress> -->
  1477. </div>
  1478. </div>
  1479. </div>
  1480. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1481. <div style="width: calc(100%);" class='op_task_box'>
  1482. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="targetCourseText2"
  1483. placeholder="请输入课程目标" v-if="targetCourseText2B"></textarea>
  1484. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="targetCourseText2" v-else-if="targetTextLoading2"></div>
  1485. <div class="markBox vditor-reset" v-html="MarkdownT(targetCourseText2)" v-else></div>
  1486. <div class="op_box" :class="{op_box_isquote: isQuote['aitargetTextDetail2']}">
  1487. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1488. <div class="op_box_right">
  1489. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1490. <div class="r_pub_button_op"
  1491. @contextmenu.prevent="openAiDialog(1, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '右键课程目标-智能优化按钮')"
  1492. @click="openAiDialog(2, 'aitargetTextDetail2', 2), addCourseBehavior('courseBehavior', '点击课程目标-智能优化按钮')">智能优化</div>
  1493. </el-tooltip>
  1494. <div class="r_pub_button_edit" style="margin-left:10px" @click="targetCourseText2B = !targetCourseText2B,forceUpdate2(), addCourseBehavior('courseBehavior', '点击课程目标-确定/编辑按钮')">{{ targetCourseText2B ? '确定' : '编辑'}}</div>
  1495. <el-switch style="margin-left: 10px" v-model="isQuote['aitargetTextDetail2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aitargetTextDetail2'), addCourseBehavior('courseBehavior', '点击课程目标-引用按钮')"></el-switch>
  1496. </div>
  1497. </div>
  1498. </div>
  1499. </div>
  1500. </div>
  1501. </div>
  1502. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="yiKeTemplateArray.includes(templateid)">
  1503. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1504. <div class="c_info_title">
  1505. 补充资料
  1506. <button class="c_pub_button_add pub_btn_add_img" style="margin: 0 20px 0 auto;">上传补充资料</button>
  1507. </div>
  1508. <div class="buchong_box">
  1509. <span>暂时还没有内容,快去添加吧~</span>
  1510. </div>
  1511. </div> -->
  1512. <div style="position: relative;
  1513. background: #fff;
  1514. box-sizing: border-box;
  1515. padding: 1px 20px 10px;
  1516. width: 100%;
  1517. border-radius: 10px;">
  1518. <div style="
  1519. display: flex;
  1520. flex-direction: row;
  1521. justify-content: space-between;
  1522. align-items: center;
  1523. " :style="{
  1524. margin: true
  1525. ? '20px 0 10px'
  1526. : '20px 0 0',
  1527. }">
  1528. <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
  1529. 补充资料
  1530. <div class="add_info_box" style="margin: 0 0 0 auto">
  1531. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  1532. 上传补充资料
  1533. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  1534. beforeUploadInfo2(
  1535. $event,
  1536. 13
  1537. )
  1538. " />
  1539. </button>
  1540. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  1541. 图文
  1542. </button>
  1543. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  1544. 链接
  1545. </button>
  1546. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  1547. 代码
  1548. </button>
  1549. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  1550. 资源
  1551. </button> -->
  1552. </div>
  1553. </div>
  1554. </div>
  1555. <div>
  1556. <div class="add_chapters_box add_c_none" v-if="
  1557. infoData &&
  1558. infoData.length == 0
  1559. ">
  1560. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  1561. <span>暂时还没有内容,快去添加吧</span>
  1562. </div>
  1563. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  1564. <div @dragstart="
  1565. dragStart(item1, index1, 0)
  1566. " @dragover.prevent="
  1567. dragOver(index1, 0)
  1568. " @dragend="dragEnd()" :draggable="isdrag ==
  1569. 'chapter-' + 0 + '-' + index1
  1570. " class="chapter_upload" v-for="(item1, index1) in infoData" :key="item1.id" @click="
  1571. getChapterData(
  1572. $event,
  1573. index1,
  1574. item1.type
  1575. )
  1576. " :class="{
  1577. dragOverTop2:
  1578. newIndex === index1 &&
  1579. typeIndex ==
  1580. 'chapter-' +
  1581. 0 +
  1582. '-' +
  1583. index1 &&
  1584. oldIndex > index1 &&
  1585. dragType == 'drag',
  1586. dragOverBottom2:
  1587. newIndex === index1 &&
  1588. typeIndex ==
  1589. 'chapter-' +
  1590. 0 +
  1591. '-' +
  1592. index1 &&
  1593. oldIndex < index1 &&
  1594. dragType == 'drag',
  1595. }">
  1596. <!-- <div @mousedown="
  1597. isdrag =
  1598. 'chapter-' + 0 + '-' + index1
  1599. " @mouseup="isdrag = ''" @touchstart="
  1600. isdrag =
  1601. 'chapter-' + 0 + '-' + index1
  1602. " @touchend="isdrag = ''" class="chapter_upload_drag"></div> -->
  1603. <div class="chapter_upload_o" style="
  1604. position: relative;
  1605. display: flex;
  1606. align-items: center;
  1607. ">
  1608. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  1609. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  1610. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  1611. </div>
  1612. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  1613. </div>
  1614. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  1615. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  1616. </div>
  1617. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  1618. </div>
  1619. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  1620. </div>
  1621. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  1622. </div>
  1623. </div>
  1624. <div class="chapter_upload_n">
  1625. <input readonly="true" v-if="
  1626. item1.type == 2 ||
  1627. item1.type == 3 ||
  1628. item1.type == 12 ||
  1629. item1.type == 13 ||
  1630. item1.type == 7
  1631. " :placeholder="item1.name" @click="
  1632. updataVideoT(
  1633. $event,
  1634. index1
  1635. )
  1636. " style="
  1637. border: none;
  1638. outline: none;
  1639. width: 80%;
  1640. minwidth: 215px;
  1641. z-index: 99;
  1642. font-size: 14px;
  1643. white-space: nowrap;
  1644. overflow: hidden;
  1645. text-overflow: ellipsis;
  1646. " />
  1647. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  1648. border: none;
  1649. outline: none;
  1650. width: 80%;
  1651. white-space: nowrap;
  1652. overflow: hidden;
  1653. text-overflow: ellipsis;
  1654. " readonly="true" @click="
  1655. selectAttText(index1)
  1656. " />
  1657. <input :placeholder="item1.title ? item1.title : '链接'
  1658. " v-if="item1.type == 8" style="
  1659. border: none;
  1660. outline: none;
  1661. width: 80%;
  1662. white-space: nowrap;
  1663. overflow: hidden;
  1664. text-overflow: ellipsis;
  1665. " readonly="true" @click="selectLine(index1)" />
  1666. <input :placeholder="item1.title ? item1.title : '链接'
  1667. " v-if="item1.type == 14" style="
  1668. border: none;
  1669. outline: none;
  1670. width: 80%;
  1671. white-space: nowrap;
  1672. overflow: hidden;
  1673. text-overflow: ellipsis;
  1674. " readonly="true" @click="
  1675. openUpdateSource(index1)
  1676. " />
  1677. </div>
  1678. <div class="chapter_upload_ic">
  1679. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  1680. <!-- <div class="chapter_upload_ud" style="z-index: 99">
  1681. <div class="chapter_upload_up" @click="
  1682. upCd(
  1683. $event,
  1684. index1
  1685. )
  1686. "></div>
  1687. <div class="chapter_upload_down" @click="
  1688. downCd(
  1689. $event,
  1690. index1
  1691. )
  1692. "></div>
  1693. </div>
  1694. <div class="chapter_upload_ic_edit" v-if="
  1695. item1.type == 2 ||
  1696. item1.type == 3 ||
  1697. item1.type == 12 ||
  1698. item1.type == 13 ||
  1699. item1.type == 7
  1700. " @click.stop="
  1701. updataVideoT(
  1702. $event,
  1703. index1
  1704. )
  1705. ">
  1706. <div></div>
  1707. </div>
  1708. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  1709. selectAttText(index1)
  1710. ">
  1711. <div></div>
  1712. </div>
  1713. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  1714. @click="selectLine(index1)">
  1715. <div></div>
  1716. </div>
  1717. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  1718. openUpdateSource(index1)
  1719. ">
  1720. <div></div>
  1721. </div> -->
  1722. <div class="chapter_upload_ic_r" @click.stop="
  1723. deleteInfoData(
  1724. $event,
  1725. index1
  1726. )
  1727. ">
  1728. <div></div>
  1729. </div>
  1730. </div>
  1731. </div>
  1732. </div>
  1733. </div>
  1734. </div>
  1735. <div v-if="
  1736. infoproVisible
  1737. " class="mask">
  1738. <div class="progressBox">
  1739. <!-- <div id="closePro" class="closeCss">
  1740. <img src="../../../../assets/icon/close.png" alt />
  1741. </div> -->
  1742. <div class="lbox">
  1743. <img src="../../../assets/loading.gif" />上传中,请稍后
  1744. </div>
  1745. <div style="margin-bottom: 10px">
  1746. <span>{{
  1747. infoisFinishSize
  1748. }}M</span>
  1749. /
  1750. <span>{{
  1751. infoisAllSize
  1752. }}M</span>
  1753. </div>
  1754. <el-progress :text-inside="true" :stroke-width="20" :percentage="infoprogress
  1755. ? infoprogress
  1756. : 0
  1757. " style="width: 80%"></el-progress>
  1758. </div>
  1759. </div>
  1760. </div>
  1761. </div>
  1762. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="false">
  1763. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1764. <div class="c_info_title">
  1765. 补充描述
  1766. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1767. </div>
  1768. <div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
  1769. <div style="width: calc(100%)">
  1770. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText2"
  1771. placeholder="请输入课程补充描述:例如您期望的课程时长、任务数量、任务难度、任务类型等。"></textarea>
  1772. </div>
  1773. </div>
  1774. </div>
  1775. </div>
  1776. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3' && isOutline">
  1777. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1778. <div class="c_info_title">
  1779. 课程大纲
  1780. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
  1781. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1782. @contextmenu.prevent="openAiDialog(1, 'aiOutline')"
  1783. @click="openAiDialog(2, 'aiOutline')" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1784. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1785. @contextmenu.prevent="openAiDialog(1, 'aiOutline2')"
  1786. @click="openAiDialog(2, 'aiOutline2')" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'">生成大纲</button>
  1787. </el-tooltip>
  1788. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1789. @click="openAiDialog2(2, 'aiOutline'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')" v-if="panOutline() > 0 && templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && istemplate != 1">重新生成大纲</button>
  1790. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1791. @click="openAiDialog2(2, 'aiOutline2'), addCourseBehavior('courseBehavior', '点击课程大纲-重新生成课程大纲按钮')" v-if="panOutline() > 0 && (templateid == '61c628b9-3d96-11ef-b873-005056b86db5') && istemplate != 1">重新生成大纲</button>
  1792. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1793. </div>
  1794. <div class="task_outline">
  1795. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1796. <div class="outline_task">
  1797. <div class="title">任务{{ index + 1 }}</div>
  1798. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1799. v-model="item.task" />
  1800. <div class="outline_btn">
  1801. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1802. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @contextmenu.prevent="openAiDialog(1, 'aiOutlineDetail2', index)" @click="openAiDialog(2, 'aiOutlineDetail2', index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-${item.taskDetail2 ? '重新生成任务' : '生成任务'}按钮`)">{{ item.taskDetail2 ? "重新生成任务" : "生成任务"}}</button>
  1803. </el-tooltip>
  1804. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(1, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在上面加入一个任务按钮`)">在上面加入一个任务</button>
  1805. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="addTaskBorder2(2, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-在下面加入一个任务按钮`)">在下面加入一个任务</button>
  1806. <button class="c_pub_button_confirm2" style="margin: 0px 0px 0px 5px;" @click="deleteTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-删除按钮`)" v-if="unitJson[0].chapterInfo[0].taskJson.length > 1">删除</button>
  1807. </div>
  1808. </div>
  1809. <div class="outline_detail" :style="{ minHeight: taskDetailLoading.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1810. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading.indexOf('task-' + index) !== -1 && isOutlineTaskCancelToken[index]" @click="cancelAjax('outlineTask', index)">停止</div>
  1811. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  1812. placeholder="请输入任务描述" v-model="item.taskDetail2" v-if="item.isTask2"></textarea>
  1813. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail2" v-else-if="ttaskDetailLoading.indexOf('task-' + index) !== -1"></div>
  1814. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail2)" v-else></div>
  1815. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail1-'+index]}">
  1816. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1817. <div class="op_box_right">
  1818. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1819. <div class="r_pub_button_op"
  1820. @contextmenu.prevent="openAiDialog(1, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `右键课程大纲-任务${index + 1}-智能优化按钮`)"
  1821. @click="openAiDialog(2, 'aiDetail1', item, index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-智能优化按钮`)">智能优化</div>
  1822. </el-tooltip>
  1823. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask2(index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-确定/编辑按钮`)">{{
  1824. item.isTask2 ? '确定' : '编辑'}}</div>
  1825. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail1-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail1-'+index), addCourseBehavior('courseBehavior', `点击课程大纲-任务${index + 1}-引用按钮`)"></el-switch>
  1826. </div>
  1827. </div>
  1828. </div>
  1829. </div>
  1830. </div>
  1831. </div>
  1832. </div>
  1833. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 0 || istemplate == 1)">
  1834. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1835. <div class="c_info_title">
  1836. 概念群
  1837. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1838. @click="openAiDialog2(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-重新生成概念群按钮`)">{{cpote.cpote1 ? '重新生成概念群' : '生成概念群'}}</button>
  1839. </div>
  1840. <div class="task_outline">
  1841. <div class="outline_detail" v-loading="cpoteLoading.cpote1" element-loading-text="小可正在努力生成中,请稍等...">
  1842. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
  1843. v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
  1844. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote1" v-else-if="cpotetLoading.cpote1"></div>
  1845. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
  1846. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote1']}">
  1847. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1848. <div class="op_box_right">
  1849. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1850. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1'), addCourseBehavior('courseBehavior', `右键概念群-智能优化按钮`)"
  1851. @click="openAiDialog(2, 'aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-智能优化按钮`)">智能优化</div>
  1852. </el-tooltip>
  1853. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s'), addCourseBehavior('courseBehavior', `点击概念群-确定/编辑按钮`)">{{
  1854. cpote.cpote1s ? '确定' : '编辑'}}</div>
  1855. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote1']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote1'), addCourseBehavior('courseBehavior', `点击概念群-引用按钮`)"></el-switch>
  1856. </div>
  1857. </div>
  1858. </div>
  1859. </div>
  1860. </div>
  1861. </div>
  1862. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 1 || istemplate == 1)">
  1863. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1864. <div class="c_info_title">
  1865. 问题链
  1866. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1867. @click="openAiDialog2(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-重新生成问题链按钮`)">{{cpote.cpote2 ? '重新生成问题链' : '生成问题链'}}</button>
  1868. </div>
  1869. <div class="task_outline">
  1870. <div class="outline_detail" v-loading="cpoteLoading.cpote2" element-loading-text="小可正在努力生成中,请稍等...">
  1871. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
  1872. v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
  1873. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote2" v-else-if="cpotetLoading.cpote2"></div>
  1874. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
  1875. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote2']}">
  1876. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1877. <div class="op_box_right">
  1878. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1879. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2'), addCourseBehavior('courseBehavior', `右键问题链-智能优化按钮`)"
  1880. @click="openAiDialog(2, 'aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-智能优化按钮`)">智能优化</div>
  1881. </el-tooltip>
  1882. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s'), addCourseBehavior('courseBehavior', `点击问题链-确定/编辑按钮`)">{{
  1883. cpote.cpote2s ? '确定' : '编辑'}}</div>
  1884. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote2']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote2'), addCourseBehavior('courseBehavior', `点击问题链-引用按钮`)"></el-switch>
  1885. </div>
  1886. </div>
  1887. </div>
  1888. </div>
  1889. </div>
  1890. </div>
  1891. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 2 || istemplate == 1)">
  1892. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1893. <div class="c_info_title">
  1894. 目标层
  1895. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1896. @click="openAiDialog2(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-重新生成目标层按钮`)">{{cpote.cpote3 ? '重新生成目标层' : '生成目标层'}}</button>
  1897. </div>
  1898. <div class="task_outline">
  1899. <div class="outline_detail" v-loading="cpoteLoading.cpote3" element-loading-text="小可正在努力生成中,请稍等...">
  1900. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
  1901. v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
  1902. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote3" v-else-if="cpotetLoading.cpote3"></div>
  1903. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
  1904. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote3']}">
  1905. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1906. <div class="op_box_right">
  1907. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1908. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3'), addCourseBehavior('courseBehavior', `右键目标层-智能优化按钮`)"
  1909. @click="openAiDialog(2, 'aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-智能优化按钮`)">智能优化</div>
  1910. </el-tooltip>
  1911. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s'), addCourseBehavior('courseBehavior', `点击目标层-确定/编辑按钮`)">{{
  1912. cpote.cpote3s ? '确定' : '编辑'}}</div>
  1913. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote3']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote3'), addCourseBehavior('courseBehavior', `点击目标层-引用按钮`)"></el-switch>
  1914. </div>
  1915. </div>
  1916. </div>
  1917. </div>
  1918. </div>
  1919. </div>
  1920. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3') && (cpoteType > 3 || istemplate == 1)">
  1921. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1922. <div class="c_info_title">
  1923. 任务簇
  1924. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1925. @click="openAiDialog2(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-重新生成任务簇按钮`)">{{cpote.cpote4 ? '重新生成任务簇' : '生成任务簇'}}</button>
  1926. </div>
  1927. <div class="task_outline">
  1928. <div class="outline_detail" v-loading="cpoteLoading.cpote4" element-loading-text="小可正在努力生成中,请稍等...">
  1929. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
  1930. v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
  1931. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="cpote.cpote4" v-else-if="cpotetLoading.cpote4"></div>
  1932. <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
  1933. <div class="op_box" :class="{op_box_isquote: isQuote['aiCpote4']}">
  1934. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1935. <div class="op_box_right">
  1936. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1937. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4'), addCourseBehavior('courseBehavior', `右键任务簇-智能优化按钮`)"
  1938. @click="openAiDialog(2, 'aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-智能优化按钮`)">智能优化</div>
  1939. </el-tooltip>
  1940. <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s'), addCourseBehavior('courseBehavior', `点击任务簇-确定/编辑按钮`)">{{
  1941. cpote.cpote4s ? '确定' : '编辑'}}</div>
  1942. <el-switch style="margin-left: 10px" v-model="isQuote['aiCpote4']" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiCpote4'), addCourseBehavior('courseBehavior', `点击任务簇-引用按钮`)"></el-switch>
  1943. </div>
  1944. </div>
  1945. </div>
  1946. </div>
  1947. </div>
  1948. </div>
  1949. <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="isOutline2">
  1950. <div class="whiteBg" style="border-radius: 0; margin-top: 15px">
  1951. <div class="c_info_title">
  1952. 教案
  1953. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1 && dArray.length && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'">
  1954. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1955. @contextmenu.prevent="openAiDialog(1, 'aiTeacher2')"
  1956. @click="openAiDialog(2, 'aiTeacher2')">生成教案</button>
  1957. </el-tooltip>
  1958. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1959. @click="openAiDialog2(2, 'aiTeacher2'), addCourseBehavior('courseBehavior', `点击教案-重新生成教案按钮`)" v-if="panTeacher() > 0 && istemplate != 1">重新生成教案</button>
  1960. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="panTeacher() == 0 && istemplate == 1 && (templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3')">
  1961. <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
  1962. @contextmenu.prevent="openAiDialog(1, 'aiTeacher3')"
  1963. @click="openAiDialog(2, 'aiTeacher3')">生成教案</button>
  1964. </el-tooltip>
  1965. <!-- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;">AI优化</button> -->
  1966. </div>
  1967. <div class="task_outline">
  1968. <div class="outline_box" v-for="(item, index) in unitJson[0].chapterInfo[0].taskJson" :key="index">
  1969. <div class="outline_task">
  1970. <div class="title">任务{{ index + 1 }}</div>
  1971. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  1972. v-model="item.task" />
  1973. </div>
  1974. <div class="outline_detail" :style="{ minHeight: taskDetailLoading5.indexOf('task-' + index) !== -1 ? '250px' : 'auto'}" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  1975. <div div class="c_pub_button_confirm stopBtn" v-if="taskDetailLoading5.indexOf('task-' + index) !== -1" @click="cancelAjax('teacherDetail2', index)">停止</div>
  1976. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
  1977. v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
  1978. <div class="markBox vditor-reset" style="white-space:pre-wrap;" v-text="item.taskDetail3" v-else-if="ttaskDetailLoading5.indexOf('task-' + index) !== -1"></div>
  1979. <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
  1980. <div class="op_box" :class="{op_box_isquote: isQuote['teacherDetail2-'+index]}">
  1981. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  1982. <div class="op_box_right">
  1983. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  1984. <div class="r_pub_button_op"
  1985. @contextmenu.prevent="openAiDialog(1, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `右键教案-任务${index + 1}-智能优化按钮`)"
  1986. @click="openAiDialog(2, 'teacherDetail2', item.taskDetail3, index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-智能优化按钮`)">智能优化</div>
  1987. </el-tooltip>
  1988. <div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{
  1989. item.isTask3 ? '确定' : '编辑'}}</div>
  1990. <el-switch style="margin-left: 10px" v-model="isQuote['teacherDetail2-'+index]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('teacherDetail2-'+index), addCourseBehavior('courseBehavior', `点击教案-任务${index + 1}-引用按钮`)"></el-switch>
  1991. </div>
  1992. </div>
  1993. </div>
  1994. </div>
  1995. </div>
  1996. </div>
  1997. </div>
  1998. <div class="info_btnBox3" v-if="istemplate != 1">
  1999. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2000. goTo(
  2001. '/course?userid=' +
  2002. userid +
  2003. '&oid=' +
  2004. oid +
  2005. '&org=' +
  2006. org +
  2007. '&role=' +
  2008. role
  2009. )
  2010. ">
  2011. 返回课程
  2012. </button>
  2013. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2014. {{ steps == 4 ? "返回课程" : "上一步" }}
  2015. </button>
  2016. <button class="c_pub_button_confirm" v-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid)) && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" @click="clickGenTT2">
  2017. {{isuseT === true ? "重新生成概况和目标" : "生成概况和目标"}}
  2018. </button>
  2019. <button class="c_pub_button_confirm" v-else-if="isuseT === true && !isOutline && !courseTextBool && (!yiKeTemplateArray.includes(templateid))" @click="clickGenTT2">
  2020. {{isuseT === true ? "重新生成概况" : "生成概况"}}
  2021. </button>
  2022. <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
  2023. {{ "导出教案" }}
  2024. </button>
  2025. <!-- ((isuseT || courseTextBool) && (!yiKeTemplateArray.includes(templateid))) && -->
  2026. <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="steps < 4">
  2027. <button class="c_pub_button_confirm" @click="nextSteps(2)"
  2028. @contextmenu.prevent="nextSteps(1)" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'" :class="{
  2029. pub_btn_next_img: steps != 3,
  2030. pub_btn_finish_img: steps == 3,
  2031. }">
  2032. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
  2033. </button>
  2034. <button class="c_pub_button_confirm" v-else @click="nextSteps(2)"
  2035. @contextmenu.prevent="nextSteps(1)" :class="{
  2036. pub_btn_next_img: steps != 3,
  2037. pub_btn_finish_img: steps == 3,
  2038. }">
  2039. {{ steps == 3 ? "确认上传" : ((templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && cpoteType < 4) ?
  2040. cpoteType < 3 ? cpoteType < 2 ? cpoteType < 1 ? "生成概念群" : "生成问题链" : "生成目标层" : "生成任务簇" : !isOutline2 ? "生成教案"
  2041. : "下一步" }}
  2042. </button>
  2043. </el-tooltip>
  2044. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
  2045. <button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
  2046. pub_btn_next_img: steps != 3,
  2047. pub_btn_finish_img: steps == 3,
  2048. }">下一步2</button>
  2049. </el-tooltip> -->
  2050. </div>
  2051. </div>
  2052. <div class="rightBox" v-if="steps == 2" :style="{
  2053. height:
  2054. !isStepDisplay && !isBtnDisplay
  2055. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  2056. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2057. }">
  2058. <div class="basic_box" style="
  2059. padding: 20px 30px 0px !important;
  2060. box-sizing: border-box;
  2061. height: calc(100% - 80px);
  2062. overflow: auto;
  2063. background: #fff;
  2064. ">
  2065. <!-- <div
  2066. style="
  2067. color: #b8b8b8;
  2068. background: #fff;
  2069. width: 26%;
  2070. height: 40px;
  2071. border-radius: 15px;
  2072. padding-left: 20px;
  2073. line-height: 40px;
  2074. font-size: 17px;
  2075. box-shadow: 0px 1px 2px 2px #e0e0e0;
  2076. "
  2077. >-->
  2078. <div class="right_title" style="border: none; margin: 0; padding: 0">
  2079. 请选择合适的课程模板
  2080. </div>
  2081. <div class="wordbox">
  2082. <div class="wordTeacher" @click="checkTemplate2()">
  2083. <div class="wordPic">
  2084. <img src="../../../assets/icon/new/template_none.png" alt />
  2085. </div>
  2086. <div style="
  2087. margin-top: 10px;
  2088. line-height: 19px;
  2089. overflow: hidden;
  2090. text-overflow: ellipsis;
  2091. white-space: nowrap;
  2092. padding: 0 20px;
  2093. ">
  2094. 空白模板
  2095. </div>
  2096. </div>
  2097. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkTemplate(aa)">
  2098. <div class="wordPic">
  2099. <img src="../../../assets/icon/new/template.png" alt />
  2100. </div>
  2101. <div style="
  2102. margin-top: 10px;
  2103. line-height: 19px;
  2104. overflow: hidden;
  2105. text-overflow: ellipsis;
  2106. white-space: nowrap;
  2107. padding: 0 20px;
  2108. ">
  2109. {{ aa.title }}
  2110. </div>
  2111. </div>
  2112. <div class="wordTeacher" @click="checkTemplate3()" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'">
  2113. <div class="wordPic">
  2114. <img src="../../../assets/icon/new/template.png" alt />
  2115. </div>
  2116. <div style="
  2117. margin-top: 10px;
  2118. line-height: 19px;
  2119. overflow: hidden;
  2120. text-overflow: ellipsis;
  2121. white-space: nowrap;
  2122. padding: 0 20px;
  2123. ">
  2124. 简易模板
  2125. </div>
  2126. </div>
  2127. <div class="wordTeacher" @click="pasteStage()" v-if="isPasteStage">
  2128. <div class="wordPic">
  2129. <img src="../../../assets/icon/new/template.png" alt />
  2130. </div>
  2131. <div style="
  2132. margin-top: 10px;
  2133. line-height: 19px;
  2134. overflow: hidden;
  2135. text-overflow: ellipsis;
  2136. white-space: nowrap;
  2137. padding: 0 20px;
  2138. ">
  2139. 智能粘贴模式
  2140. </div>
  2141. </div>
  2142. <!-- <div class="wordTeacher" @click="checkTemplate4()">
  2143. <div class="wordPic">
  2144. <img src="../../../assets/icon/wordMub.png" alt />
  2145. </div>
  2146. <div style="
  2147. margin-top: 10px;
  2148. line-height: 19px;
  2149. overflow: hidden;
  2150. text-overflow: ellipsis;
  2151. white-space: nowrap;
  2152. padding: 0 20px;
  2153. ">
  2154. 未来小学课程设计
  2155. </div>
  2156. </div> -->
  2157. <!-- <div class="wordTeacher" @click="checkTemplate1()">
  2158. <div class="wordPic">
  2159. <img src="../../../assets/icon/wordMub.png" alt />
  2160. </div>
  2161. <div style="
  2162. margin-top: 10px;
  2163. line-height: 19px;
  2164. overflow: hidden;
  2165. text-overflow: ellipsis;
  2166. white-space: nowrap;
  2167. padding: 0 20px;
  2168. ">
  2169. 我的课程
  2170. </div>
  2171. </div> -->
  2172. </div>
  2173. </div>
  2174. <div class="info_btnBox3" style="position: absolute; bottom: 0">
  2175. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  2176. goTo(
  2177. '/course?userid=' +
  2178. userid +
  2179. '&oid=' +
  2180. oid +
  2181. '&org=' +
  2182. org +
  2183. '&role=' +
  2184. role
  2185. )
  2186. ">
  2187. 返回课程
  2188. </button>
  2189. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
  2190. {{ steps == 4 ? "返回课程" : "上一步" }}
  2191. </button>
  2192. <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
  2193. pub_btn_next_img: steps != 3,
  2194. pub_btn_finish_img: steps == 3,
  2195. }">
  2196. {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : "下一步" }}
  2197. </button>
  2198. </div>
  2199. </div>
  2200. <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
  2201. height:
  2202. !isStepDisplay && !isBtnDisplay
  2203. ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
  2204. : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
  2205. }">
  2206. <div class="rb_c_box">
  2207. <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
  2208. <div class="rb_c_nav">
  2209. <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
  2210. <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
  2211. </div>
  2212. <div class="stepsBottom" v-if="stepsNav == 1" :style="{
  2213. height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
  2214. position: istemplate == 1 ? 'sticky' : 'unset',
  2215. top: istemplate == 1 ? '0' : 'unset'
  2216. }">
  2217. <!-- <div class="navTop">辅助导航</div> -->
  2218. <div class="navBottom" v-if="courseState == 4 || courseState == 5">
  2219. <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
  2220. <div class="nt_taskBox" style="width: 100%;">
  2221. <div class="nt_taskTitle"
  2222. style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
  2223. unitIndex + 1 }}</div>
  2224. <div class="nt_taskName" style="font-size: 16px;font-weight: 700;">
  2225. <el-tooltip effect="light" :content="unitJson[unitIndex].dyName" placement="top">
  2226. <span>{{ unitJson[unitIndex].dyName }}</span>
  2227. </el-tooltip>
  2228. </div>
  2229. </div>
  2230. </div> -->
  2231. <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
  2232. .taskJson" :key="tIndex" :class="{
  2233. dragOverTop:
  2234. newIndex === tIndex &&
  2235. typeIndex == 'task-' + tIndex &&
  2236. oldIndex > tIndex &&
  2237. dragType == 'task',
  2238. dragOverBottom:
  2239. newIndex === tIndex &&
  2240. typeIndex == 'task-' + tIndex &&
  2241. oldIndex < tIndex &&
  2242. dragType == 'task',
  2243. }">
  2244. <div @dragstart="dragTaskStart(t, tIndex, 0)" @dragover.prevent="dragTaskOver(tIndex, 0)"
  2245. @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + tIndex" @click="goToTask(tIndex)"
  2246. class="navTask" :class="{
  2247. isNavTask:
  2248. isClickColor > 0 && isClickColor == tIndex + 1,
  2249. isNavOpen: t.toolOpen,
  2250. }">
  2251. <div @click.stop="taskOpen(tIndex, 0)" class="chapter_upload_open"></div>
  2252. <div @mousedown="isdrag = 'task-' + tIndex" @mouseup="isdrag = ''"
  2253. @touchstart="isdrag = 'task-' + tIndex" @touchend="isdrag = ''" style="left: 8px"
  2254. class="chapter_upload_drag"></div>
  2255. <div class="nt_taskBox">
  2256. <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
  2257. <div class="nt_taskName">
  2258. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2259. <span>{{ t.task ? t.task : "未命名任务" }}</span>
  2260. </el-tooltip>
  2261. </div>
  2262. </div>
  2263. <!-- <div class="moveBtn" v-if="unitJson[unitIndex].chapterInfo[0].taskJson.length >
  2264. 1
  2265. ">
  2266. <div class="chapter_upload_up" style="margin: 0 5px 0 0;width: 25px;height: 25px;"
  2267. @click.stop="taskMove(1, tIndex)"></div>
  2268. <div class="chapter_upload_down" style="width: 25px;height: 25px;"
  2269. @click.stop="taskMove(2, tIndex)"></div>
  2270. </div> -->
  2271. </div>
  2272. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2273. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2274. @click="jumpGj(tIndex, toolIndex2)">
  2275. <div class="gjCss" :class="{
  2276. isGjCss:
  2277. toolIndexType == `gj${tIndex}${toolIndex2}`,
  2278. }">
  2279. <div>工具{{ toolIndex2 + 1 }}:</div>
  2280. <div>
  2281. {{
  2282. toolsData[tool.tool[0]] &&
  2283. toolsData[tool.tool[0]].name
  2284. }}
  2285. </div>
  2286. </div>
  2287. </div>
  2288. </div>
  2289. </div>
  2290. </div>
  2291. <div class="navBottom" v-if="courseState == 1">
  2292. <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" :class="{
  2293. dragOverTop:
  2294. newIndex === stageIndex &&
  2295. typeIndex == 'Unit-' + stageIndex &&
  2296. oldIndex > stageIndex &&
  2297. dragType == 'Unit',
  2298. dragOverBottom:
  2299. newIndex === stageIndex &&
  2300. typeIndex == 'Unit-' + stageIndex &&
  2301. oldIndex < stageIndex &&
  2302. dragType == 'Unit',
  2303. }">
  2304. <div @dragstart="dragUnitStart(stage, stageIndex)" @dragover.prevent="dragUnitOver(stageIndex)"
  2305. @dragend="dragUnitEnd()" :draggable="isdrag == 'unit-' + stageIndex"
  2306. @click="unitSet2(stageIndex)" class="navStage" :class="{
  2307. isNavStage: stageIndex == unitIndex,
  2308. isNavStageOpen: stage.toolOpen,
  2309. }">
  2310. <div @mousedown="isdrag = 'unit-' + stageIndex" @mouseup="isdrag = ''"
  2311. @touchstart="isdrag = 'unit-' + stageIndex" @touchend="isdrag = ''" style="left: 8px"
  2312. class="chapter_upload_drag"></div>
  2313. <div class="nt_taskBox">
  2314. <div class="nt_taskTitle">
  2315. 第{{ stageIndex + 1 }}阶段:
  2316. </div>
  2317. <div class="nt_taskName">
  2318. <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'
  2319. " placement="top">
  2320. <span>{{
  2321. stage.dyName ? stage.dyName : "未命名阶段"
  2322. }}</span>
  2323. </el-tooltip>
  2324. </div>
  2325. </div>
  2326. <div @click.stop="unitOpen(stageIndex)" class="chapter_unit_open"></div>
  2327. </div>
  2328. <div v-for="(t, tIndex) in unitJson[stageIndex]
  2329. .chapterInfo[0].taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
  2330. dragOverTop:
  2331. newIndex === tIndex &&
  2332. typeIndex == 'task-' + tIndex &&
  2333. ((oldIndex > tIndex &&
  2334. stageIndex == checkUnitIndex) ||
  2335. (oldIndex == tIndex &&
  2336. stageIndex == checkUnitIndex &&
  2337. checkUnitIndex != oldUnitIndex)) &&
  2338. dragType == 'task',
  2339. dragOverBottom:
  2340. newIndex === tIndex &&
  2341. typeIndex == 'task-' + tIndex &&
  2342. oldIndex < tIndex &&
  2343. stageIndex == checkUnitIndex &&
  2344. dragType == 'task',
  2345. }" :style="{ display: stage.toolOpen ? 'block' : 'none' }">
  2346. <div @dragstart="dragTaskStart(t, tIndex, stageIndex)"
  2347. @dragover.prevent="dragTaskOver(tIndex, stageIndex)" @dragend="dragTaskEnd()" :draggable="isdrag == 'task-' + stageIndex + '-' + tIndex
  2348. " @click="goToTask2(tIndex, stageIndex)" class="navTask" style="padding-left: 12px" :class="{
  2349. isNavTask:
  2350. isClickColor > 0 &&
  2351. isClickColor == tIndex + 1 &&
  2352. stageIndex == unitIndex,
  2353. isNavOpen: t.toolOpen,
  2354. }">
  2355. <div @click.stop="taskOpen(tIndex, stageIndex)" class="chapter_upload_open"></div>
  2356. <div @mousedown="
  2357. isdrag = 'task-' + stageIndex + '-' + tIndex
  2358. " @mouseup="isdrag = ''" @touchstart="
  2359. isdrag = 'task-' + stageIndex + '-' + tIndex
  2360. " @touchend="isdrag = ''" style="left: 20px" class="chapter_upload_drag"></div>
  2361. <div class="nt_taskBox" style="width: calc(100% - 52px)">
  2362. <div class="nt_taskTitle">
  2363. 任务{{ tIndex + 1 }}:
  2364. </div>
  2365. <div class="nt_taskName">
  2366. <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
  2367. <span>{{
  2368. t.task ? t.task : "未命名任务"
  2369. }}</span>
  2370. </el-tooltip>
  2371. </div>
  2372. </div>
  2373. </div>
  2374. <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
  2375. <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
  2376. @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
  2377. <div class="gjCss" :class="{
  2378. isGjCss:
  2379. toolIndexType ==
  2380. `gj${tIndex}${toolIndex2}${stageIndex}`,
  2381. }">
  2382. <div>工具{{ toolIndex2 + 1 }}:</div>
  2383. <div>
  2384. {{
  2385. toolsData[tool.tool[0]] &&
  2386. toolsData[tool.tool[0]].name
  2387. }}
  2388. </div>
  2389. </div>
  2390. </div>
  2391. </div>
  2392. </div>
  2393. </div>
  2394. </div>
  2395. </div>
  2396. <div class="rb_c_ai_box" v-if="stepsNav == 2">
  2397. <aiBox @setUnitJson="setUnitJson" :courseId="cid" :unitJson="unitJson"></aiBox>
  2398. </div>
  2399. </div>
  2400. <div class="rb_c_box_right">
  2401. <!-- <div class="rb_c_box_btn">
  2402. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
  2403. </div> -->
  2404. <div class="basic_box" ref="unitBox" @scroll="taskScroll">
  2405. <div v-if="false" style="
  2406. display: flex;
  2407. flex-direction: row;
  2408. align-items: center;
  2409. position: sticky;
  2410. top: 0;
  2411. z-index: 99;
  2412. width: 100%;
  2413. padding: 0 20px 0 20px;
  2414. box-sizing: border-box;
  2415. background: #fff;
  2416. border-radius: 8px;
  2417. ">
  2418. <!-- :style="{ maxWidth: (userid == courseUserid || role == '1') ? 'calc(100% - 300px)' : 'calc(100% - 175px)' }" -->
  2419. <div class="cru_selectBox" :style="{
  2420. maxWidth: isPasteTask
  2421. ? 'calc(100% - 335px)'
  2422. : 'calc(100% - 190px)',
  2423. }" v-if="courseState == 1">
  2424. <div v-for="(item, index) in unitJson" :key="index" class="cru_select"
  2425. :class="unitIndex == index ? 'cru_selected' : ''" @click="unitSet(index)">
  2426. <!-- item.dyName ? item.dyName : -->
  2427. <span v-if="
  2428. unitJson[unitJson.length - 1].easy == 4 ||
  2429. unitJson[unitJson.length - 1].easy == 6
  2430. ">{{
  2431. item.dyName
  2432. ? item.dyName
  2433. : "第" + (index + 1) + "阶段"
  2434. }}</span>
  2435. <span v-else>{{ "第" + (index + 1) + "阶段" }}</span>
  2436. </div>
  2437. <div class="cru_line" :style="{
  2438. left: offsetLetfPx + 'px',
  2439. }"></div>
  2440. </div>
  2441. <div class="addStageImg" @click="addunit()" v-if="
  2442. !(unitJson[unitJson.length - 1].easy == 4) &&
  2443. !(unitJson[unitJson.length - 1].easy == 6) &&
  2444. courseState == 1
  2445. ">
  2446. <img src="../../../assets/icon/new/addStage.png" alt />
  2447. </div>
  2448. <button class="c_pub_button_add pub_btn_add_img" @click="updateCourseState(1)"
  2449. v-if="courseState == 2" style="margin: 15px 0">
  2450. 新建阶段
  2451. </button>
  2452. <!-- v-if="steps == 3 && (userid == courseUserid || role == '1')" -->
  2453. <button class="c_pub_button_add" @click="openStageBox" v-show="false" style="margin: 0 0 0 auto">
  2454. 阶段顺序
  2455. </button>
  2456. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
  2457. v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
  2458. 智能粘贴
  2459. </button>
  2460. <button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
  2461. margin: isPasteTask ? '0 0 0 20px' : '0 0 0 auto',
  2462. }" style="padding: 0 12px">
  2463. 选择课程模板
  2464. </button>
  2465. </div>
  2466. <div style="margin: 0 0 10px 0; padding: 0" v-for="(item, index) in unitJson[unitIndex].chapterInfo"
  2467. :key="index">
  2468. <div v-if="courseState == 4" style="position: relative;
  2469. background: #fff;
  2470. box-sizing: border-box;
  2471. padding: 1px 20px 10px;
  2472. width: 100%;
  2473. border-radius: 10px;">
  2474. <div style="
  2475. display: flex;
  2476. flex-direction: row;
  2477. justify-content: space-between;
  2478. align-items: center;
  2479. " :style="{
  2480. margin: !item.taskJson[0].isFoldchapter
  2481. ? '20px 0 10px'
  2482. : '20px 0 0',
  2483. }">
  2484. <div style="margin-bottom: 10px;width: 100%;" class="lineTitle">
  2485. 学习内容
  2486. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2487. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2488. @contextmenu.prevent="openAiDialog2(1, 'aiTask2','all')"
  2489. @click="openAiDialog2(2, 'aiTask2','all')">重新生成任务</button>
  2490. </el-tooltip>
  2491. </div>
  2492. </div>
  2493. <div>
  2494. <div class="add_chapters_box add_c_none" v-if="
  2495. item.taskJson[0].chapterData &&
  2496. item.taskJson[0].chapterData.length == 0
  2497. ">
  2498. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  2499. <span>请添加学习内容</span>
  2500. </div>
  2501. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  2502. <div @dragstart="
  2503. dragStart(item1, index1, 0)
  2504. " @dragover.prevent="
  2505. dragOver(index1, 0)
  2506. " @dragend="dragEnd()" :draggable="isdrag ==
  2507. 'chapter-' + 0 + '-' + index1
  2508. " class="chapter_upload" v-for="(item1, index1) in item.taskJson[0].chapterData"
  2509. :key="item1.id" @click="
  2510. getChapterData(
  2511. $event,
  2512. unitIndex,
  2513. index,
  2514. index1,
  2515. item1.type
  2516. )
  2517. " :class="{
  2518. dragOverTop2:
  2519. newIndex === index1 &&
  2520. typeIndex ==
  2521. 'chapter-' +
  2522. 0 +
  2523. '-' +
  2524. index1 &&
  2525. oldIndex > index1 &&
  2526. dragType == 'drag',
  2527. dragOverBottom2:
  2528. newIndex === index1 &&
  2529. typeIndex ==
  2530. 'chapter-' +
  2531. 0 +
  2532. '-' +
  2533. index1 &&
  2534. oldIndex < index1 &&
  2535. dragType == 'drag',
  2536. }">
  2537. <div @mousedown="
  2538. isdrag =
  2539. 'chapter-' + 0 + '-' + index1
  2540. " @mouseup="isdrag = ''" @touchstart="
  2541. isdrag =
  2542. 'chapter-' + 0 + '-' + index1
  2543. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  2544. <div class="chapter_upload_o" style="
  2545. position: relative;
  2546. display: flex;
  2547. align-items: center;
  2548. ">
  2549. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  2550. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  2551. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  2552. </div>
  2553. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  2554. </div>
  2555. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  2556. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  2557. </div>
  2558. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  2559. </div>
  2560. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  2561. </div>
  2562. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  2563. </div>
  2564. </div>
  2565. <div class="chapter_upload_n">
  2566. <input readonly="true" v-if="
  2567. item1.type == 2 ||
  2568. item1.type == 3 ||
  2569. item1.type == 12 ||
  2570. item1.type == 13 ||
  2571. item1.type == 7
  2572. " :placeholder="item1.name" @click="
  2573. updataVideoT(
  2574. $event,
  2575. unitIndex,
  2576. 0,
  2577. index1
  2578. )
  2579. " style="
  2580. border: none;
  2581. outline: none;
  2582. width: 80%;
  2583. minwidth: 215px;
  2584. z-index: 99;
  2585. font-size: 14px;
  2586. white-space: nowrap;
  2587. overflow: hidden;
  2588. text-overflow: ellipsis;
  2589. " />
  2590. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  2591. border: none;
  2592. outline: none;
  2593. width: 80%;
  2594. white-space: nowrap;
  2595. overflow: hidden;
  2596. text-overflow: ellipsis;
  2597. " readonly="true" @click="
  2598. selectAttText(0, index1)
  2599. " />
  2600. <input :placeholder="item1.title ? item1.title : '链接'
  2601. " v-if="item1.type == 8" style="
  2602. border: none;
  2603. outline: none;
  2604. width: 80%;
  2605. white-space: nowrap;
  2606. overflow: hidden;
  2607. text-overflow: ellipsis;
  2608. " readonly="true" @click="selectLine(0, index1)" />
  2609. <input :placeholder="item1.title ? item1.title : '链接'
  2610. " v-if="item1.type == 14" style="
  2611. border: none;
  2612. outline: none;
  2613. width: 80%;
  2614. white-space: nowrap;
  2615. overflow: hidden;
  2616. text-overflow: ellipsis;
  2617. " readonly="true" @click="
  2618. openUpdateSource(0, index1)
  2619. " />
  2620. </div>
  2621. <div class="chapter_upload_ic">
  2622. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  2623. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  2624. checkChpater( $event, unitIndex, 0, index1 )
  2625. ">
  2626. <div></div>
  2627. </div>
  2628. <div class="chapter_upload_ud" style="z-index: 99">
  2629. <div class="chapter_upload_up" @click="
  2630. upCd(
  2631. $event,
  2632. unitIndex,
  2633. index,
  2634. 0,
  2635. index1
  2636. )
  2637. "></div>
  2638. <div class="chapter_upload_down" @click="
  2639. downCd(
  2640. $event,
  2641. unitIndex,
  2642. index,
  2643. 0,
  2644. index1
  2645. )
  2646. "></div>
  2647. </div>
  2648. <div class="chapter_upload_ic_edit" v-if="
  2649. item1.type == 2 ||
  2650. item1.type == 3 ||
  2651. item1.type == 12 ||
  2652. item1.type == 13 ||
  2653. item1.type == 7
  2654. " @click.stop="
  2655. updataVideoT(
  2656. $event,
  2657. unitIndex,
  2658. 0,
  2659. index1
  2660. )
  2661. ">
  2662. <div></div>
  2663. </div>
  2664. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  2665. selectAttText(0, index1)
  2666. ">
  2667. <div></div>
  2668. </div>
  2669. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  2670. @click="selectLine(0, index1)">
  2671. <div></div>
  2672. </div>
  2673. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  2674. openUpdateSource(0, index1)
  2675. ">
  2676. <div></div>
  2677. </div>
  2678. <div class="chapter_upload_ic_r" @click.stop="
  2679. deleteChapterData(
  2680. $event,
  2681. unitIndex,
  2682. index,
  2683. index1,
  2684. 0
  2685. )
  2686. ">
  2687. <div></div>
  2688. </div>
  2689. </div>
  2690. </div>
  2691. </div>
  2692. </div>
  2693. </div>
  2694. <div class="add_info_box" style="margin: 10px 0 0">
  2695. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  2696. 文件
  2697. <input type="file" accept="*" style="display: none" v-if="inputShow" multiple="multiple" @change="
  2698. beforeUpload2(
  2699. $event,
  2700. unitIndex,
  2701. 13,
  2702. 0
  2703. )
  2704. " />
  2705. </button>
  2706. <button class="c_pub_button_add pub_btn_add_img" @click="addAttText(0)">
  2707. 图文
  2708. </button>
  2709. <button class="c_pub_button_add pub_btn_add_img" @click="openLine(0)">
  2710. 链接
  2711. </button>
  2712. <button class="c_pub_button_add pub_btn_add_img" @click="pasteLine(0)">
  2713. 代码
  2714. </button>
  2715. <button class="c_pub_button_add pub_btn_add_img" @click="openSource(0)">
  2716. 资源
  2717. </button>
  2718. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(0)">
  2719. AI生成PPT
  2720. </button>
  2721. <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
  2722. AI生成教案
  2723. </button>
  2724. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
  2725. 智能检索视频
  2726. </button>
  2727. </div>
  2728. <div v-if="
  2729. unitJson[unitIndex].chapterInfo[0].taskJson[
  2730. 0
  2731. ].proVisible
  2732. " class="mask">
  2733. <div class="progressBox">
  2734. <!-- <div id="closePro" class="closeCss">
  2735. <img src="../../../../assets/icon/close.png" alt />
  2736. </div> -->
  2737. <div class="lbox">
  2738. <img src="../../../assets/loading.gif" />上传中,请稍后
  2739. </div>
  2740. <div style="margin-bottom: 10px">
  2741. <span>{{
  2742. unitJson[unitIndex].chapterInfo[0].taskJson[
  2743. 0
  2744. ].isFinishSize
  2745. }}</span>
  2746. /
  2747. <span>{{
  2748. unitJson[unitIndex].chapterInfo[0].taskJson[
  2749. 0
  2750. ].isAllSize
  2751. }}</span>
  2752. </div>
  2753. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  2754. 0
  2755. ].progress
  2756. ? unitJson[unitIndex].chapterInfo[0]
  2757. .taskJson[0].progress
  2758. : 0
  2759. " style="width: 80%"></el-progress> -->
  2760. </div>
  2761. </div>
  2762. </div>
  2763. <div class="chapter_box" v-if="courseState == 1">
  2764. <div class="chapter_contentbox">
  2765. <!-- <div>第{{ unitIndex + 1 }}阶段</div> -->
  2766. <div class="cc_input">
  2767. <input ref="dyInput" type="text" placeholder="请输入阶段标题" class="binfo_input"
  2768. v-model="unitJson[unitIndex].dyName" />
  2769. </div>
  2770. <div class="remove" v-if="
  2771. (unitJson.length > 1 || courseState != 2) &&
  2772. !(unitJson[unitJson.length - 1].easy == 4) &&
  2773. !(unitJson[unitJson.length - 1].easy == 6)
  2774. " @click="deleteUnit(unitIndex)"></div>
  2775. </div>
  2776. </div>
  2777. <!-- <div v-if="!unitJson[unitIndex].easy" style="
  2778. margin: 50px 0px 10px;
  2779. font-size: 1.5em;
  2780. font-weight: 700;
  2781. color: #0f7eff;
  2782. ">
  2783. 添加任务
  2784. </div> -->
  2785. <div class="taskBorder" :style="{
  2786. minHeight: unitJson[unitIndex].easy && 'unset',
  2787. }" :class="{ smallTaskBorder: itemTask.isFold === 1 }"
  2788. v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex" v-loading="taskLoading[itemTaskIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  2789. <div style="background: #fff; border-radius: 5px" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" element-loading-text="小可正在努力生成中,请稍等...">
  2790. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][0]" @click="cancelAjax('aiTaskGL1', itemTaskIndex)">停止</div>
  2791. <div class="taskTitle">
  2792. <div style="display: flex;width: 100%;justify-content: space-between;">
  2793. <span>任务{{ itemTaskIndex + 1 }}</span>
  2794. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2795. <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
  2796. @contextmenu.prevent="openAiDialog2(1, 'aiTask2',itemTaskIndex)"
  2797. @click="openAiDialog2(2, 'aiTask2',itemTaskIndex)">重新生成任务</button>
  2798. </el-tooltip> -->
  2799. <div style="display: flex">
  2800. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2801. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2802. @contextmenu.prevent="openAiDialog2(1, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)"
  2803. @click="openAiDialog2(2, 'aiTask3',itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-重新生成任务按钮`)">重新生成任务</button>
  2804. </el-tooltip>
  2805. <button v-if="itemTaskIndex == 0" class="c_pub_button_confirm" style="margin: 0 0 0 20px;" @click="openAiDialog2(2, 'aiTask3','all'), addCourseBehavior('courseBehavior', `点击学历案-重新生成所有任务按钮`)">重新生成所有任务</button>
  2806. </div>
  2807. <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2808. <button class="c_pub_button_confirm" style="margin: 0 0 0 20px;"
  2809. @contextmenu.prevent="openAiDialog2(1, 'aiTask3','all')"
  2810. @click="openAiDialog2(2, 'aiTask3','all')">重新生成任务</button>
  2811. </el-tooltip> -->
  2812. </div>
  2813. </div>
  2814. <!-- padding: 20px; -->
  2815. <div v-if="unitJson[unitIndex].easy != 1">
  2816. <div :style="{
  2817. marginBottom:
  2818. unitJson[unitIndex].easy == 3 ||
  2819. (unitJson[unitIndex].easy == 5 &&
  2820. itemTask.taskType == 1)
  2821. ? '75px'
  2822. : '0',
  2823. }">
  2824. <div style="
  2825. display: flex;
  2826. margin: 0px 0 20px;
  2827. flex-direction: row;
  2828. justify-content: flex-start;
  2829. align-items: center;
  2830. ">
  2831. <div class="lineTitle">任务概述</div>
  2832. </div>
  2833. <div :id="'task' + itemTaskIndex" class="chapter_contentbox" style="
  2834. flex-direction: row;
  2835. justify-content: flex-start;
  2836. align-items: center;
  2837. margin: 0;
  2838. ">
  2839. <!-- <div class="cc_title">
  2840. 任务{{ itemTaskIndex + 1 }}
  2841. </div> -->
  2842. <div class="cc_input">
  2843. <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
  2844. v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2845. itemTaskIndex
  2846. ].task
  2847. " />
  2848. </div>
  2849. <div class="remove" v-if="
  2850. item.taskJson.length > 1 &&
  2851. (!unitJson[unitIndex].easy ||
  2852. unitJson[unitIndex].easy == 6)
  2853. " @click="deleteTask(itemTaskIndex)"></div>
  2854. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2"
  2855. class="show_taskD show" @click="fold2(itemTaskIndex)"><img
  2856. src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
  2857. <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD"
  2858. @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述
  2859. </div> -->
  2860. </div>
  2861. <!-- <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && itemTask.isFold2" style="
  2862. display: flex;
  2863. margin: 20px 0;
  2864. flex-direction: row;
  2865. justify-content: flex-start;
  2866. align-items: center;
  2867. ">
  2868. <div class="lineTitle">任务描述</div>
  2869. </div> && !itemTask.isFold2-->
  2870. <div v-if="
  2871. easyArray.indexOf(unitJson[unitIndex].easy) ==
  2872. -1
  2873. " style="margin-top: 20px" class="op_task_box"
  2874. v-loading="taskDetailLoading2.indexOf('task-' + itemTaskIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  2875. <!-- <editor-bar class="addEditor" style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2876. itemTaskIndex
  2877. ].taskDetail
  2878. " @change="change"></editor-bar> -->
  2879. <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols
  2880. placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2881. itemTaskIndex
  2882. ].taskDetail
  2883. "></textarea>
  2884. <!-- <textarea rows="6" class="binfo_input" placeholder="请输入任务描述" cols
  2885. style="width: 70.5% !important; height: 120px" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
  2886. itemTaskIndex
  2887. ].taskDetail
  2888. "></textarea> -->
  2889. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail2-'+itemTaskIndex]}">
  2890. <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
  2891. <div class="op_box_right">
  2892. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  2893. <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2894. itemTaskIndex
  2895. ], itemTaskIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
  2896. itemTaskIndex
  2897. ], itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-任务描述-智能优化按钮`)">智能优化</div>
  2898. </el-tooltip>
  2899. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail2-'+itemTaskIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail2-'+itemTaskIndex)"></el-switch>
  2900. </div>
  2901. </div>
  2902. </div>
  2903. </div>
  2904. </div>
  2905. <div
  2906. style="position: relative"
  2907. v-if="courseState == 5"
  2908. >
  2909. <div
  2910. style="
  2911. display: flex;
  2912. flex-direction: row;
  2913. justify-content: space-between;
  2914. align-items: center;
  2915. "
  2916. :style="{
  2917. margin: !itemTask.isFoldchapter
  2918. ? '20px 0 10px'
  2919. : '20px 0 0',
  2920. }"
  2921. >
  2922. <div
  2923. style="margin-bottom: 10px"
  2924. class="lineTitle clineTitle"
  2925. >
  2926. 学习内容
  2927. </div>
  2928. <!-- <div style="margin-bottom:10px" v-if="!itemTask.isFoldchapter" class="show_taskD show"
  2929. @click="foldC(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起学习内容</div>
  2930. <div style="margin-bottom:10px" v-else class="show_taskD" @click="foldC(itemTaskIndex)"><img
  2931. src="../../../assets/icon/new/icon-slide.png" />展开学习内容</div> -->
  2932. <!-- <div class="line"></div> -->
  2933. </div>
  2934. <!-- v-if="!itemTask.isFoldchapter" -->
  2935. <div>
  2936. <div
  2937. class="add_chapters_box add_c_none"
  2938. v-if="
  2939. itemTask.chapterData &&
  2940. itemTask.chapterData.length == 0
  2941. "
  2942. >
  2943. <!-- <img
  2944. src="../../../assets/icon/new/c_none.png"
  2945. alt
  2946. /> -->
  2947. <span>请添加学习内容</span>
  2948. </div>
  2949. <div
  2950. v-else
  2951. class="add_chapters_box"
  2952. style="display: flex; flex-direction: column"
  2953. >
  2954. <div
  2955. @dragstart="
  2956. dragStart(item1, index1, itemTaskIndex)
  2957. "
  2958. @dragover.prevent="
  2959. dragOver(index1, itemTaskIndex)
  2960. "
  2961. @dragend="dragEnd()"
  2962. :draggable="
  2963. isdrag ==
  2964. 'chapter-' + itemTaskIndex + '-' + index1
  2965. "
  2966. class="chapter_upload"
  2967. v-for="(item1, index1) in itemTask.chapterData"
  2968. :key="item1.id"
  2969. @click="
  2970. getChapterData(
  2971. $event,
  2972. unitIndex,
  2973. index,
  2974. index1,
  2975. item1.type
  2976. )
  2977. "
  2978. :class="{
  2979. dragOverTop2:
  2980. newIndex === index1 &&
  2981. typeIndex ==
  2982. 'chapter-' +
  2983. itemTaskIndex +
  2984. '-' +
  2985. index1 &&
  2986. oldIndex > index1 &&
  2987. dragType == 'drag',
  2988. dragOverBottom2:
  2989. newIndex === index1 &&
  2990. typeIndex ==
  2991. 'chapter-' +
  2992. itemTaskIndex +
  2993. '-' +
  2994. index1 &&
  2995. oldIndex < index1 &&
  2996. dragType == 'drag',
  2997. }"
  2998. >
  2999. <div
  3000. @mousedown="
  3001. isdrag =
  3002. 'chapter-' + itemTaskIndex + '-' + index1
  3003. "
  3004. @mouseup="isdrag = ''"
  3005. @touchstart="
  3006. isdrag =
  3007. 'chapter-' + itemTaskIndex + '-' + index1
  3008. "
  3009. @touchend="isdrag = ''"
  3010. class="chapter_upload_drag"
  3011. ></div>
  3012. <div
  3013. class="chapter_upload_o"
  3014. style="
  3015. position: relative;
  3016. display: flex;
  3017. align-items: center;
  3018. "
  3019. >
  3020. <div
  3021. class="chapter_upload_l"
  3022. style="padding: 1px 0 0 10px"
  3023. >
  3024. <div
  3025. v-if="item1.type == 2"
  3026. class="chapter_upload_l_i2"
  3027. ></div>
  3028. <div
  3029. v-if="item1.type == 3"
  3030. class="chapter_upload_l_i3"
  3031. style="margin-left: 1px"
  3032. ></div>
  3033. <div
  3034. v-if="item1.type == 6"
  3035. class="chapter_upload_l_i6"
  3036. style="margin-left: 1px"
  3037. ></div>
  3038. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3039. <div
  3040. v-if="item1.type == 8"
  3041. class="chapter_upload_l_i8"
  3042. style="margin-left: 1px"
  3043. ></div>
  3044. <div
  3045. v-if="item1.type == 14"
  3046. class="chapter_upload_l_i14"
  3047. style="margin-left: 1px"
  3048. ></div>
  3049. <div
  3050. v-if="item1.type == 12"
  3051. class="chapter_upload_l_i12"
  3052. style="margin-left: 1px"
  3053. ></div>
  3054. <div
  3055. v-if="item1.type == 13"
  3056. class="chapter_upload_l_i13"
  3057. style="margin-left: 1px"
  3058. ></div>
  3059. </div>
  3060. <div class="chapter_upload_n">
  3061. <input
  3062. readonly="true"
  3063. v-if="
  3064. item1.type == 2 ||
  3065. item1.type == 3 ||
  3066. item1.type == 12 ||
  3067. item1.type == 13 ||
  3068. item1.type == 7
  3069. "
  3070. :placeholder="item1.name"
  3071. @click="
  3072. updataVideoT(
  3073. $event,
  3074. unitIndex,
  3075. itemTaskIndex,
  3076. index1
  3077. )
  3078. "
  3079. style="
  3080. border: none;
  3081. outline: none;
  3082. width: 80%;
  3083. minwidth: 215px;
  3084. z-index: 99;
  3085. font-size: 14px;
  3086. white-space: nowrap;
  3087. overflow: hidden;
  3088. text-overflow: ellipsis;
  3089. "
  3090. />
  3091. <input
  3092. :placeholder="item1.name"
  3093. v-if="item1.type == 6"
  3094. style="
  3095. border: none;
  3096. outline: none;
  3097. width: 80%;
  3098. white-space: nowrap;
  3099. overflow: hidden;
  3100. text-overflow: ellipsis;
  3101. "
  3102. readonly="true"
  3103. @click="
  3104. selectAttText(itemTaskIndex, index1)
  3105. "
  3106. />
  3107. <input
  3108. :placeholder="
  3109. item1.title ? item1.title : '链接'
  3110. "
  3111. v-if="item1.type == 8"
  3112. style="
  3113. border: none;
  3114. outline: none;
  3115. width: 80%;
  3116. white-space: nowrap;
  3117. overflow: hidden;
  3118. text-overflow: ellipsis;
  3119. "
  3120. readonly="true"
  3121. @click="selectLine(itemTaskIndex, index1)"
  3122. />
  3123. <input
  3124. :placeholder="
  3125. item1.title ? item1.title : '链接'
  3126. "
  3127. v-if="item1.type == 14"
  3128. style="
  3129. border: none;
  3130. outline: none;
  3131. width: 80%;
  3132. white-space: nowrap;
  3133. overflow: hidden;
  3134. text-overflow: ellipsis;
  3135. "
  3136. readonly="true"
  3137. @click="
  3138. openUpdateSource(itemTaskIndex, index1)
  3139. "
  3140. />
  3141. </div>
  3142. <div class="chapter_upload_ic">
  3143. <div
  3144. class="chapter_upload_noSee"
  3145. v-if="item1.type == 12"
  3146. ></div>
  3147. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  3148. checkChpater( $event, unitIndex, itemTaskIndex, index1 )
  3149. ">
  3150. <div></div>
  3151. </div>
  3152. <div
  3153. class="chapter_upload_ud"
  3154. style="z-index: 99"
  3155. >
  3156. <div
  3157. class="chapter_upload_up"
  3158. @click="
  3159. upCd(
  3160. $event,
  3161. unitIndex,
  3162. index,
  3163. itemTaskIndex,
  3164. index1
  3165. )
  3166. "
  3167. ></div>
  3168. <div
  3169. class="chapter_upload_down"
  3170. @click="
  3171. downCd(
  3172. $event,
  3173. unitIndex,
  3174. index,
  3175. itemTaskIndex,
  3176. index1
  3177. )
  3178. "
  3179. ></div>
  3180. </div>
  3181. <div
  3182. class="chapter_upload_ic_edit"
  3183. v-if="
  3184. item1.type == 2 ||
  3185. item1.type == 3 ||
  3186. item1.type == 12 ||
  3187. item1.type == 13 ||
  3188. item1.type == 7
  3189. "
  3190. @click.stop="
  3191. updataVideoT(
  3192. $event,
  3193. unitIndex,
  3194. itemTaskIndex,
  3195. index1
  3196. )
  3197. "
  3198. >
  3199. <div></div>
  3200. </div>
  3201. <div
  3202. class="chapter_upload_ic_edit"
  3203. v-if="item1.type == 6"
  3204. @click="
  3205. selectAttText(itemTaskIndex, index1)
  3206. "
  3207. >
  3208. <div></div>
  3209. </div>
  3210. <div
  3211. class="chapter_upload_ic_edit"
  3212. v-if="item1.type == 8"
  3213. @click="selectLine(itemTaskIndex, index1)"
  3214. >
  3215. <div></div>
  3216. </div>
  3217. <div
  3218. class="chapter_upload_ic_edit"
  3219. v-if="item1.type == 14"
  3220. @click="
  3221. openUpdateSource(itemTaskIndex, index1)
  3222. "
  3223. >
  3224. <div></div>
  3225. </div>
  3226. <div
  3227. class="chapter_upload_ic_r"
  3228. @click.stop="
  3229. deleteChapterData(
  3230. $event,
  3231. unitIndex,
  3232. index,
  3233. index1,
  3234. itemTaskIndex
  3235. )
  3236. "
  3237. >
  3238. <div></div>
  3239. </div>
  3240. </div>
  3241. </div>
  3242. </div>
  3243. </div>
  3244. </div>
  3245. <!-- v-if="!itemTask.isFoldchapter" -->
  3246. <div class="add_info_box" style="margin: 10px 0 0">
  3247. <button
  3248. class="c_pub_button_add pub_btn_add_img"
  3249. @click="addImg($event)"
  3250. >
  3251. 文件
  3252. <input
  3253. type="file"
  3254. accept="*"
  3255. style="display: none"
  3256. multiple="multiple"
  3257. v-if="inputShow"
  3258. @change="
  3259. beforeUpload2(
  3260. $event,
  3261. unitIndex,
  3262. 13,
  3263. itemTaskIndex
  3264. )
  3265. "
  3266. />
  3267. </button>
  3268. <button
  3269. class="c_pub_button_add pub_btn_add_img"
  3270. @click="addAttText(itemTaskIndex)"
  3271. >
  3272. 图文
  3273. </button>
  3274. <button
  3275. class="c_pub_button_add pub_btn_add_img"
  3276. @click="openLine(itemTaskIndex)"
  3277. >
  3278. 链接
  3279. </button>
  3280. <button
  3281. class="c_pub_button_add pub_btn_add_img"
  3282. @click="pasteLine(itemTaskIndex)"
  3283. >
  3284. 代码
  3285. </button>
  3286. <button
  3287. class="c_pub_button_add pub_btn_add_img"
  3288. @click="openSource(itemTaskIndex)"
  3289. >
  3290. 资源
  3291. </button>
  3292. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreate(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成PPT按钮`)">
  3293. AI生成PPT
  3294. </button>
  3295. <!-- <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(itemTaskIndex)">
  3296. AI生成教案
  3297. </button> -->
  3298. <button class="c_pub_button_add pub_btn_add_img" @click="createTaskAn(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-AI生成学历案按钮`)">
  3299. {{ taskAnLoading[itemTaskIndex] && taskAnLoading[itemTaskIndex] == true ? '停止生成学历案' : 'AI生成学历案'}}
  3300. </button>
  3301. <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-智能检索视频按钮`)">
  3302. 智能检索视频
  3303. </button>
  3304. </div>
  3305. <div
  3306. v-if="
  3307. unitJson[unitIndex].chapterInfo[0].taskJson[
  3308. itemTaskIndex
  3309. ].proVisible
  3310. "
  3311. class="mask"
  3312. >
  3313. <div class="progressBox">
  3314. <!-- <div id="closePro" class="closeCss">
  3315. <img src="../../../../assets/icon/close.png" alt />
  3316. </div> -->
  3317. <div class="lbox">
  3318. <img
  3319. src="../../../assets/loading.gif"
  3320. />上传中,请稍后
  3321. </div>
  3322. <div style="margin-bottom: 10px">
  3323. <span
  3324. >{{
  3325. unitJson[unitIndex].chapterInfo[0].taskJson[
  3326. itemTaskIndex
  3327. ].isFinishSize
  3328. }}</span
  3329. >
  3330. /
  3331. <span
  3332. >{{
  3333. unitJson[unitIndex].chapterInfo[0].taskJson[
  3334. itemTaskIndex
  3335. ].isAllSize
  3336. }}</span
  3337. >
  3338. </div>
  3339. <!-- <el-progress
  3340. :text-inside="true"
  3341. :stroke-width="20"
  3342. :percentage="
  3343. unitJson[unitIndex].chapterInfo[0].taskJson[
  3344. itemTaskIndex
  3345. ].progress
  3346. ? unitJson[unitIndex].chapterInfo[0]
  3347. .taskJson[itemTaskIndex].progress
  3348. : 0
  3349. "
  3350. style="width: 80%"
  3351. ></el-progress> -->
  3352. </div>
  3353. </div>
  3354. </div>
  3355. <div v-if="
  3356. unitJson[unitIndex].easy == 1 ||
  3357. (unitJson[unitIndex].easy == 5 &&
  3358. itemTask.taskType == 2)
  3359. ">
  3360. <div>
  3361. <div class="add_chapters_box add_c_none" v-if="
  3362. itemTask.chapterData &&
  3363. itemTask.chapterData.length == 0
  3364. ">
  3365. <img src="../../../assets/icon/new/c_none.png" alt />
  3366. </div>
  3367. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  3368. <div @dragstart="dragStart(item1, index1, index)" @dragover.prevent="
  3369. dragOver(index1, itemTaskIndex)
  3370. " @dragend="dragEnd()" :draggable="isdrag ==
  3371. 'chapter-' + itemTaskIndex + '-' + index1
  3372. " class="chapter_upload" v-for="(item1, index1) in itemTask.chapterData"
  3373. :key="item1.id" @click="
  3374. getChapterData(
  3375. $event,
  3376. unitIndex,
  3377. index,
  3378. index1,
  3379. item1.type
  3380. )
  3381. " :class="{
  3382. dragOverTop2:
  3383. newIndex === index1 &&
  3384. typeIndex ==
  3385. 'chapter-' +
  3386. itemTaskIndex +
  3387. '-' +
  3388. index1 &&
  3389. oldIndex > index1,
  3390. dragOverBottom2:
  3391. newIndex === index1 &&
  3392. typeIndex ==
  3393. 'chapter-' +
  3394. itemTaskIndex +
  3395. '-' +
  3396. index1 &&
  3397. oldIndex < index1,
  3398. }">
  3399. <div @mousedown="
  3400. isdrag =
  3401. 'chapter-' + itemTaskIndex + '-' + index1
  3402. " @mouseup="isdrag = ''" @touchstart="
  3403. isdrag =
  3404. 'chapter-' + itemTaskIndex + '-' + index1
  3405. " @touchend="isdrag = ''" class="chapter_upload_drag"></div>
  3406. <div class="chapter_upload_t" style="width: 100%"></div>
  3407. <div class="chapter_upload_o" style="
  3408. position: relative;
  3409. display: flex;
  3410. align-items: center;
  3411. ">
  3412. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  3413. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  3414. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  3415. </div>
  3416. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  3417. </div>
  3418. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  3419. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  3420. </div>
  3421. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  3422. </div>
  3423. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  3424. </div>
  3425. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  3426. </div>
  3427. </div>
  3428. <div class="chapter_upload_n">
  3429. <span style="
  3430. font-size: 14px;
  3431. color: rgb(109, 109, 109);
  3432. height: 14px;
  3433. line-height: 14px;
  3434. " v-if="
  3435. item1.type == 2 ||
  3436. item1.type == 3 ||
  3437. item1.type == 7
  3438. ">{{ item1.text }}-</span>
  3439. <input readonly="true" v-if="
  3440. item1.type == 2 ||
  3441. item1.type == 3 ||
  3442. item1.type == 7
  3443. " :placeholder="item1.name" @click="
  3444. updataVideoT(
  3445. $event,
  3446. unitIndex,
  3447. itemTaskIndex,
  3448. index1
  3449. )
  3450. " style="
  3451. border: none;
  3452. outline: none;
  3453. width: 80%;
  3454. minwidth: 215px;
  3455. z-index: 99;
  3456. font-size: 14px;
  3457. white-space: nowrap;
  3458. overflow: hidden;
  3459. text-overflow: ellipsis;
  3460. " />
  3461. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  3462. border: none;
  3463. outline: none;
  3464. width: 80%;
  3465. white-space: nowrap;
  3466. overflow: hidden;
  3467. text-overflow: ellipsis;
  3468. " readonly="true" @click="
  3469. selectAttText(itemTaskIndex, index1)
  3470. " />
  3471. <input :placeholder="item1.title ? item1.title : '链接'
  3472. " v-if="item1.type == 8 || item1.type == 14" style="
  3473. border: none;
  3474. outline: none;
  3475. width: 80%;
  3476. white-space: nowrap;
  3477. overflow: hidden;
  3478. text-overflow: ellipsis;
  3479. " readonly="true" @click="selectLine(itemTaskIndex, index1)" />
  3480. </div>
  3481. <div class="chapter_upload_ic">
  3482. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  3483. <div class="chapter_upload_ud" style="z-index: 99">
  3484. <div class="chapter_upload_up" @click="
  3485. upCd(
  3486. $event,
  3487. unitIndex,
  3488. index,
  3489. itemTaskIndex,
  3490. index1
  3491. )
  3492. "></div>
  3493. <div class="chapter_upload_down" @click="
  3494. downCd(
  3495. $event,
  3496. unitIndex,
  3497. index,
  3498. itemTaskIndex,
  3499. index1
  3500. )
  3501. "></div>
  3502. </div>
  3503. <div class="chapter_upload_ic_edit" v-if="
  3504. item1.type == 2 ||
  3505. item1.type == 3 ||
  3506. item1.type == 12 ||
  3507. item1.type == 13 ||
  3508. item1.type == 7
  3509. " @click.stop="
  3510. updataVideoT(
  3511. $event,
  3512. unitIndex,
  3513. itemTaskIndex,
  3514. index1
  3515. )
  3516. ">
  3517. <div></div>
  3518. </div>
  3519. <div class="chapter_upload_ic_edit" v-if="item1.type == 6" @click="
  3520. selectAttText(itemTaskIndex, index1)
  3521. ">
  3522. <div></div>
  3523. </div>
  3524. <div class="chapter_upload_ic_edit" v-if="item1.type == 8"
  3525. @click="selectLine(itemTaskIndex, index1)">
  3526. <div></div>
  3527. </div>
  3528. <div class="chapter_upload_ic_edit" v-if="item1.type == 14" @click="
  3529. openUpdateSource(itemTaskIndex, index1)
  3530. ">
  3531. <div></div>
  3532. </div>
  3533. <div class="chapter_upload_ic_r" @click.stop="
  3534. deleteChapterData(
  3535. $event,
  3536. unitIndex,
  3537. index,
  3538. index1,
  3539. itemTaskIndex
  3540. )
  3541. ">
  3542. <div></div>
  3543. </div>
  3544. </div>
  3545. </div>
  3546. </div>
  3547. </div>
  3548. </div>
  3549. <div class="add_info_box" style="margin: 10px 0 0">
  3550. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3551. <span style="color: red">*</span>
  3552. 教学设计
  3553. <input type="file"
  3554. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3555. style="display: none" v-if="inputShow" @change="
  3556. beforeUpload3(
  3557. $event,
  3558. unitIndex,
  3559. 3,
  3560. itemTaskIndex,
  3561. '教学设计'
  3562. )
  3563. " />
  3564. </button>
  3565. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3566. <span style="color: red">*</span>
  3567. 教学课件
  3568. <input type="file"
  3569. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3570. style="display: none" v-if="inputShow" @change="
  3571. beforeUpload3(
  3572. $event,
  3573. unitIndex,
  3574. 3,
  3575. itemTaskIndex,
  3576. '教学课件'
  3577. )
  3578. " />
  3579. </button>
  3580. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3581. 教学视频
  3582. <input type="file" accept="video/mp4, video/quicktime, video/x-msvideo"
  3583. style="display: none" v-if="inputShow" @change="
  3584. beforeUpload3(
  3585. $event,
  3586. unitIndex,
  3587. 2,
  3588. itemTaskIndex,
  3589. '教学视频'
  3590. )
  3591. " />
  3592. </button>
  3593. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3594. 教学音频
  3595. <input type="file" accept="audio/*" style="display: none" v-if="inputShow" @change="
  3596. beforeUpload3(
  3597. $event,
  3598. unitIndex,
  3599. 2,
  3600. itemTaskIndex,
  3601. '教学音频'
  3602. )
  3603. " />
  3604. </button>
  3605. <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
  3606. 学习单
  3607. <input type="file"
  3608. accept="application/pdf, application/.ppt, .ppt, .pptx, .xlsx, .xls, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document"
  3609. style="display: none" v-if="inputShow" @change="
  3610. beforeUpload3(
  3611. $event,
  3612. unitIndex,
  3613. 3,
  3614. itemTaskIndex,
  3615. '学习单'
  3616. )
  3617. " />
  3618. </button>
  3619. </div>
  3620. <div v-if="
  3621. unitJson[unitIndex].chapterInfo[0].taskJson[
  3622. itemTaskIndex
  3623. ].proVisible
  3624. " class="mask">
  3625. <div class="progressBox">
  3626. <!-- <div id="closePro" class="closeCss">
  3627. <img src="../../../../assets/icon/close.png" alt />
  3628. </div> -->
  3629. <div class="lbox">
  3630. <img src="../../../assets/loading.gif" />上传中,请稍后
  3631. </div>
  3632. <div style="margin-bottom: 10px">
  3633. <span>{{
  3634. unitJson[unitIndex].chapterInfo[0].taskJson[
  3635. itemTaskIndex
  3636. ].isFinishSize
  3637. }}M</span>
  3638. /
  3639. <span>{{
  3640. unitJson[unitIndex].chapterInfo[0].taskJson[
  3641. itemTaskIndex
  3642. ].isAllSize
  3643. }}M</span>
  3644. </div>
  3645. <el-progress :text-inside="true" :stroke-width="20" :percentage="unitJson[unitIndex].chapterInfo[0].taskJson[
  3646. itemTaskIndex
  3647. ].progress
  3648. ? unitJson[unitIndex].chapterInfo[0]
  3649. .taskJson[itemTaskIndex].progress
  3650. : 0
  3651. " style="width: 80%"></el-progress>
  3652. </div>
  3653. </div>
  3654. </div>
  3655. </div>
  3656. <!-- padding: 20px; -->
  3657. <div style="
  3658. background: #fff;
  3659. border-radius: 5px;
  3660. margin-top: 15px;
  3661. " :style="{paddingBottom: panTaskElist() == 0?'75px':''}">
  3662. <div v-if="
  3663. unitJson[unitIndex].easy == 6 ||
  3664. !unitJson[unitIndex].easy
  3665. " class="toolChoose" v-loading="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" element-loading-text="小可正在努力生成中,请稍等...">
  3666. <div class="c_pub_button_confirm stopBtn" v-if="taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][1]" @click="cancelAjax('aiTaskGL2', itemTaskIndex)">停止</div>
  3667. <div v-if="
  3668. unitJson[unitIndex].easy != 3 &&
  3669. !(
  3670. unitJson[unitIndex].easy == 5 &&
  3671. itemTask.taskType == 1
  3672. )
  3673. " style="
  3674. flex-direction: row;
  3675. justify-content: flex-start;
  3676. align-items: center;
  3677. ">
  3678. <div style="
  3679. display: flex;
  3680. flex-direction: row;
  3681. align-items: center;
  3682. margin: 5px 0 20px;
  3683. ">
  3684. <div class="lineTitle clineTitle">
  3685. {{
  3686. !unitJson[unitIndex].easy ||
  3687. unitJson[unitIndex].easy == 6 ||
  3688. easyArray.indexOf(unitJson[unitIndex].easy) !=
  3689. -1
  3690. ? "练习内容"
  3691. : "评价内容"
  3692. }}
  3693. </div>
  3694. <!-- <div class="line" style="width: 90%"></div> -->
  3695. </div>
  3696. </div>
  3697. <div class="tools">
  3698. <div class="leftTools" style="width: 100%" v-for="(
  3699. itemTool, toolIndex
  3700. ) in itemTask.toolChoose" :key="toolIndex">
  3701. <div style="
  3702. display: flex;
  3703. flex-direction: row;
  3704. align-items: baseline;
  3705. flex-wrap: nowrap;
  3706. justify-content: flex-start;
  3707. position: relative;
  3708. ">
  3709. <div style="margin-right: 20px; font-weight: bold"
  3710. :id="'gj' + itemTaskIndex + '' + toolIndex">
  3711. 工具 {{ toolIndex + 1 }} :
  3712. </div>
  3713. <div class="chooseWho">
  3714. <div :class="itemTool.toolType == 0
  3715. ? 'isChooseActive'
  3716. : ''
  3717. " @click="
  3718. (itemTool.toolType = 0),
  3719. (itemTool.isFold3 = false),
  3720. $forceUpdate()
  3721. ">
  3722. 互动类
  3723. </div>
  3724. <div :class="itemTool.toolType == 1
  3725. ? 'isChooseActive'
  3726. : ''
  3727. " @click="
  3728. (itemTool.toolType = 1),
  3729. (itemTool.isFold3 = false),
  3730. $forceUpdate()
  3731. ">
  3732. 思维类
  3733. </div>
  3734. <div :class="itemTool.toolType == 6
  3735. ? 'isChooseActive'
  3736. : ''
  3737. " @click="
  3738. (itemTool.toolType = 6),
  3739. (itemTool.isFold3 = false),
  3740. $forceUpdate()
  3741. ">
  3742. 协作类
  3743. </div>
  3744. <div :class="itemTool.toolType == 2
  3745. ? 'isChooseActive'
  3746. : ''
  3747. " @click="
  3748. (itemTool.toolType = 2),
  3749. (itemTool.isFold3 = false),
  3750. $forceUpdate()
  3751. ">
  3752. 测评类
  3753. </div>
  3754. <div :class="itemTool.toolType == 7
  3755. ? 'isChooseActive'
  3756. : ''
  3757. " @click="
  3758. (itemTool.toolType = 7),
  3759. (itemTool.isFold3 = false),
  3760. $forceUpdate()
  3761. ">
  3762. 评价类
  3763. </div>
  3764. <div :class="itemTool.toolType == 3
  3765. ? 'isChooseActive'
  3766. : ''
  3767. " @click="
  3768. (itemTool.toolType = 3),
  3769. (itemTool.isFold3 = false),
  3770. $forceUpdate()
  3771. ">
  3772. 编程类
  3773. </div>
  3774. <div :class="itemTool.toolType == 5
  3775. ? 'isChooseActive'
  3776. : ''
  3777. " @click="
  3778. (itemTool.toolType = 5),
  3779. (itemTool.isFold3 = false),
  3780. $forceUpdate()
  3781. ">
  3782. 学科类
  3783. </div>
  3784. <!-- <div :class="itemTool.toolType == 4 ? 'isChooseActive' : ''
  3785. " @click="(itemTool.toolType = 4), $forceUpdate()">
  3786. 其他
  3787. </div> -->
  3788. </div>
  3789. <div class="chapter_upload_ud2" style="z-index: 9; margin: 0 0 0 auto" :style="{
  3790. margin:
  3791. itemTask.toolChoose.length > 1
  3792. ? '0px 35px 0px auto'
  3793. : '0 0 0 auto',
  3794. }" v-if="itemTask.toolChoose.length > 1">
  3795. <div class="chapter_upload_up2" @click.stop="
  3796. upTool(
  3797. $event,
  3798. unitIndex,
  3799. itemTaskIndex,
  3800. toolIndex
  3801. )
  3802. ">
  3803. 上移
  3804. </div>
  3805. <div class="chapter_upload_down2" @click.stop="
  3806. downTool(
  3807. $event,
  3808. unitIndex,
  3809. itemTaskIndex,
  3810. toolIndex
  3811. )
  3812. ">
  3813. 下移
  3814. </div>
  3815. </div>
  3816. <!-- <div v-if="!itemTool.isFold3" class="show_toolD show"
  3817. @click="fold3(itemTaskIndex, toolIndex)"
  3818. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3819. src="../../../assets/icon/new/icon-slide.png" />收起工具栏</div>
  3820. <div v-else class="show_toolD" @click="fold3(itemTaskIndex, toolIndex)"
  3821. :style="{ margin: itemTask.toolChoose.length > 1 ? '0px 35px 0px 10px' : '0 0 0 auto' }"><img
  3822. src="../../../assets/icon/new/icon-slide.png" />展开工具栏</div> -->
  3823. <div class="remove" @click="deleteTool(itemTaskIndex, toolIndex)"
  3824. v-if="itemTask.toolChoose.length > 1" style="
  3825. position: absolute;
  3826. right: 0;
  3827. top: -5px;
  3828. "></div>
  3829. </div>
  3830. <!-- v-show="!itemTool.isFold3" -->
  3831. <div style="min-height: 163px">
  3832. <div class="toolSort" v-if="itemTool.toolType == 0">
  3833. <!-- <div class="tool">
  3834. <div
  3835. class="whiteBIcon"
  3836. @click="addTools(8, itemTaskIndex, toolIndex)"
  3837. >
  3838. <img src="../../../assets/icon/secondToolList/library.png" alt />
  3839. <div style="margin: 5px 0">素材库</div>
  3840. </div>
  3841. <div class="check" @click="addTools(8, itemTaskIndex, toolIndex)">
  3842. <img
  3843. src="../../../assets/icon/checkNo.png"
  3844. alt
  3845. v-if="itemTool.tool.indexOf(8) == -1"
  3846. />
  3847. <div class="checkDiv" v-else><img src="../../../assets/icon/checkedIs.png"
  3848. alt /><span>已选择</span></div>
  3849. </div>
  3850. </div>-->
  3851. <!-- <div class="tool">
  3852. <div
  3853. class="whiteBIcon"
  3854. @click="addTools(17, itemTaskIndex, toolIndex)"
  3855. >
  3856. <img
  3857. src="../../../assets/icon/secondToolList/library.png"
  3858. alt
  3859. />
  3860. <div style="margin: 5px 0">学习资料</div>
  3861. </div>
  3862. <div
  3863. class="check"
  3864. @click="addTools(17, itemTaskIndex, toolIndex)"
  3865. >
  3866. <img
  3867. src="../../../assets/icon/checkNo.png"
  3868. alt
  3869. v-if="itemTool.tool.indexOf(17) == -1"
  3870. />
  3871. <img
  3872. src="../../../assets/icon/checkedIs.png"
  3873. alt
  3874. v-else
  3875. />
  3876. </div>10
  3877. </div> -->
  3878. <div class="tool" :class="{
  3879. isToolChoose:
  3880. itemTool.tool.indexOf(10) != -1,
  3881. }" @click="
  3882. addTools(10, itemTaskIndex, toolIndex)
  3883. ">
  3884. <div class="whiteBIcon" @click.stop="
  3885. openTools(itemTaskIndex, 10, toolIndex)
  3886. ">
  3887. <img src="../../../assets/icon/thirdToolList/time.png" alt />
  3888. <div style="margin: 5px 0">倒计时</div>
  3889. </div>
  3890. <div class="noCTool">
  3891. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3892. </div>
  3893. <div class="isCTool" v-if="itemTool.tool.indexOf(10) != -1">
  3894. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3895. </div>
  3896. <!-- <div class="check" @click="addTools(10, itemTaskIndex, toolIndex)">
  3897. <img src="../../../assets/icon/checkNo.png" alt
  3898. v-if="itemTool.tool.indexOf(10) == -1" />
  3899. <div class="checkDiv" v-else>
  3900. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3901. </div>
  3902. </div> -->
  3903. </div>
  3904. <div class="tool" :class="{
  3905. isToolChoose:
  3906. itemTool.tool.indexOf(65) != -1,
  3907. }" @click="
  3908. addTools(65, itemTaskIndex, toolIndex)
  3909. ">
  3910. <div class="whiteBIcon" @click.stop="
  3911. addTools(65, itemTaskIndex, toolIndex)
  3912. ">
  3913. <img src="../../../assets/icon/firstToolList/pickPeople.png" alt />
  3914. <div style="margin: 5px 0">挑人</div>
  3915. </div>
  3916. <div class="noCTool">
  3917. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3918. </div>
  3919. <div class="isCTool" v-if="itemTool.tool.indexOf(65) != -1">
  3920. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3921. </div>
  3922. <!-- <div class="check" @click="addTools(65, itemTaskIndex, toolIndex)">
  3923. <img src="../../../assets/icon/checkNo.png" alt
  3924. v-if="itemTool.tool.indexOf(65) == -1" />
  3925. <div class="checkDiv" v-else>
  3926. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3927. </div>
  3928. </div> -->
  3929. </div>
  3930. <!-- <div class="tool">
  3931. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 49, toolIndex)">
  3932. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  3933. <div style="margin: 5px 0">学生分组</div>
  3934. </div>
  3935. <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  3936. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(49) == -1" />
  3937. <div class="checkDiv" v-else>
  3938. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3939. </div>
  3940. </div>
  3941. </div> -->
  3942. <!-- <div class="tool">
  3943. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 62, toolIndex)">
  3944. <img src="../../../assets/icon/fourthToolList/interVideo.png" alt />
  3945. <div style="margin: 5px 0">交互视频</div>
  3946. </div>
  3947. <div class="check" @click="addTools(62, itemTaskIndex, toolIndex)">
  3948. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(62) == -1" />
  3949. <div class="checkDiv" v-else>
  3950. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3951. </div>
  3952. </div>
  3953. </div> -->
  3954. </div>
  3955. <div class="toolSort" v-if="itemTool.toolType == 1">
  3956. <div class="tool" :class="{
  3957. isToolChoose:
  3958. itemTool.tool.indexOf(7) != -1,
  3959. }" @click="
  3960. addTools(7, itemTaskIndex, toolIndex)
  3961. ">
  3962. <div class="whiteBIcon" @click.stop="
  3963. addTools(7, itemTaskIndex, toolIndex)
  3964. ">
  3965. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  3966. <div style="margin: 5px 0">思维网格</div>
  3967. </div>
  3968. <div class="noCTool">
  3969. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3970. </div>
  3971. <div class="isCTool" v-if="itemTool.tool.indexOf(7) != -1">
  3972. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3973. </div>
  3974. <!-- <div class="check" @click="addTools(7, itemTaskIndex, toolIndex)">
  3975. <img src="../../../assets/icon/checkNo.png" alt
  3976. v-if="itemTool.tool.indexOf(7) == -1" />
  3977. <div class="checkDiv" v-else>
  3978. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  3979. </div>
  3980. </div> -->
  3981. </div>
  3982. <div class="tool" :class="{
  3983. isToolChoose:
  3984. itemTool.tool.indexOf(1) != -1,
  3985. }" @click="
  3986. addTools(1, itemTaskIndex, toolIndex)
  3987. ">
  3988. <div class="whiteBIcon" @click.stop="
  3989. openTools(itemTaskIndex, 1, toolIndex)
  3990. ">
  3991. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  3992. <div style="margin: 5px 0">电子白板</div>
  3993. </div>
  3994. <div class="noCTool">
  3995. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3996. </div>
  3997. <div class="isCTool" v-if="itemTool.tool.indexOf(1) != -1">
  3998. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  3999. </div>
  4000. <!-- <div class="check" @click="addTools(1, itemTaskIndex, toolIndex)">
  4001. <img src="../../../assets/icon/checkNo.png" alt
  4002. v-if="itemTool.tool.indexOf(1) == -1" />
  4003. <div class="checkDiv" v-else>
  4004. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4005. </div>
  4006. </div> -->
  4007. </div>
  4008. <!-- <div class="tool">
  4009. <div
  4010. class="whiteBIcon"
  4011. @click="addTools(2, itemTaskIndex, toolIndex)"
  4012. >
  4013. <img
  4014. src="../../../assets/icon/secondToolList/note.png"
  4015. alt
  4016. />
  4017. <div style="margin: 5px 0">便签</div>
  4018. </div>
  4019. <div
  4020. class="check"
  4021. @click="addTools(2, itemTaskIndex, toolIndex)"
  4022. >
  4023. <img
  4024. src="../../../assets/icon/checkNo.png"
  4025. alt
  4026. v-if="itemTool.tool.indexOf(2) == -1"
  4027. />
  4028. <div class="checkDiv" v-else>
  4029. <img
  4030. src="../../../assets/icon/checkedIs.png"
  4031. alt
  4032. /><span>已选择</span>
  4033. </div>
  4034. </div>
  4035. </div> -->
  4036. <!-- <div class="tool">
  4037. <div class="whiteBIcon" @click="addTools(6, itemTaskIndex, toolIndex)">
  4038. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  4039. <div style="margin: 5px 0">协同文档</div>
  4040. </div>
  4041. <div
  4042. class="check"
  4043. @click="addTools(6, itemTaskIndex, toolIndex)"
  4044. >
  4045. <img
  4046. src="../../../assets/icon/checkNo.png"
  4047. alt
  4048. v-if="itemTool.tool.indexOf(6) == -1"
  4049. />
  4050. <div class="checkDiv" v-else>
  4051. <img
  4052. src="../../../assets/icon/checkedIs.png"
  4053. alt
  4054. /><span>已选择</span>
  4055. </div>
  4056. </div>
  4057. </div> -->
  4058. <div class="tool" :class="{
  4059. isToolChoose:
  4060. itemTool.tool.indexOf(52) != -1,
  4061. }" @click="
  4062. addTools(52, itemTaskIndex, toolIndex)
  4063. ">
  4064. <div class="whiteBIcon" @click.stop="
  4065. openTools(itemTaskIndex, 52, toolIndex)
  4066. ">
  4067. <img src="../../../assets/icon/fourthToolList/text.png" alt />
  4068. <div style="margin: 5px 0">文档</div>
  4069. </div>
  4070. <div class="noCTool">
  4071. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4072. </div>
  4073. <div class="isCTool" v-if="itemTool.tool.indexOf(52) != -1">
  4074. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4075. </div>
  4076. <!-- <div class="check" @click="addTools(52, itemTaskIndex, toolIndex)">
  4077. <img src="../../../assets/icon/checkNo.png" alt
  4078. v-if="itemTool.tool.indexOf(52) == -1" />
  4079. <div class="checkDiv" v-else>
  4080. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4081. </div>
  4082. </div> -->
  4083. </div>
  4084. <div class="tool" :class="{
  4085. isToolChoose:
  4086. itemTool.tool.indexOf(3) != -1,
  4087. }" @click="
  4088. addTools(3, itemTaskIndex, toolIndex)
  4089. ">
  4090. <div class="whiteBIcon" @click.stop="
  4091. openTools(itemTaskIndex, 3, toolIndex)
  4092. ">
  4093. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  4094. <div style="margin: 5px 0">思维导图</div>
  4095. </div>
  4096. <div class="noCTool">
  4097. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4098. </div>
  4099. <div class="isCTool" v-if="itemTool.tool.indexOf(3) != -1">
  4100. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4101. </div>
  4102. <!-- <div class="check" @click="addTools(3, itemTaskIndex, toolIndex)">
  4103. <img src="../../../assets/icon/checkNo.png" alt
  4104. v-if="itemTool.tool.indexOf(3) == -1" />
  4105. <div class="checkDiv" v-else>
  4106. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4107. </div>
  4108. </div> -->
  4109. </div>
  4110. <div class="tool" :class="{
  4111. isToolChoose:
  4112. itemTool.tool.indexOf(48) != -1,
  4113. }" @click="
  4114. addTools(48, itemTaskIndex, toolIndex)
  4115. ">
  4116. <div class="whiteBIcon" @click.stop="
  4117. openTools(itemTaskIndex, 48, toolIndex)
  4118. ">
  4119. <img src="../../../assets/icon/fourthToolList/table.png" alt />
  4120. <div style="margin: 5px 0">表格</div>
  4121. </div>
  4122. <div class="noCTool">
  4123. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4124. </div>
  4125. <div class="isCTool" v-if="itemTool.tool.indexOf(48) != -1">
  4126. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4127. </div>
  4128. <!-- <div class="check" @click="addTools(48, itemTaskIndex, toolIndex)">
  4129. <img src="../../../assets/icon/checkNo.png" alt
  4130. v-if="itemTool.tool.indexOf(48) == -1" />
  4131. <div class="checkDiv" v-else>
  4132. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4133. </div>
  4134. </div> -->
  4135. </div>
  4136. </div>
  4137. <div class="toolSort" v-if="itemTool.toolType == 6">
  4138. <div class="tool" :class="{
  4139. isToolChoose:
  4140. itemTool.tool.indexOf(49) != -1,
  4141. }" @click="
  4142. addTools(49, itemTaskIndex, toolIndex)
  4143. ">
  4144. <div class="whiteBIcon" @click.stop="
  4145. openTools(itemTaskIndex, 49, toolIndex)
  4146. ">
  4147. <img src="../../../assets/icon/fourthToolList/group.png" alt />
  4148. <div style="margin: 5px 0">学生分组</div>
  4149. </div>
  4150. <div class="noCTool">
  4151. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4152. </div>
  4153. <div class="isCTool" v-if="itemTool.tool.indexOf(49) != -1">
  4154. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4155. </div>
  4156. <!-- <div class="check" @click="addTools(49, itemTaskIndex, toolIndex)">
  4157. <img src="../../../assets/icon/checkNo.png" alt
  4158. v-if="itemTool.tool.indexOf(49) == -1" />
  4159. <div class="checkDiv" v-else>
  4160. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4161. </div>
  4162. </div> -->
  4163. </div>
  4164. </div>
  4165. <div class="toolSort" v-if="itemTool.toolType == 2">
  4166. <!-- <div class="tool">
  4167. <div
  4168. class="whiteBIcon"
  4169. @click="addTools(5, itemTaskIndex, toolIndex)"
  4170. >
  4171. <img
  4172. src="../../../assets/icon/thirdToolList/score.png"
  4173. alt
  4174. />
  4175. <div style="margin: 5px 0">量规评分</div>
  4176. </div>
  4177. <div
  4178. class="check"
  4179. @click="addTools(5, itemTaskIndex, toolIndex)"
  4180. >
  4181. <img
  4182. src="../../../assets/icon/checkNo.png"
  4183. alt
  4184. v-if="itemTool.tool.indexOf(5) == -1"
  4185. />
  4186. <img
  4187. src="../../../assets/icon/checkedIs.png"
  4188. alt
  4189. v-else
  4190. />
  4191. </div>
  4192. </div>-->
  4193. <div class="tool" :class="{
  4194. isToolChoose:
  4195. itemTool.tool.indexOf(4) != -1,
  4196. }" @click="
  4197. addTools(4, itemTaskIndex, toolIndex)
  4198. ">
  4199. <div class="whiteBIcon" @click.stop="
  4200. openTools(itemTaskIndex, 4, toolIndex)
  4201. ">
  4202. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  4203. <div style="margin: 5px 0">问卷调查</div>
  4204. </div>
  4205. <div class="noCTool">
  4206. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4207. </div>
  4208. <div class="isCTool" v-if="itemTool.tool.indexOf(4) != -1">
  4209. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4210. </div>
  4211. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4212. <img src="../../../assets/icon/checkNo.png" alt
  4213. v-if="itemTool.tool.indexOf(4) == -1" />
  4214. <div class="checkDiv" v-else>
  4215. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4216. </div>
  4217. </div> -->
  4218. </div>
  4219. <div class="tool" :class="{
  4220. isToolChoose:
  4221. itemTool.tool.indexOf(45) != -1,
  4222. }" @click="
  4223. addTools(45, itemTaskIndex, toolIndex)
  4224. ">
  4225. <div class="whiteBIcon" @click="
  4226. openTools(itemTaskIndex, 45, toolIndex)
  4227. ">
  4228. <img src="../../../assets/icon/thirdToolList/choose.png" alt />
  4229. <div style="margin: 5px 0">选择题</div>
  4230. </div>
  4231. <div class="noCTool">
  4232. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4233. </div>
  4234. <div class="isCTool" v-if="itemTool.tool.indexOf(45) != -1">
  4235. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4236. </div>
  4237. <!-- <div class="check" @click="addTools(45, itemTaskIndex, toolIndex)">
  4238. <img src="../../../assets/icon/checkNo.png" alt
  4239. v-if="itemTool.tool.indexOf(45) == -1" />
  4240. <div class="checkDiv" v-else>
  4241. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4242. </div>
  4243. </div> -->
  4244. </div>
  4245. <div class="tool" :class="{
  4246. isToolChoose:
  4247. itemTool.tool.indexOf(15) != -1,
  4248. }" @click="
  4249. addTools(15, itemTaskIndex, toolIndex)
  4250. ">
  4251. <div class="whiteBIcon" @click.stop="
  4252. openTools(itemTaskIndex, 15, toolIndex)
  4253. ">
  4254. <img src="../../../assets/icon/thirdToolList/answer.png" alt />
  4255. <div style="margin: 5px 0">问答</div>
  4256. </div>
  4257. <div class="noCTool">
  4258. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4259. </div>
  4260. <div class="isCTool" v-if="itemTool.tool.indexOf(15) != -1">
  4261. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4262. </div>
  4263. <!-- <div class="check" @click="addTools(15, itemTaskIndex, toolIndex)">
  4264. <img src="../../../assets/icon/checkNo.png" alt
  4265. v-if="itemTool.tool.indexOf(15) == -1" />
  4266. <div class="checkDiv" v-else>
  4267. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4268. </div>
  4269. </div> -->
  4270. </div>
  4271. <div class="tool" :class="{
  4272. isToolChoose:
  4273. itemTool.tool.indexOf(16) != -1,
  4274. }" @click="
  4275. addTools(16, itemTaskIndex, toolIndex)
  4276. ">
  4277. <div class="whiteBIcon" @click.stop="
  4278. addTools(16, itemTaskIndex, toolIndex)
  4279. ">
  4280. <img src="../../../assets/icon/thirdToolList/work.png" alt />
  4281. <div style="margin: 5px 0">作业提交</div>
  4282. </div>
  4283. <div class="noCTool">
  4284. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4285. </div>
  4286. <div class="isCTool" v-if="itemTool.tool.indexOf(16) != -1">
  4287. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4288. </div>
  4289. <!-- <div class="check" @click="addTools(16, itemTaskIndex, toolIndex)">
  4290. <img src="../../../assets/icon/checkNo.png" alt
  4291. v-if="itemTool.tool.indexOf(16) == -1" />
  4292. <div class="checkDiv" v-else>
  4293. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4294. </div>
  4295. </div> -->
  4296. </div>
  4297. <div class="tool" :class="{
  4298. isToolChoose:
  4299. itemTool.tool.indexOf(50) != -1,
  4300. }" @click="
  4301. addTools(50, itemTaskIndex, toolIndex)
  4302. ">
  4303. <div class="whiteBIcon" @click.stop="
  4304. addTools(50, itemTaskIndex, toolIndex)
  4305. ">
  4306. <img src="../../../assets/icon/thirdToolList/plwork.png" alt />
  4307. <div style="margin: 5px 0">批量上传</div>
  4308. </div>
  4309. <div class="noCTool">
  4310. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4311. </div>
  4312. <div class="isCTool" v-if="itemTool.tool.indexOf(50) != -1">
  4313. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4314. </div>
  4315. <!-- <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
  4316. <img src="../../../assets/icon/checkNo.png" alt
  4317. v-if="itemTool.tool.indexOf(50) == -1" />
  4318. <div class="checkDiv" v-else>
  4319. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4320. </div>
  4321. </div> -->
  4322. </div>
  4323. <!-- <div class="tool">
  4324. <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
  4325. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4326. <div style="margin: 5px 0">个人评价</div>
  4327. </div>
  4328. <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4329. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(40) == -1" />
  4330. <div class="checkDiv" v-else>
  4331. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4332. </div>
  4333. </div>
  4334. </div> -->
  4335. <div class="tool" :class="{
  4336. isToolChoose:
  4337. itemTool.tool.indexOf(41) != -1,
  4338. }" @click="
  4339. addTools(41, itemTaskIndex, toolIndex)
  4340. ">
  4341. <div class="whiteBIcon" @click.stop="
  4342. openTools(itemTaskIndex, 41, toolIndex)
  4343. ">
  4344. <img src="../../../assets/icon/thirdToolList/select.png" alt />
  4345. <div style="margin: 5px 0">选择匹配</div>
  4346. </div>
  4347. <div class="noCTool">
  4348. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4349. </div>
  4350. <div class="isCTool" v-if="itemTool.tool.indexOf(41) != -1">
  4351. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4352. </div>
  4353. <!-- <div class="check" @click="addTools(41, itemTaskIndex, toolIndex)">
  4354. <img src="../../../assets/icon/checkNo.png" alt
  4355. v-if="itemTool.tool.indexOf(41) == -1" />
  4356. <div class="checkDiv" v-else>
  4357. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4358. </div>
  4359. </div> -->
  4360. </div>
  4361. <div class="tool" :class="{
  4362. isToolChoose:
  4363. itemTool.tool.indexOf(47) != -1,
  4364. }" @click="
  4365. addTools(47, itemTaskIndex, toolIndex)
  4366. ">
  4367. <div class="whiteBIcon" @click.stop="
  4368. openTools(itemTaskIndex, 47, toolIndex)
  4369. ">
  4370. <img src="../../../assets/icon/fourthToolList/conSentences.png" alt />
  4371. <div style="margin: 5px 0">排序</div>
  4372. </div>
  4373. <div class="noCTool">
  4374. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4375. </div>
  4376. <div class="isCTool" v-if="itemTool.tool.indexOf(47) != -1">
  4377. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4378. </div>
  4379. <!-- <div class="check" @click="addTools(47, itemTaskIndex, toolIndex)">
  4380. <img src="../../../assets/icon/checkNo.png" alt
  4381. v-if="itemTool.tool.indexOf(47) == -1" />
  4382. <div class="checkDiv" v-else>
  4383. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4384. </div>
  4385. </div> -->
  4386. </div>
  4387. <!-- <div class="tool">
  4388. <div
  4389. class="whiteBIcon"
  4390. @click="openTools(itemTaskIndex, 42, toolIndex)"
  4391. >
  4392. <img
  4393. src="../../../assets/icon/thirdToolList/mp3.png"
  4394. alt
  4395. />
  4396. <div style="margin: 5px 0">上传音频</div>
  4397. </div>
  4398. <div
  4399. class="check"
  4400. @click="addTools(42, itemTaskIndex, toolIndex)"
  4401. >
  4402. <img
  4403. src="../../../assets/icon/checkNo.png"
  4404. alt
  4405. v-if="itemTool.tool.indexOf(42) == -1"
  4406. />
  4407. <img
  4408. src="../../../assets/icon/checkedIs.png"
  4409. alt
  4410. v-else
  4411. />
  4412. </div>
  4413. </div> -->
  4414. </div>
  4415. <div class="toolSort" v-if="itemTool.toolType == 3">
  4416. <div class="tool" :class="{
  4417. isToolChoose:
  4418. itemTool.tool.indexOf(18) != -1,
  4419. }" @click="
  4420. addTools(18, itemTaskIndex, toolIndex)
  4421. ">
  4422. <div class="whiteBIcon" @click.stop="
  4423. addTools(18, itemTaskIndex, toolIndex)
  4424. ">
  4425. <img src="../../../assets/icon/thirdToolList/trainPlatform.png" alt />
  4426. <div style="margin: 5px 0">训练平台</div>
  4427. </div>
  4428. <div class="noCTool">
  4429. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4430. </div>
  4431. <div class="isCTool" v-if="itemTool.tool.indexOf(18) != -1">
  4432. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4433. </div>
  4434. <!-- <div class="check" @click="addTools(18, itemTaskIndex, toolIndex)">
  4435. <img src="../../../assets/icon/checkNo.png" alt
  4436. v-if="itemTool.tool.indexOf(18) == -1" />
  4437. <div class="checkDiv" v-else>
  4438. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4439. </div>
  4440. </div> -->
  4441. </div>
  4442. <div class="tool" :class="{
  4443. isToolChoose:
  4444. itemTool.tool.indexOf(21) != -1,
  4445. }" @click="
  4446. addTools(21, itemTaskIndex, toolIndex)
  4447. ">
  4448. <div class="whiteBIcon" @click.stop="
  4449. addTools(21, itemTaskIndex, toolIndex)
  4450. ">
  4451. <img src="../../../assets/icon/fourthToolList/program.png" alt />
  4452. <div style="margin: 5px 0">
  4453. AIoT Blockly
  4454. </div>
  4455. </div>
  4456. <div class="noCTool">
  4457. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4458. </div>
  4459. <div class="isCTool" v-if="itemTool.tool.indexOf(21) != -1">
  4460. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4461. </div>
  4462. <!-- <div class="check" @click="addTools(21, itemTaskIndex, toolIndex)">
  4463. <img src="../../../assets/icon/checkNo.png" alt
  4464. v-if="itemTool.tool.indexOf(21) == -1" />
  4465. <div class="checkDiv" v-else>
  4466. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4467. </div>
  4468. </div> -->
  4469. </div>
  4470. <!-- <div class="tool">
  4471. <div class="whiteBIcon" @click="addTools(22, itemTaskIndex, toolIndex)">
  4472. <img src="../../../assets/icon/fourthToolList/AIprogram2.png" alt />
  4473. <div style="margin: 5px 0">AI体验</div>
  4474. </div>
  4475. <div class="check" @click="addTools(22, itemTaskIndex, toolIndex)">
  4476. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(22) == -1" />
  4477. <div class="checkDiv" v-else>
  4478. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4479. </div>
  4480. </div>
  4481. </div> -->
  4482. <div class="tool" :class="{
  4483. isToolChoose:
  4484. itemTool.tool.indexOf(23) != -1,
  4485. }" @click="
  4486. addTools(23, itemTaskIndex, toolIndex)
  4487. ">
  4488. <div class="whiteBIcon" @click.stop="
  4489. addTools(23, itemTaskIndex, toolIndex)
  4490. ">
  4491. <img src="../../../assets/icon/fourthToolList/Pythonprogram.png" alt />
  4492. <div style="margin: 5px 0">AI Python</div>
  4493. </div>
  4494. <div class="noCTool">
  4495. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4496. </div>
  4497. <div class="isCTool" v-if="itemTool.tool.indexOf(23) != -1">
  4498. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4499. </div>
  4500. <!-- <div class="check" @click="addTools(23, itemTaskIndex, toolIndex)">
  4501. <img src="../../../assets/icon/checkNo.png" alt
  4502. v-if="itemTool.tool.indexOf(23) == -1" />
  4503. <div class="checkDiv" v-else>
  4504. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4505. </div>
  4506. </div> -->
  4507. </div>
  4508. <div class="tool" :class="{
  4509. isToolChoose:
  4510. itemTool.tool.indexOf(24) != -1,
  4511. }" @click="
  4512. addTools(24, itemTaskIndex, toolIndex)
  4513. ">
  4514. <div class="whiteBIcon" @click.stop="
  4515. addTools(24, itemTaskIndex, toolIndex)
  4516. ">
  4517. <img src="../../../assets/icon/fourthToolList/AIprogram.png" alt />
  4518. <div style="margin: 5px 0">
  4519. AI Blockly
  4520. </div>
  4521. </div>
  4522. <div class="noCTool">
  4523. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4524. </div>
  4525. <div class="isCTool" v-if="itemTool.tool.indexOf(24) != -1">
  4526. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4527. </div>
  4528. <!-- <div class="check" @click="addTools(24, itemTaskIndex, toolIndex)">
  4529. <img src="../../../assets/icon/checkNo.png" alt
  4530. v-if="itemTool.tool.indexOf(24) == -1" />
  4531. <div class="checkDiv" v-else>
  4532. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4533. </div>
  4534. </div> -->
  4535. </div>
  4536. <div class="tool" :class="{
  4537. isToolChoose:
  4538. itemTool.tool.indexOf(32) != -1,
  4539. }" @click="
  4540. addTools(32, itemTaskIndex, toolIndex)
  4541. ">
  4542. <div class="whiteBIcon" @click.stop="
  4543. addTools(32, itemTaskIndex, toolIndex)
  4544. ">
  4545. <img src="../../../assets/icon/thirdToolList/code.png" alt />
  4546. <div style="margin: 5px 0">源码编辑</div>
  4547. </div>
  4548. <div class="noCTool">
  4549. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4550. </div>
  4551. <div class="isCTool" v-if="itemTool.tool.indexOf(32) != -1">
  4552. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4553. </div>
  4554. <!-- <div class="check" @click="addTools(32, itemTaskIndex, toolIndex)">
  4555. <img src="../../../assets/icon/checkNo.png" alt
  4556. v-if="itemTool.tool.indexOf(32) == -1" />
  4557. <div class="checkDiv" v-else>
  4558. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4559. </div>
  4560. </div> -->
  4561. </div>
  4562. <div class="tool" :class="{
  4563. isToolChoose:
  4564. itemTool.tool.indexOf(57) != -1,
  4565. }" @click="
  4566. addTools(57, itemTaskIndex, toolIndex)
  4567. ">
  4568. <div class="whiteBIcon" @click.stop="
  4569. openTools(itemTaskIndex, 57, toolIndex)
  4570. ">
  4571. <img src="../../../assets/icon/fourthToolList/cocopi.png" alt />
  4572. <div style="margin: 5px 0">CocoPi</div>
  4573. </div>
  4574. <div class="noCTool">
  4575. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4576. </div>
  4577. <div class="isCTool" v-if="itemTool.tool.indexOf(57) != -1">
  4578. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4579. </div>
  4580. <!-- <div class="check" @click="addTools(57, itemTaskIndex, toolIndex)">
  4581. <img src="../../../assets/icon/checkNo.png" alt
  4582. v-if="itemTool.tool.indexOf(57) == -1" />
  4583. <div class="checkDiv" v-else>
  4584. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4585. </div>
  4586. </div> -->
  4587. </div>
  4588. <div class="tool" :class="{
  4589. isToolChoose:
  4590. itemTool.tool.indexOf(63) != -1,
  4591. }" @click="
  4592. addTools(63, itemTaskIndex, toolIndex)
  4593. ">
  4594. <div class="whiteBIcon" @click.stop="
  4595. addTools(63, itemTaskIndex, toolIndex)
  4596. ">
  4597. <img src="../../../assets/icon/fourthToolList/Wood.png" alt />
  4598. <div style="margin: 5px 0">海龟编程</div>
  4599. </div>
  4600. <div class="noCTool">
  4601. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4602. </div>
  4603. <div class="isCTool" v-if="itemTool.tool.indexOf(63) != -1">
  4604. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4605. </div>
  4606. <!-- <div class="check" @click="addTools(63, itemTaskIndex, toolIndex)">
  4607. <img src="../../../assets/icon/checkNo.png" alt
  4608. v-if="itemTool.tool.indexOf(63) == -1" />
  4609. <div class="checkDiv" v-else>
  4610. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4611. </div>
  4612. </div> -->
  4613. </div>
  4614. <div class="tool" :class="{
  4615. isToolChoose:
  4616. itemTool.tool.indexOf(71) != -1,
  4617. }" @click="
  4618. addTools(71, itemTaskIndex, toolIndex)
  4619. ">
  4620. <div class="whiteBIcon" @click.stop="
  4621. addTools(71, itemTaskIndex, toolIndex)
  4622. ">
  4623. <img src="../../../assets/icon/fourthToolList/chatgpt.png" alt />
  4624. <div style="margin: 5px 0">AI智能体</div>
  4625. </div>
  4626. <div class="noCTool">
  4627. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4628. </div>
  4629. <div class="isCTool" v-if="itemTool.tool.indexOf(71) != -1">
  4630. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4631. </div>
  4632. </div>
  4633. </div>
  4634. <div class="toolSort" v-if="itemTool.toolType == 7">
  4635. <div class="tool" :class="{
  4636. isToolChoose:
  4637. itemTool.tool.indexOf(40) != -1,
  4638. }" @click.stop="
  4639. addTools(40, itemTaskIndex, toolIndex)
  4640. ">
  4641. <div class="whiteBIcon" @click.stop="
  4642. openTools(itemTaskIndex, 40, toolIndex)
  4643. ">
  4644. <img src="../../../assets/icon/thirdToolList/eval.png" alt />
  4645. <div style="margin: 5px 0">个人评价</div>
  4646. </div>
  4647. <div class="noCTool">
  4648. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4649. </div>
  4650. <div class="isCTool" v-if="itemTool.tool.indexOf(40) != -1">
  4651. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4652. </div>
  4653. <!-- <div class="check" @click="addTools(40, itemTaskIndex, toolIndex)">
  4654. <img src="../../../assets/icon/checkNo.png" alt
  4655. v-if="itemTool.tool.indexOf(40) == -1" />
  4656. <div class="checkDiv" v-else>
  4657. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4658. </div>
  4659. </div> -->
  4660. </div>
  4661. </div>
  4662. <div class="toolSort" v-if="itemTool.toolType == 5">
  4663. <div class="tool" :class="{
  4664. isToolChoose:
  4665. itemTool.tool.indexOf(28) != -1,
  4666. }" @click="
  4667. addTools(28, itemTaskIndex, toolIndex)
  4668. ">
  4669. <div class="whiteBIcon" @click.stop="
  4670. addTools(28, itemTaskIndex, toolIndex)
  4671. ">
  4672. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4673. <div style="margin: 5px 0">翻译</div>
  4674. </div>
  4675. <div class="noCTool">
  4676. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4677. </div>
  4678. <div class="isCTool" v-if="itemTool.tool.indexOf(28) != -1">
  4679. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4680. </div>
  4681. <!-- <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4682. <img src="../../../assets/icon/checkNo.png" alt
  4683. v-if="itemTool.tool.indexOf(28) == -1" />
  4684. <div class="checkDiv" v-else>
  4685. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4686. </div>
  4687. </div> -->
  4688. </div>
  4689. <div class="tool" :class="{
  4690. isToolChoose:
  4691. itemTool.tool.indexOf(31) != -1,
  4692. }" @click="
  4693. addTools(31, itemTaskIndex, toolIndex)
  4694. ">
  4695. <div class="whiteBIcon" @click.stop="
  4696. addTools(31, itemTaskIndex, toolIndex)
  4697. ">
  4698. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4699. <div style="margin: 5px 0">数字画板</div>
  4700. </div>
  4701. <div class="noCTool">
  4702. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4703. </div>
  4704. <div class="isCTool" v-if="itemTool.tool.indexOf(31) != -1">
  4705. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4706. </div>
  4707. <!-- <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4708. <img src="../../../assets/icon/checkNo.png" alt
  4709. v-if="itemTool.tool.indexOf(31) == -1" />
  4710. <div class="checkDiv" v-else>
  4711. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4712. </div>
  4713. </div> -->
  4714. </div>
  4715. <div class="tool" :class="{
  4716. isToolChoose:
  4717. itemTool.tool.indexOf(39) != -1,
  4718. }" @click="
  4719. addTools(39, itemTaskIndex, toolIndex)
  4720. ">
  4721. <div class="whiteBIcon" @click.stop="
  4722. addTools(39, itemTaskIndex, toolIndex)
  4723. ">
  4724. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4725. <div style="margin: 5px 0">GeoGebra</div>
  4726. </div>
  4727. <div class="noCTool">
  4728. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4729. </div>
  4730. <div class="isCTool" v-if="itemTool.tool.indexOf(39) != -1">
  4731. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4732. </div>
  4733. <!-- <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4734. <img src="../../../assets/icon/checkNo.png" alt
  4735. v-if="itemTool.tool.indexOf(39) == -1" />
  4736. <div class="checkDiv" v-else>
  4737. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4738. </div>
  4739. </div> -->
  4740. </div>
  4741. <div class="tool" :class="{
  4742. isToolChoose:
  4743. itemTool.tool.indexOf(66) != -1,
  4744. }" @click="
  4745. addTools(66, itemTaskIndex, toolIndex)
  4746. ">
  4747. <div class="whiteBIcon" @click.stop="
  4748. addTools(66, itemTaskIndex, toolIndex)
  4749. ">
  4750. <img src="../../../assets/icon/secondToolList/formulaEdi.png" alt />
  4751. <div style="margin: 5px 0">公式编辑</div>
  4752. </div>
  4753. <div class="noCTool">
  4754. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4755. </div>
  4756. <div class="isCTool" v-if="itemTool.tool.indexOf(66) != -1">
  4757. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4758. </div>
  4759. <!-- <div class="check" @click="addTools(66, itemTaskIndex, toolIndex)">
  4760. <img src="../../../assets/icon/checkNo.png" alt
  4761. v-if="itemTool.tool.indexOf(66) == -1" />
  4762. <div class="checkDiv" v-else>
  4763. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4764. </div>
  4765. </div> -->
  4766. </div>
  4767. <!-- <div class="tool">
  4768. <div class="whiteBIcon" @click="addTools(67, itemTaskIndex, toolIndex)">
  4769. <img src="../../../assets/icon/secondToolList/molStr.png" alt />
  4770. <div style="margin: 5px 0">分子结构</div>
  4771. </div>
  4772. <div class="check" @click="addTools(67, itemTaskIndex, toolIndex)">
  4773. <img src="../../../assets/icon/checkNo.png" alt
  4774. v-if="itemTool.tool.indexOf(67) == -1" />
  4775. <div class="checkDiv" v-else>
  4776. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4777. </div>
  4778. </div>
  4779. </div> -->
  4780. <div class="tool" :class="{
  4781. isToolChoose:
  4782. itemTool.tool.indexOf(68) != -1,
  4783. }" @click="
  4784. addTools(68, itemTaskIndex, toolIndex)
  4785. ">
  4786. <div class="whiteBIcon" @click.stop="
  4787. addTools(68, itemTaskIndex, toolIndex)
  4788. ">
  4789. <img src="../../../assets/icon/secondToolList/timeAxis.png" alt />
  4790. <div style="margin: 5px 0">时间轴</div>
  4791. </div>
  4792. <div class="noCTool">
  4793. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4794. </div>
  4795. <div class="isCTool" v-if="itemTool.tool.indexOf(68) != -1">
  4796. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4797. </div>
  4798. <!-- <div class="check" @click="addTools(68, itemTaskIndex, toolIndex)">
  4799. <img src="../../../assets/icon/checkNo.png" alt
  4800. v-if="itemTool.tool.indexOf(68) == -1" />
  4801. <div class="checkDiv" v-else>
  4802. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4803. </div>
  4804. </div> -->
  4805. </div>
  4806. <div class="tool" :class="{
  4807. isToolChoose:
  4808. itemTool.tool.indexOf(69) != -1,
  4809. }" @click="
  4810. addTools(69, itemTaskIndex, toolIndex)
  4811. ">
  4812. <div class="whiteBIcon" @click.stop="
  4813. openTools(itemTaskIndex, 69, toolIndex)
  4814. ">
  4815. <img src="../../../assets/icon/thirdToolList/english.png" alt />
  4816. <div style="margin: 5px 0">英语写作</div>
  4817. </div>
  4818. <div class="noCTool">
  4819. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4820. </div>
  4821. <div class="isCTool" v-if="itemTool.tool.indexOf(69) != -1">
  4822. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4823. </div>
  4824. <!-- <div class="check" @click="addTools(4, itemTaskIndex, toolIndex)">
  4825. <img src="../../../assets/icon/checkNo.png" alt
  4826. v-if="itemTool.tool.indexOf(4) == -1" />
  4827. <div class="checkDiv" v-else>
  4828. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4829. </div>
  4830. </div> -->
  4831. </div>
  4832. <div class="tool" :class="{
  4833. isToolChoose:
  4834. itemTool.tool.indexOf(70) != -1,
  4835. }" @click="
  4836. addTools(70, itemTaskIndex, toolIndex)
  4837. ">
  4838. <div class="whiteBIcon" @click.stop="
  4839. openTools(itemTaskIndex, 70, toolIndex)
  4840. ">
  4841. <img src="../../../assets/icon/thirdToolList/englishVoice.png" alt />
  4842. <div style="margin: 5px 0">英语口语</div>
  4843. </div>
  4844. <div class="noCTool">
  4845. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4846. </div>
  4847. <div class="isCTool" v-if="itemTool.tool.indexOf(70) != -1">
  4848. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  4849. </div>
  4850. </div>
  4851. <!-- <div class="tool">
  4852. <div class="whiteBIcon" @click="addTools(28, itemTaskIndex, toolIndex)">
  4853. <img src="../../../assets/icon/secondToolList/translation.png" alt />
  4854. <div style="margin: 5px 0">翻译</div>
  4855. </div>
  4856. <div class="check" @click="addTools(28, itemTaskIndex, toolIndex)">
  4857. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(28) == -1" />
  4858. <div class="checkDiv" v-else>
  4859. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4860. </div>
  4861. </div>
  4862. </div>
  4863. <div class="tool">
  4864. <div class="whiteBIcon" @click="addTools(37, itemTaskIndex, toolIndex)">
  4865. <img src="../../../assets/icon/secondToolList/mohe.png" alt />
  4866. <div style="margin: 5px 0">魔盒识字</div>
  4867. </div>
  4868. <div class="check" @click="addTools(37, itemTaskIndex, toolIndex)">
  4869. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(37) == -1" />
  4870. <div class="checkDiv" v-else>
  4871. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4872. </div>
  4873. </div>
  4874. </div>
  4875. <div class="tool">
  4876. <div class="whiteBIcon" @click="addTools(38, itemTaskIndex, toolIndex)">
  4877. <img src="../../../assets/icon/secondToolList/24game.png" alt />
  4878. <div style="margin: 5px 0">24点</div>
  4879. </div>
  4880. <div class="check" @click="addTools(38, itemTaskIndex, toolIndex)">
  4881. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(38) == -1" />
  4882. <div class="checkDiv" v-else>
  4883. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4884. </div>
  4885. </div>
  4886. </div>
  4887. <div class="tool">
  4888. <div class="whiteBIcon" @click="addTools(31, itemTaskIndex, toolIndex)">
  4889. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  4890. <div style="margin: 5px 0">数学画板</div>
  4891. </div>
  4892. <div class="check" @click="addTools(31, itemTaskIndex, toolIndex)">
  4893. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(31) == -1" />
  4894. <div class="checkDiv" v-else>
  4895. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4896. </div>
  4897. </div>
  4898. </div>
  4899. <div class="tool">
  4900. <div class="whiteBIcon" @click="addTools(39, itemTaskIndex, toolIndex)">
  4901. <img src="../../../assets/icon/secondToolList/GeoGebra.png" alt />
  4902. <div style="margin: 5px 0">GeoGebra</div>
  4903. </div>
  4904. <div class="check" @click="addTools(39, itemTaskIndex, toolIndex)">
  4905. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(39) == -1" />
  4906. <div class="checkDiv" v-else>
  4907. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4908. </div>
  4909. </div>
  4910. </div>
  4911. <div class="tool">
  4912. <div class="whiteBIcon" @click="addTools(58, itemTaskIndex, toolIndex)">
  4913. <img src="../../../assets/icon/fourthToolList/car.png" alt />
  4914. <div style="margin: 5px 0">模拟驾驶</div>
  4915. </div>
  4916. <div class="check" @click="addTools(58, itemTaskIndex, toolIndex)">
  4917. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(58) == -1" />
  4918. <div class="checkDiv" v-else>
  4919. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4920. </div>
  4921. </div>
  4922. </div>
  4923. <div class="tool">
  4924. <div class="whiteBIcon" @click="addTools(59, itemTaskIndex, toolIndex)">
  4925. <img src="../../../assets/icon/fourthToolList/lineSearch.png" alt />
  4926. <div style="margin: 5px 0">路径搜索</div>
  4927. </div>
  4928. <div class="check" @click="addTools(59, itemTaskIndex, toolIndex)">
  4929. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(59) == -1" />
  4930. <div class="checkDiv" v-else>
  4931. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4932. </div>
  4933. </div>
  4934. </div>
  4935. <div class="tool">
  4936. <div class="whiteBIcon" @click="addTools(60, itemTaskIndex, toolIndex)">
  4937. <img src="../../../assets/icon/fourthToolList/deepLearning.png" alt />
  4938. <div style="margin: 5px 0">深度学习</div>
  4939. </div>
  4940. <div class="check" @click="addTools(60, itemTaskIndex, toolIndex)">
  4941. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(60) == -1" />
  4942. <div class="checkDiv" v-else>
  4943. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4944. </div>
  4945. </div>
  4946. </div>
  4947. <div class="tool">
  4948. <div class="whiteBIcon" @click="addTools(61, itemTaskIndex, toolIndex)">
  4949. <img src="../../../assets/icon/fourthToolList/allHistory.png" alt />
  4950. <div style="margin: 5px 0">全历史</div>
  4951. </div>
  4952. <div class="check" @click="addTools(61, itemTaskIndex, toolIndex)">
  4953. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(61) == -1" />
  4954. <div class="checkDiv" v-else>
  4955. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4956. </div>
  4957. </div>
  4958. </div>
  4959. </div>
  4960. <div class="toolSort" v-if="itemTool.toolType == 4">
  4961. <div class="tool">
  4962. <div class="whiteBIcon" @click="addTools(26, itemTaskIndex, toolIndex)">
  4963. <img src="../../../assets/icon/thirdToolList/courseDesign.png" alt />
  4964. <div style="margin: 5px 0">课程设计</div>
  4965. </div>
  4966. <div class="check" @click="addTools(26, itemTaskIndex, toolIndex)">
  4967. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(26) == -1" />
  4968. <div class="checkDiv" v-else>
  4969. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4970. </div>
  4971. </div>
  4972. </div>
  4973. <div class="tool">
  4974. <div class="whiteBIcon" @click="addTools(25, itemTaskIndex, toolIndex)">
  4975. <img src="../../../assets/icon/thirdToolList/evalua.png" alt />
  4976. <div style="margin: 5px 0">目标管理</div>
  4977. </div>
  4978. <div class="check" @click="addTools(25, itemTaskIndex, toolIndex)">
  4979. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(25) == -1" />
  4980. <div class="checkDiv" v-else>
  4981. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4982. </div>
  4983. </div>
  4984. </div> -->
  4985. <!-- <div class="tool">
  4986. <div class="whiteBIcon" @click="addTools(44, itemTaskIndex, toolIndex)">
  4987. <img src="../../../assets/icon/thirdToolList/hanClass.png" alt />
  4988. <div style="margin: 5px 0">汉字宫</div>
  4989. </div>
  4990. <div class="check" @click="addTools(44, itemTaskIndex, toolIndex)">
  4991. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(44) == -1" />
  4992. <div class="checkDiv" v-else>
  4993. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  4994. </div>
  4995. </div>
  4996. </div> -->
  4997. </div>
  4998. </div>
  4999. <!-- v-show="!itemTool.isFold3" -->
  5000. <div class="op_tool_box"
  5001. v-loading="taskDetailLoading3.indexOf('task-' + itemTaskIndex + toolIndex) !== -1" element-loading-text="小可正在努力生成中,请稍等...">
  5002. <textarea rows="2" v-autoHeight="70" type="text" placeholder="添加工具描述"
  5003. class="binfo_input" style="
  5004. margin: 0 0 20px 0;
  5005. width: 100% !important;
  5006. " v-model="itemTool.toolDetail"></textarea>
  5007. <div class="op_box" :class="{op_box_isquote: isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]}">
  5008. <div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
  5009. <div class="op_box_right">
  5010. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5011. <div class="r_pub_button_op"
  5012. @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `右键学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)"
  5013. @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具${toolIndex + 1}-工具描述-智能优化按钮`)">
  5014. 智能优化</div>
  5015. </el-tooltip>
  5016. <el-switch style="margin-left: 10px" v-model="isQuote['aiDetail3-'+itemTaskIndex+'-'+toolIndex]" active-text="引用" active-color="#0061FF" class="custom-switch" v-if="isDialog == 1" @change="handleSwitchChange('aiDetail3-'+itemTaskIndex+'-'+toolIndex)"></el-switch>
  5017. </div>
  5018. </div>
  5019. </div>
  5020. <evaList
  5021. :toolsData="toolsData"
  5022. :unitJson="unitJson"
  5023. :itemTaskIndex="itemTaskIndex"
  5024. :toolIndex="toolIndex"
  5025. :knowFileids="knowFileids"
  5026. :languageSetting="languageSetting"
  5027. :userid="userid"
  5028. :aiJson="aiJson"
  5029. @setEvaList="setEvaList"
  5030. @addCourseBehavior="addCourseBehavior"
  5031. v-if="panTaskElist() == 0 && pjIndex.indexOf(itemTool.tool[0]) != -1"
  5032. :ref="'evalist'+itemTaskIndex+toolIndex"></evaList>
  5033. </div>
  5034. <button class="c_pub_button_add pub_btn_tool_img" @click="addToolFun(itemTaskIndex), addCourseBehavior('courseBehavior', `点击学历案-任务${itemTaskIndex + 1}-工具描述-添加按钮`)" style="
  5035. margin: 0 auto;
  5036. padding: 0 30px;
  5037. height: 45px;
  5038. ">
  5039. 添加工具
  5040. </button>
  5041. </div>
  5042. </div>
  5043. <div class="elist_css" v-if="panElist(itemTask) > 0">
  5044. <div class="elist_title">
  5045. <div style=" display: flex; flex-direction: row; align-items: center; margin: 20px 0; ">
  5046. <div class="lineTitle clineTitle" style="width: auto">任务评价体系</div>
  5047. </div>
  5048. <div>
  5049. <MindTask :showBar="false" :mindData="itemTask" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mindTask' " :ref="unitIndex + '-' + itemTaskIndex + 'mindTask'"></MindTask>
  5050. </div>
  5051. </div>
  5052. </div>
  5053. <div class="elist_css" v-if="panTaskElist() > 0"
  5054. v-loading="(taskDetailLoading4.indexOf('task-' + itemTaskIndex) !== -1) || (taskGLoading[itemTaskIndex] && taskGLoading[itemTaskIndex][2])" element-loading-text="小可正在努力生成中,请稍等...">
  5055. <div class="elist_title">
  5056. <div style="
  5057. display: flex;
  5058. flex-direction: row;
  5059. align-items: center;
  5060. margin: 20px 0;
  5061. ">
  5062. <div class="lineTitle clineTitle">评价设置</div>
  5063. <div style="margin-left:auto;display: flex;">
  5064. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  5065. <div class="r_pub_button_op"
  5066. @contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
  5067. @click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
  5068. </el-tooltip>
  5069. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
  5070. <div class="r_pub_button_op" style="margin-left:10px;"
  5071. @contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
  5072. @click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
  5073. </el-tooltip>
  5074. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5075. <div class="r_pub_button_op" style="margin-left:10px;"
  5076. @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
  5077. @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList && itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
  5078. </el-tooltip>
  5079. </div>
  5080. <!-- <div class="line" style="width: 90%"></div> -->
  5081. </div>
  5082. </div>
  5083. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5084. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5085. 上传补充资料
  5086. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5087. beforeUploadInfo2(
  5088. $event,
  5089. 18,
  5090. itemTaskIndex
  5091. )
  5092. " />
  5093. </button>
  5094. <div style="margin-top: 10px;width:100%" v-if="pingjiaInfoData[itemTaskIndex] && pingjiaInfoData[itemTaskIndex].length">
  5095. <div class="add_chapters_box add_c_none" v-if="
  5096. pingjiaInfoData[itemTaskIndex] &&
  5097. pingjiaInfoData[itemTaskIndex].length == 0
  5098. ">
  5099. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5100. <span>暂时还没有内容,快去添加吧</span>
  5101. </div>
  5102. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5103. <div class="chapter_upload" v-for="(item1, index1) in pingjiaInfoData[itemTaskIndex]" :key="item1.id" @click="
  5104. getChapterData(
  5105. $event,
  5106. index1,
  5107. item1.type
  5108. )
  5109. " >
  5110. <div class="chapter_upload_o" style="
  5111. position: relative;
  5112. display: flex;
  5113. align-items: center;
  5114. ">
  5115. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5116. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5117. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5118. </div>
  5119. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5120. </div>
  5121. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5122. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5123. </div>
  5124. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5125. </div>
  5126. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5127. </div>
  5128. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5129. </div>
  5130. </div>
  5131. <div class="chapter_upload_n">
  5132. <input readonly="true" v-if="
  5133. item1.type == 2 ||
  5134. item1.type == 3 ||
  5135. item1.type == 12 ||
  5136. item1.type == 13 ||
  5137. item1.type == 7
  5138. " :placeholder="item1.name" @click.stop="
  5139. checkChpater3($event, index1, item1)
  5140. " style="
  5141. border: none;
  5142. outline: none;
  5143. width: 80%;
  5144. minwidth: 215px;
  5145. z-index: 99;
  5146. font-size: 14px;
  5147. white-space: nowrap;
  5148. overflow: hidden;
  5149. text-overflow: ellipsis;
  5150. " />
  5151. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5152. border: none;
  5153. outline: none;
  5154. width: 80%;
  5155. white-space: nowrap;
  5156. overflow: hidden;
  5157. text-overflow: ellipsis;
  5158. " readonly="true" @click="
  5159. selectAttText(index1)
  5160. " />
  5161. <input :placeholder="item1.title ? item1.title : '链接'
  5162. " v-if="item1.type == 8" style="
  5163. border: none;
  5164. outline: none;
  5165. width: 80%;
  5166. white-space: nowrap;
  5167. overflow: hidden;
  5168. text-overflow: ellipsis;
  5169. " readonly="true" @click="selectLine(index1)" />
  5170. <input :placeholder="item1.title ? item1.title : '链接'
  5171. " v-if="item1.type == 14" style="
  5172. border: none;
  5173. outline: none;
  5174. width: 80%;
  5175. white-space: nowrap;
  5176. overflow: hidden;
  5177. text-overflow: ellipsis;
  5178. " readonly="true" @click="
  5179. openUpdateSource(index1)
  5180. " />
  5181. </div>
  5182. <div class="chapter_upload_ic">
  5183. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5184. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5185. checkChpater3($event, index1, item1)
  5186. ">
  5187. <div></div>
  5188. </div>
  5189. <div class="chapter_upload_ic_r" @click.stop="
  5190. deletepingjiaInfoData(
  5191. $event,
  5192. index1,
  5193. itemTaskIndex
  5194. )
  5195. ">
  5196. <div></div>
  5197. </div>
  5198. </div>
  5199. </div>
  5200. </div>
  5201. </div>
  5202. </div>
  5203. <div v-if="
  5204. pingjiainfoproVisible[itemTaskIndex]
  5205. " class="mask">
  5206. <div class="progressBox">
  5207. <div class="lbox">
  5208. <img src="../../../assets/loading.gif" />上传中,请稍后
  5209. </div>
  5210. <div style="margin-bottom: 10px">
  5211. <span>{{
  5212. pingjiainfoisFinishSize[itemTaskIndex]
  5213. }}</span>
  5214. /
  5215. <span>{{
  5216. pingjiainfoisAllSize[itemTaskIndex]
  5217. }}</span>
  5218. </div>
  5219. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="pingjiainfoprogress[itemTaskIndex]
  5220. ? pingjiainfoprogress[itemTaskIndex]
  5221. : 0
  5222. " style="width: 80%"></el-progress> -->
  5223. </div>
  5224. </div>
  5225. </div>
  5226. <div class="mbCss">
  5227. <div class="pjCss" :style="{
  5228. width: itemTask.isEvaFold
  5229. ? 'calc(100% - 55%)'
  5230. : 'calc(100% - 120px)',
  5231. }">
  5232. <div v-if="itemTask.eList && itemTask.eList.length" class="elist_input">
  5233. <div v-for="(eItem, eIndex) in itemTask.eList" :key="eIndex" class="elist_input_box">
  5234. <div class="elist_inptu_text">
  5235. <span>目标:</span>
  5236. <!-- <span>核心素养:</span> -->
  5237. <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写目标" style="width: calc(100% - 280px);"/>
  5238. <el-switch
  5239. @change="forceUpdate"
  5240. class="rateSwitch"
  5241. style="margin-left: auto;"
  5242. v-model="itemTask.eList[eIndex].isai"
  5243. active-color="#0061FF"
  5244. active-text="AI评分"
  5245. inactive-text=""
  5246. active-value="1"
  5247. inactive-value="2">
  5248. </el-switch>
  5249. </div>
  5250. <div class="elist_inptu_text" v-show="false">
  5251. <!-- <span>评价维度:</span> -->
  5252. <span>能力:</span>
  5253. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].value || '填写评价维度'" placement="top" popper-class="text_tooltip2"> -->
  5254. <input type="input" v-model="itemTask.eList[eIndex].value" placeholder="填写能力" />
  5255. <!-- </el-tooltip> -->
  5256. <!-- <span>评星等级:</span>
  5257. <el-rate v-model="itemTask.eList[eIndex].score" @change="setEListStar()"
  5258. disabled></el-rate> -->
  5259. <div class="remove" @click="
  5260. deletEList(
  5261. unitIndex,
  5262. itemTaskIndex,
  5263. eIndex
  5264. )
  5265. "></div>
  5266. </div>
  5267. <div class="elist_inptu_text">
  5268. <!-- <span>维度描述:</span> -->
  5269. <span>评价标准:</span>
  5270. <!-- <el-tooltip effect="dark" :content="itemTask.eList[eIndex].detail || '填写维度描述'" placement="top" popper-class="text_tooltip2"> -->
  5271. <input type="input" v-model="itemTask.eList[eIndex].detail" placeholder="填写评价标准" />
  5272. <div class="remove" @click="
  5273. deletEList(
  5274. unitIndex,
  5275. itemTaskIndex,
  5276. eIndex
  5277. )
  5278. "></div>
  5279. <!-- </el-tooltip> -->
  5280. </div>
  5281. <div class="elist_inptu_text" v-if="evalua">
  5282. <span>目标:</span>
  5283. <!-- <input type="input" v-model="itemTask.eList[eIndex].target" placeholder="填写维度描述" /> -->
  5284. <!-- <el-select v-model="itemTask.eList[eIndex].target" placeholder="请选择目标"
  5285. @change="forceUpdate()">
  5286. <el-option v-for="(e, eIndex) in targetArray" :key="eIndex" :label="e.name"
  5287. :value="e.name">
  5288. </el-option>
  5289. </el-select> -->
  5290. <el-cascader :options="targetArray" v-model="itemTask.eList[eIndex].target"
  5291. :props="{ checkStrictly: true }" :show-all-levels="false" clearable></el-cascader>
  5292. </div>
  5293. <div class="elist_inptu_text" style="align-items: flex-start;" v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]" element-loading-text="小可正在努力生成中,请稍等...">
  5294. <span>评价细则:</span>
  5295. <div style="width: calc(100%);">
  5296. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn" v-if="itemTask.eList[eIndex].rule">{{itemTask.eList[eIndex].isrule ? '收起细则' : '展开细则'}}</div>
  5297. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-else>
  5298. <div class="ruleBtn"
  5299. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5300. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">生成细则</div>
  5301. </el-tooltip>
  5302. <div style="width: calc(100%);" class='op_task_box' v-if="itemTask.eList[eIndex].isrule">
  5303. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="itemTask.eList[eIndex].rule" placeholder="请输入评价细则"></textarea>
  5304. <div class="op_box">
  5305. <div class="op_remark"></div>
  5306. <div class="op_box_right">
  5307. <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
  5308. <div class="r_pub_button_op"
  5309. @contextmenu.prevent="openAiDialog(1, 'aiRateRule', itemTaskIndex, eIndex)"
  5310. @click="openAiDialog(2, 'aiRateRule', itemTaskIndex, eIndex)">{{itemTask.eList[eIndex].rule ? '重新生成' : '生成细则'}}</div>
  5311. </el-tooltip>
  5312. </div>
  5313. </div>
  5314. </div>
  5315. </div>
  5316. </div>
  5317. </div>
  5318. </div>
  5319. <!-- <div class="addToolFun" @click="addEList(unitIndex, itemTaskIndex)"
  5320. style="margin: 35px 35px 0 0">
  5321. <div class="addToolImg">
  5322. <img src="../../../assets/icon/add.png" alt />
  5323. </div>
  5324. <div>添加</div>
  5325. </div> -->
  5326. <div class="eva_btn_box">
  5327. <div class="eva_btn_left_box">
  5328. <button class="c_pub_button_add pub_btn_eval_img"
  5329. @click="addEList(unitIndex, itemTaskIndex)">
  5330. 添加
  5331. </button>
  5332. <!-- <button class="c_pub_button_add pub_btn_eval_source_img"
  5333. @click="openEList(unitIndex, itemTaskIndex)">
  5334. 资源
  5335. </button> -->
  5336. </div>
  5337. <button class="c_pub_button_add" @click="addCET(unitIndex, itemTaskIndex)"
  5338. v-if="itemTask.eList && itemTask.eList.length">
  5339. 添加资源模板
  5340. </button>
  5341. </div>
  5342. </div>
  5343. <div v-if="evalua" style="
  5344. border: 1px solid #e5e5e5;
  5345. box-shadow: 3px 1px 15px 3px #e0e0e0;
  5346. " :style="{
  5347. width: itemTask.isEvaFold ? '55%' : '116px',
  5348. }" class="evaCss">
  5349. <!-- <div class="e_add_top">
  5350. <div class="e_add_title">
  5351. <span>当前使用目标管理</span>
  5352. <span>{{ eTitle }}</span>
  5353. <img src="../../../assets/line.png" class="cru_line" style="
  5354. width: 125px;
  5355. height: 20px;
  5356. bottom: -10px;
  5357. left: 155px;
  5358. " />
  5359. </div>
  5360. </div> -->
  5361. <div class="e_add_content" style="width: 100%">
  5362. <div class="e_add_list_pbox" style="width: 100%">
  5363. <div class="e_add_list_pbox_title">
  5364. <span class="type_title" v-if="itemTask.isEvaFold">切换模式</span>
  5365. <div class="type_content" v-if="itemTask.isEvaFold">
  5366. <span :class="{ active: typeMode == 1 }"
  5367. @click="OtherMb(1, itemTaskIndex)">目标树</span>
  5368. <span :class="{ active: typeMode == 2 }"
  5369. @click="OtherMb(2, itemTaskIndex)">目标罗盘</span>
  5370. <!-- <span :class="{ active: typeMode == 3 }" @click="OtherMb(3)">目标看板</span> -->
  5371. </div>
  5372. <div v-if="itemTask.isEvaFold" class="show_taskD show" style="margin: 0 0 0 auto"
  5373. @click="foldEva(itemTaskIndex)">
  5374. <img src="../../../assets/icon/new/icon-slide.png" />收起目标
  5375. </div>
  5376. <div v-else style="margin: 0 0 0 auto" class="show_taskD"
  5377. @click="foldEva(itemTaskIndex)">
  5378. <img src="../../../assets/icon/new/icon-slide.png" />展开目标
  5379. </div>
  5380. </div>
  5381. <div class="e_add_list_pbox_content" v-if="itemTask.isEvaFold"
  5382. style="min-height: 200px">
  5383. <Mind :showBar="false" :mindData="data" style="width: 100%" :jsmindId="unitIndex + '-' + itemTaskIndex + 'mind'
  5384. " v-if="typeMode == 1"></Mind>
  5385. <Sunburst :Josn="eJson" :num="eJSONNum" style="width: 100%" v-if="typeMode == 2">
  5386. </Sunburst>
  5387. <SeeBoard :Josn="eJson" :num="eJSONNum" :ename="eTitle" style="width: 100%"
  5388. v-if="typeMode == 3"></SeeBoard>
  5389. </div>
  5390. </div>
  5391. </div>
  5392. </div>
  5393. </div>
  5394. </div>
  5395. <div class="funBlock" style="padding: 0">
  5396. <div class="fold" @click="fold(itemTaskIndex, $event)">
  5397. <div class="arrow" :class="{ arrowZ: !(itemTask.isFold === 1) }"></div>
  5398. <div>
  5399. {{
  5400. itemTask.isFold === 1 ? "展开任务" : "收起任务"
  5401. }}
  5402. </div>
  5403. </div>
  5404. <!-- <div class="fold" @click="fold(itemTaskIndex, $event, 0)">
  5405. <div>展开</div>
  5406. <div class="arrow">
  5407. <img src="../../../assets/icon/expand.png" alt />
  5408. </div>
  5409. </div> -->
  5410. </div>
  5411. </div>
  5412. </div>
  5413. <div class="addTaskBorder" v-if="!unitJson[unitIndex].easy">
  5414. <!-- <div>
  5415. <img src="../../../../assets/icon/new/addStage.png" alt />
  5416. <span>添加任务</span>
  5417. </div> -->
  5418. <button class="c_pub_button_confirm pub_btn_add_task_img" @click="addTaskBorder">
  5419. 添加任务
  5420. </button>
  5421. </div>
  5422. </div>
  5423. <div class="info_btnBox3">
  5424. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
  5425. goTo(
  5426. '/course?userid=' +
  5427. userid +
  5428. '&oid=' +
  5429. oid +
  5430. '&org=' +
  5431. org +
  5432. '&role=' +
  5433. role
  5434. )
  5435. ">
  5436. 返回课程
  5437. </button>
  5438. <button class="c_pub_button_return pub_btn_last_img"
  5439. v-if="steps > 1 && steps != 5 && istemplate != 1" @click="lastSteps" style="background: #dbdbdb">
  5440. {{ steps == 4 ? "返回课程" : "上一步" }}
  5441. </button>
  5442. <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
  5443. pub_btn_next_img: steps != 3,
  5444. pub_btn_finish_img: steps == 3,
  5445. }">
  5446. {{ steps == 3 ? "确认上传" : "下一步" }}
  5447. </button>
  5448. <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ?
  5449. '修改模板' : '保存模板'}}</button>
  5450. </div>
  5451. </div>
  5452. </div>
  5453. </div>
  5454. </div>
  5455. <div style="
  5456. width: calc(100% - 20px);
  5457. background: rgb(255, 255, 255);
  5458. border-radius: 10px;
  5459. " v-if="steps == 4">
  5460. <div class="basic_box_success">
  5461. <div class="right_img">
  5462. <img src="../../../assets/icon/right.png" alt />
  5463. </div>
  5464. <div style="font-weight: bold">成功</div>
  5465. <!-- <div>您的课程编号</div>
  5466. <div class="number">{{ number }}</div>-->
  5467. <!-- <div class="success_button">
  5468. <div class="look_course" @click="isNoFinsh">
  5469. 邀请老师协同编辑
  5470. </div>
  5471. <div class="attend_others" @click="goCourse">预览课程</div>
  5472. </div> -->
  5473. </div>
  5474. </div>
  5475. <div :class="{ info_btnBox: isBtnDisplay, info_btnBox2: !isBtnDisplay }" @mouseenter="btnDisplay(true)"
  5476. @mouseleave="btnDisplay(false)" v-if="false">
  5477. <button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1 && isBtnDisplay" @click="
  5478. goTo(
  5479. '/course?userid=' +
  5480. userid +
  5481. '&oid=' +
  5482. oid +
  5483. '&org=' +
  5484. org +
  5485. '&role=' +
  5486. role
  5487. )
  5488. ">
  5489. 返回课程
  5490. </button>
  5491. <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && isBtnDisplay"
  5492. @click="lastSteps">
  5493. {{ steps == 4 ? "返回课程" : "上一步" }}
  5494. </button>
  5495. <button class="c_pub_button_confirm" v-if="steps < 4 && isBtnDisplay" @click="nextSteps" :class="{
  5496. pub_btn_next_img: steps != 3,
  5497. pub_btn_finish_img: steps == 3,
  5498. }">
  5499. {{ steps == 3 ? "确认上传" : "下一步" }}
  5500. </button>
  5501. </div>
  5502. </div>
  5503. </div>
  5504. <div class="leftBar" v-if="istemplate == 1">
  5505. <aiTips ttitle="基础资料" title="提取摘要" :detail="aiJson.aiAbstract" pan="aiAbstract" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5506. <aiTips ttitle="基础资料" title="提取目标" :detail="aiJson.aiTarget" pan="aiTarget" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5507. <aiTips ttitle="基础资料" title="智能检索资料" :detail="aiJson.aiSearchFile" pan="aiSearchFile" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5508. <aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson" />
  5509. <aiTips ttitle="基础资料" title="目标文件检索" :detail="aiJson.aiTargetGet" pan="aiTargetGet" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5510. <aiTips ttitle="基础资料" title="生成目标" :detail="aiJson.aiTarget2" pan="aiTarget2" @setAiJson="setAiJson" v-if="!yiKeTemplateArray.includes(templateid)"/>
  5511. <aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson" v-if="templateid != '61c628b9-3d96-11ef-b873-005056b86db5' && templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5512. <aiTips ttitle="课程大纲" title="大纲任务生成" :detail="aiJson.aiOutlineTask" pan="aiOutlineTask" @setAiJson="setAiJson" v-if="templateid == '61c628b9-3d96-11ef-b873-005056b86db5'"/>
  5513. <aiTips ttitle="课程大纲" title="大纲描述生成(重新生成任务)" :detail="aiJson.aiOutlineDetail2" pan="aiOutlineDetail2" @setAiJson="setAiJson"/>
  5514. <aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson" v-if="templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5515. <aiTips ttitle="cpote" title="概念群" :detail="aiJson.cpote1" pan="cpote1" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5516. <aiTips ttitle="cpote" title="问题链" :detail="aiJson.cpote2" pan="cpote2" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5517. <aiTips ttitle="cpote" title="目标层" :detail="aiJson.cpote3" pan="cpote3" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5518. <aiTips ttitle="cpote" title="任务簇" :detail="aiJson.cpote4" pan="cpote4" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5519. <aiTips ttitle="cpote" title="生成任务" :detail="aiJson.aiCpoteTask" pan="aiCpoteTask" @setAiJson="setAiJson" v-if="templateid == '4480d65a-1e48-11ef-bee5-005056b86db5' || templateid == 'cf5722a4-401b-11ef-b873-005056b86dc3'"/>
  5520. <!-- <aiTips ttitle="课程大纲" title="生成教案按钮" :detail="aiJson.aiTeacher" pan="aiTeacher" @setAiJson="setAiJson" /> -->
  5521. <!-- <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail" pan="teacherDetail"
  5522. @setAiJson="setAiJson" /> -->
  5523. <aiTips ttitle="生成教案" title="教案描述优化" :detail="aiJson.teacherDetail2" pan="teacherDetail2"
  5524. @setAiJson="setAiJson" />
  5525. <aiTips ttitle="生成教案" title="生成任务按钮" :detail="aiJson.aiTask" pan="aiTask" @setAiJson="setAiJson" />
  5526. <aiTips ttitle="任务详情" title="任务描述" :detail="aiJson.aiTaskG1" pan="aiTaskG1" @setAiJson="setAiJson" />
  5527. <aiTips ttitle="任务详情" title="工具列表" :detail="aiJson.aiTaskG2" pan="aiTaskG2" @setAiJson="setAiJson" />
  5528. <aiTips ttitle="任务详情" title="评价提取" :detail="aiJson.aiTaskG3" pan="aiTaskG3" @setAiJson="setAiJson" />
  5529. <aiTips ttitle="任务详情" title="任务描述优化" :detail="aiJson.aiDetail2" pan="aiDetail2" @setAiJson="setAiJson" />
  5530. <aiTips ttitle="任务详情" title="工具描述优化" :detail="aiJson.aiDetail3" pan="aiDetail3" @setAiJson="setAiJson" />
  5531. <aiTips ttitle="任务详情" title="任务评价优化" :detail="aiJson.aiDetail4" pan="aiDetail4" @setAiJson="setAiJson" />
  5532. <aiTips ttitle="任务详情" title="生成评价细则" :detail="aiJson.aiRateRule" pan="aiRateRule" @setAiJson="setAiJson"/>
  5533. </div>
  5534. <div class="leftBar2 resizable" v-show="istemplate != 1 && isDialog == 1 && chatid && isDisplay">
  5535. <div class="resizer"></div>
  5536. <aiBoxRight
  5537. :languageSetting="languageSetting"
  5538. :courseId="chatid"
  5539. :unitJson="unitJson"
  5540. :quoteArray="isQuote"
  5541. :teacherCourseText="teacherCourseText"
  5542. :targetCourseText="targetCourseText"
  5543. :courseText2="courseText"
  5544. :targetCourseText2="targetCourseText2"
  5545. :cpote="cpote"
  5546. @addCourseBehavior="addCourseBehavior"
  5547. @setIsQuote="setIsQuote"></aiBoxRight>
  5548. </div>
  5549. <div class="close_btn" @click="closeRight" :class="!isDisplay ? 'close_btn_voice' : ''" v-show="istemplate != 1 && isDialog == 1 && chatid">
  5550. <img src="../../../assets/icon/course/arrow.svg" >
  5551. </div>
  5552. </div>
  5553. <el-dialog title="提示" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
  5554. class="dialog_diy2 customWidth">
  5555. <div>请复制该链接邀请协同编辑</div>
  5556. <div>http://www.boomyon.com/index-zhang.com</div>
  5557. <span slot="footer" class="dialog-footer">
  5558. <el-button type="primary">复制链接分享</el-button>
  5559. <el-button @click="dialogVisible = false">取消</el-button>
  5560. </span>
  5561. </el-dialog>
  5562. <el-dialog :title="updateBoolean2 ? '查看文档' : '添加文档'" :visible.sync="dialogVisible1" :append-to-body="true"
  5563. width="25%" :before-close="handleClose" class="dialog_diy2 customWidth">
  5564. <el-form>
  5565. <el-form-item label="文档标题">
  5566. <el-input v-model="tTitle" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5567. </el-form-item>
  5568. <div>文档简介</div>
  5569. <editor-bar v-model="tdetail" @change="change"></editor-bar>
  5570. </el-form>
  5571. <span slot="footer" class="dialog-footer">
  5572. <el-button @click="dialogVisible1 = false">取 消</el-button>
  5573. <el-button type="primary" @click="addWord" v-if="!updateBoolean2">添加</el-button>
  5574. <el-button type="primary" @click="upWord" v-else>修 改</el-button>
  5575. </span>
  5576. </el-dialog>
  5577. <el-dialog title="添加文档" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"
  5578. :before-close="handleClose" class="dialog_diy">
  5579. <el-form>
  5580. <el-form-item label="文档标题">
  5581. <el-input v-model="templateC.title" auto-complete="off" placeholder="请输入文档标题名..."></el-input>
  5582. </el-form-item>
  5583. <div>文档内容</div>
  5584. <editor-bar v-model="cTemplate" @change="change"></editor-bar>
  5585. </el-form>
  5586. <span slot="footer" class="dialog-footer">
  5587. <el-button @click="clearChoose">取 消</el-button>
  5588. <el-button type="primary" @click="wordNext()">确定</el-button>
  5589. </span>
  5590. </el-dialog>
  5591. <el-dialog title="添加富文本" :visible.sync="dialogVisible6" :append-to-body="true" width="500px"
  5592. :before-close="handleClose" class="dialog_diy">
  5593. <el-form>
  5594. <el-form-item label="文本标题">
  5595. <el-input ref="fuInput" v-model="AttText.title" auto-complete="off" @input="change2"
  5596. placeholder="请输入文本标题..."></el-input>
  5597. </el-form-item>
  5598. <!-- <div>富文本内容</div> -->
  5599. <editor-bar v-model="AttText.text" @change="change" v-if="dialogVisible6"></editor-bar>
  5600. </el-form>
  5601. <span slot="footer" class="dialog-footer">
  5602. <el-button @click="clearAttText">取 消</el-button>
  5603. <el-button type="primary" @click="isAddOrUpdateAttText">确定</el-button>
  5604. </span>
  5605. </el-dialog>
  5606. <el-dialog title="添加链接" :visible.sync="dialogVisible7" :append-to-body="true" width="500px"
  5607. :before-close="handleClose" class="dialog_diy lineCss">
  5608. <el-form>
  5609. <el-form-item label="标题" :label-width="formLabelWidth">
  5610. <span>
  5611. <el-input placeholder="请输入链接标题" clearable v-model="lineTitle" class="add_input"></el-input>
  5612. </span>
  5613. </el-form-item>
  5614. <el-form-item label="链接" :label-width="formLabelWidth">
  5615. <span>
  5616. <el-input placeholder="请输入链接" clearable v-model="line" class="add_input"></el-input>
  5617. </span>
  5618. </el-form-item>
  5619. </el-form>
  5620. <span slot="footer" class="dialog-footer">
  5621. <el-button @click="clearLine">取 消</el-button>
  5622. <el-button type="primary" @click="isAddOrUpdateLine">确定</el-button>
  5623. </span>
  5624. </el-dialog>
  5625. <el-dialog :title="updateSourcePan ? '修改资源' : '添加资源'" :visible.sync="dialogVisibleSource" :append-to-body="true"
  5626. width="100%" :before-close="handleClose" class="dialog_diy source_diy">
  5627. <div>
  5628. <sourceDialog :sourceData.sync="sourceData" :updateSourcePan="updateSourcePan"></sourceDialog>
  5629. </div>
  5630. <span slot="footer" class="dialog-footer">
  5631. <el-button @click="dialogVisibleSource = false">取 消</el-button>
  5632. <el-button type="primary" @click="addSource" v-if="!updateSourcePan">确定</el-button>
  5633. <el-button type="primary" @click="updateSource" v-else>确定</el-button>
  5634. </span>
  5635. </el-dialog>
  5636. <el-dialog title="添加课程成员" :visible.sync="dialogVisible3" :append-to-body="true" width="25%" height="80%"
  5637. :before-close="handleClose" class="addNewPP customWidth">
  5638. <div class="people">
  5639. <div class="people_top">
  5640. <div class="people_nav">选择成员</div>
  5641. <div class="people_top_right">
  5642. <div class="people_search">
  5643. <el-input style="height: 100%" placeholder="搜索成员名称" v-model="searchPeople"></el-input>
  5644. <div class="search_img" @click="searchStudent">
  5645. <img src="../../../assets/icon/search.png" alt />
  5646. </div>
  5647. </div>
  5648. </div>
  5649. </div>
  5650. <el-checkbox-group v-model="checkboxList" class="people_name">
  5651. <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
  5652. "暂无学生可选" }}</el-checkbox>
  5653. </el-checkbox-group>
  5654. </div>
  5655. <span slot="footer" class="dialog-footer">
  5656. <el-button @click="dialogVisible3 = false">取 消</el-button>
  5657. <el-button type="primary" @click="isAddPP">确定</el-button>
  5658. </span>
  5659. </el-dialog>
  5660. <el-dialog title="选择授课班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="600px" height="80%"
  5661. :before-close="handleClose" class="addNewPP2">
  5662. <div class="check_classBox">
  5663. <div class="check_class_right">
  5664. <div class="check_class" :class="{ activeX: gradeId == '' }" @click="(gradeId = ''), getClass()">
  5665. 全部
  5666. </div>
  5667. <el-tooltip placement="top" :content="item.name" v-for="(item, index) in gradeList" :key="index">
  5668. <div class="check_class" :class="{ activeX: gradeId == item.id }" @click="(gradeId = item.id), getClass()">
  5669. {{ item.name }}
  5670. </div>
  5671. </el-tooltip>
  5672. </div>
  5673. <div class="check_class_left">
  5674. <div class="check_class_all_box">
  5675. <div class="check_class_left_title">选择班级</div>
  5676. <div style="display: flex; align-items: center; margin-left: auto">
  5677. <el-checkbox v-model="checkAll" @change="handleCheckAllChange" class="all_check">全选</el-checkbox>
  5678. </div>
  5679. </div>
  5680. <!-- <div class="class_item" style="position:absolute; margin:0" v-if="grade2.length">
  5681. <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
  5682. </div> -->
  5683. <el-checkbox-group v-model="checkboxList2" class="check_class_item" @change="InviteChange"
  5684. v-if="grade2.length">
  5685. <div v-for="item in grade2" :key="item.id" class="class_item">
  5686. <el-checkbox :label="item.id">
  5687. {{ item.name }}
  5688. </el-checkbox>
  5689. </div>
  5690. </el-checkbox-group>
  5691. <div v-if="!grade2.length">暂无数据</div>
  5692. </div>
  5693. </div>
  5694. <span slot="footer" class="dialog-footer">
  5695. <el-button @click="dialogVisibleClass = false">取 消</el-button>
  5696. <el-button type="primary" @click="isAddClass">确定</el-button>
  5697. </span>
  5698. </el-dialog>
  5699. <el-dialog title="添加协同成员" :visible.sync="dialogVisibleMember" :append-to-body="true" width="25%" height="80%"
  5700. :before-close="handleClose" class="addNewPP customWidth">
  5701. <div style="display: flex;justify-content: space-between;">
  5702. <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
  5703. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
  5704. 全部
  5705. </div>
  5706. <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)"
  5707. v-for="(i) in CollaborativeTeaList" :key="i.id">
  5708. <el-tooltip placement="top" :content="i.name">
  5709. <span>{{i.name}}</span>
  5710. </el-tooltip>
  5711. </div>
  5712. <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
  5713. 其他
  5714. </div>
  5715. </div>
  5716. <div style="width: calc(100% - 100px);" v-loading="CollLoading">
  5717. <div class="people">
  5718. <div class="people_top">
  5719. <div class="people_top_right">
  5720. <div class="people_search">
  5721. <el-input placeholder="搜索成员名称" v-model="searchTN" @keyup.enter.native="getTeacher(collid)"></el-input>
  5722. <div class="search_img" @click="getTeacher(collid)">
  5723. <img src="../../../assets/icon/search.png" alt />
  5724. </div>
  5725. </div>
  5726. </div>
  5727. <div class="people_nav" style="display: flex; align-items: center">
  5728. <div class="check_class_left_title">选择成员</div>
  5729. <div style="display: flex; align-items: center; margin-left: auto">
  5730. <el-checkbox v-model="checkAll2" @change="handleCheckAllChange2" class="all_check">全选</el-checkbox>
  5731. </div>
  5732. </div>
  5733. </div>
  5734. <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length"
  5735. @change="InviteChange2">
  5736. <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
  5737. <div class="t_j_box">
  5738. <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
  5739. <span>{{ item.name ? item.name : "暂无姓名" }}</span>
  5740. </el-tooltip>
  5741. <el-tooltip placement="top" :content="item.username.split('@')[0]">
  5742. <span>{{ item.username.split('@')[0] }}</span>
  5743. </el-tooltip>
  5744. <el-tooltip placement="top" :content="item.school">
  5745. <span>{{ item.school }}</span>
  5746. </el-tooltip>
  5747. </div>
  5748. </el-checkbox>
  5749. </el-checkbox-group>
  5750. <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
  5751. </div>
  5752. </div>
  5753. </div>
  5754. <span slot="footer" class="dialog-footer">
  5755. <el-button @click="dialogVisibleMember = false">取 消</el-button>
  5756. <el-button type="primary" @click="isAddPPTeacher">确定</el-button>
  5757. </span>
  5758. </el-dialog>
  5759. <el-dialog title="创建问卷" :visible.sync="dialogVisible5" :append-to-body="true" width="800px" :before-close="(done) => {
  5760. closePan(4);
  5761. }
  5762. " class="dialog_diy fullStyle">
  5763. <div style="height: 100%">
  5764. <div class="a_add_title" style="
  5765. display: flex;
  5766. flex-direction: row;
  5767. align-items: center;
  5768. justify-content: center;
  5769. ">
  5770. <!-- <div style="margin-right: 20px; font-size: 20px">标题:</div> -->
  5771. <el-input v-model="askJson.askTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5772. </div>
  5773. <div class="a_addBox" style="height: calc(100% - 50px)">
  5774. <!-- <div style="font-size: 16px; color: #c7c7c7">请输入题目内容</div> -->
  5775. <div class="a_add_box" v-for="(item1, index1) in askJson.askCount" :key="index1">
  5776. <div class="a_add_checkType">
  5777. <span :class="{
  5778. active:
  5779. askJson.askJson[index1].type == '1' ||
  5780. !askJson.askJson[index1].type,
  5781. }" @click="checkAskType('1', askJson.askJson[index1])">单选题</span>
  5782. <span :class="{ active: askJson.askJson[index1].type == '2' }"
  5783. @click="checkAskType('2', askJson.askJson[index1])">多选题</span>
  5784. </div>
  5785. <div class="a_add_head">
  5786. <div style="
  5787. display: flex;
  5788. align-items: center;
  5789. width: 100%;
  5790. margin-right: 20px;
  5791. ">
  5792. <span style="min-width: fit-content">{{
  5793. index1 + 1 + "、"
  5794. }}</span>
  5795. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5796. v-model="askJson.askJson[index1].askstitle" placeholder="请输入题目" @change="() => {
  5797. $forceUpdate();
  5798. }
  5799. "></textarea>
  5800. </div>
  5801. <div class="moveBtn moveBtn2" style="margin: 0 20px 0 0px" v-if="askJson.askCount != 1">
  5802. <div class="chapter_upload_up" @click.stop="askMove(1, index1)"></div>
  5803. <div class="chapter_upload_down" @click.stop="askMove(2, index1)"></div>
  5804. </div>
  5805. <div class="a_add_head_div">
  5806. <el-button type="primary" size="small" @click="deleteAskList(index1)" v-if="askJson.askCount != 1">删除
  5807. </el-button>
  5808. <el-button type="primary" size="small" @click="addAskList(index1)">添加</el-button>
  5809. </div>
  5810. </div>
  5811. <div class="a_add_body">
  5812. <div class="a_add_input" style="flex-direction: column">
  5813. <div v-for="(item2, checkIndex) in askJson.askJson[index1].askItem" :key="checkIndex" style="
  5814. margin: 20px 10px 0 0;
  5815. display: flex;
  5816. align-items: center;
  5817. position: relative;
  5818. ">
  5819. <div style="margin-right: 10px">选项{{ checkIndex + 1 }}</div>
  5820. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  5821. v-model="askJson.askJson[index1].checkList[checkIndex]" placeholder="请输入选项" style="width: 300px"
  5822. @change="() => {
  5823. $forceUpdate();
  5824. }
  5825. "></textarea>
  5826. <div class="moveBtn moveBtn2" style="margin: 0 0px 0 20px"
  5827. v-if="askJson.askJson[index1].askItem != 1">
  5828. <div class="chapter_upload_up" @click.stop="checkMove(1, index1, checkIndex)"></div>
  5829. <div class="chapter_upload_down" @click.stop="checkMove(2, index1, checkIndex)"></div>
  5830. </div>
  5831. <div class="a_add_body_div">
  5832. <el-button type="primary" size="small"
  5833. @click="addcheckList(askJson.askJson[index1], checkIndex)">添加</el-button>
  5834. <el-button type="primary" size="small" @click="
  5835. deletecheckList(askJson.askJson[index1], checkIndex)
  5836. " v-if="askJson.askJson[index1].askItem != 1">删除
  5837. </el-button>
  5838. </div>
  5839. </div>
  5840. </div>
  5841. <!-- <div class="a_add_body_div">
  5842. <el-button style="margin: 10px 0px 0 0" type="primary" size="small"
  5843. @click="addcheckList(askJson.askJson[index1])">添加</el-button>
  5844. <el-button type="primary" size="small" style="margin: 10px 0 0 10px"
  5845. @click="deletecheckList(askJson.askJson[index1])" v-if="askJson.askJson[index1].askItem != 1">删除
  5846. </el-button>
  5847. </div> -->
  5848. </div>
  5849. </div>
  5850. </div>
  5851. </div>
  5852. <span slot="footer" class="dialog-footer">
  5853. <el-button @click="closePan(4)">取 消</el-button>
  5854. <el-button type="primary" @click="addAsk">确 定</el-button>
  5855. </span>
  5856. </el-dialog>
  5857. <el-dialog title="创建选择题" :visible.sync="dialogVisibleChoice" :append-to-body="true" width="800px" :before-close="(done) => {
  5858. closePan(45);
  5859. }
  5860. " class="dialog_diy fullStyle">
  5861. <div style="height: 100%" v-loading="choiceLoading" element-loading-text="小可正在努力生成中,请稍等...">
  5862. <!-- <div class="a_add_title" style="
  5863. display: flex;
  5864. flex-direction: row;
  5865. align-items: center;
  5866. justify-content: center;
  5867. ">
  5868. <div style="margin-right: 20px; font-size: 20px">标题:</div>
  5869. <el-input v-model="testJson.testTitle" placeholder="请输入标题" style="width: 400px"></el-input>
  5870. </div> -->
  5871. <div class="a_addBox" style="height: 100%">
  5872. <div style="flex-wrap: wrap; position:relative;margin:10px 0;">
  5873. <button class="c_pub_button_confirm2" @click="addImg($event)" style="margin: 0px;">
  5874. 上传补充资料
  5875. <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
  5876. beforeUploadInfo2(
  5877. $event,
  5878. 17
  5879. )
  5880. " />
  5881. </button>
  5882. <div style="margin-top: 10px;width:100%" v-if="xuanzeInfoData.length">
  5883. <div class="add_chapters_box add_c_none" v-if="
  5884. xuanzeInfoData &&
  5885. xuanzeInfoData.length == 0
  5886. ">
  5887. <!-- <img src="../../../assets/icon/new/c_none.png" alt /> -->
  5888. <span>暂时还没有内容,快去添加吧</span>
  5889. </div>
  5890. <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
  5891. <div class="chapter_upload" v-for="(item1, index1) in xuanzeInfoData" :key="item1.id" @click="
  5892. getChapterData(
  5893. $event,
  5894. index1,
  5895. item1.type
  5896. )
  5897. " >
  5898. <div class="chapter_upload_o" style="
  5899. position: relative;
  5900. display: flex;
  5901. align-items: center;
  5902. ">
  5903. <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
  5904. <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
  5905. <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
  5906. </div>
  5907. <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
  5908. </div>
  5909. <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
  5910. <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
  5911. </div>
  5912. <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
  5913. </div>
  5914. <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
  5915. </div>
  5916. <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
  5917. </div>
  5918. </div>
  5919. <div class="chapter_upload_n">
  5920. <input readonly="true" v-if="
  5921. item1.type == 2 ||
  5922. item1.type == 3 ||
  5923. item1.type == 12 ||
  5924. item1.type == 13 ||
  5925. item1.type == 7
  5926. " :placeholder="item1.name" @click.stop="
  5927. checkChpater3($event, index1, item1)
  5928. " style="
  5929. border: none;
  5930. outline: none;
  5931. width: 80%;
  5932. minwidth: 215px;
  5933. z-index: 99;
  5934. font-size: 14px;
  5935. white-space: nowrap;
  5936. overflow: hidden;
  5937. text-overflow: ellipsis;
  5938. " />
  5939. <input :placeholder="item1.name" v-if="item1.type == 6" style="
  5940. border: none;
  5941. outline: none;
  5942. width: 80%;
  5943. white-space: nowrap;
  5944. overflow: hidden;
  5945. text-overflow: ellipsis;
  5946. " readonly="true" @click="
  5947. selectAttText(index1)
  5948. " />
  5949. <input :placeholder="item1.title ? item1.title : '链接'
  5950. " v-if="item1.type == 8" style="
  5951. border: none;
  5952. outline: none;
  5953. width: 80%;
  5954. white-space: nowrap;
  5955. overflow: hidden;
  5956. text-overflow: ellipsis;
  5957. " readonly="true" @click="selectLine(index1)" />
  5958. <input :placeholder="item1.title ? item1.title : '链接'
  5959. " v-if="item1.type == 14" style="
  5960. border: none;
  5961. outline: none;
  5962. width: 80%;
  5963. white-space: nowrap;
  5964. overflow: hidden;
  5965. text-overflow: ellipsis;
  5966. " readonly="true" @click="
  5967. openUpdateSource(index1)
  5968. " />
  5969. </div>
  5970. <div class="chapter_upload_ic">
  5971. <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
  5972. <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
  5973. checkChpater3($event, index1, item1)
  5974. ">
  5975. <div></div>
  5976. </div>
  5977. <div class="chapter_upload_ic_r" @click.stop="
  5978. deletexuanzeInfoData(
  5979. $event,
  5980. index1
  5981. )
  5982. ">
  5983. <div></div>
  5984. </div>
  5985. </div>
  5986. </div>
  5987. </div>
  5988. </div>
  5989. </div>
  5990. <div v-if="
  5991. xuanzeinfoproVisible
  5992. " class="mask">
  5993. <div class="progressBox">
  5994. <div class="lbox">
  5995. <img src="../../../assets/loading.gif" />上传中,请稍后
  5996. </div>
  5997. <div style="margin-bottom: 10px">
  5998. <span>{{
  5999. xuanzeinfoisFinishSize
  6000. }}</span>
  6001. /
  6002. <span>{{
  6003. xuanzeinfoisAllSize
  6004. }}</span>
  6005. </div>
  6006. <!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="xuanzeinfoprogress
  6007. ? xuanzeinfoprogress
  6008. : 0
  6009. " style="width: 80%"></el-progress> -->
  6010. </div>
  6011. </div>
  6012. </div>
  6013. <div style="
  6014. font-size: 16px;
  6015. color: #c7c7c7;
  6016. display: flex;
  6017. align-items: center;
  6018. justify-content: flex-end;
  6019. ">
  6020. <!-- 请输入题目内容 -->
  6021. <button class="c_pub_button_add pub_btn_paste_img" @click="aiChoice(45)" style="margin-left: 10px">
  6022. 智能生成
  6023. </button>
  6024. <!-- 请输入题目内容 -->
  6025. <button class="c_pub_button_add pub_btn_paste_img" @click="pasteOption" style="margin-left: 10px"
  6026. v-if="isPasteChoice">
  6027. 智能粘贴
  6028. </button>
  6029. </div>
  6030. <div class="a_add_box" v-for="(item1, index1) in testJson.testCount" :key="index1">
  6031. <div class="a_add_checkType">
  6032. <span :class="{ active: testJson.testJson[index1].type == '1' }"
  6033. @click="checkTestType('1', testJson.testJson[index1])">单选题</span>
  6034. <span :class="{ active: testJson.testJson[index1].type == '2' }"
  6035. @click="checkTestType('2', testJson.testJson[index1])">多选题</span>
  6036. </div>
  6037. <div class="a_add_head">
  6038. <div class="timuUpImg">
  6039. <div style="display: flex; align-items: center">
  6040. <span style="min-width: fit-content">{{
  6041. index1 + 1 + "、"
  6042. }}</span>
  6043. <!-- <el-input class="a_add_head_input" v-autoHeight="40" resize="none" v-model="testJson.testJson[index1].teststitle" type="textarea"
  6044. placeholder="请输入题目">
  6045. </el-input> -->
  6046. <textarea class="a_add_head_input textarea_css" v-autoHeight="40"
  6047. v-model="testJson.testJson[index1].teststitle" placeholder="请输入题目" @change="() => {
  6048. $forceUpdate();
  6049. }
  6050. "></textarea>
  6051. </div>
  6052. <div class="moveBtn moveBtn2" v-if="testJson.testCount != 1">
  6053. <div class="chapter_upload_up" @click.stop="testMove(1, index1)"></div>
  6054. <div class="chapter_upload_down" @click.stop="testMove(2, index1)"></div>
  6055. </div>
  6056. <div class="xzUpImg" @click.stop="addImg($event)" style="margin-right: 10px">
  6057. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6058. <input type="file" accept="image/*" style="display: none"
  6059. @change="beforeUploadTiMu($event, index1)" />
  6060. </div>
  6061. </div>
  6062. <div class="a_add_head_div">
  6063. <el-button type="primary" size="small" @click="deleteTestList(index1)" v-if="testJson.testCount != 1">删除
  6064. </el-button>
  6065. <el-button type="primary" size="small" @click="addTestList(index1)">添加</el-button>
  6066. </div>
  6067. </div>
  6068. <div class="timuImgBox" v-if="
  6069. testJson.testJson[index1].timuList &&
  6070. testJson.testJson[index1].timuList.length
  6071. ">
  6072. <div v-for="(timg, tIndex) in testJson.testJson[index1].timuList" :key="tIndex" class="timuImg"
  6073. @click.stop="previewImg(timg.src)">
  6074. <img :src="timg.src" alt="" />
  6075. <div class="deleteWord" @click.stop="deleteM(index1, tIndex)">
  6076. <img src="../../../assets/icon/delete.png" alt="" />
  6077. </div>
  6078. </div>
  6079. </div>
  6080. <div class="a_add_body">
  6081. <div class="a_add_input a_add_input_choice">
  6082. <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1"
  6083. @change="() => {
  6084. $forceUpdate();
  6085. }
  6086. ">
  6087. <div class="radioBox">
  6088. <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
  6089. .testItem" :key="checkIndex" :label="checkIndex">
  6090. <div style="margin-right: 10px">
  6091. 选项{{ checkIndex + 1 }}
  6092. </div>
  6093. <div style="margin-right: 10px; width: 300px" v-if="
  6094. testJson.testJson[index1].checkList[checkIndex] &&
  6095. testJson.testJson[index1].checkList[checkIndex]
  6096. .imgType &&
  6097. testJson.testJson[index1].checkList[checkIndex]
  6098. .imgType == 1
  6099. ">
  6100. <div class="inImg" @click.stop="
  6101. previewImg(
  6102. testJson.testJson[index1].checkList[checkIndex]
  6103. .src
  6104. )
  6105. ">
  6106. <el-image :src="testJson.testJson[index1].checkList[checkIndex]
  6107. .src
  6108. " lazy />
  6109. <!-- <img :src="
  6110. testJson.testJson[index1].checkList[checkIndex]
  6111. .src
  6112. " alt="" /> -->
  6113. </div>
  6114. </div>
  6115. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex]
  6116. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6117. $forceUpdate();
  6118. }
  6119. "></textarea>
  6120. <div class="xzUpImg" @click.stop="addImg($event)">
  6121. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6122. <input type="file" accept="image/*" style="display: none"
  6123. @change="beforeUploadTi($event, index1, checkIndex)" />
  6124. </div>
  6125. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6126. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex)"></div>
  6127. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex)"></div>
  6128. </div>
  6129. <div class="a_add_body_div">
  6130. <el-button type="primary" size="small" @click.stop="
  6131. addTcheckList(testJson.testJson[index1], checkIndex)
  6132. ">添加</el-button>
  6133. <el-button type="primary" size="small" @click.stop="
  6134. deleteTcheckList(
  6135. testJson.testJson[index1],
  6136. checkIndex
  6137. )
  6138. " v-if="testJson.testJson[index1].testItem != 1">删除
  6139. </el-button>
  6140. </div>
  6141. </el-radio>
  6142. </div>
  6143. </el-radio-group>
  6144. <el-checkbox-group v-model="testJson.testJson[index1].answer"
  6145. v-if="testJson.testJson[index1].type == '2'" @change="() => {
  6146. $forceUpdate();
  6147. }
  6148. ">
  6149. <div class="radioBox">
  6150. <el-checkbox v-for="(item2, checkIndex1) in testJson.testJson[index1]
  6151. .testItem" :key="checkIndex1" :label="checkIndex1">
  6152. <div style="margin-right: 10px">
  6153. 选项{{ checkIndex1 + 1 }}
  6154. </div>
  6155. <div style="margin-right: 10px; width: 300px" v-if="
  6156. testJson.testJson[index1].checkList[checkIndex1] &&
  6157. testJson.testJson[index1].checkList[checkIndex1]
  6158. .imgType &&
  6159. testJson.testJson[index1].checkList[checkIndex1]
  6160. .imgType == 1
  6161. ">
  6162. <div class="inImg" @click.stop="
  6163. previewImg(
  6164. testJson.testJson[index1].checkList[checkIndex1]
  6165. .src
  6166. )
  6167. ">
  6168. <el-image :src="testJson.testJson[index1].checkList[checkIndex1]
  6169. .src
  6170. " lazy />
  6171. <!-- <img :src="
  6172. testJson.testJson[index1].checkList[checkIndex1]
  6173. .src
  6174. " alt="" /> -->
  6175. </div>
  6176. </div>
  6177. <textarea class="a_add_head_input textarea_css" v-autoHeight="40" v-else v-model="testJson.testJson[index1].checkList[checkIndex1]
  6178. " placeholder="请输入选项" style="width: 300px; margin-right: 10px" @change="() => {
  6179. $forceUpdate();
  6180. }
  6181. "></textarea>
  6182. <div class="xzUpImg" @click.stop="addImg($event)">
  6183. <img src="../../../assets/icon/xzUpImg.png" alt="" />
  6184. <input type="file" accept="image/*" style="display: none"
  6185. @change="beforeUploadTi($event, index1, checkIndex1)" />
  6186. </div>
  6187. <div class="moveBtn moveBtn2" v-if="testJson.testJson[index1].testItem != 1">
  6188. <div class="chapter_upload_up" @click.stop="tcheckMove(1, index1, checkIndex1)"></div>
  6189. <div class="chapter_upload_down" @click.stop="tcheckMove(2, index1, checkIndex1)"></div>
  6190. </div>
  6191. <div class="a_add_body_div">
  6192. <el-button type="primary" size="small" @click.stop="
  6193. addTcheckList(
  6194. testJson.testJson[index1],
  6195. checkIndex1
  6196. )
  6197. ">添加</el-button>
  6198. <el-button type="primary" size="small" @click.stop="
  6199. deleteTcheckList(
  6200. testJson.testJson[index1],
  6201. checkIndex1
  6202. )
  6203. " v-if="testJson.testJson[index1].testItem != 1">删除
  6204. </el-button>
  6205. </div>
  6206. </el-checkbox>
  6207. </div>
  6208. </el-checkbox-group>
  6209. </div>
  6210. <!-- <div class="a_add_body_div">
  6211. <el-button type="primary" size="small" @click="addTcheckList(testJson.testJson[index1])">添加</el-button>
  6212. <el-button type="primary" size="small" @click="deleteTcheckList(testJson.testJson[index1])"
  6213. v-if="testJson.testJson[index1].testItem != 1">删除
  6214. </el-button>
  6215. </div> -->
  6216. </div>
  6217. </div>
  6218. </div>
  6219. </div>
  6220. <span slot="footer" class="dialog-footer">
  6221. <el-button @click="closePan(45)">取 消</el-button>
  6222. <el-button type="primary" @click="addTest">确 定</el-button>
  6223. </span>
  6224. </el-dialog>
  6225. <el-dialog title="添加工具" :visible.sync="dialogVisible4" :append-to-body="true" width="600px"
  6226. :before-close="handleClose" class="dialog_diy addToolsDia">
  6227. <div class="toolChoose">
  6228. <div class="tools">
  6229. <div class="leftTools" style="width: 100%; padding: 0 0 15px 0"
  6230. v-for="(itemTools, itemToolsIndex) in chapTools" :key="itemToolsIndex">
  6231. <div style="
  6232. display: flex;
  6233. flex-direction: row;
  6234. align-items: baseline;
  6235. flex-wrap: nowrap;
  6236. justify-content: flex-start;
  6237. position: relative;
  6238. ">
  6239. <div class="chooseWho">
  6240. <div :class="chapToolsType == 0 ? 'isChooseActive' : ''" @click="chapToolsType = 0">
  6241. 互动类
  6242. </div>
  6243. <div :class="chapToolsType == 1 ? 'isChooseActive' : ''" @click="chapToolsType = 1">
  6244. 思维类
  6245. </div>
  6246. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6247. 评价类
  6248. </div>
  6249. <div :class="chapToolsType == 2 ? 'isChooseActive' : ''" @click="chapToolsType = 2">
  6250. 其他
  6251. </div>
  6252. </div>
  6253. </div>
  6254. <div style="min-height: 163px">
  6255. <div class="toolSort" v-if="chapToolsType == 0">
  6256. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(8) != -1 }" @click="chapAddTools(8)">
  6257. <div class="whiteBIcon" @click.stop="chapAddTools(8)">
  6258. <img src="../../../assets/icon/secondToolList/library.png" alt />
  6259. <div style="margin: 5px 0">素材库</div>
  6260. </div>
  6261. <div class="noCTool">
  6262. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6263. </div>
  6264. <div class="isCTool" v-if="itemTools.tools.indexOf(8) != -1">
  6265. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6266. </div>
  6267. <!-- <div class="check" @click="chapAddTools(8)">
  6268. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(8) == -1" />
  6269. <div class="checkDiv" v-else>
  6270. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6271. </div>
  6272. </div> -->
  6273. </div>
  6274. </div>
  6275. <div class="toolSort" v-if="chapToolsType == 1">
  6276. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(7) != -1 }" @click="chapAddTools(7)">
  6277. <div class="whiteBIcon" @click.stop="chapAddTools(7)">
  6278. <img src="../../../assets/icon/secondToolList/mindNetwork.png" alt />
  6279. <div style="margin: 5px 0">思维网格</div>
  6280. </div>
  6281. <div class="noCTool">
  6282. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6283. </div>
  6284. <div class="isCTool" v-if="itemTools.tools.indexOf(7) != -1">
  6285. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6286. </div>
  6287. <!-- <div class="check" @click="chapAddTools(7)">
  6288. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(7) == -1" />
  6289. <div class="checkDiv" v-else>
  6290. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6291. </div>
  6292. </div> -->
  6293. </div>
  6294. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(1) != -1 }" @click="chapAddTools(1)">
  6295. <div class="whiteBIcon" @click.stop="chapAddTools(1)">
  6296. <img src="../../../assets/icon/secondToolList/whiteBoard.png" alt />
  6297. <div style="margin: 5px 0">电子白板</div>
  6298. </div>
  6299. <div class="noCTool">
  6300. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6301. </div>
  6302. <div class="isCTool" v-if="itemTools.tools.indexOf(1) != -1">
  6303. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6304. </div>
  6305. <!-- <div class="check" @click="chapAddTools(1)">
  6306. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(1) == -1" />
  6307. <div class="checkDiv" v-else>
  6308. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6309. </div>
  6310. </div> -->
  6311. </div>
  6312. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(2) != -1 }" @click="chapAddTools(2)">
  6313. <div class="whiteBIcon" @click.stop="chapAddTools(2)">
  6314. <img src="../../../assets/icon/secondToolList/note.png" alt />
  6315. <div style="margin: 5px 0">便签</div>
  6316. </div>
  6317. <div class="noCTool">
  6318. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6319. </div>
  6320. <div class="isCTool" v-if="itemTools.tools.indexOf(2) != -1">
  6321. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6322. </div>
  6323. <!-- <div class="check" @click="chapAddTools(2)">
  6324. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(2) == -1" />
  6325. <div class="checkDiv" v-else>
  6326. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6327. </div>
  6328. </div> -->
  6329. </div>
  6330. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(6) != -1 }" @click="chapAddTools(6)">
  6331. <div class="whiteBIcon" @click.stop="chapAddTools(6)">
  6332. <img src="../../../assets/icon/secondToolList/doc.png" alt />
  6333. <div style="margin: 5px 0">协同文档</div>
  6334. </div>
  6335. <div class="noCTool">
  6336. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6337. </div>
  6338. <div class="isCTool" v-if="itemTools.tools.indexOf(6) != -1">
  6339. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6340. </div>
  6341. <!-- <div class="check" @click="chapAddTools(6)">
  6342. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(6) == -1" />
  6343. <div class="checkDiv" v-else>
  6344. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6345. </div>
  6346. </div> -->
  6347. </div>
  6348. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(3) != -1 }" @click="chapAddTools(3)">
  6349. <div class="whiteBIcon" @click.stop="chapAddTools(3)">
  6350. <img src="../../../assets/icon/secondToolList/mindMapping.png" alt />
  6351. <div style="margin: 5px 0">思维导图</div>
  6352. </div>
  6353. <div class="noCTool">
  6354. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6355. </div>
  6356. <div class="isCTool" v-if="itemTools.tools.indexOf(3) != -1">
  6357. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6358. </div>
  6359. <!-- <div class="check" @click="chapAddTools(3)">
  6360. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(3) == -1" />
  6361. <div class="checkDiv" v-else>
  6362. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6363. </div>
  6364. </div> -->
  6365. </div>
  6366. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(31) != -1 }"
  6367. @click="chapAddTools(31)">
  6368. <div class="whiteBIcon" @click.stop="chapAddTools(31)">
  6369. <img src="../../../assets/icon/secondToolList/networkPanel.png" alt />
  6370. <div style="margin: 5px 0">数学画板</div>
  6371. </div>
  6372. <div class="noCTool">
  6373. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6374. </div>
  6375. <div class="isCTool" v-if="itemTools.tools.indexOf(31) != -1">
  6376. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6377. </div>
  6378. <!-- <div class="check" @click="chapAddTools(31)">
  6379. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(31) == -1" />
  6380. <div class="checkDiv" v-else>
  6381. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6382. </div>
  6383. </div> -->
  6384. </div>
  6385. </div>
  6386. <div class="toolSort" v-if="chapToolsType == 2">
  6387. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(5) != -1 }" @click="chapAddTools(5)">
  6388. <div class="whiteBIcon" @click.stop="chapAddTools(5)">
  6389. <img src="../../../assets/icon/thirdToolList/score.png" alt />
  6390. <div style="margin: 5px 0">量规评分</div>
  6391. </div>
  6392. <div class="noCTool">
  6393. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6394. </div>
  6395. <div class="isCTool" v-if="itemTools.tools.indexOf(5) != -1">
  6396. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6397. </div>
  6398. <!-- <div class="check" @click="chapAddTools(5)">
  6399. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(5) == -1" />
  6400. <div class="checkDiv" v-else>
  6401. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6402. </div>
  6403. </div> -->
  6404. </div>
  6405. <div class="tool" :class="{ isToolChoose: itemTools.tools.indexOf(4) != -1 }" @click="chapAddTools(4)">
  6406. <div class="whiteBIcon" @click.stop="openTools(chapCount, 4, null)">
  6407. <img src="../../../assets/icon/thirdToolList/ask.png" alt />
  6408. <div style="margin: 5px 0">问卷调查</div>
  6409. </div>
  6410. <div class="noCTool">
  6411. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6412. </div>
  6413. <div class="isCTool" v-if="itemTools.tools.indexOf(4) != -1">
  6414. <img src="../../../assets/icon/new/isToolC.png" alt="" />
  6415. </div>
  6416. <!-- <div class="check" @click="chapAddTools(4)">
  6417. <img src="../../../assets/icon/checkNo.png" alt v-if="itemTools.tools.indexOf(4) == -1" />
  6418. <div class="checkDiv" v-else>
  6419. <img src="../../../assets/icon/checkedIs.png" alt /><span>已选择</span>
  6420. </div>
  6421. </div> -->
  6422. </div>
  6423. </div>
  6424. </div>
  6425. <div>
  6426. <input type="text" placeholder="添加工具描述" class="binfo_input" style="margin: 20px 0; width: 100% !important"
  6427. v-model="itemTools.toolDetail" />
  6428. </div>
  6429. </div>
  6430. </div>
  6431. </div>
  6432. <span slot="footer" class="dialog-footer">
  6433. <el-button @click="dialogVisible4 = false">取 消</el-button>
  6434. <el-button type="primary" @click="addChaptersDataTools">确定</el-button>
  6435. </span>
  6436. </el-dialog>
  6437. <el-dialog title="添加问答" :visible.sync="dialogVisible8" :append-to-body="true" width="500px" :before-close="(done) => {
  6438. closePan(15);
  6439. }
  6440. " class="dialog_diy">
  6441. <div>
  6442. <div class="a_add_title" style="
  6443. display: flex;
  6444. flex-direction: column;
  6445. align-items: flex-start;
  6446. justify-content: center;
  6447. ">
  6448. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6449. <!-- <el-input v-model="answerQ" placeholder="请输入您要问的问题"></el-input> -->
  6450. <textarea rows="1" v-autoHeight="40" type="text" placeholder="请输入您要问的问题" class="binfo_input"
  6451. style="width: 100% !important; border: 1px solid #dcdfe6" v-model="answerQ"></textarea>
  6452. </div>
  6453. </div>
  6454. <span slot="footer" class="dialog-footer">
  6455. <el-button @click="closePan(15)">取 消</el-button>
  6456. <el-button type="primary" @click="addAnswer">确 定</el-button>
  6457. </span>
  6458. </el-dialog>
  6459. <el-dialog title="添加问题" :visible.sync="dialogVisibleMp3" :append-to-body="true" width="500px"
  6460. :before-close="handleClose" class="dialog_diy">
  6461. <div>
  6462. <div class="a_add_title" style="
  6463. display: flex;
  6464. flex-direction: column;
  6465. align-items: flex-start;
  6466. justify-content: center;
  6467. ">
  6468. <div style="margin-bottom: 20px; font-size: 20px">问题:</div>
  6469. <el-input v-model="answerQ" placeholder="请输入您想要回答的问题"></el-input>
  6470. </div>
  6471. </div>
  6472. <span slot="footer" class="dialog-footer">
  6473. <el-button @click="dialogVisibleMp3 = false">取 消</el-button>
  6474. <el-button type="primary" @click="addMp3Answer">确 定</el-button>
  6475. </span>
  6476. </el-dialog>
  6477. <el-dialog title="上传图片" :visible.sync="choosePicVisible" :append-to-body="true" width="600px"
  6478. :before-close="handleClose" class="dialog_diy">
  6479. <div>
  6480. <div class="fileCss" style="padding-top: 20px">
  6481. <div>
  6482. <button class="info_btn" @click="addImg($event)">
  6483. 选择本地文件
  6484. <input type="file" accept="image/*" style="display: none" @change="beforeUpload1" />
  6485. </button>
  6486. <div class="spanName">选择本地文件</div>
  6487. </div>
  6488. <!-- <div>
  6489. <el-button @click="getAllBanner" v-if="isSysPic == false">选择系统文件</el-button>
  6490. <div class="isSysPic" v-if="isSysPic == true && cover.length > 0">
  6491. <img :src="cover[0].url" alt="" />
  6492. <div class="deletePic" @click="deleteSysPic">
  6493. <img src="../../../assets/icon/delete.png" alt="" />
  6494. </div>
  6495. </div>
  6496. <div class="spanName">选择系统文件</div>
  6497. </div> -->
  6498. <div>
  6499. <el-button @click="(searchImageValue = courseName), resetImage()"
  6500. v-if="isSysPic2 == false">选择网络文件</el-button>
  6501. <div class="isSysPic" v-if="isSysPic2 == true && cover.length > 0">
  6502. <img :src="cover[0].url" alt="" />
  6503. <div class="deletePic" @click="deleteSysPic">
  6504. <img src="../../../assets/icon/delete.png" alt="" />
  6505. </div>
  6506. </div>
  6507. <div class="spanName">选择网络文件</div>
  6508. </div>
  6509. </div>
  6510. <!-- <div class="fileCss">
  6511. </div> -->
  6512. </div>
  6513. <span slot="footer" class="dialog-footer">
  6514. <el-button @click="choosePicVisible = false">取 消</el-button>
  6515. <el-button type="primary" @click="choosePicVisible = false">确 定</el-button>
  6516. </span>
  6517. </el-dialog>
  6518. <el-dialog title="选择系统文件" :visible.sync="sysPicVisible" :append-to-body="true" width="710px"
  6519. :before-close="handleClose" class="dialog_diy">
  6520. <div class="cru_selectBox" style="margin: 0">
  6521. <div @click="getChoosePic(1)" class="cru_select" :class="chooseType == 1 ? 'cru_selected' : ''">
  6522. 绘画
  6523. </div>
  6524. <div @click="getChoosePic(2)" class="cru_select" :class="chooseType == 2 ? 'cru_selected' : ''">
  6525. 科技
  6526. </div>
  6527. <div @click="getChoosePic(3)" class="cru_select" :class="chooseType == 3 ? 'cru_selected' : ''">
  6528. 人文
  6529. </div>
  6530. <div @click="getChoosePic(4)" class="cru_select" :class="chooseType == 4 ? 'cru_selected' : ''">
  6531. 艺术
  6532. </div>
  6533. </div>
  6534. <div class="sysPicBox">
  6535. <div v-for="(sys, sysIndex) in sysPic" :key="sysIndex" class="sysPic">
  6536. <img :src="sys.poster" alt="" @click="chooseSysPic(sys.poster)" />
  6537. </div>
  6538. </div>
  6539. </el-dialog>
  6540. <el-dialog title="选择网络文件" :visible.sync="sysPicVisible2" :append-to-body="true" width="710px"
  6541. :before-close="handleClose" class="dialog_diy">
  6542. <div>
  6543. <div class="people_top_right" style="display: flex; align-items: center">
  6544. <div style="position: relative; width: 100%">
  6545. <el-input style="height: 100%" placeholder="搜索图片关键字" v-model="searchImageValue"
  6546. @keyup.enter.native="resetImage()"></el-input>
  6547. <div class="search_img" @click="resetImage" style="right: 10px">
  6548. <img src="../../../assets/icon/search.png" alt />
  6549. </div>
  6550. </div>
  6551. <el-button type="primary" size="default" style="margin-left: 10px" @click="changePicture">换一组</el-button>
  6552. </div>
  6553. <div class="sysPicBox" v-loading="imageloading">
  6554. <div class="picNone" v-if="!imageList.length">
  6555. 请输入关键词搜索图片
  6556. </div>
  6557. <div v-for="(sys, sysIndex) in imageList" :key="sysIndex" class="sysPic">
  6558. <img :src="sys.url" alt="" @click="chooseSysPic2(sys.url)" />
  6559. </div>
  6560. </div>
  6561. </div>
  6562. </el-dialog>
  6563. <el-dialog title="选择匹配" :visible.sync="dialogVisibleSelect" :append-to-body="true" width="800px" :before-close="(done) => {
  6564. closePan(41);
  6565. }
  6566. " class="dialog_diy dialog_diy3 fullStyle">
  6567. <div v-if="selectJson" style="height: 100%">
  6568. <div class="select_box1" v-if="selectSteps == 1">
  6569. <div class="select_box1_img">
  6570. <div class="select_box1_title">
  6571. <span>上传题目图片</span><span>提示:请将所有题目上传为一张图片。</span>
  6572. </div>
  6573. <div class="select_box1_add_img">
  6574. <div class="uploadFm" @click="addImg($event)" v-if="!selectJson.url">
  6575. <input type="file" accept="image/*" style="display: none" @change="beforeUploadSelect" />
  6576. <img src="../../../assets/icon/addPoster.png" alt="" />
  6577. </div>
  6578. <div class="isSysPic" v-else>
  6579. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6580. <div class="deletePic" @click="deleteSelectPic">
  6581. <img src="../../../assets/icon/delete.png" alt="" />
  6582. </div>
  6583. </div>
  6584. </div>
  6585. </div>
  6586. <div class="select_box1_select">
  6587. <div class="select_box1_title">
  6588. <span>添加选项</span><span>提示:请输入以上题目的选项内容,此选项为所有题目共享。</span>
  6589. </div>
  6590. <div class="select_box1_select_box">
  6591. <el-input v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex"
  6592. v-model="selectJson.select[checkIndex]" placeholder="请输入选项"
  6593. style="width: 150px; margin: 10px 10px 0 0"></el-input>
  6594. <div class="select_box1_select_box_add">
  6595. <el-button style="margin: 10px 0px 0 0" type="primary" size="small" @click="addSelectList(selectJson)">
  6596. 添加</el-button>
  6597. <el-button type="primary" size="small" style="margin: 10px 0 0 0" @click="deleteSelectList(selectJson)"
  6598. v-if="selectJson.select && selectJson.select.length > 0">删除</el-button>
  6599. </div>
  6600. </div>
  6601. </div>
  6602. </div>
  6603. <div v-if="selectSteps == 2" style="height: 100%">
  6604. <div class="select_box2">
  6605. <div class="select_box2_title">设置每道题目的正确选项</div>
  6606. <div class="select_box2_box">
  6607. <div class="select_box2_img">
  6608. <img :src="selectJson.url" alt="" @click="previewImg(selectJson.url)" />
  6609. </div>
  6610. <div class="select_box2_answer">
  6611. <div class="select_answer_title">根据题目选择对应答案</div>
  6612. <div class="select_box2_answer_box" v-for="(item2, checkIndex) in selectJson.select" :key="checkIndex">
  6613. <span>{{ checkIndex + 1 }}、</span>
  6614. <el-select v-model="selectJson.answer[checkIndex]" placeholder="请选择正确答案">
  6615. <el-option v-for="(e, eIndex) in selectJson.select" :key="eIndex" :label="e" :value="eIndex">
  6616. </el-option>
  6617. </el-select>
  6618. </div>
  6619. </div>
  6620. </div>
  6621. </div>
  6622. </div>
  6623. </div>
  6624. <span slot="footer" class="dialog-footer">
  6625. <el-button type="primary" @click="nextSelectSteps()" v-if="selectSteps == 1">下一步</el-button>
  6626. <el-button @click="selectSteps--" v-if="selectSteps == 2">上一步</el-button>
  6627. <el-button type="primary" @click="addSelectAnswer" v-if="selectSteps == 2">确 定</el-button>
  6628. </span>
  6629. </el-dialog>
  6630. <el-dialog title="添加评价" :visible.sync="dialogVisibleRate" :append-to-body="true" width="650px"
  6631. :before-close="handleClose" class="dialog_diy">
  6632. <div style="background: #fff; padding: 15px; box-sizing: border-box">
  6633. <div style="font-size: 18px; color: #a9a9a9">请输入个人评价指标:</div>
  6634. <div class="pjCss" style="width: 100%">
  6635. <div v-if="rateJson.length" class="elist_input" style="height: 360px; overflow: auto">
  6636. <div v-for="(eItem, eIndex) in rateJson" :key="eIndex" class="elist_input_box">
  6637. <span style="min-width: 100px; text-align: right">个人评价指标:</span>
  6638. <input type="input" v-model="eItem.value" placeholder="填写评价维度" />
  6639. <div class="remove" @click="deletRateList(eIndex)"></div>
  6640. <div style="width: 100%; display: flex">
  6641. <span style="min-width: 100px; text-align: right">评星等级:</span>
  6642. <el-rate v-model="eItem.score" disabled></el-rate>
  6643. </div>
  6644. <div class="elist_inptu_text" style="align-items: flex-start">
  6645. <span style="min-width: 100px; text-align: right">描述:</span>
  6646. <textarea class="rate_textarea" :rows="3" v-model="eItem.detail" placeholder="填写维度描述"></textarea>
  6647. </div>
  6648. </div>
  6649. </div>
  6650. <div class="addToolFun" @click="addRateList()">
  6651. <div class="addToolImg">
  6652. <img src="../../../assets/icon/add.png" alt />
  6653. </div>
  6654. <div>添加</div>
  6655. </div>
  6656. </div>
  6657. </div>
  6658. <span slot="footer" class="dialog-footer">
  6659. <el-button @click="dialogVisibleRate = false">取 消</el-button>
  6660. <el-button type="primary" @click="addRateAnswer">确 定</el-button>
  6661. </span>
  6662. </el-dialog>
  6663. <el-dialog title="排序设置" :visible.sync="dialogVisibleSentence" :append-to-body="true" width="1000px" :before-close="(done) => {
  6664. closePan(47);
  6665. }
  6666. " class="dialog_diy dialog_diy3 fullStyle">
  6667. <div style="height: 100%">
  6668. <div class="sentenBox" style="height: 100%">
  6669. <div class="addSen" @click="addSt">添加题目</div>
  6670. <div v-for="(st, stIndex) in sentenceList" :key="stIndex" class="sentenContent">
  6671. <div class="sentenTopBox">
  6672. <div class="sentenTop" :index="stIndex + 1">
  6673. <div>题目设置</div>
  6674. <div>
  6675. <el-input placeholder="请输入卡片内容" v-model="st.sentenceTitle" :maxlength="10"></el-input>
  6676. </div>
  6677. <div @click="addSen(stIndex)">添加</div>
  6678. <div class="remove1" v-if="sentenceList.length > 1" @click="deleteSentence(stIndex)"></div>
  6679. </div>
  6680. </div>
  6681. <div class="cardList">
  6682. <div v-if="st.addSentence.length > 0" class="cardBox">
  6683. <div class="isCard" v-for="(s, sIndex) in st.addSentence" :key="sIndex"
  6684. @click="setRightAnswer(s, stIndex, sIndex)">
  6685. <el-tooltip class="item" effect="light" :content="s" placement="top">
  6686. <div>{{ s }}</div>
  6687. </el-tooltip>
  6688. <div class="deleteWord" @click.stop="deleteS(s, stIndex, sIndex)">
  6689. <img src="../../../assets/icon/delete.png" alt="" />
  6690. </div>
  6691. </div>
  6692. </div>
  6693. <div class="card">
  6694. <img src="../../../assets/icon/conSentences/noTitle.png" alt="" />
  6695. </div>
  6696. </div>
  6697. <div class="rightCardBox">
  6698. <div>正确顺序</div>
  6699. <div class="rightCardList">
  6700. <div v-if="st.rightAnswer.length > 0" class="cardBox">
  6701. <div v-for="(r, rIndex) in st.rightAnswer" :key="rIndex" class="cardCss">
  6702. <div class="isCard1" @click="returnCard(r, stIndex, rIndex)">
  6703. <el-tooltip class="item" effect="light" :content="r" placement="top">
  6704. <div>{{ r }}</div>
  6705. </el-tooltip>
  6706. </div>
  6707. <div>{{ rIndex + 1 }}</div>
  6708. </div>
  6709. </div>
  6710. <div class="card" v-if="st.rightAnswer.length == 0">
  6711. <img src="../../../assets/icon/conSentences/noAnswer.png" alt="" />
  6712. </div>
  6713. <div class="card" v-else>
  6714. <img src="../../../assets/icon/conSentences/clickNo.png" alt="" />
  6715. </div>
  6716. </div>
  6717. </div>
  6718. </div>
  6719. </div>
  6720. </div>
  6721. <span slot="footer" class="dialog-footer">
  6722. <el-button @click="closePan(47)">取 消</el-button>
  6723. <el-button type="primary" @click="addSentenceTool">确 定</el-button>
  6724. </span>
  6725. </el-dialog>
  6726. <el-dialog title="添加表格" :visible.sync="dialogVisibleTable" :append-to-body="true" width="95%"
  6727. :before-close="handleClose" class="dialog_diy">
  6728. <el-form>
  6729. <!-- <el-form-item label="文本标题">
  6730. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6731. </el-form-item> -->
  6732. <div>表格内容</div>
  6733. <Table v-model="tableJson.text" @change="change"></Table>
  6734. </el-form>
  6735. <span slot="footer" class="dialog-footer">
  6736. <!-- <el-button @click="dialogVisibleTable = false">取 消</el-button>
  6737. <el-button type="primary" @click="addTableJson">确定</el-button> -->
  6738. <el-button type="primary" @click="addTableJson">上传模板</el-button>
  6739. </span>
  6740. </el-dialog>
  6741. <el-dialog title="添加文档" :visible.sync="dialogVisibleWord" :append-to-body="true" width="95%"
  6742. :before-close="handleClose" class="dialog_diy">
  6743. <el-form>
  6744. <!-- <el-form-item label="文本标题">
  6745. <el-input v-model="AttText.title" auto-complete="off" @input="change2" placeholder="请输入文本标题..."></el-input>
  6746. </el-form-item> -->
  6747. <div>文档内容</div>
  6748. <editor-bar v-model="wordJson.text" class="text_panel"></editor-bar>
  6749. </el-form>
  6750. <span slot="footer" class="dialog-footer">
  6751. <!-- <el-button @click="dialogVisibleWord = false">取 消</el-button> -->
  6752. <el-button type="primary" @click="addWordJson">上传模板</el-button>
  6753. </span>
  6754. </el-dialog>
  6755. <el-dialog title="添加班级" :visible.sync="dialogVisibleMoreUpload" :append-to-body="true" width="30%"
  6756. :before-close="handleClose" class="dialog_diy">
  6757. <div style="
  6758. width: 100%;
  6759. display: flex;
  6760. flex-direction: row;
  6761. flex-wrap: nowrap;
  6762. align-items: center;
  6763. justify-content: center;
  6764. ">
  6765. <div>班级:</div>
  6766. <el-select multiple v-model="uploadJson" placeholder="请选择">
  6767. <el-option v-for="item in classJuri" :key="item.id" :label="item.name" :value="item.id">
  6768. </el-option>
  6769. </el-select>
  6770. </div>
  6771. <span slot="footer" class="dialog-footer">
  6772. <el-button @click="dialogVisibleMoreUpload = false">取 消</el-button>
  6773. <el-button type="primary" @click="addMoreUpload">确定</el-button>
  6774. </span>
  6775. </el-dialog>
  6776. <el-dialog title="设置随机码" :visible.sync="dialogVisibleInvite" :append-to-body="true" width="360px"
  6777. :before-close="handleClose" class="dialog_diy">
  6778. <div style="
  6779. width: 100%;
  6780. display: flex;
  6781. flex-direction: row;
  6782. flex-wrap: nowrap;
  6783. align-items: center;
  6784. justify-content: center;
  6785. ">
  6786. <div>随机码:</div>
  6787. <el-input v-model="icode" style="width: 240px" placeholder="请输入随机码"></el-input>
  6788. </div>
  6789. <span slot="footer" class="dialog-footer">
  6790. <el-button @click="dialogVisibleInvite = false">取 消</el-button>
  6791. <el-button type="primary" @click="addInvite">确定</el-button>
  6792. </span>
  6793. </el-dialog>
  6794. <el-dialog title="添加预设时间" :visible.sync="dialogVisiblePreTime" :append-to-body="true" width="450px"
  6795. :before-close="handleClose" class="dialog_diy">
  6796. <div>
  6797. <div style="margin-bottom: 20px; color: #999">
  6798. 提示:点击“+”或“-”修改倒计时时长。
  6799. </div>
  6800. <Time :preTime="preTime" @updateTimeNum="updateTime" v-if="dialogVisiblePreTime"></Time>
  6801. </div>
  6802. <span slot="footer" class="dialog-footer">
  6803. <el-button @click="dialogVisiblePreTime = false">取 消</el-button>
  6804. <el-button type="primary" @click="addPreTime">确定</el-button>
  6805. </span>
  6806. </el-dialog>
  6807. <el-dialog title="导入目标" :visible.sync="dialogVisiblemb" :append-to-body="true" width="70%"
  6808. :before-close="handleClose" class="dialog_diy">
  6809. <div>
  6810. <div style="
  6811. width: 100%;
  6812. display: flex;
  6813. flex-direction: row;
  6814. flex-wrap: nowrap;
  6815. align-content: center;
  6816. align-items: center;
  6817. justify-content: space-between;
  6818. ">
  6819. <div style="
  6820. display: flex;
  6821. flex-flow: row nowrap;
  6822. align-items: flex-start;
  6823. width: 100%;
  6824. flex-direction: column;
  6825. flex-wrap: nowrap;
  6826. position: relative;
  6827. ">
  6828. <div class="e_box">
  6829. <!-- <div class="e_card" v-for="(item, index) in evaJuri" :key="index">
  6830. <div class="e_card_picture">
  6831. <img src="../../../assets/e_picture.png" />
  6832. </div>
  6833. <div class="e_card_name">
  6834. <span>{{ item.title }}</span>
  6835. </div>
  6836. <div class="e_card_btn">
  6837. <span @click="checkEva(item.id, 2)">导入</span>
  6838. </div>
  6839. </div> -->
  6840. <!-- <div class="addEva" @click="openT">
  6841. <img src="../../../assets/icon/addEva.png" alt="" />
  6842. </div> -->
  6843. <div style="
  6844. display: flex;
  6845. justify-content: flex-end;
  6846. margin-bottom: 10px;
  6847. ">
  6848. <el-button @click="openT" type="primary" size="small">添加目标</el-button>
  6849. </div>
  6850. <el-table v-if="evaJuri.length" ref="table" :data="evaJuri" border :fit="true" style="width: 100%"
  6851. :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }" :row-class-name="tableRowClassName">
  6852. <el-table-column label="目标名称" min-width="15" align="center" prop="title">
  6853. </el-table-column>
  6854. <el-table-column prop="username" label="负责人" min-width="15" align="center">
  6855. </el-table-column>
  6856. <el-table-column label="操作" width="250px">
  6857. <template slot-scope="scope">
  6858. <div class="btnBox">
  6859. <el-button type="primary" size="small" @click="checkEva(scope.row.id, 2)">导入</el-button>
  6860. </div>
  6861. </template>
  6862. </el-table-column>
  6863. </el-table>
  6864. <div v-if="evaJuri.length === 0" style="margin: 0 auto; color: #6e6e6e">
  6865. 暂无数据
  6866. </div>
  6867. </div>
  6868. </div>
  6869. </div>
  6870. </div>
  6871. <span slot="footer" class="dialog-footer">
  6872. <el-button @click="dialogVisiblemb = false">取 消</el-button>
  6873. </span>
  6874. </el-dialog>
  6875. <el-dialog title="分组设置" :visible.sync="dialogVisibleGroup" :append-to-body="true" width="650px"
  6876. :before-close="handleClose" class="dialog_diy">
  6877. <div class="groupBox">
  6878. <div v-if="groupJson.group" class="groupContent">
  6879. <div class="groupTitle">请设置小组数量及名称</div>
  6880. <div v-for="(item, index) in groupJson.group" :key="index" class="groupName">
  6881. <span class="groupn">第{{ index + 1 }}组名称:</span>
  6882. <el-input v-model="item.name" placeholder="请输入名称..." style="width: 250px"></el-input>
  6883. <div class="groupBtn">
  6884. <el-button type="primary" size="small" @click="addGroup(index)"
  6885. v-if="groupJson.group.length - 1 == index">
  6886. 添加</el-button>
  6887. <el-button type="primary" size="small" @click="deleteGroup(index)"
  6888. v-if="groupJson.group && groupJson.group.length > 1">删除</el-button>
  6889. </div>
  6890. </div>
  6891. </div>
  6892. <div class="groupContent">
  6893. <div class="groupTitle">请设置每组人数</div>
  6894. <!-- <el-input v-model="groupJson.number" placeholder="2-10人以内"
  6895. style="width: 150px; margin: 10px 10px 0 0"></el-input> -->
  6896. <el-input v-model="groupJson.number" style="width: 150px" placeholder="请输入2-10的数字"
  6897. @change="numberPan"></el-input>
  6898. </div>
  6899. </div>
  6900. <span slot="footer" class="dialog-footer">
  6901. <el-button @click="dialogVisibleGroup = false">取 消</el-button>
  6902. <el-button type="primary" @click="addGroupJson">确定</el-button>
  6903. </span>
  6904. </el-dialog>
  6905. <el-dialog title="修改名称" :visible.sync="dialogVisibleupdataVideoT" :append-to-body="true" width="500px"
  6906. :before-close="handleClose" class="dialog_diy">
  6907. <div style="
  6908. width: 100%;
  6909. display: flex;
  6910. flex-direction: row;
  6911. flex-wrap: nowrap;
  6912. align-items: center;
  6913. justify-content: center;
  6914. ">
  6915. <div style="min-width: fit-content">文件名称:</div>
  6916. <el-input v-model="line" placeholder="请输入要修改的名称"></el-input>
  6917. </div>
  6918. <span slot="footer" class="dialog-footer">
  6919. <el-button @click="dialogVisibleupdataVideoT = false">取 消</el-button>
  6920. <el-button type="primary" @click="updataVideoC">确 定</el-button>
  6921. </span>
  6922. </el-dialog>
  6923. <el-dialog title="创建作文题目" :visible.sync="englishDialogVisible" :append-to-body="true" width="800px" :before-close="(done) => {
  6924. closePan(69);
  6925. }
  6926. " class="dialog_diy fullStyle fullStyle1">
  6927. <englishRight :englishList="englishList" :oid="oid" ref="engJson" @setJson="addEnglish"></englishRight>
  6928. <span slot="footer" class="dialog-footer">
  6929. <el-button @click="englishDialogVisible = false">取 消</el-button>
  6930. <el-button type="primary" @click="addEnglish">确 定</el-button>
  6931. </span>
  6932. </el-dialog>
  6933. <el-dialog title="选择课程模板" :visible.sync="templateDialog" :append-to-body="true" width="630px"
  6934. :before-close="handleClose" class="dialog_diy">
  6935. <div class="template_box">
  6936. <div class="wordTeacher" v-for="(aa, indexF) in templateArray" :key="indexF" @click="checkctJson(aa)"
  6937. :class="{ wordTeacherA: ctJson.id == aa.id }">
  6938. <div class="wordPic">
  6939. <img src="../../../assets/icon/new/course_template.png" alt />
  6940. </div>
  6941. <el-tooltip effect="dark" :content="aa.title" placement="top">
  6942. <div style="
  6943. margin-top: 10px;
  6944. line-height: 19px;
  6945. overflow: hidden;
  6946. text-overflow: ellipsis;
  6947. white-space: nowrap;
  6948. padding: 0 10px;
  6949. box-sizing: border-box;
  6950. width: 100%;
  6951. ">
  6952. {{ aa.title }}
  6953. </div>
  6954. </el-tooltip>
  6955. </div>
  6956. <div class="wordTeacher" @click="checkctJson({ id: 1 })" v-if="oid == '69893dca-1d47-11ed-8c78-005056b86db5'"
  6957. :class="{ wordTeacherA: ctJson.id == 1 }">
  6958. <div class="wordPic">
  6959. <img src="../../../assets/icon/new/course_template.png" alt />
  6960. </div>
  6961. <div style="
  6962. margin-top: 10px;
  6963. line-height: 19px;
  6964. overflow: hidden;
  6965. text-overflow: ellipsis;
  6966. white-space: nowrap;
  6967. padding: 0 20px;
  6968. ">
  6969. 简易模板
  6970. </div>
  6971. </div>
  6972. <div class="wordTeacher" @click="checkctJson({ id: 2 })" v-if="isPasteStage"
  6973. :class="{ wordTeacherA: ctJson.id == 2 }">
  6974. <div class="wordPic">
  6975. <img src="../../../assets/icon/new/course_template.png" alt />
  6976. </div>
  6977. <div style="
  6978. margin-top: 10px;
  6979. line-height: 19px;
  6980. overflow: hidden;
  6981. text-overflow: ellipsis;
  6982. white-space: nowrap;
  6983. padding: 0 20px;
  6984. ">
  6985. 智能粘贴模式
  6986. </div>
  6987. </div>
  6988. </div>
  6989. <span slot="footer" class="dialog-footer">
  6990. <el-button @click="templateDialog = false">取 消</el-button>
  6991. <el-button type="primary" @click="addTemplate(ctJson)">确 定</el-button>
  6992. </span>
  6993. </el-dialog>
  6994. <interVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :videoJson="videoJson" @add="addVideoJson"></interVideo>
  6995. <el-dialog title="切换阶段顺序" :visible.sync="dialogVisibleStageChange" :append-to-body="true" width="400px"
  6996. :before-close="handleClose" class="dialog_diy dialog_diyStage">
  6997. <div class="change_stageBox">
  6998. <div class="navTask" v-for="(t, tIndex) in unitJson3" :key="tIndex">
  6999. <div class="nt_taskBox">
  7000. <div class="nt_taskTitle">第{{ tIndex + 1 }}阶段</div>
  7001. <div class="nt_taskName">
  7002. <el-tooltip effect="light" :content="t.dyName" placement="top">
  7003. <span>{{ t.dyName }}</span>
  7004. </el-tooltip>
  7005. </div>
  7006. </div>
  7007. <div class="moveBtn" v-if="unitJson3.length > 1">
  7008. <div class="chapter_upload_up" @click.stop="stageMove(1, tIndex)"></div>
  7009. <div class="chapter_upload_down" @click.stop="stageMove(2, tIndex)"></div>
  7010. </div>
  7011. </div>
  7012. </div>
  7013. <span slot="footer" class="dialog-footer">
  7014. <el-button @click="dialogVisibleStageChange = false">取 消</el-button>
  7015. <el-button type="primary" @click="updateChange">确定</el-button>
  7016. </span>
  7017. </el-dialog>
  7018. <el-dialog title="添加资源模板" :visible.sync="cetBoxDialog" :append-to-body="true" width="400px"
  7019. :before-close="handleClose" class="dialog_diy">
  7020. <div class="addTypeChoose" style="justify-content: center">
  7021. <div style="min-width: 100px">模板名称:</div>
  7022. <el-input v-model="templateName" style="width: 200px"></el-input>
  7023. </div>
  7024. <div class="addTypeBox">
  7025. <div class="addTypeChoose">
  7026. <div style="min-width: 100px">选择一级分类:</div>
  7027. <el-select v-model="setTypeJson.one" placeholder="请选择" @change="getTwoType(setTypeJson.one)"
  7028. style="width: 200px">
  7029. <el-option v-for="(item, index) in oneJson" :key="index" :label="item.name" :value="item.id">
  7030. </el-option>
  7031. </el-select>
  7032. </div>
  7033. <div class="addTypeChoose" v-if="setTypeJson.one != ''">
  7034. <div style="min-width: 100px">选择二级分类:</div>
  7035. <el-select v-model="setTypeJson.two" placeholder="请选择" style="width: 200px">
  7036. <el-option v-for="(item1, index1) in twoJson" :key="index1" :label="item1.name" :value="item1.id">
  7037. </el-option>
  7038. </el-select>
  7039. </div>
  7040. </div>
  7041. <span slot="footer" class="dialog-footer">
  7042. <el-button type="primary" @click="addCETemplate()">确 认</el-button>
  7043. <el-button @click="close()">关 闭</el-button>
  7044. </span>
  7045. </el-dialog>
  7046. <evaBox :userid="userid" :oid="oid" :org="org" :dialogVisibleEva.sync="evaBoxDialog" @updateEvaJson="updateEvaJson">
  7047. </evaBox>
  7048. <EnglishVoice :oid="oid" :org="org" :EnglishVoiceDialog.sync="EnglishVoiceDialog"
  7049. :englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
  7050. <aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" :aiText2="aiText2" :aiText3="aiText3" @aiConfirm="aiConfirm" :clickType="clickType">
  7051. </aiDialog>
  7052. <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
  7053. @retrunCourse="retrunCourse" :templateid.sync="templateid" @addWork="addWork"></tipsDialog>
  7054. <aiCreateDialog :languageSetting="languageSetting" :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateDialog>
  7055. <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo" :courseState="courseState" :lineCount="lineCount" :unitJson="unitJson"></aiCreateVideoDialog>
  7056. <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
  7057. <wOffice :dialogVisibleOffice.sync="dialogVisibleOffice" :url="wurl" ></wOffice>
  7058. </div>
  7059. </template>
  7060. <script>
  7061. import "../../../common/aws-sdk-2.235.1.min.js";
  7062. import { tools as toolsData } from "../../../common/tools.js";
  7063. // import "../../../common/aws-sdk-2.99.0.min.js";
  7064. import $ from "jquery";
  7065. import EditorBar from "../../../components/tools/wangEnduit";
  7066. import Table from "../../../components/tools/table";
  7067. import Mind from "../../tools/jsmind2";
  7068. import Time from "../../tools/time.vue";
  7069. import Sunburst from "../../tools/sunburst";
  7070. import SeeBoard from "../../tools/seeBoard";
  7071. import weilaiData from "../components/weilai.js";
  7072. import sourceDialog from "../teacherSource/dialog.vue";
  7073. import interVideo from "../interVideo/index.vue";
  7074. import englishRight from "../components/englishRight.vue";
  7075. import evaBox from "../evaBox/index.vue";
  7076. import EnglishVoice from "../EnglishVoice/index.vue";
  7077. import aiBox from './aiBox.vue'
  7078. import aiBoxRight from './aiBoxRight.vue'
  7079. import aiDialog from './aiDialog'
  7080. import aiTips from './aiTips.vue'
  7081. import tipsDialog from './tipsDialog.vue'
  7082. import { v4 as uuidv4 } from "uuid";
  7083. import MarkdownIt from "markdown-it";
  7084. import aiCreateDialog from './aiCreateDialog.vue'
  7085. import aiCreateVideoDialog from './aiCreateVideoDialog.vue'
  7086. import wpdf from "../test/file/wPdf2.vue";
  7087. import wOffice from "../test/file/wOffice.vue";
  7088. import htmlDocx from "html-docx-js/dist/html-docx";
  7089. import TurndownService from 'turndown';
  7090. import JSZip from "jszip";
  7091. import evaList from "./evaList.vue";
  7092. import MindTask from "./jsmind2";
  7093. var OpenCC = require("opencc-js");
  7094. let converter = OpenCC.Converter({
  7095. from:'hk',
  7096. to:'cn'
  7097. })
  7098. let converter2 = OpenCC.Converter({
  7099. from:'cn',
  7100. to:'hk'
  7101. })
  7102. export default {
  7103. components: {
  7104. EditorBar,
  7105. Mind,
  7106. Time,
  7107. Sunburst,
  7108. SeeBoard,
  7109. Table,
  7110. sourceDialog,
  7111. interVideo,
  7112. englishRight,
  7113. evaBox,
  7114. EnglishVoice,
  7115. aiBox,
  7116. aiBoxRight,
  7117. aiDialog,
  7118. aiTips,
  7119. tipsDialog,
  7120. aiCreateDialog,
  7121. aiCreateVideoDialog,
  7122. wpdf,
  7123. wOffice,
  7124. evaList,
  7125. MindTask
  7126. },
  7127. data() {
  7128. return {
  7129. checkAll: false,
  7130. checkAll2: false,
  7131. chooseType: 1,
  7132. checkedCities: [],
  7133. isIndeterminate: true,
  7134. isIndeterminate2: true,
  7135. isSysPic: false,
  7136. isSysPic2: false,
  7137. steps: 1,
  7138. stepsNav: 1,
  7139. nbOrder: 0,
  7140. courseId: "",
  7141. chapToolsType: 0,
  7142. chapTools: [
  7143. {
  7144. tools: [],
  7145. toolDetail: "",
  7146. },
  7147. ],
  7148. line: "",
  7149. lineTitle: "",
  7150. sysPic: [],
  7151. sentenceList: [{ sentenceTitle: "", addSentence: [], rightAnswer: [] }],
  7152. sentenceList2: [],
  7153. isPushTitleList: [],
  7154. lineCount: 0,
  7155. lineType: 0,
  7156. chapCount: 0,
  7157. courseName: "",
  7158. isTeacherSee: false,
  7159. courseText: "",
  7160. textLoading: false,
  7161. ttextLoading: false,
  7162. courseText2: "",
  7163. preTime: 0,
  7164. formLabelWidth: "100px",
  7165. choosePicVisible: false,
  7166. sysPicVisible: false,
  7167. sysPicVisible2: false,
  7168. uploadLoading1: false,
  7169. noneBtnImg: false,
  7170. updateBoolean2: false,
  7171. unitIndex: 0,
  7172. taskCount: 0,
  7173. dialogVisible: false,
  7174. dialogVisible1: false,
  7175. dialogVisible2: false,
  7176. dialogVisible3: false,
  7177. dialogVisible4: false,
  7178. dialogVisible5: false,
  7179. dialogVisible6: false,
  7180. dialogVisible7: false,
  7181. dialogVisible8: false,
  7182. dialogVisible9: false,
  7183. dialogVisibleClass: false,
  7184. dialogVisibleMember: false,
  7185. dialogVisibleMp3: false,
  7186. dialogVisibleSelect: false,
  7187. dialogVisibleSentence: false,
  7188. dialogVisibleRate: false,
  7189. dialogVisibleChoice: false,
  7190. dialogVisiblemb: false,
  7191. dialogVisibleInvite: false,
  7192. dialogVisibleSource: false,
  7193. dialogVisibleVideo: false,
  7194. dialogVisibleStageChange: false,
  7195. dialogVisibleupdataVideoT: false,
  7196. englishDialogVisible: false,
  7197. templateDialog: false,
  7198. ctJson: {},
  7199. isClickColor: 1,
  7200. toolIndexType: "",
  7201. publicTool: 0,
  7202. searchPeople: "",
  7203. searchTN: "",
  7204. collid: '',
  7205. CollLoading: false,
  7206. userid: this.$route.query.userid,
  7207. oid: this.$route.query.oid,
  7208. org: this.$route.query.org,
  7209. role: this.$route.query.role,
  7210. aiId: this.$route.query.aiId != undefined ? this.$route.query.aiId : "",
  7211. cid: this.$route.query.cid != undefined ? this.$route.query.cid : "",
  7212. dialogVisibleTable: false,
  7213. dialogVisibleWord: false,
  7214. tableJson: { text: "" },
  7215. wordJson: { text: "" },
  7216. dialogVisibleMoreUpload: false,
  7217. dialogVisiblePreTime: false,
  7218. uploadJson: [],
  7219. classJuri: [],
  7220. gradeList: [],
  7221. cover: [], //课程封面
  7222. myWord: [],
  7223. evaJuri: [],
  7224. evalua: "",
  7225. targetArray: [],
  7226. eTitle: "",
  7227. eJson: {},
  7228. fid: "", //一级
  7229. sid: "", //二级
  7230. tid: "", //二级
  7231. typeMode: 3,
  7232. eJSONNum: 0,
  7233. data: {
  7234. meta: {
  7235. name: "example",
  7236. author: "dd@163.com",
  7237. version: "0.2",
  7238. },
  7239. format: "node_array",
  7240. data: [{ id: "root", isroot: true, topic: "" }],
  7241. },
  7242. askJson: {
  7243. askCount: 1,
  7244. askTitle: "",
  7245. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7246. },
  7247. askJson2: {},
  7248. testJson: {},
  7249. testJson2: {},
  7250. selectJson: {},
  7251. selectJson2: {},
  7252. rateJson: [],
  7253. unitJson2: [],
  7254. unitJson3: [],
  7255. unitJson: [
  7256. {
  7257. dyName: "", //单元标题
  7258. chapterInfo: [
  7259. {
  7260. isread: false,
  7261. chapterid: this.guid(),
  7262. title: "",
  7263. courseName: "",
  7264. taskJson: [
  7265. {
  7266. task: "",
  7267. taskDetail: "",
  7268. chapterData: [],
  7269. toolText: "",
  7270. toolChoose: [
  7271. {
  7272. tool: [],
  7273. toolDetail: "",
  7274. toolType: 0,
  7275. askCount: 1,
  7276. askTitle: "",
  7277. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7278. },
  7279. ],
  7280. isShowTools: false,
  7281. askCount: 1,
  7282. isFold: 1,
  7283. askTitle: "",
  7284. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7285. checkJson: [{ checkCount: [], checkPerent: [] }],
  7286. homeworkList: [],
  7287. },
  7288. ],
  7289. itemCount: 1,
  7290. fileList1: [],
  7291. video: [],
  7292. testData: [],
  7293. pData: [],
  7294. templateArray: [],
  7295. },
  7296. ],
  7297. },
  7298. ],
  7299. templateArray: [],
  7300. studentJuri: [],
  7301. teacherJuri: [],
  7302. CollaborativeTeaList: [],
  7303. checkboxList: [],
  7304. checkboxList2: [],
  7305. checkboxList3: [],
  7306. classSearch: "",
  7307. gradeId: "",
  7308. number: "",
  7309. tTitle: "",
  7310. tdetail: "",
  7311. templateC: {},
  7312. AttText: {},
  7313. AttTextType: 0,
  7314. AttTextIndex: 0,
  7315. cTemplate: "",
  7316. CourseType: [],
  7317. CourseType1: [],
  7318. CourseType2: [],
  7319. CourseTypeJson: {},
  7320. CourseTypeJson1: {},
  7321. courseTypeId: [],
  7322. courseTypeId1: [],
  7323. courseTypeSon: [],
  7324. clearArray: [],
  7325. pTypeCheck: [],
  7326. pTypeCheckName: [],
  7327. loading: false,
  7328. toolType: 0,
  7329. inputShow: true,
  7330. inputShow2: true,
  7331. toolIndex: 0,
  7332. cidType: 0,
  7333. answerQ: "",
  7334. answerQ2: "",
  7335. grade: [],
  7336. grade2: [],
  7337. courseUserid: "",
  7338. timer: null,
  7339. timer2: null,
  7340. pasteTimer: null,
  7341. checkId: "",
  7342. isDelete: 1,
  7343. addindex: 0,
  7344. selectSteps: 1,
  7345. groupJson: {},
  7346. dialogVisibleGroup: false,
  7347. rightBoxHeight: 0,
  7348. ManAarray: [],
  7349. checkBoolean: false,
  7350. inviteCode: [],
  7351. inviteId: "",
  7352. icode: "",
  7353. easyArray: [2, 4],
  7354. sourceData: {},
  7355. updateSourcePan: false,
  7356. videoJson: {},
  7357. isBtnDisplay: false,
  7358. isStepDisplay: false,
  7359. isPasteStage: false,
  7360. isPasteTask: false,
  7361. isPasteChoice: false,
  7362. imageList: [],
  7363. imageloading: false,
  7364. imageloading2: false,
  7365. searchImageValue: "",
  7366. ppage: 1,
  7367. toolsData: JSON.parse(converter(JSON.stringify(toolsData))),
  7368. oldIndex: 0,
  7369. dragType: "",
  7370. oldUnitIndex: 0,
  7371. oldData: null,
  7372. newIndex: "",
  7373. englishList: {},
  7374. typeIndex: "",
  7375. courseState: 5,
  7376. taskJSONa: [
  7377. {
  7378. task: "",
  7379. taskDetail: "",
  7380. chapterData: [],
  7381. toolText: "",
  7382. toolChoose: [
  7383. {
  7384. tool: [],
  7385. toolDetail: "",
  7386. toolType: 0,
  7387. askCount: 1,
  7388. askTitle: "",
  7389. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7390. },
  7391. ],
  7392. isShowTools: false,
  7393. askCount: 1,
  7394. isFold: 1,
  7395. askTitle: "",
  7396. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  7397. checkJson: [{ checkCount: [], checkPerent: [] }],
  7398. homeworkList: [],
  7399. },
  7400. ],
  7401. checkUnitIndex: 0,
  7402. isdrag: "",
  7403. evaIndex: "",
  7404. evatIndex: "",
  7405. evaBoxDialog: false,
  7406. EnglishVoiceDialog: false,
  7407. englishVoiceJson: {},
  7408. cetIndex: "",
  7409. cettIndex: "",
  7410. cetBoxDialog: false,
  7411. templateName: "",
  7412. setTypeJson: {
  7413. one: "",
  7414. two: "",
  7415. },
  7416. twoJson: [],
  7417. oneJson: [],
  7418. updateKey: 1,
  7419. isOutline: false,
  7420. isOutline2: false,
  7421. infoData: [],
  7422. infoproVisible: false,
  7423. infoisFinishSize: 0,
  7424. infoisAllSize: 0,
  7425. infoprogress: 0,
  7426. taskDetailLoading: [],
  7427. ttaskDetailLoading: [],
  7428. taskDetailLoading2: [],
  7429. ttaskDetailLoading2: [],
  7430. taskDetailLoading3: [],
  7431. ttaskDetailLoading3: [],
  7432. taskDetailLoading4: [],
  7433. taskDetailLoading5: [],
  7434. ttaskDetailLoading5: [],
  7435. dArray: [],
  7436. dialogVisibleAiD: false,
  7437. aitype: "",
  7438. aiJson: {
  7439. "aiDetail": "请根据<课程简要描述>设计一个名为<课程名字>的<课程学科>学科的,面向<面向年级>的项目式学习课程。",
  7440. "aiOutline": "请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少100个token的详细描述)。你需要参考课程简要描述<课程简要描述>,并产出每个教学任务的设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。",
  7441. "aiTask": "请根据<教学任务教案>。",
  7442. "aiDetail1": "请根据<课程描述>,重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准。",
  7443. "aiDetail2": "请你在考虑到整个课程的情况下,优化该任务描述",//和任务名:<任务名>:<任务描述>
  7444. "aiDetail3": "请你在考虑到整个课程的情况下,**重点考虑该任务及工具名和工具内容的情况下**,优化工具指引。",
  7445. "aiDetail4": "请你在考虑到整个课程的情况下,**重点考虑该任务详情**以及工具的情况下,优化评价标准。",
  7446. "aiTeacher": "请根据<任务大纲>为每个教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含实例答案。",
  7447. "teacherDetail": "请根据<任务大纲>,以及# 其他教学任务教案,为本教学任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动),相关知识点的讲解,练习(练习需要包含实例答案。注意,你绝对不能重复其他教学任务教案中的内容",
  7448. "teacherDetail2": "请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。"
  7449. },
  7450. aiText: "",
  7451. aiText2: "",
  7452. aiText3: "",
  7453. aiCallBack: "",
  7454. aiIndex: "",
  7455. clickType: 1,
  7456. promptShow: false,
  7457. templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
  7458. istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
  7459. dialogVisibleTips: false,
  7460. tipsJson: {},
  7461. cpote:{
  7462. cpote1: '',
  7463. cpote2: '',
  7464. cpote3: '',
  7465. cpote4: '',
  7466. },
  7467. cpoteLoading:{
  7468. cpote1: false,
  7469. cpote2: false,
  7470. cpote3: false,
  7471. cpote4: false,
  7472. },
  7473. cpotetLoading:{
  7474. cpote1: false,
  7475. cpote2: false,
  7476. cpote3: false,
  7477. cpote4: false,
  7478. },
  7479. cpoteType: 0,
  7480. dialogVisibleAiCreate: false,
  7481. dialogVisibleAiCreateVideo: false,
  7482. teacherText: [],
  7483. isFileSearch: true,
  7484. fileIds: [],//'file-A81p1q02HHpJhus4nYYwtAmM'
  7485. 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'],
  7486. courseJie:1,
  7487. courseTime:45,
  7488. allTextArray: [],
  7489. dialogVisiblePdf: false,
  7490. dialogVisibleOffice: false,
  7491. wurl: "",
  7492. choiceLoading: false,
  7493. teacherInfoData: [],
  7494. teacherinfoproVisible: false,
  7495. teacherinfoisFinishSize: 0,
  7496. teacherinfoisAllSize: 0,
  7497. teacherinfoprogress: 0,
  7498. teacherCourseText: "",
  7499. teacherTextLoading: false,
  7500. tteacherTextLoading: false,
  7501. targetCourseText: "",
  7502. targetTextLoading: false,
  7503. ttargetTextLoading: false,
  7504. cankaoInfoData: [],
  7505. fileSLoading: false,
  7506. infoData2: [],
  7507. isuseT: false,
  7508. mode: 1,
  7509. targetCourseText2: "",
  7510. targetTextLoading2: false,
  7511. ttargetTextLoading2: false,
  7512. courseTextBool: false,
  7513. teacherCourseTextB: true,
  7514. targetCourseTextB: true,
  7515. courseTextB: true,
  7516. targetCourseText2B: true,
  7517. // 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'],
  7518. yiKeTemplateArray:[],
  7519. taskLoading: [],
  7520. ruleLoading: [],
  7521. mubiaoInfoData: [],
  7522. mubiaoinfoproVisible: false,
  7523. mubiaoinfoisFinishSize: 0,
  7524. mubiaoinfoisAllSize: 0,
  7525. mubiaoinfoprogress: 0,
  7526. xuanzeInfoData: [],
  7527. xuanzeinfoproVisible: false,
  7528. xuanzeinfoisFinishSize: 0,
  7529. xuanzeinfoisAllSize: 0,
  7530. xuanzeinfoprogress: 0,
  7531. pingjiaInfoData: [],
  7532. pingjiainfoproVisible: [],
  7533. pingjiainfoisFinishSize: [],
  7534. pingjiainfoisAllSize: [],
  7535. pingjiainfoprogress: [],
  7536. taskGLoading: [],
  7537. isOutlineCancelToken: null,
  7538. isFileCancelToken: null,
  7539. isTargetCancelToken1: null,
  7540. isTargetCancelToken2: null,
  7541. isTextCancelToken: null,
  7542. isTeacherTextCancelToken: null,
  7543. isTeacherTaskCancelToken: null,
  7544. isOutlineTaskCancelToken: [],
  7545. isTeacherTaskCancelToken2: [],
  7546. isTeacherTaskCancelSource: [],
  7547. isTextCancelSource: null,
  7548. isOutlineTaskCancelSource: [],
  7549. isTeacherTextCancelSource: null,
  7550. isTargetCancelSource1: null,
  7551. isTargetCancelSource2: null,
  7552. fileidArray: [],
  7553. interPan: true,
  7554. interFlash: true,
  7555. agentid: "",
  7556. interSetting: false,
  7557. chatid: "",
  7558. languageSetting: 0, //0中文 1繁体 2英文
  7559. isQuote: {},
  7560. knowFileArray: [],
  7561. knowInfoData: [],
  7562. knowinfoproVisible: false,
  7563. knowinfoisFinishSize: 0,
  7564. knowinfoisAllSize: 0,
  7565. knowinfoprogress: 0,
  7566. knowFileids: [],
  7567. searchFileName: "",
  7568. knowInfoDataLoading: false,
  7569. knowInfoData2: [],
  7570. knowinfoproVisible2: false,
  7571. knowinfoisFinishSize2: 0,
  7572. knowinfoisAllSize2: 0,
  7573. knowinfoprogress2: 0,
  7574. knowFileids2: [],
  7575. pjTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cp5', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  7576. pjIndex: [52, 48, 1, 3, 16, 45, 47, 41],
  7577. taskAnLoading: [],
  7578. taskAnCancelToken: [],
  7579. dialogTemplateArray: [ 'cf5722a4-401b-11ef-b873-005056b86cd2', '68629cfb-e719-48e9-a03d-56f189fb9cb0' ],
  7580. taskCancelToken1: [],
  7581. taskCancelToken2: [],
  7582. isDisplay: true,
  7583. isDialog: 0,
  7584. };
  7585. },
  7586. directives: {
  7587. autoHeight: {
  7588. update(el, binding) {
  7589. const { value } = binding;
  7590. if (value && typeof value === "number") {
  7591. el.style.height = `${value}px`;
  7592. } else {
  7593. el.style.height = "auto";
  7594. }
  7595. },
  7596. componentUpdated(el) {
  7597. el.style.height = `${el.scrollHeight + 25}px`;
  7598. },
  7599. },
  7600. },
  7601. computed: {
  7602. // rightBoxHeight: function () {
  7603. // return $(".rightBox")[0] ? $(".rightBox")[0].scrollHeight : 1000
  7604. // },
  7605. offsetLetfPx: function () {
  7606. //addnum可以直接在模板语法里面用,相当于data内的值
  7607. return (
  7608. $(".cru_select")[this.unitIndex] &&
  7609. $(".cru_select")[this.unitIndex].offsetLeft + 5
  7610. );
  7611. },
  7612. getMan2() {
  7613. return function (people) {
  7614. let _people = people;
  7615. let _people2 = "";
  7616. if (this.ManAarray.length) {
  7617. for (var i = 0; i < this.ManAarray.length; i++) {
  7618. if (this.ManAarray[i].userid == people) {
  7619. _people2 = this.ManAarray[i].name;
  7620. break;
  7621. }
  7622. }
  7623. }
  7624. if (people == this.courseUserid) {
  7625. return "";
  7626. }
  7627. return this.ManAarray.length ? _people2 : "";
  7628. };
  7629. },
  7630. getListMan2() {
  7631. return function (list) {
  7632. let _people2 = [];
  7633. if (this.ManAarray.length) {
  7634. for (var j = 0; j < list.length; j++) {
  7635. let people = list[j];
  7636. for (var i = 0; i < this.ManAarray.length; i++) {
  7637. if (
  7638. this.ManAarray[i].userid == people &&
  7639. people != this.courseUserid
  7640. ) {
  7641. _people2.push(this.ManAarray[i].name);
  7642. break;
  7643. }
  7644. }
  7645. }
  7646. }
  7647. return this.ManAarray.length ? _people2.join("、") : "";
  7648. };
  7649. },
  7650. isInvite() {
  7651. return function (cid) {
  7652. let array = [];
  7653. for (var i = 0; i < this.inviteCode.length; i++) {
  7654. array.push(this.inviteCode[i].cid);
  7655. }
  7656. return array.indexOf(cid) != -1;
  7657. };
  7658. },
  7659. getInviteCodeC() {
  7660. return function (cid) {
  7661. let array = [];
  7662. for (var i = 0; i < this.inviteCode.length; i++) {
  7663. array.push(this.inviteCode[i].cid);
  7664. }
  7665. return this.inviteCode[array.indexOf(cid)].ic;
  7666. };
  7667. },
  7668. getClassC() {
  7669. return function (c) {
  7670. let _c2 = "";
  7671. if (this.grade.length) {
  7672. for (var i = 0; i < this.grade.length; i++) {
  7673. if (this.grade[i].id == c) {
  7674. _c2 = this.grade[i].name;
  7675. break;
  7676. }
  7677. }
  7678. }
  7679. return this.grade.length ? _c2 : "";
  7680. };
  7681. },
  7682. getListClassC() {
  7683. return function (list) {
  7684. let _c2 = [];
  7685. if (this.grade.length) {
  7686. for (var j = 0; j < list.length; j++) {
  7687. let c = list[j];
  7688. for (var i = 0; i < this.grade.length; i++) {
  7689. if (this.grade[i].id == c) {
  7690. _c2.push(this.grade[i].name);
  7691. break;
  7692. }
  7693. }
  7694. }
  7695. }
  7696. return this.grade.length ? _c2.join("、") : "";
  7697. };
  7698. },
  7699. MarkdownT() {
  7700. return function (c) {
  7701. let md = new MarkdownIt();
  7702. return c
  7703. ? md.render(c) : "";
  7704. };
  7705. },
  7706. panOutline(){
  7707. return function () {
  7708. let count = 0;
  7709. for(var i = 0; i < this.unitJson.length; i++){
  7710. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7711. for(var j = 0; j < _task.length; j++){
  7712. if(_task[j].taskDetail2){
  7713. count++
  7714. }
  7715. }
  7716. }
  7717. return count;
  7718. };
  7719. },
  7720. panTeacher(){
  7721. return function () {
  7722. let count = 0;
  7723. for(var i = 0; i < this.unitJson.length; i++){
  7724. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7725. for(var j = 0; j < _task.length; j++){
  7726. if(_task[j].taskDetail3){
  7727. count++
  7728. }
  7729. }
  7730. }
  7731. return count;
  7732. };
  7733. },
  7734. panTask(){
  7735. return function () {
  7736. let count = 0;
  7737. for(var i = 0; i < this.unitJson.length; i++){
  7738. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7739. for(var j = 0; j < _task.length; j++){
  7740. if(_task[j].taskDetail){
  7741. count++
  7742. }
  7743. }
  7744. }
  7745. return count;
  7746. };
  7747. },
  7748. panElist(){
  7749. return function (array) {
  7750. let count = 0;
  7751. for(var i = 0; i < array.toolChoose.length; i++){
  7752. if(array.toolChoose[i].eList && array.toolChoose[i].eList.length){
  7753. count++
  7754. }
  7755. }
  7756. return count;
  7757. };
  7758. },
  7759. panTaskElist(){
  7760. return function () {
  7761. let count = 0;
  7762. for(var i = 0; i < this.unitJson.length; i++){
  7763. let _task = this.unitJson[i].chapterInfo[0].taskJson
  7764. for(var j = 0; j < _task.length; j++){
  7765. if(_task[j].eList && _task[j].eList.length){
  7766. count++
  7767. }
  7768. }
  7769. }
  7770. return count;
  7771. };
  7772. },
  7773. dataCheckPan(){
  7774. return function (fileid) {
  7775. for(let i = 0; i < this.infoData.length; i++){
  7776. if(this.infoData[i].fileid == fileid){
  7777. return true
  7778. }
  7779. }
  7780. return false;
  7781. };
  7782. },
  7783. interUrl: function () {
  7784. let agentid = this.aiJson.agentid
  7785. let sagentid = this.aiJson.sagentid
  7786. let url = ''
  7787. if(sagentid){
  7788. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7789. }else{
  7790. url = `https://beta.cloud.cocorobo.cn/aigpt/#/js?muti_agent_id=${agentid}&isPbl=true&session_id=${this.chatid}`//+'&muti_agent_id2='+agentid
  7791. }
  7792. return url;
  7793. },
  7794. },
  7795. watch: {
  7796. unitIndex(newValue, oldValue) {
  7797. // return;
  7798. if (this.isDelete == 2) {
  7799. this.isDelete = 1;
  7800. return;
  7801. }
  7802. if (this.cid != "") {
  7803. let _unitIndex = oldValue;
  7804. if (
  7805. JSON.stringify(this.unitJson2[_unitIndex]) ==
  7806. JSON.stringify(this.unitJson[_unitIndex])
  7807. ) {
  7808. this.$refs.rightboxR.scrollTop = 0;
  7809. return;
  7810. }
  7811. let cPan = 1;
  7812. for (
  7813. var j = 0;
  7814. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  7815. j++
  7816. ) {
  7817. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7818. j
  7819. ].proVisible = false;
  7820. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  7821. j
  7822. ].proVisible2 = false;
  7823. if (
  7824. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7825. .length > 1
  7826. ) {
  7827. for (
  7828. var z = 0;
  7829. z <
  7830. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  7831. .length;
  7832. z++
  7833. ) {
  7834. if (
  7835. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
  7836. .toolChoose[z].tool.length
  7837. ) {
  7838. this.$message.error("请把工具添加完整");
  7839. cPan = 2;
  7840. break;
  7841. }
  7842. }
  7843. }
  7844. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  7845. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  7846. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  7847. (ele) => {
  7848. return ele.value != "" || ele.detail != "" || ele.target != "";
  7849. }
  7850. );
  7851. }
  7852. }
  7853. if (cPan == 2) {
  7854. this.unitIndex = oldValue;
  7855. return;
  7856. }
  7857. for (var i = 0; i < this.unitJson.length; i++) {
  7858. if (this.addindex != i) {
  7859. delete this.unitJson[i].isUpdate;
  7860. }
  7861. }
  7862. this.$refs.rightboxR.scrollTop = 0;
  7863. this.addindex = -1;
  7864. let params = [
  7865. {
  7866. cid: this.cid,
  7867. chapters: JSON.stringify(this.unitJson),
  7868. uid: this.userid,
  7869. unitIndex: _unitIndex,
  7870. },
  7871. ];
  7872. this.ajax
  7873. .post(this.$store.state.api + "updateWorkNew4", params)
  7874. .then((res) => {
  7875. // this.$message({
  7876. // message: "修改成功",
  7877. // type: "success",
  7878. // });
  7879. // this.courseId = this.cid;
  7880. this.addtips()
  7881. })
  7882. .catch((err) => {
  7883. this.$message.error("网络不佳");
  7884. console.error(err);
  7885. });
  7886. }
  7887. },
  7888. steps(newValue, old) {
  7889. if(newValue == 2){
  7890. this.steps = old
  7891. }
  7892. if (newValue == 4) {
  7893. let cPan = 1;
  7894. for (var i = 0; i < this.unitJson.length; i++) {
  7895. for (
  7896. var j = 0;
  7897. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  7898. j++
  7899. ) {
  7900. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  7901. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  7902. if (
  7903. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  7904. ) {
  7905. for (
  7906. var z = 0;
  7907. z <
  7908. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  7909. z++
  7910. ) {
  7911. if (
  7912. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z]
  7913. .tool.length
  7914. ) {
  7915. this.$message.error("请把工具添加完整");
  7916. cPan = 2;
  7917. break;
  7918. }
  7919. }
  7920. }
  7921. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  7922. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  7923. i
  7924. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  7925. return ele.value != "" || ele.detail != "" || ele.target != "";
  7926. });
  7927. }
  7928. }
  7929. }
  7930. this.inputShow = true;
  7931. if (cPan == 2) {
  7932. this.steps = old;
  7933. return;
  7934. }
  7935. this.goTo(
  7936. "/course?userid=" +
  7937. this.userid +
  7938. "&oid=" +
  7939. this.oid +
  7940. "&org=" +
  7941. this.org +
  7942. "&role=" +
  7943. this.role
  7944. );
  7945. }
  7946. },
  7947. courseName(newVal, oldVal) {
  7948. this.setCourseInfo();
  7949. },
  7950. courseTypeId: {
  7951. immediate: true,
  7952. deep: true,
  7953. handler(newValue, oldValue) {
  7954. this.setCourseInfo();
  7955. }
  7956. },
  7957. knowFileids(newVal, oldVal) {
  7958. window.course_fileids = this.knowFileids
  7959. },
  7960. },
  7961. methods: {
  7962. tableRowClassName({ row, rowIndex }) {
  7963. if ((rowIndex + 1) % 2 === 0) {
  7964. return "even_row";
  7965. } else {
  7966. return "";
  7967. }
  7968. },
  7969. close() {
  7970. this.cetIndex = "";
  7971. this.cettIndex = "";
  7972. this.templateName = "";
  7973. this.cetBoxDialog = false;
  7974. },
  7975. openAI() {
  7976. top.postMessage({ tools: "64" }, "*");
  7977. },
  7978. setMan() {
  7979. // let teacherJuri = this.teacherJuri2;
  7980. this.ManAarray = [];
  7981. let _user = JSON.parse(JSON.stringify(this.checkboxList3));
  7982. if (_user.indexOf(this.userid) == -1) {
  7983. _user.push(this.userid);
  7984. }
  7985. if (_user.indexOf(this.courseUserid) == -1) {
  7986. _user.push(this.courseUserid);
  7987. }
  7988. let params = [{
  7989. uid: _user.join(","),
  7990. }];
  7991. this.ajax
  7992. .post(this.$store.state.api + "getAllUserByIdP", params)
  7993. .then((res) => {
  7994. let teacherJuri = res.data[0];
  7995. this.ManAarray = teacherJuri;
  7996. })
  7997. .catch((err) => {
  7998. console.error(err);
  7999. });
  8000. },
  8001. previewImg(url) {
  8002. this.$hevueImgPreview(url);
  8003. },
  8004. btnDisplay(bool) {
  8005. this.isBtnDisplay = bool;
  8006. },
  8007. stepDisplay(bool) {
  8008. this.isStepDisplay = bool;
  8009. },
  8010. scrollChange() {
  8011. this.rightBoxHeight = $(".rightBox")[0].scrollHeight - 80;
  8012. },
  8013. addHw(e) {
  8014. var el = e.currentTarget;
  8015. el.getElementsByTagName("input")[0].click();
  8016. },
  8017. change(val) {
  8018. if (this.dialogVisible1) {
  8019. this.tdetail = val;
  8020. } else if (this.dialogVisible6) {
  8021. this.AttText.text = val;
  8022. } else if (this.dialogVisible2) {
  8023. this.cTemplate = val;
  8024. } else if (this.dialogVisibleTable) {
  8025. this.tableJson.text = val;
  8026. }
  8027. this.$forceUpdate();
  8028. console.log(val);
  8029. },
  8030. change2(val) {
  8031. console.log(val);
  8032. this.$forceUpdate();
  8033. },
  8034. handleClose(done) {
  8035. done();
  8036. },
  8037. closePan(tool) {
  8038. if (tool == 15) {
  8039. if (JSON.stringify(this.answerQ) == JSON.stringify(this.answerQ2)) {
  8040. this.dialogVisible8 = false;
  8041. } else {
  8042. this.closeConfirm(tool);
  8043. }
  8044. } else if (tool == 4) {
  8045. if (JSON.stringify(this.askJson) == JSON.stringify(this.askJson2)) {
  8046. this.dialogVisible5 = false;
  8047. } else {
  8048. this.closeConfirm(tool);
  8049. }
  8050. } else if (tool == 45) {
  8051. if (JSON.stringify(this.testJson) == JSON.stringify(this.testJson2)) {
  8052. this.dialogVisibleChoice = false;
  8053. } else {
  8054. this.closeConfirm(tool);
  8055. }
  8056. } else if (tool == 41) {
  8057. if (
  8058. JSON.stringify(this.selectJson) == JSON.stringify(this.selectJson2)
  8059. ) {
  8060. this.dialogVisibleSelect = false;
  8061. } else {
  8062. this.closeConfirm(tool);
  8063. }
  8064. } else if (tool == 47) {
  8065. if (
  8066. JSON.stringify(this.sentenceList) ==
  8067. JSON.stringify(this.sentenceList2)
  8068. ) {
  8069. this.dialogVisibleSentence = false;
  8070. } else {
  8071. this.closeConfirm(tool);
  8072. }
  8073. } else if (tool == 69) {
  8074. if (
  8075. JSON.stringify(this.englishList) == JSON.stringify(this.englishList)
  8076. ) {
  8077. this.englishDialogVisible = false;
  8078. } else {
  8079. this.closeConfirm(tool);
  8080. }
  8081. }
  8082. },
  8083. closeConfirm(tool) {
  8084. this.$confirm("是否保存已编辑内容?", "提示", {
  8085. confirmButtonText: "保存",
  8086. cancelButtonText: "不保存",
  8087. type: "warning",
  8088. })
  8089. .then(() => {
  8090. if (tool == 15) {
  8091. this.addAnswer();
  8092. } else if (tool == 4) {
  8093. this.addAsk();
  8094. } else if (tool == 45) {
  8095. this.addTest();
  8096. } else if (tool == 41) {
  8097. this.addSelectAnswer();
  8098. } else if (tool == 47) {
  8099. this.addSentenceTool();
  8100. } else if (tool == 69) {
  8101. this.addEnglish();
  8102. }
  8103. })
  8104. .catch(() => {
  8105. if (tool == 15) {
  8106. this.dialogVisible8 = false;
  8107. } else if (tool == 4) {
  8108. this.dialogVisible5 = false;
  8109. } else if (tool == 45) {
  8110. this.dialogVisibleChoice = false;
  8111. } else if (tool == 41) {
  8112. this.dialogVisibleSelect = false;
  8113. } else if (tool == 47) {
  8114. this.dialogVisibleSentence = false;
  8115. } else if (tool == 69) {
  8116. this.englishDialogVisible = false;
  8117. }
  8118. });
  8119. },
  8120. addEnglish(jsonType) {
  8121. this.englishList.engTitle = this.$refs["engJson"].engList.engTitle;
  8122. this.englishList.englishText = this.$refs["engJson"].engList.englishText;
  8123. this.englishList.textJson = this.$refs["engJson"].engList.textJson;
  8124. if (
  8125. this.englishList.engTitle == "" ||
  8126. this.englishList.englishText == ""
  8127. ) {
  8128. this.$message.error("请将内容填写完整!");
  8129. return;
  8130. }
  8131. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  8132. this.taskCount
  8133. ].toolChoose[this.toolIndex].englishList = this.englishList;
  8134. this.englishList = {};
  8135. if (jsonType && jsonType == 1) {
  8136. this.englishDialogVisible = true;
  8137. } else {
  8138. this.englishDialogVisible = false;
  8139. }
  8140. if (
  8141. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  8142. .toolChoose[this.toolIndex].tool != 69
  8143. ) {
  8144. this.addTools(69, this.taskCount, this.toolIndex);
  8145. }
  8146. },
  8147. imgChange2(i, j) {
  8148. var _tmp = this.testJson.testJson[i].checkList[j];
  8149. this.noneBtnImg = _tmp.length >= 1;
  8150. },
  8151. imgChange3(i) {
  8152. var _tmp = this.testJson.testJson[i];
  8153. this.noneBtnImg = _tmp.length >= 1;
  8154. },
  8155. imgChange1(file, fileList, type, itemTaskIndex) {
  8156. if (type == 1) {
  8157. var _tmp = this.cover;
  8158. } else if (
  8159. type == 2 ||
  8160. type == 3 ||
  8161. type == 6 ||
  8162. type == 7 ||
  8163. type == 8
  8164. ) {
  8165. var _tmp =
  8166. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8167. .chapterData;
  8168. } else if (type == 4) {
  8169. var _tmp = this.unitJson[this.unitIndex].chapterInfo[0].fileList1;
  8170. } else {
  8171. var _tmp =
  8172. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  8173. .homeworkList;
  8174. }
  8175. this.noneBtnImg = _tmp.length >= 1;
  8176. },
  8177. goTo(path) {
  8178. this.$router.push(path);
  8179. },
  8180. guid() {
  8181. var _num,
  8182. i,
  8183. _guid = "";
  8184. for (i = 0; i < 32; i++) {
  8185. _guid += Math.floor(Math.random() * 16).toString(16); //随机0 - 16 的数字 转变为16进制的字符串
  8186. _num = Math.floor((i - 7) / 4); //计算 (i-7)除4
  8187. if (_num > -1 && _num < 4 && i == 7 + 4 * _num) {
  8188. //会使guid中间加 "-" 形式为xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  8189. _guid += "-";
  8190. }
  8191. }
  8192. return _guid;
  8193. },
  8194. retrunCourse() {
  8195. if(this.istemplate == 1){
  8196. this.goTo(
  8197. "/course?userid=" +
  8198. this.userid +
  8199. "&oid=" +
  8200. this.oid +
  8201. "&org=" +
  8202. this.org +
  8203. "&role=" +
  8204. this.role
  8205. );
  8206. return
  8207. }
  8208. this.$confirm("是否保存已编辑内容?", "提示", {
  8209. confirmButtonText: "保存",
  8210. cancelButtonText: "不保存",
  8211. distinguishCancelAndClose: true,
  8212. type: "warning",
  8213. })
  8214. .then(() => {
  8215. if (this.taskLoading.length) {
  8216. let _pan = 1
  8217. for(var k = 0; k < this.taskLoading.length; k++){
  8218. if(this.taskLoading[k]){
  8219. this.$message({
  8220. message: `请等待任务${k+1}回答完毕后再保存`,
  8221. type: "warning"
  8222. });
  8223. _pan = 2
  8224. }
  8225. }
  8226. if(_pan == 2){
  8227. return
  8228. }
  8229. }
  8230. if(this.taskGLoading.length){
  8231. let _pan = 1
  8232. for(var k = 0; k < this.taskGLoading.length; k++){
  8233. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8234. this.$message({
  8235. message: `请等待任务${k+1}回答完毕后再保存`,
  8236. type: "warning"
  8237. });
  8238. _pan = 2
  8239. }
  8240. }
  8241. if(_pan == 2){
  8242. return
  8243. }
  8244. }
  8245. if (this.cid == "" || this.cid == undefined) {
  8246. if (this.courseName == "") {
  8247. this.$message.error("请补充填写课程名称");
  8248. return;
  8249. } else {
  8250. this.addWork();
  8251. }
  8252. this.steps = 4;
  8253. } else {
  8254. if (this.courseName == "") {
  8255. this.$message.error("请补充填写课程名称");
  8256. return;
  8257. } else {
  8258. if (this.userid != this.courseUserid && this.role != "1") {
  8259. this.updateWork2();
  8260. } else {
  8261. this.updateWork();
  8262. }
  8263. this.steps = 4;
  8264. }
  8265. }
  8266. })
  8267. .catch((v) => {
  8268. console.log(v);
  8269. if (v == "cancel") {
  8270. this.goTo(
  8271. "/course?userid=" +
  8272. this.userid +
  8273. "&oid=" +
  8274. this.oid +
  8275. "&org=" +
  8276. this.org +
  8277. "&role=" +
  8278. this.role
  8279. );
  8280. }
  8281. });
  8282. },
  8283. lastSteps() {
  8284. if (this.steps == 4) {
  8285. this.goTo(
  8286. "/course?userid=" +
  8287. this.userid +
  8288. "&oid=" +
  8289. this.oid +
  8290. "&org=" +
  8291. this.org +
  8292. "&role=" +
  8293. this.role
  8294. );
  8295. } else {
  8296. // if (this.cidType == 0) {
  8297. // this.steps--;
  8298. // if (this.steps == 1) {
  8299. // setTimeout(() => {
  8300. // this.checkEva(this.checkId);
  8301. // setTimeout(() => {
  8302. // this.checkEva(this.checkId);
  8303. // }, 100);
  8304. // }, 100);
  8305. // }
  8306. // } else {
  8307. if (this.steps == 3) {
  8308. this.steps = 1;
  8309. setTimeout(() => {
  8310. this.checkEva(this.checkId);
  8311. setTimeout(() => {
  8312. this.checkEva(this.checkId);
  8313. }, 100);
  8314. }, 100);
  8315. }
  8316. // }
  8317. }
  8318. },
  8319. navSteps(s) {
  8320. if (this.courseName == "") {
  8321. this.$message.error("请补充填写课程名称");
  8322. return;
  8323. }
  8324. if (this.cidType == 0) {
  8325. if (this.steps == 1) {
  8326. if (this.cid == "" || this.cid == undefined) {
  8327. this.addWork();
  8328. } else {
  8329. if (this.userid != this.courseUserid && this.role != "1") {
  8330. this.updateWork2();
  8331. } else {
  8332. this.updateWork();
  8333. }
  8334. }
  8335. }
  8336. if (s == 1) {
  8337. this.steps = 1;
  8338. setTimeout(() => {
  8339. this.checkEva(this.checkId);
  8340. setTimeout(() => {
  8341. this.checkEva(this.checkId);
  8342. }, 100);
  8343. }, 100);
  8344. }
  8345. if (s == 2) {
  8346. this.steps = 2;
  8347. }
  8348. if (s == 3) {
  8349. this.cTemplate = this.templateC.content;
  8350. this.dialogVisible2 = false;
  8351. this.steps = 3;
  8352. this.isClickColor = 1;
  8353. this.unitJson[
  8354. this.unitIndex
  8355. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8356. this.$forceUpdate();
  8357. setTimeout(() => {
  8358. this.checkEva(this.checkId);
  8359. setTimeout(() => {
  8360. this.checkEva(this.checkId);
  8361. }, 100);
  8362. }, 1000);
  8363. }
  8364. } else {
  8365. if (this.steps == 1) {
  8366. if (this.cid == "" || this.cid == undefined) {
  8367. this.addWork();
  8368. } else {
  8369. if (this.userid != this.courseUserid && this.role != "1") {
  8370. this.updateWork2();
  8371. } else {
  8372. this.updateWork();
  8373. }
  8374. }
  8375. }
  8376. if (s == 1) {
  8377. this.steps = 1;
  8378. setTimeout(() => {
  8379. this.checkEva(this.checkId);
  8380. setTimeout(() => {
  8381. this.checkEva(this.checkId);
  8382. }, 100);
  8383. }, 100);
  8384. }
  8385. if (s == 3) {
  8386. this.cTemplate = this.templateC.content;
  8387. this.dialogVisible2 = false;
  8388. this.steps = 3;
  8389. this.isClickColor = 1;
  8390. this.unitJson[
  8391. this.unitIndex
  8392. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8393. this.$forceUpdate();
  8394. setTimeout(() => {
  8395. this.checkEva(this.checkId);
  8396. setTimeout(() => {
  8397. this.checkEva(this.checkId);
  8398. }, 100);
  8399. }, 1000);
  8400. }
  8401. }
  8402. this.$refs.stepBox.scrollTop = 0;
  8403. },
  8404. setTipsIndex(){
  8405. // 使用 setTimeout 确保对话框已经渲染完成
  8406. this.$nextTick(() => {
  8407. const dialog = document.querySelector('.custom-confirm-box');
  8408. if (dialog) {
  8409. const parent = dialog.parentElement;
  8410. if (parent) {
  8411. parent.style.zIndex = 9999999;
  8412. const adjacentElement = parent.nextElementSibling;
  8413. if (adjacentElement) {
  8414. adjacentElement.style.zIndex = 9999998;
  8415. }
  8416. }
  8417. }
  8418. });
  8419. },
  8420. nextSteps(clickType, ttype) {
  8421. if(!this.time()){
  8422. return
  8423. }
  8424. // if (this.cidType == 1) {
  8425. if (this.steps == 1) {
  8426. if (this.courseName != "") {
  8427. if ((this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) || this.cpotetLoading.cpote1 || this.cpotetLoading.cpote2 || this.cpotetLoading.cpote3 || this.cpotetLoading.cpote4) {
  8428. // this.$message({
  8429. // message: "请回答完毕后再次发送",
  8430. // type: "warning"
  8431. // });
  8432. if(this.ttaskDetailLoading.length){
  8433. let num = parseInt(this.ttaskDetailLoading[0].split("task-")[1]) + 1
  8434. this.$message({
  8435. message: "生成大纲任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8436. type: "warning"
  8437. });
  8438. }
  8439. if(this.cpotetLoading.cpote1){
  8440. this.$message({
  8441. message: "概念群还未生成完,请前往查看,回答完毕后再次操作。",
  8442. type: "warning"
  8443. });
  8444. }
  8445. if(this.cpotetLoading.cpote2){
  8446. this.$message({
  8447. message: "问题链还未生成完,请前往查看,回答完毕后再次操作。",
  8448. type: "warning"
  8449. });
  8450. }
  8451. if(this.cpotetLoading.cpote3){
  8452. this.$message({
  8453. message: "目标层还未生成完,请前往查看,回答完毕后再次操作。",
  8454. type: "warning"
  8455. });
  8456. }
  8457. if(this.cpotetLoading.cpote4){
  8458. this.$message({
  8459. message: "任务簇还未生成完,请前往查看,回答完毕后再次操作。",
  8460. type: "warning"
  8461. });
  8462. }
  8463. return;
  8464. }
  8465. if (this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3" && !this.isOutline) {
  8466. if(!this.courseText && !this.teacherCourseText){
  8467. this.$message.error("请生成简要描述后再生成大纲");
  8468. return;
  8469. }
  8470. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  8471. this.openAiDialog(clickType, 'aiOutline2')
  8472. if(clickType == 1){
  8473. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  8474. }else {
  8475. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  8476. }
  8477. }else {
  8478. this.openAiDialog(clickType, 'aiOutline')
  8479. if(clickType == 1){
  8480. this.addCourseBehavior('courseBehavior', `右键课程大纲-生成大纲按钮`)
  8481. }else {
  8482. this.addCourseBehavior('courseBehavior', `点击课程大纲-生成大纲按钮`)
  8483. }
  8484. }
  8485. return;
  8486. }
  8487. if((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && this.cpoteType != 4){
  8488. let _type = ''
  8489. if(this.cpoteType == 0){
  8490. _type = 'aiCpote1'
  8491. if(clickType == 1){
  8492. this.addCourseBehavior('courseBehavior', `右键概念群-生成概念群按钮`)
  8493. }else {
  8494. this.addCourseBehavior('courseBehavior', `点击概念群-生成概念群按钮`)
  8495. }
  8496. }else if(this.cpoteType == 1){
  8497. _type = 'aiCpote2'
  8498. if(clickType == 1){
  8499. this.addCourseBehavior('courseBehavior', `右键问题链-生成问题链按钮`)
  8500. }else {
  8501. this.addCourseBehavior('courseBehavior', `点击问题链-生成问题链按钮`)
  8502. }
  8503. }else if(this.cpoteType == 2){
  8504. _type = 'aiCpote3'
  8505. if(clickType == 1){
  8506. this.addCourseBehavior('courseBehavior', `右键目标层-生成目标层按钮`)
  8507. }else {
  8508. this.addCourseBehavior('courseBehavior', `点击目标层-生成目标层按钮`)
  8509. }
  8510. }else if(this.cpoteType == 3){
  8511. _type = 'aiCpote4'
  8512. if(clickType == 1){
  8513. this.addCourseBehavior('courseBehavior', `右键任务簇-生成任务簇按钮`)
  8514. }else {
  8515. this.addCourseBehavior('courseBehavior', `点击任务簇-生成任务簇按钮`)
  8516. }
  8517. }
  8518. this.cpoteType++
  8519. this.openAiDialog(clickType, _type)
  8520. return;
  8521. }
  8522. // if (!this.isOutline2) {
  8523. // this.openAiDialog(clickType, 'aiTeacher')
  8524. // return;
  8525. // }
  8526. if (!this.isOutline2 && (this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")) {
  8527. this.openAiDialog(clickType, 'aiTeacher3')
  8528. if(clickType == 1){
  8529. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  8530. }else {
  8531. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  8532. }
  8533. return;
  8534. }
  8535. if (!this.isOutline2 && this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") {
  8536. this.openAiDialog(clickType, 'aiTeacher2')
  8537. if(clickType == 1){
  8538. this.addCourseBehavior('courseBehavior', `右键教案-生成教案按钮`)
  8539. }else {
  8540. this.addCourseBehavior('courseBehavior', `点击教案-生成教案按钮`)
  8541. }
  8542. return;
  8543. }
  8544. let _pan2 = 1
  8545. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  8546. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2 && !(this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3")){
  8547. _pan2 = 2
  8548. this.$message.error(`请完善任务${k+1}的课程大纲`)
  8549. break;
  8550. }
  8551. if(!this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail3){
  8552. _pan2 = 2
  8553. this.$message.error(`请完善任务${k+1}的课程教案`)
  8554. break;
  8555. }
  8556. }
  8557. if(_pan2 == 2){
  8558. return;
  8559. }
  8560. const functionA = () => {
  8561. setTimeout(() => {
  8562. this.loading = false
  8563. this.steps = 3;
  8564. }, 0)
  8565. this.isClickColor = 1;
  8566. this.unitJson[
  8567. this.unitIndex
  8568. ].chapterInfo[0].taskJson[0].toolOpen = true;
  8569. this.$forceUpdate();
  8570. setTimeout(() => {
  8571. this.checkEva(this.checkId);
  8572. setTimeout(() => {
  8573. this.checkEva(this.checkId);
  8574. }, 100);
  8575. }, 1000);
  8576. if (this.cid == "" || this.cid == undefined) {
  8577. this.addWork();
  8578. } else {
  8579. if (this.userid != this.courseUserid && this.role != "1") {
  8580. this.updateWork2();
  8581. } else {
  8582. this.updateWork();
  8583. }
  8584. }
  8585. }
  8586. if((this.ttaskDetailLoading5.join(",").indexOf('task-') !== -1)){
  8587. if(this.ttaskDetailLoading5.length){
  8588. // let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  8589. // this.$message({
  8590. // message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  8591. // type: "warning"
  8592. // });
  8593. this.$confirm("还有教案描述未生成完毕,是否直接下一步?", "提示", {
  8594. confirmButtonText: "确定",
  8595. cancelButtonText: "取消",
  8596. distinguishCancelAndClose: true,
  8597. type: "warning",
  8598. customClass: 'custom-confirm-box'
  8599. })
  8600. .then(() => {
  8601. if(this.isTeacherTaskCancelToken2){
  8602. for(var i = 0; i < this.isTeacherTaskCancelToken2.length; i++){
  8603. if(this.isTeacherTaskCancelToken2[i]){
  8604. this.isTeacherTaskCancelToken2[i].cancel('Request canceled by the user.');
  8605. this.isTeacherTaskCancelToken2[i] = null;
  8606. }
  8607. }
  8608. }
  8609. this.taskDetailLoading5 = []
  8610. this.ttaskDetailLoading5 = []
  8611. if(this.isTeacherTaskCancelSource){
  8612. for(var i = 0; i < this.isTeacherTaskCancelSource.length; i++){
  8613. if(this.isTeacherTaskCancelSource[i]){
  8614. this.isTeacherTaskCancelSource[i].close()
  8615. this.isTeacherTaskCancelSource[i] = null
  8616. }
  8617. }
  8618. }
  8619. if (this.cid) {
  8620. this.loading = true
  8621. functionA()
  8622. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  8623. } else {
  8624. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8625. if(clickType == 1){
  8626. this.addCourseBehavior('courseBehavior', `右键学历案-下一步按钮`)
  8627. }else {
  8628. this.addCourseBehavior('courseBehavior', `点击学历案-下一步按钮`)
  8629. }
  8630. }
  8631. }).catch((v) => {
  8632. console.log(v);
  8633. })
  8634. setTimeout(() => {
  8635. this.setTipsIndex()
  8636. }, 500)
  8637. }
  8638. return;
  8639. }
  8640. if (this.cid && this.panTask() > 0) {
  8641. this.loading = true
  8642. functionA()
  8643. } else {
  8644. // if(ttype == 2){
  8645. this.openAiDialog(clickType, "aiTask3", 'all', functionA)
  8646. // }else {
  8647. // this.openAiDialog(clickType, "aiTask2", 'all', functionA)
  8648. // }
  8649. }
  8650. } else {
  8651. this.$message.error("请补充填写课程名称");
  8652. return;
  8653. }
  8654. } else if (this.steps == 3) {
  8655. if (this.taskLoading.length) {
  8656. let _pan = 1
  8657. for(var k = 0; k < this.taskLoading.length; k++){
  8658. if(this.taskLoading[k]){
  8659. this.$message({
  8660. message: `请等待任务${k+1}回答完毕后再上传`,
  8661. type: "warning"
  8662. });
  8663. _pan = 2
  8664. }
  8665. }
  8666. if(_pan == 2){
  8667. return
  8668. }
  8669. }
  8670. if(this.taskGLoading.length){
  8671. let _pan = 1
  8672. for(var k = 0; k < this.taskGLoading.length; k++){
  8673. if(this.taskGLoading[k] && (this.taskGLoading[k][0] || this.taskGLoading[k][1] || this.taskGLoading[k][2])){
  8674. this.$message({
  8675. message: `请等待任务${k+1}回答完毕后再保存`,
  8676. type: "warning"
  8677. });
  8678. _pan = 2
  8679. }
  8680. }
  8681. if(_pan == 2){
  8682. return
  8683. }
  8684. }
  8685. if (this.cid == "" || this.cid == undefined) {
  8686. if (this.courseName == "") {
  8687. this.$message.error("请补充填写课程名称");
  8688. return;
  8689. } else {
  8690. this.addWork();
  8691. this.steps++;
  8692. }
  8693. } else {
  8694. if (this.courseName == "") {
  8695. this.$message.error("请补充填写课程名称");
  8696. return;
  8697. } else {
  8698. if (this.userid != this.courseUserid && this.role != "1") {
  8699. this.updateWork2();
  8700. } else {
  8701. this.updateWork();
  8702. }
  8703. this.steps++;
  8704. }
  8705. }
  8706. }
  8707. // } else {
  8708. // if (this.steps == 1) {
  8709. // if (this.courseName != "") {
  8710. // if (this.cid == "" || this.cid == undefined) {
  8711. // this.addWork();
  8712. // } else {
  8713. // if (this.userid != this.courseUserid && this.role != "1") {
  8714. // // this.updateWork2();
  8715. // } else {
  8716. // this.updateWork();
  8717. // }
  8718. // }
  8719. // this.steps++;
  8720. // } else {
  8721. // this.$message.error("请补充填写课程名称");
  8722. // return;
  8723. // }
  8724. // } else if (this.steps == 2) {
  8725. // if (this.templateC.id != "" || this.templateC.id != undefined) {
  8726. // this.cTemplate = this.templateC.content;
  8727. // }
  8728. // this.dialogVisible2 = false;
  8729. // this.steps++;
  8730. // setTimeout(() => {
  8731. // this.checkEva(this.checkId);
  8732. // setTimeout(() => {
  8733. // this.checkEva(this.checkId);
  8734. // }, 100);
  8735. // }, 1000);
  8736. // } else if (this.steps == 3) {
  8737. // if (this.cid == "" || this.cid == undefined) {
  8738. // if (this.courseName == "") {
  8739. // this.$message.error("请补充填写课程名称");
  8740. // return;
  8741. // } else {
  8742. // this.addWork();
  8743. // this.steps++;
  8744. // }
  8745. // } else {
  8746. // if (this.courseName == "") {
  8747. // this.$message.error("请补充填写课程名称");
  8748. // return;
  8749. // } else {
  8750. // if (this.userid != this.courseUserid && this.role != "1") {
  8751. // this.updateWork2();
  8752. // } else {
  8753. // this.updateWork();
  8754. // }
  8755. // this.steps++;
  8756. // }
  8757. // }
  8758. // }
  8759. // }
  8760. this.$refs.stepBox.scrollTop = 0;
  8761. },
  8762. unitSet(i) {
  8763. if (this.unitIndex == i) {
  8764. return;
  8765. }
  8766. this.unitIndex = i;
  8767. this.isClickColor = 1;
  8768. // this.$refs.rightboxR.scrollTop = 0;
  8769. this.$refs.unitBox.scrollTop = 0;
  8770. },
  8771. panUnitJson() {
  8772. let _unitIndex = this.unitIndex;
  8773. let cPan = 1;
  8774. for (
  8775. var j = 0;
  8776. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  8777. j++
  8778. ) {
  8779. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  8780. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  8781. j
  8782. ].proVisible2 = false;
  8783. if (
  8784. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8785. .length > 1
  8786. ) {
  8787. for (
  8788. var z = 0;
  8789. z <
  8790. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  8791. .length;
  8792. z++
  8793. ) {
  8794. if (
  8795. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  8796. z
  8797. ].tool.length
  8798. ) {
  8799. this.$message.error("请把工具添加完整");
  8800. cPan = 2;
  8801. break;
  8802. }
  8803. }
  8804. }
  8805. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  8806. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  8807. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  8808. (ele) => {
  8809. return ele.value != "" || ele.detail != "" || ele.target != "";
  8810. }
  8811. );
  8812. }
  8813. }
  8814. return cPan;
  8815. },
  8816. unitOpen(i) {
  8817. if (this.unitJson[i].toolOpen) {
  8818. this.unitJson[i].toolOpen = false;
  8819. } else {
  8820. this.unitJson[i].toolOpen = true;
  8821. }
  8822. this.updateWork();
  8823. this.$forceUpdate();
  8824. },
  8825. unitSet2(i) {
  8826. if (this.panUnitJson() == 2) {
  8827. return;
  8828. }
  8829. // if(this.unitJson[i].toolOpen){
  8830. // this.unitJson[i].toolOpen = false
  8831. // this.updateWork()
  8832. // this.$forceUpdate()
  8833. // return
  8834. // }else {
  8835. this.unitJson[i].toolOpen = true;
  8836. // }
  8837. this.$forceUpdate();
  8838. if (this.unitIndex == i) {
  8839. return;
  8840. }
  8841. this.unitIndex = i;
  8842. this.isClickColor = 1;
  8843. // this.$refs.rightboxR.scrollTop = 0;
  8844. this.$refs.unitBox.scrollTop = 0;
  8845. },
  8846. updateCourseState(i) {
  8847. let params = [
  8848. {
  8849. cid: this.cid,
  8850. state: i,
  8851. },
  8852. ];
  8853. this.ajax
  8854. .post(this.$store.state.api + "updateCourseMode", params)
  8855. .then((res) => {
  8856. this.courseState = i;
  8857. })
  8858. .catch((err) => {
  8859. this.$message.error("网络不佳");
  8860. console.error(err);
  8861. });
  8862. },
  8863. addtips(){
  8864. let params = [
  8865. {
  8866. cid: this.cid,
  8867. tips: JSON.stringify(this.aiJson),
  8868. tid: this.templateid
  8869. },
  8870. ];
  8871. this.ajax
  8872. .post(this.$store.state.api + "addTips", params)
  8873. .then((res) => {
  8874. })
  8875. .catch((err) => {
  8876. this.$message.error("网络不佳");
  8877. console.error(err);
  8878. });
  8879. },
  8880. openSaveTips(){
  8881. this.dialogVisibleTips = true
  8882. },
  8883. time() {
  8884. if (!this.now) {
  8885. this.now = new Date().getTime();
  8886. return true;
  8887. } else {
  8888. let time = new Date().getTime();
  8889. if (time - this.now > 1000) {
  8890. this.now = time;
  8891. return true;
  8892. } else {
  8893. return false;
  8894. }
  8895. }
  8896. },
  8897. deleteUnit(i) {
  8898. var _this = this;
  8899. if (i == 0 && _this.unitJson.length == 1) {
  8900. _this
  8901. .$confirm("确定切换成任务模式吗?", "提示", {
  8902. confirmButtonText: "确定",
  8903. cancelButtonText: "取消",
  8904. type: "warning",
  8905. })
  8906. .then(() => {
  8907. _this.unitJson[i].dyName = "";
  8908. // _this.updateCourseState(2);
  8909. })
  8910. .catch(() => {
  8911. return;
  8912. });
  8913. } else {
  8914. _this
  8915. .$confirm("确定删除此阶段吗?", "提示", {
  8916. confirmButtonText: "确定",
  8917. cancelButtonText: "取消",
  8918. type: "warning",
  8919. })
  8920. .then(() => {
  8921. _this.isDelete = 2;
  8922. // _this.unitIndex = _this.unitIndex - 1;
  8923. _this.deleteWork(_this.unitJson[i].chapterInfo[0].chapterid);
  8924. // _this.$message.success("删除成功");
  8925. })
  8926. .catch(() => {
  8927. return;
  8928. });
  8929. }
  8930. },
  8931. deleteWork(chapid) {
  8932. let params = [
  8933. {
  8934. cid: this.cid,
  8935. chapters: JSON.stringify(this.unitJson),
  8936. uid: this.userid,
  8937. chapid: chapid,
  8938. },
  8939. ];
  8940. this.ajax
  8941. .post(this.$store.state.api + "deleteWork", params)
  8942. .then((res) => {
  8943. this.$message({
  8944. message: "删除成功",
  8945. type: "success",
  8946. });
  8947. let task = JSON.parse(
  8948. JSON.stringify(
  8949. this.unitJson[this.unitIndex].chapterInfo[0].taskJson
  8950. )
  8951. );
  8952. this.unitJson.splice(this.unitIndex, 1);
  8953. if (this.unitIndex == 0) {
  8954. this.unitIndex = 0;
  8955. } else {
  8956. this.unitIndex = this.unitIndex - 1;
  8957. }
  8958. if (JSON.stringify(task) != JSON.stringify(this.taskJSONa)) {
  8959. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = [
  8960. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson,
  8961. ...task,
  8962. ];
  8963. }
  8964. })
  8965. .catch((err) => {
  8966. this.$message.error("网络不佳");
  8967. console.error(err);
  8968. });
  8969. },
  8970. deleteTool(itemTaskIndex, i) {
  8971. var _this = this;
  8972. if (_this.time()) {
  8973. _this
  8974. .$confirm("确定删除此工具吗?", "提示", {
  8975. confirmButtonText: "确定",
  8976. cancelButtonText: "取消",
  8977. type: "warning",
  8978. })
  8979. .then(() => {
  8980. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  8981. itemTaskIndex
  8982. ].toolChoose.splice(i, 1);
  8983. _this.$message.success("删除成功");
  8984. })
  8985. .catch(() => {
  8986. return;
  8987. });
  8988. }
  8989. },
  8990. deleteSentence(i) {
  8991. var _this = this;
  8992. _this
  8993. .$confirm("确定删除此题目吗?", "提示", {
  8994. confirmButtonText: "确定",
  8995. cancelButtonText: "取消",
  8996. type: "warning",
  8997. })
  8998. .then(() => {
  8999. _this.sentenceList.splice(i, 1);
  9000. _this.$message.success("删除成功");
  9001. })
  9002. .catch(() => {
  9003. return;
  9004. });
  9005. },
  9006. deleteS(s, i, j) {
  9007. this.sentenceList[i].addSentence.splice(j, 1);
  9008. if (this.sentenceList[i].rightAnswer.indexOf(s) != -1) {
  9009. var a = this.sentenceList[i].rightAnswer.indexOf(s);
  9010. this.sentenceList[i].rightAnswer.splice(a, 1);
  9011. }
  9012. },
  9013. openT() {
  9014. top.postMessage({ tools: "25" }, "*");
  9015. },
  9016. deleteTask(i) {
  9017. var _this = this;
  9018. if (_this.time()) {
  9019. _this
  9020. .$confirm(
  9021. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.length -
  9022. 1 ==
  9023. i
  9024. ? "确定删除此任务吗?"
  9025. : "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  9026. "提示",
  9027. {
  9028. confirmButtonText: "确定",
  9029. cancelButtonText: "取消",
  9030. type: "warning",
  9031. }
  9032. )
  9033. .then(() => {
  9034. if (i == 0 && _this.courseState == 4) {
  9035. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9036. i + 1
  9037. ].chapterData = JSON.parse(
  9038. JSON.stringify(
  9039. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9040. .chapterData
  9041. )
  9042. );
  9043. }
  9044. _this.$forceUpdate();
  9045. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9046. i,
  9047. 1
  9048. );
  9049. _this.$message.success("删除成功");
  9050. })
  9051. .catch(() => {
  9052. return;
  9053. });
  9054. }
  9055. },
  9056. deleteTask2(i) {
  9057. var _this = this;
  9058. if (_this.time()) {
  9059. _this
  9060. .$confirm(
  9061. "确定删除此任务吗?",
  9062. "提示",
  9063. {
  9064. confirmButtonText: "确定",
  9065. cancelButtonText: "取消",
  9066. type: "warning",
  9067. }
  9068. )
  9069. .then(() => {
  9070. if (i == 0 && _this.courseState == 4) {
  9071. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  9072. i + 1
  9073. ].chapterData = JSON.parse(
  9074. JSON.stringify(
  9075. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[i]
  9076. .chapterData
  9077. )
  9078. );
  9079. }
  9080. _this.$forceUpdate();
  9081. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson.splice(
  9082. i,
  9083. 1
  9084. );
  9085. _this.$message.success("删除成功");
  9086. })
  9087. .catch(() => {
  9088. return;
  9089. });
  9090. }
  9091. },
  9092. handlePictureCardPreview(file) {
  9093. this.dialogImageUrl = file.url;
  9094. },
  9095. clean(i, c) {
  9096. this.unitJson[this.unitIndex].chapterInfo[i].fileList1.splice(c, 1);
  9097. },
  9098. handle_remove1(file, fileList, type) {
  9099. var _tmp = this.cover;
  9100. // for (var i = 0, len = _tmp.length; i < len; i++) {
  9101. // if (_tmp[i].uid == file.uid) {
  9102. // _tmp.splice(i, 1);
  9103. // break;
  9104. // }
  9105. // this.cover = _tmp;
  9106. // }
  9107. this.cover = [];
  9108. this.noneBtnImg = this.cover.length >= 1;
  9109. this.isSysPic = false;
  9110. this.isSysPic2 = false;
  9111. this.$forceUpdate();
  9112. },
  9113. addImg(e) {
  9114. var el = e.currentTarget;
  9115. el.getElementsByTagName("input")[0].click();
  9116. e.target.value = "";
  9117. },
  9118. addChaptersTools(i) {
  9119. this.chapTools = [
  9120. {
  9121. tools: [],
  9122. toolDetail: "",
  9123. },
  9124. ];
  9125. this.chapCount = i;
  9126. this.dialogVisible4 = true;
  9127. },
  9128. isNoFinsh() {
  9129. this.$message.warning("功能正在开发中");
  9130. },
  9131. addAttText(i) {
  9132. this.AttText = {
  9133. title: "",
  9134. text: "",
  9135. };
  9136. this.taskCount = i;
  9137. this.AttTextType = 0;
  9138. this.$forceUpdate();
  9139. this.dialogVisible6 = true;
  9140. setTimeout(() => {
  9141. this.$refs["fuInput"].focus();
  9142. }, 100);
  9143. },
  9144. openLine(i) {
  9145. this.line = "";
  9146. this.lineCount = i;
  9147. this.lineType = 0;
  9148. this.$forceUpdate();
  9149. this.dialogVisible7 = true;
  9150. },
  9151. pasteLine(i) {
  9152. navigator.clipboard
  9153. .readText()
  9154. .then((v) => {
  9155. console.log("获取剪贴板成功:", v);
  9156. const html = v;
  9157. const regex = /src="(.*?)"/g;
  9158. const match = regex.exec(html);
  9159. if (match && match[1]) {
  9160. console.log(match[1]);
  9161. this.$message.success("粘贴成功");
  9162. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9163. i
  9164. ].chapterData.unshift({
  9165. name: "链接",
  9166. title: "嵌入代码",
  9167. url: match[1],
  9168. type: 8,
  9169. });
  9170. } else {
  9171. // console.log("未找到包含 src 属性的 iframe");
  9172. this.$message.error(
  9173. "系统没有找到粘贴对象,请首先复制可用于粘贴的链接。"
  9174. );
  9175. }
  9176. })
  9177. .catch((v) => {
  9178. console.log("获取剪贴板失败: ", v);
  9179. });
  9180. },
  9181. openSource(i) {
  9182. this.lineCount = i;
  9183. this.sourceData = {};
  9184. this.dialogVisibleSource = true;
  9185. this.updateSourcePan = false;
  9186. },
  9187. openAiCreate(i){
  9188. this.lineCount = i;
  9189. this.dialogVisibleAiCreate = true;
  9190. },
  9191. createAiPpt(json){
  9192. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9193. this.dialogVisibleAiCreate = false;
  9194. },
  9195. openAiCreateVideo(i){
  9196. this.lineCount = i;
  9197. this.dialogVisibleAiCreateVideo = true;
  9198. },
  9199. createAiVideo(json){
  9200. this.unitJson[0].chapterInfo[0].taskJson[this.lineCount].chapterData.unshift(json);
  9201. // this.dialogVisibleAiCreateVideo = false;
  9202. },
  9203. async createTeacherAn(index){
  9204. // this.lineCount = index;
  9205. this.loading = true
  9206. let md = new MarkdownIt();
  9207. if(this.courseState == 4){
  9208. // if(index == 0 || index){
  9209. // let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9210. // let name = _task.task+'-教案'
  9211. // let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9212. // await this.generate(name, _html, 0)
  9213. // }else {
  9214. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9215. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9216. let name = _task.task+'-教案'
  9217. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9218. await this.generate(name, _html, 0)
  9219. }
  9220. // }
  9221. }else if(this.courseState == 5){
  9222. if(index == 0 || index){
  9223. let _task = this.unitJson[0].chapterInfo[0].taskJson[index]
  9224. let name = _task.task+'-教案'
  9225. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9226. await this.generate(name, _html, index)
  9227. }else {
  9228. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  9229. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  9230. let name = _task.task+'-教案'
  9231. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  9232. await this.generate(name, _html, i)
  9233. }
  9234. }
  9235. }
  9236. },
  9237. async createTaskAn(index){
  9238. // this.lineCount = index;
  9239. if(this.taskAnLoading[index]){
  9240. // this.$message.error('请等待当前学历案生成完成')
  9241. this.cancelAjax('taskAn', index)
  9242. return
  9243. }
  9244. this.taskAnLoading[index] = true
  9245. this.$forceUpdate()
  9246. let _this = this
  9247. let md = new MarkdownIt();
  9248. let messages = ""
  9249. messages = `NOTICE
  9250. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  9251. Language: ${this.getLang()}
  9252. 根据任务的教案<任务教案>,生成学生工作单(student worksheet),工作单里面包含 分解的子任务,子任务描述,并给出学生回答的框。输出语气亲切。格式为Markdown。
  9253. ## 任务教案
  9254. ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  9255. _this.taskAnCancelToken[index] = _this.ajax.setCancelSource();
  9256. let parm = {
  9257. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  9258. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  9259. session_name: uuidv4(),
  9260. userId: this.userid,
  9261. file_ids: [],
  9262. model: 'gpt-4o-2024-08-06',
  9263. temperature: this.mode == 3 ? 0.5 : 0.1,
  9264. }
  9265. this.ajax
  9266. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskAnCancelToken[index])
  9267. .then(async (response) => {
  9268. console.log(response);
  9269. let data = response.data.FunctionResponse
  9270. if (data.message) {
  9271. console.log(data.message);
  9272. let _task = _this.unitJson[0].chapterInfo[0].taskJson[index]
  9273. let name = _task.task+'-学历案'
  9274. let _html = md.render(data.message)
  9275. await _this.generate(name, _html, index, ()=>{
  9276. _this.taskAnLoading[index] = false
  9277. _this.taskAnCancelToken[index] = null
  9278. })
  9279. }else{
  9280. _this.taskAnLoading[index] = false
  9281. _this.taskAnCancelToken[index] = null
  9282. }
  9283. }).catch((error) => {
  9284. console.log(error);
  9285. _this.taskAnLoading[index] = false
  9286. _this.taskAnCancelToken[index] = null
  9287. });
  9288. },
  9289. async generate(a, html, index, callback) {
  9290. // <html lang="en">
  9291. // 将html文件中需要用到的数据挂载到store上
  9292. const content = `<!DOCTYPE html>
  9293. <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'>
  9294. <head>
  9295. <!--[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]-->
  9296. <meta charset="UTF-8">
  9297. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9298. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9299. <title>${a}</title>
  9300. <style>
  9301. table {
  9302. border-collapse: collapse; /* 折叠边框 */
  9303. width: 100%;
  9304. }
  9305. th, td {
  9306. border: 1px solid black; /* 线条样式 */
  9307. padding: 8px;
  9308. text-align: left;
  9309. }
  9310. </style>
  9311. </head>
  9312. <body>
  9313. ${html}
  9314. </body>
  9315. </html>`;
  9316. // debugger
  9317. const blob = htmlDocx.asBlob(content)
  9318. // debugger
  9319. let dname = a + ".docx";
  9320. // 创建文件流
  9321. // 创建bolb实例时,内容一定要放在[]中
  9322. // const blob = new Blob([content], {
  9323. // type: "text/plain;charset='utf-8'",
  9324. // });
  9325. // const file = new File([blob], dname, { type: 'application/msword' });
  9326. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9327. await this.beforeUploadHtml(file, index, callback)
  9328. },
  9329. async generateExport(a, html, index) {
  9330. // <html lang="en">
  9331. // 将html文件中需要用到的数据挂载到store上
  9332. const content = `<!DOCTYPE html>
  9333. <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'>
  9334. <head>
  9335. <!--[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]-->
  9336. <meta charset="UTF-8">
  9337. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9338. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9339. <title>${a}</title>
  9340. <style>
  9341. table {
  9342. border-collapse: collapse; /* 折叠边框 */
  9343. width: 100%;
  9344. }
  9345. th, td {
  9346. border: 1px solid black; /* 线条样式 */
  9347. padding: 8px;
  9348. text-align: left;
  9349. }
  9350. </style>
  9351. </head>
  9352. <body>
  9353. ${html}
  9354. </body>
  9355. </html>`;
  9356. // debugger
  9357. const blob = htmlDocx.asBlob(content)
  9358. // debugger
  9359. const dname = `${a}.docx`;
  9360. // 创建文件流
  9361. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9362. return file
  9363. },
  9364. async generateExport2(a, html, index) {
  9365. return new Promise((resolve) => {
  9366. // <html lang="en">
  9367. // 将html文件中需要用到的数据挂载到store上
  9368. const content = `<!DOCTYPE html>
  9369. <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'>
  9370. <head>
  9371. <!--[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]-->
  9372. <meta charset="UTF-8">
  9373. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9374. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9375. <title>${a}</title>
  9376. <style>
  9377. table {
  9378. border-collapse: collapse; /* 折叠边框 */
  9379. width: 100%;
  9380. }
  9381. th, td {
  9382. border: 1px solid black; /* 线条样式 */
  9383. padding: 8px;
  9384. text-align: left;
  9385. }
  9386. </style>
  9387. </head>
  9388. <body>
  9389. ${html}
  9390. </body>
  9391. </html>`;
  9392. // debugger
  9393. const blob = htmlDocx.asBlob(content)
  9394. // debugger
  9395. const dname = `${a}`;
  9396. // 创建文件流
  9397. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9398. resolve(file); // 通过 Promise 返回 File 对象
  9399. });
  9400. },
  9401. beforeUploadHtml(event, index, callback) {
  9402. var file = event;
  9403. var credentials = {
  9404. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9405. secretAccessKey: "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",
  9406. }; //秘钥形式的登录上传
  9407. window.AWS.config.update(credentials);
  9408. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9409. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9410. var _this = this;
  9411. if (file) {
  9412. var params = {
  9413. Key:
  9414. file.name.split(".")[0] +
  9415. new Date().getTime() +
  9416. "." +
  9417. file.name.split(".")[file.name.split(".").length - 1],
  9418. ContentType: file.type,
  9419. Body: file,
  9420. "Access-Control-Allow-Credentials": "*",
  9421. ACL: "public-read",
  9422. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9423. var options = {
  9424. partSize: 2048 * 1024 * 1024,
  9425. queueSize: 2,
  9426. leavePartsOnError: true,
  9427. };
  9428. bucket
  9429. .upload(params, options)
  9430. .on("httpUploadProgress", function (evt) {
  9431. //这里可以写进度条
  9432. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9433. })
  9434. .send(function (err, data) {
  9435. if(index == (_this.unitJson[0].chapterInfo[0].taskJson.length - 1) && _this.courseState == 4){
  9436. _this.loading = false
  9437. }
  9438. if(_this.courseState == 5){
  9439. _this.loading = false
  9440. }
  9441. callback ? callback() : ''
  9442. if (err) {
  9443. _this.$message.error("上传失败");
  9444. } else {
  9445. let _index = 0
  9446. // if(_this.lineCount == 0 || _this.lineCount){
  9447. // _index = _this.lineCount
  9448. // }else {
  9449. _index = index
  9450. // }
  9451. _this.unitJson[0].chapterInfo[0].taskJson[_index].chapterData.unshift({
  9452.                   name: file.name,
  9453.                   url: data.Location,
  9454.                   type: 3,
  9455.                 })
  9456. console.log(data.Location);
  9457. }
  9458. });
  9459. }
  9460. },
  9461. async generate2(a, html, index, callback) {
  9462. // 将html文件中需要用到的数据挂载到store上
  9463. const content = `<!DOCTYPE html>
  9464. <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'>
  9465. <head>
  9466. <!--[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]-->
  9467. <meta charset="UTF-8">
  9468. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9469. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9470. <title>${a}</title>
  9471. <style>
  9472. table {
  9473. border-collapse: collapse; /* 折叠边框 */
  9474. width: 100%;
  9475. }
  9476. th, td {
  9477. border: 1px solid black; /* 线条样式 */
  9478. padding: 8px;
  9479. text-align: left;
  9480. }
  9481. </style>
  9482. </head>
  9483. <body>
  9484. ${html}
  9485. </body>
  9486. </html>`;
  9487. const blob = htmlDocx.asBlob(content)
  9488. // debugger
  9489. let dname = a + ".docx";
  9490. // 创建文件流
  9491. // 创建bolb实例时,内容一定要放在[]中
  9492. // const blob = new Blob([content], {
  9493. // type: "text/plain;charset='utf-8'",
  9494. // });
  9495. // const file = new File([blob], dname, { type: 'application/msword' });
  9496. const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
  9497. await this.beforeUploadHtml2(file, index, callback)
  9498. },
  9499. beforeUploadHtml2(event, index, callback) {
  9500. var file = event;
  9501. var credentials = {
  9502. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9503. secretAccessKey: "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",
  9504. }; //秘钥形式的登录上传
  9505. window.AWS.config.update(credentials);
  9506. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9507. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9508. var _this = this;
  9509. if (file) {
  9510. var params = {
  9511. Key:
  9512. file.name.split(".")[0] +
  9513. new Date().getTime() +
  9514. "." +
  9515. file.name.split(".")[file.name.split(".").length - 1],
  9516. ContentType: file.type,
  9517. Body: file,
  9518. "Access-Control-Allow-Credentials": "*",
  9519. ACL: "public-read",
  9520. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9521. var options = {
  9522. partSize: 2048 * 1024 * 1024,
  9523. queueSize: 2,
  9524. leavePartsOnError: true,
  9525. };
  9526. bucket
  9527. .upload(params, options)
  9528. .on("httpUploadProgress", function (evt) {
  9529. //这里可以写进度条
  9530. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9531. })
  9532. .send(async function (err, data) {
  9533. if(_this.courseState == 5){
  9534. _this.loading = false
  9535. }
  9536. if (err) {
  9537. callback ? callback() : ''
  9538. _this.$message.error("上传失败");
  9539. } else {
  9540. let fileid = await _this.createFileid(data.Location)
  9541. // _this.cankaoInfoData.push({
  9542. //                   name: file.name,
  9543. //                   url: data.Location,
  9544. //                   type: 3,
  9545. // fileid: fileid,
  9546. //   })
  9547. _this.infoData2.push({
  9548.                   name: file.name,
  9549.                   url: data.Location,
  9550.                   type: 3,
  9551. fileid: fileid == 1 ? '' : fileid,
  9552.   })
  9553. _this.infoData.push({
  9554. name: file.name,
  9555. url: data.Location,
  9556. type: 3,
  9557. fileid: fileid == 1 ? '' : fileid,
  9558. });
  9559. console.log(data.Location);
  9560. callback ? callback() : ''
  9561. }
  9562. });
  9563. }
  9564. },
  9565. addSource() {
  9566. if (!Object.keys(this.sourceData).length) {
  9567. this.$message.error("请选择要上传的资源");
  9568. return;
  9569. }
  9570. let keys = Object.keys(this.sourceData);
  9571. for (var i = 0; i < keys.length; i++) {
  9572. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9573. this.lineCount
  9574. ].chapterData.unshift({
  9575. name: "链接",
  9576. title: this.sourceData[keys[i]].name,
  9577. url: this.sourceData[keys[i]].url,
  9578. type: 14,
  9579. id: keys[i],
  9580. });
  9581. }
  9582. this.$forceUpdate();
  9583. this.dialogVisibleSource = false;
  9584. },
  9585. updateSource() {
  9586. if (!Object.keys(this.sourceData).length) {
  9587. this.$message.error("请选择要上传的资源");
  9588. return;
  9589. }
  9590. let keys = Object.keys(this.sourceData);
  9591. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9592. this.taskCount
  9593. ].chapterData[this.lineCount].url = this.sourceData[keys[0]].url;
  9594. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9595. this.taskCount
  9596. ].chapterData[this.lineCount].title = this.sourceData[keys[0]].name;
  9597. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  9598. this.taskCount
  9599. ].chapterData[this.lineCount].id = keys[0];
  9600. this.updateSourcePan = false;
  9601. this.$forceUpdate();
  9602. this.dialogVisibleSource = false;
  9603. },
  9604. deleteM(i, j) {
  9605. this.testJson.testJson[i].timuList.splice(j, 1);
  9606. },
  9607. beforeUploadTiMu(event, i) {
  9608. const loading = this.openLoading();
  9609. var file = event.target.files[0];
  9610. var credentials = {
  9611. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9612. secretAccessKey: "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",
  9613. }; //秘钥形式的登录上传
  9614. window.AWS.config.update(credentials);
  9615. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9616. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9617. var _this = this;
  9618. if (file) {
  9619. var params = {
  9620. Key:
  9621. file.name.split(".")[0] +
  9622. new Date().getTime() +
  9623. "." +
  9624. file.name.split(".")[file.name.split(".").length - 1],
  9625. ContentType: file.type,
  9626. Body: file,
  9627. "Access-Control-Allow-Credentials": "*",
  9628. ACL: "public-read",
  9629. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9630. var options = {
  9631. partSize: 2048 * 1024 * 1024,
  9632. queueSize: 2,
  9633. leavePartsOnError: true,
  9634. };
  9635. bucket
  9636. .upload(params, options)
  9637. .on("httpUploadProgress", function (evt) {
  9638. //这里可以写进度条
  9639. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9640. })
  9641. .send(function (err, data) {
  9642. loading.close();
  9643. if (err) {
  9644. _this.$message.error("上传失败");
  9645. } else {
  9646. if (_this.testJson.testJson[i].timuList) {
  9647. _this.testJson.testJson[i].timuList.push({
  9648. src: data.Location,
  9649. });
  9650. } else {
  9651. _this.testJson.testJson[i].timuList = [];
  9652. _this.testJson.testJson[i].timuList.push({
  9653. src: data.Location,
  9654. });
  9655. }
  9656. _this.imgChange3(i);
  9657. _this.$forceUpdate();
  9658. }
  9659. });
  9660. }
  9661. },
  9662. beforeUploadTi(event, i, j) {
  9663. const loading = this.openLoading();
  9664. var file = event.target.files[0];
  9665. var credentials = {
  9666. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9667. secretAccessKey: "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",
  9668. }; //秘钥形式的登录上传
  9669. window.AWS.config.update(credentials);
  9670. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9671. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9672. var _this = this;
  9673. if (file) {
  9674. var params = {
  9675. Key:
  9676. file.name.split(".")[0] +
  9677. new Date().getTime() +
  9678. "." +
  9679. file.name.split(".")[file.name.split(".").length - 1],
  9680. ContentType: file.type,
  9681. Body: file,
  9682. "Access-Control-Allow-Credentials": "*",
  9683. ACL: "public-read",
  9684. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9685. var options = {
  9686. partSize: 2048 * 1024 * 1024,
  9687. queueSize: 2,
  9688. leavePartsOnError: true,
  9689. };
  9690. bucket
  9691. .upload(params, options)
  9692. .on("httpUploadProgress", function (evt) {
  9693. //这里可以写进度条
  9694. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9695. })
  9696. .send(function (err, data) {
  9697. loading.close();
  9698. if (err) {
  9699. _this.$message.error("上传失败");
  9700. } else {
  9701. _this.testJson.testJson[i].checkList[j] = {};
  9702. _this.testJson.testJson[i].checkList[j].src = data.Location;
  9703. _this.testJson.testJson[i].checkList[j].imgType = 1;
  9704. _this.imgChange2(i, j);
  9705. _this.$forceUpdate();
  9706. }
  9707. });
  9708. }
  9709. },
  9710. beforeUpload1(event, type) {
  9711. // const loading = this.openLoading();
  9712. var file = event.target.files[0];
  9713. var credentials = {
  9714. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9715. secretAccessKey: "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",
  9716. }; //秘钥形式的登录上传
  9717. window.AWS.config.update(credentials);
  9718. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9719. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9720. var _this = this;
  9721. if (file) {
  9722. var params = {
  9723. Key:
  9724. file.name.split(".")[0] +
  9725. new Date().getTime() +
  9726. "." +
  9727. file.name.split(".")[file.name.split(".").length - 1],
  9728. ContentType: file.type,
  9729. Body: file,
  9730. "Access-Control-Allow-Credentials": "*",
  9731. ACL: "public-read",
  9732. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9733. var options = {
  9734. partSize: 2048 * 1024 * 1024,
  9735. queueSize: 2,
  9736. leavePartsOnError: true,
  9737. };
  9738. bucket
  9739. .upload(params, options)
  9740. .on("httpUploadProgress", function (evt) {
  9741. //这里可以写进度条
  9742. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9743. })
  9744. .send(function (err, data) {
  9745. // loading.close();
  9746. if (err) {
  9747. // var a = _this.$refs.upload1.uploadFiles;
  9748. // a.splice(a.length - 1, a.length);
  9749. _this.$message.error("上传失败");
  9750. } else {
  9751. // _this.cover.push({
  9752. // name: file.name,
  9753. // url: data.Location,
  9754. // uid: file.uid,
  9755. // });
  9756. _this.cover = [
  9757. {
  9758. name: file.name,
  9759. url: data.Location,
  9760. uid: file.uid,
  9761. },
  9762. ];
  9763. _this.imgChange1(null, null, 1, null);
  9764. _this.choosePicVisible = false;
  9765. console.log(data.Location);
  9766. }
  9767. });
  9768. }
  9769. },
  9770. beforeUploadSelect(event, type) {
  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 (file) {
  9782. var params = {
  9783. Key:
  9784. file.name.split(".")[0] +
  9785. new Date().getTime() +
  9786. "." +
  9787. file.name.split(".")[file.name.split(".").length - 1],
  9788. ContentType: file.type,
  9789. Body: file,
  9790. "Access-Control-Allow-Credentials": "*",
  9791. ACL: "public-read",
  9792. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9793. var options = {
  9794. partSize: 2048 * 1024 * 1024,
  9795. queueSize: 2,
  9796. leavePartsOnError: true,
  9797. };
  9798. bucket
  9799. .upload(params, options)
  9800. .on("httpUploadProgress", function (evt) {
  9801. //这里可以写进度条
  9802. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9803. })
  9804. .send(function (err, data) {
  9805. // loading.close();
  9806. if (err) {
  9807. _this.$message.error("上传失败");
  9808. } else {
  9809. _this.selectJson.url = data.Location;
  9810. console.log(data.Location);
  9811. }
  9812. });
  9813. }
  9814. },
  9815. chooseSysPic(p) {
  9816. this.cover = [];
  9817. setTimeout(() => {
  9818. this.cover[0] = {
  9819. name: "系统图片.png",
  9820. url: p,
  9821. };
  9822. this.imgChange1(null, null, 1, null);
  9823. this.$forceUpdate();
  9824. }, 0);
  9825. this.isSysPic = true;
  9826. this.isSysPic2 = false;
  9827. this.sysPicVisible = false;
  9828. this.$forceUpdate();
  9829. },
  9830. chooseSysPic2(p) {
  9831. this.cover = [];
  9832. setTimeout(() => {
  9833. this.cover[0] = {
  9834. name: "网络图片.png",
  9835. url: p,
  9836. };
  9837. this.imgChange1(null, null, 1, null);
  9838. this.$forceUpdate();
  9839. }, 0);
  9840. this.isSysPic2 = true;
  9841. this.isSysPic = false;
  9842. this.sysPicVisible2 = false;
  9843. this.$forceUpdate();
  9844. },
  9845. beforeUpload(data) {
  9846. this.$refs.upload1.uploadFiles;
  9847. this.uploadLoading1 = true;
  9848. var file = data.file;
  9849. var credentials = {
  9850. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9851. secretAccessKey: "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",
  9852. }; //秘钥形式的登录上传
  9853. window.AWS.config.update(credentials);
  9854. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9855. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9856. var _this = this;
  9857. if (file) {
  9858. var params = {
  9859. Key:
  9860. file.name.split(".")[0] +
  9861. new Date().getTime() +
  9862. "." +
  9863. file.name.split(".")[file.name.split(".").length - 1],
  9864. ContentType: file.type,
  9865. Body: file,
  9866. "Access-Control-Allow-Credentials": "*",
  9867. ACL: "public-read",
  9868. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9869. var options = {
  9870. partSize: 2048 * 1024 * 1024,
  9871. queueSize: 2,
  9872. leavePartsOnError: true,
  9873. };
  9874. bucket
  9875. .upload(params, options)
  9876. .on("httpUploadProgress", function (evt) {
  9877. //这里可以写进度条
  9878. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  9879. })
  9880. .send(function (err, data) {
  9881. _this.uploadLoading1 = false;
  9882. if (err) {
  9883. // var a = _this.$refs.upload1.uploadFiles;
  9884. // a.splice(a.length - 1, a.length);
  9885. _this.$message.error("上传失败");
  9886. } else {
  9887. //上传成功处理
  9888. _this.unitJson[_this.unitIndex].chapterInfo[0].fileList1.push({
  9889. name: file.name,
  9890. url: data.Location,
  9891. uid: file.uid,
  9892. });
  9893. _this.imgChange();
  9894. console.log(data.Location);
  9895. }
  9896. });
  9897. }
  9898. },
  9899. onExceed() {
  9900. this.$message.error("课程封面仅支持上传一张,请删除后再进行上传");
  9901. },
  9902. beforeUpload2(event, unitIndex, type, itemTaskIndex) {
  9903. let file = "";
  9904. let cfindex2 = 0;
  9905. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  9906. // var file = event.target.files[0];
  9907. file = event.target.files[cfindex];
  9908. let fileName = file.name
  9909. let fileUid = file.uid
  9910. // const loading = this.openLoading();
  9911. // var file = event.target.files[0];
  9912. var credentials = {
  9913. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  9914. secretAccessKey: "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",
  9915. }; //秘钥形式的登录上传
  9916. window.AWS.config.update(credentials);
  9917. window.AWS.config.region = "cn-northwest-1"; //设置区域
  9918. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  9919. var _this = this;
  9920. if (type == 3) {
  9921. var b = [
  9922. "DOC",
  9923. "DOCX",
  9924. "DOCM",
  9925. "DOTM",
  9926. "DOTX",
  9927. "PPTX",
  9928. "PPSX",
  9929. "PPT",
  9930. "PPS",
  9931. "PPTM",
  9932. "POTM",
  9933. "PPAM",
  9934. "POTX",
  9935. "PPSM",
  9936. ];
  9937. if (
  9938. b.indexOf(
  9939. file.name
  9940. .split(".")
  9941. [file.name.split(".").length - 1].toLocaleUpperCase()
  9942. ) != -1
  9943. ) {
  9944. if (file.size / 1024 / 1024 > 80) {
  9945. this.$message.error("上传文件大于80兆,请重新选择文件!");
  9946. this.inputShow = true;
  9947. // var a = _this.$refs.upload1.uploadFiles;
  9948. // a.splice(a.length - 1, a.length);
  9949. // loading.close();
  9950. return;
  9951. }
  9952. } else if (
  9953. file.name
  9954. .split(".")
  9955. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  9956. ) {
  9957. if (file.size / 1024 / 1024 > 80) {
  9958. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  9959. this.inputShow = true;
  9960. // var a = _this.$refs.upload1.uploadFiles;
  9961. // a.splice(a.length - 1, a.length);
  9962. // loading.close();
  9963. return;
  9964. }
  9965. }
  9966. }
  9967. this.inputShow = false;
  9968. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9969. // itemTaskIndex
  9970. // ].progress = 0;
  9971. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9972. itemTaskIndex
  9973. ].proVisible = true;
  9974. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9975. itemTaskIndex
  9976. ].isFinishSize = 0;
  9977. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9978. itemTaskIndex
  9979. ].isAllSize = event.target.files.length;
  9980. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  9981. // itemTaskIndex
  9982. // ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  9983. _this.$forceUpdate();
  9984. if (file) {
  9985. var params = {
  9986. Key:
  9987. file.name.split(".")[0] +
  9988. new Date().getTime() +
  9989. "." +
  9990. file.name.split(".")[file.name.split(".").length - 1],
  9991. ContentType: file.type,
  9992. Body: file,
  9993. "Access-Control-Allow-Credentials": "*",
  9994. ACL: "public-read",
  9995. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  9996. var options = {
  9997. partSize: 2048 * 1024 * 1024,
  9998. queueSize: 2,
  9999. leavePartsOnError: true,
  10000. };
  10001. bucket
  10002. .upload(params, options)
  10003. .on("httpUploadProgress", function (evt) {
  10004. //这里可以写进度条
  10005. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10006. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10007. // itemTaskIndex
  10008. // ].progress = parseInt((evt.loaded / evt.total) * 100);
  10009. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10010. // itemTaskIndex
  10011. // ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10012. // _this.$forceUpdate();
  10013. })
  10014. .send(function (err, data) {
  10015. cfindex2++
  10016. // loading.close();
  10017. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10018. // itemTaskIndex
  10019. // ].progress = 100;
  10020. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10021. itemTaskIndex
  10022. ].isFinishSize = cfindex2
  10023. // _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10024. // itemTaskIndex
  10025. // ].isAllSize;
  10026. _this.$forceUpdate();
  10027. setTimeout(() => {
  10028. if (
  10029. cfindex2 == event.target.files.length ||
  10030. cfindex2 > event.target.files.length
  10031. ) {
  10032. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10033. itemTaskIndex
  10034. ].proVisible = false;
  10035. }
  10036. _this.$forceUpdate();
  10037. }, 1000);
  10038. _this.inputShow = true;
  10039. if (err) {
  10040. // var a = _this.$refs.upload1.uploadFiles;
  10041. // a.splice(a.length - 1, a.length);
  10042. _this.$message.error("上传失败");
  10043. } else {
  10044. if (type == 13) {
  10045. let _type = 2;
  10046. var imgA = [
  10047. "png",
  10048. "jpg",
  10049. "jpeg",
  10050. "bmp",
  10051. "gif",
  10052. "webp",
  10053. "psd",
  10054. "svg",
  10055. "tiff",
  10056. ];
  10057. var fileA = [
  10058. "PDF",
  10059. "DOC",
  10060. "DOCX",
  10061. "DOCM",
  10062. "DOTM",
  10063. "DOTX",
  10064. "PPTX",
  10065. "PPSX",
  10066. "PPT",
  10067. "PPS",
  10068. "PPTM",
  10069. "POTM",
  10070. "PPAM",
  10071. "POTX",
  10072. "PPSM",
  10073. "XLSX",
  10074. "XLS",
  10075. ];
  10076. var videoA = [
  10077. "AVI",
  10078. "NAVI",
  10079. "MPEG",
  10080. "ASF",
  10081. "MOV",
  10082. "WMV",
  10083. "3GP",
  10084. "RM",
  10085. "RMVB",
  10086. "FLV",
  10087. "F4V",
  10088. "H.264",
  10089. "H.265",
  10090. "REAL VIDEO",
  10091. "MKV",
  10092. "WebM",
  10093. "HDDVD",
  10094. "MP4",
  10095. "MPG",
  10096. "M4V",
  10097. "MGV",
  10098. "OGV",
  10099. "QTM",
  10100. "STR",
  10101. "AMC",
  10102. "DVX",
  10103. "EVO",
  10104. "DAT",
  10105. "OGG",
  10106. "OGM",
  10107. ];
  10108. if (
  10109. fileA.indexOf(
  10110. data.Location.split(".")[
  10111. data.Location.split(".").length - 1
  10112. ].toLocaleUpperCase()
  10113. ) != -1
  10114. ) {
  10115. _type = 3;
  10116. } else if (
  10117. videoA.indexOf(
  10118. data.Location.split(".")[
  10119. data.Location.split(".").length - 1
  10120. ].toLocaleUpperCase()
  10121. ) != -1
  10122. ) {
  10123. _type = 2;
  10124. } else if (
  10125. imgA.indexOf(
  10126. data.Location.split(".")[
  10127. data.Location.split(".").length - 1
  10128. ].toLocaleLowerCase()
  10129. ) != -1
  10130. ) {
  10131. _type = 13;
  10132. } else {
  10133. _type = 12;
  10134. }
  10135. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10136. itemTaskIndex
  10137. ].chapterData.unshift({
  10138. name: fileName,
  10139. url: data.Location,
  10140. uid: fileUid,
  10141. type: _type,
  10142. });
  10143. _this.imgChange1(null, null, _type, itemTaskIndex);
  10144. } else if (type == 2 || type == 3 || type == 12) {
  10145. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10146. itemTaskIndex
  10147. ].chapterData.unshift({
  10148. name: fileName,
  10149. url: data.Location,
  10150. uid: fileUid,
  10151. type: type,
  10152. });
  10153. _this.imgChange1(null, null, type, itemTaskIndex);
  10154. } else if (type == 4) {
  10155. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10156. itemTaskIndex
  10157. ].fileList1.push({
  10158. name: fileName,
  10159. url: data.Location,
  10160. uid: fileUid,
  10161. });
  10162. _this.imgChange1(null, null, type, itemTaskIndex);
  10163. } else if (type == 5) {
  10164. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10165. itemTaskIndex
  10166. ].homeworkList.push({
  10167. name: fileName,
  10168. url: data.Location,
  10169. uid: fileUid,
  10170. });
  10171. _this.imgChange1(null, null, type, itemTaskIndex);
  10172. }
  10173. console.log(data.Location);
  10174. }
  10175. });
  10176. }
  10177. }
  10178. },
  10179. beforeUploadInfo2(event, type, tindex) {
  10180. // const loading = this.openLoading();
  10181. let file = "";
  10182. let cfindex2 = 0;
  10183. for (var cfindex = 0; cfindex < event.target.files.length; cfindex++) {
  10184. // var file = event.target.files[0];
  10185. file = event.target.files[cfindex];
  10186. let fileName = file.name
  10187. let fileUid = file.uid
  10188. var credentials = {
  10189. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10190. secretAccessKey: "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",
  10191. }; //秘钥形式的登录上传
  10192. window.AWS.config.update(credentials);
  10193. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10194. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10195. var _this = this;
  10196. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  10197. if (
  10198. ['DOC'].indexOf(
  10199. file.name
  10200. .split(".")
  10201. [file.name.split(".").length - 1].toLocaleUpperCase()
  10202. ) !== -1
  10203. ) {
  10204. this.$message.error("抱歉,小可暂时不支持.doc的文件呢");
  10205. this.inputShow = true;
  10206. return;
  10207. }
  10208. if (
  10209. xianObj.indexOf(
  10210. file.name
  10211. .split(".")
  10212. [file.name.split(".").length - 1].toLocaleUpperCase()
  10213. ) == -1
  10214. ) {
  10215. this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt,.pdf文件!");
  10216. this.inputShow = true;
  10217. // var a = _this.$refs.upload1.uploadFiles;
  10218. // a.splice(a.length - 1, a.length);
  10219. // loading.close();
  10220. return;
  10221. }
  10222. if (type == 3) {
  10223. var b = [
  10224. "DOC",
  10225. "DOCX",
  10226. "DOCM",
  10227. "DOTM",
  10228. "DOTX",
  10229. "PPTX",
  10230. "PPSX",
  10231. "PPT",
  10232. "PPS",
  10233. "PPTM",
  10234. "POTM",
  10235. "PPAM",
  10236. "POTX",
  10237. "PPSM",
  10238. ];
  10239. if (
  10240. b.indexOf(
  10241. file.name
  10242. .split(".")
  10243. [file.name.split(".").length - 1].toLocaleUpperCase()
  10244. ) != -1
  10245. ) {
  10246. if (file.size / 1024 / 1024 > 80) {
  10247. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10248. this.inputShow = true;
  10249. // var a = _this.$refs.upload1.uploadFiles;
  10250. // a.splice(a.length - 1, a.length);
  10251. // loading.close();
  10252. return;
  10253. }
  10254. } else if (
  10255. file.name
  10256. .split(".")
  10257. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10258. ) {
  10259. if (file.size / 1024 / 1024 > 80) {
  10260. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10261. this.inputShow = true;
  10262. // var a = _this.$refs.upload1.uploadFiles;
  10263. // a.splice(a.length - 1, a.length);
  10264. // loading.close();
  10265. return;
  10266. }
  10267. }
  10268. }
  10269. this.inputShow = false;
  10270. if(type == 14){
  10271. // _this.teacherinfoprogress = 0;
  10272. _this.teacherinfoproVisible = true;
  10273. _this.teacherinfoisFinishSize = 0;
  10274. _this.teacherinfoisAllSize = event.target.files.length;
  10275. _this.addCourseBehavior('courseBehavior', '点击已有教案-上传已有教案按钮')
  10276. // _this.teacherinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10277. }else if(type == 16){
  10278. _this.mubiaoinfoprogress = 0;
  10279. _this.mubiaoinfoproVisible = true;
  10280. _this.mubiaoinfoisFinishSize = 0;
  10281. _this.mubiaoinfoisAllSize = event.target.files.length;
  10282. _this.addCourseBehavior('courseBehavior', '点击课程目标-上传补充资料按钮')
  10283. // _this.mubiaoinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10284. }else if(type == 17){
  10285. _this.xuanzeinfoprogress = 0;
  10286. _this.xuanzeinfoproVisible = true;
  10287. _this.xuanzeinfoisFinishSize = 0;
  10288. _this.xuanzeinfoisAllSize = event.target.files.length;
  10289. // _this.xuanzeinfoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10290. }else if(type == 18){
  10291. _this.pingjiainfoprogress[tindex] = 0;
  10292. _this.pingjiainfoproVisible[tindex] = true;
  10293. _this.pingjiainfoisFinishSize[tindex] = 0;
  10294. _this.pingjiainfoisAllSize[tindex] = event.target.files.length;
  10295. // _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
  10296. }else if(type == 19){
  10297. _this.knowinfoprogress = 0;
  10298. _this.knowinfoproVisible = true;
  10299. _this.knowinfoisFinishSize = 0;
  10300. _this.knowinfoisAllSize = event.target.files.length;
  10301. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  10302. }else if(type == 20){
  10303. _this.knowinfoprogress2 = 0;
  10304. _this.knowinfoproVisible2 = true;
  10305. _this.knowinfoisFinishSize2 = 0;
  10306. _this.knowinfoisAllSize2 = event.target.files.length;
  10307. _this.addCourseBehavior('courseBehavior', '点击参考标准-上传参考标准按钮')
  10308. }else{
  10309. _this.infoprogress = 0;
  10310. _this.infoproVisible = true;
  10311. _this.infoisFinishSize = 0;
  10312. _this.infoisAllSize = event.target.files.length;
  10313. // _this.infoisAllSize = (file.size / 1024 / 1024).toFixed(2);
  10314. }
  10315. _this.$forceUpdate();
  10316. if (file) {
  10317. var params = {
  10318. Key:
  10319. file.name.split(".")[0] +
  10320. new Date().getTime() +
  10321. "." +
  10322. file.name.split(".")[file.name.split(".").length - 1],
  10323. ContentType: file.type,
  10324. Body: file,
  10325. "Access-Control-Allow-Credentials": "*",
  10326. ACL: "public-read",
  10327. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10328. var options = {
  10329. partSize: 2048 * 1024 * 1024,
  10330. queueSize: 2,
  10331. leavePartsOnError: true,
  10332. };
  10333. bucket
  10334. .upload(params, options)
  10335. .on("httpUploadProgress", function (evt) {
  10336. //这里可以写进度条
  10337. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10338. // if(type == 14){
  10339. // _this.teacherinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10340. // _this.teacherinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10341. // }else if(type == 16){
  10342. // _this.mubiaoinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10343. // _this.mubiaoinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10344. // }else if(type == 17){
  10345. // _this.xuanzeinfoprogress = parseInt((evt.loaded / evt.total) * 100);
  10346. // _this.xuanzeinfoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10347. // }else if(type == 18){
  10348. // _this.pingjiainfoprogress[tindex] = parseInt((evt.loaded / evt.total) * 100);
  10349. // _this.pingjiainfoisFinishSize[tindex] = (evt.loaded / 1024 / 1024).toFixed(2);
  10350. // }else {
  10351. // _this.infoprogress = parseInt((evt.loaded / evt.total) * 100);
  10352. // _this.infoisFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10353. // }
  10354. _this.$forceUpdate();
  10355. })
  10356. .send(async function (err, data) {
  10357. // loading.close();
  10358. // if(type == 14){
  10359. // _this.teacherinfoprogress = 100;
  10360. // _this.teacherinfoisFinishSize = _this.teacherinfoisAllSize;
  10361. // }else if(type == 16){
  10362. // _this.mubiaoinfoprogress = 100;
  10363. // _this.mubiaoinfoisFinishSize = _this.mubiaoinfoisAllSize;
  10364. // }else if(type == 17){
  10365. // _this.xuanzeinfoprogress = 100;
  10366. // _this.xuanzeinfoisFinishSize = _this.xuanzeinfoisAllSize;
  10367. // }else if(type == 18){
  10368. // _this.pingjiainfoprogress[tindex] = 100;
  10369. // _this.pingjiainfoisFinishSize[tindex] = _this.pingjiainfoisAllSize[tindex];
  10370. // }else {
  10371. // _this.infoprogress = 100;
  10372. // _this.infoisFinishSize = _this.infoisAllSize;
  10373. // }
  10374. _this.$forceUpdate();
  10375. _this.inputShow = true;
  10376. if (err) {
  10377. cfindex2++;
  10378. if(type == 14){
  10379. _this.teacherinfoisFinishSize = cfindex2;
  10380. }else if(type == 16){
  10381. _this.mubiaoinfoisFinishSize = cfindex2;
  10382. }else if(type == 17){
  10383. _this.xuanzeinfoisFinishSize = cfindex2;
  10384. }else if(type == 18){
  10385. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10386. }else if(type == 19){
  10387. _this.knowinfoisFinishSize = cfindex2;
  10388. }else if(type == 20){
  10389. _this.knowinfoisFinishSize2 = cfindex2;
  10390. }else {
  10391. _this.infoisFinishSize = cfindex2;
  10392. }
  10393. setTimeout(() => {
  10394. if (
  10395. cfindex2 == event.target.files.length ||
  10396. cfindex2 > event.target.files.length
  10397. ) {
  10398. if(type == 14){
  10399. _this.teacherinfoproVisible = false;
  10400. }else if(type == 16){
  10401. _this.mubiaoinfoproVisible = false;
  10402. }else if(type == 17){
  10403. _this.xuanzeinfoproVisible = false;
  10404. }else if(type == 18){
  10405. _this.pingjiainfoproVisible[tindex] = false;
  10406. }else if(type == 19){
  10407. _this.knowinfoproVisible = false;
  10408. }else if(type == 20){
  10409. _this.knowinfoproVisible2 = false;
  10410. }else{
  10411. _this.infoproVisible = false;
  10412. }
  10413. }
  10414. _this.$forceUpdate();
  10415. }, 1000);
  10416. // var a = _this.$refs.upload1.uploadFiles;
  10417. // a.splice(a.length - 1, a.length);
  10418. _this.$message.error("上传失败");
  10419. } else {
  10420. let fileid = await _this.createFileid(data.Location)
  10421. if(fileid){
  10422. cfindex2++;
  10423. if(type == 14){
  10424. _this.teacherinfoisFinishSize = cfindex2;
  10425. }else if(type == 16){
  10426. _this.mubiaoinfoisFinishSize = cfindex2;
  10427. }else if(type == 17){
  10428. _this.xuanzeinfoisFinishSize = cfindex2;
  10429. }else if(type == 18){
  10430. _this.pingjiainfoisFinishSize[tindex] = cfindex2;
  10431. }else if(type == 19){
  10432. _this.knowinfoisFinishSize = cfindex2;
  10433. }else if(type == 20){
  10434. _this.knowinfoisFinishSize2 = cfindex2;
  10435. }else {
  10436. _this.infoisFinishSize = cfindex2;
  10437. }
  10438. if (
  10439. cfindex2 == event.target.files.length ||
  10440. cfindex2 > event.target.files.length
  10441. ) {
  10442. if(type == 14){
  10443. _this.teacherinfoproVisible = false;
  10444. }else if(type == 16){
  10445. _this.mubiaoinfoproVisible = false;
  10446. }else if(type == 17){
  10447. _this.xuanzeinfoproVisible = false;
  10448. }else if(type == 18){
  10449. _this.pingjiainfoproVisible[tindex] = false;
  10450. }else if(type == 19){
  10451. _this.knowinfoproVisible = false;
  10452. }else if(type == 20){
  10453. _this.knowinfoproVisible2 = false;
  10454. }else{
  10455. _this.infoproVisible = false;
  10456. }
  10457. }
  10458. _this.$forceUpdate();
  10459. }
  10460. if(fileid == 1){
  10461. _this.$message.error("此文件存在特殊符号无法转化成fileid请重新上传");
  10462. return;
  10463. }
  10464. var imgA = [
  10465. "png",
  10466. "jpg",
  10467. "jpeg",
  10468. "bmp",
  10469. "gif",
  10470. "webp",
  10471. "psd",
  10472. "svg",
  10473. "tiff",
  10474. ];
  10475. var fileA = [
  10476. "PDF",
  10477. "DOC",
  10478. "DOCX",
  10479. "DOCM",
  10480. "DOTM",
  10481. "DOTX",
  10482. "PPTX",
  10483. "PPSX",
  10484. "PPT",
  10485. "PPS",
  10486. "PPTM",
  10487. "POTM",
  10488. "PPAM",
  10489. "POTX",
  10490. "PPSM",
  10491. "XLSX",
  10492. "XLS",
  10493. ];
  10494. var videoA = [
  10495. "AVI",
  10496. "NAVI",
  10497. "MPEG",
  10498. "ASF",
  10499. "MOV",
  10500. "WMV",
  10501. "3GP",
  10502. "RM",
  10503. "RMVB",
  10504. "FLV",
  10505. "F4V",
  10506. "H.264",
  10507. "H.265",
  10508. "REAL VIDEO",
  10509. "MKV",
  10510. "WebM",
  10511. "HDDVD",
  10512. "MP4",
  10513. "MPG",
  10514. "M4V",
  10515. "MGV",
  10516. "OGV",
  10517. "QTM",
  10518. "STR",
  10519. "AMC",
  10520. "DVX",
  10521. "EVO",
  10522. "DAT",
  10523. "OGG",
  10524. "OGM",
  10525. ];
  10526. let _type = 2;
  10527. if (
  10528. fileA.indexOf(
  10529. data.Location.split(".")[
  10530. data.Location.split(".").length - 1
  10531. ].toLocaleUpperCase()
  10532. ) != -1
  10533. ) {
  10534. _type = 3;
  10535. } else if (
  10536. videoA.indexOf(
  10537. data.Location.split(".")[
  10538. data.Location.split(".").length - 1
  10539. ].toLocaleUpperCase()
  10540. ) != -1
  10541. ) {
  10542. _type = 2;
  10543. } else if (
  10544. imgA.indexOf(
  10545. data.Location.split(".")[
  10546. data.Location.split(".").length - 1
  10547. ].toLocaleLowerCase()
  10548. ) != -1
  10549. ) {
  10550. _type = 13;
  10551. } else {
  10552. _type = 12;
  10553. }
  10554. if (type == 13) {
  10555. _this.infoData.push({
  10556. name: fileName,
  10557. url: data.Location,
  10558. uid: fileUid,
  10559. type: _type,
  10560. fileid: fileid == 1 ? '' : fileid,
  10561. });
  10562. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10563. name: fileName,
  10564. url: data.Location,
  10565. uid: fileUid,
  10566. type: _type,
  10567. fileid: fileid == 1 ? '' : fileid,
  10568. })
  10569. }else if (type == 14) {
  10570. _this.teacherInfoData.push({
  10571. name: fileName,
  10572. url: data.Location,
  10573. uid: fileUid,
  10574. type: _type,
  10575. fileid: fileid == 1 ? '' : fileid,
  10576. });
  10577. _this.infoData2.push({
  10578. name: fileName,
  10579. url: data.Location,
  10580. uid: fileUid,
  10581. type: _type,
  10582. fileid: fileid == 1 ? '' : fileid,
  10583. });
  10584. _this.infoData.push({
  10585. name: fileName,
  10586. url: data.Location,
  10587. uid: fileUid,
  10588. type: _type,
  10589. fileid: fileid == 1 ? '' : fileid,
  10590. });
  10591. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10592. name: fileName,
  10593. url: data.Location,
  10594. uid: fileUid,
  10595. type: _type,
  10596. fileid: fileid == 1 ? '' : fileid,
  10597. })
  10598. }else if (type == 15) {
  10599. _this.infoData2.push({
  10600. name: fileName,
  10601. url: data.Location,
  10602. uid: fileUid,
  10603. type: _type,
  10604. fileid: fileid == 1 ? '' : fileid,
  10605. });
  10606. _this.infoData.push({
  10607. name: fileName,
  10608. url: data.Location,
  10609. uid: fileUid,
  10610. type: _type,
  10611. fileid: fileid == 1 ? '' : fileid,
  10612. });
  10613. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.unshift({
  10614. name: fileName,
  10615. url: data.Location,
  10616. uid: fileUid,
  10617. type: _type,
  10618. fileid: fileid == 1 ? '' : fileid,
  10619. })
  10620. }else if (type == 16) {
  10621. _this.mubiaoInfoData.push({
  10622. name: fileName,
  10623. url: data.Location,
  10624. uid: fileUid,
  10625. type: _type,
  10626. fileid: fileid == 1 ? '' : fileid,
  10627. });
  10628. }else if (type == 17) {
  10629. _this.xuanzeInfoData.push({
  10630. name: fileName,
  10631. url: data.Location,
  10632. uid: fileUid,
  10633. type: _type,
  10634. fileid: fileid == 1 ? '' : fileid,
  10635. });
  10636. }else if (type == 18) {
  10637. if(!_this.pingjiaInfoData[tindex]){
  10638. _this.pingjiaInfoData[tindex] = []
  10639. }
  10640. _this.pingjiaInfoData[tindex].push({
  10641. name: fileName,
  10642. url: data.Location,
  10643. uid: fileUid,
  10644. type: _type,
  10645. fileid: fileid == 1 ? '' : fileid,
  10646. });
  10647. }else if (type == 19) {
  10648. _this.knowInfoData.push({
  10649. name: fileName,
  10650. url: data.Location,
  10651. uid: fileUid,
  10652. type: _type,
  10653. fileid: fileid == 1 ? '' : fileid,
  10654. });
  10655. if(fileid != 1){
  10656. _this.knowFileids.push(fileid)
  10657. }
  10658. }else if (type == 20) {
  10659. _this.knowInfoData2.push({
  10660. name: fileName,
  10661. url: data.Location,
  10662. uid: fileUid,
  10663. type: _type,
  10664. fileid: fileid == 1 ? '' : fileid,
  10665. });
  10666. if(fileid != 1){
  10667. _this.knowFileids2.push(fileid)
  10668. }
  10669. }
  10670. console.log(data.Location);
  10671. console.log(fileName,'----------',fileid);
  10672. }
  10673. });
  10674. }
  10675. }
  10676. },
  10677. beforeUpload3(event, unitIndex, type, itemTaskIndex, string) {
  10678. // const loading = this.openLoading();
  10679. var file = event.target.files[0];
  10680. var credentials = {
  10681. accessKeyId: "AKIATLPEDU37QV5CHLMH",
  10682. secretAccessKey: "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",
  10683. }; //秘钥形式的登录上传
  10684. window.AWS.config.update(credentials);
  10685. window.AWS.config.region = "cn-northwest-1"; //设置区域
  10686. var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
  10687. var _this = this;
  10688. if (type == 3) {
  10689. var b = [
  10690. "DOC",
  10691. "DOCX",
  10692. "DOCM",
  10693. "DOTM",
  10694. "DOTX",
  10695. "PPTX",
  10696. "PPSX",
  10697. "PPT",
  10698. "PPS",
  10699. "PPTM",
  10700. "POTM",
  10701. "PPAM",
  10702. "POTX",
  10703. "PPSM",
  10704. ];
  10705. if (
  10706. b.indexOf(
  10707. file.name
  10708. .split(".")
  10709. [file.name.split(".").length - 1].toLocaleUpperCase()
  10710. ) != -1
  10711. ) {
  10712. if (file.size / 1024 / 1024 > 80) {
  10713. this.$message.error("上传文件大于80兆,请重新选择文件!");
  10714. this.inputShow = true;
  10715. // var a = _this.$refs.upload1.uploadFiles;
  10716. // a.splice(a.length - 1, a.length);
  10717. // loading.close();
  10718. return;
  10719. }
  10720. } else if (
  10721. file.name
  10722. .split(".")
  10723. [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
  10724. ) {
  10725. if (file.size / 1024 / 1024 > 80) {
  10726. this.$message.error("添加成上传文件大于80兆,请重新选择文件!");
  10727. this.inputShow = true;
  10728. // var a = _this.$refs.upload1.uploadFiles;
  10729. // a.splice(a.length - 1, a.length);
  10730. // loading.close();
  10731. return;
  10732. }
  10733. }
  10734. }
  10735. this.inputShow = false;
  10736. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10737. itemTaskIndex
  10738. ].progress = 0;
  10739. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10740. itemTaskIndex
  10741. ].proVisible = true;
  10742. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10743. itemTaskIndex
  10744. ].isFinishSize = 0;
  10745. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10746. itemTaskIndex
  10747. ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
  10748. _this.$forceUpdate();
  10749. if (file) {
  10750. var params = {
  10751. Key:
  10752. file.name.split(".")[0] +
  10753. new Date().getTime() +
  10754. "." +
  10755. file.name.split(".")[file.name.split(".").length - 1],
  10756. ContentType: file.type,
  10757. Body: file,
  10758. "Access-Control-Allow-Credentials": "*",
  10759. ACL: "public-read",
  10760. }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
  10761. var options = {
  10762. partSize: 2048 * 1024 * 1024,
  10763. queueSize: 2,
  10764. leavePartsOnError: true,
  10765. };
  10766. bucket
  10767. .upload(params, options)
  10768. .on("httpUploadProgress", function (evt) {
  10769. //这里可以写进度条
  10770. // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
  10771. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10772. itemTaskIndex
  10773. ].progress = parseInt((evt.loaded / evt.total) * 100);
  10774. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10775. itemTaskIndex
  10776. ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
  10777. _this.$forceUpdate();
  10778. })
  10779. .send(function (err, data) {
  10780. // loading.close();
  10781. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10782. itemTaskIndex
  10783. ].progress = 100;
  10784. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10785. itemTaskIndex
  10786. ].isFinishSize =
  10787. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10788. itemTaskIndex
  10789. ].isAllSize;
  10790. _this.$forceUpdate();
  10791. setTimeout(() => {
  10792. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10793. itemTaskIndex
  10794. ].proVisible = false;
  10795. _this.$forceUpdate();
  10796. }, 1000);
  10797. _this.inputShow = true;
  10798. if (err) {
  10799. // var a = _this.$refs.upload1.uploadFiles;
  10800. // a.splice(a.length - 1, a.length);
  10801. _this.$message.error("上传失败");
  10802. } else {
  10803. if (type == 2 || type == 3) {
  10804. _this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10805. itemTaskIndex
  10806. ].chapterData.unshift({
  10807. name: file.name,
  10808. // name: string+''+(_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10809. // itemTaskIndex
  10810. // ].chapterData.length+1),
  10811. url: data.Location,
  10812. uid: file.uid,
  10813. type: type,
  10814. text: string,
  10815. // text: string + '' + (_this.unitJson[unitIndex].chapterInfo[0].taskJson[
  10816. // itemTaskIndex
  10817. // ].chapterData.length + 1),
  10818. });
  10819. _this.imgChange1(null, null, type, itemTaskIndex);
  10820. } else if (type == 4) {
  10821. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10822. itemTaskIndex
  10823. ].fileList1.push({
  10824. name: file.name,
  10825. url: data.Location,
  10826. uid: file.uid,
  10827. });
  10828. _this.imgChange1(null, null, type, itemTaskIndex);
  10829. } else if (type == 5) {
  10830. _this.unitJson[_this.unitIndex].chapterInfo[0].taskJson[
  10831. itemTaskIndex
  10832. ].homeworkList.push({
  10833. name: file.name,
  10834. url: data.Location,
  10835. uid: file.uid,
  10836. });
  10837. _this.imgChange1(null, null, type, itemTaskIndex);
  10838. }
  10839. console.log(data.Location);
  10840. }
  10841. });
  10842. }
  10843. },
  10844. addunit() {
  10845. this.unitJson.push({
  10846. dyName: "", //单元标题
  10847. isUpdate: 1,
  10848. easy: this.unitJson[this.unitJson.length - 1].easy ? 1 : 0,
  10849. chapterInfo: [
  10850. {
  10851. isread: false,
  10852. chapterid: this.guid(),
  10853. title: "",
  10854. courseName: "",
  10855. taskJson: [
  10856. {
  10857. task: "",
  10858. taskDetail: "",
  10859. chapterData: [],
  10860. toolText: "",
  10861. toolChoose: [
  10862. {
  10863. tool: [],
  10864. toolDetail: "",
  10865. toolType: 0,
  10866. askCount: 1,
  10867. askTitle: "",
  10868. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10869. },
  10870. ],
  10871. isShowTools: false,
  10872. askCount: 1,
  10873. isFold: 1,
  10874. askTitle: "",
  10875. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10876. checkJson: [{ checkCount: [], checkPerent: [] }],
  10877. homeworkList: [],
  10878. },
  10879. ],
  10880. itemCount: 1,
  10881. fileList1: [],
  10882. video: [],
  10883. testData: [],
  10884. pData: [],
  10885. templateArray: [],
  10886. },
  10887. ],
  10888. });
  10889. this.addindex = this.unitJson.length - 1;
  10890. setTimeout(() => {
  10891. this.unitIndex = this.unitJson.length - 1;
  10892. setTimeout(() => {
  10893. console.log(this.$refs.dyInput);
  10894. this.$refs.dyInput[0].focus();
  10895. }, 100);
  10896. this.unitSet(this.unitIndex);
  10897. }, 0);
  10898. },
  10899. addToolFun(itemTaskIndex) {
  10900. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  10901. itemTaskIndex
  10902. ].toolChoose.push({
  10903. tool: [],
  10904. toolDetail: "",
  10905. toolType: 0,
  10906. askCount: 1,
  10907. askTitle: "",
  10908. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10909. });
  10910. },
  10911. addTaskBorder() {
  10912. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.push({
  10913. task: "",
  10914. taskDetail: "",
  10915. chapterData: [],
  10916. toolText: "",
  10917. toolChoose: [
  10918. {
  10919. tool: [],
  10920. toolDetail: "",
  10921. toolType: 0,
  10922. askCount: 1,
  10923. askTitle: "",
  10924. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10925. },
  10926. ],
  10927. isShowTools: false,
  10928. askCount: 1,
  10929. isFold: 1, //任务收起状态
  10930. askTitle: "",
  10931. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10932. checkJson: [{ checkCount: [], checkPerent: [] }],
  10933. homeworkList: [],
  10934. });
  10935. setTimeout(() => {
  10936. this.checkEva(this.checkId);
  10937. setTimeout(() => {
  10938. this.checkEva(this.checkId);
  10939. }, 100);
  10940. }, 100);
  10941. },
  10942. addTaskBorder2(type, index) {
  10943. if (this.ttaskDetailLoading.join(",").indexOf('task-') !== -1) {
  10944. this.$message({
  10945. message: "有大纲在生成请生成完之后才能使用此功能",
  10946. type: "warning"
  10947. });
  10948. return;
  10949. }
  10950. if(type == 1){
  10951. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index,0,{
  10952. task: "",
  10953. isTask2: true,
  10954. isTask3: true,
  10955. taskDetail: "",
  10956. chapterData: [],
  10957. toolText: "",
  10958. toolChoose: [
  10959. {
  10960. tool: [],
  10961. toolDetail: "",
  10962. toolType: 0,
  10963. askCount: 1,
  10964. askTitle: "",
  10965. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10966. },
  10967. ],
  10968. isShowTools: false,
  10969. askCount: 1,
  10970. isFold: 0, //任务收起状态
  10971. askTitle: "",
  10972. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10973. checkJson: [{ checkCount: [], checkPerent: [] }],
  10974. homeworkList: [],
  10975. })
  10976. }else if(type == 2){
  10977. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.splice(index+1,0,{
  10978. task: "",
  10979. isTask2: true,
  10980. isTask3: true,
  10981. taskDetail: "",
  10982. chapterData: [],
  10983. toolText: "",
  10984. toolChoose: [
  10985. {
  10986. tool: [],
  10987. toolDetail: "",
  10988. toolType: 0,
  10989. askCount: 1,
  10990. askTitle: "",
  10991. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10992. },
  10993. ],
  10994. isShowTools: false,
  10995. askCount: 1,
  10996. isFold: 0, //任务收起状态
  10997. askTitle: "",
  10998. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  10999. checkJson: [{ checkCount: [], checkPerent: [] }],
  11000. homeworkList: [],
  11001. })
  11002. }
  11003. setTimeout(() => {
  11004. this.checkEva(this.checkId);
  11005. setTimeout(() => {
  11006. this.checkEva(this.checkId);
  11007. }, 100);
  11008. }, 100);
  11009. },
  11010. add(e, i) {
  11011. var el = e.currentTarget;
  11012. el.getElementsByTagName("input")[0].click();
  11013. },
  11014. fold(i, e) {
  11015. if (
  11016. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0 ||
  11017. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 2
  11018. ) {
  11019. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
  11020. } else {
  11021. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  11022. }
  11023. },
  11024. fold2(i) {
  11025. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
  11026. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11027. i
  11028. ].isFold2 = false;
  11029. } else {
  11030. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
  11031. }
  11032. this.$forceUpdate();
  11033. },
  11034. foldEva(i) {
  11035. if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isEvaFold) {
  11036. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11037. i
  11038. ].isEvaFold = false;
  11039. } else {
  11040. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11041. i
  11042. ].isEvaFold = true;
  11043. setTimeout(() => {
  11044. this.checkEva(this.checkId);
  11045. setTimeout(() => {
  11046. this.checkEva(this.checkId);
  11047. }, 500);
  11048. }, 0);
  11049. }
  11050. this.$forceUpdate();
  11051. },
  11052. foldC(i) {
  11053. if (
  11054. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFoldchapter
  11055. ) {
  11056. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11057. i
  11058. ].isFoldchapter = false;
  11059. } else {
  11060. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11061. i
  11062. ].isFoldchapter = true;
  11063. }
  11064. this.$forceUpdate();
  11065. },
  11066. fold3(i, ti) {
  11067. if (
  11068. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[ti]
  11069. .isFold3
  11070. ) {
  11071. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11072. ti
  11073. ].isFold3 = false;
  11074. } else {
  11075. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  11076. ti
  11077. ].isFold3 = true;
  11078. }
  11079. this.$forceUpdate();
  11080. },
  11081. deleteHomeworkBox(unitIndex, index, i) {
  11082. this.unitJson[unitIndex].chapterInfo[index].taskJson[
  11083. this.taskCount
  11084. ].homeworkList.splice(i, 1);
  11085. },
  11086. getStudent() {
  11087. let params = {
  11088. oid: this.oid,
  11089. cu: "",
  11090. cn: this.searchPeople,
  11091. };
  11092. this.ajax
  11093. .get(this.$store.state.api + "selectStudentAdd", params)
  11094. .then((res) => {
  11095. this.studentJuri = res.data[0];
  11096. })
  11097. .catch((err) => {
  11098. this.isLoading = false;
  11099. console.error(err);
  11100. });
  11101. },
  11102. // 添加协同成员其他选项按钮
  11103. getTeacherCopy(){
  11104. this.CollLoading=true
  11105. this.collid = ''
  11106. this.collid = '1xpz'
  11107. let params = {
  11108. oid:
  11109. this.org && this.org != "undefined" && this.org != "null"
  11110. ? this.org
  11111. : this.oid,
  11112. cu: "",
  11113. cn: this.searchTN,
  11114. coll: ''
  11115. };
  11116. this.ajax
  11117. .get(
  11118. this.$store.state.api +
  11119. (this.org && this.org != "undefined" && this.org != "null"
  11120. ? "selectCollaborativeMembersOrg"
  11121. : "selectCollaborativeMembers"),
  11122. params
  11123. )
  11124. .then((res) => {
  11125. let teacherJuri = res.data[0];
  11126. this.CollaborativeTeaList = res.data[1];
  11127. for (var i = 0; i < teacherJuri.length; i++) {
  11128. if (teacherJuri[i].userid == this.userid) {
  11129. teacherJuri.splice(i, 1);
  11130. break;
  11131. }
  11132. }
  11133. this.teacherJuri = teacherJuri.filter((i,index)=>{
  11134. return (i.cclassid == '' || i.cclassid == null)
  11135. })
  11136. console.log(' this.teacherJuri', this.teacherJuri);
  11137. let _check = [];
  11138. let _check2 = [];
  11139. for (var i = 0; i < this.teacherJuri.length; i++) {
  11140. var gid = this.teacherJuri[i].userid;
  11141. _check.push(gid);
  11142. }
  11143. for (var i = 0; i < this.checkboxList3.length; i++) {
  11144. var _id = this.checkboxList3[i];
  11145. if (_check.indexOf(_id) !== -1) {
  11146. _check2.push(_id);
  11147. }
  11148. }
  11149. if (_check2.length==0 && _check.length==0) {
  11150. }else{
  11151. this.checkAll2 = _check2.length === _check.length;
  11152. }
  11153. this.CollLoading=false
  11154. })
  11155. .catch((err) => {
  11156. console.error(err);
  11157. this.CollLoading=false
  11158. });
  11159. },
  11160. getTeacher(val) {
  11161. this.CollLoading=true
  11162. this.collid = ''
  11163. this.collid = !val ? '' : val
  11164. let params = {
  11165. oid:
  11166. this.org && this.org != "undefined" && this.org != "null"
  11167. ? this.org
  11168. : this.oid,
  11169. cu: "",
  11170. cn: this.searchTN,
  11171. coll: this.collid
  11172. };
  11173. this.ajax
  11174. .get(
  11175. this.$store.state.api +
  11176. (this.org && this.org != "undefined" && this.org != "null"
  11177. ? "selectCollaborativeMembersOrg"
  11178. : "selectCollaborativeMembers"),
  11179. params
  11180. )
  11181. .then((res) => {
  11182. let teacherJuri = res.data[0];
  11183. this.CollaborativeTeaList = res.data[1];
  11184. for (var i = 0; i < teacherJuri.length; i++) {
  11185. if (teacherJuri[i].userid == this.userid) {
  11186. teacherJuri.splice(i, 1);
  11187. break;
  11188. }
  11189. }
  11190. this.teacherJuri = teacherJuri;
  11191. let _check = [];
  11192. let _check2 = [];
  11193. for (var i = 0; i < this.teacherJuri.length; i++) {
  11194. var gid = this.teacherJuri[i].userid;
  11195. _check.push(gid);
  11196. }
  11197. for (var i = 0; i < this.checkboxList3.length; i++) {
  11198. var _id = this.checkboxList3[i];
  11199. if (_check.indexOf(_id) !== -1) {
  11200. _check2.push(_id);
  11201. }
  11202. }
  11203. if (_check2.length==0 && _check.length==0) {
  11204. }else{
  11205. this.checkAll2 = _check2.length === _check.length;
  11206. }
  11207. this.CollLoading=false
  11208. })
  11209. .catch((err) => {
  11210. console.error(err);
  11211. this.CollLoading=false
  11212. });
  11213. },
  11214. searchStudent() {
  11215. this.getStudent();
  11216. },
  11217. selectGrage() {
  11218. let params = {
  11219. oid: this.oid,
  11220. };
  11221. this.ajax
  11222. .get(this.$store.state.api + "selectGrageBySchool", params)
  11223. .then((res) => {
  11224. this.gradeList = res.data[0];
  11225. })
  11226. .catch((err) => {
  11227. this.isLoading = false;
  11228. console.error(err);
  11229. });
  11230. },
  11231. //获取班级列表
  11232. getClass() {
  11233. let params = {
  11234. oid: this.oid,
  11235. gid: this.gradeId,
  11236. cn: this.classSearch,
  11237. };
  11238. this.ajax
  11239. .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
  11240. .then((res) => {
  11241. if (!this.grade.length) {
  11242. this.grade = res.data[0];
  11243. }
  11244. this.grade2 = res.data[0];
  11245. this.classJuri = res.data[0];
  11246. let _check = [];
  11247. let _check2 = [];
  11248. for (var i = 0; i < this.grade2.length; i++) {
  11249. var gid = this.grade2[i].id;
  11250. _check.push(gid);
  11251. }
  11252. for (var i = 0; i < this.checkboxList2.length; i++) {
  11253. var _id = this.checkboxList2[i];
  11254. if (_check.indexOf(_id) !== -1) {
  11255. _check2.push(_id);
  11256. }
  11257. }
  11258. this.checkAll = _check2.length === _check.length;
  11259. })
  11260. .catch((err) => {
  11261. this.isLoading = false;
  11262. console.error(err);
  11263. });
  11264. },
  11265. CourseType2Change(val) {
  11266. this.pTypeCheck = [];
  11267. for (var i = 0; i < this.CourseType2.length; i++) {
  11268. let typeA = this.CourseType2[i];
  11269. if (val.indexOf(typeA.name) != -1) {
  11270. this.pTypeCheck.push(...typeA.id);
  11271. }
  11272. }
  11273. },
  11274. arrayToArray(arrayo, arrayt) {
  11275. let array1 = arrayo;
  11276. let array2 = arrayt;
  11277. let commonElements = [];
  11278. for (let i = 0; i < array1.length; i++) {
  11279. for (let j = 0; j < array2.length; j++) {
  11280. if (array1[i] === array2[j]) {
  11281. commonElements.push(array1[i]);
  11282. }
  11283. }
  11284. }
  11285. return commonElements;
  11286. },
  11287. typeChange(){
  11288. let sub = []
  11289. let mclass = []
  11290. if (this.courseTypeId.length) {
  11291. for (var i = 0; i < this.courseTypeId.length; i++) {
  11292. let _sid = this.courseTypeId[i]
  11293. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11294. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  11295. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  11296. }
  11297. }
  11298. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  11299. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  11300. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  11301. }
  11302. }
  11303. }
  11304. }
  11305. sub = JSON.parse(converter(JSON.stringify(sub)))
  11306. mclass = JSON.parse(converter(JSON.stringify(mclass)))
  11307. for(var fi = 0; fi < this.knowFileArray.length; fi++){
  11308. let _file = this.knowFileArray[fi]
  11309. let fileM = _file.grade ? converter(_file.grade).split('/') : 1
  11310. let fileS = _file.name ? converter(_file.name).split('/') : 1
  11311. let _sub = fileS == 1 ? [] : this.arrayToArray(fileS, sub)
  11312. let _mclass = fileM == 1 ? [] : mclass.length ? this.arrayToArray(fileM, mclass) : [2]
  11313. let fileids = this.knowInfoData.map((item) => item.fileid)
  11314. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] == 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11315. this.knowInfoData.push({
  11316. name: _file.filename,
  11317. url: _file.url,
  11318. uid: '',
  11319. type: 3,
  11320. fileid: _file.fileid,
  11321. });
  11322. this.knowFileids.push(_file.fileid)
  11323. }
  11324. fileids = this.knowInfoData.map((item) => item.fileid)
  11325. if(_mclass.length > 0 && fileS == 1 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11326. this.knowInfoData.push({
  11327. name: _file.filename,
  11328. url: _file.url,
  11329. uid: '',
  11330. type: 3,
  11331. fileid: _file.fileid,
  11332. });
  11333. this.knowFileids.push(_file.fileid)
  11334. }
  11335. fileids = this.knowInfoData.map((item) => item.fileid)
  11336. if(_sub.length > 0 && fileM == 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11337. this.knowInfoData.push({
  11338. name: _file.filename,
  11339. url: _file.url,
  11340. uid: '',
  11341. type: 3,
  11342. fileid: _file.fileid,
  11343. });
  11344. this.knowFileids.push(_file.fileid)
  11345. }
  11346. fileids = this.knowInfoData.map((item) => item.fileid)
  11347. if(_sub.length > 0 && _mclass.length > 0 && _mclass[0] != 2 && fileids.indexOf(_file.fileid) == -1 && _file.type == 1){
  11348. this.knowInfoData.push({
  11349. name: _file.filename,
  11350. url: _file.url,
  11351. uid: '',
  11352. type: 3,
  11353. fileid: _file.fileid,
  11354. });
  11355. this.knowFileids.push(_file.fileid)
  11356. }
  11357. fileids = this.knowInfoData.map((item) => item.fileid)
  11358. if(sub.length > 1 && fileids.indexOf(_file.fileid) == -1 && _file.type == 2){
  11359. this.knowInfoData.push({
  11360. name: _file.filename,
  11361. url: _file.url,
  11362. uid: '',
  11363. type: 3,
  11364. fileid: _file.fileid,
  11365. });
  11366. this.knowFileids.push(_file.fileid)
  11367. }
  11368. }
  11369. },
  11370. getChapterData(e, i, j, ic, type) {
  11371. e.stopPropagation();
  11372. this.updataC = true;
  11373. this.icc = ic;
  11374. if ((type == 2 || type == 3) && e.target.tagName !== "INPUT") {
  11375. console.log("还不能下载图片喔");
  11376. }
  11377. },
  11378. deleteChapterData(e, i, j, ic, taskI) {
  11379. e.stopPropagation();
  11380. let _this = this;
  11381. _this
  11382. .$confirm("确定删除此项?", "提示", {
  11383. confirmButtonText: "确定",
  11384. cancelButtonText: "取消",
  11385. type: "warning",
  11386. })
  11387. .then(() => {
  11388. _this.unitJson[i].chapterInfo[j].taskJson[taskI].chapterData.splice(
  11389. ic,
  11390. 1
  11391. );
  11392. })
  11393. .catch(() => {
  11394. return;
  11395. });
  11396. },
  11397. checkInfoData(fileid, file){
  11398. let type = 1
  11399. let index = 0
  11400. for(let i = 0; i < this.infoData.length; i++){
  11401. if(this.infoData[i].fileid == fileid){
  11402. type = 2
  11403. index = i
  11404. }
  11405. }
  11406. if(type == 2){
  11407. this.infoData.splice(index, 1)
  11408. }else {
  11409. this.infoData.push({...file})
  11410. }
  11411. },
  11412. checkKnowInfoData(fileid){
  11413. if(this.knowFileids.indexOf(fileid) == -1){
  11414. this.knowFileids.push(fileid)
  11415. }else {
  11416. this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
  11417. }
  11418. },
  11419. checkKnowInfoData2(fileid){
  11420. if(this.knowFileids2.indexOf(fileid) == -1){
  11421. this.knowFileids2.push(fileid)
  11422. }else {
  11423. this.knowFileids2.splice(this.knowFileids.indexOf(fileid), 1)
  11424. }
  11425. },
  11426. deleteInfoData(e, ic) {
  11427. e.stopPropagation();
  11428. let _this = this;
  11429. _this
  11430. .$confirm("确定删除此项?", "提示", {
  11431. confirmButtonText: "确定",
  11432. cancelButtonText: "取消",
  11433. type: "warning",
  11434. })
  11435. .then(() => {
  11436. _this.infoData.splice(
  11437. ic,
  11438. 1
  11439. );
  11440. })
  11441. .catch(() => {
  11442. return;
  11443. });
  11444. },
  11445. deleteInfoData2(e, ic) {
  11446. e.stopPropagation();
  11447. let _this = this;
  11448. _this
  11449. .$confirm("确定删除此项?", "提示", {
  11450. confirmButtonText: "确定",
  11451. cancelButtonText: "取消",
  11452. type: "warning",
  11453. })
  11454. .then(() => {
  11455. let fileid = _this.infoData2[ic].fileid;
  11456. _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
  11457. _this.infoData2.splice(
  11458. ic,
  11459. 1
  11460. );
  11461. })
  11462. .catch(() => {
  11463. return;
  11464. });
  11465. },
  11466. deleteKnowInfoData(e, ic) {
  11467. e.stopPropagation();
  11468. let _this = this;
  11469. _this
  11470. .$confirm("确定删除此项?", "提示", {
  11471. confirmButtonText: "确定",
  11472. cancelButtonText: "取消",
  11473. type: "warning",
  11474. })
  11475. .then(() => {
  11476. if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
  11477. _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
  11478. }
  11479. _this.knowInfoData.splice(
  11480. ic,
  11481. 1
  11482. );
  11483. })
  11484. .catch(() => {
  11485. return;
  11486. });
  11487. },
  11488. deleteKnowInfoData2(e, ic) {
  11489. e.stopPropagation();
  11490. let _this = this;
  11491. _this
  11492. .$confirm("确定删除此项?", "提示", {
  11493. confirmButtonText: "确定",
  11494. cancelButtonText: "取消",
  11495. type: "warning",
  11496. })
  11497. .then(() => {
  11498. if(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid) != -1){
  11499. _this.knowFileids2.splice(_this.knowFileids2.indexOf(_this.knowInfoData[ic].fileid), 1)
  11500. }
  11501. _this.knowInfoData.splice(
  11502. ic,
  11503. 1
  11504. );
  11505. })
  11506. .catch(() => {
  11507. return;
  11508. });
  11509. },
  11510. deletemubiaoInfoData(e, ic) {
  11511. e.stopPropagation();
  11512. let _this = this;
  11513. _this
  11514. .$confirm("确定删除此项?", "提示", {
  11515. confirmButtonText: "确定",
  11516. cancelButtonText: "取消",
  11517. type: "warning",
  11518. })
  11519. .then(() => {
  11520. _this.mubiaoInfoData.splice(
  11521. ic,
  11522. 1
  11523. );
  11524. })
  11525. .catch(() => {
  11526. return;
  11527. });
  11528. },
  11529. deletexuanzeInfoData(e, ic) {
  11530. e.stopPropagation();
  11531. let _this = this;
  11532. _this
  11533. .$confirm("确定删除此项?", "提示", {
  11534. confirmButtonText: "确定",
  11535. cancelButtonText: "取消",
  11536. type: "warning",
  11537. })
  11538. .then(() => {
  11539. _this.xuanzeInfoData.splice(
  11540. ic,
  11541. 1
  11542. );
  11543. })
  11544. .catch(() => {
  11545. return;
  11546. });
  11547. },
  11548. deletepingjiaInfoData(e, ic, tindex) {
  11549. e.stopPropagation();
  11550. let _this = this;
  11551. _this
  11552. .$confirm("确定删除此项?", "提示", {
  11553. confirmButtonText: "确定",
  11554. cancelButtonText: "取消",
  11555. type: "warning",
  11556. })
  11557. .then(() => {
  11558. _this.pingjiaInfoData[tindex].splice(
  11559. ic,
  11560. 1
  11561. );
  11562. })
  11563. .catch(() => {
  11564. return;
  11565. });
  11566. },
  11567. deleteCankaoInfoData(e, ic) {
  11568. e.stopPropagation();
  11569. let _this = this;
  11570. _this
  11571. .$confirm("确定删除此项?", "提示", {
  11572. confirmButtonText: "确定",
  11573. cancelButtonText: "取消",
  11574. type: "warning",
  11575. })
  11576. .then(() => {
  11577. _this.cankaoInfoData.splice(
  11578. ic,
  11579. 1
  11580. );
  11581. })
  11582. .catch(() => {
  11583. return;
  11584. });
  11585. },
  11586. deleteTeacherInfoData(e, ic) {
  11587. e.stopPropagation();
  11588. let _this = this;
  11589. _this
  11590. .$confirm("确定删除此项?", "提示", {
  11591. confirmButtonText: "确定",
  11592. cancelButtonText: "取消",
  11593. type: "warning",
  11594. })
  11595. .then(() => {
  11596. _this.teacherInfoData.splice(
  11597. ic,
  11598. 1
  11599. );
  11600. })
  11601. .catch(() => {
  11602. return;
  11603. });
  11604. },
  11605. updataVideoT(e, i, j, ic) {
  11606. // e.stopPropagation();
  11607. // this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[
  11608. // ic
  11609. // ].name = JSON.parse(JSON.stringify(e.target.value));
  11610. this.line =
  11611. this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].name;
  11612. this.taskCount = j;
  11613. this.lineCount = ic;
  11614. this.dialogVisibleupdataVideoT = true;
  11615. this.$forceUpdate();
  11616. },
  11617. checkChpater(e, i, j, ic){
  11618. let type = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].type
  11619. if(type == 3){
  11620. var fileA = [
  11621. "DOC",
  11622. "DOCX",
  11623. "DOCM",
  11624. "DOTM",
  11625. "DOTX",
  11626. "PPTX",
  11627. "PPSX",
  11628. "PPT",
  11629. "PPS",
  11630. "PPTM",
  11631. "POTM",
  11632. "PPAM",
  11633. "POTX",
  11634. "PPSM",
  11635. "XLSX",
  11636. "XLS"
  11637. ];
  11638. let url = this.unitJson[i].chapterInfo[0].taskJson[j].chapterData[ic].url
  11639. if (
  11640. fileA.indexOf(
  11641. url.split(".")[
  11642. url.split(".").length - 1
  11643. ].toLocaleUpperCase()
  11644. ) != -1
  11645. ) {
  11646. this.dialogVisibleOffice = true
  11647. this.wurl = url
  11648. } else if (
  11649. "pdf".indexOf(
  11650. url.split(".")[
  11651. url.split(".").length - 1
  11652. ].toLocaleLowerCase()
  11653. ) != -1
  11654. ) {
  11655. this.dialogVisiblePdf = true
  11656. this.wurl = url
  11657. }
  11658. }
  11659. },
  11660. checkChpater2(e, ic){
  11661. let type = this.infoData2[ic].type
  11662. if(type == 3){
  11663. var fileA = [
  11664. "DOC",
  11665. "DOCX",
  11666. "DOCM",
  11667. "DOTM",
  11668. "DOTX",
  11669. "PPTX",
  11670. "PPSX",
  11671. "PPT",
  11672. "PPS",
  11673. "PPTM",
  11674. "POTM",
  11675. "PPAM",
  11676. "POTX",
  11677. "PPSM",
  11678. "XLSX",
  11679. "XLS"
  11680. ];
  11681. let url = this.infoData2[ic].url
  11682. if (
  11683. fileA.indexOf(
  11684. url.split(".")[
  11685. url.split(".").length - 1
  11686. ].toLocaleUpperCase()
  11687. ) != -1
  11688. ) {
  11689. this.dialogVisibleOffice = true
  11690. this.wurl = url
  11691. } else if (
  11692. "pdf".indexOf(
  11693. url.split(".")[
  11694. url.split(".").length - 1
  11695. ].toLocaleLowerCase()
  11696. ) != -1
  11697. ) {
  11698. this.dialogVisiblePdf = true
  11699. this.wurl = url
  11700. }
  11701. }
  11702. },
  11703. checkChpater3(e, ic, item){
  11704. let type = item.type
  11705. if(type == 3){
  11706. var fileA = [
  11707. "DOC",
  11708. "DOCX",
  11709. "DOCM",
  11710. "DOTM",
  11711. "DOTX",
  11712. "PPTX",
  11713. "PPSX",
  11714. "PPT",
  11715. "PPS",
  11716. "PPTM",
  11717. "POTM",
  11718. "PPAM",
  11719. "POTX",
  11720. "PPSM",
  11721. "XLSX",
  11722. "XLS"
  11723. ];
  11724. let url = item.url
  11725. if (
  11726. fileA.indexOf(
  11727. url.split(".")[
  11728. url.split(".").length - 1
  11729. ].toLocaleUpperCase()
  11730. ) != -1
  11731. ) {
  11732. this.dialogVisibleOffice = true
  11733. this.wurl = url
  11734. } else if (
  11735. "pdf".indexOf(
  11736. url.split(".")[
  11737. url.split(".").length - 1
  11738. ].toLocaleLowerCase()
  11739. ) != -1
  11740. ) {
  11741. this.dialogVisiblePdf = true
  11742. this.wurl = url
  11743. }
  11744. }
  11745. },
  11746. updataVideoC() {
  11747. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  11748. this.taskCount
  11749. ].chapterData[this.lineCount].name = JSON.parse(
  11750. JSON.stringify(this.line)
  11751. );
  11752. this.dialogVisibleupdataVideoT = false;
  11753. this.$forceUpdate();
  11754. },
  11755. upCd(e, i, j, taskCount, ic) {
  11756. e.stopPropagation();
  11757. if (ic == 0) {
  11758. return;
  11759. }
  11760. var a = JSON.parse(
  11761. JSON.stringify(
  11762. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11763. ic - 1
  11764. ]
  11765. )
  11766. );
  11767. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic - 1] =
  11768. JSON.parse(
  11769. JSON.stringify(
  11770. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11771. )
  11772. );
  11773. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11774. this.$forceUpdate();
  11775. },
  11776. downCd(e, i, j, taskCount, ic) {
  11777. e.stopPropagation();
  11778. if (
  11779. ic ==
  11780. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData.length -
  11781. 1
  11782. ) {
  11783. return;
  11784. }
  11785. var a = JSON.parse(
  11786. JSON.stringify(
  11787. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[
  11788. ic + 1
  11789. ]
  11790. )
  11791. );
  11792. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic + 1] =
  11793. JSON.parse(
  11794. JSON.stringify(
  11795. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic]
  11796. )
  11797. );
  11798. this.unitJson[i].chapterInfo[0].taskJson[taskCount].chapterData[ic] = a;
  11799. this.$forceUpdate();
  11800. },
  11801. async upTool(e, i, j, tooli) {
  11802. e.stopPropagation();
  11803. if (tooli == 0) {
  11804. return;
  11805. }
  11806. let count1 = await this.getWorksCount(3, i, j, tooli - 1);
  11807. let count2 = await this.getWorksCount(3, i, j, tooli);
  11808. if (count1 > 0 || count2 > 0) {
  11809. this.$confirm(
  11810. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11811. "提示",
  11812. {
  11813. confirmButtonText: "确定",
  11814. cancelButtonText: "取消",
  11815. type: "warning",
  11816. }
  11817. )
  11818. .then(() => {
  11819. var a = JSON.parse(
  11820. JSON.stringify(
  11821. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11822. tooli - 1
  11823. ]
  11824. )
  11825. );
  11826. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11827. JSON.parse(
  11828. JSON.stringify(
  11829. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11830. )
  11831. );
  11832. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11833. this.$forceUpdate();
  11834. })
  11835. .catch(() => {
  11836. return;
  11837. });
  11838. } else {
  11839. var a = JSON.parse(
  11840. JSON.stringify(
  11841. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1]
  11842. )
  11843. );
  11844. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli - 1] =
  11845. JSON.parse(
  11846. JSON.stringify(
  11847. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11848. )
  11849. );
  11850. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11851. this.$forceUpdate();
  11852. }
  11853. },
  11854. async downTool(e, i, j, tooli) {
  11855. e.stopPropagation();
  11856. if (
  11857. tooli ==
  11858. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length - 1
  11859. ) {
  11860. return;
  11861. }
  11862. let count1 = await this.getWorksCount(3, i, j, tooli + 1);
  11863. let count2 = await this.getWorksCount(3, i, j, tooli);
  11864. if (count1 > 0 || count2 > 0) {
  11865. this.$confirm(
  11866. "切换工具顺序将删除此工具的提交成果,是否继续此操作?",
  11867. "提示",
  11868. {
  11869. confirmButtonText: "确定",
  11870. cancelButtonText: "取消",
  11871. type: "warning",
  11872. }
  11873. )
  11874. .then(() => {
  11875. var a = JSON.parse(
  11876. JSON.stringify(
  11877. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[
  11878. tooli + 1
  11879. ]
  11880. )
  11881. );
  11882. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11883. JSON.parse(
  11884. JSON.stringify(
  11885. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11886. )
  11887. );
  11888. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11889. this.$forceUpdate();
  11890. })
  11891. .catch(() => {
  11892. return;
  11893. });
  11894. } else {
  11895. var a = JSON.parse(
  11896. JSON.stringify(
  11897. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1]
  11898. )
  11899. );
  11900. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli + 1] =
  11901. JSON.parse(
  11902. JSON.stringify(
  11903. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli]
  11904. )
  11905. );
  11906. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[tooli] = a;
  11907. this.$forceUpdate();
  11908. }
  11909. },
  11910. addWork(type) {
  11911. if(type == 2 && this.courseName == "") {
  11912. this.$message.error("请补充填写课程名称");
  11913. return;
  11914. }
  11915. let cPan = 1;
  11916. for (var i = 0; i < this.unitJson.length; i++) {
  11917. for (
  11918. var j = 0;
  11919. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  11920. j++
  11921. ) {
  11922. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  11923. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  11924. if (
  11925. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  11926. ) {
  11927. for (
  11928. var z = 0;
  11929. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  11930. z++
  11931. ) {
  11932. if (
  11933. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  11934. .length
  11935. ) {
  11936. this.$message.error("请把工具添加完整");
  11937. cPan = 2;
  11938. break;
  11939. }
  11940. }
  11941. }
  11942. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  11943. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  11944. i
  11945. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  11946. return ele.value != "" || ele.detail != "" || ele.target != "";
  11947. });
  11948. }
  11949. }
  11950. }
  11951. this.inputShow = true;
  11952. if (cPan == 2) {
  11953. this.steps--;
  11954. return;
  11955. }
  11956. for (var i = 0; i < this.unitJson.length; i++) {
  11957. delete this.unitJson[i].isUpdate;
  11958. }
  11959. if(!this.targetCourseText2){
  11960. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  11961. }
  11962. let params = [
  11963. {
  11964. uid: this.userid,
  11965. title: this.courseName,
  11966. brief: this.courseText,
  11967. cover:
  11968. this.cover.length > 0
  11969. ? JSON.stringify(this.cover)
  11970. : JSON.stringify([
  11971. {
  11972. name: "noBanner.jpg",
  11973. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  11974. uid: 1656409780264,
  11975. status: "success",
  11976. },
  11977. ]),
  11978. evaId: this.evalua,
  11979. astudent:
  11980. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  11981. see: this.isTeacherSee == true ? 1 : 0,
  11982. chapters: JSON.stringify(this.unitJson),
  11983. template: this.cTemplate != "undefined" ? this.cTemplate : "",
  11984. courseType: JSON.stringify(this.courseTypeId),
  11985. ateacher:
  11986. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  11987. inviteCode: JSON.stringify(this.inviteCode),
  11988. refile: JSON.stringify(this.infoData),
  11989. reBrief: this.courseText2,
  11990. cpote: JSON.stringify(this.cpote),
  11991. setting: JSON.stringify({
  11992. courseJie: this.courseJie,
  11993. courseTime: this.courseTime,
  11994. teacherInfoData: this.teacherInfoData,
  11995. teacherCourseText: this.teacherCourseText,
  11996. targetCourseText: this.targetCourseText,
  11997. cankaoInfoData: this.cankaoInfoData,
  11998. mubiaoInfoData: this.mubiaoInfoData,
  11999. xuanzeInfoData: this.xuanzeInfoData,
  12000. pingjiaInfoData: this.pingjiaInfoData,
  12001. infoData2: this.infoData2,
  12002. isuseT: this.isuseT,
  12003. mode: this.mode,
  12004. targetCourseText2: this.targetCourseText2,
  12005. chatid: this.chatid,
  12006. languageSetting: this.languageSetting,
  12007. knowInfoData: this.knowInfoData,
  12008. knowFileids: this.knowFileids,
  12009. knowInfoData2: this.knowInfoData2,
  12010. knowFileids2: this.knowFileids2,
  12011. }),
  12012. iresearch: this.isFileSearch ? 1 : 2,
  12013. },
  12014. ];
  12015. this.ajax
  12016. .post(this.$store.state.api + "addWorkNew2AI3", params)
  12017. .then((res) => {
  12018. console.log(this.steps);
  12019. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  12020. this.$message({
  12021. message: "新增成功",
  12022. type: "success",
  12023. });
  12024. }
  12025. this.number = res.data.ordernumber;
  12026. this.courseId = res.data.courseId;
  12027. this.cid = res.data.courseId;
  12028. this.courseUserid = this.userid;
  12029. this.islogin = true;
  12030. // this.updateCourseState(4);
  12031. this.updateCourseState(5);
  12032. this.addtips()
  12033. if(type == 2){
  12034. this.retrunCourse()
  12035. }
  12036. if(type == 3){
  12037. this.steps = 4
  12038. }
  12039. })
  12040. .catch((err) => {
  12041. this.$message.error("网络不佳");
  12042. console.error(err);
  12043. });
  12044. },
  12045. goCourse() {
  12046. top.postMessage({ cid: this.courseId, type: "1" }, "*");
  12047. },
  12048. updateWork2() {
  12049. let _unitIndex = this.unitIndex;
  12050. let cPan = 1;
  12051. for (
  12052. var j = 0;
  12053. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  12054. j++
  12055. ) {
  12056. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  12057. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  12058. j
  12059. ].proVisible2 = false;
  12060. if (
  12061. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12062. .length > 1
  12063. ) {
  12064. for (
  12065. var z = 0;
  12066. z <
  12067. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12068. .length;
  12069. z++
  12070. ) {
  12071. if (
  12072. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  12073. z
  12074. ].tool.length
  12075. ) {
  12076. this.$message.error("请把工具添加完整");
  12077. cPan = 2;
  12078. break;
  12079. }
  12080. }
  12081. }
  12082. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  12083. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  12084. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  12085. (ele) => {
  12086. return ele.value != "" || ele.detail != "" || ele.target != "";
  12087. }
  12088. );
  12089. }
  12090. }
  12091. this.inputShow = true;
  12092. if (cPan == 2) {
  12093. this.steps--;
  12094. return;
  12095. }
  12096. let params = [
  12097. {
  12098. cid: this.cid,
  12099. chapters: JSON.stringify(this.unitJson),
  12100. uid: this.userid,
  12101. unitIndex: _unitIndex,
  12102. },
  12103. ];
  12104. this.ajax
  12105. .post(this.$store.state.api + "updateWorkNew4", params)
  12106. .then((res) => {
  12107. this.$message({
  12108. message: "修改成功",
  12109. type: "success",
  12110. });
  12111. this.courseId = this.cid;
  12112. this.addtips();
  12113. })
  12114. .catch((err) => {
  12115. this.$message.error("网络不佳");
  12116. console.error(err);
  12117. });
  12118. },
  12119. updateWork3(unitIndex) {
  12120. let _unitIndex = unitIndex;
  12121. let cPan = 1;
  12122. for (
  12123. var j = 0;
  12124. j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
  12125. j++
  12126. ) {
  12127. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].proVisible = false;
  12128. this.unitJson[_unitIndex].chapterInfo[0].taskJson[
  12129. j
  12130. ].proVisible2 = false;
  12131. if (
  12132. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12133. .length > 1
  12134. ) {
  12135. for (
  12136. var z = 0;
  12137. z <
  12138. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
  12139. .length;
  12140. z++
  12141. ) {
  12142. if (
  12143. !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
  12144. z
  12145. ].tool.length
  12146. ) {
  12147. this.$message.error("请把工具添加完整");
  12148. cPan = 2;
  12149. break;
  12150. }
  12151. }
  12152. }
  12153. if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
  12154. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
  12155. this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
  12156. (ele) => {
  12157. return ele.value != "" || ele.detail != "" || ele.target != "";
  12158. }
  12159. );
  12160. }
  12161. }
  12162. this.inputShow = true;
  12163. if (cPan == 2) {
  12164. this.steps--;
  12165. return;
  12166. }
  12167. let params = [
  12168. {
  12169. cid: this.cid,
  12170. chapters: JSON.stringify(this.unitJson),
  12171. uid: this.userid,
  12172. unitIndex: _unitIndex,
  12173. },
  12174. ];
  12175. this.ajax
  12176. .post(this.$store.state.api + "updateWorkNew4", params)
  12177. .then((res) => {
  12178. // this.$message({
  12179. // message: "修改成功",
  12180. // type: "success",
  12181. // });
  12182. this.courseId = this.cid;
  12183. this.addtips()
  12184. })
  12185. .catch((err) => {
  12186. this.$message.error("网络不佳");
  12187. console.error(err);
  12188. });
  12189. },
  12190. updateWork() {
  12191. let cPan = 1;
  12192. for (var i = 0; i < this.unitJson.length; i++) {
  12193. for (
  12194. var j = 0;
  12195. j < this.unitJson[i].chapterInfo[0].taskJson.length;
  12196. j++
  12197. ) {
  12198. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible = false;
  12199. this.unitJson[i].chapterInfo[0].taskJson[j].proVisible2 = false;
  12200. if (
  12201. this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
  12202. ) {
  12203. for (
  12204. var z = 0;
  12205. z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
  12206. z++
  12207. ) {
  12208. if (
  12209. !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
  12210. .length
  12211. ) {
  12212. this.$message.error("请把工具添加完整");
  12213. cPan = 2;
  12214. break;
  12215. }
  12216. }
  12217. }
  12218. if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
  12219. this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
  12220. i
  12221. ].chapterInfo[0].taskJson[j].eList.filter((ele) => {
  12222. return ele.value != "" || ele.detail != "" || ele.target != "";
  12223. });
  12224. }
  12225. }
  12226. }
  12227. this.inputShow = true;
  12228. if (cPan == 2) {
  12229. this.steps--;
  12230. return;
  12231. }
  12232. for (var i = 0; i < this.unitJson.length; i++) {
  12233. delete this.unitJson[i].isUpdate;
  12234. }
  12235. if(!this.targetCourseText2){
  12236. this.courseText = this.teacherCourseText ? JSON.parse(JSON.stringify(this.teacherCourseText)) : this.courseText
  12237. }
  12238. let params = [
  12239. {
  12240. cid: this.cid,
  12241. title: this.courseName,
  12242. brief: this.courseText,
  12243. cover:
  12244. this.cover.length > 0
  12245. ? JSON.stringify(this.cover)
  12246. : JSON.stringify([
  12247. {
  12248. name: "noBanner.jpg",
  12249. url: "https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/wu1676621845022.png",
  12250. uid: 1656409780264,
  12251. status: "success",
  12252. },
  12253. ]),
  12254. evaId: this.evalua,
  12255. astudent:
  12256. this.checkboxList2.length > 0 ? this.checkboxList2.join(",") : "",
  12257. see: this.isTeacherSee == true ? 1 : 0,
  12258. chapters: JSON.stringify(this.unitJson),
  12259. template: this.myWord != "undefined" ? this.myWord : [],
  12260. uid: this.userid,
  12261. courseType: JSON.stringify(this.courseTypeId),
  12262. ateacher:
  12263. this.checkboxList3.length > 0 ? this.checkboxList3.join(",") : "",
  12264. inviteCode: JSON.stringify(this.inviteCode),
  12265. refile: JSON.stringify(this.infoData),
  12266. reBrief: this.courseText2,
  12267. cpote: JSON.stringify(this.cpote),
  12268. setting: JSON.stringify({
  12269. courseJie: this.courseJie,
  12270. courseTime: this.courseTime,
  12271. teacherInfoData: this.teacherInfoData,
  12272. teacherCourseText: this.teacherCourseText,
  12273. targetCourseText: this.targetCourseText,
  12274. cankaoInfoData: this.cankaoInfoData,
  12275. mubiaoInfoData: this.mubiaoInfoData,
  12276. xuanzeInfoData: this.xuanzeInfoData,
  12277. pingjiaInfoData: this.pingjiaInfoData,
  12278. infoData2: this.infoData2,
  12279. isuseT: this.isuseT,
  12280. mode: this.mode,
  12281. targetCourseText2: this.targetCourseText2,
  12282. chatid: this.chatid,
  12283. languageSetting: this.languageSetting,
  12284. knowInfoData: this.knowInfoData,
  12285. knowFileids: this.knowFileids,
  12286. knowInfoData2: this.knowInfoData2,
  12287. knowFileids2: this.knowFileids2,
  12288. }),
  12289. iresearch: this.isFileSearch ? 1 : 2,
  12290. },
  12291. ];
  12292. this.ajax
  12293. .post(this.$store.state.api + "updateWorkNew2AI3", params)
  12294. .then((res) => {
  12295. if (this.steps != 1 && this.steps != 2 && this.steps != 3) {
  12296. if (this.cidType == 1) {
  12297. this.$message({
  12298. message: "修改成功",
  12299. type: "success",
  12300. });
  12301. } else {
  12302. this.$message({
  12303. message: "新增成功",
  12304. type: "success",
  12305. });
  12306. }
  12307. }
  12308. this.number = this.nbOrder;
  12309. this.courseId = this.cid;
  12310. this.addtips()
  12311. })
  12312. .catch((err) => {
  12313. this.$message.error("网络不佳");
  12314. console.error(err);
  12315. });
  12316. },
  12317. insertWord() {
  12318. this.dialogVisible1 = true;
  12319. this.updateBoolean2 = false;
  12320. this.tTitle = "";
  12321. this.tdetail = "";
  12322. },
  12323. addWord() {
  12324. this.unitJson[this.unitIndex].chapterInfo[0].fileList1.push({
  12325. name: this.tTitle,
  12326. content: this.tdetail,
  12327. uid: this.guid(),
  12328. });
  12329. this.dialogVisible1 = false;
  12330. },
  12331. upWord() { },
  12332. selectWord(uid, i, c) {
  12333. this.dialogVisible1 = true;
  12334. this.updateBoolean2 = true;
  12335. if (
  12336. uid == this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].uid
  12337. ) {
  12338. this.tTitle =
  12339. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].name;
  12340. this.tdetail =
  12341. this.unitJson[this.unitIndex].chapterInfo[i].fileList1[c].content;
  12342. }
  12343. },
  12344. isAddPP() {
  12345. if (this.checkboxList.length > 0) {
  12346. this.$message({
  12347. message: "添加成功",
  12348. type: "success",
  12349. });
  12350. this.dialogVisible3 = false;
  12351. } else {
  12352. this.$message({
  12353. message: "请添加课程成员",
  12354. type: "error",
  12355. });
  12356. }
  12357. },
  12358. isAddClass() {
  12359. this.dialogVisibleClass = false;
  12360. },
  12361. isAddPPTeacher() {
  12362. this.dialogVisibleMember = false;
  12363. this.setMan();
  12364. },
  12365. getTipsTemplate(){
  12366. if(this.templateid){
  12367. let params = {
  12368. id: this.templateid
  12369. }
  12370. this.ajax
  12371. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12372. .then((res) => {
  12373. if(res.data[0].length){
  12374. this.tipsJson = res.data[0][0]
  12375. this.aiJson = JSON.parse(res.data[0][0].tips)
  12376. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12377. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12378. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12379. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12380. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12381. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12382. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  12383. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule :'根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  12384. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  12385. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  12386. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  12387. }
  12388. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  12389. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【电子白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  12390. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  12391. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  12392. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  12393. // if(this.templateid == '4480d65a-1e48-11ef-bee5-005056b86db5'){
  12394. // this.aiJson.aiCpoteTask = this.aiJson.aiCpoteTask ? this.aiJson.aiCpoteTask : '请根据<任务簇>,帮我取出里面对应的任务名'
  12395. // }
  12396. // if(this.templateid == 'cf5722a4-401b-11ef-b873-005056b86db5'){
  12397. // this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  12398. // this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  12399. // this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  12400. // this.aiJson.aiDetail = '请根据#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),为一个<课程标题>的<学科>整合跨学科的,面向<年级>年级学生的项目式学习课程生成课程概况,驱动性问题(有且仅需要生成1个问题)和项目成果&评价标准。请你再生成时更有创意一点,不要与#参考资料中原有的驱动性问题重复。'
  12401. // this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  12402. // this.aiJson.aiOutline = '请为这个名为<课程名字>的<课程学科>学科的,面向<面向年级>学生的项目式学习课程设计序列教学活动(需要每个任务都需要至少200个token的详细描述)。你需要参考课程简要描述<课程简要描述>和<课程目标>和#参考资料(上下文中可能蕴含不相关的内容,请你无视不相关内容),并产出每个教学任务的设计以及每个教学活动的评价量规(学生能做到...)。'
  12403. // this.aiJson.aiTeacher = '请根据<任务名+单一任务描述>和并参考<课程简要描述>和#参考上下文(上下文中可能蕴含不相关的内容,请你无视不相关内容),为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),评价标准(学生能做到...),相关知识点的讲解,练习(练习需要包含示例答案)。'
  12404. // }
  12405. this.$forceUpdate();
  12406. this.isDialog = res.data[0][0].isDialog
  12407. }
  12408. })
  12409. .catch((err) => { });
  12410. }
  12411. },
  12412. getTipsTemplateIsDialog(){
  12413. if(this.templateid){
  12414. let params = {
  12415. id: this.templateid
  12416. }
  12417. this.ajax
  12418. .get(this.$store.state.api + "selectTipsTemplateById", params)
  12419. .then((res) => {
  12420. if(res.data[0].length){
  12421. this.isDialog = res.data[0][0].isDialog
  12422. }
  12423. })
  12424. .catch((err) => { });
  12425. }
  12426. },
  12427. getTemplate() {
  12428. this.ajax
  12429. .get(this.$store.state.api + "getCourseTemplateT", "")
  12430. .then((res) => {
  12431. this.templateArray = res.data[0];
  12432. this.getTemplateOid();
  12433. this.$forceUpdate();
  12434. })
  12435. .catch((err) => { });
  12436. },
  12437. getTemplateOid() {
  12438. let params = {
  12439. oid: this.oid,
  12440. };
  12441. this.ajax
  12442. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12443. .then((res) => {
  12444. if (res.data[0].length) {
  12445. this.templateArray = [...res.data[0], ...this.templateArray];
  12446. }
  12447. this.getTemplateOrg();
  12448. this.$forceUpdate();
  12449. })
  12450. .catch((err) => { });
  12451. },
  12452. getTemplateOrg() {
  12453. let params = {
  12454. oid: this.org,
  12455. };
  12456. this.ajax
  12457. .get(this.$store.state.api + "getCourseTemplateTByOid", params)
  12458. .then((res) => {
  12459. if (res.data[0].length) {
  12460. this.templateArray = [...res.data[0], ...this.templateArray];
  12461. }
  12462. this.$forceUpdate();
  12463. })
  12464. .catch((err) => { });
  12465. },
  12466. clearChoose() {
  12467. this.clearArray.splice(this.templateC.id, 1);
  12468. this.dialogVisible2 = false;
  12469. },
  12470. clearAttText() {
  12471. this.AttText = {
  12472. title: "",
  12473. text: "",
  12474. };
  12475. this.dialogVisible6 = false;
  12476. },
  12477. clearLine() {
  12478. this.line = "";
  12479. this.dialogVisible7 = false;
  12480. },
  12481. openTemplate() {
  12482. this.ctJson = {};
  12483. this.templateDialog = true;
  12484. },
  12485. checkctJson(json) {
  12486. if (this.ctJson.id == json.id) {
  12487. this.ctJson = {};
  12488. } else {
  12489. this.ctJson = json;
  12490. }
  12491. },
  12492. addTemplate(res) {
  12493. let _this = this;
  12494. let _res = [];
  12495. if (res.id == 1) {
  12496. _res = [
  12497. {
  12498. dyName: "", //单元标题
  12499. easy: 1,
  12500. chapterInfo: [
  12501. {
  12502. isread: false,
  12503. chapterid: this.guid(),
  12504. title: "",
  12505. courseName: "",
  12506. taskJson: [
  12507. {
  12508. task: "",
  12509. taskDetail: "",
  12510. chapterData: [],
  12511. toolText: "",
  12512. toolChoose: [
  12513. {
  12514. tool: [],
  12515. toolDetail: "",
  12516. toolType: 0,
  12517. askCount: 1,
  12518. askTitle: "",
  12519. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12520. },
  12521. ],
  12522. isShowTools: false,
  12523. askCount: 1,
  12524. isFold: 1,
  12525. askTitle: "",
  12526. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12527. checkJson: [{ checkCount: [], checkPerent: [] }],
  12528. homeworkList: [],
  12529. },
  12530. ],
  12531. itemCount: 1,
  12532. fileList1: [],
  12533. video: [],
  12534. testData: [],
  12535. pData: [],
  12536. templateArray: [],
  12537. },
  12538. ],
  12539. },
  12540. ];
  12541. this.updateCourseState(1);
  12542. } else if (res.id == 2) {
  12543. let stageData = [];
  12544. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  12545. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  12546. if (!iframe && !iframe2) {
  12547. this.$message.error("请使用AI共创生成");
  12548. return;
  12549. }
  12550. let copyData = iframe ? iframe.contentWindow.copyData : false;
  12551. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  12552. if (
  12553. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  12554. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  12555. ) {
  12556. this.$message.error("请使用AI共创生成");
  12557. return;
  12558. }
  12559. stageData = copyData
  12560. ? copyData.stageData
  12561. : copyData2
  12562. ? copyData2.stageData
  12563. : [""];
  12564. for (var i = 0; i < stageData.length; i++) {
  12565. _res.push({
  12566. dyName: stageData[i], //单元标题
  12567. chapterInfo: [
  12568. {
  12569. isread: false,
  12570. chapterid: this.guid(),
  12571. title: "",
  12572. courseName: "",
  12573. taskJson: [
  12574. {
  12575. task: "",
  12576. taskDetail: "",
  12577. chapterData: [],
  12578. toolText: "",
  12579. toolChoose: [
  12580. {
  12581. tool: [],
  12582. toolDetail: "",
  12583. toolType: 0,
  12584. askCount: 1,
  12585. askTitle: "",
  12586. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12587. },
  12588. ],
  12589. isShowTools: false,
  12590. askCount: 1,
  12591. isFold: 1,
  12592. askTitle: "",
  12593. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12594. checkJson: [{ checkCount: [], checkPerent: [] }],
  12595. homeworkList: [],
  12596. },
  12597. ],
  12598. itemCount: 1,
  12599. fileList1: [],
  12600. video: [],
  12601. testData: [],
  12602. pData: [],
  12603. templateArray: [],
  12604. },
  12605. ],
  12606. });
  12607. }
  12608. this.updateCourseState(1);
  12609. } else if (!Object.keys(res).length) {
  12610. this.$message.error("请选择模板");
  12611. retrun;
  12612. } else {
  12613. _res = JSON.parse(res.chapters);
  12614. this.updateCourseState(parseInt(res.state));
  12615. }
  12616. _this
  12617. .$confirm(
  12618. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  12619. "提示",
  12620. {
  12621. confirmButtonText: "确定",
  12622. cancelButtonText: "取消",
  12623. type: "warning",
  12624. }
  12625. )
  12626. .then(() => {
  12627. _this.unitJson = _res;
  12628. _this.updateWork();
  12629. // _this.steps++;
  12630. _this.templateDialog = false;
  12631. setTimeout(() => {
  12632. this.checkEva(this.checkId);
  12633. setTimeout(() => {
  12634. this.checkEva(this.checkId);
  12635. }, 100);
  12636. }, 1000);
  12637. })
  12638. .catch(() => {
  12639. return;
  12640. });
  12641. },
  12642. checkTemplate(res) {
  12643. let _this = this;
  12644. _this
  12645. .$confirm(
  12646. "确定选择课程模板吗?此操作将删除所有已编辑课程内容。",
  12647. "提示",
  12648. {
  12649. confirmButtonText: "确定",
  12650. cancelButtonText: "取消",
  12651. type: "warning",
  12652. }
  12653. )
  12654. .then(() => {
  12655. _this.unitJson = JSON.parse(res.chapters);
  12656. _this.steps++;
  12657. setTimeout(() => {
  12658. this.checkEva(this.checkId);
  12659. setTimeout(() => {
  12660. this.checkEva(this.checkId);
  12661. }, 100);
  12662. }, 1000);
  12663. })
  12664. .catch(() => {
  12665. return;
  12666. });
  12667. },
  12668. checkTemplate1(w) {
  12669. this.steps++;
  12670. },
  12671. checkTemplate2() {
  12672. let _this = this;
  12673. _this
  12674. .$confirm("确定选择空模板吗?修改课程时无法重置课程模板。", "提示", {
  12675. confirmButtonText: "确定",
  12676. cancelButtonText: "取消",
  12677. type: "warning",
  12678. })
  12679. .then(() => {
  12680. _this.unitIndex = 0;
  12681. _this.unitJson = [
  12682. {
  12683. dyName: "", //单元标题
  12684. chapterInfo: [
  12685. {
  12686. isread: false,
  12687. chapterid: this.guid(),
  12688. title: "",
  12689. courseName: "",
  12690. taskJson: [
  12691. {
  12692. task: "",
  12693. taskDetail: "",
  12694. chapterData: [],
  12695. toolText: "",
  12696. toolChoose: [
  12697. {
  12698. tool: [],
  12699. toolDetail: "",
  12700. toolType: 0,
  12701. askCount: 1,
  12702. askTitle: "",
  12703. askJson: [
  12704. { askstitle: "", askItem: 1, checkList: [] },
  12705. ],
  12706. },
  12707. ],
  12708. isShowTools: false,
  12709. askCount: 1,
  12710. isFold: 1,
  12711. askTitle: "",
  12712. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12713. checkJson: [{ checkCount: [], checkPerent: [] }],
  12714. homeworkList: [],
  12715. },
  12716. ],
  12717. itemCount: 1,
  12718. fileList1: [],
  12719. video: [],
  12720. testData: [],
  12721. pData: [],
  12722. templateArray: [],
  12723. },
  12724. ],
  12725. },
  12726. ];
  12727. this.steps++;
  12728. setTimeout(() => {
  12729. this.checkEva(this.checkId);
  12730. setTimeout(() => {
  12731. this.checkEva(this.checkId);
  12732. }, 100);
  12733. }, 1000);
  12734. this.updateWork();
  12735. })
  12736. .catch(() => {
  12737. return;
  12738. });
  12739. },
  12740. checkTemplate3() {
  12741. let _this = this;
  12742. _this
  12743. .$confirm("确定选择简易模板吗?修改课程时无法重置课程模板。", "提示", {
  12744. confirmButtonText: "确定",
  12745. cancelButtonText: "取消",
  12746. type: "warning",
  12747. })
  12748. .then(() => {
  12749. _this.unitIndex = 0;
  12750. _this.unitJson = [
  12751. {
  12752. dyName: "", //单元标题
  12753. easy: 1,
  12754. chapterInfo: [
  12755. {
  12756. isread: false,
  12757. chapterid: this.guid(),
  12758. title: "",
  12759. courseName: "",
  12760. taskJson: [
  12761. {
  12762. task: "",
  12763. taskDetail: "",
  12764. chapterData: [],
  12765. toolText: "",
  12766. toolChoose: [
  12767. {
  12768. tool: [],
  12769. toolDetail: "",
  12770. toolType: 0,
  12771. askCount: 1,
  12772. askTitle: "",
  12773. askJson: [
  12774. { askstitle: "", askItem: 1, checkList: [] },
  12775. ],
  12776. },
  12777. ],
  12778. isShowTools: false,
  12779. askCount: 1,
  12780. isFold: 1,
  12781. askTitle: "",
  12782. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  12783. checkJson: [{ checkCount: [], checkPerent: [] }],
  12784. homeworkList: [],
  12785. },
  12786. ],
  12787. itemCount: 1,
  12788. fileList1: [],
  12789. video: [],
  12790. testData: [],
  12791. pData: [],
  12792. templateArray: [],
  12793. },
  12794. ],
  12795. },
  12796. ];
  12797. // this.steps++;
  12798. this.updateWork();
  12799. })
  12800. .catch(() => {
  12801. return;
  12802. });
  12803. },
  12804. checkTemplate4() {
  12805. let _this = this;
  12806. _this
  12807. .$confirm("确定选择未来小学课程设计吗?", "提示", {
  12808. confirmButtonText: "确定",
  12809. cancelButtonText: "取消",
  12810. type: "warning",
  12811. })
  12812. .then(() => {
  12813. _this.unitIndex = 0;
  12814. _this.unitJson = JSON.parse(JSON.stringify(weilaiData));
  12815. this.steps++;
  12816. this.updateWork();
  12817. })
  12818. .catch(() => {
  12819. return;
  12820. });
  12821. },
  12822. wordNext() {
  12823. this.dialogVisible2 = false;
  12824. },
  12825. isAddOrUpdateAttText() {
  12826. if (this.AttTextType == 0) {
  12827. this.addAttTextMessage();
  12828. } else {
  12829. this.updateAttText();
  12830. }
  12831. },
  12832. isAddOrUpdateLine() {
  12833. if (!this.lineTitle) {
  12834. this.$message.error("请填写链接标题");
  12835. return;
  12836. }
  12837. if (this.lineType == 0) {
  12838. this.addLine();
  12839. } else {
  12840. this.updateLine();
  12841. }
  12842. },
  12843. addAttTextMessage() {
  12844. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12845. this.taskCount
  12846. ].chapterData.unshift({
  12847. name: this.AttText.title,
  12848. url: this.AttText.text,
  12849. type: 6,
  12850. });
  12851. this.imgChange1(null, null, 6, this.taskCount);
  12852. this.dialogVisible6 = false;
  12853. },
  12854. selectAttText(itemTaskIndex, i) {
  12855. this.AttText.title =
  12856. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12857. itemTaskIndex
  12858. ].chapterData[i].name;
  12859. this.AttText.text =
  12860. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12861. itemTaskIndex
  12862. ].chapterData[i].url;
  12863. this.taskCount = itemTaskIndex;
  12864. this.AttTextIndex = i;
  12865. this.AttTextType = 1;
  12866. this.dialogVisible6 = true;
  12867. },
  12868. updateAttText() {
  12869. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12870. this.taskCount
  12871. ].chapterData[this.AttTextIndex].name = this.AttText.title;
  12872. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12873. this.taskCount
  12874. ].chapterData[this.AttTextIndex].url = this.AttText.text;
  12875. this.dialogVisible6 = false;
  12876. },
  12877. addLine() {
  12878. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12879. this.lineCount
  12880. ].chapterData.unshift({
  12881. name: "链接",
  12882. title: this.lineTitle,
  12883. url: this.line,
  12884. type: 8,
  12885. });
  12886. this.imgChange1(null, null, 8, this.lineCount);
  12887. this.dialogVisible7 = false;
  12888. },
  12889. selectLine(itemTaskIndex, i) {
  12890. this.line =
  12891. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12892. itemTaskIndex
  12893. ].chapterData[i].url;
  12894. this.lineTitle = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12895. itemTaskIndex
  12896. ].chapterData[i].title
  12897. ? this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12898. .chapterData[i].title
  12899. : "";
  12900. this.taskCount = itemTaskIndex;
  12901. this.lineCount = i;
  12902. this.lineType = 1;
  12903. this.dialogVisible7 = true;
  12904. },
  12905. openUpdateSource(itemTaskIndex, i) {
  12906. this.sourceData = {};
  12907. let source =
  12908. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12909. .chapterData[i];
  12910. this.sourceData[source.id] = {};
  12911. this.sourceData[source.id].name = source.title;
  12912. this.sourceData[source.id].url = source.url;
  12913. this.dialogVisibleSource = true;
  12914. this.updateSourcePan = true;
  12915. this.taskCount = itemTaskIndex;
  12916. this.lineCount = i;
  12917. },
  12918. updateLine() {
  12919. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12920. this.taskCount
  12921. ].chapterData[this.lineCount].url = this.line;
  12922. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12923. this.taskCount
  12924. ].chapterData[this.lineCount].title = this.lineTitle;
  12925. this.dialogVisible7 = false;
  12926. },
  12927. addPP() {
  12928. this.dialogVisible3 = true;
  12929. },
  12930. goTo(path) {
  12931. this.$router.push(path);
  12932. },
  12933. openTools(itemTaskIndex, i, toolIndex) {
  12934. this.toolIndex = toolIndex;
  12935. this.taskCount = itemTaskIndex;
  12936. if (i == 4) {
  12937. if (toolIndex == null) {
  12938. var a =
  12939. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12940. .chapterData;
  12941. for (var i = 0; i < a.length; i++) {
  12942. if (a[i].url == 4 && a[i].askJson.askTitle != "") {
  12943. this.askJson =
  12944. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12945. itemTaskIndex
  12946. ].chapterData[i].askJson;
  12947. }
  12948. }
  12949. } else {
  12950. this.askJson = JSON.parse(
  12951. JSON.stringify(
  12952. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12953. itemTaskIndex
  12954. ].toolChoose[toolIndex]
  12955. )
  12956. );
  12957. }
  12958. this.askJson2 = JSON.parse(JSON.stringify(this.askJson));
  12959. this.dialogVisible5 = true;
  12960. } else if (i == 45) {
  12961. if (
  12962. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12963. .toolChoose[toolIndex].testJson
  12964. ) {
  12965. this.testJson = JSON.parse(
  12966. JSON.stringify(
  12967. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12968. itemTaskIndex
  12969. ].toolChoose[toolIndex].testJson
  12970. )
  12971. );
  12972. } else {
  12973. var testJson = {
  12974. testCount: 1,
  12975. testTitle: "",
  12976. testJson: [
  12977. {
  12978. teststitle: "",
  12979. testItem: 1,
  12980. checkList: [],
  12981. timuList: [],
  12982. answer: [],
  12983. type: "1",
  12984. },
  12985. ],
  12986. };
  12987. this.testJson = testJson;
  12988. }
  12989. this.testJson2 = JSON.parse(JSON.stringify(this.testJson));
  12990. this.dialogVisibleChoice = true;
  12991. } else if (i == 47) {
  12992. if (
  12993. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  12994. .toolChoose[toolIndex].sentenceList
  12995. ) {
  12996. this.sentenceList = JSON.parse(
  12997. JSON.stringify(
  12998. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  12999. itemTaskIndex
  13000. ].toolChoose[toolIndex].sentenceList
  13001. )
  13002. );
  13003. } else {
  13004. var sentenceList = [
  13005. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  13006. ];
  13007. this.sentenceList = sentenceList;
  13008. }
  13009. this.sentenceList2 = JSON.parse(JSON.stringify(this.sentenceList));
  13010. this.dialogVisibleSentence = true;
  13011. } else if (i == 48) {
  13012. if (
  13013. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13014. .toolChoose[toolIndex].tableJson
  13015. ) {
  13016. this.tableJson = JSON.parse(
  13017. JSON.stringify(
  13018. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13019. itemTaskIndex
  13020. ].toolChoose[toolIndex].tableJson
  13021. )
  13022. );
  13023. } else {
  13024. var tableJson = { text: "" };
  13025. this.tableJson = tableJson;
  13026. }
  13027. this.dialogVisibleTable = true;
  13028. } else if (i == 52) {
  13029. if (
  13030. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13031. .toolChoose[toolIndex].wordJson
  13032. ) {
  13033. this.wordJson = JSON.parse(
  13034. JSON.stringify(
  13035. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13036. itemTaskIndex
  13037. ].toolChoose[toolIndex].wordJson
  13038. )
  13039. );
  13040. } else {
  13041. var wordJson = { text: "" };
  13042. this.wordJson = wordJson;
  13043. }
  13044. this.dialogVisibleWord = true;
  13045. // else if (i == 50) {
  13046. // if (
  13047. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13048. // .toolChoose[toolIndex].uploadJson
  13049. // ) {
  13050. // this.uploadJson = JSON.parse(
  13051. // JSON.stringify(
  13052. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13053. // itemTaskIndex
  13054. // ].toolChoose[toolIndex].uploadJson
  13055. // )
  13056. // );
  13057. // } else {
  13058. // var uploadJson = [];
  13059. // this.uploadJson = uploadJson;
  13060. // }
  13061. // this.dialogVisibleMoreUpload = true;
  13062. // }
  13063. } else if (i == 10) {
  13064. if (
  13065. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13066. .toolChoose[toolIndex].preTime
  13067. ) {
  13068. this.preTime = JSON.parse(
  13069. JSON.stringify(
  13070. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13071. itemTaskIndex
  13072. ].toolChoose[toolIndex].preTime
  13073. )
  13074. );
  13075. } else {
  13076. var preTime = 0;
  13077. this.preTime = preTime;
  13078. }
  13079. this.dialogVisiblePreTime = true;
  13080. } else if (i == 49) {
  13081. if (
  13082. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13083. .toolChoose[toolIndex].groupJson
  13084. ) {
  13085. this.groupJson = JSON.parse(
  13086. JSON.stringify(
  13087. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13088. itemTaskIndex
  13089. ].toolChoose[toolIndex].groupJson
  13090. )
  13091. );
  13092. } else {
  13093. var groupJson = {
  13094. group: [{ name: "第1组" }],
  13095. number: undefined,
  13096. islock: 1,
  13097. };
  13098. this.groupJson = groupJson;
  13099. }
  13100. this.dialogVisibleGroup = true;
  13101. } else if (i == 62) {
  13102. if (
  13103. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13104. .toolChoose[toolIndex].videoJson
  13105. ) {
  13106. this.videoJson = JSON.parse(
  13107. JSON.stringify(
  13108. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13109. itemTaskIndex
  13110. ].toolChoose[toolIndex].videoJson
  13111. )
  13112. );
  13113. } else {
  13114. var videoJson = {
  13115. video: "",
  13116. setting: [],
  13117. };
  13118. this.videoJson = videoJson;
  13119. }
  13120. this.dialogVisibleVideo = true;
  13121. } else if (i == 15) {
  13122. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13123. itemTaskIndex
  13124. ].toolChoose[toolIndex].answerQ
  13125. ? JSON.parse(
  13126. JSON.stringify(
  13127. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13128. itemTaskIndex
  13129. ].toolChoose[toolIndex].answerQ
  13130. )
  13131. )
  13132. : "";
  13133. this.answerQ2 = JSON.parse(JSON.stringify(this.answerQ));
  13134. this.dialogVisible8 = true;
  13135. } else if (i == 40) {
  13136. this.rateJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13137. itemTaskIndex
  13138. ].toolChoose[toolIndex].rateJson
  13139. ? JSON.parse(
  13140. JSON.stringify(
  13141. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13142. itemTaskIndex
  13143. ].toolChoose[toolIndex].rateJson
  13144. )
  13145. )
  13146. : [{ detail: "", score: 5, value: "" }]; //{detail:"",score:5,value:""}
  13147. this.selectSteps = 1;
  13148. this.dialogVisibleRate = true;
  13149. } else if (i == 42) {
  13150. this.answerQ = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13151. itemTaskIndex
  13152. ].toolChoose[toolIndex].answerQ
  13153. ? JSON.parse(
  13154. JSON.stringify(
  13155. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13156. itemTaskIndex
  13157. ].toolChoose[toolIndex].answerQ
  13158. )
  13159. )
  13160. : "";
  13161. this.dialogVisibleMp3 = true;
  13162. } else if (i == 41) {
  13163. this.selectJson = this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13164. itemTaskIndex
  13165. ].toolChoose[toolIndex].selectJson
  13166. ? JSON.parse(
  13167. JSON.stringify(
  13168. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13169. itemTaskIndex
  13170. ].toolChoose[toolIndex].selectJson
  13171. )
  13172. )
  13173. : { url: "", select: [], answer: [] };
  13174. this.selectSteps = 1;
  13175. this.selectJson2 = JSON.parse(JSON.stringify(this.selectJson));
  13176. this.dialogVisibleSelect = true;
  13177. } else if (i == 3) {
  13178. top.postMessage(
  13179. {
  13180. tools: "3y",
  13181. cid: this.cid,
  13182. stage: this.unitIndex,
  13183. task: itemTaskIndex,
  13184. tool: toolIndex,
  13185. },
  13186. "*"
  13187. );
  13188. } else if (i == 1) {
  13189. top.postMessage(
  13190. {
  13191. tools: "1y",
  13192. cid: this.cid,
  13193. stage: this.unitIndex,
  13194. task: itemTaskIndex,
  13195. tool: toolIndex,
  13196. },
  13197. "*"
  13198. );
  13199. } else if (i == 57) {
  13200. top.postMessage(
  13201. {
  13202. tools: "57y",
  13203. cid: this.cid,
  13204. stage: this.unitIndex,
  13205. task: itemTaskIndex,
  13206. tool: toolIndex,
  13207. },
  13208. "*"
  13209. );
  13210. } else if (i == 69) {
  13211. this.englishList = {};
  13212. this.englishList = this.unitJson[this.unitIndex].chapterInfo[0]
  13213. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishList
  13214. ? JSON.parse(
  13215. JSON.stringify(
  13216. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13217. itemTaskIndex
  13218. ].toolChoose[toolIndex].englishList
  13219. )
  13220. )
  13221. : {};
  13222. this.$forceUpdate();
  13223. this.englishDialogVisible = true;
  13224. } else if (i == 70) {
  13225. this.englishVoiceJson = {};
  13226. this.englishVoiceJson = this.unitJson[this.unitIndex].chapterInfo[0]
  13227. .taskJson[itemTaskIndex].toolChoose[toolIndex].englishVoiceJson
  13228. ? JSON.parse(
  13229. JSON.stringify(
  13230. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13231. itemTaskIndex
  13232. ].toolChoose[toolIndex].englishVoiceJson
  13233. )
  13234. )
  13235. : {
  13236. title: '',
  13237. detail: '',
  13238. array: []
  13239. };
  13240. // {
  13241. // time: "",
  13242. // class: "",
  13243. // difficulty: 0,
  13244. // topic: "",
  13245. // isShow: false,
  13246. // eva: 0,
  13247. // aiEva: {
  13248. // isAiEva: false,
  13249. // aiEvaChoose: [],
  13250. // },
  13251. // allfType: [],
  13252. // englishJson: {},
  13253. // };
  13254. this.$forceUpdate();
  13255. this.EnglishVoiceDialog = true;
  13256. }
  13257. },
  13258. setEnglishVoiceJson(val) {
  13259. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13260. this.taskCount
  13261. ].toolChoose[this.toolIndex].englishVoiceJson = JSON.parse(
  13262. JSON.stringify(val)
  13263. );
  13264. this.$forceUpdate();
  13265. if (
  13266. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13267. .toolChoose[this.toolIndex].tool != 70
  13268. ) {
  13269. this.addTools(70, this.taskCount, this.toolIndex);
  13270. }
  13271. },
  13272. chapAddTools(i) {
  13273. if (this.chapTools[0].tools.length == 0) {
  13274. this.chapTools[0].tools.push(i);
  13275. } else {
  13276. if (this.chapTools[0].tools.indexOf(i) != -1) {
  13277. this.chapTools[0].tools.splice(this.chapTools[0].tools.indexOf(i), 1);
  13278. } else {
  13279. this.chapTools[0].tools.push(i);
  13280. }
  13281. }
  13282. this.$forceUpdate();
  13283. },
  13284. addChaptersDataTools() {
  13285. if (this.chapTools[0].tools.indexOf(4) != -1) {
  13286. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13287. this.chapCount
  13288. ].chapterData.unshift({
  13289. name: this.chapTools[0].toolDetail,
  13290. url: this.chapTools[0].tools,
  13291. type: 7,
  13292. askJson: this.askJson,
  13293. });
  13294. } else {
  13295. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13296. this.chapCount
  13297. ].chapterData.unshift({
  13298. name: this.chapTools[0].toolDetail,
  13299. url: this.chapTools[0].tools,
  13300. type: 7,
  13301. });
  13302. }
  13303. this.imgChange1(null, null, 7, this.chapCount);
  13304. this.dialogVisible4 = false;
  13305. },
  13306. addTools(i, itemTaskIndex, toolIndex) {
  13307. // if (
  13308. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13309. // .toolChoose[toolIndex].tool.length == 0
  13310. // ) {
  13311. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13312. // itemTaskIndex
  13313. // ].toolChoose[toolIndex].tool.push(i);
  13314. // } else {
  13315. // if (
  13316. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13317. // itemTaskIndex
  13318. // ].toolChoose[toolIndex].tool.indexOf(i) != -1
  13319. // ) {
  13320. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13321. // itemTaskIndex
  13322. // ].toolChoose[toolIndex].tool.splice(
  13323. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13324. // itemTaskIndex
  13325. // ].toolChoose[toolIndex].tool.indexOf(i),
  13326. // 1
  13327. // );
  13328. // } else {
  13329. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13330. // itemTaskIndex
  13331. // ].toolChoose[toolIndex].tool.push(i);
  13332. // }
  13333. // console.log(
  13334. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13335. // .toolChoose[toolIndex].tool
  13336. // );
  13337. // }
  13338. if (i == 4) {
  13339. if (
  13340. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13341. .toolChoose[toolIndex].askJson.askTitle == "" ||
  13342. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13343. .toolChoose[toolIndex].askJson[0].askstitle == "" ||
  13344. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13345. .toolChoose[toolIndex].askJson[0].checkList < 2
  13346. ) {
  13347. this.openTools(itemTaskIndex, 4, toolIndex);
  13348. // this.$message({
  13349. // message: "请填写完整问卷内容",
  13350. // type: "error",
  13351. // });
  13352. return;
  13353. }
  13354. }
  13355. if (i == 45) {
  13356. if (
  13357. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13358. .toolChoose[toolIndex].testJson ||
  13359. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13360. .toolChoose[toolIndex].testJson.testJson[0].teststitle == "" ||
  13361. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13362. .toolChoose[toolIndex].testJson.testJson[0].checkList < 2
  13363. ) {
  13364. this.openTools(itemTaskIndex, 45, toolIndex);
  13365. // this.$message({
  13366. // message: "请填写完整问卷内容",
  13367. // type: "error",
  13368. // });
  13369. return;
  13370. }
  13371. }
  13372. if (i == 47) {
  13373. if (
  13374. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13375. .toolChoose[toolIndex].sentenceList ||
  13376. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13377. .toolChoose[toolIndex].sentenceList[0].rightAnswer == 0
  13378. ) {
  13379. this.openTools(itemTaskIndex, 47, toolIndex);
  13380. return;
  13381. }
  13382. }
  13383. if (i == 69) {
  13384. if (
  13385. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13386. .toolChoose[toolIndex].englishList
  13387. ) {
  13388. this.openTools(itemTaskIndex, 69, toolIndex);
  13389. return;
  13390. }
  13391. }
  13392. if (i == 70) {
  13393. if (
  13394. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13395. .toolChoose[toolIndex].englishVoiceJson
  13396. ) {
  13397. this.openTools(itemTaskIndex, 70, toolIndex);
  13398. return;
  13399. }
  13400. }
  13401. // if (i == 48) {
  13402. // if (
  13403. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13404. // .toolChoose[toolIndex].tableJson
  13405. // ) {
  13406. // this.openTools(itemTaskIndex, 48, toolIndex);
  13407. // return;
  13408. // }
  13409. // }
  13410. // if (i == 50) {
  13411. // if (
  13412. // !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13413. // .toolChoose[toolIndex].uploadJson
  13414. // ) {
  13415. // this.openTools(itemTaskIndex, 50, toolIndex);
  13416. // return;
  13417. // }
  13418. // }
  13419. if (i == 49) {
  13420. if (
  13421. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13422. .toolChoose[toolIndex].groupJson
  13423. ) {
  13424. this.openTools(itemTaskIndex, 49, toolIndex);
  13425. return;
  13426. }
  13427. }
  13428. if (i == 62) {
  13429. if (
  13430. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13431. .toolChoose[toolIndex].videoJson
  13432. ) {
  13433. this.openTools(itemTaskIndex, 62, toolIndex);
  13434. return;
  13435. }
  13436. }
  13437. if (i == 15) {
  13438. if (
  13439. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13440. .toolChoose[toolIndex].answerQ ||
  13441. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13442. .toolChoose[toolIndex].answerQ == ""
  13443. ) {
  13444. this.openTools(itemTaskIndex, 15, toolIndex);
  13445. // this.$message({
  13446. // message: "请填写问答内容",
  13447. // type: "error",
  13448. // });
  13449. return;
  13450. }
  13451. }
  13452. if (i == 40) {
  13453. if (
  13454. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13455. .toolChoose[toolIndex].rateJson ||
  13456. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13457. .toolChoose[toolIndex].rateJson.length
  13458. ) {
  13459. this.openTools(itemTaskIndex, 40, toolIndex);
  13460. return;
  13461. }
  13462. }
  13463. if (i == 41) {
  13464. if (
  13465. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13466. .toolChoose[toolIndex].selectJson ||
  13467. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13468. .toolChoose[toolIndex].selectJson.url == "" ||
  13469. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13470. .toolChoose[toolIndex].selectJson.select.length ||
  13471. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13472. .toolChoose[toolIndex].selectJson.answer.length
  13473. ) {
  13474. this.openTools(itemTaskIndex, 41, toolIndex);
  13475. return;
  13476. }
  13477. }
  13478. if (i == 42) {
  13479. if (
  13480. !this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13481. .toolChoose[toolIndex].answerQ ||
  13482. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13483. .toolChoose[toolIndex].answerQ == ""
  13484. ) {
  13485. this.openTools(itemTaskIndex, 42, toolIndex);
  13486. return;
  13487. }
  13488. }
  13489. if (
  13490. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
  13491. .toolChoose[toolIndex].tool.length > 0
  13492. ) {
  13493. if (
  13494. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13495. itemTaskIndex
  13496. ].toolChoose[toolIndex].tool.indexOf(i) != -1
  13497. ) {
  13498. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13499. itemTaskIndex
  13500. ].toolChoose[toolIndex].tool.splice(
  13501. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13502. itemTaskIndex
  13503. ].toolChoose[toolIndex].tool.indexOf(i),
  13504. 1
  13505. );
  13506. } else {
  13507. // this.$message({
  13508. // message: "每个工具只能添加一个",
  13509. // type: "error",
  13510. // });
  13511. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13512. itemTaskIndex
  13513. ].toolChoose[toolIndex].tool = [];
  13514. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13515. itemTaskIndex
  13516. ].toolChoose[toolIndex].tool.push(i);
  13517. }
  13518. } else {
  13519. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13520. itemTaskIndex
  13521. ].toolChoose[toolIndex].tool.push(i);
  13522. }
  13523. this.$forceUpdate();
  13524. },
  13525. addAskList(index) {
  13526. this.askJson.askJson.splice(index + 1, 0, {
  13527. askstitle: "",
  13528. askItem: 1,
  13529. checkList: [],
  13530. });
  13531. this.askJson.askCount++;
  13532. },
  13533. addTestList(index) {
  13534. this.testJson.testJson.splice(index + 1, 0, {
  13535. teststitle: "",
  13536. testItem: 1,
  13537. checkList: [],
  13538. timuList: [],
  13539. answer: [],
  13540. type: "1",
  13541. });
  13542. this.testJson.testCount++;
  13543. },
  13544. deleteAskList(index) {
  13545. if (
  13546. !this.askJson.askJson[index].askstitle &&
  13547. this.askJson.askJson[index].askItem == 1 &&
  13548. !this.askJson.askJson[index].checkList[0]
  13549. ) {
  13550. this.askJson.askJson.splice(index, 1);
  13551. this.askJson.askCount--;
  13552. } else {
  13553. let _this = this;
  13554. _this
  13555. .$confirm("此操作不可撤销,是否继续?", "提示", {
  13556. confirmButtonText: "确定",
  13557. cancelButtonText: "取消",
  13558. type: "warning",
  13559. })
  13560. .then(() => {
  13561. _this.askJson.askJson.splice(index, 1);
  13562. _this.askJson.askCount--;
  13563. })
  13564. .catch(() => {
  13565. return;
  13566. });
  13567. }
  13568. },
  13569. deleteTestList(index) {
  13570. if (
  13571. !this.testJson.testJson[index].teststitle &&
  13572. this.testJson.testJson[index].testItem == 1 &&
  13573. !this.testJson.testJson[index].checkList[0]
  13574. ) {
  13575. this.testJson.testJson.splice(index, 1);
  13576. this.testJson.testCount--;
  13577. } else {
  13578. let _this = this;
  13579. _this
  13580. .$confirm("此操作不可撤销,是否继续?", "提示", {
  13581. confirmButtonText: "确定",
  13582. cancelButtonText: "取消",
  13583. type: "warning",
  13584. })
  13585. .then(() => {
  13586. _this.testJson.testJson.splice(index, 1);
  13587. _this.testJson.testCount--;
  13588. })
  13589. .catch(() => {
  13590. return;
  13591. });
  13592. }
  13593. },
  13594. askMove(type, index) {
  13595. if (type == 1) {
  13596. if (index > 0) {
  13597. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index - 1]));
  13598. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  13599. this.askJson.askJson[index - 1] = b;
  13600. this.askJson.askJson[index] = a;
  13601. }
  13602. } else {
  13603. if (index < this.askJson.askJson.length - 1) {
  13604. let a = JSON.parse(JSON.stringify(this.askJson.askJson[index + 1]));
  13605. let b = JSON.parse(JSON.stringify(this.askJson.askJson[index]));
  13606. this.askJson.askJson[index + 1] = b;
  13607. this.askJson.askJson[index] = a;
  13608. }
  13609. }
  13610. this.$forceUpdate();
  13611. },
  13612. checkMove(type, index, checkIndex) {
  13613. if (type == 1) {
  13614. if (checkIndex > 0) {
  13615. let a = JSON.parse(
  13616. JSON.stringify(
  13617. this.askJson.askJson[index].checkList[checkIndex - 1]
  13618. )
  13619. );
  13620. let b = JSON.parse(
  13621. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  13622. );
  13623. this.askJson.askJson[index].checkList[checkIndex - 1] = b;
  13624. this.askJson.askJson[index].checkList[checkIndex] = a;
  13625. }
  13626. } else {
  13627. if (checkIndex < this.askJson.askJson[index].checkList.length - 1) {
  13628. let a = JSON.parse(
  13629. JSON.stringify(
  13630. this.askJson.askJson[index].checkList[checkIndex + 1]
  13631. )
  13632. );
  13633. let b = JSON.parse(
  13634. JSON.stringify(this.askJson.askJson[index].checkList[checkIndex])
  13635. );
  13636. this.askJson.askJson[index].checkList[checkIndex + 1] = b;
  13637. this.askJson.askJson[index].checkList[checkIndex] = a;
  13638. }
  13639. }
  13640. this.$forceUpdate();
  13641. },
  13642. testMove(type, index) {
  13643. if (type == 1) {
  13644. if (index > 0) {
  13645. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index - 1]));
  13646. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  13647. this.testJson.testJson[index - 1] = b;
  13648. this.testJson.testJson[index] = a;
  13649. }
  13650. } else {
  13651. if (index < this.testJson.testJson.length - 1) {
  13652. let a = JSON.parse(JSON.stringify(this.testJson.testJson[index + 1]));
  13653. let b = JSON.parse(JSON.stringify(this.testJson.testJson[index]));
  13654. this.testJson.testJson[index + 1] = b;
  13655. this.testJson.testJson[index] = a;
  13656. }
  13657. }
  13658. this.$forceUpdate();
  13659. },
  13660. tcheckMove(type, index, checkIndex) {
  13661. if (type == 1) {
  13662. if (checkIndex > 0) {
  13663. let a = JSON.parse(
  13664. JSON.stringify(
  13665. this.testJson.testJson[index].checkList[checkIndex - 1]
  13666. )
  13667. );
  13668. let b = JSON.parse(
  13669. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  13670. );
  13671. this.testJson.testJson[index].checkList[checkIndex - 1] = b;
  13672. this.testJson.testJson[index].checkList[checkIndex] = a;
  13673. }
  13674. } else {
  13675. if (checkIndex < this.testJson.testJson[index].checkList.length - 1) {
  13676. let a = JSON.parse(
  13677. JSON.stringify(
  13678. this.testJson.testJson[index].checkList[checkIndex + 1]
  13679. )
  13680. );
  13681. let b = JSON.parse(
  13682. JSON.stringify(this.testJson.testJson[index].checkList[checkIndex])
  13683. );
  13684. this.testJson.testJson[index].checkList[checkIndex + 1] = b;
  13685. this.testJson.testJson[index].checkList[checkIndex] = a;
  13686. }
  13687. }
  13688. this.$forceUpdate();
  13689. },
  13690. addcheckList(json, index) {
  13691. // json.checkList.length++;
  13692. json.checkList.splice(index + 1, 0, "");
  13693. json.askItem++;
  13694. this.$forceUpdate();
  13695. },
  13696. deletecheckList(json, index) {
  13697. // json.checkList.length--;
  13698. json.checkList.splice(index, 1);
  13699. json.askItem--;
  13700. this.$forceUpdate();
  13701. },
  13702. addTcheckList(json, index) {
  13703. // json.checkList.length++;
  13704. json.checkList.splice(index + 1, 0, "");
  13705. json.testItem++;
  13706. this.$forceUpdate();
  13707. },
  13708. deleteTcheckList(json, index) {
  13709. // json.checkList.length--;
  13710. json.checkList.splice(index, 1);
  13711. json.testItem--;
  13712. this.$forceUpdate();
  13713. },
  13714. checkTestType(type, json) {
  13715. json.type = type;
  13716. setTimeout(() => {
  13717. json.answer = [];
  13718. }, 100);
  13719. },
  13720. checkAskType(type, json) {
  13721. json.type = type;
  13722. // json.checkList = [];
  13723. this.$forceUpdate();
  13724. },
  13725. addSelectList(json) {
  13726. json.select.push("");
  13727. json.answer.push("");
  13728. },
  13729. deleteSelectList(json) {
  13730. // json.select.length--;
  13731. // json.answer.length--;
  13732. json.select.splice(json.select.length - 1, 1);
  13733. json.answer.splice(json.answer.length - 1, 1);
  13734. },
  13735. addAsk() {
  13736. if (this.askJson.askTitle === "") {
  13737. this.$message.error("标题不能为空!");
  13738. return;
  13739. }
  13740. var aj = this.askJson.askJson;
  13741. var b = 1;
  13742. for (var i = 0; i < aj.length; i++) {
  13743. if (aj[i].askstitle === "") {
  13744. var a = 1;
  13745. for (let index = 0; index < aj[i].askItem; index++) {
  13746. const element = aj[i].checkList[index]
  13747. ? aj[i].checkList[index]
  13748. : "";
  13749. if (element != "") {
  13750. b++;
  13751. this.$message.error(`请将题目${i + 1}填写完整。`);
  13752. return;
  13753. } else {
  13754. a++;
  13755. }
  13756. }
  13757. if (b == 1) {
  13758. this.$message.error("至少填写一个问题");
  13759. return;
  13760. }
  13761. } else if (aj[i].askstitle != "") {
  13762. for (let index = 0; index < aj[i].askItem; index++) {
  13763. const element = aj[i].checkList[index]
  13764. ? aj[i].checkList[index]
  13765. : "";
  13766. var index = 0;
  13767. for (var z = 0; z < aj[i].checkList.length; z++) {
  13768. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13769. if (checkC != "") {
  13770. index++;
  13771. } else {
  13772. this.$message.error(`题目${i + 1}选项不能为空!`);
  13773. return;
  13774. }
  13775. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13776. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13777. if (checkC == checkC2) {
  13778. this.$message.error(
  13779. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13780. );
  13781. return;
  13782. }
  13783. }
  13784. }
  13785. b++;
  13786. if (index < 2) {
  13787. this.$message.error("每道题目至少需要设置2个选项。");
  13788. return;
  13789. }
  13790. }
  13791. }
  13792. }
  13793. this.askJson.askJson = this.askJson.askJson.filter((el) => {
  13794. var elc = el.checkList.filter((element) => {
  13795. return element != "";
  13796. });
  13797. return el.askstitle != "" && elc.length != 0;
  13798. });
  13799. if (!this.dialogVisible4) {
  13800. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13801. this.taskCount
  13802. ].toolChoose[this.toolIndex] = this.askJson;
  13803. }
  13804. this.dialogVisible5 = false;
  13805. if (
  13806. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13807. .toolChoose[this.toolIndex].tool != 4
  13808. ) {
  13809. this.addTools(4, this.taskCount, this.toolIndex);
  13810. }
  13811. },
  13812. addTest() {
  13813. // if (this.testJson.testTitle === "") {
  13814. // this.$message.error("标题不能为空!");
  13815. // return;
  13816. // }
  13817. var aj = this.testJson.testJson;
  13818. var b = 1;
  13819. for (var i = 0; i < aj.length; i++) {
  13820. if (aj[i].teststitle === "" && aj[i].timuList.length == 0) {
  13821. var a = 1;
  13822. for (let index = 0; index < aj[i].testItem; index++) {
  13823. const element = aj[i].checkList[index]
  13824. ? aj[i].checkList[index]
  13825. : "";
  13826. if (element != "") {
  13827. b++;
  13828. this.$message.error(`请将题目${i + 1}填写完整。`);
  13829. return;
  13830. } else {
  13831. a++;
  13832. }
  13833. }
  13834. if (b == 1) {
  13835. this.$message.error("至少填写一个问题");
  13836. return;
  13837. }
  13838. } else if (aj[i].teststitle != "" || aj[i].timuList.length > 0) {
  13839. for (let index = 0; index < aj[i].testItem; index++) {
  13840. const element = aj[i].checkList[index]
  13841. ? aj[i].checkList[index]
  13842. : "";
  13843. var index = 0;
  13844. for (var z = 0; z < aj[i].checkList.length; z++) {
  13845. var checkC = aj[i].checkList[z] ? aj[i].checkList[z] : "";
  13846. if (checkC != "") {
  13847. index++;
  13848. } else {
  13849. this.$message.error(`题目${i + 1}选项不能为空!`);
  13850. return;
  13851. }
  13852. for (var z2 = z + 1; z2 < aj[i].checkList.length; z2++) {
  13853. let checkC2 = aj[i].checkList[z2] ? aj[i].checkList[z2] : "";
  13854. if (checkC == checkC2) {
  13855. this.$message.error(
  13856. `第${i + 1}题的选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  13857. );
  13858. return;
  13859. }
  13860. }
  13861. }
  13862. b++;
  13863. if (index < 2) {
  13864. this.$message.error("每道题目至少需要设置2个选项。");
  13865. return;
  13866. }
  13867. if (
  13868. (aj[i].type == "2" && !aj[i].answer.length) ||
  13869. (aj[i].type == "1" &&
  13870. ((typeof aj[i].answer == "object" && !aj[i].answer.length) ||
  13871. (aj[i].answer !== 0 && !aj[i].answer)))
  13872. ) {
  13873. this.$message.error(`请将题目${i + 1}的正确选项设置完整`);
  13874. return;
  13875. }
  13876. }
  13877. }
  13878. }
  13879. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13880. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13881. var elc = el.checkList.filter((element) => {
  13882. return element != "";
  13883. });
  13884. return (
  13885. (el.teststitle != "" || el.timuList.length > 0) && elc.length != 0
  13886. );
  13887. });
  13888. isTestJson.testCount = isTestJson.testJson.length;
  13889. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13890. this.taskCount
  13891. ].toolChoose[this.toolIndex].testJson = isTestJson;
  13892. this.dialogVisibleChoice = false;
  13893. if (
  13894. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13895. .toolChoose[this.toolIndex].tool != 45
  13896. ) {
  13897. this.addTools(45, this.taskCount, this.toolIndex);
  13898. }
  13899. },
  13900. addVideoJson(videoJson) {
  13901. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  13902. this.taskCount
  13903. ].toolChoose[this.toolIndex].videoJson = videoJson;
  13904. this.dialogVisibleVideo = false;
  13905. if (
  13906. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  13907. .toolChoose[this.toolIndex].tool != 62
  13908. ) {
  13909. this.addTools(62, this.taskCount, this.toolIndex);
  13910. }
  13911. },
  13912. //自动获取剪贴板
  13913. pasteOption() {
  13914. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13915. if (!iframe) {
  13916. this.$message.error("请使用AI共创生成题目");
  13917. return;
  13918. }
  13919. let copyData = iframe.contentWindow.copyData;
  13920. if (!copyData || !copyData.selectData.length) {
  13921. this.$message.error("请使用AI共创生成题目");
  13922. return;
  13923. }
  13924. let selectData = copyData.selectData;
  13925. for (var i = 0; i < selectData.length; i++) {
  13926. let answer = 0;
  13927. switch (selectData[i].answer[0]) {
  13928. case "A":
  13929. answer = 0;
  13930. break;
  13931. case "B":
  13932. answer = 1;
  13933. break;
  13934. case "C":
  13935. answer = 2;
  13936. break;
  13937. case "D":
  13938. answer = 3;
  13939. break;
  13940. case "E":
  13941. answer = 4;
  13942. break;
  13943. default:
  13944. break;
  13945. }
  13946. this.testJson.testJson.push({
  13947. teststitle: selectData[i].subject,
  13948. testItem: selectData[i].options.length,
  13949. checkList: selectData[i].options,
  13950. timuList: [],
  13951. answer: answer,
  13952. type: "1",
  13953. });
  13954. this.testJson.testCount++;
  13955. }
  13956. var isTestJson = JSON.parse(JSON.stringify(this.testJson));
  13957. isTestJson.testJson = this.testJson.testJson.filter((el) => {
  13958. var elc = el.checkList.filter((element) => {
  13959. return element != "";
  13960. });
  13961. return el.teststitle != "" || el.timuList.length > 0 || elc.length != 0;
  13962. });
  13963. isTestJson.testCount = isTestJson.testJson.length;
  13964. if (!isTestJson.testCount) {
  13965. return;
  13966. }
  13967. this.testJson = isTestJson;
  13968. this.$forceUpdate();
  13969. },
  13970. pasteTask(taskJson) {
  13971. let stageTasksData = [];
  13972. if (taskJson) {
  13973. stageTasksData = taskJson;
  13974. } else {
  13975. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  13976. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  13977. if (!iframe && !iframe2) {
  13978. this.$message.error("请使用AI共创生成");
  13979. return;
  13980. }
  13981. let copyData = iframe ? iframe.contentWindow.copyData : false;
  13982. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  13983. if (
  13984. (!copyData || !copyData.tasksData || !copyData.tasksData.length) &&
  13985. (!copyData2 || !copyData2.tasksData || !copyData2.tasksData.length)
  13986. ) {
  13987. this.$message.error("请使用AI共创生成");
  13988. return;
  13989. }
  13990. stageTasksData = copyData
  13991. ? copyData.tasksData
  13992. : copyData2
  13993. ? copyData2.tasksData
  13994. : [{ taskName: "", taskDecs: "" }];
  13995. }
  13996. let taskA = [];
  13997. let tasks = stageTasksData;
  13998. for (var j = 0; j < tasks.length; j++) {
  13999. taskA.push({
  14000. task: tasks[j].taskName,
  14001. taskDetail: tasks[j].taskDecs,
  14002. chapterData: [],
  14003. toolText: "",
  14004. toolChoose: [
  14005. {
  14006. tool: [],
  14007. toolDetail: "",
  14008. toolType: 0,
  14009. askCount: 1,
  14010. askTitle: "",
  14011. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14012. },
  14013. ],
  14014. isShowTools: false,
  14015. askCount: 1,
  14016. isFold: 1,
  14017. askTitle: "",
  14018. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14019. checkJson: [{ checkCount: [], checkPerent: [] }],
  14020. homeworkList: [],
  14021. });
  14022. }
  14023. this.unitJson[this.unitIndex].chapterInfo[0].taskJson = taskA;
  14024. this.$forceUpdate();
  14025. },
  14026. pasteStage(stageJson) {
  14027. let stageData = [];
  14028. if (stageJson) {
  14029. stageData = stageJson;
  14030. } else {
  14031. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  14032. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  14033. if (!iframe && !iframe2) {
  14034. this.$message.error("请使用AI共创生成");
  14035. return;
  14036. }
  14037. let copyData = iframe ? iframe.contentWindow.copyData : false;
  14038. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  14039. if (
  14040. (!copyData || !copyData.stageData || !copyData.stageData.length) &&
  14041. (!copyData2 || !copyData2.stageData || !copyData2.stageData.length)
  14042. ) {
  14043. this.$message.error("请使用AI共创生成");
  14044. return;
  14045. }
  14046. stageData = copyData
  14047. ? copyData.stageData
  14048. : copyData2
  14049. ? copyData2.stageData
  14050. : [""];
  14051. }
  14052. let stage = [];
  14053. for (var i = 0; i < stageData.length; i++) {
  14054. stage.push({
  14055. dyName: stageData[i], //单元标题
  14056. chapterInfo: [
  14057. {
  14058. isread: false,
  14059. chapterid: this.guid(),
  14060. title: "",
  14061. courseName: "",
  14062. taskJson: [
  14063. {
  14064. task: "",
  14065. taskDetail: "",
  14066. chapterData: [],
  14067. toolText: "",
  14068. toolChoose: [
  14069. {
  14070. tool: [],
  14071. toolDetail: "",
  14072. toolType: 0,
  14073. askCount: 1,
  14074. askTitle: "",
  14075. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14076. },
  14077. ],
  14078. isShowTools: false,
  14079. askCount: 1,
  14080. isFold: 1,
  14081. askTitle: "",
  14082. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  14083. checkJson: [{ checkCount: [], checkPerent: [] }],
  14084. homeworkList: [],
  14085. },
  14086. ],
  14087. itemCount: 1,
  14088. fileList1: [],
  14089. video: [],
  14090. testData: [],
  14091. pData: [],
  14092. templateArray: [],
  14093. },
  14094. ],
  14095. });
  14096. }
  14097. let _this = this;
  14098. if (stageJson) {
  14099. if (!_this.cid) {
  14100. _this.unitJson = stage;
  14101. } else {
  14102. _this.unitIndex = 0;
  14103. _this.unitJson = stage;
  14104. _this.updateWork();
  14105. }
  14106. } else {
  14107. _this
  14108. .$confirm(
  14109. "确定选择智能粘贴模板吗?修改课程时无法重置课程模板。",
  14110. "提示",
  14111. {
  14112. confirmButtonText: "确定",
  14113. cancelButtonText: "取消",
  14114. type: "warning",
  14115. }
  14116. )
  14117. .then(() => {
  14118. _this.unitIndex = 0;
  14119. _this.unitJson = stage;
  14120. // _this.steps++;
  14121. _this.updateWork();
  14122. })
  14123. .catch(() => {
  14124. return;
  14125. });
  14126. }
  14127. },
  14128. openStageBox() {
  14129. this.unitJson3 = JSON.parse(JSON.stringify(this.unitJson));
  14130. this.dialogVisibleStageChange = true;
  14131. },
  14132. updateChange() {
  14133. this.$confirm(
  14134. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  14135. "提示",
  14136. {
  14137. confirmButtonText: "确定",
  14138. cancelButtonText: "取消",
  14139. type: "warning",
  14140. }
  14141. )
  14142. .then(() => {
  14143. this.unitJson = JSON.parse(JSON.stringify(this.unitJson3));
  14144. this.updateWork();
  14145. this.dialogVisibleStageChange = false;
  14146. })
  14147. .catch(() => {
  14148. return;
  14149. });
  14150. },
  14151. addAnswer() {
  14152. if (this.answerQ == "") {
  14153. this.$message.error("请输入您想要问的问题");
  14154. return;
  14155. }
  14156. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14157. this.taskCount
  14158. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  14159. this.dialogVisible8 = false;
  14160. if (
  14161. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14162. .toolChoose[this.toolIndex].tool != 15
  14163. ) {
  14164. this.addTools(15, this.taskCount, this.toolIndex);
  14165. }
  14166. },
  14167. addMp3Answer() {
  14168. if (this.answerQ == "") {
  14169. this.$message.error("请输入您想要回答的问题");
  14170. return;
  14171. }
  14172. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14173. this.taskCount
  14174. ].toolChoose[this.toolIndex].answerQ = this.answerQ;
  14175. this.dialogVisibleMp3 = false;
  14176. },
  14177. addRateAnswer() {
  14178. var a = 1;
  14179. for (var i = 0; i < this.rateJson.length; i++) {
  14180. if (this.rateJson[i].value == "") {
  14181. a = 2;
  14182. break;
  14183. }
  14184. }
  14185. if (a == 2) {
  14186. this.$message.error("请把评价信息填写完整");
  14187. return;
  14188. }
  14189. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14190. this.taskCount
  14191. ].toolChoose[this.toolIndex].rateJson = this.rateJson;
  14192. this.dialogVisibleRate = false;
  14193. if (
  14194. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14195. .toolChoose[this.toolIndex].tool != 40
  14196. ) {
  14197. this.addTools(40, this.taskCount, this.toolIndex);
  14198. }
  14199. },
  14200. addSelectAnswer() {
  14201. if (this.selectJson.url == "") {
  14202. this.$message.error("请上传题目");
  14203. return;
  14204. }
  14205. if (!this.selectJson.select.length) {
  14206. this.$message.error("请添加选项");
  14207. return;
  14208. }
  14209. if (!this.selectJson.answer.length) {
  14210. this.$message.error("请设置答案");
  14211. return;
  14212. }
  14213. var a = 1;
  14214. for (var i = 0; i < this.selectJson.answer.length; i++) {
  14215. if (!this.selectJson.answer[i] && this.selectJson.answer[i] !== 0) {
  14216. a = 2;
  14217. }
  14218. }
  14219. if (a == 2) {
  14220. this.$message.error("请设置答案");
  14221. return;
  14222. }
  14223. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  14224. this.taskCount
  14225. ].toolChoose[this.toolIndex].selectJson = this.selectJson;
  14226. this.dialogVisibleSelect = false;
  14227. if (
  14228. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  14229. .toolChoose[this.toolIndex].tool != 41
  14230. ) {
  14231. this.addTools(41, this.taskCount, this.toolIndex);
  14232. }
  14233. },
  14234. nextSelectSteps() {
  14235. if (this.selectJson.url == "") {
  14236. this.$message.error("请上传题目");
  14237. return;
  14238. }
  14239. if (!this.selectJson.select.length) {
  14240. this.$message.error("请添加选项");
  14241. return;
  14242. } else {
  14243. for (var z = 0; z < this.selectJson.select.length; z++) {
  14244. let checkC = this.selectJson.select[z];
  14245. for (var z2 = z + 1; z2 < this.selectJson.select.length; z2++) {
  14246. let checkC2 = this.selectJson.select[z2];
  14247. if (checkC == checkC2) {
  14248. this.$message.error(
  14249. `选项${z + 1}和选项${z2 + 1}重复了,请修改!`
  14250. );
  14251. return;
  14252. }
  14253. }
  14254. }
  14255. }
  14256. var a = 1;
  14257. for (var i = 0; i < this.selectJson.select.length; i++) {
  14258. if (!this.selectJson.select[i]) {
  14259. a = 2;
  14260. }
  14261. }
  14262. if (a == 2) {
  14263. this.$message.error("添加的选项不能为空");
  14264. return;
  14265. }
  14266. this.selectSteps++;
  14267. },
  14268. selectCourseDetail() {
  14269. if (this.cid == "" || this.cid == undefined) {
  14270. if (this.oid == '4c686762-1d0a-11ed-8c78-005056b86db5') {
  14271. this.isTeacherSee = true;
  14272. }
  14273. console.log("这是新增课程");
  14274. this.selectAllType();
  14275. this.chatid = uuidv4();
  14276. // this.courseTextB = false
  14277. } else {
  14278. this.isOutline = true
  14279. this.isOutline2 = true
  14280. this.cpoteType = 4
  14281. this.cidType = 1;
  14282. let params = {
  14283. cid: this.cid,
  14284. };
  14285. this.ajax
  14286. .get(this.$store.state.api + "select_course_detail", params)
  14287. .then((res) => {
  14288. this.unitJson = JSON.parse(res.data[0][0].chapters);
  14289. this.courseState = res.data[0][0].state;
  14290. for (var j = 0; j < this.unitJson.length; j++) {
  14291. for (
  14292. var k = 0;
  14293. k < this.unitJson[j].chapterInfo[0].taskJson.length;
  14294. k++
  14295. ) {
  14296. this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose = this
  14297. .unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14298. ? this.unitJson[j].chapterInfo[0].taskJson[k].toolChoose
  14299. : [];
  14300. let _chapterData = [];
  14301. for (
  14302. var c = 0;
  14303. c <
  14304. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData
  14305. .length;
  14306. c++
  14307. ) {
  14308. if (
  14309. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14310. ) {
  14311. _chapterData.push(
  14312. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData[c]
  14313. );
  14314. }
  14315. }
  14316. this.unitJson[j].chapterInfo[0].taskJson[k].chapterData =
  14317. _chapterData;
  14318. }
  14319. }
  14320. this.$forceUpdate();
  14321. this.courseName = res.data[0][0].title;
  14322. this.courseText = res.data[0][0].brief;
  14323. this.courseText2 = res.data[0][0].reBrief;
  14324. this.evalua = res.data[0][0].evaId;
  14325. this.cover = JSON.parse(res.data[0][0].cover);
  14326. this.noneBtnImg = this.cover.length >= 1;
  14327. if (res.data[0][0].refile) {
  14328. this.infoData = JSON.parse(res.data[0][0].refile)
  14329. }
  14330. // this.checkboxList =
  14331. // res.data[0][0].course_student.length > 0
  14332. // ? JSON.parse(res.data[0][0].course_student)
  14333. // : [];
  14334. this.checkboxList2 = res.data[0][0].juri
  14335. ? res.data[0][0].juri.split(",")
  14336. : [];
  14337. this.inviteCode = [];
  14338. for (var i = 0; i < res.data[2].length; i++) {
  14339. this.inviteCode.push({
  14340. cid: res.data[2][i].classid,
  14341. ic: res.data[2][i].code,
  14342. });
  14343. }
  14344. this.checkboxList3 = res.data[0][0].course_teacher
  14345. ? res.data[0][0].course_teacher.split(",")
  14346. : [];
  14347. // this.isTeacherSee =
  14348. // res.data[0][0].is_teacher_look == 0 ? true : false;
  14349. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  14350. this.myWord = res.data[0][0].template;
  14351. this.templateC.id = "123";
  14352. this.courseUserid = res.data[0][0].userid;
  14353. // if(this.courseUserid == this.userid){
  14354. // this.InviteChange(this.checkboxList2)
  14355. // }
  14356. this.nbOrder = res.data[0][0].ordernumber;
  14357. this.courseTypeId = [];
  14358. for (var i = 0; i < res.data[1].length; i++) {
  14359. this.courseTypeId.push(res.data[1][i].typeid);
  14360. }
  14361. console.log(this.courseTypeId);
  14362. // if (this.timer) clearInterval(this.timer);
  14363. if (this.timer) clearTimeout(this.timer);
  14364. this.timer = null;
  14365. // this.timer = setInterval(() => {
  14366. if(res.data[3].length){
  14367. try {
  14368. this.aiJson = JSON.parse(res.data[3][0].tips);
  14369. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  14370. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  14371. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14372. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  14373. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  14374. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14375. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  14376. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  14377. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  14378. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  14379. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  14380. }
  14381. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  14382. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  14383. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  14384. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14385. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14386. this.templateid = res.data[3][0].template;
  14387. this.getTipsTemplateIsDialog()
  14388. }catch(error){
  14389. console.error(error)
  14390. }
  14391. }
  14392. if(res.data[0][0].cpote){
  14393. try {
  14394. this.cpote = JSON.parse(res.data[0][0].cpote);
  14395. }catch(error){
  14396. console.error(error)
  14397. }
  14398. }
  14399. if(res.data[0][0].setting){
  14400. try {
  14401. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14402. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14403. this.teacherInfoData = JSON.parse(res.data[0][0].setting).teacherInfoData ? JSON.parse(res.data[0][0].setting).teacherInfoData : [];
  14404. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14405. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14406. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14407. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14408. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14409. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14410. this.infoData2 = JSON.parse(res.data[0][0].setting).infoData2 ? JSON.parse(res.data[0][0].setting).infoData2 : [];
  14411. 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;
  14412. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14413. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14414. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14415. 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;
  14416. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  14417. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  14418. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  14419. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  14420. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14421. this.courseTextBool = true
  14422. }
  14423. // if(!this.teacherCourseText && !this.targetCourseText2){
  14424. // this.isuseT = 1
  14425. // }
  14426. }catch(error){
  14427. console.error(error)
  14428. }
  14429. }
  14430. if(this.courseText){
  14431. this.courseTextB = false
  14432. }
  14433. if(this.teacherCourseText){
  14434. this.teacherCourseTextB = false
  14435. }
  14436. if(this.targetCourseText){
  14437. this.targetCourseTextB = false
  14438. }
  14439. if(this.targetCourseText2){
  14440. this.targetCourseText2B = false
  14441. }
  14442. this.isFileSearch = res.data[0][0].iresearch == 1
  14443. // this.seleteCourseUpdate();
  14444. this.setMan();
  14445. this.selectAllType();
  14446. this.unitJson[
  14447. this.unitIndex
  14448. ].chapterInfo[0].taskJson[0].toolOpen = true;
  14449. // }, 5000);
  14450. this.$forceUpdate();
  14451. setTimeout(() => {
  14452. this.checkEva(this.evalua);
  14453. setTimeout(() => {
  14454. this.checkEva(this.evalua);
  14455. }, 100);
  14456. }, 100);
  14457. })
  14458. .catch((err) => {
  14459. console.error(err);
  14460. });
  14461. }
  14462. if(this.aiId){
  14463. let params = {
  14464. cid: this.aiId,
  14465. };
  14466. this.ajax
  14467. .get(this.$store.state.api + "select_course_detail", params)
  14468. .then((res) => {
  14469. let _unitJson = JSON.parse(res.data[0][0].chapters);
  14470. let fileInfo = []
  14471. var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT','PDF']
  14472. for(var i = 0; i < _unitJson.length; i++){
  14473. let tasks = _unitJson[i].chapterInfo[0].taskJson
  14474. for(var j = 0; j < tasks.length; j++){
  14475. let _infoData = tasks[j].chapterData.filter(el => {
  14476. return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
  14477. })
  14478. if(_infoData.length){
  14479. fileInfo = [...fileInfo, ..._infoData]
  14480. }
  14481. }
  14482. }
  14483. this.teacherInfoData = this.infoData2 = this.infoData = fileInfo
  14484. this.$forceUpdate();
  14485. this.courseName = res.data[0][0].title;
  14486. this.courseText = res.data[0][0].brief;
  14487. this.courseText2 = res.data[0][0].reBrief;
  14488. this.cover = JSON.parse(res.data[0][0].cover);
  14489. this.noneBtnImg = this.cover.length >= 1;
  14490. this.checkboxList2 = res.data[0][0].juri
  14491. ? res.data[0][0].juri.split(",")
  14492. : [];
  14493. this.inviteCode = [];
  14494. for (var i = 0; i < res.data[2].length; i++) {
  14495. this.inviteCode.push({
  14496. cid: res.data[2][i].classid,
  14497. ic: res.data[2][i].code,
  14498. });
  14499. }
  14500. this.checkboxList3 = res.data[0][0].course_teacher
  14501. ? res.data[0][0].course_teacher.split(",")
  14502. : [];
  14503. this.isTeacherSee = res.data[0][0].open == 1 ? true : false;
  14504. this.myWord = res.data[0][0].template;
  14505. this.templateC.id = "123";
  14506. this.courseTypeId = [];
  14507. for (var i = 0; i < res.data[1].length; i++) {
  14508. this.courseTypeId.push(res.data[1][i].typeid);
  14509. }
  14510. console.log(this.courseTypeId);
  14511. if(res.data[3].length){
  14512. try {
  14513. this.aiJson = JSON.parse(res.data[3][0].tips);
  14514. this.templateid = res.data[3][0].template;
  14515. this.getTipsTemplateIsDialog()
  14516. }catch(error){
  14517. console.error(error)
  14518. }
  14519. }
  14520. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  14521. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  14522. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14523. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  14524. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  14525. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  14526. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  14527. this.aiJson.aiRateRule = this.aiJson.aiRateRule ? this.aiJson.aiRateRule : '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  14528. if(this.templateid == '61c628b9-3d96-11ef-b873-005056b86db5'){
  14529. this.aiJson.aiOutlineTask = this.aiJson.aiOutlineTask ? this.aiJson.aiOutlineTask : '请根据<课程名字>以及该课程的<课程简要描述>来为该课程生成100字以内的序列课程任务,序列任务要求彼此连结紧密且没有重复。'
  14530. this.aiJson.aiOutlineDetail = this.aiJson.aiOutlineDetail ? this.aiJson.aiOutlineDetail : '参考<课程名字>、<任务名>和<课程简要描述>的内容,为该序列生成任务详情。任务详情中需要包含教学目标,任务设计和评价标准。'
  14531. }
  14532. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  14533. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  14534. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  14535. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  14536. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  14537. if(res.data[0][0].cpote){
  14538. try {
  14539. this.cpote = JSON.parse(res.data[0][0].cpote);
  14540. }catch(error){
  14541. console.error(error)
  14542. }
  14543. }
  14544. if(res.data[0][0].setting){
  14545. try {
  14546. this.courseJie = JSON.parse(res.data[0][0].setting).courseJie ? JSON.parse(res.data[0][0].setting).courseJie : 1;
  14547. this.courseTime = JSON.parse(res.data[0][0].setting).courseTime ? JSON.parse(res.data[0][0].setting).courseTime : 45;
  14548. 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];
  14549. this.teacherCourseText = JSON.parse(res.data[0][0].setting).teacherCourseText ? JSON.parse(res.data[0][0].setting).teacherCourseText : "";
  14550. this.targetCourseText = JSON.parse(res.data[0][0].setting).targetCourseText ? JSON.parse(res.data[0][0].setting).targetCourseText : "";
  14551. this.cankaoInfoData = JSON.parse(res.data[0][0].setting).cankaoInfoData ? JSON.parse(res.data[0][0].setting).cankaoInfoData : [];
  14552. this.mubiaoInfoData = JSON.parse(res.data[0][0].setting).mubiaoInfoData ? JSON.parse(res.data[0][0].setting).mubiaoInfoData : [];
  14553. this.xuanzeInfoData = JSON.parse(res.data[0][0].setting).xuanzeInfoData ? JSON.parse(res.data[0][0].setting).xuanzeInfoData : [];
  14554. this.pingjiaInfoData = JSON.parse(res.data[0][0].setting).pingjiaInfoData ? JSON.parse(res.data[0][0].setting).pingjiaInfoData : [];
  14555. 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];
  14556. 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;
  14557. this.mode = JSON.parse(res.data[0][0].setting).mode ? JSON.parse(res.data[0][0].setting).mode : 1;
  14558. this.targetCourseText2 = JSON.parse(res.data[0][0].setting).targetCourseText2 ? JSON.parse(res.data[0][0].setting).targetCourseText2 : '';
  14559. this.chatid = JSON.parse(res.data[0][0].setting).chatid ? JSON.parse(res.data[0][0].setting).chatid : uuidv4();
  14560. 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;
  14561. this.knowInfoData = (JSON.parse(res.data[0][0].setting).knowInfoData) ? JSON.parse(res.data[0][0].setting).knowInfoData : [];
  14562. this.knowFileids = (JSON.parse(res.data[0][0].setting).knowFileids) ? JSON.parse(res.data[0][0].setting).knowFileids : [];
  14563. this.knowInfoData2 = (JSON.parse(res.data[0][0].setting).knowInfoData2) ? JSON.parse(res.data[0][0].setting).knowInfoData2 : [];
  14564. this.knowFileids2 = (JSON.parse(res.data[0][0].setting).knowFileids2) ? JSON.parse(res.data[0][0].setting).knowFileids2 : [];
  14565. if(this.targetCourseText2 || (!this.teacherCourseText)){
  14566. this.courseTextBool = true
  14567. }
  14568. // if(!this.teacherCourseText && !this.targetCourseText2){
  14569. // this.isuseT = 1
  14570. // }
  14571. }catch(error){
  14572. console.error(error)
  14573. }
  14574. }
  14575. if(this.teacherInfoData.length){
  14576. this.isuseT = true
  14577. }
  14578. if(this.courseText){
  14579. this.courseTextB = false
  14580. }
  14581. if(this.teacherCourseText){
  14582. this.teacherCourseTextB = false
  14583. }
  14584. if(this.targetCourseText){
  14585. this.targetCourseTextB = false
  14586. }
  14587. if(this.targetCourseText2){
  14588. this.targetCourseText2B = false
  14589. }
  14590. this.setMan();
  14591. this.unitJson[
  14592. this.unitIndex
  14593. ].chapterInfo[0].taskJson[0].toolOpen = true;
  14594. this.$forceUpdate();
  14595. setTimeout(() => {
  14596. this.checkEva(this.evalua);
  14597. setTimeout(() => {
  14598. this.checkEva(this.evalua);
  14599. }, 100);
  14600. }, 100);
  14601. })
  14602. .catch((err) => {
  14603. console.error(err);
  14604. });
  14605. }
  14606. // if(this.cidType != 1 && this.templateid == ''){
  14607. // this.promptShow = true
  14608. // }
  14609. },
  14610. seleteCourseUpdate() {
  14611. let params = {
  14612. cid: this.cid,
  14613. };
  14614. this.ajax
  14615. .get(this.$store.state.api + "select_course_detail", params)
  14616. .then((res) => {
  14617. // console.log(this.unitJson);
  14618. let unitJson = JSON.parse(res.data[0][0].chapters);
  14619. this.unitJson2 = JSON.parse(res.data[0][0].chapters);
  14620. let _unitJson2 = JSON.parse(JSON.stringify(this.unitJson));
  14621. let _unitJson = [];
  14622. let _chapAarry = [];
  14623. let _unitIndex = JSON.parse(JSON.stringify(this.unitIndex));
  14624. let _unitIndex2 = JSON.parse(JSON.stringify(this.unitIndex));
  14625. let index = 1;
  14626. let chapindex;
  14627. if (_unitJson2.length > unitJson.length) {
  14628. for (let c = 0; c < _unitJson2.length; c++) {
  14629. _chapAarry.push(_unitJson2[c].chapterInfo[0].chapterid);
  14630. }
  14631. for (let j = 0; j < unitJson.length; j++) {
  14632. let count = 0;
  14633. for (let k = 0; k < _unitJson2.length; k++) {
  14634. if (
  14635. unitJson[j].chapterInfo[0].chapterid ==
  14636. _unitJson2[k].chapterInfo[0].chapterid
  14637. ) {
  14638. count++;
  14639. _chapAarry.splice(
  14640. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  14641. 1
  14642. );
  14643. _unitJson.push(unitJson[j]);
  14644. break;
  14645. }
  14646. }
  14647. // if(count === 0){
  14648. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  14649. // }
  14650. }
  14651. for (let k = 0; k < _unitJson2.length; k++) {
  14652. if (_unitJson2[k].isUpdate == 1) {
  14653. _chapAarry.splice(
  14654. _chapAarry.indexOf(_unitJson2[k].chapterInfo[0].chapterid),
  14655. 1
  14656. );
  14657. _unitJson.push(_unitJson2[k]);
  14658. }
  14659. }
  14660. console.log(_chapAarry);
  14661. for (let d = 0; d < _unitJson2.length; d++) {
  14662. if (
  14663. _chapAarry.indexOf(_unitJson2[d].chapterInfo[0].chapterid) != -1
  14664. ) {
  14665. if (_unitIndex == d) {
  14666. index = 2;
  14667. }
  14668. chapindex = d;
  14669. // this.$message.error("您所修改的阶段已经被其他老师删除了");
  14670. }
  14671. }
  14672. } else {
  14673. _unitJson = JSON.parse(JSON.stringify(_unitJson2));
  14674. }
  14675. for (let i = 0; i < unitJson.length; i++) {
  14676. if (
  14677. (i < _unitJson.length - 1 || i == _unitJson.length - 1) &&
  14678. _unitJson[i].chapterInfo[0].chapterid !=
  14679. unitJson[i].chapterInfo[0].chapterid
  14680. ) {
  14681. if (i == _unitJson.length - 1) {
  14682. // this.unitIndex++
  14683. _unitIndex2++;
  14684. }
  14685. _unitJson.splice(i, 0, unitJson[i]);
  14686. } else if (i > _unitJson.length - 1) {
  14687. _unitJson.push(unitJson[i]);
  14688. } else if (
  14689. _unitJson[i].chapterInfo[0].chapterid ==
  14690. unitJson[i].chapterInfo[0].chapterid
  14691. ) {
  14692. _unitJson[i] = unitJson[i];
  14693. }
  14694. // if (i == _unitIndex) {
  14695. // continue;
  14696. // } else
  14697. }
  14698. if (_chapAarry.length && index != 2) {
  14699. if (chapindex < _unitIndex) {
  14700. this.isDelete = 2;
  14701. // this.unitIndex--;
  14702. _unitIndex2--;
  14703. } else if (
  14704. _unitJson2[_unitIndex].chapterInfo[0].chapterid !=
  14705. _unitJson[_unitIndex].chapterInfo[0].chapterid
  14706. ) {
  14707. this.isDelete = 2;
  14708. for (let n = 0; n < _unitJson.length; n++) {
  14709. if (
  14710. _unitJson2[_unitIndex].chapterInfo[0].chapterid ==
  14711. _unitJson[n].chapterInfo[0].chapterid
  14712. ) {
  14713. // this.unitIndex = n;
  14714. _unitIndex2 = n;
  14715. _unitJson[n] = _unitJson2[_unitIndex];
  14716. break;
  14717. }
  14718. }
  14719. }
  14720. } else if (index != 2) {
  14721. // _unitJson[this.unitIndex] = _unitJson2[_unitIndex];
  14722. _unitJson2[_unitIndex];
  14723. for (
  14724. var ci = 0;
  14725. ci < _unitJson2[_unitIndex].chapterInfo[0].taskJson.length;
  14726. ci++
  14727. ) {
  14728. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose =
  14729. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].toolChoose
  14730. ? _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14731. .toolChoose
  14732. : [];
  14733. let _chapterData = [];
  14734. for (
  14735. var c = 0;
  14736. c <
  14737. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData
  14738. .length;
  14739. c++
  14740. ) {
  14741. if (
  14742. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14743. .chapterData[c]
  14744. ) {
  14745. _chapterData.push(
  14746. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci]
  14747. .chapterData[c]
  14748. );
  14749. }
  14750. }
  14751. _unitJson2[_unitIndex].chapterInfo[0].taskJson[ci].chapterData =
  14752. _chapterData;
  14753. }
  14754. _unitJson[_unitIndex2] = _unitJson2[_unitIndex];
  14755. }
  14756. if (index == 1) {
  14757. this.unitJson = _unitJson;
  14758. this.$forceUpdate();
  14759. setTimeout(() => {
  14760. if (this.unitIndex != _unitIndex2) {
  14761. this.isDelete = 2;
  14762. this.unitIndex = _unitIndex2;
  14763. }
  14764. }, 0);
  14765. this.timer = setTimeout(() => {
  14766. this.seleteCourseUpdate();
  14767. }, 1000);
  14768. } else if (index == 2) {
  14769. let _this = this;
  14770. _this
  14771. .$confirm(
  14772. "您所修改的阶段已经被其他老师删除了,需要恢复嘛?",
  14773. "提示",
  14774. {
  14775. confirmButtonText: "需要",
  14776. cancelButtonText: "取消",
  14777. type: "warning",
  14778. }
  14779. )
  14780. .then(() => {
  14781. if (_this.time()) {
  14782. _this.restoreWork(
  14783. _chapAarry[0],
  14784. _unitJson,
  14785. chapindex,
  14786. _unitJson2,
  14787. _unitIndex2
  14788. );
  14789. }
  14790. })
  14791. .catch(() => {
  14792. _this.unitJson = _unitJson;
  14793. _this.$forceUpdate();
  14794. setTimeout(() => {
  14795. if (this.unitIndex != _unitIndex2) {
  14796. this.isDelete = 2;
  14797. this.unitIndex = _unitIndex2;
  14798. }
  14799. }, 0);
  14800. _this.timer = setTimeout(() => {
  14801. _this.seleteCourseUpdate();
  14802. }, 1000);
  14803. });
  14804. }
  14805. // 在复制操作之前记录滚动位置
  14806. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  14807. // 执行复制操作
  14808. // 复制操作完成后恢复滚动位置
  14809. this.$nextTick(() => {
  14810. if (this.$refs.scrollContainer) {
  14811. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  14812. }
  14813. });
  14814. })
  14815. .catch((err) => {
  14816. console.error(err);
  14817. });
  14818. },
  14819. restoreWork(chapid, unitJson, chapindex, unitJson2, unitIndex2) {
  14820. let params = [
  14821. {
  14822. cid: this.cid,
  14823. chapters: JSON.stringify(this.unitJson),
  14824. uid: this.userid,
  14825. chapid: chapid,
  14826. },
  14827. ];
  14828. this.ajax
  14829. .post(this.$store.state.api + "restoreWork", params)
  14830. .then((res) => {
  14831. this.$message({
  14832. message: "恢复成功",
  14833. type: "success",
  14834. });
  14835. unitJson.splice(chapindex, 0, unitJson2[chapindex]);
  14836. this.unitJson = unitJson;
  14837. this.$forceUpdate();
  14838. setTimeout(() => {
  14839. if (this.unitIndex != unitIndex2) {
  14840. this.isDelete = 2;
  14841. this.unitIndex = unitIndex2;
  14842. }
  14843. }, 0);
  14844. this.timer = setTimeout(() => {
  14845. this.seleteCourseUpdate();
  14846. }, 1000);
  14847. })
  14848. .catch((err) => {
  14849. this.$message.error("网络不佳");
  14850. console.error(err);
  14851. });
  14852. },
  14853. getTypeName() {
  14854. console.log(this.courseTypeId);
  14855. this.$forceUpdate();
  14856. },
  14857. selectAllType() {
  14858. let params = {
  14859. org: this.org && this.org != "" ? this.org : "",
  14860. oid: this.oid && this.oid != "" ? this.oid : "",
  14861. stand: "cn"
  14862. };
  14863. this.ajax
  14864. .get(this.$store.state.api + "selectAllTypeStand", params)
  14865. .then((res) => {
  14866. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14867. res.data[0] = [...res.data[0], ...res.data[4]];
  14868. }
  14869. this.CourseType = res.data;
  14870. this.CourseType2 = [
  14871. { name: "智见课程", id: [] },
  14872. { name: "智行课程", id: [] },
  14873. { name: "智创课程", id: [] },
  14874. ];
  14875. for (var cti = 0; cti < res.data[0].length; cti++) {
  14876. if (
  14877. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14878. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5"
  14879. ) {
  14880. this.CourseType2[0].id.push(res.data[0][cti].id);
  14881. } else if (
  14882. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5" ||
  14883. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14884. ) {
  14885. this.CourseType2[1].id.push(res.data[0][cti].id);
  14886. } else if (
  14887. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14888. ) {
  14889. this.CourseType2[2].id.push(res.data[0][cti].id);
  14890. }
  14891. if (
  14892. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" ||
  14893. res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5"
  14894. ) {
  14895. res.data[0][cti].name = "年级";
  14896. } else if (
  14897. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" ||
  14898. res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5"
  14899. ) {
  14900. res.data[0][cti].name = "学科";
  14901. } else if (
  14902. res.data[0][cti].id == "34629bcc-d02f-11ec-8c78-005056b86db5"
  14903. ) {
  14904. res.data[0][cti].name = "主题";
  14905. }
  14906. }
  14907. let _courseTypeId = [];
  14908. for (var i = 0; i < res.data[0].length; i++) {
  14909. if (!this.cid) {
  14910. this.courseTypeId[res.data[0][i].id] = [];
  14911. }
  14912. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  14913. // }
  14914. this.CourseTypeJson[res.data[0][i].id] = [];
  14915. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14916. if (res.data[0][i].name == "栏目") {
  14917. this.CourseType[0][i].name = "主题";
  14918. }
  14919. }
  14920. if (res.data[2].length == 0 && res.data[3].length == 0) {
  14921. for (var j = 0; j < res.data[1].length; j++) {
  14922. if (
  14923. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  14924. _courseTypeId.indexOf(res.data[1][j].id) == -1
  14925. ) {
  14926. _courseTypeId.push(res.data[1][j].id);
  14927. }
  14928. if (res.data[0][i].id == res.data[1][j].pid) {
  14929. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14930. }
  14931. }
  14932. } else {
  14933. if (res.data[2].length > 0) {
  14934. for (var j = 0; j < res.data[2].length; j++) {
  14935. if (
  14936. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  14937. _courseTypeId.indexOf(res.data[2][j].id) == -1
  14938. ) {
  14939. _courseTypeId.push(res.data[2][j].id);
  14940. }
  14941. if (res.data[0][i].id == res.data[2][j].pid) {
  14942. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  14943. }
  14944. }
  14945. }
  14946. if (res.data[3].length > 0) {
  14947. for (var j = 0; j < res.data[3].length; j++) {
  14948. if (
  14949. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  14950. _courseTypeId.indexOf(res.data[3][j].id) == -1
  14951. ) {
  14952. _courseTypeId.push(res.data[3][j].id);
  14953. }
  14954. if (res.data[0][i].id == res.data[3][j].pid) {
  14955. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  14956. }
  14957. }
  14958. }
  14959. }
  14960. }
  14961. this.courseTypeId = _courseTypeId;
  14962. })
  14963. .catch((err) => {
  14964. console.error(err);
  14965. });
  14966. },
  14967. selectType() {
  14968. this.ajax
  14969. .get(this.$store.state.api + "selectType")
  14970. .then((res) => {
  14971. this.CourseType = res.data;
  14972. for (var i = 0; i < res.data[0].length; i++) {
  14973. if (!this.cid) {
  14974. this.courseTypeId[res.data[0][i].id] = "";
  14975. }
  14976. if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
  14977. if (res.data[0][i].name == "栏目") {
  14978. this.CourseType[0][i].name = "主题";
  14979. }
  14980. }
  14981. for (var j = 0; j < res.data[1].length; j++) {
  14982. if (res.data[0][i].id == res.data[1][j].pid) {
  14983. if (!this.CourseTypeJson[res.data[0][i].id]) {
  14984. this.CourseTypeJson[res.data[0][i].id] = [];
  14985. }
  14986. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  14987. }
  14988. }
  14989. }
  14990. this.selectTypeByOid();
  14991. this.selectTypeByOrg();
  14992. })
  14993. .catch((err) => {
  14994. console.error(err);
  14995. });
  14996. },
  14997. selectTypeByOid() {
  14998. let params = {
  14999. oid: this.oid,
  15000. };
  15001. this.ajax
  15002. .get(this.$store.state.api + "selectTypeByOid", params)
  15003. .then((res) => {
  15004. for (var i = 0; i < res.data[0].length; i++) {
  15005. for (var j = 0; j < res.data[1].length; j++) {
  15006. if (res.data[0][i].id == res.data[1][j].pid) {
  15007. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15008. this.CourseTypeJson[res.data[0][i].id] = [];
  15009. }
  15010. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  15011. }
  15012. }
  15013. }
  15014. })
  15015. .catch((err) => {
  15016. console.error(err);
  15017. });
  15018. },
  15019. selectTypeByOrg() {
  15020. let params = {
  15021. oid: this.org,
  15022. };
  15023. this.ajax
  15024. .get(this.$store.state.api + "selectTypeByOrg", params)
  15025. .then((res) => {
  15026. for (var i = 0; i < res.data[0].length; i++) {
  15027. for (var j = 0; j < res.data[1].length; j++) {
  15028. if (res.data[0][i].id == res.data[1][j].pid) {
  15029. if (!this.CourseTypeJson[res.data[0][i].id]) {
  15030. this.CourseTypeJson[res.data[0][i].id] = [];
  15031. }
  15032. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]);
  15033. }
  15034. }
  15035. }
  15036. this.$forceUpdate();
  15037. })
  15038. .catch((err) => {
  15039. console.error(err);
  15040. });
  15041. },
  15042. OtherMb(type, task) {
  15043. if (task === 0 || task) {
  15044. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15045. task
  15046. ].isEvaFold = true;
  15047. }
  15048. this.typeMode = type;
  15049. setTimeout(() => {
  15050. this.checkEva(this.checkId);
  15051. setTimeout(() => {
  15052. this.checkEva(this.checkId);
  15053. }, 100);
  15054. }, 100);
  15055. },
  15056. openMember() {
  15057. this.searchTN = "";
  15058. this.getTeacher();
  15059. this.dialogVisibleMember = true;
  15060. },
  15061. checkEva(id, type) {
  15062. this.dialogVisiblemb = false;
  15063. this.selectEva();
  15064. if (this.evalua != id && type == 2) {
  15065. this.$message.success("导入成功");
  15066. setTimeout(() => {
  15067. this.checkEva(id);
  15068. }, 100);
  15069. }
  15070. this.evalua = id;
  15071. this.checkId = id;
  15072. if (this.evalua != "") {
  15073. for (var i = 0; i < this.evaJuri.length; i++) {
  15074. if (this.evalua == this.evaJuri[i].id) {
  15075. this.eTitle = this.evaJuri[i].title;
  15076. this.eJson = JSON.parse(this.evaJuri[i].content);
  15077. }
  15078. }
  15079. this.data.data = [];
  15080. this.$forceUpdate();
  15081. setTimeout(() => {
  15082. this.setMindData();
  15083. }, 1000);
  15084. }
  15085. },
  15086. deleteEva() {
  15087. let _this = this;
  15088. if (_this.evalua == "") {
  15089. this.$message.warning("内容已经清空了,请勿重复清空");
  15090. return;
  15091. }
  15092. _this
  15093. .$confirm("确定删除此目标吗?", "提示", {
  15094. confirmButtonText: "确定",
  15095. cancelButtonText: "取消",
  15096. type: "warning",
  15097. })
  15098. .then(() => {
  15099. _this.evalua = "";
  15100. _this.checkId = "";
  15101. _this.eTitle = "";
  15102. let _unitJson = _this.unitJson;
  15103. for (var i = 0; i < _unitJson.length; i++) {
  15104. let _task = _unitJson[i].chapterInfo[0].taskJson;
  15105. for (var j = 0; j < _task.length; j++) {
  15106. let _eList = _task[j].eList;
  15107. for (var k = 0; k < _eList.length; k++) {
  15108. delete _eList[k].target;
  15109. }
  15110. }
  15111. }
  15112. _this.$forceUpdate();
  15113. if (_this.cid) {
  15114. _this.updateWork();
  15115. }
  15116. })
  15117. .catch(() => {
  15118. return;
  15119. });
  15120. },
  15121. selectEva() {
  15122. let params = {
  15123. oid: this.oid,
  15124. };
  15125. this.ajax
  15126. .get(this.$store.state.api + "selectAllEvaluation", params)
  15127. .then((res) => {
  15128. this.evaJuri = res.data[0];
  15129. // 在复制操作之前记录滚动位置
  15130. const savedScrollPosition = this.$refs.scrollContainer ? this.$refs.scrollContainer.scrollTop : 0;
  15131. // 执行复制操作
  15132. // 复制操作完成后恢复滚动位置
  15133. this.$nextTick(() => {
  15134. if (this.$refs.scrollContainer) {
  15135. this.$refs.scrollContainer.scrollTop = savedScrollPosition;
  15136. }
  15137. });
  15138. })
  15139. .catch((err) => {
  15140. console.error(err);
  15141. });
  15142. },
  15143. setMindData() {
  15144. let targetArray = [];
  15145. this.data.data = [];
  15146. this.data.data.push({ id: "root", isroot: true, topic: this.eTitle });
  15147. let _eJson = Object.keys(this.eJson);
  15148. let _e = this.eJson;
  15149. for (let i = 0; i < _eJson.length; i++) {
  15150. let element = _e[_eJson[i]];
  15151. this.data.data.push({
  15152. id: element.id,
  15153. parentid: "root",
  15154. topic: element.name,
  15155. });
  15156. // targetArray.push({
  15157. // id: element.id,
  15158. // parentid: "root",
  15159. // name: element.name,
  15160. // });
  15161. targetArray.push({
  15162. value: element.name,
  15163. label: element.name,
  15164. children: [],
  15165. });
  15166. let _eJsonc = Object.keys(element.child);
  15167. let _e2 = element.child;
  15168. for (let j = 0; j < _eJsonc.length; j++) {
  15169. let _ec = _e2[_eJsonc[j]];
  15170. this.data.data.push({
  15171. id: _ec.id,
  15172. parentid: element.id,
  15173. topic: _ec.name,
  15174. });
  15175. // targetArray.push({
  15176. // id: _ec.id,
  15177. // parentid: element.id,
  15178. // name: _ec.name,
  15179. // });
  15180. targetArray[i].children.push({
  15181. value: _ec.name,
  15182. label: _ec.name,
  15183. children: [],
  15184. });
  15185. let _eJsonz = Object.keys(_ec.child);
  15186. let _e3 = _ec.child;
  15187. for (let z = 0; z < _eJsonz.length; z++) {
  15188. let _ez = _e3[_eJsonz[z]];
  15189. this.data.data.push({
  15190. id: _ez.id,
  15191. parentid: _ec.id,
  15192. topic: _ez.name,
  15193. });
  15194. // targetArray.push({
  15195. // id: _ez.id,
  15196. // parentid: _ec.id,
  15197. // name: _ez.name,
  15198. // });
  15199. targetArray[i].children[j].children.push({
  15200. value: _ez.name,
  15201. label: _ez.name,
  15202. });
  15203. }
  15204. }
  15205. }
  15206. this.targetArray = targetArray;
  15207. this.$forceUpdate();
  15208. },
  15209. /*添加评价 */
  15210. addEList(index, tIndex) {
  15211. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList
  15212. ? this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.push({
  15213. value: "",
  15214. detail: "",
  15215. score: 5,
  15216. isai: "1",
  15217. })
  15218. : (this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList = [
  15219. { value: "", detail: "", score: 5,isai: "1", },
  15220. ]);
  15221. this.$forceUpdate();
  15222. },
  15223. openEList(index, tIndex) {
  15224. this.evaIndex = index;
  15225. this.evatIndex = tIndex;
  15226. this.evaBoxDialog = true;
  15227. },
  15228. addCET(index, tIndex) {
  15229. this.cetIndex = index;
  15230. this.cettIndex = tIndex;
  15231. this.selectAllType1();
  15232. },
  15233. addCETemplate() {
  15234. var array =
  15235. this.unitJson[this.cetIndex].chapterInfo[0].taskJson[this.cettIndex]
  15236. .eList;
  15237. let params = [
  15238. {
  15239. uid: this.userid,
  15240. n: this.templateName,
  15241. json: JSON.stringify(array),
  15242. t: 1,
  15243. oid: this.oid,
  15244. },
  15245. ];
  15246. this.ajax
  15247. .post(this.$store.state.api + "addCETShare", params)
  15248. .then((res) => {
  15249. this.addTypeByCET(res.data[0][0].id);
  15250. })
  15251. .catch((err) => {
  15252. this.$message.error("网络不佳");
  15253. console.error(err);
  15254. });
  15255. },
  15256. addTypeByCET(id) {
  15257. if (this.setTypeJson.two == "") {
  15258. this.$message.warning("请选择二级分类,如没有二级分类请前往添加!");
  15259. return;
  15260. }
  15261. let params = {
  15262. cid: id,
  15263. };
  15264. this.ajax
  15265. .get(this.$store.state.api + "deleteCETLabel", params)
  15266. .then((res) => {
  15267. for (var i = 0; i < 2; i++) {
  15268. let tid = "";
  15269. if (i == 0) {
  15270. tid = this.setTypeJson.one;
  15271. } else {
  15272. tid = this.setTypeJson.two;
  15273. }
  15274. let params = [
  15275. {
  15276. cid: id,
  15277. tid: tid,
  15278. uid: this.userid,
  15279. },
  15280. ];
  15281. this.ajax
  15282. .post(this.$store.state.api + "addCETLabel", params)
  15283. .then((res) => {
  15284. this.$message({
  15285. message: "添加成功",
  15286. type: "success",
  15287. });
  15288. this.close();
  15289. })
  15290. .catch((err) => {
  15291. this.$message.error("网络不佳");
  15292. console.error(err);
  15293. });
  15294. }
  15295. })
  15296. .catch((err) => {
  15297. this.$message.error("网络不佳");
  15298. console.error(err);
  15299. });
  15300. },
  15301. updateEvaJson(array) {
  15302. array = array.filter((item) => {
  15303. item.isai = "1"
  15304. return item;
  15305. });
  15306. this.unitJson[this.evaIndex].chapterInfo[0].taskJson[
  15307. this.evatIndex
  15308. ].eList = array;
  15309. },
  15310. forceUpdate() {
  15311. this.$forceUpdate();
  15312. },
  15313. forceUpdate2() {
  15314. setTimeout(() => {
  15315. this.courseText += "*0*%*";
  15316. setTimeout(() => {
  15317. this.courseText = this.courseText.replaceAll("*0*%*", "");
  15318. }, 0);
  15319. }, 100);
  15320. this.$forceUpdate();
  15321. },
  15322. deletEList(index, tIndex, eIndex) {
  15323. this.unitJson[index].chapterInfo[0].taskJson[tIndex].eList.splice(
  15324. eIndex,
  15325. 1
  15326. );
  15327. this.$forceUpdate();
  15328. },
  15329. getChoosePic(t) {
  15330. this.chooseType = t;
  15331. this.getAllBanner();
  15332. },
  15333. getAllBanner() {
  15334. this.sysPicVisible = true;
  15335. let params = {
  15336. t: this.chooseType,
  15337. };
  15338. this.ajax
  15339. .get(this.$store.state.api + "selectAllBanner", params)
  15340. .then((res) => {
  15341. this.sysPic = res.data[0];
  15342. })
  15343. .catch((err) => {
  15344. console.error(err);
  15345. });
  15346. },
  15347. // getClass() {
  15348. // let params = {
  15349. // oid: this.oid,
  15350. // };
  15351. // this.ajax
  15352. // .get(this.$store.state.api + "selectClassBySchool", params)
  15353. // .then((res) => {
  15354. // this.classJuri = res.data[0];
  15355. // })
  15356. // .catch((err) => {
  15357. // console.error(err);
  15358. // });
  15359. // },
  15360. deleteSysPic() {
  15361. this.cover = [];
  15362. this.isSysPic = false;
  15363. this.isSysPic2 = false;
  15364. },
  15365. deleteSelectPic() {
  15366. this.selectJson.url = "";
  15367. },
  15368. setEListStar() {
  15369. this.$forceUpdate();
  15370. },
  15371. deletRateList(i) {
  15372. this.rateJson.splice(i, 1);
  15373. },
  15374. addRateList() {
  15375. this.rateJson.push({ detail: "", score: 5, value: "" });
  15376. },
  15377. addSt() {
  15378. this.sentenceList.push({
  15379. sentenceTitle: "",
  15380. addSentence: [],
  15381. rightAnswer: [],
  15382. });
  15383. },
  15384. addSen(i) {
  15385. if (!this.sentenceList[i].sentenceTitle) {
  15386. this.$message.error("请填写卡片内容!");
  15387. return;
  15388. }
  15389. if (this.sentenceList[i].sentenceTitle.length > 10) {
  15390. this.$message.error("卡片内容字数不能超过10位");
  15391. return;
  15392. }
  15393. if (
  15394. this.sentenceList[i].addSentence.indexOf(
  15395. this.sentenceList[i].sentenceTitle
  15396. ) !== -1
  15397. ) {
  15398. this.$message.error("不能添加重复的卡片内容!");
  15399. return;
  15400. }
  15401. this.sentenceList[i].addSentence.push(this.sentenceList[i].sentenceTitle);
  15402. // this.isPushTitleList.push(this.sentenceTitle);
  15403. this.sentenceList[i].sentenceTitle = "";
  15404. },
  15405. setRightAnswer(s, i, j) {
  15406. if (this.sentenceList[i].rightAnswer.indexOf(s) == -1) {
  15407. this.sentenceList[i].rightAnswer.push(s);
  15408. }
  15409. },
  15410. returnCard(r, i, j) {
  15411. this.sentenceList[i].rightAnswer.splice(j, 1);
  15412. },
  15413. addSentenceTool() {
  15414. for (var i = 0; i < this.sentenceList.length; i++) {
  15415. if (this.sentenceList[i].rightAnswer.length == 0) {
  15416. this.$message.error(`请将题目${i + 1}设置完整。`);
  15417. return;
  15418. }
  15419. if (
  15420. this.sentenceList[i].addSentence.length !=
  15421. this.sentenceList[i].rightAnswer.length
  15422. ) {
  15423. this.$message.error(`请将题目${i + 1}设置完整。`);
  15424. return;
  15425. }
  15426. }
  15427. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15428. this.taskCount
  15429. ].toolChoose[this.toolIndex].sentenceList = this.sentenceList;
  15430. this.sentenceList = [
  15431. { sentenceTitle: "", addSentence: [], rightAnswer: [] },
  15432. ];
  15433. this.dialogVisibleSentence = false;
  15434. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15435. // itemTaskIndex
  15436. // ].toolChoose[toolIndex].tool = [];
  15437. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15438. // itemTaskIndex
  15439. // ].toolChoose[toolIndex].tool.push(i);
  15440. if (
  15441. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15442. .toolChoose[this.toolIndex].tool != 47
  15443. ) {
  15444. this.addTools(47, this.taskCount, this.toolIndex);
  15445. }
  15446. },
  15447. addTableJson() {
  15448. // if (this.tableJson.text == "" || this.tableJson.text == "<p></p>") {
  15449. // this.$message.error("请将信息填写完整!");
  15450. // return;
  15451. // }
  15452. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15453. this.taskCount
  15454. ].toolChoose[this.toolIndex].tableJson = this.tableJson;
  15455. // this.tableJson = [{ text: "" }];
  15456. // this.dialogVisibleTable = false;
  15457. this.$message.success("上传成功");
  15458. if (
  15459. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15460. .toolChoose[this.toolIndex].tool != 48
  15461. ) {
  15462. this.addTools(48, this.taskCount, this.toolIndex);
  15463. }
  15464. },
  15465. addWordJson() {
  15466. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15467. this.taskCount
  15468. ].toolChoose[this.toolIndex].wordJson = this.wordJson;
  15469. // this.wordJson = [{ text: "" }];
  15470. // this.dialogVisibleWord = false;
  15471. this.$message.success("上传成功");
  15472. if (
  15473. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15474. .toolChoose[this.toolIndex].tool != 52
  15475. ) {
  15476. this.addTools(52, this.taskCount, this.toolIndex);
  15477. }
  15478. },
  15479. addMoreUpload() {
  15480. if (this.uploadJson.length == 0) {
  15481. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15482. this.taskCount
  15483. ].toolChoose[this.toolIndex].uploadJson = [];
  15484. } else {
  15485. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15486. this.taskCount
  15487. ].toolChoose[this.toolIndex].uploadJson = this.uploadJson;
  15488. }
  15489. this.uploadJson = [];
  15490. this.dialogVisibleMoreUpload = false;
  15491. if (
  15492. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15493. .toolChoose[this.toolIndex].tool != 50
  15494. ) {
  15495. this.addTools(50, this.taskCount, this.toolIndex);
  15496. }
  15497. },
  15498. addPreTime() {
  15499. if (this.preTime == 0) {
  15500. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15501. this.taskCount
  15502. ].toolChoose[this.toolIndex].preTime = 0;
  15503. } else {
  15504. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15505. this.taskCount
  15506. ].toolChoose[this.toolIndex].preTime = this.preTime;
  15507. }
  15508. this.preTime = 0;
  15509. this.dialogVisiblePreTime = false;
  15510. if (
  15511. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15512. .toolChoose[this.toolIndex].tool != 10
  15513. ) {
  15514. this.addTools(10, this.taskCount, this.toolIndex);
  15515. }
  15516. },
  15517. goToTask(i) {
  15518. this.toolIndexType = "";
  15519. if (this.isClickColor == i + 1) {
  15520. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15521. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15522. // } else {
  15523. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15524. i
  15525. ].toolOpen = true;
  15526. // }
  15527. this.$forceUpdate();
  15528. return;
  15529. }
  15530. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15531. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15532. // } else {
  15533. document.querySelectorAll(".basic_box")[0].scrollTop =
  15534. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  15535. this.isClickColor = i + 1;
  15536. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15537. // }
  15538. this.$forceUpdate();
  15539. },
  15540. taskScroll(){
  15541. // document.querySelectorAll(".taskBorder")[i].offsetTop - 100
  15542. const sections = document.querySelectorAll('.taskBorder');
  15543. const scrollPosition = document.querySelector('.basic_box').scrollTop;
  15544. sections.forEach((section, index) => {
  15545. const offsetTop = section.offsetTop;
  15546. const offsetHeight = section.offsetHeight;
  15547. if (scrollPosition >= (offsetTop -100) && scrollPosition < (offsetTop -100) + offsetHeight) {
  15548. this.isClickColor = index +1;
  15549. }
  15550. });
  15551. },
  15552. taskOpen(i, stageIndex) {
  15553. if (this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15554. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = false;
  15555. } else {
  15556. this.unitJson[stageIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15557. }
  15558. this.updateWork3(stageIndex);
  15559. this.$forceUpdate();
  15560. },
  15561. goToTask2(i, stage) {
  15562. this.toolIndexType = "";
  15563. if (this.isClickColor == i + 1 && this.unitIndex == stage) {
  15564. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15565. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15566. // } else {
  15567. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15568. i
  15569. ].toolOpen = true;
  15570. // }
  15571. this.$forceUpdate();
  15572. return;
  15573. }
  15574. if (this.unitIndex != stage) {
  15575. if (this.panUnitJson() == 2) {
  15576. return;
  15577. }
  15578. this.unitSet(stage);
  15579. }
  15580. // if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
  15581. // this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
  15582. // } else {
  15583. document.querySelectorAll(".basic_box")[0].scrollTop =
  15584. document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
  15585. this.isClickColor = i + 1;
  15586. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true;
  15587. // }
  15588. this.$forceUpdate();
  15589. },
  15590. taskMove(type, index) {
  15591. this.$confirm(
  15592. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  15593. "提示",
  15594. {
  15595. confirmButtonText: "确定",
  15596. cancelButtonText: "取消",
  15597. type: "warning",
  15598. }
  15599. )
  15600. .then(() => {
  15601. if (type == 1) {
  15602. if (index > 0) {
  15603. let a = JSON.parse(
  15604. JSON.stringify(
  15605. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15606. index - 1
  15607. ]
  15608. )
  15609. );
  15610. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index - 1] =
  15611. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  15612. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  15613. }
  15614. } else {
  15615. if (
  15616. index <
  15617. this.unitJson[this.unitIndex].chapterInfo[0].taskJson.length - 1
  15618. ) {
  15619. let a = JSON.parse(
  15620. JSON.stringify(
  15621. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15622. index + 1
  15623. ]
  15624. )
  15625. );
  15626. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index + 1] =
  15627. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index];
  15628. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[index] = a;
  15629. }
  15630. }
  15631. this.$forceUpdate();
  15632. })
  15633. .catch(() => {
  15634. return;
  15635. });
  15636. },
  15637. stageMove(type, index) {
  15638. if (type == 1) {
  15639. if (index > 0) {
  15640. let a = JSON.parse(JSON.stringify(this.unitJson3[index - 1]));
  15641. let acid = JSON.parse(
  15642. JSON.stringify(this.unitJson3[index - 1].chapterInfo[0].chapterid)
  15643. );
  15644. let bcid = JSON.parse(
  15645. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  15646. );
  15647. this.unitJson3[index - 1] = this.unitJson3[index];
  15648. this.unitJson3[index] = a;
  15649. this.unitJson3[index - 1].chapterInfo[0].chapterid = acid;
  15650. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  15651. }
  15652. } else {
  15653. if (index < this.unitJson3.length - 1) {
  15654. let a = JSON.parse(JSON.stringify(this.unitJson3[index + 1]));
  15655. let acid = JSON.parse(
  15656. JSON.stringify(this.unitJson3[index + 1].chapterInfo[0].chapterid)
  15657. );
  15658. let bcid = JSON.parse(
  15659. JSON.stringify(this.unitJson3[index].chapterInfo[0].chapterid)
  15660. );
  15661. this.unitJson3[index + 1] = this.unitJson3[index];
  15662. this.unitJson3[index] = a;
  15663. this.unitJson3[index + 1].chapterInfo[0].chapterid = acid;
  15664. this.unitJson3[index].chapterInfo[0].chapterid = bcid;
  15665. }
  15666. }
  15667. this.$forceUpdate();
  15668. },
  15669. addGroup(i) {
  15670. // this.groupJson.group.splice(i + 1, 0, { name: "第"+(i+1)+"组" });
  15671. this.groupJson.group.push({
  15672. name: "第" + (this.groupJson.group.length + 1) + "组",
  15673. });
  15674. },
  15675. deleteGroup(i) {
  15676. this.groupJson.group.splice(i, 1);
  15677. },
  15678. numberPan() {
  15679. if (
  15680. /[^\d]/.test(this.groupJson.number) ||
  15681. this.groupJson.number < 2 ||
  15682. this.groupJson.number > 10
  15683. ) {
  15684. this.$message.error("请输入2-10的数字");
  15685. this.groupJson.number = "";
  15686. }
  15687. },
  15688. numberPanJie() {
  15689. if (/[^\d]/.test(this.courseJie) || this.courseJie < 1) {
  15690. this.$message.error('请输入大于1的数字')
  15691. this.courseJie = 1
  15692. }
  15693. },
  15694. numberPanTime() {
  15695. if (/[^\d]/.test(this.courseTime) || this.courseTime < 1) {
  15696. this.$message.error('请输入大于1的数字')
  15697. this.courseTime = 1
  15698. }
  15699. },
  15700. addGroupJson() {
  15701. for (var i = 0; i < this.groupJson.group.length; i++) {
  15702. if (!this.groupJson.group[i].name) {
  15703. this.$message.error("请将信息填写完整!");
  15704. return;
  15705. }
  15706. }
  15707. if (!this.groupJson.number) {
  15708. this.$message.error("请将信息填写完整!");
  15709. return;
  15710. }
  15711. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  15712. this.taskCount
  15713. ].toolChoose[this.toolIndex].groupJson = JSON.parse(
  15714. JSON.stringify(this.groupJson)
  15715. );
  15716. this.dialogVisibleGroup = false;
  15717. this.groupJson = {};
  15718. if (
  15719. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  15720. .toolChoose[this.toolIndex].tool != 49
  15721. ) {
  15722. this.addTools(49, this.taskCount, this.toolIndex);
  15723. }
  15724. },
  15725. updateTime(preTime) {
  15726. this.preTime = preTime;
  15727. },
  15728. InviteChange(val) {
  15729. console.log(val);
  15730. let _check = [];
  15731. let _check2 = [];
  15732. for (var i = 0; i < this.grade2.length; i++) {
  15733. var gid = this.grade2[i].id;
  15734. _check.push(gid);
  15735. }
  15736. for (var i = 0; i < this.checkboxList2.length; i++) {
  15737. var _id = this.checkboxList2[i];
  15738. if (_check.indexOf(_id) !== -1) {
  15739. _check2.push(_id);
  15740. }
  15741. }
  15742. this.checkAll = _check2.length === _check.length;
  15743. return;
  15744. let array = JSON.parse(JSON.stringify(val));
  15745. this.inviteCode = this.inviteCode.filter((el) => {
  15746. if (val.indexOf(el.cid) != -1) {
  15747. array.splice(array.indexOf(el.cid), 1);
  15748. return el;
  15749. }
  15750. });
  15751. for (var i = 0; i < array.length; i++) {
  15752. this.getInviteCode(array[i]);
  15753. }
  15754. },
  15755. InviteChange2(val) {
  15756. console.log(val);
  15757. let _check = [];
  15758. let _check2 = [];
  15759. for (var i = 0; i < this.teacherJuri.length; i++) {
  15760. var gid = this.teacherJuri[i].userid;
  15761. _check.push(gid);
  15762. }
  15763. for (var i = 0; i < this.checkboxList3.length; i++) {
  15764. var _id = this.checkboxList3[i];
  15765. if (_check.indexOf(_id) !== -1) {
  15766. _check2.push(_id);
  15767. }
  15768. }
  15769. this.checkAll2 = _check2.length === _check.length;
  15770. this.setMan();
  15771. return;
  15772. let array = JSON.parse(JSON.stringify(val));
  15773. this.inviteCode = this.inviteCode.filter((el) => {
  15774. if (val.indexOf(el.cid) != -1) {
  15775. array.splice(array.indexOf(el.cid), 1);
  15776. return el;
  15777. }
  15778. });
  15779. for (var i = 0; i < array.length; i++) {
  15780. this.getInviteCode(array[i]);
  15781. }
  15782. },
  15783. handleCheckAllChange(val) {
  15784. if (val) {
  15785. for (var i = 0; i < this.grade2.length; i++) {
  15786. var gid = this.grade2[i].id;
  15787. if (this.checkboxList2.indexOf(gid) === -1) {
  15788. this.checkboxList2.push(gid);
  15789. }
  15790. }
  15791. } else {
  15792. let _check = [];
  15793. let _check2 = [];
  15794. for (var i = 0; i < this.grade2.length; i++) {
  15795. var gid = this.grade2[i].id;
  15796. _check.push(gid);
  15797. }
  15798. for (var i = 0; i < this.checkboxList2.length; i++) {
  15799. var _id = this.checkboxList2[i];
  15800. if (_check.indexOf(_id) === -1) {
  15801. _check2.push(_id);
  15802. }
  15803. }
  15804. this.checkboxList2 = _check2;
  15805. }
  15806. this.isIndeterminate = false;
  15807. },
  15808. handleCheckAllChange2(val) {
  15809. if (val) {
  15810. for (var i = 0; i < this.teacherJuri.length; i++) {
  15811. var gid = this.teacherJuri[i].userid;
  15812. if (this.checkboxList3.indexOf(gid) === -1) {
  15813. this.checkboxList3.push(gid);
  15814. }
  15815. }
  15816. } else {
  15817. let _check = [];
  15818. let _check2 = [];
  15819. for (var i = 0; i < this.teacherJuri.length; i++) {
  15820. var gid = this.teacherJuri[i].userid;
  15821. _check.push(gid);
  15822. }
  15823. for (var i = 0; i < this.checkboxList3.length; i++) {
  15824. var _id = this.checkboxList3[i];
  15825. if (_check.indexOf(_id) === -1) {
  15826. _check2.push(_id);
  15827. }
  15828. }
  15829. this.checkboxList3 = _check2;
  15830. }
  15831. this.isIndeterminate2 = false;
  15832. },
  15833. async getInviteCode(cid) {
  15834. let code = this.randomNumber();
  15835. let params = {
  15836. code: code,
  15837. oid: this.oid,
  15838. };
  15839. let type = 1;
  15840. for (var i = 0; i < this.inviteCode.length; i++) {
  15841. if (this.inviteCode[i].cid != cid && code == this.inviteCode[i].ic) {
  15842. type = 2;
  15843. }
  15844. }
  15845. if (type == 2) {
  15846. this.getInviteCode(cid);
  15847. return;
  15848. }
  15849. const res = await this.ajax.get(
  15850. this.$store.state.api + "selectInviteCode2",
  15851. params
  15852. );
  15853. if (
  15854. res.data.length &&
  15855. res.data[0].length &&
  15856. res.data[0][0].courseId != this.cid
  15857. ) {
  15858. this.getInviteCode(cid);
  15859. return;
  15860. }
  15861. let array = [];
  15862. for (var i = 0; i < this.inviteCode.length; i++) {
  15863. array.push(this.inviteCode[i].cid);
  15864. }
  15865. if (array.indexOf(cid) != -1) {
  15866. this.inviteCode[array.indexOf(cid)].ic = code;
  15867. } else {
  15868. this.inviteCode.push({ cid: cid, ic: code });
  15869. }
  15870. },
  15871. OpenInviteD(cid) {
  15872. let array = [];
  15873. this.icode = "";
  15874. for (var i = 0; i < this.inviteCode.length; i++) {
  15875. array.push(this.inviteCode[i].cid);
  15876. }
  15877. if (array.indexOf(cid) != -1) {
  15878. this.icode = this.inviteCode[array.indexOf(cid)].ic;
  15879. }
  15880. this.inviteId = cid;
  15881. this.dialogVisibleInvite = true;
  15882. },
  15883. addInvite() {
  15884. let reg = /^[A-Za-z0-9]{4,}$/;
  15885. if (!reg.test(this.icode)) {
  15886. this.$message.error("请输入至少四位数字或英文组合的随机码");
  15887. return;
  15888. }
  15889. let type = 1;
  15890. for (var i = 0; i < this.inviteCode.length; i++) {
  15891. if (
  15892. this.inviteCode[i].cid != this.inviteId &&
  15893. this.icode == this.inviteCode[i].ic
  15894. ) {
  15895. type = 2;
  15896. }
  15897. }
  15898. if (type == 2) {
  15899. this.$message.error("已有此随机码,不能重复");
  15900. return;
  15901. }
  15902. let params = {
  15903. code: this.icode,
  15904. oid: this.oid,
  15905. };
  15906. this.ajax
  15907. .get(this.$store.state.api + "selectInviteCode", params)
  15908. .then((res) => {
  15909. if (
  15910. res.data.length &&
  15911. res.data[0].length &&
  15912. res.data[0][0].courseId != this.cid
  15913. ) {
  15914. this.$message.error("已有此随机码,不能重复");
  15915. return;
  15916. }
  15917. let array = [];
  15918. for (var i = 0; i < this.inviteCode.length; i++) {
  15919. array.push(this.inviteCode[i].cid);
  15920. }
  15921. if (array.indexOf(this.inviteId) != -1) {
  15922. this.inviteCode[array.indexOf(this.inviteId)].ic = this.icode;
  15923. } else {
  15924. this.inviteCode.push({ cid: this.inviteId, ic: this.icode });
  15925. }
  15926. this.icode = "";
  15927. this.dialogVisibleInvite = false;
  15928. })
  15929. .catch((err) => {
  15930. console.error(err);
  15931. });
  15932. },
  15933. randomNumber() {
  15934. // 随机生成两位数
  15935. // let num = Math.floor(Math.random() * 900) + 100;
  15936. // 生成 0 到 99 之间的随机整数
  15937. const randomNumber = Math.floor(Math.random() * 100);
  15938. // 如果随机数小于 10,补上前导零
  15939. const num =
  15940. randomNumber < 10 ? "0" + randomNumber : randomNumber.toString();
  15941. // 随机生成两个大写字母
  15942. let letters = "";
  15943. let chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  15944. for (let i = 0; i < 3; i++) {
  15945. letters += chars2.charAt(Math.floor(Math.random() * chars2.length));
  15946. }
  15947. // 随机生成两位数字和字母的组合
  15948. let mix = "";
  15949. let chars =
  15950. "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  15951. for (let i = 0; i < 3; i++) {
  15952. let char = chars.charAt(Math.floor(Math.random() * chars.length));
  15953. mix += char;
  15954. }
  15955. // 随机选择一种类型
  15956. let type = Math.floor(Math.random() * 3);
  15957. return num;
  15958. // 根据类型输出结果
  15959. switch (type) {
  15960. case 0:
  15961. console.log(num); // 输出两位数
  15962. return num;
  15963. case 1:
  15964. console.log(letters); // 输出两个大写字母
  15965. return letters;
  15966. case 2:
  15967. console.log(mix); // 输出两位数字和字母的组合
  15968. return mix;
  15969. }
  15970. },
  15971. getPaste() {
  15972. let iframe = top.document.querySelectorAll("#AIChat iframe")[0];
  15973. let iframe2 = top.document.querySelectorAll("#AIChat aigpt")[0];
  15974. if (!iframe && !iframe2) {
  15975. return;
  15976. }
  15977. let copyData = iframe ? iframe.contentWindow.copyData : false;
  15978. let copyData2 = iframe2 ? iframe2.contentWindow.copyData : false;
  15979. if (copyData && copyData.stageData && copyData.stageData.length) {
  15980. this.isPasteStage = true;
  15981. }
  15982. if (copyData2 && copyData2.stageData && copyData2.stageData.length) {
  15983. this.isPasteStage = true;
  15984. }
  15985. if (copyData && copyData.selectData.length) {
  15986. this.isPasteChoice = true;
  15987. }
  15988. if (copyData && copyData.tasksData && copyData.tasksData.length) {
  15989. this.isPasteTask = true;
  15990. }
  15991. if (copyData2 && copyData2.tasksData && copyData2.tasksData.length) {
  15992. this.isPasteTask = true;
  15993. }
  15994. },
  15995. getPaste2() {
  15996. let iframe = document.querySelectorAll(".interIframe")[0];
  15997. const turndownService = new TurndownService();
  15998. let confirm_next_step = (iframe && iframe.contentWindow) ? iframe.contentWindow.confirm_next_step : '';
  15999. let work_area_text = (iframe && iframe.contentWindow) ? iframe.contentWindow.work_area_text : '';
  16000. if(confirm_next_step){
  16001. this.courseText += turndownService.turndown(confirm_next_step)
  16002. iframe.contentWindow.confirm_next_step = ''
  16003. }
  16004. if(work_area_text && work_area_text.aiContent){
  16005. this.courseText += turndownService.turndown(work_area_text.aiContent)
  16006. iframe.contentWindow.work_area_text = ''
  16007. }
  16008. },
  16009. setCourseInfo(){
  16010. let courseInfo = ''
  16011. let sub = []
  16012. let mclass = []
  16013. if (this.courseTypeId.length) {
  16014. for (var i = 0; i < this.courseTypeId.length; i++) {
  16015. let _sid = this.courseTypeId[i]
  16016. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16017. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16018. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16019. }
  16020. }
  16021. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16022. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16023. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16024. }
  16025. }
  16026. }
  16027. }
  16028. if(this.courseName){
  16029. courseInfo = `课程名称:${this.courseName} `
  16030. }
  16031. if(mclass.length){
  16032. courseInfo += `年级:${mclass.join(',')} `
  16033. }
  16034. if(sub.length){
  16035. courseInfo += `学科:${sub.join(',')} `
  16036. }
  16037. console.log(courseInfo)
  16038. window.course_info = courseInfo
  16039. window.course_lang = this.languageSetting
  16040. },
  16041. setCover(attempts = 0) {
  16042. var _this = this;
  16043. if (_this.cover.length || attempts >= 3) {
  16044. return;
  16045. }
  16046. _this.imageloading2 = true;
  16047. _this.ajax
  16048. .post("https://gpt.cocorobo.cn/search_image", {
  16049. page: _this.ppage,
  16050. pagesize: 9,
  16051. query: _this.courseName,
  16052. })
  16053. .then(function (response) {
  16054. var data = (response.data && response.data.FunctionResponse) ? response.data.FunctionResponse.result : '';
  16055. if(data){
  16056. _this.cover = [];
  16057. setTimeout(() => {
  16058. _this.cover[0] = {
  16059. name: "网络图片.png",
  16060. url: data[0].thumbnail,
  16061. };
  16062. _this.imgChange1(null, null, 1, null);
  16063. _this.$forceUpdate();
  16064. }, 0);
  16065. _this.imageloading2 = false;
  16066. }else {
  16067. _this.imageloading2 = false;
  16068. _this.setCover(attempts + 1);
  16069. }
  16070. })
  16071. .catch(function (error) {
  16072. _this.imageloading2 = false;
  16073. _this.setCover(attempts + 1);
  16074. console.log(error);
  16075. });
  16076. },
  16077. searchImage() {
  16078. var _this = this;
  16079. _this.imageList = [];
  16080. if (!_this.searchImageValue) {
  16081. _this.sysPicVisible2 = true;
  16082. return;
  16083. }
  16084. _this.imageloading = true;
  16085. _this.ajax
  16086. .post("https://gpt.cocorobo.cn/search_image", {
  16087. page: _this.ppage,
  16088. pagesize: 9,
  16089. query: _this.searchImageValue,
  16090. })
  16091. .then(function (response) {
  16092. // console.log(response.data.data);
  16093. var data = response.data.FunctionResponse.result;
  16094. for (var i = 0; i < data.length; i++) {
  16095. _this.imageList.push({ url: data[i].thumbnail });
  16096. }
  16097. _this.imageloading = false;
  16098. })
  16099. .catch(function (error) {
  16100. console.log(error);
  16101. });
  16102. _this.sysPicVisible2 = true;
  16103. },
  16104. changePicture() {
  16105. this.ppage++;
  16106. this.searchImage();
  16107. },
  16108. resetImage() {
  16109. this.ppage = 1;
  16110. this.searchImage();
  16111. },
  16112. jumpGj(i, j) {
  16113. if (i + 1 != this.isClickColor) {
  16114. this.isClickColor = i + 1;
  16115. }
  16116. var a = document.scrollingElement;
  16117. this.toolIndexType = `gj${i}${j}`;
  16118. let target = document.querySelector(`#gj${i}${j}`);
  16119. if (target) {
  16120. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  16121. setTimeout(() => {
  16122. target.scrollIntoView(true);
  16123. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  16124. j
  16125. ].isFold3 = false;
  16126. setTimeout(() => {
  16127. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  16128. }, 0);
  16129. }, 0);
  16130. }
  16131. },
  16132. jumpGj2(i, j, k) {
  16133. if (this.unitIndex != k) {
  16134. if (this.panUnitJson() == 2) {
  16135. return;
  16136. }
  16137. this.unitSet(k);
  16138. }
  16139. setTimeout(() => {
  16140. if (i + 1 != this.isClickColor) {
  16141. this.isClickColor = i + 1;
  16142. }
  16143. var a = document.scrollingElement;
  16144. this.toolIndexType = `gj${i}${j}${k}`;
  16145. let target = document.querySelector(`#gj${i}${j}`);
  16146. if (target) {
  16147. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
  16148. setTimeout(() => {
  16149. target.scrollIntoView(true);
  16150. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[
  16151. j
  16152. ].isFold3 = false;
  16153. setTimeout(() => {
  16154. this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
  16155. }, 0);
  16156. }, 0);
  16157. }
  16158. }, 0);
  16159. },
  16160. dragStart(val, i, j) {
  16161. console.log(this.taskCount);
  16162. this.dragType = "drag";
  16163. this.taskCount = j;
  16164. this.oldIndex = i;
  16165. this.oldData = val;
  16166. },
  16167. dragOver(i, j) {
  16168. this.typeIndex = "chapter-" + j + "-" + i;
  16169. this.newIndex = i;
  16170. },
  16171. dragEnd() {
  16172. if (this.dragType != "drag") {
  16173. this.typeIndex = "";
  16174. this.newIndex = "";
  16175. this.dragType = "";
  16176. this.isdrag = "";
  16177. return;
  16178. }
  16179. console.log(this.taskCount);
  16180. let newItems = [
  16181. ...this.unitJson[this.unitIndex].chapterInfo[0].taskJson[this.taskCount]
  16182. .chapterData,
  16183. ];
  16184. // 删除老的节点
  16185. newItems.splice(this.oldIndex, 1);
  16186. // 在列表中目标位置增加新的节点
  16187. newItems.splice(this.newIndex, 0, this.oldData);
  16188. this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
  16189. this.taskCount
  16190. ].chapterData = [...newItems];
  16191. this.typeIndex = "";
  16192. this.newIndex = "";
  16193. this.dragType = "";
  16194. this.isdrag = "";
  16195. this.$forceUpdate();
  16196. },
  16197. dragTaskStart(val, i, j) {
  16198. this.dragType = "task";
  16199. this.oldIndex = i;
  16200. this.oldData = val;
  16201. this.oldUnitIndex = j;
  16202. },
  16203. dragTaskOver(i, j) {
  16204. this.typeIndex = "task-" + i;
  16205. this.newIndex = i;
  16206. this.checkUnitIndex = j;
  16207. },
  16208. async dragTaskEnd() {
  16209. if (this.dragType != "task") {
  16210. this.newIndex = "";
  16211. this.dragType = "";
  16212. this.typeIndex = "";
  16213. this.checkUnitIndex = "";
  16214. this.isdrag = "";
  16215. return;
  16216. }
  16217. if (
  16218. this.newIndex == this.oldIndex &&
  16219. this.oldUnitIndex == this.checkUnitIndex
  16220. ) {
  16221. this.newIndex = "";
  16222. this.dragType = "";
  16223. this.typeIndex = "";
  16224. this.checkUnitIndex = "";
  16225. this.isdrag = "";
  16226. return;
  16227. }
  16228. let count1 = await this.getWorksCount(
  16229. 2,
  16230. this.checkUnitIndex,
  16231. this.newIndex,
  16232. 0
  16233. );
  16234. let count2 = await this.getWorksCount(
  16235. 2,
  16236. this.oldUnitIndex,
  16237. this.oldIndex,
  16238. 0
  16239. );
  16240. if (count1 > 0 || count2 > 0) {
  16241. this.$confirm(
  16242. "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
  16243. "提示",
  16244. {
  16245. confirmButtonText: "确定",
  16246. cancelButtonText: "取消",
  16247. type: "warning",
  16248. }
  16249. )
  16250. .then(() => {
  16251. if (this.oldUnitIndex != this.checkUnitIndex) {
  16252. let newItems = [
  16253. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16254. ];
  16255. // 删除老的节点
  16256. newItems.splice(this.oldIndex, 1);
  16257. // 在列表中目标位置增加新的节点
  16258. let newItems2 = [
  16259. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  16260. ];
  16261. newItems2.splice(this.newIndex, 0, this.oldData);
  16262. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16263. ...newItems,
  16264. ];
  16265. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  16266. ...newItems2,
  16267. ];
  16268. } else {
  16269. let newItems = [
  16270. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16271. ];
  16272. let chapterData = []
  16273. if (this.oldIndex == 0) {
  16274. chapterData = newItems[this.oldIndex].chapterData
  16275. newItems[this.oldIndex].chapterData = []
  16276. } else if (this.newIndex == 0) {
  16277. chapterData = newItems[this.newIndex].chapterData
  16278. newItems[this.oldIndex].chapterData = []
  16279. }
  16280. // 删除老的节点
  16281. newItems.splice(this.oldIndex, 1);
  16282. // 在列表中目标位置增加新的节点
  16283. newItems.splice(this.newIndex, 0, this.oldData);
  16284. if (this.oldIndex == 0 || this.newIndex == 0) {
  16285. newItems[0].chapterData = chapterData
  16286. }
  16287. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16288. ...newItems,
  16289. ];
  16290. }
  16291. this.typeIndex = "";
  16292. this.newIndex = "";
  16293. this.dragType = "";
  16294. this.checkUnitIndex = "";
  16295. this.isdrag = "";
  16296. this.updateWork();
  16297. this.$forceUpdate();
  16298. })
  16299. .catch(() => {
  16300. this.newIndex = "";
  16301. this.dragType = "";
  16302. this.typeIndex = "";
  16303. this.checkUnitIndex = "";
  16304. this.isdrag = "";
  16305. return;
  16306. });
  16307. } else {
  16308. if (this.oldUnitIndex != this.checkUnitIndex) {
  16309. let newItems = [
  16310. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16311. ];
  16312. // 删除老的节点
  16313. newItems.splice(this.oldIndex, 1);
  16314. // 在列表中目标位置增加新的节点
  16315. let newItems2 = [
  16316. ...this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson,
  16317. ];
  16318. newItems2.splice(this.newIndex, 0, this.oldData);
  16319. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16320. ...newItems,
  16321. ];
  16322. this.unitJson[this.checkUnitIndex].chapterInfo[0].taskJson = [
  16323. ...newItems2,
  16324. ];
  16325. } else {
  16326. let newItems = [
  16327. ...this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson,
  16328. ];
  16329. let chapterData = []
  16330. if (this.oldIndex == 0) {
  16331. chapterData = newItems[this.oldIndex].chapterData
  16332. newItems[this.oldIndex].chapterData = []
  16333. } else if (this.newIndex == 0) {
  16334. chapterData = newItems[this.newIndex].chapterData
  16335. newItems[this.oldIndex].chapterData = []
  16336. }
  16337. // 删除老的节点
  16338. newItems.splice(this.oldIndex, 1);
  16339. // 在列表中目标位置增加新的节点
  16340. newItems.splice(this.newIndex, 0, this.oldData);
  16341. if (this.oldIndex == 0 || this.newIndex == 0) {
  16342. newItems[0].chapterData = chapterData
  16343. }
  16344. this.unitJson[this.oldUnitIndex].chapterInfo[0].taskJson = [
  16345. ...newItems,
  16346. ];
  16347. }
  16348. this.typeIndex = "";
  16349. this.newIndex = "";
  16350. this.dragType = "";
  16351. this.checkUnitIndex = "";
  16352. this.isdrag = "";
  16353. this.updateWork();
  16354. this.$forceUpdate();
  16355. }
  16356. },
  16357. dragUnitStart(val, i) {
  16358. this.dragType = "Unit";
  16359. this.oldIndex = i;
  16360. this.oldData = val;
  16361. },
  16362. dragUnitOver(i) {
  16363. this.typeIndex = "Unit-" + i;
  16364. this.newIndex = i;
  16365. console.log(i, this.unitJson[i].toolOpen);
  16366. if (!this.unitJson[i].toolOpen && this.dragType == "task") {
  16367. this.unitJson[i].toolOpen = true;
  16368. this.updateWork();
  16369. this.$forceUpdate();
  16370. }
  16371. },
  16372. async dragUnitEnd() {
  16373. if (this.dragType != "Unit") {
  16374. this.newIndex = "";
  16375. this.dragType = "";
  16376. this.typeIndex = "";
  16377. this.isdrag = "";
  16378. return;
  16379. }
  16380. if (this.newIndex == this.oldIndex) {
  16381. this.newIndex = "";
  16382. this.dragType = "";
  16383. this.typeIndex = "";
  16384. this.isdrag = "";
  16385. return;
  16386. }
  16387. let count1 = await this.getWorksCount(1, this.newIndex, 0, 0);
  16388. let count2 = await this.getWorksCount(1, this.oldIndex, 0, 0);
  16389. console.log(count1, count2);
  16390. if (count1 > 0 || count2 > 0) {
  16391. this.$confirm(
  16392. "切换阶段顺序将删除所有工具的提交成果,是否继续此操作?",
  16393. "提示",
  16394. {
  16395. confirmButtonText: "确定",
  16396. cancelButtonText: "取消",
  16397. type: "warning",
  16398. }
  16399. )
  16400. .then(() => {
  16401. let newItems = [...this.unitJson];
  16402. // 删除老的节点
  16403. newItems.splice(this.oldIndex, 1);
  16404. // 在列表中目标位置增加新的节点
  16405. newItems.splice(this.newIndex, 0, this.oldData);
  16406. this.unitJson = [...newItems];
  16407. this.typeIndex = "";
  16408. this.newIndex = "";
  16409. this.dragType = "";
  16410. this.isdrag = "";
  16411. this.updateWork();
  16412. this.$forceUpdate();
  16413. })
  16414. .catch(() => {
  16415. this.newIndex = "";
  16416. this.dragType = "";
  16417. this.typeIndex = "";
  16418. this.isdrag = "";
  16419. return;
  16420. });
  16421. } else {
  16422. let newItems = [...this.unitJson];
  16423. // 删除老的节点
  16424. newItems.splice(this.oldIndex, 1);
  16425. // 在列表中目标位置增加新的节点
  16426. newItems.splice(this.newIndex, 0, this.oldData);
  16427. this.unitJson = [...newItems];
  16428. this.typeIndex = "";
  16429. this.newIndex = "";
  16430. this.dragType = "";
  16431. this.isdrag = "";
  16432. this.updateWork();
  16433. this.$forceUpdate();
  16434. }
  16435. },
  16436. getWorksCount(type, stage, task, tool) {
  16437. return new Promise((resolve, reject) => {
  16438. let params = [
  16439. {
  16440. cid: this.cid,
  16441. stage: stage,
  16442. task: task,
  16443. tool: tool,
  16444. type: type,
  16445. },
  16446. ];
  16447. this.ajax
  16448. .post(this.$store.state.api + "getCourseWorkCount", params)
  16449. .then((res) => {
  16450. let count = res.data[0][0].count;
  16451. resolve(count);
  16452. })
  16453. .catch((err) => {
  16454. resolve(0);
  16455. this.$message.error("网络不佳");
  16456. console.error(err);
  16457. });
  16458. });
  16459. },
  16460. getTwoType(id) {
  16461. this.twoJson = [];
  16462. var array = this.CourseTypeJson1[
  16463. "3f8eed32-aba9-11ee-b534-005056b86db5"
  16464. ].filter((e) => {
  16465. return e.ppid == id;
  16466. });
  16467. this.twoJson = array;
  16468. this.$forceUpdate();
  16469. },
  16470. ctype() {
  16471. this.oneJson =
  16472. this.CourseTypeJson1["3c73702a-aba9-11ee-b534-005056b86db5"];
  16473. },
  16474. selectAllType1() {
  16475. this.CourseType1 = [];
  16476. this.CourseTypeJson1 = {};
  16477. this.courseTypeId1 = {};
  16478. this.$forceUpdate();
  16479. let params = {
  16480. org: this.org && this.org != "" ? this.org : "",
  16481. oid: this.oid && this.oid != "" ? this.oid : "",
  16482. };
  16483. this.ajax
  16484. .get(this.$store.state.api + "selectAllEvaType", params)
  16485. .then((res) => {
  16486. this.CourseType1 = res.data;
  16487. for (var i = 0; i < res.data[0].length; i++) {
  16488. if (res.data[0][i].id == "3c73702a-aba9-11ee-b534-005056b86db5") {
  16489. res.data[0][i].name = "一级分类";
  16490. } else if (
  16491. res.data[0][i].id == "3f8eed32-aba9-11ee-b534-005056b86db5"
  16492. ) {
  16493. res.data[0][i].name = "二级分类";
  16494. }
  16495. if (!this.cid) {
  16496. this.courseTypeId1[res.data[0][i].id] = [];
  16497. }
  16498. if (!this.CourseTypeJson1[res.data[0][i].id]) {
  16499. this.CourseTypeJson1[res.data[0][i].id] = [];
  16500. }
  16501. // if (res.data[2].length == 0 && res.data[3].length == 0) {
  16502. for (var j = 0; j < res.data[1].length; j++) {
  16503. if (res.data[0][i].id == res.data[1][j].pid) {
  16504. this.CourseTypeJson1[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  16505. }
  16506. }
  16507. // } else {
  16508. if (res.data[2].length > 0) {
  16509. for (var j = 0; j < res.data[2].length; j++) {
  16510. if (res.data[0][i].id == res.data[2][j].pid) {
  16511. this.CourseTypeJson1[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  16512. }
  16513. }
  16514. }
  16515. if (res.data[3].length > 0) {
  16516. for (var j = 0; j < res.data[3].length; j++) {
  16517. if (res.data[0][i].id == res.data[3][j].pid) {
  16518. this.CourseTypeJson1[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  16519. }
  16520. }
  16521. }
  16522. // }
  16523. }
  16524. this.ctype();
  16525. this.cetBoxDialog = true;
  16526. })
  16527. .catch((err) => {
  16528. console.error(err);
  16529. });
  16530. },
  16531. setAiJson(pan,string,string2,string3){
  16532. if(pan == 'aiTeacher2'){
  16533. this.aiJson['teacherDetail2'] = string
  16534. }else if(pan == 'aiRateRuleA'){
  16535. this.aiJson['aiRateRule'] = string
  16536. }else if(pan == 'aiOutline2'){
  16537. this.aiJson['aiOutlineTask'] = string
  16538. this.aiJson['aiOutlineDetail'] = string2
  16539. }else if(pan == 'aiTeacher3'){
  16540. this.aiJson['aiCpoteTask'] = string
  16541. this.aiJson['teacherDetail2'] = string2
  16542. }else if(pan == 'aiTask2'){
  16543. this.aiJson['aiTask'] = string
  16544. }else if(pan == 'aiTask3'){
  16545. this.aiJson['aiTaskG1'] = string
  16546. this.aiJson['aiTaskG2'] = string2
  16547. this.aiJson['aiTaskG3'] = string3
  16548. }else if(pan == 'aiteacherTextDetail'){
  16549. this.aiJson['aiAbstract'] = string
  16550. }else if(pan == 'aitargetTextDetail'){
  16551. this.aiJson['aiTarget'] = string
  16552. }else if(pan == 'aitargetTextDetail2'){
  16553. this.aiJson['aiTarget2'] = string
  16554. }else if(pan == 'aitargetTextDetail3'){
  16555. this.aiJson['aiTargetGet'] = string
  16556. this.aiJson['aiTarget2'] = string2
  16557. }else {
  16558. this.aiJson[pan] = string
  16559. }
  16560. this.aiText2 = ''
  16561. this.aiText3 = ''
  16562. this.$forceUpdate();
  16563. },
  16564. editTask3(index){
  16565. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask3){
  16566. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = false
  16567. }else {
  16568. this.unitJson[0].chapterInfo[0].taskJson[index].isTask3 = true
  16569. }
  16570. setTimeout(() => {
  16571. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 += "*0*%*";
  16572. setTimeout(() => {
  16573. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll("*0*%*", "");
  16574. }, 0);
  16575. }, 100);
  16576. this.$forceUpdate();
  16577. },
  16578. editTask2(index){
  16579. if(this.unitJson[0].chapterInfo[0].taskJson[index].isTask2){
  16580. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = false
  16581. }else {
  16582. this.unitJson[0].chapterInfo[0].taskJson[index].isTask2 = true
  16583. }
  16584. setTimeout(() => {
  16585. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 += "*0*%*";
  16586. setTimeout(() => {
  16587. this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2 = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2.replaceAll("*0*%*", "");
  16588. }, 0);
  16589. }, 100);
  16590. this.$forceUpdate();
  16591. },
  16592. openRule(i, k){
  16593. if(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule){
  16594. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = false
  16595. }else {
  16596. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].isrule = true
  16597. }
  16598. setTimeout(() => {
  16599. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule += "*0*%*";
  16600. setTimeout(() => {
  16601. this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule = this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule.replaceAll("*0*%*", "");
  16602. }, 0);
  16603. }, 200);
  16604. this.$forceUpdate();
  16605. },
  16606. editCpote(index){
  16607. if(this.cpote[index]){
  16608. this.cpote[index] = false
  16609. }else {
  16610. this.cpote[index] = true
  16611. }
  16612. setTimeout(() => {
  16613. this.cpote[index.replace('s','')] += "*0*%*";
  16614. setTimeout(() => {
  16615. this.cpote[index.replace('s','')] = this.cpote[index.replace('s','')].replaceAll("*0*%*", "");
  16616. }, 0);
  16617. }, 100);
  16618. this.$forceUpdate();
  16619. },
  16620. clickGenTT(){
  16621. if(!this.teacherInfoData.length){
  16622. this.$message.error("请上传教案");
  16623. return;
  16624. }
  16625. this.addCourseBehavior('courseBehavior', '点击已有教案-一键只能总结生成按钮')
  16626. this.openAiDialog(2, 'aiteacherTextDetail',1)
  16627. setTimeout(() => {
  16628. this.openAiDialog(2, 'aitargetTextDetail',1)
  16629. }, 500);
  16630. },
  16631. async exportTeachPlan(){
  16632. this.loading = true
  16633. const zip = new JSZip();
  16634. let md = new MarkdownIt();
  16635. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  16636. let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
  16637. let name = _task.task+'-教案'
  16638. let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
  16639. if(!this.cid || !this.unitJson[0].chapterInfo[0].taskJson[i].chapterData.length){
  16640. await this.generate(name, _html, i)
  16641. }
  16642. let file = await this.generateExport(name, _html, i)
  16643. zip.file(`${name}.docx`, file, { binary: true })
  16644. }
  16645. zip.generateAsync({ type: "blob" }).then((content) => {
  16646. // 生成二进制流
  16647. saveAs(
  16648. content,
  16649. this.courseName + "-" + "教案.zip"
  16650. ); // 利用file-saver保存文件 自定义文件名
  16651. setTimeout(() => {
  16652. this.loading = false
  16653. // if(!this.cid){
  16654. // this.addWork(3)
  16655. // }else{
  16656. // this.updateWork();
  16657. // this.steps = 4;
  16658. // }
  16659. }, 2000);
  16660. });
  16661. },
  16662. clickGenTT2(){
  16663. if (this.courseName == "") {
  16664. this.$message.error("请补充填写课程名称");
  16665. return;
  16666. }
  16667. this.addCourseBehavior('courseBehavior', '点击课程简要描述-生成概况和目标按钮')
  16668. let functionA = ''
  16669. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  16670. // setTimeout(() => {
  16671. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  16672. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  16673. // }, 500);
  16674. functionA = ()=>{
  16675. this.openAiDialog(2, 'aitargetTextDetail3',1)
  16676. }
  16677. }
  16678. this.openAiDialog(2, 'aiDetail',1, functionA)
  16679. if(this.templateid != '4480d65a-1e48-11ef-bee5-005056b86db5' && this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc3'){
  16680. // setTimeout(() => {
  16681. // this.openAiDialog(2, 'aitargetTextDetail2',1)
  16682. // this.openAiDialog(2, 'aitargetTextDetail3',1)
  16683. // }, 500);
  16684. }
  16685. this.courseTextBool = true
  16686. },
  16687. changeIsuseT(){
  16688. if(this.isuseT == 1){
  16689. this.courseTextB = false
  16690. }else{
  16691. if(this.courseText){
  16692. this.courseTextB = false
  16693. }else{
  16694. this.courseTextB = true
  16695. }
  16696. }
  16697. },
  16698. changeLang(){
  16699. window.course_lang = this.languageSetting
  16700. },
  16701. openInterPanSetting(){
  16702. this.interSetting = !this.interSetting
  16703. if(this.interSetting){
  16704. if(this.istemplate == 1){
  16705. this.agentid = this.aiJson.agentid
  16706. }else {
  16707. this.agentid = this.aiJson.sagentid
  16708. }
  16709. }else {
  16710. this.agentid = ''
  16711. }
  16712. },
  16713. setAgentid(){
  16714. if(!this.agentid.trim()){
  16715. this.$message.error('请输入工作流链接')
  16716. return;
  16717. }
  16718. if(this.istemplate == 1){
  16719. this.aiJson.agentid = this.agentid.trim()
  16720. }else {
  16721. this.aiJson.sagentid = this.agentid.trim()
  16722. }
  16723. this.interFlash = false
  16724. setTimeout(() => {
  16725. this.interFlash = true
  16726. }, 100);
  16727. this.interSetting = false
  16728. },
  16729. rebuildAgentid(){
  16730. this.aiJson.sagentid = ''
  16731. this.interFlash = false
  16732. setTimeout(() => {
  16733. this.interFlash = true
  16734. }, 100);
  16735. this.interSetting = false
  16736. },
  16737. cancelInterSetting(){
  16738. this.agentid = ''
  16739. this.interSetting = false
  16740. },
  16741. openAiDialog2(clickType, type, callback, index, tindex){
  16742. this.$confirm("重新生成会影响已生成内容,确定重新生成吗?", "提示", {
  16743. confirmButtonText: "确定",
  16744. cancelButtonText: "取消",
  16745. type: "warning",
  16746. })
  16747. .then(() => {
  16748. // if ((this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") && type == "aiTeacher2") {
  16749. // this.openAiDialog(clickType, 'aiTeacher')
  16750. // }else {
  16751. this.openAiDialog(clickType, type, callback, index, tindex)
  16752. // }
  16753. })
  16754. .catch(() => {
  16755. });
  16756. },
  16757. openAiDialog(clickType, type, callback, index, tindex) {
  16758. if(clickType == 1 && this.tipsJson.istips == 1 && this.istemplate != 1 && this.tipsJson.userid != this.userid && this.userid != '5943e08c-b7d4-11ed-8d51-005056b86db5'){
  16759. this.$message.error("您没有权限修改/查看提示词");
  16760. return;
  16761. }
  16762. if(!this.teacherInfoData.length && (type == 'aiteacherTextDetail' || type == 'aitargetTextDetail')){
  16763. this.$message.error("请上传教案");
  16764. return;
  16765. }
  16766. if (this.courseName == "") {
  16767. this.$message.error("请补充填写课程名称");
  16768. return;
  16769. }
  16770. this.aiText2 = ''
  16771. this.clickType = clickType
  16772. let sub = []
  16773. if (this.courseTypeId.length) {
  16774. for (var i = 0; i < this.courseTypeId.length; i++) {
  16775. let _sid = this.courseTypeId[i]
  16776. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16777. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  16778. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  16779. }
  16780. }
  16781. }
  16782. }
  16783. let mclass = []
  16784. if (this.courseTypeId.length) {
  16785. for (var i = 0; i < this.courseTypeId.length; i++) {
  16786. let _sid = this.courseTypeId[i]
  16787. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  16788. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  16789. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  16790. }
  16791. }
  16792. }
  16793. }
  16794. if (type == "aiDetail") {
  16795. if (this.ttextLoading) {
  16796. this.$message({
  16797. message: "请回答完毕后再次发送",
  16798. type: "warning"
  16799. });
  16800. return;
  16801. }
  16802. this.aitype = "aiDetail"
  16803. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
  16804. this.aiText = this.aiJson.aiDetail
  16805. this.aiCallBack = [callback, index]
  16806. } else if (type == "aiOutline") {
  16807. this.aitype = "aiOutline"
  16808. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16809. this.aiText = this.aiJson.aiOutline
  16810. } else if (type == "aiOutline2") {
  16811. this.aitype = "aiOutline2"
  16812. // this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
  16813. this.aiText = this.aiJson.aiOutlineTask
  16814. this.aiText2 = this.aiJson.aiOutlineDetail
  16815. } else if (type == "aiOutlineDetail2") {
  16816. if (this.ttaskDetailLoading.indexOf('task-' + callback) !== -1) {
  16817. this.$message({
  16818. message: "请回答完毕后再次发送",
  16819. type: "warning"
  16820. });
  16821. return;
  16822. }
  16823. if(!this.unitJson[0].chapterInfo[0].taskJson[callback].task){
  16824. this.$message.error('请输入任务名称')
  16825. return;
  16826. }
  16827. this.aitype = type
  16828. this.aiCallBack = callback
  16829. this.aiText = this.aiJson.aiOutlineDetail2
  16830. } else if (type == "aiTask") {
  16831. this.aitype = "aiTask"
  16832. var _text = ""
  16833. for (var i = 0; i < this.teacherText.length; i++) {
  16834. _text += `任务名称:${this.teacherText[i].task} 教案:${this.teacherText[i].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}`
  16835. }
  16836. // this.aiText = `请根据${_text}。`
  16837. this.aiText = this.aiJson.aiTask
  16838. this.aiCallBack = callback
  16839. } else if (type == "aiTask2") {
  16840. if (this.taskLoading[callback]) {
  16841. this.$message({
  16842. message: "请回答完毕后再次发送",
  16843. type: "warning"
  16844. });
  16845. return;
  16846. }
  16847. this.aitype = "aiTask2"
  16848. this.aiText = this.aiJson.aiTask
  16849. this.aiCallBack = [callback, index]
  16850. } else if (type == "aiTask3") {
  16851. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0] || this.taskGLoading[callback][1] || this.taskGLoading[callback][0][2])) {
  16852. this.$message({
  16853. message: "请回答完毕后再次发送",
  16854. type: "warning"
  16855. });
  16856. return;
  16857. }
  16858. this.aitype = type
  16859. this.aiText = this.aiJson.aiTaskG1
  16860. this.aiText2 = this.aiJson.aiTaskG2
  16861. this.aiText3 = this.aiJson.aiTaskG3
  16862. this.aiCallBack = [callback, index]
  16863. } else if (type == "aiTaskG3") {
  16864. if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][2])) {
  16865. this.$message({
  16866. message: "请回答完毕后再次发送",
  16867. type: "warning"
  16868. });
  16869. return;
  16870. }
  16871. this.aitype = type
  16872. this.aiText = this.aiJson.aiTaskG3
  16873. this.aiCallBack = callback
  16874. } else if (type == "aiDetail1") {
  16875. if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
  16876. this.$message({
  16877. message: "请回答完毕后再次发送",
  16878. type: "warning"
  16879. });
  16880. return;
  16881. }
  16882. this.aitype = "aiDetail1"
  16883. // this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
  16884. // this.aiText = `请根据${callback},重新设计该教学任务。任务需要至少50个token的详细描述,包含任务设计,评价标准 \n`
  16885. this.aiText = this.aiJson.aiDetail1
  16886. this.aiCallBack = callback
  16887. this.aiIndex = index
  16888. } else if (type == "aiDetail2") {
  16889. if (this.ttaskDetailLoading2.indexOf('task-' + index) !== -1) {
  16890. this.$message({
  16891. message: "请回答完毕后再次发送",
  16892. type: "warning"
  16893. });
  16894. return;
  16895. }
  16896. this.aitype = "aiDetail2"
  16897. // this.aiText = `请你在考虑到整个课程的情况下,优化该任务描述和任务名:${callback.task}:${callback.taskDetail}`
  16898. this.aiText = this.aiJson.aiDetail2
  16899. this.aiCallBack = callback
  16900. this.aiIndex = index
  16901. } else if (type == "aiDetail3") {
  16902. if (this.ttaskDetailLoading3.indexOf('task-' + index + tindex) !== -1) {
  16903. this.$message({
  16904. message: "请回答完毕后再次发送",
  16905. type: "warning"
  16906. });
  16907. return;
  16908. }
  16909. this.aitype = "aiDetail3"
  16910. this.aiText = this.aiJson.aiDetail3
  16911. this.aiIndex = index + '-' + tindex
  16912. } else if (type == "aiDetail4") {
  16913. var _text = ""
  16914. if(callback && callback.length){
  16915. for (var i = 0; i < callback.length; i++) {
  16916. _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} `
  16917. }
  16918. }
  16919. this.aitype = "aiDetail4"
  16920. this.aiText = this.aiJson.aiDetail4
  16921. this.aiIndex = index
  16922. } else if (type == "aiTeacher") {
  16923. this.aitype = "aiTeacher"
  16924. var _text = ""
  16925. for (var i = 0; i < this.dArray.length; i++) {
  16926. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  16927. }
  16928. // this.aiText = `请根据${_text}为每个教学任务设计详细的教案,其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16929. this.aiText = this.aiJson.aiTeacher
  16930. this.aiCallBack = callback
  16931. } else if (type == "aiTeacher2") {
  16932. if(this.ttaskDetailLoading5.length){
  16933. let num = parseInt(this.ttaskDetailLoading5[0].split("task-")[1]) + 1
  16934. this.$message({
  16935. message: "教案任务"+num+"描述还未生成完,请前往查看,回答完毕后再次操作。",
  16936. type: "warning"
  16937. });
  16938. return
  16939. }
  16940. this.aitype = "aiTeacher2"
  16941. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16942. } else if (type == "aiTeacher3") {
  16943. this.aitype = type
  16944. this.aiText = this.aiJson.aiCpoteTask
  16945. this.aiText2 = this.aiJson.teacherDetail2
  16946. } else if (type == "teacherDetail") {
  16947. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  16948. this.$message({
  16949. message: "请回答完毕后再次发送",
  16950. type: "warning"
  16951. });
  16952. return;
  16953. }
  16954. this.aitype = "teacherDetail"
  16955. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16956. this.aiText = this.aiJson.teacherDetail
  16957. this.aiCallBack = callback
  16958. this.aiIndex = index
  16959. } else if (type == "teacherDetail2") {
  16960. if(!this.unitJson[0].chapterInfo[0].taskJson[index].task){
  16961. this.$message.error('请输入任务名称')
  16962. return;
  16963. }
  16964. if (this.ttaskDetailLoading5.indexOf('task-' + index) !== -1) {
  16965. // this.$message({
  16966. // message: "请回答完毕后再次发送",
  16967. // type: "warning"
  16968. // });
  16969. // return;
  16970. this.$confirm("还未生成完毕,是否直接重新生成?", "提示", {
  16971. confirmButtonText: "确定重新生成",
  16972. cancelButtonText: "取消",
  16973. distinguishCancelAndClose: true,
  16974. type: "warning",
  16975. customClass: 'custom-confirm-box'
  16976. })
  16977. .then(() => {
  16978. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  16979. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  16980. this.isTeacherTaskCancelToken2[index] = null;
  16981. }
  16982. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  16983. this.ttaskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  16984. if(this.isTeacherTaskCancelSource[index]){
  16985. this.isTeacherTaskCancelSource[index].close()
  16986. this.isTeacherTaskCancelSource[index] = null
  16987. }
  16988. this.aitype = "teacherDetail2"
  16989. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  16990. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  16991. this.aiCallBack = callback
  16992. this.aiIndex = index
  16993. this.dialogVisibleAiD = true
  16994. }).catch((v) => {
  16995. console.log(v);
  16996. })
  16997. setTimeout(() => {
  16998. this.setTipsIndex()
  16999. }, 500)
  17000. return;
  17001. }else {
  17002. this.aitype = "teacherDetail2"
  17003. // this.aiText = `请根据${callback}\n重新设计该教案。其中包括但不仅限于该任务的教学目标,教学过程,师生研讨,拓展,学生任务单,相关知识点的练习或Qui以及答案等。`
  17004. this.aiText = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  17005. this.aiCallBack = callback
  17006. this.aiIndex = index
  17007. this.dialogVisibleAiD = true
  17008. }
  17009. } else if (type == "aiCpote1") {
  17010. if (this.cpotetLoading.cpote1) {
  17011. this.$message({
  17012. message: "请回答完毕后再次发送",
  17013. type: "warning"
  17014. });
  17015. return;
  17016. }
  17017. this.aitype = "aiCpote1"
  17018. this.aiText = this.aiJson.cpote1
  17019. this.aiCallBack = callback
  17020. } else if (type == "aiCpote2") {
  17021. if (this.cpotetLoading.cpote2) {
  17022. this.$message({
  17023. message: "请回答完毕后再次发送",
  17024. type: "warning"
  17025. });
  17026. return;
  17027. }
  17028. this.aitype = "aiCpote2"
  17029. this.aiText = this.aiJson.cpote2
  17030. this.aiCallBack = callback
  17031. } else if (type == "aiCpote3") {
  17032. if (this.cpotetLoading.cpote3) {
  17033. this.$message({
  17034. message: "请回答完毕后再次发送",
  17035. type: "warning"
  17036. });
  17037. return;
  17038. }
  17039. this.aitype = "aiCpote3"
  17040. this.aiText = this.aiJson.cpote3
  17041. this.aiCallBack = callback
  17042. } else if (type == "aiCpote4") {
  17043. if (this.cpotetLoading.cpote4) {
  17044. this.$message({
  17045. message: "请回答完毕后再次发送",
  17046. type: "warning"
  17047. });
  17048. return;
  17049. }
  17050. this.aitype = "aiCpote4"
  17051. this.aiText = this.aiJson.cpote4
  17052. this.aiCallBack = callback
  17053. } else if (type == 'aiteacherTextDetail'){
  17054. if (this.tteacherTextLoading) {
  17055. this.$message({
  17056. message: "请回答完毕后再次发送",
  17057. type: "warning"
  17058. });
  17059. return;
  17060. }
  17061. this.aitype = type
  17062. this.aiText = this.aiJson.aiAbstract
  17063. this.aiCallBack = callback
  17064. } else if (type == 'aitargetTextDetail'){
  17065. if (this.ttargetTextLoading) {
  17066. this.$message({
  17067. message: "请回答完毕后再次发送",
  17068. type: "warning"
  17069. });
  17070. return;
  17071. }
  17072. this.aitype = type
  17073. this.aiText = this.aiJson.aiTarget
  17074. this.aiCallBack = callback
  17075. } else if (type == 'aitargetTextDetail2'){
  17076. if (this.ttargetTextLoading2) {
  17077. this.$message({
  17078. message: "请回答完毕后再次发送",
  17079. type: "warning"
  17080. });
  17081. return;
  17082. }
  17083. this.aitype = type
  17084. this.aiText = this.aiJson.aiTarget2
  17085. this.aiCallBack = callback
  17086. } else if (type == 'aitargetTextDetail3'){
  17087. if (this.ttargetTextLoading2) {
  17088. this.$message({
  17089. message: "请回答完毕后再次发送",
  17090. type: "warning"
  17091. });
  17092. return;
  17093. }
  17094. if(!this.courseText){
  17095. this.$message.error("请生成简要描述后再生成目标");
  17096. return;
  17097. }
  17098. this.aitype = type
  17099. this.aiText = this.aiJson.aiTargetGet
  17100. this.aiText2 = this.aiJson.aiTarget2
  17101. this. aiCallBack= callback
  17102. } else if (type == 'aiSearchFile'){
  17103. if(this.fileSLoading) {
  17104. this.$message({
  17105. message: "请回答完毕后再次发送",
  17106. type: "warning"
  17107. });
  17108. return;
  17109. }
  17110. this.aitype = type
  17111. this.aiText = this.aiJson.aiSearchFile
  17112. } else if (type == 'aiSearchFile2'){
  17113. if(this.fileSLoading) {
  17114. this.$message({
  17115. message: "请回答完毕后再次发送",
  17116. type: "warning"
  17117. });
  17118. return;
  17119. }
  17120. this.aitype = type
  17121. this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
  17122. #输出样例
  17123. <学科1>:关键词
  17124. - 匹配到的内容1
  17125. - 匹配到的内容2
  17126. - 匹配到的内容3
  17127. - 匹配到的内容4
  17128. - 匹配到的内容5
  17129. <学科2>:关键词
  17130. - 匹配到的内容1
  17131. - 匹配到的内容2
  17132. - 匹配到的内容3
  17133. - 匹配到的内容4
  17134. - 匹配到的内容5
  17135. ...
  17136. <学科n>:关键词
  17137. - 匹配到的内容1
  17138. - 匹配到的内容2
  17139. - 匹配到的内容3
  17140. - 匹配到的内容4
  17141. - 匹配到的内容5
  17142. `
  17143. } else if (type == 'aiRateRule'){
  17144. this.aitype = type
  17145. this.aiText = this.aiJson.aiRateRule
  17146. this.aiCallBack = [callback, index]
  17147. } else if (type == 'aiRateRuleA'){
  17148. this.$confirm("是否生成所有维度的细则?仅生成该任务/生成所有", "提示", {
  17149. confirmButtonText: "生成所有",
  17150. cancelButtonText: "仅生成该任务",
  17151. distinguishCancelAndClose: true,
  17152. type: "warning",
  17153. })
  17154. .then(() => {
  17155. this.aitype = type
  17156. this.aiText = this.aiJson.aiRateRule
  17157. this.aiCallBack = [1,callback]
  17158. this.dialogVisibleAiD = true
  17159. }).catch((v) => {
  17160. console.log(v);
  17161. if (v == "cancel") {
  17162. this.aitype = type
  17163. this.aiText = this.aiJson.aiRateRule
  17164. this.aiCallBack = [2,callback]
  17165. this.dialogVisibleAiD = true
  17166. }
  17167. })
  17168. }
  17169. if(type != 'aiRateRuleA' && type != 'teacherDetail2'){
  17170. this.dialogVisibleAiD = true
  17171. }
  17172. },
  17173. async aiConfirm(msg,msg2,msg3) {
  17174. let sub = []
  17175. if (this.courseTypeId.length) {
  17176. for (var i = 0; i < this.courseTypeId.length; i++) {
  17177. let _sid = this.courseTypeId[i]
  17178. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17179. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17180. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17181. }
  17182. }
  17183. }
  17184. }
  17185. let mclass = []
  17186. if (this.courseTypeId.length) {
  17187. for (var i = 0; i < this.courseTypeId.length; i++) {
  17188. let _sid = this.courseTypeId[i]
  17189. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17190. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17191. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17192. }
  17193. }
  17194. }
  17195. }
  17196. let url = []
  17197. if (this.infoData.length) {
  17198. for (var i = 0; i < this.infoData.length; i++) {
  17199. url.push(this.infoData[i].url)
  17200. }
  17201. }
  17202. if (this.aitype == "aiDetail") {
  17203. this.detailYou(msg)
  17204. } else if (this.aitype == "aiOutline") {
  17205. this.loading = true
  17206. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  17207. // ${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  17208. // let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? '任务设计、评价标准和教学目标(markdown格式)' : '任务设计和评价标准'
  17209. let txt = (!this.yiKeTemplateArray.includes(this.templateid)) ? ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  17210. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  17211. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 ` : ` **子教学目标**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  17212. **过程性成果**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  17213. **子评价标准**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  17214. if(this.languageSetting == 2){
  17215. txt = ` **Sub-Objectives**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  17216. **Formative Outcomes**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  17217. **Sub-Criteria**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果 `
  17218. }
  17219. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  17220. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17221. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  17222. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  17223. let message = `NOTICE
  17224. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17225. Output: Provide your output in json format.
  17226. Language: ${this.getLang()}
  17227. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17228. Instruction: Based on the context, follow "Format example", write content.
  17229. # Context
  17230. ## 要求
  17231. ${msg} 以及##参考资料
  17232. ## 参考资料
  17233. 课程名字:${this.courseName} ${courseText ? '课程简要描述:' + courseText : ''} ${sub.length ? '学科:' + sub.join(",") : ''} ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17234. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17235. detail至少输出300tokens,markdown格式输出。
  17236. detail包含子教学目标、过程性成果、子评价标准
  17237. 子教学目标:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  17238. 过程性成果:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  17239. 子评价标准:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  17240. task2输出子任务名称但是不要输出序号或者前缀仅输出名称
  17241. # Format example`
  17242. message = message.replaceAll('\n', ' ')
  17243. message+=`\n[{"task": "任务名称","task2": "子任务名称","detail": "${txt}"},{"task": "任务名称","task2": "子任务名称","detail": "${txt}"}]
  17244. Instruction: Based on the context, follow "Format example", write content.`.replaceAll('*','')
  17245. // detail输出不要输出成json,文本或者markdown都可以
  17246. this.aiGet2(message, () => {
  17247. this.loading = false
  17248. this.isOutline = true
  17249. })
  17250. } else if (this.aitype == "aiOutline2") {
  17251. this.loading = true
  17252. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17253. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  17254. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  17255. let message = `NOTICE
  17256. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17257. Language: ${this.getLang()}
  17258. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17259. Instruction: Based on the context, follow "Format example", write content.
  17260. # Context
  17261. ## 要求
  17262. ${msg} 以及##参考资料
  17263. ## 参考资料
  17264. 课程名字:${this.courseName}
  17265. ${this.courseText ? '课程简要描述:' + this.courseText : ''}
  17266. ${sub.length ? '学科:' + sub.join(",") : ''}
  17267. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17268. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17269. # Format example
  17270. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务3的名字"}, {"task": "任务n的名字"}]`
  17271. this.aiGetTask2(message, () => {
  17272. this.loading = false
  17273. this.isOutline = true
  17274. })
  17275. } else if (this.aitype == "aiOutlineDetail2") {
  17276. this.aiOutlineDetail2(this.aiJson.aiOutlineDetail2, this.aiCallBack)
  17277. } else if (this.aitype == "aiTask") {
  17278. var _text = ""
  17279. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17280. _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  17281. }
  17282. let message = `NOTICE
  17283. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  17284. Language: ${this.getLang()}
  17285. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17286. Instruction: Based on the context, follow "Format example", write content.
  17287. # Context
  17288. ## 要求
  17289. ${msg} 为**每个教学任务分别输出**以下内容。
  17290.  
  17291. ${(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','') : ''}
  17292. ## 参考资料
  17293. 教学任务教案:${_text}
  17294. ## 格式要求
  17295. 任务数量:${this.unitJson[0].chapterInfo[0].taskJson.length}个
  17296. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  17297. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  17298. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  17299. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  17300. 出现选择题和问答题的概率提高
  17301. 生成${this.unitJson[0].chapterInfo[0].taskJson.length}个任务
  17302.  
  17303. # Format example
  17304. [{"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":"工具描述"}]}]`
  17305. this.loading = true
  17306. this.aiGet3(message, this.aiCallBack)
  17307. } else if (this.aitype == "aiTask2") {
  17308. if(this.aiCallBack[0] == 'all'){
  17309. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  17310. var _text = `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[_task].task} 任务描述:${this.unitJson[0].chapterInfo[0].taskJson[_task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  17311. let message = `NOTICE
  17312. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  17313. Language: ${this.getLang()}
  17314. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17315. Instruction: Based on the context, follow "Format example", write content.
  17316. # Context
  17317. ## 要求
  17318. ${msg} 为教学任务分别输出以下内容。
  17319.  
  17320. ${(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','') : ''}
  17321. ## 参考资料
  17322. 教学任务教案:${_text}
  17323. ## 格式要求
  17324. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  17325. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  17326. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  17327. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  17328. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  17329.  
  17330. # Format example
  17331. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17332. this.taskLoading[_task] = true
  17333. this.aiGet32(message, _task)
  17334. }
  17335. }else{
  17336. 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`
  17337. let message = `NOTICE
  17338. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数组的数据。
  17339. Language: ${this.getLang()}
  17340. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17341. Instruction: Based on the context, follow "Format example", write content.
  17342. # Context
  17343. ## 要求
  17344. ${msg} 为教学任务分别输出以下内容。
  17345.  
  17346. ${(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','') : ''}
  17347. ## 参考资料
  17348. 教学任务教案:${_text}
  17349. ## 格式要求
  17350. 任务描述:用老师的身份以友好,但是又清晰明确的口吻来撰写该描述,该描述教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,输出内容至少200tokens
  17351. 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据<教学任务教案>提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  17352. 工具名:从工具列表中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
  17353. 工具描述:用同学的方式以友好亲切,明确的口吻告诉学生该如何使用该工具
  17354. 出现选择题和问答题的概率提高,然后根据<教学任务教案>判断是否需要选择题或者问答题
  17355.  
  17356. # Format example
  17357. {"detail":"面向学生的任务描述","elist":[{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}],"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17358. this.taskLoading[this.aiCallBack[0]] = true
  17359. this.aiGet32(message, this.aiCallBack[0])
  17360. }
  17361. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17362. } else if (this.aitype == "aiTask3") {
  17363. if(this.aiCallBack[0] == 'all'){
  17364. for(var _task = 0; _task < this.unitJson[0].chapterInfo[0].taskJson.length; _task++){
  17365. if(!this.taskGLoading[_task]){
  17366. this.taskGLoading[_task] = []
  17367. }
  17368. this.taskGLoading[_task][0] = true
  17369. this.taskGLoading[_task][1] = true
  17370. // this.taskGLoading[_task][2] = true
  17371. // this.aiGetG323(message3, _task)
  17372. }
  17373. let ij = 0;
  17374. let _this = this
  17375. function processNext() {
  17376. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  17377. if(!_this.taskGLoading[ij][0]){
  17378. ij++;
  17379. processNext();
  17380. return;
  17381. }
  17382. let message1 = `NOTICE
  17383. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17384. Language: ${_this.getLang()}
  17385. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17386. Instruction: Based on the context, follow "Format example", write content.
  17387. # Context
  17388. ## 要求
  17389. ${msg}
  17390.  
  17391. ## 参考资料
  17392. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17393. # 输出格式与要求
  17394. 任务描述(告诉学生他们需要做什么):
  17395. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  17396. # 范例
  17397. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  17398. # Format example
  17399. { "detail":"任务描述" }`
  17400. let message2 = `NOTICE
  17401. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17402. Language: ${_this.getLang()}
  17403. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17404. Instruction: Based on the context, follow "Format example", write content.
  17405. # Context
  17406. ## 要求
  17407. ${msg2}
  17408.  
  17409. ## 参考资料
  17410. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17411. # 输出格式与要求
  17412. 互动工具列表
  17413. 工具名:${_this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  17414. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  17415. 工具名:${_this.languageSetting == 2 ? 'Document tool' : '文档'}
  17416. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  17417. 工具名称:${_this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  17418. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  17419. ${_this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  17420. # Format example
  17421. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17422. let message3 = `NOTICE
  17423. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17424. Language: ${_this.getLang()}
  17425. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17426. Instruction: Based on the context, follow "Format example", write content.
  17427. # Context
  17428. ## 要求
  17429. ${msg3}
  17430.  
  17431. ## 参考资料
  17432. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[ij].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17433. # 输出格式与要求
  17434. 核心素养:从教案中提取
  17435. 目标:从教案中提取
  17436. 评价标准:从教案中提取评价标准
  17437. # Format example
  17438. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17439. _this.aiGetG321(message1, ij, (callback2) => {
  17440. _this.aiGetG322(message2, ij, callback2);
  17441. }, () => {
  17442. // 回调函数,当前任务完成后执行
  17443. ij++;
  17444. processNext(); // 处理下一个任务
  17445. });
  17446. }
  17447. }
  17448. processNext(); // 启动处理
  17449. }else{
  17450. let message1 = `NOTICE
  17451. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17452. Language: ${this.getLang()}
  17453. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17454. Instruction: Based on the context, follow "Format example", write content.
  17455. # Context
  17456. ## 要求
  17457. ${msg}
  17458.  
  17459. ## 参考资料
  17460. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17461. # 输出格式与要求
  17462. 任务描述(告诉学生他们需要做什么):
  17463. 任务描述:从教案中提取并且**改写**,改写为教师给与学生的指示(用于指导学生如何进行该教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。内容至少200个token,你需要详细的描述该任务该如何做)。
  17464. # 范例
  17465. 亲爱的同学们,今天我们将一起探索热是如何在不同的环境中传递的。\n我们将通过一系列有趣的实验来观察热在水中的传递过程。请大家准备好实验材料,并确保遵循安全指南。我们将使用感温粉末或红墨水来帮助我们直观地看到热是如何在水中移动的。\n在实验过程中,请大家仔细观察并记录你的发现,我们将一起讨论热对流是如何形成的。\n不要忘记,实验后我们要分享我们的观察结果,并探讨热对流在我们生活中的应用。让我们一起揭开热传递的神秘面纱吧!
  17466. # Format example
  17467. { "detail":"任务描述" }`
  17468. let message2 = `NOTICE
  17469. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17470. Language: ${this.getLang()}
  17471. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17472. Instruction: Based on the context, follow "Format example", write content.
  17473. # Context
  17474. ## 要求
  17475. ${msg2}
  17476.  
  17477. ## 参考资料
  17478. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17479. # 输出格式与要求
  17480. 互动工具列表
  17481. 工具名:${this.languageSetting == 2 ? 'Diagram Tool' : '表格'}
  17482. 工具指引:同学们,在完成本次STEM小车实验时,我们需要使用表格工具来记录和整理实验数据。表格工具就像一个电子版的记录本,它不仅可以帮助我们准确记录数据,还能自动计算和生成图表,方便我们分析实验结果。在第一行,每个单元格中输入我们要记录的变量名称,比如“时间(秒)”、“距离(米)”、“速度(米/秒)”等。接下来,在实验中,我们会把每次测试的结果依次填入相应的单元格中。记得每一行代表一次完整的实验测试哦。
  17483. 工具名:${this.languageSetting == 2 ? 'Document tool' : '文档'}
  17484. 工具指引:在实验数据整理好之后,我们接下来要用文档工具撰写实验报告。这份报告不仅是对我们实验的总结,也是展示我们分析和思考能力的好机会。文档工具就像一本电子笔记本,可以帮助我们把想法和数据清晰地展示出来。该份实验报告需要包括以下内容:1.实验背景: 简单介绍实验的目的,比如“我们这次实验的目的是通过小车演示,理解速度和加速度的关系”。用简洁的语言说明你为什么要做这个实验。\n2.实验方法: 详细描述你是如何进行实验的,包括实验步骤和使用的工具。例如,你可以写“我们将小车放在一个倾斜的平面上,记录它在不同时间间隔下的距离”。\n 3.数据分析: 这部分是核心内容。你可以将表格工具生成的图表插入到文档中,并解释图表显示的结果。例如,你可以写“从图表中可以看出,随着时间的增加,小车的速度逐渐加快,这说明……”。\n 4.结论与建议: 最后,总结你在实验中得出的结论,比如“小车在光滑表面上的加速度较大”,并提出一些改进实验或进一步研究的建议。
  17485. 工具名称:${this.languageSetting == 2 ? 'Choice tool' : '选择题'}
  17486. 工具指引:同学们,老师想要考察一下你对“热传递”这一概念的理解和掌握程度。请仔细阅读每个问题,并给出准确的答案哦~
  17487. ${this.languageSetting == 2 ? '还有以下工具:Mind Map Tool、Spreadsheet tool、Q&A Tool' : ''}
  17488. # Format example
  17489. {"toolChoose":[{"tool":"工具名","detail":"工具描述"},{"tool":"工具名","detail":"工具描述"}]}`
  17490. let message3 = `NOTICE
  17491. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17492. Language: ${this.getLang()}
  17493. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17494. Instruction: Based on the context, follow "Format example", write content.
  17495. # Context
  17496. ## 要求
  17497. ${msg3}
  17498.  
  17499. ## 参考资料
  17500. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[0]].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17501. # 输出格式与要求
  17502. 核心素养:从教案中提取
  17503. 目标:从教案中提取
  17504. 评价标准:从教案中提取评价标准
  17505. # Format example
  17506. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17507. if(!this.taskGLoading[this.aiCallBack[0]]){
  17508. this.taskGLoading[this.aiCallBack[0]] = []
  17509. }
  17510. this.taskGLoading[this.aiCallBack[0]][0] = true
  17511. this.taskGLoading[this.aiCallBack[0]][1] = true
  17512. // this.taskGLoading[this.aiCallBack[0]][2] = true
  17513. this.aiGetG321(message1, this.aiCallBack[0], () => {
  17514. this.aiGetG322(message2, this.aiCallBack[0])
  17515. })
  17516. // this.aiGetG323(message3, this.aiCallBack[0])
  17517. }
  17518. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17519. } else if (this.aitype == "aiTaskG3") {
  17520. let message3 = `NOTICE
  17521. Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
  17522. Language: ${this.getLang()}
  17523. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17524. Instruction: Based on the context, follow "Format example", write content.
  17525. # Context
  17526. ## 要求
  17527. ${msg3}
  17528.  
  17529. ## 参考资料
  17530. 教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  17531. # 输出格式与要求
  17532. 核心素养:从教案中提取
  17533. 目标:从教案中提取
  17534. 评价标准:从教案中提取评价标准
  17535. # Format example
  17536. {"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
  17537. if(!this.taskGLoading[this.aiCallBack]){
  17538. this.taskGLoading[this.aiCallBack] = []
  17539. }
  17540. this.taskGLoading[this.aiCallBack][2] = true
  17541. this.aiGetG323(message3, this.aiCallBack)
  17542. } else if (this.aitype == "aiDetail1") {
  17543. this.aiDetail(msg, this.aiIndex)
  17544. } else if (this.aitype == "aiDetail2") {
  17545. this.aiDetail2(msg, this.aiIndex)
  17546. } else if (this.aitype == "aiDetail3") {
  17547. let _index = this.aiIndex.split('-')
  17548. this.aiDetail3(msg, _index[0], _index[1])
  17549. } else if (this.aitype == "aiDetail4") {
  17550. this.aiDetail4(msg, this.aiIndex)
  17551. } else if (this.aitype == "teacherDetail") {
  17552. this.aiDetail5(msg, this.aiIndex)
  17553. } else if (this.aitype == "teacherDetail2") {
  17554. this.aiDetail52(msg, this.aiIndex)
  17555. } else if (this.aitype == "aiCpote1") {
  17556. this.aiCpote(msg, this.aiCallBack)
  17557. } else if (this.aitype == "aiCpote2") {
  17558. this.aiCpote(msg, this.aiCallBack)
  17559. } else if (this.aitype == "aiCpote3") {
  17560. this.aiCpote(msg, this.aiCallBack)
  17561. } else if (this.aitype == "aiCpote4") {
  17562. this.aiCpote(msg, this.aiCallBack)
  17563. } else if (this.aitype == "aiTeacher") {
  17564. this.loading = true
  17565. var _text = ""
  17566. for (var i = 0; i < this.dArray.length; i++) {
  17567. _text += `任务名称:${this.dArray[i].task} 任务描述:${this.dArray[i].detail} \n`
  17568. }//${this.infoData.length ? '使用文件检索的方式完整的去分析文件内容,并请完全按照要求输出。' : ''}
  17569. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17570. let message = ` NOTICE
  17571. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17572. Language: ${this.getLang()}
  17573. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17574. Instruction: Based on the context, follow "Format example", write content.
  17575. # Context
  17576. ## 要求
  17577. ${msg} 以及${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '##任务大纲' : '##目标层,##任务簇'}
  17578. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" && this.templateid != "cf5722a4-401b-11ef-b873-005056b86dc3") ? '## 任务大纲\n'+_text : ''}
  17579. ${(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','') : ''}
  17580. ${(this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5") ? '## 参考上下文\n'+'课程目标:'+target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  17581. ## Format example
  17582. [{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称","detail": "教案输出为文本或markdown格式就行"}]`
  17583. this.aiGet4(message, () => {
  17584. this.loading = false
  17585. this.isOutline2 = true
  17586. })
  17587. } else if (this.aitype == "aiTeacher2"){
  17588. this.isOutline2 = true
  17589. let _this = this
  17590. setTimeout(()=>{
  17591. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  17592. const _tindex = 'task-' + i;
  17593. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  17594. _this.taskDetailLoading5.push(_tindex)
  17595. }
  17596. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  17597. _this.ttaskDetailLoading5.push(_tindex)
  17598. }
  17599. // this.aiDetail52(msg, i)
  17600. }
  17601. let ij = 0;
  17602. function processNext() {
  17603. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  17604. const _tindex = 'task-' + ij;
  17605. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  17606. ij++;
  17607. processNext();
  17608. return;
  17609. }
  17610. // 处理当前任务
  17611. _this.aiDetail52(msg, ij, function () {
  17612. // 回调函数,当前任务完成后执行
  17613. ij++;
  17614. processNext(); // 处理下一个任务
  17615. });
  17616. }
  17617. }
  17618. processNext(); // 启动处理
  17619. }, 0)
  17620. } else if (this.aitype == "aiTeacher3"){
  17621. this.loading = true
  17622. let message = `NOTICE
  17623. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17624. Language: ${this.getLang()}
  17625. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17626. Instruction: Based on the context, follow "Format example", write content.
  17627. # Context
  17628. ## 要求
  17629. ${msg} 以及##参考资料
  17630. ## 参考资料
  17631. 任务簇:${this.cpote.cpote4}
  17632. # Format example
  17633. [{"task": "任务1的名字"}, {"task": "任务2的名字"}, {"task": "任务2的名字"}, {"task": "任务n的名字"}]`
  17634. this.aiGetTask3(message, () => {
  17635. this.loading = false
  17636. this.isOutline2 = true
  17637. })
  17638. } else if (this.aitype == "aiteacherTextDetail") {
  17639. this.aiteacherTextDetail(msg)
  17640. } else if (this.aitype == "aitargetTextDetail") {
  17641. this.aitargetTextDetail(msg)
  17642. } else if (this.aitype == "aitargetTextDetail2") {
  17643. this.aitargetTextDetail2(msg)
  17644. } else if (this.aitype == "aitargetTextDetail3") {
  17645. this.aitargetTextDetail3(msg)
  17646. } else if (this.aitype == 'aiSearchFile'){
  17647. let messages = `NOTICE
  17648. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  17649. Language: ${this.getLang()}
  17650. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17651. Instruction: Based on the context, follow "Format example", write content.
  17652. ## 参考资料
  17653. 关键词:${this.courseName}
  17654. # Context
  17655. ## 要求
  17656. ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
  17657. # Format example
  17658. [{content:'相关信息内容'},{content:'相关信息内容'},{content:'相关信息内容'}]`
  17659. this.fileSLoading = true
  17660. this.aiSearchFile(messages,()=>{
  17661. this.fileSLoading = false
  17662. })
  17663. } else if (this.aitype == 'aiSearchFile2'){
  17664. let messages = `${msg}
  17665. 课程名字:${this.courseName}
  17666. ${sub.length ? '学科:' + sub.join(",") : ''}
  17667. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  17668. this.fileSLoading = true
  17669. this.aiSearchFile2(messages,()=>{
  17670. this.fileSLoading = false
  17671. })
  17672. } else if (this.aitype == 'aiRateRule'){
  17673. this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
  17674. } else if (this.aitype == 'aiRateRuleA'){
  17675. if(this.aiCallBack[0] == 1){
  17676. for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  17677. let task = this.unitJson[0].chapterInfo[0].taskJson[i]
  17678. for(var k = 0; k < task.eList.length; k++){
  17679. if(!task.eList[k].rule){
  17680. this.againEva(msg, i, k)
  17681. }
  17682. }
  17683. }
  17684. }else if(this.aiCallBack[0] == 2){
  17685. let task = this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack[1]]
  17686. for(var k = 0; k < task.eList.length; k++){
  17687. if(!task.eList[k].rule){
  17688. this.againEva(msg, this.aiCallBack[1], k)
  17689. }
  17690. }
  17691. }
  17692. }
  17693. this.setAiJson(this.aitype, msg, msg2, msg3)
  17694. },
  17695. getLang(){
  17696. let lang = ''
  17697. if(this.languageSetting == 0){
  17698. lang = 'Chinese.'
  17699. }else if(this.languageSetting == 1){
  17700. lang = 'Traditional Chinese.'
  17701. }else if(this.languageSetting == 2){
  17702. lang = 'English.'
  17703. }
  17704. return lang
  17705. },
  17706. detailYou(message) {
  17707. this.textLoading = true
  17708. this.ttextLoading = true
  17709. let sub = []
  17710. if (this.courseTypeId.length) {
  17711. for (var i = 0; i < this.courseTypeId.length; i++) {
  17712. let _sid = this.courseTypeId[i]
  17713. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17714. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  17715. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  17716. }
  17717. }
  17718. }
  17719. }
  17720. let mclass = []
  17721. if (this.courseTypeId.length) {
  17722. for (var i = 0; i < this.courseTypeId.length; i++) {
  17723. let _sid = this.courseTypeId[i]
  17724. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  17725. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  17726. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  17727. }
  17728. }
  17729. }
  17730. }
  17731. let url = []
  17732. if (this.infoData.length) {
  17733. for (var i = 0; i < this.infoData.length; i++) {
  17734. url.push(this.infoData[i].url)
  17735. }
  17736. }
  17737. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  17738. // --------
  17739. // ## 补充参考资料
  17740. // 补充资料:${url.join(",")}
  17741. // 补充描述:${this.courseText2} ##补充参考资料和
  17742. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  17743. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  17744. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  17745. let msg = `NOTICE
  17746. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  17747. Language: ${this.getLang()}
  17748. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  17749. Instruction: Based on the context, follow "Format example", write content.
  17750. #Context
  17751. ## 参考资料
  17752. 课程名字:${this.courseName}
  17753. ${sub.length ? '学科:' + sub.join(",") : ''}
  17754. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  17755. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && this.teacherCourseText) ? '提取教案摘要:'+this.teacherCourseText : ''}
  17756. ${(this.mode == 1 && (!this.yiKeTemplateArray.includes(this.templateid)) && target) ? '提取教案目标:'+target : ''}
  17757. ${this.courseText && this.aiCallBack[0] == 2 ? '参考内容:'+this.courseText : ''}
  17758. ## 要求
  17759. ${message} 以及##参考资料 ${(!this.yiKeTemplateArray.includes(this.templateid)) ? "" : '以文本格式输出项目概况,驱动性问题,最终作品'}
  17760. ${(this.templateid != 'cf5722a4-401b-11ef-b873-005056b86dc4') && '## Format example 课程简要描述:课程内容的简单叙述。 驱动性问题:1个驱动整个项目的问题。 最终作品:对应解决驱动性问题的作品,可个人可团队。'}
  17761. ${this.courseText && this.aiCallBack[0] == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  17762. this.aiGet(msg)
  17763. },
  17764. setUnitJson() {
  17765. 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 }] }
  17766. this.$forceUpdate()
  17767. },
  17768. async aiGet(messages) {
  17769. let _this = this
  17770. let fileid = []
  17771. if(!this.yiKeTemplateArray.includes(this.templateid)){
  17772. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  17773. if(_this.cankaoInfoData[i].fileid){
  17774. fileid.push(_this.cankaoInfoData[i].fileid)
  17775. }else {
  17776. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  17777. if(_fileid){
  17778. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  17779. _this.$forceUpdate();
  17780. if(_fileid != 1){
  17781. fileid.push(_fileid)
  17782. }
  17783. }
  17784. }
  17785. }
  17786. if(this.mode == 1){
  17787. for (var i = 0; i < _this.infoData.length; i++) {
  17788. if(_this.infoData[i].fileid){
  17789. fileid.push(_this.infoData[i].fileid)
  17790. }else {
  17791. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17792. if(_fileid){
  17793. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17794. _this.$forceUpdate();
  17795. if(_fileid != 1){
  17796. fileid.push(_fileid)
  17797. }
  17798. }
  17799. }
  17800. }
  17801. }
  17802. } else {
  17803. fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17804. fileid = [...fileid]
  17805. if (_this.infoData.length) {
  17806. for (var i = 0; i < _this.infoData.length; i++) {
  17807. if(_this.infoData[i].fileid){
  17808. fileid.push(_this.infoData[i].fileid)
  17809. }else {
  17810. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17811. if(_fileid){
  17812. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17813. _this.$forceUpdate();
  17814. if(_fileid != 1){
  17815. fileid.push(_fileid)
  17816. }
  17817. }
  17818. }
  17819. }
  17820. }
  17821. }
  17822. _this.isTextCancelToken = _this.ajax.setCancelSource();
  17823. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  17824. let _uuid = uuidv4();
  17825. // let params = JSON.stringify({
  17826. // // "model": "Chat",
  17827. // model: 'gpt-3.5-turbo',
  17828. // temperature: this.mode == 3 ? 0.5 : 0.1,
  17829. // max_tokens: 4096,
  17830. // top_p: 1,
  17831. // frequency_penalty: 0,
  17832. // presence_penalty: 0,
  17833. // messages: [{
  17834. // content: messages,
  17835. // role: 'user'
  17836. // }],
  17837. // uid: _uuid,
  17838. // mind_map_question: "",
  17839. // })
  17840. let params = {
  17841. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  17842. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  17843. session_name: _uuid,
  17844. userId: _this.userid,
  17845. uid: _uuid,
  17846. file_ids: fileid.length ? [...fileid] : '',
  17847. model: 'gpt-4o-2024-08-06',
  17848. temperature: this.mode == 3 ? 0.5 : 0.1,
  17849. }
  17850. // let params = JSON.stringify({
  17851. // message: {
  17852. // anthropic_version: "bedrock-2023-05-31",
  17853. // max_tokens: 4096,
  17854. // temperature: this.mode == 3 ? 0.5 : 0.1,
  17855. // top_p: 1,
  17856. // messages: [{
  17857. // "role": "user",
  17858. // "content": messages
  17859. // }] ,
  17860. // },
  17861. // uid: _uuid,
  17862. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  17863. // });
  17864. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  17865. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTextCancelToken).then(function (response) {
  17866. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  17867. console.log(response);
  17868. // let data = response.data.FunctionResponse
  17869. // if (data.choices && data.choices.length && data.choices[0].message) {
  17870. // _this.courseText = data.choices[0].message.content
  17871. // }
  17872. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  17873. } else {
  17874. _this.$message.warning(response.data.FunctionResponse.result);
  17875. }
  17876. _this.isTextCancelToken = null
  17877. }).catch(function (error) {
  17878. _this.textLoading = false
  17879. _this.ttextLoading = false
  17880. _this.isTextCancelToken = null
  17881. if(error && error.message != 'Request canceled by the user.'){
  17882. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17883. }
  17884. console.log(error);
  17885. });
  17886. await _this.aiGetgetAiContent(_uuid)
  17887. },
  17888. aiGetgetAiContent(_uid) {
  17889. try {
  17890. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17891. this.isTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17892. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  17893. } catch(error){
  17894. console.log('EventSource error:', error);
  17895. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17896. this.textLoading = false
  17897. this.ttextLoading = false
  17898. this.isTextCancelToken = null
  17899. return;
  17900. }
  17901. let _allText = "";
  17902. let _mdText = "";
  17903. let _iindex = 0
  17904. this.isTextCancelSource.onmessage = _e => {
  17905. let _eData = JSON.parse(_e.data).content;
  17906. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  17907. //对话已经完成
  17908. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  17909. this.isTextCancelSource.close();
  17910. this.isTextCancelSource = null;
  17911. this.courseText = _mdText;
  17912. this.textLoading = false
  17913. this.ttextLoading = false
  17914. this.courseTextB = false
  17915. this.isTextCancelToken = null
  17916. this.aiCallBack[1] ? this.aiCallBack[1]() : ''
  17917. return;
  17918. } else {
  17919. _iindex++
  17920. //对话还在继续
  17921. let _text = "";
  17922. _text = _eData.replaceAll("'", "");
  17923. if (_allText == "") {
  17924. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  17925. } else {
  17926. _allText += _text;
  17927. }
  17928. _mdText = _allText + "_";
  17929. _mdText = _mdText.replace(/\\n/g, "\n");
  17930. _mdText = _mdText.replace(/\\/g, "");
  17931. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  17932. //转化返回的回复流数据
  17933. if(_iindex == 10){
  17934. this.courseText = _mdText;
  17935. _iindex = 0
  17936. }
  17937. this.textLoading = false
  17938. // 处理流数据
  17939. }
  17940. // this.$forceUpdate();
  17941. };
  17942. let _this = this
  17943. this.isTextCancelSource.onerror = function(event) {
  17944. // 处理错误,可以尝试重新连接
  17945. console.log('EventSource error:', event);
  17946. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  17947. _this.textLoading = false
  17948. _this.ttextLoading = false
  17949. _this.isTextCancelToken = null
  17950. _this.isTextCancelSource.close();
  17951. _this.isTextCancelSource = null;
  17952. };
  17953. },
  17954. numberToChinese(number) {
  17955. const chineseNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
  17956. const chineseUnit = ['', '十', '百', '千', '万', '十', '百', '千', '亿', '十', '百', '千'];
  17957. let result = '';
  17958. let num = parseInt(number, 10);
  17959. let i = 0;
  17960. while (num > 0) {
  17961. result = chineseNum[num % 10] + chineseUnit[i] + result;
  17962. num = Math.floor(num / 10);
  17963. i++;
  17964. }
  17965. // 去除连续的零,保留一个零
  17966. result = result.replace(/零+/g, '零');
  17967. return result;
  17968. },
  17969. async aiGet2(messages, callback) {
  17970. let _this = this
  17971. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  17972. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  17973. if (_this.infoData.length) {
  17974. for (var i = 0; i < _this.infoData.length; i++) {
  17975. if(_this.infoData[i].fileid){
  17976. fileid.push(_this.infoData[i].fileid)
  17977. }else {
  17978. let _fileid = await _this.createFileid(_this.infoData[i].url)
  17979. if(_fileid){
  17980. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  17981. _this.$forceUpdate();
  17982. if(_fileid != 1){
  17983. fileid.push(_fileid)
  17984. }
  17985. }
  17986. }
  17987. }
  17988. }
  17989. console.log('fileid=========',fileid)
  17990. // let params = JSON.stringify({
  17991. // // "model": "Chat",
  17992. // model: 'gpt-3.5-turbo',
  17993. // temperature: this.mode == 3 ? 0.5 : 0.1,
  17994. // max_tokens: 4096,
  17995. // top_p: 1,
  17996. // frequency_penalty: 0,
  17997. // presence_penalty: 0,
  17998. // messages: [{
  17999. // content: messages,
  18000. // role: 'user'
  18001. // }],
  18002. // stream: false,
  18003. // uid: this.userid,
  18004. // mind_map_question: "",
  18005. // })
  18006. // // let params = JSON.stringify({
  18007. // // message: {
  18008. // // anthropic_version: "bedrock-2023-05-31",
  18009. // // max_tokens: 4096,
  18010. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18011. // // top_p: 1,
  18012. // // messages: [{
  18013. // // content: messages,
  18014. // // role: 'user'
  18015. // // }], //
  18016. // // },
  18017. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18018. // // });
  18019. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18020. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18021. // console.log(response);
  18022. // let data = response.data.FunctionResponse
  18023. // if (data.choices && data.choices.length && data.choices[0].message) {
  18024. // console.log(data.choices[0].message.content);
  18025. // let dArray = JSON.parse(data.choices[0].message.content)
  18026. // _this.dArray = dArray
  18027. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18028. // for (var i = 0; i < dArray.length; i++) {
  18029. // let _task = dArray[i]
  18030. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18031. // task: _task.task,
  18032. // taskDetail: "",
  18033. // taskDetail2: _task.detail,
  18034. // taskDetail3: "",
  18035. // chapterData: [],
  18036. // toolText: "",
  18037. // toolChoose: [
  18038. // {
  18039. // tool: [],
  18040. // toolDetail: "",
  18041. // toolType: 0,
  18042. // askCount: 1,
  18043. // askTitle: "",
  18044. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18045. // },
  18046. // ],
  18047. // isShowTools: false,
  18048. // askCount: 1,
  18049. // isFold: 0,
  18050. // askTitle: "",
  18051. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18052. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18053. // homeworkList: [],
  18054. // })
  18055. // }
  18056. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18057. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18058. // _this.$forceUpdate();
  18059. // }
  18060. // // if (data.result) {
  18061. // // console.log(data.result);
  18062. // // let dArray = JSON.parse(data.result)
  18063. // // _this.dArray = dArray
  18064. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18065. // // for (var i = 0; i < dArray.length; i++) {
  18066. // // let _task = dArray[i]
  18067. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18068. // // task: _task.task,
  18069. // // taskDetail: "",
  18070. // // taskDetail2: _task.detail,
  18071. // // taskDetail3: "",
  18072. // // chapterData: [],
  18073. // // toolText: "",
  18074. // // toolChoose: [
  18075. // // {
  18076. // // tool: [],
  18077. // // toolDetail: "",
  18078. // // toolType: 0,
  18079. // // askCount: 1,
  18080. // // askTitle: "",
  18081. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18082. // // },
  18083. // // ],
  18084. // // isShowTools: false,
  18085. // // askCount: 1,
  18086. // // isFold: 1,
  18087. // // askTitle: "",
  18088. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18089. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18090. // // homeworkList: [],
  18091. // // })
  18092. // // }
  18093. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18094. // // _this.$forceUpdate();
  18095. // // }
  18096. // callback ? callback() : ''
  18097. // }).catch(function (error) {
  18098. // _this.loading = false
  18099. // console.log(error);
  18100. // });
  18101. this.isOutlineCancelToken = this.ajax.setCancelSource();
  18102. let parm = {
  18103. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',//
  18104. message: [{"type":"text", "text": this.languageSetting == 1 ? converter2(messages) : messages}],
  18105. session_name: uuidv4(),
  18106. userId: this.userid,
  18107. file_ids: fileid.length ? [...fileid] : '',
  18108. model: 'gpt-4o-2024-08-06',
  18109. temperature: this.mode == 3 ? 0.5 : 0.1,
  18110. }
  18111. this.ajax
  18112. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  18113. .then((response) => {
  18114. console.log(response);
  18115. let data = response.data.FunctionResponse
  18116. if (data.message) {
  18117. console.log(data.message);
  18118. let dArray = {}
  18119. try {
  18120. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18121. } catch (error) {
  18122. console.log("error_________________" + error);
  18123. try {
  18124. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18125. let match = data.message.match(regex);
  18126. dArray = JSON.parse(match[0]);
  18127. // var message = data.message;
  18128. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18129. // var jsonEnd = message.indexOf("```", jsonStart);
  18130. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18131. // dArray = JSON.parse(jsonString);
  18132. } catch (error) {
  18133. try {
  18134. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18135. let match = data.message.match(regex);
  18136. // eval("var aaa = " + match[0])
  18137. if(match && match[0]){
  18138. dArray = JSON.parse(match[0].replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  18139. }else {
  18140. dArray = JSON.parse(data.message.replace(/\n/g, ' ').replace(/\s{2,}/g, ' '));
  18141. }
  18142. } catch (error) {
  18143. _this.$message.error('返回json格式不正确')
  18144. // _this.aiGet2(messages, callback);
  18145. console.log("error_________________" + error);
  18146. }
  18147. console.log("error_________________" + error);
  18148. }
  18149. }
  18150. _this.dArray = dArray
  18151. console.log(dArray)
  18152. if(_this.panOutline() > 0){
  18153. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18154. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18155. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  18156. }
  18157. for (var i = 0; i < dArray.length; i++) {
  18158. let _task = dArray[i]
  18159. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18160. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : "")
  18161. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail.replaceAll(" ", " \n")
  18162. }else {
  18163. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18164. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  18165. taskDetail: "",
  18166. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  18167. taskDetail3: "",
  18168. chapterData: [],
  18169. toolText: "",
  18170. toolChoose: [
  18171. {
  18172. tool: [],
  18173. toolDetail: "",
  18174. toolType: 0,
  18175. askCount: 1,
  18176. askTitle: "",
  18177. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18178. },
  18179. ],
  18180. isShowTools: false,
  18181. askCount: 1,
  18182. isFold: 0,
  18183. askTitle: "",
  18184. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18185. checkJson: [{ checkCount: [], checkPerent: [] }],
  18186. homeworkList: [],
  18187. })
  18188. }
  18189. }
  18190. }else {
  18191. _this.unitJson[0].chapterInfo[0].taskJson = []
  18192. for (var i = 0; i < dArray.length; i++) {
  18193. let _task = dArray[i]
  18194. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18195. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')+(_task.task2 ? ":"+_task.task2 : ""),
  18196. taskDetail: "",
  18197. taskDetail2: _task.detail.replaceAll(" ", " \n"),
  18198. taskDetail3: "",
  18199. chapterData: [],
  18200. toolText: "",
  18201. toolChoose: [
  18202. {
  18203. tool: [],
  18204. toolDetail: "",
  18205. toolType: 0,
  18206. askCount: 1,
  18207. askTitle: "",
  18208. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18209. },
  18210. ],
  18211. isShowTools: false,
  18212. askCount: 1,
  18213. isFold: 0,
  18214. askTitle: "",
  18215. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18216. checkJson: [{ checkCount: [], checkPerent: [] }],
  18217. homeworkList: [],
  18218. })
  18219. }
  18220. }
  18221. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18222. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18223. _this.$forceUpdate();
  18224. }
  18225. callback ? callback() : ''
  18226. _this.isOutlineCancelToken = null
  18227. })
  18228. .catch((error) => {
  18229. _this.loading = false
  18230. _this.isOutlineCancelToken = null
  18231. console.log(error);
  18232. });
  18233. },
  18234. cancelAjax(type, index){
  18235. if (this.isOutlineCancelToken && type == 'outline') {
  18236. this.$message.success("已经成功停止生成课程大纲")
  18237. this.isOutlineCancelToken.cancel('Request canceled by the user.');
  18238. this.isOutlineCancelToken = null;
  18239. this.loading = false
  18240. }
  18241. if (this.isFileCancelToken && type == 'file') {
  18242. this.$message.success("已经成功停止智能生成检索资料")
  18243. this.isFileCancelToken.cancel('Request canceled by the user.');
  18244. this.isFileCancelToken = null;
  18245. this.fileSLoading = false
  18246. }
  18247. if(this.isTextCancelToken && type == 'text'){
  18248. this.$message.success("已经成功停止AI优化")
  18249. this.isTextCancelToken.cancel('Request canceled by the user.');
  18250. this.isTextCancelToken = null;
  18251. this.textLoading = false
  18252. this.ttextLoading = true
  18253. if(this.isTextCancelSource){
  18254. this.isTextCancelSource.close()
  18255. this.isTextCancelSource = null
  18256. }
  18257. }
  18258. if(this.isTargetCancelToken2 && type == 'target2'){
  18259. this.$message.success("已经成功停止生成目标")
  18260. this.isTargetCancelToken2.cancel('Request canceled by the user.');
  18261. this.isTargetCancelToken2 = null;
  18262. this.targetTextLoading2 = false
  18263. this.ttargetTextLoading2 = false
  18264. if(this.isTargetCancelSource2){
  18265. this.isTargetCancelSource2.close()
  18266. this.isTargetCancelSource2 = null
  18267. }
  18268. }
  18269. if(this.isTargetCancelToken1 && type == 'target1'){
  18270. this.$message.success("已经成功停止生成目标")
  18271. this.isTargetCancelToken1.cancel('Request canceled by the user.');
  18272. this.isTargetCancelToken1 = null;
  18273. this.targetTextLoading = false
  18274. this.ttargetTextLoading = false
  18275. if(this.isTargetCancelSource1){
  18276. this.isTargetCancelSource1.close()
  18277. this.isTargetCancelSource1 = null
  18278. }
  18279. }
  18280. if(this.isTeacherTextCancelToken && type == 'teacherText'){
  18281. this.$message.success("已经成功停止提取摘要")
  18282. this.isTeacherTextCancelToken.cancel('Request canceled by the user.');
  18283. this.isTeacherTextCancelToken = null;
  18284. this.teacherTextLoading = false
  18285. this.tteacherTextLoading = false
  18286. if(this.isTeacherTextCancelSource){
  18287. this.isTeacherTextCancelSource.close()
  18288. this.isTeacherTextCancelSource = null
  18289. }
  18290. }
  18291. if(this.isTeacherTaskCancelToken && type == 'teacherTask'){
  18292. this.$message.success("已经成功停止生成教案")
  18293. this.isTeacherTaskCancelToken.cancel('Request canceled by the user.');
  18294. this.isTeacherTaskCancelToken = null;
  18295. this.loading = false
  18296. }
  18297. if(this.isOutlineTaskCancelToken && type == 'outlineTask'){
  18298. this.$message.success("已经成功停止生成大纲")
  18299. this.isOutlineTaskCancelToken[index].cancel('Request canceled by the user.');
  18300. this.isOutlineTaskCancelToken[index] = null;
  18301. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf('task-' + index), 1)
  18302. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf('task-' + index), 1)
  18303. if(this.isOutlineTaskCancelSource[index]){
  18304. this.isOutlineTaskCancelSource[index].close()
  18305. this.isOutlineTaskCancelSource[index] = null
  18306. }
  18307. }
  18308. if(type == 'teacherDetail2'){
  18309. this.$message.success("已经成功停止生成教案")
  18310. if(this.isTeacherTaskCancelToken2 && this.isTeacherTaskCancelToken2[index]){
  18311. this.isTeacherTaskCancelToken2[index].cancel('Request canceled by the user.');
  18312. this.isTeacherTaskCancelToken2[index] = null;
  18313. }
  18314. if(this.taskDetailLoading5.indexOf('task-' + index) != -1){
  18315. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf('task-' + index), 1)
  18316. }
  18317. if(this.ttaskDetailLoading5.indexOf('task-' + index) != -1){
  18318. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf('task-' + index), 1)
  18319. }
  18320. if(this.isTeacherTaskCancelSource[index]){
  18321. this.isTeacherTaskCancelSource[index].close()
  18322. this.isTeacherTaskCancelSource[index] = null
  18323. }
  18324. }
  18325. if(type == 'aiTaskGL1'){
  18326. this.$message.success("已经成功停止生成任务概述")
  18327. if(this.taskCancelToken1 && this.taskCancelToken1[index]){
  18328. this.taskCancelToken1[index].cancel('Request canceled by the user.');
  18329. this.taskCancelToken1[index] = null;
  18330. }
  18331. if(this.taskGLoading[index] && this.taskGLoading[index][0]){
  18332. this.taskGLoading[index][0] = false
  18333. }
  18334. setTimeout(() => {
  18335. if(!(this.taskCancelToken2 && this.taskCancelToken2[index])){
  18336. this.cancelAjax('aiTaskGL2', index)
  18337. }
  18338. }, 1000)
  18339. this.$forceUpdate()
  18340. }
  18341. if(type == 'aiTaskGL2'){
  18342. this.$message.success("已经成功停止生成任务工具")
  18343. if(this.taskCancelToken2 && this.taskCancelToken2[index]){
  18344. this.taskCancelToken2[index].cancel('Request canceled by the user.');
  18345. this.taskCancelToken2[index] = null;
  18346. }
  18347. if(this.taskGLoading[index] && this.taskGLoading[index][1]){
  18348. this.taskGLoading[index][1] = false
  18349. }
  18350. this.$forceUpdate()
  18351. }
  18352. if(type == 'taskAn'){
  18353. this.$message.success("已经成功停止生成任务概述")
  18354. if(this.taskAnCancelToken && this.taskAnCancelToken[index]){
  18355. this.taskAnCancelToken[index].cancel('Request canceled by the user.');
  18356. this.taskAnCancelToken[index] = null;
  18357. }
  18358. if(this.taskAnLoading[index]){
  18359. this.taskAnLoading[index] = false
  18360. }
  18361. this.$forceUpdate()
  18362. }
  18363. },
  18364. async aiGetTask2(messages, callback) {
  18365. let _this = this
  18366. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18367. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  18368. if (_this.infoData.length) {
  18369. for (var i = 0; i < _this.infoData.length; i++) {
  18370. if(_this.infoData[i].fileid){
  18371. fileid.push(_this.infoData[i].fileid)
  18372. }else {
  18373. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18374. if(_fileid){
  18375. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18376. _this.$forceUpdate();
  18377. if(_fileid != 1){
  18378. fileid.push(_fileid)
  18379. }
  18380. }
  18381. }
  18382. }
  18383. }
  18384. console.log('fileid=========',fileid)
  18385. // let params = JSON.stringify({
  18386. // // "model": "Chat",
  18387. // model: 'gpt-3.5-turbo',
  18388. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18389. // max_tokens: 4096,
  18390. // top_p: 1,
  18391. // frequency_penalty: 0,
  18392. // presence_penalty: 0,
  18393. // messages: [{
  18394. // content: messages,
  18395. // role: 'user'
  18396. // }],
  18397. // stream: false,
  18398. // uid: this.userid,
  18399. // mind_map_question: "",
  18400. // })
  18401. // // let params = JSON.stringify({
  18402. // // message: {
  18403. // // anthropic_version: "bedrock-2023-05-31",
  18404. // // max_tokens: 4096,
  18405. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18406. // // top_p: 1,
  18407. // // messages: [{
  18408. // // content: messages,
  18409. // // role: 'user'
  18410. // // }], //
  18411. // // },
  18412. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18413. // // });
  18414. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18415. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18416. // console.log(response);
  18417. // let data = response.data.FunctionResponse
  18418. // if (data.choices && data.choices.length && data.choices[0].message) {
  18419. // console.log(data.choices[0].message.content);
  18420. // let dArray = JSON.parse(data.choices[0].message.content)
  18421. // _this.dArray = dArray
  18422. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18423. // for (var i = 0; i < dArray.length; i++) {
  18424. // let _task = dArray[i]
  18425. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18426. // task: _task.task,
  18427. // taskDetail: "",
  18428. // taskDetail2: _task.detail,
  18429. // taskDetail3: "",
  18430. // chapterData: [],
  18431. // toolText: "",
  18432. // toolChoose: [
  18433. // {
  18434. // tool: [],
  18435. // toolDetail: "",
  18436. // toolType: 0,
  18437. // askCount: 1,
  18438. // askTitle: "",
  18439. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18440. // },
  18441. // ],
  18442. // isShowTools: false,
  18443. // askCount: 1,
  18444. // isFold: 0,
  18445. // askTitle: "",
  18446. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18447. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18448. // homeworkList: [],
  18449. // })
  18450. // }
  18451. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18452. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18453. // _this.$forceUpdate();
  18454. // }
  18455. // // if (data.result) {
  18456. // // console.log(data.result);
  18457. // // let dArray = JSON.parse(data.result)
  18458. // // _this.dArray = dArray
  18459. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18460. // // for (var i = 0; i < dArray.length; i++) {
  18461. // // let _task = dArray[i]
  18462. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18463. // // task: _task.task,
  18464. // // taskDetail: "",
  18465. // // taskDetail2: _task.detail,
  18466. // // taskDetail3: "",
  18467. // // chapterData: [],
  18468. // // toolText: "",
  18469. // // toolChoose: [
  18470. // // {
  18471. // // tool: [],
  18472. // // toolDetail: "",
  18473. // // toolType: 0,
  18474. // // askCount: 1,
  18475. // // askTitle: "",
  18476. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18477. // // },
  18478. // // ],
  18479. // // isShowTools: false,
  18480. // // askCount: 1,
  18481. // // isFold: 1,
  18482. // // askTitle: "",
  18483. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18484. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18485. // // homeworkList: [],
  18486. // // })
  18487. // // }
  18488. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18489. // // _this.$forceUpdate();
  18490. // // }
  18491. // callback ? callback() : ''
  18492. // }).catch(function (error) {
  18493. // _this.loading = false
  18494. // console.log(error);
  18495. // });
  18496. this.isOutlineCancelToken = this.ajax.setCancelSource();
  18497. let parm = {
  18498. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18499. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18500. session_name: uuidv4(),
  18501. userId: this.userid,
  18502. file_ids: fileid.length ? [...fileid] : '',
  18503. model: 'gpt-4o-2024-08-06',
  18504. temperature: this.mode == 3 ? 0.5 : 0.1,
  18505. }
  18506. this.ajax
  18507. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isOutlineCancelToken)
  18508. .then((response) => {
  18509. console.log(response);
  18510. let data = response.data.FunctionResponse
  18511. if (data.message) {
  18512. console.log(data.message);
  18513. let dArray = {}
  18514. try {
  18515. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18516. } catch (error) {
  18517. console.log("error_________________" + error);
  18518. try {
  18519. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18520. let match = data.message.match(regex);
  18521. dArray = JSON.parse(match[0]);
  18522. // var message = data.message;
  18523. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18524. // var jsonEnd = message.indexOf("```", jsonStart);
  18525. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18526. // dArray = JSON.parse(jsonString);
  18527. } catch (error) {
  18528. try {
  18529. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18530. let match = data.message.match(regex);
  18531. // eval("var aaa = " + match[0])
  18532. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18533. } catch (error) {
  18534. console.log("error_________________" + error);
  18535. }
  18536. console.log("error_________________" + error);
  18537. }
  18538. }
  18539. _this.dArray = dArray
  18540. if(_this.panOutline() > 0){
  18541. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18542. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18543. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = ""
  18544. }
  18545. for (var i = 0; i < dArray.length; i++) {
  18546. let _task = dArray[i]
  18547. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18548. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18549. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  18550. }else {
  18551. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18552. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18553. taskDetail: "",
  18554. taskDetail2: "",
  18555. taskDetail3: "",
  18556. chapterData: [],
  18557. toolText: "",
  18558. toolChoose: [
  18559. {
  18560. tool: [],
  18561. toolDetail: "",
  18562. toolType: 0,
  18563. askCount: 1,
  18564. askTitle: "",
  18565. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18566. },
  18567. ],
  18568. isShowTools: false,
  18569. askCount: 1,
  18570. isFold: 0,
  18571. askTitle: "",
  18572. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18573. checkJson: [{ checkCount: [], checkPerent: [] }],
  18574. homeworkList: [],
  18575. })
  18576. }
  18577. }
  18578. }else {
  18579. _this.unitJson[0].chapterInfo[0].taskJson = []
  18580. for (var i = 0; i < dArray.length; i++) {
  18581. let _task = dArray[i]
  18582. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18583. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18584. taskDetail: "",
  18585. taskDetail2: "",
  18586. taskDetail3: "",
  18587. chapterData: [],
  18588. toolText: "",
  18589. toolChoose: [
  18590. {
  18591. tool: [],
  18592. toolDetail: "",
  18593. toolType: 0,
  18594. askCount: 1,
  18595. askTitle: "",
  18596. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18597. },
  18598. ],
  18599. isShowTools: false,
  18600. askCount: 1,
  18601. isFold: 0,
  18602. askTitle: "",
  18603. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18604. checkJson: [{ checkCount: [], checkPerent: [] }],
  18605. homeworkList: [],
  18606. })
  18607. }
  18608. }
  18609. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18610. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18611. _this.$forceUpdate();
  18612. setTimeout(()=>{
  18613. for (var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18614. this.aiOutlineDetail('', i)
  18615. }
  18616. }, 0)
  18617. }
  18618. callback ? callback() : ''
  18619. _this.isOutlineCancelToken = null
  18620. })
  18621. .catch((error) => {
  18622. _this.loading = false
  18623. _this.isOutlineCancelToken = null
  18624. console.log(error);
  18625. });
  18626. },
  18627. async aiGetTask3(messages, callback) {
  18628. let _this = this
  18629. // let params = JSON.stringify({
  18630. // // "model": "Chat",
  18631. // model: 'gpt-3.5-turbo',
  18632. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18633. // max_tokens: 4096,
  18634. // top_p: 1,
  18635. // frequency_penalty: 0,
  18636. // presence_penalty: 0,
  18637. // messages: [{
  18638. // content: messages,
  18639. // role: 'user'
  18640. // }],
  18641. // stream: false,
  18642. // uid: this.userid,
  18643. // mind_map_question: "",
  18644. // })
  18645. // // let params = JSON.stringify({
  18646. // // message: {
  18647. // // anthropic_version: "bedrock-2023-05-31",
  18648. // // max_tokens: 4096,
  18649. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18650. // // top_p: 1,
  18651. // // messages: [{
  18652. // // content: messages,
  18653. // // role: 'user'
  18654. // // }], //
  18655. // // },
  18656. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18657. // // });
  18658. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18659. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18660. // console.log(response);
  18661. // let data = response.data.FunctionResponse
  18662. // if (data.choices && data.choices.length && data.choices[0].message) {
  18663. // console.log(data.choices[0].message.content);
  18664. // let dArray = JSON.parse(data.choices[0].message.content)
  18665. // _this.dArray = dArray
  18666. // _this.unitJson[0].chapterInfo[0].taskJson = []
  18667. // for (var i = 0; i < dArray.length; i++) {
  18668. // let _task = dArray[i]
  18669. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18670. // task: _task.task,
  18671. // taskDetail: "",
  18672. // taskDetail2: _task.detail,
  18673. // taskDetail3: "",
  18674. // chapterData: [],
  18675. // toolText: "",
  18676. // toolChoose: [
  18677. // {
  18678. // tool: [],
  18679. // toolDetail: "",
  18680. // toolType: 0,
  18681. // askCount: 1,
  18682. // askTitle: "",
  18683. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18684. // },
  18685. // ],
  18686. // isShowTools: false,
  18687. // askCount: 1,
  18688. // isFold: 0,
  18689. // askTitle: "",
  18690. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18691. // checkJson: [{ checkCount: [], checkPerent: [] }],
  18692. // homeworkList: [],
  18693. // })
  18694. // }
  18695. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  18696. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18697. // _this.$forceUpdate();
  18698. // }
  18699. // // if (data.result) {
  18700. // // console.log(data.result);
  18701. // // let dArray = JSON.parse(data.result)
  18702. // // _this.dArray = dArray
  18703. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  18704. // // for (var i = 0; i < dArray.length; i++) {
  18705. // // let _task = dArray[i]
  18706. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  18707. // // task: _task.task,
  18708. // // taskDetail: "",
  18709. // // taskDetail2: _task.detail,
  18710. // // taskDetail3: "",
  18711. // // chapterData: [],
  18712. // // toolText: "",
  18713. // // toolChoose: [
  18714. // // {
  18715. // // tool: [],
  18716. // // toolDetail: "",
  18717. // // toolType: 0,
  18718. // // askCount: 1,
  18719. // // askTitle: "",
  18720. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18721. // // },
  18722. // // ],
  18723. // // isShowTools: false,
  18724. // // askCount: 1,
  18725. // // isFold: 1,
  18726. // // askTitle: "",
  18727. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18728. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  18729. // // homeworkList: [],
  18730. // // })
  18731. // // }
  18732. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18733. // // _this.$forceUpdate();
  18734. // // }
  18735. // callback ? callback() : ''
  18736. // }).catch(function (error) {
  18737. // _this.loading = false
  18738. // console.log(error);
  18739. // });
  18740. _this.isTeacherTaskCancelToken = _this.ajax.setCancelSource();
  18741. let parm = {
  18742. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  18743. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  18744. session_name: uuidv4(),
  18745. userId: this.userid,
  18746. file_ids: '',
  18747. model: 'gpt-4o-2024-08-06',
  18748. temperature: this.mode == 3 ? 0.5 : 0.1,
  18749. }
  18750. this.ajax
  18751. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.isTeacherTaskCancelToken)
  18752. .then((response) => {
  18753. console.log(response);
  18754. let data = response.data.FunctionResponse
  18755. if (data.message) {
  18756. console.log(data.message);
  18757. let dArray = {}
  18758. try {
  18759. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  18760. } catch (error) {
  18761. console.log("error_________________" + error);
  18762. try {
  18763. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18764. let match = data.message.match(regex);
  18765. dArray = JSON.parse(match[0]);
  18766. // var message = data.message;
  18767. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  18768. // var jsonEnd = message.indexOf("```", jsonStart);
  18769. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  18770. // dArray = JSON.parse(jsonString);
  18771. } catch (error) {
  18772. try {
  18773. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  18774. let match = data.message.match(regex);
  18775. // eval("var aaa = " + match[0])
  18776. dArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  18777. } catch (error) {
  18778. console.log("error_________________" + error);
  18779. }
  18780. console.log("error_________________" + error);
  18781. }
  18782. }
  18783. _this.dArray = dArray
  18784. if(_this.panOutline() > 0){
  18785. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  18786. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  18787. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  18788. }
  18789. for (var i = 0; i < dArray.length; i++) {
  18790. let _task = dArray[i]
  18791. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  18792. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  18793. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2 = _task.detail
  18794. }else {
  18795. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18796. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18797. taskDetail: "",
  18798. taskDetail2: "",
  18799. taskDetail3: "",
  18800. chapterData: [],
  18801. toolText: "",
  18802. toolChoose: [
  18803. {
  18804. tool: [],
  18805. toolDetail: "",
  18806. toolType: 0,
  18807. askCount: 1,
  18808. askTitle: "",
  18809. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18810. },
  18811. ],
  18812. isShowTools: false,
  18813. askCount: 1,
  18814. isFold: 0,
  18815. askTitle: "",
  18816. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18817. checkJson: [{ checkCount: [], checkPerent: [] }],
  18818. homeworkList: [],
  18819. })
  18820. }
  18821. }
  18822. }else {
  18823. _this.unitJson[0].chapterInfo[0].taskJson = []
  18824. for (var i = 0; i < dArray.length; i++) {
  18825. let _task = dArray[i]
  18826. _this.unitJson[0].chapterInfo[0].taskJson.push({
  18827. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  18828. taskDetail: "",
  18829. taskDetail2: "",
  18830. taskDetail3: "",
  18831. chapterData: [],
  18832. toolText: "",
  18833. toolChoose: [
  18834. {
  18835. tool: [],
  18836. toolDetail: "",
  18837. toolType: 0,
  18838. askCount: 1,
  18839. askTitle: "",
  18840. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18841. },
  18842. ],
  18843. isShowTools: false,
  18844. askCount: 1,
  18845. isFold: 0,
  18846. askTitle: "",
  18847. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18848. checkJson: [{ checkCount: [], checkPerent: [] }],
  18849. homeworkList: [],
  18850. })
  18851. }
  18852. }
  18853. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18854. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18855. _this.$forceUpdate();
  18856. // setTimeout(()=>{
  18857. // for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18858. // this.aiDetail52(_this.aiJson['teacherDetail2'], i)
  18859. // }
  18860. // }, 0)
  18861. setTimeout(()=>{
  18862. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  18863. const _tindex = 'task-' + i;
  18864. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  18865. _this.taskDetailLoading5.push(_tindex)
  18866. }
  18867. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  18868. _this.ttaskDetailLoading5.push(_tindex)
  18869. }
  18870. }
  18871. let ij = 0;
  18872. function processNext() {
  18873. if (ij < _this.unitJson[0].chapterInfo[0].taskJson.length) {
  18874. const _tindex = 'task-' + ij;
  18875. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  18876. ij++;
  18877. processNext();
  18878. return;
  18879. }
  18880. // 处理当前任务
  18881. _this.aiDetail52(_this.aiJson['teacherDetail2'], ij, function () {
  18882. // 回调函数,当前任务完成后执行
  18883. ij++;
  18884. processNext(); // 处理下一个任务
  18885. });
  18886. }
  18887. }
  18888. processNext(); // 启动处理
  18889. }, 0)
  18890. }
  18891. callback ? callback() : ''
  18892. _this.isTeacherTaskCancelToken = null
  18893. })
  18894. .catch((error) => {
  18895. _this.loading = false
  18896. _this.isTeacherTaskCancelToken = null
  18897. console.log(error);
  18898. });
  18899. },
  18900. async aiGet3(messages, callback) {
  18901. let _this = this
  18902. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  18903. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  18904. if (_this.infoData.length) {
  18905. for (var i = 0; i < _this.infoData.length; i++) {
  18906. if(_this.infoData[i].fileid){
  18907. fileid.push(_this.infoData[i].fileid)
  18908. }else {
  18909. let _fileid = await _this.createFileid(_this.infoData[i].url)
  18910. if(_fileid){
  18911. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  18912. _this.$forceUpdate();
  18913. if(_fileid != 1){
  18914. fileid.push(_fileid)
  18915. }
  18916. }
  18917. }
  18918. }
  18919. }
  18920. // let params = JSON.stringify({
  18921. // // "model": "Chat",
  18922. // model: 'gpt-3.5-turbo',
  18923. // temperature: this.mode == 3 ? 0.5 : 0.1,
  18924. // max_tokens: 4096,
  18925. // top_p: 1,
  18926. // frequency_penalty: 0,
  18927. // presence_penalty: 0,
  18928. // messages: [{
  18929. // content: messages,
  18930. // role: 'user'
  18931. // }],
  18932. // stream: false,
  18933. // uid: this.userid,
  18934. // mind_map_question: "",
  18935. // })
  18936. // // let params = JSON.stringify({
  18937. // // message: {
  18938. // // anthropic_version: "bedrock-2023-05-31",
  18939. // // max_tokens: 4096,
  18940. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  18941. // // top_p: 1,
  18942. // // messages: [{
  18943. // // content: messages,
  18944. // // role: 'user'
  18945. // // }], //
  18946. // // },
  18947. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  18948. // // });
  18949. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  18950. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  18951. // console.log(response);
  18952. // let data = response.data.FunctionResponse
  18953. // if (data.choices && data.choices.length && data.choices[0].message) {
  18954. // console.log(data.choices[0].message.content);
  18955. // let tArray = JSON.parse(data.choices[0].message.content)
  18956. // // _this.unitJson[0].chapterInfo[0].task = []
  18957. // let toolsJson = {
  18958. // "电子白板": { tool: 1, type: 1 },
  18959. // "文档": { tool: 52, type: 1 },
  18960. // "思维导图": { tool: 3, type: 1 },
  18961. // "表格": { tool: 48, type: 1 },
  18962. // "作业提交": { tool: 16, type: 2 }
  18963. // }
  18964. // for (var i = 0; i < tArray.length; i++) {
  18965. // let _task = tArray[i]
  18966. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  18967. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  18968. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  18969. // if (_task.toolChoose.length) {
  18970. // for (var j = 0; j < _task.toolChoose.length; j++) {
  18971. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18972. // {
  18973. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  18974. // toolDetail: _task.toolChoose[j].detail,
  18975. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  18976. // askCount: 1,
  18977. // askTitle: "",
  18978. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18979. // },
  18980. // )
  18981. // }
  18982. // } else {
  18983. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  18984. // {
  18985. // tool: [],
  18986. // toolDetail: "",
  18987. // toolType: 0,
  18988. // askCount: 1,
  18989. // askTitle: "",
  18990. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  18991. // },
  18992. // )
  18993. // }
  18994. // }
  18995. // // if (_this.infoData.length) {
  18996. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  18997. // // }
  18998. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  18999. // _this.$forceUpdate();
  19000. // }
  19001. // // if (data.result) {
  19002. // // console.log(data.result);
  19003. // // let tArray = JSON.parse(data.result)
  19004. // // // _this.unitJson[0].chapterInfo[0].task = []
  19005. // // let toolsJson = {
  19006. // // "电子白板": { tool: 1, type: 1 },
  19007. // // "文档": { tool: 52, type: 1 },
  19008. // // "思维导图": { tool: 3, type: 1 },
  19009. // // "表格": { tool: 48, type: 1 },
  19010. // // "作业提交": { tool: 16, type: 2 }
  19011. // // }
  19012. // // for (var i = 0; i < tArray.length; i++) {
  19013. // // let _task = tArray[i]
  19014. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19015. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19016. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19017. // // if (_task.toolChoose.length) {
  19018. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  19019. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19020. // // {
  19021. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  19022. // // toolDetail: _task.toolChoose[j].detail,
  19023. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  19024. // // askCount: 1,
  19025. // // askTitle: "",
  19026. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19027. // // },
  19028. // // )
  19029. // // }
  19030. // // } else {
  19031. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19032. // // {
  19033. // // tool: [],
  19034. // // toolDetail: "",
  19035. // // toolType: 0,
  19036. // // askCount: 1,
  19037. // // askTitle: "",
  19038. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19039. // // },
  19040. // // )
  19041. // // }
  19042. // // }
  19043. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19044. // // _this.$forceUpdate();
  19045. // // }
  19046. // callback ? callback() : ''
  19047. // }).catch(function (error) {
  19048. // _this.loading = false
  19049. // console.log(error);
  19050. // });
  19051. let parm = {
  19052. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19053. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19054. session_name: uuidv4(),
  19055. userId: this.userid,
  19056. file_ids: fileid.length ? [...fileid] : '',
  19057. model: 'gpt-4o-2024-08-06',
  19058. temperature: this.mode == 3 ? 0.5 : 0.1,
  19059. }
  19060. this.ajax
  19061. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19062. .then(async (response) => {
  19063. console.log(response);
  19064. let data = response.data.FunctionResponse
  19065. if (data.message) {
  19066. console.log(data.message);
  19067. let tArray = {}
  19068. try {
  19069. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19070. } catch (error) {
  19071. console.log("error_________________" + error);
  19072. try {
  19073. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19074. let match = data.message.match(regex);
  19075. tArray = JSON.parse(match[0]);
  19076. // var message = data.message;
  19077. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19078. // var jsonEnd = message.indexOf("```", jsonStart);
  19079. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19080. // tArray = JSON.parse(jsonString);
  19081. } catch (error) {
  19082. try {
  19083. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19084. let match = data.message.match(regex);
  19085. // eval("var aaa = " + match[0])
  19086. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19087. } catch (error) {
  19088. console.log("error_________________" + error);
  19089. }
  19090. console.log("error_________________" + error);
  19091. }
  19092. }
  19093. let toolsJson = {
  19094. "电子白板": { tool: 1, type: 1 },
  19095. "文档": { tool: 52, type: 1 },
  19096. "思维导图": { tool: 3, type: 1 },
  19097. "表格": { tool: 48, type: 1 },
  19098. "作业提交": { tool: 16, type: 2 },
  19099. "问答": { tool: 15, type: 2 },
  19100. "选择题": { tool: 45, type: 2 },
  19101. }
  19102. // answerQ:"sssssssssssssss"
  19103. for (var i = 0; i < tArray.length; i++) {
  19104. let _task = tArray[i]
  19105. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19106. _task.elist = _task.elist.filter(el=>{
  19107. el.isai = "1"
  19108. return el
  19109. })
  19110. _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19111. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19112. if (_task.toolChoose.length) {
  19113. for (var j = 0; j < _task.toolChoose.length; j++) {
  19114. let _json = {
  19115. tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [16],
  19116. toolDetail: _task.toolChoose[j].detail,
  19117. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  19118. askCount: 1,
  19119. askTitle: "",
  19120. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19121. }
  19122. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  19123. let answerQ = await _this.aiCreateQuestion(15, i)
  19124. _json.answerQ = answerQ.answerQ
  19125. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  19126. let testJson = await _this.aiCreateQuestion(45, i)
  19127. _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  19128. }
  19129. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
  19130. }
  19131. } else {
  19132. _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19133. {
  19134. tool: [],
  19135. toolDetail: "",
  19136. toolType: 0,
  19137. askCount: 1,
  19138. askTitle: "",
  19139. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19140. },
  19141. )
  19142. }
  19143. }
  19144. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19145. _this.$forceUpdate();
  19146. _this.createTeacherAn();
  19147. }
  19148. callback ? callback() : ''
  19149. })
  19150. .catch((error) => {
  19151. _this.loading = false
  19152. console.log(error);
  19153. });
  19154. },
  19155. async aiGet32(messages, index) {
  19156. let _this = this
  19157. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19158. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19159. if (_this.infoData.length) {
  19160. for (var i = 0; i < _this.infoData.length; i++) {
  19161. if(_this.infoData[i].fileid){
  19162. fileid.push(_this.infoData[i].fileid)
  19163. }else {
  19164. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19165. if(_fileid){
  19166. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19167. _this.$forceUpdate();
  19168. if(_fileid != 1){
  19169. fileid.push(_fileid)
  19170. }
  19171. }
  19172. }
  19173. }
  19174. }
  19175. // let params = JSON.stringify({
  19176. // // "model": "Chat",
  19177. // model: 'gpt-3.5-turbo',
  19178. // temperature: this.mode == 3 ? 0.5 : 0.1,
  19179. // max_tokens: 4096,
  19180. // top_p: 1,
  19181. // frequency_penalty: 0,
  19182. // presence_penalty: 0,
  19183. // messages: [{
  19184. // content: messages,
  19185. // role: 'user'
  19186. // }],
  19187. // stream: false,
  19188. // uid: this.userid,
  19189. // mind_map_question: "",
  19190. // })
  19191. // // let params = JSON.stringify({
  19192. // // message: {
  19193. // // anthropic_version: "bedrock-2023-05-31",
  19194. // // max_tokens: 4096,
  19195. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  19196. // // top_p: 1,
  19197. // // messages: [{
  19198. // // content: messages,
  19199. // // role: 'user'
  19200. // // }], //
  19201. // // },
  19202. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  19203. // // });
  19204. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  19205. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  19206. // console.log(response);
  19207. // let data = response.data.FunctionResponse
  19208. // if (data.choices && data.choices.length && data.choices[0].message) {
  19209. // console.log(data.choices[0].message.content);
  19210. // let tArray = JSON.parse(data.choices[0].message.content)
  19211. // // _this.unitJson[0].chapterInfo[0].task = []
  19212. // let toolsJson = {
  19213. // "电子白板": { tool: 1, type: 1 },
  19214. // "文档": { tool: 52, type: 1 },
  19215. // "思维导图": { tool: 3, type: 1 },
  19216. // "表格": { tool: 48, type: 1 },
  19217. // "作业提交": { tool: 16, type: 2 }
  19218. // }
  19219. // for (var i = 0; i < tArray.length; i++) {
  19220. // let _task = tArray[i]
  19221. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19222. // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19223. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19224. // if (_task.toolChoose.length) {
  19225. // for (var j = 0; j < _task.toolChoose.length; j++) {
  19226. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19227. // {
  19228. // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  19229. // toolDetail: _task.toolChoose[j].detail,
  19230. // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  19231. // askCount: 1,
  19232. // askTitle: "",
  19233. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19234. // },
  19235. // )
  19236. // }
  19237. // } else {
  19238. // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19239. // {
  19240. // tool: [],
  19241. // toolDetail: "",
  19242. // toolType: 0,
  19243. // askCount: 1,
  19244. // askTitle: "",
  19245. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19246. // },
  19247. // )
  19248. // }
  19249. // }
  19250. // // if (_this.infoData.length) {
  19251. // // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  19252. // // }
  19253. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19254. // _this.$forceUpdate();
  19255. // }
  19256. // // if (data.result) {
  19257. // // console.log(data.result);
  19258. // // let tArray = JSON.parse(data.result)
  19259. // // // _this.unitJson[0].chapterInfo[0].task = []
  19260. // // let toolsJson = {
  19261. // // "电子白板": { tool: 1, type: 1 },
  19262. // // "文档": { tool: 52, type: 1 },
  19263. // // "思维导图": { tool: 3, type: 1 },
  19264. // // "表格": { tool: 48, type: 1 },
  19265. // // "作业提交": { tool: 16, type: 2 }
  19266. // // }
  19267. // // for (var i = 0; i < tArray.length; i++) {
  19268. // // let _task = tArray[i]
  19269. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
  19270. // // _this.unitJson[0].chapterInfo[0].taskJson[i].eList = _task.elist
  19271. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
  19272. // // if (_task.toolChoose.length) {
  19273. // // for (var j = 0; j < _task.toolChoose.length; j++) {
  19274. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19275. // // {
  19276. // // tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
  19277. // // toolDetail: _task.toolChoose[j].detail,
  19278. // // toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
  19279. // // askCount: 1,
  19280. // // askTitle: "",
  19281. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19282. // // },
  19283. // // )
  19284. // // }
  19285. // // } else {
  19286. // // _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
  19287. // // {
  19288. // // tool: [],
  19289. // // toolDetail: "",
  19290. // // toolType: 0,
  19291. // // askCount: 1,
  19292. // // askTitle: "",
  19293. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19294. // // },
  19295. // // )
  19296. // // }
  19297. // // }
  19298. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19299. // // _this.$forceUpdate();
  19300. // // }
  19301. // callback ? callback() : ''
  19302. // }).catch(function (error) {
  19303. // _this.loading = false
  19304. // console.log(error);
  19305. // });
  19306. let parm = {
  19307. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19308. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19309. session_name: uuidv4(),
  19310. userId: this.userid,
  19311. file_ids: fileid.length ? [...fileid] : '',
  19312. model: 'gpt-4o-2024-08-06',
  19313. temperature: this.mode == 3 ? 0.5 : 0.1,
  19314. }
  19315. this.ajax
  19316. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19317. .then(async (response) => {
  19318. console.log(response);
  19319. let data = response.data.FunctionResponse
  19320. if (data.message) {
  19321. console.log(data.message);
  19322. let tArray = {}
  19323. try {
  19324. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19325. } catch (error) {
  19326. console.log("error_________________" + error);
  19327. try {
  19328. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19329. let match = data.message.match(regex);
  19330. tArray = JSON.parse(match[0]);
  19331. // var message = data.message;
  19332. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19333. // var jsonEnd = message.indexOf("```", jsonStart);
  19334. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19335. // tArray = JSON.parse(jsonString);
  19336. } catch (error) {
  19337. try {
  19338. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19339. let match = data.message.match(regex);
  19340. // eval("var aaa = " + match[0])
  19341. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19342. } catch (error) {
  19343. console.log("error_________________" + error);
  19344. }
  19345. console.log("error_________________" + error);
  19346. }
  19347. }
  19348. let toolsJson = {
  19349. "电子白板": { tool: 1, type: 1 },
  19350. "文档": { tool: 52, type: 1 },
  19351. "思维导图": { tool: 3, type: 1 },
  19352. "表格": { tool: 48, type: 1 },
  19353. "作业提交": { tool: 16, type: 2 },
  19354. "问答": { tool: 15, type: 2 },
  19355. "选择题": { tool: 45, type: 2 },
  19356. }
  19357. // answerQ:"sssssssssssssss"
  19358. // for (var i = 0; i < tArray.length; i++) {
  19359. let _task = tArray
  19360. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = _task.detail
  19361. _task.elist = _task.elist.filter(el=>{
  19362. el.isai = 1
  19363. return el
  19364. })
  19365. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  19366. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  19367. if(!_task.toolChoose || (_task.detail && _task.detail.length < 20) || !_task.detail){
  19368. console.log("error_________________JSON不对重新生成");
  19369. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19370. _this.aiGet32(messages, index)
  19371. return;
  19372. }
  19373. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  19374. if (_task.toolChoose && _task.toolChoose.length) {
  19375. for (var j = 0; j < _task.toolChoose.length; j++) {
  19376. let _json = {
  19377. tool: [],
  19378. toolDetail: _task.toolChoose[j].detail,
  19379. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  19380. askCount: 1,
  19381. askTitle: "",
  19382. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19383. }
  19384. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19385. if(converter(_task.toolChoose[j].tool) == converter('问答')){
  19386. let answerQ = await _this.aiCreateQuestion(15, index)
  19387. // _json.answerQ = answerQ.answerQ
  19388. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  19389. }else if(converter(_task.toolChoose[j].tool) == converter('选择题')){
  19390. let testJson = await _this.aiCreateQuestion(45, index)
  19391. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  19392. _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}
  19393. }
  19394. _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]
  19395. _this.$forceUpdate();
  19396. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19397. }
  19398. } else {
  19399. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  19400. {
  19401. tool: [],
  19402. toolDetail: "",
  19403. toolType: 0,
  19404. askCount: 1,
  19405. askTitle: "",
  19406. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19407. },
  19408. )
  19409. }
  19410. // }
  19411. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19412. _this.$forceUpdate();
  19413. _this.createTeacherAn(index);
  19414. }
  19415. // callback ? callback() : ''
  19416. _this.taskLoading[index] = false
  19417. })
  19418. .catch((error) => {
  19419. // _this.loading = false
  19420. _this.taskLoading[index] = false
  19421. console.log(error);
  19422. });
  19423. },
  19424. async aiGetG321(messages, index, callback, callback2) {
  19425. let _this = this
  19426. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19427. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19428. if (_this.infoData.length) {
  19429. for (var i = 0; i < _this.infoData.length; i++) {
  19430. if(_this.infoData[i].fileid){
  19431. fileid.push(_this.infoData[i].fileid)
  19432. }else {
  19433. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19434. if(_fileid){
  19435. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19436. _this.$forceUpdate();
  19437. if(_fileid != 1){
  19438. fileid.push(_fileid)
  19439. }
  19440. }
  19441. }
  19442. }
  19443. }
  19444. _this.taskCancelToken1[index] = _this.ajax.setCancelSource();
  19445. let parm = {
  19446. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19447. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19448. session_name: uuidv4(),
  19449. userId: this.userid,
  19450. file_ids: fileid.length ? [...fileid] : '',
  19451. model: 'gpt-4o-2024-08-06',
  19452. temperature: this.mode == 3 ? 0.5 : 0.1,
  19453. }
  19454. this.ajax
  19455. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken1[index])
  19456. .then(async (response) => {
  19457. console.log(response);
  19458. let data = response.data.FunctionResponse
  19459. if (data.message) {
  19460. let tArray = {}
  19461. try {
  19462. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19463. } catch (error) {
  19464. console.log("error_________________" + error);
  19465. try {
  19466. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19467. let match = data.message.match(regex);
  19468. tArray = JSON.parse(match[0]);
  19469. } catch (error) {
  19470. try {
  19471. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19472. let match = data.message.match(regex);
  19473. // eval("var aaa = " + match[0])
  19474. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19475. } catch (error) {
  19476. console.log("error_________________" + error);
  19477. }
  19478. console.log("error_________________" + error);
  19479. }
  19480. }
  19481. console.log(data.message);
  19482. _this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail = tArray.detail
  19483. _this.unitJson[0].chapterInfo[0].taskJson[index].chapterData = []
  19484. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19485. _this.$forceUpdate();
  19486. _this.createTeacherAn(index);
  19487. }
  19488. callback ? callback(callback2) : ''
  19489. _this.taskGLoading[index][0] = false
  19490. _this.taskCancelToken1[index] = null
  19491. _this.$forceUpdate();
  19492. })
  19493. .catch((error) => {
  19494. // _this.loading = false
  19495. callback ? callback(callback2) : ''
  19496. _this.taskGLoading[index][0] = false
  19497. _this.taskCancelToken1[index] = null
  19498. _this.$forceUpdate();
  19499. console.log(error);
  19500. });
  19501. },
  19502. async aiGetG322(messages, index, callback) {
  19503. let _this = this
  19504. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19505. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19506. if (_this.infoData.length) {
  19507. for (var i = 0; i < _this.infoData.length; i++) {
  19508. if(_this.infoData[i].fileid){
  19509. fileid.push(_this.infoData[i].fileid)
  19510. }else {
  19511. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19512. if(_fileid){
  19513. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19514. _this.$forceUpdate();
  19515. if(_fileid != 1){
  19516. fileid.push(_fileid)
  19517. }
  19518. }
  19519. }
  19520. }
  19521. }
  19522. _this.taskCancelToken2[index] = _this.ajax.setCancelSource();
  19523. let parm = {
  19524. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19525. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19526. session_name: uuidv4(),
  19527. userId: this.userid,
  19528. file_ids: fileid.length ? [...fileid] : '',
  19529. model: 'gpt-4o-2024-08-06',
  19530. temperature: this.mode == 3 ? 0.5 : 0.1,
  19531. }
  19532. this.ajax
  19533. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, _this.taskCancelToken2[index])
  19534. .then(async (response) => {
  19535. console.log(response);
  19536. let data = response.data.FunctionResponse
  19537. if (data.message) {
  19538. console.log(data.message);
  19539. let tArray = {}
  19540. try {
  19541. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19542. } catch (error) {
  19543. console.log("error_________________" + error);
  19544. try {
  19545. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19546. let match = data.message.match(regex);
  19547. tArray = JSON.parse(match[0]);
  19548. } catch (error) {
  19549. try {
  19550. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19551. let match = data.message.match(regex);
  19552. // eval("var aaa = " + match[0])
  19553. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19554. } catch (error) {
  19555. console.log("error_________________" + error);
  19556. }
  19557. console.log("error_________________" + error);
  19558. }
  19559. }
  19560. let toolsJson = {
  19561. "电子白板": { tool: 1, type: 1 },
  19562. "文档": { tool: 52, type: 1 },
  19563. "思维导图": { tool: 3, type: 1 },
  19564. "表格": { tool: 48, type: 1 },
  19565. "作业提交": { tool: 16, type: 2 },
  19566. "问答": { tool: 15, type: 2 },
  19567. "选择题": { tool: 45, type: 2 },
  19568. }
  19569. if(_this.languageSetting == 1){
  19570. toolsJson = JSON.parse(converter2(JSON.stringify(toolsJson)))
  19571. }else if(_this.languageSetting == 2){
  19572. toolsJson = {
  19573. "Mind Map Tool": { tool: 1, type: 1 },
  19574. "Document tool": { tool: 52, type: 1 },
  19575. "Diagram Tool": { tool: 3, type: 1 },
  19576. "Spreadsheet tool": { tool: 48, type: 1 },
  19577. "作业提交": { tool: 16, type: 2 },
  19578. "Q&A Tool": { tool: 15, type: 2 },
  19579. "Choice tool": { tool: 45, type: 2 },
  19580. }
  19581. }
  19582. let _task = tArray
  19583. if(!_task.toolChoose){
  19584. console.log("error_________________JSON不对重新生成");
  19585. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19586. _this.aiGet322(messages, index)
  19587. return;
  19588. }
  19589. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose = []
  19590. if (_task.toolChoose && _task.toolChoose.length) {
  19591. for (var j = 0; j < _task.toolChoose.length; j++) {
  19592. let _json = {
  19593. tool: [],
  19594. toolDetail: _task.toolChoose[j].detail,
  19595. toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 2,
  19596. askCount: 1,
  19597. askTitle: "",
  19598. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19599. }
  19600. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19601. if(converter(_task.toolChoose[j].tool) == converter('问答') || _task.toolChoose[j].tool == 'Q&A Tool'){
  19602. let answerQ = await _this.aiCreateQuestion(15, index)
  19603. // _json.answerQ = answerQ.answerQ
  19604. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.length - 1].answerQ = answerQ.answerQ
  19605. }else if(converter(_task.toolChoose[j].tool) == converter('选择题') || _task.toolChoose[j].tool == 'Choice tool'){
  19606. let testJson = await _this.aiCreateQuestion(45, index)
  19607. // _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson}
  19608. _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}
  19609. }
  19610. _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]
  19611. _this.$forceUpdate();
  19612. // _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(_json)
  19613. }
  19614. } else {
  19615. _this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose.push(
  19616. {
  19617. tool: [],
  19618. toolDetail: "",
  19619. toolType: 0,
  19620. askCount: 1,
  19621. askTitle: "",
  19622. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  19623. },
  19624. )
  19625. }
  19626. //
  19627. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19628. _this.$forceUpdate();
  19629. _this.$nextTick(()=>{
  19630. setTimeout(() => {
  19631. for (var j = 0; j < _task.toolChoose.length; j++) {
  19632. if(_this.panTaskElist() == 0 && _this.pjIndex.indexOf(_this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[j].tool[0]) != -1){
  19633. _this.$refs['evalist'+index+j][0].openAiDialog('elist');
  19634. }
  19635. }
  19636. }, 2000);
  19637. })
  19638. }
  19639. callback ? callback() : ''
  19640. _this.taskGLoading[index][1] = false
  19641. _this.taskCancelToken2[index] = null
  19642. _this.$forceUpdate();
  19643. })
  19644. .catch((error) => {
  19645. // _this.loading = false
  19646. callback ? callback() : ''
  19647. _this.taskGLoading[index][1] = false
  19648. _this.taskCancelToken2[index] = null
  19649. _this.$forceUpdate();
  19650. console.log(error);
  19651. });
  19652. },
  19653. async aiGetG323(messages, index) {
  19654. let _this = this
  19655. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19656. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19657. if (_this.infoData.length) {
  19658. for (var i = 0; i < _this.infoData.length; i++) {
  19659. if(_this.infoData[i].fileid){
  19660. fileid.push(_this.infoData[i].fileid)
  19661. }else {
  19662. let _fileid = await _this.createFileid(_this.infoData[i].url)
  19663. if(_fileid){
  19664. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  19665. _this.$forceUpdate();
  19666. if(_fileid != 1){
  19667. fileid.push(_fileid)
  19668. }
  19669. }
  19670. }
  19671. }
  19672. }
  19673. let parm = {
  19674. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19675. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19676. session_name: uuidv4(),
  19677. userId: this.userid,
  19678. file_ids: fileid.length ? [...fileid] : '',
  19679. model: 'gpt-4o-2024-08-06',
  19680. temperature: this.mode == 3 ? 0.5 : 0.1,
  19681. }
  19682. this.ajax
  19683. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19684. .then(async (response) => {
  19685. console.log(response);
  19686. let data = response.data.FunctionResponse
  19687. if (data.message) {
  19688. console.log(data.message);
  19689. let tArray = {}
  19690. try {
  19691. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19692. } catch (error) {
  19693. console.log("error_________________" + error);
  19694. try {
  19695. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19696. let match = data.message.match(regex);
  19697. tArray = JSON.parse(match[0]);
  19698. } catch (error) {
  19699. try {
  19700. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19701. let match = data.message.match(regex);
  19702. // eval("var aaa = " + match[0])
  19703. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19704. } catch (error) {
  19705. console.log("error_________________" + error);
  19706. }
  19707. console.log("error_________________" + error);
  19708. }
  19709. }
  19710. let _task = tArray
  19711. if(!_task.elist){
  19712. console.log("error_________________JSON不对重新生成");
  19713. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  19714. _this.aiGet322(messages, index)
  19715. return;
  19716. }
  19717. _task.elist = _task.elist.filter(el=>{
  19718. el.isai = "1"
  19719. return el
  19720. })
  19721. _this.unitJson[0].chapterInfo[0].taskJson[index].eList = _task.elist
  19722. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  19723. _this.$forceUpdate();
  19724. }
  19725. // callback ? callback() : ''
  19726. _this.taskGLoading[index][2] = false
  19727. })
  19728. .catch((error) => {
  19729. // _this.loading = false
  19730. _this.taskGLoading[index][2] = false
  19731. console.log(error);
  19732. });
  19733. },
  19734. async aiCreateQuestion(type, task) {
  19735. let _this = this
  19736. return new Promise((resolve, reject) => {
  19737. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  19738. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19739. if (_this.infoData.length) {
  19740. for (var i = 0; i < _this.infoData.length; i++) {
  19741. if(_this.infoData[i].fileid){
  19742. fileid.push(_this.infoData[i].fileid)
  19743. }
  19744. }
  19745. }
  19746. let sub = []
  19747. let mclass = []
  19748. if (this.courseTypeId.length) {
  19749. for (var i = 0; i < this.courseTypeId.length; i++) {
  19750. let _sid = this.courseTypeId[i]
  19751. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19752. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19753. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19754. }
  19755. }
  19756. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19757. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19758. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19759. }
  19760. }
  19761. }
  19762. }
  19763. let messages = ""
  19764. if(type == 15){
  19765. messages = `NOTICE
  19766. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19767. Language: ${this.getLang()}
  19768. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19769. Instruction: Based on the context, follow "Format example", write content.
  19770. # Context
  19771. ## 任务
  19772. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  19773. ## 限制
  19774. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19775. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19776. ## 课程简介
  19777. 课程名字:${_this.courseName}
  19778. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19779. ${sub.length ? '学科:' + sub.join(",") : ''}
  19780. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19781. ## 教案
  19782. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19783. # Format example
  19784. {"answerQ":"问题"}
  19785. `
  19786. }else if(type == 45){
  19787. messages = `NOTICE
  19788. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19789. Language: ${this.getLang()}
  19790. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19791. Instruction: Based on the context, follow "Format example", write content.
  19792. # Context
  19793. ## 任务
  19794. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  19795. ## 限制
  19796. - 生成题目禁止重复。
  19797. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19798. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  19799. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19800. ## 课程简介
  19801. 课程名字:${_this.courseName}
  19802. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19803. ${sub.length ? '学科:' + sub.join(",") : ''}
  19804. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19805. ## 教案
  19806. ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19807. # Format example
  19808. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  19809. `
  19810. }
  19811. let parm = {
  19812. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19813. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19814. session_name: uuidv4(),
  19815. userId: this.userid,
  19816. file_ids: fileid.length ? [...fileid] : '',
  19817. model: 'gpt-4o-2024-08-06',
  19818. temperature: this.mode == 3 ? 0.5 : 0.1,
  19819. }
  19820. this.ajax
  19821. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19822. .then((response) => {
  19823. console.log(response);
  19824. let data = response.data.FunctionResponse
  19825. if (data.message) {
  19826. console.log(data.message);
  19827. try {
  19828. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19829. let tArray = {}
  19830. try {
  19831. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19832. } catch (error) {
  19833. console.log("error_________________" + error);
  19834. try {
  19835. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19836. let match = data.message.match(regex);
  19837. tArray = JSON.parse(match[0]);
  19838. // var message = data.message;
  19839. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  19840. // var jsonEnd = message.indexOf("```", jsonStart);
  19841. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  19842. // tArray = JSON.parse(jsonString);
  19843. } catch (error) {
  19844. try {
  19845. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19846. let match = data.message.match(regex);
  19847. // eval("var aaa = " + match[0])
  19848. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19849. } catch (error) {
  19850. try {
  19851. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  19852. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  19853. let match = data.message.match(regex.replace(regex2, '"$1"'));
  19854. // eval("var aaa = " + match[0])
  19855. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  19856. } catch (error) {
  19857. console.log("error_________________" + error);
  19858. }
  19859. console.log("error_________________" + error);
  19860. }
  19861. console.log("error_________________" + error);
  19862. }
  19863. }
  19864. resolve(tArray)
  19865. } catch (error) {
  19866. if(type == 15){
  19867. resolve({answerQ: "题目"})
  19868. }else if(type == 45){
  19869. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19870. }
  19871. }
  19872. }else if(type == 15){
  19873. resolve({answerQ: "题目"})
  19874. }else if(type == 45){
  19875. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19876. }
  19877. })
  19878. .catch((error) => {
  19879. if(type == 15){
  19880. resolve({answerQ: "题目"})
  19881. }else if(type == 45){
  19882. resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
  19883. }
  19884. console.log(error);
  19885. });
  19886. });
  19887. },
  19888. async aiChoice(type){
  19889. if(type == 45){
  19890. this.choiceLoading = true
  19891. }
  19892. let _this = this
  19893. let fileid = []
  19894. if (_this.xuanzeInfoData.length) {
  19895. for (var i = 0; i < _this.xuanzeInfoData.length; i++) {
  19896. if(_this.xuanzeInfoData[i].fileid){
  19897. fileid.push(_this.xuanzeInfoData[i].fileid)
  19898. }
  19899. }
  19900. }else{
  19901. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  19902. if (_this.infoData.length) {
  19903. for (var i = 0; i < _this.infoData.length; i++) {
  19904. if(_this.infoData[i].fileid){
  19905. fileid.push(_this.infoData[i].fileid)
  19906. }
  19907. }
  19908. }
  19909. }
  19910. let sub = []
  19911. let mclass = []
  19912. if (this.courseTypeId.length) {
  19913. for (var i = 0; i < this.courseTypeId.length; i++) {
  19914. let _sid = this.courseTypeId[i]
  19915. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19916. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  19917. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  19918. }
  19919. }
  19920. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  19921. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  19922. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  19923. }
  19924. }
  19925. }
  19926. }
  19927. let messages = ""
  19928. if(type == 15){
  19929. messages = `NOTICE
  19930. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19931. Language: ${this.getLang()}
  19932. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19933. Instruction: Based on the context, follow "Format example", write content.
  19934. # Context
  19935. ## 任务
  19936. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以json的格式
  19937. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  19938. ## 限制
  19939. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19940. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19941. ## 课程简介
  19942. 课程名字:${_this.courseName}
  19943. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19944. ${sub.length ? '学科:' + sub.join(",") : ''}
  19945. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19946. ## 教案
  19947. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19948. # Format example
  19949. {"answerQ":"问题"}
  19950. `
  19951. }else if(type == 45){
  19952. messages = `NOTICE
  19953. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容),并生成需要的JSON数据。
  19954. Language: ${this.getLang()}
  19955. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  19956. Instruction: Based on the context, follow "Format example", write content.
  19957. # Context
  19958. ## 任务
  19959. 根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。
  19960. ${_this.xuanzeInfoData.length ? '尽量参考上传文件中的内容生成' : ''}
  19961. ## 限制
  19962. - 生成题目禁止重复。
  19963. - 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
  19964. - 请严格按照以下格式要求输出内容,题目必须是单选题。
  19965. - 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
  19966. ## 课程简介
  19967. 课程名字:${_this.courseName}
  19968. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  19969. ${sub.length ? '学科:' + sub.join(",") : ''}
  19970. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  19971. ## 教案
  19972. ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  19973. # Format example
  19974. [{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
  19975. `
  19976. }
  19977. let parm = {
  19978. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  19979. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  19980. session_name: uuidv4(),
  19981. userId: this.userid,
  19982. file_ids: fileid.length ? [...fileid] : '',
  19983. model: 'gpt-4o-2024-08-06',
  19984. temperature: this.mode == 3 ? 0.5 : 0.1,
  19985. }
  19986. this.ajax
  19987. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  19988. .then((response) => {
  19989. console.log(response);
  19990. let data = response.data.FunctionResponse
  19991. if (data.message) {
  19992. console.log(data.message);
  19993. try {
  19994. // let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19995. let tArray = {}
  19996. try {
  19997. tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  19998. } catch (error) {
  19999. console.log("error_________________" + error);
  20000. try {
  20001. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20002. let match = data.message.match(regex);
  20003. tArray = JSON.parse(match[0]);
  20004. // var message = data.message;
  20005. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20006. // var jsonEnd = message.indexOf("```", jsonStart);
  20007. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20008. // tArray = JSON.parse(jsonString);
  20009. } catch (error) {
  20010. try {
  20011. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20012. let regex2 = new RegExp("([a-zA-Z]+)(?=:)", "g")
  20013. let match = data.message.match(regex.replace(regex2, '"$1"'));
  20014. // eval("var aaa = " + match[0])
  20015. tArray = JSON.parse(match[0].replace(/\n/g, '').replace(/\s{2,}/g, ' '));
  20016. } catch (error) {
  20017. console.log("error_________________" + error);
  20018. }
  20019. console.log("error_________________" + error);
  20020. }
  20021. }
  20022. if(type == 45){
  20023. this.testJson = {"testCount":tArray.length,"testTitle":"","testJson":tArray}
  20024. }
  20025. } catch (error) {
  20026. if(type == 15){
  20027. {answerQ: "题目"}
  20028. }else if(type == 45){
  20029. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  20030. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  20031. }
  20032. _this.choiceLoading = false
  20033. }
  20034. }else if(type == 15){
  20035. {answerQ: "题目"}
  20036. }else if(type == 45){
  20037. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  20038. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  20039. }
  20040. _this.choiceLoading = false
  20041. }).catch((error) => {
  20042. if(type == 15){
  20043. {answerQ: "题目"}
  20044. }else if(type == 45){
  20045. let _test = [{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}]
  20046. _this.testJson = {"testCount":_test.length,"testTitle":"","testJson":_test}
  20047. }
  20048. console.log(error);
  20049. _this.choiceLoading = false
  20050. });
  20051. },
  20052. async aiGet4(messages, callback, clickType) {
  20053. let _this = this
  20054. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20055. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20056. if (_this.infoData.length) {
  20057. for (var i = 0; i < _this.infoData.length; i++) {
  20058. if(_this.infoData[i].fileid){
  20059. fileid.push(_this.infoData[i].fileid)
  20060. }else {
  20061. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20062. if(_fileid){
  20063. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20064. _this.$forceUpdate();
  20065. if(_fileid != 1){
  20066. fileid.push(_fileid)
  20067. }
  20068. }
  20069. }
  20070. }
  20071. }
  20072. for (var i = 0; i < _this.cankaoInfoData.length; i++) {
  20073. if(_this.cankaoInfoData[i].fileid){
  20074. fileid.push(_this.cankaoInfoData[i].fileid)
  20075. }else {
  20076. let _fileid = await _this.createFileid(_this.cankaoInfoData[i].url)
  20077. if(_fileid){
  20078. _this.cankaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  20079. _this.$forceUpdate();
  20080. if(_fileid != 1){
  20081. fileid.push(_fileid)
  20082. }
  20083. }
  20084. }
  20085. }
  20086. // let params = JSON.stringify({
  20087. // // "model": "Chat",
  20088. // model: 'gpt-3.5-turbo',
  20089. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20090. // max_tokens: 4096,
  20091. // top_p: 1,
  20092. // frequency_penalty: 0,
  20093. // presence_penalty: 0,
  20094. // messages: [{
  20095. // content: messages,
  20096. // role: 'user'
  20097. // }],
  20098. // stream: false,
  20099. // uid: this.userid,
  20100. // mind_map_question: "",
  20101. // })
  20102. // // let params = JSON.stringify({
  20103. // // message: {
  20104. // // anthropic_version: "bedrock-2023-05-31",
  20105. // // max_tokens: 4096,
  20106. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  20107. // // top_p: 1,
  20108. // // messages: [{
  20109. // // content: messages,
  20110. // // role: 'user'
  20111. // // }], //
  20112. // // },
  20113. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20114. // // });
  20115. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20116. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  20117. // console.log(response);
  20118. // let data = response.data.FunctionResponse
  20119. // if (data.choices && data.choices.length && data.choices[0].message) {
  20120. // console.log(data.choices[0].message.content);
  20121. // let dArray = JSON.parse(data.choices[0].message.content)
  20122. // _this.teacherText = JSON.parse(data.choices[0].message.content)
  20123. // if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
  20124. // _this.unitJson[0].chapterInfo[0].taskJson = []
  20125. // for (var i = 0; i < dArray.length; i++) {
  20126. // let _task = dArray[i]
  20127. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  20128. // task: _task.task,
  20129. // taskDetail: "",
  20130. // taskDetail2: "",
  20131. // taskDetail3: _task.detail,
  20132. // chapterData: [],
  20133. // toolText: "",
  20134. // toolChoose: [
  20135. // {
  20136. // tool: [],
  20137. // toolDetail: "",
  20138. // toolType: 0,
  20139. // askCount: 1,
  20140. // askTitle: "",
  20141. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20142. // },
  20143. // ],
  20144. // isShowTools: false,
  20145. // askCount: 1,
  20146. // isFold: 0,
  20147. // askTitle: "",
  20148. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20149. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20150. // homeworkList: [],
  20151. // })
  20152. // }
  20153. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  20154. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20155. // _this.$forceUpdate();
  20156. // } else {
  20157. // for (var i = 0; i < dArray.length; i++) {
  20158. // let _task = dArray[i]
  20159. // if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20160. // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  20161. // }else {
  20162. // _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  20163. // task: _task.task,
  20164. // taskDetail: "",
  20165. // taskDetail2: "",
  20166. // taskDetail3: _task.detail,
  20167. // chapterData: [],
  20168. // toolText: "",
  20169. // toolChoose: [
  20170. // {
  20171. // tool: [],
  20172. // toolDetail: "",
  20173. // toolType: 0,
  20174. // askCount: 1,
  20175. // askTitle: "",
  20176. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20177. // },
  20178. // ],
  20179. // isShowTools: false,
  20180. // askCount: 1,
  20181. // isFold: 0,
  20182. // askTitle: "",
  20183. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20184. // checkJson: [{ checkCount: [], checkPerent: [] }],
  20185. // homeworkList: [],
  20186. // }
  20187. // }
  20188. // }
  20189. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20190. // _this.$forceUpdate();
  20191. // }
  20192. // }
  20193. // // if (data.result) {
  20194. // // console.log(data.result);
  20195. // // let dArray = JSON.parse(data.result)
  20196. // // _this.teacherText = JSON.parse(data.result)
  20197. // // for (var i = 0; i < dArray.length; i++) {
  20198. // // let _task = dArray[i]
  20199. // // _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  20200. // // }
  20201. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20202. // // _this.$forceUpdate();
  20203. // // }
  20204. // callback ? callback() : ''
  20205. // _this.loading = false
  20206. // }).catch(function (error) {
  20207. // _this.loading = false
  20208. // console.log(error);
  20209. // });
  20210. let parm = {
  20211. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  20212. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20213. session_name: uuidv4(),
  20214. userId: this.userid,
  20215. file_ids: fileid.length ? [...fileid] : '',
  20216. model: 'gpt-4o-2024-08-06',
  20217. temperature: this.mode == 3 ? 0.5 : 0.1,
  20218. }
  20219. this.ajax
  20220. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  20221. .then((response) => {
  20222. console.log(response);
  20223. let data = response.data.FunctionResponse
  20224. if (data.message) {
  20225. console.log(data.message);
  20226. // let dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20227. let dArray = []
  20228. try {
  20229. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
  20230. } catch (error) {
  20231. console.log("error_________________" + error);
  20232. try {
  20233. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  20234. let match = data.message.match(regex);
  20235. dArray = JSON.parse(match[0]);
  20236. // var message = data.message;
  20237. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  20238. // var jsonEnd = message.indexOf("```", jsonStart);
  20239. // var jsonString = message.substring(jsonStart, jsonEnd).trim();
  20240. // dArray = JSON.parse(jsonString);
  20241. } catch (error) {
  20242. _this.aiGet4(messages, callback)
  20243. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20244. console.log("error_________________" + error);
  20245. return;
  20246. console.log("error_________________" + error);
  20247. _this.loading = false
  20248. }
  20249. }
  20250. try {
  20251. _this.teacherText = JSON.parse(JSON.stringify(dArray))
  20252. if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") {
  20253. if(_this.panTeacher() > 0){
  20254. for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
  20255. _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
  20256. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
  20257. }
  20258. for (var i = 0; i < dArray.length; i++) {
  20259. let _task = dArray[i]
  20260. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20261. _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':','')
  20262. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  20263. }else {
  20264. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20265. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20266. taskDetail: "",
  20267. taskDetail2: "",
  20268. taskDetail3: _task.detail,
  20269. chapterData: [],
  20270. toolText: "",
  20271. toolChoose: [
  20272. {
  20273. tool: [],
  20274. toolDetail: "",
  20275. toolType: 0,
  20276. askCount: 1,
  20277. askTitle: "",
  20278. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20279. },
  20280. ],
  20281. isShowTools: false,
  20282. askCount: 1,
  20283. isFold: 0,
  20284. askTitle: "",
  20285. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20286. checkJson: [{ checkCount: [], checkPerent: [] }],
  20287. homeworkList: [],
  20288. })
  20289. }
  20290. }
  20291. }else {
  20292. _this.unitJson[0].chapterInfo[0].taskJson = []
  20293. for (var i = 0; i < dArray.length; i++) {
  20294. let _task = dArray[i]
  20295. _this.unitJson[0].chapterInfo[0].taskJson.push({
  20296. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20297. taskDetail: "",
  20298. taskDetail2: "",
  20299. taskDetail3: _task.detail,
  20300. chapterData: [],
  20301. toolText: "",
  20302. toolChoose: [
  20303. {
  20304. tool: [],
  20305. toolDetail: "",
  20306. toolType: 0,
  20307. askCount: 1,
  20308. askTitle: "",
  20309. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20310. },
  20311. ],
  20312. isShowTools: false,
  20313. askCount: 1,
  20314. isFold: 0,
  20315. askTitle: "",
  20316. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20317. checkJson: [{ checkCount: [], checkPerent: [] }],
  20318. homeworkList: [],
  20319. })
  20320. }
  20321. }
  20322. _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
  20323. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20324. _this.$forceUpdate();
  20325. } else {
  20326. for (var i = 0; i < dArray.length; i++) {
  20327. let _task = dArray[i]
  20328. if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
  20329. _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
  20330. }else {
  20331. _this.unitJson[0].chapterInfo[0].taskJson[i] = {
  20332. task: _task.task.replaceAll('任务'+(i+1),'').replaceAll('任务'+_this.numberToChinese(i+1),'').replaceAll(':','').replaceAll(':',''),
  20333. taskDetail: "",
  20334. taskDetail2: "",
  20335. taskDetail3: _task.detail,
  20336. chapterData: [],
  20337. toolText: "",
  20338. toolChoose: [
  20339. {
  20340. tool: [],
  20341. toolDetail: "",
  20342. toolType: 0,
  20343. askCount: 1,
  20344. askTitle: "",
  20345. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20346. },
  20347. ],
  20348. isShowTools: false,
  20349. askCount: 1,
  20350. isFold: 0,
  20351. askTitle: "",
  20352. askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  20353. checkJson: [{ checkCount: [], checkPerent: [] }],
  20354. homeworkList: [],
  20355. }
  20356. }
  20357. }
  20358. _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  20359. _this.$forceUpdate();
  20360. }
  20361. } catch (error) {
  20362. _this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
  20363. _this.aiGet4(messages, callback)
  20364. console.log("error_________________" + error);
  20365. return;
  20366. // _this.loading = false
  20367. }
  20368. }
  20369. callback ? callback() : ''
  20370. })
  20371. .catch((error) => {
  20372. _this.loading = false
  20373. console.log(error);
  20374. });
  20375. },
  20376. async aiDetail(msg, index) {
  20377. let _this = this
  20378. const _tindex = 'task-' + index
  20379. const _tindex2 = index
  20380. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20381. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20382. if (_this.infoData.length) {
  20383. for (var i = 0; i < _this.infoData.length; i++) {
  20384. if(_this.infoData[i].fileid){
  20385. fileid.push(_this.infoData[i].fileid)
  20386. }else {
  20387. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20388. if(_fileid){
  20389. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20390. _this.$forceUpdate();
  20391. if(_fileid != 1){
  20392. fileid.push(_fileid)
  20393. }
  20394. }
  20395. }
  20396. }
  20397. }
  20398. let url = []
  20399. if (this.infoData.length) {
  20400. for (var i = 0; i < this.infoData.length; i++) {
  20401. url.push(this.infoData[i].url)
  20402. }
  20403. }
  20404. let messages = `NOTICE
  20405. Role: 你是创建课程的老师(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  20406. Language: ${this.getLang()}
  20407. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20408. Instruction: Based on the context, follow "Format example", write content.
  20409. #Context
  20410. ## 要求
  20411. ${msg}
  20412. ## 参考信息
  20413. 任务名称:${_this.aiCallBack.task}
  20414. ## 优化内容
  20415. 大纲描述:${_this.aiCallBack.taskDetail2}。 `
  20416. // -------- #补充参考资料和
  20417. // ## 补充参考资料
  20418. // - 补充资料:${url.join(",")}
  20419. // - 补充描述:${_this.courseText2}
  20420. _this.taskDetailLoading.push(_tindex)
  20421. _this.ttaskDetailLoading.push(_tindex)
  20422. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20423. let _uuid = uuidv4();
  20424. // let params = JSON.stringify({
  20425. // // "model": "Chat",
  20426. // model: 'gpt-3.5-turbo',
  20427. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20428. // max_tokens: 4096,
  20429. // top_p: 1,
  20430. // frequency_penalty: 0,
  20431. // presence_penalty: 0,
  20432. // messages: [{
  20433. // content: messages,
  20434. // role: 'user'
  20435. // }],
  20436. // uid: _uuid,
  20437. // mind_map_question: "",
  20438. // })
  20439. let params = {
  20440. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20441. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ")}],
  20442. session_name: _uuid,
  20443. userId: _this.userid,
  20444. uid: _uuid,
  20445. file_ids: fileid.length ? [...fileid] : '',
  20446. model: 'gpt-4o-2024-08-06',
  20447. temperature: this.mode == 3 ? 0.5 : 0.1,
  20448. }
  20449. // let params = JSON.stringify({
  20450. // message: {
  20451. // anthropic_version: "bedrock-2023-05-31",
  20452. // max_tokens: 4096,
  20453. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20454. // top_p: 1,
  20455. // messages: [{
  20456. // "role": "user",
  20457. // "content": messages
  20458. // }] ,
  20459. // },
  20460. // uid: _uuid,
  20461. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20462. // });
  20463. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20464. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20465. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20466. console.log(response);
  20467. // let data = response.data.FunctionResponse
  20468. // if (data.choices && data.choices.length && data.choices[0].message) {
  20469. // console.log(data.choices[0].message.content);
  20470. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20471. // _this.$forceUpdate()
  20472. // }
  20473. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20474. } else {
  20475. _this.$message.warning(response.data.FunctionResponse.result);
  20476. }
  20477. _this.isOutlineTaskCancelToken[index] = null
  20478. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20479. }).catch(function (error) {
  20480. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20481. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20482. _this.isOutlineTaskCancelToken[index] = null
  20483. if(error && error.message != 'Request canceled by the user.'){
  20484. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20485. }
  20486. console.log(error);
  20487. });
  20488. await _this.aiDetailgetAiContent(_uuid, _tindex, _tindex2)
  20489. },
  20490. aiDetailgetAiContent(_uid, loading, _tindex2) {
  20491. try {
  20492. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20493. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20494. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20495. } catch(error){
  20496. console.log('EventSource error:', error);
  20497. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20498. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20499. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20500. this.isOutlineTaskCancelToken[_tindex2] = null
  20501. return;
  20502. }
  20503. let _allText = "";
  20504. let _mdText = "";
  20505. let _iindex = 0
  20506. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  20507. let _eData = JSON.parse(_e.data).content;
  20508. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20509. //对话已经完成
  20510. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20511. this.isOutlineTaskCancelSource[_tindex2].close();
  20512. this.isOutlineTaskCancelSource[_tindex2] = null;
  20513. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20514. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20515. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20516. this.isOutlineTaskCancelToken[_tindex2] = null
  20517. return;
  20518. } else {
  20519. _iindex++
  20520. //对话还在继续
  20521. let _text = "";
  20522. _text = _eData.replaceAll("'", "");
  20523. if (_allText == "") {
  20524. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20525. } else {
  20526. _allText += _text;
  20527. }
  20528. _mdText = _allText + "_";
  20529. _mdText = _mdText.replace(/\\n/g, "\n");
  20530. _mdText = _mdText.replace(/\\/g, "");
  20531. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20532. //转化返回的回复流数据.
  20533. if(_iindex == 10){
  20534. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20535. _iindex = 0
  20536. }
  20537. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20538. // 处理流数据
  20539. }
  20540. // this.$forceUpdate();
  20541. };
  20542. let _this = _this
  20543. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  20544. // 处理错误,可以尝试重新连接
  20545. console.log('EventSource error:', event);
  20546. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20547. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  20548. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  20549. _this.isOutlineTaskCancelToken[_tindex2] = null
  20550. _this.isOutlineTaskCancelSource[_tindex2].close();
  20551. _this.isOutlineTaskCancelSource[_tindex2] = null;
  20552. };
  20553. },
  20554. async aiOutlineDetail(msg, index) {
  20555. let _this = this
  20556. const _tindex = 'task-' + index
  20557. const _tindex2 = index
  20558. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20559. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20560. if (_this.infoData.length) {
  20561. for (var i = 0; i < _this.infoData.length; i++) {
  20562. if(_this.infoData[i].fileid){
  20563. fileid.push(_this.infoData[i].fileid)
  20564. }else {
  20565. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20566. if(_fileid){
  20567. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20568. _this.$forceUpdate();
  20569. if(_fileid != 1){
  20570. fileid.push(_fileid)
  20571. }
  20572. }
  20573. }
  20574. }
  20575. }
  20576. let url = []
  20577. if (this.infoData.length) {
  20578. for (var i = 0; i < this.infoData.length; i++) {
  20579. url.push(this.infoData[i].url)
  20580. }
  20581. }
  20582. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  20583. let messages = `NOTICE
  20584. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  20585. Language: ${this.getLang()}
  20586. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20587. Instruction: Based on the context, follow "Format example", write content.
  20588. #Context
  20589. ## 要求
  20590. ${msg ? msg : _this.aiJson.aiOutlineDetail}
  20591. ## 参考信息
  20592. 课程名字:${_this.courseName}
  20593. 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20594. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20595. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20596. # Format example
  20597. 子任务名称:名称应该总结了该任务是在做什么,
  20598. 子任务设计:任务设计。
  20599. ${_this.languageSetting == 2 ? 'Sub-Objectives' : '子教学目标'}:教学目标。
  20600. ${_this.languageSetting == 2 ? 'Formative Outcomes' : '学生过程性成果'}:学生过程性成果。
  20601. ${_this.languageSetting == 2 ? 'Sub-Criteria' : '评价标准'}:评价标准。
  20602. `
  20603. // 教学目标:教学目标。
  20604. // 任务设计:任务设计。
  20605. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  20606. // -------- #补充参考资料和
  20607. // ## 补充参考资料
  20608. // - 补充资料:${url.join(",")}
  20609. // - 补充描述:${_this.courseText2}
  20610. _this.taskDetailLoading.push(_tindex)
  20611. _this.ttaskDetailLoading.push(_tindex)
  20612. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20613. let _uuid = uuidv4();
  20614. // let params = JSON.stringify({
  20615. // // "model": "Chat",
  20616. // model: 'gpt-3.5-turbo',
  20617. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20618. // max_tokens: 4096,
  20619. // top_p: 1,
  20620. // frequency_penalty: 0,
  20621. // presence_penalty: 0,
  20622. // messages: [{
  20623. // content: messages,
  20624. // role: 'user'
  20625. // }],
  20626. // uid: _uuid,
  20627. // mind_map_question: "",
  20628. // })
  20629. let params = {
  20630. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20631. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  20632. session_name: _uuid,
  20633. userId: _this.userid,
  20634. uid: _uuid,
  20635. file_ids: fileid.length ? [...fileid] : '',
  20636. model: 'gpt-4o-2024-08-06',
  20637. temperature: this.mode == 3 ? 0.5 : 0.1,
  20638. }
  20639. // let params = JSON.stringify({
  20640. // message: {
  20641. // anthropic_version: "bedrock-2023-05-31",
  20642. // max_tokens: 4096,
  20643. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20644. // top_p: 1,
  20645. // messages: [{
  20646. // "role": "user",
  20647. // "content": messages
  20648. // }] ,
  20649. // },
  20650. // uid: _uuid,
  20651. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20652. // });
  20653. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20654. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20655. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20656. console.log(response);
  20657. // let data = response.data.FunctionResponse
  20658. // if (data.choices && data.choices.length && data.choices[0].message) {
  20659. // console.log(data.choices[0].message.content);
  20660. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20661. // _this.$forceUpdate()
  20662. // }
  20663. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20664. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  20665. } else {
  20666. _this.$message.warning(response.data.FunctionResponse.result);
  20667. }
  20668. _this.isOutlineTaskCancelToken[index] = null
  20669. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20670. }).catch(function (error) {
  20671. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20672. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20673. _this.isOutlineTaskCancelToken[index] = null
  20674. if(error && error.message != 'Request canceled by the user.'){
  20675. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20676. }
  20677. console.log(error);
  20678. });
  20679. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  20680. },
  20681. async aiOutlineDetail2(msg, index) {
  20682. let _this = this
  20683. const _tindex = 'task-' + index
  20684. const _tindex2 = index
  20685. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20686. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20687. if (_this.infoData.length) {
  20688. for (var i = 0; i < _this.infoData.length; i++) {
  20689. if(_this.infoData[i].fileid){
  20690. fileid.push(_this.infoData[i].fileid)
  20691. }else {
  20692. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20693. if(_fileid){
  20694. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20695. _this.$forceUpdate();
  20696. if(_fileid != 1){
  20697. fileid.push(_fileid)
  20698. }
  20699. }
  20700. }
  20701. }
  20702. }
  20703. let url = []
  20704. if (this.infoData.length) {
  20705. for (var i = 0; i < this.infoData.length; i++) {
  20706. url.push(this.infoData[i].url)
  20707. }
  20708. }
  20709. let target = _this.targetCourseText2 ? _this.targetCourseText2 : _this.targetcoursetext
  20710. let taskArray = []
  20711. let taskArrayD = []
  20712. for (var k = 0; k < this.unitJson[0].chapterInfo[0].taskJson.length; k++) {
  20713. // _text += `任务名称:${this.unitJson[0].chapterInfo[0].taskJson[i].task}`
  20714. if(k != index){
  20715. taskArray.push(this.unitJson[0].chapterInfo[0].taskJson[k].task)
  20716. taskArrayD.push(this.unitJson[0].chapterInfo[0].taskJson[k].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  20717. }
  20718. }
  20719. let messages = `NOTICE
  20720. Role: 你是创建课程的老师,内容不要以markdown形式出现,只需要口语化的形式。
  20721. Language: ${this.getLang()}
  20722. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20723. Instruction: Based on the context, follow "Format example", write content.
  20724. #Context
  20725. ## 要求
  20726. ${msg}
  20727. ## 参考信息
  20728. 课程名字:${_this.courseName} 任务名称:${_this.aiCallBack.task ? _this.aiCallBack.task : _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  20729. ${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
  20730. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  20731. ${taskArray.length ? '其他任务大纲名字:' + taskArray.join(',') : ''}
  20732. ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
  20733. # Format example
  20734. **子任务标题**:环节+子任务名称
  20735. **${this.languageSetting == 2 ? 'Sub-Objectives': '子教学目标'}**:子教学目标是课程目标在该任务的分解目标,撰写格式同子教学目标
  20736. **${this.languageSetting == 2 ? 'Formative Outcomes': '过程性成果'}**:过程性成果是最终成果的一部分或者是中间成果(例如背景设计-大纲-章节-童话)
  20737. **${this.languageSetting == 2 ? 'Sub-Criteria': '子评价标准'}**:以学生能做到...开始,需要匹配子教学目标和教学任务和过程性成果
  20738. `
  20739. // 教学目标:教学目标。
  20740. // 任务设计:任务设计。
  20741. // 评价标准:评价标准。 内容不要以markdown形式出现,只需要口语化的形式
  20742. // -------- #补充参考资料和
  20743. // ## 补充参考资料
  20744. // - 补充资料:${url.join(",")}
  20745. // - 补充描述:${_this.courseText2}
  20746. _this.taskDetailLoading.push(_tindex)
  20747. _this.ttaskDetailLoading.push(_tindex)
  20748. _this.isOutlineTaskCancelToken[index] = _this.ajax.setCancelSource();
  20749. let _uuid = uuidv4();
  20750. // let params = JSON.stringify({
  20751. // // "model": "Chat",
  20752. // model: 'gpt-3.5-turbo',
  20753. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20754. // max_tokens: 4096,
  20755. // top_p: 1,
  20756. // frequency_penalty: 0,
  20757. // presence_penalty: 0,
  20758. // messages: [{
  20759. // content: messages,
  20760. // role: 'user'
  20761. // }],
  20762. // uid: _uuid,
  20763. // mind_map_question: "",
  20764. // })
  20765. let params = {
  20766. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20767. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages) : messages}],
  20768. session_name: _uuid,
  20769. userId: _this.userid,
  20770. uid: _uuid,
  20771. file_ids: fileid.length ? [...fileid] : '',
  20772. model: 'gpt-4o-2024-08-06',
  20773. temperature: this.mode == 3 ? 0.5 : 0.1,
  20774. }
  20775. // let params = JSON.stringify({
  20776. // message: {
  20777. // anthropic_version: "bedrock-2023-05-31",
  20778. // max_tokens: 4096,
  20779. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20780. // top_p: 1,
  20781. // messages: [{
  20782. // "role": "user",
  20783. // "content": messages
  20784. // }] ,
  20785. // },
  20786. // uid: _uuid,
  20787. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20788. // });
  20789. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20790. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isOutlineTaskCancelToken[index]).then(function (response) {
  20791. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20792. console.log(response);
  20793. // let data = response.data.FunctionResponse
  20794. // if (data.choices && data.choices.length && data.choices[0].message) {
  20795. // console.log(data.choices[0].message.content);
  20796. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = data.choices[0].message.content
  20797. // _this.$forceUpdate()
  20798. // }
  20799. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20800. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask2 = false
  20801. } else {
  20802. _this.$message.warning(response.data.FunctionResponse.result);
  20803. }
  20804. _this.isOutlineTaskCancelToken[index] = null
  20805. // _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20806. }).catch(function (error) {
  20807. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20808. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(_tindex), 1)
  20809. _this.isOutlineTaskCancelToken[index] = null
  20810. if(error && error.message != 'Request canceled by the user.'){
  20811. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20812. }
  20813. console.log(error);
  20814. });
  20815. await _this.aiOutlineDetailgetAiContent(_uuid, _tindex, _tindex2)
  20816. },
  20817. aiOutlineDetailgetAiContent(_uid, loading, _tindex2) {
  20818. try {
  20819. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20820. this.isOutlineTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20821. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20822. } catch(error) {
  20823. console.log('EventSource error:', error);
  20824. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20825. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20826. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20827. this.isOutlineTaskCancelToken[_tindex2] = null
  20828. return;
  20829. }
  20830. let _allText = "";
  20831. let _mdText = "";
  20832. let _iindex = 0
  20833. this.isOutlineTaskCancelSource[_tindex2].onmessage = _e => {
  20834. let _eData = JSON.parse(_e.data).content;
  20835. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  20836. //对话已经完成
  20837. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  20838. this.isOutlineTaskCancelSource[_tindex2].close();
  20839. this.isOutlineTaskCancelSource[_tindex2] = null;
  20840. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20841. if(!this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 && this.isOutline2){
  20842. this.aiDetail52(this.aiJson['teacherDetail2'], _tindex2)
  20843. }
  20844. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20845. this.ttaskDetailLoading.splice(this.ttaskDetailLoading.indexOf(loading), 1)
  20846. this.isOutlineTaskCancelToken[_tindex2] = null
  20847. return;
  20848. } else {
  20849. _iindex++
  20850. //对话还在继续
  20851. let _text = "";
  20852. _text = _eData.replaceAll("'", "");
  20853. if (_allText == "") {
  20854. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  20855. } else {
  20856. _allText += _text;
  20857. }
  20858. _mdText = _allText + "_";
  20859. _mdText = _mdText.replace(/\\n/g, "\n");
  20860. _mdText = _mdText.replace(/\\/g, "");
  20861. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  20862. //转化返回的回复流数据.
  20863. if(_iindex == 10){
  20864. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 = _mdText;
  20865. _iindex = 0
  20866. }
  20867. if(this.taskDetailLoading.indexOf(loading) !== -1){
  20868. this.taskDetailLoading.splice(this.taskDetailLoading.indexOf(loading), 1)
  20869. }
  20870. // 处理流数据
  20871. }
  20872. // this.$forceUpdate();
  20873. };
  20874. let _this = this
  20875. this.isOutlineTaskCancelSource[_tindex2].onerror = function(event) {
  20876. // 处理错误,可以尝试重新连接
  20877. console.log('EventSource error:', event);
  20878. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20879. _this.taskDetailLoading.splice(_this.taskDetailLoading.indexOf(loading), 1)
  20880. _this.ttaskDetailLoading.splice(_this.ttaskDetailLoading.indexOf(loading), 1)
  20881. _this.isOutlineTaskCancelToken[_tindex2] = null
  20882. _this.isOutlineTaskCancelSource[_tindex2].close();
  20883. _this.isOutlineTaskCancelSource[_tindex2] = null;
  20884. };
  20885. },
  20886. async aiDetail2(msg, index) {
  20887. let _this = this
  20888. const _tindex = 'task-' + index
  20889. const _tindex2 = index
  20890. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  20891. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  20892. if (_this.infoData.length) {
  20893. for (var i = 0; i < _this.infoData.length; i++) {
  20894. if(_this.infoData[i].fileid){
  20895. fileid.push(_this.infoData[i].fileid)
  20896. }else {
  20897. let _fileid = await _this.createFileid(_this.infoData[i].url)
  20898. if(_fileid){
  20899. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  20900. _this.$forceUpdate();
  20901. if(_fileid != 1){
  20902. fileid.push(_fileid)
  20903. }
  20904. }
  20905. }
  20906. }
  20907. }
  20908. let messages = `NOTICE
  20909. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  20910. Language: ${this.getLang()}
  20911. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  20912. Instruction: Based on the context, follow "Format example", write content.
  20913. #Context
  20914. ## 要求
  20915. ${msg}
  20916. ## 参考资料
  20917. 任务名字: ${_this.aiCallBack.task}
  20918. ## 优化信息
  20919. ${_this.aiCallBack.taskDetail}
  20920. # Format example
  20921. 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。`
  20922. _this.taskDetailLoading2.push(_tindex)
  20923. _this.ttaskDetailLoading2.push(_tindex)
  20924. let _uuid = uuidv4();
  20925. // let params = JSON.stringify({
  20926. // // "model": "Chat",
  20927. // model: 'gpt-3.5-turbo',
  20928. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20929. // max_tokens: 4096,
  20930. // top_p: 1,
  20931. // frequency_penalty: 0,
  20932. // presence_penalty: 0,
  20933. // messages: [{
  20934. // content: messages,
  20935. // role: 'user'
  20936. // }],
  20937. // uid: _uuid,
  20938. // mind_map_question: "",
  20939. // })
  20940. let params = {
  20941. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  20942. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ")) : messages.replaceAll('\n', " ")}],
  20943. session_name: _uuid,
  20944. userId: _this.userid,
  20945. uid: _uuid,
  20946. file_ids: fileid.length ? [...fileid] : '',
  20947. model: 'gpt-4o-2024-08-06',
  20948. temperature: this.mode == 3 ? 0.5 : 0.1,
  20949. }
  20950. // let params = JSON.stringify({
  20951. // message: {
  20952. // anthropic_version: "bedrock-2023-05-31",
  20953. // max_tokens: 4096,
  20954. // temperature: this.mode == 3 ? 0.5 : 0.1,
  20955. // top_p: 1,
  20956. // messages: [{
  20957. // "role": "user",
  20958. // "content": messages
  20959. // }] ,
  20960. // },
  20961. // uid: _uuid,
  20962. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  20963. // });
  20964. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  20965. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  20966. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  20967. console.log(response);
  20968. // let data = response.data.FunctionResponse
  20969. // if (data.choices && data.choices.length && data.choices[0].message) {
  20970. // console.log(data.choices[0].message.content);
  20971. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  20972. // _this.$forceUpdate()
  20973. // }
  20974. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  20975. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  20976. } else {
  20977. _this.$message.warning(response.data.FunctionResponse.result);
  20978. }
  20979. }).catch(function (error) {
  20980. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(_tindex), 1)
  20981. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(_tindex), 1)
  20982. if(error && error.message != 'Request canceled by the user.'){
  20983. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20984. }
  20985. console.log(error);
  20986. });
  20987. await _this.aiDetail2getAiContent(_uuid, _tindex, _tindex2)
  20988. },
  20989. aiDetail2getAiContent(_uid, loading, _tindex2) {
  20990. let _source;
  20991. try {
  20992. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20993. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20994. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  20995. } catch(error) {
  20996. console.log('EventSource error:', error);
  20997. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  20998. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  20999. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  21000. return;
  21001. }
  21002. let _allText = "";
  21003. let _mdText = "";
  21004. let _iindex = 0
  21005. _source.onmessage = _e => {
  21006. let _eData = JSON.parse(_e.data).content;
  21007. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21008. //对话已经完成
  21009. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21010. _source.close();
  21011. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  21012. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  21013. this.ttaskDetailLoading2.splice(this.ttaskDetailLoading2.indexOf(loading), 1)
  21014. return;
  21015. } else {
  21016. _iindex++
  21017. //对话还在继续
  21018. let _text = "";
  21019. _text = _eData.replaceAll("'", "");
  21020. if (_allText == "") {
  21021. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21022. } else {
  21023. _allText += _text;
  21024. }
  21025. _mdText = _allText + "_";
  21026. _mdText = _mdText.replace(/\\n/g, "\n");
  21027. _mdText = _mdText.replace(/\\/g, "");
  21028. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21029. //转化返回的回复流数据
  21030. if(_iindex == 10){
  21031. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = _mdText;
  21032. _iindex = 0
  21033. }
  21034. this.taskDetailLoading2.splice(this.taskDetailLoading2.indexOf(loading), 1)
  21035. // 处理流数据
  21036. }
  21037. // this.$forceUpdate();
  21038. };
  21039. let _this = this
  21040. _source.onerror = function(event) {
  21041. // 处理错误,可以尝试重新连接
  21042. console.log('EventSource error:', event);
  21043. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21044. _this.taskDetailLoading2.splice(_this.taskDetailLoading2.indexOf(loading), 1)
  21045. _this.ttaskDetailLoading2.splice(_this.ttaskDetailLoading2.indexOf(loading), 1)
  21046. _source.close();
  21047. };
  21048. },
  21049. async aiDetail3(msg, index, tindex) {
  21050. let _this = this
  21051. const _tindex = 'task-' + index + tindex
  21052. const _tindex2 = index
  21053. const _tindex3 = tindex
  21054. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21055. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21056. if (_this.infoData.length) {
  21057. for (var i = 0; i < _this.infoData.length; i++) {
  21058. if(_this.infoData[i].fileid){
  21059. fileid.push(_this.infoData[i].fileid)
  21060. }else {
  21061. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21062. if(_fileid){
  21063. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21064. _this.$forceUpdate();
  21065. if(_fileid != 1){
  21066. fileid.push(_fileid)
  21067. }
  21068. }
  21069. }
  21070. }
  21071. }
  21072. // **重点考虑该任务及工具名和工具内容的情况下*
  21073. let messages = `NOTICE
  21074. Role: 你是一名老师,可以给与学生的指示,对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写,内容不要以markdown形式出现,只需要口语化的形式。
  21075. Language: ${this.getLang()}
  21076. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  21077. Instruction: Based on the context, follow "Format example", write content.
  21078. #Context
  21079. ## 参考内容
  21080. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21081. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  21082. 工具名称:${_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 : '无'}
  21083. 工具内容:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail}
  21084. ## 要求
  21085. ${msg} 输出格式和内容要求参考#格式与要求
  21086. # Format example
  21087. 工具指引:以友好,明确的口吻告诉学生该如何使用该工具,不要不要以markdown形式出现,只需要口语化的形式`
  21088. _this.taskDetailLoading3.push(_tindex)
  21089. _this.ttaskDetailLoading3.push(_tindex)
  21090. let _uuid = uuidv4();
  21091. // let params = JSON.stringify({
  21092. // // "model": "Chat",
  21093. // model: 'gpt-3.5-turbo',
  21094. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21095. // max_tokens: 4096,
  21096. // top_p: 1,
  21097. // frequency_penalty: 0,
  21098. // presence_penalty: 0,
  21099. // messages: [{
  21100. // content: messages,
  21101. // role: 'user'
  21102. // }],
  21103. // uid: _uuid,
  21104. // mind_map_question: "",
  21105. // })
  21106. let params = {
  21107. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21108. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21109. session_name: _uuid,
  21110. userId: _this.userid,
  21111. uid: _uuid,
  21112. file_ids: fileid.length ? [...fileid] : '',
  21113. model: 'gpt-4o-2024-08-06',
  21114. temperature: this.mode == 3 ? 0.5 : 0.1,
  21115. }
  21116. // let params = JSON.stringify({
  21117. // message: {
  21118. // anthropic_version: "bedrock-2023-05-31",
  21119. // max_tokens: 4096,
  21120. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21121. // top_p: 1,
  21122. // messages: [{
  21123. // "role": "user",
  21124. // "content": messages
  21125. // }] ,
  21126. // },
  21127. // uid: _uuid,
  21128. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21129. // });
  21130. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21131. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21132. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21133. console.log(response);
  21134. let data = response.data.FunctionResponse
  21135. // if (data.choices && data.choices.length && data.choices[0].message) {
  21136. // console.log(data.choices[0].message.content);
  21137. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = data.choices[0].message.content
  21138. // _this.$forceUpdate()
  21139. // }
  21140. // _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  21141. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21142. } else {
  21143. _this.$message.warning(response.data.FunctionResponse.result);
  21144. }
  21145. }).catch(function (error) {
  21146. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(_tindex), 1)
  21147. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(_tindex), 1)
  21148. if(error && error.message != 'Request canceled by the user.'){
  21149. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21150. }
  21151. console.log(error);
  21152. });
  21153. await _this.aiDetail3getAiContent(_uuid, _tindex, _tindex2, _tindex3)
  21154. },
  21155. aiDetail3getAiContent(_uid, loading, _tindex2, _tindex3) {
  21156. let _source;
  21157. try {
  21158. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21159. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21160. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21161. } catch(error) {
  21162. console.log('EventSource error:', event);
  21163. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21164. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  21165. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  21166. return;
  21167. }
  21168. let _allText = "";
  21169. let _mdText = "";
  21170. let _iindex = 0
  21171. _source.onmessage = _e => {
  21172. let _eData = JSON.parse(_e.data).content;
  21173. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21174. //对话已经完成
  21175. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21176. _source.close();
  21177. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  21178. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  21179. this.ttaskDetailLoading3.splice(this.ttaskDetailLoading3.indexOf(loading), 1)
  21180. return;
  21181. } else {
  21182. _iindex++
  21183. //对话还在继续
  21184. let _text = "";
  21185. _text = _eData.replaceAll("'", "");
  21186. if (_allText == "") {
  21187. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21188. } else {
  21189. _allText += _text;
  21190. }
  21191. _mdText = _allText + "_";
  21192. _mdText = _mdText.replace(/\\n/g, "\n");
  21193. _mdText = _mdText.replace(/\\/g, "");
  21194. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21195. //转化返回的回复流数据
  21196. if(_iindex == 10){
  21197. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].toolChoose[_tindex3].toolDetail = _mdText;
  21198. _iindex = 0
  21199. }
  21200. this.taskDetailLoading3.splice(this.taskDetailLoading3.indexOf(loading), 1)
  21201. // 处理流数据
  21202. }
  21203. // this.$forceUpdate();
  21204. };
  21205. let _this = this
  21206. _source.onerror = function(event) {
  21207. // 处理错误,可以尝试重新连接
  21208. console.log('EventSource error:', event);
  21209. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21210. _this.taskDetailLoading3.splice(_this.taskDetailLoading3.indexOf(loading), 1)
  21211. _this.ttaskDetailLoading3.splice(_this.ttaskDetailLoading3.indexOf(loading), 1)
  21212. _source.close();
  21213. };
  21214. },
  21215. async aiDetail4(msg, index) {
  21216. if (!msg.length) {
  21217. this.$message.error("请添加评价后才能优化")
  21218. return
  21219. }
  21220. let _this = this
  21221. const _tindex = 'task-' + index
  21222. const _tindex2 = index
  21223. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21224. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21225. if (_this.infoData.length) {
  21226. for (var i = 0; i < _this.infoData.length; i++) {
  21227. if(_this.infoData[i].fileid){
  21228. fileid.push(_this.infoData[i].fileid)
  21229. }else {
  21230. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21231. if(_fileid){
  21232. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21233. _this.$forceUpdate();
  21234. if(_fileid != 1){
  21235. fileid.push(_fileid)
  21236. }
  21237. }
  21238. }
  21239. }
  21240. }
  21241. if (_this.pingjiaInfoData[index] && _this.pingjiaInfoData[index].length) {
  21242. for (var i = 0; i < _this.pingjiaInfoData[index].length; i++) {
  21243. if(_this.pingjiaInfoData[index][i].fileid){
  21244. fileid.push(_this.pingjiaInfoData[index][i].fileid)
  21245. }
  21246. }
  21247. }
  21248. var _text = ""
  21249. if(_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList && _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length){
  21250. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList.length; i++) {
  21251. // _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 : ''} `
  21252. _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 : ''} `
  21253. }
  21254. }
  21255. // -评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
  21256. // **重点考虑该任务详情**
  21257. // let messages = `
  21258. // Language: ${this.getLang()}
  21259. // ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  21260. // #Context
  21261. // ## 参考内容
  21262. // 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21263. // 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  21264. // 评价设计:${_text}
  21265. // 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21266. // ## 要求
  21267. // ${msg} 优化评价维度和维度描述,输出格式和内容要求参考# 格式与要求
  21268. // # 格式与要求
  21269. // 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,维度描述,评价目标,以及评价目标是根据教学任务教案提取关于这个评价维度的目标,还有该维度中教师期待学生的表现,维度描述的句式为学生应该能....
  21270. // # Format example
  21271. // [{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5},{"value":"评价维度","detail":"维度描述",target:"评价目标","score":5}]`
  21272. let messages = `
  21273. Language: ${this.getLang()}
  21274. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  21275. #Context
  21276. ## 参考内容
  21277. 任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21278. 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail}
  21279. ${_text ? '评价设计:'+_text : ''}
  21280. 教学任务教案:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
  21281. ## 要求
  21282. ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求参考# 格式与要求
  21283. # 格式与要求
  21284. 核心素养:从教案中提取
  21285. 目标:从教案中提取
  21286. 评价标准:从教案中提取评价标准
  21287. # Format example
  21288. [{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]`
  21289. _this.taskDetailLoading4.push(_tindex)
  21290. // let params = JSON.stringify({
  21291. // // "model": "Chat",
  21292. // model: 'gpt-3.5-turbo',
  21293. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21294. // max_tokens: 4096,
  21295. // top_p: 1,
  21296. // frequency_penalty: 0,
  21297. // presence_penalty: 0,
  21298. // messages: [{
  21299. // content: messages,
  21300. // role: 'user'
  21301. // }],
  21302. // stream: false,
  21303. // uid: this.userid,
  21304. // mind_map_question: "",
  21305. // })
  21306. let params = {
  21307. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  21308. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21309. session_name: uuidv4(),
  21310. userId: _this.userid,
  21311. file_ids: fileid.length ? [...fileid] : '',
  21312. model: 'gpt-4o-2024-08-06',
  21313. temperature: this.mode == 3 ? 0.5 : 0.1,
  21314. }
  21315. // let params = JSON.stringify({
  21316. // message: {
  21317. // anthropic_version: "bedrock-2023-05-31",
  21318. // max_tokens: 4096,
  21319. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21320. // top_p: 1,
  21321. // messages: [{
  21322. // content: messages,
  21323. // role: 'user'
  21324. // }], //
  21325. // },
  21326. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21327. // });
  21328. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21329. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params).then(function (response) {
  21330. // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  21331. console.log(response);
  21332. let data = response.data.FunctionResponse
  21333. // if (data.choices && data.choices.length && data.choices[0].message) {
  21334. // console.log(data.choices[0].message.content);
  21335. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  21336. // _this.$forceUpdate()
  21337. // }
  21338. if (data.message) {
  21339. console.log(data.message);
  21340. try {
  21341. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.message.replaceAll("```json", "").replaceAll("```", ""))
  21342. } catch (e) {
  21343. console.log("error_________________" + e);
  21344. // _this.$message.error(data.message)
  21345. try {
  21346. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  21347. let match = data.message.match(regex);
  21348. let elist = JSON.parse(match[0])
  21349. elist = elist.filter(el=>{
  21350. el.isai = 1
  21351. return el
  21352. })
  21353. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = elist;
  21354. // var message = data.message;
  21355. // var jsonStart = message.indexOf("```json") + 7; // `+ 7` 是为了跳过 ```json
  21356. // var jsonEnd = message.indexOf("```", jsonStart);
  21357. // if (jsonStart !== -1 && jsonEnd !== -1) {
  21358. // var jsonString = message
  21359. // .substring(jsonStart, jsonEnd)
  21360. // .trim();
  21361. // var _data2 = JSON.parse(jsonString);
  21362. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = _data2
  21363. // }
  21364. } catch (error) {
  21365. }
  21366. }
  21367. _this.$forceUpdate()
  21368. }
  21369. // if (data.result) {
  21370. // console.log(data.result);
  21371. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.result)
  21372. // _this.$forceUpdate()
  21373. // }
  21374. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21375. }).catch(function (error) {
  21376. _this.taskDetailLoading4.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21377. if(error && error.message != 'Request canceled by the user.'){
  21378. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21379. }
  21380. console.log(error);
  21381. });
  21382. },
  21383. async aiDetail5(msg, index) {
  21384. let _this = this
  21385. const _tindex = 'task-' + index
  21386. const _tindex2 = index
  21387. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21388. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21389. if (_this.infoData.length) {
  21390. for (var i = 0; i < _this.infoData.length; i++) {
  21391. if(_this.infoData[i].fileid){
  21392. fileid.push(_this.infoData[i].fileid)
  21393. }else {
  21394. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21395. if(_fileid){
  21396. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21397. _this.$forceUpdate();
  21398. if(_fileid != 1){
  21399. fileid.push(_fileid)
  21400. }
  21401. }
  21402. }
  21403. }
  21404. }
  21405. let url = []
  21406. if (this.infoData.length) {
  21407. for (var i = 0; i < this.infoData.length; i++) {
  21408. url.push(this.infoData[i].url)
  21409. }
  21410. }
  21411. var _text = ""
  21412. var _text2 = ""
  21413. for (var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++) {
  21414. _text += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 任务描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  21415. _text2 += `任务名称:${_this.unitJson[0].chapterInfo[0].taskJson[i].task} 教案描述:${_this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')} \n`
  21416. }
  21417. let messages = `
  21418. Language: ${this.getLang()}
  21419. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'.Output format carefully referenced "Format example".
  21420. --------
  21421. ## 要求
  21422. ${msg}
  21423. -------
  21424. ## 本教案描述
  21425. ${_this.aiCallBack}
  21426. -------
  21427. ## 课程大纲
  21428. ${_text}
  21429. -------
  21430. ## 其他教学任务教案
  21431. ${_text2}`
  21432. // ## 补充参考资料
  21433. // - 补充资料:${url.join(",")}
  21434. // - 补充描述:${this.courseText2}
  21435. _this.taskDetailLoading5.push(_tindex)
  21436. _this.ttaskDetailLoading5.push(_tindex)
  21437. let _uuid = uuidv4();
  21438. // let params = JSON.stringify({
  21439. // // "model": "Chat",
  21440. // model: 'gpt-3.5-turbo',
  21441. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21442. // max_tokens: 4096,
  21443. // top_p: 1,
  21444. // frequency_penalty: 0,
  21445. // presence_penalty: 0,
  21446. // messages: [{
  21447. // content: messages,
  21448. // role: 'user'
  21449. // }],
  21450. // uid: _uuid,
  21451. // mind_map_question: "",
  21452. // })
  21453. let params = {
  21454. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21455. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21456. session_name: _uuid,
  21457. userId: _this.userid,
  21458. uid: _uuid,
  21459. file_ids: fileid.length ? [...fileid] : '',
  21460. model: 'gpt-4o-2024-08-06',
  21461. temperature: this.mode == 3 ? 0.5 : 0.1,
  21462. }
  21463. // let params = JSON.stringify({
  21464. // message: {
  21465. // anthropic_version: "bedrock-2023-05-31",
  21466. // max_tokens: 4096,
  21467. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21468. // top_p: 1,
  21469. // messages: [{
  21470. // "role": "user",
  21471. // "content": messages
  21472. // }] ,
  21473. // },
  21474. // uid: _uuid,
  21475. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21476. // });
  21477. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21478. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21479. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21480. console.log(response);
  21481. // let data = response.data.FunctionResponse
  21482. // if (data.choices && data.choices.length && data.choices[0].message) {
  21483. // console.log(data.choices[0].message.content);
  21484. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21485. // _this.$forceUpdate()
  21486. // }
  21487. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21488. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21489. } else {
  21490. _this.$message.warning(response.data.FunctionResponse.result);
  21491. }
  21492. }).catch(function (error) {
  21493. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  21494. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21495. }
  21496. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  21497. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21498. }
  21499. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21500. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21501. if(error && error.message != 'Request canceled by the user.'){
  21502. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21503. }
  21504. console.log(error);
  21505. });
  21506. await _this.aiDetail5getAiContent(_uuid, _tindex, _tindex2)
  21507. },
  21508. aiDetail5getAiContent(_uid, loading, _tindex2) {
  21509. let _source;
  21510. try {
  21511. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21512. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21513. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21514. } catch(error){
  21515. console.log('EventSource error:', error);
  21516. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21517. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21518. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21519. }
  21520. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21521. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21522. }
  21523. // this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21524. // this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21525. return;
  21526. }
  21527. let _allText = "";
  21528. let _mdText = "";
  21529. let _iindex = 0
  21530. _source.onmessage = _e => {
  21531. let _eData = JSON.parse(_e.data).content;
  21532. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21533. //对话已经完成
  21534. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21535. _source.close();
  21536. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21537. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21538. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21539. }
  21540. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21541. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21542. }
  21543. return;
  21544. } else {
  21545. _iindex++
  21546. //对话还在继续
  21547. let _text = "";
  21548. _text = _eData.replaceAll("'", "");
  21549. if (_allText == "") {
  21550. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21551. } else {
  21552. _allText += _text;
  21553. }
  21554. _mdText = _allText + "_";
  21555. _mdText = _mdText.replace(/\\n/g, "\n");
  21556. _mdText = _mdText.replace(/\\/g, "");
  21557. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21558. //转化返回的回复流数据
  21559. if(_iindex == 10){
  21560. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21561. _iindex = 0
  21562. }
  21563. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  21564. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21565. }
  21566. // 处理流数据
  21567. }
  21568. // this.$forceUpdate();
  21569. };
  21570. let _this = this
  21571. _source.onerror = function(event) {
  21572. // 处理错误,可以尝试重新连接
  21573. console.log('EventSource error:', event);
  21574. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21575. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  21576. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  21577. }
  21578. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  21579. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  21580. }
  21581. _source.close();
  21582. };
  21583. },
  21584. async aiDetail52(msg, index, callback) {
  21585. let _this = this
  21586. const _tindex = 'task-' + index
  21587. const _tindex2 = index
  21588. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21589. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21590. if (_this.infoData.length) {
  21591. for (var i = 0; i < _this.infoData.length; i++) {
  21592. if(_this.infoData[i].fileid){
  21593. fileid.push(_this.infoData[i].fileid)
  21594. }else {
  21595. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21596. if(_fileid){
  21597. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21598. _this.$forceUpdate();
  21599. if(_fileid != 1){
  21600. fileid.push(_fileid)
  21601. }
  21602. }
  21603. }
  21604. }
  21605. }
  21606. let url = []
  21607. if (this.infoData.length) {
  21608. for (var i = 0; i < this.infoData.length; i++) {
  21609. url.push(this.infoData[i].url)
  21610. }
  21611. }
  21612. let taskN = []
  21613. let taskD = []
  21614. for(var ti = 0; ti < _this.unitJson[0].chapterInfo[0].taskJson.length; ti++){
  21615. if(_tindex2 != ti){
  21616. taskN.push("任务"+(ti+1)+":"+_this.unitJson[0].chapterInfo[0].taskJson[ti].task)
  21617. taskD.push("任务"+(ti+1)+"描述:"+_this.unitJson[0].chapterInfo[0].taskJson[ti].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n',''))
  21618. }
  21619. }
  21620. let messages = `NOTICE
  21621. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  21622. Language: ${this.getLang()}
  21623. ATTENTION: follow "Language"
  21624. #Context
  21625. ## 要求
  21626. ${msg}
  21627. ## 补充描述
  21628. 课程简要描述:${_this.courseText}
  21629. 任务名:${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].task}
  21630. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务名:${taskN.join(",")}`}
  21631. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? 'index:'+(_tindex2+1) : ''}
  21632. ${_this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2 ? '任务描述:' + _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail2.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21633. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '' : `其他大纲的任务描述:${taskD.join("\n")}`}
  21634. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#目标层:'+_this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21635. ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templateid == "cf5722a4-401b-11ef-b873-005056b86dc3") ? '#任务簇:'+_this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21636. `
  21637. // ## 补充参考资料
  21638. // - 补充资料:${url.join(",")}
  21639. // - 补充描述:${this.courseText2}
  21640. if(_this.taskDetailLoading5.indexOf(_tindex) === -1){
  21641. _this.taskDetailLoading5.push(_tindex)
  21642. }
  21643. if(_this.ttaskDetailLoading5.indexOf(_tindex) === -1){
  21644. _this.ttaskDetailLoading5.push(_tindex)
  21645. }
  21646. _this.isTeacherTaskCancelToken2[index] = _this.ajax.setCancelSource();
  21647. let _uuid = uuidv4();
  21648. // let params = JSON.stringify({
  21649. // // "model": "Chat",
  21650. // model: 'gpt-3.5-turbo',
  21651. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21652. // max_tokens: 4096,
  21653. // top_p: 1,
  21654. // frequency_penalty: 0,
  21655. // presence_penalty: 0,
  21656. // messages: [{
  21657. // content: messages,
  21658. // role: 'user'
  21659. // }],
  21660. // uid: _uuid,
  21661. // mind_map_question: "",
  21662. // })
  21663. let params = {
  21664. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21665. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21666. session_name: _uuid,
  21667. userId: _this.userid,
  21668. uid: _uuid,
  21669. file_ids: fileid.length ? [...fileid] : '',
  21670. model: 'gpt-4o-2024-08-06',
  21671. temperature: this.mode == 3 ? 0.5 : 0.1,
  21672. }
  21673. // let params = JSON.stringify({
  21674. // message: {
  21675. // anthropic_version: "bedrock-2023-05-31",
  21676. // max_tokens: 4096,
  21677. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21678. // top_p: 1,
  21679. // messages: [{
  21680. // "role": "user",
  21681. // "content": messages
  21682. // }] ,
  21683. // },
  21684. // uid: _uuid,
  21685. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21686. // });
  21687. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21688. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTaskCancelToken2[index]).then(function (response) {
  21689. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21690. console.log(response);
  21691. // let data = response.data.FunctionResponse
  21692. // if (data.choices && data.choices.length && data.choices[0].message) {
  21693. // console.log(data.choices[0].message.content);
  21694. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21695. // _this.$forceUpdate()
  21696. // }
  21697. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21698. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21699. _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].isTask3 = false
  21700. } else {
  21701. _this.$message.warning(response.data.FunctionResponse.result);
  21702. }
  21703. _this.isTeacherTaskCancelToken2[index] = null
  21704. }).catch(function (error) {
  21705. if(error && error.message != 'Request canceled by the user.'){
  21706. _this.isTeacherTaskCancelToken2[index] = null
  21707. if(_this.taskDetailLoading5.indexOf(_tindex) != -1){
  21708. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21709. }
  21710. if(_this.ttaskDetailLoading5.indexOf(_tindex) != -1){
  21711. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21712. }
  21713. // _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(_tindex), 1)
  21714. // _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(_tindex), 1)
  21715. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21716. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21717. confirmButtonText: "确定",
  21718. cancelButtonText: "取消",
  21719. distinguishCancelAndClose: true,
  21720. type: "warning",
  21721. customClass: 'custom-confirm-box'
  21722. })
  21723. .then(() => {
  21724. _this.aiDetail52(msg, index, callback)
  21725. }).catch((v) => {
  21726. console.log(v);
  21727. callback ? callback() : ''
  21728. })
  21729. setTimeout(() => {
  21730. _this.setTipsIndex()
  21731. }, 500)
  21732. }
  21733. console.log(error);
  21734. });
  21735. await _this.aiDetail52getAiContent(_uuid, _tindex, _tindex2, callback, msg)
  21736. },
  21737. aiDetail52getAiContent(_uid, loading, _tindex2, callback, msg) {
  21738. try {
  21739. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21740. this.isTeacherTaskCancelSource[_tindex2] = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21741. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  21742. } catch(error) {
  21743. console.log('EventSource error:', error);
  21744. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21745. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21746. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21747. }
  21748. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21749. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21750. }
  21751. this.isTeacherTaskCancelToken2[_tindex2] = null
  21752. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21753. confirmButtonText: "确定",
  21754. cancelButtonText: "取消",
  21755. distinguishCancelAndClose: true,
  21756. type: "warning",
  21757. customClass: 'custom-confirm-box'
  21758. })
  21759. .then(() => {
  21760. _this.aiDetail52(msg, _tindex2, callback)
  21761. }).catch((v) => {
  21762. console.log(v);
  21763. callback ? callback() : ''
  21764. })
  21765. setTimeout(() => {
  21766. _this.setTipsIndex()
  21767. }, 500)
  21768. return;
  21769. }
  21770. let _allText = "";
  21771. let _mdText = "";
  21772. this.allTextArray[_tindex2] = ""
  21773. let _iindex = 0
  21774. this.isTeacherTaskCancelSource[_tindex2].onmessage = async (_e) => {
  21775. // await _this.aiDetail52getAiContentText(_e, loading, _tindex2, _source)
  21776. let _eData = JSON.parse(_e.data).content;
  21777. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21778. //对话已经完成
  21779. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21780. this.isTeacherTaskCancelSource[_tindex2].close();
  21781. this.isTeacherTaskCancelSource[_tindex2] = null;
  21782. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21783. if(this.taskDetailLoading5.indexOf(loading) != -1){
  21784. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21785. }
  21786. if(this.ttaskDetailLoading5.indexOf(loading) != -1){
  21787. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21788. }
  21789. this.isTeacherTaskCancelToken2[_tindex2] = null
  21790. callback ? callback() : ''
  21791. return;
  21792. } else {
  21793. _iindex++
  21794. //对话还在继续
  21795. let _text = "";
  21796. _text = _eData.replaceAll("'", "");
  21797. if (_allText == "") {
  21798. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21799. } else {
  21800. _allText += _text;
  21801. }
  21802. _mdText = _allText + "_";
  21803. _mdText = _mdText.replace(/\\n/g, "\n");
  21804. _mdText = _mdText.replace(/\\/g, "");
  21805. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  21806. //转化返回的回复流数据
  21807. if(_iindex == 10){
  21808. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText;
  21809. _iindex = 0
  21810. }
  21811. if(this.taskDetailLoading5.indexOf(loading) !== -1){
  21812. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21813. }
  21814. // 处理流数据
  21815. }
  21816. };
  21817. let _this = this
  21818. _this.isTeacherTaskCancelSource.onerror = function(event) {
  21819. // 处理错误,可以尝试重新连接
  21820. console.log('EventSource error:', event);
  21821. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  21822. if(_this.taskDetailLoading5.indexOf(loading) != -1){
  21823. _this.taskDetailLoading5.splice(_this.taskDetailLoading5.indexOf(loading), 1)
  21824. }
  21825. if(_this.ttaskDetailLoading5.indexOf(loading) != -1){
  21826. _this.ttaskDetailLoading5.splice(_this.ttaskDetailLoading5.indexOf(loading), 1)
  21827. }
  21828. _this.isTeacherTaskCancelSource[_tindex2].close();
  21829. _this.isTeacherTaskCancelSource[_tindex2] = null;
  21830. _this.isTeacherTaskCancelToken2[_tindex2] = null
  21831. _this.$confirm("本任务的教案生成失败是否重新生成,取消则自动生成下一个任务!", "提示", {
  21832. confirmButtonText: "确定",
  21833. cancelButtonText: "取消",
  21834. distinguishCancelAndClose: true,
  21835. type: "warning",
  21836. customClass: 'custom-confirm-box'
  21837. })
  21838. .then(() => {
  21839. _this.aiDetail52(msg, _tindex2, callback)
  21840. }).catch((v) => {
  21841. console.log(v);
  21842. callback ? callback() : ''
  21843. })
  21844. setTimeout(() => {
  21845. _this.setTipsIndex()
  21846. }, 500)
  21847. };
  21848. },
  21849. aiDetail52getAiContentText(_e, loading, _tindex2, _source){
  21850. let _mdText = "";
  21851. let _eData = JSON.parse(_e.data).content;
  21852. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  21853. //对话已经完成
  21854. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = this.allTextArray[_tindex2].replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  21855. _source.close();
  21856. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21857. this.ttaskDetailLoading5.splice(this.ttaskDetailLoading5.indexOf(loading), 1)
  21858. return;
  21859. } else {
  21860. //对话还在继续
  21861. let _text = "";
  21862. _text = _eData.replaceAll("'", "");
  21863. if (this.allTextArray[_tindex2] == "") {
  21864. this.allTextArray[_tindex2] = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  21865. } else {
  21866. this.allTextArray[_tindex2] += _text;
  21867. }
  21868. _mdText = this.allTextArray[_tindex2] + "_";
  21869. _mdText = this.allTextArray[_tindex2].replace(/\\n/g, "\n");
  21870. _mdText = this.allTextArray[_tindex2].replace(/\\/g, "");
  21871. if (this.allTextArray[_tindex2].split("```").length % 2 == 0) _mdText += "\n```\n";
  21872. this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail3 = _mdText
  21873. this.taskDetailLoading5.splice(this.taskDetailLoading5.indexOf(loading), 1)
  21874. // 处理流数据
  21875. }
  21876. },
  21877. async aiCpote(msg, callback) {
  21878. let _this = this
  21879. let _index = _this.aitype.replace("aiC","c")
  21880. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  21881. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  21882. if (_this.infoData.length) {
  21883. for (var i = 0; i < _this.infoData.length; i++) {
  21884. if(_this.infoData[i].fileid){
  21885. fileid.push(_this.infoData[i].fileid)
  21886. }else {
  21887. let _fileid = await _this.createFileid(_this.infoData[i].url)
  21888. if(_fileid){
  21889. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  21890. _this.$forceUpdate();
  21891. if(_fileid != 1){
  21892. fileid.push(_fileid)
  21893. }
  21894. }
  21895. }
  21896. }
  21897. }
  21898. let sub = []
  21899. if (this.courseTypeId.length) {
  21900. for (var i = 0; i < this.courseTypeId.length; i++) {
  21901. let _sid = this.courseTypeId[i]
  21902. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21903. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  21904. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  21905. }
  21906. }
  21907. }
  21908. }
  21909. let mclass = []
  21910. if (this.courseTypeId.length) {
  21911. for (var i = 0; i < this.courseTypeId.length; i++) {
  21912. let _sid = this.courseTypeId[i]
  21913. for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  21914. if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  21915. mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  21916. }
  21917. }
  21918. }
  21919. }
  21920. // ${this.getListClassC(this.checkboxList2) ? '班级:' + this.getListClassC(this.checkboxList2) : "无"}
  21921. // ${this.cpote[_index] ? '## 优化内容\n'+this.cpote[_index] : ''}
  21922. let courseText = this.courseText ? this.courseText : this.teacherCourseText
  21923. let target = this.targetCourseText2 ? this.targetCourseText2 : this.targetcoursetext
  21924. let messages = `NOTICE
  21925. Role: 你是创建课程的老师,可以利用file_search的方式完整的去分析文件内容(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)
  21926. Language: ${this.getLang()}
  21927. ATTENTION: follow "Language"
  21928. ${msg}
  21929. ## 课程简介
  21930. 课程名字:${this.courseName}
  21931. ${courseText ? '课程简要描述:' + courseText.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21932. ${sub.length ? '学科:' + sub.join(",") : ''}
  21933. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  21934. ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
  21935. ${this.aitype == 'aiCpote2' || this.aitype == 'aiCpote3' || this.aitype == 'aiCpote4' ? '## 概念群\n'+this.cpote['cpote1'] : ''}
  21936. ${this.aitype == 'aiCpote4' ? '## 问题链\n'+this.cpote['cpote2'] : ''}
  21937. ${this.aitype == 'aiCpote4' ? '## 目标层\n'+this.cpote['cpote3'] : ''}`
  21938. _this.cpoteLoading[_index] = true
  21939. _this.cpotetLoading[_index] = true
  21940. let _uuid = uuidv4();
  21941. // let params = JSON.stringify({
  21942. // // "model": "Chat",
  21943. // model: 'gpt-3.5-turbo',
  21944. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21945. // max_tokens: 4096,
  21946. // top_p: 1,
  21947. // frequency_penalty: 0,
  21948. // presence_penalty: 0,
  21949. // messages: [{
  21950. // content: messages,
  21951. // role: 'user'
  21952. // }],
  21953. // uid: _uuid,
  21954. // mind_map_question: "",
  21955. // })
  21956. let params = {
  21957. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  21958. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  21959. session_name: _uuid,
  21960. userId: _this.userid,
  21961. uid: _uuid,
  21962. file_ids: fileid.length ? [...fileid] : '',
  21963. model: 'gpt-4o-2024-08-06',
  21964. temperature: this.mode == 3 ? 0.5 : 0.1,
  21965. }
  21966. // let params = JSON.stringify({
  21967. // message: {
  21968. // anthropic_version: "bedrock-2023-05-31",
  21969. // max_tokens: 4096,
  21970. // temperature: this.mode == 3 ? 0.5 : 0.1,
  21971. // top_p: 1,
  21972. // messages: [{
  21973. // "role": "user",
  21974. // "content": messages
  21975. // }] ,
  21976. // },
  21977. // uid: _uuid,
  21978. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  21979. // });
  21980. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  21981. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params).then(function (response) {
  21982. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  21983. console.log(response);
  21984. // let data = response.data.FunctionResponse
  21985. // if (data.choices && data.choices.length && data.choices[0].message) {
  21986. // console.log(data.choices[0].message.content);
  21987. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].taskDetail = data.choices[0].message.content
  21988. // _this.$forceUpdate()
  21989. // }
  21990. // _this.taskDetailLoading2.splice(_this.taskDetailLoading.indexOf(_tindex), 1)
  21991. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  21992. } else {
  21993. _this.$message.warning(response.data.FunctionResponse.result);
  21994. }
  21995. }).catch(function (error) {
  21996. _this.cpoteLoading[_index] = false
  21997. _this.cpotetLoading[_index] = false
  21998. callback ? callback() : ''
  21999. if(error && error.message != 'Request canceled by the user.'){
  22000. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22001. }
  22002. console.log(error);
  22003. });
  22004. await _this.aiCpotegetAiContent(_uuid, _index, callback)
  22005. },
  22006. aiCpotegetAiContent(_uid, loading, callback) {
  22007. let _source;
  22008. try {
  22009. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22010. _source = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22011. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22012. } catch(error){
  22013. console.log('EventSource error:', error);
  22014. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22015. this.cpoteLoading[loading] = false
  22016. this.cpotetLoading[loading] = false
  22017. return;
  22018. }
  22019. let _allText = "";
  22020. let _mdText = "";
  22021. let _iindex = 0
  22022. _source.onmessage = _e => {
  22023. let _eData = JSON.parse(_e.data).content;
  22024. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22025. //对话已经完成
  22026. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22027. _source.close();
  22028. this.cpote[loading] = _mdText;
  22029. this.cpoteLoading[loading] = false
  22030. this.cpotetLoading[loading] = false
  22031. callback ? callback() : ''
  22032. return;
  22033. } else {
  22034. _iindex++
  22035. //对话还在继续
  22036. let _text = "";
  22037. _text = _eData.replaceAll("'", "");
  22038. if (_allText == "") {
  22039. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22040. } else {
  22041. _allText += _text;
  22042. }
  22043. _mdText = _allText + "_";
  22044. _mdText = _mdText.replace(/\\n/g, "\n");
  22045. _mdText = _mdText.replace(/\\/g, "");
  22046. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22047. //转化返回的回复流数据
  22048. if(_iindex == 10){
  22049. this.cpote[loading] = _mdText;
  22050. _iindex = 0
  22051. }
  22052. this.cpoteLoading[loading] = false
  22053. // 处理流数据
  22054. }
  22055. // this.$forceUpdate();
  22056. };
  22057. let _this = this
  22058. _source.onerror = function(event) {
  22059. // 处理错误,可以尝试重新连接
  22060. console.log('EventSource error:', event);
  22061. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22062. _this.cpoteLoading[loading] = false
  22063. _this.cpotetLoading[loading] = false
  22064. _source.close();
  22065. };
  22066. },
  22067. async aiteacherTextDetail(msg) {
  22068. let _this = this
  22069. let fileid = []
  22070. if (_this.teacherInfoData.length) {
  22071. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  22072. if(_this.teacherInfoData[i].fileid){
  22073. fileid.push(_this.teacherInfoData[i].fileid)
  22074. }else {
  22075. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  22076. if(_fileid){
  22077. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22078. _this.$forceUpdate();
  22079. if(_fileid != 1){
  22080. fileid.push(_fileid)
  22081. }
  22082. }
  22083. }
  22084. }
  22085. }
  22086. _this.teacherTextLoading = true
  22087. _this.tteacherTextLoading = true
  22088. let sub = []
  22089. if (_this.courseTypeId.length) {
  22090. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22091. let _sid = _this.courseTypeId[i]
  22092. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22093. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22094. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22095. }
  22096. }
  22097. }
  22098. }
  22099. let mclass = []
  22100. if (_this.courseTypeId.length) {
  22101. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22102. let _sid = _this.courseTypeId[i]
  22103. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22104. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22105. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22106. }
  22107. }
  22108. }
  22109. }
  22110. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  22111. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  22112. let messages = `NOTICE
  22113. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22114. Language: ${this.getLang()}
  22115. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22116. Instruction: Based on the context, follow "Format example", write content.
  22117. #Context
  22118. ## 参考资料
  22119. 课程名字:${this.courseName}
  22120. ${sub.length ? '学科:' + sub.join(",") : ''}
  22121. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22122. ${this.teacherCourseText && this.aiCallBack == 2 ? '参考内容:'+this.teacherCourseText : ''}
  22123. ## 要求
  22124. ${msg}
  22125. ${this.teacherCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22126. _this.isTeacherTextCancelToken = _this.ajax.setCancelSource();
  22127. let _uuid = uuidv4();
  22128. // let params = JSON.stringify({
  22129. // // "model": "Chat",
  22130. // model: 'gpt-3.5-turbo',
  22131. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22132. // max_tokens: 4096,
  22133. // top_p: 1,
  22134. // frequency_penalty: 0,
  22135. // presence_penalty: 0,
  22136. // messages: [{
  22137. // content: messages,
  22138. // role: 'user'
  22139. // }],
  22140. // uid: _uuid,
  22141. // mind_map_question: "",
  22142. // })
  22143. let params = {
  22144. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22145. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22146. session_name: _uuid,
  22147. userId: _this.userid,
  22148. uid: _uuid,
  22149. file_ids: fileid.length ? [...fileid] : '',
  22150. model: 'gpt-4o-2024-08-06',
  22151. temperature: this.mode == 3 ? 0.5 : 0.1,
  22152. }
  22153. // let params = JSON.stringify({
  22154. // message: {
  22155. // anthropic_version: "bedrock-2023-05-31",
  22156. // max_tokens: 4096,
  22157. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22158. // top_p: 1,
  22159. // messages: [{
  22160. // "role": "user",
  22161. // "content": messages
  22162. // }] ,
  22163. // },
  22164. // uid: _uuid,
  22165. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22166. // });
  22167. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22168. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTeacherTextCancelToken).then(function (response) {
  22169. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22170. console.log(response);
  22171. // let data = response.data.FunctionResponse
  22172. // if (data.choices && data.choices.length && data.choices[0].message) {
  22173. // _this.courseText = data.choices[0].message.content
  22174. // }
  22175. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22176. } else {
  22177. _this.$message.warning(response.data.FunctionResponse.result);
  22178. }
  22179. _this.isTeacherTextCancelToken = null
  22180. }).catch(function (error) {
  22181. _this.teacherTextLoading = false
  22182. _this.tteacherTextLoading = false
  22183. _this.isTeacherTextCancelToken = null
  22184. if(error && error.message != 'Request canceled by the user.'){
  22185. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22186. }
  22187. console.log(error);
  22188. });
  22189. await _this.aiteacherTextDetailgetAiContent(_uuid)
  22190. },
  22191. aiteacherTextDetailgetAiContent(_uid) {
  22192. try {
  22193. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22194. this.isTeacherTextCancelSource = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22195. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22196. } catch(error) {
  22197. console.log('EventSource error:', event);
  22198. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22199. this.teacherTextLoading = false
  22200. this.tteacherTextLoading = false
  22201. this.isTeacherTextCancelToken = null
  22202. return;
  22203. }
  22204. let _allText = "";
  22205. let _mdText = "";
  22206. let _iindex = 0
  22207. this.isTeacherTextCancelSource.onmessage = _e => {
  22208. let _eData = JSON.parse(_e.data).content;
  22209. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22210. //对话已经完成
  22211. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22212. this.isTeacherTextCancelSource.close();
  22213. this.isTeacherTextCancelSource = null;
  22214. this.teacherCourseText = _mdText;
  22215. this.teacherTextLoading = false
  22216. this.tteacherTextLoading = false
  22217. this.teacherCourseTextB = false
  22218. this.isTeacherTextCancelToken = null
  22219. return;
  22220. } else {
  22221. _iindex++
  22222. //对话还在继续
  22223. let _text = "";
  22224. _text = _eData.replaceAll("'", "");
  22225. if (_allText == "") {
  22226. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22227. } else {
  22228. _allText += _text;
  22229. }
  22230. _mdText = _allText + "_";
  22231. _mdText = _mdText.replace(/\\n/g, "\n");
  22232. _mdText = _mdText.replace(/\\/g, "");
  22233. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22234. //转化返回的回复流数据
  22235. if(_iindex == 10){
  22236. this.teacherCourseText = _mdText;
  22237. _iindex = 0
  22238. }
  22239. if(this.teacherTextLoading){
  22240. this.teacherTextLoading = false
  22241. }
  22242. // 处理流数据
  22243. }
  22244. // this.$forceUpdate();
  22245. };
  22246. let _this = this
  22247. this.isTeacherTextCancelSource.onerror = function(event) {
  22248. // 处理错误,可以尝试重新连接
  22249. console.log('EventSource error:', event);
  22250. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22251. _this.teacherTextLoading = false
  22252. _this.tteacherTextLoading = false
  22253. _this.isTeacherTextCancelToken = null
  22254. _this.isTeacherTextCancelSource.close();
  22255. _this.isTeacherTextCancelSource = null;
  22256. };
  22257. },
  22258. async aitargetTextDetail(msg) {
  22259. let _this = this
  22260. let fileid = []
  22261. if (_this.teacherInfoData.length) {
  22262. for (var i = 0; i < _this.teacherInfoData.length; i++) {
  22263. if(_this.teacherInfoData[i].fileid){
  22264. fileid.push(_this.teacherInfoData[i].fileid)
  22265. }else {
  22266. let _fileid = await _this.createFileid(_this.teacherInfoData[i].url)
  22267. if(_fileid){
  22268. _this.teacherInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22269. _this.$forceUpdate();
  22270. if(_fileid != 1){
  22271. fileid.push(_fileid)
  22272. }
  22273. }
  22274. }
  22275. }
  22276. }
  22277. _this.targetTextLoading = true
  22278. _this.ttargetTextLoading = true
  22279. let sub = []
  22280. if (_this.courseTypeId.length) {
  22281. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22282. let _sid = _this.courseTypeId[i]
  22283. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22284. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22285. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22286. }
  22287. }
  22288. }
  22289. }
  22290. let mclass = []
  22291. if (_this.courseTypeId.length) {
  22292. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22293. let _sid = _this.courseTypeId[i]
  22294. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22295. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22296. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22297. }
  22298. }
  22299. }
  22300. }
  22301. // ${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
  22302. // ${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
  22303. let messages = `NOTICE
  22304. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22305. Language: ${this.getLang()}
  22306. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22307. Instruction: Based on the context, follow "Format example", write content.
  22308. #Context
  22309. ## 参考资料
  22310. 课程名字:${this.courseName}
  22311. ${sub.length ? '学科:' + sub.join(",") : ''}
  22312. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22313. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22314. ## 要求
  22315. ${msg}
  22316. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22317. _this.isTargetCancelToken1 = _this.ajax.setCancelSource();
  22318. let _uuid = uuidv4();
  22319. // let params = JSON.stringify({
  22320. // // "model": "Chat",
  22321. // model: 'gpt-3.5-turbo',
  22322. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22323. // max_tokens: 4096,
  22324. // top_p: 1,
  22325. // frequency_penalty: 0,
  22326. // presence_penalty: 0,
  22327. // messages: [{
  22328. // content: messages,
  22329. // role: 'user'
  22330. // }],
  22331. // uid: _uuid,
  22332. // mind_map_question: "",
  22333. // })
  22334. let params = {
  22335. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22336. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22337. session_name: _uuid,
  22338. userId: _this.userid,
  22339. uid: _uuid,
  22340. file_ids: fileid.length ? [...fileid] : '',
  22341. model: 'gpt-4o-2024-08-06',
  22342. temperature: this.mode == 3 ? 0.5 : 0.1,
  22343. }
  22344. // let params = JSON.stringify({
  22345. // message: {
  22346. // anthropic_version: "bedrock-2023-05-31",
  22347. // max_tokens: 4096,
  22348. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22349. // top_p: 1,
  22350. // messages: [{
  22351. // "role": "user",
  22352. // "content": messages
  22353. // }] ,
  22354. // },
  22355. // uid: _uuid,
  22356. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22357. // });
  22358. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22359. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken1).then(function (response) {
  22360. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22361. console.log(response);
  22362. // let data = response.data.FunctionResponse
  22363. // if (data.choices && data.choices.length && data.choices[0].message) {
  22364. // _this.courseText = data.choices[0].message.content
  22365. // }
  22366. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22367. } else {
  22368. _this.$message.warning(response.data.FunctionResponse.result);
  22369. }
  22370. _this.isTargetCancelToken1 = null
  22371. }).catch(function (error) {
  22372. _this.targetTextLoading = false
  22373. _this.ttargetTextLoading = false
  22374. _this.isTargetCancelToken1 = null
  22375. if(error && error.message != 'Request canceled by the user.'){
  22376. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22377. }
  22378. console.log(error);
  22379. });
  22380. await _this.aitargetTextDetailgetAiContent(_uuid)
  22381. },
  22382. aitargetTextDetailgetAiContent(_uid) {
  22383. try {
  22384. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22385. this.isTargetCancelSource1 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22386. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22387. } catch (error) {
  22388. console.log('EventSource error:', error);
  22389. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22390. this.targetTextLoading = false
  22391. this.ttargetTextLoading = false
  22392. this.isTargetCancelToken1 = null
  22393. return;
  22394. }
  22395. let _allText = "";
  22396. let _mdText = "";
  22397. let _iindex = 0
  22398. this.isTargetCancelSource1.onmessage = _e => {
  22399. let _eData = JSON.parse(_e.data).content;
  22400. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22401. //对话已经完成
  22402. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22403. this.isTargetCancelSource1.close();
  22404. this.isTargetCancelSource1 = null;
  22405. this.targetCourseText = _mdText;
  22406. this.targetTextLoading = false
  22407. this.ttargetTextLoading = false
  22408. this.targetCourseTextB = false
  22409. this.isTargetCancelToken1 = null
  22410. return;
  22411. } else {
  22412. _iindex++
  22413. //对话还在继续
  22414. let _text = "";
  22415. _text = _eData.replaceAll("'", "");
  22416. if (_allText == "") {
  22417. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22418. } else {
  22419. _allText += _text;
  22420. }
  22421. _mdText = _allText + "_";
  22422. _mdText = _mdText.replace(/\\n/g, "\n");
  22423. _mdText = _mdText.replace(/\\/g, "");
  22424. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22425. //转化返回的回复流数据
  22426. if(_iindex == 10){
  22427. this.targetCourseText = _mdText;
  22428. _iindex = 0
  22429. }
  22430. if(this.targetTextLoading){
  22431. this.targetTextLoading = false
  22432. }
  22433. // 处理流数据
  22434. }
  22435. // this.$forceUpdate();
  22436. };
  22437. let _this = this
  22438. this.isTargetCancelSource1.onerror = function(event) {
  22439. // 处理错误,可以尝试重新连接
  22440. console.log('EventSource error:', event);
  22441. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22442. _this.targetTextLoading = false
  22443. _this.ttargetTextLoading = false
  22444. _this.isTargetCancelToken1 = null
  22445. _this.isTargetCancelSource1.close();
  22446. _this.isTargetCancelSource1 = null;
  22447. };
  22448. },
  22449. async aitargetTextDetail2(msg) {
  22450. let _this = this
  22451. let fileid = []
  22452. if(_this.mubiaoInfoData.length){
  22453. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  22454. if(_this.mubiaoInfoData[i].fileid){
  22455. fileid.push(_this.mubiaoInfoData[i].fileid)
  22456. }else {
  22457. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  22458. if(_fileid){
  22459. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22460. _this.$forceUpdate();
  22461. if(_fileid != 1){
  22462. fileid.push(_fileid)
  22463. }
  22464. }
  22465. }
  22466. }
  22467. }
  22468. _this.targetTextLoading2 = true
  22469. _this.ttargetTextLoading2 = true
  22470. let sub = []
  22471. if (_this.courseTypeId.length) {
  22472. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22473. let _sid = _this.courseTypeId[i]
  22474. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22475. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22476. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22477. }
  22478. }
  22479. }
  22480. }
  22481. let mclass = []
  22482. if (_this.courseTypeId.length) {
  22483. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22484. let _sid = _this.courseTypeId[i]
  22485. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22486. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22487. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22488. }
  22489. }
  22490. }
  22491. }
  22492. if(sub.length){
  22493. let _fileid = _this.importFileid(sub)
  22494. fileid = [...fileid, ..._fileid]
  22495. }
  22496. let messages = `NOTICE
  22497. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22498. Language: ${this.getLang()}
  22499. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22500. Instruction: Based on the context, follow "Format example", write content.
  22501. #Context
  22502. ## 参考资料
  22503. 课程标题:${this.courseName}
  22504. ${sub.length ? '学科:' + sub.join(",") : ''}
  22505. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22506. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  22507. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22508. ## 要求
  22509. ${msg}
  22510. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22511. let _uuid = uuidv4();
  22512. // let params = JSON.stringify({
  22513. // // "model": "Chat",
  22514. // model: 'gpt-3.5-turbo',
  22515. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22516. // max_tokens: 4096,
  22517. // top_p: 1,
  22518. // frequency_penalty: 0,
  22519. // presence_penalty: 0,
  22520. // messages: [{
  22521. // content: messages,
  22522. // role: 'user'
  22523. // }],
  22524. // uid: _uuid,
  22525. // mind_map_question: "",
  22526. // })
  22527. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22528. let params = {
  22529. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22530. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22531. session_name: _uuid,
  22532. userId: _this.userid,
  22533. uid: _uuid,
  22534. file_ids: fileid.length ? [...fileid] : '',
  22535. model: 'gpt-4o-2024-08-06',
  22536. temperature: this.mode == 3 ? 0.5 : 0.1,
  22537. }
  22538. // let params = JSON.stringify({
  22539. // message: {
  22540. // anthropic_version: "bedrock-2023-05-31",
  22541. // max_tokens: 4096,
  22542. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22543. // top_p: 1,
  22544. // messages: [{
  22545. // "role": "user",
  22546. // "content": messages
  22547. // }] ,
  22548. // },
  22549. // uid: _uuid,
  22550. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22551. // });
  22552. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22553. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  22554. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22555. console.log(response);
  22556. // let data = response.data.FunctionResponse
  22557. // if (data.choices && data.choices.length && data.choices[0].message) {
  22558. // _this.courseText = data.choices[0].message.content
  22559. // }
  22560. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22561. } else {
  22562. _this.$message.warning(response.data.FunctionResponse.result);
  22563. }
  22564. _this.isTargetCancelToken2 = null
  22565. }).catch(function (error) {
  22566. _this.targetTextLoading2 = false
  22567. _this.ttargetTextLoading2 = false
  22568. _this.isTargetCancelToken2 = null
  22569. if(error && error.message != 'Request canceled by the user.'){
  22570. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22571. }
  22572. console.log(error);
  22573. });
  22574. await _this.aitargetTextDetail2getAiContent(_uuid)
  22575. },
  22576. importFileid(sub){
  22577. // file-SNthYVubrHGg4HjFcp3FPkZq 英语核心素养(总目标+学段目标)
  22578. // file-QOKhi8i84T8eR6DYhb9TaTlG 科学核心素养学段目标
  22579. // file-nkAUyRCEMncICGuFBC1WXnM1 科学核心素养内涵目标
  22580. // file-aQmfmgrwdrHa9sCTTZkjvK7Z 语文核心素养内涵目标
  22581. // file-G1bRfSFnQaQtzA3c8dLshg0a 数学学科核心素养学段目标
  22582. // file-35koyXrFO2T4FsrQe4qXm0io 数学学科核心素养内涵和总目标
  22583. let _sub = converter(sub.join(","))
  22584. let fileid = []
  22585. for(var i = 0; i < this.fileidArray.length; i++){
  22586. if(_sub.indexOf(converter(this.fileidArray[i].name)) != -1){
  22587. if(fileid.indexOf(this.fileidArray[i].fileid) == -1){
  22588. fileid.push(this.fileidArray[i].fileid)
  22589. }
  22590. }
  22591. }
  22592. return fileid
  22593. },
  22594. selectFileid(){
  22595. let params = {
  22596. oid: this.oid,
  22597. };
  22598. this.ajax
  22599. .get(this.$store.state.api + "selectFileid", params)
  22600. .then((res) => {
  22601. this.fileidArray = res.data[0]
  22602. if(res.data[1].length){
  22603. this.fileidArray = res.data[1]
  22604. }
  22605. if(res.data[2].length){
  22606. this.fileidArray = res.data[2]
  22607. }
  22608. })
  22609. .catch((err) => {
  22610. console.error(err);
  22611. });
  22612. },
  22613. selectAiFileid(){
  22614. let params = {
  22615. oid: this.oid,
  22616. };
  22617. this.ajax
  22618. .get(this.$store.state.api + "selectAiFileid", params)
  22619. .then((res) => {
  22620. let fileIds = []
  22621. for(var i = 0; i < res.data[0].length; i++){
  22622. fileIds.push(res.data[0][i].fileid)
  22623. }
  22624. this.fileIds = fileIds
  22625. if(res.data[1].length){
  22626. fileIds = []
  22627. for(var i = 0; i < res.data[1].length; i++){
  22628. fileIds.push(res.data[0][i].fileid)
  22629. }
  22630. this.fileIds = fileIds
  22631. }
  22632. if(res.data[2].length){
  22633. fileIds = []
  22634. for(var i = 0; i < res.data[2].length; i++){
  22635. fileIds.push(res.data[0][i].fileid)
  22636. }
  22637. this.fileIds = fileIds
  22638. }
  22639. })
  22640. .catch((err) => {
  22641. console.error(err);
  22642. });
  22643. },
  22644. selectKnowFileid(){
  22645. let params = {
  22646. oid: this.oid,
  22647. sta: 'cn'
  22648. };
  22649. this.ajax
  22650. .get(this.$store.state.api + "selectKnowFileid", params)
  22651. .then((res) => {
  22652. this.knowFileArray = res.data[0]
  22653. if(res.data[1].length){
  22654. this.knowFileArray = res.data[1]
  22655. }
  22656. if(res.data[2].length){
  22657. this.knowFileArray = res.data[2]
  22658. }
  22659. })
  22660. .catch((err) => {
  22661. console.error(err);
  22662. });
  22663. },
  22664. async aitargetTextDetail22(msg,msg2) {
  22665. let _this = this
  22666. let fileid = []
  22667. _this.targetTextLoading2 = true
  22668. _this.ttargetTextLoading2 = true
  22669. let sub = []
  22670. if (_this.courseTypeId.length) {
  22671. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22672. let _sid = _this.courseTypeId[i]
  22673. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22674. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22675. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22676. }
  22677. }
  22678. }
  22679. }
  22680. let mclass = []
  22681. if (_this.courseTypeId.length) {
  22682. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22683. let _sid = _this.courseTypeId[i]
  22684. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22685. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22686. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22687. }
  22688. }
  22689. }
  22690. }
  22691. if(!msg2 && sub.length){
  22692. // let _fileid = _this.importFileid(sub)
  22693. // fileid = [...fileid, ..._fileid]
  22694. }
  22695. let messages = `NOTICE
  22696. Role: 你是创建课程的老师,内容以markdown形式出现(注:如果文件内容里面不包含需要检索的内容,就不引用文件内容)。
  22697. Language: ${this.getLang()}
  22698. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  22699. Instruction: Based on the context, follow "Format example", write content.
  22700. #Context
  22701. ## 参考资料
  22702. 课程标题:${this.courseName}
  22703. ${sub.length ? '学科:' + sub.join(",") : ''}
  22704. ${mclass.length ? '面向年级:' + mclass.join(",") : ''}
  22705. 课程目标:${msg2}
  22706. ${this.teacherCourseText ? '课程摘要:' + this.teacherCourseText.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', "") : ''}
  22707. ${this.targetCourseText && this.aiCallBack == 2 ? '参考内容:'+this.targetCourseText : ''}
  22708. ## 要求
  22709. ${msg}
  22710. ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
  22711. let _uuid = uuidv4();
  22712. // let params = JSON.stringify({
  22713. // // "model": "Chat",
  22714. // model: 'gpt-3.5-turbo',
  22715. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22716. // max_tokens: 4096,
  22717. // top_p: 1,
  22718. // frequency_penalty: 0,
  22719. // presence_penalty: 0,
  22720. // messages: [{
  22721. // content: messages,
  22722. // role: 'user'
  22723. // }],
  22724. // uid: _uuid,
  22725. // mind_map_question: "",
  22726. // })
  22727. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22728. let params = {
  22729. assistant_id: 'b19f1a1a-7586-11ef-8ce0-12e77c4cb76b',
  22730. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22731. session_name: _uuid,
  22732. userId: _this.userid,
  22733. uid: _uuid,
  22734. file_ids: fileid.length ? [...fileid] : '',
  22735. model: 'gpt-4o-2024-08-06',
  22736. temperature: this.mode == 3 ? 0.5 : 0.1,
  22737. }
  22738. // let params = JSON.stringify({
  22739. // message: {
  22740. // anthropic_version: "bedrock-2023-05-31",
  22741. // max_tokens: 4096,
  22742. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22743. // top_p: 1,
  22744. // messages: [{
  22745. // "role": "user",
  22746. // "content": messages
  22747. // }] ,
  22748. // },
  22749. // uid: _uuid,
  22750. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22751. // });
  22752. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22753. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat_new', params, _this.isTargetCancelToken2).then(function (response) {
  22754. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22755. console.log(response);
  22756. // let data = response.data.FunctionResponse
  22757. // if (data.choices && data.choices.length && data.choices[0].message) {
  22758. // _this.courseText = data.choices[0].message.content
  22759. // }
  22760. if (converter(response.data.FunctionResponse.result) == converter("发送成功")) {
  22761. } else {
  22762. _this.$message.warning(response.data.FunctionResponse.result);
  22763. }
  22764. _this.isTargetCancelToken2 = null
  22765. }).catch(function (error) {
  22766. _this.targetTextLoading2 = false
  22767. _this.ttargetTextLoading2 = false
  22768. _this.isTargetCancelToken2 = null
  22769. if(error && error.message != 'Request canceled by the user.'){
  22770. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22771. }
  22772. console.log(error);
  22773. });
  22774. await _this.aitargetTextDetail2getAiContent(_uuid)
  22775. },
  22776. aitargetTextDetail2getAiContent(_uid) {
  22777. try {
  22778. // let _source = new EventSource(`https://gpt4.cocorobo.cn/stream/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22779. this.isTargetCancelSource2 = new EventSource(`https://gpt4.cocorobo.cn/question/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22780. // let _source = new EventSource(`https://claude3.cocorobo.cn/streamChat/${_uid}`); //http://gpt4.cocorobo.cn:8011/stream/ https://gpt4.cocorobo.cn/stream/
  22781. } catch(error) {
  22782. console.log('EventSource error:', error);
  22783. this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22784. this.targetTextLoading2 = false
  22785. this.ttargetTextLoading2 = false
  22786. this.isTargetCancelToken2 = null
  22787. return;
  22788. }
  22789. let text1 = this.targetCourseText2 ? JSON.parse(JSON.stringify(this.targetCourseText2)) : ''
  22790. let _allText = "";
  22791. let _mdText = "";
  22792. let _iindex = 0
  22793. this.isTargetCancelSource2.onmessage = _e => {
  22794. let _eData = JSON.parse(_e.data).content;
  22795. if (_eData.replace("'", "").replace("'", "") == "[DONE]") {
  22796. //对话已经完成
  22797. _mdText = _mdText.replace("_", "").replace(/【[^】]*source[^】]*】/g, '').replaceAll("<br>", "");
  22798. this.isTargetCancelSource2.close();
  22799. this.isTargetCancelSource2 = null;
  22800. this.targetCourseText2 = text1+' \n '+_mdText;
  22801. this.targetTextLoading2 = false
  22802. this.ttargetTextLoading2 = false
  22803. this.targetCourseText2B = false
  22804. this.isTargetCancelToken2 = null
  22805. return;
  22806. } else {
  22807. _iindex++
  22808. //对话还在继续
  22809. let _text = "";
  22810. _text = _eData.replaceAll("'", "");
  22811. if (_allText == "") {
  22812. _allText = _text.replace(/^\n+/, ""); //去掉回复消息中偶尔开头就存在的连续换行符
  22813. } else {
  22814. _allText += _text;
  22815. }
  22816. _mdText = _allText + "_";
  22817. _mdText = _mdText.replace(/\\n/g, "\n");
  22818. _mdText = _mdText.replace(/\\/g, "");
  22819. if (_allText.split("```").length % 2 == 0) _mdText += "\n```\n";
  22820. //转化返回的回复流数据
  22821. if(_iindex == 10){
  22822. this.targetCourseText2 = text1+' \n '+_mdText;
  22823. _iindex = 0
  22824. }
  22825. if(this.targetTextLoading2){
  22826. this.targetTextLoading2 = false
  22827. }
  22828. // 处理流数据
  22829. }
  22830. // this.$forceUpdate();
  22831. };
  22832. let _this = this
  22833. this.isTargetCancelSource2.onerror = function(event) {
  22834. // 处理错误,可以尝试重新连接
  22835. console.log('EventSource error:', event);
  22836. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22837. _this.targetTextLoading2 = false
  22838. _this.ttargetTextLoading2 = false
  22839. _this.isTargetCancelToken2 = null
  22840. _this.isTargetCancelSource2.close();
  22841. _this.isTargetCancelSource2 = null;
  22842. };
  22843. },
  22844. async aitargetTextDetail3(msg) {
  22845. let _this = this
  22846. let fileid = []
  22847. if(_this.mubiaoInfoData.length){
  22848. for (var i = 0; i < _this.mubiaoInfoData.length; i++) {
  22849. if(_this.mubiaoInfoData[i].fileid){
  22850. fileid.push(_this.mubiaoInfoData[i].fileid)
  22851. }else {
  22852. let _fileid = await _this.createFileid(_this.mubiaoInfoData[i].url)
  22853. if(_fileid){
  22854. _this.mubiaoInfoData[i].fileid = _fileid == 1 ? '' : _fileid
  22855. _this.$forceUpdate();
  22856. if(_fileid != 1){
  22857. fileid.push(_fileid)
  22858. }
  22859. }
  22860. }
  22861. }
  22862. }
  22863. _this.targetTextLoading2 = true
  22864. _this.ttargetTextLoading2 = true
  22865. let sub = []
  22866. if (_this.courseTypeId.length) {
  22867. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22868. let _sid = _this.courseTypeId[i]
  22869. for (var j = 0; j < _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22870. if (_sid == _this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  22871. sub.push(_this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  22872. }
  22873. }
  22874. }
  22875. }
  22876. let mclass = []
  22877. if (_this.courseTypeId.length) {
  22878. for (var i = 0; i < _this.courseTypeId.length; i++) {
  22879. let _sid = _this.courseTypeId[i]
  22880. for (var j = 0; j < _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
  22881. if (_sid == _this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
  22882. mclass.push(_this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
  22883. }
  22884. }
  22885. }
  22886. }
  22887. // if(sub.length){
  22888. // let _fileid = _this.importFileid(sub)
  22889. // fileid = [...fileid, ..._fileid]
  22890. // }
  22891. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  22892. if (_this.infoData.length) {
  22893. for (var i = 0; i < _this.infoData.length; i++) {
  22894. if(_this.infoData[i].fileid){
  22895. fileid.push(_this.infoData[i].fileid)
  22896. }else {
  22897. let _fileid = await _this.createFileid(_this.infoData[i].url)
  22898. if(_fileid){
  22899. _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
  22900. _this.$forceUpdate();
  22901. if(_fileid != 1){
  22902. fileid.push(_fileid)
  22903. }
  22904. }
  22905. }
  22906. }
  22907. }
  22908. _this.isTargetCancelToken2 = _this.ajax.setCancelSource();
  22909. let messages = `Language: ${this.getLang()}
  22910. ${msg}
  22911. ## 课程信息
  22912. 课程名字:${this.courseName}
  22913. 课程概况:${this.courseText}
  22914. ${sub.length ? '学科:' + sub.join(",") : ''}
  22915. ${mclass.length ? '年级:' + mclass.join(",") : ''}`
  22916. let _uuid = uuidv4();
  22917. // let params = JSON.stringify({
  22918. // // "model": "Chat",
  22919. // model: 'gpt-3.5-turbo',
  22920. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22921. // max_tokens: 4096,
  22922. // top_p: 1,
  22923. // frequency_penalty: 0,
  22924. // presence_penalty: 0,
  22925. // messages: [{
  22926. // content: messages,
  22927. // role: 'user'
  22928. // }],
  22929. // uid: _uuid,
  22930. // mind_map_question: "",
  22931. // })
  22932. let params = {
  22933. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  22934. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  22935. session_name: _uuid,
  22936. userId: _this.userid,
  22937. uid: _uuid,
  22938. file_ids: fileid.length ? [...fileid] : '',
  22939. model: 'gpt-4o-2024-08-06',
  22940. temperature: this.mode == 3 ? 0.5 : 0.1,
  22941. }
  22942. // let params = JSON.stringify({
  22943. // message: {
  22944. // anthropic_version: "bedrock-2023-05-31",
  22945. // max_tokens: 4096,
  22946. // temperature: this.mode == 3 ? 0.5 : 0.1,
  22947. // top_p: 1,
  22948. // messages: [{
  22949. // "role": "user",
  22950. // "content": messages
  22951. // }] ,
  22952. // },
  22953. // uid: _uuid,
  22954. // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  22955. // });
  22956. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  22957. _this.ajax.post('https://gpt4.cocorobo.cn/ai_agent_park_chat', params, _this.isTargetCancelToken2).then(function (response) {
  22958. // _this.ajax.post('https://claude3.cocorobo.cn/chat', params).then(function (response) {
  22959. console.log(response);
  22960. // let data = response.data.FunctionResponse
  22961. // if (data.choices && data.choices.length && data.choices[0].message) {
  22962. // _this.courseText = data.choices[0].message.content
  22963. // }
  22964. console.log(response);
  22965. let data = response.data.FunctionResponse
  22966. // if (data.choices && data.choices.length && data.choices[0].message) {
  22967. // console.log(data.choices[0].message.content);
  22968. // _this.unitJson[0].chapterInfo[0].taskJson[_tindex2].eList = JSON.parse(data.choices[0].message.content)
  22969. // _this.$forceUpdate()
  22970. // }
  22971. if (data.message) {
  22972. console.log('返回回来的目标:',data.message);
  22973. _this.targetCourseText2 = data.message
  22974. _this.aitargetTextDetail22(_this.aiJson.aiTarget2, data.message.replaceAll('#', " ").replaceAll('*', "").replaceAll('\n', ""))
  22975. }
  22976. _this.isTargetCancelToken2 = null
  22977. }).catch(function (error) {
  22978. _this.targetTextLoading2 = false
  22979. _this.ttargetTextLoading2 = false
  22980. _this.isTargetCancelToken2 = null
  22981. if(error && error.message != 'Request canceled by the user.'){
  22982. _this.$message.error("哎呀,请求太多了,服务器忙不过来了,请稍等再重试")
  22983. }
  22984. console.log(error);
  22985. });
  22986. },
  22987. againEva(msg, i, k) {
  22988. if(!this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].value || !this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail){
  22989. this.$message.error(`任务${i+1}的第${k+1}个评价完善信息后再生成细则`)
  22990. return;
  22991. }
  22992. if (this.ruleLoading[i]) {
  22993. this.ruleLoading[i][k] = true
  22994. } else {
  22995. this.ruleLoading[i] = []
  22996. this.ruleLoading[i][k] = true
  22997. }
  22998. let message = `NOTICE
  22999. Role: 你是一个专业的项目式学习导师,你要根据制定标准资料中的评价维度和维度描述制定具体的评价细则。
  23000. Language: ${this.getLang()}
  23001. ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
  23002. Instruction: Based on the context, follow "Format example", write content.
  23003. #Context
  23004. ##要求
  23005. ${msg}
  23006. ##制定标准资料
  23007. 评价维度:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].target}
  23008. 维度描述:${this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].detail}
  23009. # Format example
  23010. ==
  23011. 0 星,作业内容与作业要求无关;
  23012. 1 星,没有识别问题和需求;
  23013. 2 星,问题或需求没有被清晰理解或准确识别;
  23014. 3 星,问题或需求的一部分被识别;
  23015. 4 星,问题或需求的大部分被识别;
  23016. 5 星,问题或需求都被识别。
  23017. ==
  23018. `
  23019. // let params = {
  23020. // // "model": "Chat",
  23021. // model: 'gpt-4o-2024-08-06',
  23022. // // model: "gpt-4o",
  23023. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23024. // max_tokens: 4096,
  23025. // top_p: 1,
  23026. // frequency_penalty: 0,
  23027. // presence_penalty: 0,
  23028. // messages: [
  23029. // {
  23030. // content: message.replaceAll("\n", " ").replaceAll("*", ""),
  23031. // role: "user"
  23032. // }
  23033. // ],
  23034. // stream: false,
  23035. // uid: this.userid,
  23036. // mind_map_question: ""
  23037. // };
  23038. // this.ajax
  23039. // .post("https://gpt4.cocorobo.cn/chat", params)
  23040. // .then(response => {
  23041. // let data = response.data.FunctionResponse;
  23042. // console.log("data", data);
  23043. // if (data.choices && data.choices.length && data.choices[0].message) {
  23044. // let content = data.choices[0].message.content;
  23045. // var regex = new RegExp('==([^=]+)==');
  23046. // let match = content.match(regex);
  23047. // if (match) {
  23048. // content = match[1].trim().replaceAll(' ', '');
  23049. // // 获取匹配到的内容并去除两端空格
  23050. // console.log('contentInsideDoubleEquals', content);
  23051. // if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  23052. // console.log("未有星级。");
  23053. // this.againEva(msg, i, k)
  23054. // return
  23055. // }
  23056. // //  return
  23057. // } else {
  23058. // console.log("未找到匹配的内容。");
  23059. // this.againEva(msg, i, k)
  23060. // return
  23061. // }
  23062. // let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  23063. // // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  23064. // elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  23065. // this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  23066. // this.$forceUpdate();
  23067. // this.ruleLoading[i][k] = false
  23068. // }else{
  23069. // this.ruleLoading[i][k] = false
  23070. // }
  23071. // })
  23072. // .catch(error => {
  23073. // console.log(error);
  23074. // this.ruleLoading[i][k] = false
  23075. // });
  23076. let parm = {
  23077. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23078. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(message.replaceAll('\n', " ").replaceAll('*', "")) : message.replaceAll('\n', " ").replaceAll('*', "")}],
  23079. session_name: uuidv4(),
  23080. userId: this.userid,
  23081. file_ids: [],
  23082. model: 'gpt-4o-2024-08-06',
  23083. temperature: this.mode == 3 ? 0.5 : 0.1,
  23084. }
  23085. this.ajax
  23086. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
  23087. .then(async (response) => {
  23088. console.log(response);
  23089. let data = response.data.FunctionResponse
  23090. if (data.message) {
  23091. console.log(data.message);
  23092. let content = data.message;
  23093. var regex = new RegExp('==([^=]+)==');
  23094. let match = content.match(regex);
  23095. if (match) {
  23096. content = match[1].trim().replaceAll(' ', '');
  23097. // 获取匹配到的内容并去除两端空格
  23098. console.log('contentInsideDoubleEquals', content);
  23099. if (content.indexOf('0星') == -1 || content.indexOf('2星') == -1 || content.indexOf('3星') == -1 || content.indexOf('4星') == -1 || content.indexOf('5星') == -1) {
  23100. console.log("未有星级。");
  23101. this.againEva(msg, i, k)
  23102. return
  23103. }
  23104. //  return
  23105. } else {
  23106. console.log("未找到匹配的内容。");
  23107. this.againEva(msg, i, k)
  23108. return
  23109. }
  23110. let elist = JSON.parse(JSON.stringify(this.unitJson[0].chapterInfo[0].taskJson[i].eList[k]))
  23111. // this.unitJson[0].chapterInfo[0].taskJson[i].eList[k].rule=JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  23112. elist.rule = JSON.parse(JSON.stringify(content.replaceAll("#", "")))
  23113. this.$set(this.unitJson[0].chapterInfo[0].taskJson[i].eList, k, elist)
  23114. this.$forceUpdate();
  23115. this.ruleLoading[i][k] = false
  23116. this.$message.success(`任务${i+1}评价${k+1}细则生成成功`)
  23117. }else {
  23118. this.ruleLoading[i][k] = false
  23119. }
  23120. })
  23121. .catch((error) => {
  23122. this.ruleLoading[i][k] = false
  23123. console.log(error);
  23124. });
  23125. },
  23126. async aiSearchFile(messages, callback) {
  23127. let _this = this
  23128. let fileid = _this.isFileSearch ? [..._this.fileIds] : []
  23129. fileid = [...fileid, ..._this.knowFileids, ..._this.knowFileids2]
  23130. console.log('fileid=========',fileid)
  23131. // let params = JSON.stringify({
  23132. // // "model": "Chat",
  23133. // model: 'gpt-3.5-turbo',
  23134. // temperature: this.mode == 3 ? 0.5 : 0.1,
  23135. // max_tokens: 4096,
  23136. // top_p: 1,
  23137. // frequency_penalty: 0,
  23138. // presence_penalty: 0,
  23139. // messages: [{
  23140. // content: messages,
  23141. // role: 'user'
  23142. // }],
  23143. // stream: false,
  23144. // uid: this.userid,
  23145. // mind_map_question: "",
  23146. // })
  23147. // // let params = JSON.stringify({
  23148. // // message: {
  23149. // // anthropic_version: "bedrock-2023-05-31",
  23150. // // max_tokens: 4096,
  23151. // // temperature: this.mode == 3 ? 0.5 : 0.1,
  23152. // // top_p: 1,
  23153. // // messages: [{
  23154. // // content: messages,
  23155. // // role: 'user'
  23156. // // }], //
  23157. // // },
  23158. // // model: "Claude 3 Sonnet" // Claude 3 Sonnet或者Claude 3 Haiku
  23159. // // });
  23160. // _this.ajax.post('https://gpt4.cocorobo.cn/chat', params).then(function (response) {
  23161. // // _this.ajax.post('https://claude3.cocorobo.cn/claude3Chat', params).then(function (response) {
  23162. // console.log(response);
  23163. // let data = response.data.FunctionResponse
  23164. // if (data.choices && data.choices.length && data.choices[0].message) {
  23165. // console.log(data.choices[0].message.content);
  23166. // let dArray = JSON.parse(data.choices[0].message.content)
  23167. // _this.dArray = dArray
  23168. // _this.unitJson[0].chapterInfo[0].taskJson = []
  23169. // for (var i = 0; i < dArray.length; i++) {
  23170. // let _task = dArray[i]
  23171. // _this.unitJson[0].chapterInfo[0].taskJson.push({
  23172. // task: _task.task,
  23173. // taskDetail: "",
  23174. // taskDetail2: _task.detail,
  23175. // taskDetail3: "",
  23176. // chapterData: [],
  23177. // toolText: "",
  23178. // toolChoose: [
  23179. // {
  23180. // tool: [],
  23181. // toolDetail: "",
  23182. // toolType: 0,
  23183. // askCount: 1,
  23184. // askTitle: "",
  23185. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  23186. // },
  23187. // ],
  23188. // isShowTools: false,
  23189. // askCount: 1,
  23190. // isFold: 0,
  23191. // askTitle: "",
  23192. // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  23193. // checkJson: [{ checkCount: [], checkPerent: [] }],
  23194. // homeworkList: [],
  23195. // })
  23196. // }
  23197. // _this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = _this.infoData
  23198. // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  23199. // _this.$forceUpdate();
  23200. // }
  23201. // // if (data.result) {
  23202. // // console.log(data.result);
  23203. // // let dArray = JSON.parse(data.result)
  23204. // // _this.dArray = dArray
  23205. // // _this.unitJson[0].chapterInfo[0].taskJson = []
  23206. // // for (var i = 0; i < dArray.length; i++) {
  23207. // // let _task = dArray[i]
  23208. // // _this.unitJson[0].chapterInfo[0].taskJson.push({
  23209. // // task: _task.task,
  23210. // // taskDetail: "",
  23211. // // taskDetail2: _task.detail,
  23212. // // taskDetail3: "",
  23213. // // chapterData: [],
  23214. // // toolText: "",
  23215. // // toolChoose: [
  23216. // // {
  23217. // // tool: [],
  23218. // // toolDetail: "",
  23219. // // toolType: 0,
  23220. // // askCount: 1,
  23221. // // askTitle: "",
  23222. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  23223. // // },
  23224. // // ],
  23225. // // isShowTools: false,
  23226. // // askCount: 1,
  23227. // // isFold: 1,
  23228. // // askTitle: "",
  23229. // // askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
  23230. // // checkJson: [{ checkCount: [], checkPerent: [] }],
  23231. // // homeworkList: [],
  23232. // // })
  23233. // // }
  23234. // // _this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
  23235. // // _this.$forceUpdate();
  23236. // // }
  23237. // callback ? callback() : ''
  23238. // }).catch(function (error) {
  23239. // _this.loading = false
  23240. // console.log(error);
  23241. // });
  23242. this.isFileCancelToken = this.ajax.setCancelSource();
  23243. let parm = {
  23244. assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
  23245. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23246. session_name: uuidv4(),
  23247. userId: this.userid,
  23248. file_ids: fileid.length ? [...fileid] : '',
  23249. model: 'gpt-4o-2024-08-06',
  23250. temperature: this.mode == 3 ? 0.5 : 0.1,
  23251. }
  23252. this.ajax
  23253. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  23254. .then((response) => {
  23255. console.log(response);
  23256. let data = response.data.FunctionResponse
  23257. if (data.message) {
  23258. console.log(data.message);
  23259. let dArray = []
  23260. try {
  23261. // let regex2 = new RegExp("/([{,])(\w+):/g") .replace(regex2, '$1"$2":')
  23262. let regex3 = new RegExp('(?<!")content(?!")','g')
  23263. //
  23264. dArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```','').replaceAll('\'',"\"").replace(regex3, '"content"'))
  23265. } catch (error) {
  23266. // callback ? callback() : ''
  23267. console.log("error_________________" + error);
  23268. try {
  23269. let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
  23270. let match = data.message.match(regex);
  23271. dArray = JSON.parse(match[0]);
  23272. } catch (error) {
  23273. // callback ? callback() : ''
  23274. _this.$message.error("返回的数据格式错误,小可正在为您重新获取...")
  23275. console.log("error_________________" + error);
  23276. _this.isFileCancelToken = null;
  23277. _this.aiSearchFile(messages, callback)
  23278. return
  23279. }
  23280. }
  23281. for(let i = 0; i < dArray.length; i++){
  23282. let content = dArray[i].content
  23283. let name = '参考资料'+(i+1)
  23284. let md = new MarkdownIt();
  23285. let _html = content ? md.render(content) : ''
  23286. setTimeout(()=>{
  23287. if(i == (dArray.length - 1)){
  23288. _this.generate2(name, _html, i, callback)
  23289. }else {
  23290. _this.generate2(name, _html, i)
  23291. }
  23292. }, 500 * i)
  23293. }
  23294. _this.isFileCancelToken = null
  23295. _this.$forceUpdate();
  23296. }
  23297. })
  23298. .catch((error) => {
  23299. callback ? callback() : ''
  23300. _this.isFileCancelToken = null
  23301. console.log(error);
  23302. });
  23303. },
  23304. async aiSearchFile2(messages, callback) {
  23305. let _this = this
  23306. let fileid = [..._this.knowFileids, ..._this.knowFileids2]
  23307. console.log('fileid=========',fileid)
  23308. this.isFileCancelToken = this.ajax.setCancelSource();
  23309. let parm = {
  23310. assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
  23311. message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
  23312. session_name: uuidv4(),
  23313. userId: this.userid,
  23314. file_ids: fileid.length ? [...fileid] : '',
  23315. model: 'gpt-4o-2024-08-06',
  23316. temperature: this.mode == 3 ? 0.5 : 0.1,
  23317. }
  23318. this.ajax
  23319. .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
  23320. .then((response) => {
  23321. console.log(response);
  23322. let data = response.data.FunctionResponse
  23323. if (data.message) {
  23324. console.log(data.message);
  23325. let content = data.message
  23326. let name = '参考资料'
  23327. let md = new MarkdownIt();
  23328. let _html = content ? md.render(content) : ''
  23329. _this.generate2(name, _html, 0, callback)
  23330. _this.isFileCancelToken = null
  23331. _this.$forceUpdate();
  23332. }
  23333. })
  23334. .catch((error) => {
  23335. callback ? callback() : ''
  23336. _this.isFileCancelToken = null
  23337. console.log(error);
  23338. });
  23339. },
  23340. createFileid(url) {
  23341. let _this = this
  23342. return new Promise((resolve, reject) => {
  23343. try {
  23344. _this.ajax
  23345. .put("https://gpt4.cocorobo.cn/upload_file_knowledge", {
  23346. url: url,
  23347. })
  23348. .then((res) => {
  23349. let _data = res.data.FunctionResponse;
  23350. if (_data.result && _data.result.id) {
  23351. resolve(_data.result.id)
  23352. }else {
  23353. resolve(1)
  23354. }
  23355. }).catch(function (error) {
  23356. resolve(1)
  23357. });
  23358. }catch (e){
  23359. resolve(1)
  23360. }
  23361. });
  23362. },
  23363. handleSwitchChange(string){
  23364. // let area = ''
  23365. // let text = ''
  23366. // if(string == 'aiteacherTextDetail'){
  23367. // area = '已有教案摘要'
  23368. // text = this.teacherCourseText
  23369. // }else if(string == 'aitargetTextDetail'){
  23370. // area = '课程目标'
  23371. // text = this.targetCourseText
  23372. // }else if(string == 'aiDetail'){
  23373. // area = '课程简要描述'
  23374. // text = this.courseText
  23375. // }else if(string == 'aitargetTextDetail2'){
  23376. // area = '课程目标'
  23377. // text = this.targetCourseText2
  23378. // }else if(string.indexOf('aiDetail1') != -1){
  23379. // let index = parseInt(string.split('aiDetail1-')[1])
  23380. // area = `任务${index+1}课程大纲`
  23381. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail2
  23382. // }else if(string == 'aiCpote1'){
  23383. // area = '概念群'
  23384. // text = this.cpote.cpote1
  23385. // }else if(string == 'aiCpote2'){
  23386. // area = '问题链'
  23387. // text = this.cpote.cpote2
  23388. // }else if(string == 'aiCpote3'){
  23389. // area = '目标层'
  23390. // text = this.cpote.cpote3
  23391. // }else if(string == 'aiCpote4'){
  23392. // area = '任务簇'
  23393. // text = this.cpote.cpote4
  23394. // }else if(string.indexOf('teacherDetail2') != -1){
  23395. // let index = parseInt(string.split('teacherDetail2-')[1])
  23396. // area = `任务${index+1}教案`
  23397. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3
  23398. // }else if(string.indexOf('aiDetail2') != -1){
  23399. // let index = parseInt(string.split('aiDetail2-')[1])
  23400. // area = `任务${index+1}任务描述`
  23401. // text = this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail
  23402. // }else if(string.indexOf('aiDetail3') != -1){
  23403. // let index = parseInt(string.split('-')[1])
  23404. // let index2 = parseInt(string.split('-')[2])
  23405. // area = `任务${index+1}工具${index2+1}的工具描述`
  23406. // text = this.unitJson[0].chapterInfo[0].taskJson[index].toolChoose[index2].toolDetail
  23407. // }
  23408. // if(this.isQuote[string] && text){
  23409. // this.quoteArray.push({
  23410. // string,
  23411. // area,
  23412. // value: text
  23413. // })
  23414. // }
  23415. console.log(this.isQuote)
  23416. },
  23417. setIsQuote(string){
  23418. this.isQuote[string] = false
  23419. },
  23420. setEvaList(task, tool, elist){
  23421. this.unitJson[0].chapterInfo[0].taskJson[task].toolChoose[tool].eList = elist
  23422. this.$forceUpdate()
  23423. if(this.$refs[this.unitIndex + '-' + task + 'mindTask'] && this.$refs[this.unitIndex + '-' + task + 'mindTask'][0]){
  23424. this.$refs[this.unitIndex + '-' + task + 'mindTask'][0].refresh()
  23425. }
  23426. },
  23427. closeRight(){
  23428. this.isDisplay = !this.isDisplay;
  23429. },
  23430. addCourseBehavior(type, _html) { // 保存行为操作
  23431. let params = [{
  23432. uid: this.userid,
  23433. courseId: '',
  23434. type: type,
  23435. content: _html,
  23436. }];
  23437. this.ajax.post(this.$store.state.api + 'addCourseBehavior', params).then(res => {
  23438. if (res.data == 1) {
  23439. console.log('保存操作成功');
  23440. } else {
  23441. console.log('保存操作失败');
  23442. }
  23443. }).catch(e => {
  23444. console.log('保存操作失败');
  23445. console.log(e);
  23446. });
  23447. },
  23448. findMatchingContents(){
  23449. if(!this.searchFileName){
  23450. this.$message.error('请输入检索关键词')
  23451. return
  23452. }
  23453. if(this.knowInfoDataLoading){
  23454. this.$message.error('检索中请稍后')
  23455. return
  23456. }
  23457. let sub = []
  23458. if (this.courseTypeId.length) {
  23459. for (var i = 0; i < this.courseTypeId.length; i++) {
  23460. let _sid = this.courseTypeId[i]
  23461. for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
  23462. if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
  23463. sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
  23464. }
  23465. }
  23466. }
  23467. }
  23468. this.knowInfoDataLoading = true
  23469. let params = {
  23470. type: sub.join(","),
  23471. string: this.searchFileName,
  23472. };
  23473. let md = new MarkdownIt();
  23474. this.ajax.get(this.$store.state.api + 'findMatchingContents', params).then(async res => {
  23475. console.log(res)
  23476. if(res.data.length){
  23477. let files = []
  23478. for (var i = 0; i < res.data.length; i++) {
  23479. let el = res.data[i];
  23480. files.push(await this.generateExport2(el.title, md.render(el.content)));
  23481. }
  23482. let data = {
  23483. target:{
  23484. files: files
  23485. }
  23486. }
  23487. console.log(data)
  23488. this.beforeUploadInfo2(data, 20)
  23489. }else{
  23490. this.$message.error('未检索出内容')
  23491. }
  23492. this.knowInfoDataLoading = false
  23493. }).catch(e => {
  23494. console.log('查询失败');
  23495. this.knowInfoDataLoading = false
  23496. console.log(e);
  23497. });
  23498. }
  23499. },
  23500. beforeDestroy() {
  23501. // clearTimeout(this.timer);
  23502. // this.timer = null;
  23503. // clearInterval(this.timer2);
  23504. // this.timer2 = null;
  23505. clearInterval(this.pasteTimer);
  23506. this.pasteTimer = null;
  23507. },
  23508. beforeRouteLeave(to, from, next) {
  23509. // clearTimeout(this.timer);
  23510. // this.timer = null;
  23511. // clearInterval(this.timer2);
  23512. // this.timer2 = null;
  23513. clearInterval(this.pasteTimer);
  23514. this.pasteTimer = null;
  23515. next();
  23516. },
  23517. mounted(){
  23518. const resizable = this.$el.querySelector('.resizable');
  23519. const resizer = this.$el.querySelector('.resizer');
  23520. const maxWidth = document.body.offsetWidth / 2;
  23521. const maxWidth2 = window.innerWidth / 2;
  23522. let startX, startWidth;
  23523. const mouseMoveHandler = (e) => {
  23524. e.preventDefault(); // 添加此行以防止选中其他文本
  23525. const dx = startX - e.clientX;
  23526. const newWidth = startWidth + dx;
  23527. if (newWidth >= 350 && newWidth <= maxWidth) {
  23528. resizable.style.minWidth = `${newWidth}px`;
  23529. }
  23530. };
  23531. const mouseUpHandler = () => {
  23532. document.removeEventListener('mousemove', mouseMoveHandler);
  23533. document.removeEventListener('mouseup', mouseUpHandler);
  23534. document.body.style.cursor = 'default';
  23535. };
  23536. const mouseDownHandler = (e) => {
  23537. e.preventDefault(); // 添加此行以防止选中其他文本
  23538. startX = e.clientX;
  23539. startWidth = resizable.getBoundingClientRect().width;
  23540. document.addEventListener('mousemove', mouseMoveHandler);
  23541. document.addEventListener('mouseup', mouseUpHandler);
  23542. document.body.style.cursor = 'ew-resize';
  23543. };
  23544. resizer.addEventListener('mousedown', mouseDownHandler);
  23545. const touchMoveHandler = (e) => {
  23546. e.preventDefault(); // 添加此行以防止选中其他文本
  23547. const dx = startX - e.touches[0].clientX;
  23548. const newWidth = startWidth + dx;
  23549. if (newWidth >= 350 && newWidth <= maxWidth2) {
  23550. resizable.style.minWidth = `${newWidth}px`;
  23551. }
  23552. };
  23553. const touchEndHandler = () => {
  23554. document.removeEventListener('touchmove', touchMoveHandler);
  23555. document.removeEventListener('touchend', touchEndHandler);
  23556. document.body.style.cursor = 'default';
  23557. };
  23558. const touchStartHandler = (e) => {
  23559. e.preventDefault(); // 添加此行以防止选中其他文本
  23560. startX = e.touches[0].clientX;
  23561. startWidth = resizable.getBoundingClientRect().width;
  23562. document.addEventListener('touchmove', touchMoveHandler);
  23563. document.addEventListener('touchend', touchEndHandler);
  23564. document.body.style.cursor = 'ew-resize';
  23565. };
  23566. resizer.addEventListener('touchstart', touchStartHandler);
  23567. },
  23568. created() {
  23569. this.selectFileid();
  23570. // this.selectAiFileid();
  23571. this.selectKnowFileid();
  23572. this.getStudent();
  23573. this.getTeacher();
  23574. this.getClass();
  23575. this.selectGrage();
  23576. this.getTemplate();
  23577. this.getTipsTemplate();
  23578. // this.selectType();
  23579. this.selectEva();
  23580. if(this.istemplate == 1){
  23581. this.isOutline = true
  23582. this.isOutline2 = true
  23583. this.courseTextBool = true
  23584. this.aiJson.teacherDetail2 = this.aiJson.teacherDetail2 ? this.aiJson.teacherDetail2 : '请根据<任务名>、<任务描述>,<课程简要描述>,为该任务设计详细的教案,教案需要包含该任务的教学目标,教学过程(包含分步骤的教师活动和学生活动,教师活动与学生活动应该一一对应),相关知识点的讲解,练习(练习需要包含示例答案)。'
  23585. this.aiJson.aiAbstract = this.aiJson.aiAbstract ? this.aiJson.aiAbstract : '从用户提供的教案资料(文件形式)中,自动总结教案摘要与教案的学科关键词(每个学科3个)。注意,在提取信息方面你绝对不能虚拟出不存在的东西。然后,你基于用户上传的教案,生成项目的驱动性问题和最终作品。'
  23586. this.aiJson.aiTarget = this.aiJson.aiTarget ? this.aiJson.aiTarget : '从用户提供的教案资料中,提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  23587. this.aiJson.aiSearchFile = this.aiJson.aiSearchFile ? this.aiJson.aiSearchFile : '请根据<关键词>,从你的相应知识库去检索5个最相关的信息。'
  23588. this.aiJson.aiTarget2 = this.aiJson.aiTarget2 ? this.aiJson.aiTarget2 : '请根据课程标题<课程标题>,**从你的知识库去检索5个最相关的信息**,如果没有相关的信息,请你根据已有的知识,并参考#参考资料中的内容,生成本课程的教学目标。你仅需要输出与课程目标相关的内容。'
  23589. this.aiJson.aiTargetGet = this.aiJson.aiTargetGet ? this.aiJson.aiTargetGet : '从用户提供的教案资料(文件形式)中,自动提取出课程目标(如不存在课程目标则返回“未提取到目标”。注意,在提取信息方面你绝对不能虚拟出不存在的东西。'
  23590. this.aiJson.aiOutlineDetail2 = this.aiJson.aiOutlineDetail2 ? this.aiJson.aiOutlineDetail2 : '请参考#参考资料,重新生成该任务,生成内容需包含任务名,任务设计,评价标准。注意,你绝对不能重复已有其他任务,也不要输出其他内容'
  23591. this.aiJson.aiRateRule = '根据<评价维度>和<维度描述>,制定具体的评价细则。 具体的评价细则分为6级——0星,1星,2星,3星,4星,5星。'
  23592. this.aiJson.aiTaskG1 = this.aiJson.aiTaskG1 ? this.aiJson.aiTaskG1 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的任务描述。你的主要任务是输出任务描述,用亲切的口吻告诉学生他们需要做什么。你的输出需要符合# 输出格式与要求'
  23593. this.aiJson.aiTaskG2 = this.aiJson.aiTaskG2 ? this.aiJson.aiTaskG2 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的互动工具列表。你的任务是,根据教案中提到的学生活动,为学生选择一些平台上有的互动工具,允许他们提交“证据”(即过程性成果)来展示他们的学习进度或者证明他们的学习成果。举例:如果学生活动有观看视频回答问题,那么你就为这一活动匹配选择【问答】工具,允许学生回答问题或者提出他们自己的疑问,如果学生活动有需要学生设计实验或者撰写报告,选用【文档】工具,如果需要学生记录数据,选用【表格】工具,如果需要学生整理或者梳理信息选用【思维导图】,如果需要学生绘制草图,选用【白板】,如果需要学生提交视频,图片,或者ppt,选用【作业提交】。你的输出需要符合# 输出格式与要求'
  23594. this.aiJson.aiTaskG3 = this.aiJson.aiTaskG3 ? this.aiJson.aiTaskG3 : '请根据<教学任务教案> 和 #范例 为该教学任务输出学生任务单中的目标和评价系统。你最主要的任务是提取教案中目标以及评价标准。你的输出需要符合# 输出格式与要求'
  23595. this.aiJson.agentid = this.aiJson.agentid ? this.aiJson.agentid : '8e71322c-6c2a-11ef-8ce0-12e77c4cb76b'
  23596. this.aiJson.sagentid = this.aiJson.sagentid ? this.aiJson.sagentid : ''
  23597. }
  23598. this.loading = false;
  23599. // this.timer2 = setInterval(() => {
  23600. // this.selectEva();
  23601. // }, 5000);
  23602. // this.pasteTimer = setInterval(() => {
  23603. // this.getPaste();
  23604. // }, 1000);
  23605. this.pasteTimer = setInterval(() => {
  23606. this.getPaste2();
  23607. }, 500);
  23608. setTimeout(() => {
  23609. // this.selectAllType();
  23610. this.selectCourseDetail();
  23611. }, 500);
  23612. let _this = this;
  23613. window.pasteStage = function (json) {
  23614. _this.pasteStage(json);
  23615. };
  23616. window.pasteTask = function (json) {
  23617. _this.pasteTask(json);
  23618. };
  23619. },
  23620. };
  23621. </script>
  23622. <style scoped>
  23623. @media screen and (max-width: 1280px) {
  23624. .mbCss {
  23625. flex-direction: column !important;
  23626. }
  23627. .pjCss {
  23628. width: 100% !important;
  23629. }
  23630. .evaCss {
  23631. width: 100% !important;
  23632. margin-top: 10px;
  23633. }
  23634. }
  23635. .el-table>>>.even_row {
  23636. background-color: #f1f1f1 !important;
  23637. }
  23638. .dialog_diy>>>.el-dialog__header {
  23639. background: #3c3c3c !important;
  23640. padding: 15px 20px;
  23641. }
  23642. .dialog_diy>>>.el-dialog__title {
  23643. color: #fff;
  23644. }
  23645. .dialog_diy>>>.el-dialog__headerbtn {
  23646. top: 19px;
  23647. }
  23648. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  23649. color: #fff;
  23650. }
  23651. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  23652. color: #fff;
  23653. }
  23654. .dialog_diy>>>.el-dialog__body,
  23655. .dialog_diy>>>.el-dialog__footer {
  23656. background: #fafafa;
  23657. }
  23658. .dialog_diy3>>>.el-dialog__body,
  23659. .dialog_diy3>>>.el-dialog__footer {
  23660. background: #eee !important;
  23661. }
  23662. .dialog_diy3>>>.el-dialog__body {
  23663. padding: 20px 20px;
  23664. }
  23665. .dialog_diyStage>>>.el-dialog__body {
  23666. padding: 10px;
  23667. }
  23668. .source_diy>>>.el-dialog {
  23669. height: 100% !important;
  23670. margin: 0 auto !important;
  23671. }
  23672. .source_diy>>>.el-dialog__body {
  23673. height: calc(100% - 185px);
  23674. overflow: auto;
  23675. background: #e6eaf0;
  23676. }
  23677. .source_diy>>>.el-dialog__footer {
  23678. background: #e6eaf0 !important;
  23679. }
  23680. .left {
  23681. border-right: 1px solid rgb(60, 94, 143);
  23682. display: flex;
  23683. flex-direction: column;
  23684. align-items: center;
  23685. min-height: 600px;
  23686. width: 385px;
  23687. height: 80%;
  23688. }
  23689. .tips {
  23690. color: rgb(128, 128, 128);
  23691. font-size: 12px;
  23692. width: 270px;
  23693. margin: 40px;
  23694. }
  23695. .pb_content {
  23696. height: 100% !important;
  23697. /* margin: 0 20px 0 20px; */
  23698. }
  23699. .pb_content_body {
  23700. width: 100% !important;
  23701. height: 100%;
  23702. display: flex;
  23703. }
  23704. .info_solid {
  23705. width: 270px;
  23706. height: 30px;
  23707. border-left: 1px solid #bdbdbd;
  23708. margin: 10px 0px 10px 30px;
  23709. }
  23710. .info_steps {
  23711. width: 270px;
  23712. font-size: 0.875rem;
  23713. display: flex;
  23714. align-items: center;
  23715. }
  23716. .info_steps span:nth-child(1) {
  23717. width: 30px;
  23718. height: 30px;
  23719. background: rgba(0, 0, 0, 0.38);
  23720. display: block;
  23721. color: #fff;
  23722. border-radius: 40px;
  23723. text-align: center;
  23724. line-height: 30px;
  23725. }
  23726. .steps_active {
  23727. background: #3d67bc !important;
  23728. }
  23729. .info_steps span:nth-child(2) {
  23730. margin-left: 5px;
  23731. }
  23732. .right {
  23733. height: 100%;
  23734. width: 100%;
  23735. display: flex;
  23736. overflow: hidden;
  23737. flex-direction: column;
  23738. }
  23739. .leftBar{
  23740. width: 290px;
  23741. height: calc(100% - 50px);
  23742. overflow: auto;
  23743. border-radius: 5px;
  23744. margin: 25px auto;
  23745. box-sizing: border-box;
  23746. margin-right: 10px;
  23747. }
  23748. .leftBar2{
  23749. width: 400px;
  23750. min-width: 400px;
  23751. height: calc(100% - 50px);
  23752. overflow: auto;
  23753. border-radius: 5px;
  23754. margin: 25px auto;
  23755. box-sizing: border-box;
  23756. margin-right: 10px;
  23757. background: #fff;
  23758. padding: 5px;
  23759. border-radius: 5px;
  23760. }
  23761. .basic_box {
  23762. margin: 0 auto;
  23763. position: relative;
  23764. padding: 0 20px 0 20px;
  23765. }
  23766. .basic_box_success {
  23767. width: 100%;
  23768. min-height: 455px;
  23769. padding: 50px 0;
  23770. position: relative;
  23771. text-align: center;
  23772. border-bottom: 1px solid #bfbfbf;
  23773. box-sizing: border-box;
  23774. display: flex;
  23775. align-items: center;
  23776. flex-direction: column;
  23777. justify-content: center;
  23778. }
  23779. .info_title {
  23780. font-size: 1.5em;
  23781. margin-right: 25px;
  23782. /* margin: 20px 30px 20px 30px; */
  23783. }
  23784. .bInfo_title {
  23785. text-align: left;
  23786. margin: 10px 0;
  23787. }
  23788. .small_title {
  23789. font-size: 14px;
  23790. line-height: 40px;
  23791. }
  23792. .chapter_beizhu {
  23793. font-size: 12px;
  23794. font-weight: bold;
  23795. float: right;
  23796. color: rgb(128, 128, 128);
  23797. margin-top: 5px;
  23798. }
  23799. .chapter_uploadBox1 {
  23800. text-align: left;
  23801. background-color: rgb(242, 242, 242);
  23802. width: 100%;
  23803. height: 67px;
  23804. padding: 0px 15px;
  23805. border-radius: 8px;
  23806. overflow: hidden;
  23807. font-size: 16px;
  23808. box-sizing: border-box;
  23809. position: relative;
  23810. }
  23811. .chapter_add {
  23812. width: 100%;
  23813. height: 32px;
  23814. margin-top: 15px;
  23815. cursor: pointer;
  23816. }
  23817. .chapter_add_l {
  23818. margin-left: 5px;
  23819. width: 30px;
  23820. height: 30px;
  23821. float: left;
  23822. border: 1px solid #aaa;
  23823. color: #aaa;
  23824. border-radius: 50%;
  23825. font-size: 25px;
  23826. text-align: center;
  23827. }
  23828. .chapter_add_r {
  23829. font-size: 18px;
  23830. height: 40px;
  23831. line-height: 30px;
  23832. text-indent: 10px;
  23833. color: #aaa;
  23834. }
  23835. .chapter_add_r span {
  23836. font-size: 12px;
  23837. color: rgb(204, 204, 204);
  23838. }
  23839. .chapter_add_input {
  23840. display: none;
  23841. }
  23842. .line {
  23843. width: 85%;
  23844. margin: 0 auto;
  23845. border-top: 1px solid #e5e5e5;
  23846. margin-top: 20px;
  23847. }
  23848. .info_btnBox {
  23849. width: calc(100%);
  23850. display: flex;
  23851. justify-content: center;
  23852. height: 80px;
  23853. align-items: center;
  23854. background: #fff;
  23855. margin: 0 auto;
  23856. border-top: 2px solid rgb(228, 232, 237);
  23857. box-sizing: border-box;
  23858. }
  23859. .info_btnBox2 {
  23860. width: calc(100%);
  23861. display: flex;
  23862. justify-content: center;
  23863. height: 20px;
  23864. align-items: center;
  23865. background: #fff;
  23866. margin: 0 auto;
  23867. border-top: 2px solid rgb(228, 232, 237);
  23868. box-sizing: border-box;
  23869. overflow: hidden;
  23870. cursor: pointer;
  23871. }
  23872. .info_btnBox3 {
  23873. width: calc(100%);
  23874. display: flex;
  23875. justify-content: flex-end;
  23876. padding: 0 20px;
  23877. height: 60px;
  23878. align-items: center;
  23879. background: unset;
  23880. margin: 0 auto;
  23881. /* border-top: 1px solid rgb(228, 232, 237); */
  23882. box-sizing: border-box;
  23883. overflow: hidden;
  23884. cursor: pointer;
  23885. background: #fff;
  23886. border-radius: 10px;
  23887. }
  23888. .info_btn+.info_btn {
  23889. margin-left: 15px;
  23890. }
  23891. .info_btn,
  23892. .teacherWord {
  23893. color: #fff;
  23894. background-color: #0f7eff;
  23895. padding: 8px 24px;
  23896. font-size: 0.9375rem;
  23897. box-shadow: 0px 1px 3px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%),
  23898. 0px 3px 1px -2px rgb(0 0 0 / 12%);
  23899. min-width: 64px;
  23900. font-weight: 500;
  23901. border-radius: 4px;
  23902. box-sizing: border-box;
  23903. border: none;
  23904. cursor: pointer;
  23905. }
  23906. .teacherWord {
  23907. width: 105px !important;
  23908. text-align: center !important;
  23909. line-height: 36px !important;
  23910. padding: 0 !important;
  23911. font-size: 14px !important;
  23912. margin: 10px 0 !important;
  23913. }
  23914. .template_box {
  23915. display: flex;
  23916. flex-wrap: wrap;
  23917. }
  23918. .wordTeacher {
  23919. display: flex;
  23920. flex-direction: column;
  23921. width: 100px;
  23922. height: 100px;
  23923. text-align: center;
  23924. font-size: 13px;
  23925. margin: 0 20px 20px 0;
  23926. background: #f0f4fa;
  23927. position: relative;
  23928. border-radius: 5px;
  23929. align-items: center;
  23930. justify-content: center;
  23931. border: 1px solid #cad1dc;
  23932. color: #0e1e33;
  23933. /* padding: 25px 0px; */
  23934. cursor: pointer;
  23935. }
  23936. .wordTeacher::after {
  23937. content: "";
  23938. display: block;
  23939. position: absolute;
  23940. width: 15px;
  23941. height: 15px;
  23942. right: 10px;
  23943. top: 10px;
  23944. background-image: url(../../../assets/icon/new/choose_a.png);
  23945. background-size: 100% 100%;
  23946. }
  23947. .wordTeacherA::after {
  23948. background-image: url(../../../assets/icon/new/choose_b.png);
  23949. }
  23950. .wordTeacher:nth-child(5n) {
  23951. margin-right: 0px;
  23952. }
  23953. .wordPic {
  23954. margin: 0 auto;
  23955. width: 30px;
  23956. height: 30px;
  23957. cursor: pointer;
  23958. }
  23959. .deleteWord {
  23960. width: 22px;
  23961. height: 22px;
  23962. position: absolute;
  23963. right: 5px;
  23964. top: -15px;
  23965. cursor: pointer;
  23966. display: none;
  23967. z-index: 999;
  23968. }
  23969. .wordPic>img,
  23970. .deleteWord>img,
  23971. .addToolImg>img {
  23972. width: 100%;
  23973. height: 100%;
  23974. }
  23975. .info_btn:hover {
  23976. background-color: #4f7cd5 !important;
  23977. }
  23978. .cru_selectBox {
  23979. display: flex;
  23980. margin: 15px 0;
  23981. flex-wrap: nowrap;
  23982. white-space: nowrap;
  23983. overflow: auto;
  23984. position: relative;
  23985. height: 40px;
  23986. max-width: calc(100% - 175px);
  23987. }
  23988. .cru_selectBox::-webkit-scrollbar {
  23989. /*滚动条整体样式*/
  23990. width: 6px;
  23991. /*高宽分别对应横竖滚动条的尺寸*/
  23992. height: 6px;
  23993. }
  23994. /*定义滚动条轨道 内阴影+圆角*/
  23995. .cru_selectBox::-webkit-scrollbar-track {
  23996. border-radius: 10px;
  23997. background-color: #eee;
  23998. }
  23999. /*定义滑块 内阴影+圆角*/
  24000. .cru_selectBox::-webkit-scrollbar-thumb {
  24001. border-radius: 10px;
  24002. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  24003. background-color: rgba(0, 0, 0, 0.1);
  24004. }
  24005. .cru_line {
  24006. position: absolute;
  24007. bottom: 0px;
  24008. transition: all 0.5s;
  24009. left: 0px;
  24010. width: 50px;
  24011. height: 4px;
  24012. left: 10px;
  24013. border-radius: 2px;
  24014. background: #3681fc;
  24015. }
  24016. .cru_select {
  24017. font-size: 18px;
  24018. margin-right: 20px;
  24019. margin-left: 5px;
  24020. cursor: pointer;
  24021. color: #0e1e33;
  24022. }
  24023. .cru_select:hover {
  24024. color: #3681fc !important;
  24025. }
  24026. .cru_selected {
  24027. color: #3681fc !important;
  24028. font-weight: bold;
  24029. }
  24030. .chapter_box {
  24031. margin-top: 10px;
  24032. width: 100%;
  24033. padding: 10px 20px;
  24034. background: #fff;
  24035. border-radius: 8px;
  24036. box-sizing: border-box;
  24037. }
  24038. .chapter_contentbox {
  24039. display: flex;
  24040. align-items: center;
  24041. /* margin-top: 15px; */
  24042. }
  24043. .chapter_contentbox .cc_title {
  24044. margin: 0px;
  24045. color: black;
  24046. display: block;
  24047. white-space: nowrap;
  24048. overflow: hidden;
  24049. text-overflow: ellipsis;
  24050. margin-right: 20px;
  24051. font-size: 18px;
  24052. height: 20px;
  24053. line-height: 22px;
  24054. min-width: fit-content;
  24055. display: flex;
  24056. }
  24057. .chapter_contentbox .cc_title::before {
  24058. content: "";
  24059. height: 100%;
  24060. width: 3px;
  24061. background: #3681fc;
  24062. border-radius: 3px;
  24063. opacity: 1;
  24064. display: block;
  24065. margin-right: 10px;
  24066. }
  24067. .chapter_contentbox .cc_input {
  24068. width: 100%;
  24069. display: flex;
  24070. }
  24071. .show_taskD {
  24072. min-width: fit-content;
  24073. margin-left: 10px;
  24074. display: flex;
  24075. align-items: center;
  24076. font-size: 14px;
  24077. cursor: pointer;
  24078. color: #717c8d;
  24079. }
  24080. .show_taskD>img {
  24081. width: 15px;
  24082. margin-right: 5px;
  24083. transition: 0.2s all;
  24084. transform: rotate(-90deg);
  24085. }
  24086. .show_taskD.show>img {
  24087. transform: rotate(0deg);
  24088. }
  24089. .show_toolD {
  24090. min-width: fit-content;
  24091. margin-left: 10px;
  24092. display: flex;
  24093. align-items: center;
  24094. font-size: 14px;
  24095. cursor: pointer;
  24096. color: #717c8d;
  24097. /* position: absolute;
  24098. right: 45px;
  24099. top: 5px; */
  24100. }
  24101. .show_toolD>img {
  24102. width: 15px;
  24103. margin-right: 5px;
  24104. transition: 0.2s all;
  24105. transform: rotate(-90deg);
  24106. }
  24107. .show_toolD.show>img {
  24108. transform: rotate(0deg);
  24109. }
  24110. .remove {
  24111. background-image: url("../../../assets/icon/new/delete_u.png");
  24112. cursor: pointer;
  24113. opacity: 0.5;
  24114. width: 30px;
  24115. min-width: 30px;
  24116. height: 30px;
  24117. background-size: 100% 100%;
  24118. background-repeat: no-repeat;
  24119. margin-left: 10px;
  24120. }
  24121. .remove1 {
  24122. background-image: url("../../../assets/remove1.png");
  24123. background-repeat: no-repeat;
  24124. background-position: 5px 10px;
  24125. width: 40px;
  24126. height: 50px;
  24127. cursor: pointer;
  24128. margin-left: 10px;
  24129. }
  24130. .binfo_input {
  24131. width: 100%;
  24132. margin: 0;
  24133. padding: 12px 14px;
  24134. display: block;
  24135. min-width: 0;
  24136. outline: none;
  24137. box-sizing: border-box;
  24138. background: none;
  24139. border: none;
  24140. border-radius: 4px;
  24141. background: #fff;
  24142. font-size: 16px;
  24143. resize: none;
  24144. font-family: "Microsoft YaHei";
  24145. min-height: 48px;
  24146. /* border: 1px solid #3682fc00; */
  24147. border: 1.5px solid #cad1dc;
  24148. }
  24149. .binfo_textarea {
  24150. border: 1.5px solid #cad1dc;
  24151. font-size: 16px;
  24152. resize: none;
  24153. /* background: #f6f6f6; */
  24154. font-family: "Microsoft YaHei";
  24155. }
  24156. .binfo_input:focus-visible {
  24157. border: 1.5px solid #3681fc !important;
  24158. }
  24159. .time {
  24160. display: flex;
  24161. margin: 35px 0 80px 0;
  24162. }
  24163. .chapter_btnbox {
  24164. width: 160px;
  24165. border-radius: 5px;
  24166. border: 2px dashed gray;
  24167. display: flex;
  24168. padding: 8px 50px;
  24169. align-items: center;
  24170. justify-content: center;
  24171. margin: 30px auto 0;
  24172. cursor: pointer;
  24173. }
  24174. .icon_add {
  24175. position: relative;
  24176. width: 24px;
  24177. padding-top: 20px;
  24178. border-radius: 100%;
  24179. border-width: 2px;
  24180. border-style: solid;
  24181. border-color: gray;
  24182. }
  24183. .icon_add i:nth-child(1) {
  24184. position: absolute;
  24185. left: 50%;
  24186. top: 50%;
  24187. height: 60%;
  24188. transform: translate(-50%, -50%);
  24189. border-width: 1px;
  24190. border-style: solid;
  24191. border-color: inherit;
  24192. }
  24193. .icon_add i:nth-child(2) {
  24194. position: absolute;
  24195. top: 50%;
  24196. left: 50%;
  24197. width: 60%;
  24198. transform: translate(-50%, -50%);
  24199. border-width: 1px;
  24200. border-style: solid;
  24201. border-color: inherit;
  24202. }
  24203. .chapter_btn_w {
  24204. font-size: 0.9375rem;
  24205. font-weight: bold;
  24206. color: gray;
  24207. margin-left: 20px;
  24208. }
  24209. .disUoloadSty>>>.el-icon-plus {
  24210. display: none !important;
  24211. /* 上传按钮隐藏 */
  24212. }
  24213. .imgLeft {
  24214. margin: 15px 0;
  24215. }
  24216. .add_info_box {
  24217. margin: 0 0 0 auto;
  24218. display: flex;
  24219. flex-wrap: wrap;
  24220. }
  24221. .add_info_box button {
  24222. margin: 0 5px 10px 0;
  24223. }
  24224. .add_info_box2 {
  24225. display: flex;
  24226. align-items: center;
  24227. flex-wrap: wrap;
  24228. }
  24229. .add_info_box2::after {
  24230. content: "提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。";
  24231. color: red;
  24232. font-size: 14px;
  24233. margin-bottom: 10px;
  24234. }
  24235. .add_chapters_box {
  24236. text-align: left;
  24237. background-color: #fff;
  24238. width: 100%;
  24239. border-radius: 4px;
  24240. font-size: 16px;
  24241. box-sizing: border-box;
  24242. position: relative;
  24243. padding: 0 15px;
  24244. height: auto;
  24245. overflow-y: auto;
  24246. overflow-x: hidden;
  24247. border: 1px solid #cad1dc;
  24248. }
  24249. .add_chapters_box.add_c_none {
  24250. display: flex;
  24251. justify-content: center;
  24252. align-items: center;
  24253. padding: 15px;
  24254. }
  24255. .add_c_none>img {
  24256. width: 25px;
  24257. }
  24258. .add_chapters_box.add_c_none>span {
  24259. font-size: 14px;
  24260. font-weight: 400;
  24261. margin: 0 0 5px 5px;
  24262. }
  24263. .homework_box {
  24264. display: flex;
  24265. align-items: flex-start;
  24266. flex-wrap: wrap;
  24267. margin: 15px 0 0 0;
  24268. flex-direction: column;
  24269. align-content: flex-start;
  24270. }
  24271. .course_homework {
  24272. display: flex;
  24273. justify-content: center;
  24274. flex-direction: row;
  24275. align-items: center;
  24276. margin: 0 10px 0 0;
  24277. }
  24278. .course_homework>>>.el-input__inner {
  24279. width: 140px;
  24280. margin-left: 15px;
  24281. }
  24282. .chapter_upload_move {
  24283. position: relative;
  24284. background-color: #fff;
  24285. position: absolute;
  24286. width: 100%;
  24287. top: 0px;
  24288. left: 0px;
  24289. border: 1px solid #eee;
  24290. border-radius: 5px;
  24291. transition: width 2s;
  24292. -moz-transition: width 2s;
  24293. -webkit-transition: width 2s;
  24294. -o-transition: width 2s;
  24295. }
  24296. .chapter_upload_l_i {
  24297. background-image: url("../../../assets/icon.png");
  24298. background-position: 3px -165px;
  24299. width: 30px;
  24300. height: 30px;
  24301. margin: 10px auto 0 auto;
  24302. }
  24303. .course_input_box {
  24304. display: flex;
  24305. margin-right: 20px;
  24306. min-width: 400px;
  24307. width: calc(100% - 350px);
  24308. align-items: center;
  24309. position: relative;
  24310. margin-bottom: 15px;
  24311. }
  24312. .course_input_box2 {
  24313. display: flex;
  24314. width: 100%;
  24315. align-items: center;
  24316. position: relative;
  24317. flex-wrap: wrap;
  24318. }
  24319. .course_input_box>.binfo_input {
  24320. width: calc(100%);
  24321. margin: 0;
  24322. border: 1.5px solid rgb(202, 209, 220);
  24323. border-radius: 5px;
  24324. font-weight: 600;
  24325. padding: 12px 14px 12px 71px;
  24326. }
  24327. .bb_courseIcon {
  24328. width: 57px;
  24329. height: 45px;
  24330. background: #f0f4fa;
  24331. border-radius: 5px 0px 0px 5px;
  24332. display: flex;
  24333. align-items: center;
  24334. justify-content: center;
  24335. border-right: 1.5px solid rgb(202, 209, 220);
  24336. box-sizing: border-box;
  24337. position: absolute;
  24338. left: 1.5px;
  24339. }
  24340. .bb_courseIcon>img {
  24341. width: 25px;
  24342. height: auto;
  24343. }
  24344. .big_box {
  24345. /* margin-top: 20px; */
  24346. display: flex;
  24347. justify-content: space-between;
  24348. /* border-bottom: 1px solid #E0E2ED; */
  24349. }
  24350. .left_first {
  24351. display: flex;
  24352. flex-direction: column;
  24353. flex-wrap: nowrap;
  24354. width: calc(100% - 310px);
  24355. padding: 20px;
  24356. box-sizing: border-box;
  24357. background: #fff;
  24358. border-radius: 5px;
  24359. }
  24360. .right_first {
  24361. width: 300px;
  24362. display: flex;
  24363. align-items: center;
  24364. justify-content: center;
  24365. /* border-left: 1px solid #E0E2ED; */
  24366. box-sizing: border-box;
  24367. padding: 20px;
  24368. flex-direction: column;
  24369. background: #fff;
  24370. border-radius: 5px;
  24371. }
  24372. .ai_box {
  24373. width: 204px;
  24374. display: flex;
  24375. justify-content: flex-end;
  24376. margin-bottom: 15px;
  24377. }
  24378. .ai_content {
  24379. display: flex;
  24380. align-items: center;
  24381. font-size: 14px;
  24382. padding: 7px 20px;
  24383. box-sizing: border-box;
  24384. box-shadow: 0px 0px 12px 1px rgba(0, 0, 0, 0.16);
  24385. border-radius: 12px;
  24386. font-weight: 700;
  24387. cursor: pointer;
  24388. }
  24389. .ai_content>img {
  24390. width: 40px;
  24391. margin-right: 5px;
  24392. }
  24393. .c_info_title {
  24394. padding: 15px 0 15px 0;
  24395. font-size: 16px;
  24396. font-weight: bold;
  24397. margin: 0 0 0 20px;
  24398. box-sizing: border-box;
  24399. display: flex;
  24400. align-items: center;
  24401. line-height: 20px;
  24402. }
  24403. .c_info_title::before {
  24404. content: "";
  24405. display: block;
  24406. width: 3px;
  24407. height: 20px;
  24408. background: #0061ff;
  24409. border-radius: 3px;
  24410. margin: 0 5px 0 0;
  24411. }
  24412. .right_title {
  24413. height: 30px;
  24414. padding: 15px 0 15px 20px;
  24415. border-bottom: 1px solid #f2f2f2;
  24416. font-size: 1.5em;
  24417. font-weight: bold;
  24418. color: #0f7eff;
  24419. margin: 0 auto;
  24420. }
  24421. .people {
  24422. border: 1px solid rgb(229 229 229);
  24423. /* height: 495px; */
  24424. height: 350px;
  24425. border-radius: 5px;
  24426. width: 100%;
  24427. overflow: auto;
  24428. }
  24429. .people_top {
  24430. display: flex;
  24431. width: 100%;
  24432. /* justify-content: space-between; */
  24433. /* align-items: center; */
  24434. flex-direction: column;
  24435. padding: 10px 10px 0;
  24436. box-sizing: border-box;
  24437. }
  24438. .people_nav,
  24439. .people_top_right {
  24440. /* padding: 20px 0 0 20px; */
  24441. }
  24442. .people_top_right {
  24443. height: 40px;
  24444. margin-bottom: 10px;
  24445. }
  24446. .people_search {
  24447. display: flex;
  24448. position: relative;
  24449. }
  24450. .people_search>>>.el-input__inner {
  24451. /* height: 25px; */
  24452. width: 100%;
  24453. }
  24454. .search_img {
  24455. width: 20px;
  24456. height: 20px;
  24457. position: absolute;
  24458. right: 10px;
  24459. top: 50%;
  24460. transform: translateY(-50%);
  24461. }
  24462. .search_img>img {
  24463. width: 100%;
  24464. height: 100%;
  24465. }
  24466. .people_name {
  24467. display: flex;
  24468. justify-content: flex-start;
  24469. padding: 20px 10px;
  24470. flex-direction: column;
  24471. flex-wrap: wrap;
  24472. }
  24473. .p_box {
  24474. position: relative;
  24475. }
  24476. .people_name>>>.el-checkbox {
  24477. width: 100%;
  24478. display: flex;
  24479. align-items: center;
  24480. margin-bottom: 10px;
  24481. }
  24482. .people_name>>>.el-checkbox__label {
  24483. text-overflow: ellipsis;
  24484. overflow: hidden;
  24485. width: calc(100%);
  24486. }
  24487. .people_name2>>>.el-checkbox__label {
  24488. width: calc(100% - 130px);
  24489. }
  24490. .inviteCode {
  24491. position: absolute;
  24492. right: 30px;
  24493. color: #237ade;
  24494. top: 0;
  24495. cursor: pointer;
  24496. font-size: 13px;
  24497. }
  24498. .noneInvite {
  24499. color: #a8a8a8;
  24500. }
  24501. .inviteImg {
  24502. position: absolute;
  24503. right: 5px;
  24504. top: 0;
  24505. width: 20px;
  24506. }
  24507. .right_img {
  24508. width: 150px;
  24509. height: 150px;
  24510. margin: 0 auto;
  24511. }
  24512. .right_img>img {
  24513. width: 100%;
  24514. height: 100%;
  24515. }
  24516. .number {
  24517. margin-top: 20px;
  24518. color: #4aa6ff;
  24519. text-decoration: underline;
  24520. }
  24521. .success_button {
  24522. display: flex;
  24523. text-align: center;
  24524. margin: 5% 0 auto;
  24525. flex-direction: row;
  24526. justify-content: center;
  24527. }
  24528. .look_course {
  24529. margin-right: 40px;
  24530. background: #3d67bc;
  24531. width: 200px;
  24532. height: 35px;
  24533. line-height: 35px;
  24534. color: #fff;
  24535. text-align: center;
  24536. font-size: 14px;
  24537. border-radius: 5px;
  24538. cursor: pointer;
  24539. }
  24540. .attend_others {
  24541. width: 250px;
  24542. background: #4fb13c;
  24543. height: 35px;
  24544. line-height: 35px;
  24545. color: #fff;
  24546. text-align: center;
  24547. font-size: 14px;
  24548. border-radius: 5px;
  24549. cursor: pointer;
  24550. }
  24551. .dialog_diy2>>>.el-dialog__body {
  24552. text-align: center;
  24553. }
  24554. .write_togother {
  24555. position: absolute;
  24556. right: 45px;
  24557. display: flex;
  24558. top: 5%;
  24559. }
  24560. .write_people {
  24561. font-size: 14px;
  24562. line-height: 50px;
  24563. padding-right: 10px;
  24564. }
  24565. .end_write {
  24566. background: #3d67bc;
  24567. color: #fff;
  24568. width: 100px;
  24569. height: 35px;
  24570. line-height: 35px;
  24571. text-align: center;
  24572. font-size: 14px;
  24573. border-radius: 5px;
  24574. cursor: pointer;
  24575. }
  24576. .chapter_upload+.chapter_upload {
  24577. /* margin-top: 15px; */
  24578. border-top: 1px solid #e7ebf1;
  24579. }
  24580. .chapter_upload {
  24581. height: 45px;
  24582. position: relative;
  24583. display: flex;
  24584. align-items: center;
  24585. width: 100%;
  24586. min-height: 45px;
  24587. /* box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16); */
  24588. /* border-radius: 4px; */
  24589. /* overflow: hidden; */
  24590. box-sizing: border-box;
  24591. }
  24592. .chapter_upload_drag {
  24593. position: absolute;
  24594. cursor: pointer;
  24595. width: 16px;
  24596. height: 16px;
  24597. left: -9px;
  24598. background-image: url("../../../assets/icon/new/icon_course_drag.png");
  24599. background-size: 100% 100%;
  24600. z-index: 10;
  24601. display: none;
  24602. }
  24603. .isNavStage>.chapter_upload_drag {
  24604. background-image: url("../../../assets/icon/new/icon_course_drag_active2.png");
  24605. }
  24606. .chapter_upload_t {
  24607. background-color: #fff;
  24608. position: absolute;
  24609. height: 100%;
  24610. top: 0px;
  24611. left: 0px;
  24612. box-sizing: border-box;
  24613. }
  24614. .chapter_upload_o {
  24615. width: 100%;
  24616. height: 100%;
  24617. position: relative;
  24618. z-index: 1;
  24619. }
  24620. .chapter_upload_ic {
  24621. margin: 0 15px 0px auto;
  24622. display: flex;
  24623. align-items: center;
  24624. }
  24625. .chapter_upload_ic_l {
  24626. width: 50px;
  24627. height: 50px;
  24628. float: left;
  24629. }
  24630. .chapter_upload_ic_l div {
  24631. width: 30px;
  24632. height: 35px;
  24633. background: url("../../../assets/icon/icon.png");
  24634. }
  24635. .chapter_upload_ic_edit {
  24636. height: 100%;
  24637. display: flex;
  24638. align-items: center;
  24639. cursor: pointer;
  24640. margin: 0 10px 0 0;
  24641. }
  24642. .chapter_upload_ic_edit div {
  24643. width: 18px;
  24644. height: 18px;
  24645. background-image: url("../../../assets/icon/new/edit_u.png");
  24646. background-size: 100% 100%;
  24647. }
  24648. .chapter_upload_ic_check {
  24649. height: 100%;
  24650. display: flex;
  24651. align-items: center;
  24652. cursor: pointer;
  24653. margin: 0 10px 0 0;
  24654. }
  24655. .chapter_upload_ic_check div {
  24656. width: 18px;
  24657. height: 18px;
  24658. background-image: url("../../../assets/icon/course/lookeye.svg");
  24659. background-size: 100% 100%;
  24660. }
  24661. .chapter_upload_ic_r {
  24662. height: 100%;
  24663. display: flex;
  24664. align-items: center;
  24665. cursor: pointer;
  24666. }
  24667. .chapter_upload_ic_r div {
  24668. width: 18px;
  24669. height: 18px;
  24670. background-image: url("../../../assets/icon/new/delete_u.png");
  24671. background-size: 100% 100%;
  24672. }
  24673. .chapter_upload_n {
  24674. display: flex;
  24675. text-indent: 10px;
  24676. text-decoration: none;
  24677. text-overflow: ellipsis;
  24678. white-space: nowrap;
  24679. overflow: hidden;
  24680. width: 55%;
  24681. margin-left: 10px;
  24682. cursor: pointer;
  24683. margin-top: 2px;
  24684. align-items: center;
  24685. }
  24686. .chapter_upload_l_i2,
  24687. .chapter_upload_l_i3,
  24688. .chapter_upload_l_i8,
  24689. .chapter_upload_l_i6,
  24690. .chapter_upload_l_i12,
  24691. .chapter_upload_l_i14,
  24692. .chapter_upload_l_i13 {
  24693. width: 15px;
  24694. height: 15px;
  24695. background-size: 100% 100%;
  24696. }
  24697. .chapter_upload_l_i2 {
  24698. background-image: url("../../../assets/icon/new/u_word.png");
  24699. }
  24700. .chapter_upload_l_i3 {
  24701. background-image: url("../../../assets/icon/new/u_video.png");
  24702. }
  24703. .chapter_upload_l_i8 {
  24704. background-image: url("../../../assets/icon/new/u_url.png");
  24705. }
  24706. .chapter_upload_l_i14 {
  24707. background-image: url("../../../assets/icon/new/u_source.png");
  24708. }
  24709. .chapter_upload_l_i6 {
  24710. background-image: url("../../../assets/icon/new/u_picture.png");
  24711. }
  24712. .chapter_upload_l_i12 {
  24713. background-image: url("../../../assets/icon/new/u_word.png");
  24714. }
  24715. .chapter_upload_l_i13 {
  24716. background-image: url("../../../assets/icon/new/u_img.png");
  24717. }
  24718. .chapter_upload_noSee {
  24719. background-image: url("../../../assets/icon/new/u_noUpload.png");
  24720. width: 18px;
  24721. height: 18px;
  24722. background-size: 100% 100%;
  24723. display: block;
  24724. margin-right: 10px;
  24725. }
  24726. .chapter_upload_ud {
  24727. display: flex;
  24728. flex-direction: row;
  24729. justify-content: center;
  24730. margin: 0 10px 0 0;
  24731. }
  24732. .chapter_upload_ud>.chapter_upload_up {
  24733. margin-bottom: 0;
  24734. margin-right: 10px;
  24735. }
  24736. .chapter_upload_down,
  24737. .chapter_upload_up {
  24738. width: 20px;
  24739. height: 20px;
  24740. background: #e4eaf2;
  24741. cursor: pointer;
  24742. margin: 0 auto;
  24743. border-radius: 5px;
  24744. display: flex;
  24745. justify-content: center;
  24746. align-items: center;
  24747. }
  24748. .chapter_upload_up::after,
  24749. .chapter_upload_down::after {
  24750. content: "";
  24751. background-image: url("../../../assets/icon/new/downBtn.png");
  24752. width: 13px;
  24753. height: 13px;
  24754. background-size: 100% 100%;
  24755. display: block;
  24756. }
  24757. .chapter_upload_up::after {
  24758. background-image: url("../../../assets/icon/new/upBtn.png") !important;
  24759. }
  24760. .chapter_upload_up {
  24761. margin-bottom: 5px;
  24762. }
  24763. .chapter_upload_ud2 {
  24764. display: flex;
  24765. flex-direction: row;
  24766. justify-content: center;
  24767. margin: 0 10px 0 0;
  24768. }
  24769. .chapter_upload_ud2>.chapter_upload_up2 {
  24770. margin-bottom: 0;
  24771. margin-right: 10px;
  24772. }
  24773. .chapter_upload_down2,
  24774. .chapter_upload_up2 {
  24775. cursor: pointer;
  24776. margin: 0 auto;
  24777. border-radius: 5px;
  24778. display: flex;
  24779. justify-content: center;
  24780. align-items: center;
  24781. color: #717c8d;
  24782. font-size: 14px;
  24783. }
  24784. .chapter_upload_up2 {
  24785. margin-right: 10px;
  24786. }
  24787. .chapter_upload_up2::before,
  24788. .chapter_upload_down2::before {
  24789. content: "";
  24790. background-image: url("../../../assets/icon/new/c_down.png");
  24791. width: 14px;
  24792. height: 14px;
  24793. background-size: 100% 100%;
  24794. display: block;
  24795. margin-right: 5px;
  24796. }
  24797. .chapter_upload_up2::before {
  24798. background-image: url("../../../assets/icon/new/c_up.png") !important;
  24799. }
  24800. .addWordStyle {
  24801. display: flex;
  24802. flex-direction: row;
  24803. justify-content: flex-start;
  24804. overflow-x: auto;
  24805. white-space: nowrap;
  24806. flex-wrap: wrap;
  24807. }
  24808. /* table 样式 */
  24809. .cont>>>table {
  24810. border-top: 1px solid #ccc;
  24811. border-left: 1px solid #ccc;
  24812. }
  24813. .cont>>>table td,
  24814. .cont>>>table th {
  24815. border-bottom: 1px solid #ccc;
  24816. border-right: 1px solid #ccc;
  24817. /* padding: 20px 5px; */
  24818. padding: 5px 10px;
  24819. max-width: 0px;
  24820. height: 30px;
  24821. vertical-align: baseline;
  24822. }
  24823. .cont>>>table th {
  24824. border-bottom: 2px solid #ccc;
  24825. text-align: center;
  24826. }
  24827. /* blockquote 样式 */
  24828. .cont>>>blockquote {
  24829. display: block;
  24830. border-left: 8px solid #d0e5f2;
  24831. padding: 5px 10px;
  24832. margin: 10px 0;
  24833. line-height: 1.4;
  24834. font-size: 100%;
  24835. background-color: #f1f1f1;
  24836. }
  24837. /* code 样式 */
  24838. .cont>>>code {
  24839. display: inline-block;
  24840. /* *display: inline; */
  24841. zoom: 1;
  24842. background-color: #f1f1f1;
  24843. border-radius: 3px;
  24844. padding: 3px 5px;
  24845. margin: 0 3px;
  24846. }
  24847. .cont>>>pre code {
  24848. display: block;
  24849. }
  24850. /* ul ol 样式 */
  24851. .cont>>>ul,
  24852. ol {
  24853. margin: 10px 0 10px 20px;
  24854. }
  24855. .wordbox {
  24856. display: flex;
  24857. flex-wrap: wrap;
  24858. cursor: pointer;
  24859. width: 100%;
  24860. }
  24861. .checkword {
  24862. width: 22px;
  24863. height: 22px;
  24864. margin: 10px auto 0;
  24865. cursor: pointer;
  24866. }
  24867. .checkword img {
  24868. width: 100%;
  24869. }
  24870. .stepBg {
  24871. display: flex;
  24872. justify-content: space-between;
  24873. align-items: center;
  24874. background: #fff;
  24875. width: calc(100%);
  24876. margin: 0 auto;
  24877. }
  24878. .stepBorder {
  24879. height: 3px !important;
  24880. background: #cad1dc;
  24881. width: 100px !important;
  24882. margin: 0 15px !important;
  24883. position: relative;
  24884. }
  24885. .border-active {
  24886. background: #3681fc !important;
  24887. }
  24888. .border-active::before,
  24889. .border-active::after {
  24890. border-color: #3681fc !important;
  24891. }
  24892. .stepBorder::before,
  24893. .stepBorder::after {
  24894. content: "";
  24895. width: 9px;
  24896. height: 9px;
  24897. background: #ffffff;
  24898. opacity: 1;
  24899. border: 2px solid #acb4bf;
  24900. display: block;
  24901. box-sizing: border-box;
  24902. border-radius: 50%;
  24903. position: absolute;
  24904. top: 50%;
  24905. transform: translateY(-50%);
  24906. }
  24907. .stepBorder::after {
  24908. right: -9px;
  24909. }
  24910. .stepTop {
  24911. width: 100%;
  24912. /* border-radius: 10px; */
  24913. display: flex;
  24914. justify-content: center;
  24915. align-items: center;
  24916. flex-wrap: nowrap;
  24917. background: #fff;
  24918. /* top: 18%; */
  24919. height: 80px;
  24920. border-bottom: 2px solid rgb(228, 232, 237);
  24921. box-sizing: border-box;
  24922. }
  24923. .stepTop2 {
  24924. width: 100%;
  24925. /* border-radius: 10px; */
  24926. display: flex;
  24927. justify-content: center;
  24928. align-items: center;
  24929. flex-wrap: nowrap;
  24930. background: #fff;
  24931. /* top: 18%; */
  24932. height: 20px;
  24933. border-bottom: 2px solid rgb(228, 232, 237);
  24934. box-sizing: border-box;
  24935. overflow: hidden;
  24936. cursor: pointer;
  24937. }
  24938. .stepTop>div img {
  24939. width: 100%;
  24940. }
  24941. .stepTop>div {
  24942. height: 50px;
  24943. width: 180px;
  24944. cursor: pointer;
  24945. margin: 10px 0;
  24946. border-radius: 10px;
  24947. }
  24948. .first,
  24949. .second,
  24950. .third,
  24951. .four {
  24952. background: #3681fc;
  24953. height: 90px;
  24954. color: #fff;
  24955. display: flex;
  24956. flex-direction: row;
  24957. align-items: center;
  24958. justify-content: center;
  24959. }
  24960. .first>div:nth-child(1),
  24961. .second>div:nth-child(1),
  24962. .third>div:nth-child(1),
  24963. .four>div:nth-child(1) {
  24964. margin: 5px 10px 0 0;
  24965. width: 2rem;
  24966. }
  24967. .firstNo,
  24968. .secondNo,
  24969. .thirdNo,
  24970. .fourNo {
  24971. background: #e7e7e7;
  24972. color: #adadad;
  24973. display: flex;
  24974. flex-direction: row;
  24975. align-items: center;
  24976. justify-content: center;
  24977. }
  24978. .firstNo>div:nth-child(1),
  24979. .secondNo>div:nth-child(1),
  24980. .thirdNo>div:nth-child(1),
  24981. .fourNo>div:nth-child(1) {
  24982. margin: 5px 10px 0 0;
  24983. width: 2rem;
  24984. }
  24985. .uploadWidth>>>.el-upload {
  24986. width: 60px;
  24987. height: 60px;
  24988. position: relative;
  24989. }
  24990. .addPeople {
  24991. background: #fa6060;
  24992. width: 150px;
  24993. height: 40px;
  24994. color: #fff;
  24995. border-radius: 5px;
  24996. text-align: center;
  24997. line-height: 40px;
  24998. font-size: 14px;
  24999. cursor: pointer;
  25000. }
  25001. .kcImg {
  25002. width: 60px;
  25003. margin-left: 10px;
  25004. }
  25005. .zyImg {
  25006. width: 55px;
  25007. margin: 0 10px;
  25008. }
  25009. .deleteZy {
  25010. width: 20px;
  25011. position: absolute;
  25012. top: 5px;
  25013. right: 5px;
  25014. cursor: pointer;
  25015. }
  25016. .kcImg>img,
  25017. .zyImg>img,
  25018. .deleteZy>img {
  25019. width: 100%;
  25020. height: 100%;
  25021. }
  25022. .zyBox {
  25023. display: flex;
  25024. flex-direction: row;
  25025. align-items: center;
  25026. background: #67d37d;
  25027. color: #fff;
  25028. width: 210px;
  25029. margin: 20px 20px 0 0;
  25030. border-radius: 10px;
  25031. height: 70px;
  25032. position: relative;
  25033. }
  25034. .upCss {
  25035. display: flex;
  25036. flex-direction: row;
  25037. justify-content: flex-start;
  25038. }
  25039. .upCss>>>.el-icon-plus {
  25040. position: none !important;
  25041. width: 200px;
  25042. height: 100px;
  25043. display: flex;
  25044. flex-wrap: nowrap;
  25045. flex-direction: column;
  25046. align-items: center;
  25047. justify-content: center;
  25048. border: 1px dashed #ccc;
  25049. min-width: 78px;
  25050. min-height: 100px;
  25051. z-index: 999;
  25052. }
  25053. .upCss>>>.el-upload-list__item-name {
  25054. width: 100px;
  25055. white-space: nowrap;
  25056. overflow: hidden;
  25057. text-overflow: ellipsis;
  25058. }
  25059. .upCss>>>.el-upload-list__item .el-icon-close {
  25060. font-size: 20px;
  25061. z-index: 9999;
  25062. }
  25063. .addStageImg {
  25064. min-width: 20px;
  25065. min-height: 20px;
  25066. width: 20px;
  25067. height: 20px;
  25068. cursor: pointer;
  25069. }
  25070. .addHW {
  25071. width: 28px;
  25072. height: 28px;
  25073. cursor: pointer;
  25074. }
  25075. .addStageImg>img,
  25076. .addHW>img {
  25077. width: 100%;
  25078. height: 100%;
  25079. }
  25080. .addNewPP>>>.el-dialog__body {
  25081. padding: 5px 20px;
  25082. }
  25083. .addNewPP>>>.el-dialog {
  25084. margin-top: 5vh !important;
  25085. }
  25086. .addNewPP2>>>.el-dialog__body {
  25087. padding: 5px 0;
  25088. }
  25089. .addNewPP2>>>.el-dialog {
  25090. margin-top: 5vh !important;
  25091. }
  25092. .isHeight {
  25093. height: 680px;
  25094. }
  25095. .toolChoose {
  25096. display: flex;
  25097. /* width: 100%; */
  25098. flex-direction: row;
  25099. flex-wrap: wrap;
  25100. }
  25101. .tool,
  25102. .isToolChoose {
  25103. display: flex;
  25104. flex-direction: column;
  25105. flex-wrap: nowrap;
  25106. width: fit-content;
  25107. margin: 10px 0 10px 0;
  25108. align-items: center;
  25109. border: 2px solid #dbdbdb00;
  25110. padding: 10px 20px;
  25111. border-radius: 5px;
  25112. cursor: pointer;
  25113. /* box-shadow: 0 0 2px 0px #dedede; */
  25114. position: relative;
  25115. box-sizing: border-box;
  25116. }
  25117. .tool:hover {
  25118. border: 2px solid #a5c7ff;
  25119. }
  25120. .tool:hover>.noCTool {
  25121. display: block;
  25122. opacity: 0.5;
  25123. }
  25124. .isToolChoose {
  25125. border: 2px solid #438aff !important;
  25126. box-shadow: 0 0 2px 0px #438aff;
  25127. opacity: 1 !important;
  25128. }
  25129. .isCTool,
  25130. .noCTool {
  25131. width: 30px;
  25132. height: 30px;
  25133. position: absolute;
  25134. top: -4px;
  25135. right: -4px;
  25136. }
  25137. .noCTool {
  25138. display: none;
  25139. }
  25140. .isCTool>img,
  25141. .noCTool>img {
  25142. width: 100%;
  25143. height: 100%;
  25144. }
  25145. .tool+.tool {
  25146. margin-right: 10px;
  25147. }
  25148. .whiteBIcon {
  25149. width: 80px;
  25150. cursor: pointer;
  25151. display: flex;
  25152. flex-direction: column;
  25153. flex-wrap: nowrap;
  25154. align-items: center;
  25155. font-size: 14px;
  25156. }
  25157. .whiteBIcon>img,
  25158. .toolIcon>img,
  25159. .arrow>img {
  25160. width: 100%;
  25161. height: 100%;
  25162. }
  25163. .check img {
  25164. width: 20px;
  25165. height: 20px;
  25166. }
  25167. .whiteBIcon>img {
  25168. box-shadow: 0px 4px 8px 0px rgb(44 133 255 / 14%);
  25169. border-radius: 15px;
  25170. }
  25171. .whiteBIcon>div:nth-child(2) {
  25172. height: 20px;
  25173. line-height: 20px;
  25174. }
  25175. .check {
  25176. /* width: 20px;
  25177. height: 20px; */
  25178. cursor: pointer;
  25179. margin: 10px 0 0;
  25180. }
  25181. .checkDiv {
  25182. display: flex;
  25183. align-items: center;
  25184. }
  25185. .checkDiv span {
  25186. margin-left: 5px;
  25187. color: #858585;
  25188. }
  25189. .customWidth>>>.el-dialog {
  25190. min-width: 600px !important;
  25191. }
  25192. .CollaborativeCss {
  25193. width: 100%;
  25194. display: flex;
  25195. justify-content: center;
  25196. align-items: center;
  25197. box-sizing: border-box;
  25198. padding: 10px 0;
  25199. cursor: pointer;
  25200. }
  25201. .CollaborativeCss >>> .el-tooltip {
  25202. overflow: hidden;
  25203. white-space: nowrap;
  25204. text-overflow: ellipsis;
  25205. }
  25206. .CollaborativeCss2 {
  25207. background: #e0eafb;
  25208. color: #3681fc;
  25209. font-weight: 700;
  25210. border-radius: 5px;
  25211. }
  25212. .a_addBox {
  25213. margin: 10px 0;
  25214. background: #fff;
  25215. padding: 15px;
  25216. /* max-height: 600px; */
  25217. overflow: auto;
  25218. }
  25219. .a_add_box {
  25220. border-bottom: 2px solid #eee;
  25221. padding-bottom: 25px;
  25222. }
  25223. .a_add_head {
  25224. display: flex;
  25225. align-items: center;
  25226. justify-content: space-between;
  25227. margin: 10px 0 0 0;
  25228. font-size: 18px;
  25229. }
  25230. .a_add_checkType {
  25231. margin-top: 10px;
  25232. display: flex;
  25233. font-size: 14px;
  25234. align-items: center;
  25235. }
  25236. .a_add_checkType span {
  25237. box-sizing: border-box;
  25238. padding: 0 0 5px 0;
  25239. cursor: pointer;
  25240. }
  25241. .a_add_checkType span+span {
  25242. margin-left: 10px;
  25243. }
  25244. .a_add_checkType .active {
  25245. border-bottom: 2px solid #409eff;
  25246. color: #409eff;
  25247. }
  25248. .a_add_head .a_add_head_input {
  25249. /* width: 540px; */
  25250. width: 100%;
  25251. }
  25252. .a_add_head .a_add_head_div {
  25253. display: flex;
  25254. align-items: center;
  25255. justify-content: space-between;
  25256. }
  25257. .a_add_body {
  25258. display: flex;
  25259. /* align-items: center; */
  25260. align-items: flex-end;
  25261. }
  25262. .a_add_input {
  25263. display: flex;
  25264. align-items: center;
  25265. flex-wrap: wrap;
  25266. }
  25267. .a_add_input_choice {
  25268. flex-direction: column;
  25269. margin-right: 10px;
  25270. }
  25271. .a_add_input_choice>>>.el-radio {
  25272. display: flex;
  25273. align-items: center;
  25274. flex-direction: row-reverse;
  25275. margin: 30px 0 0 0;
  25276. position: relative;
  25277. }
  25278. .a_add_input_choice>>>.el-checkbox {
  25279. display: flex;
  25280. align-items: center;
  25281. flex-direction: row-reverse;
  25282. margin: 30px 0 0 0;
  25283. position: relative;
  25284. }
  25285. .width100 {
  25286. width: 100%;
  25287. }
  25288. .a_add_input .a_add_persent {
  25289. width: 100%;
  25290. }
  25291. .a_add_persent_div {
  25292. width: 100%;
  25293. display: flex;
  25294. align-items: center;
  25295. }
  25296. .a_add_persent_div span {
  25297. margin: 5px 0;
  25298. }
  25299. .a_add_persent_div span:nth-child(1) {
  25300. width: 30%;
  25301. }
  25302. .a_add_persent_div span:nth-child(2) {
  25303. width: 7%;
  25304. }
  25305. .a_add_persent_div span:nth-child(3) {
  25306. width: 40%;
  25307. }
  25308. .a_add_body_div {
  25309. display: flex;
  25310. align-items: center;
  25311. justify-content: center;
  25312. /* flex-direction: column; */
  25313. position: absolute;
  25314. right: -20px;
  25315. transform: translateX(100%);
  25316. }
  25317. .a_add_body_div>>>.el-button--primary {
  25318. background: #466b99;
  25319. border: none;
  25320. }
  25321. .all_choose {
  25322. display: flex;
  25323. flex-direction: row;
  25324. align-items: flex-start;
  25325. width: 100%;
  25326. }
  25327. .all_choose+.all_choose {
  25328. /* margin-top: 10px */
  25329. }
  25330. .all_choose>span {
  25331. min-width: fit-content;
  25332. display: block;
  25333. white-space: nowrap;
  25334. overflow: hidden;
  25335. text-overflow: ellipsis;
  25336. margin-right: 20px;
  25337. font-weight: bold;
  25338. font-size: 14px;
  25339. }
  25340. .all_choose>>>.el-checkbox-group {
  25341. display: flex;
  25342. flex-direction: row;
  25343. width: 100%;
  25344. flex-wrap: wrap;
  25345. align-content: center;
  25346. justify-content: flex-start;
  25347. align-items: center;
  25348. margin-top: 3px;
  25349. }
  25350. .all_choose>.el-checkbox-group>>>.el-checkbox {
  25351. margin-bottom: 10px;
  25352. display: flex;
  25353. flex-direction: row;
  25354. align-items: center;
  25355. margin-right: 10px;
  25356. }
  25357. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  25358. min-width: 80px;
  25359. overflow: hidden;
  25360. width: 80px;
  25361. text-overflow: ellipsis;
  25362. white-space: nowrap;
  25363. }
  25364. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  25365. width: auto;
  25366. }
  25367. .choose>div:nth-child(3)>span {
  25368. /* letter-spacing: 0 !important; */
  25369. }
  25370. .choose {
  25371. display: flex;
  25372. flex-direction: column;
  25373. flex-wrap: nowrap;
  25374. height: 100%;
  25375. justify-content: space-evenly;
  25376. align-items: flex-start;
  25377. }
  25378. .both {
  25379. display: flex;
  25380. flex-direction: row;
  25381. flex-wrap: wrap;
  25382. width: 100%;
  25383. align-items: center;
  25384. justify-content: flex-start;
  25385. margin: 0 0 15px;
  25386. }
  25387. .notice>>>.el-dialog {
  25388. width: 500px !important;
  25389. text-align: center;
  25390. }
  25391. .notice>>>.el-button {
  25392. margin-top: 20px;
  25393. }
  25394. .whiteBg {
  25395. /* background: #fff; */
  25396. border-radius: 10px;
  25397. }
  25398. .wb_j_box {
  25399. display: flex;
  25400. width: 100%;
  25401. padding: 0 20px 0;
  25402. box-sizing: border-box;
  25403. }
  25404. .wb_j_box_content {
  25405. width: calc(100% - 55% - 100px);
  25406. display: flex;
  25407. align-items: center;
  25408. }
  25409. .wb_j_box_p_box {
  25410. max-width: calc(100% - 200px);
  25411. word-break: break-all;
  25412. overflow: hidden;
  25413. margin: 0 0 0 10px;
  25414. font-size: 14px;
  25415. color: #6e6e6e;
  25416. z-index: 999;
  25417. }
  25418. .chooseWho {
  25419. display: flex;
  25420. width: 410px;
  25421. flex-direction: row;
  25422. flex-wrap: nowrap;
  25423. justify-content: space-between;
  25424. padding-bottom: 10px;
  25425. }
  25426. .chooseWho>div {
  25427. cursor: pointer;
  25428. padding-bottom: 10px;
  25429. font-weight: bold;
  25430. }
  25431. .isChooseActive {
  25432. color: #3e88f4;
  25433. border-bottom: 2px solid #2f80f3;
  25434. }
  25435. .toolSort {
  25436. display: flex;
  25437. flex-direction: row;
  25438. flex-wrap: wrap;
  25439. justify-content: flex-start;
  25440. align-items: flex-start;
  25441. }
  25442. .toolSort>div {
  25443. margin-right: 10px;
  25444. }
  25445. .tools {
  25446. width: 100%;
  25447. display: flex;
  25448. flex-direction: column;
  25449. flex-wrap: nowrap;
  25450. align-items: flex-start;
  25451. }
  25452. .leftTools,
  25453. .rightTools {
  25454. width: 50%;
  25455. }
  25456. .leftTools+.leftTools {
  25457. border-top: 1px solid #dbdbdb;
  25458. padding-top: 30px;
  25459. }
  25460. .rightTools {
  25461. display: flex;
  25462. flex-direction: row;
  25463. flex-wrap: nowrap;
  25464. justify-content: space-around;
  25465. }
  25466. .firstToolList {
  25467. display: flex;
  25468. flex-direction: column;
  25469. flex-wrap: nowrap;
  25470. align-items: center;
  25471. }
  25472. .iconList {
  25473. display: flex;
  25474. flex-direction: row;
  25475. flex-wrap: wrap;
  25476. justify-content: flex-start;
  25477. align-items: center;
  25478. margin: 20px 0 5px 0;
  25479. width: 240px;
  25480. min-width: 240px;
  25481. }
  25482. .iconTool {
  25483. display: flex;
  25484. flex-direction: column;
  25485. flex-wrap: nowrap;
  25486. align-items: center;
  25487. justify-content: flex-start;
  25488. margin: 15px 10px;
  25489. }
  25490. .toolIcon {
  25491. width: 50px;
  25492. }
  25493. .taskBorder {
  25494. /* border: 1px solid #CAD1DC; */
  25495. border-radius: 10px;
  25496. margin-top: 10px;
  25497. min-height: 670px;
  25498. position: relative;
  25499. background: #fff;
  25500. padding: 20px;
  25501. overflow: hidden;
  25502. box-sizing: border-box;
  25503. }
  25504. .smallTaskBorder {
  25505. height: 405px;
  25506. min-height: 405px !important;
  25507. overflow: hidden;
  25508. }
  25509. /* .taskBorder>div {
  25510. padding: 30px 30px 10px;
  25511. } */
  25512. .addTaskBorder {
  25513. /* border: 2px solid #5E9AFC; */
  25514. border-radius: 8px;
  25515. margin-top: 10px;
  25516. cursor: pointer;
  25517. /* height: 50px;
  25518. line-height: 50px; */
  25519. background: #fff;
  25520. padding: 15px 0;
  25521. display: flex;
  25522. align-items: center;
  25523. justify-content: center;
  25524. }
  25525. /* .addTaskBorder>div {
  25526. margin: 0 auto;
  25527. display: flex;
  25528. align-items: center;
  25529. justify-content: center;
  25530. }
  25531. .addTaskBorder>div>img {
  25532. width: 20px;
  25533. }
  25534. .addTaskBorder>div>span {
  25535. font-size: 16px;
  25536. margin-left: 10px;
  25537. color: #5E9AFC;
  25538. } */
  25539. .funBlock {
  25540. display: flex;
  25541. padding: 15px 0;
  25542. flex-direction: row;
  25543. justify-content: center;
  25544. align-items: center;
  25545. position: absolute;
  25546. right: 0;
  25547. bottom: 0;
  25548. background: #fff;
  25549. width: 100%;
  25550. height: 60px;
  25551. z-index: 9;
  25552. }
  25553. .fold {
  25554. display: flex;
  25555. margin: 0 20px;
  25556. flex-direction: row;
  25557. align-items: center;
  25558. cursor: pointer;
  25559. color: #2b7bff;
  25560. }
  25561. .arrow {
  25562. margin-right: 8px;
  25563. width: 16px;
  25564. height: 16px;
  25565. min-width: 16px;
  25566. min-height: 16px;
  25567. background-size: 100% 100%;
  25568. display: block;
  25569. background-image: url(../../../assets/icon/new/u_up.png);
  25570. /* border-left: 7px solid transparent;
  25571. border-bottom: 7px solid #717C8D;
  25572. border-top: 0px solid transparent;
  25573. border-right: 7px solid transparent; */
  25574. /* box-sizing: border-box; */
  25575. transition: all 0.3s;
  25576. }
  25577. .arrowZ {
  25578. transform: rotate(180deg);
  25579. }
  25580. .addToolFun {
  25581. display: flex;
  25582. width: 150px;
  25583. flex-direction: row;
  25584. align-items: center;
  25585. justify-content: center;
  25586. border: 2px dashed #cad1dc;
  25587. border-radius: 5px;
  25588. height: 50px;
  25589. margin: 35px auto 0;
  25590. cursor: pointer;
  25591. }
  25592. .addToolFun2 {
  25593. display: flex;
  25594. width: 150px;
  25595. border: 2px dashed #cad1dc;
  25596. flex-direction: row;
  25597. align-items: center;
  25598. justify-content: center;
  25599. border-radius: 5px;
  25600. height: 50px;
  25601. margin: 0 auto 0;
  25602. cursor: pointer;
  25603. }
  25604. .addToolFun2>div,
  25605. .addToolFun>div {
  25606. display: flex;
  25607. line-height: 50px;
  25608. }
  25609. .addToolImg {
  25610. width: 20px;
  25611. height: 20px;
  25612. margin-right: 10px;
  25613. }
  25614. .addToolsDia>>>.el-dialog__body {
  25615. padding: 20px;
  25616. }
  25617. .addToolsDia>>>.el-dialog__body>.toolChoose {
  25618. padding: 0;
  25619. }
  25620. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools {
  25621. padding: 0;
  25622. border-bottom: none;
  25623. margin-bottom: 0;
  25624. }
  25625. .addToolsDia>>>.el-dialog__body>.toolChoose>.leftTools>.chooseWho {
  25626. width: 100%;
  25627. }
  25628. .lineCss>>>.el-form-item__label {
  25629. width: auto !important;
  25630. }
  25631. .lineCss>>>.el-form-item__content {
  25632. margin-left: 50px !important;
  25633. }
  25634. .newSteps {
  25635. display: flex;
  25636. width: 100% !important;
  25637. /* height: 80px; */
  25638. cursor: pointer;
  25639. margin: 10px 0;
  25640. border-radius: 10px;
  25641. flex-direction: row;
  25642. align-content: center;
  25643. justify-content: center;
  25644. align-items: center;
  25645. margin: 0 !important;
  25646. }
  25647. /* 评价样式 */
  25648. .elist_css {
  25649. padding-bottom: 75px !important;
  25650. }
  25651. .elist_title {
  25652. margin-bottom: 10px;
  25653. }
  25654. .elist_input {
  25655. width: 100%;
  25656. }
  25657. .elist_input_box {
  25658. display: flex;
  25659. align-items: center;
  25660. flex-wrap: wrap;
  25661. }
  25662. .elist_input_box+.elist_input_box {
  25663. margin-top: 30px;
  25664. }
  25665. .elist_input .elist_input_box input {
  25666. font: inherit;
  25667. color: currentColor;
  25668. width: 100%;
  25669. /* max-width: calc(100% - 385px); */
  25670. max-width: calc(100% - 150px);
  25671. padding: 8px 14px;
  25672. display: block;
  25673. min-width: 0;
  25674. outline: none;
  25675. border: 1px solid rgba(0, 0, 0, 0.23);
  25676. border-radius: 4px;
  25677. box-sizing: border-box;
  25678. background: #fff;
  25679. margin: 0 20px 0 0;
  25680. }
  25681. .elist_input .elist_input_box span {
  25682. height: 36px;
  25683. line-height: 36px;
  25684. color: rgb(82, 82, 82);
  25685. min-width: 80px;
  25686. }
  25687. .elist_input .elist_input_box .remove {
  25688. height: 20px;
  25689. width: 20px;
  25690. min-height: 20px;
  25691. min-width: 20px;
  25692. background-size: 100% 100%;
  25693. background-position: unset;
  25694. margin-left: 5px;
  25695. }
  25696. .elist_input_box>>>.el-rate {
  25697. display: flex;
  25698. height: 36px;
  25699. align-items: center;
  25700. }
  25701. .elist_input_box .elist_inptu_text {
  25702. width: 100%;
  25703. display: flex;
  25704. align-items: center;
  25705. margin-top: 10px;
  25706. }
  25707. .elist_input_box .elist_inptu_text input {
  25708. /* width: 500px; */
  25709. width: 100%;
  25710. max-width: unset;
  25711. }
  25712. .elist_input_box>>>.el-rate__icon {
  25713. font-size: 24px;
  25714. }
  25715. .elist_btn {
  25716. margin-top: 10px;
  25717. }
  25718. .lineTitle {
  25719. /* margin-top: 15px; */
  25720. width: 110px;
  25721. font-size: 16px;
  25722. display: flex;
  25723. align-items: center;
  25724. line-height: 20px;
  25725. }
  25726. .lineTitle::before {
  25727. content: "";
  25728. display: block;
  25729. width: 3px;
  25730. height: 20px;
  25731. background: #0061ff;
  25732. border-radius: 3px;
  25733. margin: 0 5px 0 0;
  25734. }
  25735. .clineTitle::before {
  25736. content: "";
  25737. display: block;
  25738. min-width: 10px;
  25739. width: 10px;
  25740. height: 10px;
  25741. background: #0061ff;
  25742. border-radius: 50%;
  25743. margin: 0 5px 0 0;
  25744. }
  25745. .courseTop {
  25746. display: flex;
  25747. flex-direction: row;
  25748. justify-content: space-between;
  25749. align-items: center;
  25750. width: calc(100% - 40px);
  25751. margin: 0 auto;
  25752. padding: 10px 0;
  25753. }
  25754. .stepsNav {
  25755. display: flex;
  25756. flex-direction: row;
  25757. justify-content: flex-start;
  25758. align-items: center;
  25759. }
  25760. .stepsWord {
  25761. font-size: 18px;
  25762. color: #fff;
  25763. font-weight: bold;
  25764. margin-left: auto;
  25765. background: rgb(15, 126, 255);
  25766. border-radius: 5px;
  25767. padding: 3px 25px;
  25768. box-sizing: border-box;
  25769. }
  25770. .stepBox {
  25771. width: calc(100% - 40px);
  25772. height: calc(100% - 50px);
  25773. overflow: hidden;
  25774. border-radius: 5px;
  25775. margin: 0 auto;
  25776. }
  25777. .rightBox {
  25778. width: calc(100%);
  25779. background: #f0f2f5;
  25780. /* border-radius: 10px; */
  25781. overflow: auto;
  25782. height: calc(100% - 150px);
  25783. margin: 0 auto;
  25784. position: relative;
  25785. box-sizing: border-box;
  25786. }
  25787. .e_add_top {
  25788. display: flex;
  25789. justify-content: space-between;
  25790. background: #fff;
  25791. position: absolute;
  25792. right: 20px;
  25793. height: 50px;
  25794. align-items: center;
  25795. }
  25796. .e_add_title2 {
  25797. display: flex;
  25798. align-items: center;
  25799. }
  25800. .e_add_title2 span {
  25801. width: 40px;
  25802. }
  25803. .e_add_title {
  25804. display: flex;
  25805. align-items: center;
  25806. color: #b8b8b8;
  25807. font-size: 18px;
  25808. position: relative;
  25809. height: 40px;
  25810. }
  25811. .e_add_title span {
  25812. margin-right: 10px;
  25813. }
  25814. .e_add_title .el_input {
  25815. width: 300px;
  25816. }
  25817. .e_add_title>>>.el-input__inner {
  25818. width: 400px;
  25819. }
  25820. .e_add_btn {}
  25821. .e_add_content {
  25822. display: flex;
  25823. width: 100%;
  25824. }
  25825. .e_add_list {
  25826. background: #fff;
  25827. height: 500px;
  25828. width: 210px;
  25829. position: relative;
  25830. margin: 15px 5px 0 0;
  25831. flex-shrink: 0;
  25832. display: flex;
  25833. flex-direction: column;
  25834. }
  25835. .e_add_list_title {
  25836. font-size: 20px;
  25837. width: 100%;
  25838. box-sizing: border-box;
  25839. padding: 15px 40px;
  25840. text-align: center;
  25841. border-bottom: 1px solid #eaeaea;
  25842. position: relative;
  25843. display: flex;
  25844. align-items: center;
  25845. justify-content: center;
  25846. height: 57px;
  25847. background: #f6f6f6;
  25848. }
  25849. .e_add_list_title span {
  25850. overflow: hidden;
  25851. white-space: nowrap;
  25852. text-overflow: ellipsis;
  25853. }
  25854. .e_add_list_title img {
  25855. position: absolute;
  25856. right: 15px;
  25857. width: 25px;
  25858. cursor: pointer;
  25859. top: 50%;
  25860. transform: translateY(-50%);
  25861. }
  25862. .e_add_list_body {
  25863. height: calc(100% - 187px);
  25864. overflow: auto;
  25865. }
  25866. .e_add_list_child {
  25867. width: 100%;
  25868. display: flex;
  25869. align-items: center;
  25870. justify-content: center;
  25871. position: relative;
  25872. box-sizing: border-box;
  25873. padding: 15px 40px;
  25874. text-align: center;
  25875. }
  25876. .e_add_list_child span {
  25877. overflow: hidden;
  25878. white-space: nowrap;
  25879. text-overflow: ellipsis;
  25880. cursor: pointer;
  25881. }
  25882. .e_add_list_child img {
  25883. position: absolute;
  25884. right: 10px;
  25885. width: 21px;
  25886. cursor: pointer;
  25887. top: 50%;
  25888. transform: translateY(-50%);
  25889. }
  25890. .e_add_list_child+.e_add_list_child {
  25891. border-top: 1px solid #eaeaea;
  25892. }
  25893. .e_add_list_child .active {
  25894. color: #409eff;
  25895. }
  25896. .e_add_list_btn {
  25897. position: absolute;
  25898. bottom: 0;
  25899. height: 50px;
  25900. background: rgb(120, 120, 254);
  25901. width: 100%;
  25902. color: #fff;
  25903. font-size: 16px;
  25904. text-align: center;
  25905. line-height: 50px;
  25906. cursor: pointer;
  25907. }
  25908. .e_add_list_detail {
  25909. position: absolute;
  25910. bottom: 0;
  25911. height: 130px;
  25912. background: rgb(120, 120, 254);
  25913. width: 100%;
  25914. color: #fff;
  25915. font-size: 16px;
  25916. display: flex;
  25917. align-items: center;
  25918. justify-content: center;
  25919. }
  25920. .e_add_list_detail textarea {
  25921. height: 90%;
  25922. width: 95%;
  25923. border: none;
  25924. resize: none;
  25925. outline: none;
  25926. padding: 5px;
  25927. box-sizing: border-box;
  25928. }
  25929. .e_add_list_pbox {
  25930. width: 100%;
  25931. }
  25932. .e_add_list_pbox_title {
  25933. height: 50px;
  25934. background: #fff;
  25935. display: flex;
  25936. align-items: center;
  25937. width: 100%;
  25938. box-sizing: border-box;
  25939. padding: 0 20px;
  25940. flex-direction: row;
  25941. flex-wrap: wrap;
  25942. }
  25943. .type_title {
  25944. font-size: 18px;
  25945. font-weight: 700;
  25946. }
  25947. .type_content {
  25948. font-size: 16px;
  25949. margin-left: 30px;
  25950. }
  25951. .type_content span+span {
  25952. margin-left: 20px;
  25953. }
  25954. .type_content span {
  25955. cursor: pointer;
  25956. padding-bottom: 5px;
  25957. box-sizing: border-box;
  25958. }
  25959. .type_content .active {
  25960. color: #409eff;
  25961. border-bottom: 2px solid #409eff;
  25962. }
  25963. .e_add_list_pbox_content {
  25964. height: calc(100% - 50px);
  25965. display: flex;
  25966. align-items: center;
  25967. width: 100%;
  25968. background: #fff;
  25969. }
  25970. .mbCss {
  25971. width: 100%;
  25972. display: flex;
  25973. flex-direction: row;
  25974. flex-wrap: nowrap;
  25975. align-content: center;
  25976. align-items: flex-start;
  25977. justify-content: flex-start;
  25978. }
  25979. .pjCss {
  25980. /* width: 42%; */
  25981. width: calc(100% - 55%);
  25982. display: flex;
  25983. flex-direction: column;
  25984. flex-wrap: nowrap;
  25985. align-items: flex-start;
  25986. }
  25987. .e_box {
  25988. /* display: flex; */
  25989. flex-wrap: wrap;
  25990. max-height: 500px;
  25991. align-items: flex-start;
  25992. overflow: auto;
  25993. width: 100%;
  25994. }
  25995. .e_card {
  25996. border: 1px solid #ccc;
  25997. background: #fff;
  25998. margin-right: 20px;
  25999. width: 270px;
  26000. display: flex;
  26001. flex-direction: column;
  26002. align-items: center;
  26003. border-radius: 5px;
  26004. margin-top: 10px;
  26005. text-align: center;
  26006. }
  26007. .e_card_picture {
  26008. margin: 10px 0;
  26009. }
  26010. .e_card_picture>img {
  26011. width: 50px;
  26012. }
  26013. .e_card_name {
  26014. width: 100%;
  26015. padding: 0 10px;
  26016. box-sizing: border-box;
  26017. margin-bottom: 10px;
  26018. overflow: hidden;
  26019. text-overflow: ellipsis;
  26020. white-space: nowrap;
  26021. }
  26022. .e_card_time {
  26023. width: 100%;
  26024. padding: 0 10px;
  26025. box-sizing: border-box;
  26026. font-size: 15px;
  26027. color: #c3c3c3;
  26028. margin-bottom: 10px;
  26029. }
  26030. .e_card_btn {
  26031. height: 40px;
  26032. display: flex;
  26033. align-items: center;
  26034. width: 100%;
  26035. background: rgb(244, 244, 244);
  26036. }
  26037. .e_card_btn:hover {
  26038. background: rgb(221 221 221);
  26039. }
  26040. .e_card_btn span {
  26041. flex: 1 1 auto;
  26042. text-align: center;
  26043. cursor: pointer;
  26044. }
  26045. .addEva {
  26046. border: 1px solid #ccc;
  26047. background: #fff;
  26048. margin-right: 20px;
  26049. width: 270px;
  26050. height: 149px;
  26051. display: flex;
  26052. flex-direction: column;
  26053. align-items: center;
  26054. border-radius: 5px;
  26055. margin-top: 10px;
  26056. text-align: center;
  26057. cursor: pointer;
  26058. justify-content: center;
  26059. }
  26060. .addEva>img {
  26061. width: 50px;
  26062. object-fit: cover;
  26063. }
  26064. .uploadFm {
  26065. border: 1px dashed #ccc;
  26066. width: 100%;
  26067. height: 140px;
  26068. position: relative;
  26069. cursor: pointer;
  26070. display: flex;
  26071. flex-direction: column;
  26072. justify-content: center;
  26073. align-items: center;
  26074. font-size: 14px;
  26075. color: #6e6e6e;
  26076. position: relative;
  26077. }
  26078. .cover_p {
  26079. width: 100% !important;
  26080. height: 100%;
  26081. object-fit: cover;
  26082. }
  26083. .uploadFm2:hover .cover_mask {
  26084. display: flex !important;
  26085. }
  26086. .cover_mask {
  26087. display: none;
  26088. width: 100%;
  26089. height: 100%;
  26090. position: absolute;
  26091. background: #00000054;
  26092. align-items: center;
  26093. justify-content: center;
  26094. flex-direction: column;
  26095. }
  26096. .cover_mask>img {
  26097. width: 30px;
  26098. }
  26099. .cover_mask>span {
  26100. color: #fff;
  26101. font-size: 12px;
  26102. }
  26103. .uploadFm>img {
  26104. width: 50px;
  26105. }
  26106. .fileCss {
  26107. width: 100%;
  26108. display: flex;
  26109. flex-direction: row;
  26110. flex-wrap: nowrap;
  26111. justify-content: space-around;
  26112. align-items: center;
  26113. padding-top: 15px;
  26114. }
  26115. .fileCss>div {
  26116. display: flex;
  26117. flex-direction: column;
  26118. align-items: center;
  26119. }
  26120. .fileCss .spanName {
  26121. margin-top: 10px;
  26122. }
  26123. .sysPicBox {
  26124. display: flex;
  26125. flex-direction: row;
  26126. flex-wrap: wrap;
  26127. align-content: flex-start;
  26128. height: 435px;
  26129. overflow: auto;
  26130. position: relative;
  26131. }
  26132. .picNone {
  26133. position: absolute;
  26134. left: 50%;
  26135. top: 45%;
  26136. transform: translate(-50%, -50%);
  26137. width: fit-content;
  26138. color: #9c9c9c;
  26139. }
  26140. .sysPic {
  26141. width: 200px;
  26142. height: 115px;
  26143. margin: 0 20px 20px 0;
  26144. cursor: pointer;
  26145. }
  26146. .sysPic>img,
  26147. .isSysPic>img,
  26148. .deletePic>img {
  26149. width: 100%;
  26150. height: 100%;
  26151. object-fit: cover;
  26152. }
  26153. .isSysPic {
  26154. width: 200px;
  26155. height: 115px;
  26156. position: relative;
  26157. }
  26158. .deletePic {
  26159. width: 20px;
  26160. height: 20px;
  26161. position: absolute;
  26162. top: 0;
  26163. right: 0;
  26164. cursor: pointer;
  26165. }
  26166. .select_box1 {
  26167. height: 100%;
  26168. }
  26169. .select_box1_img {
  26170. background: #fff;
  26171. border-radius: 5px;
  26172. padding: 15px;
  26173. box-sizing: border-box;
  26174. margin-bottom: 20px;
  26175. }
  26176. .select_box1_title {
  26177. padding: 0 0 15px 0;
  26178. border-bottom: 1px solid #eee;
  26179. margin-bottom: 15px;
  26180. }
  26181. .select_box1_title span:nth-child(1) {
  26182. font-size: 16px;
  26183. margin-right: 20px;
  26184. color: #000;
  26185. }
  26186. .select_box1_title span:nth-child(2) {
  26187. font-size: 14px;
  26188. color: rgb(112, 112, 112);
  26189. }
  26190. .select_box1_add_img {}
  26191. .select_box1_select {
  26192. background: #fff;
  26193. border-radius: 5px;
  26194. padding: 15px;
  26195. box-sizing: border-box;
  26196. height: calc(100% - 200px);
  26197. overflow: auto;
  26198. }
  26199. .select_box2 {
  26200. height: 100%;
  26201. }
  26202. .select_box2_title {
  26203. background: #fff;
  26204. border-radius: 5px;
  26205. padding: 5px 10px;
  26206. box-sizing: border-box;
  26207. margin-bottom: 10px;
  26208. }
  26209. .select_box2_box {
  26210. display: flex;
  26211. height: calc(100% - 30px);
  26212. }
  26213. .select_box2_img {
  26214. width: calc(100% - 310px);
  26215. height: 100%;
  26216. overflow: auto;
  26217. background: #fff;
  26218. border-radius: 5px;
  26219. }
  26220. .select_box2_img img {
  26221. width: 100%;
  26222. }
  26223. .select_box2_answer {
  26224. background: #fff;
  26225. margin-left: 10px;
  26226. border-radius: 5px;
  26227. width: 300px;
  26228. overflow: auto;
  26229. height: 100%;
  26230. display: flex;
  26231. flex-direction: column;
  26232. align-items: center;
  26233. padding-top: 10px;
  26234. box-sizing: border-box;
  26235. }
  26236. .select_box2_answer_box {
  26237. margin: 0 0 10px 0;
  26238. width: 85%;
  26239. }
  26240. .rate_textarea {
  26241. font: inherit;
  26242. color: currentColor;
  26243. width: 100%;
  26244. padding: 8px 14px;
  26245. display: block;
  26246. min-width: 0;
  26247. outline: none;
  26248. border: 1px solid rgba(0, 0, 0, 0.23);
  26249. border-radius: 4px;
  26250. box-sizing: border-box;
  26251. background: #fff;
  26252. margin: 0 20px 0 0;
  26253. resize: none;
  26254. }
  26255. .select_answer_title {
  26256. text-align: left;
  26257. width: 85%;
  26258. margin-bottom: 10px;
  26259. font-size: 18px;
  26260. color: #8e8e8e;
  26261. }
  26262. .mask {
  26263. background-color: rgb(0 0 0 / 30%);
  26264. /* position: fixed; */
  26265. position: absolute;
  26266. top: 0;
  26267. left: 0;
  26268. width: 100%;
  26269. height: 100%;
  26270. z-index: 90;
  26271. display: flex;
  26272. align-items: center;
  26273. justify-content: center;
  26274. }
  26275. .progressBox {
  26276. width: 300px;
  26277. height: 150px;
  26278. background: #fff;
  26279. border-radius: 10px;
  26280. box-shadow: 0 0 6px 1px #bfbfbf;
  26281. display: flex;
  26282. align-items: center;
  26283. justify-content: center;
  26284. flex-direction: column;
  26285. position: relative;
  26286. color: #6c6c6c;
  26287. }
  26288. .progressBox>>>.el-progress-bar__outer {
  26289. background-color: #d1dfff !important;
  26290. }
  26291. .progressBox .lbox {
  26292. height: 50px;
  26293. font-size: 19px;
  26294. display: flex;
  26295. align-items: center;
  26296. color: #747474;
  26297. }
  26298. .progressBox .lbox img {
  26299. width: 40px;
  26300. margin-right: 20px;
  26301. }
  26302. .closeCss {
  26303. position: absolute;
  26304. top: 8px;
  26305. right: 8px;
  26306. cursor: pointer;
  26307. width: 20px;
  26308. height: 20px;
  26309. }
  26310. .closeCss>img {
  26311. width: 100%;
  26312. height: 100%;
  26313. }
  26314. .updateTips::before {
  26315. content: "协同编辑课程暂不支持修改基本信息,只支持修改阶段内容。";
  26316. font-size: 14px;
  26317. margin-left: 20px;
  26318. font-weight: 400;
  26319. color: #ff3a3a;
  26320. margin-bottom: 10px;
  26321. display: block;
  26322. }
  26323. .updateMask {
  26324. width: 100%;
  26325. z-index: 3;
  26326. top: 0;
  26327. position: absolute;
  26328. /* background-color: rgba(0,0,0,.3); */
  26329. }
  26330. .t_j_box {
  26331. display: flex;
  26332. }
  26333. .t_j_box span:nth-child(1) {
  26334. width: 15%;
  26335. overflow: hidden;
  26336. margin-right: 10px;
  26337. text-overflow: ellipsis;
  26338. white-space: nowrap;
  26339. }
  26340. .t_j_box span:nth-child(2) {
  26341. width: 30%;
  26342. overflow: hidden;
  26343. text-overflow: ellipsis;
  26344. margin-right: 10px;
  26345. }
  26346. .t_j_box span:nth-child(3) {
  26347. max-width: calc(55% - 20px);
  26348. overflow: hidden;
  26349. text-overflow: ellipsis;
  26350. }
  26351. .sentenBox {
  26352. background: #fff;
  26353. height: 600px;
  26354. overflow: auto;
  26355. background-image: url("../../../assets/icon/conSentences/csBg.png");
  26356. background-position: 102%;
  26357. background-repeat: no-repeat;
  26358. background-size: 60%;
  26359. }
  26360. .sentenBox>.sentenContent {
  26361. padding-bottom: 10px;
  26362. width: 97%;
  26363. margin: 0 auto;
  26364. }
  26365. .sentenBox>.sentenContent+.sentenContent {
  26366. border-top: 1px solid #cbcbcb;
  26367. }
  26368. .addSen {
  26369. background: #409efe;
  26370. width: 90px;
  26371. color: #fff;
  26372. height: 35px;
  26373. text-align: center;
  26374. line-height: 35px;
  26375. border-radius: 5px;
  26376. float: right;
  26377. margin: 10px 20px 0 0;
  26378. cursor: pointer;
  26379. }
  26380. .sentenTop {
  26381. display: flex;
  26382. flex-direction: row;
  26383. flex-wrap: nowrap;
  26384. align-items: center;
  26385. }
  26386. .sentenTop::before {
  26387. content: attr(index);
  26388. background: #3681fc;
  26389. border-radius: 50%;
  26390. color: #fff;
  26391. width: 25px;
  26392. height: 25px;
  26393. min-width: 25px;
  26394. min-height: 25px;
  26395. text-align: center;
  26396. line-height: 25px;
  26397. margin-right: 5px;
  26398. }
  26399. .sentenTop>div:nth-child(2) {
  26400. width: 300px;
  26401. margin: 0 15px;
  26402. }
  26403. .sentenTop>div:nth-child(3) {
  26404. background: #409efe;
  26405. color: #fff;
  26406. width: 65px;
  26407. height: 35px;
  26408. text-align: center;
  26409. line-height: 35px;
  26410. border-radius: 5px;
  26411. cursor: pointer;
  26412. }
  26413. .cardList {
  26414. padding: 30px 0 20px 0;
  26415. display: flex;
  26416. flex-direction: row;
  26417. flex-wrap: wrap;
  26418. align-items: center;
  26419. box-sizing: border-box;
  26420. border-bottom: 1px solid #f4f4f4;
  26421. width: 98%;
  26422. margin: 0 auto;
  26423. }
  26424. .rightCardList {
  26425. display: flex;
  26426. flex-wrap: wrap;
  26427. }
  26428. .cardBox {
  26429. display: flex;
  26430. flex-direction: row;
  26431. flex-wrap: wrap;
  26432. align-items: center;
  26433. align-content: center;
  26434. }
  26435. .isCard,
  26436. .isCard1 {
  26437. width: auto;
  26438. padding: 0 20px;
  26439. height: 65px;
  26440. text-align: center;
  26441. line-height: 65px;
  26442. font-size: 14px;
  26443. cursor: pointer;
  26444. background-image: url("../../../assets/icon/conSentences/titleBorder.png");
  26445. background-size: 100% 100%;
  26446. position: relative;
  26447. z-index: 99;
  26448. }
  26449. .isCard1 {
  26450. background-image: url("../../../assets/icon/conSentences/answerBorder.png");
  26451. }
  26452. .isCard:hover .deleteWord {
  26453. display: block;
  26454. }
  26455. .isCard>div:nth-child(1),
  26456. .isCard1>div:nth-child(1) {
  26457. white-space: nowrap;
  26458. overflow: hidden;
  26459. text-overflow: ellipsis;
  26460. width: 100%;
  26461. margin: 0 auto;
  26462. }
  26463. .card {
  26464. width: 140px;
  26465. height: 65px;
  26466. }
  26467. .card>img {
  26468. width: 100%;
  26469. height: 100%;
  26470. }
  26471. .rightCardBox {
  26472. width: 98%;
  26473. margin: 10px auto 0;
  26474. }
  26475. .rightCardBox>div:nth-child(1) {
  26476. margin-bottom: 10px;
  26477. }
  26478. .cardCss {
  26479. display: flex;
  26480. flex-direction: column;
  26481. flex-wrap: nowrap;
  26482. align-items: center;
  26483. border-bottom: 3px solid #b4c3d3;
  26484. padding: 0 0 5px 0;
  26485. /* margin-right: 10px; */
  26486. }
  26487. .cardCss>div:nth-child(2) {
  26488. background: #5b7b9d;
  26489. color: #fff;
  26490. width: 20px;
  26491. height: 20px;
  26492. border-radius: 50%;
  26493. text-align: center;
  26494. line-height: 20px;
  26495. }
  26496. .sentenTopBox {
  26497. display: flex;
  26498. flex-direction: row;
  26499. flex-wrap: nowrap;
  26500. align-items: center;
  26501. justify-content: space-between;
  26502. padding: 55px 0 0 20px;
  26503. box-sizing: border-box;
  26504. width: 85%;
  26505. }
  26506. .rb_c_ai_box,
  26507. .stepsBottom {
  26508. width: 100%;
  26509. /* box-shadow: 0 0 10px 10px #f7f7f7; */
  26510. /* background: #f7f7f7; */
  26511. border-radius: 10px;
  26512. overflow: hidden;
  26513. /* height: 100%; */
  26514. height: calc(100% - 55px);
  26515. }
  26516. .navTop {
  26517. background: #53749b;
  26518. color: #fff;
  26519. height: 40px;
  26520. line-height: 40px;
  26521. padding-left: 15px;
  26522. font-size: 18px;
  26523. }
  26524. .navBottom {
  26525. /* background: #6b91b7; */
  26526. height: 100%;
  26527. overflow: auto;
  26528. padding: 10px 0;
  26529. }
  26530. .navStage {
  26531. display: flex;
  26532. flex-direction: row;
  26533. flex-wrap: nowrap;
  26534. align-items: center;
  26535. padding: 10px 10px 10px 0;
  26536. cursor: pointer;
  26537. background: #ffffff;
  26538. width: 95%;
  26539. margin: 5px auto 5px;
  26540. box-sizing: border-box;
  26541. border-radius: 5px;
  26542. flex-wrap: wrap;
  26543. position: relative;
  26544. }
  26545. .navStage:hover>.chapter_upload_drag {
  26546. display: block;
  26547. }
  26548. .navTask:hover>.chapter_upload_drag {
  26549. display: block;
  26550. }
  26551. .chapter_upload:hover>.chapter_upload_drag {
  26552. display: block;
  26553. }
  26554. .navStage::before {
  26555. content: "";
  26556. display: block;
  26557. width: 16px;
  26558. height: 16px;
  26559. background-image: url(../../../assets/icon/new/icon_stage.png);
  26560. background-size: 100%;
  26561. margin-left: 25px;
  26562. }
  26563. .navStage .chapter_unit_open {
  26564. content: "";
  26565. display: block;
  26566. width: 16px;
  26567. height: 16px;
  26568. background-image: url(../../../assets/icon/new/down.png);
  26569. transform: rotate(-90deg);
  26570. background-size: 100%;
  26571. margin-left: 10px;
  26572. transition: all 0.5s;
  26573. }
  26574. .isNavStageOpen .chapter_unit_open {
  26575. transform: rotate(0deg);
  26576. }
  26577. .isNavStage {
  26578. background: #0061ff;
  26579. }
  26580. .isNavStage::before {
  26581. background-image: url(../../../assets/icon/new/icon_stage_a.png);
  26582. }
  26583. .isNavStage .chapter_unit_open {
  26584. background-image: url(../../../assets/icon/new/downC.png);
  26585. }
  26586. .isNavStage .nt_taskName {
  26587. font-weight: bold !important;
  26588. color: #ffffff !important;
  26589. }
  26590. .isNavStage .nt_taskTitle {
  26591. font-weight: bold !important;
  26592. color: #fff !important;
  26593. }
  26594. .navStage .nt_taskBox {
  26595. width: calc(100% - 68px);
  26596. padding: 0 0 0 5px;
  26597. box-sizing: border-box;
  26598. box-sizing: border-box;
  26599. display: flex;
  26600. flex-direction: row;
  26601. flex-wrap: nowrap;
  26602. align-items: baseline;
  26603. }
  26604. .navStage .nt_taskTitle {
  26605. color: #060e17;
  26606. line-height: 25px;
  26607. font-size: 16px;
  26608. }
  26609. .navStage .nt_taskName {
  26610. max-width: calc(100% - 82px);
  26611. white-space: nowrap;
  26612. overflow: hidden;
  26613. text-overflow: ellipsis;
  26614. font-size: 16px;
  26615. color: #060e17;
  26616. }
  26617. .navTask {
  26618. display: flex;
  26619. flex-direction: row;
  26620. flex-wrap: nowrap;
  26621. align-items: center;
  26622. padding: 10px 10px 10px 0;
  26623. cursor: pointer;
  26624. background: #ffffff;
  26625. width: 95%;
  26626. margin: 5px auto 5px;
  26627. box-sizing: border-box;
  26628. border-radius: 5px;
  26629. flex-wrap: wrap;
  26630. position: relative;
  26631. }
  26632. .navTask .chapter_upload_open {
  26633. content: "";
  26634. display: block;
  26635. width: 16px;
  26636. height: 16px;
  26637. background-image: url(../../../assets/icon/new/icon_arrow.png);
  26638. background-size: 100%;
  26639. margin-left: 23px;
  26640. }
  26641. .noImage .chapter_upload_open {
  26642. display: none;
  26643. background-image: unset !important;
  26644. }
  26645. .isNavOpen .chapter_upload_open {
  26646. /* background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important; */
  26647. transform: rotate(90deg);
  26648. }
  26649. .isNavTask .chapter_upload_open {
  26650. background-image: url(../../../assets/icon/new/icon_arrow_a.png) !important;
  26651. transform: rotate(-90deg);
  26652. }
  26653. .isNavTask.isNavOpen .chapter_upload_open {
  26654. transform: rotate(0deg);
  26655. }
  26656. .dragOverTop {
  26657. border-top: 2px solid #0061ff !important;
  26658. border-radius: 0 !important;
  26659. margin-top: 10px;
  26660. }
  26661. .dragOverBottom {
  26662. border-bottom: 2px solid #0061ff !important;
  26663. border-radius: 0 !important;
  26664. margin-top: 10px;
  26665. }
  26666. .dragOverTop2 {
  26667. border-top: 2px solid #0061ff !important;
  26668. border-radius: 0 !important;
  26669. }
  26670. .dragOverBottom2 {
  26671. border-bottom: 2px solid #0061ff !important;
  26672. border-radius: 0 !important;
  26673. }
  26674. .isNavTask {
  26675. /* background: #3681FC; */
  26676. background: #eef3fb;
  26677. }
  26678. .isNavTask>.chapter_upload_drag {
  26679. background-image: url(../../../assets/icon/new/icon_course_drag_active.png) !important;
  26680. }
  26681. .isNavTask .nt_taskName {
  26682. /* color: #fff !important; */
  26683. font-weight: bold !important;
  26684. color: #0061ff !important;
  26685. }
  26686. .isNavTask .nt_taskTitle {
  26687. /* color: #AECCFE !important; */
  26688. font-weight: bold !important;
  26689. color: #0061ff !important;
  26690. }
  26691. .navTask .nt_taskBox {
  26692. width: calc(100% - 40px);
  26693. padding: 0 0 0 5px;
  26694. box-sizing: border-box;
  26695. box-sizing: border-box;
  26696. display: flex;
  26697. flex-direction: row;
  26698. flex-wrap: nowrap;
  26699. align-items: baseline;
  26700. }
  26701. .navTask .nt_taskTitle {
  26702. /* color: #717C8D; */
  26703. color: #060e17;
  26704. line-height: 25px;
  26705. font-size: 16px;
  26706. /* min-width: 66px; */
  26707. }
  26708. .navTask .nt_taskName {
  26709. /* color: #fff; */
  26710. /* max-width: 130px; */
  26711. /* width: 100%; */
  26712. max-width: calc(100% - 66px);
  26713. font-size: 16px;
  26714. color: #060e17;
  26715. /* color: #0E1E33; */
  26716. }
  26717. .navTask .nt_taskName span {
  26718. width: 100%;
  26719. white-space: nowrap;
  26720. overflow: hidden;
  26721. text-overflow: ellipsis;
  26722. display: block;
  26723. }
  26724. .gjBox {
  26725. width: calc(100% - 25px);
  26726. padding: 0 0 0 0;
  26727. box-sizing: border-box;
  26728. border-left: 1px solid #cad1dc;
  26729. margin-left: 25px;
  26730. }
  26731. .gjBox>div {
  26732. display: flex;
  26733. align-items: center;
  26734. }
  26735. .gjBox>div::before {
  26736. content: "";
  26737. height: 1px;
  26738. width: 10px;
  26739. background: #cad1dc;
  26740. display: block;
  26741. margin-right: 5px;
  26742. }
  26743. .gjCss {
  26744. display: flex;
  26745. flex-direction: row;
  26746. flex-wrap: nowrap;
  26747. align-items: center;
  26748. padding: 15px 0;
  26749. box-sizing: border-box;
  26750. font-size: 14px;
  26751. cursor: pointer;
  26752. }
  26753. .isGjCss {
  26754. color: #0061ff;
  26755. }
  26756. .groupBox {}
  26757. .groupContent+.groupContent {
  26758. margin-top: 30px;
  26759. }
  26760. .groupTitle {
  26761. font-size: 24px;
  26762. color: rgb(80, 80, 80);
  26763. margin-bottom: 20px;
  26764. }
  26765. .groupName {
  26766. display: flex;
  26767. align-items: center;
  26768. }
  26769. .groupn {
  26770. font-size: 15px;
  26771. margin-right: 10px;
  26772. }
  26773. .groupName+.groupName {
  26774. margin-top: 15px;
  26775. }
  26776. .groupBtn {
  26777. margin-left: 10px;
  26778. }
  26779. .groupContent>>>.el-input-number.is-without-controls .el-input__inner {
  26780. text-align: left;
  26781. }
  26782. .radioBox>div {
  26783. margin: 10px 0 0 10px;
  26784. }
  26785. .radioBox>>>.el-radio__input,
  26786. .radioBox>>>.el-checkbox__inner {
  26787. margin-left: 10px;
  26788. }
  26789. .radioBox>>>.el-radio__label,
  26790. .radioBox>>>.el-checkbox__label {
  26791. display: flex;
  26792. align-items: center;
  26793. }
  26794. .inImg {
  26795. width: 50px;
  26796. }
  26797. .inImg>img {
  26798. width: 100%;
  26799. height: 100%;
  26800. object-fit: cover;
  26801. }
  26802. .upCss>>>.el-upload-list--picture .el-upload-list__item {
  26803. height: auto;
  26804. padding: 10px;
  26805. margin: 0;
  26806. }
  26807. .upCss>>>.el-upload-list {
  26808. width: 100%;
  26809. }
  26810. .upCss>>>.el-upload-list--picture .el-upload-list__item-thumbnail {
  26811. width: 100%;
  26812. height: 120px;
  26813. object-fit: contain;
  26814. background: unset;
  26815. margin-left: 0;
  26816. }
  26817. .upCss>>>.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name {
  26818. display: none;
  26819. }
  26820. .tcMember+.tcMember::before {
  26821. content: "、";
  26822. }
  26823. .xzUpImg {
  26824. width: 25px;
  26825. height: 25px;
  26826. min-width: 25px;
  26827. min-height: 25px;
  26828. cursor: pointer;
  26829. margin: 0 10px;
  26830. }
  26831. .xzUpImg>img {
  26832. width: 100%;
  26833. height: 100%;
  26834. }
  26835. .closeCss {
  26836. position: absolute;
  26837. top: 8px;
  26838. right: 8px;
  26839. cursor: pointer;
  26840. width: 20px;
  26841. height: 20px;
  26842. }
  26843. .closeCss>img {
  26844. width: 100%;
  26845. height: 100%;
  26846. }
  26847. .moveBtn {
  26848. display: flex;
  26849. flex-direction: row;
  26850. flex-wrap: nowrap;
  26851. align-items: center;
  26852. width: 55px;
  26853. }
  26854. .timuUpImg {
  26855. display: flex;
  26856. flex-direction: row;
  26857. align-items: center;
  26858. width: 100%;
  26859. margin-right: 10px;
  26860. }
  26861. .timuUpImg>div:nth-child(1) {
  26862. margin-right: 10px;
  26863. display: flex;
  26864. align-items: center;
  26865. width: 100%;
  26866. }
  26867. .timuImgBox {
  26868. margin: 10px 0;
  26869. display: flex;
  26870. flex-direction: column;
  26871. flex-wrap: wrap;
  26872. align-items: flex-start;
  26873. }
  26874. .timuImg {
  26875. width: 100px;
  26876. margin: 5px 0;
  26877. cursor: pointer;
  26878. position: relative;
  26879. }
  26880. .timuImg:hover .deleteWord {
  26881. display: block;
  26882. }
  26883. .deleteWord {
  26884. width: 25px;
  26885. height: 25px;
  26886. position: absolute;
  26887. right: -5px;
  26888. top: -5px;
  26889. cursor: pointer;
  26890. display: none;
  26891. }
  26892. .timuImg>img,
  26893. .deleteWord>img {
  26894. width: 100%;
  26895. height: 100%;
  26896. object-fit: cover;
  26897. }
  26898. .e_add_delete {
  26899. cursor: pointer;
  26900. margin-left: 10px;
  26901. }
  26902. .pType_box {
  26903. margin: 15px 0;
  26904. align-items: flex-end;
  26905. }
  26906. .noneBox {
  26907. height: 200px;
  26908. width: 100%;
  26909. display: flex;
  26910. align-items: center;
  26911. justify-content: center;
  26912. flex-direction: column;
  26913. /* margin-top: 150px; */
  26914. }
  26915. .noneBox>img {
  26916. width: 95px;
  26917. }
  26918. .noneBox>span {
  26919. margin-top: 10px;
  26920. color: #717c8d;
  26921. }
  26922. .rb_c_box {
  26923. width: 100%;
  26924. height: 100%;
  26925. display: flex;
  26926. /* padding: 20px; */
  26927. box-sizing: border-box;
  26928. justify-content: space-between;
  26929. }
  26930. .rb_c_box_left {
  26931. height: 100%;
  26932. background: #fff;
  26933. width: 270px;
  26934. min-width: 270px;
  26935. border-radius: 8px;
  26936. margin-right: 10px;
  26937. }
  26938. .rb_c_box_right {
  26939. height: 100%;
  26940. width: calc(100%);
  26941. overflow: hidden;
  26942. }
  26943. .rb_c_box_btn {
  26944. display: flex;
  26945. justify-content: flex-start;
  26946. height: 50px;
  26947. align-items: center;
  26948. }
  26949. .rb_c_box_right>.basic_box {
  26950. /* background: #fff; */
  26951. border-radius: 0;
  26952. height: calc(100% - 0px);
  26953. overflow: auto;
  26954. padding: 0;
  26955. }
  26956. .textarea_css {
  26957. display: block;
  26958. resize: none;
  26959. padding: 10px 15px;
  26960. line-height: 1.5;
  26961. box-sizing: border-box;
  26962. width: 100%;
  26963. font-size: 14px;
  26964. color: #606266;
  26965. background-color: #fff;
  26966. background-image: none;
  26967. border: 1px solid #dcdfe6;
  26968. border-radius: 4px;
  26969. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  26970. outline: none;
  26971. overflow: hidden;
  26972. height: 46px;
  26973. font-family: "Microsoft YaHei";
  26974. }
  26975. .textarea_css::-webkit-input-placeholder {
  26976. color: #c0c4cc;
  26977. }
  26978. .textarea_css:focus {
  26979. border-color: #409eff;
  26980. outline: 0;
  26981. }
  26982. .addEditor>>>.text {
  26983. height: auto;
  26984. min-height: 100px;
  26985. }
  26986. .addEditor>>>.w-e-text-container {
  26987. min-height: 100px;
  26988. }
  26989. .moveBtn2 {
  26990. flex-direction: column;
  26991. width: fit-content;
  26992. margin: 0 10px 0 10px;
  26993. }
  26994. .moveBtn2 .chapter_upload_down,
  26995. .moveBtn2 .chapter_upload_up {
  26996. width: 16px;
  26997. height: 16px;
  26998. }
  26999. .moveBtn2 .chapter_upload_up::after,
  27000. .moveBtn2 .chapter_upload_down::after {
  27001. width: 10px;
  27002. height: 10px;
  27003. }
  27004. .fullStyle>>>.el-dialog__body {
  27005. height: calc(100% - 125px) !important;
  27006. box-sizing: border-box;
  27007. }
  27008. .fullStyle1>>>.el-dialog__body {
  27009. height: auto !important;
  27010. }
  27011. .fullStyle>>>.el-dialog {
  27012. width: 100% !important;
  27013. max-width: 100% !important;
  27014. height: 100% !important;
  27015. margin: 0 !important;
  27016. }
  27017. .fullStyle {
  27018. width: 100% !important;
  27019. max-width: 100% !important;
  27020. height: 100% !important;
  27021. margin: 0 auto !important;
  27022. }
  27023. .wb_j_box_btn {
  27024. width: calc(100% - 30px);
  27025. display: flex;
  27026. height: 40px;
  27027. border: 1.5px solid #cad1dc;
  27028. border-radius: 4px;
  27029. box-sizing: border-box;
  27030. align-items: center;
  27031. font-size: 14px;
  27032. cursor: pointer;
  27033. overflow: hidden;
  27034. }
  27035. .wb_j_box_btn:hover {
  27036. border: 1.5px solid #0061ff;
  27037. }
  27038. .wb_j_box_title {
  27039. background: #f0f4fa;
  27040. height: 100%;
  27041. line-height: 40px;
  27042. width: 90px;
  27043. text-align: center;
  27044. color: #060e17;
  27045. border-right: 1.5px solid #cad1dc;
  27046. box-sizing: border-box;
  27047. }
  27048. .wb_j_box_btn_c {
  27049. width: calc(100% - 90px);
  27050. padding: 0 35px 0 10px;
  27051. box-sizing: border-box;
  27052. position: relative;
  27053. }
  27054. .wb_j_box_span {
  27055. width: 100%;
  27056. overflow: hidden;
  27057. white-space: nowrap;
  27058. text-overflow: ellipsis;
  27059. word-wrap: break-word;
  27060. color: #717c8d;
  27061. }
  27062. .wb_j_box_arrow {
  27063. content: "";
  27064. width: 14px;
  27065. height: 14px;
  27066. background: url(../../../assets/icon/new/u_arrow.png);
  27067. background-size: 100% 100%;
  27068. position: absolute;
  27069. right: 12px;
  27070. top: 50%;
  27071. transform: translateY(-50%);
  27072. }
  27073. .check_classBox {
  27074. height: 400px;
  27075. display: flex;
  27076. border-top: 1.5px solid #e7ebf1;
  27077. border-bottom: 1.5px solid #e7ebf1;
  27078. }
  27079. .check_class_right {
  27080. width: 130px;
  27081. border-right: 1px solid #e7ebf1;
  27082. display: flex;
  27083. align-items: center;
  27084. flex-direction: column;
  27085. height: 100%;
  27086. overflow: auto;
  27087. padding: 15px 0;
  27088. box-sizing: border-box;
  27089. }
  27090. .check_class {
  27091. width: 85%;
  27092. border-radius: 5px;
  27093. height: 30px;
  27094. min-height: 30px;
  27095. line-height: 30px;
  27096. text-align: center;
  27097. padding: 0 10px;
  27098. box-sizing: border-box;
  27099. cursor: pointer;
  27100. white-space: nowrap;
  27101. overflow: hidden;
  27102. text-overflow: ellipsis;
  27103. }
  27104. .check_class.activeX {
  27105. background: #e0eafb;
  27106. color: #3681fc;
  27107. font-weight: 700;
  27108. }
  27109. .check_class+.check_class {
  27110. margin-top: 15px;
  27111. }
  27112. .check_class_left {
  27113. background: #fafafa;
  27114. width: calc(100% - 130px);
  27115. padding: 15px;
  27116. box-sizing: border-box;
  27117. }
  27118. .check_class_all_box {
  27119. display: flex;
  27120. margin-bottom: 10px;
  27121. }
  27122. .all_check {
  27123. display: flex;
  27124. align-items: center;
  27125. padding: 2px 0 0;
  27126. margin-left: 10px;
  27127. }
  27128. .all_check>>>.el-checkbox__label {
  27129. line-height: 18px;
  27130. }
  27131. .check_class_left_title {
  27132. font-size: 16px;
  27133. font-weight: 700;
  27134. }
  27135. .check_class_item {
  27136. display: flex;
  27137. flex-wrap: wrap;
  27138. height: calc(100% - 45px);
  27139. overflow: auto;
  27140. justify-content: flex-start;
  27141. align-items: flex-start;
  27142. align-content: flex-start;
  27143. }
  27144. .class_item:first-child {
  27145. /* margin: 0 15px 15px 67px; */
  27146. }
  27147. .class_item {
  27148. margin: 0 15px 15px 0;
  27149. }
  27150. .class_item:hover>>>.el-checkbox__label {
  27151. color: #409eff;
  27152. }
  27153. .class_item>>>.el-checkbox__label {
  27154. color: #0e1e33;
  27155. }
  27156. .class_item:hover>>>.el-checkbox__inner {
  27157. border-color: #409eff;
  27158. }
  27159. .class_item>>>.el-checkbox,
  27160. .class_item>>>.el-checkbox__input {
  27161. display: flex;
  27162. align-items: center;
  27163. }
  27164. .taskTitle {
  27165. font-size: 20px;
  27166. font-weight: bold;
  27167. margin-bottom: 35px;
  27168. }
  27169. .taskTitle:after {
  27170. content: "";
  27171. width: 100%;
  27172. display: block;
  27173. height: 1px;
  27174. background: #cad1dc;
  27175. position: absolute;
  27176. left: 0;
  27177. margin: 15px 0 0;
  27178. }
  27179. .eva_btn_box {
  27180. margin: 20px 0px 0 0;
  27181. display: flex;
  27182. flex-direction: row;
  27183. flex-wrap: nowrap;
  27184. align-items: center;
  27185. justify-content: space-between;
  27186. width: 100%;
  27187. }
  27188. .eva_btn_left_box {
  27189. display: flex;
  27190. flex-direction: row;
  27191. flex-wrap: nowrap;
  27192. align-items: center;
  27193. }
  27194. .addTypeChoose {
  27195. display: flex;
  27196. flex-direction: row;
  27197. flex-wrap: nowrap;
  27198. align-items: center;
  27199. margin: 15px 0;
  27200. }
  27201. .addTypeBox {
  27202. display: flex;
  27203. flex-direction: column;
  27204. flex-wrap: nowrap;
  27205. align-items: center;
  27206. }
  27207. .addTypeChoose {
  27208. display: flex;
  27209. flex-direction: row;
  27210. flex-wrap: nowrap;
  27211. align-items: center;
  27212. margin: 15px 0;
  27213. }
  27214. .buchong_box {
  27215. background: #E0EAFB66;
  27216. width: calc(100% - 20px);
  27217. min-height: 50px;
  27218. display: flex;
  27219. align-items: center;
  27220. justify-content: center;
  27221. margin: 0 auto;
  27222. }
  27223. .outline {
  27224. width: calc(100% - 40px);
  27225. margin: 0 auto;
  27226. }
  27227. .task_outline {
  27228. width: calc(100% - 40px);
  27229. margin: 0 auto;
  27230. }
  27231. .outline_box+.outline_box {
  27232. margin: 30px 0 0px;
  27233. }
  27234. .outline_task {
  27235. display: flex;
  27236. align-items: center;
  27237. margin-bottom: 10px;
  27238. }
  27239. .outline_btn{
  27240. display: flex;
  27241. align-items: center;
  27242. min-width: fit-content;
  27243. margin-left: 10px;
  27244. }
  27245. .outline_task .title {
  27246. font-size: 18px;
  27247. font-weight: bold;
  27248. min-width: 80px;
  27249. }
  27250. .op_task_box,
  27251. .op_tool_box,
  27252. .outline_detail {
  27253. position: relative;
  27254. }
  27255. .op_task_box:hover .op_box,
  27256. .op_tool_box:hover .op_box,
  27257. .outline_detail:hover .op_box {
  27258. display: flex
  27259. }
  27260. .op_box {
  27261. position: absolute;
  27262. bottom: 10px;
  27263. display: none;
  27264. align-items: center;
  27265. justify-content: space-between;
  27266. width: calc(100% - 20px);
  27267. left: 50%;
  27268. transform: translateX(-50%);
  27269. }
  27270. .op_box .op_remark {
  27271. color: #8E8E8E;
  27272. font-size: 14px;
  27273. }
  27274. .op_box_right{
  27275. display: flex;
  27276. }
  27277. .op_box_isquote{
  27278. display: flex;
  27279. }
  27280. .op_box_isquote *{
  27281. display: none;
  27282. }
  27283. .op_box_isquote .op_box_right,
  27284. .op_box_isquote .custom-switch{
  27285. display: flex;
  27286. margin-left: auto;
  27287. }
  27288. .op_task_box:hover .op_box_isquote *{
  27289. display: flex;
  27290. }
  27291. .op_task_box:hover .op_box_isquote .op_box_right,
  27292. .op_task_box:hover .op_box_isquote .custom-switch{
  27293. display: flex;
  27294. margin-left: unset;
  27295. }
  27296. .rb_c_nav {
  27297. width: calc(100% - 20px);
  27298. margin: 15px auto 0;
  27299. font-size: 18px;
  27300. }
  27301. .rb_c_nav span {
  27302. cursor: pointer;
  27303. }
  27304. .rb_c_nav span+span {
  27305. margin-left: 10px;
  27306. }
  27307. .rb_c_nav span.active {
  27308. color: #0061FF
  27309. }
  27310. .text_panel>>>.text {
  27311. height: 400px;
  27312. }
  27313. .markBox{
  27314. padding: 20px 14px;
  27315. line-height: 29px;
  27316. font-size: 16px;
  27317. background: #f4f4f4;
  27318. border-radius: 5px;
  27319. word-break: break-word;
  27320. }
  27321. .info_box_t {
  27322. display: flex;
  27323. align-items: center;
  27324. flex-wrap: wrap;
  27325. }
  27326. .info_box_t + .info_box_t {
  27327. margin-top: 10px;
  27328. }
  27329. .info_box_t_box {
  27330. display: flex;
  27331. align-items: center;
  27332. flex-wrap: wrap;
  27333. margin-bottom: 5px;
  27334. }
  27335. .info_box_t_box + .info_box_t_box{
  27336. margin-left: 10px;
  27337. }
  27338. .info_box_t_box > span{
  27339. width: fit-content
  27340. }
  27341. .info_box_t_box > input{
  27342. width: 150px !important;
  27343. margin: 0 5px 0 0;
  27344. }
  27345. .info_radio >>> .el-radio, .el-radio__input{
  27346. line-height: 18px;
  27347. height: 18px;
  27348. }
  27349. .mode_box{
  27350. display: flex;
  27351. align-items: center;
  27352. }
  27353. .mode_box > span{
  27354. padding: 0px 5px;
  27355. cursor: pointer;
  27356. }
  27357. .mode_box > span.active{
  27358. color: #409eff;
  27359. }
  27360. .chapter_upload_check {
  27361. width: 15px;
  27362. height: 15px;
  27363. cursor: pointer;
  27364. background-image: url('../../../assets/icon/check.png');
  27365. background-size: 100% 100%;
  27366. }
  27367. .chapter_upload_check.checked{
  27368. background-image: url('../../../assets/icon/checked.png');
  27369. }
  27370. .ruleBtn {
  27371. width: fit-content;
  27372. height: 36px;
  27373. line-height: 36px;
  27374. cursor: pointer;
  27375. color: #0061FF;
  27376. }
  27377. .stopBtn{
  27378. z-index: 999999;
  27379. position: absolute;
  27380. left: 50%;
  27381. top: calc(50% + 70px);
  27382. transform: translateX(-50%);
  27383. }
  27384. .rateSwitch >>> .el-switch__label.is-active {
  27385. color: #0061FF;
  27386. }
  27387. .rateSwitch >>> .el-switch__label--right{
  27388. display: flex;
  27389. align-items: center;
  27390. }
  27391. .rateSwitch >>> .el-switch__label--right::before{
  27392. content: "";
  27393. width: 14px;
  27394. height: 14px;
  27395. min-width: 14px;
  27396. min-height: 14px;
  27397. background-size: 100% 100%;
  27398. display: block;
  27399. margin-right: 7px;
  27400. background-image: url(../../../assets/icon/new/u_op2.png);
  27401. }
  27402. .rateSwitch >>> .el-switch__label--right.is-active::before{
  27403. background-image: url(../../../assets/icon/new/u_op.png);
  27404. }
  27405. .inter_box{
  27406. min-width: calc(50%);
  27407. min-height: 500px;
  27408. margin-right: 10px;
  27409. border: 1px solid #c7c7c7;
  27410. border-radius: 0px 5px 5px 5px;
  27411. overflow: hidden;
  27412. position: relative;
  27413. box-sizing: border-box;
  27414. }
  27415. .inter_box::before{
  27416. content:'对话区';
  27417. position: absolute;
  27418. left: 0;
  27419. top: 0;
  27420. display: block;
  27421. padding: 8px 10px;
  27422. background: #e0eafb;
  27423. color: #98a0ac;
  27424. font-size: 14px;
  27425. border-radius: 0 15px 15px 0;
  27426. }
  27427. .inter_Detailbox{
  27428. border: 1px solid #c7c7c7;
  27429. border-radius: 0px 5px 5px 5px;
  27430. overflow: hidden;
  27431. position: relative;
  27432. box-sizing: border-box;
  27433. }
  27434. .inter_Detailbox::before{
  27435. content:'编辑区';
  27436. position: absolute;
  27437. left: 0;
  27438. top: 0;
  27439. display: block;
  27440. padding: 8px 10px;
  27441. background: #e0eafb;
  27442. color: #98a0ac;
  27443. font-size: 14px;
  27444. border-radius: 0 15px 15px 0;
  27445. }
  27446. .inter_box > iframe{
  27447. width: 100%;
  27448. height: 100%;
  27449. border: none;
  27450. }
  27451. .inter_setting{
  27452. display: block;
  27453. background-image: url(../../../assets/icon/course/setting.svg);
  27454. background-size: 100% 100%;
  27455. width: 20px;
  27456. height: 20px;
  27457. cursor: pointer;
  27458. margin-left: 10px;
  27459. }
  27460. .inter_setting_panel{
  27461. position: absolute;
  27462. left: 110px;
  27463. top: 30px;
  27464. background: #fff;
  27465. border-radius: 5px;
  27466. box-shadow: 0px 0px 2px 1px #00000017;
  27467. padding: 10px;
  27468. z-index: 999;
  27469. }
  27470. .panel_title{
  27471. text-align: center;
  27472. font-size: 18px;
  27473. margin-bottom: 10px;
  27474. }
  27475. .panel_tips{
  27476. font-weight: 500;
  27477. font-size: 14px;
  27478. text-align: center;
  27479. margin-bottom: 10px;
  27480. color: #6d6d6d;
  27481. }
  27482. .panel_input{
  27483. margin-bottom: 10px;
  27484. }
  27485. .panel_button{
  27486. display: flex;
  27487. justify-content: space-between;
  27488. }
  27489. .custom-switch >>> .el-switch__label.is-active {
  27490. color: #0061FF;
  27491. }
  27492. .close_btn{
  27493. position: absolute;
  27494. top: 40px;
  27495. right: 10px;
  27496. box-shadow: 0 0 4px 2px #00000033;
  27497. border-radius: 70px 0 0 70px;
  27498. display: flex;
  27499. align-items: center;
  27500. padding-left: 5px;
  27501. padding: 10px 7px 10px 12px;
  27502. background: #fff;
  27503. cursor: pointer;
  27504. }
  27505. .close_btn > img {
  27506. width: 15px;
  27507. transition: 0.3s;
  27508. transform: rotate(0deg);
  27509. }
  27510. .close_btn_voice > img{
  27511. transform: rotate(180deg);
  27512. }
  27513. .resizable {
  27514. position: relative;
  27515. min-width: 350px; /* 最小宽度 */
  27516. max-width: 50%; /* 最大宽度 */
  27517. }
  27518. .resizer {
  27519. width: 5px;
  27520. height: 35px;
  27521. background: #ccc;
  27522. position: absolute;
  27523. top: 50%;
  27524. left: 0;
  27525. cursor: ew-resize;
  27526. transform: translateY(-50%);
  27527. border-radius: 43px;
  27528. }
  27529. </style>